1 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3 * linux-low.h (struct linux_target_ops) <delete_process>: New
5 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
7 (struct linux_target_ops): Add delete_process callback.
8 * linux-arm-low.c (arm_delete_process): New.
9 (struct linux_target_ops): Add delete_process callback.
10 * linux-bfin-low.c (struct linux_target_ops): Likewise.
11 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
12 * linux-m32r-low.c (struct linux_target_ops): Likewise.
13 * linux-mips-low.c (mips_linux_delete_process): New.
14 (struct linux_target_ops): Add delete_process callback.
15 * linux-ppc-low.c (struct linux_target_ops): Likewise.
16 * linux-s390-low.c (struct linux_target_ops): Likewise.
17 * linux-sh-low.c (struct linux_target_ops): Likewise.
18 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
19 * linux-tile-low.c (struct linux_target_ops): Likewise.
20 * linux-x86-low.c (x86_linux_delete_process): New.
21 (struct linux_target_ops): Add delete_process callback.
22 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
24 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
26 * linux-aarch64-low.c (the_low_target): Add thread delete
28 * linux-arm-low.c (arm_delete_thread): New function.
29 (the_low_target): Add thread delete callback.
30 * linux-bfin-low.c (the_low_target): Likewise.
31 * linux-crisv32-low.c (the_low_target): Likewise.
32 * linux-low.c (delete_lwp): Invoke delete_thread callback if
34 * linux-low.h (struct linux_target_ops) <delete_thread>: New
36 * linux-m32r-low.c (the_low_target): Add thread delete callback.
37 * linux-mips-low.c (mips_linux_delete_thread): New function.
38 (the_low_target): Add thread delete callback.
39 * linux-ppc-low.c (the_low_target): Likewise.
40 * linux-s390-low.c (the_low_target): Likewise.
41 * linux-sh-low.c (the_low_target): Likewise.
42 * linux-tic6x-low.c (the_low_target): Likewise.
43 * linux-tile-low.c (the_low_target): Likewise.
44 * linux-x86-low.c (the_low_target): Likewise.
45 * linux-xtensa-low.c (the_low_target): Likewise.
47 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
49 * win32-low.c: Include "common-inferior.h".
51 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
53 * inferiors.c (set_inferior_cwd): New function.
54 * server.c (handle_general_set): Handle QSetWorkingDir packet.
55 (handle_query): Inform that QSetWorkingDir is supported.
56 * win32-low.c (create_process): Pass the inferior's cwd to
59 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
61 * inferiors.c (current_inferior_cwd): New global variable.
62 (get_inferior_cwd): New function.
63 * inferiors.h (struct process_info) <cwd>: New field.
65 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
67 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
68 (OBS): Add gdb_tilde_expand.o.
70 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
72 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
73 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
75 2017-09-29 Pedro Alves <palves@redhat.com>
77 * ax.c (gdb_parse_agent_expr): Constify.
78 * ax.h (gdb_parse_agent_expr): Constify.
79 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
81 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
82 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
83 * remote-utils.h (read_ptid): Constify.
84 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
85 (process_point_options, process_serial_event): Constify.
86 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
87 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
88 (cmd_qtbuffer): Constify.
90 2017-09-29 Pedro Alves <palves@redhat.com>
92 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
95 2017-09-29 Pedro Alves <palves@redhat.com>
97 * linux-low.c (handle_extended_wait): Pass parent thread instead
98 of process to thread_db_notice_clone.
99 * linux-low.h (thread_db_notice_clone): Replace parent process
100 parameter with parent thread parameter.
101 * thread-db.c (find_one_thread): Add comment.
102 (thread_db_notice_clone): Replace parent process parameter with
103 parent thread parameter. Temporarily switch to the parent thread.
105 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
107 * gdbthread.h: Include "common-gdbthread.h".
108 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
109 "if" when validating the ptid.
110 * remote-utils.c: Include "gdbthread.h".
111 (prepare_resume_reply): Use "switch_to_thread".
112 * target.c (done_accessing_memory): Likewise.
114 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
116 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
117 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
118 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
119 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
120 s390x-gs-linux64-ipa.o to ipa_obj.
121 * linux-s390-low.c (HWCAP_S390_GS): New define.
122 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
124 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
125 (s390_arch_setup): Check for guarded-storage support and choose
127 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
128 init_registers_s390x_gs_linux64.
129 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
131 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
132 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
134 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
136 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
138 2017-09-21 Kevin Buettner <kevinb@redhat.com>
140 * linux-low.h (struct lwp_info): Add new field, thread_handle.
141 (thread_db_thread_handle): Declare.
142 * linux-low.c (linux_target_ops): Initialize thread_handle.
143 * server.c (handle_qxfer_threads_worker): Add support for
145 * target.h (struct target_ops): Add new function pointer,
147 (target_thread_handle): Define.
148 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
150 (thread_db_thread_handle): New function.
152 2017-09-21 Kevin Buettner <kevinb@redhat.com>
154 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
155 * linux-low.h (thread_db_notice_clone): Declare.
156 * thread-db.c (thread_db_notice_clone): New function.
158 2017-09-21 Pedro Alves <palves@redhat.com>
160 * server.c (gdb_read_memory, handle_status, process_serial_event)
161 (handle_serial_event, handle_target_event): Adjust to
162 set_desired_thread prototype change.
163 * target.c (set_desired_thread): Remove 'use_general' parameter
165 * target.h (set_desired_thread): Remove 'use_general' parameter.
167 2017-09-20 Tom Tromey <tom@tromey.com>
169 * target.c (target_terminal::terminal_state): Define.
170 (target_terminal::init): Rename from target_terminal_init.
171 (target_terminal::inferior): Rename from
172 target_terminal_inferior.
173 (target_terminal::ours): Rename from target_terminal_ours.
174 (target_terminal::ours_for_output, target_terminal::info): New.
176 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
178 * server.c (accumulate_file_name_length): Remove.
179 (emit_dll_description): Adjust to std::string change.
180 (handle_qxfer_libraries): Use std::string to hold document.
182 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
184 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
185 return type of xml_escape_text.
186 * server.c (emit_dll_description): Likewise.
188 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
190 * server.c (captured_main): Accept argument for --selftest.
191 Update run_tests call.
192 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
193 when registering selftests.
195 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
197 * regcache.c (get_thread_regcache): Update code to use "std::vector"
198 instead of "VEC" for "target_desc.reg_defs".
199 (regcache_cpy): Likewise.
200 (registers_to_string): Likewise.
201 (registers_from_string): Likewise.
202 (find_regno): Likewise.
203 (supply_regblock): Likewise.
204 (regcache_raw_read_unsigned): Likewise.
205 * tdesc.c (init_target_desc): Likewise.
206 (tdesc_create_reg): Likewise.
207 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
208 (struct target_desc) <reg_defs>: Convert to "std::vector".
209 (target_desc): Do not initialize "reg_defs".
210 (~target_desc): Update code to use "std::vector" instead of "VEC"
211 for "target_desc.reg_defs".
212 (operator==): Likewise.
214 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
216 * inferiors.h (thread_to_gdb_id): Remove.
217 * inferiors.c (thread_to_gdb_id): Remove.
218 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
219 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
220 lynx_store_registers, lynx_read_memory, lynx_write_memory):
222 * nto-low.c (nto_fetch_registers, nto_store_registers,
223 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
225 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
227 * inferiors.h (gdb_id_to_thread_id): Remove.
228 * inferiors.c (gdb_id_to_thread_id): Remove.
229 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
230 removal. Move pid declaration closer to where it's used.
232 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
234 * server.c (handle_detach): New function.
235 (process_serial_event): Move code out, call handle_detach.
237 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
239 * server.c (require_running): Rename to ...
240 (require_running_or_return): ... this ...
241 (require_running_or_break): ... and this.
242 (handle_query, process_serial_event): Adjust.
244 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
246 * linux-low.c (linux_set_resume_request): Remove unused
249 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
251 * server.c (first_thread_of): Remove.
252 (process_serial_event): Replace usage of first_thread_of with
253 find_any_thread_of_pid.
254 * tracepoint.c (same_process_p): Remove.
255 (gdb_agent_about_to_close): Replace usage of same_process_p with
256 find_any_thread_of_pid.
257 * linux-x86-low.c (same_process_callback): Remove.
258 (x86_arch_setup_process_callback): Replace usage of
259 same_process_callback with find_any_thread_of_pid.
260 * thread-db.c (any_thread_of): Remove.
261 (switch_to_process): Replace usage of any_thread_of with
262 find_any_thread_of_pid.
263 * inferiors.c (thread_pid_matches_callback): Remove.
264 (find_thread_process): Adjust to use find_any_thread_of_pid.
266 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
268 * regcache.c (get_thread_regcache): Guard calls to "memset"
271 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
273 * linux-low.c (handle_extended_wait): Use
274 "allocate_target_description" instead of "XNEW".
275 * linux-x86-low.c (initialize_low_arch): Likewise.
277 2017-09-05 Yao Qi <yao.qi@linaro.org>
279 * configure.srv (srv_i386_regobj): Remove.
280 (srv_amd64_regobj): Remove.
281 (srv_regobj): Set it to "" for x86 non-linux targets.
282 * linux-x86-tdesc.c (i386_linux_read_description):
283 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
284 (init_registers_i386): Remove the declaration.
285 (tdesc_i386): Remove the declaration.
286 (lynx_i386_arch_setup): Call i386_create_target_description.
287 * nto-x86-low.c: Likewise.
288 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
289 [!__x86_64__]: include arch/i386.h.
290 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
292 2017-09-05 Yao Qi <yao.qi@linaro.org>
294 * configure.srv (srv_amd64_linux_xmlfiles): Remove
295 i386/amd64-XXX-linux from it.
297 2017-09-05 Yao Qi <yao.qi@linaro.org>
299 * configure.srv: Empty srv_amd64_linux_regobj if $development is
301 (ipa_amd64_linux_regobj): Remove.
302 (ipa_x32_linux_regobj): Remove.
304 2017-09-05 Yao Qi <yao.qi@linaro.org>
306 * Makefile.in (arch-amd64.o): New rule.
307 * configure.srv: Append arch-amd64.o.
308 * linux-amd64-ipa.c: Include common/x86-xstate.h.
309 (get_ipa_tdesc): Call amd64_linux_read_description.
310 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
311 and init_registers_amd64_XXX.
312 * linux-x86-low.c (x86_linux_read_description): Call
313 amd64_linux_read_description.
314 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
315 (initialize_low_arch): Don't call init_registers_x32_XXX and
316 init_registers_amd64_XXX.
317 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
319 [__x86_64__] (amd64_tdesc_test): New function.
320 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
321 and init_registers_amd64_XXX.
322 * linux-x86-tdesc.c: Include arch/amd64.h.
323 (xcr0_to_tdesc_idx): New function.
324 (i386_linux_read_description): New function.
325 (amd64_get_ipa_tdesc_idx): New function.
326 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
327 (amd64_get_ipa_tdesc): Declare.
329 2017-09-05 Yao Qi <yao.qi@linaro.org>
331 * configure.srv (srv_i386_linux_xmlfiles): Remove
332 i386/i386-XXX-linux.xml from it.
334 2017-09-05 Yao Qi <yao.qi@linaro.org>
336 * configure.srv: Set srv_i386_linux_regobj empty if $development
338 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
339 initialize_low_tdesc.
340 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
341 with #if initialize_low_tdesc.
342 * linux-x86-tdesc-selftest.c: New file.
343 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
345 2017-09-05 Yao Qi <yao.qi@linaro.org>
347 * Makefile.in (arch-i386.o): New rule.
348 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
349 (x86_64-*-linux*): Likewise.
350 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
352 (i386_linux_read_description): Remove code and call
353 i386_create_target_description.
354 * tdesc.c (allocate_target_description): New function.
355 * tdesc.h (set_tdesc_architecture): Remove declaration.
356 (set_tdesc_osabi): Likewise.
358 2017-09-05 Yao Qi <yao.qi@linaro.org>
360 * linux-x86-tdesc.c: Don't include <inttypes.h>.
361 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
362 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
364 * server.c (get_features_xml): Call tdesc_get_features_xml.
365 * tdesc.c (set_tdesc_architecture): New function.
366 (set_tdesc_osabi): New function.
367 (tdesc_get_features_xml): New function.
368 (tdesc_create_feature): Add an argument.
369 * tdesc.h (struct target_desc) <features>: New field.
370 <arch, osabi>: New field.
371 (~target_desc): xfree features, arch, and osabi.
372 (target_desc::oerator==): Don't compare .xmltarget.
373 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
374 (set_tdesc_osabi): Likewise.
375 (tdesc_get_features_xml): Likewise.
377 2017-09-05 Yao Qi <yao.qi@linaro.org>
379 * linux-x86-tdesc.c: Include selftest.h.
380 (i386_tdesc_test): New function.
381 (initialize_low_tdesc): Call selftests::register_test.
382 * tdesc.h: Include regdef.h.
383 (target_desc): Override operator == and !=.
385 2017-09-05 Yao Qi <yao.qi@linaro.org>
387 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
389 * linux-i386-ipa.c: Include common/x86-xstate.h
390 (get_ipa_tdesc): Call i386_linux_read_description.
391 (initialize_low_tracepoint): Don't call init_registers_XXX
392 functions, call initialize_low_tdesc instead.
393 * linux-x86-low.c (x86_linux_read_description): Call
394 i386_linux_read_description.
395 (initialize_low_arch): Don't call init_registers_i386_XXX
396 functions, call initialize_low_tdesc.
397 * linux-x86-tdesc.c: New file.
398 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
399 (i386_get_ipa_tdesc_idx): Declare.
400 (i386_get_ipa_tdesc): Declare.
401 (initialize_low_tdesc): Declare.
403 2017-09-05 Yao Qi <yao.qi@linaro.org>
405 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
408 2017-09-05 Yao Qi <yao.qi@linaro.org>
410 * Makefile.in (IPA_OBJS): Add vec-ipa.o
411 * regcache.c (get_thread_regcache): Use VEC_length.
412 (init_register_cache): Likewise.
413 (regcache_cpy): Likewise.
414 (registers_to_string): Iterate reg_defs via VEC_iterate.
415 (find_regno): Likewise.
416 (find_register_by_number): Use VEC_index.
417 (register_size): Call find_register_by_number.
418 (register_data): Call find_register_by_number.
419 (supply_regblock): Use VEC_length.
420 (regcache_raw_read_unsigned): Likewise.
421 * tdesc.c (init_target_desc): Iterate reg_defs via
423 (default_description): Update initializer.
424 (copy_target_description): Don't update field num_registers.
425 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
426 <num_registers>: Remove.
428 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
430 * Makefile.in (.SECONDARY): Define target.
432 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
434 * linux-low.c (linux_wait_1): Adjust.
435 * server.c (queue_stop_reply_callback): Adjust.
437 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
439 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
440 QEnvironmentUnset and QEnvironmentReset packets.
441 (handle_query): Inform remote that QEnvironmentHexEncoded,
442 QEnvironmentUnset and QEnvironmentReset are supported.
444 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
446 * inferiors.h (inferior_target_data): Rename to ...
447 (thread_target_data): ... this.
448 (inferior_regcache_data): Rename to ...
449 (thread_regcache_data): ... this.
450 (set_inferior_regcache_data): Rename to ...
451 (set_thread_regcache_data): ... this.
452 * inferiors.c (inferior_target_data): Rename to ...
453 (thread_target_data): ... this.
454 (inferior_regcache_data): Rename to ...
455 (thread_regcache_data): ... this.
456 (set_inferior_regcache_data): Rename to ...
457 (set_thread_regcache_data): ... this.
458 (free_one_thread): Update.
459 * linux-low.h (get_thread_lwp): Update.
460 * regcache.c (get_thread_regcache): Update.
461 (regcache_invalidate_thread): Update.
462 (free_register_cache_thread): Update.
463 * win32-i386-low.c (update_debug_registers_callback): Update.
464 (win32_get_current_dr): Update.
465 * win32-low.c (thread_rec): Update.
466 (delete_thread_info): Update.
467 (continue_one_thread): Update.
468 (suspend_one_thread): Update.
470 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
472 * inferiors.c (set_inferior_target_data): Remove.
473 * inferiors.h (set_inferior_target_data): Remove.
475 2017-08-18 Yao Qi <yao.qi@linaro.org>
477 * Makefile.in (OBS): Add selftest.o.
478 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
479 * configure, config.in: Re-generated.
480 * server.c: Include common/sefltest.h.
481 (captured_main): Handle option --selftest.
483 2017-08-09 Yao Qi <yao.qi@linaro.org>
485 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
486 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
487 i386-avx-mpx.o and i386-mmx.o.
488 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
489 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
490 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
491 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
492 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
493 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
494 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
495 i386/amd64-avx-mpx.xml.
497 2017-08-09 Yao Qi <yao.qi@linaro.org>
499 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
500 and x32-avx-avx512.o.
501 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
502 i386/x32-avx-avx512.xml.
504 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
506 * tracepoint.h (enum class fast_tpoint_collect_result): New
508 (fast_tracepoint_collecting): Change return type to
509 fast_tpoint_collect_result.
510 * tracepoint.c (fast_tracepoint_collecting): Likewise.
511 * linux-low.h: Include tracepoint.h.
512 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
513 fast_tpoint_collect_result.
514 * linux-low.c (handle_tracepoints): Adjust.
515 (linux_fast_tracepoint_collecting): Change return type to
516 fast_tpoint_collect_result.
517 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
518 linux_wait_1, stuck_in_jump_pad_callback,
519 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
520 proceed_one_lwp): Adjust to type change.
522 2017-07-10 Yao Qi <yao.qi@linaro.org>
524 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
526 2017-06-29 Yao Qi <yao.qi@linaro.org>
528 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
530 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
532 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
534 * Makefile.in (IPA_OBJS): Sort and format one item per line.
536 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
538 * linux-low.c (linux_create_inferior): Adjust code to access the
539 environment information via 'gdb_environ' class.
540 * lynx-low.c (lynx_create_inferior): Likewise.
541 * server.c (our_environ): Make it an instance of 'gdb_environ'.
542 (get_environ): Return a pointer to 'our_environ'.
543 (captured_main): Initialize 'our_environ'.
544 * server.h (get_environ): Adjust prototype.
545 * spu-low.c (spu_create_inferior): Adjust code to access the
546 environment information via 'gdb_environ' class.
548 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
550 * linux-low.c (linux_read_memory, linux_write_memory): Remove
551 usage of "register" keyword.
553 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
555 * configure: Re-generate.
557 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
559 * configure: Re-generate.
561 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
563 * Makefile.in (COMPILE.pre): Add "-x c++".
565 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
567 * fork-child.c: Conditionally include <signal.h>.
569 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
571 * server.c (handle_general_set): Handle new packet
573 (handle_query): Add "QStartupWithShell" to the list of supported
575 (gdbserver_usage): Add help text explaining the
576 new "--startup-with-shell" and "--no-startup-with-shell" CLI
578 (captured_main): Recognize and act upon the presence of the new
581 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
582 Pedro Alves <palves@redhat.com>
584 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
585 * configure: Regenerate.
586 * configure.srv (srv_linux_obj): Add "fork-child.o" and
588 (i[34567]86-*-lynxos*): Likewise.
589 (spu*-*-*): Likewise.
590 * fork-child.c: New file.
591 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
593 (linux_ptrace_fun): New function.
594 (linux_create_inferior): Adjust function prototype to reflect
595 change on "target.h". Adjust function code to use
597 (linux_request_interrupt): Delete "signal_pid".
598 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
599 (lynx_ptrace_fun): New function.
600 (lynx_create_inferior): Adjust function prototype to reflect
601 change on "target.h". Adjust function code to use
603 * nto-low.c (nto_create_inferior): Adjust function prototype and
604 code to reflect change on "target.h". Update comments.
605 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
606 "common-terminal.h" and "environ.h".
607 (terminal_fd): Moved to fork-child.c.
608 (old_foreground_pgrp): Likewise.
609 (restore_old_foreground_pgrp): Likewise.
610 (last_status): Make it global.
611 (last_ptid): Likewise.
612 (our_environ): New variable.
613 (startup_with_shell): Likewise.
614 (program_name): Likewise.
615 (program_argv): Rename to...
616 (program_args): ...this.
617 (wrapper_argv): New variable.
618 (start_inferior): Delete function.
619 (get_exec_wrapper): New function.
620 (get_exec_file): Likewise.
621 (get_environ): Likewise.
622 (prefork_hook): Likewise.
623 (post_fork_inferior): Likewise.
624 (postfork_hook): Likewise.
625 (postfork_child_hook): Likewise.
626 (handle_v_run): Update code to deal with arguments coming from the
627 remote host. Update calls from "start_inferior" to
629 (captured_main): Likewise. Initialize environment variable. Call
631 * server.h (post_fork_inferior): New prototype.
632 (get_environ): Likewise.
633 (last_status): Declare.
634 (last_ptid): Likewise.
635 (signal_pid): Likewise.
636 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
637 (spu_ptrace_fun): New function.
638 (spu_create_inferior): Adjust function prototype to reflect change
639 on "target.h". Adjust function code to use "fork_inferior".
640 * target.c (target_terminal_init): New function.
641 (target_terminal_inferior): Likewise.
642 (target_terminal_ours): Likewise.
643 * target.h: Include <vector>.
644 (struct target_ops) <create_inferior>: Update prototype.
645 (create_inferior): Update macro.
646 * utils.c (gdb_flush_out_err): New function.
647 * win32-low.c (win32_create_inferior): Adjust function prototype
648 and code to reflect change on "target.h".
650 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
652 * inferiors.c (switch_to_thread): New function.
654 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
656 * Makefile.in (SFILE): Add "common/job-control.c".
657 (OBS): Add "job-control.o".
659 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
661 * Makefile: Remove "@host_makefile_frag@".
663 2017-05-05 Pedro Alves <palves@redhat.com>
665 * configure: Regenerate.
667 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
669 * configure: Regenerate.
671 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
673 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
674 software_single_step change of return type to
675 std::vector<CORE_ADDR>.
676 * linux-low.c (install_software_single_step_breakpoints):
678 * linux-low.h (install_software_single_step_breakpoints):
681 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
683 * remote-utils.c: Include "gdb_termios.h" instead of
685 * terminal.h: Delete file.
687 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
689 * server.c: Include <vector>.
690 <program_argv, wrapper_argv>: Convert to std::vector.
691 (start_inferior): Rewrite function to use C++.
692 (handle_v_run): Likewise. Update code that calculates the argv
693 based on the vRun packet; use C++.
694 (captured_main): Likewise.
696 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
698 * server.c (handle_v_cont): Initialize thread_resume::thread
701 2017-04-05 Pedro Alves <palves@redhat.com>
703 * configure: Regenerate.
705 2017-04-05 Pedro Alves <palves@redhat.com>
707 * gdbreplay.c (sync_error): Constify.
708 * linux-x86-low.c (push_opcode): Constify.
710 2017-04-05 Pedro Alves <palves@redhat.com>
712 * win32-low.c (get_child_debug_event)
713 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
714 Report TARGET_WAITKIND_SPURIOUS instead.
716 2017-04-05 Pedro Alves <palves@redhat.com>
718 * remote-utils.c (remote_prepare, remote_open): Constify.
719 * remote-utils.h (remote_prepare, remote_open): Constify.
720 * server.c (captured_main): Constify 'port' handling.
722 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
724 * Makefile.in (clean): Clear .deps.
726 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
728 * .gitignore: Remove generated files, replace with wildcard.
729 * (clean): Replace removal of generated files with wildcard.
730 (version.c): Replace with...
731 (version-generated.c): ...this.
732 (xml-builtin.c): Replace with...
733 (xml-builtin-generated.c): ...this.
734 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
735 (%.c: *regformats*): Replace with...
736 (%-generated.c: *regformats*): ...this.
738 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
740 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
741 (xtensa_fill_gregset): Call collect_register_by_name for
743 (xtensa_store_gregset): Call supply_register_by_name for
746 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
748 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
749 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
750 (xtensa_store_gregset): Call supply_register for all registers in
751 a0_regnum..a0_regnum + C0_NREGS range.
753 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
755 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
756 (ax-ipa.o: ax.c): Remove.
757 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
758 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
759 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
760 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
761 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
763 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
765 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
766 (print-utils-ipa.o: ../common/print-utils.c): Remove.
767 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
768 (errors-ipa.o: ../common/errors.c): Remove.
769 (format-ipa.o: ../common/format.c): Remove.
770 (common-utils-ipa.o: ../common/common-utils.c): Remove.
772 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
774 * Makefile.in (%-ipa.o: %.c): New rule.
775 (tracepoint-ipa.o: tracepoint.c): Remove.
776 (utils-ipa.o: utils.c): Remove.
777 (remote-utils-ipa.o: remote-utils.c): Remove.
778 (regcache-ipa.o: regcache.c): Remove.
779 (i386-linux-ipa.o: i386-linux.c): Remove.
780 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
781 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
782 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
783 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
784 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
785 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
786 (amd64-linux-ipa.o: amd64-linux.c): Remove.
787 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
788 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
789 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
790 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
791 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
792 (aarch64-ipa.o: aarch64.c): Remove.
793 (s390-linux32-ipa.o: s390-linux32.c): Remove.
794 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
795 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
796 (s390-linux64-ipa.o: s390-linux64.c): Remove.
797 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
798 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
799 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
800 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
801 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
802 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
803 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
804 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
805 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
806 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
807 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
808 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
809 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
810 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
811 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
812 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
813 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
814 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
815 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
816 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
817 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
818 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
819 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
820 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
821 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
822 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
823 (tdesc-ipa.o: tdesc.c): Remove.
824 (x32-linux-ipa.o: x32-linux.c): Remove.
825 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
826 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
828 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
830 * Makefile.in (%.o: ../arch/%.c): New rule.
831 (arm.o: ../arch/arm.c): Remove.
832 (arm-linux.o: ../arch/arm-linux.c): Remove.
833 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
834 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
836 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
838 * Makefile.in (%.o: ../nat/%.c): New rule.
839 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
840 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
841 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
842 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
843 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
844 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
845 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
846 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
847 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
848 (linux-personality.o: ../nat/linux-personality.c): Remove.
849 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
850 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
851 (x86-linux.o: ../nat/x86-linux.c): Remove.
852 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
853 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
855 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
857 * Makefile.in (%.o: ../common/%.c): New rule.
858 (signals.o: ../common/signals.c): Remove.
859 (print-utils.o: ../common/print-utils.c): Remove.
860 (rsp-low.o: ../common/rsp-low.c): Remove.
861 (common-utils.o: ../common/common-utils.c): Remove.
862 (posix-strerror.o: ../common/posix-strerror.c): Remove.
863 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
864 (vec.o: ../common/vec.c): Remove.
865 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
866 (xml-utils.o: ../common/xml-utils.c): Remove.
867 (ptid.o: ../common/ptid.c): Remove.
868 (buffer.o: ../common/buffer.c): Remove.
869 (format.o: ../common/format.c): Remove.
870 (filestuff.o: ../common/filestuff.c): Remove.
871 (agent.o: ../common/agent.c): Remove.
872 (errors.o: ../common/errors.c): Remove.
873 (environ.o: ../common/environ.c): Remove.
874 (common-debug.o: ../common/common-debug.c): Remove.
875 (cleanups.o: ../common/cleanups.c): Remove.
876 (common-exceptions.o: ../common/common-exceptions.c): Remove.
877 (fileio.o: ../common/fileio.c): Remove.
878 (common-regcache.o: ../common/common-regcache.c): Remove.
879 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
880 (new-op.o: ../common/new-op.c): Remove.
881 (btrace-common.o: ../common/btrace-common.c): Remove.
883 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
885 * Makefile.in (%.o: ../target/%.c): New rule.
886 (waitstatus.o: ../target/waitstatus.c): Remove.
888 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
891 (%.c: ../regformats/%.dat,
892 (%.c: ../regformats/arm/%.dat,
893 (%.c: ../regformats/i386/%.dat,
894 (%.c: ../regformats/rs6000/%.dat): New rules.
897 (arm-with-iwmmxt.c): Remove.
898 (arm-with-vfpv2.c): Remove.
899 (arm-with-vfpv3.c): Remove.
900 (arm-with-neon.c): Remove.
901 (reg-bfin.c): Remove.
902 (reg-cris.c): Remove.
903 (reg-crisv32.c): Remove.
905 (i386-linux.c): Remove.
906 (i386-avx.c): Remove.
907 (i386-avx-linux.c): Remove.
908 (i386-avx-avx512.c): Remove.
909 (i386-avx-avx512-linux.c): Remove.
910 (i386-mpx.c): Remove.
911 (i386-mpx-linux.c): Remove.
912 (i386-avx-mpx-avx512-pku.c): Remove.
913 (i386-avx-mpx-avx512-pku-linux.c): Remove.
914 (i386-avx-mpx.c): Remove.
915 (i386-avx-mpx-linux.c): Remove.
916 (i386-mmx.c): Remove.
917 (i386-mmx-linux.c): Remove.
918 (reg-ia64.c): Remove.
919 (reg-m32r.c): Remove.
920 (reg-m68k.c): Remove.
922 (mips-linux.c): Remove.
923 (mips-dsp-linux.c): Remove.
924 (mips64-linux.c): Remove.
925 (mips64-dsp-linux.c): Remove.
926 (nios2-linux.c): Remove.
927 (powerpc-32.c): Remove.
928 (powerpc-32l.c): Remove.
929 (powerpc-altivec32l.c): Remove.
930 (powerpc-cell32l.c): Remove.
931 (powerpc-vsx32l.c): Remove.
932 (powerpc-isa205-32l.c): Remove.
933 (powerpc-isa205-altivec32l.c): Remove.
934 (powerpc-isa205-vsx32l.c): Remove.
935 (powerpc-e500l.c): Remove.
936 (powerpc-64l.c): Remove.
937 (powerpc-altivec64l.c): Remove.
938 (powerpc-cell64l.c): Remove.
939 (powerpc-vsx64l.c): Remove.
940 (powerpc-isa205-64l.c): Remove.
941 (powerpc-isa205-altivec64l.c): Remove.
942 (powerpc-isa205-vsx64l.c): Remove.
943 (s390-linux32.c): Remove.
944 (s390-linux32v1.c): Remove.
945 (s390-linux32v2.c): Remove.
946 (s390-linux64.c): Remove.
947 (s390-linux64v1.c): Remove.
948 (s390-linux64v2.c): Remove.
949 (s390-te-linux64.c): Remove.
950 (s390-vx-linux64.c): Remove.
951 (s390-tevx-linux64.c): Remove.
952 (s390x-linux64.c): Remove.
953 (s390x-linux64v1.c): Remove.
954 (s390x-linux64v2.c): Remove.
955 (s390x-te-linux64.c): Remove.
956 (s390x-vx-linux64.c): Remove.
957 (s390x-tevx-linux64.c): Remove.
958 (tic6x-c64xp-linux.c): Remove.
959 (tic6x-c64x-linux.c): Remove.
960 (tic6x-c62x-linux.c): Remove.
962 (reg-sparc64.c): Remove.
965 (amd64-linux.c): Remove.
966 (amd64-avx.c): Remove.
967 (amd64-avx-linux.c): Remove.
968 (amd64-avx-avx512.c): Remove.
969 (amd64-avx-avx512-linux.c): Remove.
970 (amd64-mpx.c): Remove.
971 (amd64-mpx-linux.c): Remove.
972 (amd64-avx-mpx-avx512-pku.c): Remove.
973 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
974 (amd64-avx-mpx.c): Remove.
975 (amd64-avx-mpx-linux.c): Remove.
977 (x32-linux.c): Remove.
979 (x32-avx-linux.c): Remove.
980 (x32-avx-avx512.c): Remove.
981 (x32-avx-avx512-linux.c): Remove.
982 (reg-xtensa.c): Remove.
983 (reg-tilegx.c): Remove.
984 (reg-tilegx32.c): Remove.
986 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
988 * Makefile.in (SFILES): Add "common/environ.c".
989 (OBJS): Add "common/environ.h".
991 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
993 * configure.ac: Check if the fs_base and gs_base members of
994 `struct user_regs_struct' exist.
995 * config.in: Regenerated.
996 * configure: Likewise.
998 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1000 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1002 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1003 (get_next_pcs_syscall_next_pc): Likewise.
1005 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1007 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1008 * nto-x86-low.c: Likewise.
1010 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1012 * Makefile.in: Include disable-implicit-rules.mk.
1014 2016-11-23 Pedro Alves <palves@redhat.com>
1016 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1017 (debug_vprintf): Use std::chrono::steady_clock instead of
1018 gettimeofday. Use '.' instead of ':'.
1019 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1020 (get_timestamp): Use std::chrono::steady_clock instead of
1023 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1025 * Makefile.in: Fix whitespace formatting.
1027 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1029 * Makefile.in (SFILES, OBS): Flatten list and order
1032 2016-11-23 Pedro Alves <palves@redhat.com>
1034 * event-loop.c (handle_file_event): Use warning.
1035 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1036 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1039 2016-11-23 Pedro Alves <palves@redhat.com>
1041 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1043 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1044 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1045 debug_printf and debug_flush for debug output.
1046 * server.c (handle_general_set): Likewise.
1047 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1050 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1052 * Makefile.in (.c.o): Replace rule with ...
1053 (%.o: %.c): ... this one.
1055 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1057 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1058 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1060 * configure.ac: Remove checks for the make program.
1061 * configure: Re-generate.
1063 2016-10-28 Pedro Alves <palves@redhat.com>
1065 * Makefile.in (CXX_DIALECT): Get from configure.
1066 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1067 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1068 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1069 * config.in: Regenerate.
1070 * configure: Regenerate.
1072 2016-10-27 Yao Qi <yao.qi@linaro.org>
1074 * linux-low.c (linux_supports_range_stepping): Return true if
1075 can_software_single_step return true.
1077 2016-10-27 Yao Qi <yao.qi@linaro.org>
1079 * inferiors.c (find_inferior_in_random): New function.
1080 * inferiors.h (find_inferior_in_random): Declare.
1081 * linux-low.c (linux_wait_for_event_filtered): Call
1082 find_inferior_in_random instead of find_inferior.
1084 2016-10-27 Yao Qi <yao.qi@linaro.org>
1086 * linux-low.c (linux_wait_1): If single-step breakpoints are
1087 inserted, remove them.
1089 2016-10-26 Pedro Alves <palves@redhat.com>
1091 * linux-low.c (handle_extended_wait): Link parent/child fork
1093 (linux_wait_1): Unlink them.
1094 (linux_set_resume_request): Ignore resume requests for
1095 already-resumed and unhandled fork child threads.
1096 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1097 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1099 (handle_v_requests) <vCont>: Don't call require_running.
1100 * server.h (in_queued_stop_replies): New declaration.
1102 2016-10-24 Yao Qi <yao.qi@linaro.org>
1105 * linux-aarch64-low.c (append_insns): Cast the return value to
1108 2016-10-10 Yao Qi <yao.qi@linaro.org>
1110 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1112 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1114 * target.c (target_supports_multi_process): New function, moved
1116 * target.h (target_supports_multi_process): ... here. Remove
1119 2016-10-05 Tom Tromey <tom@tromey.com>
1122 * tracepoint.c (handle_tracepoint_bkpts): Check
1123 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1125 2016-10-05 Yao Qi <yao.qi@linaro.org>
1127 * configure.srv: Update the path of arm-*.xml files.
1129 2016-10-05 Terry Guo <terry.guo@arm.com>
1130 Yao Qi <yao.qi@linaro.org>
1132 * Makefile.in: Adjust the path of rules.
1133 * configure.srv: Update the path of xml files.
1134 * regformats/arm-with-iwmmxt.dat: Regenerated.
1135 * regformats/arm-with-neon.dat: Likewise.
1136 * regformats/arm-with-vfpv2.dat: Likewise.
1137 * regformats/arm-with-vfpv3.dat Likewise.
1139 2016-09-30 Yao Qi <yao.qi@linaro.org>
1142 * target.c (target_stop_and_wait): Don't call
1143 target_continue_no_signal, use resume_stop instead.
1145 2016-09-26 Yao Qi <yao.qi@linaro.org>
1147 * linux-low.c (linux_wait_1): Call debug_exit.
1149 2016-09-23 Pedro Alves <palves@redhat.com>
1151 * Makefile.in (SFILES): Add common/new-op.c.
1152 (OBS): Add common/new-op.o.
1153 (new-op.o): New rule.
1155 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1157 * .gitinore: Ignore more files.
1159 2016-09-21 Yao Qi <yao.qi@linaro.org>
1161 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1164 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1166 * server.c (start_inferior): Call target_mourn_inferior instead of
1167 mourn_inferior; pass ptid_t argument to it.
1169 (handle_target_event): Likewise.
1170 * target.c (target_mourn_inferior): New function.
1171 * target.h (mourn_inferior): Delete macro.
1173 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1175 * linux-low.c (lwp_is_stepping): New function.
1177 2016-09-06 Carl Love <cel@us.ibm.com>
1179 * server.c (start_inferior): Fixed comment, requested comment change
1180 didn't get updated correctly. Removed reference to ptrace () call as
1181 it is only true on Linux systems.
1183 2016-09-06 Carl Love <cel@us.ibm.com>
1185 * server.c (start_inferior): Do not call
1186 function target_post_create_inferior () if the
1187 inferior process has already exited.
1189 2016-09-05 Pedro Alves <palves@redhat.com>
1191 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1192 (COMPILE.pre, CC_LD): Use CXX directly.
1193 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1194 * acinclude.m4: Don't include build-with-cxx.m4.
1195 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1196 * configure: Regenerate.
1198 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1201 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1202 call writing data to own_buf.
1204 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1206 * target.c (mywait): Call target_wait instead of
1208 (target_wait): New function.
1210 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1212 * server.c (start_inferior): New variable 'ptid'. Replace calls
1213 to the_target->resume by target_continue{,_no_signal}, depending
1215 * target.c (target_stop_and_wait): Call target_continue_no_signal
1216 instead of the_target->resume.
1217 (target_continue): New function.
1219 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1221 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1223 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1226 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1228 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1229 * linux-arm-low.c (ps_get_thread_area): Likewise.
1230 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1231 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1232 * linux-mips-low.c (ps_get_thread_area): Likewise.
1233 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1234 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1235 * linux-x86-low.c (ps_get_thread_area): Likewise.
1236 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1238 2016-08-19 Pedro Alves <palves@redhat.com>
1240 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1242 2016-08-19 Pedro Alves <palves@redhat.com>
1244 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1245 comment. Use memcpy instead of casting through unsigned long.
1247 2016-08-19 Pedro Alves <palves@redhat.com>
1249 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1250 allocating around 0x80000000.
1252 2016-08-19 Pedro Alves <palves@redhat.com>
1255 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1256 (x32-avx512-linux-ipa.o): New rules.
1257 * configure.ac (x86_64-*-linux*): New x32 check.
1258 * configure.srv (ipa_x32_linux_regobj): New.
1259 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1260 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1262 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1264 * configure: Regenerate.
1266 2016-08-09 Pedro Alves <palves@redhat.com>
1269 * Makefile.in (OBS): Add signals-state-save-restore.o.
1270 (signals-state-save-restore.o): New rule.
1271 * config.in: Regenerate.
1272 * configure: Regenerate.
1273 * linux-low.c: Include "signals-state-save-restore.h".
1274 (linux_create_inferior): Call
1275 restore_original_signals_state.
1276 * server.c: Include "dispositions-save-restore.h".
1277 (captured_main): Call save_original_signals_state.
1279 2016-08-05 Pedro Alves <palves@redhat.com>
1281 * configure: Regenerate.
1283 2016-08-04 Yao Qi <yao.qi@linaro.org>
1285 * linux-low.c (regsets_fetch_inferior_registers): Check
1286 errno is ESRCH or not.
1288 2016-08-02 Yao Qi <yao.qi@linaro.org>
1290 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1291 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1292 (thread_db_load_search): Update.
1293 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1294 td_ta_set_event and td_ta_event_getmsg.
1296 2016-07-26 Pedro Alves <palves@redhat.com>
1299 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1300 of unsigned long for 64-bit registers and use uint32_t instead of
1301 unsigned int for 32-bit registers.
1303 2016-07-26 Pedro Alves <palves@redhat.com>
1305 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1308 2016-07-21 Tom Tromey <tom@tromey.com>
1310 * configure: Rebuild.
1312 2016-07-21 Yao Qi <yao.qi@linaro.org>
1314 * mem-break.c (find_gdb_breakpoint): Cast bp to
1315 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1317 2016-07-21 Yao Qi <yao.qi@linaro.org>
1319 * server.c (handle_v_requests): Support s and S actions
1320 if target_supports_software_single_step return true.
1322 2016-07-21 Yao Qi <yao.qi@linaro.org>
1324 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1325 is resume_step, call maybe_hw_step.
1326 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1328 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1330 (proceed_one_lwp): If resume request is resume_step, install
1331 reinsert breakpoints and call maybe_hw_step.
1333 2016-07-21 Yao Qi <yao.qi@linaro.org>
1335 * linux-low.c (proceed_one_lwp): Declare.
1336 (linux_resume_one_thread): Remove local variable 'step'.
1337 Lift code enqueue signal. Call proceed_one_lwp instead of
1338 linux_resume_one_lwp.
1340 2016-07-21 Yao Qi <yao.qi@linaro.org>
1342 * linux-low.c (linux_resume_one_thread): Call
1343 enqueue_pending_signal.
1345 2016-07-21 Yao Qi <yao.qi@linaro.org>
1347 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1348 * inferiors.c (do_restore_current_thread_cleanup): New function.
1349 (make_cleanup_restore_current_thread): Likewise.
1350 * linux-low.c (install_software_single_step_breakpoints): Call
1351 make_cleanup_restore_current_thread. Switch current_thread to
1354 2016-07-21 Yao Qi <yao.qi@linaro.org>
1356 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1357 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1358 (clone_one_breakpoint): Likewise.
1359 (delete_reinsert_breakpoints): Change parameter to thread.
1361 (has_reinsert_breakpoints): Likewise.
1362 (uninsert_reinsert_breakpoints): Likewise.
1363 (reinsert_reinsert_breakpoints): Likewise.
1364 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1365 (delete_reinsert_breakpoints): Likewise.
1366 (reinsert_reinsert_breakpoints): Likewise.
1367 (uninsert_reinsert_breakpoints): Likewise.
1368 (has_reinsert_breakpoints): Likewise.
1370 2016-07-21 Yao Qi <yao.qi@linaro.org>
1372 * inferiors.c (get_thread_process): Make parameter const.
1373 * inferiors.h (get_thread_process): Update declaration.
1374 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1375 Add new parameters child_thread and parent_thread. Callers
1377 * mem-break.h (clone_all_breakpoints): Update declaration.
1379 2016-07-21 Yao Qi <yao.qi@linaro.org>
1381 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1382 <command_list, handler>: Remove.
1383 (struct gdb_breakpoint): New.
1384 (struct other_breakpoint): New.
1385 (struct reinsert_breakpoint): New.
1386 (is_gdb_breakpoint): New function.
1387 (any_persistent_commands): Update command_list if
1388 is_gdb_breakpoint returns true.
1389 (set_breakpoint): Create breakpoints according to their types.
1390 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1391 (set_gdb_breakpoint_1): Likewise.
1392 (set_gdb_breakpoint): Likewise.
1393 (clear_breakpoint_conditions): Change parameter type to
1394 'struct gdb_breakpoint *'.
1395 (clear_breakpoint_commands): Likewise.
1396 (clear_breakpoint_conditions_and_commands): Likewise.
1397 (add_condition_to_breakpoint): Likewise.
1398 (add_breakpoint_condition): Likewise.
1399 (add_commands_to_breakpoint): Likewise.
1400 (check_breakpoints): Check other_breakpoint.
1401 (clone_one_breakpoint): Clone breakpopint according to its type.
1402 * mem-break.h (struct gdb_breakpoint): Declare.
1403 (set_gdb_breakpoint): Update declaration.
1404 (clear_breakpoint_conditions_and_commands): Likewise.
1405 (add_breakpoint_condition): Likewise.
1406 (add_breakpoint_commands): Likewise.
1407 * server.c (process_point_options): Change parameter type to
1408 'struct gdb_breakpoint *'.
1410 2016-07-21 Yao Qi <yao.qi@linaro.org>
1412 * mem-break.c (set_breakpoint_at): Rename it to ...
1413 (set_breakpoint_type_at): ... it.
1414 (set_breakpoint_at): Call set_breakpoint_type_at.
1415 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1416 * mem-break.h (set_breakpoint_at): Update comments.
1418 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1420 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1422 (nios2_store_gregset): Likewise.
1424 2016-07-01 Pedro Alves <palves@redhat.com>
1425 Antoine Tremblay <antoine.tremblay@ericsson.com>
1427 * linux-low.c: Change interface to take the target lwp_info
1428 pointer directly and return void. Handle detaching from a zombie
1430 (linux_detach_lwp_callback): New function.
1431 (linux_detach): Detach from the leader thread after detaching from
1434 2016-06-28 Yao Qi <yao.qi@linaro.org>
1436 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1437 for variable new_offset.
1438 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1439 (aarch64_ftrace_insn_reloc_cb): Likewise.
1440 (aarch64_ftrace_insn_reloc_tb): Likewise.
1441 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1442 PRIx64 instead of PRIx32.
1444 2016-06-28 Yao Qi <yao.qi@linaro.org>
1446 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1447 (the_low_target): Install arm_get_syscall_trapinfo.
1449 2016-06-28 Yao Qi <yao.qi@linaro.org>
1451 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1453 (the_low_target): Install aarch64_get_syscall_trapinfo.
1455 2016-06-28 Yao Qi <yao.qi@linaro.org>
1457 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1459 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1460 Remove parameter sysno.
1461 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1464 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1466 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1467 (s390_emit_ne_goto): Likewise.
1468 (s390_emit_lt_goto): Likewise.
1469 (s390_emit_le_goto): Likewise.
1470 (s390_emit_gt_goto): Likewise.
1471 (s390_emit_ge_goto): Likewise.
1472 (s390x_emit_eq_goto): Likewise.
1473 (s390x_emit_ne_goto): Likewise.
1474 (s390x_emit_lt_goto): Likewise.
1475 (s390x_emit_le_goto): Likewise.
1476 (s390x_emit_gt_goto): Likewise.
1477 (s390x_emit_ge_goto): Likewise.
1478 (s390_emit_ops_impl): Mark variable static.
1479 (s390x_emit_ops): Likewise.
1481 2016-06-17 Yao Qi <yao.qi@linaro.org>
1483 * linux-low.c (handle_extended_wait): Call
1484 uninsert_reinsert_breakpoints for the parent process. Remove
1485 reinsert breakpoints from the child process. Reinsert them to
1486 the parent process when vfork is done.
1487 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1488 (reinsert_reinsert_breakpoints): New function.
1489 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1490 (reinsert_reinsert_breakpoints): Declare.
1492 2016-06-17 Yao Qi <yao.qi@linaro.org>
1494 * linux-low.c (handle_extended_wait): If the parent is doing
1495 step-over, remove the reinsert breakpoints from the forked child.
1497 2016-06-17 Yao Qi <yao.qi@linaro.org>
1499 * linux-low.c (unsuspend_all_lwps): Declare.
1500 (linux_low_filter_event): If thread exited, call finish_step_over.
1501 If step-over is finished, unsuspend other threads.
1503 2016-06-17 Yao Qi <yao.qi@linaro.org>
1505 * linux-low.c (linux_resume_one_lwp_throw): Assert
1506 has_reinsert_breakpoints returns false.
1507 * mem-break.c (delete_disabled_breakpoints): Assert
1508 bp type isn't reinsert_breakpoint.
1510 2016-06-17 Yao Qi <yao.qi@linaro.org>
1512 * linux-low.c (maybe_hw_step): New function.
1513 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1514 (finish_step_over): Switch current_thread to lwp temporarily,
1515 and assert has_reinsert_breakpoints returns true.
1516 (proceed_one_lwp): Call maybe_hw_step.
1517 * mem-break.c (has_reinsert_breakpoints): New function.
1518 * mem-break.h (has_reinsert_breakpoints): Declare.
1520 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1522 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1524 2016-05-17 Yao Qi <yao.qi@linaro.org>
1526 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1527 instead of find_inferior.
1529 2016-05-05 Yao Qi <yao.qi@linaro.org>
1531 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1532 Initialize res to zero.
1534 2016-05-05 Yao Qi <yao.qi@linaro.org>
1536 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1539 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1541 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1542 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1543 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1545 2016-04-28 Par Olsson <par.olsson@windriver.com>
1546 Simon Marchi <simon.marchi@ericsson.com>
1548 * tracepoint.c (write_inferior_int8): New function.
1549 (cmd_qtenable_disable): Write enable flag using
1550 write_inferior_int8.
1552 2016-04-25 Yao Qi <yao.qi@linaro.org>
1554 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1555 (need_step_over_p): Return zero if the LWP has pending signals
1556 can be delivered on software single step target.
1558 2016-04-25 Yao Qi <yao.qi@linaro.org>
1560 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1561 return instead of error.
1563 2016-04-22 Yao Qi <yao.qi@linaro.org>
1565 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1568 2016-04-22 Yao Qi <yao.qi@linaro.org>
1570 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1571 signal when stepping over breakpoint with software single
1574 2016-04-21 Pedro Alves <palves@redhat.com>
1576 * linux-s390-low.c (s390_collect_ptrace_register)
1577 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1579 (s390_check_regset): Use void * instead of gdb_byte *.
1581 2016-04-20 Pedro Alves <palves@redhat.com>
1583 * configure: Renegerate.
1585 2016-04-20 Yao Qi <yao.qi@linaro.org>
1587 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1588 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1590 (arm_store_gregset): Likewise.
1592 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1594 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1595 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1596 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1597 (amd64-avx-mpx-linux.c): New rules.
1598 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1599 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1600 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1601 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1602 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1603 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1604 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1605 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1606 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1607 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1608 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1609 * linux-x86-low.c (x86_linux_read_description): Add case for
1610 X86_XSTATE_AVX_MPX_MASK.
1611 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1612 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1613 init_registers_i386_avx_mpx_linux.
1614 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1615 (initialize_low_tracepoint): Call
1616 init_registers_i386_avx_mpx_linux.
1617 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1618 (initialize_low_tracepoint): Call
1619 init_registers_amd64_avx_mpx_linux.
1620 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1621 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1622 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1625 2016-04-18 Pedro Alves <palves@redhat.com>
1627 * configure: Regenerate.
1629 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1631 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1632 (aarch64_emit_sub): Likewise.
1634 2016-04-12 Pedro Alves <palves@redhat.com>
1636 * utils.c (prepare_to_throw_exception): Delete.
1638 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1640 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1642 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1644 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1646 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1648 * linux-aarch64-ipa.c: Add <elf.h> include.
1649 * linux-ppc-ipa.c: Add <elf.h> include.
1650 * linux-s390-ipa.c: Add <elf.h> include.
1652 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1654 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1655 (get_raw_reg_ptr): Likewise.
1656 (get_trace_state_variable_value_ptr): Likewise.
1657 (set_trace_state_variable_value_ptr): Likewise.
1658 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1661 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1662 Marcin Kościelnicki <koriakin@0x04.net>
1665 * linux-ppc-low.c (emit_insns): New function.
1666 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1667 (ppc_emit_prologue): New function.
1668 (ppc_emit_epilogue): New function.
1669 (ppc_emit_add): New function.
1670 (ppc_emit_sub): New function.
1671 (ppc_emit_mul): New function.
1672 (ppc_emit_lsh): New function.
1673 (ppc_emit_rsh_signed): New function.
1674 (ppc_emit_rsh_unsigned): New function.
1675 (ppc_emit_ext): New function.
1676 (ppc_emit_zero_ext): New function.
1677 (ppc_emit_log_not): New function.
1678 (ppc_emit_bit_and): New function.
1679 (ppc_emit_bit_or): New function.
1680 (ppc_emit_bit_xor): New function.
1681 (ppc_emit_bit_not): New function.
1682 (ppc_emit_equal): New function.
1683 (ppc_emit_less_signed): New function.
1684 (ppc_emit_less_unsigned): New function.
1685 (ppc_emit_ref): New function.
1686 (ppc_emit_const): New function.
1687 (ppc_emit_reg): New function.
1688 (ppc_emit_pop): New function.
1689 (ppc_emit_stack_flush): New function.
1690 (ppc_emit_swap): New function.
1691 (ppc_emit_stack_adjust): New function.
1692 (ppc_emit_call): New function.
1693 (ppc_emit_int_call_1): New function.
1694 (ppc_emit_void_call_2): New function.
1695 (ppc_emit_if_goto): New function.
1696 (ppc_emit_goto): New function.
1697 (ppc_emit_eq_goto): New function.
1698 (ppc_emit_ne_goto): New function.
1699 (ppc_emit_lt_goto): New function.
1700 (ppc_emit_le_goto): New function.
1701 (ppc_emit_gt_goto): New function.
1702 (ppc_emit_ge_goto): New function.
1703 (ppc_write_goto_address): New function.
1704 (ppc_emit_ops_impl): New static variable.
1705 (ppc64v1_emit_prologue): New function.
1706 (ppc64v2_emit_prologue): New function.
1707 (ppc64_emit_epilogue): New function.
1708 (ppc64_emit_add): New function.
1709 (ppc64_emit_sub): New function.
1710 (ppc64_emit_mul): New function.
1711 (ppc64_emit_lsh): New function.
1712 (ppc64_emit_rsh_signed): New function.
1713 (ppc64_emit_rsh_unsigned): New function.
1714 (ppc64_emit_ext): New function.
1715 (ppc64_emit_zero_ext): New function.
1716 (ppc64_emit_log_not): New function.
1717 (ppc64_emit_bit_and): New function.
1718 (ppc64_emit_bit_or): New function.
1719 (ppc64_emit_bit_xor): New function.
1720 (ppc64_emit_bit_not): New function.
1721 (ppc64_emit_equal): New function.
1722 (ppc64_emit_less_signed): New function.
1723 (ppc64_emit_less_unsigned): New function.
1724 (ppc64_emit_ref): New function.
1725 (ppc64_emit_const): New function.
1726 (ppc64v1_emit_reg): New function.
1727 (ppc64v2_emit_reg): New function.
1728 (ppc64_emit_pop): New function.
1729 (ppc64_emit_stack_flush): New function.
1730 (ppc64_emit_swap): New function.
1731 (ppc64v1_emit_call): New function.
1732 (ppc64v2_emit_call): New function.
1733 (ppc64v1_emit_int_call_1): New function.
1734 (ppc64v2_emit_int_call_1): New function.
1735 (ppc64v1_emit_void_call_2): New function.
1736 (ppc64v2_emit_void_call_2): New function.
1737 (ppc64_emit_if_goto): New function.
1738 (ppc64_emit_eq_goto): New function.
1739 (ppc64_emit_ne_goto): New function.
1740 (ppc64_emit_lt_goto): New function.
1741 (ppc64_emit_le_goto): New function.
1742 (ppc64_emit_gt_goto): New function.
1743 (ppc64_emit_ge_goto): New function.
1744 (ppc64v1_emit_ops_impl): New static variable.
1745 (ppc64v2_emit_ops_impl): New static variable.
1746 (ppc_emit_ops): New function.
1747 (linux_low_target): Wire in ppc_emit_ops.
1749 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1750 Marcin Kościelnicki <koriakin@0x04.net>
1753 * Makefile.in: Add powerpc-*-ipa.o
1754 * configure.srv: Add ipa_obj for powerpc*-linux.
1755 * linux-ppc-ipa.c: New file.
1756 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1758 (PPC_FIELD): New macro.
1759 (PPC_SEXT): New macro.
1760 (PPC_OP6): New macro.
1761 (PPC_BO): New macro.
1762 (PPC_LI): New macro.
1763 (PPC_BD): New macro.
1764 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1765 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1766 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1767 (ppc_get_thread_area): New function.
1768 (is_elfv2_inferior): New function.
1769 (gen_ds_form): New function.
1770 (GEN_STD): New macro.
1771 (GEN_STDU): New macro.
1772 (GEN_LD): New macro.
1773 (GEN_LDU): New macro.
1774 (gen_d_form): New function.
1775 (GEN_ADDI): New macro.
1776 (GEN_ADDIS): New macro.
1777 (GEN_LI): New macro.
1778 (GEN_LIS): New macro.
1779 (GEN_ORI): New macro.
1780 (GEN_ORIS): New macro.
1781 (GEN_LWZ): New macro.
1782 (GEN_STW): New macro.
1783 (GEN_STWU): New macro.
1784 (gen_xfx_form): New function.
1785 (GEN_MFSPR): New macro.
1786 (GEN_MTSPR): New macro.
1787 (GEN_MFCR): New macro.
1788 (GEN_MTCR): New macro.
1789 (GEN_SYNC): New macro.
1790 (GEN_LWSYNC): New macro.
1791 (gen_x_form): New function.
1792 (GEN_OR): New macro.
1793 (GEN_MR): New macro.
1794 (GEN_LWARX): New macro.
1795 (GEN_STWCX): New macro.
1796 (GEN_CMPW): New macro.
1797 (gen_md_form): New function.
1798 (GEN_RLDICL): New macro.
1799 (GEN_RLDICR): New macro.
1800 (gen_i_form): New function.
1802 (GEN_BL): New macro.
1803 (gen_b_form): New function.
1804 (GEN_BNE): New macro.
1805 (GEN_LOAD): New macro.
1806 (GEN_STORE): New macro.
1807 (gen_limm): New function.
1808 (gen_atomic_xchg): New function.
1809 (gen_call): New function.
1810 (ppc_relocate_instruction): New function.
1811 (ppc_install_fast_tracepoint_jump_pad): New function.
1812 (ppc_get_min_fast_tracepoint_insn_len): New function.
1813 (ppc_get_ipa_tdesc_idx): New function.
1814 (the_low_target): Wire in the new functions.
1815 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1817 * linux-ppc-tdesc.h: New file.
1819 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1821 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1822 (alloc_jump_pad_buffer): New function.
1823 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1824 (alloc_jump_pad_buffer): New function.
1825 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1826 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1827 (alloc_jump_pad_buffer): New function.
1828 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1829 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1830 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1831 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1833 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1835 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1836 * linux-amd64-ipa.c: Likewise.
1837 * linux-i386-ipa.c: Likewise.
1838 * linux-s390-ipa.c: Likewise.
1839 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1840 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1841 set_trace_state_variable_value_ptr.
1842 (struct ipa_sym_addresses): Likewise.
1843 (symbol_list): Likewise.
1844 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1845 accessing gdb_collect directly.
1846 (gdb_collect_ptr_type): New typedef.
1847 (get_raw_reg_ptr_type): New typedef.
1848 (get_trace_state_variable_value_ptr_type): New typedef.
1849 (set_trace_state_variable_value_ptr_type): New typedef.
1850 (gdb_collect_ptr): New global.
1851 (get_raw_reg_ptr): New global.
1852 (get_trace_state_variable_value_ptr): New global.
1853 (set_trace_state_variable_value_ptr): New global.
1854 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1855 accessing get_raw_reg directly.
1856 (get_get_tsv_func_addr): Likewise for
1857 get_trace_state_variable_value_ptr.
1858 (get_set_tsv_func_addr): Likewise for
1859 set_trace_state_variable_value_ptr.
1860 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1862 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1864 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1866 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1868 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1870 (relocate_instruction): Remove own_buf.
1871 * server.c (own_buf): Make global.
1872 (handle_v_requests): Make global.
1873 * server.h (own_buf): New declaration.
1874 (handle_v_requests): New prototype.
1876 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1879 * linux-s390-low.c (add_insns): New function.
1880 (s390_emit_prologue): New function.
1881 (s390_emit_epilogue): New function.
1882 (s390_emit_add): New function.
1883 (s390_emit_sub): New function.
1884 (s390_emit_mul): New function.
1885 (s390_emit_lsh): New function.
1886 (s390_emit_rsh_signed): New function.
1887 (s390_emit_rsh_unsigned): New function.
1888 (s390_emit_ext): New function.
1889 (s390_emit_log_not): New function.
1890 (s390_emit_bit_and): New function.
1891 (s390_emit_bit_or): New function.
1892 (s390_emit_bit_xor): New function.
1893 (s390_emit_bit_not): New function.
1894 (s390_emit_equal): New function.
1895 (s390_emit_less_signed): New function.
1896 (s390_emit_less_unsigned): New function.
1897 (s390_emit_ref): New function.
1898 (s390_emit_if_goto): New function.
1899 (s390_emit_goto): New function.
1900 (s390_write_goto_address): New function.
1901 (s390_emit_litpool): New function.
1902 (s390_emit_const): New function.
1903 (s390_emit_call): New function.
1904 (s390_emit_reg): New function.
1905 (s390_emit_pop): New function.
1906 (s390_emit_stack_flush): New function.
1907 (s390_emit_zero_ext): New function.
1908 (s390_emit_swap): New function.
1909 (s390_emit_stack_adjust): New function.
1910 (s390_emit_set_r2): New function.
1911 (s390_emit_int_call_1): New function.
1912 (s390_emit_void_call_2): New function.
1913 (s390_emit_eq_goto): New function.
1914 (s390_emit_ne_goto): New function.
1915 (s390_emit_lt_goto): New function.
1916 (s390_emit_le_goto): New function.
1917 (s390_emit_gt_goto): New function.
1918 (s390_emit_ge_goto): New function.
1919 (s390x_emit_prologue): New function.
1920 (s390x_emit_epilogue): New function.
1921 (s390x_emit_add): New function.
1922 (s390x_emit_sub): New function.
1923 (s390x_emit_mul): New function.
1924 (s390x_emit_lsh): New function.
1925 (s390x_emit_rsh_signed): New function.
1926 (s390x_emit_rsh_unsigned): New function.
1927 (s390x_emit_ext): New function.
1928 (s390x_emit_log_not): New function.
1929 (s390x_emit_bit_and): New function.
1930 (s390x_emit_bit_or): New function.
1931 (s390x_emit_bit_xor): New function.
1932 (s390x_emit_bit_not): New function.
1933 (s390x_emit_equal): New function.
1934 (s390x_emit_less_signed): New function.
1935 (s390x_emit_less_unsigned): New function.
1936 (s390x_emit_ref): New function.
1937 (s390x_emit_if_goto): New function.
1938 (s390x_emit_const): New function.
1939 (s390x_emit_call): New function.
1940 (s390x_emit_reg): New function.
1941 (s390x_emit_pop): New function.
1942 (s390x_emit_stack_flush): New function.
1943 (s390x_emit_zero_ext): New function.
1944 (s390x_emit_swap): New function.
1945 (s390x_emit_stack_adjust): New function.
1946 (s390x_emit_int_call_1): New function.
1947 (s390x_emit_void_call_2): New function.
1948 (s390x_emit_eq_goto): New function.
1949 (s390x_emit_ne_goto): New function.
1950 (s390x_emit_lt_goto): New function.
1951 (s390x_emit_le_goto): New function.
1952 (s390x_emit_gt_goto): New function.
1953 (s390x_emit_ge_goto): New function.
1954 (s390_emit_ops): New function.
1955 (struct linux_target_ops): Fill in emit_ops hook.
1957 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1960 * Makefile.in: Add s390 IPA files.
1961 * configure.srv: Build IPA for s390.
1962 * linux-s390-ipa.c: New file.
1963 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1964 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1965 (tdesc_s390_linux32): Likewise.
1966 (init_registers_s390_linux32v1): Likewise.
1967 (tdesc_s390_linux32v1): Likewise.
1968 (init_registers_s390_linux32v2): Likewise.
1969 (tdesc_s390_linux32v2): Likewise.
1970 (init_registers_s390_linux64): Likewise.
1971 (tdesc_s390_linux64): Likewise.
1972 (init_registers_s390_linux64v1): Likewise.
1973 (tdesc_s390_linux64v1): Likewise.
1974 (init_registers_s390_linux64v2): Likewise.
1975 (tdesc_s390_linux64v2): Likewise.
1976 (init_registers_s390_te_linux64): Likewise.
1977 (tdesc_s390_te_linux64): Likewise.
1978 (init_registers_s390_vx_linux64): Likewise.
1979 (tdesc_s390_vx_linux64): Likewise.
1980 (init_registers_s390_tevx_linux64): Likewise.
1981 (tdesc_s390_tevx_linux64): Likewise.
1982 (init_registers_s390x_linux64): Likewise.
1983 (tdesc_s390x_linux64): Likewise.
1984 (init_registers_s390x_linux64v1): Likewise.
1985 (tdesc_s390x_linux64v1): Likewise.
1986 (init_registers_s390x_linux64v2): Likewise.
1987 (tdesc_s390x_linux64v2): Likewise.
1988 (init_registers_s390x_te_linux64): Likewise.
1989 (tdesc_s390x_te_linux64): Likewise.
1990 (init_registers_s390x_vx_linux64): Likewise.
1991 (tdesc_s390x_vx_linux64): Likewise.
1992 (init_registers_s390x_tevx_linux64): Likewise.
1993 (tdesc_s390x_tevx_linux64): Likewise.
1994 (have_hwcap_s390_vx): New static variable.
1995 (s390_arch_setup): Fill have_hwcap_s390_vx.
1996 (s390_get_thread_area): New function.
1997 (s390_ft_entry_gpr_esa): New const.
1998 (s390_ft_entry_gpr_zarch): New const.
1999 (s390_ft_entry_misc): New const.
2000 (s390_ft_entry_fr): New const.
2001 (s390_ft_entry_vr): New const.
2002 (s390_ft_main_31): New const.
2003 (s390_ft_main_64): New const.
2004 (s390_ft_exit_fr): New const.
2005 (s390_ft_exit_vr): New const.
2006 (s390_ft_exit_misc): New const.
2007 (s390_ft_exit_gpr_esa): New const.
2008 (s390_ft_exit_gpr_zarch): New const.
2009 (append_insns): New function.
2010 (s390_relocate_instruction): New function.
2011 (s390_install_fast_tracepoint_jump_pad): New function.
2012 (s390_get_min_fast_tracepoint_insn_len): New function.
2013 (s390_get_ipa_tdesc_idx): New function.
2014 (struct linux_target_ops): Wire in the above functions.
2015 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2016 * linux-s390-tdesc.h: New file.
2018 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2020 * linux-s390-low.c (s390_supports_tracepoints): New function.
2021 (struct linux_target_ops): Fill supports_tracepoints hook.
2023 2016-03-18 Yao Qi <yao.qi@linaro.org>
2025 * linux-low.c (lwp_signal_can_be_delivered): New function.
2026 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2028 2016-03-18 Yao Qi <yao.qi@linaro.org>
2030 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2031 0 if signal is enqueued. Remove 'signal' from one debugging
2032 message. Move one debugging message to some lines below.
2033 Remove code setting 'signal' to 0.
2035 2016-03-18 Yao Qi <yao.qi@linaro.org>
2037 * linux-low.c (linux_low_filter_event): Remove redundant
2038 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2040 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2042 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2043 (struct linux_target_ops): Wire in the above.
2045 2016-03-03 Yao Qi <yao.qi@linaro.org>
2047 * linux-low.c: Update comments to start_step_over.
2049 2016-03-03 Yao Qi <yao.qi@linaro.org>
2052 * linux-low.c (handle_extended_wait): Set child suspended
2053 if event_lwp->bp_reinsert isn't zero.
2055 2016-03-02 Yao Qi <yao.qi@linaro.org>
2057 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2058 enqueue_pending_signal.
2060 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2062 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2065 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2067 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2068 (s390_regmap_3264) [!__s390x__]: New global.
2069 (s390_collect_ptrace_register): Skip map entries containing -1.
2070 (s390_supply_ptrace_register): Ditto.
2071 (s390_fill_gprs_high): New function.
2072 (s390_store_gprs_high): New function.
2073 (s390_regsets): Add NT_S390_HIGH_GPRS.
2074 (s390_get_hwcap): Enable on 31-bit.
2075 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2076 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2077 Detect NT_S390_HIGH_GPRS.
2078 (s390_usrregs_info_3264): Enable on 31-bit.
2079 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2080 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2082 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2085 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2086 * configure.srv: Ditto.
2087 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2088 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2089 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2090 (init_registers_amd64_linux): Remove prototype.
2091 (tdesc_amd64_linux): Remove declaration.
2092 (get_ipa_tdesc): New function.
2093 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2094 initialize remaining tdescs.
2095 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2096 (init_registers_i386_linux): Remove prototype.
2097 (tdesc_i386_linux): Remove declaration.
2098 (get_ipa_tdesc): New function.
2099 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2100 initialize remaining tdescs.
2101 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2102 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2103 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2104 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2105 (x86_get_ipa_tdesc_idx): New function.
2106 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2107 * linux-x86-tdesc.h: New file.
2108 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2109 (target_get_ipa_tdesc_idx): New macro.
2110 * tracepoint.c (ipa_tdesc_idx): New macro.
2111 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2112 (symbol_list): Add ipa_tdesc_idx.
2113 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2114 (ipa_tdesc): Remove.
2115 (ipa_tdesc_idx): New variable.
2116 (get_context_regcache): Use get_ipa_tdesc.
2117 (gdb_collect): Ditto.
2119 * tracepoint.h (get_ipa_tdesc): New prototype.
2120 (ipa_tdesc): Remove.
2122 2016-02-24 Pedro Alves <palves@redhat.com>
2124 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2125 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2126 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2127 Factor out common code between the USE_SIGTRAP_SIGINFO and
2128 !USE_SIGTRAP_SIGINFO blocks.
2129 (linux_low_filter_event): Call save_stop_reason instead of
2130 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2132 (linux_wait_1): Update comments.
2134 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2136 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2137 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2138 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2139 ppc_insert_point, ppc_remove_point.
2141 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2143 * linux-s390-low.c (s390_supports_z_point_type): New function.
2144 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2146 2016-02-16 Yao Qi <yao.qi@linaro.org>
2148 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2149 PC. Get pc from regcache_read_pc.
2151 2016-02-12 Yao Qi <yao.qi@linaro.org>
2153 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2154 or linux_get_pc_32bit.
2155 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2157 2016-02-12 Yao Qi <yao.qi@linaro.org>
2159 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2160 arm_linux_get_next_pcs_fixup.
2162 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2164 * tracepoint.c (x_tracepoint_action_download): Change
2165 write_inferior_data_ptr to write_inferior_data_pointer.
2166 (cmd_qtstart): Likewise.
2167 (write_inferior_data_ptr): Remove.
2168 (download_agent_expr): Change write_inferior_data_ptr to
2169 write_inferior_data_pointer.
2170 (download_tracepoint_1): Likewise.
2171 (download_tracepoint): Likewise.
2172 (download_trace_state_variables): Likewise.
2174 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2175 Marcin Kościelnicki <koriakin@0x04.net>
2177 * tracepoint.c (struct tracepoint_action_ops): Remove.
2178 (struct tracepoint_action): Remove ops.
2179 (m_tracepoint_action_download, r_tracepoint_action_download)
2180 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2181 size and offset accordingly.
2182 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2183 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2184 (tracepoint_action_send, tracepoint_action_download): New functions.
2185 Helpers for trace action handlers.
2186 (add_tracepoint_action): Remove setup actions ops.
2187 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2189 2016-02-10 Yao Qi <yao.qi@linaro.org>
2191 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2193 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2195 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2197 * configure: Regenerate.
2199 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2201 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2202 void * to gdb_byte *.
2203 * linux-low.c (siginfo_fixup): Likewise.
2204 (linux_xfer_siginfo): Likewise.
2205 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2207 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2209 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2211 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2213 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2215 * linux-x86-low.c [__x86_64__]: Include
2216 "nat/amd64-linux-siginfo.h".
2217 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2218 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2219 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2220 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2221 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2222 (cpt_si_fd, si_timerid, si_overrun): Move from
2223 nat/amd64-linux-siginfo.c.
2224 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2226 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2228 * server.c (skip_to_semicolon): Remove.
2229 (process_point_options): Use strchrnul instead of
2232 2016-01-26 Yao Qi <yao.qi@linaro.org>
2234 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2235 * linux-low.c (install_software_single_step_breakpoints): Don't
2236 call regcache_read_pc.
2237 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2240 2016-01-26 Yao Qi <yao.qi@linaro.org>
2242 * linux-low.c (install_software_single_step_breakpoints): Call
2243 regcache_read_pc instead of get_pc.
2245 2016-01-26 Yao Qi <yao.qi@linaro.org>
2247 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2248 (unblock_async_io): Rename to ...
2249 (block_unblock_async_io): ... it. New function.
2250 (enable_async_io): Don't install SIGIO handler. Unblock it
2252 (disable_async_io): Don't ignore SIGIO. Block it instead.
2253 (initialize_async_io): Install SIGIO handler. Don't call
2256 2016-01-26 Yao Qi <yao.qi@linaro.org>
2258 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2259 first character is '\003', call *the_target->request_interrupt.
2261 2016-01-25 Yao Qi <yao.qi@linaro.org>
2263 * remote-utils.c (new_thread_notify): Remove.
2264 (dead_thread_notify): Likewise.
2265 * remote-utils.h (new_thread_notify): Remove declaration.
2266 (dead_thread_notify): Likewise.
2268 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2270 * gdb.trace/pending.exp: Fix expected message on continue.
2272 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2274 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2275 it works properly on big-endian machines where sizeof (CORE_ADDR)
2278 2016-01-21 Pedro Alves <palves@redhat.com>
2280 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2281 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2282 * configure: Regenerate.
2284 2016-01-21 Yao Qi <yao.qi@linaro.org>
2286 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2287 is_thumb and set it according to CPSR saved on the stack.
2288 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2289 arm_sigreturn_next_pc.
2291 2016-01-18 Yao Qi <yao.qi@linaro.org>
2293 * linux-low.c (linux_set_pc_64bit): New function.
2294 (linux_get_pc_64bit): New function.
2295 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2297 * linux-sparc-low.c (debug_threads): Remove declaration.
2298 (sparc_get_pc): Remove.
2299 (the_low_target): Use linux_get_pc_64bit instead of
2301 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2302 (the_low_target): Use linux_get_pc_64bit and
2305 2016-01-18 Yao Qi <yao.qi@linaro.org>
2307 * linux-arm-low.c (debug_threads): Remove declaration.
2308 (arm_get_pc, arm_set_pc): Remove.
2309 (the_low_target): Use linux_get_pc_32bit and
2311 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2312 (the_low_target): Use linux_get_pc_32bit and
2314 * linux-cris-low.c (debug_threads): Remove declaration.
2315 (cris_get_pc, cris_set_pc,): Remove.
2316 (the_low_target): Use linux_get_pc_32bit and
2318 * linux-crisv32-low.c (debug_threads): Remove declaration.
2319 (cris_get_pc, cris_set_pc): Remove.
2320 (the_low_target): Use linux_get_pc_32bit and
2322 * linux-low.c: Include inttypes.h.
2323 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2324 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2325 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2326 (the_low_target): Use linux_get_pc_32bit and
2328 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2329 (the_low_target): Use linux_get_pc_32bit and
2331 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2332 (the_low_target): Use linux_get_pc_32bit and
2334 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2335 (the_low_target): Use linux_get_pc_32bit and
2337 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2338 (the_low_target): Use linux_get_pc_32bit and
2341 2016-01-18 Gary Benson <gbenson@redhat.com>
2343 * configure.ac (AC_FUNC_FORK): New check.
2344 * config.in: Regenerate.
2345 * configure: Likewise.
2347 2016-01-14 Yao Qi <yao.qi@linaro.org>
2349 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2350 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2351 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2352 arm_get_next_pcs_ctor.
2354 2016-01-12 Josh Stone <jistone@redhat.com>
2355 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2357 * inferiors.h: Include "gdb_vecs.h".
2358 (struct process_info): Add syscalls_to_catch.
2359 * inferiors.c (remove_process): Free syscalls_to_catch.
2360 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2361 syscall_return stops.
2362 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2363 * server.c (handle_general_set): Handle QCatchSyscalls.
2364 (handle_query): Report support for QCatchSyscalls.
2365 * target.h (struct target_ops): Add supports_catch_syscall.
2366 (target_supports_catch_syscall): New macro.
2367 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2368 (struct lwp_info): Add syscall_state.
2369 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2370 Maintain syscall_state and syscalls_to_catch across exec.
2371 (get_syscall_trapinfo): New function, proxy to the_low_target.
2372 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2373 (linux_low_filter_event): Toggle syscall_state entry/return for
2374 syscall traps, and set it ignored for all others.
2375 (gdb_catching_syscalls_p): New function.
2376 (gdb_catch_this_syscall_p): New function.
2377 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2378 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2379 (linux_supports_catch_syscall): New function.
2380 (linux_target_ops): Install it.
2381 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2382 (the_low_target): Install it.
2384 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2386 * acinclude.m4: Include new ../warning.m4 file.
2387 * configure: Regenerated.
2388 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2390 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2392 * ax.c (is_goto_target): Mark static.
2393 * linux-low.c (register_addr): Likewise.
2394 (linux_fetch_registers, linux_store_registers): Likewise.
2395 * mem-break.c (any_persistent_commands): Fix old prototype.
2396 (add_commands_to_breakpoint): Mark static.
2397 * regcache.c (find_register_by_name): Delete unused func.
2398 * remote-utils.c (hex_or_minus_one): Mark static.
2399 * server.c (monitor_show_help): Mark static.
2400 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2401 handle_v_requests): Likewise.
2403 2016-01-12 Pedro Alves <palves@redhat.com>
2405 Remove use of the registered trademark symbol throughout.
2407 2016-01-08 Yao Qi <yao.qi@linaro.org>
2409 * remote-utils.c (getpkt): If c is '\003', call target hook
2412 2016-01-06 Yao Qi <yao.qi@linaro.org>
2414 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2415 linux-aarch32-low.c.
2416 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2417 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2418 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2419 (thumb2_breakpoint): Declare.
2420 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2421 linux-aarch32-low.h.
2422 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2423 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2424 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2426 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2428 * gdbreplay.c (gdbreplay_version): Change copyright year in
2430 * server.c (gdbserver_version): Likewise.
2432 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2434 * server.c (crc32_table): Delete.
2435 (crc32): Use libiberty's xcrc32 function.
2437 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2439 * lynx-low.c (lynx_delete_thread_callback): New function.
2440 (lynx_mourn): Properly delete our process and all of its
2441 threads. Remove call to clear_inferiors.
2443 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2445 * target.c (thread_search_callback): Add check that
2446 the thread_stopped target callback is not NULL before
2449 2015-12-21 Yao Qi <yao.qi@linaro.org>
2451 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2454 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2456 * server.c (handle_query): Call target_supports_software_single_step.
2458 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2460 * linux-low.c (single_step): New function.
2461 (linux_resume_one_lwp_throw): Call single_step.
2462 (start_step_over): Likewise.
2464 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2466 * Makefile.in (SFILES): Append arch/arm-linux.c,
2467 arch/arm-get-next-pcs.c.
2468 (arm-linux.o): New rule.
2469 (arm-get-next-pcs.o): New rule.
2470 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2472 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2473 to linux-aarch32-low.c.
2474 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2475 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2476 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2477 (thumb2_breakpoint_len): Likewise.
2478 (arm_is_thumb_mode): Make non-static.
2479 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2480 from linux-aarch32-low.c.
2481 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2482 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2483 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2484 (thumb2_breakpoint_len): Likewise.
2485 (arm_is_thumb_mode): New declaration.
2486 * linux-arm-low.c: Include arch/arm-linux.h
2487 aarch/arm-get-next-pcs.h, sys/syscall.h.
2488 (get_next_pcs_ops): New struct.
2489 (get_next_pcs_addr_bits_remove): New function.
2490 (get_next_pcs_is_thumb): New function.
2491 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2492 (arm_sigreturn_next_pc): Likewise.
2493 (get_next_pcs_syscall_next_pc): Likewise.
2494 (arm_gdbserver_get_next_pcs): Likewise.
2495 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2497 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2498 * server.h: Include gdb_vecs.h.
2500 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2502 * Makefile.in (SFILES): Append common/common-regcache.c.
2503 (OBS): Append common-regcache.o.
2504 (common-regcache.o): New rule.
2505 * regcache.c (init_register_cache): Initialize cache to
2507 (regcache_raw_read_unsigned): New function.
2508 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2509 register_status enum.
2511 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2513 * linux-aarch64-low.c (the_low_targets): Rename
2514 breakpoint_reinsert_addr to get_next_pcs.
2515 * linux-arm-low.c (the_low_targets): Likewise.
2516 * linux-bfin-low.c (the_low_targets): Likewise.
2517 * linux-cris-low.c (the_low_targets): Likewise.
2518 * linux-crisv32-low.c (the_low_targets): Likewise.
2519 * linux-low.c (can_software_single_step): Likewise.
2520 (install_software_single_step_breakpoints): New function.
2521 (start_step_over): Use install_software_single_step_breakpoints.
2522 * linux-low.h: New CORE_ADDR vector.
2523 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2525 * linux-mips-low.c (the_low_targets): Likewise.
2526 * linux-nios2-low.c (the_low_targets): Likewise.
2527 * linux-sparc-low.c (the_low_targets): Likewise.
2529 2015-12-17 Pedro Alves <palves@redhat.com>
2531 * linux-low.c (linux_kill_one_lwp): Remove references to
2533 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2535 (linux_init_signals): Delete.
2536 (initialize_low): Adjust.
2537 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2539 2015-12-16 Pedro Alves <palves@redhat.com>
2541 * configure.ac (compiler warning flags): When testing a
2542 -Wno-foo option, check whether -Wfoo works instead.
2543 * configure: Regenerate.
2545 2015-12-11 Don Breazeal <donb@codesourcery.com>
2547 * server.c (process_serial_event): Don't exit from gdbserver
2548 in remote mode if there are still active inferiors.
2550 2015-12-11 Yao Qi <yao.qi@linaro.org>
2552 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2553 arm_breakpoint_at if the process is 32-bit.
2555 2015-12-11 Yao Qi <yao.qi@linaro.org>
2557 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2560 2015-12-07 Yao Qi <yao.qi@linaro.org>
2562 * configure.srv: Append arm.o to srv_tgtobj for
2563 aarch64*-*-linux* target.
2564 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2565 from linux-arm-low.c.
2566 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2567 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2568 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2569 (thumb2_breakpoint_len): Likewise.
2570 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2571 (arm_breakpoint_kinds): Likewise.
2572 (arm_breakpoint_kind_from_pc): Likewise.
2573 (arm_sw_breakpoint_from_kind): Likewise.
2574 (arm_breakpoint_kind_from_current_state): Likewise.
2575 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2576 (arm_sw_breakpoint_from_kind): Declare.
2577 (arm_breakpoint_kind_from_current_state): Declare.
2578 (arm_breakpoint_at): Declare.
2579 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2580 arm_sw_breakpoint_from_kind if process is 32-bit.
2581 (aarch64_breakpoint_kind_from_pc): New function.
2582 (aarch64_breakpoint_kind_from_current_state): New function.
2583 (the_low_target): Initialize fields breakpoint_kind_from_pc
2584 and breakpoint_kind_from_current_state.
2585 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2586 linux-aarch32-low.c.
2587 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2588 (arm_breakpoint, arm_breakpoint_len): Likewise.
2589 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2590 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2591 (arm_is_thumb_mode): Likewise.
2592 (arm_breakpoint_at): Likewise.
2593 (arm_breakpoint_kind_from_pc): Likewise.
2594 (arm_sw_breakpoint_from_kind): Likewise.
2595 (arm_breakpoint_kind_from_current_state): Likewise.
2598 2015-08-04 Yao Qi <yao.qi@linaro.org>
2600 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2601 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2602 * server.c (extended_protocol): Remove "static".
2603 * server.h (extended_protocol): Declare it.
2605 2015-12-04 Josh Stone <jistone@redhat.com>
2607 * target.h (struct target_ops) <arch_setup>: Rename to ...
2608 (struct target_ops) <post_create_inferior>: ... this.
2609 (target_arch_setup): Rename to ...
2610 (target_post_create_inferior): ... this, calling post_create_inferior.
2611 * server.c (start_inferior): Update target_arch_setup calls to
2612 target_post_create_inferior.
2613 * linux-low.c (linux_low_ptrace_options): Forward declare.
2614 (linux_arch_setup): Update its comment for general use.
2615 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2616 (struct linux_target_ops): Use linux_post_create_inferior.
2617 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2618 to post_create_inferior.
2619 * nto-low.c (struct nto_target_ops): Likewise.
2620 * spu-low.c (struct spu_target_ops): Likewise.
2621 * win32-low.c (struct win32_target_ops): Likewise.
2623 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2625 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2627 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2629 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2630 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2631 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2632 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2633 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2634 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2635 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2636 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2637 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2638 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2639 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2640 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2642 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2644 * linux-low.c (linux_look_up_symbols): Don't call
2645 linux_supports_traceclone.
2646 * linux-low.h (thread_db_init): Remove use_events argument.
2647 * thread-db.c (thread_db_use_event): Remove global variable.
2648 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2649 (struct thread_db) <td_create_bp>: Remove field.
2650 (thread_db_create_event): Remove function.
2651 (thread_db_enable_reporting): Likewise.
2652 (find_one_thread): Don't check for thread_db_use_events.
2653 (attach_thread): Likewise.
2654 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2655 (try_thread_db_load_1): Don't check for thread_db_use_events.
2656 (thread_db_init): Remove use_events argument and thread events
2658 (remove_thread_event_breakpoints): Remove function.
2659 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2661 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2663 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2665 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2666 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2667 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2668 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2669 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2671 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2673 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2674 * linux-low.c (can_hardware_single_step): Use
2675 supports_hardware_single_step.
2676 (can_software_single_step): New function.
2677 (start_step_over): Call can_software_single_step.
2678 (linux_supports_hardware_single_step): New function.
2679 (struct target_ops) <supports_software_single_step>: Initialize.
2680 * linux-low.h (struct linux_target_ops)
2681 <supports_hardware_single_step>: Initialize.
2682 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2683 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2684 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2685 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2686 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2687 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2688 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2689 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2690 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2691 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2693 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2694 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2696 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2697 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2698 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2700 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2701 * target.h (struct target_ops): <supports_software_single_step>:
2703 (target_supports_software_single_step): New macro.
2705 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2707 * linux-low.c (linux_wait_1): Fix pc advance condition.
2708 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2709 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2711 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2713 * linux-arm-low.c (arm_is_thumb_mode): New function.
2714 (arm_breakpoint_at): Use arm_is_thumb_mode.
2715 (arm_breakpoint_kind_from_current_state): New function.
2716 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2718 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2719 (linux_breakpoint_kind_from_current_state): New function.
2720 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2721 * linux-low.h (struct linux_target_ops)
2722 <breakpoint_kind_from_current_state>: New field.
2723 * target.h (struct target_ops): Likewise.
2724 (target_breakpoint_kind_from_current_state): New macro.
2726 2015-11-30 Pedro Alves <palves@redhat.com>
2728 * linux-low.c (linux_resume): Wake up the event loop before
2731 2015-11-30 Pedro Alves <palves@redhat.com>
2733 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2735 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2737 * target.c (struct thread_search): New structure.
2738 (thread_search_callback): New function.
2739 (prev_general_thread): New global.
2740 (prepare_to_access_memory, done_accessing_memory): New functions.
2741 * target.h (prepare_to_access_memory, done_accessing_memory):
2742 Replace macros with function declarations.
2744 2015-11-30 Pedro Alves <palves@redhat.com>
2747 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2748 report TARGET_WAITKIND_NO_RESUMED.
2749 * remote-utils.c (prepare_resume_reply): Handle
2750 TARGET_WAITKIND_NO_RESUMED.
2751 * server.c (report_no_resumed): New global.
2752 (handle_query) <qSupported>: Handle "no-resumed+". Report
2753 "no-resumed+" support.
2754 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2755 return error if the client doesn't support no-resumed events.
2756 (push_stop_notification): New function.
2757 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2758 events if the client supports them.
2760 2015-11-30 Pedro Alves <palves@redhat.com>
2762 * linux-low.c (thread_still_has_status_pending_p): Don't check
2764 (lwp_resumed): New function.
2765 (status_pending_p_callback): Return early if the LWP is not
2766 supposed to be resumed.
2768 2015-11-30 Pedro Alves <palves@redhat.com>
2770 * linux-low.c (handle_extended_wait): Assert that the LWP's
2771 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2772 thread create events, leave the new child's status pending.
2773 (linux_low_filter_event): If GDB wants to hear about thread exit
2774 events, leave the LWP marked dead and don't delete it.
2775 (linux_wait_for_event_filtered): Don't check for thread exit.
2776 (filter_exit_event): New function.
2777 (linux_wait_1): Use it, when returning an exit event.
2778 (linux_resume_one_lwp_throw): Assert that the LWP's
2779 waitstatus is TARGET_WAITKIND_IGNORE.
2780 * remote-utils.c (prepare_resume_reply): Handle
2781 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2782 * server.c (report_thread_events): New global.
2783 (handle_general_set): Handle QThreadEvents.
2784 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2785 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2786 TARGET_WAITKIND_THREAD_EXITED.
2787 * server.h (report_thread_events): Declare.
2789 2015-11-30 Pedro Alves <palves@redhat.com>
2791 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2792 the thread's last_resume_kind was resume_stop.
2794 2015-11-30 Pedro Alves <palves@redhat.com>
2796 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2799 2015-11-30 Pedro Alves <palves@redhat.com>
2801 * server.c (handle_v_requests): Handle vCtrlC.
2803 2015-11-30 Pedro Alves <palves@redhat.com>
2805 * gdbthread.h (find_any_thread_of_pid): Declare.
2806 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2808 * server.c (handle_query): If current_thread is NULL, look for
2809 another thread of the selected process.
2811 2015-11-26 Daniel Colascione <dancol@dancol.org>
2812 Simon Marchi <simon.marchi@ericsson.com>
2814 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2815 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2817 * target.h (struct target_ops) <thread_name>: New field.
2818 (target_thread_name): New macro.
2820 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2822 * regcache.h (regcache_invalidate_pid): Add declaration.
2823 * regcache.c (regcache_invalidate_pid): New function, extracted
2824 from regcache_invalidate.
2825 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2826 Add trivial documentation comment.
2827 * lynx-low.c: Use regcache_invalidate_pid instead of
2828 regcache_invalidate.
2830 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2832 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2833 and Elf64_auxv_t if the target is Android.
2835 2015-11-22 Doug Evans <xdje42@gmail.com>
2837 * target.h: #include <sys/types.h>.
2839 2015-11-19 Pedro Alves <palves@redhat.com>
2841 * linux-low.c (linux_process_qsupported): Change prototype.
2843 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2845 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2846 and adjust to loop over all features.
2847 * server.c (handle_query) <qSupported>: Adjust to call
2848 target_process_qsupported once, passing it a vector of unprocessed
2850 * target.h (struct target_ops) <process_qsupported>: Change
2852 (target_process_qsupported): Adjust.
2854 2015-11-19 Pedro Alves <palves@redhat.com>
2856 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2858 * configure: Regenerate.
2860 2015-11-19 Pedro Alves <palves@redhat.com>
2862 * configure: Regenerate.
2864 2015-11-19 Yao Qi <yao.qi@linaro.org>
2866 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2869 2015-11-19 Yao Qi <yao.qi@linaro.org>
2871 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2872 (struct aarch64_operand): Move enum out.
2874 2015-11-19 Yao Qi <yao.qi@linaro.org>
2876 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2877 struct user_fpsimd_state *.
2878 (aarch64_store_fpregset): Likewise.
2880 2015-11-19 Yao Qi <yao.qi@linaro.org>
2882 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2883 struct user_pt_regs *.
2884 (aarch64_store_gregset): Likewise.
2886 2015-11-18 Pedro Alves <palves@redhat.com>
2888 * Makefile.in (all_object_files): Add $IPA_OBJS.
2890 2015-11-17 Pedro Alves <palves@redhat.com>
2892 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2893 GDB_SIGNAL_0 and gdb_signal_to_string.
2895 2015-11-17 Pedro Alves <palves@redhat.com>
2897 * win32-low.c (handle_output_debug_string): Remove parameter.
2898 (win32_kill): Remove our_status local and adjust call to
2899 handle_output_debug_string.
2900 (get_child_debug_event): Adjust call to
2901 handle_output_debug_string.
2903 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2905 * linux-mips-low.c (mips_fill_gregset): Add cast.
2906 (mips_store_gregset): Likewise.
2907 (mips_fill_fpregset): Likewise.
2908 (mips_store_fpregset): Likewise.
2910 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2912 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2915 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2917 * linux-mips-low.c (mips_linux_new_thread): Change type of
2918 watch_type to enum target_hw_bp_type.
2920 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2922 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2923 Change return type to arm_hwbp_type.
2925 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2927 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2928 (arm_store_gregset): Likewise.
2929 * linux-arm-low.c (arm_get_hwcap): Likewise.
2930 (arm_read_description): Likewise.
2932 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2934 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2936 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2938 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2939 (ppc_fill_vsxregset): Likewise.
2940 (ppc_store_vsxregset): Likewise.
2941 (ppc_fill_vrregset): Likewise.
2942 (ppc_store_vrregset): Likewise.
2943 (ppc_fill_evrregset): Likewise.
2944 (ppc_store_evrregset): Likewise.
2946 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2948 * linux-ppc-low.c (ppc_usrregs_info): Remove
2949 forward-declaration.
2950 (ppc_arch_setup): Move lower in file.
2952 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2954 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2955 (ps_pdwrite): Likewise.
2957 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2959 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2960 to after assert checks.
2962 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2964 * proc-service.c (ps_pdread): Add/adjust casts.
2965 (ps_pdwrite): Add/adjust casts.
2967 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2969 * server.c (handle_search_memory_1): Cast return value of
2972 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2974 * server.c (write_qxfer_response): Change type of data to
2977 2015-10-29 Pedro Alves <palves@redhat.com>
2979 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2981 2015-10-29 Pedro Alves <palves@redhat.com>
2983 * tracepoint.c (clear_installed_tracepoints): Add casts.
2985 2015-10-29 Pedro Alves <palves@redhat.com>
2987 * server.c (handle_v_cont, process_serial_event): Add enum
2988 gdb_signal casts to signal parsing code.
2990 2015-10-29 Pedro Alves <palves@redhat.com>
2992 * linux-low.h (NULL_REGSET): Define.
2993 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2994 * linux-arm-low.c (arm_regsets): Likewise.
2995 * linux-crisv32-low.c (cris_regsets): Likewise.
2996 * linux-m68k-low.c (m68k_regsets): Likewise.
2997 * linux-mips-low.c (mips_regsets): Likewise.
2998 * linux-nios2-low.c (nios2_regsets): Likewise.
2999 * linux-ppc-low.c (ppc_regsets): Likewise.
3000 * linux-s390-low.c (s390_regsets): Likewise.
3001 * linux-sh-low.c (sh_regsets): Likewise.
3002 * linux-sparc-low.c (sparc_regsets): Likewise.
3003 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3004 * linux-tile-low.c (tile_regsets): Likewise.
3005 * linux-x86-low.c (x86_regsets): Likewise.
3006 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3008 2015-10-29 Pedro Alves <palves@redhat.com>
3010 * linux-low.h (NULL_REGSET): Define.
3011 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3012 * linux-arm-low.c (arm_regsets): Likewise.
3013 * linux-crisv32-low.c (cris_regsets): Likewise.
3014 * linux-m68k-low.c (m68k_regsets): Likewise.
3015 * linux-mips-low.c (mips_regsets): Likewise.
3016 * linux-nios2-low.c (nios2_regsets): Likewise.
3017 * linux-ppc-low.c (ppc_regsets): Likewise.
3018 * linux-s390-low.c (s390_regsets): Likewise.
3019 * linux-sh-low.c (sh_regsets): Likewise.
3020 * linux-sparc-low.c (sparc_regsets): Likewise.
3021 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3022 * linux-tile-low.c (tile_regsets): Likewise.
3023 * linux-x86-low.c (x86_regsets): Likewise.
3024 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3026 2015-10-26 Doug Evans <dje@google.com>
3028 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3030 2015-10-26 Doug Evans <dje@google.com>
3032 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3034 2015-10-26 Doug Evans <dje@google.com>
3036 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3038 (attach_thread, find_new_threads_callback): Ditto.
3040 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3042 * mem-break.h (set_breakpoint_data): Remove.
3044 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3046 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3047 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3048 (initialize_low): Remove set_breakpoint_data call.
3049 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3050 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3051 (initialize_low): Remove set_breakpoint_data call.
3052 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3053 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3054 (initialize_low): Remove set_breakpoint_data call.
3056 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3058 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3059 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3060 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3061 * target.h (target_breakpoint_kind_from_pc): New macro.
3063 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3065 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3066 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3067 the default breakpoint kind.
3069 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3071 * linux-arm-low.c (arm_supports_z_point_type): Add software
3074 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3076 * linux-arm-low.c: Refactor breakpoint definitions.
3077 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3078 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3080 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3082 * Makefile.in: Add arm.c/o.
3083 * configure.srv: Likewise.
3084 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3085 (arm_breakpoint_kind_from_pc): New function.
3086 (arm_sw_breakpoint_from_kind): Return proper kind.
3087 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3089 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3091 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3093 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3094 (struct raw_breakpoint) <size>: Remove.
3095 (struct raw_breakpoint) <kind>: Add.
3096 (bp_size): New function.
3097 (bp_opcode): Likewise.
3098 (find_raw_breakpoint_at): Adjust for kind.
3099 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3100 (remove_memory_breakpoint): Adjust for kind call bp_size.
3101 (set_raw_breakpoint_at): Adjust for kind.
3102 (set_breakpoint): Likewise.
3103 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3104 (delete_raw_breakpoint): Adjust for kind.
3105 (delete_breakpoint): Likewise.
3106 (find_gdb_breakpoint): Likewise.
3107 (set_gdb_breakpoint_1): Likewise.
3108 (set_gdb_breakpoint): Likewise.
3109 (delete_gdb_breakpoint_1): Likewise.
3110 (delete_gdb_breakpoint): Likewise.
3111 (uninsert_raw_breakpoint): Likewise.
3112 (reinsert_raw_breakpoint): Likewise.
3113 (set_breakpoint_data): Remove.
3114 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3115 (check_mem_read): Adjust for kind call bp_size.
3116 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3117 (clone_one_breakpoint): Adjust for kind.
3118 * mem-break.h (set_gdb_breakpoint): Likewise.
3119 (delete_gdb_breakpoint): Likewise.
3120 * server.c (process_serial_event): Likewise.
3122 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3124 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3125 (struct linux_target_ops) <breakpoint>: Remove.
3126 (struct linux_target_ops) <breakpoint_len>: Remove.
3127 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3128 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3129 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3130 (arm_sw_breakpoint_from_kind): New function.
3131 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3132 (struct linux_target_ops) <breakpoint>: Remove.
3133 (struct linux_target_ops) <breakpoint_len>: Remove.
3134 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3135 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3136 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3137 (struct linux_target_ops) <breakpoint>: Remove.
3138 (struct linux_target_ops) <breakpoint_len>: Remove.
3139 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3140 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3141 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3142 (struct linux_target_ops) <breakpoint>: Remove.
3143 (struct linux_target_ops) <breakpoint_len>: Remove.
3144 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3145 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3146 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3147 and sw_breakpoint_from_kind to increment the pc.
3148 (linux_breakpoint_kind_from_pc): New function.
3149 (linux_sw_breakpoint_from_kind): New function.
3150 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3151 (initialize_low): Call breakpoint_kind_from_pc and
3152 sw_breakpoint_from_kind to replace breakpoint_data/len.
3153 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3155 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3156 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3157 (struct linux_target_ops) <breakpoint>: Remove.
3158 (struct linux_target_ops) <breakpoint_len>: Remove.
3159 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3160 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3161 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3162 (struct linux_target_ops) <breakpoint>: Remove.
3163 (struct linux_target_ops) <breakpoint_len>: Remove.
3164 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3165 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3166 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3167 (struct linux_target_ops) <breakpoint>: Remove.
3168 (struct linux_target_ops) <breakpoint_len>: Remove.
3169 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3170 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3171 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3172 (struct linux_target_ops) <breakpoint>: Remove.
3173 (struct linux_target_ops) <breakpoint_len>: Remove.
3174 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3175 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3176 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3177 (struct linux_target_ops) <breakpoint>: Remove.
3178 (struct linux_target_ops) <breakpoint_len>: Remove.
3179 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3180 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3181 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3182 (struct linux_target_ops) <breakpoint>: Remove.
3183 (struct linux_target_ops) <breakpoint_len>: Remove.
3184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3185 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3186 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3187 (struct linux_target_ops) <breakpoint>: Remove.
3188 (struct linux_target_ops) <breakpoint_len>: Remove.
3189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3190 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3191 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3192 (struct linux_target_ops) <breakpoint>: Remove.
3193 (struct linux_target_ops) <breakpoint_len>: Remove.
3194 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3195 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3196 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3197 (struct linux_target_ops) <breakpoint>: Remove.
3198 (struct linux_target_ops) <breakpoint_len>: Remove.
3199 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3201 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3202 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3203 (struct linux_target_ops) <breakpoint>: Remove.
3204 (struct linux_target_ops) <breakpoint_len>: Remove.
3205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3207 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3208 (struct linux_target_ops) <breakpoint>: Remove.
3209 (struct linux_target_ops) <breakpoint_len>: Remove.
3210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3213 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3215 * linux-cris-low.c (cris_get_pc): Remove void arg.
3217 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3219 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3222 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3224 * inferiors.c (thread_pid_matches_callback): New function.
3225 (find_thread_process): New function.
3226 (remove_thread): Reset current_thread.
3227 (remove_process): Assert threads have been removed first.
3229 2015-10-15 Yao Qi <yao.qi@linaro.org>
3231 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3233 (aarch64_remove_point): Likewise.
3234 * regcache.c (regcache_register_size): New function.
3236 2015-10-12 Yao Qi <yao.qi@linaro.org>
3238 * linux-aarch64-low.c: Update all callers as emit_load_store
3239 is renamed to aarch64_emit_load_store.
3241 2015-10-12 Yao Qi <yao.qi@linaro.org>
3243 * linux-aarch64-low.c: Update all callers of function renaming
3244 from emit_insn to aarch64_emit_insn.
3246 2015-10-12 Yao Qi <yao.qi@linaro.org>
3248 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3249 arch/aarch64-insn.h.
3250 (struct aarch64_memory_operand): Likewise.
3252 (emit_insn): Move to arch/aarch64-insn.c.
3253 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3254 (emit_load_store): Move to arch/aarch64-insn.c.
3255 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3256 (can_encode_int32): Remove.
3258 2015-10-12 Yao Qi <yao.qi@linaro.org>
3260 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3261 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3262 (aarch64_relocate_instruction): Likewise.
3263 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3264 (struct aarch64_insn_visitor): Likewise.
3266 2015-10-12 Yao Qi <yao.qi@linaro.org>
3268 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3269 (struct aarch64_insn_visitor): New.
3270 (struct aarch64_insn_relocation_data): New.
3271 (aarch64_ftrace_insn_reloc_b): New function.
3272 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3273 (aarch64_ftrace_insn_reloc_cb): Likewise.
3274 (aarch64_ftrace_insn_reloc_tb): Likewise.
3275 (aarch64_ftrace_insn_reloc_adr): Likewise.
3276 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3277 (aarch64_ftrace_insn_reloc_others): Likewise.
3279 (aarch64_relocate_instruction): Use visitor.
3281 2015-10-12 Yao Qi <yao.qi@linaro.org>
3283 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3284 int. Add argument buf.
3285 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3286 aarch64_relocate_instruction.
3288 2015-10-12 Yao Qi <yao.qi@linaro.org>
3290 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3291 argument insn. Remove local variable insn. Don't call
3293 (aarch64_install_fast_tracepoint_jump_pad): Call
3296 2015-09-30 Yao Qi <yao.qi@linaro.org>
3298 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3299 (emit_load_store_pair): Likewise.
3301 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3303 * dll.c (match_dll): Add cast(s).
3304 (unloaded_dll): Likewise.
3305 * linux-low.c (second_thread_of_pid_p): Likewise.
3306 (delete_lwp_callback): Likewise.
3307 (count_events_callback): Likewise.
3308 (select_event_lwp_callback): Likewise.
3309 (linux_set_resume_request): Likewise.
3310 * server.c (accumulate_file_name_length): Likewise.
3311 (emit_dll_description): Likewise.
3312 (handle_qxfer_threads_worker): Likewise.
3313 (visit_actioned_threads): Likewise.
3314 * thread-db.c (any_thread_of): Likewise.
3315 * tracepoint.c (same_process_p): Likewise.
3316 (match_blocktype): Likewise.
3317 (build_traceframe_info_xml): Likewise.
3319 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3321 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3323 (gdb_unparse_agent_expr): Likewise.
3324 * hostio.c (require_data): Likewise.
3325 (handle_pread): Likewise.
3326 * linux-low.c (disable_regset): Likewise.
3327 (fetch_register): Likewise.
3328 (store_register): Likewise.
3329 (get_dynamic): Likewise.
3330 (linux_qxfer_libraries_svr4): Likewise.
3331 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3332 (set_fast_tracepoint_jump): Likewise.
3333 (uninsert_fast_tracepoint_jumps_at): Likewise.
3334 (reinsert_fast_tracepoint_jumps_at): Likewise.
3335 (validate_inserted_breakpoint): Likewise.
3336 (clone_agent_expr): Likewise.
3337 * regcache.c (init_register_cache): Likewise.
3338 * remote-utils.c (putpkt_binary_1): Likewise.
3339 (decode_M_packet): Likewise.
3340 (decode_X_packet): Likewise.
3341 (look_up_one_symbol): Likewise.
3342 (relocate_instruction): Likewise.
3343 (monitor_output): Likewise.
3344 * server.c (handle_search_memory): Likewise.
3345 (handle_qxfer_exec_file): Likewise.
3346 (handle_qxfer_libraries): Likewise.
3347 (handle_qxfer): Likewise.
3348 (handle_query): Likewise.
3349 (handle_v_cont): Likewise.
3350 (handle_v_run): Likewise.
3351 (captured_main): Likewise.
3352 * target.c (write_inferior_memory): Likewise.
3353 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3354 * tracepoint.c (init_trace_buffer): Likewise.
3355 (add_tracepoint_action): Likewise.
3356 (add_traceframe): Likewise.
3357 (add_traceframe_block): Likewise.
3358 (cmd_qtdpsrc): Likewise.
3359 (cmd_qtdv): Likewise.
3360 (cmd_qtstatus): Likewise.
3361 (response_source): Likewise.
3362 (response_tsv): Likewise.
3363 (cmd_qtnotes): Likewise.
3364 (gdb_collect): Likewise.
3365 (initialize_tracepoint): Likewise.
3367 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3369 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3370 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3371 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3373 (enum aarch64_condition_codes): New enum.
3374 (w0): New static global.
3377 (struct aarch64_memory_operand) <type>: New
3378 MEMORY_OPERAND_POSTINDEX type.
3379 (postindex_memory_operand): New helper function.
3380 (emit_ret): New function.
3381 (emit_load_store_pair): New function, factored out of emit_stp
3382 with support for MEMORY_OPERAND_POSTINDEX.
3383 (emit_stp): Rewrite using emit_load_store_pair.
3384 (emit_ldp): New function.
3385 (emit_load_store): Likewise.
3386 (emit_ldr): Mention post-index instruction in comment.
3387 (emit_ldrh): New function.
3388 (emit_ldrb): New function.
3389 (emit_ldrsw): Mention post-index instruction in comment.
3390 (emit_str): Likewise.
3391 (emit_subs): New function.
3392 (emit_cmp): Likewise.
3393 (emit_and): Likewise.
3394 (emit_orr): Likewise.
3395 (emit_orn): Likewise.
3396 (emit_eor): Likewise.
3397 (emit_mvn): Likewise.
3398 (emit_lslv): Likewise.
3399 (emit_lsrv): Likewise.
3400 (emit_asrv): Likewise.
3401 (emit_mul): Likewise.
3402 (emit_sbfm): Likewise.
3403 (emit_sbfx): Likewise.
3404 (emit_ubfm): Likewise.
3405 (emit_ubfx): Likewise.
3406 (emit_csinc): Likewise.
3407 (emit_cset): Likewise.
3408 (emit_nop): Likewise.
3409 (emit_ops_insns): New helper function.
3410 (emit_pop): Likewise.
3411 (emit_push): Likewise.
3412 (aarch64_emit_prologue): New function.
3413 (aarch64_emit_epilogue): Likewise.
3414 (aarch64_emit_add): Likewise.
3415 (aarch64_emit_sub): Likewise.
3416 (aarch64_emit_mul): Likewise.
3417 (aarch64_emit_lsh): Likewise.
3418 (aarch64_emit_rsh_signed): Likewise.
3419 (aarch64_emit_rsh_unsigned): Likewise.
3420 (aarch64_emit_ext): Likewise.
3421 (aarch64_emit_log_not): Likewise.
3422 (aarch64_emit_bit_and): Likewise.
3423 (aarch64_emit_bit_or): Likewise.
3424 (aarch64_emit_bit_xor): Likewise.
3425 (aarch64_emit_bit_not): Likewise.
3426 (aarch64_emit_equal): Likewise.
3427 (aarch64_emit_less_signed): Likewise.
3428 (aarch64_emit_less_unsigned): Likewise.
3429 (aarch64_emit_ref): Likewise.
3430 (aarch64_emit_if_goto): Likewise.
3431 (aarch64_emit_goto): Likewise.
3432 (aarch64_write_goto_address): Likewise.
3433 (aarch64_emit_const): Likewise.
3434 (aarch64_emit_call): Likewise.
3435 (aarch64_emit_reg): Likewise.
3436 (aarch64_emit_pop): Likewise.
3437 (aarch64_emit_stack_flush): Likewise.
3438 (aarch64_emit_zero_ext): Likewise.
3439 (aarch64_emit_swap): Likewise.
3440 (aarch64_emit_stack_adjust): Likewise.
3441 (aarch64_emit_int_call_1): Likewise.
3442 (aarch64_emit_void_call_2): Likewise.
3443 (aarch64_emit_eq_goto): Likewise.
3444 (aarch64_emit_ne_goto): Likewise.
3445 (aarch64_emit_lt_goto): Likewise.
3446 (aarch64_emit_le_goto): Likewise.
3447 (aarch64_emit_gt_goto): Likewise.
3448 (aarch64_emit_ge_got): Likewise.
3449 (aarch64_emit_ops_impl): New static global variable.
3450 (aarch64_emit_ops): New target function, return
3451 &aarch64_emit_ops_impl.
3452 (struct linux_target_ops): Install it.
3454 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3456 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3457 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3459 * linux-aarch64-ipa.c: New file.
3460 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3462 (aarch64_get_thread_area): New target method.
3463 (extract_signed_bitfield): New helper function.
3464 (aarch64_decode_ldr_literal): New function.
3465 (enum aarch64_opcodes): New enum.
3466 (struct aarch64_register): New struct.
3467 (struct aarch64_operand): New struct.
3468 (x0): New static global.
3477 (aarch64_register): New helper function.
3478 (register_operand): Likewise.
3479 (immediate_operand): Likewise.
3480 (struct aarch64_memory_operand): New struct.
3481 (offset_memory_operand): New helper function.
3482 (preindex_memory_operand): Likewise.
3483 (enum aarch64_system_control_registers): New enum.
3484 (ENCODE): New macro.
3485 (emit_insn): New helper function.
3486 (emit_b): New function.
3487 (emit_bcond): Likewise.
3488 (emit_cb): Likewise.
3489 (emit_tb): Likewise.
3490 (emit_blr): Likewise.
3491 (emit_stp): Likewise.
3492 (emit_ldp_q_offset): Likewise.
3493 (emit_stp_q_offset): Likewise.
3494 (emit_load_store): Likewise.
3495 (emit_ldr): Likewise.
3496 (emit_ldrsw): Likewise.
3497 (emit_str): Likewise.
3498 (emit_ldaxr): Likewise.
3499 (emit_stxr): Likewise.
3500 (emit_stlr): Likewise.
3501 (emit_data_processing_reg): Likewise.
3502 (emit_data_processing): Likewise.
3503 (emit_add): Likewise.
3504 (emit_sub): Likewise.
3505 (emit_mov): Likewise.
3506 (emit_movk): Likewise.
3507 (emit_mov_addr): Likewise.
3508 (emit_mrs): Likewise.
3509 (emit_msr): Likewise.
3510 (emit_sevl): Likewise.
3511 (emit_wfe): Likewise.
3512 (append_insns): Likewise.
3513 (can_encode_int32_in): New helper function.
3514 (aarch64_relocate_instruction): New function.
3515 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3516 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3517 (struct linux_target_ops): Install aarch64_get_thread_area,
3518 aarch64_install_fast_tracepoint_jump_pad and
3519 aarch64_get_min_fast_tracepoint_insn_len.
3521 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3523 * Makefile.in (aarch64-insn.o): New rule.
3524 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3526 2015-09-21 Yao Qi <yao.qi@linaro.org>
3528 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3530 2015-09-21 Yao Qi <yao.qi@linaro.org>
3532 * tracepoint.c (max_jump_pad_size): Remove.
3534 2015-09-18 Yao Qi <yao.qi@linaro.org>
3536 * linux-aarch64-low.c: Don't include sys/uio.h.
3537 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3539 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3541 * tracepoint.c (eval_result_type): Change prototype.
3542 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3544 2015-09-15 Pedro Alves <palves@redhat.com>
3546 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3547 Check whether to report exec events instead of checking whether
3548 multiprocess is enabled.
3550 2015-09-15 Pedro Alves <palves@redhat.com>
3553 * remote-utils.c (prepare_resume_reply): Merge
3554 TARGET_WAITKIND_VFORK_DONE switch case with the
3555 TARGET_WAITKIND_FORKED case.
3557 2015-09-15 Yao Qi <yao.qi@linaro.org>
3559 * server.c (handle_query): Check string comparison using
3560 "else if" instead of "if".
3562 2015-09-15 Yao Qi <yao.qi@linaro.org>
3564 * server.c (vCont_supported): New global variable.
3565 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3566 matches. Append ";vContSupported+" to own_buf.
3567 (handle_v_requests): Append ";s;S" to own_buf if target supports
3568 hardware single step or vCont_supported is false.
3569 (capture_main): Set vCont_supported to zero.
3571 2015-09-15 Yao Qi <yao.qi@linaro.org>
3573 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3575 (linux_supports_hardware_single_step): ... New function.
3576 (linux_target_ops): Update.
3577 * lynx-low.c (lynx_target_ops): Set field
3578 supports_hardware_single_step to target_can_do_hardware_single_step.
3579 * nto-low.c (nto_target_ops): Likewise.
3580 * spu-low.c (spu_target_ops): Likewise.
3581 * win32-low.c (win32_target_ops): Likewise.
3582 * target.c (target_can_do_hardware_single_step): New function.
3583 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3584 Remove. <supports_hardware_single_step>: New field.
3585 (target_supports_conditional_breakpoints): Remove.
3586 (target_supports_hardware_single_step): New macro.
3587 (target_can_do_hardware_single_step): Declare.
3588 * server.c (handle_query): Use target_supports_hardware_single_step
3589 instead of target_supports_conditional_breakpoints.
3591 2015-09-15 Yao Qi <yao.qi@linaro.org>
3593 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3595 (struct linux_target_ops the_low_target): Install
3596 aarch64_linux_siginfo_fixup.
3598 2015-09-11 Don Breazeal <donb@codesourcery.com>
3599 Luis Machado <lgustavo@codesourcery.com>
3601 * linux-low.c (linux_mourn): Static declaration.
3602 (linux_arch_setup): Move in front of
3603 handle_extended_wait.
3604 (linux_arch_setup_thread): New function.
3605 (handle_extended_wait): Handle exec events. Call
3606 linux_arch_setup_thread. Make event_lwp argument a
3607 pointer-to-a-pointer.
3608 (check_zombie_leaders): Do not check stopped threads.
3609 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3610 (linux_low_filter_event): Add lwp and thread for exec'ing
3611 non-leader thread if leader thread has been deleted.
3612 Refactor code into linux_arch_setup_thread and call it.
3613 Pass child lwp pointer by reference to handle_extended_wait.
3614 (linux_wait_for_event_filtered): Update comment.
3615 (linux_wait_1): Prevent clobbering exec event status.
3616 (linux_supports_exec_events): New function.
3617 (linux_target_ops) <supports_exec_events>: Initialize new member.
3618 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3620 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3621 * server.c (report_exec_events): New global variable.
3622 (handle_query): Handle qSupported query for exec-events feature.
3623 (captured_main): Initialize report_exec_events.
3624 * server.h (report_exec_events): Declare new global variable.
3625 * target.h (struct target_ops) <supports_exec_events>: New
3627 (target_supports_exec_events): New macro.
3628 * win32-low.c (win32_target_ops) <supports_exec_events>:
3629 Initialize new member.
3631 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3633 * linux-low.c (linux_low_enable_btrace): Remove.
3634 (linux_target_ops): Replace linux_low_enable_btrace with
3635 linux_enable_btrace.
3637 2015-09-03 Yao Qi <yao.qi@linaro.org>
3639 * linux-aarch64-low.c (aarch64_insert_point): Call
3640 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3643 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3645 * linux-low.c (check_stopped_by_breakpoint): Use
3646 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3648 2015-08-27 Pedro Alves <palves@redhat.com>
3650 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3652 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3654 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3655 the XNEW-family equivalent.
3656 (compile_bytecodes): Likewise.
3657 * dll.c (loaded_dll): Likewise.
3658 * event-loop.c (append_callback_event): Likewise.
3659 (create_file_handler): Likewise.
3660 (create_file_event): Likewise.
3661 * hostio.c (handle_open): Likewise.
3662 * inferiors.c (add_thread): Likewise.
3663 (add_process): Likewise.
3664 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3665 * linux-arm-low.c (arm_new_process): Likewise.
3666 (arm_new_thread): Likewise.
3667 * linux-low.c (add_to_pid_list): Likewise.
3668 (linux_add_process): Likewise.
3669 (handle_extended_wait): Likewise.
3670 (add_lwp): Likewise.
3671 (enqueue_one_deferred_signal): Likewise.
3672 (enqueue_pending_signal): Likewise.
3673 (linux_resume_one_lwp_throw): Likewise.
3674 (linux_resume_one_thread): Likewise.
3675 (linux_read_memory): Likewise.
3676 (linux_write_memory): Likewise.
3677 * linux-mips-low.c (mips_linux_new_process): Likewise.
3678 (mips_linux_new_thread): Likewise.
3679 (mips_add_watchpoint): Likewise.
3680 * linux-x86-low.c (initialize_low_arch): Likewise.
3681 * lynx-low.c (lynx_add_process): Likewise.
3682 * mem-break.c (set_raw_breakpoint_at): Likewise.
3683 (set_breakpoint): Likewise.
3684 (add_condition_to_breakpoint): Likewise.
3685 (add_commands_to_breakpoint): Likewise.
3686 (clone_agent_expr): Likewise.
3687 (clone_one_breakpoint): Likewise.
3688 * regcache.c (new_register_cache): Likewise.
3689 * remote-utils.c (look_up_one_symbol): Likewise.
3690 * server.c (queue_stop_reply): Likewise.
3691 (start_inferior): Likewise.
3692 (queue_stop_reply_callback): Likewise.
3693 (handle_target_event): Likewise.
3694 * spu-low.c (fetch_ppc_memory): Likewise.
3695 (store_ppc_memory): Likewise.
3696 * target.c (set_target_ops): Likewise.
3697 * thread-db.c (thread_db_load_search): Likewise.
3698 (try_thread_db_load_1): Likewise.
3699 * tracepoint.c (add_tracepoint): Likewise.
3700 (add_tracepoint_action): Likewise.
3701 (create_trace_state_variable): Likewise.
3702 (cmd_qtdpsrc): Likewise.
3703 (cmd_qtro): Likewise.
3704 (add_while_stepping_state): Likewise.
3705 * win32-low.c (child_add_thread): Likewise.
3706 (get_image_name): Likewise.
3708 2015-08-25 Yao Qi <yao.qi@linaro.org>
3710 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3712 2015-08-25 Yao Qi <yao.qi@linaro.org>
3714 * Makefile.in (aarch64-linux.o): New rule.
3715 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3717 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3718 (aarch64_init_debug_reg_state): Make it extern.
3719 (aarch64_linux_prepare_to_resume): Remove.
3721 2015-08-25 Yao Qi <yao.qi@linaro.org>
3723 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3724 lwp_arch_private_info and ptid_of_lwp.
3726 2015-08-25 Yao Qi <yao.qi@linaro.org>
3728 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3729 Find proc_info by find_process_pid. All callers updated.
3731 2015-08-25 Yao Qi <yao.qi@linaro.org>
3733 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3735 (debug_reg_change_callback): Remove.
3736 (aarch64_notify_debug_reg_change): Remove.
3738 2015-08-25 Yao Qi <yao.qi@linaro.org>
3740 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3741 Call current_lwp_ptid.
3743 2015-08-25 Yao Qi <yao.qi@linaro.org>
3745 * linux-aarch64-low.c (debug_reg_change_callback): Use
3748 2015-08-25 Yao Qi <yao.qi@linaro.org>
3750 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3752 2015-08-25 Yao Qi <yao.qi@linaro.org>
3754 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3756 2015-08-25 Yao Qi <yao.qi@linaro.org>
3758 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3761 2015-08-25 Yao Qi <yao.qi@linaro.org>
3763 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3765 (debug_reg_change_callback): Remove argument entry and add argument
3766 lwp. Remove local variable thread. Don't print thread id in the
3767 debugging output. Don't check whether pid of thread equals to pid.
3768 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3769 iterate_over_lwps instead find_inferior.
3771 2015-08-24 Pedro Alves <palves@redhat.com>
3773 * inferiors.c (get_first_process): New function.
3774 * inferiors.h (get_first_process): New declaration.
3775 * remote-utils.c (read_ptid): Default to the first process in the
3776 list, instead of to the current thread's process.
3778 2015-08-24 Pedro Alves <palves@redhat.com>
3780 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3781 * event-loop.c: Likewise.
3782 * remote-utils.c: Likewise.
3783 * tracepoint.c: Likewise.
3785 2015-08-24 Pedro Alves <palves@redhat.com>
3787 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3790 2015-08-21 Pedro Alves <palves@redhat.com>
3792 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3793 instead of literal 1.
3795 2015-08-21 Pedro Alves <palves@redhat.com>
3797 * tdesc.c (default_description): Explicitly zero-initialize.
3799 2015-08-21 Pedro Alves <palves@redhat.com>
3802 * inferiors.c (remove_thread): Discard any pending stop reply for
3804 * server.c (remove_all_on_match_pid): Rename to ...
3805 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3807 (discard_queued_stop_replies): Change parameter to a ptid. Now
3809 (handle_v_kill, kill_inferior_callback, captured_main)
3810 (process_serial_event): Adjust.
3811 * server.h (discard_queued_stop_replies): Declare.
3813 2015-08-21 Pedro Alves <palves@redhat.com>
3815 * linux-low.c (wait_for_sigstop): Always switch to no thread
3816 selected if the previously current thread dies.
3817 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3818 process instead of the current thread's.
3819 * remote-utils.c (input_interrupt): Don't check if there's no
3821 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3822 current thread to the general thread fails, error out.
3823 (handle_qxfer_auxv, handle_qxfer_libraries)
3824 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3825 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3826 (handle_query): Check if there's a thread selected instead of
3827 checking whether there's any thread in the thread list.
3828 (handle_qxfer_threads, handle_qxfer_btrace)
3829 (handle_qxfer_btrace_conf): Don't error out early if there's no
3830 thread in the thread list.
3831 (handle_v_cont, myresume): Don't set the current thread to the
3833 (process_serial_event) <Hg handling>: Also set thread_id if the
3834 previous general thread is still alive.
3835 (process_serial_event) <g/G handling>: If setting the current
3836 thread to the general thread fails, error out.
3837 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3838 thread's lwp instead of the current thread's.
3839 * target.c (set_desired_thread): If the desired thread was not
3840 found, leave the current thread pointing to NULL. Return an int
3841 (boolean) indicating success.
3842 * target.h (set_desired_thread): Change return type to int.
3844 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3846 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3847 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3849 (ps_get_thread_area): New function.
3851 2015-08-19 Gary Benson <gbenson@redhat.com>
3853 * hostio.c (handle_pread): Do not attempt to read more data
3854 than hostio_reply_with_data can fit in a packet.
3856 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3858 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3860 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3862 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3864 2015-08-06 Pedro Alves <palves@redhat.com>
3866 * tracepoint.c (expr_eval_result): Now an int.
3868 2015-08-06 Pedro Alves <palves@redhat.com>
3870 * gdbthread.h (struct regcache): Forward declare.
3871 (struct thread_info) <regcache_data>: Now a struct regcache
3873 * inferiors.c (inferior_regcache_data)
3874 (set_inferior_regcache_data): Now work with struct regcache
3876 * inferiors.h (struct regcache): Forward declare.
3877 (inferior_regcache_data, set_inferior_regcache_data): Now work
3878 with struct regcache pointers.
3879 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3880 (free_register_cache_thread): Remove struct regcache pointer
3883 2015-08-06 Pedro Alves <palves@redhat.com>
3885 * server.c (captured_main): On error, print the exception message
3886 to stderr, and if run_once is set, throw a quit.
3888 2015-08-06 Pedro Alves <palves@redhat.com>
3890 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3893 2015-08-06 Pedro Alves <palves@redhat.com>
3895 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3896 reading beyond the passed in buffer length.
3898 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3900 * tracepoint.c (symbol_list) <required>: Remove.
3902 2015-08-06 Pedro Alves <palves@redhat.com>
3904 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3905 count if stopping and suspending threads.
3906 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3907 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3908 (linux_detach): Complete an ongoing step-over.
3909 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3911 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3912 (linux_wait_1): If passing a signal to the inferior after
3913 finishing a step-over, unsuspend and re-resume all lwps. If we
3914 see a single-step event but the thread should be continuing, don't
3915 pass the trap to gdb.
3916 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3917 internal_error instead of gdb_assert.
3918 (enqueue_pending_signal): New function.
3919 (check_ptrace_stopped_lwp_gone): Add debug output.
3920 (start_step_over): Use internal_error instead of gdb_assert.
3921 (complete_ongoing_step_over): New function.
3922 (linux_resume_one_thread): Don't resume a suspended thread.
3923 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3926 2015-08-06 Pedro Alves <palves@redhat.com>
3928 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3929 (linux_thread_alive): Use lwp_is_marked_dead.
3930 (extended_event_reported): Delete.
3931 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3932 instead of extended_event_reported.
3933 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3935 (lwp_is_marked_dead): New function.
3936 (lwp_running): Use lwp_is_marked_dead.
3937 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3940 2015-08-06 Pedro Alves <palves@redhat.com>
3942 * linux-low.c (linux_wait_1): Move fork event output out of the
3943 !report_to_gdb check. Pass event_child->waitstatus to
3944 target_waitstatus_to_string instead of ourstatus.
3946 2015-08-04 Yao Qi <yao.qi@linaro.org>
3948 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3949 if current_thread is 32 bit.
3951 2015-08-04 Yao Qi <yao.qi@linaro.org>
3953 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3954 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3955 * server.c (extended_protocol): Remove "static".
3956 * server.h (extended_protocol): Declare it.
3958 2015-08-04 Yao Qi <yao.qi@linaro.org>
3960 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3961 both aarch64 and aarch32.
3962 (aarch64_set_pc): Likewise.
3964 2015-08-04 Yao Qi <yao.qi@linaro.org>
3966 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3967 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3968 arm-with-neon.xml to srv_xmlfiles.
3969 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3970 (is_64bit_tdesc): New function.
3971 (aarch64_linux_read_description): New function.
3972 (aarch64_arch_setup): Call aarch64_linux_read_description.
3973 (regs_info): Rename to regs_info_aarch64.
3974 (aarch64_regs_info): Return right regs_info.
3975 (initialize_low_arch): Call initialize_low_arch_aarch32.
3977 2015-08-04 Yao Qi <yao.qi@linaro.org>
3979 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3980 * linux-aarch32-low.c: New file.
3981 * linux-aarch32-low.h: New file.
3982 * linux-arm-low.c (arm_fill_gregset): Move it to
3983 linux-aarch32-low.c.
3984 (arm_store_gregset): Likewise.
3985 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3986 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3987 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3988 (regs_info): Rename to regs_info_arm.
3989 (arm_regs_info): Return regs_info_aarch32 if
3990 have_ptrace_getregset is 1 and target description is
3991 arm_with_neon or arm_with_vfpv3.
3992 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3993 Call initialize_low_arch_aarch32 instead.
3995 2015-08-04 Yao Qi <yao.qi@linaro.org>
3997 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3998 * linux-low.c: ... here.
3999 * linux-low.h (have_ptrace_getregset): Declare it.
4001 2015-08-04 Pedro Alves <palves@redhat.com>
4003 * thread-db.c (struct thread_db): Use new typedefs.
4004 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4006 (disable_thread_event_reporting): Cast result of dlsym to
4007 destination function pointer type.
4008 (thread_db_mourn): Use td_ta_delete_ftype.
4010 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4012 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4014 (CDX_BREAKPOINT): Define for R2.
4015 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4016 (the_low_target): Add comments.
4018 2015-07-30 Yao Qi <yao.qi@linaro.org>
4020 * linux-arm-low.c (arm_hwcap): Remove it.
4021 (arm_read_description): New local variable arm_hwcap. Don't
4022 set arm_hwcap to zero.
4024 2015-07-30 Yao Qi <yao.qi@linaro.org>
4026 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4027 Use regcache->tdesc instead.
4028 (arm_store_wmmxregset): Likewise.
4029 (arm_fill_vfpregset): Likewise.
4030 (arm_store_vfpregset): Likewise.
4032 2015-07-30 Yao Qi <yao.qi@linaro.org>
4034 * linux-arm-low.c: Include arch/arm.h.
4035 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4036 (arm_store_gregset): Likewise.
4038 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4040 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4041 ptrace's 4th parameter.
4043 2015-07-27 Yao Qi <yao.qi@linaro.org>
4045 * configure.srv (case aarch64*-*-linux*): Don't set
4048 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4050 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4052 * linux-arm-low.c: Likewise.
4053 * linux-cris-low.c: Likewise.
4054 * linux-crisv32-low.c: Likewise.
4055 * linux-low.c: Likewise.
4056 * linux-m68k-low.c: Likewise.
4057 * linux-mips-low.c: Likewise.
4058 * linux-nios2-low.c: Likewise.
4059 * linux-s390-low.c: Likewise.
4060 * linux-sparc-low.c: Likewise.
4061 * linux-tic6x-low.c: Likewise.
4062 * linux-tile-low.c: Likewise.
4063 * linux-x86-low.c: Likewise.
4065 2015-07-24 Pedro Alves <palves@redhat.com>
4067 * config.in: Regenerate.
4068 * configure: Regenerate.
4070 2015-07-24 Pedro Alves <palves@redhat.com>
4072 * acinclude.m4: Include ../ptrace.m4.
4073 * configure.ac: Call GDB_AC_PTRACE.
4074 * config.in, configure: Regenerate.
4076 2015-07-24 Yao Qi <yao.qi@linaro.org>
4078 * linux-low.c (linux_create_inferior): Remove setting to
4079 proc->priv->new_inferior.
4080 (linux_attach): Likewise.
4081 (linux_low_filter_event): Likewise.
4082 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4084 2015-07-24 Yao Qi <yao.qi@linaro.org>
4086 * linux-low.c (linux_arch_setup): New function.
4087 (linux_low_filter_event): If proc->tdesc is NULL and
4088 proc->attached is true, call the_low_target.arch_setup.
4089 Otherwise, keep status pending, and return.
4090 (linux_resume_one_lwp_throw): Don't call get_pc if
4091 thread->while_stepping isn't NULL. Don't call
4092 get_thread_regcache if proc->tdesc is NULL.
4093 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4094 (linux_target_ops): Install arch_setup.
4095 * server.c (start_inferior): Call the_target->arch_setup.
4096 * target.h (struct target_ops) <arch_setup>: New field.
4097 (target_arch_setup): New marco.
4098 * lynx-low.c (lynx_target_ops): Update.
4099 * nto-low.c (nto_target_ops): Update.
4100 * spu-low.c (spu_target_ops): Update.
4101 * win32-low.c (win32_target_ops): Update.
4103 2015-07-24 Yao Qi <yao.qi@linaro.org>
4105 * linux-low.c (linux_add_process): Don't set
4106 proc->priv->new_inferior.
4107 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4108 (linux_attach): Likewise.
4110 2015-07-24 Yao Qi <yao.qi@linaro.org>
4112 * server.c (start_inferior): Code refactor.
4114 2015-07-24 Yao Qi <yao.qi@linaro.org>
4116 * server.c (process_serial_event): Set general_thread.
4118 2015-07-21 Yao Qi <yao.qi@linaro.org>
4120 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4121 aarch64_linux_get_debug_reg_capacity.
4123 2015-07-17 Yao Qi <yao.qi@linaro.org>
4125 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4126 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4127 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4128 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4129 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4130 (AARCH64_HWP_ALIGNMENT): Likewise.
4131 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4132 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4133 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4134 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4135 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4136 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4137 (struct aarch64_debug_reg_state): Likewise.
4138 (struct arch_lwp_info): Likewise.
4139 (aarch64_align_watchpoint): Likewise.
4140 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4141 (aarch64_watchpoint_length): Likewise.
4142 (aarch64_point_encode_ctrl_reg): Likewise
4143 (aarch64_point_is_aligned): Likewise.
4144 (aarch64_align_watchpoint): Likewise.
4145 (aarch64_linux_set_debug_regs):
4146 (aarch64_dr_state_insert_one_point): Likewise.
4147 (aarch64_dr_state_remove_one_point): Likewise.
4148 (aarch64_handle_breakpoint): Likewise.
4149 (aarch64_handle_aligned_watchpoint): Likewise.
4150 (aarch64_handle_unaligned_watchpoint): Likewise.
4151 (aarch64_handle_watchpoint): Likewise.
4153 2015-07-17 Yao Qi <yao.qi@linaro.org>
4155 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4156 and don't aarch64_get_debug_reg_state. All callers update.
4157 (aarch64_handle_aligned_watchpoint): Likewise.
4158 (aarch64_handle_unaligned_watchpoint): Likewise.
4159 (aarch64_handle_watchpoint): Likewise.
4160 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4161 (aarch64_remove_point): Likewise.
4163 2015-07-17 Yao Qi <yao.qi@linaro.org>
4165 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4167 (aarch64_handle_unaligned_watchpoint): Likewise.
4169 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4171 Revert the previous 3 commits:
4172 Move gdb_regex* to common/
4173 Move linux_find_memory_regions_full & co.
4174 gdbserver build-id attribute generator
4176 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4177 Jan Kratochvil <jan.kratochvil@redhat.com>
4179 gdbserver build-id attribute generator.
4180 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4181 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4182 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4184 (get_dynamic): Use find_pdhr to traverse program headers.
4185 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4186 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4187 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4188 (get_hex_build_id): New.
4189 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4190 to reply XML document.
4192 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4193 Jan Kratochvil <jan.kratochvil@redhat.com>
4195 * target.c: Include target/target-utils.h and fcntl.h.
4196 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4197 (target_fileio_read_stralloc): New functions.
4199 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4201 * Makefile.in (OBS): Add gdb_regex.o.
4203 * config.in: Rebuilt.
4204 * configure: Rebuilt.
4206 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4207 Jan Kratochvil <jan.kratochvil@redhat.com>
4209 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4210 * Makefile.in (OBS): Add target-utils.o.
4211 (linux-maps.o, target-utils.o): New.
4212 * configure.srv (srv_linux_obj): Add linux-maps.o.
4214 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4216 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4218 (the_low_target): Install it.
4220 2015-07-14 Pedro Alves <palves@redhat.com>
4222 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4223 Instead, ignore ECHILD, and throw an error for other errnos.
4225 2015-07-10 Pedro Alves <palves@redhat.com>
4227 * event-loop.c (struct callback_event) <data>: Change type to
4228 gdb_client_data instance instead of gdb_client_data pointer.
4229 (append_callback_event): Adjust.
4231 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4233 * linux-aarch64-low.c: Add comments for each linux_target_ops
4234 method. Remove comments already covered in target_ops and
4235 linux_target_ops definitions.
4236 (the_low_target): Add comments for each unimplemented method.
4238 2015-07-09 Yao Qi <yao.qi@linaro.org>
4240 * linux-aarch64-low.c (aarch64_regmap): Remove.
4241 (aarch64_usrregs_info): Remove.
4242 (regs_info): Set field usrregs to NULL.
4244 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4246 * linux-low.c: Include "rsp-low.h"
4247 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4248 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4249 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4250 (handle_btrace_enable_pt): New.
4251 (handle_btrace_general_set): Support "pt".
4252 (handle_btrace_conf_general_set): Support "pt:size".
4254 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4256 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4259 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4261 * linux-aarch64-low.c: Remove comment about endianness.
4262 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4263 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4266 2015-06-24 Gary Benson <gbenson@redhat.com>
4268 * linux-i386-ipa.c (stdint.h): Do not include.
4269 * lynx-i386-low.c (stdint.h): Likewise.
4270 * lynx-ppc-low.c (stdint.h): Likewise.
4271 * mem-break.c (stdint.h): Likewise.
4272 * thread-db.c (stdint.h): Likewise.
4273 * tracepoint.c (stdint.h): Likewise.
4274 * win32-low.c (stdint.h): Likewise.
4276 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4278 * server.c (write_qxfer_response): Update call to
4279 remote_escape_output.
4281 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4282 Jan Kratochvil <jan.kratochvil@redhat.com>
4284 Merge multiple hex conversions.
4285 * gdbreplay.c (tohex): Rename to 'fromhex'.
4286 (logchar): Use fromhex.
4288 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4290 * server.c (handle_qxfer_libraries): Set `version' attribute for
4293 2015-06-10 Gary Benson <gbenson@redhat.com>
4295 * target.h (struct target_ops) <multifs_open>: New field.
4296 <multifs_unlink>: Likewise.
4297 <multifs_readlink>: Likewise.
4298 * linux-low.c (nat/linux-namespaces.h): New include.
4299 (linux_target_ops): Initialize the_target->multifs_open,
4300 the_target->multifs_unlink and the_target->multifs_readlink.
4301 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4302 * hostio.c (hostio_fs_pid): New static variable.
4303 (hostio_handle_new_gdb_connection): New function.
4304 (handle_setfs): Likewise.
4305 (handle_open): Use the_target->multifs_open as appropriate.
4306 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4307 (handle_readlink): Use the_target->multifs_readlink as
4309 (handle_vFile): Handle vFile:setfs packets.
4310 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4311 after target_handle_new_gdb_connection.
4313 2015-06-10 Gary Benson <gbenson@redhat.com>
4315 * configure.ac (AC_CHECK_FUNCS): Add setns.
4316 * config.in: Regenerate.
4317 * configure: Likewise.
4318 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4319 (linux-namespaces.o): New rule.
4320 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4322 2015-06-09 Gary Benson <gbenson@redhat.com>
4324 * hostio.c (handle_open): Process mode argument with
4325 fileio_to_host_mode.
4327 2015-06-01 Yao Qi <yao.qi@linaro.org>
4329 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4330 * linux-x86-low.c: Likewise.
4332 2015-05-28 Don Breazeal <donb@codesourcery.com>
4334 * linux-low.c (handle_extended_wait): Initialize
4335 thread_info.last_resume_kind for new fork children.
4337 2015-05-15 Pedro Alves <palves@redhat.com>
4339 * target.h (target_handle_new_gdb_connection): Rewrite using if
4340 wrapped in do/while.
4342 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4344 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4345 * configure, config.in: Regenerate.
4346 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4349 2015-05-12 Don Breazeal <donb@codesourcery.com>
4351 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4352 PTRACE_EVENT_VFORK_DONE.
4353 (linux_low_ptrace_options, extended_event_reported): Add vfork
4355 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4356 and "vforkdone" for RSP 'T' Stop Reply Packet.
4357 * server.h (report_vfork_events): Declare
4360 2015-05-12 Don Breazeal <donb@codesourcery.com>
4362 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4363 (the_low_target) <new_fork>: Initialize new member.
4364 * linux-arm-low.c (arm_new_fork): New function.
4365 (the_low_target) <new_fork>: Initialize new member.
4366 * linux-low.c (handle_extended_wait): Call new target function
4368 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4369 * linux-mips-low.c (mips_add_watchpoint): New function
4370 extracted from mips_insert_point.
4371 (the_low_target) <new_fork>: Initialize new member.
4372 (mips_linux_new_fork): New function.
4373 (mips_insert_point): Call mips_add_watchpoint.
4374 * linux-x86-low.c (x86_linux_new_fork): New function.
4375 (the_low_target) <new_fork>: Initialize new member.
4377 2015-05-12 Don Breazeal <donb@codesourcery.com>
4379 * linux-low.c (handle_extended_wait): Implement return value,
4380 rename argument 'event_child' to 'event_lwp', handle
4381 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4382 (linux_low_ptrace_options): New function.
4383 (linux_low_filter_event): Call linux_low_ptrace_options,
4384 use different argument fo linux_enable_event_reporting,
4385 use return value from handle_extended_wait.
4386 (extended_event_reported): New function.
4387 (linux_wait_1): Call extended_event_reported and set
4388 status to report fork events.
4389 (linux_write_memory): Add pid to debug message.
4390 (reset_lwp_ptrace_options_callback): New function.
4391 (linux_handle_new_gdb_connection): New function.
4392 (linux_target_ops): Initialize new structure member.
4393 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4394 * lynx-low.c: Initialize new structure member.
4395 * remote-utils.c (prepare_resume_reply): Implement stop reason
4396 "fork" for "T" stop message.
4397 * server.c (handle_query): Call handle_new_gdb_connection.
4398 * server.h (report_fork_events): Declare global flag.
4399 * target.h (struct target_ops) <handle_new_gdb_connection>:
4401 (target_handle_new_gdb_connection): New macro.
4402 * win32-low.c: Initialize new structure member.
4404 2015-05-12 Don Breazeal <donb@codesourcery.com>
4406 * mem-break.c (APPEND_TO_LIST): Define macro.
4407 (clone_agent_expr): New function.
4408 (clone_one_breakpoint): New function.
4409 (clone_all_breakpoints): New function.
4410 * mem-break.h: Declare new functions.
4412 2015-05-12 Don Breazeal <donb@codesourcery.com>
4414 * linux-low.c (linux_supports_fork_events): New function.
4415 (linux_supports_vfork_events): New function.
4416 (linux_target_ops): Initialize new structure members.
4417 (initialize_low): Call linux_check_ptrace_features.
4418 * lynx-low.c (lynx_target_ops): Initialize new structure
4420 * server.c (report_fork_events, report_vfork_events):
4422 (handle_query): Add new features to qSupported packet and
4424 (captured_main): Initialize new global variables.
4425 * target.h (struct target_ops) <supports_fork_events>:
4427 <supports_vfork_events>: New member.
4428 (target_supports_fork_events): New macro.
4429 (target_supports_vfork_events): New macro.
4430 * win32-low.c (win32_target_ops): Initialize new structure
4433 2015-05-12 Gary Benson <gbenson@redhat.com>
4435 * server.c (handle_qxfer_exec_file): Use current process
4438 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4440 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4441 Remove HAVE_PTRACE_GETREGS conditionals.
4442 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4443 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4445 2015-05-08 Yao Qi <yao.qi@linaro.org>
4447 * linux-low.c (linux_supports_conditional_breakpoints): New
4449 (linux_target_ops): Install new target method.
4450 * lynx-low.c (lynx_target_ops): Install NULL hook for
4451 supports_conditional_breakpoints.
4452 * nto-low.c (nto_target_ops): Likewise.
4453 * spu-low.c (spu_target_ops): Likewise.
4454 * win32-low.c (win32_target_ops): Likewise.
4455 * server.c (handle_query): Check
4456 target_supports_conditional_breakpoints.
4457 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4459 (target_supports_conditional_breakpoints): New macro.
4461 2015-05-06 Pedro Alves <palves@redhat.com>
4464 * server.c (start_inferior): If the process exits, mourn it.
4466 2015-04-21 Gary Benson <gbenson@redhat.com>
4468 * hostio.c (fileio_open_flags_to_host): Factored out to
4469 fileio_to_host_openflags in common/fileio.c. Single use
4472 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4474 * linux-xtensa-low.c (xtensa_fill_gregset)
4475 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4478 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4480 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4481 (regs_info): Replace usrregs pointer with NULL.
4483 2015-04-17 Gary Benson <gbenson@redhat.com>
4485 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4486 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4487 * server.c (handle_qxfer_exec_file): New function.
4488 (qxfer_packets): Add exec-file entry.
4489 (handle_query): Report qXfer:exec-file:read as supported packet.
4491 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4493 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4495 2015-04-09 Gary Benson <gbenson@redhat.com>
4497 * hostio-errno.c (errno_to_fileio_error): Remove function.
4498 Update caller to use remote_fileio_to_fio_error.
4500 2015-04-09 Yao Qi <yao.qi@linaro.org>
4502 * linux-low.c (linux_insert_point): Call
4503 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4504 (linux_remove_point): Call remove_memory_breakpoint if type is
4506 * linux-x86-low.c (x86_insert_point): Don't call
4507 insert_memory_breakpoint.
4508 (x86_remove_point): Don't call remove_memory_breakpoint.
4510 2015-04-01 Pedro Alves <palves@redhat.com>
4511 Cleber Rosa <crosa@redhat.com>
4513 * server.c (gdbserver_usage): Reorganize and extend the usage
4516 2015-03-24 Pedro Alves <palves@redhat.com>
4518 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4519 output. Also dump TRAP_TRACE.
4520 (linux_low_filter_event): In debug output, distinguish a
4521 resume_stop SIGSTOP from a delayed SIGSTOP.
4523 2015-03-24 Gary Benson <gbenson@redhat.com>
4525 * linux-x86-low.c (x86_linux_new_thread): Moved to
4527 (x86_linux_prepare_to_resume): Likewise.
4529 2015-03-24 Gary Benson <gbenson@redhat.com>
4531 * Makefile.in (x86-linux-dregs.o): New rule.
4532 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4533 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4534 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4535 (x86_linux_dr_get): Likewise.
4536 (x86_linux_dr_set): Likewise.
4537 (update_debug_registers_callback): Likewise.
4538 (x86_linux_dr_set_addr): Likewise.
4539 (x86_linux_dr_get_addr): Likewise.
4540 (x86_linux_dr_set_control): Likewise.
4541 (x86_linux_dr_get_control): Likewise.
4542 (x86_linux_dr_get_status): Likewise.
4543 (x86_linux_update_debug_registers): Likewise.
4545 2015-03-24 Gary Benson <gbenson@redhat.com>
4547 * linux-x86-low.c (x86_linux_update_debug_registers):
4548 New function, factored out from...
4549 (x86_linux_prepare_to_resume): ...this.
4551 2015-03-24 Gary Benson <gbenson@redhat.com>
4553 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4554 (x86_linux_dr_set): Likewise.
4555 (update_debug_registers_callback): Likewise.
4556 (x86_linux_dr_set_addr): Likewise.
4557 (x86_linux_dr_get_addr): Likewise.
4558 (x86_linux_dr_set_control): Likewise.
4559 (x86_linux_dr_get_control): Likewise.
4560 (x86_linux_dr_get_status): Likewise.
4561 (x86_linux_prepare_to_resume): Likewise.
4563 2015-03-24 Gary Benson <gbenson@redhat.com>
4565 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4566 Use perror_with_name. Pass string through gettext.
4567 (x86_linux_dr_set): Likewise.
4569 2015-03-24 Gary Benson <gbenson@redhat.com>
4571 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4572 (x86_linux_dr_set_addr): ...this.
4573 (x86_dr_low_get_addr): Rename to...
4574 (x86_linux_dr_get_addr): ...this.
4575 (x86_dr_low_set_control): Rename to...
4576 (x86_linux_dr_set_control): ...this.
4577 (x86_dr_low_get_control): Rename to...
4578 (x86_linux_dr_get_control): ...this.
4579 (x86_dr_low_get_status): Rename to...
4580 (x86_linux_dr_get_status): ...this.
4581 (x86_dr_low): Update with new function names.
4583 2015-03-24 Gary Benson <gbenson@redhat.com>
4585 * Makefile.in (x86-linux.o): New rule.
4586 * configure.srv: Add x86-linux.o to relevant targets.
4587 * linux-low.c (lwp_set_arch_private_info): New function.
4588 (lwp_arch_private_info): Likewise.
4589 * linux-x86-low.c: Include nat/x86-linux.h.
4590 (arch_lwp_info): Removed structure.
4591 (update_debug_registers_callback):
4592 Use lwp_set_debug_registers_changed.
4593 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4594 and lwp_set_debug_registers_changed.
4595 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4597 2015-03-24 Gary Benson <gbenson@redhat.com>
4599 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4600 * linux-arm-low.c (arm_new_thread): Likewise.
4601 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4602 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4603 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4604 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4606 2015-03-24 Gary Benson <gbenson@redhat.com>
4608 * linux-low.c (ptid_of_lwp): New function.
4609 (lwp_is_stopped): Likewise.
4610 (lwp_stop_reason): Likewise.
4611 * linux-x86-low.c (update_debug_registers_callback):
4613 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4616 2015-03-24 Gary Benson <gbenson@redhat.com>
4618 * linux-low.h (linux_stop_lwp): Remove declaration.
4620 2015-03-24 Gary Benson <gbenson@redhat.com>
4622 * linux-low.h: Include nat/linux-nat.h.
4623 * linux-low.c (iterate_over_lwps_args): New structure.
4624 (iterate_over_lwps_filter): New function.
4625 (iterate_over_lwps): Likewise.
4626 * linux-x86-low.c (update_debug_registers_callback):
4627 Update signature to what iterate_over_lwps expects.
4628 Remove PID check that iterate_over_lwps now performs.
4629 (x86_dr_low_set_addr): Use iterate_over_lwps.
4630 (x86_dr_low_set_control): Likewise.
4632 2015-03-24 Gary Benson <gbenson@redhat.com>
4634 * linux-x86-low.c (x86_debug_reg_state): New function.
4635 (x86_linux_prepare_to_resume): Use the above.
4637 2015-03-24 Gary Benson <gbenson@redhat.com>
4639 * linux-low.c (current_lwp_ptid): New function.
4640 * linux-x86-low.c: Include nat/linux-nat.h.
4641 (x86_dr_low_get_addr): Use current_lwp_ptid.
4642 (x86_dr_low_get_control): Likewise.
4643 (x86_dr_low_get_status): Likewise.
4645 2015-03-20 Pedro Alves <palves@redhat.com>
4647 * tracepoint.c (cmd_qtstatus): Make "str" const.
4649 2015-03-20 Pedro Alves <palves@redhat.com>
4651 * server.c (handle_general_set): Make "req_str" const.
4653 2015-03-19 Pedro Alves <palves@redhat.com>
4655 * linux-low.c (linux_resume_one_lwp): Rename to ...
4656 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4657 instead call perror_with_name.
4658 (check_ptrace_stopped_lwp_gone): New function.
4659 (linux_resume_one_lwp): Reimplement as wrapper around
4660 linux_resume_one_lwp_throw that swallows errors if the LWP is
4663 2015-03-19 Pedro Alves <palves@redhat.com>
4665 * linux-low.c (count_events_callback, select_event_lwp_callback):
4666 No longer check whether the thread has resume_stop as last resume
4669 2015-03-19 Pedro Alves <palves@redhat.com>
4671 * linux-low.c (count_events_callback, select_event_lwp_callback):
4672 Use the lwp's status_pending_p field, not the thread's.
4674 2015-03-19 Pedro Alves <palves@redhat.com>
4676 * linux-low.c (select_event_lwp_callback): Update comments to
4677 no longer mention SIGTRAP.
4679 2015-03-18 Gary Benson <gbenson@redhat.com>
4681 * server.c (handle_query): Do not report vFile:fstat as supported.
4683 2015-03-11 Gary Benson <gbenson@redhat.com>
4685 * hostio.c (sys/types.h): New include.
4686 (sys/stat.h): Likewise.
4687 (common-remote-fileio.h): Likewise.
4688 (handle_fstat): New function.
4689 (handle_vFile): Handle vFile:fstat packets.
4691 2015-03-11 Gary Benson <gbenson@redhat.com>
4693 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4694 struct stat.st_blocks and struct stat.st_blksize.
4695 * configure: Regenerate.
4696 * config.in: Likewise.
4697 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4698 (OBS): Add common-remote-fileio.o.
4699 (common-remote-fileio.o): New rule.
4701 2015-03-09 Pedro Alves <palves@redhat.com>
4703 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4704 'struct sockaddr' pointer in 'accept' call.
4706 2015-03-09 Pedro Alves <palves@redhat.com>
4709 2015-03-07 Pedro Alves <palves@redhat.com>
4710 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4711 or <winsock2.h> here. Instead include "gdb_socket.h".
4712 (remote_open): Use union gdb_sockaddr_u.
4713 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4714 or <winsock2.h> here. Instead include "gdb_socket.h".
4715 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4716 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4718 (init_named_socket, gdb_agent_helper_thread): Use union
4721 2015-03-07 Pedro Alves <palves@redhat.com>
4723 * configure.ac (build_warnings): Move
4724 -Wdeclaration-after-statement to the C-specific set.
4725 * configure: Regenerate.
4727 2015-03-07 Pedro Alves <palves@redhat.com>
4729 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4730 or <winsock2.h> here. Instead include "gdb_socket.h".
4731 (remote_open): Use union gdb_sockaddr_u.
4732 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4733 or <winsock2.h> here. Instead include "gdb_socket.h".
4734 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4735 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4737 (init_named_socket, gdb_agent_helper_thread): Use union
4740 2015-03-07 Pedro Alves <palves@redhat.com>
4742 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4745 2015-03-06 Yao Qi <yao.qi@linaro.org>
4747 * linux-aarch64-low.c (aarch64_insert_point): Use
4748 show_debug_regs as a boolean.
4749 (aarch64_remove_point): Likewise.
4751 2015-03-05 Pedro Alves <palves@redhat.com>
4753 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4754 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4755 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4756 * nto-low.c (nto_target_ops): Likewise.
4757 * spu-low.c (spu_target_ops): Likewise.
4758 * win32-low.c (win32_target_ops): Likewise.
4760 2015-03-04 Pedro Alves <palves@redhat.com>
4762 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4763 Decide whether a breakpoint triggered based on the SIGTRAP's
4765 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4766 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4767 (linux_low_filter_event): Check for breakpoints before checking
4769 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4771 (linux_stopped_by_sw_breakpoint)
4772 (linux_supports_stopped_by_sw_breakpoint)
4773 (linux_stopped_by_hw_breakpoint)
4774 (linux_supports_stopped_by_hw_breakpoint): New functions.
4775 (linux_target_ops): Install new target methods.
4777 2015-03-04 Pedro Alves <palves@redhat.com>
4779 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4780 * server.c (swbreak_feature, hwbreak_feature): New globals.
4781 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4782 (captured_main): Clear swbreak_feature and hwbreak_feature.
4783 * server.h (swbreak_feature, hwbreak_feature): Declare.
4784 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4785 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4786 supports_stopped_by_hw_breakpoint>: New fields.
4787 (target_supports_stopped_by_sw_breakpoint)
4788 (target_stopped_by_sw_breakpoint)
4789 (target_supports_stopped_by_hw_breakpoint)
4790 (target_stopped_by_hw_breakpoint): Declare.
4792 2015-03-04 Pedro Alves <palves@redhat.com>
4794 enum lwp_stop_reason -> enum target_stop_reason
4795 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4796 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4797 (linux_wait_1, stuck_in_jump_pad_callback)
4798 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4799 (linux_stopped_by_watchpoint):
4800 * linux-low.h (enum lwp_stop_reason): Delete.
4801 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4802 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4804 2015-03-04 Yao Qi <yao.qi@linaro.org>
4806 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4808 2015-03-03 Gary Benson <gbenson@redhat.com>
4810 * hostio.c (handle_vFile): Fix prefix lengths.
4812 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4814 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4817 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4819 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4820 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4821 (clean): Add "rm -f" for above C files.
4822 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4823 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4824 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4825 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4826 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4827 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4828 (init_registers_s390x_vx_linux64)
4829 (init_registers_s390x_tevx_linux64)
4830 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4831 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4833 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4834 (s390_store_vxrs_high): New functions.
4835 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4837 (s390_arch_setup): Add logic for selecting one of the new target
4838 descriptions. Activate the new vector regsets if applicable.
4839 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4840 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4841 and init_registers_s390x_tevx_linux64.
4843 2015-03-01 Pedro Alves <palves@redhat.com>
4845 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4848 2015-02-27 Pedro Alves <palves@redhat.com>
4850 * linux-x86-low.c (u_debugreg_offset): New function.
4851 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4853 2015-02-27 Pedro Alves <palves@redhat.com>
4855 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4856 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4857 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4858 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4859 (ps_lsetfpregs, ps_getpid)
4860 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4861 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4862 (ps_lsetxregs, ps_plog): Declare.
4864 2015-02-27 Pedro Alves <palves@redhat.com>
4866 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4867 IP_AGENT_EXPORT_FUNC.
4868 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4869 IP_AGENT_EXPORT_FUNC.
4870 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4871 (IP_AGENT_EXPORT): Delete.
4872 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4873 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4874 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4875 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4876 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4877 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4878 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4879 (traceframe_read_count, traceframe_write_count)
4880 (traceframes_created, trace_state_variables, get_raw_reg)
4881 (get_trace_state_variable_value, set_trace_state_variable_value)
4882 (ust_loaded, helper_thread_id, cmd_buf): Use
4883 IPA_SYM_EXPORTED_NAME.
4884 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4885 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4886 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4887 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4888 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4889 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4890 EXTERN_C_PUSH/EXTERN_C_POP.
4891 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4892 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4893 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4894 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4895 (traceframe_write_count, traceframe_read_count)
4896 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4897 (about_to_request_buffer_space, get_trace_state_variable_value)
4898 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4899 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4900 EXTERN_C_PUSH/EXTERN_C_POP.
4901 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4902 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4903 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4904 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4905 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4906 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4907 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4908 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4910 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4911 (IP_AGENT_EXPORT_VAR_DECL): Define.
4913 (gdb_agent_get_raw_reg): Declare.
4915 2015-02-27 Tom Tromey <tromey@redhat.com>
4916 Pedro Alves <palves@redhat.com>
4918 Rename symbols whose names are reserved C++ keywords throughout.
4920 2015-02-27 Pedro Alves <palves@redhat.com>
4922 * Makefile.in (COMPILER): New, get it from autoconf.
4923 (CXX): Get from autoconf instead.
4924 (COMPILE.pre): Use COMPILER.
4925 (CC-LD): Rename to ...
4926 (CC_LD): ... this. Use COMPILER.
4927 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4928 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4929 * acinclude.m4: Include build-with-cxx.m4.
4930 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4931 Disable -Werror by default if building in C++ mode.
4932 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4933 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4934 the C++ compiler. Save/restore CXXFLAGS too.
4935 * configure: Regenerate.
4937 2015-02-27 Pedro Alves <palves@redhat.com>
4939 * acinclude.m4: Include libiberty.m4.
4940 * configure.ac: Call libiberty_INIT.
4941 * config.in, configure: Regenerate.
4943 2015-02-26 Pedro Alves <palves@redhat.com>
4945 * linux-low.c (linux_wait_1): When incrementing the PC past a
4946 program breakpoint always use the_low_target.breakpoint_len as
4947 increment, rather than the maximum between that and
4948 the_low_target.decr_pc_after_break.
4950 2015-02-23 Pedro Alves <palves@redhat.com>
4952 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4953 thread was doing a step-over; always adjust the PC if
4954 we stepped over a permanent breakpoint.
4955 (linux_wait_1): If we stepped over breakpoint that was on top of a
4956 permanent breakpoint, manually advance the PC past it.
4958 2015-02-23 Pedro Alves <palves@redhat.com>
4960 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4962 (x86_fill_gregset, x86_store_gregset): Use it when handling
4965 2015-02-20 Pedro Alves <palves@redhat.com>
4967 * thread-db.c: Include "nat/linux-procfs.h".
4968 (thread_db_init): Skip listing new threads if the kernel supports
4969 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4971 2015-02-20 Pedro Alves <palves@redhat.com>
4973 * linux-low.c (status_pending_p_callback): Use ptid_match.
4975 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4977 PR breakpoints/16812
4978 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4979 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4980 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4982 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4984 PR breakpoints/15956
4985 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4987 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4989 * linux-low.c (linux_low_btrace_conf): Print size.
4990 * server.c (handle_btrace_conf_general_set): New.
4991 (hanle_general_set): Call handle_btrace_conf_general_set.
4992 (handle_query): Report Qbtrace-conf:bts:size as supported.
4994 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4996 * linux-low.c (linux_low_enable_btrace): Update parameters.
4997 (linux_low_btrace_conf): New.
4998 (linux_target_ops)<to_btrace_conf>: Initialize.
4999 * server.c (current_btrace_conf): New.
5000 (handle_btrace_enable): Rename to ...
5001 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5002 to target_enable_btrace. Update comment. Update users.
5003 (handle_qxfer_btrace_conf): New.
5004 (qxfer_packets): Add btrace-conf entry.
5005 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5006 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5007 (target_ops)<read_btrace_conf>: New.
5008 (target_enable_btrace): Update parameters.
5009 (target_read_btrace_conf): New.
5011 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5013 * server.c (handle_btrace_general_set): Remove call to
5014 target_supports_btrace.
5015 (supported_btrace_packets): New.
5016 (handle_query): Call supported_btrace_packets.
5017 * target.h: include btrace-common.h.
5018 (btrace_target_info): Removed.
5019 (supports_btrace, target_supports_btrace): Update parameters.
5021 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5023 * Makefile.in (SFILES): Add common/btrace-common.c.
5024 (OBS): Add common/btrace-common.o.
5025 (btrace-common.o): Add build rules.
5026 * linux-low: Include btrace-common.h.
5027 (linux_low_read_btrace): Use struct btrace_data. Call
5028 btrace_data_init and btrace_data_fini.
5030 2015-02-06 Pedro Alves <palves@redhat.com>
5032 * thread-db.c (find_new_threads_callback): Add debug output.
5034 2015-02-04 Pedro Alves <palves@redhat.com>
5036 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5037 (resume_stopped_resumed_lwps): New function.
5038 (linux_wait_for_event_filtered): Use it.
5040 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5042 * Makefile.in (SFILES): Add linux-personality.c.
5043 (linux-personality.o): New rule.
5044 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5045 list of objects to be built.
5046 * linux-low.c: Include nat/linux-personality.h.
5047 (linux_create_inferior): Remove code to disable address space
5048 randomization (moved to ../nat/linux-personality.c). Create
5049 cleanup to disable address space randomization.
5051 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5053 * Makefile.in (posix-strerror.o): New rule.
5054 (mingw-strerror.o): Likewise.
5055 * configure: Regenerated.
5056 * configure.ac: Source file ../common/common.host. Initialize new
5057 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5059 2015-01-14 Yao Qi <yao@codesourcery.com>
5061 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5062 (ppc-linux.o): New rule.
5063 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5064 * configure.ac: AC_CHECK_FUNCS(getauxval).
5065 * config.in: Re-generated.
5066 * configure: Re-generated.
5067 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5068 ppc64_64bit_inferior_p
5070 2015-01-14 Yao Qi <yao@codesourcery.com>
5072 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5073 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5074 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5075 (PT_ORIG_R3, PT_TRAP): Likewise.
5076 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5077 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5078 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5080 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5082 * i387-fp.c (i387_cache_to_xsave): In look over
5083 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5084 zmmh_low_space field by use of zmmh_high_space.
5086 2015-01-09 Pedro Alves <palves@redhat.com>
5088 * linux-low.c (step_over_bkpt): Move higher up in the file.
5089 (handle_extended_wait): Don't store the stop_pc here.
5090 (get_stop_pc): Adjust comments and rename to ...
5091 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5092 stopped for a software breakpoint or hardware breakpoint.
5093 (thread_still_has_status_pending_p): New function.
5094 (status_pending_p_callback): Use
5095 thread_still_has_status_pending_p. If the event is no longer
5096 interesting, resume the LWP.
5097 (handle_tracepoints): Add assert.
5098 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5099 (wstatus_maybe_breakpoint): New function.
5100 (cancel_breakpoint): Delete function.
5101 (check_stopped_by_watchpoint): New function, factored out from
5102 linux_low_filter_event.
5103 (lp_status_maybe_breakpoint): Delete function.
5104 (linux_low_filter_event): Remove filter_ptid argument.
5105 Leave thread group exits pending here. Store the LWP's stop PC.
5106 Always leave events pending.
5107 (linux_wait_for_event_filtered): Pull all events out of the
5108 kernel, and leave them all pending.
5109 (count_events_callback, select_event_lwp_callback): Consider all
5111 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5112 (select_event_lwp): Only give preference to the stepping LWP in
5113 all-stop mode. Adjust comments.
5114 (ignore_event): New function.
5115 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5116 references to cancel_breakpoints. Adjust to renames. Also give
5117 equal priority to all LWPs that have had events in non-stop mode.
5118 If reporting a software breakpoint event, unadjust the LWP's PC.
5119 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5120 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5122 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5123 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5124 (linux_stopped_by_watchpoint): Adjust.
5125 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5126 * linux-low.h (enum lwp_stop_reason): New.
5127 (struct lwp_info) <stop_pc>: Adjust comment.
5128 <stopped_by_watchpoint>: Delete field.
5129 <stop_reason>: New field.
5130 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5131 * mem-break.c (software_breakpoint_inserted_here)
5132 (hardware_breakpoint_inserted_here): New function.
5133 * mem-break.h (software_breakpoint_inserted_here)
5134 (hardware_breakpoint_inserted_here): Declare.
5135 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5136 (cancel_breakpoints): Delete.
5137 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5138 (upload_fast_traceframes): Remove references to
5141 2015-01-09 Pedro Alves <palves@redhat.com>
5143 * thread-db.c (find_new_threads_callback): Ignore thread if the
5144 kernel thread ID is -1.
5146 2015-01-09 Pedro Alves <palves@redhat.com>
5148 * linux-low.c (linux_attach_fail_reason_string): Move to
5149 nat/linux-ptrace.c, and rename.
5150 (linux_attach_lwp): Update comment.
5151 (attach_proc_task_lwp_callback): New function.
5152 (linux_attach): Adjust to rename and use
5153 linux_proc_attach_tgid_threads.
5154 (linux_attach_fail_reason_string): Delete declaration.
5156 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5158 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5159 * server.c (gdbserver_version): Likewise.
5161 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5163 * remote-utils.c: Include ctype.h.
5164 (input_interrupt): Explicitly handle the case when the char
5165 received is the NUL byte. Improve the printing of non-ASCII
5168 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5170 * linux-low.c (linux_low_filter_event): Update call to
5171 linux_enable_event_reporting following the addition of
5172 a new parameter to that function.
5174 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5177 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5178 (AARCH64_FPCR_REGNO): Likewise.
5179 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5180 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5181 (aarch64_store_fpregset): Likewise.
5183 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5185 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5186 Remove FIXME comment about assumption about N.
5188 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5190 * configure.ac: If large-file support is disabled in GDBserver,
5191 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5192 * configure: Regenerate.
5194 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5196 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5197 warning upon ENODATA from ptrace.
5198 * linux-s390-low.c (s390_store_tdb): New.
5199 (s390_regsets): Add regset for NT_S390_TDB.
5201 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5203 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5204 without a fill_function.
5205 * linux-s390-low.c (s390_fill_last_break): Remove.
5206 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5207 (s390_arch_setup): Use regset's size instead of fill_function for
5210 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5212 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5213 the regset's store function when ptrace returned an error.
5214 * regcache.c (get_thread_regcache): Invalidate register cache
5215 before fetching inferior's registers.
5217 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5219 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5220 while-loop as for-loop.
5221 (regsets_store_inferior_registers): Likewise.
5223 2014-11-28 Yao Qi <yao@codesourcery.com>
5225 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5226 * config.in, configure: Re-generate.
5227 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5230 2014-11-21 Yao Qi <yao@codesourcery.com>
5232 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5233 (AC_CHECK_HEADERS): Remove malloc.h.
5234 * configure: Re-generated.
5235 * config.in: Re-generated.
5236 * server.h: Don't include alloca.h and malloc.h.
5237 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5238 Don't include malloc.h.
5240 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5242 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5243 corresponding ERRNO check in same block.
5245 2014-11-12 Pedro Alves <palves@redhat.com>
5247 * server.c (cont_thread): Update comment.
5248 (start_inferior, attach_inferior): No longer clear cont_thread.
5249 (handle_v_cont): No longer set cont_thread.
5250 (captured_main): Clear cont_thread each time a GDB connects.
5252 2014-11-12 Pedro Alves <palves@redhat.com>
5254 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5255 thread, and don't resume all threads if the Hc thread has exited.
5257 2014-11-12 Pedro Alves <palves@redhat.com>
5259 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5260 the process group instead of to a specific LWP.
5262 2014-10-15 Pedro Alves <palves@redhat.com>
5265 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5267 (arm_set_thread_context): Delete.
5268 (the_low_target): Adjust.
5269 * win32-i386-low.c (debug_registers_changed)
5270 (debug_registers_used): Delete.
5271 (update_debug_registers_callback): New function.
5272 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5273 needing to update their debug registers.
5274 (win32_get_current_dr): New function.
5275 (x86_dr_low_get_addr, x86_dr_low_get_control)
5276 (x86_dr_low_get_status): Fetch the debug register from the thread
5278 (i386_initial_stuff): Adjust.
5279 (i386_get_thread_context): Remove current_event parameter. Don't
5280 clear debug_registers_changed nor copy DR values to
5282 (i386_set_thread_context): Delete.
5283 (i386_prepare_to_resume): New function.
5284 (i386_thread_added): Mark the thread as needing to update irs
5286 (the_low_target): Remove i386_set_thread_context and install
5287 i386_prepare_to_resume.
5288 * win32-low.c (win32_get_thread_context): Adjust.
5289 (win32_set_thread_context): Use SetThreadContext
5291 (win32_prepare_to_resume): New function.
5292 (win32_require_context): New function, factored out from ...
5293 (thread_rec): ... this.
5294 (continue_one_thread): Call win32_prepare_to_resume on each thread
5295 we're about to continue.
5296 (win32_resume): Call win32_prepare_to_resume on the event thread.
5297 * win32-low.h (struct win32_thread_info)
5298 <debug_registers_changed>: New field.
5299 (struct win32_target_ops): Change prototype of set_thread_context,
5300 delete set_thread_context and add prepare_to_resume.
5301 (win32_require_context): New declaration.
5303 2014-10-08 Gary Benson <gbenson@redhat.com>
5305 * server.h: Do not include common-exceptions.h.
5307 2014-10-08 Gary Benson <gbenson@redhat.com>
5309 * server.h: Do not include cleanups.h.
5311 2014-09-30 James Hogan <james.hogan@imgtec.com>
5313 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5316 2014-09-23 Yao Qi <yao@codesourcery.com>
5318 * linux-low.c (lp_status_maybe_breakpoint): New function.
5319 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5320 (count_events_callback): Likewise.
5321 (select_event_lwp_callback): Likewise.
5322 (cancel_breakpoints_callback): Likewise.
5324 2014-09-19 Don Breazeal <donb@codesourcery.com>
5326 * linux-low.c (handle_extended_wait): Call
5327 linux_ptrace_get_extended_event.
5328 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5329 linux_is_extended_waitstatus.
5331 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5333 * Makefile.in (CPPFLAGS): Define.
5334 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5335 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5337 2014-09-16 Gary Benson <gbenson@redhat.com>
5339 * inferiors.h (current_inferior): Renamed as...
5340 (current_thread): New variable. All uses updated.
5341 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5342 (maybe_move_out_of_jump_pad): Likewise.
5343 (cancel_breakpoint): Likewise.
5344 (linux_low_filter_event): Likewise.
5345 (wait_for_sigstop): Likewise.
5346 (linux_resume_one_lwp): Likewise.
5347 (need_step_over_p): Likewise.
5348 (start_step_over): Likewise.
5349 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5350 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5351 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5352 and save_inferior as saved_thread.
5353 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5355 (regcache_invalidate_thread): Likewise.
5356 * remote-utils.c (prepare_resume_reply): Likewise.
5357 * thread-db.c (thread_db_get_tls_address): Likewise.
5358 (disable_thread_event_reporting): Likewise.
5359 (remove_thread_event_breakpoints): Likewise.
5360 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5362 * target.h (set_desired_inferior): Renamed as...
5363 (set_desired_thread): New declaration. All uses updated.
5364 * server.c (myresume): Updated comment to reference thread instead
5366 (handle_serial_event): Likewise.
5367 (handle_target_event): Likewise.
5369 2014-09-12 Tom Tromey <tromey@redhat.com>
5370 Gary Benson <gbenson@redhat.com>
5372 * regcache.h: Include common-regcache.h.
5373 (regcache_read_pc): Don't declare.
5374 * regcache.c (get_thread_regcache_for_ptid): New function.
5376 2014-09-11 Tom Tromey <tromey@redhat.com>
5377 Gary Benson <gbenson@redhat.com>
5379 * symbol.c: New file.
5380 * Makefile.in (SFILES): Add symbol.c.
5381 (OBS): Add symbol.o.
5383 2014-09-11 Gary Benson <gbenson@redhat.com>
5385 * target.c (target_stop_ptid, target_continue_ptid): New
5388 2014-09-11 Tom Tromey <tromey@redhat.com>
5389 Gary Benson <gbenson@redhat.com>
5391 * target.h: Include target/target.h.
5392 * target.c (target_read_memory, target_read_uint32)
5393 (target_write_memory): New functions.
5395 2014-09-11 Gary Benson <gbenson@redhat.com>
5397 * server.h (debug_hw_points): Don't declare.
5398 * server.c (debug_hw_points): Don't define. Replace all uses
5399 with show_debug_regs.
5400 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5401 all uses with show_debug_regs.
5403 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5405 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5406 endianness into account.
5407 (ppc_supply_ptrace_register): Likewise.
5409 2014-09-03 James Hogan <james.hogan@imgtec.com>
5411 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5412 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5414 2014-09-03 Gary Benson <gbenson@redhat.com>
5416 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5417 ALL_DEBUG_ADDRESS_REGISTERS.
5419 2014-09-02 Gary Benson <gbenson@redhat.com>
5421 * i386-low.h: Renamed as...
5422 * x86-low.h: New file. All type, function and variable name
5423 prefixes changed from "i386_" to "x86_". All references updated.
5424 * i386-low.c: Renamed as...
5425 * x86-low.c: New file. All type, function and variable name
5426 prefixes changed from "i386_" to "x86_". All references updated.
5428 2014-09-02 Gary Benson <gbenson@redhat.com>
5430 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5431 (x86_linux_new_thread): Likewise.
5433 2014-08-29 Gary Benson <gbenson@redhat.com>
5435 * server.h (setjmp.h): Do not include.
5436 (toplevel): Do not declare.
5437 (common-exceptions.h): Include.
5438 (cleanups.h): Likewise.
5439 * server.c (toplevel): Do not define.
5440 (exit_code): New static global.
5441 (detach_or_kill_for_exit_cleanup): New function.
5442 (main): New function. Original main renamed to...
5443 (captured_main): New function.
5444 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5446 2014-08-29 Gary Benson <gbenson@redhat.com>
5448 * Makefile.in (SFILES): Add common/common-exceptions.c.
5449 (OBS): Add common-exceptions.o.
5450 (common-exceptions.o): New rule.
5451 * utils.c (prepare_to_throw_exception): New function.
5453 2014-08-29 Gary Benson <gbenson@redhat.com>
5455 * config.in: Regenerate.
5456 * configure: Likewise.
5458 2014-08-29 Gary Benson <gbenson@redhat.com>
5460 * Makefile.in (SFILES): Add common/cleanups.c.
5462 (cleanups.o): New rule.
5464 2014-08-29 Gary Benson <gbenson@redhat.com>
5466 * utils.c (internal_vwarning): New function.
5468 2014-08-28 Gary Benson <gbenson@redhat.com>
5470 * utils.h (fatal): Remove declaration.
5471 * utils.c (fatal): Remove function.
5473 2014-08-28 Gary Benson <gbenson@redhat.com>
5475 * tracepoint.c (gdb_agent_init): Replace fatal with
5477 (initialize_tracepoint): Likewise.
5479 2014-08-28 Gary Benson <gbenson@redhat.com>
5481 * remote-utils.c (remote_prepare): Replace fatal with error.
5483 2014-08-28 Gary Benson <gbenson@redhat.com>
5485 * linux-low.c (linux_async): Replace fatal with warning.
5487 (linux_start_non_stop): Return -1 if linux_async failed.
5489 2014-08-28 Gary Benson <gbenson@redhat.com>
5491 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5493 (i386_dr_low_get_addr): Remove vague comment.
5494 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5497 2014-08-28 Gary Benson <gbenson@redhat.com>
5499 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5500 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5502 (linux_resume_one_lwp): Likewise.
5503 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5505 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5506 with internal_error.
5507 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5508 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5509 (find_register_by_name): Replace fatal with internal_error.
5510 (find_regno): Likewise.
5511 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5512 * thread-db.c (thread_db_create_event): Likewise.
5513 (thread_db_load_search): Likewise.
5514 (try_thread_db_load_1): Likewise.
5515 * tracepoint.c (get_jump_space_head): Replace fatal with
5517 (claim_trampoline_space): Likewise.
5518 (have_fast_tracepoint_trampoline_buffer): Likewise.
5519 (cmd_qtstart): Likewise.
5520 (stop_tracing): Likewise.
5521 (fast_tracepoint_collecting): Likewise.
5522 (target_malloc): Likewise.
5523 (download_tracepoint): Likewise.
5524 (download_trace_state_variables): Replace check with gdb_assert.
5525 (upload_fast_traceframes): Replace fatal with internal_error.
5527 2014-08-19 Tom Tromey <tromey@redhat.com>
5528 Gary Benson <gbenson@redhat.com>
5530 * Makefile.in (SFILES): Add common/common-debug.c.
5531 (OBS): Add common-debug.o.
5532 (common-debug.o): New rule.
5533 * debug.h (debug_printf): Don't declare.
5534 * debug.c (debug_printf): Renamed and rewritten as...
5535 (debug_vprintf): New function.
5537 2014-08-19 Gary Benson <gbenson@redhat.com>
5539 * utils.h: Do not include print-utils.h.
5541 2014-08-19 Tom Tromey <tromey@redhat.com>
5542 Gary Benson <gbenson@redhat.com>
5544 * server.h: Add static assertion.
5545 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5547 2014-08-19 Tom Tromey <tromey@redhat.com>
5548 Gary Benson <gbenson@redhat.com>
5550 * Makefile.in (SFILES): Add common/errors.c.
5551 (OBS): Add errors.o.
5552 (IPA_OBS): Add errors-ipa.o.
5553 (errors.o): New rule.
5554 (errors-ipa.o): Likewise.
5555 * utils.h (perror_with_name, error, warning): Don't declare.
5556 * utils.c (warning): Renamed and rewritten as...
5557 (vwarning): New function.
5558 (error): Renamed and rewritten as...
5559 (verror): New function.
5560 (internal_error): Renamed and rewritten as...
5561 (internal_verror): New function.
5563 2014-08-07 Gary Benson <gbenson@redhat.com>
5565 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5566 * configure: Regenerate.
5567 * config.in: Likewise.
5568 * server.h: Do not include errno.h.
5569 * event-loop.c: Likewise.
5570 * hostio-errno.c: Likewise.
5571 * linux-low.c: Likewise.
5572 * remote-utils.c: Likewise.
5573 * spu-low.c: Likewise.
5574 * utils.c: Likewise.
5575 * gdbreplay.c: Unconditionally include errno.h.
5577 2014-08-07 Gary Benson <gbenson@redhat.com>
5579 * server.h: Do not include string.h.
5580 * event-loop.c: Likewise.
5581 * linux-low.c: Likewise.
5582 * regcache.c: Likewise.
5583 * remote-utils.c: Likewise.
5584 * spu-low.c: Likewise.
5585 * utils.c: Likewise.
5587 2014-08-07 Gary Benson <gbenson@redhat.com>
5589 * server.h: Do not include gdb_assert.h.
5591 2014-08-07 Gary Benson <gbenson@redhat.com>
5593 * server.h: Do not include common-utils.h.
5595 2014-08-07 Gary Benson <gbenson@redhat.com>
5597 * server.h: Do not include ptid.h.
5598 * notif.h: Likewise.
5600 2014-08-07 Gary Benson <gbenson@redhat.com>
5602 * server.h: Do not include gdb_locale.h.
5604 2014-08-07 Gary Benson <gbenson@redhat.com>
5606 * server.h: Do not include gdb/signals.h.
5607 * win32-low.c: Likewise.
5609 2014-08-07 Gary Benson <gbenson@redhat.com>
5611 * server.h: Do not include pathmax.h.
5613 2014-08-07 Gary Benson <gbenson@redhat.com>
5615 * server.h: Do not include libiberty.h.
5616 * linux-bfin-low.c: Likewise.
5618 2014-08-07 Gary Benson <gbenson@redhat.com>
5620 * server.h: Do not include ansidecl.h.
5622 2014-08-07 Gary Benson <gbenson@redhat.com>
5624 * linux-x86-low.c: Do not include stddef.h.
5625 * lynx-ppc-low.c: Likewise.
5626 * tracepoint.c: Likewise.
5628 2014-08-07 Gary Benson <gbenson@redhat.com>
5630 * server.h: Do not include stdarg.h.
5631 * nto-low.c: Likewise.
5633 2014-08-07 Gary Benson <gbenson@redhat.com>
5635 * server.h: Do not include stdlib.h.
5636 * inferiors.c: Likewise.
5637 * linux-low.c: Likewise.
5638 * regcache.c: Likewise.
5639 * spu-low.c: Likewise.
5640 * tracepoint.c: Likewise.
5641 * utils.c: Likewise.
5643 2014-08-07 Gary Benson <gbenson@redhat.com>
5645 * server.h: Do not include stdio.h.
5646 * linux-low.c: Likewise.
5647 * remote-utils.c: Likewise.
5648 * spu-low.c: Likewise.
5649 * utils.c: Likewise.
5650 * wincecompat.c: Likewise.
5652 2014-08-06 Gary Benson <gbenson@redhat.com>
5654 * regcache.c (init_register_cache): Move conditionals inside if.
5656 2014-08-06 Gary Benson <gbenson@redhat.com>
5658 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5660 2014-07-31 Gary Benson <gbenson@redhat.com>
5662 * ax.h: Do not include server.h.
5663 * gdbthread.h: Likewise.
5664 * lynx-low.h: Likewise.
5665 * notif.h: Likewise.
5667 2014-07-30 Gary Benson <gbenson@redhat.com>
5669 * server.h: Include common-defs.h.
5670 Do not include config.h or build-gnulib-gdbserver/config.h.
5672 2014-07-30 Gary Benson <gbenson@redhat.com>
5674 * hostio-errno.c: Move server.h to top of includes list.
5675 * inferiors.c: Likewise.
5676 * linux-x86-low.c: Likewise.
5677 * notif.c: Include server.h.
5679 2014-07-24 Tom Tromey <tromey@redhat.com>
5680 Gary Benson <gbenson@redhat.com>
5682 * server.h (CORE_ADDR): Now unsigned.
5684 2014-07-16 Pedro Alves <palves@redhat.com>
5686 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5688 2014-07-15 Pedro Alves <palves@redhat.com>
5690 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5693 2014-07-11 Pedro Alves <palves@redhat.com>
5695 * linux-low.c (kill_wait_lwp): New function, based on
5696 kill_one_lwp_callback, but use my_waitpid directly.
5697 (kill_one_lwp_callback, linux_kill): Use it.
5699 2014-06-23 Pedro Alves <palves@redhat.com>
5701 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5702 before setting DR0..DR3.
5704 2014-06-20 Gary Benson <gbenson@redhat.com>
5706 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5707 * configure: Regenerated.
5708 * config.in: Likewise.
5710 2014-06-20 Gary Benson <gbenson@redhat.com>
5712 * Makefile.in (SFILES): Update locations for files moved
5714 (object file files): Reordered.
5716 2014-06-20 Gary Benson <gbenson@redhat.com>
5718 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5719 (i386_dr_low_set_addr): Likewise.
5720 (i386_dr_low_get_addr): Likewise.
5721 (i386_dr_low_can_set_control): Likewise.
5722 (i386_dr_low_set_control): Likewise.
5723 (i386_dr_low_get_control): Likewise.
5724 (i386_dr_low_get_status): Likewise.
5725 (i386_get_debug_register_length): Likewise.
5726 * linux-x86-low.c (i386_dr_low_set_addr):
5727 Changed signature. Made static.
5728 (i386_dr_low_get_addr): Likewise.
5729 (i386_dr_low_set_control): Likewise.
5730 (i386_dr_low_get_control): Likewise.
5731 (i386_dr_low_get_status): Likewise.
5732 (i386_dr_low): New global variable.
5733 * win32-i386-low.c (i386_dr_low_set_addr):
5734 Changed signature. Made static.
5735 (i386_dr_low_get_addr): Likewise.
5736 (i386_dr_low_set_control): Likewise.
5737 (i386_dr_low_get_control): Likewise.
5738 (i386_dr_low_get_status): Likewise.
5739 (i386_dr_low): New global variable.
5741 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5743 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5744 * Makefile.in (AR, AR_FLAGS): Define.
5745 * configure: Regenerate.
5747 2014-06-19 Gary Benson <gbenson@redhat.com>
5749 * Makefile.in (i386-dregs.o): New rule.
5750 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5751 * i386-low.c (target.h): Remove include.
5752 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5753 (DR_CONTROL_SHIFT): Likewise.
5754 (DR_CONTROL_SIZE): Likewise.
5755 (DR_RW_EXECUTE): Likewise.
5756 (DR_RW_WRITE): Likewise.
5757 (DR_RW_READ): Likewise.
5758 (DR_RW_IORW): Likewise.
5759 (DR_LEN_1): Likewise.
5760 (DR_LEN_2): Likewise.
5761 (DR_LEN_4): Likewise.
5762 (DR_LEN_8): Likewise.
5763 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5764 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5765 (DR_ENABLE_SIZE): Likewise.
5766 (DR_LOCAL_SLOWDOWN): Likewise.
5767 (DR_GLOBAL_SLOWDOWN): Likewise.
5768 (DR_CONTROL_RESERVED): Likewise.
5769 (I386_DR_CONTROL_MASK): Likewise.
5770 (I386_DR_VACANT): Likewise.
5771 (I386_DR_LOCAL_ENABLE): Likewise.
5772 (I386_DR_GLOBAL_ENABLE): Likewise.
5773 (I386_DR_DISABLE): Likewise.
5774 (I386_DR_SET_RW_LEN): Likewise.
5775 (I386_DR_GET_RW_LEN): Likewise.
5776 (I386_DR_WATCH_HIT): Likewise.
5777 (i386_wp_op_t): Likewise.
5778 (i386_show_dr): Likewise.
5779 (i386_length_and_rw_bits): Likewise.
5780 (i386_insert_aligned_watchpoint): Likewise.
5781 (i386_remove_aligned_watchpoint): Likewise.
5782 (i386_handle_nonaligned_watchpoint): Likewise.
5783 i386_update_inferior_debug_regs(): Likewise.
5784 (i386_dr_insert_watchpoint): Likewise.
5785 (i386_dr_remove_watchpoint): Likewise.
5786 (i386_dr_region_ok_for_watchpoint): Likewise.
5787 (i386_dr_stopped_data_address): Likewise.
5788 (i386_dr_stopped_by_watchpoint): Likewise.
5790 2014-06-19 Gary Benson <gbenson@redhat.com>
5792 * i386-low.c (i386_dr_show): Renamed to
5793 i386_show_dr and made static. All uses updated.
5794 (i386_dr_length_and_rw_bits): Renamed to
5795 i386_length_and_rw_bits and made static.
5797 (i386_dr_insert_aligned_watchpoint): Renamed to
5798 i386_insert_aligned_watchpoint and made static.
5800 (i386_dr_remove_aligned_watchpoint): Renamed to
5801 i386_remove_aligned_watchpoint and made static.
5803 (i386_dr_update_inferior_debug_regs): Renamed to
5804 i386_update_inferior_debug_regs and made static.
5807 2014-06-18 Gary Benson <gbenson@redhat.com>
5809 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5810 (i386_dr_low_can_set_control): Likewise.
5811 (i386_get_debug_register_length): Likewise.
5812 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5813 (i386_dr_low_can_set_control): Likewise.
5814 (i386_get_debug_register_length): Likewise.
5816 2014-06-17 Gary Benson <gbenson@redhat.com>
5818 * i386-low.h (i386-dregs.h): New include.
5819 (DR_FIRSTADDR): Now in i386-dregs.h.
5820 (DR_LASTADDR): Likewise.
5821 (DR_NADDR): Likewise.
5822 (DR_STATUS): Likewise.
5823 (DR_CONTROL): Likewise.
5824 (i386_debug_reg_state): Likewise.
5825 (i386_dr_insert_watchpoint): Likewise.
5826 (i386_dr_remove_watchpoint): Likewise.
5827 (i386_dr_region_ok_for_watchpoint): Likewise.
5828 (i386_dr_stopped_data_address): Likewise.
5829 (i386_dr_stopped_by_watchpoint): Likewise.
5830 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5832 2014-06-18 Gary Benson <gbenson@redhat.com>
5834 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5835 i386_dr_insert_watchpoint.
5836 (i386_low_remove_watchpoint): Renamed to
5837 i386_dr_remove_watchpoint.
5838 (i386_low_region_ok_for_watchpoint): Renamed to
5839 i386_dr_region_ok_for_watchpoint.
5840 (i386_low_stopped_data_address): Renamed to
5841 i386_dr_stopped_data_address.
5842 (i386_low_stopped_by_watchpoint): Renamed to
5843 i386_dr_stopped_by_watchpoint.
5844 * i386-low.c (i386_show_dr): Renamed to
5845 i386_dr_show and made nonstatic. All uses updated.
5846 (i386_length_and_rw_bits): Renamed to
5847 i386_dr_length_and_rw_bits and made nonstatic.
5849 (i386_insert_aligned_watchpoint): Renamed to
5850 i386_dr_insert_aligned_watchpoint and made nonstatic.
5852 (i386_remove_aligned_watchpoint): Renamed to
5853 i386_dr_remove_aligned_watchpoint and made nonstatic.
5855 (i386_update_inferior_debug_regs): Renamed to
5856 i386_dr_update_inferior_debug_regs and made nonstatic.
5858 (i386_low_insert_watchpoint): Renamed to
5859 i386_dr_insert_watchpoint. All uses updated.
5860 (i386_low_remove_watchpoint): Renamed to
5861 i386_dr_remove_watchpoint. All uses updated.
5862 (i386_low_region_ok_for_watchpoint): Renamed to
5863 i386_dr_region_ok_for_watchpoint. All uses updated.
5864 (i386_low_stopped_data_address): Renamed to
5865 i386_dr_stopped_data_address. All uses updated.
5866 (i386_low_stopped_by_watchpoint): Renamed to
5867 i386_dr_stopped_by_watchpoint. All uses updated.
5869 2014-06-18 Gary Benson <gbenson@redhat.com>
5871 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5872 (i386_dr_low_can_set_control): Likewise.
5873 (i386_insert_aligned_watchpoint): New check.
5875 2014-06-18 Gary Benson <gbenson@redhat.com>
5877 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5880 2014-06-18 Gary Benson <gbenson@redhat.com>
5882 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5883 instead of fatal and error.
5884 (i386_handle_nonaligned_watchpoint): Likewise.
5886 2014-06-18 Gary Benson <gbenson@redhat.com>
5888 * i386-low.c (i386_get_debug_register_length): New macro.
5889 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5890 (i386_show_dr): Use debug_printf instead of fprintf. Use
5891 phex to format values.
5893 2014-06-18 Gary Benson <gbenson@redhat.com>
5895 * i386-low.h: Comment changes.
5896 * i386-low.c: Likewise.
5898 2014-06-18 Gary Benson <gbenson@redhat.com>
5900 * i386-low.c: Whitespace changes.
5902 2014-06-12 Tom Tromey <tromey@redhat.com>
5904 * utils.c (freeargv): Remove.
5906 2014-06-12 Tom Tromey <tromey@redhat.com>
5908 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5909 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5910 (parse_debug_format_options): Likewise.
5911 (gdbserver_usage): Likewise.
5912 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5913 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5914 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5916 ($(LIBGNU)): Depend on libiberty.
5917 (all-lib): Recurse into all subdirs.
5918 (install-only): Invoke "install" target in subdirs.
5919 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5921 * configure: Rebuild.
5922 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5923 for vasprintf, vsnprintf, or gettimeofday.
5924 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5927 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5929 * development.sh: Delete.
5930 * Makefile.in (config.status): Adjust dependency on development.sh.
5931 * configure.ac: Adjust development.sh source call.
5932 * configure: Regenerate.
5934 2014-06-02 Pedro Alves <palves@redhat.com>
5936 * ax.c (gdb_free_agent_expr): New function.
5937 * ax.h (gdb_free_agent_expr): New declaration.
5938 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5940 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5942 (clear_breakpoint_conditions_and_commands): New function.
5943 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5944 (clear_breakpoint_conditions_and_commands): New declaration.
5946 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5948 * linux-aarch64-low.c (asm/ptrace.h): Include.
5950 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5952 Fix TLS access for -static -pthread.
5953 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5954 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5955 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5957 2014-05-20 Pedro Alves <palves@redhat.com>
5959 * linux-aarch64-low.c (aarch64_insert_point)
5960 (aarch64_remove_point): No longer check whether the type is
5961 supported here. Adjust to new interface.
5962 (the_low_target): Install aarch64_supports_z_point_type as
5963 supports_z_point_type method.
5964 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5965 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5966 instead of a Z packet char. Adjust.
5967 (arm_supports_z_point_type): New function.
5968 (arm_insert_point, arm_remove_point): Adjust to new interface.
5969 (the_low_target): Install arm_supports_z_point_type.
5970 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5971 (cris_insert_point, cris_remove_point): Adjust to new interface.
5972 Don't check whether the type is supported here.
5973 (the_low_target): Install cris_supports_z_point_type.
5974 * linux-low.c (linux_supports_z_point_type): New function.
5975 (linux_insert_point, linux_remove_point): Adjust to new interface.
5976 * linux-low.h (struct linux_target_ops) <insert_point,
5977 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5978 raw_breakpoint pointer parameter.
5979 <supports_z_point_type>: New method.
5980 * linux-mips-low.c (mips_supports_z_point_type): New function.
5981 (mips_insert_point, mips_remove_point): Adjust to new interface.
5982 Use mips_supports_z_point_type.
5983 (the_low_target): Install mips_supports_z_point_type.
5984 * linux-ppc-low.c (the_low_target): Install NULL as
5985 supports_z_point_type method.
5986 * linux-s390-low.c (the_low_target): Install NULL as
5987 supports_z_point_type method.
5988 * linux-sparc-low.c (the_low_target): Install NULL as
5989 supports_z_point_type method.
5990 * linux-x86-low.c (x86_supports_z_point_type): New function.
5991 (x86_insert_point): Adjust to new insert_point interface. Use
5992 insert_memory_breakpoint. Adjust to new
5993 i386_low_insert_watchpoint interface.
5994 (x86_remove_point): Adjust to remove_point interface. Use
5995 remove_memory_breakpoint. Adjust to new
5996 i386_low_remove_watchpoint interface.
5997 (the_low_target): Install x86_supports_z_point_type.
5998 * lynx-low.c (lynx_target_ops): Install NULL as
5999 supports_z_point_type callback.
6000 * nto-low.c (nto_supports_z_point_type): New.
6001 (nto_insert_point, nto_remove_point): Adjust to new interface.
6002 (nto_target_ops): Install nto_supports_z_point_type.
6003 * mem-break.c: Adjust intro comment.
6004 (struct raw_breakpoint) <raw_type, size>: New fields.
6005 <inserted>: Update comment.
6006 <shlib_disabled>: Delete field.
6007 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6008 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6009 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6010 (raw_bkpt_type_to_target_hw_bp_type): New function.
6011 (find_enabled_raw_code_breakpoint_at): New function.
6012 (find_raw_breakpoint_at): New type and size parameters. Use them.
6013 (insert_memory_breakpoint): New function, based off
6014 set_raw_breakpoint_at.
6015 (remove_memory_breakpoint): New function.
6016 (set_raw_breakpoint_at): Reimplement.
6017 (set_breakpoint): New, based on set_breakpoint_at.
6018 (set_breakpoint_at): Reimplement.
6019 (delete_raw_breakpoint): Go through the_target->remove_point
6020 instead of assuming memory breakpoints.
6021 (find_gdb_breakpoint_at): Delete.
6022 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6023 (find_gdb_breakpoint): New function.
6024 (set_gdb_breakpoint_at): Delete.
6025 (z_type_supported): New function.
6026 (set_gdb_breakpoint_1): New function, loosely based off
6027 set_gdb_breakpoint_at.
6028 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6029 (delete_gdb_breakpoint_at): Delete.
6030 (delete_gdb_breakpoint_1): New function, loosely based off
6031 delete_gdb_breakpoint_at.
6032 (delete_gdb_breakpoint): New function.
6033 (clear_gdb_breakpoint_conditions): Rename to ...
6034 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6036 (add_condition_to_breakpoint): Make static.
6037 (add_breakpoint_condition): Take a struct breakpoint pointer
6038 instead of an address. Adjust.
6039 (gdb_condition_true_at_breakpoint): Rename to ...
6040 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6042 (gdb_condition_true_at_breakpoint): Reimplement.
6043 (add_breakpoint_commands): Take a struct breakpoint pointer
6044 instead of an address. Adjust.
6045 (gdb_no_commands_at_breakpoint): Rename to ...
6046 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6047 parameter. Return true if no breakpoint was found. Change debug
6049 (gdb_no_commands_at_breakpoint): Reimplement.
6050 (run_breakpoint_commands): Rename to ...
6051 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6052 and change return type to boolean.
6053 (run_breakpoint_commands): New function.
6054 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6055 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6056 breakpoint. Go through the_target->remove_point instead of
6057 assuming memory breakpoint.
6058 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6059 software and hardware breakpoints.
6060 (reinsert_raw_breakpoint): Go through the_target->insert_point
6061 instead of assuming memory breakpoint.
6062 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6063 software and hardware breakpoints.
6064 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6065 Check both software and hardware breakpoints.
6066 (validate_inserted_breakpoint): Assert the breakpoint is a
6067 software breakpoint. Set the inserted flag to -1 instead of
6068 setting shlib_disabled.
6069 (delete_disabled_breakpoints): Adjust.
6070 (validate_breakpoints): Only validate software breakpoints.
6071 Adjust to inserted flag change.
6072 (check_mem_read, check_mem_write): Skip breakpoint types other
6073 than software breakpoints. Adjust to inserted flag change.
6074 * mem-break.h (enum raw_bkpt_type): New enum.
6075 (raw_breakpoint, struct process_info): Forward declare.
6076 (Z_packet_to_target_hw_bp_type): Delete declaration.
6077 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6078 (set_gdb_breakpoint, delete_gdb_breakpoint)
6079 (clear_breakpoint_conditions): New declarations.
6080 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6081 (breakpoint_inserted_here): Update comment.
6082 (add_breakpoint_condition, add_breakpoint_commands): Replace
6083 address parameter with a breakpoint pointer parameter.
6084 (gdb_breakpoint_here): Update comment.
6085 (delete_gdb_breakpoint_at): Delete.
6086 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6087 * server.c (process_point_options): Take a struct breakpoint
6088 pointer instead of an address. Adjust.
6089 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6090 delete_gdb_breakpoint.
6091 * spu-low.c (spu_target_ops): Install NULL as
6092 supports_z_point_type method.
6093 * target.h: Include mem-break.h.
6094 (struct target_ops) <prepare_to_access_memory>: Update comment.
6095 <supports_z_point_type>: New field.
6096 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6097 instead of a char. Also take a raw breakpoint pointer.
6098 * win32-arm-low.c (the_low_target): Install NULL as
6099 supports_z_point_type.
6100 * win32-i386-low.c (i386_supports_z_point_type): New function.
6101 (i386_insert_point, i386_remove_point): Adjust to new interface.
6102 (the_low_target): Install i386_supports_z_point_type.
6103 * win32-low.c (win32_supports_z_point_type): New function.
6104 (win32_insert_point, win32_remove_point): Adjust to new interface.
6105 (win32_target_ops): Install win32_supports_z_point_type.
6106 * win32-low.h (struct win32_target_ops):
6107 <supports_z_point_type>: New method.
6108 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6109 instead of a char. Also take a raw breakpoint pointer.
6111 2014-05-20 Pedro Alves <palves@redhat.com>
6113 * mem-break.h: Include break-common.h.
6114 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6115 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6116 (Z_packet_to_target_hw_bp_type): New declaration.
6117 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6118 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6119 (Z_PACKET_ACCESS_WP): Delete macros.
6120 (Z_packet_to_hw_type): Delete function.
6121 * i386-low.h: Don't include break-common.h here.
6122 (Z_packet_to_hw_type): Delete declaration.
6123 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6124 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6125 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6126 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6127 * linux-aarch64-low.c: Don't include break-common.h here.
6128 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6129 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6130 (Z_packet_to_target_hw_bp_type): Delete function.
6131 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6133 (mips_insert_point, mips_remove_point): Use
6134 Z_packet_to_target_hw_bp_type.
6136 2014-05-20 Pedro Alves <palves@redhat.com>
6138 * linux-aarch64-low.c: Include break-common.h.
6139 (enum target_point_type): Delete.
6140 (Z_packet_to_point_type): Rename to ...
6141 (Z_packet_to_target_hw_bp_type): ... this, and return a
6142 target_hw_bp_type instead.
6143 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6144 instead of an enum target_point_type.
6145 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6147 (aarch64_dr_state_insert_one_point)
6148 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6149 (aarch64_handle_aligned_watchpoint)
6150 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6151 Take an enum target_hw_bp_type instead of an enum
6153 (aarch64_supports_z_point_type): New function.
6154 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6155 use Z_packet_to_target_hw_bp_type.
6157 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6159 * configure.ac: Only use -Werror by default when DEVELOPMENT
6161 * configure: Regenerate.
6163 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6165 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6166 * linux-x86-low.c (X86_64_USER_REGS): New.
6167 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6169 2014-04-28 Yao Qi <yao@codesourcery.com>
6171 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6174 2014-04-25 Pedro Alves <palves@redhat.com>
6177 * linux-low.c (linux_attach_fail_reason_string): New function.
6178 (linux_attach_lwp): Delete.
6179 (linux_attach_lwp_1): Rename to ...
6180 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6181 argument. Remove "initial" parameter. Return int instead of
6182 void. Don't error or warn here.
6183 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6184 failure to attach to the tgid. Call warning when failing to
6186 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6187 argument. Remove "initial" parameter. Return int instead of
6188 void. Don't error or warn here.
6189 (linux_attach_fail_reason_string): New declaration.
6190 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6191 interface change. Use linux_attach_fail_reason_string.
6193 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6194 Walfred Tedeschi <walfred.tedeschi@intel.com>
6196 * Makefile.in: Added rules to handle new files
6197 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6198 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6199 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6200 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6201 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6202 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6204 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6205 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6206 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6207 i386/x32-avx512.xml.
6208 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6209 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6210 i386/x32-avx512-linux.xml.
6211 * i387-fp.c (num_avx512_k_registers): New constant for number
6213 (num_avx512_zmmh_low_registers): New constant for number of
6214 lower ZMM registers (0-15).
6215 (num_avx512_zmmh_high_registers): New constant for number of
6216 higher ZMM registers (16-31).
6217 (num_avx512_ymmh_registers): New contant for number of higher
6218 YMM registers (ymm16-31 added by avx521 on x86_64).
6219 (num_avx512_xmm_registers): New constant for number of higher
6220 XMM registers (xmm16-31 added by AVX512 on x86_64).
6221 (struct i387_xsave): Add space for AVX512 registers.
6222 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6223 Add code to handle AVX512 registers.
6224 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6225 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6226 prototypei from generated file.
6227 (tdesc_amd64_avx512_linux): Likewise.
6228 (init_registers_x32_avx512_linux): Likewise.
6229 (tdesc_x32_avx512_linux): Likewise.
6230 (init_registers_i386_avx512_linux): Likewise.
6231 (tdesc_i386_avx512_linux): Likewise.
6232 (x86_64_regmap): Add AVX512 registers.
6233 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6235 (initialize_low_arch): Add code to initialize AVX512 registers.
6237 2014-04-23 Pedro Alves <palves@redhat.com>
6239 * mem-break.c (find_gdb_breakpoint_at): Make static.
6240 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6242 2014-04-23 Pedro Alves <palves@redhat.com>
6244 * i386-low.c: Don't include break-common.h here.
6245 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6246 prototype to take target_hw_bp_type as argument instead of a Z
6248 * i386-low.h: Include break-common.h here.
6249 (Z_packet_to_hw_type): Declare.
6250 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6252 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6253 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6254 (x86_remove_point): Convert the packet number to a
6255 target_hw_bp_type before calling i386_low_remove_watchpoint.
6256 * win32-i386-low.c (i386_insert_point): Convert the packet number
6257 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6258 (i386_remove_point): Convert the packet number to a
6259 target_hw_bp_type before calling i386_low_remove_watchpoint.
6261 2014-04-23 Pedro Alves <palves@redhat.com>
6263 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6265 2014-04-10 Pedro Alves <palves@redhat.com>
6267 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6268 Check if the condition or command is NULL before checking if the
6269 breakpoint is known. On success, return true.
6270 * mem-break.h (add_breakpoint_condition): Document return.
6271 (add_breakpoint_commands): Add describing comment.
6272 * server.c (skip_to_semicolon): New function.
6273 (process_point_options): Use it.
6275 2014-04-09 Pedro Alves <palves@redhat.com>
6277 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6280 2014-02-27 Pedro Alves <palves@redhat.com>
6283 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6285 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6287 (last_thread_of_process_p): Take a PID argument instead of a
6289 (linux_wait_for_lwp): Delete.
6290 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6292 (linux_low_filter_event): New function, party factored out from
6293 linux_wait_for_event.
6294 (linux_wait_for_event): Rename to ...
6295 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6296 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6297 sigsuspend. Check for zombie leaders.
6298 (linux_wait_for_event): Reimplement as wrapper around
6299 linux_wait_for_event_filtered.
6300 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6301 a normal or signal exit is seen, it's the whole process exiting.
6302 (wait_for_sigstop): No longer a for_each_inferior callback.
6303 Rewrite on top of linux_wait_for_event_filtered.
6304 (stop_all_lwps): Call wait_for_sigstop directly.
6305 * server.c (resume, handle_target_event): Handle
6306 TARGET_WAITKIND_NO_RESUMED.
6308 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6310 * win32-low.c (psapi_get_dll_name,
6311 * win32_CreateToolhelp32Snapshot): Delete.
6312 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6313 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6315 (handle_load_dll): Add function description.
6316 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6318 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6320 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6322 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6323 base address when calling win32_add_one_solib.
6324 (handle_load_dll): Delete local variable load_addr.
6325 Remove 0x1000 offset applied to DLL base address when calling
6326 win32_add_one_solib.
6327 (handle_unload_dll): Add comment.
6329 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6331 * win32-low.c (win32_add_all_dlls): Renames
6332 win32_ensure_ntdll_loaded. Rewrite function documentation.
6333 Adjust implementation to always load all DLLs.
6334 Add 0x1000 offset to DLL base address when calling
6335 win32_add_one_solib.
6336 (child_initialization_done): New static global.
6337 (do_initial_child_stuff): Set child_initialization_done to
6338 zero during child initialization, and 1 after. Replace call
6339 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6341 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6342 (handle_unload_dll): Add function documentation.
6343 (get_child_debug_event): Ignore load and unload DLL events
6344 during child initialization.
6346 2014-02-20 Doug Evans <dje@google.com>
6348 Remove global all_lwps.
6349 * inferiors.h (ptid_of): Move here from linux-low.h.
6350 (pid_of, lwpid_of): Ditto.
6351 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6352 parameter is a struct thread_info * now.
6353 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6354 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6355 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6357 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6358 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6359 * linux-arm-low.c (update_registers_callback): Update, "entry"
6360 parameter is a struct thread_info * now.
6361 Fetch lwpid from current_inferior directly.
6362 (arm_insert_point): Pass &all_threads to find_inferior instead of
6364 (arm_remove_point): Ditto.
6365 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6366 (arm_prepare_to_resume): Fetch pid from thread.
6367 (arm_read_description): Fetch lwpid from current_inferior directly.
6368 * linux-low.c (all_lwps): Delete.
6369 (delete_lwp): Delete call to remove_inferior.
6370 (handle_extended_wait): Fetch lwpid from thread.
6371 (add_lwp): Don't set lwp->entry.id. Remove call to
6372 add_inferior_to_list.
6373 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6374 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6375 (kill_one_lwp_callback): Ditto.
6376 (linux_kill): Don't dereference NULL pointer.
6377 Fetch ptid,lwpid from thread.
6378 (get_detach_signal): Fetch ptid from thread.
6379 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6380 Simplify call to regcache_invalidate_thread.
6381 (delete_lwp_callback): Update, "entry" parameter is a
6382 struct thread_info * now. Fetch pid from thread.
6383 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6384 (status_pending_p_callback): Update, "entry" parameter is a
6385 struct thread_info * now. Fetch ptid from thread.
6386 (find_lwp_pid): Update, "entry" parameter is a
6387 struct thread_info * now.
6388 (linux_wait_for_lwp): Fetch pid from thread.
6389 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6390 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6391 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6392 (dequeue_one_deferred_signal): Ditto.
6393 (cancel_breakpoint): Fetch ptid from current_inferior.
6394 (linux_wait_for_event): Pass &all_threads to find_inferior,
6395 not &all_lwps. Fetch ptid, lwpid from thread.
6396 (count_events_callback): Update, "entry" parameter is a
6397 struct thread_info * now.
6398 (select_singlestep_lwp_callback): Ditto.
6399 (select_event_lwp_callback): Ditto.
6400 (cancel_breakpoints_callback): Ditto.
6401 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6403 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6404 (unsuspend_one_lwp): Update, "entry" parameter is a
6405 struct thread_info * now.
6406 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6408 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6409 Fetch lwpid from thread, not lwp.
6410 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6411 Pass &all_threads to find_inferior, not &all_lwps.
6412 (send_sigstop): Fetch lwpid from thread, not lwp.
6413 (send_sigstop_callback): Update, "entry" parameter is a
6414 struct thread_info * now.
6415 (suspend_and_send_sigstop_callback): Ditto.
6416 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6417 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6418 struct thread_info * now.
6419 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6421 (lwp_running): Update, "entry" parameter is a
6422 struct thread_info * now.
6423 (stop_all_lwps): Fetch ptid from thread.
6424 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6425 (linux_resume_one_lwp): Fetch lwpid from thread.
6426 (linux_set_resume_request): Update, "entry" parameter is a
6427 struct thread_info * now. Fetch pid, lwpid from thread.
6428 (resume_status_pending_p): Update, "entry" parameter is a
6429 struct thread_info * now.
6430 (need_step_over_p): Ditto. Fetch lwpid from thread.
6431 (start_step_over): Fetch lwpid from thread.
6432 (linux_resume_one_thread): Update, "entry" parameter is a
6433 struct thread_info * now. Fetch lwpid from thread.
6434 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6435 (proceed_one_lwp): Update, "entry" parameter is a
6436 struct thread_info * now. Fetch lwpid from thread.
6437 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6438 struct thread_info * now.
6439 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6440 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6441 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6443 (regsets_store_inferior_registers): Ditto.
6444 (fetch_register, store_register): Ditto.
6445 (linux_read_memory, linux_write_memory): Ditto.
6446 (linux_request_interrupt): Ditto.
6447 (linux_read_auxv): Ditto.
6448 (linux_xfer_siginfo): Ditto.
6449 (linux_qxfer_spu): Ditto.
6450 (linux_qxfer_libraries_svr4): Ditto.
6451 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6452 moved to inferiors.h.
6454 (get_thread_lwp): Update.
6455 (struct lwp_info): Delete member "entry". Simplify comment for
6458 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6459 current_inferior directly.
6460 (update_watch_registers_callback): Update, "entry" parameter is a
6461 struct thread_info * now. Fetch pid from thread.
6462 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6463 (mips_insert_point): Fetch lwpid from current_inferior.
6464 Pass &all_threads to find_inferior, not &all_lwps.
6465 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6466 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6468 (mips_stopped_data_address): Ditto.
6469 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6471 * linux-tile-low.c (tile_arch_setup): Ditto.
6472 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6473 (update_debug_registers_callback): Update, "entry" parameter is a
6474 struct thread_info * now. Fetch pid from thread.
6475 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6476 Pass &all_threads to find_inferior, not &all_lwps.
6477 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6478 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6479 Pass &all_threads to find_inferior, not &all_lwps.
6480 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6481 (i386_dr_low_get_status): Ditto.
6482 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6483 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6484 (x86_linux_read_description): Ditto.
6485 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6487 2014-02-20 Doug Evans <dje@google.com>
6489 * inferiors.c (get_first_inferior): Fix buglet.
6491 2014-02-19 Doug Evans <dje@google.com>
6493 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6494 * inferiors.c (add_thread): Change result type to struct thread_info *.
6495 All callers updated.
6496 (add_lwp): Call add_thread here instead of in callers.
6497 All callers updated.
6498 * linux-low.h (get_lwp_thread): Rewrite.
6499 (struct lwp_info): New member "thread".
6501 2014-02-19 Doug Evans <dje@google.com>
6503 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6504 All callers updated.
6506 2014-02-19 Doug Evans <dje@google.com>
6508 * inferiors.c (add_thread): Fix whitespace.
6510 2014-02-19 Doug Evans <dje@google.com>
6512 * dll.c (clear_dlls): Replace accessing list implemention details
6514 * gdbthread.h (get_first_thread): Declare.
6515 * inferiors.c (for_each_inferior_with_data): New function.
6516 (get_first_thread): New function.
6517 (find_thread_ptid): Simplify.
6518 (get_first_inferior): New function.
6519 (clear_list): Delete.
6520 (one_inferior_p): New function.
6521 (clear_inferior_list): New function.
6522 (clear_inferiors): Update.
6523 * inferiors.h (for_each_inferior_with_data): Declare.
6524 (clear_inferior_list): Declare.
6525 (one_inferior_p): Declare.
6526 (get_first_inferior): Declare.
6527 * linux-low.c (linux_wait_for_event): Replace accessing list
6528 implemention details with API function.
6529 * server.c (target_running): Ditto.
6530 (accumulate_file_name_length): New function.
6531 (emit_dll_description): New function.
6532 (handle_qxfer_libraries): Replace accessing list implemention
6533 details with API function.
6534 (handle_qxfer_threads_worker): New function.
6535 (handle_qxfer_threads_proper): Replace accessing list implemention
6536 details with API function.
6537 (handle_query): Ditto.
6538 (visit_actioned_threads_callback_ftype): New typedef.
6539 (visit_actioned_threads_data): New struct.
6540 (visit_actioned_threads): Rewrite to be find_inferior callback.
6541 (resume): Call find_inferior.
6542 (handle_status): Replace accessing list implemention
6543 details with API function.
6544 (process_serial_event): Replace accessing list implemention details
6546 * target.c (set_desired_inferior): Replace accessing list implemention
6547 details with API function.
6548 * tracepoint.c (same_process_p): New function.
6549 (gdb_agent_about_to_close): Replace accessing list implemention
6550 details with API function.
6551 * win32-low.c (child_delete_thread): Replace accessing list
6552 implemention details with API function.
6553 (match_dll_by_basename): New function.
6554 (dll_is_loaded_by_basename): New function.
6555 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6556 details call to dll_is_loaded_by_basename.
6558 2014-02-19 Doug Evans <dje@google.com>
6560 * dll.h (struct dll_info): Add comment.
6561 * gdbthread.h (struct thread_info): Add comment.
6562 (current_ptid): Simplify.
6563 * inferiors.c (add_process): Update.
6564 (remove_process): Update.
6565 * inferiors.h (struct process_info): Rename member "head" to "entry".
6566 * linux-low.c (delete_lwp): Update.
6568 (last_thread_of_process_p): Update.
6569 (kill_one_lwp_callback, linux_kill): Update.
6570 (status_pending_p_callback): Update.
6571 (wait_for_sigstop): Update. Simplify read of ptid.
6572 (start_step_over): Update.
6573 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6574 (get_lwp_thread): Update.
6575 (struct lwp_info): Rename member "head" to "entry".
6576 * regcache.h (inferior_list_entry): Delete.
6577 * server.c (kill_inferior_callback): Update.
6578 (detach_or_kill_inferior_callback): Update.
6579 (print_started_pid): Update.
6580 (print_attached_pid): Update.
6581 (process_serial_event): Simplify read of ptid.
6582 * thread-db.c (thread_db_create_event): Update.
6583 (thread_db_get_tls_address): Update.
6584 * win32-low.c (current_inferior_ptid): Simplify.
6586 2014-02-19 Tom Tromey <tromey@redhat.com>
6588 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6590 (target_supports_btrace): Update.
6592 2014-02-14 Yao Qi <yao@codesourcery.com>
6594 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6595 (rsp-low-ipa.o): New target.
6597 2014-02-12 Tom Tromey <tromey@redhat.com>
6599 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6600 convert_ascii_to_int.
6601 * regcache.c (registers_to_string): Likewise.
6602 * remote-utils.c (decode_M_packet): Likewise.
6603 * server.c (process_serial_event): Likewise.
6605 2014-02-12 Tom Tromey <tromey@redhat.com>
6607 * server.c (handle_query, handle_v_run): Use hex2bin, not
6609 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6611 2014-02-12 Tom Tromey <tromey@redhat.com>
6613 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6614 convert_int_to_ascii.
6615 * regcache.c (registers_to_string, collect_register_as_string):
6617 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6619 * server.c (process_serial_event): Likewise.
6620 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6621 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6623 2014-02-12 Tom Tromey <tromey@redhat.com>
6625 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6626 bin2hex, not hexify.
6627 * tracepoint.c (cmd_qtstatus): Likewise.
6629 2014-02-12 Tom Tromey <tromey@redhat.com>
6631 * remote-utils.c (monitor_output): Pass explicit length to
6634 2014-02-12 Tom Tromey <tromey@redhat.com>
6636 * tracepoint.c: Include rsp-low.h.
6637 * server.c: Include rsp-low.h.
6638 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6639 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6641 * remote-utils.c: Include rsp-low.h.
6642 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6643 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6644 (convert_int_to_ascii, convert_ascii_to_int): Move to
6646 * regcache.c: Include rsp-low.h.
6647 * ax.c: Include rsp-low.h.
6648 * Makefile.in (SFILES): Add common/rsp-low.c.
6649 (OBS): Add rsp-low.o.
6650 (rsp-low.o): New target.
6652 2014-02-12 Tom Tromey <tromey@redhat.com>
6654 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6655 Include print-utils.h.
6656 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6657 (plongest, thirty_two, phex_nz): Remove.
6658 * Makefile.in (SFILES): Add common/print-utils.c.
6659 (OBS): Add print-utils.o.
6660 (print-utils-ipa.o): New target.
6661 (print-utils.o): New target.
6662 (IPA_OBJS): Add print-utils-ipa.o.
6664 2014-02-06 Tom Tromey <tromey@redhat.com>
6666 * Makefile.in (SFILES): Fix indentation.
6668 2014-02-05 Doug Evans <dje@google.com>
6670 * linux-low.c (linux_wait_for_event): Improve comment.
6671 (linux_wait_1): Keep current_inferior in sync with event_child.
6673 2014-01-22 Doug Evans <dje@google.com>
6675 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6677 2014-01-22 Doug Evans <dje@google.com>
6679 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6680 * configure: Regenerate.
6681 * config.in: Regenerate.
6682 * Makefile.in (SFILES): Add debug.c.
6684 * debug.c: New file.
6685 * debug.h: New file.
6686 * linux-aarch64-low.c (*): Update all debugging printfs to use
6687 debug_printf instead of fprintf.
6688 * linux-arm-low.c (*): Ditto.
6689 * linux-cris-low.c (*): Ditto.
6690 * linux-crisv32-low.c (*): Ditto.
6691 * linux-m32r-low.c (*): Ditto.
6692 * linux-sparc-low.c (*): Ditto.
6693 * linux-x86.c (*): Ditto.
6694 * linux-low.c (*): Ditto.
6695 (linux_wait_1): Add calls to debug_enter, debug_exit.
6696 (linux_wait): Remove redundant debugging printf.
6697 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6698 (linux_resume, unstop_all_lwps): Ditto.
6699 * mem-break.c (*): Update all debugging printfs to use
6700 debug_printf instead of fprintf.
6701 * remote-utils.c (*): Ditto.
6702 * thread-db.c (*): Ditto.
6703 * server.c #include <ctype.h>, "gdb_vecs.h".
6704 (debug_threads): Moved to debug.c.
6705 (*): Update all debugging printfs to use debug_printf instead of
6707 (start_inferior): Replace call to fflush with call to debug_flush.
6708 (monitor_show_help): Mention set debug-format.
6709 (parse_debug_format_options): New function.
6710 (handle_monitor_command): Handle "monitor set debug-format".
6711 (gdbserver_usage): Mention --debug-format.
6712 (main): Parse --debug-format.
6713 * server.h (debug_threads): Declaration moved to debug.h.
6715 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6716 trace_debug_1 that uses debug_printf.
6717 (tracepoint_look_up_symbols): Update all debugging printfs to use
6718 debug_printf instead of fprintf.
6720 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6722 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6725 2014-01-17 Pedro Alves <palves@redhat.com>
6728 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6729 defined after including gdb_proc_service.h.
6731 2014-01-16 Doug Evans <dje@google.com>
6733 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6734 (match_dll): Use it.
6736 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6738 * target.h (target_ops) <read_btrace>: Change parameters and
6739 return type to allow error reporting.
6740 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6741 trace reading errors on.
6742 * linux-low.c (linux_low_read_btrace): Pass trace reading
6744 (linux_low_disable_btrace): New.
6746 2014-01-15 Doug Evans <dje@google.com>
6748 * inferiors.c (thread_id_to_gdb_id): Delete.
6749 * inferiors.h (thread_id_to_gdb_id): Delete.
6751 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6753 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6754 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6757 2014-01-08 Pedro Alves <palves@redhat.com>
6759 * server.c (handle_status): Don't discard previous queued stop
6760 replies or thread's pending status here.
6761 (main) <disconnection>: Do it here instead.
6763 2014-01-08 Pedro Alves <palves@redhat.com>
6765 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6766 * server.c (visit_actioned_threads, handle_pending_status): New
6768 (handle_v_cont): Factor out parts to ...
6769 (resume): ... this new function. If in all-stop, and a thread
6770 being resumed has a pending status, report it without actually
6772 (myresume): Adjust to use the new 'resume' function.
6773 (clear_pending_status_callback, set_pending_status_callback)
6774 (find_status_pending_thread_callback): New functions.
6775 (handle_status): Handle the case of multiple threads having
6776 interesting statuses to report. Report threads' real last signal
6777 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6778 with an interesting thread to report the status for, instead of
6779 always reporting the status of the first thread.
6781 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6783 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6784 * gdbreplay.c (gdbreplay_version): Likewise.
6786 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6788 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6789 iov.iov_len with the real length in use.
6791 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6793 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6794 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6795 for all targets that use win32-low.c.
6796 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6797 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6799 2013-12-13 Pedro Alves <palves@redhat.com>
6801 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6802 if equal to TARGET_WAITKIND_LOADED.
6803 * win32-low.c (cached_status): New static global.
6804 (win32_wait): Add declaration.
6805 (do_initial_child_stuff): Flush all initial pending debug events
6806 up to the initial breakpoint.
6807 (win32_wait): If CACHED_STATUS was set, return that instead
6808 of doing a real wait. Remove the code resuming the execution
6809 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6810 during the initial phase. Also remove the code changing
6811 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6812 TARGET_WAITKIND_STOPPED.
6814 2013-12-11 Yao Qi <yao@codesourcery.com>
6816 * notif.c (handle_notif_ack): Return 0 if no notification
6819 2013-11-20 Doug Evans <dje@google.com>
6821 * linux-low.c (linux_set_resume_request): Fix comment.
6823 2013-11-20 Doug Evans <dje@google.com>
6825 * linux-low.c (resume_status_pending_p): Tweak comment.
6827 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6829 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6830 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6831 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6832 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6833 (srv_amd64_regobj): Add amd64-mpx.o.
6834 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6835 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6836 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6837 * i387-fp.c (num_pl_bnd_register) Added constant.
6838 (num_pl_bnd_cfg_registers) Added constant.
6839 (struct i387_xsave) Added reserved area and MPX fields.
6840 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6841 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6843 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6844 (init_registers_amd64_mpx_linux): Declare new function.
6845 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6846 (x86_64_regmap): Add MPX registers.
6847 (x86_linux_read_description): Add MPX case.
6848 (initialize_low_arch): Initialize MPX targets.
6850 2013-11-18 Tom Tromey <tromey@redhat.com>
6852 * configure: Rebuild.
6853 * configure.ac: Don't check for stdlib.h.
6854 * gdbreplay.c: Unconditionally include stdlib.h.
6856 2013-11-18 Tom Tromey <tromey@redhat.com>
6858 * config.in: Rebuild.
6859 * configure: Rebuild.
6860 * configure.ac: Don't use AC_HEADER_DIRENT.
6862 2013-11-18 Tom Tromey <tromey@redhat.com>
6864 * server.h: Don't check HAVE_STRING_H.
6865 * gdbreplay.c: Don't check HAVE_STRING_H.
6866 * configure: Rebuild.
6868 2013-11-18 Tom Tromey <tromey@redhat.com>
6870 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6873 2013-11-08 Tom Tromey <tromey@redhat.com>
6875 * configure, config.in: Rebuild.
6876 * configure.ac: Remove unused configury.
6878 2013-11-08 Tom Tromey <tromey@redhat.com>
6880 * acinclude.m4: Include common.m4, codeset.m4.
6881 * configure, config.in: Rebuild.
6882 * configure.ac: Use GDB_AC_COMMON.
6884 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6886 * linux-s390-low.c (HWCAP_S390_TE): New define.
6887 (s390_arch_setup): Consider the TE field in the HWCAP for
6888 determining 'have_regset_tdb'.
6890 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6893 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6896 2013-10-02 Pedro Alves <palves@redhat.com>
6898 * server.c (process_serial_event): Don't output "GDBserver
6899 exiting" if GDB is connected through stdio.
6900 * target.c (mywait): Likewise, be silent if GDB is connected
6903 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6905 * lynx-low.c (lynx_add_threads_after_attach): New function.
6906 (lynx_attach): Remove call to add_thread. Add call to
6907 lynx_add_threads_after_attach instead.
6909 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6911 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6912 * config.in, configure: Regenerated.
6914 2013-09-18 Yao Qi <yao@codesourcery.com>
6917 * server.c (start_inferior): Clear 'resume_info'.
6919 2013-09-16 Jiong Wang <jiwang@tilera.com>
6921 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6924 2013-09-16 Jiong Wang <jiwang@tilera.com>
6926 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6927 linux-tile-low.o to srv_tgtobj.
6929 2013-09-16 Will Newton <will.newton@linaro.org>
6931 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6934 2013-09-06 Pedro Alves <palves@redhat.com>
6936 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6937 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6938 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6939 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6940 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6941 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6943 2013-09-06 Pedro Alves <palves@redhat.com>
6945 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6946 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6948 2013-09-06 Pedro Alves <palves@redhat.com>
6950 * linux-amd64-ipa.c: Include tracepoint.h.
6951 * linux-i386-ipa.c: Include tracepoint.h.
6953 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6955 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6956 (ps_get_thread_area): New function.
6958 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6960 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6961 (initialize_low_arch): Call init_registers_crisv32 rather than
6962 init_register_crisv32.
6964 2013-09-05 Pedro Alves <palves@redhat.com>
6966 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6968 * hostio.h: ... this new file.
6969 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6970 win32-low.c: Include hostio.h.
6972 2013-09-05 Pedro Alves <palves@redhat.com>
6974 * server.h (gdb_client_data, handler_func, callback_handler_func)
6975 (delete_file_handler, add_file_handler, append_callback_event)
6976 (delete_callback_event, start_event_loop, initialize_event_loop):
6977 Move to event-loop.h and include it.
6978 * event-loop.h: New file.
6980 2013-09-05 Pedro Alves <palves@redhat.com>
6982 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6983 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6984 (loaded_dll, unloaded_dll): Move to ...
6985 * dll.h: ... this new file.
6986 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6988 2013-09-05 Pedro Alves <palves@redhat.com>
6990 * server.h (current_process, get_thread_process, all_processes)
6991 (add_inferior_to_list, for_each_inferior, current_inferior)
6992 (remove_inferior, add_process, remove_process, find_process_pid)
6993 (have_started_inferiors_p, have_attached_inferiors_p)
6994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6995 (clear_inferiors, find_inferior, find_inferior_id)
6996 (inferior_target_data, set_inferior_target_data)
6997 (inferior_regcache_data, set_inferior_regcache_data): Move to
6998 inferiors.h, and include it.
6999 * inferiors.h: New file.
7001 2013-09-05 Pedro Alves <palves@redhat.com>
7003 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7007 2013-09-05 Pedro Alves <palves@redhat.com>
7009 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7011 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7012 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7013 (handle_tracepoint_general_set, handle_tracepoint_query)
7014 (tracepoint_finished_step, tracepoint_was_hit)
7015 (release_while_stepping_state_list, current_traceframe)
7016 (in_readonly_region, traceframe_read_mem)
7017 (fetch_traceframe_registers, traceframe_read_sdata)
7018 (traceframe_read_info, struct fast_tpoint_collect_status)
7019 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7020 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7021 (supply_fast_tracepoint_registers)
7022 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7023 (ipa_tdesc, claim_trampoline_space)
7024 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7025 (agent_mem_read, agent_get_trace_state_variable_value)
7026 (agent_set_trace_state_variable_value, agent_tsv_read)
7027 (agent_mem_read_string, get_raw_reg_func_addr)
7028 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7029 * tracepoint.h: ... this new file.
7031 2013-09-05 Pedro Alves <palves@redhat.com>
7033 * server.h (perror_with_name, error, fatal, warning, paddress)
7034 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7036 * utils.h: New file.
7038 2013-09-05 Pedro Alves <palves@redhat.com>
7040 * server.h (remote_debug, noack_mode, transport_is_reliable)
7041 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7042 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7043 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7044 (write_enn, initialize_async_io, enable_async_io)
7045 (disable_async_io, check_remote_input_interrupt_request)
7046 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7047 (dead_thread_notify, prepare_resume_reply)
7048 (decode_address_to_semicolon, decode_address, decode_m_packet)
7049 (decode_M_packet, decode_X_packet, decode_xfer_write)
7050 (decode_search_memory_packet, unhexify, hexify)
7051 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7052 (look_up_one_symbol, relocate_instruction)
7053 (monitor_output): Move to remote-utils.h, and include it.
7054 * remote-utils.h: New file.
7056 2013-09-05 Pedro Alves <palves@redhat.com>
7058 * server.h (_): Delete.
7060 2013-09-02 Pedro Alves <palves@redhat.com>
7062 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7063 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7065 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7067 2013-09-02 Pierre Muller <muller@sourceware.org>
7069 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7070 or WriteProcessMemory complete successfully and handle
7071 ERROR_PARTIAL_COPY error.
7073 2013-09-02 Pedro Alves <palves@redhat.com>
7075 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7076 error instead of EIO.
7078 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7081 * linux-low.c: Include filestuff.h.
7082 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7083 * lynx-low.c: Include filestuff.h.
7084 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7085 * server.c: Include filestuff.h.
7086 (main): Call notice_open_fds.
7087 * spu-low.c: Include filestuff.h.
7088 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7090 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7092 * Makefile.in: Explain why ../target and ../nat are not
7093 listed as include file search paths.
7094 (linux-waitpid.o): New object file rule.
7095 * configure.srv (srv_native_linux_obj): New variable.
7096 Replace all occurrences of linux native object files with
7097 $srv_native_linux_obj.
7098 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7099 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7100 (linux_enable_event_reporting): Remove declaration.
7101 (my_waitpid): Moved to common/linux-waitpid.c.
7102 (linux_wait_for_event): Pass ptid when calling
7103 linux_enable_event_reporting.
7104 (linux_supports_tracefork_flag): Remove.
7105 (linux_enable_event_reporting): Likewise.
7106 (linux_tracefork_grandchild): Remove.
7107 (STACK_SIZE): Moved to common/linux-ptrace.c.
7108 (linux_tracefork_child): Remove.
7109 (linux_test_for_tracefork): Remove.
7110 (linux_look_up_symbols): Call linux_supports_traceclone.
7111 (initialize_low): Remove call to linux_test_for_tracefork.
7112 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7113 common/linux-ptrace.h.
7114 (PTRACE_TYPE_ARG4): Likewise.
7115 Include linux-ptrace.h.
7117 2013-08-21 Pedro Alves <palves@redhat.com>
7119 * config.in: Renegerate.
7121 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7123 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7124 (SFILES): Remove $(srcdir)/common/target-common.c and
7125 add $(srcdir)/target/waitstatus.c.
7126 (OBS): Remove target-common.o and add waitstatus.o.
7127 (server_h): Remove $(srcdir)/../common/target-common.h and
7128 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7129 and $(srcdir)/../target/waitstatus.h.
7130 (target-common.o): Remove.
7131 (waitstatus.o): New target object file.
7132 * target.h: Do not include target-common.h and
7133 include target/resume.h, target/wait.h and
7134 target/waitstatus.h.
7136 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7138 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7139 to PTRACE_TYPE_ARG3.
7140 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7141 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7143 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7144 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7146 2013-07-27 Jie Zhang <jie@codesourcery.com>
7147 Daniel Jacobowitz <dan@codesourcery.com>
7148 Yao Qi <yao@codesourcery.com>
7150 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7151 (mips-linux-watch.o): New rule.
7152 (mips_linux_watch_h): New variable.
7153 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7155 * linux-mips-low.c: Include mips-linux-watch.h.
7156 (struct arch_process_info, struct arch_lwp_info): New.
7157 (update_watch_registers_callback): New function.
7158 (mips_linux_new_process, mips_linux_new_thread) New functions.
7159 (mips_linux_prepare_to_resume, mips_insert_point): New
7161 (mips_remove_point, mips_stopped_by_watchpoint): New
7163 (rsp_bp_type_to_target_hw_bp_type): New function.
7164 (mips_stopped_data_address): New function.
7165 (the_low_target): Add watchpoint support functions.
7167 2013-07-27 Yao Qi <yao@codesourcery.com>
7169 * i386-low.c: Include break-common.h.
7170 (enum target_hw_bp_type): Remove.
7172 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7174 * Makefile.in (SFILES): /common/target-common.c.
7175 (OBS): Add target-common.o.
7176 (server_h): Add $(srcdir)/../common/target-common.h.
7177 (target-common.o): New target.
7178 * server.c (queue_stop_reply_callback): Free
7179 status string after use.
7180 * target.c (target_waitstatus_to_string): Remove.
7181 * target.h: Include target-common.h.
7182 (resume_kind): Likewise.
7183 (target_waitkind): Likewise.
7184 (target_waitstatus): Likewise.
7185 (TARGET_WNOHANG): Likewise.
7187 2013-07-04 Yao Qi <yao@codesourcery.com>
7189 * Makefile.in (host_alias): Use @host_noncanonical@.
7190 (target_alias): Use @target_noncanonical@.
7191 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7192 ACX_NONCANONICAL_HOST.
7193 * configure: Regenerated.
7196 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7198 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7199 * configure: Rebuild.
7200 * Makefile.in (version_host, version_target): Get from configure.
7201 (version.c): Use $(version_host) and $(version_target).
7203 2013-07-03 Pedro Alves <palves@redhat.com>
7205 * Makefile.in (config.status): Depend on development.sh.
7206 * acinclude.m4: Include libmcheck.m4.
7207 * configure: Regenerate.
7209 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7211 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7212 attribute inside the parentheses.
7213 (winapi_DebugSetProcessKillOnExit): Ditto.
7214 (winapi_DebugBreakProcess): Ditto.
7215 (winapi_GenerateConsoleCtrlEvent): Ditto.
7217 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7219 * notif.h (notif_event): Add a dummy member to avoid compiler
7222 2013-07-01 Pedro Alves <palves@redhat.com>
7224 * hostio.c (HOSTIO_PATH_MAX): Define.
7225 (require_filename, handle_open, handle_unlink, handle_readlink):
7228 2013-07-01 Pedro Alves <palves@redhat.com>
7230 * server.h: Include "pathmax.h".
7231 * linux-low.c: Don't include sys/param.h.
7232 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7234 * win32-low.c: Don't include sys/param.h.
7235 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7237 2013-07-01 Pedro Alves <palves@redhat.com>
7239 * event-loop.c: Don't check HAVE_UNISTD_H before including
7241 * gdbreplay.c: Likewise.
7242 * remote-utils.c: Likewise.
7243 * server.c: Likewise.
7244 * configure.ac: Don't check for unistd.h.
7245 * configure: Regenerate.
7247 2013-06-28 Tom Tromey <tromey@redhat.com>
7249 * Makefile.in (version.c): Use version.in, not
7252 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7254 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7255 * configure: Rebuild.
7256 * Makefile.in (version_host, version_target): Get from configure.
7257 (version.c): Use $(version_host) and $(version_target).
7259 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7261 Fix trace-status to output user name without trailing colon.
7262 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7264 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7266 Fix trace-status to output proper start-time and stop-time.
7267 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7268 output start time and stop time in hex as gdb expects.
7270 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7272 * tracepoint.c (build_traceframe_info_xml): Output trace state
7273 variables present in the trace buffer.
7275 2013-06-24 Tom Tromey <tromey@redhat.com>
7277 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7279 (version.o): Remove.
7280 * gdbreplay.c: Include version.h.
7281 (version, host_name): Don't declare.
7282 * server.h: Include version.h.
7283 (version, host_name): Don't declare.
7285 2013-06-12 Pedro Alves <palves@redhat.com>
7287 * linux-x86-low.c (linux_is_elf64): Delete global.
7288 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7289 with local linux_pid_exe_is_elf_64_file use.
7291 2013-06-11 Pedro Alves <palves@redhat.com>
7293 * linux-low.c (regset_disabled, disable_regset): New functions.
7294 (regsets_fetch_inferior_registers)
7295 (regsets_store_inferior_registers): Use them.
7296 (initialize_regsets_info); Don't allocate the disabled_regsets
7298 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7301 2013-06-11 Pedro Alves <palves@redhat.com>
7303 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7306 2013-06-11 Pedro Alves <palves@redhat.com>
7308 * linux-x86-low.c (initialize_low_arch): Call
7309 init_registers_x32_avx_linux.
7311 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7313 Fix compatibility with Android Bionic.
7314 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7317 2013-06-07 Pedro Alves <palves@redhat.com>
7320 * Makefile.in (OBS): Add tdesc.o.
7321 (IPA_OBJS): Add tdesc-ipa.o.
7322 (tdesc-ipa.o): New rule.
7323 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7325 * linux-low.c (new_inferior): Delete.
7326 (disabled_regsets, num_regsets): Delete.
7327 (linux_add_process): Adjust to set the new per-process
7329 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7330 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7331 was a stop. When calling arch_setup, switch the current inferior
7332 to the thread that got an event.
7333 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7334 (regsets_fetch_inferior_registers)
7335 (regsets_store_inferior_registers): New regsets_info parameter.
7337 (linux_register_in_regsets): New regs_info parameter. Adjust to
7339 (register_addr, fetch_register, store_register): New usrregs_info
7340 parameter. Adjust to use it.
7341 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7342 parameter regs_info. Adjust to use it.
7343 (linux_fetch_registers): Get the current inferior's regs_info, and
7345 (linux_store_registers): Ditto.
7346 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7347 (initialize_low): Don't initialize the target_regsets here. Call
7348 initialize_low_arch.
7349 * linux-low.h (target_regsets): Delete declaration.
7350 (struct regsets_info): New.
7351 (struct usrregs_info): New.
7352 (struct regs_info): New.
7353 (struct process_info_private) <new_inferior>: New field.
7354 (struct linux_target_ops): Delete the num_regs, regmap, and
7355 regset_bitmap fields. New field regs_info.
7356 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7357 * i387-fp.c (num_xmm_registers): Delete.
7358 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7359 calls to new interface.
7360 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7361 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7362 Infer the number of xmm registers from the regcache's target
7364 * i387-fp.h (num_xmm_registers): Delete.
7365 * inferiors.c (add_thread): Don't install the thread's regcache
7367 * proc-service.c (gregset_info): Fetch the current inferior's
7368 regs_info. Adjust to use it.
7369 * regcache.c: Include tdesc.h.
7370 (register_bytes, reg_defs, num_registers)
7371 (gdbserver_expedite_regs): Delete.
7372 (get_thread_regcache): If the thread doesn't have a regcache yet,
7373 create one, instead of aborting gdbserver.
7374 (regcache_invalidate_one): Rename to ...
7375 (regcache_invalidate_thread): ... this.
7376 (regcache_invalidate_one): New.
7377 (regcache_invalidate): Only invalidate registers of the current
7379 (init_register_cache): Add target_desc parameter, and use it.
7380 (new_register_cache): Ditto. Assert the target description has a
7381 non zero registers_size.
7382 (regcache_cpy): Add assertions. Adjust.
7383 (realloc_register_cache, set_register_cache): Delete.
7384 (registers_to_string, registers_from_string): Adjust.
7385 (find_register_by_name, find_regno, find_register_by_number)
7386 (register_cache_size): Add target_desc parameter, and use it.
7387 (free_register_cache_thread, free_register_cache_thread_one)
7388 (regcache_release, register_cache_size): New.
7389 (register_size): Add target_desc parameter, and use it.
7390 (register_data, supply_register, supply_register_zeroed)
7391 (supply_regblock, supply_register_by_name, collect_register)
7392 (collect_register_as_string, collect_register_by_name): Adjust.
7393 * regcache.h (struct target_desc): Forward declare.
7394 (struct regcache) <tdesc>: New field.
7395 (init_register_cache, new_register_cache): Add target_desc
7397 (regcache_invalidate_thread): Declare.
7398 (regcache_invalidate_one): Delete declaration.
7399 (regcache_release): Declare.
7400 (find_register_by_number, register_cache_size, register_size)
7401 (find_regno): Add target_desc parameter.
7402 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7404 * remote-utils.c: Include tdesc.h.
7405 (outreg, prepare_resume_reply): Adjust.
7406 * server.c: Include tdesc.h.
7407 (gdbserver_xmltarget): Delete declaration.
7408 (get_features_xml, process_serial_event): Adjust.
7409 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7411 (struct process_info) <tdesc>: New field.
7412 (ipa_tdesc): Declare.
7413 * tdesc.c: New file.
7414 * tdesc.h: New file.
7415 * tracepoint.c: Include tdesc.h.
7416 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7417 (get_context_regcache): Adjust to pass ipa_tdesc down.
7418 (do_action_at_tracepoint): Adjust to get the register cache size
7419 from the context regcache's description.
7420 (traceframe_walk_blocks): Adjust to get the register cache size
7421 from the current trace frame's description.
7422 (traceframe_get_pc): Adjust to get current trace frame's
7423 description and pass it down.
7424 (gdb_collect): Adjust to get the register cache size from the
7426 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7427 (gdbserver_xmltarget): Delete.
7428 (initialize_low_tracepoint): Set the ipa's target description.
7429 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7430 (initialize_low_tracepoint): Set the ipa's target description.
7431 * linux-x86-low.c: Include tdesc.h.
7432 [__x86_64__] (is_64bit_tdesc): New.
7433 (ps_get_thread_area, x86_get_thread_area): Use it.
7434 (i386_cannot_store_register): Rename to ...
7435 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7436 (i386_cannot_fetch_register): Rename to ...
7437 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7438 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7440 (target_regsets): Rename to ...
7441 (x86_regsets): ... this.
7442 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7444 (x86_siginfo_fixup): Use is_64bit_tdesc.
7445 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7446 (tdesc_x32_avx_linux, tdesc_x32_linux)
7447 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7449 (x86_linux_update_xmltarget): Delete.
7450 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7451 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7452 (AMD64_LINUX_USER64_CS): New.
7453 (x86_linux_read_description): New, based on
7454 x86_linux_update_xmltarget.
7455 (same_process_callback): New.
7456 (x86_arch_setup_process_callback): New.
7457 (x86_linux_update_xmltarget): New.
7458 (x86_regsets_info): New.
7459 (amd64_linux_regs_info): New.
7460 (i386_linux_usrregs_info): New.
7461 (i386_linux_regs_info): New.
7462 (x86_linux_regs_info): New.
7463 (x86_arch_setup): Reimplement.
7464 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7465 (x86_emit_ops): Ditto.
7466 (the_low_target): Adjust. Install x86_linux_regs_info,
7467 x86_cannot_fetch_register, and x86_cannot_store_register.
7468 (initialize_low_arch): New.
7469 * linux-ia64-low.c (tdesc_ia64): Declare.
7470 (ia64_fetch_register): Adjust.
7471 (ia64_usrregs_info, regs_info): New globals.
7472 (ia64_regs_info): New function.
7473 (the_low_target): Adjust.
7474 (initialize_low_arch): New function.
7475 * linux-sparc-low.c (tdesc_sparc64): Declare.
7476 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7478 (sparc_arch_setup): New function.
7479 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7480 (the_low_target): Adjust.
7481 (initialize_low_arch): New function.
7482 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7483 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7484 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7485 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7486 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7487 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7488 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7489 (tdesc_powerpc_isa205_vsx64l): Declare.
7490 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7491 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7492 (ppc_set_pc, ppc_get_hwcap): Adjust.
7493 (ppc_usrregs_info): Forward declare.
7494 (!__powerpc64__) ppc_regmap_adjusted: New global.
7495 (ppc_arch_setup): Adjust to the current process'es target
7497 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7498 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7499 (ppc_store_evrregset): Adjust.
7500 (target_regsets): Rename to ...
7501 (ppc_regsets): ... this, and make static.
7502 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7503 (ppc_regs_info): New function.
7504 (the_low_target): Adjust.
7505 (initialize_low_arch): New function.
7506 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7507 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7508 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7509 (tdesc_s390x_linux64v2): Declare.
7510 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7511 (s390_fill_gregset, s390_store_last_break): Adjust.
7512 (target_regsets): Rename to ...
7513 (s390_regsets): ... this, and make static.
7514 (s390_get_pc, s390_set_pc): Adjust.
7515 (s390_get_hwcap): New target_desc parameter, and use it.
7516 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7517 (s390_arch_setup): Adjust to set the current process'es target
7518 description. Don't adjust the regmap.
7519 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7520 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7521 (regs_info_3264): New globals.
7522 (s390_regs_info): New function.
7523 (the_low_target): Adjust.
7524 (initialize_low_arch): New function.
7525 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7526 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7527 [__mips64] (init_registers_mips_linux)
7528 (init_registers_mips_dsp_linux): Delete defines.
7529 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7530 (have_dsp): New global.
7531 (mips_read_description): New, based on mips_arch_setup.
7532 (mips_arch_setup): Reimplement.
7533 (get_usrregs_info): New function.
7534 (mips_cannot_fetch_register, mips_cannot_store_register)
7535 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7536 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7537 (target_regsets): Rename to ...
7538 (mips_regsets): ... this, and make static.
7539 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7540 (dsp_regs_info, regs_info): New globals.
7541 (mips_regs_info): New function.
7542 (the_low_target): Adjust.
7543 (initialize_low_arch): New function.
7544 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7545 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7547 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7548 (arm_read_description): New, with bits factored from
7550 (arm_arch_setup): Reimplement.
7551 (target_regsets): Rename to ...
7552 (arm_regsets): ... this, and make static.
7553 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7554 (arm_regs_info): New function.
7555 (the_low_target): Adjust.
7556 (initialize_low_arch): New function.
7557 * linux-m68k-low.c (tdesc_m68k): Declare.
7558 (target_regsets): Rename to ...
7559 (m68k_regsets): ... this, and make static.
7560 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7561 (m68k_regs_info): New function.
7562 (m68k_arch_setup): New function.
7563 (the_low_target): Adjust.
7564 (initialize_low_arch): New function.
7565 * linux-sh-low.c (tdesc_sharch): Declare.
7566 (target_regsets): Rename to ...
7567 (sh_regsets): ... this, and make static.
7568 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7569 (sh_regs_info, sh_arch_setup): New functions.
7570 (the_low_target): Adjust.
7571 (initialize_low_arch): New function.
7572 * linux-bfin-low.c (tdesc_bfin): Declare.
7573 (bfin_arch_setup): New function.
7574 (bfin_usrregs_info, regs_info): New globals.
7575 (bfin_regs_info): New function.
7576 (the_low_target): Adjust.
7577 (initialize_low_arch): New function.
7578 * linux-cris-low.c (tdesc_cris): Declare.
7579 (cris_arch_setup): New function.
7580 (cris_usrregs_info, regs_info): New globals.
7581 (cris_regs_info): New function.
7582 (the_low_target): Adjust.
7583 (initialize_low_arch): New function.
7584 * linux-cris-low.c (tdesc_crisv32): Declare.
7585 (cris_arch_setup): New function.
7586 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7587 (cris_regs_info): New function.
7588 (the_low_target): Adjust.
7589 (initialize_low_arch): New function.
7590 * linux-m32r-low.c (tdesc_m32r): Declare.
7591 (m32r_arch_setup): New function.
7592 (m32r_usrregs_info, regs_info): New globals.
7593 (m32r_regs_info): Adjust.
7594 (initialize_low_arch): New function.
7595 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7596 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7597 (tic6x_usrregs_info): Forward declare.
7598 (tic6x_read_description): New function, based on ...
7599 (tic6x_arch_setup): ... this. Reimplement.
7600 (target_regsets): Rename to ...
7601 (tic6x_regsets): ... this, and make static.
7602 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7603 (tic6x_regs_info): New function.
7604 (the_low_target): Adjust.
7605 (initialize_low_arch): New function.
7606 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7607 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7608 (target_regsets): Rename to ...
7609 (xtensa_regsets): ... this, and make static.
7610 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7612 (xtensa_arch_setup, xtensa_regs_info): New functions.
7613 (the_low_target): Adjust.
7614 (initialize_low_arch): New function.
7615 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7616 (nios2_arch_setup): Set the current process'es tdesc.
7617 (target_regsets): Rename to ...
7618 (nios2_regsets): ... this.
7619 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7620 (nios2_regs_info): New function.
7621 (the_low_target): Adjust.
7622 (initialize_low_arch): New function.
7623 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7624 (aarch64_arch_setup): Set the current process'es tdesc.
7625 (target_regsets): Rename to ...
7626 (aarch64_regsets): ... this.
7627 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7628 (aarch64_regs_info): New function.
7629 (the_low_target): Adjust.
7630 (initialize_low_arch): New function.
7631 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7633 (target_regsets): Rename to ...
7634 (tile_regsets): ... this.
7635 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7636 (tile_regs_info): New function.
7637 (tile_arch_setup): Set the current process'es tdesc.
7638 (the_low_target): Adjust.
7639 (initialize_low_arch): New function.
7640 * spu-low.c (tdesc_spu): Declare.
7641 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7642 * win32-arm-low.c (tdesc_arm): Declare.
7643 (arm_arch_setup): New function.
7644 (the_low_target): Install arm_arch_setup instead of
7646 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7647 (init_windows_x86): Rename to ...
7648 (i386_arch_setup): ... this. Set `win32_tdesc'.
7649 (the_low_target): Adjust.
7650 * win32-low.c (win32_tdesc): New global.
7651 (child_add_thread): Don't create the thread cache here.
7652 (do_initial_child_stuff): Set the new process'es tdesc.
7653 * win32-low.h (struct target_desc): Forward declare.
7654 (win32_tdesc): Declare.
7655 * lynx-i386-low.c (tdesc_i386): Declare global.
7656 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7657 * lynx-low.c (lynx_tdesc): New global.
7658 (lynx_add_process): Set the new process'es tdesc.
7659 * lynx-low.h (struct target_desc): Forward declare.
7660 (lynx_tdesc): Declare global.
7661 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7662 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7663 * nto-low.c (nto_tdesc): New global.
7664 (do_attach): Set the new process'es tdesc.
7665 * nto-low.h (struct target_desc): Forward declare.
7666 (nto_tdesc): Declare.
7667 * nto-x86-low.c (tdesc_i386): Declare.
7668 (nto_x86_arch_setup): Set `nto_tdesc'.
7670 2013-06-04 Gary Benson <gbenson@redhat.com>
7672 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7673 to qSupported response when appropriate.
7674 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7675 with nonzero-length annex.
7676 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7677 arguments supplied in annex.
7679 2013-05-31 Doug Evans <dje@google.com>
7682 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7683 64 bits in 64-cross-32 environment.
7685 2013-05-28 Pedro Alves <palves@redhat.com>
7687 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7688 (aarch64-without-fpu.c): Delete rule.
7689 * configure.srv (aarch64*-*-linux*): Remove references to
7690 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7691 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7694 2013-05-24 Pedro Alves <palves@redhat.com>
7696 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7697 instead of strchr/decode_address. Error if the range isn't split
7698 with a ','. Don't assume there's be a ':' in the action.
7700 2013-05-23 Yao Qi <yao@codesourcery.com>
7701 Pedro Alves <palves@redhat.com>
7703 * linux-low.c (lwp_in_step_range): New function.
7704 (linux_wait_1): If the thread was range stepping and stopped
7705 outside the stepping range, report the stop to GDB. Otherwise,
7706 continue stepping. Add range stepping debug output.
7707 (linux_set_resume_request): Copy the step range from the resume
7709 (linux_supports_range_stepping): New.
7710 (linux_target_ops) <supports_range_stepping>: Set to
7711 linux_supports_range_stepping.
7712 * linux-low.h (struct linux_target_ops)
7713 <supports_range_stepping>: New field.
7714 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7715 * linux-x86-low.c (x86_supports_range_stepping): New.
7716 (the_low_target) <supports_range_stepping>: Set to
7717 x86_supports_range_stepping.
7718 * server.c (handle_v_cont): Handle 'r' action.
7719 (handle_v_requests): Append ";r" if the target supports range
7721 * target.h (struct thread_resume) <step_range_start,
7722 step_range_end>: New fields.
7723 (struct target_ops) <supports_range_stepping>:
7725 (target_supports_range_stepping): New macro.
7727 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7729 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7730 confusion in comment.
7732 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7734 * lynx-low.c (struct process_info_private): New type.
7735 (lynx_add_process): New function.
7736 (lynx_create_inferior, lynx_attach): Replace calls to
7737 add_process by calls to lynx_add_process.
7738 (lynx_resume): If PTID is null, then try using
7739 current_process()->private->last_wait_event_ptid.
7741 (lynx_clear_inferiors): Delete. The contents of that function
7742 has been inlined in lynx_mourn;
7743 (lynx_wait_1): Save the ptid in the process's private data.
7744 (lynx_mourn): Free the process' private data. Replace call
7745 to lynx_clear_inferiors by call to clear_inferiors.
7747 2013-05-17 Yao Qi <yao@codesourcery.com>
7749 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7752 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7754 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7755 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7756 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7757 PT_TEXT_END_ADDR guards. Update comments.
7758 (linux_target_op) <read_offsets>: Conditionally define to
7759 linux_read_offsets if the target is UCLIBC and if it defines
7760 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7762 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7763 Andrew Jenner <andrew@codesourcery.com>
7765 * Makefile.in (SFILES): Add linux-nios2-low.c.
7766 (clean): Add action to delete nios2-linux.c.
7767 (nios2-linux.c): New rule.
7768 * configure.srv: Add nios2*-*-linux*.
7769 * linux-nios2-low.c: New.
7771 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7773 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7775 2013-04-25 Hui Zhu <hui@codesourcery.com>
7778 * ax.c (ax_printf): Add fflush.
7780 2013-04-22 Tom Tromey <tromey@redhat.com>
7782 * Makefile.in (SFILES): Add filestuff.c.
7783 (OBS): Add filestuff.o.
7784 (filestuff.o): New target.
7785 * config.in, configure: Rebuild.
7786 * configure.ac: Check for fdwalk, pipe2.
7788 2013-04-17 Pedro Alves <palves@redhat.com>
7790 * configure.ac (USE_THREAD_DB): Delete variable.
7791 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7792 Don't AC_SUBST USE_THREAD_DB.
7793 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7794 * config.in, configure: Regenerate.
7796 2013-04-16 Pedro Alves <palves@redhat.com>
7798 * linux-low.h (struct lwp_info) <thread_known>: Move under
7799 the USE_THREAD_DB #ifdef.
7801 2013-04-16 Pedro Alves <palves@redhat.com>
7803 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7804 (linux-low.o): Delete rule.
7805 * linux-low.h: Always include "gdb_thread_db.h" instead of
7806 conditionally including thread_db.h.
7807 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7810 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7812 * Makefile.in (install-only): Fix make install regression.
7814 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7816 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7817 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7819 * gdbserver.1: Remove.
7821 2013-03-22 Pedro Alves <palves@redhat.com>
7823 * linux-low.c (handle_extended_wait): Don't call
7824 linux_enable_event_reporting.
7826 2013-03-15 Tony Theodore <tonyt@logyst.com>
7829 * Makefile.in (SHELL): Use @SHELL@.
7831 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7833 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7836 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7838 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7839 Remove extraneous NULL element.
7841 2013-03-13 Yao Qi <yao@codesourcery.com>
7843 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7844 'V' block in trace frame.
7846 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7848 * target.h (struct target_ops): Add btrace ops.
7849 (target_supports_btrace): New macro.
7850 (target_enable_btrace): New macro.
7851 (target_disable_btrace): New macro.
7852 (target_read_btrace): New macro.
7853 * gdbthread.h (struct thread_info): Add btrace field.
7854 * server.c: Include btrace-common.h.
7855 (handle_btrace_general_set): New function.
7856 (handle_btrace_enable): New function.
7857 (handle_btrace_disable): New function.
7858 (handle_general_set): Call handle_btrace_general_set.
7859 (handle_qxfer_btrace): New function.
7860 (struct qxfer qxfer_packets[]): Add btrace entry.
7861 * inferiors.c (remove_thread): Disable btrace.
7862 * linux-low: Include linux-btrace.h.
7863 (linux_low_enable_btrace): New function.
7864 (linux_low_read_btrace): New function.
7865 (linux_target_ops): Add btrace ops.
7866 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7867 Add srv_linux_btrace=yes.
7868 (x86_64-*-linux*): Add linux-btrace.o.
7869 Add srv_linux_btrace=yes.
7870 * configure.ac: Define HAVE_LINUX_BTRACE.
7871 * config.in: Regenerated.
7872 * configure: Regenerated.
7874 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7876 * server.c (handle_qxfer): Preserve error message if -3 is
7878 (qxfer): Document the -3 return value.
7880 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7882 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7883 (linux_btrace_h): New variable.
7884 (linux-btrace.o): New rule.
7886 2013-03-08 Stan Shebs <stan@codesourcery.com>
7887 Hafiz Abid Qadeer <abidh@codesourcery.com>
7889 * tracepoint.c (trace_buffer_size): New global.
7890 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7891 (init_trace_buffer): Change to one-argument function. Allocate
7892 trace buffer memory.
7893 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7894 handle QTBuffer:size packet.
7895 (cmd_bigqtbuffer_size): New function.
7896 (initialize_tracepoint): Call init_trace_buffer with
7897 DEFAULT_TRACE_BUFFER_SIZE.
7898 * server.c (handle_query): Add QTBuffer:size in the
7901 2013-03-07 Yao Qi <yao@codesourcery.com>
7903 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7904 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7906 (cmd_qtsp): Adjust condition. Do post increment.
7907 Set cur_action and cur_step_action back to 0.
7909 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7912 * linux-low.c (linux_write_memory): Return early success if LEN is
7915 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7917 * configure.srv: Add x86_64-*-cygwin* as target.
7919 2013-02-28 Tom Tromey <tromey@redhat.com>
7921 * configure.ac: Invoke AC_SYS_LARGEFILE.
7922 * configure, config.in: Rebuild.
7924 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7926 * win32-low.c: Throughout, fix format strings and casts of
7927 printf-like functions to avoid type related warnings on all
7929 (get_child_debug_event): Print dwDebugEventCode as hex since
7930 that's how it's usually documented.
7932 2013-02-28 Yao Qi <yao@codesourcery.com>
7934 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7937 2013-02-27 Jiong Wang <jiwang@tilera.com>
7939 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7940 (reg-tilegx32.c): New rule.
7941 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7942 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7943 different register info initializer according to elf class.
7944 (init_registers_tilgx32): New function. The tilegx32 register info
7946 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7947 (tile_store_gregset): Likewise.
7949 2013-02-27 Yao Qi <yao@codesourcery.com>
7951 * server.c (process_point_options): Print debug message when
7952 debug_threads is true.
7954 2013-02-26 Yao Qi <yao@codesourcery.com>
7956 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7958 2013-02-19 Pedro Alves <palves@redhat.com>
7959 Kai Tietz <ktietz@redhat.com>
7963 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7964 instead of strtoul to extract address from packet.
7965 (process_serial_event) <'z'>: Likewise.
7967 2013-02-18 Yao Qi <yao@codesourcery.com>
7969 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7971 2013-02-14 Pedro Alves <palves@redhat.com>
7975 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7976 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7978 2013-02-14 Pedro Alves <palves@redhat.com>
7980 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7982 2013-02-14 Pedro Alves <palves@redhat.com>
7984 * tracepoint.c (save_string): Delete.
7985 (add_tracepoint_action): Use savestring instead of save_string.
7987 2013-02-12 Pedro Alves <palves@redhat.com>
7989 * linux-xtensa-low.c: Ditto.
7990 * xtensa-xtregs.c: Ditto.
7992 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7994 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7997 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7999 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8000 aarch64_num_wp_regs and aarch64_num_bp_regs to
8001 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8003 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8005 * linux-aarch64-low.c (ps_get_thread_area): Replace
8006 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8008 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8009 Marcus Shawcroft <marcus.shawcroft@arm.com>
8010 Nigel Stephens <nigel.stephens@arm.com>
8011 Yufeng Zhang <yufeng.zhang@arm.com>
8013 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8014 (aarch64.c, aarch64-without-fpu.c): New targets.
8015 * configure.srv (aarch64*-*-linux*): New.
8016 * linux-aarch64-low.c: New file.
8018 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8020 * linux-low.c (handle_extended_wait, linux_create_inferior)
8021 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8022 (dequeue_one_deferred_signal, linux_resume_one_thread)
8023 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8024 (linux_tracefork_grandchild, linux_test_for_tracefork)
8025 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8026 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8027 where the argument is 0.
8029 2013-01-25 Yao Qi <yao@codesourcery.com>
8031 * event-loop.c: Include "queue.h".
8032 (gdb_event_p): New typedef.
8033 (struct gdb_event) <next_event>: Remove.
8034 (event_queue): Change to QUEUE(gdb_event_p).
8035 (async_queue_event): Remove.
8036 (gdb_event_xfree): New.
8037 (initialize_event_loop): New.
8038 (process_event): Use API from QUEUE.
8039 (wait_for_event): Likewise.
8040 * server.c (main): Call initialize_event_loop.
8041 * server.h (initialize_event_loop): Declare.
8043 2013-01-18 Yao Qi <yao@codesourcery.com>
8045 * ax.h (struct eval_agent_expr_context): New.
8046 (gdb_eval_agent_expr): Update declaration.
8047 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8048 TFRAME. Add new argument CTX.
8049 * server.h (struct eval_agent_expr_context): Declare.
8050 (agent_mem_read, agent_tsv_read): Update declaration.
8051 (agent_mem_read_string): Likewise.
8052 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8053 (add_traceframe_block): Add new argument TPOINT.
8054 Increase TPOINT->traceframe_usage.
8055 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8056 eval_tracepoint_agent_expr.
8057 (condition_true_at_tracepoint): Likewise.
8058 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8059 (agent_mem_read_string, agent_tsv_read): Likewise.
8061 2013-01-16 Yao Qi <yao@codesourcery.com>
8063 * linux-low.c (linux_resume_one_lwp): Don't check
8064 'lwp->bp_reinsert != 0'.
8066 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8067 Pedro Alves <palves@redhat.com>
8069 * lynx-low.c (ptrace_request_to_str): Define a temporary
8070 macro and use it to simplify this function's implementation.
8072 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8074 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8077 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8079 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8081 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8083 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8085 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8087 * lynx-low.c (lynx_resume): Use the resume_info parameter
8088 to determine the ptid for the lynx_ptrace call, unless
8089 it is equal to minus_one_ptid, in which case we use the
8090 ptid of the current_inferior.
8091 (lynx_wait_1): After having received a thread create/exit
8092 event, resume the inferior's execution using the signaling
8093 thread's ptid, rather than the old ptid.
8095 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8097 * lynx-low.c (lynx_resume): Delete variable ret.
8099 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8101 * gdbreplay.c (gdbreplay_version): Update copyright year.
8102 * server.c (gdbserver_version): Likewise.
8104 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8106 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8109 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8111 * lynx-low.c (ptrace_request_to_str): Add handling for
8114 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8116 * lynx-low.c (lynx_attach): Delete variable new_process.
8118 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8120 * lynx-low.c (lynx_create_inferior): Delete variable
8123 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8125 * lynx-low.c (ptrace_request_to_str): Do not handle
8126 PTRACE_GETTHREADLIST if this macro does not exist.
8128 2012-12-15 Yao Qi <yao@codesourcery.com>
8130 * Makefile.in (OBS): Add notif.o.
8131 * notif.c, notif.h: New.
8132 * server.c: Include "notif.h".
8133 (struct vstop_notif) <next>: Remove.
8135 (queue_stop_reply): Update.
8136 (push_event, send_next_stop_reply): Remove.
8137 (discard_queued_stop_replies): Update.
8138 (notif_stop): New variable.
8139 (handle_v_stopped): Remove.
8140 (handle_v_requests): Don't call handle_v_stopped. Call
8141 handle_ack_notif instead.
8142 (queue_stop_reply_callback): Call notif_event_enque instead
8143 of queue_stop_reply.
8144 (handle_status): Don't call send_next_stop_reply, call
8145 notif_write_event instead.
8146 (kill_inferior_callback): Likewise.
8147 (detach_or_kill_inferior_callback): Likewise.
8148 (main): Call initialize_notif.
8149 (process_serial_event): Call QUEUE_is_empty.
8150 (handle_target_event): Call notif_push instead of push event.
8151 * server.h (push_event): Remove declaration.
8153 2012-12-10 Tom Tromey <tromey@redhat.com>
8155 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8156 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8159 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8160 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8161 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8162 (amd64-linux-ipa.o, ax.o): Rewrite.
8163 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8164 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8165 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8166 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8167 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8168 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8169 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8170 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8171 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8172 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8173 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8174 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8175 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8176 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8177 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8178 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8179 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8180 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8181 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8182 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8183 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8184 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8185 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8186 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8187 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8188 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8189 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8190 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8191 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8192 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8193 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8194 (reg-tilegx.o): Remove.
8195 (all_object_files): New macro.
8196 Include .deps files.
8197 * aclocal.m4, configure: Rebuild.
8198 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8199 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8200 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8202 2012-12-05 Tom Tromey <tromey@redhat.com>
8205 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8207 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8209 * configure.ac: Check for linux/perf_event.h.
8210 * config.in: Regenerated.
8211 * configure: Regenerated.
8213 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8215 * hostio.c (handle_readlink): Decrease buffer size
8216 parameter passed to readlink by one byte.
8218 2012-11-26 Yao Qi <yao@codesourcery.com>
8220 * configure.ac (build_warnings): Append '-Wempty-body'.
8221 * configure: Regenerated.
8222 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8225 2012-11-15 Pierre Muller <muller@sourceware.org>
8227 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8228 * config.in: Regenerate.
8229 * configure: Regenerate.
8230 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8231 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8232 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8233 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8235 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8236 instead of <sys/wait.h> header.
8237 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8239 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8241 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8242 (various make rules): Remove -DGDBSERVER
8244 2012-11-09 Yao Qi <yao@codesourcery.com>
8246 * spu-low.c (current_ptid): Move it to ..
8247 * gdbthread.h: ... here. New.
8248 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8249 * server.c (myresume, process_serial_event): Likewise.
8250 * thread-db.c (thread_db_find_new_threads): Likewise.
8251 * tracepoint.c (run_inferior_command): Likewise.
8253 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8255 * server.c (handle_search_memory_1): Include access length in
8258 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8260 * linux-crisv32-low.c: Fix compile errors.
8262 2012-09-04 Yao Qi <yao@codesourcery.com>
8264 * tracepoint.c (cmd_qtsv): Adjust debug message.
8265 Don't check CUR_TPOINT.
8267 2012-08-28 Yao Qi <yao@codesourcery.com>
8269 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8270 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8271 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8272 Remove declarations of xmalloc, xreallloc, xstrdup and
8274 * Makefile.in (libiberty_h): New.
8275 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8276 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8278 2012-08-23 Yao Qi <yao@codesourcery.com>
8280 * server.h: Remove declaration of 'xsnprintf'.
8282 2012-08-22 Keith Seitz <keiths@redhat.com>
8284 * server.h: Include build-gnulib-gbserver/config.h.
8285 * gdbreplay.c: Likewise.
8287 2012-08-08 Doug Evans <dje@google.com>
8289 * Makefile.in (SFILES): Add gdb_vecs.c.
8290 (OBS): Add gdb_vecs.o.
8291 (gdb_vecs_h, host_defs_h): New variables.
8292 (thread-db.o): Add $(gdb_vecs_h) dependency.
8293 (gdb_vecs.o): New rule.
8294 * thread-db.c: #include "gdb_vecs.h".
8295 (thread_db_load_search): Use a vector to iterate over path elements.
8296 Handle text appearing after "$pdir".
8298 * configure.ac: Add check for strstr.
8299 * config.in: Regenerate.
8300 * configure: Regenerate.
8302 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8304 * hostio.c (handle_pread): If pread fails, fall back to attempting
8306 (handle_pwrite): Likewise for pwrite.
8308 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8310 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8311 between unsupported TYPE and unimplementable ADDR/LEN combination.
8312 (arm_insert_point): Act on new return value.
8314 2012-07-31 Pedro Alves <palves@redhat.com>
8316 * server.c (process_point_options): Only skip tokens if we find
8317 one that is unrecognized. Don't treat 'X' specially while
8318 skipping unrecognized tokens.
8320 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8322 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8323 to 4-byte-align HW breakpoint addresses for Thumb.
8325 2012-07-27 Yao Qi <yao@codesourcery.com>
8329 * server.h: Declare gdb_agent_about_to_close.
8330 * target.c (kill_inferior): Include "agent.h".
8331 New. Send command 'kill'.
8332 * target.h (kill_inferior): Removed macro.
8333 * tracepoint.c (gdb_agent_about_to_close): New.
8334 (gdb_agent_helper_thread): Handle command 'close'.
8335 Wait endlessly until the inferior stops.
8336 Install gdb_agent_remove_socket to atexit hook.
8337 (agent_socket_name): New static variable.
8338 (gdb_agent_socket_init): Replace local variable 'name' with
8339 'agent_socket_name'.
8340 (gdb_agent_remove_socket): New.
8342 2012-07-27 Yao Qi <yao@codesourcery.com>
8344 * server.c (process_point_options): Stop at 'X' when parsing.
8346 2012-07-19 Michael Eager <eager@eagercon.com>
8348 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8350 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8351 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8352 hardware breakpoint.
8354 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8356 * gdbserver/linux-low.c (initialize_low): Call
8357 linux_ptrace_init_warnings.
8359 2012-07-02 Doug Evans <dje@google.com>
8361 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8364 2012-07-02 Stan Shebs <stan@codesourcery.com>
8366 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8367 (ax.o): Add it to build rule.
8369 (OBS): Add format.o.
8370 (IPA_OBS): Add format.o.
8371 * server.c (handle_query): Claim support for breakpoint commands.
8372 (process_point_options): Add command case.
8373 (process_serial_event): Leave running if there are printfs in
8375 * mem-break.h (any_persistent_commands): Declare.
8376 (add_breakpoint_commands): Declare.
8377 (gdb_no_commands_at_breakpoint): Declare.
8378 (run_breakpoint_commands): Declare.
8379 * mem-break.c (struct point_command_list): New struct.
8380 (struct breakpoint): New field command_list.
8381 (any_persistent_commands): New function.
8382 (add_commands_to_breakpoint): New function.
8383 (add_breakpoint_commands): New function.
8384 (gdb_no_commands_at_breakpoint): New function.
8385 (run_breakpoint_commands): New function.
8386 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8388 * ax.c: Include format.h.
8389 (ax_printf): New function.
8390 (gdb_eval_agent_expr): Add printf opcode.
8392 2012-06-13 Yao Qi <yao@codesourcery.com>
8394 * server.c (start_inferior): Remove duplicated writes to fields
8395 'last_resume_kind' and 'last_status' of 'current_inferior'.
8397 2012-06-12 Yao Qi <yao@codesourcery.com>
8398 Pedro Alves <palves@redhat.com>
8400 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8402 * server.c (handle_v_cont): Extend comment.
8404 2012-06-11 Yao Qi <yao@codesourcery.com>
8406 * linux-low.c (linux_attach): Add 'static'.
8408 2012-06-06 Yao Qi <yao@codesourcery.com>
8410 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8412 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8414 Fix gcc -flto compilation warning.
8415 * server.c (main): Make variable multi_mode and attach volatile.
8417 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8419 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8420 if the platform doesn't know about it.
8422 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8424 * Makefile.in (SFILES): Add linux-tile-low.c.
8425 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8426 * configure.srv: Handle tilegx-*-linux*.
8427 * linux-tile-low.c: New file.
8429 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8431 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8433 2012-05-24 Pedro Alves <palves@redhat.com>
8437 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8439 2012-05-24 Pedro Alves <palves@redhat.com>
8443 Replace target_signal with gdb_signal throughout.
8445 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8447 * linux-low.c (linux_store_registers): Avoid the copying sequence
8448 when no data has been retrieved by ptrace.
8450 2012-05-22 Will Deacon <will.deacon@arm.com>
8452 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8453 Include asm/ptrace.h.
8454 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8457 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8459 * linux-low.c (linux_store_registers): Don't re-retrieve data
8460 with ptrace that has already been obtained from /proc. Always
8461 copy any data retrieved with ptrace to the buffer supplied.
8463 2012-05-11 Yao Qi <yao@codesourcery.com>
8464 Pedro Alves <palves@redhat.com>
8466 * linux-low.c (enum stopping_threads_kind): New.
8467 (stopping_threads): Change type to `enum stopping_threads_kind'.
8468 (handle_extended_wait): If stopping and suspending threads, leave
8469 the new_lwp suspended too.
8470 (linux_wait_for_event): Adjust.
8471 (stop_all_lwps): Set `stopping_threads' to
8472 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8473 whether we're suspending threads or just stopping them. Assert no
8476 2012-04-29 Yao Qi <yao@codesourcery.com>
8478 * server.h: Move some code to ...
8479 * gdbthread.h: ... here. New.
8480 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8481 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8482 (nto-low.o, win32-low.o): Likewise.
8483 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8484 * regcache.c, remote-utils.c, server.c: Likewise.
8485 * target.c, tracepoint.c, win32-low.c: Likewise.
8487 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8489 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8490 (PTRACE_ARG4_TYPE): Likewise.
8491 (PTRACE_XFER_TYPE): Likewise.
8492 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8493 ptrace to PTRACE_ARG3_TYPE.
8494 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8495 (PTRACE_ARG4_TYPE): Likewise.
8496 (PTRACE_XFER_TYPE): Likewise.
8497 (linux_detach_one_lwp): Cast fourth argument of
8498 ptrace to long then PTRACE_ARG4_TYPE.
8499 (regsets_fetch_inferior_registers): Cast third argument of
8500 ptrace to long then PTRACE_ARG3_TYPE.
8501 (regsets_store_inferior_registers): Likewise.
8503 2012-04-20 Pedro Alves <palves@redhat.com>
8505 * configure: Regenerate.
8507 2012-04-19 Pedro Alves <palves@redhat.com>
8509 * Makefile.in (GNULIB_BUILDDIR): New.
8510 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8511 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8512 (all, install-only, uninstall, clean-info, all-lib, clean): No
8513 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8514 (maintainer-clean realclean distclean): Use subdir_do.
8516 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8517 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8518 * acinclude.m4: Include acx_configure_dir.m4.
8519 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8520 calls. Call AC_PROG_RANLIB. Configure gnulib using
8523 (GNULIB_STDINT_H): Adjust.
8524 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8525 * gdbreplay.c: Include build-gnulib/config.h.
8526 * server.h: Likewise.
8527 * aclocal.m4: Regenerate.
8528 * config.in: Regenerate.
8529 * configure: Regenerate.
8531 2012-04-19 Pedro Alves <palves@redhat.com>
8533 * Makefile.in (LIBGNU, INCGNU): Adjust.
8534 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8535 (all, install-only, uninstall, clean-info, all-lib, clean)
8536 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8537 * configure.ac: Adjust AC_OUTPUT output.
8538 * aclocal.m4: Regenerate.
8539 * configure: Regenerate.
8541 2012-04-19 Pedro Alves <palves@redhat.com>
8543 * Makefile.in (generated_files): New.
8544 (server_h): Remove the explicit dependency on config.h, and depend
8545 on $generated_files.
8547 2012-04-19 Pedro Alves <palves@redhat.com>
8549 * Makefile.in (INCGNU): Add -Ignulib.
8551 2012-04-19 Pedro Alves <palves@redhat.com>
8553 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8554 (INCGNU): ... this, and spell out -I here.
8555 (GNULIB_LIB): Rename to ...
8557 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8559 2012-04-19 Pedro Alves <palves@redhat.com>
8561 * config.in: Regenerate.
8563 2012-04-19 Pedro Alves <palves@redhat.com>
8565 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8566 * server.h (memmem): Remove declaration.
8567 * config.in: Regenerate.
8568 * configure: Regenerate.
8570 2012-04-19 Yao Qi <yao@codesourcery.com>
8572 * Makefile.in (SFILES): Add common/vec.c.
8576 2012-04-19 Yao Qi <yao@codesourcery.com>
8578 * remote-utils.c (prepare_resume_reply): Replace with macro
8579 target_core_of_thread.
8580 * server.c (handle_qxfer_threads_proper): Likewise.
8581 * target.h (traget_core_of_thread): New macro.
8583 2012-04-18 Pedro Alves <palves@redhat.com>
8585 * aclocal.m4: Regenerate.
8586 * configure: Regenerate.
8588 2012-04-16 Yao Qi <yao@codesourcery.com>
8590 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8591 duplicated on address.
8593 2012-04-16 Yao Qi <yao@codesourcery.com>
8595 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8596 (struct tracepoint_action_ops) <send>: New field.
8597 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8598 (agent_expr_send, x_tracepoint_action_send): New.
8599 (l_tracepoint_action_send): New.
8600 (cmd_qtdp): Download and install tracepoint
8601 according to `use_agent'.
8602 (run_inferior_command): Add one more parameter `len'.
8604 (tracepoint_send_agent): New.
8605 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8607 2012-04-16 Yao Qi <yao@codesourcery.com>
8609 * tracepoint.c (download_tracepoints): Moved to ...
8610 (cmd_qtstart): ... here.
8612 2012-04-14 Yao Qi <yao@codesourcery.com>
8614 * tracepoint.c: Include inttypes.h.
8615 (struct collect_memory_action): Use sized types.
8616 (struct tracepoint): Likewise.
8617 (cmd_qtdp, stop_tracing): Update print specifiers.
8618 (cmd_qtp, response_tracepoint): Likewise.
8619 (collect_data_at_tracepoint): Likewise.
8620 (collect_data_at_step): Likewise.
8622 2012-04-14 Yao Qi <yao@codesourcery.com>
8624 Import gnulib module inttypes.
8625 * aclocal.m4, config.in, configure: Regenerated.
8627 2012-04-14 Yao Qi <yao@codesourcery.com>
8629 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8630 Makefile and config.status at last.
8632 2012-04-13 Yao Qi <yao@codesourcery.com>
8634 * tracepoint.c: Include stdint.h unconditionally.
8636 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8638 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8639 on BFD_HAVE_SYS_PROCFS_TYPE.
8640 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8641 * configure: Regenerate.
8642 * config.in: Likewise.
8644 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8646 * Makefile.in (clean): Also remove x32.c x32-linux.c
8647 x32-avx.c x32-avx-linux.c.
8648 (x32.o): New target.
8650 (x32-linux.o): Likewise.
8651 (x32-linux.c): Likewise.
8652 (x32-avx.o): Likewise.
8653 (x32-avx.c): Likewise.
8654 (x32-avx-linux.o): Likewise.
8655 (x32-avx-linux.c): Likewise.
8657 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8658 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8659 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8660 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8661 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8662 i386/x32-avx-linux.xml.
8664 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8665 (init_registers_x32_avx_linux): Likwise.
8666 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8667 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8669 2012-04-13 Pedro Alves <palves@redhat.com>
8671 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8672 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8673 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8674 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8677 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8679 * linux-x86-low.c (compat_x32_clock_t): New.
8680 (compat_x32_siginfo_t): Likewise.
8681 (compat_x32_siginfo_from_siginfo): Likewise.
8682 (siginfo_from_compat_x32_siginfo): Likewise.
8683 (linux_is_elf64): Likewise.
8684 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8685 and siginfo_from_compat_x32_siginfo for x32.
8686 (x86_arch_setup): Set linux_is_elf64.
8688 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8691 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8693 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8694 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8695 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8696 compatible with process.
8698 2012-04-12 Yao Qi <yao@codesourcery.com>
8700 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8701 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8702 (install-only, install-info, clean): Handle sub dir gnulib.
8703 (all-lib, am--refresh): New targets.
8704 (memmem.o): Remove target.
8705 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8706 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8707 (AC_REPLACE_FUNCS): Remove memmem.
8708 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8709 (AC_OUTPUT): Generate Makefile in gnulib/.
8710 * aclocal.m4, config.in, configure: Regenerated.
8712 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8714 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8716 2012-04-05 Pedro Alves <palves@redhat.com>
8718 -Werror=strict-aliasing
8720 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8723 2012-04-04 Pedro Alves <palves@redhat.com>
8725 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8726 (sparc_store_gregset_from_stack, sparc_store_gregset)
8727 (sparc_breakpoint_at): Fix formatting.
8729 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8731 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8733 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8734 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8735 * config.in: Regenerate.
8736 * configure: Likewise.
8738 2012-03-29 Pedro Alves <palves@redhat.com>
8740 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8741 Correct ptrace arguments.
8743 2012-03-28 Pedro Alves <palves@redhat.com>
8745 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8746 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8747 (IA64_FR1_REGNUM): New defines.
8748 (ia64_fetch_register): New.
8749 (the_low_target): Install it.
8750 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8752 * linux-low.c (linux_fetch_registers): Try the
8753 the_low_target.fetch_register hook first.
8755 * linux-arm-low.c (the_low_target): Adjust.
8756 * linux-bfin-low.c (the_low_target): Adjust.
8757 * linux-cris-low.c (the_low_target): Adjust.
8758 * linux-crisv32-low.c (the_low_target): Adjust.
8759 * linux-m32r-low.c (the_low_target): Adjust.
8760 * linux-m68k-low.c (the_low_target): Adjust.
8761 * linux-mips-low.c (the_low_target): Adjust.
8762 * linux-ppc-low.c (the_low_target): Adjust.
8763 * linux-s390-low.c (the_low_target): Adjust.
8764 * linux-sh-low.c (the_low_target): Adjust.
8765 * linux-sparc-low.c (the_low_target): Adjust.
8766 * linux-tic6x-low.c (the_low_target): Adjust.
8767 * linux-x86-low.c (the_low_target): Adjust.
8768 * linux-xtensa-low.c (the_low_target): Adjust.
8770 2012-03-26 Pedro Alves <palves@redhat.com>
8772 * server.c (handle_qxfer_libraries): Don't bail early if
8773 the_target->qxfer_libraries_svr4 is not NULL.
8775 2012-03-26 Pedro Alves <palves@redhat.com>
8777 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8779 2012-03-23 Pedro Alves <palves@redhat.com>
8781 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8782 "library-list-svr4" element's start tag when the the DSO list is
8785 2012-03-23 Pedro Alves <palves@redhat.com>
8787 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8788 a variable whose type size is the same as the inferior's pointer
8791 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8793 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8795 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8796 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8797 * linux-low.h: Include <signal.h>.
8798 (struct siginfo): Remove forward declaration.
8799 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8802 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8804 * .gitignore: Ignore more files.
8806 2012-03-19 Pedro Alves <palves@redhat.com>
8807 Jan Kratochvil <jan.kratochvil@redhat.com>
8809 * server.c (cont_thread, general_thread): Add describing comments.
8810 (start_inferior): Clear `cont_thread'.
8811 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8814 2012-03-15 Yao Qi <yao@codesourcery.com>
8816 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8818 (cmd_qtdp): ... here.
8820 2012-03-15 Yao Qi <yao@codesourcery.com>
8822 * tracepoint.c (struct tracepoint_action_ops): New.
8823 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8824 (m_tracepoint_action_download): New.
8825 (r_tracepoint_action_download): New.
8826 (x_tracepoint_action_download): New.
8827 (l_tracepoint_action_download): New.
8828 (add_tracepoint_action): Install `action->ops' according type.
8829 (download_tracepoint_1): Move code `download' function pointer
8830 of various tracepoint_action_ops.
8832 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8834 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8835 linux_ptrace_attach_warnings.
8837 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8839 * Makefile.in (linux-ptrace.o): New.
8840 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8841 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8842 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8843 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8844 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8846 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8848 2012-03-08 Yao Qi <yao@codesourcery.com>
8849 Pedro Alves <palves@redhat.com>
8851 Fix PR server/13392.
8852 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8854 * tracepoint.c (remove_tracepoint): New.
8855 (cmd_qtdp): Call remove_tracepoint when failed to install.
8857 2012-03-07 Pedro Alves <palves@redhat.com>
8859 * linux-low.c (get_detach_signal): New.
8860 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8861 Pass on pending signals to PTRACE_DETACH. Check the result of the
8863 * server.c (program_signals, program_signals_p): New.
8864 (handle_general_set): Handle QProgramSignals.
8865 * server.h (program_signals, program_signals_p): Declare.
8867 2012-03-05 Pedro Alves <palves@redhat.com>
8868 Jan Kratochvil <jan.kratochvil@redhat.com>
8870 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8873 2012-03-03 Yao Qi <yao@codesourcery.com>
8875 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8876 agent_look_up_symbols.
8878 2012-03-03 Yao Qi <yao@codesourcery.com>
8880 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8881 (linux-x86-low.o): Likewise.
8882 * server.h: Remove in_process_agent_loaded.
8883 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8887 2012-03-03 Yao Qi <yao@codesourcery.com>
8889 * tracepoint.c (gdb_agent_capability): New global.
8890 (in_process_agent_loaded_ust): Renamed to
8891 `in_process_agent_supports_ust'.
8893 (in_process_agent_supports_ust): Call agent_capability_check.
8894 (clear_installed_tracepoints): Assert that agent supports
8897 2012-03-03 Yao Qi <yao@codesourcery.com>
8899 * linux-low.c (linux_supports_agent): New.
8900 (linux_target_ops): Initialize field `supports_agent' with
8901 linux_supports_agent.
8902 * target.h (struct target_ops) <supports_agent>: New.
8903 (target_supports_agent): New macro.
8904 * server.c (handle_general_set): Handle packet 'QAgent'.
8905 (handle_query): Send `QAgent+'.
8906 * Makefile.in (server.o): Depends on agent.h.
8908 2012-03-03 Yao Qi <yao@codesourcery.com>
8910 * Makefile.in (OBS): Add agent.o.
8911 Add new rule for agent.o.
8912 Track dependence of tracepoint.c on agent.h.
8913 * tracepoint.c (run_inferior_command_1):
8914 (run_inferior_command): Call agent_run_command.
8915 (gdb_ust_connect_sync_socket): Deleted. Move it to
8917 (resume_thread, stop_thread): Likewise.
8918 (gdb_ust_socket_init): Renamed to ...
8919 (gdb_agent_socket_init): ... New.
8920 (gdb_ust_thread): Renamed to ...
8921 (gdb_agent_helper_thread): ... New.
8922 (gdb_ust_init): Move some code to ...
8923 (gdb_agent_init): ... here. New.
8924 [HAVE_UST]: Call gdb_ust_init.
8925 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8926 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8927 * config.in, configure: Regenerated.
8929 2012-03-02 Pedro Alves <palves@redhat.com>
8931 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8932 * linux-low.c (struct simple_pid_list): New.
8933 (stopped_pids): New a struct simple_pid_list pointer.
8934 (add_to_pid_list, pull_pid_from_list): New.
8935 (handle_extended_wait): Don't assume the first signal new children
8936 report is SIGSTOP. Adjust call to pull_pid_from_list.
8937 (linux_wait_for_lwp): Adjust.
8939 2012-03-02 Yao Qi <yao@codesourcery.com>
8941 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8944 2012-03-02 Yao Qi <yao@codesourcery.com>
8946 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8947 `stop_pc' and `tpoint'. Update caller.
8949 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8951 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8952 * linux-low.c (use_linux_regsets): New macro.
8953 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8954 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8955 (linux_register_in_regsets): New function.
8956 (usr_fetch_inferior_registers): Skip registers covered by
8958 (usr_store_inferior_registers): Likewise.
8959 (usr_fetch_inferior_registers): New macro.
8960 (usr_store_inferior_registers): Likewise.
8961 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8962 (linux_store_registers): Likewise.
8963 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8965 (init_registers_mips64_dsp_linux): Likewise.
8966 (init_registers_mips_linux): New macro.
8967 (init_registers_mips_dsp_linux): Likewise.
8968 (mips_dsp_num_regs): Likewise.
8969 (DSP_BASE, DSP_CONTROL): New fallback macros.
8970 (mips_base_regs): New macro.
8971 (mips_regmap): Use it. Fix the size.
8972 (mips_dsp_regmap): New variable.
8973 (mips_dsp_regset_bitmap): Likewise.
8974 (mips_arch_setup): New function.
8975 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8977 (mips_cannot_store_register): Likewise.
8978 (the_low_target): Update .arch_setup, .num_regs and .regmap
8979 initializers. Add .regset_bitmap initializer.
8980 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8982 * linux-bfin-low.c (the_low_target): Likewise.
8983 * linux-cris-low.c (the_low_target): Likewise.
8984 * linux-crisv32-low.c (the_low_target): Likewise.
8985 * linux-ia64-low.c (the_low_target): Likewise.
8986 * linux-m32r-low.c (the_low_target): Likewise.
8987 * linux-m68k-low.c (the_low_target): Likewise.
8988 * linux-ppc-low.c (the_low_target): Likewise.
8989 * linux-s390-low.c (the_low_target): Likewise.
8990 * linux-sh-low.c (the_low_target): Likewise.
8991 * linux-sparc-low.c (the_low_target): Likewise.
8992 * linux-tic6x-low.c (the_low_target): Likewise.
8993 * linux-x86-low.c (the_low_target): Likewise.
8994 * linux-xtensa-low.c (the_low_target): Likewise.
8995 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8996 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8997 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8999 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9000 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9002 2012-02-29 Yao Qi <yao@codesourcery.com>
9003 Pedro Alves <palves@redhat.com>
9005 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9006 `step_over_finished' is true.
9008 2012-02-27 Pedro Alves <palves@redhat.com>
9010 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9011 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9013 2012-02-27 Pedro Alves <palves@redhat.com>
9016 * linux-low.c (pid_is_stopped): New.
9017 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9019 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9021 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9024 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9026 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9028 2012-02-24 Luis Machado <lgustavo@codesourcery>
9030 * server.c (handle_query): Advertise support for target-side
9031 breakpoint condition evaluation.
9032 (process_point_options): New function.
9033 (process_serial_event): When inserting a breakpoint, check for
9034 a target-side condition that should be evaluated.
9036 * mem-break.c: Include regcache.h and ax.h.
9037 (point_cond_list_t): New data structure.
9038 (breakpoint) <cond_list>: New field.
9039 (find_gdb_breakpoint_at): Make non-static.
9040 (delete_gdb_breakpoint_at): Clear any target-side
9042 (clear_gdb_breakpoint_conditions): New function.
9043 (add_condition_to_breakpoint): Likewise.
9044 (add_breakpoint_condition): Likewise.
9045 (gdb_condition_true_at_breakpoint): Likewise.
9046 (gdb_breakpoint_here): Return result directly instead
9047 of going through a local variable.
9049 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9050 (clear_gdb_breakpoint_conditions): Likewise.
9051 (add_breakpoint_condition): Likewise.
9052 (gdb_condition_true_at_breakpoint): Likewise.
9054 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9055 (need_step_over_p): Take target-side breakpoint condition into
9058 2012-02-24 Luis Machado <lgustavo@codesourcery>
9060 * server.h: Include tracepoint.h.
9061 (agent_mem_read, agent_get_trace_state_variable_value,
9062 agent_set_trace_state_variable_value,
9063 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9064 get_set_tsv_func_addr): New prototypes.
9066 * ax.h: New include file.
9067 * ax.c: New source file.
9069 * tracepoint.c: Include ax.h.
9070 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9071 agent_expr, eval_result_type): Move to ax.h.
9072 (parse_agent_expr): Rename to ...
9073 (gdb_parse_agent_expr): ... this, make it non-static and move
9075 (unparse_agent_expr) Rename to ...
9076 (gdb_unparse_agent_expr): ... this, make it non-static and move
9078 (eval_agent_expr): Rename to ...
9079 (eval_tracepoint_agent_expr): ... this.
9080 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9081 forward declarations.
9082 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9083 (agent_get_trace_state_variable_value): New function.
9084 (agent_set_trace_state_variable_value): New function.
9085 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9086 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9087 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9088 (condition_true_at_tracepoint): Likewise.
9089 (parse_agent_expr): Rename to ...
9090 (gdb_parse_agent_expr): ... this and move to ax.c.
9091 (unparse_agent_expr): Rename to ...
9092 (gdb_unparse_agent_expr): ... this and move to ax.c.
9093 (gdb_agent_op_name): Move to ax.c.
9094 (eval_agent_expr): Rename to ...
9095 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9097 (eval_tracepoint_agent_expr): New function.
9098 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9100 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9102 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9103 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9104 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9105 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9106 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9107 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9108 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9109 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9110 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9111 (compile_bytecodes): Remove forward declaration.
9112 (is_goto_target): Move to ax.c.
9113 (compile_bytecodes): Move to ax.c and call
9114 agent_get_trace_state_variable_value (...) and
9115 agent_set_trace_state_variable_value (...).
9117 * Makefile.in: Update ax.c and IPA dependencies.
9119 2012-02-24 Pedro Alves <palves@redhat.com>
9121 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9122 (cmd_bigqtbuffer_circular): ... this. Only handle
9123 'QTBuffer:circular:'.
9124 (handle_tracepoint_general_set): Adjust.
9126 2012-02-16 Yao Qi <yao@codesourcery.com>
9128 * inferiors.c: Move code to ...
9129 * dll.c: .... here. New.
9130 * server.h: Declare clear_dlls.
9131 * Makefile.in (SFILES): Add dll.c.
9135 2012-02-11 Yao Qi <yao@codesourcery.com>
9137 * server.c: (handle_monitor_command): Add a new parameter
9139 (handle_query): Update caller.
9141 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9143 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9144 * configure, config.in: Regenerate.
9145 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9148 2012-02-02 Pedro Alves <palves@redhat.com>
9150 Try SIGKILL first, then PTRACE_KILL.
9151 * linux-low.c (linux_kill_one_lwp): New.
9152 (linux_kill_one_lwp): Rename to ...
9153 (kill_one_lwp_callback): ... this. Use the new
9156 2012-02-02 Pedro Alves <palves@redhat.com>
9158 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9161 2012-01-27 Pedro Alves <palves@redhat.com>
9163 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9164 (elf_64_file_p): Make static.
9165 (linux_pid_exe_is_elf_64_file): New.
9166 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9167 Delete declarations.
9168 (linux_pid_exe_is_elf_64_file): Declare.
9169 * linux-x86-low.c (x86_arch_setup): Use
9170 linux_pid_exe_is_elf_64_file.
9172 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9174 * linux-low.c (linux_wait_for_event_1): Rename to ...
9175 (linux_wait_for_event): ... here and merge it with former
9176 linux_wait_for_event - new variable wait_ptid, use it.
9177 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9179 2012-01-23 Pedro Alves <palves@redhat.com>
9181 * server.c (main): Avoid yet another case of infinite loop while
9182 detaching/killing after a longjmp.
9184 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9187 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9189 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9191 * hostio.c (handle_readlink): New function.
9192 (handle_vFile): Call it to handle "vFile:readlink" packets.
9194 2012-01-20 Pedro Alves <palves@redhat.com>
9195 Ulrich Weigand <ulrich.weigand@linaro.org>
9197 * server.c (handle_v_requests): Only support vAttach and vRun to
9198 start multiple processes when in extended protocol mode.
9200 2012-01-17 Pedro Alves <palves@redhat.com>
9202 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9203 memalign plus mprotect to allocate the scratch buffer.
9205 2012-01-13 Pedro Alves <palves@redhat.com>
9207 * server.c (attach_inferior): Clear `cont_thread'.
9209 2012-01-13 Pedro Alves <palves@redhat.com>
9211 * server.c (main): Avoid infinite loop while detaching/killing
9214 2012-01-09 Doug Evans <dje@google.com>
9216 * server.c (start_inferior): Set last_ptid in --wrapper case.
9218 2012-01-06 Yao Qi <yao@codesourcery.com>
9220 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9222 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9224 2012-01-04 Yao Qi <yao@codesourcery.com>
9226 * tracepoint.c (cmd_qtdp): Print debug message
9227 for static tracepoint.
9229 2012-01-04 Yao Qi <yao@codesourcery.com>
9231 * tracepoint.c (trace_vdebug): Differentiate debug message
9232 between gdbserver and IPA.
9234 2012-01-03 Yao Qi <yao@codesourcery.com>
9236 * tracepoint.c (tracepoint_was_hit): Don't collect for
9239 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9241 * terminal.h: Reformat copyright header.
9243 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9245 * server.c (gdbserver_version): Update copyright year.
9246 * gdbreplay.c (gdbreplay_version): Likewise.
9248 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9250 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9253 2011-12-18 Hui Zhu <teawater@gmail.com>
9254 * linux-low.c (linux_create_inferior): Save return value to ret.
9256 2011-12-18 Hui Zhu <teawater@gmail.com>
9258 * linux-low.c (linux_create_inferior): Save return value to ret.
9260 2011-12-16 Doug Evans <dje@google.com>
9262 * linux-low.c (linux_create_inferior): If stdio connection,
9263 redirect stdin from /dev/null, stdout to stderr.
9264 * remote-utils.c (remote_is_stdio): New static global.
9265 (remote_connection_is_stdio): New function.
9266 (remote_prepare): Handle stdio connection.
9267 (remote_open): Ditto.
9268 (remote_close): Don't close stdin for stdio connections.
9269 (read_prim,write_prim): New functions. Replace all calls to
9270 read/write to these.
9271 * server.c (main): Watch for "-" argument. Move call to
9272 remote_prepare before start_inferior.
9273 * server.h (STDIO_CONNECTION_NAME): New macro.
9274 (remote_connection_is_stdio): Declare.
9276 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9277 in debugging output.
9279 2011-12-15 Yao Qi <yao@codesourcery.com>
9281 * tracepoint.c: Include sys/syscall.h.
9282 (gdb_ust_thread): Remove preprocessor conditional.
9284 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9286 * linux-low.c (linux_detach_one_lwp): Call
9287 the_low_target.prepare_to_resume before detaching.
9289 2011-12-14 Yao Qi <yao@codesourcery.com>
9291 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9294 2011-12-14 Yao Qi <yao@codesourcery.com>
9296 * i386-low.c (i386_low_stopped_data_address): Initialize local
9299 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9303 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9304 DR_CONTROL unless necessary. Extend comments.
9305 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9306 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9308 2011-12-13 Yao Qi <yao@codesourcery.com>
9310 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9312 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9314 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9316 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9317 Print new debug message for such case.
9319 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9321 Fix overlapping memcpy.
9322 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9323 the read_inferior_memory transfer.
9324 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9325 write_inferior_memory transfer.
9326 (set_fast_tracepoint_jump): New variable buf. Use it for the
9327 read_inferior_memory and write_inferior_memory transfers.
9328 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9329 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9330 Use it for the write_inferior_memory transfer.
9331 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9334 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9336 * linux-low.c (fetch_register, store_register): Make code
9337 consistent, fix formatting.
9339 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9341 * linux-low.c (usr_store_inferior_registers): Factor out code
9342 to handle individual registers into...
9343 (store_register): ... this new function.
9345 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9347 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9348 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9349 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9350 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9351 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9352 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9353 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9354 (srv_xmlfiles): Add new XML files.
9356 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9358 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9359 (init_registers_s390_linux32v1): Add prototype.
9360 (init_registers_s390_linux32v2): Likewise.
9361 (init_registers_s390_linux64v1): Likewise.
9362 (init_registers_s390_linux64v2): Likewise.
9363 (init_registers_s390x_linux64v1): Likewise.
9364 (init_registers_s390x_linux64v2): Likewise.
9365 (s390_num_regs): Increment to 52.
9366 (s390_regmap): Add orig_r2 register.
9367 (s390_num_regs_3264): Increment to 68.
9368 (s390_regmap_3264): Add orig_r2 register.
9369 (s390_collect_ptrace_register): Handle orig_r2 register.
9370 (s390_supply_ptrace_register): Likewise.
9371 (s390_fill_last_break): New function.
9372 (s390_store_last_break): Likewise.
9373 (s390_fill_system_call): New function.
9374 (s390_store_system_call): Likewise.
9375 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9377 (s390_check_regset): New function.
9378 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9379 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9380 Update target_regsets for available register sets.
9382 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9383 Jan Kratochvil <jan.kratochvil@redhat.com>
9385 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9386 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9388 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9389 * linux-low.h (struct process_info_private): New member r_debug.
9390 * server.c (handle_qxfer_libraries): Call
9391 the_target->qxfer_libraries_svr4.
9392 (handle_qxfer_libraries_svr4): New function.
9393 (qxfer_packets): New entry "libraries-svr4".
9394 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9395 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9396 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9397 PACKET_qXfer_libraries_svr4.
9399 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9401 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9402 PSW address/mask between 8-byte and 16-byte formats.
9403 (s390_supply_ptrace_register): Likewise.
9404 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9405 basic addressing mode bit.
9407 2011-11-24 Stan Shebs <stan@codesourcery.com>
9409 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9411 2011-11-17 Stan Shebs <stan@codesourcery.com>
9413 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9414 (tracing_start_time): New global.
9415 (tracing_stop_time): New global.
9416 (tracing_user_name): New global.
9417 (tracing_notes): New global.
9418 (tracing_stop_note): New global.
9419 (cmd_qtstart): Set traceframe_usage, start_time.
9420 (stop_tracing): Set stop_time.
9421 (cmd_qtstatus): Report additional status.
9422 (cmd_qtp): New function.
9423 (handle_tracepoint_query): Call it.
9424 (cmd_qtnotes): New function.
9425 (handle_tracepoint_general_set): Call it.
9426 (get_timestamp): Rename from tsv_get_timestamp.
9428 2011-11-14 Stan Shebs <stan@codesourcery.com>
9429 Kwok Cheung Yeung <kcy@codesourcery.com>
9431 * linux-x86-low.c (small_jump_insn): New.
9432 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9433 trampoline and error message, build a trampoline and issue a small
9434 jump instruction to it.
9435 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9436 trampoline and error message.
9437 (x86_get_min_fast_tracepoint_insn_len): New.
9438 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9439 * linux-low.h (struct linux_target_ops): Add arguments to
9440 install_fast_tracepoint_jump_pad operation, add new operation.
9441 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9443 (linux_get_min_fast_tracepoint_insn_len): New function.
9444 (linux_target_op): Add new operation.
9445 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9446 (gdb_trampoline_buffer_end): Ditto.
9447 (gdb_trampoline_buffer_error): Ditto.
9448 (struct ipa_sym_addresses): Add fields for new IPA variables.
9449 (symbol_list): Add entries for new IPA variables.
9450 (struct tracepoint): Add fields to hold the address range of the
9451 trampoline used by the tracepoint.
9452 (trampoline_buffer_head): New static variable.
9453 (trampoline_buffer_tail): Ditto.
9454 (claim_trampoline_space): New function.
9455 (have_fast_tracepoint_trampoline_buffer): New function.
9456 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9458 (install_fast_tracepoint): Ditto, also add error buffer argument.
9459 (cmd_qtminftpilen): New function.
9460 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9461 (fast_tracepoint_from_trampoline_address): New function.
9462 (fast_tracepoint_collecting): Handle trampoline as part of jump
9464 (set_trampoline_buffer_space): New function.
9465 (initialize_tracepoint): Initialize new IPA variables.
9466 * target.h (struct target_ops): Add arguments to
9467 install_fast_tracepoint_jump_pad operation, add new
9468 get_min_fast_tracepoint_insn_len operation.
9469 (target_get_min_fast_tracepoint_insn_len): New.
9470 (install_fast_tracepoint_jump_pad): Add arguments.
9471 * server.h (IPA_BUFSIZ): Define.
9472 * linux-i386-ipa.c: Include extra header files.
9473 (initialize_fast_tracepoint_trampoline_buffer): New function.
9474 (initialize_low_tracepoint): Call it.
9475 * server.h (set_trampoline_buffer_space): Declare.
9476 (claim_trampoline_space): Ditto.
9477 (have_fast_tracepoint_trampoline_buffer): Ditto.
9479 2011-11-14 Yao Qi <yao@codesourcery.com>
9481 * server.c (handle_query): Handle InstallInTrace for qSupported.
9482 * tracepoint.c (add_tracepoint): Sort list.
9483 (install_tracepoint, download_tracepoint): New.
9484 (cmd_qtdp): Call them to install and download tracepoints.
9485 (sort_tracepoints): Removed.
9486 (cmd_qtstart): Update.
9488 2011-11-14 Yao Qi <yao@codesourcery.com>
9490 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9491 * mem-break.h: Declare.
9492 * tracepoint.c (cmd_qtstart): Move some code to ...
9493 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9495 (download_tracepoints): Move some code to ...
9496 (download_tracepoint_1): ... here. New.
9498 2011-11-08 Yao Qi <yao@codesourcery.com>
9500 * remote-utils.c (relocate_instruction): A comment fix.
9502 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9504 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9505 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9506 dr_status_mirror and dr_control_mirror from debug_reg_state.
9507 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9508 (i386_initial_stuff): Remove use of deleted globals.
9509 (i386_get_thread_context, i386_set_thread_context,
9510 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9511 from debug_reg_state.
9513 2011-11-05 Yao Qi <yao@codesourcery.com>
9515 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9516 address as TPOINT's.
9518 2011-11-02 Stan Shebs <stan@codesourcery.com>
9520 * tracepoint.c (agent_mem_read_string): New function.
9521 (eval_agent_expr): Call it for tracenz.
9522 * server.c (handle_query): Report support for tracenz.
9524 2011-11-02 Yao Qi <yao@codesourcery.com>
9526 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9528 2011-11-02 Yao Qi <yao@codesourcery.com>
9530 * target.h: Fix a typo in comment.
9532 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9534 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9535 clobber the breakpoints' shadows with fast tracepoint jumps.
9536 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9537 * target.c (write_inferior_memory): Also pass MYADDR down to
9540 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9542 * configure.ac: Check support for personality routine.
9543 * configure: Regenerate.
9544 * config.in: Likewise.
9545 * linux-low.c: Include <sys/personality.h>.
9546 Define ADDR_NO_RANDOMIZE if necessary.
9547 (linux_create_inferior): Disable address space randomization when
9548 forking inferior, if requested.
9549 (linux_supports_disable_randomization): New function.
9550 (linux_target_ops): Install it.
9551 * server.h (disable_randomization): Declare.
9552 * server.c (disable_randomization): New global variable.
9553 (handle_general_set): Handle QDisableRandomization.
9554 (handle_query): Likewise for qSupported.
9555 (main): Support --disable-randomization and --no-disable-randomization
9556 command line arguments.
9557 * target.h (struct target_ops): Add supports_disable_randomization.
9558 (target_supports_disable_randomization): New macro.
9560 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9562 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9564 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9565 [!PT_GETDSBT] (target_loadmap): New definition.
9566 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9567 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9568 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9569 and PT_GETDSBT to LINUX_LOADMAP.
9570 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9571 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9573 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9575 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9576 (arm_linux_hwbp_cap): New static variable.
9577 (arm_linux_get_hwbp_cap): Replace by ...
9578 (arm_linux_init_hwbp_cap): ... this new function.
9579 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9580 (arm_linux_get_hw_watchpoint_count): Likewise.
9581 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9582 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9583 (arm_prepare_to_resume): Use perror_with_name instead of error.
9585 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9587 * linux-arm-low.c: Include <signal.h>.
9588 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9589 (struct arm_linux_hwbp_cap): New data type.
9590 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9591 (struct arm_linux_hw_breakpoint): New data type.
9592 (MAX_BPTS, MAX_WPTS): Define.
9593 (struct arch_process_info, struct arch_lwp_info): New data types.
9594 (arm_linux_get_hwbp_cap): New function.
9595 (arm_linux_get_hw_breakpoint_count): Likewise.
9596 (arm_linux_get_hw_watchpoint_count): Likewise.
9597 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9598 (arm_hwbp_control_initialize): Likewise.
9599 (arm_hwbp_control_is_enabled): Likewise.
9600 (arm_hwbp_control_is_initialized): Likewise.
9601 (arm_hwbp_control_disable): Likewise.
9602 (arm_linux_hw_breakpoint_equal): Likewise.
9603 (arm_linux_hw_point_initialize): Likewise.
9604 (struct update_registers_data): New data structure.
9605 (update_registers_callback: New function.
9606 (arm_insert_point): Likewise.
9607 (arm_remove_point): Likewise.
9608 (arm_stopped_by_watchpoint): Likewise.
9609 (arm_stopped_data_address): Likewise.
9610 (arm_new_process): Likewise.
9611 (arm_new_thread): Likewise.
9612 (arm_prepare_to_resume): Likewise.
9613 (the_low_target): Register arm_insert_point, arm_remove_point,
9614 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9615 arm_new_thread, and arm_prepare_to_resume.
9617 2011-09-15 Stan Shebs <stan@codesourcery.com>
9619 * server.h (struct emit_ops): Add compare-goto fields.
9620 * tracepoint.c (gdb_agent_op_sizes): New table.
9621 (emit_eq_goto): New function.
9622 (emit_ne_goto): New function.
9623 (emit_lt_goto): New function.
9624 (emit_le_goto): New function.
9625 (emit_gt_goto): New function.
9626 (emit_ge_goto): New function.
9627 (is_goto_target): New function.
9628 (compile_bytecodes): Recognize special cases of compare-goto
9629 combinations and call specialized emitters for them.
9630 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9631 (amd64_emit_ne_goto): New function.
9632 (amd64_emit_lt_goto): New function.
9633 (amd64_emit_le_goto): New function.
9634 (amd64_emit_gt_goto): New function.
9635 (amd64_emit_ge_goto): New function.
9636 (amd64_emit_ops): Add the new functions.
9637 (i386_emit_eq_goto): New function.
9638 (i386_emit_ne_goto): New function.
9639 (i386_emit_lt_goto): New function.
9640 (i386_emit_le_goto): New function.
9641 (i386_emit_gt_goto): New function.
9642 (i386_emit_ge_goto): New function.
9643 (i386_emit_ops): Add the new functions.
9645 2011-09-08 Stan Shebs <stan@codesourcery.com>
9647 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9648 (i386_emit_epilogue): Restore %ebx.
9650 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9652 * server.c (step_thread): Remove definition.
9653 (process_serial_event): Don't handle Hs.
9654 * server.h (step_thread): Remove declaration.
9655 * target.c (set_desired_inferior): Remove use of step_thread.
9657 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9659 * linux-low.c: Include linux-procfs.h.
9660 (linux_attach_lwp_1): Update comments.
9661 (linux_attach): Scan for existing threads when attaching to a
9662 process that is the tgid.
9663 * Makefile.in: Update dependencies.
9665 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9667 * configure.srv: Add linux-procfs.o dependencies.
9669 2011-08-14 Yao Qi <yao@codesourcery.com>
9671 * target.h (struct target_ops): Fix indent.
9672 * win32-low.c (win32_target_ops): Fix comment.
9674 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9675 Yao Qi <yao@codesourcery.com>
9677 * Makefile.in (clean): Remove tic6x-*.c files.
9678 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9679 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9680 (tic6x-c64xp-linux.c): Likewise.
9681 * configure.srv: Add support for tic6x-*-uclinux.
9682 * linux-tic6x-low.c: New.
9683 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9685 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9686 Yao Qi <yao@codesourcery.com>
9688 * target.h (struct target_ops): Add read_loadmap.
9689 * linux-low.c (struct target_loadseg): New type.
9690 (struct target_loadmap): New type.
9691 (linux_read_loadmap): New function.
9692 (linux_target_ops): Add linux_read_loadmap.
9693 * server.c (handle_query): Support qXfer:fdpic:read packet.
9694 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9697 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9699 * win32-low.c: Include <stdint.h>.
9701 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9703 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9704 to the inferior here.
9705 (i386_remove_aligned_watchpoint): Ditto.
9706 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9707 fit part of the watchpoint in the debug registers.
9708 (i386_update_inferior_debug_regs): New.
9709 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9710 registers, and only update the inferior on success.
9711 (i386_low_remove_watchpoint): Ditto.
9713 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9715 * linux-low.c (compare_ints, unique, list_threads, show_process,
9716 linux_core_of_thread): Delete.
9717 (linux_target_ops): Change linux_core_of_thread to
9718 linux_common_core_of_thread.
9719 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9720 * utils.c (malloc_failure): Change type of argument.
9721 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9722 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9723 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9724 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9725 (IPA_OBJS): Add common-utils-ipa.o.
9726 (ptid_h, linux_osdata_h): New macros.
9727 (server_h): Add common/common-utils.h, common/xml-utils.h,
9728 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9730 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9731 ptid.o, buffer.o): New rules.
9732 (linux-low.o): Add common/linux-osdata.h as a dependency.
9733 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9734 * configure.ac: Add AC_HEADER_DIRENT check.
9735 * config.in: Regenerate.
9736 * configure: Regenerate.
9737 * remote-utils.c (xml_escape_text): Delete.
9738 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9739 buffer_xml_printf): Move to common/buffer.c.
9740 * server.c (main): Remove call to initialize_inferiors.
9741 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9742 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9743 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9744 internal_error, gdb_assert, gdb_assert_fail): Delete.
9745 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9746 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9748 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9749 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9750 initialize_inferiors): Delete.
9752 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9754 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9757 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9759 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9761 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9763 2011-05-26 Yao Qi <yao@codesourcery.com>
9765 * Makefile.in (thread-db.o): Track dependence to
9766 common/gdb_thread_db.h.
9767 * thread-db.c: include gdb_thread_db.h from right place.
9769 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9771 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9772 __FILE__ and __LINE__ to internal_error.
9774 2011-05-13 Doug Evans <dje@google.com>
9776 * thread-db.c (try_thread_db_load_from_sdir): New function.
9777 (try_thread_db_load_from_dir): New function.
9778 (thread_db_load_search): Handle $sdir, ignore $pdir.
9779 Remove trying of system directories if search of
9780 libthread-db-search-path fails, that is now done via $sdir.
9782 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9784 * server.c (handle_query): Add EnableDisableTracepoints to the list
9785 of supported features.
9786 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9788 (cmd_qtenable_disable): New.
9789 (cmd_qtstart): Install tracepoints even if disabled.
9790 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9791 receiving a QTEnable or QTDisable packet.
9792 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9793 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9795 (gdb_probe): Skip data collection if static tracepoint is disabled.
9797 2011-05-10 Doug Evans <dje@google.com>
9799 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9801 2011-05-04 Doug Evans <dje@google.com>
9803 * linux-low.c (linux_join): Skip process lookup.
9804 * spu-low.c (spu_join): Ditto.
9805 * server.c (join_inferiors_callback): Delete.
9806 (process_serial_event): For 'D' packet (detach) call join_inferior
9809 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9811 * README: Don't mention xscale*-*-linux*.
9812 * configure.srv (xscale*-*-linux*): Don't handle target.
9814 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9816 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9818 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9819 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9820 (i386_emit_void_call_2): Likewise.
9822 2011-04-26 Yao Qi <yao@codesourcery.com>
9824 * linux-low.c: Move common macros to linux-ptrace.h.
9825 Include linux-ptrace.h.
9826 * Makefile.in (linux_ptrace_h): New.
9827 (linux-low.o): Depends on linux-ptrace.h.
9829 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9831 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9832 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9833 (remote_prepare): New function with most of the TCP code from ...
9834 (remote_open): ... here. Detect PORT here unconditionally. Move also
9835 setting transport_is_reliable.
9836 * server.c (run_once): New variable.
9837 (gdbserver_usage): Document it.
9838 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9839 the first run if RUN_ONCE.
9840 * server.h (run_once, remote_prepare): New declarations.
9842 2011-04-19 Tom Tromey <tromey@redhat.com>
9844 * win32-low.c (handle_load_dll): Remove duplicate "the".
9846 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9848 Remove support for old Cygwin 1.5 versions.
9849 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9850 function to avoid warning.
9851 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9854 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9856 * gdbserver/server.h (Macro _): Define it if not available.
9858 2011-03-14 Michael Snyder <msnyder@vmware.com>
9860 * hostio.c (handle_close): Remove unnecessary null test.
9862 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9864 * Makefile.in (maintainer-clean realclean distclean): Remove
9865 "make ... subdir_do" command.
9867 2011-03-10 Michael Snyder <msnyder@vmware.com>
9869 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9871 * server.c (handle_v_run): Free alloced buffer on early return.
9873 2011-03-09 Yao Qi <yao@codesourcery.com>
9876 2011-03-04 Yao Qi <yao@codesourcery.com>
9878 * Makefile.in: Remove GNU make feature --directory.
9880 2011-03-05 Yao Qi <yao@codesourcery.com>
9882 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9883 (subdir_do): New make target. Copied from gdb/Makefile.
9884 (maintainer-clean, realclean, distclean, clean): Call corresponding
9885 make targets in common/Makefile.
9887 2011-02-11 Yao Qi <yao@codesourcery.com>
9889 * configure.ac: Call AC_PROG_RANLIB.
9890 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9891 * configure: Regenerate.
9893 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9895 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9897 2011-03-06 Yao Qi <yao@codesourcery.com>
9899 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9901 2011-03-05 Yao Qi <yao@codesourcery.com>
9903 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9904 (subdir_do): New make target. Copied from gdb/Makefile.
9905 (maintainer-clean, realclean, distclean, clean): Call corresponding
9906 make targets in common/Makefile.
9908 2011-03-04 Yao Qi <yao@codesourcery.com>
9910 * Makefile.in: Remove GNU make feature --directory.
9912 2011-03-04 Michael Snyder <msnyder@vmware.com>
9914 * server.c (queue_stop_reply): Call xmalloc not malloc.
9916 2011-03-02 Michael Snyder <msnyder@vmware.com>
9918 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9920 2011-02-28 Michael Snyder <msnyder@vmware.com>
9922 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9923 (cmd_qtframe): Ditto.
9924 (cmd_qtbuffer): Ditto.
9925 (cmd_bigqtbuffer): Ditto.
9927 * utils.c (decimal2str): Initialize 'width' to nine, then
9930 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9932 * hostio.c (require_data): Free *data, not data.
9934 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9936 * hostio.c (require_data): Use free, not xfree.
9938 2011-02-27 Michael Snyder <msnyder@vmware.com>
9940 * server.c (handle_query): Discard unused value.
9942 * hostio.c (require_data): Free malloc memory before returning
9945 2011-02-26 Michael Snyder <msnyder@vmware.com>
9947 * linux-low.c (list_threads): Call closedir for dirent.
9949 2011-02-27 Michael Snyder <msnyder@vmware.com>
9951 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9952 a case statement falls through.
9954 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9956 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9959 2011-02-26 Michael Snyder <msnyder@vmware.com>
9961 * utils.c (decimal2str): Eliminate dead code and dead param.
9962 (pulongest): Drop dead param from call to decimal2str.
9965 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9967 Revert the following patch (not approved yet):
9968 2011-02-21 Hui Zhu <teawater@gmail.com>
9969 * tracepoint.c (tp_printf): New function.
9970 (eval_agent_expr): Handle gdb_agent_op_printf.
9972 2011-02-21 Hui Zhu <teawater@gmail.com>
9974 * tracepoint.c (tp_printf): New function.
9975 (eval_agent_expr): Handle gdb_agent_op_printf.
9977 2011-02-18 Tom Tromey <tromey@redhat.com>
9979 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9980 (tracepoint.o): Likewise.
9981 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9982 (gdb_agent_op_names): Likewise.
9984 2011-02-18 Tom Tromey <tromey@redhat.com>
9986 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9987 gdb_agent_op_rot>: New constants.
9988 (gdb_agent_op_names): Add pick and roll.
9989 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9992 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9994 * aclocal.m4: Regenerated with aclocal-1.11.1.
9996 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9998 * server.c (handle_qxfer_traceframe_info): New.
9999 (qxfer_packets): Register "traceframe-info".
10000 (handle_query): Report support for qXfer:traceframe-info:read+.
10001 * tracepoint.c (match_blocktype): New.
10002 (traceframe_find_block_type): Rename to ...
10003 (traceframe_walk_blocks): ... this. Add callback filter argument,
10005 (traceframe_find_block_type): New, reimplemented on top of
10006 traceframe_walk_blocks.
10007 (build_traceframe_info_xml): New.
10008 (traceframe_read_info): New.
10009 * server.h (traceframe_read_info): Declare.
10011 2011-02-11 Yao Qi <yao@codesourcery.com>
10013 * configure.ac: Call AC_PROG_RANLIB.
10014 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10015 * configure: Regenerate.
10017 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10019 * server.c (gdb_read_memory): Change return semantics to allow
10021 (handle_search_memory_1): Adjust.
10022 (process_serial_event) <'m' packet>: Handle partial transfers.
10023 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10025 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10027 * regcache.c (init_register_cache): Initialize
10028 regcache->register_status.
10029 (free_register_cache): Release regcache->register_status.
10030 (regcache_cpy): Copy register_status.
10031 (registers_to_string): Print 'x's for unavailable registers.
10032 (supply_register): Mark the register's status valid or
10033 unavailable, depending on whether a buffer was passed in or not.
10034 (supply_register_zeroed): New.
10035 (supply_regblock): Mark the registers' status valid or
10036 unavailable, depending on whether a buffer was passed in or not.
10037 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10038 (struct regcache): New `register_status' field.
10039 (supply_register_zeroed): Declare.
10040 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10041 supply_register_zeroed, rather than passing a NULL buffer to
10043 * tracepoint.c (fetch_traceframe_registers): Update comment.
10045 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10047 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10050 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10052 * server.h (decode_xfer_write): Change prototype.
10053 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10054 and don't extract the annex here.
10055 * server.c (decode_xfer_read): Remove `annex' parameter,
10056 and don't extract the annex here.
10057 (decode_xfer): New.
10058 (struct qxfer): New.
10059 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10060 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10061 (handle_qxfer_statictrace): New functions, abstracted out from
10062 handle_query, and made to use the struct qxfer interface.
10063 (handle_threads_qxfer_proper): Rename to ...
10064 (handle_qxfer_threads_proper): ... this.
10065 (handle_threads_qxfer): Rename to ...
10066 (handle_qxfer_threads): ... this. Adjust.
10067 (qxfer_packets): New array.
10068 (handle_qxfer): New function.
10069 (handle_query): Use handle_qxfer.
10071 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10073 * gdbreplay.c: Shorten lines of >= 80 columns.
10074 * linux-low.c: Ditto.
10075 * linux-ppc-low.c: Ditto.
10076 * linux-s390-low.c: Ditto.
10077 * linux-sparc-low.c: Ditto.
10078 * linux-x86-low.c: Ditto.
10079 * linux-xtensa-low.c: Ditto.
10080 * mem-break.c: Ditto.
10081 * nto-low.c: Ditto.
10082 * regcache.h: Ditto.
10083 * remote-utils.c: Ditto.
10086 * thread-db.c: Ditto.
10087 * tracepoint.c: Ditto.
10089 * win32-low.h: Ditto.
10091 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10093 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10096 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10098 * server.c (gdbserver_version): Update copyright year in version
10100 * gdbreplay.c (gdbreplay_version): Ditto.
10102 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10104 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10105 * linux-bfin-low.c: New file.
10106 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10107 PT_DATA_ADDR for BFIN targets.
10108 * Makefile.in (SFILES): Add linux-bfin-low.c.
10109 (clean): Remove reg-bfin.c.
10110 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10111 * README: Mention supported Blackfin targets.
10113 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10115 * .gitignore: New file.
10117 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10119 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10121 2010-10-22 Jie Zhang <jie@codesourcery.com>
10123 * Makefile.in: Add FLAGS_TO_PASS variable.
10124 (install): Remove dependency of install-only and recursively
10125 invoke make for install-only.
10127 2010-10-04 Doug Evans <dje@google.com>
10129 * Makefile.in (uninstall): Use $(DESTDIR).
10131 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10135 * linux-x86-low.c (compat_siginfo_from_siginfo)
10136 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10137 si_code is < 0. Check for si_code == SI_TIMER before checking for
10140 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10142 * lynx-i386-low.c: New file.
10143 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10145 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10147 * lynx-low.c (ptrace_request_to_str): Remove handling for
10148 request values that have been removed in LynxOS 5.x.
10150 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10152 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10155 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10157 * configure.ac: Add --enable-inprocess-agent option.
10158 * configure: Rebuilt.
10160 2010-09-06 Yao Qi <yao@codesourcery.com>
10162 * linux-low.c (linux_kill): Remove unused variable.
10163 (linux_stabilize_threads): Likewise.
10164 * server.c (start_inferior): Likewise.
10165 (queue_stop_reply_callback): Likewise.
10166 * tracepoint.c (do_action_at_tracepoint): Likewise.
10168 2010-09-06 Yao Qi <yao@codesourcery.com>
10170 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10173 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10175 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10177 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10179 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10182 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10184 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10185 gdbserver/lynx-ppc-low.c: New files.
10186 * Makefile.in (lynx_low_h): New variable.
10187 (lynx-low.o, lynx-ppc-low.o): New rules.
10188 * configure.ac: On LynxOS, link with -lnetinet.
10189 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10190 * configure: regenerate.
10192 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10194 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10195 * configure.ac: Add check for vasprintf and vsnprintf.
10196 * configure, config.in: Regenerate.
10197 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10199 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10201 * gdbreplay.c: Move include of alloca.h up, next to include of
10203 * server.h: Add include of malloc.h.
10204 * mem-break.c: Remove include of malloc.h.
10205 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10207 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10209 * Makefile.in (memmem.o): Build with -Wno-error.
10211 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10213 * utils.c (xsnprintf): Make non-static.
10214 * server.h: Add xsnprintf declaration.
10215 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10216 replace calls to snprintf by calls to xsnprintf throughout.
10218 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10220 * configure.ac: Add configure check for alloca.
10221 * configure, config.in: Regenerate.
10222 * server.h: Include alloca.h if it exists.
10223 * gdbreplay.c: Include alloca.h if it exists.
10225 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10227 * linux-low.c (__SIGRTMIN): Define if not already defined.
10228 (linux_create_inferior): Check for __ANDROID__ rather than
10230 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10231 are already deferred.
10232 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10233 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10234 stopped and already has a pending signal to report.
10235 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10236 a pending signal to report or is moving out of a jump pad.
10237 (linux_init_signals): Check for __ANDROID__ rather than
10240 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10242 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10243 debug_threads check. Avoid a linear search when not doing debug
10246 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10248 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10249 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10250 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10251 (process_event): Change local fd's type to gdb_fildes_t.
10252 (create_file_handler): Adjust prototype.
10253 (delete_file_handler): Adjust prototype.
10254 (handle_file_event): Adjust prototype. Use pfildes.
10255 (create_file_event): Adjsut prototype.
10256 * remote-utils.c (remote_desc, listen_desc): Change type to
10258 * server.h: New gdb_fildes_t typedef.
10259 [USE_WIN32API]: Include winsock2.h.
10260 (delete_file_handler, add_file_handler): Adjust prototypes.
10261 (pfildes): Declare.
10262 * utils.c (pfildes): New.
10264 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10266 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10267 * configure: Regenerate.
10269 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10271 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10272 (linux_done_accessing_memory): ... this.
10273 (linux_target_ops): Adjust.
10274 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10275 * nto-low.c (nto_target_ops): Adjust comment.
10276 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10277 * spu-low.c (spu_target_ops): Adjust comment.
10278 * target.h (target_ops): Rename unprepare_to_access_memory field
10279 to done_accessing_memory.
10280 (unprepare_to_access_memory): Rename to ...
10281 (done_accessing_memory): ... this.
10283 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10285 * linux-low.c (linux_prepare_to_access_memory): New.
10286 (linux_unprepare_to_access_memory): New.
10287 (linux_target_ops): Install them.
10288 * server.c (read_memory): Rename to ...
10289 (gdb_read_memory): ... this. Use
10290 prepare_to_access_memory/prepare_to_access_memory.
10291 (write_memory): Rename to ...
10292 (gdb_write_memory): ... this. Use
10293 prepare_to_access_memory/prepare_to_access_memory.
10294 (handle_search_memory_1): Adjust.
10295 (process_serial_event): Adjust.
10296 * target.h (struct target_ops): New fields
10297 prepare_to_access_memory and unprepare_to_access_memory.
10298 (prepare_to_access_memory, unprepare_to_access_memory): New.
10299 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10300 prepare_to_access_memory/prepare_to_access_memory.
10301 * nto-low.c (nto_target_ops): Adjust.
10302 * spu-low.c (spu_target_ops): Adjust.
10303 * win32-low.c (win32_target_ops): Adjust.
10305 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10307 * Makefile.in (WARN_CFLAGS): Get it from configure.
10308 (WERROR_CFLAGS): New.
10309 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10310 * configure.ac: Introduce --enable-werror, which adds -Werror to
10311 the compiler command line. Enabled by default. Disable with
10312 --disable-werror. Add -Wdeclaration-after-statement
10313 Wpointer-arith and -Wformat-nonliteral to warning flags.
10314 * configure: Regenerate.
10316 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10318 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10320 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10322 * gdbreplay.c (remote_error): New.
10324 (expect): Use gdbchar. Check for error reading from GDB.
10325 Clarify sync error output.
10326 (play): Check for errors writing to GDB.
10327 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10328 * remote-utils.c (getpkt): Check for errors writing to the remote
10331 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10333 * linux-low.c (linux_wait_1): Move non-debugging code out of
10334 `debug_threads' control.
10336 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10338 * linux-low.c (linux_wait_1): Don't set last_status here.
10339 * server.c (push_event, queue_stop_reply_callback): Assert we're
10340 not pushing a TARGET_WAITKIND_IGNORE event.
10341 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10342 (myresume, handle_target_event): Set the thread's last_resume_kind
10343 and last_status from the target returned status.
10345 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10349 * linux-x86-low.c (update_debug_registers_callback): New.
10350 (i386_dr_low_set_addr): Use it.
10351 (i386_dr_low_get_addr): New.
10352 (i386_dr_low_set_control): Use update_debug_registers_callback.
10353 (i386_dr_low_get_control): New.
10354 (i386_dr_low_get_status): Adjust.
10355 * linux-low.c (linux_stop_lwp): New.
10356 * linux-low.h (linux_stop_lwp): Declare.
10358 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10359 argument instead of a i386_debug_reg_state.
10360 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10361 a i386_debug_reg_state.
10362 (i386_insert_aligned_watchpoint): Adjust.
10363 (i386_remove_aligned_watchpoint): Adjust.
10364 (i386_low_stopped_data_address): Read the debug registers from the
10365 inferior instead of from the mirrors.
10366 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10367 (i386_dr_low_get_addr): Declare.
10368 (i386_dr_low_get_control): Declare.
10369 (i386_dr_low_get_status): Change prototype.
10371 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10372 (i386_dr_low_get_addr): New.
10373 (i386_dr_low_get_control): New.
10374 (i386_dr_low_get_status): Adjust prototype. Return
10376 (i386_initial_stuff): Clear dr_status_mirror and
10378 (i386_get_thread_context): Adjust.
10379 (i386_set_thread_context): Adjust.
10380 (i386_thread_added): Adjust.
10382 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10384 * linux-low.h (linux_thread_area): Delete declaration.
10386 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10388 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10389 after its termination.
10391 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10393 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10394 (gdb_wants_all_stopped): Delete.
10395 (linux_wait_1): Don't call them.
10396 * server.c (handle_v_cont): Tag all threads as want-stopped.
10397 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10398 stopped as "client-wants-stopped".
10400 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10402 * Makefile.in (signals_h): New.
10403 (server_h): Depend on it.
10404 (server.o): Don't depend on $(signals_def).
10405 (signals.o): Depend on $(signals_def).
10407 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10409 * Makefile.in (signals_def): New.
10410 (server_h): Append include/gdb/signals.h and signals_def.
10411 (server.o): Append signals_def.
10413 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10415 * server.c (handle_target_event): Use target_signal_to_host for
10416 resume_info.sig initialization.
10417 * target.h (struct thread_resume) <sig>: New comment.
10419 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10421 * server.c (handle_query): strcpy() the returned string from paddress()
10422 instead of sprintf().
10423 * utils.c (paddress): Return phex_nz().
10425 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10427 * server.c (handle_v_cont): Call mourn_inferior if process
10429 (myresume): Likewise.
10431 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10433 Static tracepoints, and integration with UST.
10435 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10436 * mem-break.c (uninsert_all_breakpoints)
10437 (reinsert_all_breakpoints): New.
10438 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10439 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10440 (gdb_agent_ust_loaded, helper_thread_id)
10441 (gdb_agent_helper_thread_id): New macros.
10442 (struct ipa_sym_addresses): Add addr_ust_loaded,
10443 addr_helper_thread_id, addr_cmd_buf.
10444 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10445 (in_process_agent_loaded_ust): New.
10446 (write_e_ust_not_loaded): New.
10447 (maybe_write_ipa_ust_not_loaded): New.
10448 (struct collect_static_trace_data_action): New.
10449 (enum tracepoint_type) <static_tracepoint>: New.
10450 (struct tracepoint) <handle>: Mention static tracepoints.
10451 (struct static_tracepoint_ctx): New.
10452 (CMD_BUF_SIZE): New.
10453 (add_tracepoint_action): Handle static tracepoint actions.
10454 (unprobe_marker_at): New.
10455 (clear_installed_tracepoints): Handle static tracepoints.
10456 (cmd_qtdp): Handle static tracepoints.
10457 (probe_marker_at): New.
10458 (cmd_qtstart): Handle static tracepoints.
10459 (response_tracepoint): Handle static tracepoints.
10460 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10461 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10462 (get_context_regcache): Handle static tracepoints.
10463 (do_action_at_tracepoint): Handle static tracepoint actions.
10464 (traceframe_find_block_type): Handle static trace data blocks.
10465 (traceframe_read_sdata): New.
10466 (download_tracepoints): Download static tracepoint actions.
10467 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10468 (GDB_PROBE_NAME): New.
10470 (GET_UST_SYM): New.
10473 (ust_marker_to_static_tracepoint): New.
10475 (collect_ust_data_at_tracepoint): New.
10476 (gdb_ust_probe): New.
10477 (UNIX_PATH_MAX, SOCK_DIR): New.
10478 (gdb_ust_connect_sync_socket): New.
10479 (resume_thread, stop_thread): New.
10480 (run_inferior_command): New.
10481 (init_named_socket): New.
10482 (gdb_ust_socket_init): New.
10483 (cstr_to_hexstr): New.
10485 (first_marker, next_marker): New.
10486 (response_ust_marker): New.
10487 (cmd_qtfstm, cmd_qtsstm): New.
10488 (unprobe_marker_at, probe_marker_at): New.
10489 (cmd_qtstmat, gdb_ust_thread): New.
10490 (gdb_ust_init): New.
10491 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10492 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10493 (ST_REGENTRY): New.
10494 (x86_64_st_collect_regmap): New.
10495 (X86_64_NUM_ST_COLLECT_GREGS): New.
10496 (AMD64_RIP_REGNUM): New.
10497 (supply_static_tracepoint_registers): New.
10498 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10499 (ST_REGENTRY): New.
10500 (i386_st_collect_regmap): New.
10501 (i386_NUM_ST_COLLECT_GREGS): New.
10502 (supply_static_tracepoint_registers): New.
10503 * server.c (handle_query): Handle qXfer:statictrace:read.
10504 <qSupported>: Report support for StaticTracepoints, and
10505 qXfer:statictrace:read features.
10506 * server.h (traceframe_read_sdata)
10507 (supply_static_tracepoint_registers): Declare.
10508 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10509 (unpack_varlen_hex): Include in IPA build.
10510 * Makefile.in (ustlibs, ustinc): New.
10511 (IPA_OBJS): Add remote-utils-ipa.o.
10512 ($(IPA_LIB)): Link -ldl and -lpthread.
10514 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10515 * config.in, configure: Regenerate.
10517 2010-06-20 Ian Lance Taylor <iant@google.com>
10518 Pedro Alves <pedro@codesourcery.com>
10520 * linux-x86-low.c (always_true): Delete.
10521 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10522 trying to fool the compiler with always_true.
10524 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10526 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10527 conditions in gdbserver.
10529 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10531 * spu-low.c (spu_read_memory): Wrap around local store limit.
10532 (spu_write_memory): Likewise.
10534 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10536 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10537 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10539 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10541 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10542 uses with LONGEST uses.
10544 2010-06-14 Stan Shebs <stan@codesourcery.com>
10545 Pedro Alves <pedro@codesourcery.com>
10549 * linux-x86-low.c: Include limits.h.
10551 (always_true): New.
10554 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10555 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10556 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10557 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10558 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10559 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10560 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10561 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10562 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10563 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10564 (amd64_emit_void_call_2): New.
10565 (amd64_emit_ops): New.
10566 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10567 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10568 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10569 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10570 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10571 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10572 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10573 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10574 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10575 (i386_emit_stack_adjust, i386_emit_int_call_1)
10576 (i386_emit_void_call_2): New.
10577 (i386_emit_ops): New.
10578 (x86_emit_ops): New.
10579 (the_low_target): Install x86_emit_ops.
10580 * server.h (struct emit_ops): New.
10581 (get_raw_reg_func_addr): Declare.
10582 (current_insn_ptr, emit_error): Declare.
10583 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10584 (set_trace_state_variable_value): New defines.
10585 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10586 addr_get_trace_state_variable_value and
10587 addr_set_trace_state_variable_value.
10588 (symbol_list): New fields for get_raw_reg,
10589 get_trace_state_variable_value and set_trace_state_variable_value.
10590 (condfn): New typedef.
10591 (struct tracepoint): New field `compiled_cond'.
10592 (do_action_at_tracepoint): Clear compiled_cond.
10593 (get_trace_state_variable_value, set_trace_state_variable_value):
10595 (condition_true_at_tracepoint): If there's a compiled condition,
10597 (current_insn_ptr, emit_error): New globals.
10598 (struct bytecode_address): New.
10599 (get_raw_reg_func_addr): New.
10600 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10601 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10602 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10603 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10604 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10605 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10606 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10607 (compile_tracepoint_condition, compile_bytecodes): New.
10608 * target.h (emit_ops): Forward declare.
10609 (struct target_ops): New field emit_ops.
10610 (target_emit_ops): New.
10611 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10612 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10613 * linux-low.c (linux_emit_ops): New.
10614 (linux_target_ops): Install it.
10615 * linux-low.h (struct linux_target_ops): New field emit_ops.
10617 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10619 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10620 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10622 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10623 Stan Shebs <stan@codesourcery.com>
10625 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10626 (all): Depend on $(extra_libraries).
10627 (install-only): Install the IPA.
10628 (IPA_OBJS, IPA_LIB): New.
10629 (clean): Remove the IPA lib.
10630 (IPAGENT_CFLAGS): New.
10631 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10632 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10633 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10634 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10635 * configure.ac: Check for atomic builtins support in the compiler.
10636 (IPA_DEPFILES, extra_libraries): Define.
10637 * configure.srv (ipa_obj): Add description.
10638 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10639 (i[34567]86-*-linux*): Set ipa_obj.
10640 (x86_64-*-linux*): Set ipa_obj.
10641 * linux-low.c (stabilizing_threads): New.
10642 (supports_fast_tracepoints): New.
10643 (linux_detach): Stabilize threads before detaching.
10644 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10645 the lwp is either not stabilizing, or is moving out of a jump pad.
10646 (linux_fast_tracepoint_collecting): New.
10647 (maybe_move_out_of_jump_pad): New.
10648 (enqueue_one_deferred_signal): New.
10649 (dequeue_one_deferred_signal): New.
10650 (linux_wait_for_event_1): If moving out of a jump pad, defer
10651 pending signals to later.
10652 (linux_stabilize_threads): New.
10653 (linux_wait_1): Check if threads need moving out of jump pads, and
10655 (stuck_in_jump_pad_callback): New.
10656 (move_out_of_jump_pad_callback): New.
10657 (lwp_running): New.
10658 (linux_resume_one_lwp): Handle moving out of jump pads.
10659 (linux_set_resume_request): Dequeue deferred signals.
10660 (need_step_over_p): Also step over fast tracepoint jumps.
10661 (start_step_over): Also uninsert fast tracepoint jumps.
10662 (finish_step_over): Also reinsert fast tracepoint jumps.
10663 (linux_install_fast_tracepoint_jump): New.
10664 (linux_target_ops): Install linux_stabilize_threads and
10665 linux_install_fast_tracepoint_jump_pad.
10666 * linux-low.h (linux_target_ops) <get_thread_area,
10667 install_fast_tracepoint_jump_pad>: New fields.
10668 (struct lwp_info) <collecting_fast_tracepoint,
10669 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10670 (linux_get_thread_area): Declare.
10671 * linux-x86-low.c (jump_insn): New.
10672 (x86_get_thread_area): New.
10673 (append_insns): New.
10674 (push_opcode): New.
10675 (amd64_install_fast_tracepoint_jump_pad): New.
10676 (i386_install_fast_tracepoint_jump_pad): New.
10677 (x86_install_fast_tracepoint_jump_pad): New.
10678 (the_low_target): Install x86_get_thread_area and
10679 x86_install_fast_tracepoint_jump_pad.
10680 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10681 (struct fast_tracepoint_jump): New.
10682 (fast_tracepoint_jump_insn): New.
10683 (fast_tracepoint_jump_shadow): New.
10684 (find_fast_tracepoint_jump_at): New.
10685 (fast_tracepoint_jump_here): New.
10686 (delete_fast_tracepoint_jump): New.
10687 (set_fast_tracepoint_jump): New.
10688 (uninsert_fast_tracepoint_jumps_at): New.
10689 (reinsert_fast_tracepoint_jumps_at): New.
10690 (set_breakpoint_at): Use write_inferior_memory.
10691 (uninsert_raw_breakpoint): Use write_inferior_memory.
10692 (check_mem_read): Mask out fast tracepoint jumps.
10693 (check_mem_write): Mask out fast tracepoint jumps.
10694 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10695 (set_fast_tracepoint_jump): Declare.
10696 (delete_fast_tracepoint_jump)
10697 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10698 (reinsert_fast_tracepoint_jumps_at): Declare.
10699 * regcache.c: Don't compile many functions when building the
10700 in-process agent library.
10701 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10702 the register buffer in the heap.
10703 (free_register_cache): If the register buffer isn't owned by the
10704 regcache, don't free it.
10705 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10706 pre-existing register caches.
10707 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10709 (convert_ascii_to_int): : Constify `from' parameter type.
10710 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10711 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10712 the needed buffer in-place.
10713 (relocate_instruction): New.
10714 * server.c (handle_query) <qSymbols>: If the target supports
10715 tracepoints, give it a chance of looking up symbols. Report
10716 support for fast tracepoints.
10717 (handle_status): Stabilize threads.
10718 (process_serial_event): Adjust.
10719 * server.h (struct fast_tracepoint_jump): Forward declare.
10720 (struct process_info) <fast_tracepoint_jumps>: New field.
10721 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10722 (decode_X_packet, decode_M_packet): Adjust.
10723 (relocate_instruction): Declare.
10724 (in_process_agent_loaded): Declare.
10725 (tracepoint_look_up_symbols): Declare.
10726 (struct fast_tpoint_collect_status): Declare.
10727 (fast_tracepoint_collecting): Declare.
10728 (force_unlock_trace_buffer): Declare.
10729 (handle_tracepoint_bkpts): Declare.
10730 (initialize_low_tracepoint)
10731 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10732 * target.h (struct target_ops) <stabilize_threads,
10733 install_fast_tracepoint_jump_pad>: New fields.
10734 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10735 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10736 [HAVE_STDINT_H]: Include stdint.h.
10737 (trace_debug_1): Rename to ...
10738 (trace_vdebug): ... this.
10739 (trace_debug): Rename to ...
10740 (trace_debug_1): ... this. Add `level' parameter.
10741 (trace_debug): New.
10742 (ATTR_USED, ATTR_NOINLINE): New.
10743 (IP_AGENT_EXPORT): New.
10744 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10745 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10746 (about_to_request_buffer_space, trace_buffer_is_full)
10747 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10748 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10749 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10750 (traceframe_write_count, traceframes_created)
10751 (trace_state_variables)
10752 New renaming defines.
10753 (struct ipa_sym_addresses): New.
10754 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10755 (symbol_list): New.
10756 (ipa_sym_addrs): New.
10757 (all_tracepoint_symbols_looked_up): New.
10758 (in_process_agent_loaded): New.
10759 (write_e_ipa_not_loaded): New.
10760 (maybe_write_ipa_not_loaded): New.
10761 (tracepoint_look_up_symbols): New.
10762 (debug_threads) [IN_PROCESS_AGENT]: New.
10763 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10764 (UNKNOWN_SIDE_EFFECTS): New.
10765 (stop_tracing): New.
10766 (flush_trace_buffer): New.
10767 (stop_tracing_bkpt): New.
10768 (flush_trace_buffer_bkpt): New.
10769 (read_inferior_integer): New.
10770 (read_inferior_uinteger): New.
10771 (read_inferior_data_pointer): New.
10772 (write_inferior_data_pointer): New.
10773 (write_inferior_integer): New.
10774 (write_inferior_uinteger): New.
10775 (struct collect_static_trace_data_action): Delete.
10776 (enum tracepoint_type): New.
10777 (struct tracepoint) <type>: New field `type'.
10778 <actions_str, step_actions, step_actions_str>: Only include in
10780 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10781 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10782 (tracepoints): Use IP_AGENT_EXPORT.
10783 (last_tracepoint): Don't include in the IPA.
10784 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10785 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10786 (alloced_trace_state_variables): New.
10787 (trace_state_variables): Use IP_AGENT_EXPORT.
10788 (traceframe_t): Delete unused variable.
10789 (circular_trace_buffer): Don't include in the IPA.
10790 (trace_buffer_start): Delete.
10791 (struct trace_buffer_control): New.
10792 (trace_buffer_free): Delete.
10793 (struct ipa_trace_buffer_control): New.
10794 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10795 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10797 (trace_buffer_ctrl): New.
10798 (TRACE_BUFFER_CTRL_CURR): New.
10799 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10800 Reimplement as macros.
10801 (trace_buffer_wrap): Delete.
10802 (traceframe_write_count, traceframe_read_count)
10803 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10804 (struct tracepoint_hit_ctx) <type>: New field.
10805 (struct fast_tracepoint_ctx): New.
10806 (memory_barrier): New.
10808 (record_tracepoint_error): Update atomically in the IPA.
10809 (clear_inferior_trace_buffer): New.
10810 (about_to_request_buffer_space): New.
10811 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10812 updating the same buffer.
10813 (add_tracepoint): Default the tracepoint's type to trap
10814 tracepoint, and orig_size to -1.
10815 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10816 internal variables.
10817 (create_trace_state_variable): New parameter `gdb'. Handle it.
10818 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10819 (cmd_qtdp): Handle fast tracepoints.
10820 (cmd_qtdv): Adjust.
10821 (max_jump_pad_size): New.
10822 (gdb_jump_pad_head): New.
10823 (get_jump_space_head): New.
10824 (claim_jump_space): New.
10825 (sort_tracepoints): New.
10826 (MAX_JUMP_SIZE): New.
10827 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10829 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10830 support. Upload fast traceframes, and delete internal IPA
10832 (stop_tracing_handler): New.
10833 (flush_trace_buffer_handler): New.
10834 (cmd_qtstop): Upload fast tracepoints.
10835 (response_tracepoint): Handle fast tracepoints.
10836 (tracepoint_finished_step): Upload fast traceframes. Set the
10837 tracepoint hit context's tracepoint type.
10838 (handle_tracepoint_bkpts): New.
10839 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10840 type. Add comment about fast tracepoints.
10841 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10842 non-existing action_str field.
10843 (get_context_regcache): Handle fast tracepoints.
10844 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10846 (fast_tracepoint_from_jump_pad_address): New.
10847 (fast_tracepoint_from_ipa_tpoint_address): New.
10848 (collecting_t): New.
10849 (force_unlock_trace_buffer): New.
10850 (fast_tracepoint_collecting): New.
10852 (gdb_collect): New.
10853 (write_inferior_data_ptr): New.
10854 (target_tp_heap): New.
10855 (target_malloc): New.
10856 (download_agent_expr): New.
10858 (download_tracepoints): New.
10859 (download_trace_state_variables): New.
10860 (upload_fast_traceframes): New.
10861 (IPA_FIRST_TRACEFRAME): New.
10862 (IPA_NEXT_TRACEFRAME_1): New.
10863 (IPA_NEXT_TRACEFRAME): New.
10864 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10865 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10866 (gdb_jump_pad_buffer_end): New.
10867 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10868 (initialize_tracepoint): Adjust.
10869 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10870 buffer. Initialize the low module.
10871 * utils.c (PREFIX, TOOLNAME): New.
10872 (malloc_failure): Use PREFIX.
10873 (error): In the IPA, an error causes an exit.
10874 (fatal, warning): Use PREFIX.
10875 (internal_error): Use TOOLNAME.
10876 (NUMCELLS): Increase to 10.
10877 * configure, config.in: Regenerate.
10879 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10881 * server.c (handle_query) <qSupported>: Do two passes over the
10882 qSupported string to avoid nesting strtok.
10884 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10886 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10888 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10889 -Wl,--dynamic-list.
10890 * configure: Regenerate.
10891 * proc-service.list: New.
10893 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10895 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10898 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10900 * gdbreplay.c (remote_open): Check error return from socket() call by
10901 its equality to -1 not by it being negative.
10902 * remote-utils.c (remote_open): Likewise.
10904 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10906 * config.h: Regenerate.
10908 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10910 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10911 doesn't provide PTRACE_GET_THREAD_AREA.
10913 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10915 * linux-m68k-low.c: Include <asm/ptrace.h>
10916 (ps_get_thread_area): Implement.
10918 2010-05-03 Doug Evans <dje@google.com>
10920 * event-loop.c (struct callback_event): New struct.
10921 (callback_list): New global.
10922 (append_callback_event, delete_callback_event): New functions.
10923 (process_callback): New function.
10924 (start_event_loop): Call it.
10925 * remote-utils.c (NOT_SCHEDULED): Define.
10926 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10927 moved out of readchar.
10928 (readchar): Rewrite. Call reschedule before returning.
10929 (reset_readchar): New function.
10930 (remote_close): Call it.
10931 (process_remaining, reschedule): New functions.
10932 * server.h (callback_handler_func): New typedef.
10933 (append_callback_event, delete_callback_event): Declare.
10935 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10937 * proc-service.c (ps_pglobal_lookup): Use
10938 thread_db_look_up_one_symbol.
10939 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10940 parameter. Use it instead of all_symbols_looked_up.
10941 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10943 (all_symbols_looked_up): Don't declare.
10944 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10945 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10947 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10948 Set all_symbols_looked_up here.
10949 (thread_db_look_up_one_symbol): New.
10950 (thread_db_get_tls_address): Adjust.
10951 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10952 thread_db object on the heap, and tentatively set it in the
10954 (thread_db_init): Don't set all_symbols_looked_up here.
10955 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10957 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10959 * linux-low.c (linux_kill, linux_detach): Adjust.
10960 (status_pending_p_callback): Remove redundant statement. Check
10961 for !TARGET_WAITIKIND_IGNORE, instead of
10962 TARGET_WAITKIND_STOPPED.
10963 (handle_tracepoints): Make sure LWP is locked. Adjust.
10964 (linux_wait_for_event_1): Adjust.
10965 (linux_cancel_breakpoints): New.
10966 (unsuspend_one_lwp): New.
10967 (unsuspend_all_lwps): New.
10968 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10969 (send_sigstop_callback): Change return type to int, add new
10970 `except' parameter and handle it.
10971 (suspend_and_send_sigstop_callback): New.
10972 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10973 pass them down. If SUSPEND, also increment the lwp's suspend
10975 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10976 (need_step_over_p): Don't consider suspended LWPs.
10977 (start_step_over): Adjust.
10978 (proceed_one_lwp): Change return type to int, add new `except'
10979 parameter and handle it.
10980 (unsuspend_and_proceed_one_lwp): New.
10981 (proceed_all_lwps): Use find_inferior instead of
10983 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10984 also decrement the suspend count of LWPs. Pass `except' down,
10985 instead of hacking its suspend count.
10986 (linux_pause_all): Add `freeze' parameter. Adjust.
10987 (linux_unpause_all): New.
10988 (linux_target_ops): Install linux_unpause_all.
10989 * server.c (handle_status): Adjust.
10990 * target.h (struct target_ops): New fields `unpause_all' and
10991 `cancel_breakpoints'. Add new parameter to `pause_all'.
10992 (pause_all): Add new `freeze' parameter.
10993 (unpause_all): New.
10994 (cancel_breakpoints): New.
10995 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10996 cancel breakpoints.
10997 (cmd_qtstart): Pause threads.
10998 (stop_tracing): Pause threads, and cancel breakpoints.
10999 * win32-low.c (win32_target_ops): Adjust.
11001 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11003 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11004 the inferior right away from here...
11005 (linux_wait_1): ... to here, and adjust to check the thread's
11006 last_resume_kind instead of the lwp's step or stop_expected flags.
11008 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11010 * README: Use consistent `GDB' and `GDBserver' spellings.
11012 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11014 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11015 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11016 (linux_detach_one_lwp): Assume the lwp is stopped.
11017 (any_thread_of): Delete.
11018 (linux_detach): Stop all lwps here. Don't blindly delete all
11020 (delete_lwp_callback): New.
11021 (linux_mourn): Delete all lwps of the process that is gone.
11022 (linux_wait_1): Don't delete the last lwp of the process here.
11023 * mem-break.h (mark_breakpoints_out): Declare.
11024 * mem-break.c (mark_breakpoints_out): New.
11025 (free_all_breakpoints): Use it.
11026 * server.c (handle_target_event): If the process is gone, mark
11028 * thread-db.c (struct thread_db) <create_bp>: New field.
11029 (thread_db_enable_reporting): Fix prototype. Store a thread event
11030 breakpoint reference in the thread_db struct.
11031 (thread_db_load_search): Clear the thread_db object.
11032 (try_thread_db_load_1): Ditto.
11033 (switch_to_process): New.
11034 (disable_thread_event_reporting): Use it.
11035 (remove_thread_event_breakpoints): New.
11036 (thread_db_detach, thread_db_mourn): Use it.
11038 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11040 * linux-low.c (linux_enable_event_reporting): New.
11041 (linux_wait_for_event_1, handle_extended_wait): Use it.
11043 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11045 * linux-low.c (linux_kill_one_lwp, linux_kill)
11046 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11047 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11048 SIGSTOP even if the LWP is stopped.
11049 (send_sigstop_callback): New.
11050 (stop_all_lwps): Use send_sigstop_callback instead.
11051 (linux_resume_one_thread): Adjust.
11052 (proceed_one_lwp): Still proceed an LWP that the client has
11053 requested to stop, if we haven't reported it as stopped yet. Make
11054 sure that LWPs the client want stopped, have a pending SIGSTOP.
11056 2010-04-26 Doug Evans <dje@google.com>
11058 * server.c (handle_general_set): Make static.
11060 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11061 Print received char after testing for error/eof instead of before.
11062 (input_interrupt): Tweak comment.
11064 2010-04-23 Doug Evans <dje@google.com>
11066 * server.c (start_inferior): Print inferior argv if --debug.
11068 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11070 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11071 * nto-x86-low.c: Include server.h
11073 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11075 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11076 be consistent with other sources of this directory.
11077 (init_registers_amd64): Correct name of source file of this function
11080 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11082 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11083 64-bit executables.
11085 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11087 * win32-i386-low.c: Add 64-bit support.
11088 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11089 (init_registers_amd64): Declare.
11090 (mappings): Add 64-bit version of array.
11091 (init_windows_x86): New function.
11092 (the_low_target): Change init_arch field to init_windows_x86.
11094 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11096 * win32-low.c: Adapt to support also 64-bit architecture.
11097 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11098 (get_image_name): Use SIZE_T type for local variable `done'.
11099 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11100 (toolhelp_get_dll_name): Idem.
11101 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11102 Use uintptr_t typecast to avoid warning.
11103 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11104 (handle_exception): Use phex_nz to avoid warning.
11105 (win32_wait): Remove unused local variable `process'.
11107 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11109 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11112 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11114 * configure.ac: Use `ws2_32' library for srv_mingw.
11115 * configure: Regenerate.
11116 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11117 * remote-utils.c: Likewise.
11119 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11121 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11122 if __x86_64__ is defined.
11124 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11126 * configure: Regenerate.
11128 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11130 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11131 * target.h (target_ops): New get_tib_address field.
11132 * win32-low.h (win32_thread_info): Add thread_local_base field.
11133 * win32-low.c (child_add_thread): Add tlb argument.
11134 Set thread_local_base field to TLB.
11135 (get_child_debug_event): Adapt to child_add_thread change.
11136 (win32_get_tib_address): New function.
11137 (win32_target_ops): Set get_tib_address field to
11138 win32_get_tib_address.
11139 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11141 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11143 * linux-low.c (linux_mourn): Also remove the process.
11144 * server.c (handle_target_event): Don't remove the process here.
11145 * nto-low.c (nto_mourn): New.
11146 (nto_target_ops): Install it.
11147 * spu-low.c (spu_mourn): New.
11148 (spu_target_ops): Install it.
11149 * win32-low.c (win32_mourn): New.
11150 (win32_target_ops): Install it.
11152 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11154 * server.h (buffer_xml_printf): Remove redundant `;'.
11156 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11158 * regcache.c (set_register_cache): Invalidate regcaches before
11159 changing the register cache layout.
11160 (regcache_invalidate_one): Allow a NULL regcache.
11161 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11162 regcaches before changing the register cache layout or the target
11165 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11167 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11168 variable warning on Linux/x86-64.
11170 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11172 GDBserver disconnected tracing support.
11174 * linux-low.c (linux_remove_process): Delete.
11175 (add_lwp): Don't set last_resume_kind here.
11176 (linux_kill): Use `mourn'.
11177 (linux_detach): Use `thread_db_detach', and `mourn'.
11178 (linux_mourn): New.
11179 (linux_attach_lwp_1): Adjust comment.
11180 (linux_attach): last_resume_kind moved the thread_info; adjust.
11181 (status_pending_p_callback): Adjust.
11182 (linux_wait_for_event_1): Adjust.
11183 (count_events_callback, select_singlestep_lwp_callback)
11184 (select_event_lwp_callback, cancel_breakpoints_callback)
11185 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11186 (proceed_one_lwp): Adjust.
11187 (linux_async): Add debug output.
11188 (linux_thread_stopped): New.
11189 (linux_pause_all): New.
11190 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11192 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11193 (thread_db_free): Delete declaration.
11194 (thread_db_detach, thread_db_mourn): Declare.
11195 * thread-db.c (thread_db_init): Use thread_db_mourn.
11196 (thread_db_free): Delete, split in two.
11197 (disable_thread_event_reporting): New.
11198 (thread_db_detach): New.
11199 (thread_db_mourn): New.
11201 * server.h (struct thread_info) <last_resume_kind>: New field.
11202 <attached>: Add comment.
11203 <gdb_detached>: New field.
11204 (handler_func): Change return type to int.
11205 (handle_serial_event, handle_target_event): Ditto.
11206 (gdb_connected): Declare.
11208 (disconnected_tracing): Declare.
11209 (stop_tracing): Declare.
11211 * server.c (handle_query) <qSupported>: Report support for
11212 disconnected tracing.
11213 (queue_stop_reply_callback): Account for running threads.
11214 (gdb_wants_thread_stopped): New.
11215 (gdb_wants_all_threads_stopped): New.
11216 (gdb_reattached_process): New.
11217 (handle_status): Clear the `gdb_detached' flag of all processes.
11218 In all-stop, stop all threads.
11219 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11220 (process_serial_event): If the remote connection breaks, or if an
11221 exit was forced with "monitor exit", force an event loop exit.
11222 Handle disconnected tracing on detach.
11223 (handle_serial_event): Adjust.
11224 (handle_target_event): If GDB isn't connected, forward events back
11225 to the inferior, unless the last process exited, in which case,
11226 exit gdbserver. Adjust interface.
11228 * remote-utils.c (remote_open): Don't block in accept. Instead
11229 register an event loop source on the listen socket file
11230 descriptor. Refactor bits into ...
11231 (listen_desc): ... this new global.
11232 (gdb_connected): ... this new function.
11233 (enable_async_notification): ... this new function.
11234 (handle_accept_event): ... this new function.
11235 (remote_close): Clear remote_desc.
11237 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11239 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11241 (mourn_inferior): Define.
11242 (target_process_qsupported): Avoid the dangling else problem.
11243 (thread_stopped): Define.
11244 (pause_all): Define.
11245 (target_waitstatus_to_string): Declare.
11246 * target.c (target_waitstatus_to_string): New.
11248 * tracepoint.c (tracing): Make extern.
11249 (disconnected_tracing): New.
11250 (stop_tracing): Make extern. Handle tracing stops due to GDB
11252 (cmd_qtdisconnected): New.
11253 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11254 (handle_tracepoint_general_set): Handle QTDisconnected.
11256 * event-loop.c (event_handler_func): Change return type to int.
11257 (process_event): Bail out if the event handler wants the event
11259 (handle_file_event): Ditto.
11260 (start_event_loop): Bail out if the event handler wants the event
11263 * nto-low.c (nto_target_ops): Adjust.
11264 * spu-low.c (spu_wait): Don't remove the process here.
11265 (spu_target_ops): Adjust.
11266 * win32-low.c (win32_wait): Don't remove the process here.
11267 (win32_target_ops): Adjust.
11269 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11271 * regcache.c (realloc_register_cache): Invalidate inferior's
11272 regcache before recreating it.
11274 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11276 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11278 2010-04-09 Stan Shebs <stan@codesourcery.com>
11279 Pedro Alves <pedro@codesourcery.com>
11281 * server.h (LONGEST): New.
11282 (struct thread_info) <while_stepping>: New field.
11283 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11285 (initialize_tracepoint, handle_tracepoint_general_set)
11286 (handle_tracepoint_query, tracepoint_finished_step)
11287 (tracepoint_was_hit, release_while_stepping_state_list):
11288 (current_traceframe): Declare.
11289 * server.c (handle_general_set): Handle tracepoint packets.
11290 (read_memory): New.
11291 (write_memory): New.
11292 (handle_search_memory_1): Use read_memory.
11293 (handle_query): Report support for conditional tracepoints, trace
11294 state variables, and tracepoint sources. Handle tracepoint
11296 (main): Initialize the tracepoints module.
11297 (process_serial_event): Handle traceframe reads/writes.
11299 * linux-low.c (handle_tracepoints): New.
11300 (linux_wait_1): Call it.
11301 (linux_resume_one_lwp): Handle while-stepping.
11302 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11303 (linux_target_ops): Install them.
11304 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11306 * linux-x86-low.c (x86_supports_tracepoints): New.
11307 (the_low_target). Install it.
11309 * mem-break.h (delete_breakpoint): Declare.
11310 * mem-break.c (delete_breakpoint): Make external.
11312 * target.h (struct target_ops): Add `supports_tracepoints',
11313 `read_pc', and `write_pc' fields.
11314 (target_supports_tracepoints): Define.
11315 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11318 * regcache.h (struct regcache) <registers_owned>: New field.
11319 (init_register_cache, regcache_cpy): Declare.
11320 (regcache_read_pc, regcache_write_pc): Declare.
11321 (register_cache_size): Declare.
11322 (supply_regblock): Declare.
11323 * regcache.c (init_register_cache): New.
11324 (new_register_cache): Use it.
11325 (regcache_cpy): New.
11326 (register_cache_size): New.
11327 (supply_regblock): New.
11328 (regcache_read_pc, regcache_write_pc): New.
11330 * tracepoint.c: New.
11332 * Makefile.in (OBS): Add tracepoint.o.
11333 (tracepoint.o): New rule.
11335 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11337 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11339 (i386-mmx.c): Likewise.
11340 (i386-mmx-linux.o): Likewise.
11341 (i386-mmx-linux.c): Likewise.
11343 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11344 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11345 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11346 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11348 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11349 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11350 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11352 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11354 * Makefile.in (clean): Updated.
11356 (i386-avx.c): Likewise.
11357 (i386-avx-linux.o): Likewise.
11358 (i386-avx-linux.c): Likewise.
11359 (amd64-avx.o): Likewise.
11360 (amd64-avx.c): Likewise.
11361 (amd64-avx-linux.o): Likewise.
11362 (amd64-avx-linux.c): Likewise.
11364 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11365 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11366 (srv_amd64_regobj): Add amd64-avx.o.
11367 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11368 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11369 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11370 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11371 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11372 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11373 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11375 * i387-fp.c: Include "i386-xstate.h".
11377 (i387_cache_to_xsave): Likewise.
11378 (i387_xsave_to_cache): Likewise.
11379 (x86_xcr0): Likewise.
11381 * i387-fp.h (i387_cache_to_xsave): Likewise.
11382 (i387_xsave_to_cache): Likewise.
11383 (x86_xcr0): Likewise.
11385 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11386 * linux-crisv32-low.c (target_regsets): Likewise.
11387 * linux-m68k-low.c (target_regsets): Likewise.
11388 * linux-mips-low.c (target_regsets): Likewise.
11389 * linux-ppc-low.c (target_regsets): Likewise.
11390 * linux-s390-low.c (target_regsets): Likewise.
11391 * linux-sh-low.c (target_regsets): Likewise.
11392 * linux-sparc-low.c (target_regsets): Likewise.
11393 * linux-xtensa-low.c (target_regsets): Likewise.
11395 * linux-low.c: Include <sys/uio.h>.
11396 (regsets_fetch_inferior_registers): Support nt_type.
11397 (regsets_store_inferior_registers): Likewise.
11398 (linux_process_qsupported): New.
11399 (linux_target_ops): Add linux_process_qsupported.
11401 * linux-low.h (regset_info): Add nt_type.
11402 (linux_target_ops): Add process_qsupported.
11404 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11406 (init_registers_i386_avx_linux): New.
11407 (init_registers_amd64_avx_linux): Likewise.
11408 (xmltarget_i386_linux_no_xml): Likewise.
11409 (xmltarget_amd64_linux_no_xml): Likewise.
11410 (PTRACE_GETREGSET): Likewise.
11411 (PTRACE_SETREGSET): Likewise.
11412 (x86_fill_xstateregset): Likewise.
11413 (x86_store_xstateregset): Likewise.
11414 (use_xml): Likewise.
11415 (x86_linux_update_xmltarget): Likewise.
11416 (x86_linux_process_qsupported): Likewise.
11417 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11418 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11419 init_registers_i386_linux here. Call
11420 x86_linux_update_xmltarget.
11421 (the_low_target): Add x86_linux_process_qsupported.
11423 * server.c (handle_query): Call target_process_qsupported.
11425 * target.h (target_ops): Add process_qsupported.
11426 (target_process_qsupported): New.
11428 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11430 * inferiors.c (add_thread): Set last_status kind to
11431 TARGET_WAITKIND_IGNORE.
11432 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11433 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11434 (linux_wait_1): Move `thread' local definition to block that uses
11435 it. Don't NULL initialize `event_child'.
11436 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11437 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11438 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11440 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11442 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11443 an extended waitstatus, or by a watchpoint.
11444 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11445 thread was stepping or has been stopped by a watchpoint.
11447 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11449 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11450 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11451 of another, then delete the previous, and validate all
11453 (validate_inserted_breakpoint): New.
11454 (delete_disabled_breakpoints): New.
11455 (validate_breakpoints): New.
11456 (check_mem_read): Validate breakpoints before trusting their
11457 shadow. Delete disabled breakpoints.
11458 (check_mem_write): Validate breakpoints before trusting they
11459 should be inserted. Delete disabled breakpoints.
11460 * mem-break.h (validate_breakpoints):
11461 * server.c (handle_query): Validate breakpoints when we see a
11464 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11466 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11467 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11468 if we could tell there's a GDB breakpoint at stop_pc.
11469 (need_step_over_p): Don't do a step over if we find a GDB
11470 breakpoint at the resume PC.
11472 * mem-break.c (struct raw_breakpoint): New.
11473 (enum bkpt_type): New type `gdb_breakpoint'.
11474 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11475 fields. New field `raw'.
11476 (find_raw_breakpoint_at): New.
11477 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11478 breakpoint instead.
11479 (set_breakpoint_at): Adjust.
11480 (delete_raw_breakpoint): New.
11481 (release_breakpoint): New.
11482 (delete_breakpoint): Rename to...
11483 (delete_breakpoint_1): ... this. Add proc parameter. Use
11484 release_breakpoint. Return ENOENT.
11485 (delete_breakpoint): Reimplement.
11486 (find_breakpoint_at): Delete.
11487 (find_gdb_breakpoint_at): New.
11488 (delete_breakpoint_at): Delete.
11489 (set_gdb_breakpoint_at): New.
11490 (delete_gdb_breakpoint_at): New.
11491 (gdb_breakpoint_here): New.
11492 (set_reinsert_breakpoint): Use release_breakpoint.
11493 (uninsert_breakpoint): Rename to ...
11494 (uninsert_raw_breakpoint): ... this.
11495 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11496 (reinsert_raw_breakpoint): Change parameter type to
11498 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11500 (check_breakpoints): Adjust. Use release_breakpoint.
11501 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11502 (breakpoint_inserted_here): Ditto.
11503 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11504 Don't trust the breakpoint's shadow if it is not inserted.
11505 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11506 (delete_all_breakpoints): Adjust.
11507 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11508 use delete_breakpoint_1.
11510 * mem-break.h (breakpoints_supported): Delete declaration.
11511 (set_gdb_breakpoint_at): Declare.
11512 (gdb_breakpoint_here): Declare.
11513 (delete_breakpoint_at): Delete.
11514 (delete_gdb_breakpoint_at): Declare.
11516 * server.h (struct raw_breakpoint): Forward declare.
11517 (struct process_info): New field `raw_breakpoints'.
11519 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11522 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11524 * linux-low.c (status_pending_p_callback): Fix comment.
11525 (linux_wait_for_event_1): Move most of the internal breakpoint
11526 handling from here...
11527 (linux_wait_1): ... to here.
11528 (count_events_callback): New.
11529 (select_singlestep_lwp_callback): New.
11530 (select_event_lwp_callback): New.
11531 (cancel_breakpoints_callback): New.
11532 (select_event_lwp): New.
11533 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11534 priority to all LWPs that have had events that should be reported
11535 to the client. Cancel breakpoints when about to reporting the
11536 event to the client, not while stopping lwps. No longer cancel
11537 finished single-steps here.
11538 (cancel_finished_single_step): Delete.
11539 (cancel_finished_single_steps): Delete.
11541 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11543 * mem-break.c (enum bkpt_type): New.
11544 (struct breakpoint): New field `type'.
11545 (set_breakpoint_at): Change return type to struct breakpoint
11546 pointer. Set type to `other_breakpoint' by default.
11547 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11548 in the breakpoint list.
11549 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11550 (reinsert_breakpoint): Rename to ...
11551 (reinsert_raw_breakpoint): ... this.
11552 (reinsert_breakpoints_at): Adjust.
11553 * mem-break.h (struct breakpoint): Declare.
11554 (set_breakpoint_at): Change return type to struct breakpoint
11557 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11559 * server.c (handle_query): Assign, not compare.
11561 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11563 Teach linux gdbserver to step-over-breakpoints.
11565 * linux-low.c (can_hardware_single_step): New.
11566 (supports_breakpoints): New.
11567 (handle_extended_wait): If stopping threads, read the stop pc of
11568 the new cloned LWP.
11570 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11571 low target doesn't support retrieving the PC.
11572 (add_lwp): Set last_resume_kind to resume_continue.
11573 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11574 (linux_attach): Don't clear stop_expected. Set the lwp's
11575 last_resume_kind to resume_stop.
11576 (linux_detach_one_lwp): Don't check for removed breakpoints.
11577 (check_removed_breakpoint): Delete.
11578 (status_pending_p): Rename to ...
11579 (status_pending_p_callback): ... this. Don't check for removed
11580 breakpoints. Don't consider threads that are stopped from GDB's
11582 (linux_wait_for_lwp): Always read the stop_pc here.
11583 (cancel_breakpoint): New.
11584 (step_over_bkpt): New global.
11585 (linux_wait_for_event_1): Implement stepping over breakpoints.
11586 (gdb_wants_lwp_stopped): New.
11587 (gdb_wants_all_stopped): New.
11588 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11589 single-step traps here. Store the thread's last reported target
11591 (send_sigstop): Don't clear stop_expected. Always set it,
11593 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11594 (cancel_finished_single_step): New.
11595 (cancel_finished_single_steps): New.
11596 (wait_for_sigstop): Don't cancel finished single-step traps here.
11597 (linux_resume_one_lwp): Don't check for removed breakpoints.
11598 Don't set `step' on non-hardware step archs.
11599 (linux_set_resume_request): Ignore resume_stop requests if already
11600 stopping or stopped. Set the lwp's last_resume_kind.
11601 (resume_status_pending_p): Don't check for removed breakpoints.
11602 (need_step_over_p): New.
11603 (start_step_over): New.
11604 (finish_step_over): New.
11605 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11606 requests. Clear the thread's last reported target waitstatus.
11607 Don't use the `suspended' flag. Don't consider pending breakpoints.
11608 (linux_resume): Start a step-over if necessary.
11609 (proceed_one_lwp): New.
11610 (proceed_all_lwps): New.
11611 (unstop_all_lwps): New.
11612 * linux-low.h (struct lwp_info): Rewrite comment for the
11613 `suspended' flag. Add the `stop_pc' field. Delete the
11614 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11615 Add `'last_resume_kind' and `need_step_over' fields.
11616 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11617 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11618 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11619 (set_raw_breakpoint_at): New.
11620 (set_breakpoint_at): Rewrite to use it.
11621 (reinsert_breakpoint_handler): Delete.
11622 (set_reinsert_breakpoint): New.
11623 (reinsert_breakpoint_by_bp): Delete.
11624 (delete_reinsert_breakpoints): New.
11625 (uninsert_breakpoint): Rewrite.
11626 (uninsert_breakpoints_at): New.
11627 (reinsert_breakpoint): Rewrite.
11628 (reinsert_breakpoints_at): New.
11629 (check_breakpoints): Rewrite.
11630 (breakpoint_here): New.
11631 (breakpoint_inserted_here): New.
11632 (check_mem_read): Adjust.
11633 * mem-break.h (breakpoints_supported, breakpoint_here)
11634 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11635 (reinsert_breakpoint_by_bp): Delete declaration.
11636 (delete_reinsert_breakpoints): Declare.
11637 (reinsert_breakpoint): Delete declaration.
11638 (reinsert_breakpoints_at): Declare.
11639 (uninsert_breakpoint): Delete declaration.
11640 (uninsert_breakpoints_at): Declare.
11641 (check_breakpoints): Adjust prototype.
11642 * server.h: Adjust include order.
11643 (struct thread_info): Declare here. Add a `last_status' field.
11645 2010-03-23 Michael Snyder <msnyder@vmware.com>
11647 * server.c (crc32): New function.
11648 (handle_query): Add handling for 'qCRC:' request.
11650 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11652 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11653 lwp had been stopped by a watchpoint.
11655 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11657 * server.h (internal_error): Declare.
11658 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11659 * utils.c (internal_error): New function.
11661 2010-03-15 Andreas Schwab <schwab@redhat.com>
11663 * configure.srv: Fix typo setting srv_regobj.
11665 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11667 * linux-low.c (fetch_register): Avoid passing a non string literal
11669 (usr_store_inferior_registers): Ditto.
11671 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11673 * linux-low.c (linux_write_memory): Bail out early if peeking
11676 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11678 * linux-low.h (struct lwp_info): New fields
11679 `stopped_by_watchpoint' and `stopped_data_address'.
11680 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11681 here, and cache them in the lwp object.
11682 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11684 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11686 (linux_stopped_by_watchpoint): Rewrite.
11687 (linux_stopped_data_address): Rewrite.
11689 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11691 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11692 switching the current inferior, not before.
11694 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11696 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11697 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11698 i386-linux.c and amd64-linux.c.
11699 (reg-i386.o): Removed.
11700 (reg-i386.c): Likewise.
11701 (reg-i386-linux.o): Likewise.
11702 (reg-i386-linux.c): Likewise.
11703 (reg-x86-64.o): Likewise.
11704 (reg-x86-64.c): Likewise.
11705 (reg-x86-64-linux.o): Likewise.
11706 (reg-x86-64-linux.c): Likewise.
11708 (i386.c): Likewise.
11709 (i386-linux.o): Likewise.
11710 (i386-linux.c): Likewise.
11711 (amd64.o): Likewise.
11712 (amd64.c): Likewise.
11713 (amd64-linux.o): Likewise.
11714 (amd64-linux.c): Likewise.
11716 * configure.srv (srv_i386_regobj): New.
11717 (srv_i386_linux_regobj): Likewise.
11718 (srv_amd64_regobj): Likewise.
11719 (srv_amd64_linux_regobj): Likewise.
11720 (srv_i386_32bit_xmlfiles): Likewise.
11721 (srv_i386_64bit_xmlfiles): Likewise.
11722 (srv_i386_xmlfiles): Likewise.
11723 (srv_amd64_xmlfiles): Likewise.
11724 (srv_i386_linux_xmlfiles): Likewise.
11725 (srv_amd64_linux_xmlfiles): Likewise.
11726 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11727 srv_xmlfiles to $srv_i386_xmlfiles.
11728 (i[34567]86-*-mingw32ce*): Likewise.
11729 (i[34567]86-*-mingw*): Likewise.
11730 (i[34567]86-*-nto*): Likewise.
11731 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11732 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11733 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11734 (x86_64-*-linux*): Likewise.
11736 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11737 (init_registers_amd64_linux): New.
11738 (x86_arch_setup): Replace init_registers_x86_64_linux with
11739 init_registers_amd64_linux.
11741 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11743 * configure.ac: Check for libdl. If it is not available link against
11744 static libthread_db.
11745 * configure: Regenerate.
11747 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11751 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11752 handing a read watchpoint.
11753 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11755 2010-02-12 Doug Evans <dje@google.com>
11757 * linux-low.c (linux_supports_tracefork_flag): Document.
11758 (linux_look_up_symbols): Add comment.
11760 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11762 * regcache.c (supply_register): Clear regcache if buf is NULL.
11764 2010-02-02 Nicolas Roche <roche@sourceware.org>
11765 Joel Brobecker <brobecker@adacore.com>
11767 * inferiors.c (find_inferior): Add function documentation.
11768 (unloaded_dll): Handle the case where the unloaded dll has not
11769 been previously registered in the dll list.
11771 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11773 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11774 (thumb2_breakpoint): New.
11775 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11777 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11779 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11780 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11783 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11785 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11787 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11789 * linux-s390-low.c (s390_collect_ptrace_register)
11790 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11792 2010-01-21 Doug Evans <dje@google.com>
11794 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11795 (PTRACE_ARG4_TYPE): New macro.
11796 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11797 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11798 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11799 (usr_store_inferior_registers): Ditto.
11800 (linux_read_memory, linux_write_memory): Ditto.
11801 (linux_test_for_tracefork): Ditto.
11803 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11804 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11806 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11808 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11811 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11813 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11814 prototype to take a regcache. Adjust.
11816 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11818 * regcache.h (struct thread_info): Forward declare.
11819 (struct regcache): New.
11820 (new_register_cache): Adjust prototype.
11821 (get_thread_regcache): Declare.
11822 (free_register_cache): Adjust prototype.
11823 (registers_to_string, registers_from_string): Ditto.
11824 (supply_register, supply_register_by_name, collect_register)
11825 (collect_register_as_string, collect_register_by_name): Ditto.
11826 * regcache.c (struct inferior_regcache_data): Delete.
11827 (get_regcache): Rename to ...
11828 (get_thread_regcache): ... this. Adjust. Switch inferior before
11829 fetching registers.
11830 (regcache_invalidate_one): Adjust.
11831 (regcache_invalidate): Fix prototype.
11832 (new_register_cache): Return the new register cache.
11833 (free_register_cache): Change prototype.
11834 (realloc_register_cache): Adjust.
11835 (registers_to_string): Change prototype to take a regcache. Adjust.
11836 (registers_from_string): Ditto.
11837 (register_data): Ditto.
11838 (supply_register): Ditto.
11839 (supply_register_by_name): Ditto.
11840 (collect_register): Ditto.
11841 (collect_register_as_string): Ditto.
11842 (collect_register_by_name): Ditto.
11843 * server.c (process_serial_event): Adjust.
11844 * linux-low.h (regset_fill_func, regset_store_func): Change
11846 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11848 * linux-low.c (get_stop_pc): Adjust.
11849 (check_removed_breakpoint): Adjust.
11850 (linux_wait_for_event): Adjust.
11851 (linux_resume_one_lwp): Adjust.
11852 (fetch_register): Add regcache parameter. Adjust.
11853 (usr_store_inferior_registers): Ditto.
11854 (regsets_fetch_inferior_registers): Ditto.
11855 (regsets_store_inferior_registers): Ditto.
11856 (linux_fetch_registers, linux_store_registers): Ditto.
11857 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11859 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11861 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11862 prototype to take a regcache.
11863 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11864 * remote-utils.c (convert_ascii_to_int, outreg)
11865 (prepare_resume_reply): Change prototype to take a regcache.
11867 * target.h (struct target_ops) <fetch_registers, store_registers>:
11868 Change prototype to take a regcache.
11869 (fetch_inferior_registers, store_inferior_registers): Change
11870 prototype to take a regcache. Adjust.
11871 * proc-service.c (ps_lgetregs): Adjust.
11872 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11873 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11874 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11875 take a regcache. Adjust.
11876 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11877 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11878 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11879 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11880 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11881 (cris_cannot_fetch_register):
11882 (cris_breakpoint_at): Change prototype to take a regcache.
11884 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11885 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11886 to take a regcache. Adjust.
11887 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11889 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11890 take a regcache. Adjust.
11891 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11892 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11893 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11894 * linux-mips-low.c (mips_get_pc):
11895 (mips_set_pc): Change prototype to take a regcache. Adjust.
11896 (mips_reinsert_addr): Adjust.
11897 (mips_collect_register): Change prototype to take a regcache.
11899 (mips_supply_register):
11900 (mips_collect_register_32bit, mips_supply_register_32bit)
11901 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11902 (mips_store_fpregset): Ditto.
11903 * linux-ppc-low.c (ppc_supply_ptrace_register)
11904 (ppc_supply_ptrace_register): Ditto.
11905 (parse_spufs_run): Adjust.
11906 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11907 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11908 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11909 take a regcache. Adjust.
11910 * linux-s390-low.c (s390_collect_ptrace_register)
11911 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11912 (s390_set_pc): Change prototype to take a regcache. Adjust.
11913 (s390_arch_setup): Adjust.
11914 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11915 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11916 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11917 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11918 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11920 (sparc_breakpoint_at): Adjust.
11921 * linux-xtensa-low.c (xtensa_fill_gregset):
11922 (xtensa_store_gregset):
11923 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11924 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11925 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11926 prototype to take a regcache. Adjust.
11927 * win32-arm-low.c (arm_fetch_inferior_register)
11928 (arm_store_inferior_register): Change prototype to take a
11930 * win32-i386-low.c (i386_fetch_inferior_register)
11931 (i386_store_inferior_register): Change prototype to take a
11933 * win32-low.c (child_fetch_inferior_registers)
11934 (child_store_inferior_registers): Change prototype to take a
11936 (win32_wait): Adjust.
11937 (win32_fetch_inferior_registers): Change prototype to take a
11939 (win32_store_inferior_registers): Adjust.
11940 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11941 store_inferior_register>: Change prototype to take a regcache.
11943 2010-01-20 Doug Evans <dje@google.com>
11945 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11947 (linux_wait_for_event1, linux_init_signals): Ditto.
11948 (W_STOPCODE): Provide definition if missing.
11950 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11952 * linux-low.c (linux_core_of_thread): New.
11953 (compare_ints, show_process, list_threads): New.
11954 (linux_qxfer_osdata): Report threads and cores.
11955 (linux_target_op): Register linux_core_of_thread.
11956 * remote-utils.c (prepare_resume_reply): Report the core.
11957 (buffer_xml_printf): Support %d specifier.
11958 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11960 (handle_query): Handle qXfer:threads. Announce availability
11962 * target.h (struct target_ops): New field core_of_thread.
11964 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11966 * Makefile.in (clean): Remove new generated files.
11967 (reg-s390.o, reg-s390.c): Remove rules.
11968 (reg-s390x.o, reg-s390x.c): Likewise.
11969 (s390-linux32.o, s390-linux32.c): Add rules.
11970 (s390-linux64.o, s390-linux64.c): Likewise.
11971 (s390x-linux64.o, s390x-linux64.c): Likewise.
11972 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11973 * linux-s390-low.c: Include <elf.h>.
11974 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11975 (init_registers_s390): Remove prototype.
11976 (init_registers_s390x): Likewise.
11977 (init_registers_s390_linux32): Add prototype.
11978 (init_registers_s390_linux64): Likewise.
11979 (init_registers_s390x_linux64): Likewise.
11980 (s390_num_regs_3264): New define.
11981 (s390_regmap_3264): New global variable.
11982 (s390_cannot_fetch_register): Remove obsolete check.
11983 (s390_cannot_store_register): Likewise.
11984 (s390_collect_ptrace_register): Handle upper/lower register halves.
11985 (s390_supply_ptrace_register): Likewise.
11986 (s390_fill_gregset): Update to register number changes.
11987 (s390_get_hwcap): New routine.
11988 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11989 Install appropriate regmap and register set.
11991 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11993 * server.c (gdbserver_version): Update copyright year to 2010.
11994 * gdbreplay.c (gdbreplay_version): Likewise.
11996 2009-12-28 Doug Evans <dje@google.com>
11998 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11999 elf/external.h. Include <elf.h> instead but only if necessary.
12001 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12003 * linux-low.c (linux_remove_process): Remove `detaching'
12004 parameter. Don't release/detach from thread_db here.
12005 (linux_kill): Release/detach from thread_db here, ...
12006 (linux_detach): ... and here, before actually detaching.
12007 (linux_wait_1): ... and here, when a process exits.
12008 * thread-db.c (any_thread_of): New.
12009 (thread_db_free): Switch the current inferior to a thread of the
12012 2009-12-21 Doug Evans <dje@google.com>
12014 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12016 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12017 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12018 warning ifndef __NR_tkill. Move setting of errno there too.
12019 Delete unnecessary resetting of errno after syscall.
12020 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12022 * configure.ac: Check for dladdr.
12023 * config.in: Regenerate.
12024 * configure: Regenerate.
12025 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12026 (try_thread_db_load): Update.
12028 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12030 2009-12-18 Doug Evans <dje@google.com>
12032 * event-loop.c: Include unistd.h if it exists.
12034 * linux-low.c (my_waitpid): Move definition away from being in
12035 between linux_tracefork_child/linux_test_for_tracefork.
12037 * gdb_proc_service.h (psaddr_t): Fix type.
12038 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12039 signature to match glibc.
12041 2009-12-16 Doug Evans <dje@google.com>
12043 * linux-low.c (linux_read_memory): Fix argument to read.
12045 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12047 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12048 events, don't leave current_inferior pointing at null.
12050 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12052 * win32-low.c (LOG): Delete.
12053 (OUTMSG): Output to stderr.
12054 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12055 on compile time LOG macro.
12056 (win32_wait): Fix debug output.
12058 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12060 * win32-low.c (win32_add_one_solib): If the dll name is
12061 "ntdll.dll", prepend the system directory to the dll path.
12063 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12065 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12067 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12068 Vladimir Prus <vladimir@codesourcery.com>
12070 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12071 * configure.ac: Check for __mcoldfire__ and set
12072 gdb_cv_m68k_is_coldfire.
12073 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12074 reg-cf.o and reg-m68k.o.
12075 * configure: Regenerated.
12077 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12079 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12080 Pass it to thread_db_free.
12081 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12082 proper `detaching' argument to linux_remove_process.
12083 * linux-low.h (thread_db_free): Add `detaching' parameter.
12084 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12086 (thread_db_free): Add `detaching' parameter. Only
12087 call td_ta_clear_event if detaching from process.
12089 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12091 * thread-db.c (thread_db_free): Fix typo.
12093 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12096 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12098 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12100 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12101 with an i686 compiler.
12102 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12104 * configure: Rebuilt.
12106 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12110 * server.c (handle_search_memory_1): Correct read_addr initialization
12111 in loop for searching subsequent chunks.
12113 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12115 * configure.ac: New --with-libthread-db option.
12116 * thread-db.c: Allow direct dependence on libthread_db.
12117 (thread_db_free): Adjust.
12118 * config.in: Regenerate.
12119 * configure: Likewise.
12121 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12124 * thread-db.c (attach_thread): New function.
12125 (maybe_attach_thread): Return success/failure.
12126 (find_new_threads_callback): Adjust.
12127 (thread_db_find_new_threads): Loop until no new threads.
12129 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12131 * proc-service.c (ps_lgetregs): Formatting.
12133 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12135 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12136 * configure.ac: Adjust.
12137 * linux-low.h (struct process_info_private): Move members to struct
12139 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12140 * linux-low.c (linux_remove_process): Adjust.
12141 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12142 * server.c (handle_query): Move code ...
12143 (handle_monitor_command): ... here. New function.
12144 * target.h (struct target_ops): New member.
12145 * thread-db.c (struct thread_db): New.
12146 (libthread_db_search_path): New variable.
12147 (thread_db_create_event, thread_db_enable_reporting)
12148 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12149 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12150 (try_thread_db_load_1, dladdr_to_soname): New functions.
12151 (try_thread_db_load, thread_db_load_search): New functions.
12152 (thread_db_init): Search for libthread_db.
12153 (thread_db_free): New function.
12154 (thread_db_handle_monitor_command): Likewise.
12155 * config.in: Regenerate.
12156 * configure: Regenerate.
12158 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12160 * spu-low.c (spu_kill): Wait for inferior to terminate.
12161 Call clear_inferiors.
12162 (spu_detach): Call clear_inferiors.
12164 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12166 * aclocal.m4: Regenerate.
12167 * config.in: Likewise.
12168 * configure: Likewise.
12170 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12172 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12173 (parse_spufs_run): New function.
12174 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12175 (ppc_breakpoint_at): Handle SPU breakpoints.
12177 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12179 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12180 (SPUFS_MAGIC): Define.
12181 (spu_enumerate_spu_ids): New function.
12182 (linux_qxfer_spu): New function.
12183 (linux_target_ops): Install linux_qxfer_spu.
12185 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12187 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12188 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12189 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12190 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12191 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12192 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12193 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12194 (init_registers_powerpc_cell32l): Add prototype.
12195 (init_registers_powerpc_cell64l): Likewise.
12196 (ppc_arch_setup): Detect Cell/B.E. architecture.
12198 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12200 * Makefile.in (datarootdir): New variable.
12202 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12204 * linux-low.c (linux_write_memory): Update debugging output.
12205 * Makefile.in (clean): Add new descriptions.
12206 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12207 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12208 * configure.srv: Add new files for arm*-*-linux*.
12209 * linux-arm-low.c: Add new declarations.
12210 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12211 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12212 (HWCAP_VFPv3D16): New.
12213 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12214 instead of __IWMMXT__.
12215 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12216 (arm_arch_setup): New.
12217 (target_regsets): Remove #ifdef. Add VFP regset.
12218 (the_low_target): Use arm_arch_setup.
12220 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12222 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12223 the main thread again.
12225 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12227 Adding Neutrino gdbserver.
12228 * configure: Regenerated.
12229 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12230 * configure.srv (i[34567]86-*-nto*): New target.
12231 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12232 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12233 (nto_comctrl) [__QNX__]: New function.
12234 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12236 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12238 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12241 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12242 Pedro Alves <pedro@codesourcery.com>
12244 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12245 don't support CONTEXT_EXTENDED_REGISTERS.
12246 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12247 (the_low_target): Install them.
12248 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12249 failing with ERROR_PIPE_NOT_CONNECTED.
12251 2009-06-30 Doug Evans <dje@google.com>
12252 Pierre Muller <muller@ics.u-strasbg.fr>
12254 Add h/w watchpoint support to x86-linux, win32-i386.
12255 * Makefile.in (SFILES): Add i386-low.c
12256 (i386_low_h): Define.
12257 (i386-low.o): Add dependencies.
12258 (linux-x86-low.o): Add i386-low.h dependency.
12259 (win32-i386-low.o): Ditto.
12260 * i386-low.c: New file.
12261 * i386-low.h: New file.
12262 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12263 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12264 * linux-low.c (linux_add_process): Initialize arch_private.
12265 (linux_remove_process): Free arch_private.
12266 (add_lwp): Initialize arch_private.
12267 (delete_lwp): Free arch_private.
12268 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12270 * linux-low.h (process_info_private): New member arch_private.
12271 (lwp_info): New member arch_private.
12272 (linux_target_ops): New members new_process, new_thread,
12274 (ptid_of): New macro.
12275 * linux-x86-low.c: Include stddef.h, i386-low.h.
12276 (arch_process_info): New struct.
12277 (arch_lwp_info): New struct.
12278 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12279 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12280 (i386_dr_low_get_status): New function.
12281 (x86_insert_point, x86_remove_point): New functions.
12282 (x86_stopped_by_watchpoint): New function.
12283 (x86_stopped_data_address): New function.
12284 (x86_linux_new_process, x86_linux_new_thread): New functions.
12285 (x86_linux_prepare_to_resume): New function.
12286 (the_low_target): Add entries for insert_point, remove_point,
12287 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12289 * server.c (debug_hw_points): New global.
12290 (monitor_show_help): Document set debug-hw-points.
12291 (handle_query): Process "set debug-hw-points".
12292 * server.h (debug_hw_points): Declare.
12293 (paddress): Declare.
12294 * utils.c (NUMCELLS, CELLSIZE): New macros.
12295 (get_sell, xsnprintf, paddress): New functions.
12296 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12297 remove_point, stopped_by_watchpoint, stopped_data_address.
12298 * win32-i386-low.c: Include i386-low.h.
12299 (debug_reg_state): Replaces dr.
12300 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12301 (i386_dr_low_get_status): New function.
12302 (i386_insert_point, i386_remove_point): New functions.
12303 (i386_stopped_by_watchpoint): New function.
12304 (i386_stopped_data_address): New function.
12305 (i386_initial_stuff): Update.
12306 (get_thread_context,set_thread_context,i386_thread_added): Update.
12307 (the_low_target): Add entries for insert_point,
12308 remove_point, stopped_by_watchpoint, stopped_data_address.
12309 * win32-low.c (win32_insert_watchpoint): New function.
12310 (win32_remove_watchpoint): New function.
12311 (win32_stopped_by_watchpoint): New function.
12312 (win32_stopped_data_address): New function.
12313 (win32_target_ops): Add entries for insert_watchpoint,
12314 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12315 * win32-low.h (win32_target_ops): New members insert_point,
12316 remove_point, stopped_by_watchpoint, stopped_data_address.
12318 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12320 * server.c (process_serial_event): Re-return unsupported, not
12321 error, if the type isn't recognized. Re-allow supporting only
12322 insert or remove packets. Also call require_running for
12323 breakpoints. Add missing break statement to default case. Tidy.
12324 * target.h (struct target_ops): Rename insert_watchpoint to
12325 insert_point, and remove_watchpoint to remove_point.
12327 * linux-low.h (struct linux_target_ops): Likewise.
12328 * linux-low.c (linux_insert_watchpoint): Rename to ...
12329 (linux_insert_point): ... this. Adjust.
12330 (linux_remove_watchpoint): Rename to ...
12331 (linux_remove_point): ... this. Adjust.
12332 (linux_target_ops): Adjust.
12333 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12334 (cris_insert_point): ... this.
12335 (cris_remove_watchpoint): Rename to ...
12336 (cris_remove_point): ... this.
12337 (the_low_target): Adjust.
12339 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12341 * server.c (handle_v_kill): Pass signal_pid to
12342 kill_inferior if multi_process is zero.
12344 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12346 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12347 * target.h (target_ops): Comment for *_watchpoint to make it clear
12348 the functions can get types '0' and '1'.
12350 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12352 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12353 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12354 * regcache.c (get_regcache): Likewise.
12355 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12356 * win32-low.c (child_fetch_inferior_registers): Remove check for
12359 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12360 Pedro Alves <pedro@codesourcery.com>
12362 * target.h (struct target_ops) <supports_multi_process>: New
12364 (target_supports_multi_process): New.
12365 * server.c (handle_query): Even if GDB reports support, only
12366 enable multi-process if the target also supports it. Report
12367 multi-process support only if the target backend supports it.
12368 * linux-low.c (linux_supports_multi_process): New function.
12369 (linux_target_ops): Install it as target_supports_multi_process
12372 2009-05-24 Doug Evans <dje@google.com>
12374 Global renaming of find_thread_pid to find_thread_ptid.
12375 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12376 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12377 All callers updated.
12379 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12380 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12383 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12384 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12385 (linux_resume_one_lwp): Ditto.
12387 2009-05-23 Doug Evans <dje@google.com>
12389 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12390 from struct inferior_list_entry * to struct lwp_info *.
12391 All callers updated.
12393 2009-05-13 Doug Evans <dje@google.com>
12395 * linux-x86-low.c: Don't include assert.h.
12396 (x86_siginfo_fixup): Use fatal, not assert.
12397 (x86_arch_setup): Fix comment.
12399 2009-05-12 Doug Evans <dje@google.com>
12401 Biarch support for i386/amd64 gdbserver.
12402 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12403 Add linux-x86-low.c.
12404 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12405 (linux-x86-low.o): Add.
12406 * linux-x86-64-low.c: Delete.
12407 * linux-i386-low.c: Delete.
12408 * linux-x86-low.c: New file.
12409 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12411 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12413 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12414 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12415 (linux_child_pid_to_exec_file): New function.
12416 (elf_64_header_p, elf_64_file_p): New functions.
12417 (siginfo_fixup): New function.
12418 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12419 give target a chance to convert layout.
12420 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12421 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12423 2009-05-07 Doug Evans <dje@google.com>
12425 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12426 (regsets_store_inferior_registers): Ditto.
12428 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12432 * linux-low.c (must_set_ptrace_flags): Delete.
12433 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12435 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12436 `lwp->must_set_ptrace_flags' instead.
12437 (linux_wait_for_event_1): Set ptrace options here.
12438 (linux_wait_1): ... not here.
12440 2009-04-30 Doug Evans <dje@google.com>
12442 * inferiors.c (started_inferior_callback): New function.
12443 (attached_inferior_callback): New function.
12444 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12445 * server.c (print_started_pid, print_attached_pid): New functions.
12446 (detach_or_kill_for_exit): New function.
12447 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12448 * server.h (have_started_inferiors_p): Declare.
12449 (have_attached_inferiors_p): Declare.
12451 * inferiors.c (remove_process): Fix memory leak, free process.
12452 * linux-low.c (linux_remove_process): New function.
12453 (linux_kill): Call it instead of remove_process.
12454 (linux_detach, linux_wait_1): Ditto.
12456 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12458 * configure.srv: Add x86 Windows CE target.
12460 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12462 * inferiors.c (get_thread_process): Make global.
12463 * server.h (get_thread_process): Add prototype.
12464 * thread-db.c (find_one_thread): Use get_thread_process
12465 instead of current_process.
12466 (thread_db_get_tls_address): Do not crash if called when
12467 thread layer is not yet initialized.
12469 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12471 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12472 * spu-low.c (current_tid): Rename to ...
12473 (current_ptid): ... this.
12474 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12475 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12476 ptid_get_lwp (current_ptid) instead of current_tid.
12477 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12478 instead of current_tid. Use find_process_pid to verify pid
12479 argument is valid. Pass proper argument to remove_process.
12480 (spu_thread_alive): Compare current_ptid instead of current_tid.
12481 (spu_resume): Likewise.
12483 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12485 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12488 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12490 Implement the multiprocess extensions, and add linux multiprocess
12493 * server.h (ULONGEST): Declare.
12494 (struct ptid, ptid_t): New.
12495 (minus_one_ptid, null_ptid): Declare.
12496 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12497 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12498 (struct inferior_list_entry): Change `id' type from unsigned from
12500 (struct sym_cache, struct breakpoint, struct
12501 process_info_private): Forward declare.
12502 (struct process_info): Declare.
12503 (current_process): Declare.
12504 (all_processes): Declare.
12505 (initialize_inferiors): Declare.
12506 (add_thread): Adjust to use ptid_t.
12507 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12508 (add_process, remove_process, find_thread_pid): Declare.
12509 (find_inferior_id): Adjust to use ptid_t.
12510 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12511 (multi_process): Declare.
12512 (push_event): Adjust to use ptid_t.
12513 (read_ptid, write_ptid): Declare.
12514 (prepare_resume_reply): Adjust to use ptid_t.
12515 (clear_symbol_cache): Declare.
12516 * inferiors.c (all_processes): New.
12517 (null_ptid, minus_one_ptid): New.
12518 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12519 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12520 (add_thread): Change unsigned long to ptid. Remove gdb_id
12522 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12523 (gdb_id_to_thread): Rename to ...
12524 (find_thread_pid): ... this. Change unsigned long to ptid.
12525 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12526 (loaded_dll, pull_pid_from_list): Adjust.
12527 (add_process, remove_process, find_process_pid)
12528 (get_thread_process, current_process, initialize_inferiors): New.
12529 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12530 (struct target_waitstatus) <related_pid>: Ditto.
12531 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12532 return type to int.
12533 (struct target_ops) <join>: Add `pid' argument.
12534 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12535 (struct target_ops) <wait>: Add `ptid' field. Change return type
12537 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12538 (mywait): Add `ptid' argument. Change return type to ptid_t.
12539 (target_pid_to_str): Declare.
12540 * target.c (set_desired_inferior): Adjust to use ptids.
12541 (mywait): Add new `ptid' argument. Adjust.
12542 (target_pid_to_str): New.
12543 * mem-break.h (free_all_breakpoints): Declare.
12544 * mem-break.c (breakpoints): Delelete.
12545 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12546 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12547 to use per-process breakpoint list.
12548 (free_all_breakpoints): New.
12549 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12550 (symbol_cache, all_symbols_looked_up): Delete.
12552 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12554 (prepare_resume_reply): Change ptid argument's type from unsigned
12555 long to ptid_t. Adjust. Implement W;process and X;process.
12556 (free_sym_cache, clear_symbol_cache): New.
12557 (look_up_one_symbol): Adjust to per-process symbol cache. *
12558 * server.c (cont_thread, general_thread, step_thread): Change type
12560 (attached): Delete.
12561 (multi_process): New.
12562 (last_ptid): Change type to ptid_t.
12563 (struct vstop_notif) <ptid>: Change type to ptid_t.
12564 (queue_stop_reply, push_event): Change `ptid' argument's type to
12566 (discard_queued_stop_replies): Add `pid' argument.
12567 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12568 changes. Don't reference the `attached' global.
12569 (attach_inferior): Adjust to mywait interface changes.
12570 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12571 features. Handle and report "multiprocess+". Handle
12573 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12575 (handle_v_kill): New.
12576 (handle_v_stopped): Adjust to use target_pid_to_str.
12577 (handle_v_requests): Allow multiple attaches and runs when
12578 multiprocess extensions are in effect. Handle "vKill".
12579 (myresume): Adjust to use ptids.
12580 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12581 (handle_status): Adjust to discard_queued_stop_replies interface
12583 (first_thread_of, kill_inferior_callback)
12584 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12585 (main): Call initialize_inferiors. Adjust to use ptids, killing
12586 and detaching from all inferiors. Handle multiprocess packet
12588 * linux-low.h: Include gdb_proc_service.h.
12589 (struct process_info_private): New.
12590 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12591 <lwpid_of>: Use ptid_get_lwp.
12592 (get_lwp_thread): Adjust.
12593 (struct lwp_info): Add `dead' member.
12594 (find_lwp_pid): Declare.
12595 * linux-low.c (thread_db_active): Delete.
12596 (new_inferior): Adjust comment.
12597 (inferior_pid): Delete.
12598 (linux_add_process): New.
12599 (handle_extended_wait): Adjust.
12600 (add_lwp): Change unsigned long to ptid.
12601 (linux_create_inferior): Add process to processes table. Adjust
12602 to use ptids. Don't set new_inferior here.
12603 (linux_attach_lwp): Rename to ...
12604 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12605 it. Adjust to use ptids.
12606 (linux_attach_lwp): New.
12607 (linux_attach): Add process to processes table. Don't set
12609 (struct counter): New.
12610 (second_thread_of_pid_p, last_thread_of_process_p): New.
12611 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12612 multiple processes.
12613 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12614 processes. Remove process from process table.
12615 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12616 to multiple processes.
12617 (any_thread_of): New.
12618 (linux_detach): Add `pid' argument, and handle it. Remove process
12619 from processes table.
12620 (linux_join): Add `pid' argument. Handle it.
12621 (linux_thread_alive): Change unsighed long argument to ptid_t.
12622 Consider dead lwps as not being alive.
12623 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12624 threads we're not interested in.
12625 (same_lwp, find_lwp_pid): New.
12626 (linux_wait_for_lwp): Change `pid' argument's type from int to
12628 (linux_wait_for_event): Rename to ...
12629 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12630 from int to ptid_t. Adjust.
12631 (linux_wait_for_event): New.
12632 (linux_wait_1): Add `ptid' argument. Change return type to
12633 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12634 that exit from the process table.
12635 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12637 (mark_lwp_dead): New.
12638 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12639 stopping all threads, mark its main lwp as dead.
12640 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12642 (fetch_register, usr_store_inferior_registers)
12643 (regsets_fetch_inferior_registers)
12644 (regsets_store_inferior_registers, linux_read_memory)
12645 (linux_write_memory): Inline `inferior_pid'.
12646 (linux_look_up_symbols): Adjust to use per-process
12647 `thread_db_active'.
12648 (linux_request_interrupt): Adjust to use ptids.
12649 (linux_read_auxv): Inline `inferior_pid'.
12650 (initialize_low): Don't reference thread_db_active.
12651 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12652 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12653 (ps_getpid): Return the pid of the current inferior.
12654 * thread-db.c (proc_handle, thread_agent): Delete.
12655 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12657 (find_one_thread): Change argument type to ptid_t. Adjust to
12659 (maybe_attach_thread): Adjust to per-process data and ptids.
12660 (thread_db_find_new_threads): Ditto.
12661 (thread_db_init): Ditto.
12662 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12663 processes table. Adjust to use ptids.
12664 (spu_kill, spu_detach): Adjust interface. Remove process from
12666 (spu_join, spu_thread_alive): Adjust interface.
12667 (spu_wait): Adjust interface. Remove process from processes
12668 table. Adjust to use ptids.
12669 * win32-low.c (current_inferior_tid): Delete.
12670 (current_inferior_ptid): New.
12671 (debug_event_ptid): New.
12672 (thread_rec): Take a ptid. Adjust.
12673 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12674 (child_delete_thread): Ditto.
12675 (do_initial_child_stuff): Add `attached' argument. Add process to
12677 (child_fetch_inferior_registers, child_store_inferior_registers):
12679 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12680 (win32_attach): Pass 1 to do_initial_child_stuff.
12681 (win32_kill): Adjust interface. Remove process from processes
12683 (win32_detach): Ditto.
12684 (win32_join): Adjust interface.
12685 (win32_thread_alive): Take a ptid.
12686 (win32_resume): Adjust to use ptids.
12687 (get_child_debug_event): Ditto.
12688 (win32_wait): Adjust interface. Remove exiting process from
12691 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12693 Non-stop mode support.
12695 * server.h (non_stop): Declare.
12696 (gdb_client_data, handler_func): Declare.
12697 (delete_file_handler, add_file_handler, start_event_loop):
12699 (handle_serial_event, handle_target_event, push_event)
12700 (putpkt_notif): Declare.
12701 * target.h (enum resume_kind): New.
12702 (struct thread_resume): Replace `step' field by `kind' field.
12703 (TARGET_WNOHANG): Define.
12704 (struct target_ops) <wait>: Add `options' argument.
12705 <supports_non_stop, async, start_non_stop>: New fields.
12706 (target_supports_non_stop, target_async): New.
12707 (start_non_stop): Declare.
12708 (mywait): Add `options' argument.
12709 * target.c (mywait): Add `options' argument. Print child exit
12710 notifications here.
12711 (start_non_stop): New.
12712 * server.c (non_stop, own_buf, mem_buf): New globals.
12713 (struct vstop_notif): New.
12714 (notif_queue): New global.
12715 (queue_stop_reply, push_event, discard_queued_stop_replies)
12716 (send_next_stop_reply): New.
12717 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12719 (attach_inferior): In non-stop mode, don't wait for the target
12721 (handle_general_set): Handle QNonStop.
12722 (handle_query): When handling qC, return the current general
12723 thread, instead of the first thread of the list.
12724 (handle_query): If the backend supports non-stop mode, include
12725 QNonStop+ in the qSupported query response.
12726 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12728 (handle_v_attach, handle_v_run): Handle non-stop mode.
12729 (handle_v_stopped): New.
12730 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12731 (myresume): Adjust to use resume_kind. Handle non-stop.
12732 (queue_stop_reply_callback): New.
12733 (handle_status): Handle non-stop mode.
12734 (main): Clear non_stop flag on reconnection. Use the event-loop.
12735 Refactor serial protocol handling from here ...
12736 (process_serial_event): ... to this new function. When GDB
12737 selects any thread, select one here. In non-stop mode, wait until
12738 GDB acks all pending events before exiting.
12739 (handle_serial_event, handle_target_event): New.
12740 * remote-utils.c (remote_open): Install remote_desc in the event
12742 (remote_close): Remove remote_desc from the event loop.
12743 (putpkt_binary): Rename to...
12744 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12745 (putpkt_binary): New as wrapper around putpkt_binary_1.
12746 (putpkt_notif): New.
12747 (prepare_resume_reply): In non-stop mode, don't change the
12749 * event-loop.c: New.
12750 * Makefile.in (OBJ): Add event-loop.o.
12751 (event-loop.o): New rule.
12753 * linux-low.h (pid_of): Moved here.
12755 (get_lwp_thread): Use lwpid_of.
12756 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12757 * linux-low.c (pid_of): Delete.
12758 (inferior_pid): Use lwpid_of.
12759 (linux_event_pipe): New.
12760 (target_is_async_p): New.
12762 (handle_extended_wait): Use lwpid_of.
12763 (add_lwp): Don't set lwpid field.
12764 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12765 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12766 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12767 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12768 first. Adjust to linux_wait_for_event interface changes. Use
12770 (linux_detach): Don't delete the main lwp here.
12771 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12772 (status_pending_p): Don't consider explicitly suspended lwps.
12773 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12774 pointer. Add OPTIONS argument. Change return type to int. Use
12775 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12776 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12777 pointer. Add status pointer argument. Return a pid instead of a
12778 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12779 changes. In non-stop mode, don't switch to a random thread.
12780 (linux_wait): Rename to...
12781 (linux_wait_1): ... this. Add target_options argument, and handle
12782 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12783 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12784 clean exit and signal exit code. Don't stop all threads in
12785 non-stop mode. In all-stop mode, only stop all threads when
12786 reporting a stop to GDB. Handle explicit thread stop requests.
12787 (async_file_flush, async_file_mark): New.
12789 (send_sigstop): Use lwpid_of.
12790 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12791 interface changes. In non-stop mode, don't switch to a random
12793 (linux_resume_one_lwp): Use lwpid_of.
12794 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12795 (linux_resume_one_thread): ... this. Handle resume_stop. In
12796 non-stop mode, don't look for pending flag in all threads.
12797 (resume_status_pending_p): Don't consider explicitly suspended
12799 (my_waitpid): Reimplement. Emulate __WALL.
12800 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12802 (sigchld_handler, linux_supports_non_stop, linux_async)
12803 (linux_start_non_stop): New.
12804 (linux_target_ops): Register linux_supports_non_stop, linux_async
12805 and linux_start_non_stop.
12806 (initialize_low): Install SIGCHLD handler.
12807 * thread-db.c (thread_db_create_event, find_one_thread)
12808 (thread_db_get_tls_address): Use lwpid_of.
12809 * win32-low.c (win32_detach): Adjust to use resume_kind.
12810 (win32_wait): Add `options' argument.
12811 * spu-low.c (spu_resume): Adjust to use resume_kind.
12812 (spu_wait): Add `options' argument.
12814 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12816 Decouple target code from remote protocol.
12818 * target.h (enum target_waitkind): New.
12819 (struct target_waitstatus): New.
12820 (struct target_ops) <wait>: Return an unsigned long. Take a
12821 target_waitstatus pointer instead of a char pointer.
12822 (mywait): Likewise.
12823 * target.c (mywait): Change prototype to return an unsigned long.
12824 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12825 * server.h (thread_from_wait, old_thread_from_wait): Delete
12827 (prepare_resume_reply): Change prototype to take a
12829 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12830 (last_status, last_ptid): New.
12831 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12832 pid instead of a signal.
12833 (attach_inferior): Remove "status" and "signal" parameters.
12835 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12837 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12838 (handle_v_requests, myresume): Remove "status" and "signal"
12839 parameters. Adjust.
12840 (handle_status): New.
12841 (main): Delete local `status'. Adjust.
12842 * remote-utils.c: Include target.h.
12843 (prepare_resume_reply): Change prototype to take a
12844 target_waitstatus. Adjust.
12846 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12848 * spu-low.c (spu_wait): Adjust.
12849 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12851 (win32_wait): Adjust.
12853 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12855 * target.h (struct thread_resume): Delete leave_stopped member.
12856 (struct target_ops): Add a `n' argument to the `resume' callback.
12857 * server.c (start_inferior): Adjust.
12858 (handle_v_cont, myresume): Adjust.
12859 * linux-low.c (check_removed_breakpoint): Adjust to resume
12860 interface change, and to removed leave_stopped field.
12861 (resume_ptr): Delete.
12862 (struct thread_resume_array): New.
12863 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12864 resume interface change.
12865 (linux_continue_one_thread, linux_queue_one_thread)
12866 (resume_status_pending_p): Check if the resume field is NULL
12867 instead of checking the leave_stopped member.
12868 (linux_resume): Adjust to the target resume interface change.
12869 * spu-low.c (spu_resume): Adjust to the target resume interface
12871 * win32-low.c (win32_detach, win32_resume): Ditto.
12873 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12875 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12877 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12879 (linux_continue_one_thread): Only preserve the stepping flag if
12880 there's a pending breakpoint.
12882 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12884 * server.c (main): After the inferior having exited, call
12885 remote_close before exiting gdbserver.
12887 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12889 Fix size of FPSCR in Power 7 processors.
12890 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12891 (PPC_FEATURE_HAS_DFP): New #define.
12892 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12895 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12897 * server.c (handle_query) Whitespace and formatting.
12899 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12901 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12902 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12903 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12904 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12905 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12906 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12907 Makefile.in, configure.ac: Fix whitespace throughout.
12908 * configure: Regenerate.
12910 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12912 * inferiors.c (find_inferior): Make it safe for the callback
12913 function to delete the currently iterated inferior.
12915 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12917 * Makefile.in (linuw_low_h): Move higher.
12918 (thread-db.o): Depend on $(linux_low_h).
12920 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12922 Rename "process" to "lwp" throughout.
12924 * linux-low.c (all_processes): Rename to...
12925 (all_lwps): ... this.
12926 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12927 (add_process): Rename to ...
12928 (add_lwp): ... this. Adjust.
12929 (linux_create_inferior): Adjust.
12930 (linux_attach_lwp): Adjust.
12931 (linux_attach): Adjust.
12932 (linux_kill_one_process): Rename to ...
12933 (linux_kill_one_lwp): ... this. Adjust.
12934 (linux_kill): Adjust.
12935 (linux_detach_one_process): Rename to ...
12936 (linux_detach_one_lwp): ... this. Adjust.
12937 (linux_detach): Adjust.
12938 (check_removed_breakpoint): Adjust.
12939 (status_pending_p): Adjust.
12940 (linux_wait_for_process): Rename to ...
12941 (linux_wait_for_lwp): ... this. Adjust.
12942 (linux_wait_for_event): Adjust.
12943 (send_sigstop): Adjust.
12944 (wait_for_sigstop): Adjust.
12945 (stop_all_processes): Rename to ...
12946 (stop_all_lwps): ... this.
12947 (linux_resume_one_process): Rename to ...
12948 (linux_resume_one_lwp): ... this. Adjust.
12949 (linux_set_resume_request, linux_continue_one_thread)
12950 (linux_queue_one_thread, resume_status_pending_p)
12951 (usr_store_inferior_registers, regsets_store_inferior_registers)
12952 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12954 * linux-low.h (get_process): Rename to ...
12955 (get_lwp): ... this. Adjust.
12956 (get_thread_process): Rename to ...
12957 (get_thread_lwp): ... this. Adjust.
12958 (get_process_thread): Rename to ...
12959 (get_lwp_thread): ... this. Adjust.
12960 (struct process_info): Rename to ...
12961 (struct lwp_info): ... this.
12962 (all_processes): Rename to ...
12963 (all_lwps): ... this.
12964 * proc-service.c (ps_lgetregs): Adjust.
12965 * thread-db.c (thread_db_create_event, find_one_thread)
12966 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12968 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12970 * server.c (handle_query): Handle "qAttached".
12972 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12974 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12975 GPLv3, update license URL.
12977 2009-03-01 Doug Evans <dje@google.com>
12979 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12980 (server_h): Add gdb_signals.h.
12981 (signals.o): Update.
12982 * server.h (target_signal_from_host,target_signal_to_host_p)
12983 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12985 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12987 * remote-utils.c (getpkt): Also generate remote-debug
12988 information if noack_mode is set.
12990 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12992 * server.c (handle_query): Report qXfer:siginfo:read and
12993 qXfer:siginfo:write as supported and handle them.
12994 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12995 * linux-low.c (linux_xfer_siginfo): New.
12996 (linux_target_ops): Set it.
12998 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13000 * server.c (gdbserver_usage): Mention --remote-debug.
13001 (main): Accept '--remote-debug' switch.
13003 2009-01-18 Doug Evans <dje@google.com>
13005 * regcache.c (new_register_cache): No need to check result of xcalloc.
13006 * server.c (handle_search_memory): Back out calls to xmalloc,
13007 result is checked and error is returned to user upon failure.
13008 (handle_query): Ditto. Add more checks for result of malloc.
13009 (handle_v_cont): Check result of malloc, report error back to
13011 (handle_v_run): Ditto. Call freeargv.
13012 * server.h (freeargv): Declare.
13013 * utils.c (freeargv): New fn.
13015 2009-01-15 Doug Evans <dje@google.com>
13017 * gdbreplay.c (perror_with_name): Make arg const char *.
13018 * server.h (target_signal_to_name): Make return type const char *.
13019 * thread-db.c (thread_db_err_str): Make return type const char *.
13020 * utils.c (perror_with_name): Make arg const char *.
13022 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13024 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13025 when handling a EXIT_PROCESS_DEBUG_EVENT.
13027 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13029 * gdbreplay.c (gdbreplay_version): Update copyright year.
13030 * server.c (gdbserver_version): Likewise.
13032 2009-01-05 Doug Evans <dje@google.com>
13034 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13035 (handle_extended_wait): Improve comment.
13037 2008-12-13 Doug Evans <dje@google.com>
13039 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13040 * server.h (ATTR_MALLOC): New macro.
13041 (xmalloc,xcalloc,xstrdup): Declare.
13042 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13043 * inferiors.c: Ditto.
13044 * linux-low.c: Ditto.
13045 * mem-break.c: Ditto.
13046 * regcache.c: Ditto.
13047 * remote-utils.c: Ditto.
13050 * win32-low.c: Ditto.
13052 2008-12-12 Doug Evans <dje@google.com>
13054 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13055 in debugging printf.
13057 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13059 2008-12-09 Doug Evans <dje@google.com>
13061 * linux-low.h (struct process_info): Delete member tid, unused.
13062 * thread-db.c (find_one_thread): Update.
13063 (maybe_attach_thread): Update.
13065 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13067 * target.h (struct target_ops): Add qxfer_osdata member.
13068 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13070 (linux_qxfer_osdata): New functions.
13071 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13073 * server.c (handle_query): Handle "qXfer:osdata:read:".
13074 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13075 (buffer_xml_printf): New functions.
13076 * server.h (struct buffer): New.
13077 (buffer_grow_str, buffer_grow_str0): New macros.
13078 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13079 (buffer_xml_printf): Declare.
13081 2008-11-24 Doug Evans <dje@google.com>
13083 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13085 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13087 * server.c (handle_v_run): Always use the supplied argument list.
13089 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13091 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13092 (xtensa_regmap_table): Add entry for scompare1.
13094 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13096 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13097 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13098 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13099 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13100 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13101 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13102 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13103 XML target descriptions.
13104 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13105 when inferior is running on an ISA 2.05 or later processor. Add
13106 special case to return offset for full 64-bit slot of FPSCR when
13109 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13111 * Makefile.in (SFILES, clean): Added sparc64 files.
13112 (reg-sparc64.o, reg-sparc64.c): New.
13113 * configure.srv (sparc*-*-linux*): New configuration.
13114 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13115 syscall arguments for SPARC.
13116 (regsets_store_inferior_registers): Likewise.
13117 * linux-sparc-low.c: New file.
13119 2008-10-21 Doug Evans <dje@google.com>
13121 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13122 (READLINE_DIR,READLINE_DEP): Delete.
13123 (INTERNAL_CFLAGS): Update.
13124 (LINTFLAGS): Update.
13126 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13128 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13129 whole argv from the last run, not just argv[0].
13131 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13133 * regcache.c (new_register_cache): Return NULL if the register
13134 cache size isn't known yet.
13135 (free_register_cache): Avoid dereferencing a NULL regcache.
13137 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13139 * configure.srv: Merge MIPS and MIPS64.
13141 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13143 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13145 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13147 * Makefile.in: Add required vsx dependencies.
13149 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13150 Declare init_registers_powerpc_vsx32l.
13151 Declare init_registers_powerpc_vsx64l.
13152 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13153 (ppc_arch_setup): Check for VSX in hwcap.
13154 (ppc_fill_vsxregset): New function.
13155 (ppc_store_vsxregset): New function.
13156 Add new VSX entry in regset_info target_regsets.
13158 * configure.srv: Add new VSX dependencies.
13160 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13162 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13163 (remote_open): Set or clear transport_is_reliable.
13164 (putpkt_binary): Don't expect acks in noack mode.
13165 (getpkt): Don't send ack/nac in noack mode.
13166 * server.c (handle_general_set): Handle QStartNoAckMode.
13167 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13169 (main): Reset noack_mode on every connection.
13170 * server.h (noack_mode): Declare.
13172 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13174 * Makefile.in (GDBREPLAY_OBS): New variable.
13175 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13177 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13178 Daniel Jacobowitz <dan@codesourcery.com>
13180 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13181 (usr_store_inferior_registers): Likewise.
13182 (regsets_store_inferior_registers): Likewise.
13184 2008-07-31 Rolf Jansen <rj@surtec.com>
13185 Pedro Alves <pedro@codesourcery.com>
13187 * configure.ac: Check for memmem declaration.
13188 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13189 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13190 (disable_packet_qfThreadInfo): Unconditionally compile.
13191 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13192 * configure, config.in: Regenerate.
13194 2008-07-28 Doug Kwan <dougkwan@google.com>
13196 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13197 (linux_write_memory): Remove declaration of errno.
13199 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13201 * linux-low.c (handle_extended_wait): Do not use "status"
13202 variable uninitialized.
13204 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13206 * server.c (handle_v_attach): Inhibit reporting dll changes.
13208 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13210 * remote-utils.c (prepare_resume_reply): If requested, don't
13211 output "thread:TID" in the T stop reply.
13213 * server.c (disable_packet_vCont, disable_packet_Tthread)
13214 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13215 (handle_query): If requested, disable support for qC, qfThreadInfo
13217 (handle_v_requests): If requested, disable support for vCont.
13218 (gdbserver_show_disableable): New.
13219 (main): Handle --disable-packet and --disable-packet=LIST.
13221 * server.h (disable_packet_vCont, disable_packet_Tthread)
13222 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13224 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13226 * server.c (gdbserver_usage): Mention --version.
13228 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13230 * Makefile.in (gdbreplay.o): New rule.
13232 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13234 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13235 message, not gdbserver.
13237 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13238 Nathan Sidwell <nathan@codesourcery.com>
13239 Joseph Myers <joseph@codesourcery.com>
13241 * acinclude.m4: Include ../../config/acx.m4.
13242 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13243 * configure, config.in: Regenerate.
13244 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13245 * server.c (gdbserver_version): Print PKGVERSION.
13246 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13247 (main): Adjust gdbserver_usage calls.
13248 * gdbreplay.c (version, host_name): Add declarations.
13249 (gdbreplay_version, gdbreplay_usage): New.
13250 (main): Accept --version and --help options.
13252 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13254 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13255 (arm_breakpoint_at): Handle Thumb.
13256 (the_low_target): Add comment.
13258 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13260 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13262 2008-05-09 Doug Evans <dje@google.com>
13264 * server.h (decode_search_memory_packet): Declare.
13265 * remote-utils.c (decode_search_memory_packet): New fn.
13266 * server.c (handle_search_memory_1): New fn.
13267 (handle_search_memory): New fn.
13268 (handle_query): Process qSearch:memory packets.
13270 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13272 * regcache.c (registers_length): Remove.
13273 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13274 full register packet.
13275 * regcache.h (registers_length): Remove prototype.
13276 * server.h (PBUFSIZ): Define to 16384.
13278 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13280 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13281 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13282 powerpc-64l.o, and powerpc-altivec64l.o.
13283 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13284 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13285 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13286 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13287 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13290 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13291 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13292 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13293 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13294 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13295 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13296 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13297 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13298 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13299 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13302 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13303 (init_registers_powerpc_32l): ... this new prototype.
13304 (init_registers_powerpc_32): Remove, replace by ...
13305 (init_registers_powerpc_altivec32l): ... this new prototype.
13306 (init_registers_powerpc_e500): Remove, replace by ...
13307 (init_registers_powerpc_e500l): ... this new prototype.
13308 (init_registers_ppc64): Remove, replace by ...
13309 (init_registers_powerpc_64l): ... this new prototype.
13310 (init_registers_powerpc_64): Remove, replace by ...
13311 (init_registers_powerpc_altivec64l): ... this new prototype.
13312 (ppc_num_regs): Set to 73.
13313 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13314 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13315 (ppc_cannot_store_register): Handle orig_r3 and trap.
13316 (ppc_arch_setup): Update init_registers_... calls.
13317 (ppc_fill_gregset): Handle orig_r3 and trap.
13319 * inferiors.c (clear_inferiors): Reset current_inferior.
13321 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13323 * acinclude.m4: Add override.m4.
13324 * configure: Regenerate.
13326 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13328 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13329 initial call to init_register_ppc64.
13331 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13333 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13334 single powerpc*-*-linux* case.
13335 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13337 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13339 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13340 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13342 * linux-ppc-low.c: Include <elf.h>.
13343 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13344 (ppc_hwcap): New global variable.
13345 (ppc_regmap): Remove __SPE__ #ifdef sections.
13346 (ppc_regmap_e500): New global variable.
13347 (ppc_cannot_store_register): Update __SPE__ special case.
13348 (ppc_get_hwcap): New function.
13349 (ppc_arch_setup): Use it to determine whether inferior supports
13350 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13351 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13352 Do not access registers if target does not support AltiVec.
13353 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13354 Do not access registers if target does not support SPE.
13355 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13357 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13359 * linux-low.c (disabled_regsets, num_regsets): New.
13360 (use_regsets_p): Delete.
13361 (linux_wait_for_process): Clear disabled_regsets.
13362 (regsets_fetch_inferior_registers): Check and set it.
13363 (regsets_store_inferior_registers): Likewise.
13364 (linux_fetch_registers, linux_store_registers): Do not use
13366 (initialize_low): Allocate disabled_regsets.
13368 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13370 * Makefile.in (LIBOBJS): New.
13371 (OBS): Use LIBOBJS.
13372 (memmem.o): New rule.
13373 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13374 * configure: Regenerated.
13376 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13378 * server.c (handle_query): Never return "unsupported" for
13379 qXfer:features:read queries.
13381 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13383 * server.c (get_features_xml): Fix inverted condition.
13384 (handle_query): Always support qXfer:feature:read.
13386 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13388 * server.c (wrapper_argv): New.
13389 (start_inferior): Handle wrapper_argv. If set, expect an extra
13391 (gdbserver_usage): Document --wrapper.
13392 (main): Parse --wrapper.
13394 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13396 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13397 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13398 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13399 (ppc_set_pc): Likewise.
13400 (ppc_arch_setup): New function.
13401 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13402 of collect_register.
13403 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13405 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13407 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13408 instead of linux-ppc64-low.o.
13409 * linux-ppc64-low.c: Remove file.
13410 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13411 (linux-ppc64-low.o): Remove rule.
13413 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13414 (init_registers_powerpc_64): Likewise.
13415 (ppc_regmap): Conditionally define depending on __powerpc64__.
13416 (ppc_cannot_store_register): Do not special-case "fpscr" when
13417 compiled on __powerpc64__.
13418 (ppc_collect_ptrace_register): New function.
13419 (ppc_supply_ptrace_register): New function.
13420 (ppc_breakpoint): Change type to "unsigned int".
13421 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13422 (the_low_target): Conditionally provide initializers for the
13423 arch_setup member depending on __powerpc64__. Install
13424 collect_ptrace_register and supply_ptrace_register members.
13426 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13428 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13429 * server.c (gdbserver_xmltarget): Define.
13430 (get_features_xml): Use it to replace "target.xml" and arch_string.
13432 * configure.srv: Remove srv_xmltarget. Add XML files that were
13433 mentioned there to srv_xmlfiles instead. Remove conditional tests
13434 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13435 srv_xmlfiles and srv_regobj to include all possible choices.
13436 * configure.ac (srv_xmltarget): Remove.
13437 (srv_xmlfiles): Do not add "target.xml".
13438 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13439 checks for supplementary target information.
13440 * configure: Regenerate.
13441 * Makefile.in (XML_TARGET): Remove.
13442 (target.xml): Remove rule.
13443 (clean): Do not clean up target.xml.
13444 (.PRECIOUS): Do not mention target.xml.
13446 * target.h (struct target_ops): Remove arch_string member.
13447 * linux-low.c (linux_arch_string): Remove.
13448 (linux_target_ops): Remove arch_string initializer.
13449 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13450 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13451 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13452 * spu-low.c (spu_arch_string): Remove.
13453 (spu_target_ops): Remove arch_string initializer.
13454 * win32-low.c (win32_arch_string): Remove.
13455 (win32_target_ops): Remove arch_string initializer.
13456 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13457 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13458 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13460 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13462 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13463 by collect_ptrace_register and supply_ptrace_register hooks.
13464 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13465 instead of checking for the_low_target.left_pad_xfer.
13466 (usr_store_inferior_registers): Use collect_ptrace_register callback
13467 instead of checking for the_low_target.left_pad_xfer.
13469 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13470 (s390_supply_ptrace_register): Likewise.
13471 (s390_fill_gregset): Call s390_collect_ptrace_register.
13472 (the_low_target): Update.
13474 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13475 (ppc_supply_ptrace_register): Likewise.
13476 (the_low_target): Update.
13478 * linux-i386-low.c (the_low_target): Update.
13479 * linux-x86-64-low.c (the_low_target): Update.
13481 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13483 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13484 reg-s390.o and reg-s390x.o.
13486 * linux-low.c (new_inferior): New global variable.
13487 (linux_create_inferior, linux_attach): Set it.
13488 (linux_wait_for_process): Call the_low_target.arch_setup after the
13489 target has stopped for the first time.
13490 (initialize_low): Do not call the_low_target.arch_setup.
13492 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13493 (s390_set_pc): Likewise.
13494 (s390_arch_setup): New function.
13495 (the_low_target): Use s390_arch_setup as arch_setup routine.
13497 * regcache.c (realloc_register_cache): New function.
13498 (set_register_cache): Call it for each existing regcache.
13500 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13502 * server.h (init_registers): Remove prototype.
13504 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13505 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13506 instead of init_registers ().
13507 * linux-arm-low.c (init_registers_arm): Add prototype.
13508 (init_registers_arm_with_iwmmxt): Likewise.
13509 (the_low_target): Add initializer for arch_setup field.
13510 * linux-cris-low.c (init_registers_cris): Add prototype.
13511 (the_low_target): Add initializer for arch_setup field.
13512 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13513 (the_low_target): Add initializer for arch_setup field.
13514 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13515 (the_low_target): Add initializer for arch_setup field.
13516 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13517 (the_low_target): Add initializer for arch_setup field.
13518 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13519 (the_low_target): Add initializer for arch_setup field.
13520 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13521 (the_low_target): Add initializer for arch_setup field.
13522 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13523 (init_registers_mips64_linux): Likewise.
13524 (the_low_target): Add initializer for arch_setup field.
13525 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13526 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13527 (the_low_target): Add initializer for arch_setup field.
13528 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13529 (init_registers_powerpc_64): Likewise.
13530 (the_low_target): Add initializer for arch_setup field.
13531 * linux-s390-low.c (init_registers_s390): Add prototype.
13532 (init_registers_s390x): Likewise.
13533 (the_low_target): Add initializer for arch_setup field.
13534 * linux-sh-low.c (init_registers_sh): Add prototype.
13535 (the_low_target): Add initializer for arch_setup field.
13536 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13537 (the_low_target): Add initializer for arch_setup field.
13538 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13539 (the_low_target): Add initializer for arch_setup field.
13541 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13542 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13543 instead of init_registers ().
13544 * win32-arm-low.c (init_registers_arm): Add prototype.
13545 (the_low_target): Add initializer for arch_setup field.
13546 * win32-i386-low.c (init_registers_i386): Add prototype.
13547 (the_low_target): Add initializer for arch_setup field.
13549 * spu-low.c (init_registers_spu): Add prototype.
13550 (initialize_low): Call initialie_registers_spu () instead of
13551 initialize_registers ().
13553 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13555 * server.c (handle_v_requests): When handling the vRun and vAttach
13556 packets, if already debugging a process, don't kill it. Return an
13559 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13561 * server.c (handle_query): Correct length check.
13563 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13565 * win32-low.c (do_initial_child_stuff): Add process handle
13566 parameter. Set current_process_handle and current_process_id from the
13567 parameters. Clear globals.
13568 (win32_create_inferior): Don't set current_process_handle and
13569 current_process_id here. Instead pass them on the call to
13570 do_initial_child_stuff.
13571 (win32_attach): Likewise.
13572 (win32_clear_inferiors): New.
13573 (win32_kill): Don't close the current process handle or the
13574 current thread handle here. Instead call win32_clear_inferiors.
13575 (win32_detach): Don't open a new handle to the process. Call
13576 win32_clear_inferiors.
13577 (win32_join): Don't rely on current_process_handle; open a new
13578 handle using the process id.
13579 (win32_wait): Call win32_clear_inferiors when the inferior process
13582 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13584 * server.c (monitor_show_help): Add "exit".
13586 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13588 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13589 (clean): Add reg-xtensa.c.
13590 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13591 * configure.srv (xtensa*-*-linux*) New target.
13592 * linux-xtensa-low.c: New.
13593 * xtensa-xtregs.c: New.
13595 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13597 * hostio.c: Don't include errno.h.
13598 (errno_to_fileio_errno): Move to hostio-errno.
13599 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13600 error number outputting to the target->hostio_last_error callback.
13601 (hostio_packet_error): Use FILEIO_EINVAL directly.
13602 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13603 calls to hostio_error.
13604 * hostio-errno.c: New.
13605 * server.h (hostio_last_error_from_errno): Declare.
13606 * target.h (target_ops): Add hostio_last_error member.
13607 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13608 as hostio_last_error handler.
13609 * spu-low.c (spu_target_ops): Likewise.
13610 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13611 (wince_hostio_last_error): New functions.
13612 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13613 as hostio_last_error handler.
13614 (win32_target_ops) [!_WIN32_WCE]: Register
13615 hostio_last_error_from_errno as hostio_last_error handler.
13616 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13617 (hostio-errno.o): New rule.
13618 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13619 * configure.srv (srv_hostio_err_objs): New variable. Default to
13621 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13622 * configure: Regenerate.
13624 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13626 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13627 (linux_kill, linux_detach): Clean up the process list.
13628 * remote-utils.c (remote_open): Improve port number parsing.
13629 (putpkt_binary, input_interrupt): Only send interrupts if the target
13631 * server.c (extended_protocol): Make static.
13632 (attached): Define earlier.
13633 (exit_requested, response_needed, program_argv): New variables.
13634 (target_running): New.
13635 (start_inferior): Clear attached here.
13636 (attach_inferior): Set attached here.
13637 (require_running): Define.
13638 (handle_query): Use require_running and target_running. Implement
13640 (handle_v_attach, handle_v_run): New.
13641 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13642 (gdbserver_usage): Update.
13643 (main): Redo argument parsing. Handle --debug and --multi. Handle
13644 --attach along with other options or after the port. Save
13645 program_argv. Support no initial program. Resynchronize
13646 communication with GDB after an error. Handle "monitor exit".
13647 Use require_running and target_running. Always allow the extended
13648 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13649 restart in extended mode.
13650 * README: Refer to the GDB manual. Update --attach usage.
13652 2007-12-20 Andreas Schwab <schwab@suse.de>
13654 * linux-low.c (STACK_SIZE): Define.
13655 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13656 (linux_test_for_tracefork): Likewise.
13658 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13660 * linux-low.c (linux_wait_for_event): Update messages. Do not
13661 reinsert auto-delete breakpoints.
13662 * mem-break.c (struct breakpoint): Change return type of handler to
13664 (set_breakpoint_at): Update handler type.
13665 (reinsert_breakpoint_handler): Return 1 instead of calling
13667 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13669 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13670 * mem-break.h (set_breakpoint_at): Update handler type.
13671 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13672 * win32-low.c (auto_delete_breakpoint): New.
13673 (get_child_debug_event): Use it.
13675 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13677 * configure.ac: Check for pread and pwrite.
13678 * hostio.c (handle_pread): Fall back to lseek and read.
13679 (handle_pwrite): Fall back to lseek and write.
13680 * config.in, configure: Regenerated.
13682 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13684 * server.c (myresume): Add own_buf argument.
13685 (main): Update calls.
13687 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13689 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13690 * remote-utils.c (remote_open): Do not call disable_async_io.
13691 (block_async_io): Delete.
13692 (unblock_async_io): Make static.
13693 (initialize_async_io): New.
13694 * server.c (handle_v_cont): Handle async I/O here.
13695 (myresume): Likewise. Move other common resume tasks here...
13696 (main): ... from here. Call initialize_async_io. Disable async
13697 I/O before the main loop.
13698 * server.h (initialize_async_io): Declare.
13699 (block_async_io, unblock_async_io): Delete prototypes.
13700 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13702 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13704 * remote-utils.c (readchar): Allow binary data in received messages.
13706 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13708 * win32-low.c (attaching): New global.
13709 (win32_create_inferior): Clear the `attaching' global.
13710 (win32_attach): Set the `attaching' global.
13711 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13712 attaching. Only set a breakpoint at the entry point if not
13715 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13717 * server.c (main): Don't report dll events on the initial
13718 connection on attaches.
13720 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13722 * server.c (main): Relax numerical bases supported for the pid of
13723 the --attach command line argument.
13725 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13727 * win32-low.c (win32_attach): Call OpenProcess before
13728 DebugActiveProcess, not after. Add last error output to error
13731 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13733 * win32-low.c (win32_get_thread_context)
13734 (win32_set_thread_context): New functions.
13735 (thread_rec): Use win32_get_thread_context.
13736 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13737 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13740 2007-12-03 Leo Zayas
13741 Pedro Alves <pedro_alves@portugalmail.pt>
13743 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13745 (child_add_thread): Minor cleanup.
13746 (child_continue): Resume artificially suspended threads before
13747 calling ContinueDebugEvent.
13748 (suspend_one_thread): New.
13749 (fake_breakpoint_event): New.
13750 (get_child_debug_event): Change return type to int. Check here if
13751 gdb sent an interrupt request. If a soft interrupt was requested,
13752 fake a breakpoint event. Return 0 if there is no event to handle,
13754 (win32_wait): Don't check here if gdb sent an interrupt request.
13755 Ensure there is a valid event to handle.
13756 (win32_request_interrupt): Add soft interruption method as last
13759 2007-12-03 Leo Zayas
13760 Pedro Alves <pedro_alves@portugalmail.pt>
13762 * win32-low.h (win32_thread_info): Add descriptions to the
13763 structure members. Replace `suspend_count' counter by a
13765 * win32-low.c (thread_rec): Update condition of when to get the
13766 context from the inferior. Rely on ContextFlags being set if it
13767 has already been retrieved. Only suspend the inferior thread if
13768 we haven't already. Warn if that fails.
13769 (continue_one_thread): s/suspend_count/suspended/. Only call
13770 ResumeThread once. Warn if that fails.
13772 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13774 * win32-low.c (win32_wait): Don't read from the inferior when it
13775 has already exited.
13777 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13779 * Makefile.in (win32_low_h): New variable.
13780 (win32-low.o): Add dependency on $(win32_low_h).
13781 (win32-arm-low.o, win32-i386-low.o): New rules.
13783 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13785 * hostio.c: Correct copyright year.
13787 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13789 * Makefile.in (OBS): Add hostio.o.
13790 (hostio.o): New rule.
13791 * server.h (handle_vFile): Declare.
13792 * hostio.c: New file.
13793 * server.c (handle_v_requests): Take packet_len and new_packet_len
13794 for binary packets. Call handle_vFile.
13795 (main): Update call to handle_v_requests.
13797 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13799 * linux-low.c: Include <sched.h>.
13801 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13803 * linux-low.c (linux_tracefork_grandchild): New.
13804 (linux_tracefork_child): Use clone.
13805 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13807 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13809 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13811 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13813 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13815 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13817 * inferiors.c (change_inferior_id): Delete.
13818 (add_pid_to_list, pull_pid_from_list): New.
13819 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13820 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13821 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13822 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13823 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13824 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13825 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13826 (using_threads): Always set to 1.
13827 (handle_extended_wait): New.
13828 (add_process): Do not set TID.
13829 (linux_create_inferior): Set must_set_ptrace_flags.
13830 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13831 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13832 (linux_thread_alive): Rename TID argument to LWPID.
13833 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13834 (linux_wait_for_event): Do not use TID or check using_threads. Update
13835 call to dead_thread_notify. Call handle_extended_wait.
13836 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13837 (send_sigstop): Delete sigstop_sent.
13838 (wait_for_sigstop): Avoid TID.
13839 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13840 (linux_test_for_tracefork): New.
13841 (linux_lookup_signals): Use thread_db_active and
13842 linux_supports_tracefork_flag.
13843 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13844 * linux-low.h (get_process_thread): Avoid TID.
13845 (struct process_ifo): Move thread_known and tid to the end. Remove
13847 (linux_attach_lwp, thread_db_init): Update prototypes.
13848 * server.h (change_inferior_id): Delete prototype.
13849 (add_pid_to_list, pull_pid_from_list): New prototypes.
13850 * thread-db.c (thread_db_use_events): New.
13851 (find_first_thread): Rename to...
13852 (find_one_thread): ...this. Update callers and messages. Do not
13853 call fatal. Check thread_db_use_events. Do not call
13854 change_inferior_id or new_thread_notify.
13855 (maybe_attach_thread): Update. Do not call new_thread_notify.
13856 (thread_db_init): Set thread_db_use_events. Check use_events.
13857 * utils.c (fatal, warning): Correct message prefix.
13859 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13861 * Makefile.in (clean): Remove new files.
13862 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13863 (powerpc-64.o, powerpc-64.c): New rules.
13864 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13865 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13867 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13869 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13870 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13871 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13872 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13873 (target_regsets): Add AltiVec and SPE register sets.
13874 * configure.ac: Check for AltiVec and SPE.
13875 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13876 (ppc_fill_vrregset, ppc_store_vrregset): New.
13877 (target_regsets): Add AltiVec register set.
13878 * configure: Regenerated.
13880 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13882 * linux-low.c (O_LARGEFILE): Define.
13883 (linux_read_memory): Use /proc/PID/mem.
13884 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13885 * configure, config.in: Regenerated.
13887 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13889 * linux-low.c (linux_wait_for_event): Do not pass signals while
13892 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13894 * win32-low.c (create_process): New.
13895 (win32_create_inferior): Use create_process instead of
13896 CreateProcess. If create_process failed retry appending an ".exe"
13897 suffix. Store the GetLastError result immediatelly after
13898 create_process calls and use it on the call to error.
13900 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13902 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13904 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13906 * configure.ac: Switch license to GPLv3.
13908 2007-08-01 Michael Snyder <msnyder@access-company.com>
13910 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13912 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13914 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13916 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13917 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13918 CloseToolhelp32Snapshot.
13919 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13920 CloseToolhelp32Snapshot.
13922 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13924 * server.c (main): Check for inferior exit before main loop.
13926 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13928 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13929 instead of on tmp_desc.
13931 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13932 Daniel Jacobowitz <dan@codesourcery.com>
13934 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13935 (add_thread): Minor cleanups.
13936 (clear_inferiors): Move lower in the file. Clear the DLL
13938 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13939 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13940 (xml_escape_text): New.
13941 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13943 (handle_v_cont): Report errors.
13944 (gdbserver_version): Update.
13945 (main): Correct size of own_buf. Do not report initial DLL events.
13946 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13947 (unloaded_dll, xml_escape_text): New.
13948 * win32-low.c (enum target_waitkind): Update comments.
13949 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13950 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13951 (win32_EnumProcessModules, win32_GetModuleInformation)
13952 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13953 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13954 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13955 (win32_Module32First, win32_Module32Next, load_toolhelp)
13956 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13957 (get_child_debug_event): Handle DLL events.
13958 (win32_wait): Likewise.
13960 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13962 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13963 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13965 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13967 * win32-low.c (handle_output_debug_string): Ignore event if not
13970 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13972 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13974 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13976 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13978 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13980 * inferiors.c (change_inferior_id): Add comment.
13981 * linux-low.c (check_removed_breakpoint): Add an early
13982 prototype. Improve debug output.
13983 (linux_attach): Doc update.
13984 (linux_detach_one_process, linux_detach): Clean up before releasing
13986 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13987 * linux-low.h (struct process_info): Doc improvement.
13988 * mem-break.c (delete_all_breakpoints): New.
13989 * mem-break.h (delete_all_breakpoints): New prototype.
13990 * thread-db.c (find_first_thread): New.
13991 (thread_db_create_event): Call it instead of
13992 thread_db_find_new_threads. Clean up unused variables.
13993 (maybe_attach_thread): Remove first thread handling.
13994 (thread_db_find_new_threads): Use find_first_thread.
13995 (thread_db_get_tls_address): Likewise.
13997 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13999 * thread-db.c (thread_db_find_new_threads): Add prototype.
14000 (thread_db_create_event): Check for the main thread before adding
14002 (maybe_attach_thread): Only enable event reporting if TID == 0.
14003 (thread_db_get_tls_address): Check for new threads.
14005 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14007 * linux-low.c (linux_create_inferior): Try execv before execvp.
14008 * spu-low.c (spu_create_inferior): Likewise.
14010 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14012 * linux-low.c (linux_create_inferior): Change execv to execvp.
14013 * spu-low.c (spu_create_inferior): Likewies.
14015 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14017 * Makefile.in (clean): Clean new files instead of deleted ones.
14018 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14019 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14021 * configure.srv: Specify XML files and new regformats for MIPS and
14023 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14024 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14025 an entry for the restart register.
14026 (mips_cannot_fetch_register, mips_cannot_store_register)
14027 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14028 register names to match the XML descriptions.
14029 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14030 restart register instead of $0.
14032 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14033 Markus Deuling <deuling@de.ibm.com>
14035 * remote-utils.c (decode_xfer_write): New function.
14036 * server.h (decode_xfer_write): Add prototype.
14037 * server.c (handle_query): Add PACKET_LEN argument. Support
14038 qXfer:spu:read and qXfer:spu:write packets.
14039 (main): Pass packet_len to handle_query.
14040 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14041 * target.h (target_ops): Add qxfer_spu.
14043 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14045 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14046 accessing non-seekable spufs files.
14048 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14050 * server.c (handle_query): Add reply for qC packet.
14052 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14053 Leo Zayas <lerele@champenstudios@com>
14055 * server.h (check_remote_input_interrupt_request): New function.
14056 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14057 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14058 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14059 (check_remote_input_interrupt_request): New function.
14060 * server.h (check_remote_input_interrupt_request): Declare.
14061 * win32-low.c (winapi_DebugBreakProcess,
14062 winapi_GenerateConsoleCtrlEvent): New typedefs.
14063 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14065 (win32_wait): Check for remote interrupt request
14066 with check_remote_input_interrupt_request.
14067 (win32_request_interrupt): New function.
14068 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14070 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14072 * win32-low.c (debug_registers_changed,
14073 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14074 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14075 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14076 (thread_rec): Get context using the low target.
14077 (child_add_thread): Call thread_added on the low target,
14078 which does the same thing.
14080 (do_initial_child_stuff): Remove debug registers references.
14081 Set context using the low target. Resume threads after
14082 setting the contexts.
14083 (child_continue): Remove dead variable. Remove debug
14084 registers references.
14085 (child_fetch_inferior_registers): Go through the low target.
14086 (do_child_store_inferior_registers): Remove.
14087 (child_store_inferior_registers): Go through the low target.
14088 (win32_resume): Remove debug registers references.
14089 Set context using the low target.
14090 (handle_exception): Change return type to void. Don't record
14091 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14092 first chance exception.
14093 (get_child_debug_event): Change return type to void. Remove
14094 goto loop. Always return after waiting for debug event.
14095 (win32_wait): Convert to switch statement. Handle spurious
14098 * win32-i386-low.c (debug_registers_changed,
14099 debug_registers_used): New.
14100 (initial_stuff): Rename to ...
14101 (i386_initial_stuff): ... this. Clear debug registers
14103 (store_debug_registers): Delete.
14104 (i386_get_thread_context): New.
14105 (load_debug_registers): Delete.
14106 (i386_set_thread_context): New.
14107 (i386_thread_added): New.
14108 (single_step): Rename to ...
14109 (i386_single_step): ... this.
14110 (do_fetch_inferior_registers): Rename to ...
14111 (i386_fetch_inferior_register): ... this.
14112 (i386_store_inferior_register): New.
14113 (the_low_target): Adapt to new interface.
14115 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14116 (arm_get_thread_context): New.
14117 (arm_set_thread_context): New.
14119 (do_fetch_inferior_registers): Rename to ...
14120 (arm_fetch_inferior_register): ... this.
14121 (arm_store_inferior_register): New.
14122 (arm_wince_breakpoint): Reimplement as unsigned long.
14123 (arm_wince_breakpoint_len): Define.
14124 (the_low_target): Adapt to new interface.
14126 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14127 load_debug_registers. Add get_thread_context, set_thread_context,
14128 thread_added and store_inferior_register. Rename
14129 fetch_inferior_registers to fetch_inferior_register.
14130 (regptr): Remove declaration.
14132 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14134 * linux-low.c (linux_detach): Change return type to int. Return 0.
14135 * spu-low.c (spu_detach): Likewise.
14137 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14139 * target.h (target_ops): Change return type of detach to int.
14141 (join_inferior): New.
14142 * server.c (main): Don't skip detach support on mingw32.
14143 If the inferior doesn't support detaching return error.
14144 Call join_inferior instead of using waitpid.
14145 * linux-low.c (linux_join): New.
14146 (linux_target_op): Add linux_join.
14147 * spu-low.c (spu_join): New.
14148 (spu_target_ops): Add spu_join.
14149 * win32-low.c (win32_detach): Adapt to new interface.
14150 Reopen current_process_handle before detaching. Issue a child
14151 resume before detaching.
14153 (win32_target_op): Add win32_join.
14155 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14157 * win32-low.c (win32-attach): Fix return value.
14158 * target.h (target_ops): Describe ATTACH return values.
14160 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14162 * win32-low.c (GETPROCADDRESS): Define.
14163 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14164 (winapi_DebugSetProcessKillOnExit): Likewise.
14165 (win32_create_inferior): Force usage of ansi CreateProcessA.
14166 (win32_attach): Use GETPROCADDRESS.
14167 (win32_detach): Likewise.
14169 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14171 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14173 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14175 * win32-low.c: Commit leftover changes from 2007-03-29.
14177 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14179 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14180 fields short instead of int. Add explicit padding.
14181 (i387_cache_to_fsave): Remove unnecessary casts.
14182 (i387_fsave_to_cache): Doc fix.
14183 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14185 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14187 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14188 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14190 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14192 * configure.srv (arm*-*-mingw32ce*): Move near the other
14195 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14197 * configure.ac: Add errno checking.
14198 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14199 sys/file.h and malloc.h.
14200 (AC_CHECK_DECLS): Add perror.
14201 (srv_mingwce): Handle.
14202 * configure.srv (i[34567]86-*-cygwin*): Add
14203 win32-i386-low.o to srv_tgtobj.
14204 (i[34567]86-*-mingw*): Likewise.
14205 (arm*-*-mingw32ce*): Add case.
14206 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14207 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14208 [__MINGW32CE__] (strerror): New function.
14209 [__MINGW32CE__] (errno): Define to GetLastError.
14210 [__MINGW32CE__] (COUNTOF): New macro.
14211 (remote_open): Remove extra close call.
14212 * mem-break.c (delete_breakpoint_at): New function.
14213 * mem-break.h (delete_breakpoint_at): Declare.
14214 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14215 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14216 [USE_WIN32API] (read, write): Add char* casts.
14217 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14218 * server.h: Include wincecompat.h on Windows CE.
14219 [HAVE_ERRNO_H]: Check.
14220 (perror): Declare if not declared.
14221 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14222 (perror_with_name): Remove errno declaration.
14223 * wincecompat.h: New.
14224 * wincecompat.c: New.
14225 * win32-low.h: New.
14226 * win32-arm-low.c: New.
14227 * win32-i386-low.c: New.
14228 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14229 (OUTMSG2): Make it safe.
14231 (COUNTOF): New macro.
14232 (NUM_REGS): Get it from the low target.
14233 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14234 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14235 (thread_rec): Let low target handle debug registers.
14236 (child_add_thread): Likewise.
14237 (child_init_thread_list): Likewise.
14238 (continue_one_thread): Likewise.
14240 (do_child_fetch_inferior_registers): Move to ...
14241 * win32-i386-low.c: ... here, and rename to ...
14242 (do_fetch_inferior_registers): ... this.
14243 * win32-low.c (child_fetch_inferior_registers):
14244 Go through the low target.
14245 (do_child_store_inferior_registers): Use regptr.
14246 (strwinerror): New function.
14247 (win32_create_inferior): Handle Windows CE.
14248 Use strwinerror instead of strerror on Windows error
14249 codes. Add program to the error output.
14250 Don't close the main thread handle on Windows CE.
14251 (win32_attach): Use coredll.dll on Windows CE.
14252 (win32_kill): Close current process and current
14254 (win32_detach): Use coredll.dll on Windows CE.
14255 (win32_resume): Let low target handle debug registers, and
14257 (handle_exception): Add/Remove initial breakpoint. Avoid
14258 non-existant WSTOPSIG on Windows CE.
14259 (win32_read_inferior_memory): Cast to remove warning.
14260 (win32_arch_string): Go through the low target.
14261 (initialize_low): Call set_breakpoint_data with the low
14262 target's breakpoint.
14263 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14264 FOP_REGNUM, mappings): Move to ...
14265 * win32-i386-low.c: ... here.
14266 * win32-low.c (win32_thread_info): Move to ...
14267 * win32-low.h: ... here.
14268 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14269 win32-arm-low.c and wincecompat.c.
14270 (all:): Add $EXEEXT.
14271 (install-only:): Likewise.
14272 (gdbserver:): Likewise.
14273 (gdbreplay:): Likewise.
14274 * config.in: Regenerate.
14275 * configure: Regenerate.
14277 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14279 * win32-low.c: Rename typedef thread_info to
14280 win32_thread_info throughout.
14282 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14284 * win32-i386-low.c: Rename to ...
14285 * win32-low.c: ... this.
14286 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14287 * Makefile.in: Likewise.
14289 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14291 * remote-utils.c (monitor_output): Constify msg parameter.
14292 * server.h (monitor_output): Likewise.
14293 * win32-i386-low.c (handle_output_debug_string): New.
14294 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14295 handle_output_debug_string.
14296 (get_child_debug_event): Likewise.
14298 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14300 * server.c (main): Correct strtoul check.
14302 2007-03-27 Jon Ringle <jon@ringle.org>
14304 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14306 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14308 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14310 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14312 * terminal.h: Check HAVE_SGTTY_H.
14314 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14316 * remote-utils.c (remote_open): Print out the assigned port number.
14318 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14320 * remote-utils.c (monitor_output): New function.
14321 * server.c (debug_threads): Define here.
14322 (monitor_show_help): New function.
14323 (handle_query): Handle qRcmd.
14324 (main): Do not handle 'd' packet.
14325 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14326 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14329 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14331 * Makefile.in (EXEEXT): New.
14332 (clean): Use $(EXEEXT).
14334 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14336 * target.h (target_ops): Rename send_signal to request_interrupt,
14337 and remove enum target_signal parameter.
14338 * linux-low.c (linux_request_interrupt): Rename from
14339 linux_send_signal, and always send SIGINT.
14340 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14341 and always send SIGINT.
14342 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14344 (input_interrupt): Likewise.
14346 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14348 * server.c (get_features_xml): Check if target implemented
14350 * win32-i386-low.c (win32_arch_string): New.
14351 (win32_target_ops): Add win32_arch_string as arch_string member.
14353 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14355 * spu-low.c (spu_arch_string): New.
14356 (spu_target_ops): Add spu_arch_string.
14358 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14360 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14361 * configure.ac: Do not check for terminal.h.
14362 * configure, config.in: Regenerated.
14364 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14366 * Makefile.in (OBS): Add $(XML_BUILTIN).
14367 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14369 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14370 (arm-with-iwmmxt.c): New.
14371 * config.in, configure: Regenerate.
14372 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14373 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14374 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14375 (arm*-*-linux*): Add iWMMXt and regset support.
14376 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14377 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14378 (arm_store_wmmxregset, target_regsets): New.
14379 * server.c (get_features_xml): Take annex argument. Check builtin
14381 (handle_query): Handle multiple annexes.
14383 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14385 * remote-utils.c [USE_WIN32API] (read, write): Define.
14386 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14389 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14391 * linux-i386-low.c (the_low_target): Set arch_string.
14392 * linux-x86-64-low.c (the_low_target): Likewise.
14393 * linux-low.c (linux_arch_string): New.
14394 (linux_target_ops): Add it.
14395 * linux-low.h (struct linux_target_ops): Add arch_string.
14396 * server.c (write_qxfer_response): Use const void * for DATA.
14397 (get_features_xml): New.
14398 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14399 * target.h (struct target_ops): Add arch_string method.
14401 2007-01-03 Denis Pilat <denis.pilat@st.com>
14402 Daniel Jacobowitz <dan@codesourcery.com>
14404 * linux-low.c (linux_kill): Handle being called with no threads.
14405 * win32-i386-low.c (win32_kill): Likewise.
14406 (get_child_debug_event): Clear current_process_handle.
14408 2006-12-30 Denis PILAT <denis.pilat@st.com>
14409 Daniel Jacobowitz <dan@codesourcery.com>
14411 * remote-utils.c (remote_open): Check the type of specified
14412 serial port devices before opening them.
14413 * server.c (main): Kill the inferior if an error occurs during
14414 the first remote_open.
14416 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14418 * README: Update supported targets.
14420 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14422 * Makefile.in (clean): Remove reg-mips64.c.
14423 (reg-mips64.c, reg-mips64.o): New rules.
14424 * configure.srv: Handle mips64. Include regset support for mips.
14425 * linux-mips-low.c (union mips_register): New.
14426 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14427 (mips_breakpoint, mips_breakpoint_at): Use int.
14428 (mips_collect_register, mips_supply_register)
14429 (mips_collect_register_32bit, mips_supply_register_32bit)
14430 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14431 (mips_store_fpregset, target_regsets): New.
14432 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14434 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14436 * configure.srv: Add target "spu*-*-*".
14437 * Makefile.in (clean): Remove reg-spu.c.
14438 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14439 * spu-low.c: New file.
14441 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14443 * configure.ac: Correct td_thr_tls_get_addr test.
14444 * configure: Regenerated.
14446 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14448 * linux-low.c (linux_wait_for_event): Reformat. Use the
14449 pass_signals array.
14450 * remote-utils.c (decode_address_to_semicolon): New.
14451 * server.c (pass_signals, handle_general_set): New.
14452 (handle_query): Mention QPassSignals for qSupported.
14453 (main): Call handle_general_set.
14454 * server.h (pass_signals, decode_address_to_semicolon): New.
14456 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14458 * server.c (handle_query): Correct error handling for read_auxv.
14460 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14462 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14463 and srv_linux_thread_db to yes.
14464 * linux-s390-low.c (s390_fill_gregset): New function.
14465 (target_regsets): Define data structure.
14467 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14469 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14470 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14471 * config.in, configure: Regenerated.
14472 * inferiors.c (gdb_id_to_thread): New function.
14473 (gdb_id_to_thread_id): Use it.
14474 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14475 * linux-low.h (struct process_info): Add th member.
14476 (thread_db_get_tls_address): New prototype.
14477 * remote-utils.c (decode_address): Make non-static.
14478 * server.c (handle_query): Handle qGetTLSAddr.
14479 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14480 * target.h (struct target_ops): Add get_tls_address.
14481 * thread-db.c (maybe_attach_thread): Save the thread handle.
14482 (thread_db_get_tls_address): New.
14484 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14486 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14487 (linux_resume_one_process): Take a siginfo_t *. Update all
14488 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14489 (struct pending_signals): Add a siginfo_t.
14490 (linux_wait_for_process): Always set last_status.
14491 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14492 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14493 * linux-low.h (struct process_info): Add last_status.
14495 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14497 * remote-utils.c (try_rle): New function.
14498 (putpkt_binary): Use it.
14500 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14502 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14503 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14504 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14505 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14506 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14509 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14511 * server.c (terminal_fd): New variable.
14512 (old_foreground_pgrp): Likewise.
14513 (restore_old_foreground_pgrp): New function.
14514 (start_inferior): Record the terminal file descriptor in terminal_fd
14515 and its original foreground group in old_foreground_pgrp. Register
14516 restore_old_foreground_pgrp with atexit().
14518 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14520 * server.c (handle_query): Correct qPart to qXfer.
14522 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14524 * configure.ac: Check for more headers which are missing on
14525 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14526 * configure.srv: Add Cygwin and mingw32.
14527 * remote-utils.c: Don't include headers unconditionally which
14528 are missing on mingw32. Include <winsock.h> for mingw32.
14529 (remote_open): Adjust for mingw32 support. Flush
14530 standard error after writing to it.
14531 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14532 (unblock_async_io, enable_async_io, disable_async_io)
14533 (readchar, getpkt): Update for Winsock support.
14534 (prepare_resume_reply): Expect a protocol signal number.
14535 * server.c: Disable <sys/wait.h> on mingw32.
14536 (start_inferior): Adjust for mingw32 support. Flush
14537 standard error after writing to it.
14538 (attach_inferior): Likewise. Use protocol signal
14540 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14542 * win32-i386-low.c: New file.
14543 * Makefile.in (XM_CLIBS): Set.
14544 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14545 (win32-i386-low.o): New dependency rule.
14546 * linux-low.c (linux_wait): Use target signal numbers.
14547 * target.h (struct target_ops): Doc fix.
14548 * server.h (target_signal_to_name): New prototype.
14549 * gdbreplay.c: Don't include headers unconditionally which
14550 are missing on mingw32. Include <winsock.h> for mingw32.
14551 (remote_close, remote_open): Adjust for Winsock support.
14552 * configure, config.in: Regenerated.
14554 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14556 * server.c (decode_xfer_read, write_qxfer_response): New.
14557 (handle_query): Take a packet length argument. Handle
14558 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14559 the qSupported response.
14560 (main): Update call to handle_query.
14562 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14564 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14565 (putpkt_binary): Renamed from putpkt and adjusted for binary
14567 (putpkt): New wrapper for putpkt_binary.
14568 (readchar): Don't mask off the high bit.
14569 (decode_X_packet): New function.
14570 * server.c (main): Call putpkt_binary if a handler sets the packet
14571 length. Save the length of the incoming packet. Handle 'X'.
14572 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14574 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14576 * server.c (handle_query): Handle qSupported.
14578 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14580 * remote-utils.c (all_symbols_looked_up): New variable.
14581 (look_up_one_symbol): Check it.
14582 * server.h (look_up_one_symbol): New declaration.
14583 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14585 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14587 * Makefile.in (linux-arm-low.o): Update dependencies.
14588 * linux-arm-low.c: Include "gdb_proc_service.h".
14589 (PTRACE_GET_THREAD_AREA): Define.
14590 (ps_get_thread_area): New function.
14592 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14594 * configure.srv (m68k*-*-uclinux*): New target.
14595 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14596 (linux_resume_one_process): Remove extraneous cast.
14597 (linux_read_offsets): New.
14598 (linux_target_op): Add linux_read_offsets on mmuless systems.
14599 * server.c (handle_query): Add qOffsets logic.
14600 * target.h (struct target_ops): Add read_offsets.
14602 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14604 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14605 (PTRACE_GET_THREAD_AREA): Define.
14606 (ps_get_thread_area): New function.
14607 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14608 (linux-x86-64-low.o): Update.
14610 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14612 * configure.ac: Remove checks for prfpregset_t.
14613 * gdb_proc_service.h: New file.
14614 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14615 new "gdb_proc_service.h".
14616 * proc-service.c: Likewise.
14617 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14618 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14619 * Makefile.in (gdb_proc_service_h): Updated.
14620 * configure, config.in: Regenerated.
14622 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14624 * remote-utils.c (prepare_resume_reply): Move declaration
14625 of gdb_id_from_wait to the top of the block.
14627 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14629 * linux-low.c (regsets_store_inferior_registers): Read the regset
14630 from the target before filling it.
14632 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14634 * server.c (attach_inferior): Return SIGTRAP for a successful
14637 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14639 * Makefile.in (OBS): Add version.o.
14640 (STAGESTUFF): Delete.
14641 (version.o): Add dependencies.
14642 (version.c): Replace rule.
14643 (clean): Remove version.c.
14644 * server.c (gdbserver_version): New.
14645 (gdbserver_usage): Use printf.
14646 (main): Handle --version and --help.
14647 * server.h (version, host_name): Add declarations.
14649 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14661 * linux-x86-64-low.c:
14663 * linux-s390-low.c:
14664 * linux-ppc64-low.c:
14666 * linux-mips-low.c:
14667 * linux-m68k-low.c:
14668 * linux-m32r-low.c:
14671 * linux-ia64-low.c:
14672 * linux-i386-low.c:
14673 * linux-crisv32-low.c:
14685 * gdbserver.1: Add (C) after Copyright. Update the FSF
14688 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14690 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14691 (arm_breakpoint_at): Recognize both breakpoints.
14692 (the_low_target): Use the correct breakpoint instruction.
14694 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14696 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14697 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14698 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14699 (the_low_target): Update.
14701 2005-10-25 Andreas Schwab <schwab@suse.de>
14703 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14705 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14706 (ia64_num_regs): Reduce to 462.
14708 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14710 * acinclude.m4: Correct quoting.
14711 * aclocal.m4: Regenerated.
14713 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14714 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14715 (thread_db_init): Call thread_db_err_str.
14716 * configure.ac: Check for TD_VERSION.
14717 * config.in, configure: Regenerated.
14719 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14721 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14723 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14725 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14726 is not available. Define HAVE_PTRACE_GETREGS if it is.
14727 * config.in, configure: Regenerated.
14728 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14729 * linux-i386-low.c, linux-m68k-low.c: Update to use
14730 HAVE_PTRACE_GETREGS.
14731 * linux-low.c (regsets_fetch_inferior_registers)
14732 (regsets_store_inferior_registers): Only return 0 if we processed
14734 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14735 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14737 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14739 * inferiors.c (struct thread_info): Add gdb_id.
14740 (add_thread): Add gdb_id argument.
14741 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14742 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14743 calls to add_thread.
14744 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14745 * server.c (handle_query): Use thread_to_gdb_id.
14746 (handle_v_cont, main): Use gdb_id_to_thread_id.
14747 * server.h (add_thread): Update prototype.
14748 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14751 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14753 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14754 left-padded registers.
14755 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14756 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14758 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14760 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14761 * configure: Regenerate.
14762 * config.in: Regenerate.
14763 * server.h (NEED_DECLARATION_STRERROR):
14764 Replace with !HAVE_DECL_STRERROR.
14766 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14768 * linux-low.c (linux_wait, linux_send_signal): Don't test
14769 an unsigned long variable for > 0 if it could be MAX_ULONG.
14770 * server.c (myresume): Likewise.
14771 * target.c (set_desired_inferior): Likewise.
14773 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14775 * configure.ac: Simplify and improve check for socklen_t.
14776 * configure, config.in: Regenerate.
14778 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14780 * acconfig.h: Remove.
14781 * configure.ac: Add a test for socklen_t. Use three-argument
14782 AC_DEFINE throughout.
14783 * config.in: Regenerated using autoheader 2.59.
14784 * configure: Regenerated.
14786 * gdbreplay.c (socklen_t): Provide a default.
14787 (remote_open): Use socklen_t.
14788 * remote-utils.c (socklen_t): Provide a default.
14789 (remote_open): Use socklen_t.
14790 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14793 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14795 * linux-low.c (linux_read_memory, linux_write_memory)
14796 (linux_read_auxv): Likewise.
14797 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14798 (check_mem_write): Likewise.
14799 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14801 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14802 (registers_from_string, register_data): Likewise.
14803 * server.c (handle_query, main): Likewise.
14804 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14805 (decode_M_packet): Likewise.
14806 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14807 * target.h (struct target_ops): Update read_memory, write_memory,
14809 (read_inferior_memory, write_inferior_memory): Update.
14810 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14811 to unsigned char *.
14812 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14813 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14814 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14815 linux-s390-low.c, linux-sh-low.c: Update for changes in
14816 read_inferior_memory and the_low_target->breakpoint.
14818 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14820 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14821 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14822 * configure.srv: Add powerpc64-*-linux*.
14823 * linux-ppc64-low.c: New file.
14825 2005-05-23 Orjan Friberg <orjanf@axis.com>
14827 * linux-cris-low.c: New file with support for CRIS.
14828 * linux-crisv32-low.c: Ditto for CRISv32.
14829 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14830 (clean): Add reg-cris.c and reg-crisv32.c.
14831 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14832 reg-crisv32.o, and reg-crisv32.c to make rules.
14833 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14834 recognized targets.
14836 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14838 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14839 of sizeof (PTRACE_XFER_TYPE).
14840 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14842 2005-05-12 Orjan Friberg <orjanf@axis.com>
14844 * target.h (struct target_ops): Add insert_watchpoint,
14845 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14846 pointers for hardware watchpoint support.
14847 * linux-low.h (struct linux_target_ops): Ditto.
14848 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14849 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14850 to linux_target_ops.
14851 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14853 * server.c (main): Recognize 'Z' and 'z' packets.
14855 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14857 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14858 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14859 (the_low_target): Add new members.
14861 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14863 * proc-service.c (ps_lgetregs): Search all_processes instead of
14866 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14868 * server.c (start_inferior): Change return type to int.
14869 (attach_inferior): Change sigptr to int *.
14870 (handle_v_cont, handle_v_requests): Change signal to int *.
14871 (main): Change signal to int.
14873 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14875 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14876 * configure.srv: Add m32r*-*-linux*.
14877 * linux-m32r-low.c: New file.
14879 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14881 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14883 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14885 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14886 Take unsigned long arguments for PIDs.
14887 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14888 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14889 (wait_for_sigstop, linux_resume_one_process)
14890 (regsets_fetch_inferior_registers, linux_send_signal)
14891 (linux_read_auxv): Likewise. Update the types of variables holding
14892 PIDs. Update format string specifiers.
14893 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14894 * remote-utils.c (prepare_resume_reply): Likewise.
14895 * server.c (cont_thread, general_thread, step_thread)
14896 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14898 (handle_query): Update format specifiers.
14899 (handle_v_cont, main): Use strtoul for thread IDs.
14900 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14901 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14902 (general_thread, step_thread, thread_from_wait)
14903 (old_thread_from_wait): Update.
14904 * target.h (struct thread_resume): Use unsigned long for THREAD.
14905 (struct target_ops): Use unsigned long for arguments to attach and
14908 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14910 * acinclude.m4: Include bfd/bfd.m4 directly.
14911 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14912 <agriffis@toolchain.org>.
14913 * aclocal.m4, configure: Regenerated.
14915 2005-01-07 Andrew Cagney <cagney@gnu.org>
14917 * configure.ac: Rename configure.in, require autoconf 2.59.
14918 * configure: Re-generate.
14920 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14922 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14923 LIBS when finished.
14924 * aclocal.m4: Regenerated.
14925 * configure: Regenerated.
14927 2004-11-21 Andreas Schwab <schwab@suse.de>
14929 * linux-m68k-low.c (m68k_num_gregs): Define.
14930 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14931 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14932 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14933 (m68k_breakpoint_at): New. Add to the_low_target.
14935 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14936 srv_linux_thread_db to yes.
14938 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14940 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14941 (ARCH_SET_FS): Likewise.
14942 (ARCH_GET_FS): Likewise.
14943 (ARCH_GET_GS): Likewise.
14945 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14947 * linux-i386-low.c (ps_get_thread_area): New.
14948 * linux-x86-64-low.c (ps_get_thread_area): New.
14949 * linux-low.c: Include <sys/syscall.h>.
14950 (linux_kill_one_process): Don't kill the first thread here.
14951 (linux_kill): Kill the first thread here.
14952 (kill_lwp): New function.
14953 (send_sigstop, linux_send_signal): Use it.
14954 * proc-service.c: Clean up #ifdefs.
14955 (fpregset_info): Delete.
14956 (ps_lgetregs): Update and enable implementation.
14957 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14959 * remote-utils.c (struct sym_cache, symbol_cache): New.
14960 (input_interrupt): Print a clearer message.
14961 (async_io_enabled): New variable.
14962 (enable_async_io, disable_async_io): Use it. Update comments.
14963 (look_up_one_symbol): Use the symbol cache.
14964 * thread-db.c (thread_db_look_up_symbols): New function.
14965 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14967 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14969 * configure.in: Test for -rdynamic.
14970 * configure: Regenerated.
14971 * Makefile (INTERNAL_LDFLAGS): New.
14972 (gdbserver, gdbreplay): Use it.
14974 2004-09-02 Andrew Cagney <cagney@gnu.org>
14976 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14978 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14980 * linux-low.c (linux_wait): Clear all_processes list also.
14982 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14984 * linux-low.c: Include <errno.h>. Remove extern declaration of
14987 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14989 * gdbreplay.c, server.h, utils.c: Update copyright years.
14991 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14993 * server.c (main): Print child status or termination signal from
14994 variable 'signal', not 'sig'.
14996 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14998 * linux-low.c (linux_read_memory): Change return type to
14999 int. Check for and return error from ptrace().
15000 * target.c (read_inferior_memory): Change return type to int. Pass
15001 back return status from the_target->read_memory().
15002 * target.h (struct target_ops): Adapt *read_memory() prototype.
15004 (read_inferior_memory): Adapt prototype.
15005 * server.c (main): Return an error packet if
15006 read_inferior_memory() returns an error.
15008 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15010 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15011 Unify with other clean targets.
15013 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15015 * server.c (handle_v_cont): Call set_desired_inferior.
15017 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15019 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15021 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15023 * linux-low.c (linux_wait): Unblock async I/O.
15024 (linux_resume): Block and enable async I/O.
15025 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15026 * server.h (block_async_io, unblock_async_io): Add prototypes.
15028 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15030 * remote-utils.c (remote_open): Print a status notice after
15031 opening a TCP port.
15032 * server.c (attach_inferior): Print a status notice after
15035 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15037 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15039 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15041 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15043 * server.c, target.h: Update copyright years.
15045 2004-02-25 Roland McGrath <roland@redhat.com>
15047 * target.h (struct target_ops): New member `read_auxv'.
15048 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15049 * linux-low.c (linux_read_auxv): New function.
15050 (linux_target_ops): Initialize `read_auxv' member to that.
15052 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15054 Committed by Jim Blandy <jimb@redhat.com>.
15056 * linux-s390-low.c (s390_num_regs): Update.
15057 (s390_regmap): Remove control registers. Use __s390x__ predefine
15058 instead of GPR_SIZE to distiguish s390 and s390x targets.
15060 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15062 * linux-low.c: Update copyright year.
15063 (check_removed_breakpoint): Clear pending_is_breakpoint.
15064 (linux_set_resume_request, linux_queue_one_thread)
15065 (resume_status_pending_p): New functions.
15066 (linux_continue_one_thread): Use process->resume.
15067 (linux_resume): Only resume threads if there are no pending events.
15068 * linux-low.h (struct process_info): Add resume request
15071 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15073 * regcache.c (new_register_cache): Clear the allocated register
15074 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15076 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15078 * linux-low.c (linux_resume): Take a struct thread_resume *
15080 (linux_wait): Update call.
15081 (resume_ptr): New static variable.
15082 (linux_continue_one_thread): Renamed from
15083 linux_continue_one_process. Use resume_ptr.
15084 (linux_resume): Use linux_continue_one_thread.
15085 * server.c (handle_v_cont, handle_v_requests): New functions.
15086 (myresume): New function.
15087 (main): Handle 'v' case.
15088 * target.h (struct thread_resume): New type.
15089 (struct target_ops): Change argument of "resume" to struct
15091 (myresume): Delete macro.
15093 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15095 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15096 (uninstall): Support DESTDIR.
15098 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15100 * configure.srv: Add xscale*linux copy of arm*linux entry.
15102 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15104 * linux-arm-low.c (arm_reinsert_addr): New function.
15105 (the_low_target): Add arm_reinsert_addr.
15107 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15109 * mem-break.c: Remove whitespace at end of file.
15111 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15113 * configure.in: Check whether we need to prototype strerror.
15114 * server.h: Optionally prototype strerror.
15115 * gdbreplay.c (perror_with_name): Use strerror.
15116 * linux-low.c (linux_attach_lwp): Use strerror.
15117 * utils.c (perror_with_name): Use strerror.
15118 * config.in, configure: Regenerated.
15120 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15122 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15123 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15125 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15127 * Makefile.in (SFILES): Update.
15128 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15129 low-sun3.c: Remove files.
15131 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15133 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15134 (linux_detach_one_process, linux_detach): New functions.
15135 (linux_target_ops): Add linux_detach.
15136 * server.c (main): Handle 'D' packet.
15137 * target.h (struct target_ops): Add "detach" member.
15138 (detach_inferior): Define.
15140 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15142 From Kelley Cook <kelleycook@wideopenwest.com>:
15143 * configure.srv: Accept i[34567]86 variants.
15145 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15147 * linux-low.c (linux_wait_for_event): Correct comment typos.
15148 (linux_resume_one_process): Call check_removed_breakpoint.
15149 (linux_send_signal): New function.
15150 (linux_target_ops): Add linux_send_signal.
15151 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15153 * target.h (struct target_ops): Add send_signal.
15155 2003-05-29 Jim Blandy <jimb@redhat.com>
15157 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15158 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15159 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15160 away part of the register's value.
15162 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15164 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15165 (linux_wait_for_event, linux_init_signals): Likewise.
15167 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15169 * configure.in: Check for stdlib.h.
15170 * configure: Regenerated.
15171 * config.in: Regenerated.
15173 2003-01-04 Andreas Schwab <schwab@suse.de>
15175 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15177 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15179 * Makefile.in: Remove obsolete code.
15181 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15183 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15184 defined(PT_FPR0_HI).
15186 2002-11-17 Stuart Hughes <seh@zee2.com>
15188 * linux-arm-low.c (arm_num_regs): Increase.
15189 (arm_regmap): Include status register.
15191 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15193 * linux-low.c (register_addr): Remove incorrect -1 check.
15195 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15197 * linux-low.c (linux_create_inferior): Call setpgid. Return
15199 (unstopped_p, linux_signal_pid): Remove.
15200 (linux_target_ops): Remove linux_signal_pid.
15201 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15202 global instead of target method.
15203 * target.h (struct target_ops): Remove signal_pid. Update comment
15204 for create_inferior.
15205 * server.c (signal_pid): New variable.
15206 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15207 gdbserver. Set the child to be the foreground process group.
15208 (attach_inferior): Set signal_pid.
15210 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15212 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15214 2002-08-20 Jim Blandy <jimb@redhat.com>
15216 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15219 2002-08-01 Andrew Cagney <cagney@redhat.com>
15221 * Makefile.in: Make chill references obsolete.
15223 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15225 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15226 * configure: Regenerate.
15227 * config.in: Regenerate.
15229 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15231 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15232 (perror_with_name, remote_close, remote_open, expect, play): Static.
15234 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15236 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15237 byte offsets instead of an array of indexes.
15238 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15240 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15242 * regcache.c: Add comment.
15244 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15246 * thread-db.c: New file.
15247 * proc-service.c: New file.
15248 * acinclude.m4: New file.
15249 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15250 proc-service.o, and thread-db.o.
15251 (linux-low.o): Add USE_THREAD_DB.
15252 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15253 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15254 * aclocal.m4: Regenerated.
15255 * config.in: Regenerated.
15256 * configure: Regenerated.
15257 * configure.in: Check for proc_service.h, sys/procfs.h,
15258 thread_db.h, and linux/elf.h headrs.
15259 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15260 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15261 Check for -lthread_db and thread support.
15262 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15263 PowerPC, and SuperH.
15264 * i387-fp.c: Constify arguments.
15265 * i387-fp.h: Likewise.
15266 * inferiors.c: (struct thread_info): Renamed from
15267 `struct inferior_info'. Remove PID member. Use generic inferior
15268 list header. All uses updated.
15269 (inferiors, signal_pid): Removed.
15270 (all_threads): New variable.
15271 (get_thread): Define.
15272 (add_inferior_to_list): New function.
15273 (for_each_inferior): New function.
15274 (change_inferior_id): New function.
15275 (add_inferior): Removed.
15276 (remove_inferior): New function.
15277 (add_thread): New function.
15278 (free_one_thread): New function.
15279 (remove_thread): New function.
15280 (clear_inferiors): Use for_each_inferior and free_one_thread.
15281 (find_inferior): New function.
15282 (find_inferior_id): New function.
15283 (inferior_target_data): Update argument type.
15284 (set_inferior_target_data): Likewise.
15285 (inferior_regcache_data): Likewise.
15286 (set_inferior_regcache_data): Likewise.
15287 * linux-low.c (linux_bp_reinsert): Remove.
15288 (all_processes, stopping_threads, using_thrads)
15289 (struct pending_signals, debug_threads, pid_of): New.
15290 (inferior_pid): Replace with macro.
15291 (struct inferior_linux_data): Remove.
15292 (get_stop_pc, add_process): New functions.
15293 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15294 Use add_process and add_thread.
15295 (linux_attach_lwp): New function, based on old linux_attach. Use
15296 add_process and add_thread. Set stop_expected for new threads.
15297 (linux_attach): New function.
15298 (linux_kill_one_process): New function.
15299 (linux_kill): Kill all LWPs.
15300 (linux_thread_alive): Use find_inferior_id.
15301 (check_removed_breakpoints, status_pending_p): New functions.
15302 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15303 Update. Use WNOHANG. Wait for cloned processes also. Update process
15304 struct for the found process.
15305 (linux_wait_for_event): New function.
15306 (linux_wait): Use it. Support LWPs.
15307 (send_sigstop, wait_for_sigstop, stop_all_processes)
15308 (linux_resume_one_process, linux_continue_one_process): New functions.
15309 (linux_resume): Support LWPs.
15310 (REGISTER_RAW_SIZE): Remove.
15311 (fetch_register): Use register_size instead. Call supply_register.
15312 (usr_store_inferior_registers): Likewise. Call collect_register.
15313 Fix recursive case.
15314 (regsets_fetch_inferior_registers): Improve error message.
15315 (regsets_store_inferior_registers): Add debugging.
15316 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15317 (unstopped_p, linux_signal_pid): New functions.
15318 (linux_target_ops): Add linux_signal_pid.
15319 (linux_init_signals): New function.
15320 (initialize_low): Call it. Initialize using_threads.
15321 * regcache.c (inferior_regcache_data): Add valid
15323 (get_regcache): Fetch registers lazily. Add fetch argument
15324 and update all callers.
15325 (regcache_invalidate_one, regcache_invalidate): New
15327 (new_register_cache): Renamed from create_register_cache.
15328 Return the new regcache.
15329 (free_register_cache): Change argument to a void *.
15330 (registers_to_string, registers_from_string): Call get_regcache
15331 with fetch flag set.
15332 (register_data): Make static. Pass fetch flag to get_regcache.
15333 (supply_register): Call get_regcache with fetch flag clear.
15334 (collect_register): Call get_regcache with fetch flag set.
15335 (collect_register_as_string): New function.
15336 * regcache.h: Update.
15337 * remote-utils.c (putpkt): Flush after debug output and use
15339 Handle input interrupts while waiting for an ACK.
15340 (input_interrupt): Use signal_pid method.
15341 (getpkt): Flush after debug output and use stderr.
15342 (outreg): Use collect_register_as_string.
15343 (new_thread_notify, dead_thread_notify): New functions.
15344 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15345 and general_thread.
15346 (look_up_one_symbol): Flush after debug output.
15347 * server.c (step_thread, server_waiting): New variables.
15348 (start_inferior): Don't use signal_pid. Update call to mywait.
15349 (attach_inferior): Update call to mywait.
15350 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15351 (main): Don't fetch/store registers explicitly. Use
15352 set_desired_inferior. Support proposed ``Hs'' packet. Update
15354 * server.h: Update.
15355 (struct inferior_list, struct_inferior_list_entry): New.
15356 * target.c (set_desired_inferior): New.
15357 (write_inferior_memory): Constify.
15358 (mywait): New function.
15359 * target.h: Update.
15360 (struct target_ops): New signal_pid method.
15361 (mywait): Removed macro, added prototype.
15363 * linux-low.h (regset_func): Removed.
15364 (regset_fill_func, regset_store_func): New.
15365 (enum regset_type): New.
15366 (struct regset_info): Add type field. Use new operation types.
15367 (struct linux_target_ops): stop_pc renamed to get_pc.
15368 Add decr_pc_after_break and breakpoint_at.
15369 (get_process, get_thread_proess, get_process_thread)
15370 (strut process_info, all_processes, linux_attach_lwp)
15371 (thread_db_init): New.
15373 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15374 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15375 (the_low_target): Add new members.
15376 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15377 (i386_store_fpxregset): Constify.
15378 (target_regsets): Add new kind identifier.
15379 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15380 (i386_set_pc): Add debugging.
15381 (i386_breakpoint_at): New function.
15382 (the_low_target): Add new members.
15383 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15384 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15385 (mips_breakpoint_at): New.
15386 (the_low_target): Add new members.
15387 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15388 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15389 (the_low_target): Add new members.
15390 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15391 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15392 (the_low_target): Add new members.
15393 * linux-x86-64-low.c (target_regsets): Add new kind
15396 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15398 From Martin Pool <mbp@samba.org>:
15399 * server.c (gdbserver_usage): New function.
15402 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15404 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15405 stop_at -> stop_pc.
15407 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15409 * Makefile.in: Remove obsolete code.
15411 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15413 * linux-low.c (regsets_fetch_inferior_registers),
15414 (regsets_store_inferior_registers): Removed cast to int from
15416 * regcache.h: Added declaration of struct inferior_info.
15418 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15420 * inferiors.c (struct inferior_info): Add regcache_data.
15421 (add_inferior): Call create_register_cache.
15422 (clear_inferiors): Call free_register_cache.
15423 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15424 * regcache.c (struct inferior_regcache_data): New.
15425 (registers): Remove.
15426 (get_regcache): New function.
15427 (create_register_cache, free_register_cache): New functions.
15428 (set_register_cache): Don't initialize the register cache here.
15429 (registers_to_string, registers_from_string, register_data): Call
15431 * regcache.h: Add prototypes.
15432 * server.h: Likewise.
15434 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15436 * mem-break.c: New file.
15437 * mem-break.h: New file.
15438 * Makefile.in: Add mem-break.o rule; update server.h
15440 * inferiors.c (struct inferior_info): Add target_data
15442 (clear_inferiors): Free target_data member if set.
15443 (inferior_target_data, set_inferior_target_data): New functions.
15444 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15445 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15446 * linux-low.c (linux_bp_reinsert): New variable.
15447 (struct inferior_linux_data): New.
15448 (linux_create_inferior): Use set_inferior_target_data.
15449 (linux_attach): Likewise. Call add_inferior.
15450 (linux_wait_for_one_inferior): New function.
15451 (linux_wait): Call it.
15452 (linux_write_memory): Add const.
15453 (initialize_low): Call set_breakpoint_data.
15454 * linux-low.h (struct linux_target_ops): Add breakpoint
15456 * server.c (attach_inferior): Remove extra add_inferior
15458 * server.h: Include mem-break.h. Update inferior.c
15460 * target.c (read_inferior_memory)
15461 (write_inferior_memory): New functions.
15462 * target.h (read_inferior_memory)
15463 (write_inferior_memory): Change macros to prototypes.
15464 (struct target_ops): Update comments. Add const to write_memory
15467 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15469 * linux-low.c (usr_store_inferior_registers): Support
15470 registers which are allowed to fail to store.
15471 * linux-low.h (linux_target_ops): Likewise.
15472 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15473 (ppc_cannot_store_register): FPSCR may not be storable.
15475 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15477 * server.h: Include <string.h> if HAVE_STRING_H.
15478 * ChangeLog: Correct paths in last ChangeLog entry.
15480 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15482 * linux-low.h: Remove obsolete prototypes.
15483 (struct linux_target_ops): New.
15484 (extern the_low_target): New.
15485 * linux-low.c (num_regs, regmap): Remove declarations.
15486 (register_addr): Use the_low_target explicitly.
15487 (fetch_register): Likewise.
15488 (usr_fetch_inferior_registers): Likewise.
15489 (usr_store_inferior_registers): Likewise.
15490 * linux-arm-low.c (num_regs): Remove.
15491 (arm_num_regs): Define.
15492 (arm_regmap): Renamed from regmap, made static.
15493 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15495 (arm_cannot_store_register): Renamed from cannot_store_register,
15497 (the_low_target): New.
15498 * linux-i386-low.c (num_regs): Remove.
15499 (i386_num_regs): Define.
15500 (i386_regmap): Renamed from regmap, made static.
15501 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15503 (i386_cannot_store_register): Renamed from cannot_store_register,
15505 (the_low_target): New.
15506 * linux-ia64-low.c (num_regs): Remove.
15507 (ia64_num_regs): Define.
15508 (ia64_regmap): Renamed from regmap, made static.
15509 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15511 (ia64_cannot_store_register): Renamed from cannot_store_register,
15513 (the_low_target): New.
15514 * linux-m68k-low.c (num_regs): Remove.
15515 (m68k_num_regs): Define.
15516 (m68k_regmap): Renamed from regmap, made static.
15517 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15519 (m68k_cannot_store_register): Renamed from cannot_store_register,
15521 (the_low_target): New.
15522 * linux-mips-low.c (num_regs): Remove.
15523 (mips_num_regs): Define.
15524 (mips_regmap): Renamed from regmap, made static.
15525 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15527 (mips_cannot_store_register): Renamed from cannot_store_register,
15529 (the_low_target): New.
15530 * linux-ppc-low.c (num_regs): Remove.
15531 (ppc_num_regs): Define.
15532 (ppc_regmap): Renamed from regmap, made static.
15533 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15535 (ppc_cannot_store_register): Renamed from cannot_store_register,
15537 (the_low_target): New.
15538 * linux-s390-low.c (num_regs): Remove.
15539 (s390_num_regs): Define.
15540 (s390_regmap): Renamed from regmap, made static.
15541 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15543 (s390_cannot_store_register): Renamed from cannot_store_register,
15545 (the_low_target): New.
15546 * linux-sh-low.c (num_regs): Remove.
15547 (sh_num_regs): Define.
15548 (sh_regmap): Renamed from regmap, made static.
15549 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15551 (sh_cannot_store_register): Renamed from cannot_store_register,
15553 (the_low_target): New.
15554 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15555 (the_low_target): New.
15557 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15559 * Makefile.in: Add stamp-h target.
15560 * configure.in: Create stamp-h.
15561 * configure: Regenerated.
15563 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15565 * inferiors.c: New file.
15566 * target.c: New file.
15567 * target.h: New file.
15568 * Makefile.in: Add target.o and inferiors.o. Update
15570 * linux-low.c (inferior_pid): New static variable,
15571 moved from server.c.
15572 (linux_create_inferior): Renamed from create_inferior.
15573 Call add_inferior. Return 0 on success instead of a PID.
15574 (linux_attach): Renamed from myattach.
15575 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15576 (linux_thread_alive): Renamed from mythread_alive.
15577 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15579 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15580 (regsets_store_inferior_registers): Correct error message.
15581 Add missing ``return 0''.
15582 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15583 (linux_store_registers): Renamed from store_inferior_registers.
15584 (linux_read_memory): Renamed from read_inferior_memory.
15585 (linux_write_memory): Renamed from write_inferior_memory.
15586 (linux_target_ops): New structure.
15587 (initialize_low): Call set_target_ops ().
15588 * remote-utils.c (unhexify): New function.
15589 (hexify): New function.
15590 (input_interrupt): Send signals to ``signal_pid''.
15591 * server.c (inferior_pid): Remove.
15592 (start_inferior): Update create_inferior call.
15593 (attach_inferior): Call add_inferior.
15594 (handle_query): New function.
15595 (main): Call handle_query for `q' packets.
15596 * server.h: Include "target.h". Remove obsolete prototypes.
15597 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15599 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15601 * Makefile.in: Add WARN_CFLAGS. Update configury
15603 * configure.in: Check for <string.h>
15604 * configure: Regenerate.
15605 * config.in: Regenerate.
15606 * gdbreplay.c: Include needed system headers.
15607 (remote_open): Remove strchr prototype.
15608 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15609 * regcache.c (supply_register): Change buf argument to const void *.
15610 (supply_register_by_name): Likewise.
15611 (collect_register): Change buf argument to void *.
15612 (collect_register_by_name): Likewise.
15613 * regcache.h: Add missing prototypes.
15614 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15615 * server.c (handle_query): New function.
15616 (attached): New static variable, moved out of main.
15617 (main): Quiet longjmp clobber warnings.
15618 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15619 * utils.c (error): Remove NORETURN.