1 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3 * win32-low.c: Include "common-inferior.h".
5 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7 * inferiors.c (set_inferior_cwd): New function.
8 * server.c (handle_general_set): Handle QSetWorkingDir packet.
9 (handle_query): Inform that QSetWorkingDir is supported.
10 * win32-low.c (create_process): Pass the inferior's cwd to
13 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
15 * inferiors.c (current_inferior_cwd): New global variable.
16 (get_inferior_cwd): New function.
17 * inferiors.h (struct process_info) <cwd>: New field.
19 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
21 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
22 (OBS): Add gdb_tilde_expand.o.
24 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
26 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
27 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
29 2017-09-29 Pedro Alves <palves@redhat.com>
31 * ax.c (gdb_parse_agent_expr): Constify.
32 * ax.h (gdb_parse_agent_expr): Constify.
33 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
35 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
36 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
37 * remote-utils.h (read_ptid): Constify.
38 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
39 (process_point_options, process_serial_event): Constify.
40 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
41 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
42 (cmd_qtbuffer): Constify.
44 2017-09-29 Pedro Alves <palves@redhat.com>
46 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
49 2017-09-29 Pedro Alves <palves@redhat.com>
51 * linux-low.c (handle_extended_wait): Pass parent thread instead
52 of process to thread_db_notice_clone.
53 * linux-low.h (thread_db_notice_clone): Replace parent process
54 parameter with parent thread parameter.
55 * thread-db.c (find_one_thread): Add comment.
56 (thread_db_notice_clone): Replace parent process parameter with
57 parent thread parameter. Temporarily switch to the parent thread.
59 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
61 * gdbthread.h: Include "common-gdbthread.h".
62 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
63 "if" when validating the ptid.
64 * remote-utils.c: Include "gdbthread.h".
65 (prepare_resume_reply): Use "switch_to_thread".
66 * target.c (done_accessing_memory): Likewise.
68 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
70 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
71 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
72 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
73 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
74 s390x-gs-linux64-ipa.o to ipa_obj.
75 * linux-s390-low.c (HWCAP_S390_GS): New define.
76 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
78 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
79 (s390_arch_setup): Check for guarded-storage support and choose
81 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
82 init_registers_s390x_gs_linux64.
83 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
85 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
86 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
88 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
90 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
92 2017-09-21 Kevin Buettner <kevinb@redhat.com>
94 * linux-low.h (struct lwp_info): Add new field, thread_handle.
95 (thread_db_thread_handle): Declare.
96 * linux-low.c (linux_target_ops): Initialize thread_handle.
97 * server.c (handle_qxfer_threads_worker): Add support for
99 * target.h (struct target_ops): Add new function pointer,
101 (target_thread_handle): Define.
102 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
104 (thread_db_thread_handle): New function.
106 2017-09-21 Kevin Buettner <kevinb@redhat.com>
108 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
109 * linux-low.h (thread_db_notice_clone): Declare.
110 * thread-db.c (thread_db_notice_clone): New function.
112 2017-09-21 Pedro Alves <palves@redhat.com>
114 * server.c (gdb_read_memory, handle_status, process_serial_event)
115 (handle_serial_event, handle_target_event): Adjust to
116 set_desired_thread prototype change.
117 * target.c (set_desired_thread): Remove 'use_general' parameter
119 * target.h (set_desired_thread): Remove 'use_general' parameter.
121 2017-09-20 Tom Tromey <tom@tromey.com>
123 * target.c (target_terminal::terminal_state): Define.
124 (target_terminal::init): Rename from target_terminal_init.
125 (target_terminal::inferior): Rename from
126 target_terminal_inferior.
127 (target_terminal::ours): Rename from target_terminal_ours.
128 (target_terminal::ours_for_output, target_terminal::info): New.
130 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
132 * server.c (accumulate_file_name_length): Remove.
133 (emit_dll_description): Adjust to std::string change.
134 (handle_qxfer_libraries): Use std::string to hold document.
136 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
138 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
139 return type of xml_escape_text.
140 * server.c (emit_dll_description): Likewise.
142 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
144 * server.c (captured_main): Accept argument for --selftest.
145 Update run_tests call.
146 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
147 when registering selftests.
149 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
151 * regcache.c (get_thread_regcache): Update code to use "std::vector"
152 instead of "VEC" for "target_desc.reg_defs".
153 (regcache_cpy): Likewise.
154 (registers_to_string): Likewise.
155 (registers_from_string): Likewise.
156 (find_regno): Likewise.
157 (supply_regblock): Likewise.
158 (regcache_raw_read_unsigned): Likewise.
159 * tdesc.c (init_target_desc): Likewise.
160 (tdesc_create_reg): Likewise.
161 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
162 (struct target_desc) <reg_defs>: Convert to "std::vector".
163 (target_desc): Do not initialize "reg_defs".
164 (~target_desc): Update code to use "std::vector" instead of "VEC"
165 for "target_desc.reg_defs".
166 (operator==): Likewise.
168 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
170 * inferiors.h (thread_to_gdb_id): Remove.
171 * inferiors.c (thread_to_gdb_id): Remove.
172 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
173 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
174 lynx_store_registers, lynx_read_memory, lynx_write_memory):
176 * nto-low.c (nto_fetch_registers, nto_store_registers,
177 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
179 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
181 * inferiors.h (gdb_id_to_thread_id): Remove.
182 * inferiors.c (gdb_id_to_thread_id): Remove.
183 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
184 removal. Move pid declaration closer to where it's used.
186 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
188 * server.c (handle_detach): New function.
189 (process_serial_event): Move code out, call handle_detach.
191 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
193 * server.c (require_running): Rename to ...
194 (require_running_or_return): ... this ...
195 (require_running_or_break): ... and this.
196 (handle_query, process_serial_event): Adjust.
198 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
200 * linux-low.c (linux_set_resume_request): Remove unused
203 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
205 * server.c (first_thread_of): Remove.
206 (process_serial_event): Replace usage of first_thread_of with
207 find_any_thread_of_pid.
208 * tracepoint.c (same_process_p): Remove.
209 (gdb_agent_about_to_close): Replace usage of same_process_p with
210 find_any_thread_of_pid.
211 * linux-x86-low.c (same_process_callback): Remove.
212 (x86_arch_setup_process_callback): Replace usage of
213 same_process_callback with find_any_thread_of_pid.
214 * thread-db.c (any_thread_of): Remove.
215 (switch_to_process): Replace usage of any_thread_of with
216 find_any_thread_of_pid.
217 * inferiors.c (thread_pid_matches_callback): Remove.
218 (find_thread_process): Adjust to use find_any_thread_of_pid.
220 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
222 * regcache.c (get_thread_regcache): Guard calls to "memset"
225 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
227 * linux-low.c (handle_extended_wait): Use
228 "allocate_target_description" instead of "XNEW".
229 * linux-x86-low.c (initialize_low_arch): Likewise.
231 2017-09-05 Yao Qi <yao.qi@linaro.org>
233 * configure.srv (srv_i386_regobj): Remove.
234 (srv_amd64_regobj): Remove.
235 (srv_regobj): Set it to "" for x86 non-linux targets.
236 * linux-x86-tdesc.c (i386_linux_read_description):
237 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
238 (init_registers_i386): Remove the declaration.
239 (tdesc_i386): Remove the declaration.
240 (lynx_i386_arch_setup): Call i386_create_target_description.
241 * nto-x86-low.c: Likewise.
242 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
243 [!__x86_64__]: include arch/i386.h.
244 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
246 2017-09-05 Yao Qi <yao.qi@linaro.org>
248 * configure.srv (srv_amd64_linux_xmlfiles): Remove
249 i386/amd64-XXX-linux from it.
251 2017-09-05 Yao Qi <yao.qi@linaro.org>
253 * configure.srv: Empty srv_amd64_linux_regobj if $development is
255 (ipa_amd64_linux_regobj): Remove.
256 (ipa_x32_linux_regobj): Remove.
258 2017-09-05 Yao Qi <yao.qi@linaro.org>
260 * Makefile.in (arch-amd64.o): New rule.
261 * configure.srv: Append arch-amd64.o.
262 * linux-amd64-ipa.c: Include common/x86-xstate.h.
263 (get_ipa_tdesc): Call amd64_linux_read_description.
264 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
265 and init_registers_amd64_XXX.
266 * linux-x86-low.c (x86_linux_read_description): Call
267 amd64_linux_read_description.
268 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
269 (initialize_low_arch): Don't call init_registers_x32_XXX and
270 init_registers_amd64_XXX.
271 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
273 [__x86_64__] (amd64_tdesc_test): New function.
274 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
275 and init_registers_amd64_XXX.
276 * linux-x86-tdesc.c: Include arch/amd64.h.
277 (xcr0_to_tdesc_idx): New function.
278 (i386_linux_read_description): New function.
279 (amd64_get_ipa_tdesc_idx): New function.
280 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
281 (amd64_get_ipa_tdesc): Declare.
283 2017-09-05 Yao Qi <yao.qi@linaro.org>
285 * configure.srv (srv_i386_linux_xmlfiles): Remove
286 i386/i386-XXX-linux.xml from it.
288 2017-09-05 Yao Qi <yao.qi@linaro.org>
290 * configure.srv: Set srv_i386_linux_regobj empty if $development
292 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
293 initialize_low_tdesc.
294 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
295 with #if initialize_low_tdesc.
296 * linux-x86-tdesc-selftest.c: New file.
297 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
299 2017-09-05 Yao Qi <yao.qi@linaro.org>
301 * Makefile.in (arch-i386.o): New rule.
302 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
303 (x86_64-*-linux*): Likewise.
304 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
306 (i386_linux_read_description): Remove code and call
307 i386_create_target_description.
308 * tdesc.c (allocate_target_description): New function.
309 * tdesc.h (set_tdesc_architecture): Remove declaration.
310 (set_tdesc_osabi): Likewise.
312 2017-09-05 Yao Qi <yao.qi@linaro.org>
314 * linux-x86-tdesc.c: Don't include <inttypes.h>.
315 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
316 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
318 * server.c (get_features_xml): Call tdesc_get_features_xml.
319 * tdesc.c (set_tdesc_architecture): New function.
320 (set_tdesc_osabi): New function.
321 (tdesc_get_features_xml): New function.
322 (tdesc_create_feature): Add an argument.
323 * tdesc.h (struct target_desc) <features>: New field.
324 <arch, osabi>: New field.
325 (~target_desc): xfree features, arch, and osabi.
326 (target_desc::oerator==): Don't compare .xmltarget.
327 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
328 (set_tdesc_osabi): Likewise.
329 (tdesc_get_features_xml): Likewise.
331 2017-09-05 Yao Qi <yao.qi@linaro.org>
333 * linux-x86-tdesc.c: Include selftest.h.
334 (i386_tdesc_test): New function.
335 (initialize_low_tdesc): Call selftests::register_test.
336 * tdesc.h: Include regdef.h.
337 (target_desc): Override operator == and !=.
339 2017-09-05 Yao Qi <yao.qi@linaro.org>
341 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
343 * linux-i386-ipa.c: Include common/x86-xstate.h
344 (get_ipa_tdesc): Call i386_linux_read_description.
345 (initialize_low_tracepoint): Don't call init_registers_XXX
346 functions, call initialize_low_tdesc instead.
347 * linux-x86-low.c (x86_linux_read_description): Call
348 i386_linux_read_description.
349 (initialize_low_arch): Don't call init_registers_i386_XXX
350 functions, call initialize_low_tdesc.
351 * linux-x86-tdesc.c: New file.
352 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
353 (i386_get_ipa_tdesc_idx): Declare.
354 (i386_get_ipa_tdesc): Declare.
355 (initialize_low_tdesc): Declare.
357 2017-09-05 Yao Qi <yao.qi@linaro.org>
359 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
362 2017-09-05 Yao Qi <yao.qi@linaro.org>
364 * Makefile.in (IPA_OBJS): Add vec-ipa.o
365 * regcache.c (get_thread_regcache): Use VEC_length.
366 (init_register_cache): Likewise.
367 (regcache_cpy): Likewise.
368 (registers_to_string): Iterate reg_defs via VEC_iterate.
369 (find_regno): Likewise.
370 (find_register_by_number): Use VEC_index.
371 (register_size): Call find_register_by_number.
372 (register_data): Call find_register_by_number.
373 (supply_regblock): Use VEC_length.
374 (regcache_raw_read_unsigned): Likewise.
375 * tdesc.c (init_target_desc): Iterate reg_defs via
377 (default_description): Update initializer.
378 (copy_target_description): Don't update field num_registers.
379 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
380 <num_registers>: Remove.
382 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
384 * Makefile.in (.SECONDARY): Define target.
386 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
388 * linux-low.c (linux_wait_1): Adjust.
389 * server.c (queue_stop_reply_callback): Adjust.
391 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
393 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
394 QEnvironmentUnset and QEnvironmentReset packets.
395 (handle_query): Inform remote that QEnvironmentHexEncoded,
396 QEnvironmentUnset and QEnvironmentReset are supported.
398 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
400 * inferiors.h (inferior_target_data): Rename to ...
401 (thread_target_data): ... this.
402 (inferior_regcache_data): Rename to ...
403 (thread_regcache_data): ... this.
404 (set_inferior_regcache_data): Rename to ...
405 (set_thread_regcache_data): ... this.
406 * inferiors.c (inferior_target_data): Rename to ...
407 (thread_target_data): ... this.
408 (inferior_regcache_data): Rename to ...
409 (thread_regcache_data): ... this.
410 (set_inferior_regcache_data): Rename to ...
411 (set_thread_regcache_data): ... this.
412 (free_one_thread): Update.
413 * linux-low.h (get_thread_lwp): Update.
414 * regcache.c (get_thread_regcache): Update.
415 (regcache_invalidate_thread): Update.
416 (free_register_cache_thread): Update.
417 * win32-i386-low.c (update_debug_registers_callback): Update.
418 (win32_get_current_dr): Update.
419 * win32-low.c (thread_rec): Update.
420 (delete_thread_info): Update.
421 (continue_one_thread): Update.
422 (suspend_one_thread): Update.
424 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
426 * inferiors.c (set_inferior_target_data): Remove.
427 * inferiors.h (set_inferior_target_data): Remove.
429 2017-08-18 Yao Qi <yao.qi@linaro.org>
431 * Makefile.in (OBS): Add selftest.o.
432 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
433 * configure, config.in: Re-generated.
434 * server.c: Include common/sefltest.h.
435 (captured_main): Handle option --selftest.
437 2017-08-09 Yao Qi <yao.qi@linaro.org>
439 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
440 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
441 i386-avx-mpx.o and i386-mmx.o.
442 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
443 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
444 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
445 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
446 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
447 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
448 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
449 i386/amd64-avx-mpx.xml.
451 2017-08-09 Yao Qi <yao.qi@linaro.org>
453 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
454 and x32-avx-avx512.o.
455 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
456 i386/x32-avx-avx512.xml.
458 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
460 * tracepoint.h (enum class fast_tpoint_collect_result): New
462 (fast_tracepoint_collecting): Change return type to
463 fast_tpoint_collect_result.
464 * tracepoint.c (fast_tracepoint_collecting): Likewise.
465 * linux-low.h: Include tracepoint.h.
466 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
467 fast_tpoint_collect_result.
468 * linux-low.c (handle_tracepoints): Adjust.
469 (linux_fast_tracepoint_collecting): Change return type to
470 fast_tpoint_collect_result.
471 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
472 linux_wait_1, stuck_in_jump_pad_callback,
473 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
474 proceed_one_lwp): Adjust to type change.
476 2017-07-10 Yao Qi <yao.qi@linaro.org>
478 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
480 2017-06-29 Yao Qi <yao.qi@linaro.org>
482 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
484 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
486 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
488 * Makefile.in (IPA_OBJS): Sort and format one item per line.
490 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
492 * linux-low.c (linux_create_inferior): Adjust code to access the
493 environment information via 'gdb_environ' class.
494 * lynx-low.c (lynx_create_inferior): Likewise.
495 * server.c (our_environ): Make it an instance of 'gdb_environ'.
496 (get_environ): Return a pointer to 'our_environ'.
497 (captured_main): Initialize 'our_environ'.
498 * server.h (get_environ): Adjust prototype.
499 * spu-low.c (spu_create_inferior): Adjust code to access the
500 environment information via 'gdb_environ' class.
502 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
504 * linux-low.c (linux_read_memory, linux_write_memory): Remove
505 usage of "register" keyword.
507 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
509 * configure: Re-generate.
511 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
513 * configure: Re-generate.
515 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
517 * Makefile.in (COMPILE.pre): Add "-x c++".
519 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
521 * fork-child.c: Conditionally include <signal.h>.
523 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
525 * server.c (handle_general_set): Handle new packet
527 (handle_query): Add "QStartupWithShell" to the list of supported
529 (gdbserver_usage): Add help text explaining the
530 new "--startup-with-shell" and "--no-startup-with-shell" CLI
532 (captured_main): Recognize and act upon the presence of the new
535 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
536 Pedro Alves <palves@redhat.com>
538 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
539 * configure: Regenerate.
540 * configure.srv (srv_linux_obj): Add "fork-child.o" and
542 (i[34567]86-*-lynxos*): Likewise.
543 (spu*-*-*): Likewise.
544 * fork-child.c: New file.
545 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
547 (linux_ptrace_fun): New function.
548 (linux_create_inferior): Adjust function prototype to reflect
549 change on "target.h". Adjust function code to use
551 (linux_request_interrupt): Delete "signal_pid".
552 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
553 (lynx_ptrace_fun): New function.
554 (lynx_create_inferior): Adjust function prototype to reflect
555 change on "target.h". Adjust function code to use
557 * nto-low.c (nto_create_inferior): Adjust function prototype and
558 code to reflect change on "target.h". Update comments.
559 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
560 "common-terminal.h" and "environ.h".
561 (terminal_fd): Moved to fork-child.c.
562 (old_foreground_pgrp): Likewise.
563 (restore_old_foreground_pgrp): Likewise.
564 (last_status): Make it global.
565 (last_ptid): Likewise.
566 (our_environ): New variable.
567 (startup_with_shell): Likewise.
568 (program_name): Likewise.
569 (program_argv): Rename to...
570 (program_args): ...this.
571 (wrapper_argv): New variable.
572 (start_inferior): Delete function.
573 (get_exec_wrapper): New function.
574 (get_exec_file): Likewise.
575 (get_environ): Likewise.
576 (prefork_hook): Likewise.
577 (post_fork_inferior): Likewise.
578 (postfork_hook): Likewise.
579 (postfork_child_hook): Likewise.
580 (handle_v_run): Update code to deal with arguments coming from the
581 remote host. Update calls from "start_inferior" to
583 (captured_main): Likewise. Initialize environment variable. Call
585 * server.h (post_fork_inferior): New prototype.
586 (get_environ): Likewise.
587 (last_status): Declare.
588 (last_ptid): Likewise.
589 (signal_pid): Likewise.
590 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
591 (spu_ptrace_fun): New function.
592 (spu_create_inferior): Adjust function prototype to reflect change
593 on "target.h". Adjust function code to use "fork_inferior".
594 * target.c (target_terminal_init): New function.
595 (target_terminal_inferior): Likewise.
596 (target_terminal_ours): Likewise.
597 * target.h: Include <vector>.
598 (struct target_ops) <create_inferior>: Update prototype.
599 (create_inferior): Update macro.
600 * utils.c (gdb_flush_out_err): New function.
601 * win32-low.c (win32_create_inferior): Adjust function prototype
602 and code to reflect change on "target.h".
604 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
606 * inferiors.c (switch_to_thread): New function.
608 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
610 * Makefile.in (SFILE): Add "common/job-control.c".
611 (OBS): Add "job-control.o".
613 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
615 * Makefile: Remove "@host_makefile_frag@".
617 2017-05-05 Pedro Alves <palves@redhat.com>
619 * configure: Regenerate.
621 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
623 * configure: Regenerate.
625 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
627 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
628 software_single_step change of return type to
629 std::vector<CORE_ADDR>.
630 * linux-low.c (install_software_single_step_breakpoints):
632 * linux-low.h (install_software_single_step_breakpoints):
635 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
637 * remote-utils.c: Include "gdb_termios.h" instead of
639 * terminal.h: Delete file.
641 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
643 * server.c: Include <vector>.
644 <program_argv, wrapper_argv>: Convert to std::vector.
645 (start_inferior): Rewrite function to use C++.
646 (handle_v_run): Likewise. Update code that calculates the argv
647 based on the vRun packet; use C++.
648 (captured_main): Likewise.
650 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
652 * server.c (handle_v_cont): Initialize thread_resume::thread
655 2017-04-05 Pedro Alves <palves@redhat.com>
657 * configure: Regenerate.
659 2017-04-05 Pedro Alves <palves@redhat.com>
661 * gdbreplay.c (sync_error): Constify.
662 * linux-x86-low.c (push_opcode): Constify.
664 2017-04-05 Pedro Alves <palves@redhat.com>
666 * win32-low.c (get_child_debug_event)
667 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
668 Report TARGET_WAITKIND_SPURIOUS instead.
670 2017-04-05 Pedro Alves <palves@redhat.com>
672 * remote-utils.c (remote_prepare, remote_open): Constify.
673 * remote-utils.h (remote_prepare, remote_open): Constify.
674 * server.c (captured_main): Constify 'port' handling.
676 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
678 * Makefile.in (clean): Clear .deps.
680 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
682 * .gitignore: Remove generated files, replace with wildcard.
683 * (clean): Replace removal of generated files with wildcard.
684 (version.c): Replace with...
685 (version-generated.c): ...this.
686 (xml-builtin.c): Replace with...
687 (xml-builtin-generated.c): ...this.
688 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
689 (%.c: *regformats*): Replace with...
690 (%-generated.c: *regformats*): ...this.
692 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
694 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
695 (xtensa_fill_gregset): Call collect_register_by_name for
697 (xtensa_store_gregset): Call supply_register_by_name for
700 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
702 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
703 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
704 (xtensa_store_gregset): Call supply_register for all registers in
705 a0_regnum..a0_regnum + C0_NREGS range.
707 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
709 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
710 (ax-ipa.o: ax.c): Remove.
711 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
712 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
713 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
714 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
715 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
717 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
719 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
720 (print-utils-ipa.o: ../common/print-utils.c): Remove.
721 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
722 (errors-ipa.o: ../common/errors.c): Remove.
723 (format-ipa.o: ../common/format.c): Remove.
724 (common-utils-ipa.o: ../common/common-utils.c): Remove.
726 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
728 * Makefile.in (%-ipa.o: %.c): New rule.
729 (tracepoint-ipa.o: tracepoint.c): Remove.
730 (utils-ipa.o: utils.c): Remove.
731 (remote-utils-ipa.o: remote-utils.c): Remove.
732 (regcache-ipa.o: regcache.c): Remove.
733 (i386-linux-ipa.o: i386-linux.c): Remove.
734 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
735 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
736 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
737 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
738 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
739 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
740 (amd64-linux-ipa.o: amd64-linux.c): Remove.
741 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
742 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
743 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
744 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
745 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
746 (aarch64-ipa.o: aarch64.c): Remove.
747 (s390-linux32-ipa.o: s390-linux32.c): Remove.
748 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
749 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
750 (s390-linux64-ipa.o: s390-linux64.c): Remove.
751 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
752 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
753 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
754 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
755 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
756 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
757 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
758 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
759 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
760 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
761 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
762 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
763 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
764 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
765 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
766 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
767 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
768 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
769 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
770 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
771 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
772 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
773 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
774 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
775 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
776 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
777 (tdesc-ipa.o: tdesc.c): Remove.
778 (x32-linux-ipa.o: x32-linux.c): Remove.
779 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
780 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
782 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
784 * Makefile.in (%.o: ../arch/%.c): New rule.
785 (arm.o: ../arch/arm.c): Remove.
786 (arm-linux.o: ../arch/arm-linux.c): Remove.
787 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
788 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
790 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
792 * Makefile.in (%.o: ../nat/%.c): New rule.
793 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
794 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
795 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
796 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
797 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
798 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
799 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
800 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
801 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
802 (linux-personality.o: ../nat/linux-personality.c): Remove.
803 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
804 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
805 (x86-linux.o: ../nat/x86-linux.c): Remove.
806 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
807 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
809 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
811 * Makefile.in (%.o: ../common/%.c): New rule.
812 (signals.o: ../common/signals.c): Remove.
813 (print-utils.o: ../common/print-utils.c): Remove.
814 (rsp-low.o: ../common/rsp-low.c): Remove.
815 (common-utils.o: ../common/common-utils.c): Remove.
816 (posix-strerror.o: ../common/posix-strerror.c): Remove.
817 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
818 (vec.o: ../common/vec.c): Remove.
819 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
820 (xml-utils.o: ../common/xml-utils.c): Remove.
821 (ptid.o: ../common/ptid.c): Remove.
822 (buffer.o: ../common/buffer.c): Remove.
823 (format.o: ../common/format.c): Remove.
824 (filestuff.o: ../common/filestuff.c): Remove.
825 (agent.o: ../common/agent.c): Remove.
826 (errors.o: ../common/errors.c): Remove.
827 (environ.o: ../common/environ.c): Remove.
828 (common-debug.o: ../common/common-debug.c): Remove.
829 (cleanups.o: ../common/cleanups.c): Remove.
830 (common-exceptions.o: ../common/common-exceptions.c): Remove.
831 (fileio.o: ../common/fileio.c): Remove.
832 (common-regcache.o: ../common/common-regcache.c): Remove.
833 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
834 (new-op.o: ../common/new-op.c): Remove.
835 (btrace-common.o: ../common/btrace-common.c): Remove.
837 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
839 * Makefile.in (%.o: ../target/%.c): New rule.
840 (waitstatus.o: ../target/waitstatus.c): Remove.
842 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
845 (%.c: ../regformats/%.dat,
846 (%.c: ../regformats/arm/%.dat,
847 (%.c: ../regformats/i386/%.dat,
848 (%.c: ../regformats/rs6000/%.dat): New rules.
851 (arm-with-iwmmxt.c): Remove.
852 (arm-with-vfpv2.c): Remove.
853 (arm-with-vfpv3.c): Remove.
854 (arm-with-neon.c): Remove.
855 (reg-bfin.c): Remove.
856 (reg-cris.c): Remove.
857 (reg-crisv32.c): Remove.
859 (i386-linux.c): Remove.
860 (i386-avx.c): Remove.
861 (i386-avx-linux.c): Remove.
862 (i386-avx-avx512.c): Remove.
863 (i386-avx-avx512-linux.c): Remove.
864 (i386-mpx.c): Remove.
865 (i386-mpx-linux.c): Remove.
866 (i386-avx-mpx-avx512-pku.c): Remove.
867 (i386-avx-mpx-avx512-pku-linux.c): Remove.
868 (i386-avx-mpx.c): Remove.
869 (i386-avx-mpx-linux.c): Remove.
870 (i386-mmx.c): Remove.
871 (i386-mmx-linux.c): Remove.
872 (reg-ia64.c): Remove.
873 (reg-m32r.c): Remove.
874 (reg-m68k.c): Remove.
876 (mips-linux.c): Remove.
877 (mips-dsp-linux.c): Remove.
878 (mips64-linux.c): Remove.
879 (mips64-dsp-linux.c): Remove.
880 (nios2-linux.c): Remove.
881 (powerpc-32.c): Remove.
882 (powerpc-32l.c): Remove.
883 (powerpc-altivec32l.c): Remove.
884 (powerpc-cell32l.c): Remove.
885 (powerpc-vsx32l.c): Remove.
886 (powerpc-isa205-32l.c): Remove.
887 (powerpc-isa205-altivec32l.c): Remove.
888 (powerpc-isa205-vsx32l.c): Remove.
889 (powerpc-e500l.c): Remove.
890 (powerpc-64l.c): Remove.
891 (powerpc-altivec64l.c): Remove.
892 (powerpc-cell64l.c): Remove.
893 (powerpc-vsx64l.c): Remove.
894 (powerpc-isa205-64l.c): Remove.
895 (powerpc-isa205-altivec64l.c): Remove.
896 (powerpc-isa205-vsx64l.c): Remove.
897 (s390-linux32.c): Remove.
898 (s390-linux32v1.c): Remove.
899 (s390-linux32v2.c): Remove.
900 (s390-linux64.c): Remove.
901 (s390-linux64v1.c): Remove.
902 (s390-linux64v2.c): Remove.
903 (s390-te-linux64.c): Remove.
904 (s390-vx-linux64.c): Remove.
905 (s390-tevx-linux64.c): Remove.
906 (s390x-linux64.c): Remove.
907 (s390x-linux64v1.c): Remove.
908 (s390x-linux64v2.c): Remove.
909 (s390x-te-linux64.c): Remove.
910 (s390x-vx-linux64.c): Remove.
911 (s390x-tevx-linux64.c): Remove.
912 (tic6x-c64xp-linux.c): Remove.
913 (tic6x-c64x-linux.c): Remove.
914 (tic6x-c62x-linux.c): Remove.
916 (reg-sparc64.c): Remove.
919 (amd64-linux.c): Remove.
920 (amd64-avx.c): Remove.
921 (amd64-avx-linux.c): Remove.
922 (amd64-avx-avx512.c): Remove.
923 (amd64-avx-avx512-linux.c): Remove.
924 (amd64-mpx.c): Remove.
925 (amd64-mpx-linux.c): Remove.
926 (amd64-avx-mpx-avx512-pku.c): Remove.
927 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
928 (amd64-avx-mpx.c): Remove.
929 (amd64-avx-mpx-linux.c): Remove.
931 (x32-linux.c): Remove.
933 (x32-avx-linux.c): Remove.
934 (x32-avx-avx512.c): Remove.
935 (x32-avx-avx512-linux.c): Remove.
936 (reg-xtensa.c): Remove.
937 (reg-tilegx.c): Remove.
938 (reg-tilegx32.c): Remove.
940 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
942 * Makefile.in (SFILES): Add "common/environ.c".
943 (OBJS): Add "common/environ.h".
945 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
947 * configure.ac: Check if the fs_base and gs_base members of
948 `struct user_regs_struct' exist.
949 * config.in: Regenerated.
950 * configure: Likewise.
952 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
954 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
956 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
957 (get_next_pcs_syscall_next_pc): Likewise.
959 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
961 * win32-i386-low.c: Fix incorrect reference to a couple source files.
962 * nto-x86-low.c: Likewise.
964 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
966 * Makefile.in: Include disable-implicit-rules.mk.
968 2016-11-23 Pedro Alves <palves@redhat.com>
970 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
971 (debug_vprintf): Use std::chrono::steady_clock instead of
972 gettimeofday. Use '.' instead of ':'.
973 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
974 (get_timestamp): Use std::chrono::steady_clock instead of
977 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
979 * Makefile.in: Fix whitespace formatting.
981 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
983 * Makefile.in (SFILES, OBS): Flatten list and order
986 2016-11-23 Pedro Alves <palves@redhat.com>
988 * event-loop.c (handle_file_event): Use warning.
989 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
990 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
993 2016-11-23 Pedro Alves <palves@redhat.com>
995 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
997 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
998 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
999 debug_printf and debug_flush for debug output.
1000 * server.c (handle_general_set): Likewise.
1001 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1004 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1006 * Makefile.in (.c.o): Replace rule with ...
1007 (%.o: %.c): ... this one.
1009 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1011 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1012 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1014 * configure.ac: Remove checks for the make program.
1015 * configure: Re-generate.
1017 2016-10-28 Pedro Alves <palves@redhat.com>
1019 * Makefile.in (CXX_DIALECT): Get from configure.
1020 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1021 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1022 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1023 * config.in: Regenerate.
1024 * configure: Regenerate.
1026 2016-10-27 Yao Qi <yao.qi@linaro.org>
1028 * linux-low.c (linux_supports_range_stepping): Return true if
1029 can_software_single_step return true.
1031 2016-10-27 Yao Qi <yao.qi@linaro.org>
1033 * inferiors.c (find_inferior_in_random): New function.
1034 * inferiors.h (find_inferior_in_random): Declare.
1035 * linux-low.c (linux_wait_for_event_filtered): Call
1036 find_inferior_in_random instead of find_inferior.
1038 2016-10-27 Yao Qi <yao.qi@linaro.org>
1040 * linux-low.c (linux_wait_1): If single-step breakpoints are
1041 inserted, remove them.
1043 2016-10-26 Pedro Alves <palves@redhat.com>
1045 * linux-low.c (handle_extended_wait): Link parent/child fork
1047 (linux_wait_1): Unlink them.
1048 (linux_set_resume_request): Ignore resume requests for
1049 already-resumed and unhandled fork child threads.
1050 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1051 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1053 (handle_v_requests) <vCont>: Don't call require_running.
1054 * server.h (in_queued_stop_replies): New declaration.
1056 2016-10-24 Yao Qi <yao.qi@linaro.org>
1059 * linux-aarch64-low.c (append_insns): Cast the return value to
1062 2016-10-10 Yao Qi <yao.qi@linaro.org>
1064 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1066 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1068 * target.c (target_supports_multi_process): New function, moved
1070 * target.h (target_supports_multi_process): ... here. Remove
1073 2016-10-05 Tom Tromey <tom@tromey.com>
1076 * tracepoint.c (handle_tracepoint_bkpts): Check
1077 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1079 2016-10-05 Yao Qi <yao.qi@linaro.org>
1081 * configure.srv: Update the path of arm-*.xml files.
1083 2016-10-05 Terry Guo <terry.guo@arm.com>
1084 Yao Qi <yao.qi@linaro.org>
1086 * Makefile.in: Adjust the path of rules.
1087 * configure.srv: Update the path of xml files.
1088 * regformats/arm-with-iwmmxt.dat: Regenerated.
1089 * regformats/arm-with-neon.dat: Likewise.
1090 * regformats/arm-with-vfpv2.dat: Likewise.
1091 * regformats/arm-with-vfpv3.dat Likewise.
1093 2016-09-30 Yao Qi <yao.qi@linaro.org>
1096 * target.c (target_stop_and_wait): Don't call
1097 target_continue_no_signal, use resume_stop instead.
1099 2016-09-26 Yao Qi <yao.qi@linaro.org>
1101 * linux-low.c (linux_wait_1): Call debug_exit.
1103 2016-09-23 Pedro Alves <palves@redhat.com>
1105 * Makefile.in (SFILES): Add common/new-op.c.
1106 (OBS): Add common/new-op.o.
1107 (new-op.o): New rule.
1109 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1111 * .gitinore: Ignore more files.
1113 2016-09-21 Yao Qi <yao.qi@linaro.org>
1115 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1118 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1120 * server.c (start_inferior): Call target_mourn_inferior instead of
1121 mourn_inferior; pass ptid_t argument to it.
1123 (handle_target_event): Likewise.
1124 * target.c (target_mourn_inferior): New function.
1125 * target.h (mourn_inferior): Delete macro.
1127 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1129 * linux-low.c (lwp_is_stepping): New function.
1131 2016-09-06 Carl Love <cel@us.ibm.com>
1133 * server.c (start_inferior): Fixed comment, requested comment change
1134 didn't get updated correctly. Removed reference to ptrace () call as
1135 it is only true on Linux systems.
1137 2016-09-06 Carl Love <cel@us.ibm.com>
1139 * server.c (start_inferior): Do not call
1140 function target_post_create_inferior () if the
1141 inferior process has already exited.
1143 2016-09-05 Pedro Alves <palves@redhat.com>
1145 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1146 (COMPILE.pre, CC_LD): Use CXX directly.
1147 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1148 * acinclude.m4: Don't include build-with-cxx.m4.
1149 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1150 * configure: Regenerate.
1152 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1155 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1156 call writing data to own_buf.
1158 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1160 * target.c (mywait): Call target_wait instead of
1162 (target_wait): New function.
1164 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1166 * server.c (start_inferior): New variable 'ptid'. Replace calls
1167 to the_target->resume by target_continue{,_no_signal}, depending
1169 * target.c (target_stop_and_wait): Call target_continue_no_signal
1170 instead of the_target->resume.
1171 (target_continue): New function.
1173 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1175 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1177 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1180 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1182 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1183 * linux-arm-low.c (ps_get_thread_area): Likewise.
1184 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1185 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1186 * linux-mips-low.c (ps_get_thread_area): Likewise.
1187 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1188 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1189 * linux-x86-low.c (ps_get_thread_area): Likewise.
1190 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1192 2016-08-19 Pedro Alves <palves@redhat.com>
1194 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1196 2016-08-19 Pedro Alves <palves@redhat.com>
1198 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1199 comment. Use memcpy instead of casting through unsigned long.
1201 2016-08-19 Pedro Alves <palves@redhat.com>
1203 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1204 allocating around 0x80000000.
1206 2016-08-19 Pedro Alves <palves@redhat.com>
1209 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1210 (x32-avx512-linux-ipa.o): New rules.
1211 * configure.ac (x86_64-*-linux*): New x32 check.
1212 * configure.srv (ipa_x32_linux_regobj): New.
1213 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1214 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1216 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1218 * configure: Regenerate.
1220 2016-08-09 Pedro Alves <palves@redhat.com>
1223 * Makefile.in (OBS): Add signals-state-save-restore.o.
1224 (signals-state-save-restore.o): New rule.
1225 * config.in: Regenerate.
1226 * configure: Regenerate.
1227 * linux-low.c: Include "signals-state-save-restore.h".
1228 (linux_create_inferior): Call
1229 restore_original_signals_state.
1230 * server.c: Include "dispositions-save-restore.h".
1231 (captured_main): Call save_original_signals_state.
1233 2016-08-05 Pedro Alves <palves@redhat.com>
1235 * configure: Regenerate.
1237 2016-08-04 Yao Qi <yao.qi@linaro.org>
1239 * linux-low.c (regsets_fetch_inferior_registers): Check
1240 errno is ESRCH or not.
1242 2016-08-02 Yao Qi <yao.qi@linaro.org>
1244 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1245 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1246 (thread_db_load_search): Update.
1247 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1248 td_ta_set_event and td_ta_event_getmsg.
1250 2016-07-26 Pedro Alves <palves@redhat.com>
1253 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1254 of unsigned long for 64-bit registers and use uint32_t instead of
1255 unsigned int for 32-bit registers.
1257 2016-07-26 Pedro Alves <palves@redhat.com>
1259 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1262 2016-07-21 Tom Tromey <tom@tromey.com>
1264 * configure: Rebuild.
1266 2016-07-21 Yao Qi <yao.qi@linaro.org>
1268 * mem-break.c (find_gdb_breakpoint): Cast bp to
1269 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1271 2016-07-21 Yao Qi <yao.qi@linaro.org>
1273 * server.c (handle_v_requests): Support s and S actions
1274 if target_supports_software_single_step return true.
1276 2016-07-21 Yao Qi <yao.qi@linaro.org>
1278 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1279 is resume_step, call maybe_hw_step.
1280 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1282 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1284 (proceed_one_lwp): If resume request is resume_step, install
1285 reinsert breakpoints and call maybe_hw_step.
1287 2016-07-21 Yao Qi <yao.qi@linaro.org>
1289 * linux-low.c (proceed_one_lwp): Declare.
1290 (linux_resume_one_thread): Remove local variable 'step'.
1291 Lift code enqueue signal. Call proceed_one_lwp instead of
1292 linux_resume_one_lwp.
1294 2016-07-21 Yao Qi <yao.qi@linaro.org>
1296 * linux-low.c (linux_resume_one_thread): Call
1297 enqueue_pending_signal.
1299 2016-07-21 Yao Qi <yao.qi@linaro.org>
1301 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1302 * inferiors.c (do_restore_current_thread_cleanup): New function.
1303 (make_cleanup_restore_current_thread): Likewise.
1304 * linux-low.c (install_software_single_step_breakpoints): Call
1305 make_cleanup_restore_current_thread. Switch current_thread to
1308 2016-07-21 Yao Qi <yao.qi@linaro.org>
1310 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1311 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1312 (clone_one_breakpoint): Likewise.
1313 (delete_reinsert_breakpoints): Change parameter to thread.
1315 (has_reinsert_breakpoints): Likewise.
1316 (uninsert_reinsert_breakpoints): Likewise.
1317 (reinsert_reinsert_breakpoints): Likewise.
1318 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1319 (delete_reinsert_breakpoints): Likewise.
1320 (reinsert_reinsert_breakpoints): Likewise.
1321 (uninsert_reinsert_breakpoints): Likewise.
1322 (has_reinsert_breakpoints): Likewise.
1324 2016-07-21 Yao Qi <yao.qi@linaro.org>
1326 * inferiors.c (get_thread_process): Make parameter const.
1327 * inferiors.h (get_thread_process): Update declaration.
1328 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1329 Add new parameters child_thread and parent_thread. Callers
1331 * mem-break.h (clone_all_breakpoints): Update declaration.
1333 2016-07-21 Yao Qi <yao.qi@linaro.org>
1335 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1336 <command_list, handler>: Remove.
1337 (struct gdb_breakpoint): New.
1338 (struct other_breakpoint): New.
1339 (struct reinsert_breakpoint): New.
1340 (is_gdb_breakpoint): New function.
1341 (any_persistent_commands): Update command_list if
1342 is_gdb_breakpoint returns true.
1343 (set_breakpoint): Create breakpoints according to their types.
1344 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1345 (set_gdb_breakpoint_1): Likewise.
1346 (set_gdb_breakpoint): Likewise.
1347 (clear_breakpoint_conditions): Change parameter type to
1348 'struct gdb_breakpoint *'.
1349 (clear_breakpoint_commands): Likewise.
1350 (clear_breakpoint_conditions_and_commands): Likewise.
1351 (add_condition_to_breakpoint): Likewise.
1352 (add_breakpoint_condition): Likewise.
1353 (add_commands_to_breakpoint): Likewise.
1354 (check_breakpoints): Check other_breakpoint.
1355 (clone_one_breakpoint): Clone breakpopint according to its type.
1356 * mem-break.h (struct gdb_breakpoint): Declare.
1357 (set_gdb_breakpoint): Update declaration.
1358 (clear_breakpoint_conditions_and_commands): Likewise.
1359 (add_breakpoint_condition): Likewise.
1360 (add_breakpoint_commands): Likewise.
1361 * server.c (process_point_options): Change parameter type to
1362 'struct gdb_breakpoint *'.
1364 2016-07-21 Yao Qi <yao.qi@linaro.org>
1366 * mem-break.c (set_breakpoint_at): Rename it to ...
1367 (set_breakpoint_type_at): ... it.
1368 (set_breakpoint_at): Call set_breakpoint_type_at.
1369 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1370 * mem-break.h (set_breakpoint_at): Update comments.
1372 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1374 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1376 (nios2_store_gregset): Likewise.
1378 2016-07-01 Pedro Alves <palves@redhat.com>
1379 Antoine Tremblay <antoine.tremblay@ericsson.com>
1381 * linux-low.c: Change interface to take the target lwp_info
1382 pointer directly and return void. Handle detaching from a zombie
1384 (linux_detach_lwp_callback): New function.
1385 (linux_detach): Detach from the leader thread after detaching from
1388 2016-06-28 Yao Qi <yao.qi@linaro.org>
1390 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1391 for variable new_offset.
1392 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1393 (aarch64_ftrace_insn_reloc_cb): Likewise.
1394 (aarch64_ftrace_insn_reloc_tb): Likewise.
1395 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1396 PRIx64 instead of PRIx32.
1398 2016-06-28 Yao Qi <yao.qi@linaro.org>
1400 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1401 (the_low_target): Install arm_get_syscall_trapinfo.
1403 2016-06-28 Yao Qi <yao.qi@linaro.org>
1405 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1407 (the_low_target): Install aarch64_get_syscall_trapinfo.
1409 2016-06-28 Yao Qi <yao.qi@linaro.org>
1411 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1413 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1414 Remove parameter sysno.
1415 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1418 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1420 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1421 (s390_emit_ne_goto): Likewise.
1422 (s390_emit_lt_goto): Likewise.
1423 (s390_emit_le_goto): Likewise.
1424 (s390_emit_gt_goto): Likewise.
1425 (s390_emit_ge_goto): Likewise.
1426 (s390x_emit_eq_goto): Likewise.
1427 (s390x_emit_ne_goto): Likewise.
1428 (s390x_emit_lt_goto): Likewise.
1429 (s390x_emit_le_goto): Likewise.
1430 (s390x_emit_gt_goto): Likewise.
1431 (s390x_emit_ge_goto): Likewise.
1432 (s390_emit_ops_impl): Mark variable static.
1433 (s390x_emit_ops): Likewise.
1435 2016-06-17 Yao Qi <yao.qi@linaro.org>
1437 * linux-low.c (handle_extended_wait): Call
1438 uninsert_reinsert_breakpoints for the parent process. Remove
1439 reinsert breakpoints from the child process. Reinsert them to
1440 the parent process when vfork is done.
1441 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1442 (reinsert_reinsert_breakpoints): New function.
1443 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1444 (reinsert_reinsert_breakpoints): Declare.
1446 2016-06-17 Yao Qi <yao.qi@linaro.org>
1448 * linux-low.c (handle_extended_wait): If the parent is doing
1449 step-over, remove the reinsert breakpoints from the forked child.
1451 2016-06-17 Yao Qi <yao.qi@linaro.org>
1453 * linux-low.c (unsuspend_all_lwps): Declare.
1454 (linux_low_filter_event): If thread exited, call finish_step_over.
1455 If step-over is finished, unsuspend other threads.
1457 2016-06-17 Yao Qi <yao.qi@linaro.org>
1459 * linux-low.c (linux_resume_one_lwp_throw): Assert
1460 has_reinsert_breakpoints returns false.
1461 * mem-break.c (delete_disabled_breakpoints): Assert
1462 bp type isn't reinsert_breakpoint.
1464 2016-06-17 Yao Qi <yao.qi@linaro.org>
1466 * linux-low.c (maybe_hw_step): New function.
1467 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1468 (finish_step_over): Switch current_thread to lwp temporarily,
1469 and assert has_reinsert_breakpoints returns true.
1470 (proceed_one_lwp): Call maybe_hw_step.
1471 * mem-break.c (has_reinsert_breakpoints): New function.
1472 * mem-break.h (has_reinsert_breakpoints): Declare.
1474 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1476 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1478 2016-05-17 Yao Qi <yao.qi@linaro.org>
1480 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1481 instead of find_inferior.
1483 2016-05-05 Yao Qi <yao.qi@linaro.org>
1485 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1486 Initialize res to zero.
1488 2016-05-05 Yao Qi <yao.qi@linaro.org>
1490 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1493 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1495 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1496 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1497 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1499 2016-04-28 Par Olsson <par.olsson@windriver.com>
1500 Simon Marchi <simon.marchi@ericsson.com>
1502 * tracepoint.c (write_inferior_int8): New function.
1503 (cmd_qtenable_disable): Write enable flag using
1504 write_inferior_int8.
1506 2016-04-25 Yao Qi <yao.qi@linaro.org>
1508 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1509 (need_step_over_p): Return zero if the LWP has pending signals
1510 can be delivered on software single step target.
1512 2016-04-25 Yao Qi <yao.qi@linaro.org>
1514 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1515 return instead of error.
1517 2016-04-22 Yao Qi <yao.qi@linaro.org>
1519 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1522 2016-04-22 Yao Qi <yao.qi@linaro.org>
1524 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1525 signal when stepping over breakpoint with software single
1528 2016-04-21 Pedro Alves <palves@redhat.com>
1530 * linux-s390-low.c (s390_collect_ptrace_register)
1531 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1533 (s390_check_regset): Use void * instead of gdb_byte *.
1535 2016-04-20 Pedro Alves <palves@redhat.com>
1537 * configure: Renegerate.
1539 2016-04-20 Yao Qi <yao.qi@linaro.org>
1541 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1542 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1544 (arm_store_gregset): Likewise.
1546 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1548 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1549 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1550 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1551 (amd64-avx-mpx-linux.c): New rules.
1552 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1553 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1554 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1555 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1556 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1557 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1558 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1559 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1560 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1561 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1562 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1563 * linux-x86-low.c (x86_linux_read_description): Add case for
1564 X86_XSTATE_AVX_MPX_MASK.
1565 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1566 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1567 init_registers_i386_avx_mpx_linux.
1568 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1569 (initialize_low_tracepoint): Call
1570 init_registers_i386_avx_mpx_linux.
1571 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1572 (initialize_low_tracepoint): Call
1573 init_registers_amd64_avx_mpx_linux.
1574 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1575 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1576 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1579 2016-04-18 Pedro Alves <palves@redhat.com>
1581 * configure: Regenerate.
1583 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1585 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1586 (aarch64_emit_sub): Likewise.
1588 2016-04-12 Pedro Alves <palves@redhat.com>
1590 * utils.c (prepare_to_throw_exception): Delete.
1592 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1594 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1596 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1598 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1600 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1602 * linux-aarch64-ipa.c: Add <elf.h> include.
1603 * linux-ppc-ipa.c: Add <elf.h> include.
1604 * linux-s390-ipa.c: Add <elf.h> include.
1606 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1608 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1609 (get_raw_reg_ptr): Likewise.
1610 (get_trace_state_variable_value_ptr): Likewise.
1611 (set_trace_state_variable_value_ptr): Likewise.
1612 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1615 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1616 Marcin Kościelnicki <koriakin@0x04.net>
1619 * linux-ppc-low.c (emit_insns): New function.
1620 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1621 (ppc_emit_prologue): New function.
1622 (ppc_emit_epilogue): New function.
1623 (ppc_emit_add): New function.
1624 (ppc_emit_sub): New function.
1625 (ppc_emit_mul): New function.
1626 (ppc_emit_lsh): New function.
1627 (ppc_emit_rsh_signed): New function.
1628 (ppc_emit_rsh_unsigned): New function.
1629 (ppc_emit_ext): New function.
1630 (ppc_emit_zero_ext): New function.
1631 (ppc_emit_log_not): New function.
1632 (ppc_emit_bit_and): New function.
1633 (ppc_emit_bit_or): New function.
1634 (ppc_emit_bit_xor): New function.
1635 (ppc_emit_bit_not): New function.
1636 (ppc_emit_equal): New function.
1637 (ppc_emit_less_signed): New function.
1638 (ppc_emit_less_unsigned): New function.
1639 (ppc_emit_ref): New function.
1640 (ppc_emit_const): New function.
1641 (ppc_emit_reg): New function.
1642 (ppc_emit_pop): New function.
1643 (ppc_emit_stack_flush): New function.
1644 (ppc_emit_swap): New function.
1645 (ppc_emit_stack_adjust): New function.
1646 (ppc_emit_call): New function.
1647 (ppc_emit_int_call_1): New function.
1648 (ppc_emit_void_call_2): New function.
1649 (ppc_emit_if_goto): New function.
1650 (ppc_emit_goto): New function.
1651 (ppc_emit_eq_goto): New function.
1652 (ppc_emit_ne_goto): New function.
1653 (ppc_emit_lt_goto): New function.
1654 (ppc_emit_le_goto): New function.
1655 (ppc_emit_gt_goto): New function.
1656 (ppc_emit_ge_goto): New function.
1657 (ppc_write_goto_address): New function.
1658 (ppc_emit_ops_impl): New static variable.
1659 (ppc64v1_emit_prologue): New function.
1660 (ppc64v2_emit_prologue): New function.
1661 (ppc64_emit_epilogue): New function.
1662 (ppc64_emit_add): New function.
1663 (ppc64_emit_sub): New function.
1664 (ppc64_emit_mul): New function.
1665 (ppc64_emit_lsh): New function.
1666 (ppc64_emit_rsh_signed): New function.
1667 (ppc64_emit_rsh_unsigned): New function.
1668 (ppc64_emit_ext): New function.
1669 (ppc64_emit_zero_ext): New function.
1670 (ppc64_emit_log_not): New function.
1671 (ppc64_emit_bit_and): New function.
1672 (ppc64_emit_bit_or): New function.
1673 (ppc64_emit_bit_xor): New function.
1674 (ppc64_emit_bit_not): New function.
1675 (ppc64_emit_equal): New function.
1676 (ppc64_emit_less_signed): New function.
1677 (ppc64_emit_less_unsigned): New function.
1678 (ppc64_emit_ref): New function.
1679 (ppc64_emit_const): New function.
1680 (ppc64v1_emit_reg): New function.
1681 (ppc64v2_emit_reg): New function.
1682 (ppc64_emit_pop): New function.
1683 (ppc64_emit_stack_flush): New function.
1684 (ppc64_emit_swap): New function.
1685 (ppc64v1_emit_call): New function.
1686 (ppc64v2_emit_call): New function.
1687 (ppc64v1_emit_int_call_1): New function.
1688 (ppc64v2_emit_int_call_1): New function.
1689 (ppc64v1_emit_void_call_2): New function.
1690 (ppc64v2_emit_void_call_2): New function.
1691 (ppc64_emit_if_goto): New function.
1692 (ppc64_emit_eq_goto): New function.
1693 (ppc64_emit_ne_goto): New function.
1694 (ppc64_emit_lt_goto): New function.
1695 (ppc64_emit_le_goto): New function.
1696 (ppc64_emit_gt_goto): New function.
1697 (ppc64_emit_ge_goto): New function.
1698 (ppc64v1_emit_ops_impl): New static variable.
1699 (ppc64v2_emit_ops_impl): New static variable.
1700 (ppc_emit_ops): New function.
1701 (linux_low_target): Wire in ppc_emit_ops.
1703 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1704 Marcin Kościelnicki <koriakin@0x04.net>
1707 * Makefile.in: Add powerpc-*-ipa.o
1708 * configure.srv: Add ipa_obj for powerpc*-linux.
1709 * linux-ppc-ipa.c: New file.
1710 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1712 (PPC_FIELD): New macro.
1713 (PPC_SEXT): New macro.
1714 (PPC_OP6): New macro.
1715 (PPC_BO): New macro.
1716 (PPC_LI): New macro.
1717 (PPC_BD): New macro.
1718 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1719 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1720 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1721 (ppc_get_thread_area): New function.
1722 (is_elfv2_inferior): New function.
1723 (gen_ds_form): New function.
1724 (GEN_STD): New macro.
1725 (GEN_STDU): New macro.
1726 (GEN_LD): New macro.
1727 (GEN_LDU): New macro.
1728 (gen_d_form): New function.
1729 (GEN_ADDI): New macro.
1730 (GEN_ADDIS): New macro.
1731 (GEN_LI): New macro.
1732 (GEN_LIS): New macro.
1733 (GEN_ORI): New macro.
1734 (GEN_ORIS): New macro.
1735 (GEN_LWZ): New macro.
1736 (GEN_STW): New macro.
1737 (GEN_STWU): New macro.
1738 (gen_xfx_form): New function.
1739 (GEN_MFSPR): New macro.
1740 (GEN_MTSPR): New macro.
1741 (GEN_MFCR): New macro.
1742 (GEN_MTCR): New macro.
1743 (GEN_SYNC): New macro.
1744 (GEN_LWSYNC): New macro.
1745 (gen_x_form): New function.
1746 (GEN_OR): New macro.
1747 (GEN_MR): New macro.
1748 (GEN_LWARX): New macro.
1749 (GEN_STWCX): New macro.
1750 (GEN_CMPW): New macro.
1751 (gen_md_form): New function.
1752 (GEN_RLDICL): New macro.
1753 (GEN_RLDICR): New macro.
1754 (gen_i_form): New function.
1756 (GEN_BL): New macro.
1757 (gen_b_form): New function.
1758 (GEN_BNE): New macro.
1759 (GEN_LOAD): New macro.
1760 (GEN_STORE): New macro.
1761 (gen_limm): New function.
1762 (gen_atomic_xchg): New function.
1763 (gen_call): New function.
1764 (ppc_relocate_instruction): New function.
1765 (ppc_install_fast_tracepoint_jump_pad): New function.
1766 (ppc_get_min_fast_tracepoint_insn_len): New function.
1767 (ppc_get_ipa_tdesc_idx): New function.
1768 (the_low_target): Wire in the new functions.
1769 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1771 * linux-ppc-tdesc.h: New file.
1773 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1775 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1776 (alloc_jump_pad_buffer): New function.
1777 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1778 (alloc_jump_pad_buffer): New function.
1779 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1780 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1781 (alloc_jump_pad_buffer): New function.
1782 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1783 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1784 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1785 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1787 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1789 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1790 * linux-amd64-ipa.c: Likewise.
1791 * linux-i386-ipa.c: Likewise.
1792 * linux-s390-ipa.c: Likewise.
1793 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1794 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1795 set_trace_state_variable_value_ptr.
1796 (struct ipa_sym_addresses): Likewise.
1797 (symbol_list): Likewise.
1798 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1799 accessing gdb_collect directly.
1800 (gdb_collect_ptr_type): New typedef.
1801 (get_raw_reg_ptr_type): New typedef.
1802 (get_trace_state_variable_value_ptr_type): New typedef.
1803 (set_trace_state_variable_value_ptr_type): New typedef.
1804 (gdb_collect_ptr): New global.
1805 (get_raw_reg_ptr): New global.
1806 (get_trace_state_variable_value_ptr): New global.
1807 (set_trace_state_variable_value_ptr): New global.
1808 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1809 accessing get_raw_reg directly.
1810 (get_get_tsv_func_addr): Likewise for
1811 get_trace_state_variable_value_ptr.
1812 (get_set_tsv_func_addr): Likewise for
1813 set_trace_state_variable_value_ptr.
1814 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1816 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1818 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1820 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1822 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1824 (relocate_instruction): Remove own_buf.
1825 * server.c (own_buf): Make global.
1826 (handle_v_requests): Make global.
1827 * server.h (own_buf): New declaration.
1828 (handle_v_requests): New prototype.
1830 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1833 * linux-s390-low.c (add_insns): New function.
1834 (s390_emit_prologue): New function.
1835 (s390_emit_epilogue): New function.
1836 (s390_emit_add): New function.
1837 (s390_emit_sub): New function.
1838 (s390_emit_mul): New function.
1839 (s390_emit_lsh): New function.
1840 (s390_emit_rsh_signed): New function.
1841 (s390_emit_rsh_unsigned): New function.
1842 (s390_emit_ext): New function.
1843 (s390_emit_log_not): New function.
1844 (s390_emit_bit_and): New function.
1845 (s390_emit_bit_or): New function.
1846 (s390_emit_bit_xor): New function.
1847 (s390_emit_bit_not): New function.
1848 (s390_emit_equal): New function.
1849 (s390_emit_less_signed): New function.
1850 (s390_emit_less_unsigned): New function.
1851 (s390_emit_ref): New function.
1852 (s390_emit_if_goto): New function.
1853 (s390_emit_goto): New function.
1854 (s390_write_goto_address): New function.
1855 (s390_emit_litpool): New function.
1856 (s390_emit_const): New function.
1857 (s390_emit_call): New function.
1858 (s390_emit_reg): New function.
1859 (s390_emit_pop): New function.
1860 (s390_emit_stack_flush): New function.
1861 (s390_emit_zero_ext): New function.
1862 (s390_emit_swap): New function.
1863 (s390_emit_stack_adjust): New function.
1864 (s390_emit_set_r2): New function.
1865 (s390_emit_int_call_1): New function.
1866 (s390_emit_void_call_2): New function.
1867 (s390_emit_eq_goto): New function.
1868 (s390_emit_ne_goto): New function.
1869 (s390_emit_lt_goto): New function.
1870 (s390_emit_le_goto): New function.
1871 (s390_emit_gt_goto): New function.
1872 (s390_emit_ge_goto): New function.
1873 (s390x_emit_prologue): New function.
1874 (s390x_emit_epilogue): New function.
1875 (s390x_emit_add): New function.
1876 (s390x_emit_sub): New function.
1877 (s390x_emit_mul): New function.
1878 (s390x_emit_lsh): New function.
1879 (s390x_emit_rsh_signed): New function.
1880 (s390x_emit_rsh_unsigned): New function.
1881 (s390x_emit_ext): New function.
1882 (s390x_emit_log_not): New function.
1883 (s390x_emit_bit_and): New function.
1884 (s390x_emit_bit_or): New function.
1885 (s390x_emit_bit_xor): New function.
1886 (s390x_emit_bit_not): New function.
1887 (s390x_emit_equal): New function.
1888 (s390x_emit_less_signed): New function.
1889 (s390x_emit_less_unsigned): New function.
1890 (s390x_emit_ref): New function.
1891 (s390x_emit_if_goto): New function.
1892 (s390x_emit_const): New function.
1893 (s390x_emit_call): New function.
1894 (s390x_emit_reg): New function.
1895 (s390x_emit_pop): New function.
1896 (s390x_emit_stack_flush): New function.
1897 (s390x_emit_zero_ext): New function.
1898 (s390x_emit_swap): New function.
1899 (s390x_emit_stack_adjust): New function.
1900 (s390x_emit_int_call_1): New function.
1901 (s390x_emit_void_call_2): New function.
1902 (s390x_emit_eq_goto): New function.
1903 (s390x_emit_ne_goto): New function.
1904 (s390x_emit_lt_goto): New function.
1905 (s390x_emit_le_goto): New function.
1906 (s390x_emit_gt_goto): New function.
1907 (s390x_emit_ge_goto): New function.
1908 (s390_emit_ops): New function.
1909 (struct linux_target_ops): Fill in emit_ops hook.
1911 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1914 * Makefile.in: Add s390 IPA files.
1915 * configure.srv: Build IPA for s390.
1916 * linux-s390-ipa.c: New file.
1917 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1918 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1919 (tdesc_s390_linux32): Likewise.
1920 (init_registers_s390_linux32v1): Likewise.
1921 (tdesc_s390_linux32v1): Likewise.
1922 (init_registers_s390_linux32v2): Likewise.
1923 (tdesc_s390_linux32v2): Likewise.
1924 (init_registers_s390_linux64): Likewise.
1925 (tdesc_s390_linux64): Likewise.
1926 (init_registers_s390_linux64v1): Likewise.
1927 (tdesc_s390_linux64v1): Likewise.
1928 (init_registers_s390_linux64v2): Likewise.
1929 (tdesc_s390_linux64v2): Likewise.
1930 (init_registers_s390_te_linux64): Likewise.
1931 (tdesc_s390_te_linux64): Likewise.
1932 (init_registers_s390_vx_linux64): Likewise.
1933 (tdesc_s390_vx_linux64): Likewise.
1934 (init_registers_s390_tevx_linux64): Likewise.
1935 (tdesc_s390_tevx_linux64): Likewise.
1936 (init_registers_s390x_linux64): Likewise.
1937 (tdesc_s390x_linux64): Likewise.
1938 (init_registers_s390x_linux64v1): Likewise.
1939 (tdesc_s390x_linux64v1): Likewise.
1940 (init_registers_s390x_linux64v2): Likewise.
1941 (tdesc_s390x_linux64v2): Likewise.
1942 (init_registers_s390x_te_linux64): Likewise.
1943 (tdesc_s390x_te_linux64): Likewise.
1944 (init_registers_s390x_vx_linux64): Likewise.
1945 (tdesc_s390x_vx_linux64): Likewise.
1946 (init_registers_s390x_tevx_linux64): Likewise.
1947 (tdesc_s390x_tevx_linux64): Likewise.
1948 (have_hwcap_s390_vx): New static variable.
1949 (s390_arch_setup): Fill have_hwcap_s390_vx.
1950 (s390_get_thread_area): New function.
1951 (s390_ft_entry_gpr_esa): New const.
1952 (s390_ft_entry_gpr_zarch): New const.
1953 (s390_ft_entry_misc): New const.
1954 (s390_ft_entry_fr): New const.
1955 (s390_ft_entry_vr): New const.
1956 (s390_ft_main_31): New const.
1957 (s390_ft_main_64): New const.
1958 (s390_ft_exit_fr): New const.
1959 (s390_ft_exit_vr): New const.
1960 (s390_ft_exit_misc): New const.
1961 (s390_ft_exit_gpr_esa): New const.
1962 (s390_ft_exit_gpr_zarch): New const.
1963 (append_insns): New function.
1964 (s390_relocate_instruction): New function.
1965 (s390_install_fast_tracepoint_jump_pad): New function.
1966 (s390_get_min_fast_tracepoint_insn_len): New function.
1967 (s390_get_ipa_tdesc_idx): New function.
1968 (struct linux_target_ops): Wire in the above functions.
1969 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1970 * linux-s390-tdesc.h: New file.
1972 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1974 * linux-s390-low.c (s390_supports_tracepoints): New function.
1975 (struct linux_target_ops): Fill supports_tracepoints hook.
1977 2016-03-18 Yao Qi <yao.qi@linaro.org>
1979 * linux-low.c (lwp_signal_can_be_delivered): New function.
1980 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1982 2016-03-18 Yao Qi <yao.qi@linaro.org>
1984 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1985 0 if signal is enqueued. Remove 'signal' from one debugging
1986 message. Move one debugging message to some lines below.
1987 Remove code setting 'signal' to 0.
1989 2016-03-18 Yao Qi <yao.qi@linaro.org>
1991 * linux-low.c (linux_low_filter_event): Remove redundant
1992 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1994 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1996 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1997 (struct linux_target_ops): Wire in the above.
1999 2016-03-03 Yao Qi <yao.qi@linaro.org>
2001 * linux-low.c: Update comments to start_step_over.
2003 2016-03-03 Yao Qi <yao.qi@linaro.org>
2006 * linux-low.c (handle_extended_wait): Set child suspended
2007 if event_lwp->bp_reinsert isn't zero.
2009 2016-03-02 Yao Qi <yao.qi@linaro.org>
2011 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2012 enqueue_pending_signal.
2014 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2016 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2019 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2021 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2022 (s390_regmap_3264) [!__s390x__]: New global.
2023 (s390_collect_ptrace_register): Skip map entries containing -1.
2024 (s390_supply_ptrace_register): Ditto.
2025 (s390_fill_gprs_high): New function.
2026 (s390_store_gprs_high): New function.
2027 (s390_regsets): Add NT_S390_HIGH_GPRS.
2028 (s390_get_hwcap): Enable on 31-bit.
2029 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2030 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2031 Detect NT_S390_HIGH_GPRS.
2032 (s390_usrregs_info_3264): Enable on 31-bit.
2033 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2034 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2036 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2039 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2040 * configure.srv: Ditto.
2041 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2042 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2043 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2044 (init_registers_amd64_linux): Remove prototype.
2045 (tdesc_amd64_linux): Remove declaration.
2046 (get_ipa_tdesc): New function.
2047 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2048 initialize remaining tdescs.
2049 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2050 (init_registers_i386_linux): Remove prototype.
2051 (tdesc_i386_linux): Remove declaration.
2052 (get_ipa_tdesc): New function.
2053 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2054 initialize remaining tdescs.
2055 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2056 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2057 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2058 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2059 (x86_get_ipa_tdesc_idx): New function.
2060 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2061 * linux-x86-tdesc.h: New file.
2062 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2063 (target_get_ipa_tdesc_idx): New macro.
2064 * tracepoint.c (ipa_tdesc_idx): New macro.
2065 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2066 (symbol_list): Add ipa_tdesc_idx.
2067 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2068 (ipa_tdesc): Remove.
2069 (ipa_tdesc_idx): New variable.
2070 (get_context_regcache): Use get_ipa_tdesc.
2071 (gdb_collect): Ditto.
2073 * tracepoint.h (get_ipa_tdesc): New prototype.
2074 (ipa_tdesc): Remove.
2076 2016-02-24 Pedro Alves <palves@redhat.com>
2078 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2079 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2080 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2081 Factor out common code between the USE_SIGTRAP_SIGINFO and
2082 !USE_SIGTRAP_SIGINFO blocks.
2083 (linux_low_filter_event): Call save_stop_reason instead of
2084 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2086 (linux_wait_1): Update comments.
2088 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2090 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2091 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2092 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2093 ppc_insert_point, ppc_remove_point.
2095 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2097 * linux-s390-low.c (s390_supports_z_point_type): New function.
2098 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2100 2016-02-16 Yao Qi <yao.qi@linaro.org>
2102 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2103 PC. Get pc from regcache_read_pc.
2105 2016-02-12 Yao Qi <yao.qi@linaro.org>
2107 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2108 or linux_get_pc_32bit.
2109 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2111 2016-02-12 Yao Qi <yao.qi@linaro.org>
2113 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2114 arm_linux_get_next_pcs_fixup.
2116 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2118 * tracepoint.c (x_tracepoint_action_download): Change
2119 write_inferior_data_ptr to write_inferior_data_pointer.
2120 (cmd_qtstart): Likewise.
2121 (write_inferior_data_ptr): Remove.
2122 (download_agent_expr): Change write_inferior_data_ptr to
2123 write_inferior_data_pointer.
2124 (download_tracepoint_1): Likewise.
2125 (download_tracepoint): Likewise.
2126 (download_trace_state_variables): Likewise.
2128 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2129 Marcin Kościelnicki <koriakin@0x04.net>
2131 * tracepoint.c (struct tracepoint_action_ops): Remove.
2132 (struct tracepoint_action): Remove ops.
2133 (m_tracepoint_action_download, r_tracepoint_action_download)
2134 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2135 size and offset accordingly.
2136 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2137 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2138 (tracepoint_action_send, tracepoint_action_download): New functions.
2139 Helpers for trace action handlers.
2140 (add_tracepoint_action): Remove setup actions ops.
2141 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2143 2016-02-10 Yao Qi <yao.qi@linaro.org>
2145 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2147 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2149 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2151 * configure: Regenerate.
2153 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2155 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2156 void * to gdb_byte *.
2157 * linux-low.c (siginfo_fixup): Likewise.
2158 (linux_xfer_siginfo): Likewise.
2159 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2161 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2163 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2165 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2167 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2169 * linux-x86-low.c [__x86_64__]: Include
2170 "nat/amd64-linux-siginfo.h".
2171 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2172 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2173 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2174 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2175 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2176 (cpt_si_fd, si_timerid, si_overrun): Move from
2177 nat/amd64-linux-siginfo.c.
2178 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2180 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2182 * server.c (skip_to_semicolon): Remove.
2183 (process_point_options): Use strchrnul instead of
2186 2016-01-26 Yao Qi <yao.qi@linaro.org>
2188 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2189 * linux-low.c (install_software_single_step_breakpoints): Don't
2190 call regcache_read_pc.
2191 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2194 2016-01-26 Yao Qi <yao.qi@linaro.org>
2196 * linux-low.c (install_software_single_step_breakpoints): Call
2197 regcache_read_pc instead of get_pc.
2199 2016-01-26 Yao Qi <yao.qi@linaro.org>
2201 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2202 (unblock_async_io): Rename to ...
2203 (block_unblock_async_io): ... it. New function.
2204 (enable_async_io): Don't install SIGIO handler. Unblock it
2206 (disable_async_io): Don't ignore SIGIO. Block it instead.
2207 (initialize_async_io): Install SIGIO handler. Don't call
2210 2016-01-26 Yao Qi <yao.qi@linaro.org>
2212 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2213 first character is '\003', call *the_target->request_interrupt.
2215 2016-01-25 Yao Qi <yao.qi@linaro.org>
2217 * remote-utils.c (new_thread_notify): Remove.
2218 (dead_thread_notify): Likewise.
2219 * remote-utils.h (new_thread_notify): Remove declaration.
2220 (dead_thread_notify): Likewise.
2222 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2224 * gdb.trace/pending.exp: Fix expected message on continue.
2226 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2228 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2229 it works properly on big-endian machines where sizeof (CORE_ADDR)
2232 2016-01-21 Pedro Alves <palves@redhat.com>
2234 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2235 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2236 * configure: Regenerate.
2238 2016-01-21 Yao Qi <yao.qi@linaro.org>
2240 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2241 is_thumb and set it according to CPSR saved on the stack.
2242 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2243 arm_sigreturn_next_pc.
2245 2016-01-18 Yao Qi <yao.qi@linaro.org>
2247 * linux-low.c (linux_set_pc_64bit): New function.
2248 (linux_get_pc_64bit): New function.
2249 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2251 * linux-sparc-low.c (debug_threads): Remove declaration.
2252 (sparc_get_pc): Remove.
2253 (the_low_target): Use linux_get_pc_64bit instead of
2255 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2256 (the_low_target): Use linux_get_pc_64bit and
2259 2016-01-18 Yao Qi <yao.qi@linaro.org>
2261 * linux-arm-low.c (debug_threads): Remove declaration.
2262 (arm_get_pc, arm_set_pc): Remove.
2263 (the_low_target): Use linux_get_pc_32bit and
2265 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2266 (the_low_target): Use linux_get_pc_32bit and
2268 * linux-cris-low.c (debug_threads): Remove declaration.
2269 (cris_get_pc, cris_set_pc,): Remove.
2270 (the_low_target): Use linux_get_pc_32bit and
2272 * linux-crisv32-low.c (debug_threads): Remove declaration.
2273 (cris_get_pc, cris_set_pc): Remove.
2274 (the_low_target): Use linux_get_pc_32bit and
2276 * linux-low.c: Include inttypes.h.
2277 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2278 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2279 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2280 (the_low_target): Use linux_get_pc_32bit and
2282 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2283 (the_low_target): Use linux_get_pc_32bit and
2285 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2286 (the_low_target): Use linux_get_pc_32bit and
2288 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2289 (the_low_target): Use linux_get_pc_32bit and
2291 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2292 (the_low_target): Use linux_get_pc_32bit and
2295 2016-01-18 Gary Benson <gbenson@redhat.com>
2297 * configure.ac (AC_FUNC_FORK): New check.
2298 * config.in: Regenerate.
2299 * configure: Likewise.
2301 2016-01-14 Yao Qi <yao.qi@linaro.org>
2303 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2304 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2305 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2306 arm_get_next_pcs_ctor.
2308 2016-01-12 Josh Stone <jistone@redhat.com>
2309 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2311 * inferiors.h: Include "gdb_vecs.h".
2312 (struct process_info): Add syscalls_to_catch.
2313 * inferiors.c (remove_process): Free syscalls_to_catch.
2314 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2315 syscall_return stops.
2316 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2317 * server.c (handle_general_set): Handle QCatchSyscalls.
2318 (handle_query): Report support for QCatchSyscalls.
2319 * target.h (struct target_ops): Add supports_catch_syscall.
2320 (target_supports_catch_syscall): New macro.
2321 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2322 (struct lwp_info): Add syscall_state.
2323 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2324 Maintain syscall_state and syscalls_to_catch across exec.
2325 (get_syscall_trapinfo): New function, proxy to the_low_target.
2326 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2327 (linux_low_filter_event): Toggle syscall_state entry/return for
2328 syscall traps, and set it ignored for all others.
2329 (gdb_catching_syscalls_p): New function.
2330 (gdb_catch_this_syscall_p): New function.
2331 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2332 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2333 (linux_supports_catch_syscall): New function.
2334 (linux_target_ops): Install it.
2335 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2336 (the_low_target): Install it.
2338 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2340 * acinclude.m4: Include new ../warning.m4 file.
2341 * configure: Regenerated.
2342 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2344 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2346 * ax.c (is_goto_target): Mark static.
2347 * linux-low.c (register_addr): Likewise.
2348 (linux_fetch_registers, linux_store_registers): Likewise.
2349 * mem-break.c (any_persistent_commands): Fix old prototype.
2350 (add_commands_to_breakpoint): Mark static.
2351 * regcache.c (find_register_by_name): Delete unused func.
2352 * remote-utils.c (hex_or_minus_one): Mark static.
2353 * server.c (monitor_show_help): Mark static.
2354 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2355 handle_v_requests): Likewise.
2357 2016-01-12 Pedro Alves <palves@redhat.com>
2359 Remove use of the registered trademark symbol throughout.
2361 2016-01-08 Yao Qi <yao.qi@linaro.org>
2363 * remote-utils.c (getpkt): If c is '\003', call target hook
2366 2016-01-06 Yao Qi <yao.qi@linaro.org>
2368 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2369 linux-aarch32-low.c.
2370 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2371 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2372 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2373 (thumb2_breakpoint): Declare.
2374 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2375 linux-aarch32-low.h.
2376 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2377 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2378 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2380 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2382 * gdbreplay.c (gdbreplay_version): Change copyright year in
2384 * server.c (gdbserver_version): Likewise.
2386 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2388 * server.c (crc32_table): Delete.
2389 (crc32): Use libiberty's xcrc32 function.
2391 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2393 * lynx-low.c (lynx_delete_thread_callback): New function.
2394 (lynx_mourn): Properly delete our process and all of its
2395 threads. Remove call to clear_inferiors.
2397 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2399 * target.c (thread_search_callback): Add check that
2400 the thread_stopped target callback is not NULL before
2403 2015-12-21 Yao Qi <yao.qi@linaro.org>
2405 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2408 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2410 * server.c (handle_query): Call target_supports_software_single_step.
2412 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2414 * linux-low.c (single_step): New function.
2415 (linux_resume_one_lwp_throw): Call single_step.
2416 (start_step_over): Likewise.
2418 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2420 * Makefile.in (SFILES): Append arch/arm-linux.c,
2421 arch/arm-get-next-pcs.c.
2422 (arm-linux.o): New rule.
2423 (arm-get-next-pcs.o): New rule.
2424 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2426 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2427 to linux-aarch32-low.c.
2428 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2429 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2430 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2431 (thumb2_breakpoint_len): Likewise.
2432 (arm_is_thumb_mode): Make non-static.
2433 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2434 from linux-aarch32-low.c.
2435 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2436 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2437 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2438 (thumb2_breakpoint_len): Likewise.
2439 (arm_is_thumb_mode): New declaration.
2440 * linux-arm-low.c: Include arch/arm-linux.h
2441 aarch/arm-get-next-pcs.h, sys/syscall.h.
2442 (get_next_pcs_ops): New struct.
2443 (get_next_pcs_addr_bits_remove): New function.
2444 (get_next_pcs_is_thumb): New function.
2445 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2446 (arm_sigreturn_next_pc): Likewise.
2447 (get_next_pcs_syscall_next_pc): Likewise.
2448 (arm_gdbserver_get_next_pcs): Likewise.
2449 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2451 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2452 * server.h: Include gdb_vecs.h.
2454 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2456 * Makefile.in (SFILES): Append common/common-regcache.c.
2457 (OBS): Append common-regcache.o.
2458 (common-regcache.o): New rule.
2459 * regcache.c (init_register_cache): Initialize cache to
2461 (regcache_raw_read_unsigned): New function.
2462 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2463 register_status enum.
2465 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2467 * linux-aarch64-low.c (the_low_targets): Rename
2468 breakpoint_reinsert_addr to get_next_pcs.
2469 * linux-arm-low.c (the_low_targets): Likewise.
2470 * linux-bfin-low.c (the_low_targets): Likewise.
2471 * linux-cris-low.c (the_low_targets): Likewise.
2472 * linux-crisv32-low.c (the_low_targets): Likewise.
2473 * linux-low.c (can_software_single_step): Likewise.
2474 (install_software_single_step_breakpoints): New function.
2475 (start_step_over): Use install_software_single_step_breakpoints.
2476 * linux-low.h: New CORE_ADDR vector.
2477 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2479 * linux-mips-low.c (the_low_targets): Likewise.
2480 * linux-nios2-low.c (the_low_targets): Likewise.
2481 * linux-sparc-low.c (the_low_targets): Likewise.
2483 2015-12-17 Pedro Alves <palves@redhat.com>
2485 * linux-low.c (linux_kill_one_lwp): Remove references to
2487 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2489 (linux_init_signals): Delete.
2490 (initialize_low): Adjust.
2491 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2493 2015-12-16 Pedro Alves <palves@redhat.com>
2495 * configure.ac (compiler warning flags): When testing a
2496 -Wno-foo option, check whether -Wfoo works instead.
2497 * configure: Regenerate.
2499 2015-12-11 Don Breazeal <donb@codesourcery.com>
2501 * server.c (process_serial_event): Don't exit from gdbserver
2502 in remote mode if there are still active inferiors.
2504 2015-12-11 Yao Qi <yao.qi@linaro.org>
2506 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2507 arm_breakpoint_at if the process is 32-bit.
2509 2015-12-11 Yao Qi <yao.qi@linaro.org>
2511 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2514 2015-12-07 Yao Qi <yao.qi@linaro.org>
2516 * configure.srv: Append arm.o to srv_tgtobj for
2517 aarch64*-*-linux* target.
2518 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2519 from linux-arm-low.c.
2520 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2521 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2522 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2523 (thumb2_breakpoint_len): Likewise.
2524 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2525 (arm_breakpoint_kinds): Likewise.
2526 (arm_breakpoint_kind_from_pc): Likewise.
2527 (arm_sw_breakpoint_from_kind): Likewise.
2528 (arm_breakpoint_kind_from_current_state): Likewise.
2529 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2530 (arm_sw_breakpoint_from_kind): Declare.
2531 (arm_breakpoint_kind_from_current_state): Declare.
2532 (arm_breakpoint_at): Declare.
2533 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2534 arm_sw_breakpoint_from_kind if process is 32-bit.
2535 (aarch64_breakpoint_kind_from_pc): New function.
2536 (aarch64_breakpoint_kind_from_current_state): New function.
2537 (the_low_target): Initialize fields breakpoint_kind_from_pc
2538 and breakpoint_kind_from_current_state.
2539 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2540 linux-aarch32-low.c.
2541 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2542 (arm_breakpoint, arm_breakpoint_len): Likewise.
2543 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2544 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2545 (arm_is_thumb_mode): Likewise.
2546 (arm_breakpoint_at): Likewise.
2547 (arm_breakpoint_kind_from_pc): Likewise.
2548 (arm_sw_breakpoint_from_kind): Likewise.
2549 (arm_breakpoint_kind_from_current_state): Likewise.
2552 2015-08-04 Yao Qi <yao.qi@linaro.org>
2554 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2555 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2556 * server.c (extended_protocol): Remove "static".
2557 * server.h (extended_protocol): Declare it.
2559 2015-12-04 Josh Stone <jistone@redhat.com>
2561 * target.h (struct target_ops) <arch_setup>: Rename to ...
2562 (struct target_ops) <post_create_inferior>: ... this.
2563 (target_arch_setup): Rename to ...
2564 (target_post_create_inferior): ... this, calling post_create_inferior.
2565 * server.c (start_inferior): Update target_arch_setup calls to
2566 target_post_create_inferior.
2567 * linux-low.c (linux_low_ptrace_options): Forward declare.
2568 (linux_arch_setup): Update its comment for general use.
2569 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2570 (struct linux_target_ops): Use linux_post_create_inferior.
2571 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2572 to post_create_inferior.
2573 * nto-low.c (struct nto_target_ops): Likewise.
2574 * spu-low.c (struct spu_target_ops): Likewise.
2575 * win32-low.c (struct win32_target_ops): Likewise.
2577 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2579 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2581 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2583 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2584 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2585 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2586 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2587 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2588 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2589 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2590 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2591 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2592 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2593 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2594 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2596 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2598 * linux-low.c (linux_look_up_symbols): Don't call
2599 linux_supports_traceclone.
2600 * linux-low.h (thread_db_init): Remove use_events argument.
2601 * thread-db.c (thread_db_use_event): Remove global variable.
2602 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2603 (struct thread_db) <td_create_bp>: Remove field.
2604 (thread_db_create_event): Remove function.
2605 (thread_db_enable_reporting): Likewise.
2606 (find_one_thread): Don't check for thread_db_use_events.
2607 (attach_thread): Likewise.
2608 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2609 (try_thread_db_load_1): Don't check for thread_db_use_events.
2610 (thread_db_init): Remove use_events argument and thread events
2612 (remove_thread_event_breakpoints): Remove function.
2613 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2615 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2617 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2620 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2621 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2622 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2623 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2625 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2627 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2628 * linux-low.c (can_hardware_single_step): Use
2629 supports_hardware_single_step.
2630 (can_software_single_step): New function.
2631 (start_step_over): Call can_software_single_step.
2632 (linux_supports_hardware_single_step): New function.
2633 (struct target_ops) <supports_software_single_step>: Initialize.
2634 * linux-low.h (struct linux_target_ops)
2635 <supports_hardware_single_step>: Initialize.
2636 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2637 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2638 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2639 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2640 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2641 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2642 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2643 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2644 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2645 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2647 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2648 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2650 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2652 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2654 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2655 * target.h (struct target_ops): <supports_software_single_step>:
2657 (target_supports_software_single_step): New macro.
2659 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2661 * linux-low.c (linux_wait_1): Fix pc advance condition.
2662 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2663 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2665 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2667 * linux-arm-low.c (arm_is_thumb_mode): New function.
2668 (arm_breakpoint_at): Use arm_is_thumb_mode.
2669 (arm_breakpoint_kind_from_current_state): New function.
2670 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2672 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2673 (linux_breakpoint_kind_from_current_state): New function.
2674 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2675 * linux-low.h (struct linux_target_ops)
2676 <breakpoint_kind_from_current_state>: New field.
2677 * target.h (struct target_ops): Likewise.
2678 (target_breakpoint_kind_from_current_state): New macro.
2680 2015-11-30 Pedro Alves <palves@redhat.com>
2682 * linux-low.c (linux_resume): Wake up the event loop before
2685 2015-11-30 Pedro Alves <palves@redhat.com>
2687 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2689 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2691 * target.c (struct thread_search): New structure.
2692 (thread_search_callback): New function.
2693 (prev_general_thread): New global.
2694 (prepare_to_access_memory, done_accessing_memory): New functions.
2695 * target.h (prepare_to_access_memory, done_accessing_memory):
2696 Replace macros with function declarations.
2698 2015-11-30 Pedro Alves <palves@redhat.com>
2701 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2702 report TARGET_WAITKIND_NO_RESUMED.
2703 * remote-utils.c (prepare_resume_reply): Handle
2704 TARGET_WAITKIND_NO_RESUMED.
2705 * server.c (report_no_resumed): New global.
2706 (handle_query) <qSupported>: Handle "no-resumed+". Report
2707 "no-resumed+" support.
2708 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2709 return error if the client doesn't support no-resumed events.
2710 (push_stop_notification): New function.
2711 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2712 events if the client supports them.
2714 2015-11-30 Pedro Alves <palves@redhat.com>
2716 * linux-low.c (thread_still_has_status_pending_p): Don't check
2718 (lwp_resumed): New function.
2719 (status_pending_p_callback): Return early if the LWP is not
2720 supposed to be resumed.
2722 2015-11-30 Pedro Alves <palves@redhat.com>
2724 * linux-low.c (handle_extended_wait): Assert that the LWP's
2725 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2726 thread create events, leave the new child's status pending.
2727 (linux_low_filter_event): If GDB wants to hear about thread exit
2728 events, leave the LWP marked dead and don't delete it.
2729 (linux_wait_for_event_filtered): Don't check for thread exit.
2730 (filter_exit_event): New function.
2731 (linux_wait_1): Use it, when returning an exit event.
2732 (linux_resume_one_lwp_throw): Assert that the LWP's
2733 waitstatus is TARGET_WAITKIND_IGNORE.
2734 * remote-utils.c (prepare_resume_reply): Handle
2735 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2736 * server.c (report_thread_events): New global.
2737 (handle_general_set): Handle QThreadEvents.
2738 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2739 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2740 TARGET_WAITKIND_THREAD_EXITED.
2741 * server.h (report_thread_events): Declare.
2743 2015-11-30 Pedro Alves <palves@redhat.com>
2745 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2746 the thread's last_resume_kind was resume_stop.
2748 2015-11-30 Pedro Alves <palves@redhat.com>
2750 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2753 2015-11-30 Pedro Alves <palves@redhat.com>
2755 * server.c (handle_v_requests): Handle vCtrlC.
2757 2015-11-30 Pedro Alves <palves@redhat.com>
2759 * gdbthread.h (find_any_thread_of_pid): Declare.
2760 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2762 * server.c (handle_query): If current_thread is NULL, look for
2763 another thread of the selected process.
2765 2015-11-26 Daniel Colascione <dancol@dancol.org>
2766 Simon Marchi <simon.marchi@ericsson.com>
2768 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2769 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2771 * target.h (struct target_ops) <thread_name>: New field.
2772 (target_thread_name): New macro.
2774 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2776 * regcache.h (regcache_invalidate_pid): Add declaration.
2777 * regcache.c (regcache_invalidate_pid): New function, extracted
2778 from regcache_invalidate.
2779 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2780 Add trivial documentation comment.
2781 * lynx-low.c: Use regcache_invalidate_pid instead of
2782 regcache_invalidate.
2784 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2786 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2787 and Elf64_auxv_t if the target is Android.
2789 2015-11-22 Doug Evans <xdje42@gmail.com>
2791 * target.h: #include <sys/types.h>.
2793 2015-11-19 Pedro Alves <palves@redhat.com>
2795 * linux-low.c (linux_process_qsupported): Change prototype.
2797 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2799 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2800 and adjust to loop over all features.
2801 * server.c (handle_query) <qSupported>: Adjust to call
2802 target_process_qsupported once, passing it a vector of unprocessed
2804 * target.h (struct target_ops) <process_qsupported>: Change
2806 (target_process_qsupported): Adjust.
2808 2015-11-19 Pedro Alves <palves@redhat.com>
2810 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2812 * configure: Regenerate.
2814 2015-11-19 Pedro Alves <palves@redhat.com>
2816 * configure: Regenerate.
2818 2015-11-19 Yao Qi <yao.qi@linaro.org>
2820 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2823 2015-11-19 Yao Qi <yao.qi@linaro.org>
2825 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2826 (struct aarch64_operand): Move enum out.
2828 2015-11-19 Yao Qi <yao.qi@linaro.org>
2830 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2831 struct user_fpsimd_state *.
2832 (aarch64_store_fpregset): Likewise.
2834 2015-11-19 Yao Qi <yao.qi@linaro.org>
2836 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2837 struct user_pt_regs *.
2838 (aarch64_store_gregset): Likewise.
2840 2015-11-18 Pedro Alves <palves@redhat.com>
2842 * Makefile.in (all_object_files): Add $IPA_OBJS.
2844 2015-11-17 Pedro Alves <palves@redhat.com>
2846 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2847 GDB_SIGNAL_0 and gdb_signal_to_string.
2849 2015-11-17 Pedro Alves <palves@redhat.com>
2851 * win32-low.c (handle_output_debug_string): Remove parameter.
2852 (win32_kill): Remove our_status local and adjust call to
2853 handle_output_debug_string.
2854 (get_child_debug_event): Adjust call to
2855 handle_output_debug_string.
2857 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2859 * linux-mips-low.c (mips_fill_gregset): Add cast.
2860 (mips_store_gregset): Likewise.
2861 (mips_fill_fpregset): Likewise.
2862 (mips_store_fpregset): Likewise.
2864 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2866 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2869 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2871 * linux-mips-low.c (mips_linux_new_thread): Change type of
2872 watch_type to enum target_hw_bp_type.
2874 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2876 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2877 Change return type to arm_hwbp_type.
2879 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2881 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2882 (arm_store_gregset): Likewise.
2883 * linux-arm-low.c (arm_get_hwcap): Likewise.
2884 (arm_read_description): Likewise.
2886 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2888 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2890 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2892 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2893 (ppc_fill_vsxregset): Likewise.
2894 (ppc_store_vsxregset): Likewise.
2895 (ppc_fill_vrregset): Likewise.
2896 (ppc_store_vrregset): Likewise.
2897 (ppc_fill_evrregset): Likewise.
2898 (ppc_store_evrregset): Likewise.
2900 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2902 * linux-ppc-low.c (ppc_usrregs_info): Remove
2903 forward-declaration.
2904 (ppc_arch_setup): Move lower in file.
2906 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2908 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2909 (ps_pdwrite): Likewise.
2911 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2913 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2914 to after assert checks.
2916 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2918 * proc-service.c (ps_pdread): Add/adjust casts.
2919 (ps_pdwrite): Add/adjust casts.
2921 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2923 * server.c (handle_search_memory_1): Cast return value of
2926 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2928 * server.c (write_qxfer_response): Change type of data to
2931 2015-10-29 Pedro Alves <palves@redhat.com>
2933 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2935 2015-10-29 Pedro Alves <palves@redhat.com>
2937 * tracepoint.c (clear_installed_tracepoints): Add casts.
2939 2015-10-29 Pedro Alves <palves@redhat.com>
2941 * server.c (handle_v_cont, process_serial_event): Add enum
2942 gdb_signal casts to signal parsing code.
2944 2015-10-29 Pedro Alves <palves@redhat.com>
2946 * linux-low.h (NULL_REGSET): Define.
2947 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2948 * linux-arm-low.c (arm_regsets): Likewise.
2949 * linux-crisv32-low.c (cris_regsets): Likewise.
2950 * linux-m68k-low.c (m68k_regsets): Likewise.
2951 * linux-mips-low.c (mips_regsets): Likewise.
2952 * linux-nios2-low.c (nios2_regsets): Likewise.
2953 * linux-ppc-low.c (ppc_regsets): Likewise.
2954 * linux-s390-low.c (s390_regsets): Likewise.
2955 * linux-sh-low.c (sh_regsets): Likewise.
2956 * linux-sparc-low.c (sparc_regsets): Likewise.
2957 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2958 * linux-tile-low.c (tile_regsets): Likewise.
2959 * linux-x86-low.c (x86_regsets): Likewise.
2960 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2962 2015-10-29 Pedro Alves <palves@redhat.com>
2964 * linux-low.h (NULL_REGSET): Define.
2965 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2966 * linux-arm-low.c (arm_regsets): Likewise.
2967 * linux-crisv32-low.c (cris_regsets): Likewise.
2968 * linux-m68k-low.c (m68k_regsets): Likewise.
2969 * linux-mips-low.c (mips_regsets): Likewise.
2970 * linux-nios2-low.c (nios2_regsets): Likewise.
2971 * linux-ppc-low.c (ppc_regsets): Likewise.
2972 * linux-s390-low.c (s390_regsets): Likewise.
2973 * linux-sh-low.c (sh_regsets): Likewise.
2974 * linux-sparc-low.c (sparc_regsets): Likewise.
2975 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2976 * linux-tile-low.c (tile_regsets): Likewise.
2977 * linux-x86-low.c (x86_regsets): Likewise.
2978 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2980 2015-10-26 Doug Evans <dje@google.com>
2982 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2984 2015-10-26 Doug Evans <dje@google.com>
2986 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2988 2015-10-26 Doug Evans <dje@google.com>
2990 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2992 (attach_thread, find_new_threads_callback): Ditto.
2994 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2996 * mem-break.h (set_breakpoint_data): Remove.
2998 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3000 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3001 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3002 (initialize_low): Remove set_breakpoint_data call.
3003 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3004 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3005 (initialize_low): Remove set_breakpoint_data call.
3006 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3007 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3008 (initialize_low): Remove set_breakpoint_data call.
3010 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3012 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3013 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3014 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3015 * target.h (target_breakpoint_kind_from_pc): New macro.
3017 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3019 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3020 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3021 the default breakpoint kind.
3023 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3025 * linux-arm-low.c (arm_supports_z_point_type): Add software
3028 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3030 * linux-arm-low.c: Refactor breakpoint definitions.
3031 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3032 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3034 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3036 * Makefile.in: Add arm.c/o.
3037 * configure.srv: Likewise.
3038 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3039 (arm_breakpoint_kind_from_pc): New function.
3040 (arm_sw_breakpoint_from_kind): Return proper kind.
3041 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3043 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3045 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3047 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3048 (struct raw_breakpoint) <size>: Remove.
3049 (struct raw_breakpoint) <kind>: Add.
3050 (bp_size): New function.
3051 (bp_opcode): Likewise.
3052 (find_raw_breakpoint_at): Adjust for kind.
3053 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3054 (remove_memory_breakpoint): Adjust for kind call bp_size.
3055 (set_raw_breakpoint_at): Adjust for kind.
3056 (set_breakpoint): Likewise.
3057 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3058 (delete_raw_breakpoint): Adjust for kind.
3059 (delete_breakpoint): Likewise.
3060 (find_gdb_breakpoint): Likewise.
3061 (set_gdb_breakpoint_1): Likewise.
3062 (set_gdb_breakpoint): Likewise.
3063 (delete_gdb_breakpoint_1): Likewise.
3064 (delete_gdb_breakpoint): Likewise.
3065 (uninsert_raw_breakpoint): Likewise.
3066 (reinsert_raw_breakpoint): Likewise.
3067 (set_breakpoint_data): Remove.
3068 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3069 (check_mem_read): Adjust for kind call bp_size.
3070 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3071 (clone_one_breakpoint): Adjust for kind.
3072 * mem-break.h (set_gdb_breakpoint): Likewise.
3073 (delete_gdb_breakpoint): Likewise.
3074 * server.c (process_serial_event): Likewise.
3076 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3078 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3079 (struct linux_target_ops) <breakpoint>: Remove.
3080 (struct linux_target_ops) <breakpoint_len>: Remove.
3081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3083 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3084 (arm_sw_breakpoint_from_kind): New function.
3085 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3086 (struct linux_target_ops) <breakpoint>: Remove.
3087 (struct linux_target_ops) <breakpoint_len>: Remove.
3088 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3089 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3090 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3091 (struct linux_target_ops) <breakpoint>: Remove.
3092 (struct linux_target_ops) <breakpoint_len>: Remove.
3093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3095 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3096 (struct linux_target_ops) <breakpoint>: Remove.
3097 (struct linux_target_ops) <breakpoint_len>: Remove.
3098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3100 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3101 and sw_breakpoint_from_kind to increment the pc.
3102 (linux_breakpoint_kind_from_pc): New function.
3103 (linux_sw_breakpoint_from_kind): New function.
3104 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3105 (initialize_low): Call breakpoint_kind_from_pc and
3106 sw_breakpoint_from_kind to replace breakpoint_data/len.
3107 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3110 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3111 (struct linux_target_ops) <breakpoint>: Remove.
3112 (struct linux_target_ops) <breakpoint_len>: Remove.
3113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3115 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3116 (struct linux_target_ops) <breakpoint>: Remove.
3117 (struct linux_target_ops) <breakpoint_len>: Remove.
3118 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3119 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3120 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3121 (struct linux_target_ops) <breakpoint>: Remove.
3122 (struct linux_target_ops) <breakpoint_len>: Remove.
3123 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3124 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3125 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3126 (struct linux_target_ops) <breakpoint>: Remove.
3127 (struct linux_target_ops) <breakpoint_len>: Remove.
3128 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3129 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3130 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3131 (struct linux_target_ops) <breakpoint>: Remove.
3132 (struct linux_target_ops) <breakpoint_len>: Remove.
3133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3134 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3135 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3136 (struct linux_target_ops) <breakpoint>: Remove.
3137 (struct linux_target_ops) <breakpoint_len>: Remove.
3138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3139 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3140 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3141 (struct linux_target_ops) <breakpoint>: Remove.
3142 (struct linux_target_ops) <breakpoint_len>: Remove.
3143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3145 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3146 (struct linux_target_ops) <breakpoint>: Remove.
3147 (struct linux_target_ops) <breakpoint_len>: Remove.
3148 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3149 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3150 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3151 (struct linux_target_ops) <breakpoint>: Remove.
3152 (struct linux_target_ops) <breakpoint_len>: Remove.
3153 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3154 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3155 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3156 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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.
3167 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3169 * linux-cris-low.c (cris_get_pc): Remove void arg.
3171 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3173 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3176 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3178 * inferiors.c (thread_pid_matches_callback): New function.
3179 (find_thread_process): New function.
3180 (remove_thread): Reset current_thread.
3181 (remove_process): Assert threads have been removed first.
3183 2015-10-15 Yao Qi <yao.qi@linaro.org>
3185 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3187 (aarch64_remove_point): Likewise.
3188 * regcache.c (regcache_register_size): New function.
3190 2015-10-12 Yao Qi <yao.qi@linaro.org>
3192 * linux-aarch64-low.c: Update all callers as emit_load_store
3193 is renamed to aarch64_emit_load_store.
3195 2015-10-12 Yao Qi <yao.qi@linaro.org>
3197 * linux-aarch64-low.c: Update all callers of function renaming
3198 from emit_insn to aarch64_emit_insn.
3200 2015-10-12 Yao Qi <yao.qi@linaro.org>
3202 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3203 arch/aarch64-insn.h.
3204 (struct aarch64_memory_operand): Likewise.
3206 (emit_insn): Move to arch/aarch64-insn.c.
3207 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3208 (emit_load_store): Move to arch/aarch64-insn.c.
3209 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3210 (can_encode_int32): Remove.
3212 2015-10-12 Yao Qi <yao.qi@linaro.org>
3214 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3215 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3216 (aarch64_relocate_instruction): Likewise.
3217 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3218 (struct aarch64_insn_visitor): Likewise.
3220 2015-10-12 Yao Qi <yao.qi@linaro.org>
3222 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3223 (struct aarch64_insn_visitor): New.
3224 (struct aarch64_insn_relocation_data): New.
3225 (aarch64_ftrace_insn_reloc_b): New function.
3226 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3227 (aarch64_ftrace_insn_reloc_cb): Likewise.
3228 (aarch64_ftrace_insn_reloc_tb): Likewise.
3229 (aarch64_ftrace_insn_reloc_adr): Likewise.
3230 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3231 (aarch64_ftrace_insn_reloc_others): Likewise.
3233 (aarch64_relocate_instruction): Use visitor.
3235 2015-10-12 Yao Qi <yao.qi@linaro.org>
3237 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3238 int. Add argument buf.
3239 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3240 aarch64_relocate_instruction.
3242 2015-10-12 Yao Qi <yao.qi@linaro.org>
3244 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3245 argument insn. Remove local variable insn. Don't call
3247 (aarch64_install_fast_tracepoint_jump_pad): Call
3250 2015-09-30 Yao Qi <yao.qi@linaro.org>
3252 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3253 (emit_load_store_pair): Likewise.
3255 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3257 * dll.c (match_dll): Add cast(s).
3258 (unloaded_dll): Likewise.
3259 * linux-low.c (second_thread_of_pid_p): Likewise.
3260 (delete_lwp_callback): Likewise.
3261 (count_events_callback): Likewise.
3262 (select_event_lwp_callback): Likewise.
3263 (linux_set_resume_request): Likewise.
3264 * server.c (accumulate_file_name_length): Likewise.
3265 (emit_dll_description): Likewise.
3266 (handle_qxfer_threads_worker): Likewise.
3267 (visit_actioned_threads): Likewise.
3268 * thread-db.c (any_thread_of): Likewise.
3269 * tracepoint.c (same_process_p): Likewise.
3270 (match_blocktype): Likewise.
3271 (build_traceframe_info_xml): Likewise.
3273 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3275 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3277 (gdb_unparse_agent_expr): Likewise.
3278 * hostio.c (require_data): Likewise.
3279 (handle_pread): Likewise.
3280 * linux-low.c (disable_regset): Likewise.
3281 (fetch_register): Likewise.
3282 (store_register): Likewise.
3283 (get_dynamic): Likewise.
3284 (linux_qxfer_libraries_svr4): Likewise.
3285 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3286 (set_fast_tracepoint_jump): Likewise.
3287 (uninsert_fast_tracepoint_jumps_at): Likewise.
3288 (reinsert_fast_tracepoint_jumps_at): Likewise.
3289 (validate_inserted_breakpoint): Likewise.
3290 (clone_agent_expr): Likewise.
3291 * regcache.c (init_register_cache): Likewise.
3292 * remote-utils.c (putpkt_binary_1): Likewise.
3293 (decode_M_packet): Likewise.
3294 (decode_X_packet): Likewise.
3295 (look_up_one_symbol): Likewise.
3296 (relocate_instruction): Likewise.
3297 (monitor_output): Likewise.
3298 * server.c (handle_search_memory): Likewise.
3299 (handle_qxfer_exec_file): Likewise.
3300 (handle_qxfer_libraries): Likewise.
3301 (handle_qxfer): Likewise.
3302 (handle_query): Likewise.
3303 (handle_v_cont): Likewise.
3304 (handle_v_run): Likewise.
3305 (captured_main): Likewise.
3306 * target.c (write_inferior_memory): Likewise.
3307 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3308 * tracepoint.c (init_trace_buffer): Likewise.
3309 (add_tracepoint_action): Likewise.
3310 (add_traceframe): Likewise.
3311 (add_traceframe_block): Likewise.
3312 (cmd_qtdpsrc): Likewise.
3313 (cmd_qtdv): Likewise.
3314 (cmd_qtstatus): Likewise.
3315 (response_source): Likewise.
3316 (response_tsv): Likewise.
3317 (cmd_qtnotes): Likewise.
3318 (gdb_collect): Likewise.
3319 (initialize_tracepoint): Likewise.
3321 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3323 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3324 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3325 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3327 (enum aarch64_condition_codes): New enum.
3328 (w0): New static global.
3331 (struct aarch64_memory_operand) <type>: New
3332 MEMORY_OPERAND_POSTINDEX type.
3333 (postindex_memory_operand): New helper function.
3334 (emit_ret): New function.
3335 (emit_load_store_pair): New function, factored out of emit_stp
3336 with support for MEMORY_OPERAND_POSTINDEX.
3337 (emit_stp): Rewrite using emit_load_store_pair.
3338 (emit_ldp): New function.
3339 (emit_load_store): Likewise.
3340 (emit_ldr): Mention post-index instruction in comment.
3341 (emit_ldrh): New function.
3342 (emit_ldrb): New function.
3343 (emit_ldrsw): Mention post-index instruction in comment.
3344 (emit_str): Likewise.
3345 (emit_subs): New function.
3346 (emit_cmp): Likewise.
3347 (emit_and): Likewise.
3348 (emit_orr): Likewise.
3349 (emit_orn): Likewise.
3350 (emit_eor): Likewise.
3351 (emit_mvn): Likewise.
3352 (emit_lslv): Likewise.
3353 (emit_lsrv): Likewise.
3354 (emit_asrv): Likewise.
3355 (emit_mul): Likewise.
3356 (emit_sbfm): Likewise.
3357 (emit_sbfx): Likewise.
3358 (emit_ubfm): Likewise.
3359 (emit_ubfx): Likewise.
3360 (emit_csinc): Likewise.
3361 (emit_cset): Likewise.
3362 (emit_nop): Likewise.
3363 (emit_ops_insns): New helper function.
3364 (emit_pop): Likewise.
3365 (emit_push): Likewise.
3366 (aarch64_emit_prologue): New function.
3367 (aarch64_emit_epilogue): Likewise.
3368 (aarch64_emit_add): Likewise.
3369 (aarch64_emit_sub): Likewise.
3370 (aarch64_emit_mul): Likewise.
3371 (aarch64_emit_lsh): Likewise.
3372 (aarch64_emit_rsh_signed): Likewise.
3373 (aarch64_emit_rsh_unsigned): Likewise.
3374 (aarch64_emit_ext): Likewise.
3375 (aarch64_emit_log_not): Likewise.
3376 (aarch64_emit_bit_and): Likewise.
3377 (aarch64_emit_bit_or): Likewise.
3378 (aarch64_emit_bit_xor): Likewise.
3379 (aarch64_emit_bit_not): Likewise.
3380 (aarch64_emit_equal): Likewise.
3381 (aarch64_emit_less_signed): Likewise.
3382 (aarch64_emit_less_unsigned): Likewise.
3383 (aarch64_emit_ref): Likewise.
3384 (aarch64_emit_if_goto): Likewise.
3385 (aarch64_emit_goto): Likewise.
3386 (aarch64_write_goto_address): Likewise.
3387 (aarch64_emit_const): Likewise.
3388 (aarch64_emit_call): Likewise.
3389 (aarch64_emit_reg): Likewise.
3390 (aarch64_emit_pop): Likewise.
3391 (aarch64_emit_stack_flush): Likewise.
3392 (aarch64_emit_zero_ext): Likewise.
3393 (aarch64_emit_swap): Likewise.
3394 (aarch64_emit_stack_adjust): Likewise.
3395 (aarch64_emit_int_call_1): Likewise.
3396 (aarch64_emit_void_call_2): Likewise.
3397 (aarch64_emit_eq_goto): Likewise.
3398 (aarch64_emit_ne_goto): Likewise.
3399 (aarch64_emit_lt_goto): Likewise.
3400 (aarch64_emit_le_goto): Likewise.
3401 (aarch64_emit_gt_goto): Likewise.
3402 (aarch64_emit_ge_got): Likewise.
3403 (aarch64_emit_ops_impl): New static global variable.
3404 (aarch64_emit_ops): New target function, return
3405 &aarch64_emit_ops_impl.
3406 (struct linux_target_ops): Install it.
3408 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3410 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3411 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3413 * linux-aarch64-ipa.c: New file.
3414 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3416 (aarch64_get_thread_area): New target method.
3417 (extract_signed_bitfield): New helper function.
3418 (aarch64_decode_ldr_literal): New function.
3419 (enum aarch64_opcodes): New enum.
3420 (struct aarch64_register): New struct.
3421 (struct aarch64_operand): New struct.
3422 (x0): New static global.
3431 (aarch64_register): New helper function.
3432 (register_operand): Likewise.
3433 (immediate_operand): Likewise.
3434 (struct aarch64_memory_operand): New struct.
3435 (offset_memory_operand): New helper function.
3436 (preindex_memory_operand): Likewise.
3437 (enum aarch64_system_control_registers): New enum.
3438 (ENCODE): New macro.
3439 (emit_insn): New helper function.
3440 (emit_b): New function.
3441 (emit_bcond): Likewise.
3442 (emit_cb): Likewise.
3443 (emit_tb): Likewise.
3444 (emit_blr): Likewise.
3445 (emit_stp): Likewise.
3446 (emit_ldp_q_offset): Likewise.
3447 (emit_stp_q_offset): Likewise.
3448 (emit_load_store): Likewise.
3449 (emit_ldr): Likewise.
3450 (emit_ldrsw): Likewise.
3451 (emit_str): Likewise.
3452 (emit_ldaxr): Likewise.
3453 (emit_stxr): Likewise.
3454 (emit_stlr): Likewise.
3455 (emit_data_processing_reg): Likewise.
3456 (emit_data_processing): Likewise.
3457 (emit_add): Likewise.
3458 (emit_sub): Likewise.
3459 (emit_mov): Likewise.
3460 (emit_movk): Likewise.
3461 (emit_mov_addr): Likewise.
3462 (emit_mrs): Likewise.
3463 (emit_msr): Likewise.
3464 (emit_sevl): Likewise.
3465 (emit_wfe): Likewise.
3466 (append_insns): Likewise.
3467 (can_encode_int32_in): New helper function.
3468 (aarch64_relocate_instruction): New function.
3469 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3470 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3471 (struct linux_target_ops): Install aarch64_get_thread_area,
3472 aarch64_install_fast_tracepoint_jump_pad and
3473 aarch64_get_min_fast_tracepoint_insn_len.
3475 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3477 * Makefile.in (aarch64-insn.o): New rule.
3478 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3480 2015-09-21 Yao Qi <yao.qi@linaro.org>
3482 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3484 2015-09-21 Yao Qi <yao.qi@linaro.org>
3486 * tracepoint.c (max_jump_pad_size): Remove.
3488 2015-09-18 Yao Qi <yao.qi@linaro.org>
3490 * linux-aarch64-low.c: Don't include sys/uio.h.
3491 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3493 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3495 * tracepoint.c (eval_result_type): Change prototype.
3496 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3498 2015-09-15 Pedro Alves <palves@redhat.com>
3500 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3501 Check whether to report exec events instead of checking whether
3502 multiprocess is enabled.
3504 2015-09-15 Pedro Alves <palves@redhat.com>
3507 * remote-utils.c (prepare_resume_reply): Merge
3508 TARGET_WAITKIND_VFORK_DONE switch case with the
3509 TARGET_WAITKIND_FORKED case.
3511 2015-09-15 Yao Qi <yao.qi@linaro.org>
3513 * server.c (handle_query): Check string comparison using
3514 "else if" instead of "if".
3516 2015-09-15 Yao Qi <yao.qi@linaro.org>
3518 * server.c (vCont_supported): New global variable.
3519 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3520 matches. Append ";vContSupported+" to own_buf.
3521 (handle_v_requests): Append ";s;S" to own_buf if target supports
3522 hardware single step or vCont_supported is false.
3523 (capture_main): Set vCont_supported to zero.
3525 2015-09-15 Yao Qi <yao.qi@linaro.org>
3527 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3529 (linux_supports_hardware_single_step): ... New function.
3530 (linux_target_ops): Update.
3531 * lynx-low.c (lynx_target_ops): Set field
3532 supports_hardware_single_step to target_can_do_hardware_single_step.
3533 * nto-low.c (nto_target_ops): Likewise.
3534 * spu-low.c (spu_target_ops): Likewise.
3535 * win32-low.c (win32_target_ops): Likewise.
3536 * target.c (target_can_do_hardware_single_step): New function.
3537 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3538 Remove. <supports_hardware_single_step>: New field.
3539 (target_supports_conditional_breakpoints): Remove.
3540 (target_supports_hardware_single_step): New macro.
3541 (target_can_do_hardware_single_step): Declare.
3542 * server.c (handle_query): Use target_supports_hardware_single_step
3543 instead of target_supports_conditional_breakpoints.
3545 2015-09-15 Yao Qi <yao.qi@linaro.org>
3547 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3549 (struct linux_target_ops the_low_target): Install
3550 aarch64_linux_siginfo_fixup.
3552 2015-09-11 Don Breazeal <donb@codesourcery.com>
3553 Luis Machado <lgustavo@codesourcery.com>
3555 * linux-low.c (linux_mourn): Static declaration.
3556 (linux_arch_setup): Move in front of
3557 handle_extended_wait.
3558 (linux_arch_setup_thread): New function.
3559 (handle_extended_wait): Handle exec events. Call
3560 linux_arch_setup_thread. Make event_lwp argument a
3561 pointer-to-a-pointer.
3562 (check_zombie_leaders): Do not check stopped threads.
3563 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3564 (linux_low_filter_event): Add lwp and thread for exec'ing
3565 non-leader thread if leader thread has been deleted.
3566 Refactor code into linux_arch_setup_thread and call it.
3567 Pass child lwp pointer by reference to handle_extended_wait.
3568 (linux_wait_for_event_filtered): Update comment.
3569 (linux_wait_1): Prevent clobbering exec event status.
3570 (linux_supports_exec_events): New function.
3571 (linux_target_ops) <supports_exec_events>: Initialize new member.
3572 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3574 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3575 * server.c (report_exec_events): New global variable.
3576 (handle_query): Handle qSupported query for exec-events feature.
3577 (captured_main): Initialize report_exec_events.
3578 * server.h (report_exec_events): Declare new global variable.
3579 * target.h (struct target_ops) <supports_exec_events>: New
3581 (target_supports_exec_events): New macro.
3582 * win32-low.c (win32_target_ops) <supports_exec_events>:
3583 Initialize new member.
3585 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3587 * linux-low.c (linux_low_enable_btrace): Remove.
3588 (linux_target_ops): Replace linux_low_enable_btrace with
3589 linux_enable_btrace.
3591 2015-09-03 Yao Qi <yao.qi@linaro.org>
3593 * linux-aarch64-low.c (aarch64_insert_point): Call
3594 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3597 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3599 * linux-low.c (check_stopped_by_breakpoint): Use
3600 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3602 2015-08-27 Pedro Alves <palves@redhat.com>
3604 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3606 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3608 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3609 the XNEW-family equivalent.
3610 (compile_bytecodes): Likewise.
3611 * dll.c (loaded_dll): Likewise.
3612 * event-loop.c (append_callback_event): Likewise.
3613 (create_file_handler): Likewise.
3614 (create_file_event): Likewise.
3615 * hostio.c (handle_open): Likewise.
3616 * inferiors.c (add_thread): Likewise.
3617 (add_process): Likewise.
3618 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3619 * linux-arm-low.c (arm_new_process): Likewise.
3620 (arm_new_thread): Likewise.
3621 * linux-low.c (add_to_pid_list): Likewise.
3622 (linux_add_process): Likewise.
3623 (handle_extended_wait): Likewise.
3624 (add_lwp): Likewise.
3625 (enqueue_one_deferred_signal): Likewise.
3626 (enqueue_pending_signal): Likewise.
3627 (linux_resume_one_lwp_throw): Likewise.
3628 (linux_resume_one_thread): Likewise.
3629 (linux_read_memory): Likewise.
3630 (linux_write_memory): Likewise.
3631 * linux-mips-low.c (mips_linux_new_process): Likewise.
3632 (mips_linux_new_thread): Likewise.
3633 (mips_add_watchpoint): Likewise.
3634 * linux-x86-low.c (initialize_low_arch): Likewise.
3635 * lynx-low.c (lynx_add_process): Likewise.
3636 * mem-break.c (set_raw_breakpoint_at): Likewise.
3637 (set_breakpoint): Likewise.
3638 (add_condition_to_breakpoint): Likewise.
3639 (add_commands_to_breakpoint): Likewise.
3640 (clone_agent_expr): Likewise.
3641 (clone_one_breakpoint): Likewise.
3642 * regcache.c (new_register_cache): Likewise.
3643 * remote-utils.c (look_up_one_symbol): Likewise.
3644 * server.c (queue_stop_reply): Likewise.
3645 (start_inferior): Likewise.
3646 (queue_stop_reply_callback): Likewise.
3647 (handle_target_event): Likewise.
3648 * spu-low.c (fetch_ppc_memory): Likewise.
3649 (store_ppc_memory): Likewise.
3650 * target.c (set_target_ops): Likewise.
3651 * thread-db.c (thread_db_load_search): Likewise.
3652 (try_thread_db_load_1): Likewise.
3653 * tracepoint.c (add_tracepoint): Likewise.
3654 (add_tracepoint_action): Likewise.
3655 (create_trace_state_variable): Likewise.
3656 (cmd_qtdpsrc): Likewise.
3657 (cmd_qtro): Likewise.
3658 (add_while_stepping_state): Likewise.
3659 * win32-low.c (child_add_thread): Likewise.
3660 (get_image_name): Likewise.
3662 2015-08-25 Yao Qi <yao.qi@linaro.org>
3664 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3666 2015-08-25 Yao Qi <yao.qi@linaro.org>
3668 * Makefile.in (aarch64-linux.o): New rule.
3669 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3671 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3672 (aarch64_init_debug_reg_state): Make it extern.
3673 (aarch64_linux_prepare_to_resume): Remove.
3675 2015-08-25 Yao Qi <yao.qi@linaro.org>
3677 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3678 lwp_arch_private_info and ptid_of_lwp.
3680 2015-08-25 Yao Qi <yao.qi@linaro.org>
3682 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3683 Find proc_info by find_process_pid. All callers updated.
3685 2015-08-25 Yao Qi <yao.qi@linaro.org>
3687 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3689 (debug_reg_change_callback): Remove.
3690 (aarch64_notify_debug_reg_change): Remove.
3692 2015-08-25 Yao Qi <yao.qi@linaro.org>
3694 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3695 Call current_lwp_ptid.
3697 2015-08-25 Yao Qi <yao.qi@linaro.org>
3699 * linux-aarch64-low.c (debug_reg_change_callback): Use
3702 2015-08-25 Yao Qi <yao.qi@linaro.org>
3704 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3706 2015-08-25 Yao Qi <yao.qi@linaro.org>
3708 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3710 2015-08-25 Yao Qi <yao.qi@linaro.org>
3712 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3715 2015-08-25 Yao Qi <yao.qi@linaro.org>
3717 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3719 (debug_reg_change_callback): Remove argument entry and add argument
3720 lwp. Remove local variable thread. Don't print thread id in the
3721 debugging output. Don't check whether pid of thread equals to pid.
3722 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3723 iterate_over_lwps instead find_inferior.
3725 2015-08-24 Pedro Alves <palves@redhat.com>
3727 * inferiors.c (get_first_process): New function.
3728 * inferiors.h (get_first_process): New declaration.
3729 * remote-utils.c (read_ptid): Default to the first process in the
3730 list, instead of to the current thread's process.
3732 2015-08-24 Pedro Alves <palves@redhat.com>
3734 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3735 * event-loop.c: Likewise.
3736 * remote-utils.c: Likewise.
3737 * tracepoint.c: Likewise.
3739 2015-08-24 Pedro Alves <palves@redhat.com>
3741 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3744 2015-08-21 Pedro Alves <palves@redhat.com>
3746 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3747 instead of literal 1.
3749 2015-08-21 Pedro Alves <palves@redhat.com>
3751 * tdesc.c (default_description): Explicitly zero-initialize.
3753 2015-08-21 Pedro Alves <palves@redhat.com>
3756 * inferiors.c (remove_thread): Discard any pending stop reply for
3758 * server.c (remove_all_on_match_pid): Rename to ...
3759 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3761 (discard_queued_stop_replies): Change parameter to a ptid. Now
3763 (handle_v_kill, kill_inferior_callback, captured_main)
3764 (process_serial_event): Adjust.
3765 * server.h (discard_queued_stop_replies): Declare.
3767 2015-08-21 Pedro Alves <palves@redhat.com>
3769 * linux-low.c (wait_for_sigstop): Always switch to no thread
3770 selected if the previously current thread dies.
3771 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3772 process instead of the current thread's.
3773 * remote-utils.c (input_interrupt): Don't check if there's no
3775 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3776 current thread to the general thread fails, error out.
3777 (handle_qxfer_auxv, handle_qxfer_libraries)
3778 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3779 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3780 (handle_query): Check if there's a thread selected instead of
3781 checking whether there's any thread in the thread list.
3782 (handle_qxfer_threads, handle_qxfer_btrace)
3783 (handle_qxfer_btrace_conf): Don't error out early if there's no
3784 thread in the thread list.
3785 (handle_v_cont, myresume): Don't set the current thread to the
3787 (process_serial_event) <Hg handling>: Also set thread_id if the
3788 previous general thread is still alive.
3789 (process_serial_event) <g/G handling>: If setting the current
3790 thread to the general thread fails, error out.
3791 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3792 thread's lwp instead of the current thread's.
3793 * target.c (set_desired_thread): If the desired thread was not
3794 found, leave the current thread pointing to NULL. Return an int
3795 (boolean) indicating success.
3796 * target.h (set_desired_thread): Change return type to int.
3798 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3800 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3801 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3803 (ps_get_thread_area): New function.
3805 2015-08-19 Gary Benson <gbenson@redhat.com>
3807 * hostio.c (handle_pread): Do not attempt to read more data
3808 than hostio_reply_with_data can fit in a packet.
3810 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3812 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3814 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3816 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3818 2015-08-06 Pedro Alves <palves@redhat.com>
3820 * tracepoint.c (expr_eval_result): Now an int.
3822 2015-08-06 Pedro Alves <palves@redhat.com>
3824 * gdbthread.h (struct regcache): Forward declare.
3825 (struct thread_info) <regcache_data>: Now a struct regcache
3827 * inferiors.c (inferior_regcache_data)
3828 (set_inferior_regcache_data): Now work with struct regcache
3830 * inferiors.h (struct regcache): Forward declare.
3831 (inferior_regcache_data, set_inferior_regcache_data): Now work
3832 with struct regcache pointers.
3833 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3834 (free_register_cache_thread): Remove struct regcache pointer
3837 2015-08-06 Pedro Alves <palves@redhat.com>
3839 * server.c (captured_main): On error, print the exception message
3840 to stderr, and if run_once is set, throw a quit.
3842 2015-08-06 Pedro Alves <palves@redhat.com>
3844 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3847 2015-08-06 Pedro Alves <palves@redhat.com>
3849 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3850 reading beyond the passed in buffer length.
3852 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3854 * tracepoint.c (symbol_list) <required>: Remove.
3856 2015-08-06 Pedro Alves <palves@redhat.com>
3858 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3859 count if stopping and suspending threads.
3860 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3861 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3862 (linux_detach): Complete an ongoing step-over.
3863 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3865 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3866 (linux_wait_1): If passing a signal to the inferior after
3867 finishing a step-over, unsuspend and re-resume all lwps. If we
3868 see a single-step event but the thread should be continuing, don't
3869 pass the trap to gdb.
3870 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3871 internal_error instead of gdb_assert.
3872 (enqueue_pending_signal): New function.
3873 (check_ptrace_stopped_lwp_gone): Add debug output.
3874 (start_step_over): Use internal_error instead of gdb_assert.
3875 (complete_ongoing_step_over): New function.
3876 (linux_resume_one_thread): Don't resume a suspended thread.
3877 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3880 2015-08-06 Pedro Alves <palves@redhat.com>
3882 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3883 (linux_thread_alive): Use lwp_is_marked_dead.
3884 (extended_event_reported): Delete.
3885 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3886 instead of extended_event_reported.
3887 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3889 (lwp_is_marked_dead): New function.
3890 (lwp_running): Use lwp_is_marked_dead.
3891 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3894 2015-08-06 Pedro Alves <palves@redhat.com>
3896 * linux-low.c (linux_wait_1): Move fork event output out of the
3897 !report_to_gdb check. Pass event_child->waitstatus to
3898 target_waitstatus_to_string instead of ourstatus.
3900 2015-08-04 Yao Qi <yao.qi@linaro.org>
3902 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3903 if current_thread is 32 bit.
3905 2015-08-04 Yao Qi <yao.qi@linaro.org>
3907 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3908 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3909 * server.c (extended_protocol): Remove "static".
3910 * server.h (extended_protocol): Declare it.
3912 2015-08-04 Yao Qi <yao.qi@linaro.org>
3914 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3915 both aarch64 and aarch32.
3916 (aarch64_set_pc): Likewise.
3918 2015-08-04 Yao Qi <yao.qi@linaro.org>
3920 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3921 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3922 arm-with-neon.xml to srv_xmlfiles.
3923 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3924 (is_64bit_tdesc): New function.
3925 (aarch64_linux_read_description): New function.
3926 (aarch64_arch_setup): Call aarch64_linux_read_description.
3927 (regs_info): Rename to regs_info_aarch64.
3928 (aarch64_regs_info): Return right regs_info.
3929 (initialize_low_arch): Call initialize_low_arch_aarch32.
3931 2015-08-04 Yao Qi <yao.qi@linaro.org>
3933 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3934 * linux-aarch32-low.c: New file.
3935 * linux-aarch32-low.h: New file.
3936 * linux-arm-low.c (arm_fill_gregset): Move it to
3937 linux-aarch32-low.c.
3938 (arm_store_gregset): Likewise.
3939 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3940 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3941 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3942 (regs_info): Rename to regs_info_arm.
3943 (arm_regs_info): Return regs_info_aarch32 if
3944 have_ptrace_getregset is 1 and target description is
3945 arm_with_neon or arm_with_vfpv3.
3946 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3947 Call initialize_low_arch_aarch32 instead.
3949 2015-08-04 Yao Qi <yao.qi@linaro.org>
3951 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3952 * linux-low.c: ... here.
3953 * linux-low.h (have_ptrace_getregset): Declare it.
3955 2015-08-04 Pedro Alves <palves@redhat.com>
3957 * thread-db.c (struct thread_db): Use new typedefs.
3958 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3960 (disable_thread_event_reporting): Cast result of dlsym to
3961 destination function pointer type.
3962 (thread_db_mourn): Use td_ta_delete_ftype.
3964 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3966 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3968 (CDX_BREAKPOINT): Define for R2.
3969 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3970 (the_low_target): Add comments.
3972 2015-07-30 Yao Qi <yao.qi@linaro.org>
3974 * linux-arm-low.c (arm_hwcap): Remove it.
3975 (arm_read_description): New local variable arm_hwcap. Don't
3976 set arm_hwcap to zero.
3978 2015-07-30 Yao Qi <yao.qi@linaro.org>
3980 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3981 Use regcache->tdesc instead.
3982 (arm_store_wmmxregset): Likewise.
3983 (arm_fill_vfpregset): Likewise.
3984 (arm_store_vfpregset): Likewise.
3986 2015-07-30 Yao Qi <yao.qi@linaro.org>
3988 * linux-arm-low.c: Include arch/arm.h.
3989 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3990 (arm_store_gregset): Likewise.
3992 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3994 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3995 ptrace's 4th parameter.
3997 2015-07-27 Yao Qi <yao.qi@linaro.org>
3999 * configure.srv (case aarch64*-*-linux*): Don't set
4002 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4004 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4006 * linux-arm-low.c: Likewise.
4007 * linux-cris-low.c: Likewise.
4008 * linux-crisv32-low.c: Likewise.
4009 * linux-low.c: Likewise.
4010 * linux-m68k-low.c: Likewise.
4011 * linux-mips-low.c: Likewise.
4012 * linux-nios2-low.c: Likewise.
4013 * linux-s390-low.c: Likewise.
4014 * linux-sparc-low.c: Likewise.
4015 * linux-tic6x-low.c: Likewise.
4016 * linux-tile-low.c: Likewise.
4017 * linux-x86-low.c: Likewise.
4019 2015-07-24 Pedro Alves <palves@redhat.com>
4021 * config.in: Regenerate.
4022 * configure: Regenerate.
4024 2015-07-24 Pedro Alves <palves@redhat.com>
4026 * acinclude.m4: Include ../ptrace.m4.
4027 * configure.ac: Call GDB_AC_PTRACE.
4028 * config.in, configure: Regenerate.
4030 2015-07-24 Yao Qi <yao.qi@linaro.org>
4032 * linux-low.c (linux_create_inferior): Remove setting to
4033 proc->priv->new_inferior.
4034 (linux_attach): Likewise.
4035 (linux_low_filter_event): Likewise.
4036 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4038 2015-07-24 Yao Qi <yao.qi@linaro.org>
4040 * linux-low.c (linux_arch_setup): New function.
4041 (linux_low_filter_event): If proc->tdesc is NULL and
4042 proc->attached is true, call the_low_target.arch_setup.
4043 Otherwise, keep status pending, and return.
4044 (linux_resume_one_lwp_throw): Don't call get_pc if
4045 thread->while_stepping isn't NULL. Don't call
4046 get_thread_regcache if proc->tdesc is NULL.
4047 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4048 (linux_target_ops): Install arch_setup.
4049 * server.c (start_inferior): Call the_target->arch_setup.
4050 * target.h (struct target_ops) <arch_setup>: New field.
4051 (target_arch_setup): New marco.
4052 * lynx-low.c (lynx_target_ops): Update.
4053 * nto-low.c (nto_target_ops): Update.
4054 * spu-low.c (spu_target_ops): Update.
4055 * win32-low.c (win32_target_ops): Update.
4057 2015-07-24 Yao Qi <yao.qi@linaro.org>
4059 * linux-low.c (linux_add_process): Don't set
4060 proc->priv->new_inferior.
4061 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4062 (linux_attach): Likewise.
4064 2015-07-24 Yao Qi <yao.qi@linaro.org>
4066 * server.c (start_inferior): Code refactor.
4068 2015-07-24 Yao Qi <yao.qi@linaro.org>
4070 * server.c (process_serial_event): Set general_thread.
4072 2015-07-21 Yao Qi <yao.qi@linaro.org>
4074 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4075 aarch64_linux_get_debug_reg_capacity.
4077 2015-07-17 Yao Qi <yao.qi@linaro.org>
4079 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4080 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4081 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4082 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4083 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4084 (AARCH64_HWP_ALIGNMENT): Likewise.
4085 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4086 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4087 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4088 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4089 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4090 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4091 (struct aarch64_debug_reg_state): Likewise.
4092 (struct arch_lwp_info): Likewise.
4093 (aarch64_align_watchpoint): Likewise.
4094 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4095 (aarch64_watchpoint_length): Likewise.
4096 (aarch64_point_encode_ctrl_reg): Likewise
4097 (aarch64_point_is_aligned): Likewise.
4098 (aarch64_align_watchpoint): Likewise.
4099 (aarch64_linux_set_debug_regs):
4100 (aarch64_dr_state_insert_one_point): Likewise.
4101 (aarch64_dr_state_remove_one_point): Likewise.
4102 (aarch64_handle_breakpoint): Likewise.
4103 (aarch64_handle_aligned_watchpoint): Likewise.
4104 (aarch64_handle_unaligned_watchpoint): Likewise.
4105 (aarch64_handle_watchpoint): Likewise.
4107 2015-07-17 Yao Qi <yao.qi@linaro.org>
4109 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4110 and don't aarch64_get_debug_reg_state. All callers update.
4111 (aarch64_handle_aligned_watchpoint): Likewise.
4112 (aarch64_handle_unaligned_watchpoint): Likewise.
4113 (aarch64_handle_watchpoint): Likewise.
4114 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4115 (aarch64_remove_point): Likewise.
4117 2015-07-17 Yao Qi <yao.qi@linaro.org>
4119 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4121 (aarch64_handle_unaligned_watchpoint): Likewise.
4123 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4125 Revert the previous 3 commits:
4126 Move gdb_regex* to common/
4127 Move linux_find_memory_regions_full & co.
4128 gdbserver build-id attribute generator
4130 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4131 Jan Kratochvil <jan.kratochvil@redhat.com>
4133 gdbserver build-id attribute generator.
4134 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4135 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4136 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4138 (get_dynamic): Use find_pdhr to traverse program headers.
4139 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4140 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4141 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4142 (get_hex_build_id): New.
4143 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4144 to reply XML document.
4146 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4147 Jan Kratochvil <jan.kratochvil@redhat.com>
4149 * target.c: Include target/target-utils.h and fcntl.h.
4150 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4151 (target_fileio_read_stralloc): New functions.
4153 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4155 * Makefile.in (OBS): Add gdb_regex.o.
4157 * config.in: Rebuilt.
4158 * configure: Rebuilt.
4160 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4161 Jan Kratochvil <jan.kratochvil@redhat.com>
4163 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4164 * Makefile.in (OBS): Add target-utils.o.
4165 (linux-maps.o, target-utils.o): New.
4166 * configure.srv (srv_linux_obj): Add linux-maps.o.
4168 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4170 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4172 (the_low_target): Install it.
4174 2015-07-14 Pedro Alves <palves@redhat.com>
4176 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4177 Instead, ignore ECHILD, and throw an error for other errnos.
4179 2015-07-10 Pedro Alves <palves@redhat.com>
4181 * event-loop.c (struct callback_event) <data>: Change type to
4182 gdb_client_data instance instead of gdb_client_data pointer.
4183 (append_callback_event): Adjust.
4185 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4187 * linux-aarch64-low.c: Add comments for each linux_target_ops
4188 method. Remove comments already covered in target_ops and
4189 linux_target_ops definitions.
4190 (the_low_target): Add comments for each unimplemented method.
4192 2015-07-09 Yao Qi <yao.qi@linaro.org>
4194 * linux-aarch64-low.c (aarch64_regmap): Remove.
4195 (aarch64_usrregs_info): Remove.
4196 (regs_info): Set field usrregs to NULL.
4198 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4200 * linux-low.c: Include "rsp-low.h"
4201 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4202 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4203 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4204 (handle_btrace_enable_pt): New.
4205 (handle_btrace_general_set): Support "pt".
4206 (handle_btrace_conf_general_set): Support "pt:size".
4208 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4210 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4213 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4215 * linux-aarch64-low.c: Remove comment about endianness.
4216 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4217 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4220 2015-06-24 Gary Benson <gbenson@redhat.com>
4222 * linux-i386-ipa.c (stdint.h): Do not include.
4223 * lynx-i386-low.c (stdint.h): Likewise.
4224 * lynx-ppc-low.c (stdint.h): Likewise.
4225 * mem-break.c (stdint.h): Likewise.
4226 * thread-db.c (stdint.h): Likewise.
4227 * tracepoint.c (stdint.h): Likewise.
4228 * win32-low.c (stdint.h): Likewise.
4230 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4232 * server.c (write_qxfer_response): Update call to
4233 remote_escape_output.
4235 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4236 Jan Kratochvil <jan.kratochvil@redhat.com>
4238 Merge multiple hex conversions.
4239 * gdbreplay.c (tohex): Rename to 'fromhex'.
4240 (logchar): Use fromhex.
4242 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4244 * server.c (handle_qxfer_libraries): Set `version' attribute for
4247 2015-06-10 Gary Benson <gbenson@redhat.com>
4249 * target.h (struct target_ops) <multifs_open>: New field.
4250 <multifs_unlink>: Likewise.
4251 <multifs_readlink>: Likewise.
4252 * linux-low.c (nat/linux-namespaces.h): New include.
4253 (linux_target_ops): Initialize the_target->multifs_open,
4254 the_target->multifs_unlink and the_target->multifs_readlink.
4255 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4256 * hostio.c (hostio_fs_pid): New static variable.
4257 (hostio_handle_new_gdb_connection): New function.
4258 (handle_setfs): Likewise.
4259 (handle_open): Use the_target->multifs_open as appropriate.
4260 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4261 (handle_readlink): Use the_target->multifs_readlink as
4263 (handle_vFile): Handle vFile:setfs packets.
4264 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4265 after target_handle_new_gdb_connection.
4267 2015-06-10 Gary Benson <gbenson@redhat.com>
4269 * configure.ac (AC_CHECK_FUNCS): Add setns.
4270 * config.in: Regenerate.
4271 * configure: Likewise.
4272 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4273 (linux-namespaces.o): New rule.
4274 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4276 2015-06-09 Gary Benson <gbenson@redhat.com>
4278 * hostio.c (handle_open): Process mode argument with
4279 fileio_to_host_mode.
4281 2015-06-01 Yao Qi <yao.qi@linaro.org>
4283 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4284 * linux-x86-low.c: Likewise.
4286 2015-05-28 Don Breazeal <donb@codesourcery.com>
4288 * linux-low.c (handle_extended_wait): Initialize
4289 thread_info.last_resume_kind for new fork children.
4291 2015-05-15 Pedro Alves <palves@redhat.com>
4293 * target.h (target_handle_new_gdb_connection): Rewrite using if
4294 wrapped in do/while.
4296 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4298 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4299 * configure, config.in: Regenerate.
4300 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4303 2015-05-12 Don Breazeal <donb@codesourcery.com>
4305 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4306 PTRACE_EVENT_VFORK_DONE.
4307 (linux_low_ptrace_options, extended_event_reported): Add vfork
4309 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4310 and "vforkdone" for RSP 'T' Stop Reply Packet.
4311 * server.h (report_vfork_events): Declare
4314 2015-05-12 Don Breazeal <donb@codesourcery.com>
4316 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4317 (the_low_target) <new_fork>: Initialize new member.
4318 * linux-arm-low.c (arm_new_fork): New function.
4319 (the_low_target) <new_fork>: Initialize new member.
4320 * linux-low.c (handle_extended_wait): Call new target function
4322 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4323 * linux-mips-low.c (mips_add_watchpoint): New function
4324 extracted from mips_insert_point.
4325 (the_low_target) <new_fork>: Initialize new member.
4326 (mips_linux_new_fork): New function.
4327 (mips_insert_point): Call mips_add_watchpoint.
4328 * linux-x86-low.c (x86_linux_new_fork): New function.
4329 (the_low_target) <new_fork>: Initialize new member.
4331 2015-05-12 Don Breazeal <donb@codesourcery.com>
4333 * linux-low.c (handle_extended_wait): Implement return value,
4334 rename argument 'event_child' to 'event_lwp', handle
4335 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4336 (linux_low_ptrace_options): New function.
4337 (linux_low_filter_event): Call linux_low_ptrace_options,
4338 use different argument fo linux_enable_event_reporting,
4339 use return value from handle_extended_wait.
4340 (extended_event_reported): New function.
4341 (linux_wait_1): Call extended_event_reported and set
4342 status to report fork events.
4343 (linux_write_memory): Add pid to debug message.
4344 (reset_lwp_ptrace_options_callback): New function.
4345 (linux_handle_new_gdb_connection): New function.
4346 (linux_target_ops): Initialize new structure member.
4347 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4348 * lynx-low.c: Initialize new structure member.
4349 * remote-utils.c (prepare_resume_reply): Implement stop reason
4350 "fork" for "T" stop message.
4351 * server.c (handle_query): Call handle_new_gdb_connection.
4352 * server.h (report_fork_events): Declare global flag.
4353 * target.h (struct target_ops) <handle_new_gdb_connection>:
4355 (target_handle_new_gdb_connection): New macro.
4356 * win32-low.c: Initialize new structure member.
4358 2015-05-12 Don Breazeal <donb@codesourcery.com>
4360 * mem-break.c (APPEND_TO_LIST): Define macro.
4361 (clone_agent_expr): New function.
4362 (clone_one_breakpoint): New function.
4363 (clone_all_breakpoints): New function.
4364 * mem-break.h: Declare new functions.
4366 2015-05-12 Don Breazeal <donb@codesourcery.com>
4368 * linux-low.c (linux_supports_fork_events): New function.
4369 (linux_supports_vfork_events): New function.
4370 (linux_target_ops): Initialize new structure members.
4371 (initialize_low): Call linux_check_ptrace_features.
4372 * lynx-low.c (lynx_target_ops): Initialize new structure
4374 * server.c (report_fork_events, report_vfork_events):
4376 (handle_query): Add new features to qSupported packet and
4378 (captured_main): Initialize new global variables.
4379 * target.h (struct target_ops) <supports_fork_events>:
4381 <supports_vfork_events>: New member.
4382 (target_supports_fork_events): New macro.
4383 (target_supports_vfork_events): New macro.
4384 * win32-low.c (win32_target_ops): Initialize new structure
4387 2015-05-12 Gary Benson <gbenson@redhat.com>
4389 * server.c (handle_qxfer_exec_file): Use current process
4392 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4394 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4395 Remove HAVE_PTRACE_GETREGS conditionals.
4396 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4397 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4399 2015-05-08 Yao Qi <yao.qi@linaro.org>
4401 * linux-low.c (linux_supports_conditional_breakpoints): New
4403 (linux_target_ops): Install new target method.
4404 * lynx-low.c (lynx_target_ops): Install NULL hook for
4405 supports_conditional_breakpoints.
4406 * nto-low.c (nto_target_ops): Likewise.
4407 * spu-low.c (spu_target_ops): Likewise.
4408 * win32-low.c (win32_target_ops): Likewise.
4409 * server.c (handle_query): Check
4410 target_supports_conditional_breakpoints.
4411 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4413 (target_supports_conditional_breakpoints): New macro.
4415 2015-05-06 Pedro Alves <palves@redhat.com>
4418 * server.c (start_inferior): If the process exits, mourn it.
4420 2015-04-21 Gary Benson <gbenson@redhat.com>
4422 * hostio.c (fileio_open_flags_to_host): Factored out to
4423 fileio_to_host_openflags in common/fileio.c. Single use
4426 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4428 * linux-xtensa-low.c (xtensa_fill_gregset)
4429 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4432 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4434 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4435 (regs_info): Replace usrregs pointer with NULL.
4437 2015-04-17 Gary Benson <gbenson@redhat.com>
4439 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4440 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4441 * server.c (handle_qxfer_exec_file): New function.
4442 (qxfer_packets): Add exec-file entry.
4443 (handle_query): Report qXfer:exec-file:read as supported packet.
4445 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4447 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4449 2015-04-09 Gary Benson <gbenson@redhat.com>
4451 * hostio-errno.c (errno_to_fileio_error): Remove function.
4452 Update caller to use remote_fileio_to_fio_error.
4454 2015-04-09 Yao Qi <yao.qi@linaro.org>
4456 * linux-low.c (linux_insert_point): Call
4457 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4458 (linux_remove_point): Call remove_memory_breakpoint if type is
4460 * linux-x86-low.c (x86_insert_point): Don't call
4461 insert_memory_breakpoint.
4462 (x86_remove_point): Don't call remove_memory_breakpoint.
4464 2015-04-01 Pedro Alves <palves@redhat.com>
4465 Cleber Rosa <crosa@redhat.com>
4467 * server.c (gdbserver_usage): Reorganize and extend the usage
4470 2015-03-24 Pedro Alves <palves@redhat.com>
4472 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4473 output. Also dump TRAP_TRACE.
4474 (linux_low_filter_event): In debug output, distinguish a
4475 resume_stop SIGSTOP from a delayed SIGSTOP.
4477 2015-03-24 Gary Benson <gbenson@redhat.com>
4479 * linux-x86-low.c (x86_linux_new_thread): Moved to
4481 (x86_linux_prepare_to_resume): Likewise.
4483 2015-03-24 Gary Benson <gbenson@redhat.com>
4485 * Makefile.in (x86-linux-dregs.o): New rule.
4486 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4487 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4488 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4489 (x86_linux_dr_get): Likewise.
4490 (x86_linux_dr_set): Likewise.
4491 (update_debug_registers_callback): Likewise.
4492 (x86_linux_dr_set_addr): Likewise.
4493 (x86_linux_dr_get_addr): Likewise.
4494 (x86_linux_dr_set_control): Likewise.
4495 (x86_linux_dr_get_control): Likewise.
4496 (x86_linux_dr_get_status): Likewise.
4497 (x86_linux_update_debug_registers): Likewise.
4499 2015-03-24 Gary Benson <gbenson@redhat.com>
4501 * linux-x86-low.c (x86_linux_update_debug_registers):
4502 New function, factored out from...
4503 (x86_linux_prepare_to_resume): ...this.
4505 2015-03-24 Gary Benson <gbenson@redhat.com>
4507 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4508 (x86_linux_dr_set): Likewise.
4509 (update_debug_registers_callback): Likewise.
4510 (x86_linux_dr_set_addr): Likewise.
4511 (x86_linux_dr_get_addr): Likewise.
4512 (x86_linux_dr_set_control): Likewise.
4513 (x86_linux_dr_get_control): Likewise.
4514 (x86_linux_dr_get_status): Likewise.
4515 (x86_linux_prepare_to_resume): Likewise.
4517 2015-03-24 Gary Benson <gbenson@redhat.com>
4519 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4520 Use perror_with_name. Pass string through gettext.
4521 (x86_linux_dr_set): Likewise.
4523 2015-03-24 Gary Benson <gbenson@redhat.com>
4525 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4526 (x86_linux_dr_set_addr): ...this.
4527 (x86_dr_low_get_addr): Rename to...
4528 (x86_linux_dr_get_addr): ...this.
4529 (x86_dr_low_set_control): Rename to...
4530 (x86_linux_dr_set_control): ...this.
4531 (x86_dr_low_get_control): Rename to...
4532 (x86_linux_dr_get_control): ...this.
4533 (x86_dr_low_get_status): Rename to...
4534 (x86_linux_dr_get_status): ...this.
4535 (x86_dr_low): Update with new function names.
4537 2015-03-24 Gary Benson <gbenson@redhat.com>
4539 * Makefile.in (x86-linux.o): New rule.
4540 * configure.srv: Add x86-linux.o to relevant targets.
4541 * linux-low.c (lwp_set_arch_private_info): New function.
4542 (lwp_arch_private_info): Likewise.
4543 * linux-x86-low.c: Include nat/x86-linux.h.
4544 (arch_lwp_info): Removed structure.
4545 (update_debug_registers_callback):
4546 Use lwp_set_debug_registers_changed.
4547 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4548 and lwp_set_debug_registers_changed.
4549 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4551 2015-03-24 Gary Benson <gbenson@redhat.com>
4553 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4554 * linux-arm-low.c (arm_new_thread): Likewise.
4555 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4556 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4557 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4558 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4560 2015-03-24 Gary Benson <gbenson@redhat.com>
4562 * linux-low.c (ptid_of_lwp): New function.
4563 (lwp_is_stopped): Likewise.
4564 (lwp_stop_reason): Likewise.
4565 * linux-x86-low.c (update_debug_registers_callback):
4567 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4570 2015-03-24 Gary Benson <gbenson@redhat.com>
4572 * linux-low.h (linux_stop_lwp): Remove declaration.
4574 2015-03-24 Gary Benson <gbenson@redhat.com>
4576 * linux-low.h: Include nat/linux-nat.h.
4577 * linux-low.c (iterate_over_lwps_args): New structure.
4578 (iterate_over_lwps_filter): New function.
4579 (iterate_over_lwps): Likewise.
4580 * linux-x86-low.c (update_debug_registers_callback):
4581 Update signature to what iterate_over_lwps expects.
4582 Remove PID check that iterate_over_lwps now performs.
4583 (x86_dr_low_set_addr): Use iterate_over_lwps.
4584 (x86_dr_low_set_control): Likewise.
4586 2015-03-24 Gary Benson <gbenson@redhat.com>
4588 * linux-x86-low.c (x86_debug_reg_state): New function.
4589 (x86_linux_prepare_to_resume): Use the above.
4591 2015-03-24 Gary Benson <gbenson@redhat.com>
4593 * linux-low.c (current_lwp_ptid): New function.
4594 * linux-x86-low.c: Include nat/linux-nat.h.
4595 (x86_dr_low_get_addr): Use current_lwp_ptid.
4596 (x86_dr_low_get_control): Likewise.
4597 (x86_dr_low_get_status): Likewise.
4599 2015-03-20 Pedro Alves <palves@redhat.com>
4601 * tracepoint.c (cmd_qtstatus): Make "str" const.
4603 2015-03-20 Pedro Alves <palves@redhat.com>
4605 * server.c (handle_general_set): Make "req_str" const.
4607 2015-03-19 Pedro Alves <palves@redhat.com>
4609 * linux-low.c (linux_resume_one_lwp): Rename to ...
4610 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4611 instead call perror_with_name.
4612 (check_ptrace_stopped_lwp_gone): New function.
4613 (linux_resume_one_lwp): Reimplement as wrapper around
4614 linux_resume_one_lwp_throw that swallows errors if the LWP is
4617 2015-03-19 Pedro Alves <palves@redhat.com>
4619 * linux-low.c (count_events_callback, select_event_lwp_callback):
4620 No longer check whether the thread has resume_stop as last resume
4623 2015-03-19 Pedro Alves <palves@redhat.com>
4625 * linux-low.c (count_events_callback, select_event_lwp_callback):
4626 Use the lwp's status_pending_p field, not the thread's.
4628 2015-03-19 Pedro Alves <palves@redhat.com>
4630 * linux-low.c (select_event_lwp_callback): Update comments to
4631 no longer mention SIGTRAP.
4633 2015-03-18 Gary Benson <gbenson@redhat.com>
4635 * server.c (handle_query): Do not report vFile:fstat as supported.
4637 2015-03-11 Gary Benson <gbenson@redhat.com>
4639 * hostio.c (sys/types.h): New include.
4640 (sys/stat.h): Likewise.
4641 (common-remote-fileio.h): Likewise.
4642 (handle_fstat): New function.
4643 (handle_vFile): Handle vFile:fstat packets.
4645 2015-03-11 Gary Benson <gbenson@redhat.com>
4647 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4648 struct stat.st_blocks and struct stat.st_blksize.
4649 * configure: Regenerate.
4650 * config.in: Likewise.
4651 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4652 (OBS): Add common-remote-fileio.o.
4653 (common-remote-fileio.o): New rule.
4655 2015-03-09 Pedro Alves <palves@redhat.com>
4657 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4658 'struct sockaddr' pointer in 'accept' call.
4660 2015-03-09 Pedro Alves <palves@redhat.com>
4663 2015-03-07 Pedro Alves <palves@redhat.com>
4664 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4665 or <winsock2.h> here. Instead include "gdb_socket.h".
4666 (remote_open): Use union gdb_sockaddr_u.
4667 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4668 or <winsock2.h> here. Instead include "gdb_socket.h".
4669 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4670 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4672 (init_named_socket, gdb_agent_helper_thread): Use union
4675 2015-03-07 Pedro Alves <palves@redhat.com>
4677 * configure.ac (build_warnings): Move
4678 -Wdeclaration-after-statement to the C-specific set.
4679 * configure: Regenerate.
4681 2015-03-07 Pedro Alves <palves@redhat.com>
4683 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4684 or <winsock2.h> here. Instead include "gdb_socket.h".
4685 (remote_open): Use union gdb_sockaddr_u.
4686 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4687 or <winsock2.h> here. Instead include "gdb_socket.h".
4688 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4689 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4691 (init_named_socket, gdb_agent_helper_thread): Use union
4694 2015-03-07 Pedro Alves <palves@redhat.com>
4696 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4699 2015-03-06 Yao Qi <yao.qi@linaro.org>
4701 * linux-aarch64-low.c (aarch64_insert_point): Use
4702 show_debug_regs as a boolean.
4703 (aarch64_remove_point): Likewise.
4705 2015-03-05 Pedro Alves <palves@redhat.com>
4707 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4708 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4709 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4710 * nto-low.c (nto_target_ops): Likewise.
4711 * spu-low.c (spu_target_ops): Likewise.
4712 * win32-low.c (win32_target_ops): Likewise.
4714 2015-03-04 Pedro Alves <palves@redhat.com>
4716 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4717 Decide whether a breakpoint triggered based on the SIGTRAP's
4719 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4720 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4721 (linux_low_filter_event): Check for breakpoints before checking
4723 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4725 (linux_stopped_by_sw_breakpoint)
4726 (linux_supports_stopped_by_sw_breakpoint)
4727 (linux_stopped_by_hw_breakpoint)
4728 (linux_supports_stopped_by_hw_breakpoint): New functions.
4729 (linux_target_ops): Install new target methods.
4731 2015-03-04 Pedro Alves <palves@redhat.com>
4733 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4734 * server.c (swbreak_feature, hwbreak_feature): New globals.
4735 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4736 (captured_main): Clear swbreak_feature and hwbreak_feature.
4737 * server.h (swbreak_feature, hwbreak_feature): Declare.
4738 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4739 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4740 supports_stopped_by_hw_breakpoint>: New fields.
4741 (target_supports_stopped_by_sw_breakpoint)
4742 (target_stopped_by_sw_breakpoint)
4743 (target_supports_stopped_by_hw_breakpoint)
4744 (target_stopped_by_hw_breakpoint): Declare.
4746 2015-03-04 Pedro Alves <palves@redhat.com>
4748 enum lwp_stop_reason -> enum target_stop_reason
4749 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4750 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4751 (linux_wait_1, stuck_in_jump_pad_callback)
4752 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4753 (linux_stopped_by_watchpoint):
4754 * linux-low.h (enum lwp_stop_reason): Delete.
4755 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4756 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4758 2015-03-04 Yao Qi <yao.qi@linaro.org>
4760 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4762 2015-03-03 Gary Benson <gbenson@redhat.com>
4764 * hostio.c (handle_vFile): Fix prefix lengths.
4766 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4768 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4771 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4773 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4774 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4775 (clean): Add "rm -f" for above C files.
4776 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4777 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4778 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4779 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4780 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4781 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4782 (init_registers_s390x_vx_linux64)
4783 (init_registers_s390x_tevx_linux64)
4784 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4785 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4787 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4788 (s390_store_vxrs_high): New functions.
4789 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4791 (s390_arch_setup): Add logic for selecting one of the new target
4792 descriptions. Activate the new vector regsets if applicable.
4793 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4794 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4795 and init_registers_s390x_tevx_linux64.
4797 2015-03-01 Pedro Alves <palves@redhat.com>
4799 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4802 2015-02-27 Pedro Alves <palves@redhat.com>
4804 * linux-x86-low.c (u_debugreg_offset): New function.
4805 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4807 2015-02-27 Pedro Alves <palves@redhat.com>
4809 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4810 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4811 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4812 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4813 (ps_lsetfpregs, ps_getpid)
4814 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4815 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4816 (ps_lsetxregs, ps_plog): Declare.
4818 2015-02-27 Pedro Alves <palves@redhat.com>
4820 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4821 IP_AGENT_EXPORT_FUNC.
4822 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4823 IP_AGENT_EXPORT_FUNC.
4824 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4825 (IP_AGENT_EXPORT): Delete.
4826 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4827 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4828 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4829 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4830 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4831 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4832 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4833 (traceframe_read_count, traceframe_write_count)
4834 (traceframes_created, trace_state_variables, get_raw_reg)
4835 (get_trace_state_variable_value, set_trace_state_variable_value)
4836 (ust_loaded, helper_thread_id, cmd_buf): Use
4837 IPA_SYM_EXPORTED_NAME.
4838 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4839 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4840 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4841 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4842 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4843 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4844 EXTERN_C_PUSH/EXTERN_C_POP.
4845 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4846 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4847 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4848 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4849 (traceframe_write_count, traceframe_read_count)
4850 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4851 (about_to_request_buffer_space, get_trace_state_variable_value)
4852 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4853 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4854 EXTERN_C_PUSH/EXTERN_C_POP.
4855 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4856 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4857 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4858 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4859 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4860 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4861 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4862 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4864 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4865 (IP_AGENT_EXPORT_VAR_DECL): Define.
4867 (gdb_agent_get_raw_reg): Declare.
4869 2015-02-27 Tom Tromey <tromey@redhat.com>
4870 Pedro Alves <palves@redhat.com>
4872 Rename symbols whose names are reserved C++ keywords throughout.
4874 2015-02-27 Pedro Alves <palves@redhat.com>
4876 * Makefile.in (COMPILER): New, get it from autoconf.
4877 (CXX): Get from autoconf instead.
4878 (COMPILE.pre): Use COMPILER.
4879 (CC-LD): Rename to ...
4880 (CC_LD): ... this. Use COMPILER.
4881 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4882 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4883 * acinclude.m4: Include build-with-cxx.m4.
4884 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4885 Disable -Werror by default if building in C++ mode.
4886 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4887 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4888 the C++ compiler. Save/restore CXXFLAGS too.
4889 * configure: Regenerate.
4891 2015-02-27 Pedro Alves <palves@redhat.com>
4893 * acinclude.m4: Include libiberty.m4.
4894 * configure.ac: Call libiberty_INIT.
4895 * config.in, configure: Regenerate.
4897 2015-02-26 Pedro Alves <palves@redhat.com>
4899 * linux-low.c (linux_wait_1): When incrementing the PC past a
4900 program breakpoint always use the_low_target.breakpoint_len as
4901 increment, rather than the maximum between that and
4902 the_low_target.decr_pc_after_break.
4904 2015-02-23 Pedro Alves <palves@redhat.com>
4906 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4907 thread was doing a step-over; always adjust the PC if
4908 we stepped over a permanent breakpoint.
4909 (linux_wait_1): If we stepped over breakpoint that was on top of a
4910 permanent breakpoint, manually advance the PC past it.
4912 2015-02-23 Pedro Alves <palves@redhat.com>
4914 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4916 (x86_fill_gregset, x86_store_gregset): Use it when handling
4919 2015-02-20 Pedro Alves <palves@redhat.com>
4921 * thread-db.c: Include "nat/linux-procfs.h".
4922 (thread_db_init): Skip listing new threads if the kernel supports
4923 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4925 2015-02-20 Pedro Alves <palves@redhat.com>
4927 * linux-low.c (status_pending_p_callback): Use ptid_match.
4929 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4931 PR breakpoints/16812
4932 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4933 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4934 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4936 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4938 PR breakpoints/15956
4939 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4941 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4943 * linux-low.c (linux_low_btrace_conf): Print size.
4944 * server.c (handle_btrace_conf_general_set): New.
4945 (hanle_general_set): Call handle_btrace_conf_general_set.
4946 (handle_query): Report Qbtrace-conf:bts:size as supported.
4948 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4950 * linux-low.c (linux_low_enable_btrace): Update parameters.
4951 (linux_low_btrace_conf): New.
4952 (linux_target_ops)<to_btrace_conf>: Initialize.
4953 * server.c (current_btrace_conf): New.
4954 (handle_btrace_enable): Rename to ...
4955 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4956 to target_enable_btrace. Update comment. Update users.
4957 (handle_qxfer_btrace_conf): New.
4958 (qxfer_packets): Add btrace-conf entry.
4959 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4960 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4961 (target_ops)<read_btrace_conf>: New.
4962 (target_enable_btrace): Update parameters.
4963 (target_read_btrace_conf): New.
4965 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4967 * server.c (handle_btrace_general_set): Remove call to
4968 target_supports_btrace.
4969 (supported_btrace_packets): New.
4970 (handle_query): Call supported_btrace_packets.
4971 * target.h: include btrace-common.h.
4972 (btrace_target_info): Removed.
4973 (supports_btrace, target_supports_btrace): Update parameters.
4975 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4977 * Makefile.in (SFILES): Add common/btrace-common.c.
4978 (OBS): Add common/btrace-common.o.
4979 (btrace-common.o): Add build rules.
4980 * linux-low: Include btrace-common.h.
4981 (linux_low_read_btrace): Use struct btrace_data. Call
4982 btrace_data_init and btrace_data_fini.
4984 2015-02-06 Pedro Alves <palves@redhat.com>
4986 * thread-db.c (find_new_threads_callback): Add debug output.
4988 2015-02-04 Pedro Alves <palves@redhat.com>
4990 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4991 (resume_stopped_resumed_lwps): New function.
4992 (linux_wait_for_event_filtered): Use it.
4994 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4996 * Makefile.in (SFILES): Add linux-personality.c.
4997 (linux-personality.o): New rule.
4998 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4999 list of objects to be built.
5000 * linux-low.c: Include nat/linux-personality.h.
5001 (linux_create_inferior): Remove code to disable address space
5002 randomization (moved to ../nat/linux-personality.c). Create
5003 cleanup to disable address space randomization.
5005 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5007 * Makefile.in (posix-strerror.o): New rule.
5008 (mingw-strerror.o): Likewise.
5009 * configure: Regenerated.
5010 * configure.ac: Source file ../common/common.host. Initialize new
5011 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5013 2015-01-14 Yao Qi <yao@codesourcery.com>
5015 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5016 (ppc-linux.o): New rule.
5017 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5018 * configure.ac: AC_CHECK_FUNCS(getauxval).
5019 * config.in: Re-generated.
5020 * configure: Re-generated.
5021 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5022 ppc64_64bit_inferior_p
5024 2015-01-14 Yao Qi <yao@codesourcery.com>
5026 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5027 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5028 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5029 (PT_ORIG_R3, PT_TRAP): Likewise.
5030 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5031 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5032 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5034 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5036 * i387-fp.c (i387_cache_to_xsave): In look over
5037 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5038 zmmh_low_space field by use of zmmh_high_space.
5040 2015-01-09 Pedro Alves <palves@redhat.com>
5042 * linux-low.c (step_over_bkpt): Move higher up in the file.
5043 (handle_extended_wait): Don't store the stop_pc here.
5044 (get_stop_pc): Adjust comments and rename to ...
5045 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5046 stopped for a software breakpoint or hardware breakpoint.
5047 (thread_still_has_status_pending_p): New function.
5048 (status_pending_p_callback): Use
5049 thread_still_has_status_pending_p. If the event is no longer
5050 interesting, resume the LWP.
5051 (handle_tracepoints): Add assert.
5052 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5053 (wstatus_maybe_breakpoint): New function.
5054 (cancel_breakpoint): Delete function.
5055 (check_stopped_by_watchpoint): New function, factored out from
5056 linux_low_filter_event.
5057 (lp_status_maybe_breakpoint): Delete function.
5058 (linux_low_filter_event): Remove filter_ptid argument.
5059 Leave thread group exits pending here. Store the LWP's stop PC.
5060 Always leave events pending.
5061 (linux_wait_for_event_filtered): Pull all events out of the
5062 kernel, and leave them all pending.
5063 (count_events_callback, select_event_lwp_callback): Consider all
5065 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5066 (select_event_lwp): Only give preference to the stepping LWP in
5067 all-stop mode. Adjust comments.
5068 (ignore_event): New function.
5069 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5070 references to cancel_breakpoints. Adjust to renames. Also give
5071 equal priority to all LWPs that have had events in non-stop mode.
5072 If reporting a software breakpoint event, unadjust the LWP's PC.
5073 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5074 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5076 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5077 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5078 (linux_stopped_by_watchpoint): Adjust.
5079 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5080 * linux-low.h (enum lwp_stop_reason): New.
5081 (struct lwp_info) <stop_pc>: Adjust comment.
5082 <stopped_by_watchpoint>: Delete field.
5083 <stop_reason>: New field.
5084 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5085 * mem-break.c (software_breakpoint_inserted_here)
5086 (hardware_breakpoint_inserted_here): New function.
5087 * mem-break.h (software_breakpoint_inserted_here)
5088 (hardware_breakpoint_inserted_here): Declare.
5089 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5090 (cancel_breakpoints): Delete.
5091 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5092 (upload_fast_traceframes): Remove references to
5095 2015-01-09 Pedro Alves <palves@redhat.com>
5097 * thread-db.c (find_new_threads_callback): Ignore thread if the
5098 kernel thread ID is -1.
5100 2015-01-09 Pedro Alves <palves@redhat.com>
5102 * linux-low.c (linux_attach_fail_reason_string): Move to
5103 nat/linux-ptrace.c, and rename.
5104 (linux_attach_lwp): Update comment.
5105 (attach_proc_task_lwp_callback): New function.
5106 (linux_attach): Adjust to rename and use
5107 linux_proc_attach_tgid_threads.
5108 (linux_attach_fail_reason_string): Delete declaration.
5110 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5112 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5113 * server.c (gdbserver_version): Likewise.
5115 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5117 * remote-utils.c: Include ctype.h.
5118 (input_interrupt): Explicitly handle the case when the char
5119 received is the NUL byte. Improve the printing of non-ASCII
5122 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5124 * linux-low.c (linux_low_filter_event): Update call to
5125 linux_enable_event_reporting following the addition of
5126 a new parameter to that function.
5128 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5131 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5132 (AARCH64_FPCR_REGNO): Likewise.
5133 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5134 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5135 (aarch64_store_fpregset): Likewise.
5137 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5139 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5140 Remove FIXME comment about assumption about N.
5142 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5144 * configure.ac: If large-file support is disabled in GDBserver,
5145 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5146 * configure: Regenerate.
5148 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5150 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5151 warning upon ENODATA from ptrace.
5152 * linux-s390-low.c (s390_store_tdb): New.
5153 (s390_regsets): Add regset for NT_S390_TDB.
5155 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5157 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5158 without a fill_function.
5159 * linux-s390-low.c (s390_fill_last_break): Remove.
5160 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5161 (s390_arch_setup): Use regset's size instead of fill_function for
5164 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5166 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5167 the regset's store function when ptrace returned an error.
5168 * regcache.c (get_thread_regcache): Invalidate register cache
5169 before fetching inferior's registers.
5171 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5173 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5174 while-loop as for-loop.
5175 (regsets_store_inferior_registers): Likewise.
5177 2014-11-28 Yao Qi <yao@codesourcery.com>
5179 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5180 * config.in, configure: Re-generate.
5181 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5184 2014-11-21 Yao Qi <yao@codesourcery.com>
5186 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5187 (AC_CHECK_HEADERS): Remove malloc.h.
5188 * configure: Re-generated.
5189 * config.in: Re-generated.
5190 * server.h: Don't include alloca.h and malloc.h.
5191 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5192 Don't include malloc.h.
5194 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5196 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5197 corresponding ERRNO check in same block.
5199 2014-11-12 Pedro Alves <palves@redhat.com>
5201 * server.c (cont_thread): Update comment.
5202 (start_inferior, attach_inferior): No longer clear cont_thread.
5203 (handle_v_cont): No longer set cont_thread.
5204 (captured_main): Clear cont_thread each time a GDB connects.
5206 2014-11-12 Pedro Alves <palves@redhat.com>
5208 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5209 thread, and don't resume all threads if the Hc thread has exited.
5211 2014-11-12 Pedro Alves <palves@redhat.com>
5213 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5214 the process group instead of to a specific LWP.
5216 2014-10-15 Pedro Alves <palves@redhat.com>
5219 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5221 (arm_set_thread_context): Delete.
5222 (the_low_target): Adjust.
5223 * win32-i386-low.c (debug_registers_changed)
5224 (debug_registers_used): Delete.
5225 (update_debug_registers_callback): New function.
5226 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5227 needing to update their debug registers.
5228 (win32_get_current_dr): New function.
5229 (x86_dr_low_get_addr, x86_dr_low_get_control)
5230 (x86_dr_low_get_status): Fetch the debug register from the thread
5232 (i386_initial_stuff): Adjust.
5233 (i386_get_thread_context): Remove current_event parameter. Don't
5234 clear debug_registers_changed nor copy DR values to
5236 (i386_set_thread_context): Delete.
5237 (i386_prepare_to_resume): New function.
5238 (i386_thread_added): Mark the thread as needing to update irs
5240 (the_low_target): Remove i386_set_thread_context and install
5241 i386_prepare_to_resume.
5242 * win32-low.c (win32_get_thread_context): Adjust.
5243 (win32_set_thread_context): Use SetThreadContext
5245 (win32_prepare_to_resume): New function.
5246 (win32_require_context): New function, factored out from ...
5247 (thread_rec): ... this.
5248 (continue_one_thread): Call win32_prepare_to_resume on each thread
5249 we're about to continue.
5250 (win32_resume): Call win32_prepare_to_resume on the event thread.
5251 * win32-low.h (struct win32_thread_info)
5252 <debug_registers_changed>: New field.
5253 (struct win32_target_ops): Change prototype of set_thread_context,
5254 delete set_thread_context and add prepare_to_resume.
5255 (win32_require_context): New declaration.
5257 2014-10-08 Gary Benson <gbenson@redhat.com>
5259 * server.h: Do not include common-exceptions.h.
5261 2014-10-08 Gary Benson <gbenson@redhat.com>
5263 * server.h: Do not include cleanups.h.
5265 2014-09-30 James Hogan <james.hogan@imgtec.com>
5267 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5270 2014-09-23 Yao Qi <yao@codesourcery.com>
5272 * linux-low.c (lp_status_maybe_breakpoint): New function.
5273 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5274 (count_events_callback): Likewise.
5275 (select_event_lwp_callback): Likewise.
5276 (cancel_breakpoints_callback): Likewise.
5278 2014-09-19 Don Breazeal <donb@codesourcery.com>
5280 * linux-low.c (handle_extended_wait): Call
5281 linux_ptrace_get_extended_event.
5282 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5283 linux_is_extended_waitstatus.
5285 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5287 * Makefile.in (CPPFLAGS): Define.
5288 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5289 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5291 2014-09-16 Gary Benson <gbenson@redhat.com>
5293 * inferiors.h (current_inferior): Renamed as...
5294 (current_thread): New variable. All uses updated.
5295 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5296 (maybe_move_out_of_jump_pad): Likewise.
5297 (cancel_breakpoint): Likewise.
5298 (linux_low_filter_event): Likewise.
5299 (wait_for_sigstop): Likewise.
5300 (linux_resume_one_lwp): Likewise.
5301 (need_step_over_p): Likewise.
5302 (start_step_over): Likewise.
5303 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5304 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5305 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5306 and save_inferior as saved_thread.
5307 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5309 (regcache_invalidate_thread): Likewise.
5310 * remote-utils.c (prepare_resume_reply): Likewise.
5311 * thread-db.c (thread_db_get_tls_address): Likewise.
5312 (disable_thread_event_reporting): Likewise.
5313 (remove_thread_event_breakpoints): Likewise.
5314 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5316 * target.h (set_desired_inferior): Renamed as...
5317 (set_desired_thread): New declaration. All uses updated.
5318 * server.c (myresume): Updated comment to reference thread instead
5320 (handle_serial_event): Likewise.
5321 (handle_target_event): Likewise.
5323 2014-09-12 Tom Tromey <tromey@redhat.com>
5324 Gary Benson <gbenson@redhat.com>
5326 * regcache.h: Include common-regcache.h.
5327 (regcache_read_pc): Don't declare.
5328 * regcache.c (get_thread_regcache_for_ptid): New function.
5330 2014-09-11 Tom Tromey <tromey@redhat.com>
5331 Gary Benson <gbenson@redhat.com>
5333 * symbol.c: New file.
5334 * Makefile.in (SFILES): Add symbol.c.
5335 (OBS): Add symbol.o.
5337 2014-09-11 Gary Benson <gbenson@redhat.com>
5339 * target.c (target_stop_ptid, target_continue_ptid): New
5342 2014-09-11 Tom Tromey <tromey@redhat.com>
5343 Gary Benson <gbenson@redhat.com>
5345 * target.h: Include target/target.h.
5346 * target.c (target_read_memory, target_read_uint32)
5347 (target_write_memory): New functions.
5349 2014-09-11 Gary Benson <gbenson@redhat.com>
5351 * server.h (debug_hw_points): Don't declare.
5352 * server.c (debug_hw_points): Don't define. Replace all uses
5353 with show_debug_regs.
5354 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5355 all uses with show_debug_regs.
5357 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5359 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5360 endianness into account.
5361 (ppc_supply_ptrace_register): Likewise.
5363 2014-09-03 James Hogan <james.hogan@imgtec.com>
5365 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5366 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5368 2014-09-03 Gary Benson <gbenson@redhat.com>
5370 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5371 ALL_DEBUG_ADDRESS_REGISTERS.
5373 2014-09-02 Gary Benson <gbenson@redhat.com>
5375 * i386-low.h: Renamed as...
5376 * x86-low.h: New file. All type, function and variable name
5377 prefixes changed from "i386_" to "x86_". All references updated.
5378 * i386-low.c: Renamed as...
5379 * x86-low.c: New file. All type, function and variable name
5380 prefixes changed from "i386_" to "x86_". All references updated.
5382 2014-09-02 Gary Benson <gbenson@redhat.com>
5384 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5385 (x86_linux_new_thread): Likewise.
5387 2014-08-29 Gary Benson <gbenson@redhat.com>
5389 * server.h (setjmp.h): Do not include.
5390 (toplevel): Do not declare.
5391 (common-exceptions.h): Include.
5392 (cleanups.h): Likewise.
5393 * server.c (toplevel): Do not define.
5394 (exit_code): New static global.
5395 (detach_or_kill_for_exit_cleanup): New function.
5396 (main): New function. Original main renamed to...
5397 (captured_main): New function.
5398 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5400 2014-08-29 Gary Benson <gbenson@redhat.com>
5402 * Makefile.in (SFILES): Add common/common-exceptions.c.
5403 (OBS): Add common-exceptions.o.
5404 (common-exceptions.o): New rule.
5405 * utils.c (prepare_to_throw_exception): New function.
5407 2014-08-29 Gary Benson <gbenson@redhat.com>
5409 * config.in: Regenerate.
5410 * configure: Likewise.
5412 2014-08-29 Gary Benson <gbenson@redhat.com>
5414 * Makefile.in (SFILES): Add common/cleanups.c.
5416 (cleanups.o): New rule.
5418 2014-08-29 Gary Benson <gbenson@redhat.com>
5420 * utils.c (internal_vwarning): New function.
5422 2014-08-28 Gary Benson <gbenson@redhat.com>
5424 * utils.h (fatal): Remove declaration.
5425 * utils.c (fatal): Remove function.
5427 2014-08-28 Gary Benson <gbenson@redhat.com>
5429 * tracepoint.c (gdb_agent_init): Replace fatal with
5431 (initialize_tracepoint): Likewise.
5433 2014-08-28 Gary Benson <gbenson@redhat.com>
5435 * remote-utils.c (remote_prepare): Replace fatal with error.
5437 2014-08-28 Gary Benson <gbenson@redhat.com>
5439 * linux-low.c (linux_async): Replace fatal with warning.
5441 (linux_start_non_stop): Return -1 if linux_async failed.
5443 2014-08-28 Gary Benson <gbenson@redhat.com>
5445 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5447 (i386_dr_low_get_addr): Remove vague comment.
5448 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5451 2014-08-28 Gary Benson <gbenson@redhat.com>
5453 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5454 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5456 (linux_resume_one_lwp): Likewise.
5457 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5459 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5460 with internal_error.
5461 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5462 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5463 (find_register_by_name): Replace fatal with internal_error.
5464 (find_regno): Likewise.
5465 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5466 * thread-db.c (thread_db_create_event): Likewise.
5467 (thread_db_load_search): Likewise.
5468 (try_thread_db_load_1): Likewise.
5469 * tracepoint.c (get_jump_space_head): Replace fatal with
5471 (claim_trampoline_space): Likewise.
5472 (have_fast_tracepoint_trampoline_buffer): Likewise.
5473 (cmd_qtstart): Likewise.
5474 (stop_tracing): Likewise.
5475 (fast_tracepoint_collecting): Likewise.
5476 (target_malloc): Likewise.
5477 (download_tracepoint): Likewise.
5478 (download_trace_state_variables): Replace check with gdb_assert.
5479 (upload_fast_traceframes): Replace fatal with internal_error.
5481 2014-08-19 Tom Tromey <tromey@redhat.com>
5482 Gary Benson <gbenson@redhat.com>
5484 * Makefile.in (SFILES): Add common/common-debug.c.
5485 (OBS): Add common-debug.o.
5486 (common-debug.o): New rule.
5487 * debug.h (debug_printf): Don't declare.
5488 * debug.c (debug_printf): Renamed and rewritten as...
5489 (debug_vprintf): New function.
5491 2014-08-19 Gary Benson <gbenson@redhat.com>
5493 * utils.h: Do not include print-utils.h.
5495 2014-08-19 Tom Tromey <tromey@redhat.com>
5496 Gary Benson <gbenson@redhat.com>
5498 * server.h: Add static assertion.
5499 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5501 2014-08-19 Tom Tromey <tromey@redhat.com>
5502 Gary Benson <gbenson@redhat.com>
5504 * Makefile.in (SFILES): Add common/errors.c.
5505 (OBS): Add errors.o.
5506 (IPA_OBS): Add errors-ipa.o.
5507 (errors.o): New rule.
5508 (errors-ipa.o): Likewise.
5509 * utils.h (perror_with_name, error, warning): Don't declare.
5510 * utils.c (warning): Renamed and rewritten as...
5511 (vwarning): New function.
5512 (error): Renamed and rewritten as...
5513 (verror): New function.
5514 (internal_error): Renamed and rewritten as...
5515 (internal_verror): New function.
5517 2014-08-07 Gary Benson <gbenson@redhat.com>
5519 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5520 * configure: Regenerate.
5521 * config.in: Likewise.
5522 * server.h: Do not include errno.h.
5523 * event-loop.c: Likewise.
5524 * hostio-errno.c: Likewise.
5525 * linux-low.c: Likewise.
5526 * remote-utils.c: Likewise.
5527 * spu-low.c: Likewise.
5528 * utils.c: Likewise.
5529 * gdbreplay.c: Unconditionally include errno.h.
5531 2014-08-07 Gary Benson <gbenson@redhat.com>
5533 * server.h: Do not include string.h.
5534 * event-loop.c: Likewise.
5535 * linux-low.c: Likewise.
5536 * regcache.c: Likewise.
5537 * remote-utils.c: Likewise.
5538 * spu-low.c: Likewise.
5539 * utils.c: Likewise.
5541 2014-08-07 Gary Benson <gbenson@redhat.com>
5543 * server.h: Do not include gdb_assert.h.
5545 2014-08-07 Gary Benson <gbenson@redhat.com>
5547 * server.h: Do not include common-utils.h.
5549 2014-08-07 Gary Benson <gbenson@redhat.com>
5551 * server.h: Do not include ptid.h.
5552 * notif.h: Likewise.
5554 2014-08-07 Gary Benson <gbenson@redhat.com>
5556 * server.h: Do not include gdb_locale.h.
5558 2014-08-07 Gary Benson <gbenson@redhat.com>
5560 * server.h: Do not include gdb/signals.h.
5561 * win32-low.c: Likewise.
5563 2014-08-07 Gary Benson <gbenson@redhat.com>
5565 * server.h: Do not include pathmax.h.
5567 2014-08-07 Gary Benson <gbenson@redhat.com>
5569 * server.h: Do not include libiberty.h.
5570 * linux-bfin-low.c: Likewise.
5572 2014-08-07 Gary Benson <gbenson@redhat.com>
5574 * server.h: Do not include ansidecl.h.
5576 2014-08-07 Gary Benson <gbenson@redhat.com>
5578 * linux-x86-low.c: Do not include stddef.h.
5579 * lynx-ppc-low.c: Likewise.
5580 * tracepoint.c: Likewise.
5582 2014-08-07 Gary Benson <gbenson@redhat.com>
5584 * server.h: Do not include stdarg.h.
5585 * nto-low.c: Likewise.
5587 2014-08-07 Gary Benson <gbenson@redhat.com>
5589 * server.h: Do not include stdlib.h.
5590 * inferiors.c: Likewise.
5591 * linux-low.c: Likewise.
5592 * regcache.c: Likewise.
5593 * spu-low.c: Likewise.
5594 * tracepoint.c: Likewise.
5595 * utils.c: Likewise.
5597 2014-08-07 Gary Benson <gbenson@redhat.com>
5599 * server.h: Do not include stdio.h.
5600 * linux-low.c: Likewise.
5601 * remote-utils.c: Likewise.
5602 * spu-low.c: Likewise.
5603 * utils.c: Likewise.
5604 * wincecompat.c: Likewise.
5606 2014-08-06 Gary Benson <gbenson@redhat.com>
5608 * regcache.c (init_register_cache): Move conditionals inside if.
5610 2014-08-06 Gary Benson <gbenson@redhat.com>
5612 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5614 2014-07-31 Gary Benson <gbenson@redhat.com>
5616 * ax.h: Do not include server.h.
5617 * gdbthread.h: Likewise.
5618 * lynx-low.h: Likewise.
5619 * notif.h: Likewise.
5621 2014-07-30 Gary Benson <gbenson@redhat.com>
5623 * server.h: Include common-defs.h.
5624 Do not include config.h or build-gnulib-gdbserver/config.h.
5626 2014-07-30 Gary Benson <gbenson@redhat.com>
5628 * hostio-errno.c: Move server.h to top of includes list.
5629 * inferiors.c: Likewise.
5630 * linux-x86-low.c: Likewise.
5631 * notif.c: Include server.h.
5633 2014-07-24 Tom Tromey <tromey@redhat.com>
5634 Gary Benson <gbenson@redhat.com>
5636 * server.h (CORE_ADDR): Now unsigned.
5638 2014-07-16 Pedro Alves <palves@redhat.com>
5640 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5642 2014-07-15 Pedro Alves <palves@redhat.com>
5644 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5647 2014-07-11 Pedro Alves <palves@redhat.com>
5649 * linux-low.c (kill_wait_lwp): New function, based on
5650 kill_one_lwp_callback, but use my_waitpid directly.
5651 (kill_one_lwp_callback, linux_kill): Use it.
5653 2014-06-23 Pedro Alves <palves@redhat.com>
5655 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5656 before setting DR0..DR3.
5658 2014-06-20 Gary Benson <gbenson@redhat.com>
5660 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5661 * configure: Regenerated.
5662 * config.in: Likewise.
5664 2014-06-20 Gary Benson <gbenson@redhat.com>
5666 * Makefile.in (SFILES): Update locations for files moved
5668 (object file files): Reordered.
5670 2014-06-20 Gary Benson <gbenson@redhat.com>
5672 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5673 (i386_dr_low_set_addr): Likewise.
5674 (i386_dr_low_get_addr): Likewise.
5675 (i386_dr_low_can_set_control): Likewise.
5676 (i386_dr_low_set_control): Likewise.
5677 (i386_dr_low_get_control): Likewise.
5678 (i386_dr_low_get_status): Likewise.
5679 (i386_get_debug_register_length): Likewise.
5680 * linux-x86-low.c (i386_dr_low_set_addr):
5681 Changed signature. Made static.
5682 (i386_dr_low_get_addr): Likewise.
5683 (i386_dr_low_set_control): Likewise.
5684 (i386_dr_low_get_control): Likewise.
5685 (i386_dr_low_get_status): Likewise.
5686 (i386_dr_low): New global variable.
5687 * win32-i386-low.c (i386_dr_low_set_addr):
5688 Changed signature. Made static.
5689 (i386_dr_low_get_addr): Likewise.
5690 (i386_dr_low_set_control): Likewise.
5691 (i386_dr_low_get_control): Likewise.
5692 (i386_dr_low_get_status): Likewise.
5693 (i386_dr_low): New global variable.
5695 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5697 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5698 * Makefile.in (AR, AR_FLAGS): Define.
5699 * configure: Regenerate.
5701 2014-06-19 Gary Benson <gbenson@redhat.com>
5703 * Makefile.in (i386-dregs.o): New rule.
5704 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5705 * i386-low.c (target.h): Remove include.
5706 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5707 (DR_CONTROL_SHIFT): Likewise.
5708 (DR_CONTROL_SIZE): Likewise.
5709 (DR_RW_EXECUTE): Likewise.
5710 (DR_RW_WRITE): Likewise.
5711 (DR_RW_READ): Likewise.
5712 (DR_RW_IORW): Likewise.
5713 (DR_LEN_1): Likewise.
5714 (DR_LEN_2): Likewise.
5715 (DR_LEN_4): Likewise.
5716 (DR_LEN_8): Likewise.
5717 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5718 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5719 (DR_ENABLE_SIZE): Likewise.
5720 (DR_LOCAL_SLOWDOWN): Likewise.
5721 (DR_GLOBAL_SLOWDOWN): Likewise.
5722 (DR_CONTROL_RESERVED): Likewise.
5723 (I386_DR_CONTROL_MASK): Likewise.
5724 (I386_DR_VACANT): Likewise.
5725 (I386_DR_LOCAL_ENABLE): Likewise.
5726 (I386_DR_GLOBAL_ENABLE): Likewise.
5727 (I386_DR_DISABLE): Likewise.
5728 (I386_DR_SET_RW_LEN): Likewise.
5729 (I386_DR_GET_RW_LEN): Likewise.
5730 (I386_DR_WATCH_HIT): Likewise.
5731 (i386_wp_op_t): Likewise.
5732 (i386_show_dr): Likewise.
5733 (i386_length_and_rw_bits): Likewise.
5734 (i386_insert_aligned_watchpoint): Likewise.
5735 (i386_remove_aligned_watchpoint): Likewise.
5736 (i386_handle_nonaligned_watchpoint): Likewise.
5737 i386_update_inferior_debug_regs(): Likewise.
5738 (i386_dr_insert_watchpoint): Likewise.
5739 (i386_dr_remove_watchpoint): Likewise.
5740 (i386_dr_region_ok_for_watchpoint): Likewise.
5741 (i386_dr_stopped_data_address): Likewise.
5742 (i386_dr_stopped_by_watchpoint): Likewise.
5744 2014-06-19 Gary Benson <gbenson@redhat.com>
5746 * i386-low.c (i386_dr_show): Renamed to
5747 i386_show_dr and made static. All uses updated.
5748 (i386_dr_length_and_rw_bits): Renamed to
5749 i386_length_and_rw_bits and made static.
5751 (i386_dr_insert_aligned_watchpoint): Renamed to
5752 i386_insert_aligned_watchpoint and made static.
5754 (i386_dr_remove_aligned_watchpoint): Renamed to
5755 i386_remove_aligned_watchpoint and made static.
5757 (i386_dr_update_inferior_debug_regs): Renamed to
5758 i386_update_inferior_debug_regs and made static.
5761 2014-06-18 Gary Benson <gbenson@redhat.com>
5763 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5764 (i386_dr_low_can_set_control): Likewise.
5765 (i386_get_debug_register_length): Likewise.
5766 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5767 (i386_dr_low_can_set_control): Likewise.
5768 (i386_get_debug_register_length): Likewise.
5770 2014-06-17 Gary Benson <gbenson@redhat.com>
5772 * i386-low.h (i386-dregs.h): New include.
5773 (DR_FIRSTADDR): Now in i386-dregs.h.
5774 (DR_LASTADDR): Likewise.
5775 (DR_NADDR): Likewise.
5776 (DR_STATUS): Likewise.
5777 (DR_CONTROL): Likewise.
5778 (i386_debug_reg_state): Likewise.
5779 (i386_dr_insert_watchpoint): Likewise.
5780 (i386_dr_remove_watchpoint): Likewise.
5781 (i386_dr_region_ok_for_watchpoint): Likewise.
5782 (i386_dr_stopped_data_address): Likewise.
5783 (i386_dr_stopped_by_watchpoint): Likewise.
5784 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5786 2014-06-18 Gary Benson <gbenson@redhat.com>
5788 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5789 i386_dr_insert_watchpoint.
5790 (i386_low_remove_watchpoint): Renamed to
5791 i386_dr_remove_watchpoint.
5792 (i386_low_region_ok_for_watchpoint): Renamed to
5793 i386_dr_region_ok_for_watchpoint.
5794 (i386_low_stopped_data_address): Renamed to
5795 i386_dr_stopped_data_address.
5796 (i386_low_stopped_by_watchpoint): Renamed to
5797 i386_dr_stopped_by_watchpoint.
5798 * i386-low.c (i386_show_dr): Renamed to
5799 i386_dr_show and made nonstatic. All uses updated.
5800 (i386_length_and_rw_bits): Renamed to
5801 i386_dr_length_and_rw_bits and made nonstatic.
5803 (i386_insert_aligned_watchpoint): Renamed to
5804 i386_dr_insert_aligned_watchpoint and made nonstatic.
5806 (i386_remove_aligned_watchpoint): Renamed to
5807 i386_dr_remove_aligned_watchpoint and made nonstatic.
5809 (i386_update_inferior_debug_regs): Renamed to
5810 i386_dr_update_inferior_debug_regs and made nonstatic.
5812 (i386_low_insert_watchpoint): Renamed to
5813 i386_dr_insert_watchpoint. All uses updated.
5814 (i386_low_remove_watchpoint): Renamed to
5815 i386_dr_remove_watchpoint. All uses updated.
5816 (i386_low_region_ok_for_watchpoint): Renamed to
5817 i386_dr_region_ok_for_watchpoint. All uses updated.
5818 (i386_low_stopped_data_address): Renamed to
5819 i386_dr_stopped_data_address. All uses updated.
5820 (i386_low_stopped_by_watchpoint): Renamed to
5821 i386_dr_stopped_by_watchpoint. All uses updated.
5823 2014-06-18 Gary Benson <gbenson@redhat.com>
5825 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5826 (i386_dr_low_can_set_control): Likewise.
5827 (i386_insert_aligned_watchpoint): New check.
5829 2014-06-18 Gary Benson <gbenson@redhat.com>
5831 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5834 2014-06-18 Gary Benson <gbenson@redhat.com>
5836 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5837 instead of fatal and error.
5838 (i386_handle_nonaligned_watchpoint): Likewise.
5840 2014-06-18 Gary Benson <gbenson@redhat.com>
5842 * i386-low.c (i386_get_debug_register_length): New macro.
5843 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5844 (i386_show_dr): Use debug_printf instead of fprintf. Use
5845 phex to format values.
5847 2014-06-18 Gary Benson <gbenson@redhat.com>
5849 * i386-low.h: Comment changes.
5850 * i386-low.c: Likewise.
5852 2014-06-18 Gary Benson <gbenson@redhat.com>
5854 * i386-low.c: Whitespace changes.
5856 2014-06-12 Tom Tromey <tromey@redhat.com>
5858 * utils.c (freeargv): Remove.
5860 2014-06-12 Tom Tromey <tromey@redhat.com>
5862 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5863 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5864 (parse_debug_format_options): Likewise.
5865 (gdbserver_usage): Likewise.
5866 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5867 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5868 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5870 ($(LIBGNU)): Depend on libiberty.
5871 (all-lib): Recurse into all subdirs.
5872 (install-only): Invoke "install" target in subdirs.
5873 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5875 * configure: Rebuild.
5876 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5877 for vasprintf, vsnprintf, or gettimeofday.
5878 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5881 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5883 * development.sh: Delete.
5884 * Makefile.in (config.status): Adjust dependency on development.sh.
5885 * configure.ac: Adjust development.sh source call.
5886 * configure: Regenerate.
5888 2014-06-02 Pedro Alves <palves@redhat.com>
5890 * ax.c (gdb_free_agent_expr): New function.
5891 * ax.h (gdb_free_agent_expr): New declaration.
5892 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5894 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5896 (clear_breakpoint_conditions_and_commands): New function.
5897 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5898 (clear_breakpoint_conditions_and_commands): New declaration.
5900 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5902 * linux-aarch64-low.c (asm/ptrace.h): Include.
5904 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5906 Fix TLS access for -static -pthread.
5907 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5908 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5909 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5911 2014-05-20 Pedro Alves <palves@redhat.com>
5913 * linux-aarch64-low.c (aarch64_insert_point)
5914 (aarch64_remove_point): No longer check whether the type is
5915 supported here. Adjust to new interface.
5916 (the_low_target): Install aarch64_supports_z_point_type as
5917 supports_z_point_type method.
5918 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5919 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5920 instead of a Z packet char. Adjust.
5921 (arm_supports_z_point_type): New function.
5922 (arm_insert_point, arm_remove_point): Adjust to new interface.
5923 (the_low_target): Install arm_supports_z_point_type.
5924 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5925 (cris_insert_point, cris_remove_point): Adjust to new interface.
5926 Don't check whether the type is supported here.
5927 (the_low_target): Install cris_supports_z_point_type.
5928 * linux-low.c (linux_supports_z_point_type): New function.
5929 (linux_insert_point, linux_remove_point): Adjust to new interface.
5930 * linux-low.h (struct linux_target_ops) <insert_point,
5931 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5932 raw_breakpoint pointer parameter.
5933 <supports_z_point_type>: New method.
5934 * linux-mips-low.c (mips_supports_z_point_type): New function.
5935 (mips_insert_point, mips_remove_point): Adjust to new interface.
5936 Use mips_supports_z_point_type.
5937 (the_low_target): Install mips_supports_z_point_type.
5938 * linux-ppc-low.c (the_low_target): Install NULL as
5939 supports_z_point_type method.
5940 * linux-s390-low.c (the_low_target): Install NULL as
5941 supports_z_point_type method.
5942 * linux-sparc-low.c (the_low_target): Install NULL as
5943 supports_z_point_type method.
5944 * linux-x86-low.c (x86_supports_z_point_type): New function.
5945 (x86_insert_point): Adjust to new insert_point interface. Use
5946 insert_memory_breakpoint. Adjust to new
5947 i386_low_insert_watchpoint interface.
5948 (x86_remove_point): Adjust to remove_point interface. Use
5949 remove_memory_breakpoint. Adjust to new
5950 i386_low_remove_watchpoint interface.
5951 (the_low_target): Install x86_supports_z_point_type.
5952 * lynx-low.c (lynx_target_ops): Install NULL as
5953 supports_z_point_type callback.
5954 * nto-low.c (nto_supports_z_point_type): New.
5955 (nto_insert_point, nto_remove_point): Adjust to new interface.
5956 (nto_target_ops): Install nto_supports_z_point_type.
5957 * mem-break.c: Adjust intro comment.
5958 (struct raw_breakpoint) <raw_type, size>: New fields.
5959 <inserted>: Update comment.
5960 <shlib_disabled>: Delete field.
5961 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5962 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5963 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5964 (raw_bkpt_type_to_target_hw_bp_type): New function.
5965 (find_enabled_raw_code_breakpoint_at): New function.
5966 (find_raw_breakpoint_at): New type and size parameters. Use them.
5967 (insert_memory_breakpoint): New function, based off
5968 set_raw_breakpoint_at.
5969 (remove_memory_breakpoint): New function.
5970 (set_raw_breakpoint_at): Reimplement.
5971 (set_breakpoint): New, based on set_breakpoint_at.
5972 (set_breakpoint_at): Reimplement.
5973 (delete_raw_breakpoint): Go through the_target->remove_point
5974 instead of assuming memory breakpoints.
5975 (find_gdb_breakpoint_at): Delete.
5976 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5977 (find_gdb_breakpoint): New function.
5978 (set_gdb_breakpoint_at): Delete.
5979 (z_type_supported): New function.
5980 (set_gdb_breakpoint_1): New function, loosely based off
5981 set_gdb_breakpoint_at.
5982 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5983 (delete_gdb_breakpoint_at): Delete.
5984 (delete_gdb_breakpoint_1): New function, loosely based off
5985 delete_gdb_breakpoint_at.
5986 (delete_gdb_breakpoint): New function.
5987 (clear_gdb_breakpoint_conditions): Rename to ...
5988 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5990 (add_condition_to_breakpoint): Make static.
5991 (add_breakpoint_condition): Take a struct breakpoint pointer
5992 instead of an address. Adjust.
5993 (gdb_condition_true_at_breakpoint): Rename to ...
5994 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5996 (gdb_condition_true_at_breakpoint): Reimplement.
5997 (add_breakpoint_commands): Take a struct breakpoint pointer
5998 instead of an address. Adjust.
5999 (gdb_no_commands_at_breakpoint): Rename to ...
6000 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6001 parameter. Return true if no breakpoint was found. Change debug
6003 (gdb_no_commands_at_breakpoint): Reimplement.
6004 (run_breakpoint_commands): Rename to ...
6005 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6006 and change return type to boolean.
6007 (run_breakpoint_commands): New function.
6008 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6009 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6010 breakpoint. Go through the_target->remove_point instead of
6011 assuming memory breakpoint.
6012 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6013 software and hardware breakpoints.
6014 (reinsert_raw_breakpoint): Go through the_target->insert_point
6015 instead of assuming memory breakpoint.
6016 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6017 software and hardware breakpoints.
6018 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6019 Check both software and hardware breakpoints.
6020 (validate_inserted_breakpoint): Assert the breakpoint is a
6021 software breakpoint. Set the inserted flag to -1 instead of
6022 setting shlib_disabled.
6023 (delete_disabled_breakpoints): Adjust.
6024 (validate_breakpoints): Only validate software breakpoints.
6025 Adjust to inserted flag change.
6026 (check_mem_read, check_mem_write): Skip breakpoint types other
6027 than software breakpoints. Adjust to inserted flag change.
6028 * mem-break.h (enum raw_bkpt_type): New enum.
6029 (raw_breakpoint, struct process_info): Forward declare.
6030 (Z_packet_to_target_hw_bp_type): Delete declaration.
6031 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6032 (set_gdb_breakpoint, delete_gdb_breakpoint)
6033 (clear_breakpoint_conditions): New declarations.
6034 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6035 (breakpoint_inserted_here): Update comment.
6036 (add_breakpoint_condition, add_breakpoint_commands): Replace
6037 address parameter with a breakpoint pointer parameter.
6038 (gdb_breakpoint_here): Update comment.
6039 (delete_gdb_breakpoint_at): Delete.
6040 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6041 * server.c (process_point_options): Take a struct breakpoint
6042 pointer instead of an address. Adjust.
6043 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6044 delete_gdb_breakpoint.
6045 * spu-low.c (spu_target_ops): Install NULL as
6046 supports_z_point_type method.
6047 * target.h: Include mem-break.h.
6048 (struct target_ops) <prepare_to_access_memory>: Update comment.
6049 <supports_z_point_type>: New field.
6050 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6051 instead of a char. Also take a raw breakpoint pointer.
6052 * win32-arm-low.c (the_low_target): Install NULL as
6053 supports_z_point_type.
6054 * win32-i386-low.c (i386_supports_z_point_type): New function.
6055 (i386_insert_point, i386_remove_point): Adjust to new interface.
6056 (the_low_target): Install i386_supports_z_point_type.
6057 * win32-low.c (win32_supports_z_point_type): New function.
6058 (win32_insert_point, win32_remove_point): Adjust to new interface.
6059 (win32_target_ops): Install win32_supports_z_point_type.
6060 * win32-low.h (struct win32_target_ops):
6061 <supports_z_point_type>: New method.
6062 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6063 instead of a char. Also take a raw breakpoint pointer.
6065 2014-05-20 Pedro Alves <palves@redhat.com>
6067 * mem-break.h: Include break-common.h.
6068 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6069 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6070 (Z_packet_to_target_hw_bp_type): New declaration.
6071 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6072 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6073 (Z_PACKET_ACCESS_WP): Delete macros.
6074 (Z_packet_to_hw_type): Delete function.
6075 * i386-low.h: Don't include break-common.h here.
6076 (Z_packet_to_hw_type): Delete declaration.
6077 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6078 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6079 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6080 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6081 * linux-aarch64-low.c: Don't include break-common.h here.
6082 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6083 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6084 (Z_packet_to_target_hw_bp_type): Delete function.
6085 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6087 (mips_insert_point, mips_remove_point): Use
6088 Z_packet_to_target_hw_bp_type.
6090 2014-05-20 Pedro Alves <palves@redhat.com>
6092 * linux-aarch64-low.c: Include break-common.h.
6093 (enum target_point_type): Delete.
6094 (Z_packet_to_point_type): Rename to ...
6095 (Z_packet_to_target_hw_bp_type): ... this, and return a
6096 target_hw_bp_type instead.
6097 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6098 instead of an enum target_point_type.
6099 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6101 (aarch64_dr_state_insert_one_point)
6102 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6103 (aarch64_handle_aligned_watchpoint)
6104 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6105 Take an enum target_hw_bp_type instead of an enum
6107 (aarch64_supports_z_point_type): New function.
6108 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6109 use Z_packet_to_target_hw_bp_type.
6111 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6113 * configure.ac: Only use -Werror by default when DEVELOPMENT
6115 * configure: Regenerate.
6117 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6119 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6120 * linux-x86-low.c (X86_64_USER_REGS): New.
6121 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6123 2014-04-28 Yao Qi <yao@codesourcery.com>
6125 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6128 2014-04-25 Pedro Alves <palves@redhat.com>
6131 * linux-low.c (linux_attach_fail_reason_string): New function.
6132 (linux_attach_lwp): Delete.
6133 (linux_attach_lwp_1): Rename to ...
6134 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6135 argument. Remove "initial" parameter. Return int instead of
6136 void. Don't error or warn here.
6137 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6138 failure to attach to the tgid. Call warning when failing to
6140 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6141 argument. Remove "initial" parameter. Return int instead of
6142 void. Don't error or warn here.
6143 (linux_attach_fail_reason_string): New declaration.
6144 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6145 interface change. Use linux_attach_fail_reason_string.
6147 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6148 Walfred Tedeschi <walfred.tedeschi@intel.com>
6150 * Makefile.in: Added rules to handle new files
6151 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6152 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6153 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6154 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6155 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6156 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6158 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6159 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6160 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6161 i386/x32-avx512.xml.
6162 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6163 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6164 i386/x32-avx512-linux.xml.
6165 * i387-fp.c (num_avx512_k_registers): New constant for number
6167 (num_avx512_zmmh_low_registers): New constant for number of
6168 lower ZMM registers (0-15).
6169 (num_avx512_zmmh_high_registers): New constant for number of
6170 higher ZMM registers (16-31).
6171 (num_avx512_ymmh_registers): New contant for number of higher
6172 YMM registers (ymm16-31 added by avx521 on x86_64).
6173 (num_avx512_xmm_registers): New constant for number of higher
6174 XMM registers (xmm16-31 added by AVX512 on x86_64).
6175 (struct i387_xsave): Add space for AVX512 registers.
6176 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6177 Add code to handle AVX512 registers.
6178 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6179 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6180 prototypei from generated file.
6181 (tdesc_amd64_avx512_linux): Likewise.
6182 (init_registers_x32_avx512_linux): Likewise.
6183 (tdesc_x32_avx512_linux): Likewise.
6184 (init_registers_i386_avx512_linux): Likewise.
6185 (tdesc_i386_avx512_linux): Likewise.
6186 (x86_64_regmap): Add AVX512 registers.
6187 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6189 (initialize_low_arch): Add code to initialize AVX512 registers.
6191 2014-04-23 Pedro Alves <palves@redhat.com>
6193 * mem-break.c (find_gdb_breakpoint_at): Make static.
6194 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6196 2014-04-23 Pedro Alves <palves@redhat.com>
6198 * i386-low.c: Don't include break-common.h here.
6199 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6200 prototype to take target_hw_bp_type as argument instead of a Z
6202 * i386-low.h: Include break-common.h here.
6203 (Z_packet_to_hw_type): Declare.
6204 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6206 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6207 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6208 (x86_remove_point): Convert the packet number to a
6209 target_hw_bp_type before calling i386_low_remove_watchpoint.
6210 * win32-i386-low.c (i386_insert_point): Convert the packet number
6211 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6212 (i386_remove_point): Convert the packet number to a
6213 target_hw_bp_type before calling i386_low_remove_watchpoint.
6215 2014-04-23 Pedro Alves <palves@redhat.com>
6217 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6219 2014-04-10 Pedro Alves <palves@redhat.com>
6221 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6222 Check if the condition or command is NULL before checking if the
6223 breakpoint is known. On success, return true.
6224 * mem-break.h (add_breakpoint_condition): Document return.
6225 (add_breakpoint_commands): Add describing comment.
6226 * server.c (skip_to_semicolon): New function.
6227 (process_point_options): Use it.
6229 2014-04-09 Pedro Alves <palves@redhat.com>
6231 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6234 2014-02-27 Pedro Alves <palves@redhat.com>
6237 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6239 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6241 (last_thread_of_process_p): Take a PID argument instead of a
6243 (linux_wait_for_lwp): Delete.
6244 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6246 (linux_low_filter_event): New function, party factored out from
6247 linux_wait_for_event.
6248 (linux_wait_for_event): Rename to ...
6249 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6250 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6251 sigsuspend. Check for zombie leaders.
6252 (linux_wait_for_event): Reimplement as wrapper around
6253 linux_wait_for_event_filtered.
6254 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6255 a normal or signal exit is seen, it's the whole process exiting.
6256 (wait_for_sigstop): No longer a for_each_inferior callback.
6257 Rewrite on top of linux_wait_for_event_filtered.
6258 (stop_all_lwps): Call wait_for_sigstop directly.
6259 * server.c (resume, handle_target_event): Handle
6260 TARGET_WAITKIND_NO_RESUMED.
6262 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6264 * win32-low.c (psapi_get_dll_name,
6265 * win32_CreateToolhelp32Snapshot): Delete.
6266 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6267 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6269 (handle_load_dll): Add function description.
6270 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6272 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6274 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6276 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6277 base address when calling win32_add_one_solib.
6278 (handle_load_dll): Delete local variable load_addr.
6279 Remove 0x1000 offset applied to DLL base address when calling
6280 win32_add_one_solib.
6281 (handle_unload_dll): Add comment.
6283 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6285 * win32-low.c (win32_add_all_dlls): Renames
6286 win32_ensure_ntdll_loaded. Rewrite function documentation.
6287 Adjust implementation to always load all DLLs.
6288 Add 0x1000 offset to DLL base address when calling
6289 win32_add_one_solib.
6290 (child_initialization_done): New static global.
6291 (do_initial_child_stuff): Set child_initialization_done to
6292 zero during child initialization, and 1 after. Replace call
6293 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6295 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6296 (handle_unload_dll): Add function documentation.
6297 (get_child_debug_event): Ignore load and unload DLL events
6298 during child initialization.
6300 2014-02-20 Doug Evans <dje@google.com>
6302 Remove global all_lwps.
6303 * inferiors.h (ptid_of): Move here from linux-low.h.
6304 (pid_of, lwpid_of): Ditto.
6305 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6306 parameter is a struct thread_info * now.
6307 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6308 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6309 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6311 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6312 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6313 * linux-arm-low.c (update_registers_callback): Update, "entry"
6314 parameter is a struct thread_info * now.
6315 Fetch lwpid from current_inferior directly.
6316 (arm_insert_point): Pass &all_threads to find_inferior instead of
6318 (arm_remove_point): Ditto.
6319 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6320 (arm_prepare_to_resume): Fetch pid from thread.
6321 (arm_read_description): Fetch lwpid from current_inferior directly.
6322 * linux-low.c (all_lwps): Delete.
6323 (delete_lwp): Delete call to remove_inferior.
6324 (handle_extended_wait): Fetch lwpid from thread.
6325 (add_lwp): Don't set lwp->entry.id. Remove call to
6326 add_inferior_to_list.
6327 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6328 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6329 (kill_one_lwp_callback): Ditto.
6330 (linux_kill): Don't dereference NULL pointer.
6331 Fetch ptid,lwpid from thread.
6332 (get_detach_signal): Fetch ptid from thread.
6333 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6334 Simplify call to regcache_invalidate_thread.
6335 (delete_lwp_callback): Update, "entry" parameter is a
6336 struct thread_info * now. Fetch pid from thread.
6337 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6338 (status_pending_p_callback): Update, "entry" parameter is a
6339 struct thread_info * now. Fetch ptid from thread.
6340 (find_lwp_pid): Update, "entry" parameter is a
6341 struct thread_info * now.
6342 (linux_wait_for_lwp): Fetch pid from thread.
6343 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6344 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6345 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6346 (dequeue_one_deferred_signal): Ditto.
6347 (cancel_breakpoint): Fetch ptid from current_inferior.
6348 (linux_wait_for_event): Pass &all_threads to find_inferior,
6349 not &all_lwps. Fetch ptid, lwpid from thread.
6350 (count_events_callback): Update, "entry" parameter is a
6351 struct thread_info * now.
6352 (select_singlestep_lwp_callback): Ditto.
6353 (select_event_lwp_callback): Ditto.
6354 (cancel_breakpoints_callback): Ditto.
6355 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6357 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6358 (unsuspend_one_lwp): Update, "entry" parameter is a
6359 struct thread_info * now.
6360 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6362 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6363 Fetch lwpid from thread, not lwp.
6364 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6365 Pass &all_threads to find_inferior, not &all_lwps.
6366 (send_sigstop): Fetch lwpid from thread, not lwp.
6367 (send_sigstop_callback): Update, "entry" parameter is a
6368 struct thread_info * now.
6369 (suspend_and_send_sigstop_callback): Ditto.
6370 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6371 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6372 struct thread_info * now.
6373 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6375 (lwp_running): Update, "entry" parameter is a
6376 struct thread_info * now.
6377 (stop_all_lwps): Fetch ptid from thread.
6378 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6379 (linux_resume_one_lwp): Fetch lwpid from thread.
6380 (linux_set_resume_request): Update, "entry" parameter is a
6381 struct thread_info * now. Fetch pid, lwpid from thread.
6382 (resume_status_pending_p): Update, "entry" parameter is a
6383 struct thread_info * now.
6384 (need_step_over_p): Ditto. Fetch lwpid from thread.
6385 (start_step_over): Fetch lwpid from thread.
6386 (linux_resume_one_thread): Update, "entry" parameter is a
6387 struct thread_info * now. Fetch lwpid from thread.
6388 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6389 (proceed_one_lwp): Update, "entry" parameter is a
6390 struct thread_info * now. Fetch lwpid from thread.
6391 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6392 struct thread_info * now.
6393 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6394 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6395 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6397 (regsets_store_inferior_registers): Ditto.
6398 (fetch_register, store_register): Ditto.
6399 (linux_read_memory, linux_write_memory): Ditto.
6400 (linux_request_interrupt): Ditto.
6401 (linux_read_auxv): Ditto.
6402 (linux_xfer_siginfo): Ditto.
6403 (linux_qxfer_spu): Ditto.
6404 (linux_qxfer_libraries_svr4): Ditto.
6405 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6406 moved to inferiors.h.
6408 (get_thread_lwp): Update.
6409 (struct lwp_info): Delete member "entry". Simplify comment for
6412 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6413 current_inferior directly.
6414 (update_watch_registers_callback): Update, "entry" parameter is a
6415 struct thread_info * now. Fetch pid from thread.
6416 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6417 (mips_insert_point): Fetch lwpid from current_inferior.
6418 Pass &all_threads to find_inferior, not &all_lwps.
6419 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6420 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6422 (mips_stopped_data_address): Ditto.
6423 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6425 * linux-tile-low.c (tile_arch_setup): Ditto.
6426 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6427 (update_debug_registers_callback): Update, "entry" parameter is a
6428 struct thread_info * now. Fetch pid from thread.
6429 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6430 Pass &all_threads to find_inferior, not &all_lwps.
6431 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6432 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6433 Pass &all_threads to find_inferior, not &all_lwps.
6434 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6435 (i386_dr_low_get_status): Ditto.
6436 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6437 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6438 (x86_linux_read_description): Ditto.
6439 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6441 2014-02-20 Doug Evans <dje@google.com>
6443 * inferiors.c (get_first_inferior): Fix buglet.
6445 2014-02-19 Doug Evans <dje@google.com>
6447 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6448 * inferiors.c (add_thread): Change result type to struct thread_info *.
6449 All callers updated.
6450 (add_lwp): Call add_thread here instead of in callers.
6451 All callers updated.
6452 * linux-low.h (get_lwp_thread): Rewrite.
6453 (struct lwp_info): New member "thread".
6455 2014-02-19 Doug Evans <dje@google.com>
6457 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6458 All callers updated.
6460 2014-02-19 Doug Evans <dje@google.com>
6462 * inferiors.c (add_thread): Fix whitespace.
6464 2014-02-19 Doug Evans <dje@google.com>
6466 * dll.c (clear_dlls): Replace accessing list implemention details
6468 * gdbthread.h (get_first_thread): Declare.
6469 * inferiors.c (for_each_inferior_with_data): New function.
6470 (get_first_thread): New function.
6471 (find_thread_ptid): Simplify.
6472 (get_first_inferior): New function.
6473 (clear_list): Delete.
6474 (one_inferior_p): New function.
6475 (clear_inferior_list): New function.
6476 (clear_inferiors): Update.
6477 * inferiors.h (for_each_inferior_with_data): Declare.
6478 (clear_inferior_list): Declare.
6479 (one_inferior_p): Declare.
6480 (get_first_inferior): Declare.
6481 * linux-low.c (linux_wait_for_event): Replace accessing list
6482 implemention details with API function.
6483 * server.c (target_running): Ditto.
6484 (accumulate_file_name_length): New function.
6485 (emit_dll_description): New function.
6486 (handle_qxfer_libraries): Replace accessing list implemention
6487 details with API function.
6488 (handle_qxfer_threads_worker): New function.
6489 (handle_qxfer_threads_proper): Replace accessing list implemention
6490 details with API function.
6491 (handle_query): Ditto.
6492 (visit_actioned_threads_callback_ftype): New typedef.
6493 (visit_actioned_threads_data): New struct.
6494 (visit_actioned_threads): Rewrite to be find_inferior callback.
6495 (resume): Call find_inferior.
6496 (handle_status): Replace accessing list implemention
6497 details with API function.
6498 (process_serial_event): Replace accessing list implemention details
6500 * target.c (set_desired_inferior): Replace accessing list implemention
6501 details with API function.
6502 * tracepoint.c (same_process_p): New function.
6503 (gdb_agent_about_to_close): Replace accessing list implemention
6504 details with API function.
6505 * win32-low.c (child_delete_thread): Replace accessing list
6506 implemention details with API function.
6507 (match_dll_by_basename): New function.
6508 (dll_is_loaded_by_basename): New function.
6509 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6510 details call to dll_is_loaded_by_basename.
6512 2014-02-19 Doug Evans <dje@google.com>
6514 * dll.h (struct dll_info): Add comment.
6515 * gdbthread.h (struct thread_info): Add comment.
6516 (current_ptid): Simplify.
6517 * inferiors.c (add_process): Update.
6518 (remove_process): Update.
6519 * inferiors.h (struct process_info): Rename member "head" to "entry".
6520 * linux-low.c (delete_lwp): Update.
6522 (last_thread_of_process_p): Update.
6523 (kill_one_lwp_callback, linux_kill): Update.
6524 (status_pending_p_callback): Update.
6525 (wait_for_sigstop): Update. Simplify read of ptid.
6526 (start_step_over): Update.
6527 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6528 (get_lwp_thread): Update.
6529 (struct lwp_info): Rename member "head" to "entry".
6530 * regcache.h (inferior_list_entry): Delete.
6531 * server.c (kill_inferior_callback): Update.
6532 (detach_or_kill_inferior_callback): Update.
6533 (print_started_pid): Update.
6534 (print_attached_pid): Update.
6535 (process_serial_event): Simplify read of ptid.
6536 * thread-db.c (thread_db_create_event): Update.
6537 (thread_db_get_tls_address): Update.
6538 * win32-low.c (current_inferior_ptid): Simplify.
6540 2014-02-19 Tom Tromey <tromey@redhat.com>
6542 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6544 (target_supports_btrace): Update.
6546 2014-02-14 Yao Qi <yao@codesourcery.com>
6548 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6549 (rsp-low-ipa.o): New target.
6551 2014-02-12 Tom Tromey <tromey@redhat.com>
6553 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6554 convert_ascii_to_int.
6555 * regcache.c (registers_to_string): Likewise.
6556 * remote-utils.c (decode_M_packet): Likewise.
6557 * server.c (process_serial_event): Likewise.
6559 2014-02-12 Tom Tromey <tromey@redhat.com>
6561 * server.c (handle_query, handle_v_run): Use hex2bin, not
6563 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6565 2014-02-12 Tom Tromey <tromey@redhat.com>
6567 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6568 convert_int_to_ascii.
6569 * regcache.c (registers_to_string, collect_register_as_string):
6571 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6573 * server.c (process_serial_event): Likewise.
6574 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6575 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6577 2014-02-12 Tom Tromey <tromey@redhat.com>
6579 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6580 bin2hex, not hexify.
6581 * tracepoint.c (cmd_qtstatus): Likewise.
6583 2014-02-12 Tom Tromey <tromey@redhat.com>
6585 * remote-utils.c (monitor_output): Pass explicit length to
6588 2014-02-12 Tom Tromey <tromey@redhat.com>
6590 * tracepoint.c: Include rsp-low.h.
6591 * server.c: Include rsp-low.h.
6592 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6593 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6595 * remote-utils.c: Include rsp-low.h.
6596 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6597 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6598 (convert_int_to_ascii, convert_ascii_to_int): Move to
6600 * regcache.c: Include rsp-low.h.
6601 * ax.c: Include rsp-low.h.
6602 * Makefile.in (SFILES): Add common/rsp-low.c.
6603 (OBS): Add rsp-low.o.
6604 (rsp-low.o): New target.
6606 2014-02-12 Tom Tromey <tromey@redhat.com>
6608 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6609 Include print-utils.h.
6610 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6611 (plongest, thirty_two, phex_nz): Remove.
6612 * Makefile.in (SFILES): Add common/print-utils.c.
6613 (OBS): Add print-utils.o.
6614 (print-utils-ipa.o): New target.
6615 (print-utils.o): New target.
6616 (IPA_OBJS): Add print-utils-ipa.o.
6618 2014-02-06 Tom Tromey <tromey@redhat.com>
6620 * Makefile.in (SFILES): Fix indentation.
6622 2014-02-05 Doug Evans <dje@google.com>
6624 * linux-low.c (linux_wait_for_event): Improve comment.
6625 (linux_wait_1): Keep current_inferior in sync with event_child.
6627 2014-01-22 Doug Evans <dje@google.com>
6629 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6631 2014-01-22 Doug Evans <dje@google.com>
6633 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6634 * configure: Regenerate.
6635 * config.in: Regenerate.
6636 * Makefile.in (SFILES): Add debug.c.
6638 * debug.c: New file.
6639 * debug.h: New file.
6640 * linux-aarch64-low.c (*): Update all debugging printfs to use
6641 debug_printf instead of fprintf.
6642 * linux-arm-low.c (*): Ditto.
6643 * linux-cris-low.c (*): Ditto.
6644 * linux-crisv32-low.c (*): Ditto.
6645 * linux-m32r-low.c (*): Ditto.
6646 * linux-sparc-low.c (*): Ditto.
6647 * linux-x86.c (*): Ditto.
6648 * linux-low.c (*): Ditto.
6649 (linux_wait_1): Add calls to debug_enter, debug_exit.
6650 (linux_wait): Remove redundant debugging printf.
6651 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6652 (linux_resume, unstop_all_lwps): Ditto.
6653 * mem-break.c (*): Update all debugging printfs to use
6654 debug_printf instead of fprintf.
6655 * remote-utils.c (*): Ditto.
6656 * thread-db.c (*): Ditto.
6657 * server.c #include <ctype.h>, "gdb_vecs.h".
6658 (debug_threads): Moved to debug.c.
6659 (*): Update all debugging printfs to use debug_printf instead of
6661 (start_inferior): Replace call to fflush with call to debug_flush.
6662 (monitor_show_help): Mention set debug-format.
6663 (parse_debug_format_options): New function.
6664 (handle_monitor_command): Handle "monitor set debug-format".
6665 (gdbserver_usage): Mention --debug-format.
6666 (main): Parse --debug-format.
6667 * server.h (debug_threads): Declaration moved to debug.h.
6669 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6670 trace_debug_1 that uses debug_printf.
6671 (tracepoint_look_up_symbols): Update all debugging printfs to use
6672 debug_printf instead of fprintf.
6674 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6676 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6679 2014-01-17 Pedro Alves <palves@redhat.com>
6682 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6683 defined after including gdb_proc_service.h.
6685 2014-01-16 Doug Evans <dje@google.com>
6687 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6688 (match_dll): Use it.
6690 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6692 * target.h (target_ops) <read_btrace>: Change parameters and
6693 return type to allow error reporting.
6694 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6695 trace reading errors on.
6696 * linux-low.c (linux_low_read_btrace): Pass trace reading
6698 (linux_low_disable_btrace): New.
6700 2014-01-15 Doug Evans <dje@google.com>
6702 * inferiors.c (thread_id_to_gdb_id): Delete.
6703 * inferiors.h (thread_id_to_gdb_id): Delete.
6705 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6707 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6708 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6711 2014-01-08 Pedro Alves <palves@redhat.com>
6713 * server.c (handle_status): Don't discard previous queued stop
6714 replies or thread's pending status here.
6715 (main) <disconnection>: Do it here instead.
6717 2014-01-08 Pedro Alves <palves@redhat.com>
6719 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6720 * server.c (visit_actioned_threads, handle_pending_status): New
6722 (handle_v_cont): Factor out parts to ...
6723 (resume): ... this new function. If in all-stop, and a thread
6724 being resumed has a pending status, report it without actually
6726 (myresume): Adjust to use the new 'resume' function.
6727 (clear_pending_status_callback, set_pending_status_callback)
6728 (find_status_pending_thread_callback): New functions.
6729 (handle_status): Handle the case of multiple threads having
6730 interesting statuses to report. Report threads' real last signal
6731 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6732 with an interesting thread to report the status for, instead of
6733 always reporting the status of the first thread.
6735 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6737 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6738 * gdbreplay.c (gdbreplay_version): Likewise.
6740 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6742 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6743 iov.iov_len with the real length in use.
6745 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6747 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6748 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6749 for all targets that use win32-low.c.
6750 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6751 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6753 2013-12-13 Pedro Alves <palves@redhat.com>
6755 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6756 if equal to TARGET_WAITKIND_LOADED.
6757 * win32-low.c (cached_status): New static global.
6758 (win32_wait): Add declaration.
6759 (do_initial_child_stuff): Flush all initial pending debug events
6760 up to the initial breakpoint.
6761 (win32_wait): If CACHED_STATUS was set, return that instead
6762 of doing a real wait. Remove the code resuming the execution
6763 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6764 during the initial phase. Also remove the code changing
6765 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6766 TARGET_WAITKIND_STOPPED.
6768 2013-12-11 Yao Qi <yao@codesourcery.com>
6770 * notif.c (handle_notif_ack): Return 0 if no notification
6773 2013-11-20 Doug Evans <dje@google.com>
6775 * linux-low.c (linux_set_resume_request): Fix comment.
6777 2013-11-20 Doug Evans <dje@google.com>
6779 * linux-low.c (resume_status_pending_p): Tweak comment.
6781 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6783 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6784 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6785 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6786 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6787 (srv_amd64_regobj): Add amd64-mpx.o.
6788 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6789 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6790 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6791 * i387-fp.c (num_pl_bnd_register) Added constant.
6792 (num_pl_bnd_cfg_registers) Added constant.
6793 (struct i387_xsave) Added reserved area and MPX fields.
6794 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6795 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6797 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6798 (init_registers_amd64_mpx_linux): Declare new function.
6799 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6800 (x86_64_regmap): Add MPX registers.
6801 (x86_linux_read_description): Add MPX case.
6802 (initialize_low_arch): Initialize MPX targets.
6804 2013-11-18 Tom Tromey <tromey@redhat.com>
6806 * configure: Rebuild.
6807 * configure.ac: Don't check for stdlib.h.
6808 * gdbreplay.c: Unconditionally include stdlib.h.
6810 2013-11-18 Tom Tromey <tromey@redhat.com>
6812 * config.in: Rebuild.
6813 * configure: Rebuild.
6814 * configure.ac: Don't use AC_HEADER_DIRENT.
6816 2013-11-18 Tom Tromey <tromey@redhat.com>
6818 * server.h: Don't check HAVE_STRING_H.
6819 * gdbreplay.c: Don't check HAVE_STRING_H.
6820 * configure: Rebuild.
6822 2013-11-18 Tom Tromey <tromey@redhat.com>
6824 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6827 2013-11-08 Tom Tromey <tromey@redhat.com>
6829 * configure, config.in: Rebuild.
6830 * configure.ac: Remove unused configury.
6832 2013-11-08 Tom Tromey <tromey@redhat.com>
6834 * acinclude.m4: Include common.m4, codeset.m4.
6835 * configure, config.in: Rebuild.
6836 * configure.ac: Use GDB_AC_COMMON.
6838 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6840 * linux-s390-low.c (HWCAP_S390_TE): New define.
6841 (s390_arch_setup): Consider the TE field in the HWCAP for
6842 determining 'have_regset_tdb'.
6844 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6847 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6850 2013-10-02 Pedro Alves <palves@redhat.com>
6852 * server.c (process_serial_event): Don't output "GDBserver
6853 exiting" if GDB is connected through stdio.
6854 * target.c (mywait): Likewise, be silent if GDB is connected
6857 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6859 * lynx-low.c (lynx_add_threads_after_attach): New function.
6860 (lynx_attach): Remove call to add_thread. Add call to
6861 lynx_add_threads_after_attach instead.
6863 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6865 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6866 * config.in, configure: Regenerated.
6868 2013-09-18 Yao Qi <yao@codesourcery.com>
6871 * server.c (start_inferior): Clear 'resume_info'.
6873 2013-09-16 Jiong Wang <jiwang@tilera.com>
6875 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6878 2013-09-16 Jiong Wang <jiwang@tilera.com>
6880 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6881 linux-tile-low.o to srv_tgtobj.
6883 2013-09-16 Will Newton <will.newton@linaro.org>
6885 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6888 2013-09-06 Pedro Alves <palves@redhat.com>
6890 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6891 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6892 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6893 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6894 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6895 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6897 2013-09-06 Pedro Alves <palves@redhat.com>
6899 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6900 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6902 2013-09-06 Pedro Alves <palves@redhat.com>
6904 * linux-amd64-ipa.c: Include tracepoint.h.
6905 * linux-i386-ipa.c: Include tracepoint.h.
6907 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6909 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6910 (ps_get_thread_area): New function.
6912 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6914 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6915 (initialize_low_arch): Call init_registers_crisv32 rather than
6916 init_register_crisv32.
6918 2013-09-05 Pedro Alves <palves@redhat.com>
6920 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6922 * hostio.h: ... this new file.
6923 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6924 win32-low.c: Include hostio.h.
6926 2013-09-05 Pedro Alves <palves@redhat.com>
6928 * server.h (gdb_client_data, handler_func, callback_handler_func)
6929 (delete_file_handler, add_file_handler, append_callback_event)
6930 (delete_callback_event, start_event_loop, initialize_event_loop):
6931 Move to event-loop.h and include it.
6932 * event-loop.h: New file.
6934 2013-09-05 Pedro Alves <palves@redhat.com>
6936 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6937 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6938 (loaded_dll, unloaded_dll): Move to ...
6939 * dll.h: ... this new file.
6940 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6942 2013-09-05 Pedro Alves <palves@redhat.com>
6944 * server.h (current_process, get_thread_process, all_processes)
6945 (add_inferior_to_list, for_each_inferior, current_inferior)
6946 (remove_inferior, add_process, remove_process, find_process_pid)
6947 (have_started_inferiors_p, have_attached_inferiors_p)
6948 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6949 (clear_inferiors, find_inferior, find_inferior_id)
6950 (inferior_target_data, set_inferior_target_data)
6951 (inferior_regcache_data, set_inferior_regcache_data): Move to
6952 inferiors.h, and include it.
6953 * inferiors.h: New file.
6955 2013-09-05 Pedro Alves <palves@redhat.com>
6957 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6961 2013-09-05 Pedro Alves <palves@redhat.com>
6963 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6965 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6966 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6967 (handle_tracepoint_general_set, handle_tracepoint_query)
6968 (tracepoint_finished_step, tracepoint_was_hit)
6969 (release_while_stepping_state_list, current_traceframe)
6970 (in_readonly_region, traceframe_read_mem)
6971 (fetch_traceframe_registers, traceframe_read_sdata)
6972 (traceframe_read_info, struct fast_tpoint_collect_status)
6973 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6974 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6975 (supply_fast_tracepoint_registers)
6976 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6977 (ipa_tdesc, claim_trampoline_space)
6978 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6979 (agent_mem_read, agent_get_trace_state_variable_value)
6980 (agent_set_trace_state_variable_value, agent_tsv_read)
6981 (agent_mem_read_string, get_raw_reg_func_addr)
6982 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6983 * tracepoint.h: ... this new file.
6985 2013-09-05 Pedro Alves <palves@redhat.com>
6987 * server.h (perror_with_name, error, fatal, warning, paddress)
6988 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6990 * utils.h: New file.
6992 2013-09-05 Pedro Alves <palves@redhat.com>
6994 * server.h (remote_debug, noack_mode, transport_is_reliable)
6995 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6996 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6997 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6998 (write_enn, initialize_async_io, enable_async_io)
6999 (disable_async_io, check_remote_input_interrupt_request)
7000 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7001 (dead_thread_notify, prepare_resume_reply)
7002 (decode_address_to_semicolon, decode_address, decode_m_packet)
7003 (decode_M_packet, decode_X_packet, decode_xfer_write)
7004 (decode_search_memory_packet, unhexify, hexify)
7005 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7006 (look_up_one_symbol, relocate_instruction)
7007 (monitor_output): Move to remote-utils.h, and include it.
7008 * remote-utils.h: New file.
7010 2013-09-05 Pedro Alves <palves@redhat.com>
7012 * server.h (_): Delete.
7014 2013-09-02 Pedro Alves <palves@redhat.com>
7016 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7017 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7019 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7021 2013-09-02 Pierre Muller <muller@sourceware.org>
7023 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7024 or WriteProcessMemory complete successfully and handle
7025 ERROR_PARTIAL_COPY error.
7027 2013-09-02 Pedro Alves <palves@redhat.com>
7029 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7030 error instead of EIO.
7032 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7035 * linux-low.c: Include filestuff.h.
7036 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7037 * lynx-low.c: Include filestuff.h.
7038 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7039 * server.c: Include filestuff.h.
7040 (main): Call notice_open_fds.
7041 * spu-low.c: Include filestuff.h.
7042 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7044 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7046 * Makefile.in: Explain why ../target and ../nat are not
7047 listed as include file search paths.
7048 (linux-waitpid.o): New object file rule.
7049 * configure.srv (srv_native_linux_obj): New variable.
7050 Replace all occurrences of linux native object files with
7051 $srv_native_linux_obj.
7052 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7053 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7054 (linux_enable_event_reporting): Remove declaration.
7055 (my_waitpid): Moved to common/linux-waitpid.c.
7056 (linux_wait_for_event): Pass ptid when calling
7057 linux_enable_event_reporting.
7058 (linux_supports_tracefork_flag): Remove.
7059 (linux_enable_event_reporting): Likewise.
7060 (linux_tracefork_grandchild): Remove.
7061 (STACK_SIZE): Moved to common/linux-ptrace.c.
7062 (linux_tracefork_child): Remove.
7063 (linux_test_for_tracefork): Remove.
7064 (linux_look_up_symbols): Call linux_supports_traceclone.
7065 (initialize_low): Remove call to linux_test_for_tracefork.
7066 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7067 common/linux-ptrace.h.
7068 (PTRACE_TYPE_ARG4): Likewise.
7069 Include linux-ptrace.h.
7071 2013-08-21 Pedro Alves <palves@redhat.com>
7073 * config.in: Renegerate.
7075 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7077 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7078 (SFILES): Remove $(srcdir)/common/target-common.c and
7079 add $(srcdir)/target/waitstatus.c.
7080 (OBS): Remove target-common.o and add waitstatus.o.
7081 (server_h): Remove $(srcdir)/../common/target-common.h and
7082 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7083 and $(srcdir)/../target/waitstatus.h.
7084 (target-common.o): Remove.
7085 (waitstatus.o): New target object file.
7086 * target.h: Do not include target-common.h and
7087 include target/resume.h, target/wait.h and
7088 target/waitstatus.h.
7090 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7092 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7093 to PTRACE_TYPE_ARG3.
7094 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7095 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7097 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7098 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7100 2013-07-27 Jie Zhang <jie@codesourcery.com>
7101 Daniel Jacobowitz <dan@codesourcery.com>
7102 Yao Qi <yao@codesourcery.com>
7104 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7105 (mips-linux-watch.o): New rule.
7106 (mips_linux_watch_h): New variable.
7107 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7109 * linux-mips-low.c: Include mips-linux-watch.h.
7110 (struct arch_process_info, struct arch_lwp_info): New.
7111 (update_watch_registers_callback): New function.
7112 (mips_linux_new_process, mips_linux_new_thread) New functions.
7113 (mips_linux_prepare_to_resume, mips_insert_point): New
7115 (mips_remove_point, mips_stopped_by_watchpoint): New
7117 (rsp_bp_type_to_target_hw_bp_type): New function.
7118 (mips_stopped_data_address): New function.
7119 (the_low_target): Add watchpoint support functions.
7121 2013-07-27 Yao Qi <yao@codesourcery.com>
7123 * i386-low.c: Include break-common.h.
7124 (enum target_hw_bp_type): Remove.
7126 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7128 * Makefile.in (SFILES): /common/target-common.c.
7129 (OBS): Add target-common.o.
7130 (server_h): Add $(srcdir)/../common/target-common.h.
7131 (target-common.o): New target.
7132 * server.c (queue_stop_reply_callback): Free
7133 status string after use.
7134 * target.c (target_waitstatus_to_string): Remove.
7135 * target.h: Include target-common.h.
7136 (resume_kind): Likewise.
7137 (target_waitkind): Likewise.
7138 (target_waitstatus): Likewise.
7139 (TARGET_WNOHANG): Likewise.
7141 2013-07-04 Yao Qi <yao@codesourcery.com>
7143 * Makefile.in (host_alias): Use @host_noncanonical@.
7144 (target_alias): Use @target_noncanonical@.
7145 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7146 ACX_NONCANONICAL_HOST.
7147 * configure: Regenerated.
7150 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7152 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7153 * configure: Rebuild.
7154 * Makefile.in (version_host, version_target): Get from configure.
7155 (version.c): Use $(version_host) and $(version_target).
7157 2013-07-03 Pedro Alves <palves@redhat.com>
7159 * Makefile.in (config.status): Depend on development.sh.
7160 * acinclude.m4: Include libmcheck.m4.
7161 * configure: Regenerate.
7163 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7165 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7166 attribute inside the parentheses.
7167 (winapi_DebugSetProcessKillOnExit): Ditto.
7168 (winapi_DebugBreakProcess): Ditto.
7169 (winapi_GenerateConsoleCtrlEvent): Ditto.
7171 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7173 * notif.h (notif_event): Add a dummy member to avoid compiler
7176 2013-07-01 Pedro Alves <palves@redhat.com>
7178 * hostio.c (HOSTIO_PATH_MAX): Define.
7179 (require_filename, handle_open, handle_unlink, handle_readlink):
7182 2013-07-01 Pedro Alves <palves@redhat.com>
7184 * server.h: Include "pathmax.h".
7185 * linux-low.c: Don't include sys/param.h.
7186 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7188 * win32-low.c: Don't include sys/param.h.
7189 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7191 2013-07-01 Pedro Alves <palves@redhat.com>
7193 * event-loop.c: Don't check HAVE_UNISTD_H before including
7195 * gdbreplay.c: Likewise.
7196 * remote-utils.c: Likewise.
7197 * server.c: Likewise.
7198 * configure.ac: Don't check for unistd.h.
7199 * configure: Regenerate.
7201 2013-06-28 Tom Tromey <tromey@redhat.com>
7203 * Makefile.in (version.c): Use version.in, not
7206 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7208 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7209 * configure: Rebuild.
7210 * Makefile.in (version_host, version_target): Get from configure.
7211 (version.c): Use $(version_host) and $(version_target).
7213 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7215 Fix trace-status to output user name without trailing colon.
7216 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7218 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7220 Fix trace-status to output proper start-time and stop-time.
7221 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7222 output start time and stop time in hex as gdb expects.
7224 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7226 * tracepoint.c (build_traceframe_info_xml): Output trace state
7227 variables present in the trace buffer.
7229 2013-06-24 Tom Tromey <tromey@redhat.com>
7231 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7233 (version.o): Remove.
7234 * gdbreplay.c: Include version.h.
7235 (version, host_name): Don't declare.
7236 * server.h: Include version.h.
7237 (version, host_name): Don't declare.
7239 2013-06-12 Pedro Alves <palves@redhat.com>
7241 * linux-x86-low.c (linux_is_elf64): Delete global.
7242 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7243 with local linux_pid_exe_is_elf_64_file use.
7245 2013-06-11 Pedro Alves <palves@redhat.com>
7247 * linux-low.c (regset_disabled, disable_regset): New functions.
7248 (regsets_fetch_inferior_registers)
7249 (regsets_store_inferior_registers): Use them.
7250 (initialize_regsets_info); Don't allocate the disabled_regsets
7252 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7255 2013-06-11 Pedro Alves <palves@redhat.com>
7257 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7260 2013-06-11 Pedro Alves <palves@redhat.com>
7262 * linux-x86-low.c (initialize_low_arch): Call
7263 init_registers_x32_avx_linux.
7265 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7267 Fix compatibility with Android Bionic.
7268 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7271 2013-06-07 Pedro Alves <palves@redhat.com>
7274 * Makefile.in (OBS): Add tdesc.o.
7275 (IPA_OBJS): Add tdesc-ipa.o.
7276 (tdesc-ipa.o): New rule.
7277 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7279 * linux-low.c (new_inferior): Delete.
7280 (disabled_regsets, num_regsets): Delete.
7281 (linux_add_process): Adjust to set the new per-process
7283 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7284 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7285 was a stop. When calling arch_setup, switch the current inferior
7286 to the thread that got an event.
7287 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7288 (regsets_fetch_inferior_registers)
7289 (regsets_store_inferior_registers): New regsets_info parameter.
7291 (linux_register_in_regsets): New regs_info parameter. Adjust to
7293 (register_addr, fetch_register, store_register): New usrregs_info
7294 parameter. Adjust to use it.
7295 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7296 parameter regs_info. Adjust to use it.
7297 (linux_fetch_registers): Get the current inferior's regs_info, and
7299 (linux_store_registers): Ditto.
7300 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7301 (initialize_low): Don't initialize the target_regsets here. Call
7302 initialize_low_arch.
7303 * linux-low.h (target_regsets): Delete declaration.
7304 (struct regsets_info): New.
7305 (struct usrregs_info): New.
7306 (struct regs_info): New.
7307 (struct process_info_private) <new_inferior>: New field.
7308 (struct linux_target_ops): Delete the num_regs, regmap, and
7309 regset_bitmap fields. New field regs_info.
7310 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7311 * i387-fp.c (num_xmm_registers): Delete.
7312 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7313 calls to new interface.
7314 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7315 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7316 Infer the number of xmm registers from the regcache's target
7318 * i387-fp.h (num_xmm_registers): Delete.
7319 * inferiors.c (add_thread): Don't install the thread's regcache
7321 * proc-service.c (gregset_info): Fetch the current inferior's
7322 regs_info. Adjust to use it.
7323 * regcache.c: Include tdesc.h.
7324 (register_bytes, reg_defs, num_registers)
7325 (gdbserver_expedite_regs): Delete.
7326 (get_thread_regcache): If the thread doesn't have a regcache yet,
7327 create one, instead of aborting gdbserver.
7328 (regcache_invalidate_one): Rename to ...
7329 (regcache_invalidate_thread): ... this.
7330 (regcache_invalidate_one): New.
7331 (regcache_invalidate): Only invalidate registers of the current
7333 (init_register_cache): Add target_desc parameter, and use it.
7334 (new_register_cache): Ditto. Assert the target description has a
7335 non zero registers_size.
7336 (regcache_cpy): Add assertions. Adjust.
7337 (realloc_register_cache, set_register_cache): Delete.
7338 (registers_to_string, registers_from_string): Adjust.
7339 (find_register_by_name, find_regno, find_register_by_number)
7340 (register_cache_size): Add target_desc parameter, and use it.
7341 (free_register_cache_thread, free_register_cache_thread_one)
7342 (regcache_release, register_cache_size): New.
7343 (register_size): Add target_desc parameter, and use it.
7344 (register_data, supply_register, supply_register_zeroed)
7345 (supply_regblock, supply_register_by_name, collect_register)
7346 (collect_register_as_string, collect_register_by_name): Adjust.
7347 * regcache.h (struct target_desc): Forward declare.
7348 (struct regcache) <tdesc>: New field.
7349 (init_register_cache, new_register_cache): Add target_desc
7351 (regcache_invalidate_thread): Declare.
7352 (regcache_invalidate_one): Delete declaration.
7353 (regcache_release): Declare.
7354 (find_register_by_number, register_cache_size, register_size)
7355 (find_regno): Add target_desc parameter.
7356 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7358 * remote-utils.c: Include tdesc.h.
7359 (outreg, prepare_resume_reply): Adjust.
7360 * server.c: Include tdesc.h.
7361 (gdbserver_xmltarget): Delete declaration.
7362 (get_features_xml, process_serial_event): Adjust.
7363 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7365 (struct process_info) <tdesc>: New field.
7366 (ipa_tdesc): Declare.
7367 * tdesc.c: New file.
7368 * tdesc.h: New file.
7369 * tracepoint.c: Include tdesc.h.
7370 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7371 (get_context_regcache): Adjust to pass ipa_tdesc down.
7372 (do_action_at_tracepoint): Adjust to get the register cache size
7373 from the context regcache's description.
7374 (traceframe_walk_blocks): Adjust to get the register cache size
7375 from the current trace frame's description.
7376 (traceframe_get_pc): Adjust to get current trace frame's
7377 description and pass it down.
7378 (gdb_collect): Adjust to get the register cache size from the
7380 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7381 (gdbserver_xmltarget): Delete.
7382 (initialize_low_tracepoint): Set the ipa's target description.
7383 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7384 (initialize_low_tracepoint): Set the ipa's target description.
7385 * linux-x86-low.c: Include tdesc.h.
7386 [__x86_64__] (is_64bit_tdesc): New.
7387 (ps_get_thread_area, x86_get_thread_area): Use it.
7388 (i386_cannot_store_register): Rename to ...
7389 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7390 (i386_cannot_fetch_register): Rename to ...
7391 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7392 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7394 (target_regsets): Rename to ...
7395 (x86_regsets): ... this.
7396 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7398 (x86_siginfo_fixup): Use is_64bit_tdesc.
7399 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7400 (tdesc_x32_avx_linux, tdesc_x32_linux)
7401 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7403 (x86_linux_update_xmltarget): Delete.
7404 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7405 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7406 (AMD64_LINUX_USER64_CS): New.
7407 (x86_linux_read_description): New, based on
7408 x86_linux_update_xmltarget.
7409 (same_process_callback): New.
7410 (x86_arch_setup_process_callback): New.
7411 (x86_linux_update_xmltarget): New.
7412 (x86_regsets_info): New.
7413 (amd64_linux_regs_info): New.
7414 (i386_linux_usrregs_info): New.
7415 (i386_linux_regs_info): New.
7416 (x86_linux_regs_info): New.
7417 (x86_arch_setup): Reimplement.
7418 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7419 (x86_emit_ops): Ditto.
7420 (the_low_target): Adjust. Install x86_linux_regs_info,
7421 x86_cannot_fetch_register, and x86_cannot_store_register.
7422 (initialize_low_arch): New.
7423 * linux-ia64-low.c (tdesc_ia64): Declare.
7424 (ia64_fetch_register): Adjust.
7425 (ia64_usrregs_info, regs_info): New globals.
7426 (ia64_regs_info): New function.
7427 (the_low_target): Adjust.
7428 (initialize_low_arch): New function.
7429 * linux-sparc-low.c (tdesc_sparc64): Declare.
7430 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7432 (sparc_arch_setup): New function.
7433 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7434 (the_low_target): Adjust.
7435 (initialize_low_arch): New function.
7436 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7437 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7438 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7439 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7440 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7441 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7442 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7443 (tdesc_powerpc_isa205_vsx64l): Declare.
7444 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7445 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7446 (ppc_set_pc, ppc_get_hwcap): Adjust.
7447 (ppc_usrregs_info): Forward declare.
7448 (!__powerpc64__) ppc_regmap_adjusted: New global.
7449 (ppc_arch_setup): Adjust to the current process'es target
7451 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7452 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7453 (ppc_store_evrregset): Adjust.
7454 (target_regsets): Rename to ...
7455 (ppc_regsets): ... this, and make static.
7456 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7457 (ppc_regs_info): New function.
7458 (the_low_target): Adjust.
7459 (initialize_low_arch): New function.
7460 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7461 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7462 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7463 (tdesc_s390x_linux64v2): Declare.
7464 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7465 (s390_fill_gregset, s390_store_last_break): Adjust.
7466 (target_regsets): Rename to ...
7467 (s390_regsets): ... this, and make static.
7468 (s390_get_pc, s390_set_pc): Adjust.
7469 (s390_get_hwcap): New target_desc parameter, and use it.
7470 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7471 (s390_arch_setup): Adjust to set the current process'es target
7472 description. Don't adjust the regmap.
7473 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7474 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7475 (regs_info_3264): New globals.
7476 (s390_regs_info): New function.
7477 (the_low_target): Adjust.
7478 (initialize_low_arch): New function.
7479 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7480 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7481 [__mips64] (init_registers_mips_linux)
7482 (init_registers_mips_dsp_linux): Delete defines.
7483 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7484 (have_dsp): New global.
7485 (mips_read_description): New, based on mips_arch_setup.
7486 (mips_arch_setup): Reimplement.
7487 (get_usrregs_info): New function.
7488 (mips_cannot_fetch_register, mips_cannot_store_register)
7489 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7490 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7491 (target_regsets): Rename to ...
7492 (mips_regsets): ... this, and make static.
7493 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7494 (dsp_regs_info, regs_info): New globals.
7495 (mips_regs_info): New function.
7496 (the_low_target): Adjust.
7497 (initialize_low_arch): New function.
7498 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7499 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7501 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7502 (arm_read_description): New, with bits factored from
7504 (arm_arch_setup): Reimplement.
7505 (target_regsets): Rename to ...
7506 (arm_regsets): ... this, and make static.
7507 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7508 (arm_regs_info): New function.
7509 (the_low_target): Adjust.
7510 (initialize_low_arch): New function.
7511 * linux-m68k-low.c (tdesc_m68k): Declare.
7512 (target_regsets): Rename to ...
7513 (m68k_regsets): ... this, and make static.
7514 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7515 (m68k_regs_info): New function.
7516 (m68k_arch_setup): New function.
7517 (the_low_target): Adjust.
7518 (initialize_low_arch): New function.
7519 * linux-sh-low.c (tdesc_sharch): Declare.
7520 (target_regsets): Rename to ...
7521 (sh_regsets): ... this, and make static.
7522 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7523 (sh_regs_info, sh_arch_setup): New functions.
7524 (the_low_target): Adjust.
7525 (initialize_low_arch): New function.
7526 * linux-bfin-low.c (tdesc_bfin): Declare.
7527 (bfin_arch_setup): New function.
7528 (bfin_usrregs_info, regs_info): New globals.
7529 (bfin_regs_info): New function.
7530 (the_low_target): Adjust.
7531 (initialize_low_arch): New function.
7532 * linux-cris-low.c (tdesc_cris): Declare.
7533 (cris_arch_setup): New function.
7534 (cris_usrregs_info, regs_info): New globals.
7535 (cris_regs_info): New function.
7536 (the_low_target): Adjust.
7537 (initialize_low_arch): New function.
7538 * linux-cris-low.c (tdesc_crisv32): Declare.
7539 (cris_arch_setup): New function.
7540 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7541 (cris_regs_info): New function.
7542 (the_low_target): Adjust.
7543 (initialize_low_arch): New function.
7544 * linux-m32r-low.c (tdesc_m32r): Declare.
7545 (m32r_arch_setup): New function.
7546 (m32r_usrregs_info, regs_info): New globals.
7547 (m32r_regs_info): Adjust.
7548 (initialize_low_arch): New function.
7549 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7550 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7551 (tic6x_usrregs_info): Forward declare.
7552 (tic6x_read_description): New function, based on ...
7553 (tic6x_arch_setup): ... this. Reimplement.
7554 (target_regsets): Rename to ...
7555 (tic6x_regsets): ... this, and make static.
7556 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7557 (tic6x_regs_info): New function.
7558 (the_low_target): Adjust.
7559 (initialize_low_arch): New function.
7560 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7561 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7562 (target_regsets): Rename to ...
7563 (xtensa_regsets): ... this, and make static.
7564 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7566 (xtensa_arch_setup, xtensa_regs_info): New functions.
7567 (the_low_target): Adjust.
7568 (initialize_low_arch): New function.
7569 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7570 (nios2_arch_setup): Set the current process'es tdesc.
7571 (target_regsets): Rename to ...
7572 (nios2_regsets): ... this.
7573 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7574 (nios2_regs_info): New function.
7575 (the_low_target): Adjust.
7576 (initialize_low_arch): New function.
7577 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7578 (aarch64_arch_setup): Set the current process'es tdesc.
7579 (target_regsets): Rename to ...
7580 (aarch64_regsets): ... this.
7581 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7582 (aarch64_regs_info): New function.
7583 (the_low_target): Adjust.
7584 (initialize_low_arch): New function.
7585 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7587 (target_regsets): Rename to ...
7588 (tile_regsets): ... this.
7589 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7590 (tile_regs_info): New function.
7591 (tile_arch_setup): Set the current process'es tdesc.
7592 (the_low_target): Adjust.
7593 (initialize_low_arch): New function.
7594 * spu-low.c (tdesc_spu): Declare.
7595 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7596 * win32-arm-low.c (tdesc_arm): Declare.
7597 (arm_arch_setup): New function.
7598 (the_low_target): Install arm_arch_setup instead of
7600 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7601 (init_windows_x86): Rename to ...
7602 (i386_arch_setup): ... this. Set `win32_tdesc'.
7603 (the_low_target): Adjust.
7604 * win32-low.c (win32_tdesc): New global.
7605 (child_add_thread): Don't create the thread cache here.
7606 (do_initial_child_stuff): Set the new process'es tdesc.
7607 * win32-low.h (struct target_desc): Forward declare.
7608 (win32_tdesc): Declare.
7609 * lynx-i386-low.c (tdesc_i386): Declare global.
7610 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7611 * lynx-low.c (lynx_tdesc): New global.
7612 (lynx_add_process): Set the new process'es tdesc.
7613 * lynx-low.h (struct target_desc): Forward declare.
7614 (lynx_tdesc): Declare global.
7615 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7616 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7617 * nto-low.c (nto_tdesc): New global.
7618 (do_attach): Set the new process'es tdesc.
7619 * nto-low.h (struct target_desc): Forward declare.
7620 (nto_tdesc): Declare.
7621 * nto-x86-low.c (tdesc_i386): Declare.
7622 (nto_x86_arch_setup): Set `nto_tdesc'.
7624 2013-06-04 Gary Benson <gbenson@redhat.com>
7626 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7627 to qSupported response when appropriate.
7628 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7629 with nonzero-length annex.
7630 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7631 arguments supplied in annex.
7633 2013-05-31 Doug Evans <dje@google.com>
7636 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7637 64 bits in 64-cross-32 environment.
7639 2013-05-28 Pedro Alves <palves@redhat.com>
7641 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7642 (aarch64-without-fpu.c): Delete rule.
7643 * configure.srv (aarch64*-*-linux*): Remove references to
7644 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7645 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7648 2013-05-24 Pedro Alves <palves@redhat.com>
7650 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7651 instead of strchr/decode_address. Error if the range isn't split
7652 with a ','. Don't assume there's be a ':' in the action.
7654 2013-05-23 Yao Qi <yao@codesourcery.com>
7655 Pedro Alves <palves@redhat.com>
7657 * linux-low.c (lwp_in_step_range): New function.
7658 (linux_wait_1): If the thread was range stepping and stopped
7659 outside the stepping range, report the stop to GDB. Otherwise,
7660 continue stepping. Add range stepping debug output.
7661 (linux_set_resume_request): Copy the step range from the resume
7663 (linux_supports_range_stepping): New.
7664 (linux_target_ops) <supports_range_stepping>: Set to
7665 linux_supports_range_stepping.
7666 * linux-low.h (struct linux_target_ops)
7667 <supports_range_stepping>: New field.
7668 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7669 * linux-x86-low.c (x86_supports_range_stepping): New.
7670 (the_low_target) <supports_range_stepping>: Set to
7671 x86_supports_range_stepping.
7672 * server.c (handle_v_cont): Handle 'r' action.
7673 (handle_v_requests): Append ";r" if the target supports range
7675 * target.h (struct thread_resume) <step_range_start,
7676 step_range_end>: New fields.
7677 (struct target_ops) <supports_range_stepping>:
7679 (target_supports_range_stepping): New macro.
7681 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7683 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7684 confusion in comment.
7686 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7688 * lynx-low.c (struct process_info_private): New type.
7689 (lynx_add_process): New function.
7690 (lynx_create_inferior, lynx_attach): Replace calls to
7691 add_process by calls to lynx_add_process.
7692 (lynx_resume): If PTID is null, then try using
7693 current_process()->private->last_wait_event_ptid.
7695 (lynx_clear_inferiors): Delete. The contents of that function
7696 has been inlined in lynx_mourn;
7697 (lynx_wait_1): Save the ptid in the process's private data.
7698 (lynx_mourn): Free the process' private data. Replace call
7699 to lynx_clear_inferiors by call to clear_inferiors.
7701 2013-05-17 Yao Qi <yao@codesourcery.com>
7703 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7706 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7708 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7709 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7710 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7711 PT_TEXT_END_ADDR guards. Update comments.
7712 (linux_target_op) <read_offsets>: Conditionally define to
7713 linux_read_offsets if the target is UCLIBC and if it defines
7714 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7716 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7717 Andrew Jenner <andrew@codesourcery.com>
7719 * Makefile.in (SFILES): Add linux-nios2-low.c.
7720 (clean): Add action to delete nios2-linux.c.
7721 (nios2-linux.c): New rule.
7722 * configure.srv: Add nios2*-*-linux*.
7723 * linux-nios2-low.c: New.
7725 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7727 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7729 2013-04-25 Hui Zhu <hui@codesourcery.com>
7732 * ax.c (ax_printf): Add fflush.
7734 2013-04-22 Tom Tromey <tromey@redhat.com>
7736 * Makefile.in (SFILES): Add filestuff.c.
7737 (OBS): Add filestuff.o.
7738 (filestuff.o): New target.
7739 * config.in, configure: Rebuild.
7740 * configure.ac: Check for fdwalk, pipe2.
7742 2013-04-17 Pedro Alves <palves@redhat.com>
7744 * configure.ac (USE_THREAD_DB): Delete variable.
7745 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7746 Don't AC_SUBST USE_THREAD_DB.
7747 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7748 * config.in, configure: Regenerate.
7750 2013-04-16 Pedro Alves <palves@redhat.com>
7752 * linux-low.h (struct lwp_info) <thread_known>: Move under
7753 the USE_THREAD_DB #ifdef.
7755 2013-04-16 Pedro Alves <palves@redhat.com>
7757 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7758 (linux-low.o): Delete rule.
7759 * linux-low.h: Always include "gdb_thread_db.h" instead of
7760 conditionally including thread_db.h.
7761 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7764 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7766 * Makefile.in (install-only): Fix make install regression.
7768 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7770 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7771 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7773 * gdbserver.1: Remove.
7775 2013-03-22 Pedro Alves <palves@redhat.com>
7777 * linux-low.c (handle_extended_wait): Don't call
7778 linux_enable_event_reporting.
7780 2013-03-15 Tony Theodore <tonyt@logyst.com>
7783 * Makefile.in (SHELL): Use @SHELL@.
7785 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7787 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7790 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7792 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7793 Remove extraneous NULL element.
7795 2013-03-13 Yao Qi <yao@codesourcery.com>
7797 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7798 'V' block in trace frame.
7800 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7802 * target.h (struct target_ops): Add btrace ops.
7803 (target_supports_btrace): New macro.
7804 (target_enable_btrace): New macro.
7805 (target_disable_btrace): New macro.
7806 (target_read_btrace): New macro.
7807 * gdbthread.h (struct thread_info): Add btrace field.
7808 * server.c: Include btrace-common.h.
7809 (handle_btrace_general_set): New function.
7810 (handle_btrace_enable): New function.
7811 (handle_btrace_disable): New function.
7812 (handle_general_set): Call handle_btrace_general_set.
7813 (handle_qxfer_btrace): New function.
7814 (struct qxfer qxfer_packets[]): Add btrace entry.
7815 * inferiors.c (remove_thread): Disable btrace.
7816 * linux-low: Include linux-btrace.h.
7817 (linux_low_enable_btrace): New function.
7818 (linux_low_read_btrace): New function.
7819 (linux_target_ops): Add btrace ops.
7820 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7821 Add srv_linux_btrace=yes.
7822 (x86_64-*-linux*): Add linux-btrace.o.
7823 Add srv_linux_btrace=yes.
7824 * configure.ac: Define HAVE_LINUX_BTRACE.
7825 * config.in: Regenerated.
7826 * configure: Regenerated.
7828 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7830 * server.c (handle_qxfer): Preserve error message if -3 is
7832 (qxfer): Document the -3 return value.
7834 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7836 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7837 (linux_btrace_h): New variable.
7838 (linux-btrace.o): New rule.
7840 2013-03-08 Stan Shebs <stan@codesourcery.com>
7841 Hafiz Abid Qadeer <abidh@codesourcery.com>
7843 * tracepoint.c (trace_buffer_size): New global.
7844 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7845 (init_trace_buffer): Change to one-argument function. Allocate
7846 trace buffer memory.
7847 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7848 handle QTBuffer:size packet.
7849 (cmd_bigqtbuffer_size): New function.
7850 (initialize_tracepoint): Call init_trace_buffer with
7851 DEFAULT_TRACE_BUFFER_SIZE.
7852 * server.c (handle_query): Add QTBuffer:size in the
7855 2013-03-07 Yao Qi <yao@codesourcery.com>
7857 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7858 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7860 (cmd_qtsp): Adjust condition. Do post increment.
7861 Set cur_action and cur_step_action back to 0.
7863 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7866 * linux-low.c (linux_write_memory): Return early success if LEN is
7869 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7871 * configure.srv: Add x86_64-*-cygwin* as target.
7873 2013-02-28 Tom Tromey <tromey@redhat.com>
7875 * configure.ac: Invoke AC_SYS_LARGEFILE.
7876 * configure, config.in: Rebuild.
7878 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7880 * win32-low.c: Throughout, fix format strings and casts of
7881 printf-like functions to avoid type related warnings on all
7883 (get_child_debug_event): Print dwDebugEventCode as hex since
7884 that's how it's usually documented.
7886 2013-02-28 Yao Qi <yao@codesourcery.com>
7888 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7891 2013-02-27 Jiong Wang <jiwang@tilera.com>
7893 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7894 (reg-tilegx32.c): New rule.
7895 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7896 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7897 different register info initializer according to elf class.
7898 (init_registers_tilgx32): New function. The tilegx32 register info
7900 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7901 (tile_store_gregset): Likewise.
7903 2013-02-27 Yao Qi <yao@codesourcery.com>
7905 * server.c (process_point_options): Print debug message when
7906 debug_threads is true.
7908 2013-02-26 Yao Qi <yao@codesourcery.com>
7910 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7912 2013-02-19 Pedro Alves <palves@redhat.com>
7913 Kai Tietz <ktietz@redhat.com>
7917 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7918 instead of strtoul to extract address from packet.
7919 (process_serial_event) <'z'>: Likewise.
7921 2013-02-18 Yao Qi <yao@codesourcery.com>
7923 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7925 2013-02-14 Pedro Alves <palves@redhat.com>
7929 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7930 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7932 2013-02-14 Pedro Alves <palves@redhat.com>
7934 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7936 2013-02-14 Pedro Alves <palves@redhat.com>
7938 * tracepoint.c (save_string): Delete.
7939 (add_tracepoint_action): Use savestring instead of save_string.
7941 2013-02-12 Pedro Alves <palves@redhat.com>
7943 * linux-xtensa-low.c: Ditto.
7944 * xtensa-xtregs.c: Ditto.
7946 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7948 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7951 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7953 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7954 aarch64_num_wp_regs and aarch64_num_bp_regs to
7955 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7957 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7959 * linux-aarch64-low.c (ps_get_thread_area): Replace
7960 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7962 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7963 Marcus Shawcroft <marcus.shawcroft@arm.com>
7964 Nigel Stephens <nigel.stephens@arm.com>
7965 Yufeng Zhang <yufeng.zhang@arm.com>
7967 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7968 (aarch64.c, aarch64-without-fpu.c): New targets.
7969 * configure.srv (aarch64*-*-linux*): New.
7970 * linux-aarch64-low.c: New file.
7972 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7974 * linux-low.c (handle_extended_wait, linux_create_inferior)
7975 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7976 (dequeue_one_deferred_signal, linux_resume_one_thread)
7977 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7978 (linux_tracefork_grandchild, linux_test_for_tracefork)
7979 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7980 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7981 where the argument is 0.
7983 2013-01-25 Yao Qi <yao@codesourcery.com>
7985 * event-loop.c: Include "queue.h".
7986 (gdb_event_p): New typedef.
7987 (struct gdb_event) <next_event>: Remove.
7988 (event_queue): Change to QUEUE(gdb_event_p).
7989 (async_queue_event): Remove.
7990 (gdb_event_xfree): New.
7991 (initialize_event_loop): New.
7992 (process_event): Use API from QUEUE.
7993 (wait_for_event): Likewise.
7994 * server.c (main): Call initialize_event_loop.
7995 * server.h (initialize_event_loop): Declare.
7997 2013-01-18 Yao Qi <yao@codesourcery.com>
7999 * ax.h (struct eval_agent_expr_context): New.
8000 (gdb_eval_agent_expr): Update declaration.
8001 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8002 TFRAME. Add new argument CTX.
8003 * server.h (struct eval_agent_expr_context): Declare.
8004 (agent_mem_read, agent_tsv_read): Update declaration.
8005 (agent_mem_read_string): Likewise.
8006 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8007 (add_traceframe_block): Add new argument TPOINT.
8008 Increase TPOINT->traceframe_usage.
8009 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8010 eval_tracepoint_agent_expr.
8011 (condition_true_at_tracepoint): Likewise.
8012 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8013 (agent_mem_read_string, agent_tsv_read): Likewise.
8015 2013-01-16 Yao Qi <yao@codesourcery.com>
8017 * linux-low.c (linux_resume_one_lwp): Don't check
8018 'lwp->bp_reinsert != 0'.
8020 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8021 Pedro Alves <palves@redhat.com>
8023 * lynx-low.c (ptrace_request_to_str): Define a temporary
8024 macro and use it to simplify this function's implementation.
8026 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8028 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8031 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8033 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8035 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8037 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8039 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8041 * lynx-low.c (lynx_resume): Use the resume_info parameter
8042 to determine the ptid for the lynx_ptrace call, unless
8043 it is equal to minus_one_ptid, in which case we use the
8044 ptid of the current_inferior.
8045 (lynx_wait_1): After having received a thread create/exit
8046 event, resume the inferior's execution using the signaling
8047 thread's ptid, rather than the old ptid.
8049 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8051 * lynx-low.c (lynx_resume): Delete variable ret.
8053 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8055 * gdbreplay.c (gdbreplay_version): Update copyright year.
8056 * server.c (gdbserver_version): Likewise.
8058 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8060 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8063 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8065 * lynx-low.c (ptrace_request_to_str): Add handling for
8068 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8070 * lynx-low.c (lynx_attach): Delete variable new_process.
8072 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8074 * lynx-low.c (lynx_create_inferior): Delete variable
8077 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8079 * lynx-low.c (ptrace_request_to_str): Do not handle
8080 PTRACE_GETTHREADLIST if this macro does not exist.
8082 2012-12-15 Yao Qi <yao@codesourcery.com>
8084 * Makefile.in (OBS): Add notif.o.
8085 * notif.c, notif.h: New.
8086 * server.c: Include "notif.h".
8087 (struct vstop_notif) <next>: Remove.
8089 (queue_stop_reply): Update.
8090 (push_event, send_next_stop_reply): Remove.
8091 (discard_queued_stop_replies): Update.
8092 (notif_stop): New variable.
8093 (handle_v_stopped): Remove.
8094 (handle_v_requests): Don't call handle_v_stopped. Call
8095 handle_ack_notif instead.
8096 (queue_stop_reply_callback): Call notif_event_enque instead
8097 of queue_stop_reply.
8098 (handle_status): Don't call send_next_stop_reply, call
8099 notif_write_event instead.
8100 (kill_inferior_callback): Likewise.
8101 (detach_or_kill_inferior_callback): Likewise.
8102 (main): Call initialize_notif.
8103 (process_serial_event): Call QUEUE_is_empty.
8104 (handle_target_event): Call notif_push instead of push event.
8105 * server.h (push_event): Remove declaration.
8107 2012-12-10 Tom Tromey <tromey@redhat.com>
8109 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8110 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8113 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8114 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8115 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8116 (amd64-linux-ipa.o, ax.o): Rewrite.
8117 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8118 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8119 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8120 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8121 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8122 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8123 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8124 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8125 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8126 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8127 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8128 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8129 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8130 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8131 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8132 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8133 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8134 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8135 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8136 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8137 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8138 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8139 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8140 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8141 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8142 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8143 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8144 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8145 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8146 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8147 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8148 (reg-tilegx.o): Remove.
8149 (all_object_files): New macro.
8150 Include .deps files.
8151 * aclocal.m4, configure: Rebuild.
8152 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8153 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8154 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8156 2012-12-05 Tom Tromey <tromey@redhat.com>
8159 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8161 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8163 * configure.ac: Check for linux/perf_event.h.
8164 * config.in: Regenerated.
8165 * configure: Regenerated.
8167 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8169 * hostio.c (handle_readlink): Decrease buffer size
8170 parameter passed to readlink by one byte.
8172 2012-11-26 Yao Qi <yao@codesourcery.com>
8174 * configure.ac (build_warnings): Append '-Wempty-body'.
8175 * configure: Regenerated.
8176 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8179 2012-11-15 Pierre Muller <muller@sourceware.org>
8181 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8182 * config.in: Regenerate.
8183 * configure: Regenerate.
8184 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8185 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8186 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8187 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8189 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8190 instead of <sys/wait.h> header.
8191 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8193 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8195 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8196 (various make rules): Remove -DGDBSERVER
8198 2012-11-09 Yao Qi <yao@codesourcery.com>
8200 * spu-low.c (current_ptid): Move it to ..
8201 * gdbthread.h: ... here. New.
8202 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8203 * server.c (myresume, process_serial_event): Likewise.
8204 * thread-db.c (thread_db_find_new_threads): Likewise.
8205 * tracepoint.c (run_inferior_command): Likewise.
8207 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8209 * server.c (handle_search_memory_1): Include access length in
8212 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8214 * linux-crisv32-low.c: Fix compile errors.
8216 2012-09-04 Yao Qi <yao@codesourcery.com>
8218 * tracepoint.c (cmd_qtsv): Adjust debug message.
8219 Don't check CUR_TPOINT.
8221 2012-08-28 Yao Qi <yao@codesourcery.com>
8223 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8224 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8225 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8226 Remove declarations of xmalloc, xreallloc, xstrdup and
8228 * Makefile.in (libiberty_h): New.
8229 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8230 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8232 2012-08-23 Yao Qi <yao@codesourcery.com>
8234 * server.h: Remove declaration of 'xsnprintf'.
8236 2012-08-22 Keith Seitz <keiths@redhat.com>
8238 * server.h: Include build-gnulib-gbserver/config.h.
8239 * gdbreplay.c: Likewise.
8241 2012-08-08 Doug Evans <dje@google.com>
8243 * Makefile.in (SFILES): Add gdb_vecs.c.
8244 (OBS): Add gdb_vecs.o.
8245 (gdb_vecs_h, host_defs_h): New variables.
8246 (thread-db.o): Add $(gdb_vecs_h) dependency.
8247 (gdb_vecs.o): New rule.
8248 * thread-db.c: #include "gdb_vecs.h".
8249 (thread_db_load_search): Use a vector to iterate over path elements.
8250 Handle text appearing after "$pdir".
8252 * configure.ac: Add check for strstr.
8253 * config.in: Regenerate.
8254 * configure: Regenerate.
8256 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8258 * hostio.c (handle_pread): If pread fails, fall back to attempting
8260 (handle_pwrite): Likewise for pwrite.
8262 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8264 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8265 between unsupported TYPE and unimplementable ADDR/LEN combination.
8266 (arm_insert_point): Act on new return value.
8268 2012-07-31 Pedro Alves <palves@redhat.com>
8270 * server.c (process_point_options): Only skip tokens if we find
8271 one that is unrecognized. Don't treat 'X' specially while
8272 skipping unrecognized tokens.
8274 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8276 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8277 to 4-byte-align HW breakpoint addresses for Thumb.
8279 2012-07-27 Yao Qi <yao@codesourcery.com>
8283 * server.h: Declare gdb_agent_about_to_close.
8284 * target.c (kill_inferior): Include "agent.h".
8285 New. Send command 'kill'.
8286 * target.h (kill_inferior): Removed macro.
8287 * tracepoint.c (gdb_agent_about_to_close): New.
8288 (gdb_agent_helper_thread): Handle command 'close'.
8289 Wait endlessly until the inferior stops.
8290 Install gdb_agent_remove_socket to atexit hook.
8291 (agent_socket_name): New static variable.
8292 (gdb_agent_socket_init): Replace local variable 'name' with
8293 'agent_socket_name'.
8294 (gdb_agent_remove_socket): New.
8296 2012-07-27 Yao Qi <yao@codesourcery.com>
8298 * server.c (process_point_options): Stop at 'X' when parsing.
8300 2012-07-19 Michael Eager <eager@eagercon.com>
8302 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8304 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8305 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8306 hardware breakpoint.
8308 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8310 * gdbserver/linux-low.c (initialize_low): Call
8311 linux_ptrace_init_warnings.
8313 2012-07-02 Doug Evans <dje@google.com>
8315 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8318 2012-07-02 Stan Shebs <stan@codesourcery.com>
8320 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8321 (ax.o): Add it to build rule.
8323 (OBS): Add format.o.
8324 (IPA_OBS): Add format.o.
8325 * server.c (handle_query): Claim support for breakpoint commands.
8326 (process_point_options): Add command case.
8327 (process_serial_event): Leave running if there are printfs in
8329 * mem-break.h (any_persistent_commands): Declare.
8330 (add_breakpoint_commands): Declare.
8331 (gdb_no_commands_at_breakpoint): Declare.
8332 (run_breakpoint_commands): Declare.
8333 * mem-break.c (struct point_command_list): New struct.
8334 (struct breakpoint): New field command_list.
8335 (any_persistent_commands): New function.
8336 (add_commands_to_breakpoint): New function.
8337 (add_breakpoint_commands): New function.
8338 (gdb_no_commands_at_breakpoint): New function.
8339 (run_breakpoint_commands): New function.
8340 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8342 * ax.c: Include format.h.
8343 (ax_printf): New function.
8344 (gdb_eval_agent_expr): Add printf opcode.
8346 2012-06-13 Yao Qi <yao@codesourcery.com>
8348 * server.c (start_inferior): Remove duplicated writes to fields
8349 'last_resume_kind' and 'last_status' of 'current_inferior'.
8351 2012-06-12 Yao Qi <yao@codesourcery.com>
8352 Pedro Alves <palves@redhat.com>
8354 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8356 * server.c (handle_v_cont): Extend comment.
8358 2012-06-11 Yao Qi <yao@codesourcery.com>
8360 * linux-low.c (linux_attach): Add 'static'.
8362 2012-06-06 Yao Qi <yao@codesourcery.com>
8364 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8366 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8368 Fix gcc -flto compilation warning.
8369 * server.c (main): Make variable multi_mode and attach volatile.
8371 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8373 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8374 if the platform doesn't know about it.
8376 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8378 * Makefile.in (SFILES): Add linux-tile-low.c.
8379 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8380 * configure.srv: Handle tilegx-*-linux*.
8381 * linux-tile-low.c: New file.
8383 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8385 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8387 2012-05-24 Pedro Alves <palves@redhat.com>
8391 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8393 2012-05-24 Pedro Alves <palves@redhat.com>
8397 Replace target_signal with gdb_signal throughout.
8399 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8401 * linux-low.c (linux_store_registers): Avoid the copying sequence
8402 when no data has been retrieved by ptrace.
8404 2012-05-22 Will Deacon <will.deacon@arm.com>
8406 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8407 Include asm/ptrace.h.
8408 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8411 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8413 * linux-low.c (linux_store_registers): Don't re-retrieve data
8414 with ptrace that has already been obtained from /proc. Always
8415 copy any data retrieved with ptrace to the buffer supplied.
8417 2012-05-11 Yao Qi <yao@codesourcery.com>
8418 Pedro Alves <palves@redhat.com>
8420 * linux-low.c (enum stopping_threads_kind): New.
8421 (stopping_threads): Change type to `enum stopping_threads_kind'.
8422 (handle_extended_wait): If stopping and suspending threads, leave
8423 the new_lwp suspended too.
8424 (linux_wait_for_event): Adjust.
8425 (stop_all_lwps): Set `stopping_threads' to
8426 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8427 whether we're suspending threads or just stopping them. Assert no
8430 2012-04-29 Yao Qi <yao@codesourcery.com>
8432 * server.h: Move some code to ...
8433 * gdbthread.h: ... here. New.
8434 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8435 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8436 (nto-low.o, win32-low.o): Likewise.
8437 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8438 * regcache.c, remote-utils.c, server.c: Likewise.
8439 * target.c, tracepoint.c, win32-low.c: Likewise.
8441 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8443 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8444 (PTRACE_ARG4_TYPE): Likewise.
8445 (PTRACE_XFER_TYPE): Likewise.
8446 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8447 ptrace to PTRACE_ARG3_TYPE.
8448 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8449 (PTRACE_ARG4_TYPE): Likewise.
8450 (PTRACE_XFER_TYPE): Likewise.
8451 (linux_detach_one_lwp): Cast fourth argument of
8452 ptrace to long then PTRACE_ARG4_TYPE.
8453 (regsets_fetch_inferior_registers): Cast third argument of
8454 ptrace to long then PTRACE_ARG3_TYPE.
8455 (regsets_store_inferior_registers): Likewise.
8457 2012-04-20 Pedro Alves <palves@redhat.com>
8459 * configure: Regenerate.
8461 2012-04-19 Pedro Alves <palves@redhat.com>
8463 * Makefile.in (GNULIB_BUILDDIR): New.
8464 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8465 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8466 (all, install-only, uninstall, clean-info, all-lib, clean): No
8467 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8468 (maintainer-clean realclean distclean): Use subdir_do.
8470 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8471 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8472 * acinclude.m4: Include acx_configure_dir.m4.
8473 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8474 calls. Call AC_PROG_RANLIB. Configure gnulib using
8477 (GNULIB_STDINT_H): Adjust.
8478 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8479 * gdbreplay.c: Include build-gnulib/config.h.
8480 * server.h: Likewise.
8481 * aclocal.m4: Regenerate.
8482 * config.in: Regenerate.
8483 * configure: Regenerate.
8485 2012-04-19 Pedro Alves <palves@redhat.com>
8487 * Makefile.in (LIBGNU, INCGNU): Adjust.
8488 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8489 (all, install-only, uninstall, clean-info, all-lib, clean)
8490 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8491 * configure.ac: Adjust AC_OUTPUT output.
8492 * aclocal.m4: Regenerate.
8493 * configure: Regenerate.
8495 2012-04-19 Pedro Alves <palves@redhat.com>
8497 * Makefile.in (generated_files): New.
8498 (server_h): Remove the explicit dependency on config.h, and depend
8499 on $generated_files.
8501 2012-04-19 Pedro Alves <palves@redhat.com>
8503 * Makefile.in (INCGNU): Add -Ignulib.
8505 2012-04-19 Pedro Alves <palves@redhat.com>
8507 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8508 (INCGNU): ... this, and spell out -I here.
8509 (GNULIB_LIB): Rename to ...
8511 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8513 2012-04-19 Pedro Alves <palves@redhat.com>
8515 * config.in: Regenerate.
8517 2012-04-19 Pedro Alves <palves@redhat.com>
8519 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8520 * server.h (memmem): Remove declaration.
8521 * config.in: Regenerate.
8522 * configure: Regenerate.
8524 2012-04-19 Yao Qi <yao@codesourcery.com>
8526 * Makefile.in (SFILES): Add common/vec.c.
8530 2012-04-19 Yao Qi <yao@codesourcery.com>
8532 * remote-utils.c (prepare_resume_reply): Replace with macro
8533 target_core_of_thread.
8534 * server.c (handle_qxfer_threads_proper): Likewise.
8535 * target.h (traget_core_of_thread): New macro.
8537 2012-04-18 Pedro Alves <palves@redhat.com>
8539 * aclocal.m4: Regenerate.
8540 * configure: Regenerate.
8542 2012-04-16 Yao Qi <yao@codesourcery.com>
8544 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8545 duplicated on address.
8547 2012-04-16 Yao Qi <yao@codesourcery.com>
8549 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8550 (struct tracepoint_action_ops) <send>: New field.
8551 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8552 (agent_expr_send, x_tracepoint_action_send): New.
8553 (l_tracepoint_action_send): New.
8554 (cmd_qtdp): Download and install tracepoint
8555 according to `use_agent'.
8556 (run_inferior_command): Add one more parameter `len'.
8558 (tracepoint_send_agent): New.
8559 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8561 2012-04-16 Yao Qi <yao@codesourcery.com>
8563 * tracepoint.c (download_tracepoints): Moved to ...
8564 (cmd_qtstart): ... here.
8566 2012-04-14 Yao Qi <yao@codesourcery.com>
8568 * tracepoint.c: Include inttypes.h.
8569 (struct collect_memory_action): Use sized types.
8570 (struct tracepoint): Likewise.
8571 (cmd_qtdp, stop_tracing): Update print specifiers.
8572 (cmd_qtp, response_tracepoint): Likewise.
8573 (collect_data_at_tracepoint): Likewise.
8574 (collect_data_at_step): Likewise.
8576 2012-04-14 Yao Qi <yao@codesourcery.com>
8578 Import gnulib module inttypes.
8579 * aclocal.m4, config.in, configure: Regenerated.
8581 2012-04-14 Yao Qi <yao@codesourcery.com>
8583 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8584 Makefile and config.status at last.
8586 2012-04-13 Yao Qi <yao@codesourcery.com>
8588 * tracepoint.c: Include stdint.h unconditionally.
8590 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8592 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8593 on BFD_HAVE_SYS_PROCFS_TYPE.
8594 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8595 * configure: Regenerate.
8596 * config.in: Likewise.
8598 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8600 * Makefile.in (clean): Also remove x32.c x32-linux.c
8601 x32-avx.c x32-avx-linux.c.
8602 (x32.o): New target.
8604 (x32-linux.o): Likewise.
8605 (x32-linux.c): Likewise.
8606 (x32-avx.o): Likewise.
8607 (x32-avx.c): Likewise.
8608 (x32-avx-linux.o): Likewise.
8609 (x32-avx-linux.c): Likewise.
8611 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8612 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8613 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8614 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8615 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8616 i386/x32-avx-linux.xml.
8618 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8619 (init_registers_x32_avx_linux): Likwise.
8620 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8621 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8623 2012-04-13 Pedro Alves <palves@redhat.com>
8625 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8626 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8627 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8628 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8631 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8633 * linux-x86-low.c (compat_x32_clock_t): New.
8634 (compat_x32_siginfo_t): Likewise.
8635 (compat_x32_siginfo_from_siginfo): Likewise.
8636 (siginfo_from_compat_x32_siginfo): Likewise.
8637 (linux_is_elf64): Likewise.
8638 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8639 and siginfo_from_compat_x32_siginfo for x32.
8640 (x86_arch_setup): Set linux_is_elf64.
8642 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8645 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8647 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8648 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8649 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8650 compatible with process.
8652 2012-04-12 Yao Qi <yao@codesourcery.com>
8654 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8655 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8656 (install-only, install-info, clean): Handle sub dir gnulib.
8657 (all-lib, am--refresh): New targets.
8658 (memmem.o): Remove target.
8659 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8660 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8661 (AC_REPLACE_FUNCS): Remove memmem.
8662 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8663 (AC_OUTPUT): Generate Makefile in gnulib/.
8664 * aclocal.m4, config.in, configure: Regenerated.
8666 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8668 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8670 2012-04-05 Pedro Alves <palves@redhat.com>
8672 -Werror=strict-aliasing
8674 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8677 2012-04-04 Pedro Alves <palves@redhat.com>
8679 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8680 (sparc_store_gregset_from_stack, sparc_store_gregset)
8681 (sparc_breakpoint_at): Fix formatting.
8683 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8685 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8687 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8688 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8689 * config.in: Regenerate.
8690 * configure: Likewise.
8692 2012-03-29 Pedro Alves <palves@redhat.com>
8694 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8695 Correct ptrace arguments.
8697 2012-03-28 Pedro Alves <palves@redhat.com>
8699 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8700 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8701 (IA64_FR1_REGNUM): New defines.
8702 (ia64_fetch_register): New.
8703 (the_low_target): Install it.
8704 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8706 * linux-low.c (linux_fetch_registers): Try the
8707 the_low_target.fetch_register hook first.
8709 * linux-arm-low.c (the_low_target): Adjust.
8710 * linux-bfin-low.c (the_low_target): Adjust.
8711 * linux-cris-low.c (the_low_target): Adjust.
8712 * linux-crisv32-low.c (the_low_target): Adjust.
8713 * linux-m32r-low.c (the_low_target): Adjust.
8714 * linux-m68k-low.c (the_low_target): Adjust.
8715 * linux-mips-low.c (the_low_target): Adjust.
8716 * linux-ppc-low.c (the_low_target): Adjust.
8717 * linux-s390-low.c (the_low_target): Adjust.
8718 * linux-sh-low.c (the_low_target): Adjust.
8719 * linux-sparc-low.c (the_low_target): Adjust.
8720 * linux-tic6x-low.c (the_low_target): Adjust.
8721 * linux-x86-low.c (the_low_target): Adjust.
8722 * linux-xtensa-low.c (the_low_target): Adjust.
8724 2012-03-26 Pedro Alves <palves@redhat.com>
8726 * server.c (handle_qxfer_libraries): Don't bail early if
8727 the_target->qxfer_libraries_svr4 is not NULL.
8729 2012-03-26 Pedro Alves <palves@redhat.com>
8731 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8733 2012-03-23 Pedro Alves <palves@redhat.com>
8735 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8736 "library-list-svr4" element's start tag when the the DSO list is
8739 2012-03-23 Pedro Alves <palves@redhat.com>
8741 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8742 a variable whose type size is the same as the inferior's pointer
8745 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8747 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8749 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8750 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8751 * linux-low.h: Include <signal.h>.
8752 (struct siginfo): Remove forward declaration.
8753 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8756 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8758 * .gitignore: Ignore more files.
8760 2012-03-19 Pedro Alves <palves@redhat.com>
8761 Jan Kratochvil <jan.kratochvil@redhat.com>
8763 * server.c (cont_thread, general_thread): Add describing comments.
8764 (start_inferior): Clear `cont_thread'.
8765 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8768 2012-03-15 Yao Qi <yao@codesourcery.com>
8770 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8772 (cmd_qtdp): ... here.
8774 2012-03-15 Yao Qi <yao@codesourcery.com>
8776 * tracepoint.c (struct tracepoint_action_ops): New.
8777 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8778 (m_tracepoint_action_download): New.
8779 (r_tracepoint_action_download): New.
8780 (x_tracepoint_action_download): New.
8781 (l_tracepoint_action_download): New.
8782 (add_tracepoint_action): Install `action->ops' according type.
8783 (download_tracepoint_1): Move code `download' function pointer
8784 of various tracepoint_action_ops.
8786 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8788 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8789 linux_ptrace_attach_warnings.
8791 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8793 * Makefile.in (linux-ptrace.o): New.
8794 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8795 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8796 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8797 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8798 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8800 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8802 2012-03-08 Yao Qi <yao@codesourcery.com>
8803 Pedro Alves <palves@redhat.com>
8805 Fix PR server/13392.
8806 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8808 * tracepoint.c (remove_tracepoint): New.
8809 (cmd_qtdp): Call remove_tracepoint when failed to install.
8811 2012-03-07 Pedro Alves <palves@redhat.com>
8813 * linux-low.c (get_detach_signal): New.
8814 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8815 Pass on pending signals to PTRACE_DETACH. Check the result of the
8817 * server.c (program_signals, program_signals_p): New.
8818 (handle_general_set): Handle QProgramSignals.
8819 * server.h (program_signals, program_signals_p): Declare.
8821 2012-03-05 Pedro Alves <palves@redhat.com>
8822 Jan Kratochvil <jan.kratochvil@redhat.com>
8824 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8827 2012-03-03 Yao Qi <yao@codesourcery.com>
8829 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8830 agent_look_up_symbols.
8832 2012-03-03 Yao Qi <yao@codesourcery.com>
8834 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8835 (linux-x86-low.o): Likewise.
8836 * server.h: Remove in_process_agent_loaded.
8837 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8841 2012-03-03 Yao Qi <yao@codesourcery.com>
8843 * tracepoint.c (gdb_agent_capability): New global.
8844 (in_process_agent_loaded_ust): Renamed to
8845 `in_process_agent_supports_ust'.
8847 (in_process_agent_supports_ust): Call agent_capability_check.
8848 (clear_installed_tracepoints): Assert that agent supports
8851 2012-03-03 Yao Qi <yao@codesourcery.com>
8853 * linux-low.c (linux_supports_agent): New.
8854 (linux_target_ops): Initialize field `supports_agent' with
8855 linux_supports_agent.
8856 * target.h (struct target_ops) <supports_agent>: New.
8857 (target_supports_agent): New macro.
8858 * server.c (handle_general_set): Handle packet 'QAgent'.
8859 (handle_query): Send `QAgent+'.
8860 * Makefile.in (server.o): Depends on agent.h.
8862 2012-03-03 Yao Qi <yao@codesourcery.com>
8864 * Makefile.in (OBS): Add agent.o.
8865 Add new rule for agent.o.
8866 Track dependence of tracepoint.c on agent.h.
8867 * tracepoint.c (run_inferior_command_1):
8868 (run_inferior_command): Call agent_run_command.
8869 (gdb_ust_connect_sync_socket): Deleted. Move it to
8871 (resume_thread, stop_thread): Likewise.
8872 (gdb_ust_socket_init): Renamed to ...
8873 (gdb_agent_socket_init): ... New.
8874 (gdb_ust_thread): Renamed to ...
8875 (gdb_agent_helper_thread): ... New.
8876 (gdb_ust_init): Move some code to ...
8877 (gdb_agent_init): ... here. New.
8878 [HAVE_UST]: Call gdb_ust_init.
8879 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8880 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8881 * config.in, configure: Regenerated.
8883 2012-03-02 Pedro Alves <palves@redhat.com>
8885 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8886 * linux-low.c (struct simple_pid_list): New.
8887 (stopped_pids): New a struct simple_pid_list pointer.
8888 (add_to_pid_list, pull_pid_from_list): New.
8889 (handle_extended_wait): Don't assume the first signal new children
8890 report is SIGSTOP. Adjust call to pull_pid_from_list.
8891 (linux_wait_for_lwp): Adjust.
8893 2012-03-02 Yao Qi <yao@codesourcery.com>
8895 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8898 2012-03-02 Yao Qi <yao@codesourcery.com>
8900 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8901 `stop_pc' and `tpoint'. Update caller.
8903 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8905 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8906 * linux-low.c (use_linux_regsets): New macro.
8907 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8908 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8909 (linux_register_in_regsets): New function.
8910 (usr_fetch_inferior_registers): Skip registers covered by
8912 (usr_store_inferior_registers): Likewise.
8913 (usr_fetch_inferior_registers): New macro.
8914 (usr_store_inferior_registers): Likewise.
8915 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8916 (linux_store_registers): Likewise.
8917 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8919 (init_registers_mips64_dsp_linux): Likewise.
8920 (init_registers_mips_linux): New macro.
8921 (init_registers_mips_dsp_linux): Likewise.
8922 (mips_dsp_num_regs): Likewise.
8923 (DSP_BASE, DSP_CONTROL): New fallback macros.
8924 (mips_base_regs): New macro.
8925 (mips_regmap): Use it. Fix the size.
8926 (mips_dsp_regmap): New variable.
8927 (mips_dsp_regset_bitmap): Likewise.
8928 (mips_arch_setup): New function.
8929 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8931 (mips_cannot_store_register): Likewise.
8932 (the_low_target): Update .arch_setup, .num_regs and .regmap
8933 initializers. Add .regset_bitmap initializer.
8934 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8936 * linux-bfin-low.c (the_low_target): Likewise.
8937 * linux-cris-low.c (the_low_target): Likewise.
8938 * linux-crisv32-low.c (the_low_target): Likewise.
8939 * linux-ia64-low.c (the_low_target): Likewise.
8940 * linux-m32r-low.c (the_low_target): Likewise.
8941 * linux-m68k-low.c (the_low_target): Likewise.
8942 * linux-ppc-low.c (the_low_target): Likewise.
8943 * linux-s390-low.c (the_low_target): Likewise.
8944 * linux-sh-low.c (the_low_target): Likewise.
8945 * linux-sparc-low.c (the_low_target): Likewise.
8946 * linux-tic6x-low.c (the_low_target): Likewise.
8947 * linux-x86-low.c (the_low_target): Likewise.
8948 * linux-xtensa-low.c (the_low_target): Likewise.
8949 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8950 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8951 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8953 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8954 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8956 2012-02-29 Yao Qi <yao@codesourcery.com>
8957 Pedro Alves <palves@redhat.com>
8959 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8960 `step_over_finished' is true.
8962 2012-02-27 Pedro Alves <palves@redhat.com>
8964 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8965 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8967 2012-02-27 Pedro Alves <palves@redhat.com>
8970 * linux-low.c (pid_is_stopped): New.
8971 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8973 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8975 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8978 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8980 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8982 2012-02-24 Luis Machado <lgustavo@codesourcery>
8984 * server.c (handle_query): Advertise support for target-side
8985 breakpoint condition evaluation.
8986 (process_point_options): New function.
8987 (process_serial_event): When inserting a breakpoint, check for
8988 a target-side condition that should be evaluated.
8990 * mem-break.c: Include regcache.h and ax.h.
8991 (point_cond_list_t): New data structure.
8992 (breakpoint) <cond_list>: New field.
8993 (find_gdb_breakpoint_at): Make non-static.
8994 (delete_gdb_breakpoint_at): Clear any target-side
8996 (clear_gdb_breakpoint_conditions): New function.
8997 (add_condition_to_breakpoint): Likewise.
8998 (add_breakpoint_condition): Likewise.
8999 (gdb_condition_true_at_breakpoint): Likewise.
9000 (gdb_breakpoint_here): Return result directly instead
9001 of going through a local variable.
9003 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9004 (clear_gdb_breakpoint_conditions): Likewise.
9005 (add_breakpoint_condition): Likewise.
9006 (gdb_condition_true_at_breakpoint): Likewise.
9008 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9009 (need_step_over_p): Take target-side breakpoint condition into
9012 2012-02-24 Luis Machado <lgustavo@codesourcery>
9014 * server.h: Include tracepoint.h.
9015 (agent_mem_read, agent_get_trace_state_variable_value,
9016 agent_set_trace_state_variable_value,
9017 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9018 get_set_tsv_func_addr): New prototypes.
9020 * ax.h: New include file.
9021 * ax.c: New source file.
9023 * tracepoint.c: Include ax.h.
9024 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9025 agent_expr, eval_result_type): Move to ax.h.
9026 (parse_agent_expr): Rename to ...
9027 (gdb_parse_agent_expr): ... this, make it non-static and move
9029 (unparse_agent_expr) Rename to ...
9030 (gdb_unparse_agent_expr): ... this, make it non-static and move
9032 (eval_agent_expr): Rename to ...
9033 (eval_tracepoint_agent_expr): ... this.
9034 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9035 forward declarations.
9036 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9037 (agent_get_trace_state_variable_value): New function.
9038 (agent_set_trace_state_variable_value): New function.
9039 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9040 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9041 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9042 (condition_true_at_tracepoint): Likewise.
9043 (parse_agent_expr): Rename to ...
9044 (gdb_parse_agent_expr): ... this and move to ax.c.
9045 (unparse_agent_expr): Rename to ...
9046 (gdb_unparse_agent_expr): ... this and move to ax.c.
9047 (gdb_agent_op_name): Move to ax.c.
9048 (eval_agent_expr): Rename to ...
9049 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9051 (eval_tracepoint_agent_expr): New function.
9052 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9054 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9056 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9057 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9058 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9059 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9060 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9061 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9062 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9063 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9064 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9065 (compile_bytecodes): Remove forward declaration.
9066 (is_goto_target): Move to ax.c.
9067 (compile_bytecodes): Move to ax.c and call
9068 agent_get_trace_state_variable_value (...) and
9069 agent_set_trace_state_variable_value (...).
9071 * Makefile.in: Update ax.c and IPA dependencies.
9073 2012-02-24 Pedro Alves <palves@redhat.com>
9075 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9076 (cmd_bigqtbuffer_circular): ... this. Only handle
9077 'QTBuffer:circular:'.
9078 (handle_tracepoint_general_set): Adjust.
9080 2012-02-16 Yao Qi <yao@codesourcery.com>
9082 * inferiors.c: Move code to ...
9083 * dll.c: .... here. New.
9084 * server.h: Declare clear_dlls.
9085 * Makefile.in (SFILES): Add dll.c.
9089 2012-02-11 Yao Qi <yao@codesourcery.com>
9091 * server.c: (handle_monitor_command): Add a new parameter
9093 (handle_query): Update caller.
9095 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9097 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9098 * configure, config.in: Regenerate.
9099 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9102 2012-02-02 Pedro Alves <palves@redhat.com>
9104 Try SIGKILL first, then PTRACE_KILL.
9105 * linux-low.c (linux_kill_one_lwp): New.
9106 (linux_kill_one_lwp): Rename to ...
9107 (kill_one_lwp_callback): ... this. Use the new
9110 2012-02-02 Pedro Alves <palves@redhat.com>
9112 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9115 2012-01-27 Pedro Alves <palves@redhat.com>
9117 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9118 (elf_64_file_p): Make static.
9119 (linux_pid_exe_is_elf_64_file): New.
9120 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9121 Delete declarations.
9122 (linux_pid_exe_is_elf_64_file): Declare.
9123 * linux-x86-low.c (x86_arch_setup): Use
9124 linux_pid_exe_is_elf_64_file.
9126 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9128 * linux-low.c (linux_wait_for_event_1): Rename to ...
9129 (linux_wait_for_event): ... here and merge it with former
9130 linux_wait_for_event - new variable wait_ptid, use it.
9131 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9133 2012-01-23 Pedro Alves <palves@redhat.com>
9135 * server.c (main): Avoid yet another case of infinite loop while
9136 detaching/killing after a longjmp.
9138 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9141 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9143 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9145 * hostio.c (handle_readlink): New function.
9146 (handle_vFile): Call it to handle "vFile:readlink" packets.
9148 2012-01-20 Pedro Alves <palves@redhat.com>
9149 Ulrich Weigand <ulrich.weigand@linaro.org>
9151 * server.c (handle_v_requests): Only support vAttach and vRun to
9152 start multiple processes when in extended protocol mode.
9154 2012-01-17 Pedro Alves <palves@redhat.com>
9156 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9157 memalign plus mprotect to allocate the scratch buffer.
9159 2012-01-13 Pedro Alves <palves@redhat.com>
9161 * server.c (attach_inferior): Clear `cont_thread'.
9163 2012-01-13 Pedro Alves <palves@redhat.com>
9165 * server.c (main): Avoid infinite loop while detaching/killing
9168 2012-01-09 Doug Evans <dje@google.com>
9170 * server.c (start_inferior): Set last_ptid in --wrapper case.
9172 2012-01-06 Yao Qi <yao@codesourcery.com>
9174 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9176 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9178 2012-01-04 Yao Qi <yao@codesourcery.com>
9180 * tracepoint.c (cmd_qtdp): Print debug message
9181 for static tracepoint.
9183 2012-01-04 Yao Qi <yao@codesourcery.com>
9185 * tracepoint.c (trace_vdebug): Differentiate debug message
9186 between gdbserver and IPA.
9188 2012-01-03 Yao Qi <yao@codesourcery.com>
9190 * tracepoint.c (tracepoint_was_hit): Don't collect for
9193 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9195 * terminal.h: Reformat copyright header.
9197 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9199 * server.c (gdbserver_version): Update copyright year.
9200 * gdbreplay.c (gdbreplay_version): Likewise.
9202 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9204 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9207 2011-12-18 Hui Zhu <teawater@gmail.com>
9208 * linux-low.c (linux_create_inferior): Save return value to ret.
9210 2011-12-18 Hui Zhu <teawater@gmail.com>
9212 * linux-low.c (linux_create_inferior): Save return value to ret.
9214 2011-12-16 Doug Evans <dje@google.com>
9216 * linux-low.c (linux_create_inferior): If stdio connection,
9217 redirect stdin from /dev/null, stdout to stderr.
9218 * remote-utils.c (remote_is_stdio): New static global.
9219 (remote_connection_is_stdio): New function.
9220 (remote_prepare): Handle stdio connection.
9221 (remote_open): Ditto.
9222 (remote_close): Don't close stdin for stdio connections.
9223 (read_prim,write_prim): New functions. Replace all calls to
9224 read/write to these.
9225 * server.c (main): Watch for "-" argument. Move call to
9226 remote_prepare before start_inferior.
9227 * server.h (STDIO_CONNECTION_NAME): New macro.
9228 (remote_connection_is_stdio): Declare.
9230 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9231 in debugging output.
9233 2011-12-15 Yao Qi <yao@codesourcery.com>
9235 * tracepoint.c: Include sys/syscall.h.
9236 (gdb_ust_thread): Remove preprocessor conditional.
9238 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9240 * linux-low.c (linux_detach_one_lwp): Call
9241 the_low_target.prepare_to_resume before detaching.
9243 2011-12-14 Yao Qi <yao@codesourcery.com>
9245 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9248 2011-12-14 Yao Qi <yao@codesourcery.com>
9250 * i386-low.c (i386_low_stopped_data_address): Initialize local
9253 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9257 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9258 DR_CONTROL unless necessary. Extend comments.
9259 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9260 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9262 2011-12-13 Yao Qi <yao@codesourcery.com>
9264 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9266 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9268 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9270 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9271 Print new debug message for such case.
9273 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9275 Fix overlapping memcpy.
9276 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9277 the read_inferior_memory transfer.
9278 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9279 write_inferior_memory transfer.
9280 (set_fast_tracepoint_jump): New variable buf. Use it for the
9281 read_inferior_memory and write_inferior_memory transfers.
9282 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9283 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9284 Use it for the write_inferior_memory transfer.
9285 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9288 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9290 * linux-low.c (fetch_register, store_register): Make code
9291 consistent, fix formatting.
9293 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9295 * linux-low.c (usr_store_inferior_registers): Factor out code
9296 to handle individual registers into...
9297 (store_register): ... this new function.
9299 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9301 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9302 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9303 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9304 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9305 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9306 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9307 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9308 (srv_xmlfiles): Add new XML files.
9310 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9312 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9313 (init_registers_s390_linux32v1): Add prototype.
9314 (init_registers_s390_linux32v2): Likewise.
9315 (init_registers_s390_linux64v1): Likewise.
9316 (init_registers_s390_linux64v2): Likewise.
9317 (init_registers_s390x_linux64v1): Likewise.
9318 (init_registers_s390x_linux64v2): Likewise.
9319 (s390_num_regs): Increment to 52.
9320 (s390_regmap): Add orig_r2 register.
9321 (s390_num_regs_3264): Increment to 68.
9322 (s390_regmap_3264): Add orig_r2 register.
9323 (s390_collect_ptrace_register): Handle orig_r2 register.
9324 (s390_supply_ptrace_register): Likewise.
9325 (s390_fill_last_break): New function.
9326 (s390_store_last_break): Likewise.
9327 (s390_fill_system_call): New function.
9328 (s390_store_system_call): Likewise.
9329 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9331 (s390_check_regset): New function.
9332 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9333 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9334 Update target_regsets for available register sets.
9336 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9337 Jan Kratochvil <jan.kratochvil@redhat.com>
9339 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9340 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9342 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9343 * linux-low.h (struct process_info_private): New member r_debug.
9344 * server.c (handle_qxfer_libraries): Call
9345 the_target->qxfer_libraries_svr4.
9346 (handle_qxfer_libraries_svr4): New function.
9347 (qxfer_packets): New entry "libraries-svr4".
9348 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9349 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9350 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9351 PACKET_qXfer_libraries_svr4.
9353 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9355 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9356 PSW address/mask between 8-byte and 16-byte formats.
9357 (s390_supply_ptrace_register): Likewise.
9358 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9359 basic addressing mode bit.
9361 2011-11-24 Stan Shebs <stan@codesourcery.com>
9363 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9365 2011-11-17 Stan Shebs <stan@codesourcery.com>
9367 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9368 (tracing_start_time): New global.
9369 (tracing_stop_time): New global.
9370 (tracing_user_name): New global.
9371 (tracing_notes): New global.
9372 (tracing_stop_note): New global.
9373 (cmd_qtstart): Set traceframe_usage, start_time.
9374 (stop_tracing): Set stop_time.
9375 (cmd_qtstatus): Report additional status.
9376 (cmd_qtp): New function.
9377 (handle_tracepoint_query): Call it.
9378 (cmd_qtnotes): New function.
9379 (handle_tracepoint_general_set): Call it.
9380 (get_timestamp): Rename from tsv_get_timestamp.
9382 2011-11-14 Stan Shebs <stan@codesourcery.com>
9383 Kwok Cheung Yeung <kcy@codesourcery.com>
9385 * linux-x86-low.c (small_jump_insn): New.
9386 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9387 trampoline and error message, build a trampoline and issue a small
9388 jump instruction to it.
9389 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9390 trampoline and error message.
9391 (x86_get_min_fast_tracepoint_insn_len): New.
9392 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9393 * linux-low.h (struct linux_target_ops): Add arguments to
9394 install_fast_tracepoint_jump_pad operation, add new operation.
9395 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9397 (linux_get_min_fast_tracepoint_insn_len): New function.
9398 (linux_target_op): Add new operation.
9399 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9400 (gdb_trampoline_buffer_end): Ditto.
9401 (gdb_trampoline_buffer_error): Ditto.
9402 (struct ipa_sym_addresses): Add fields for new IPA variables.
9403 (symbol_list): Add entries for new IPA variables.
9404 (struct tracepoint): Add fields to hold the address range of the
9405 trampoline used by the tracepoint.
9406 (trampoline_buffer_head): New static variable.
9407 (trampoline_buffer_tail): Ditto.
9408 (claim_trampoline_space): New function.
9409 (have_fast_tracepoint_trampoline_buffer): New function.
9410 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9412 (install_fast_tracepoint): Ditto, also add error buffer argument.
9413 (cmd_qtminftpilen): New function.
9414 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9415 (fast_tracepoint_from_trampoline_address): New function.
9416 (fast_tracepoint_collecting): Handle trampoline as part of jump
9418 (set_trampoline_buffer_space): New function.
9419 (initialize_tracepoint): Initialize new IPA variables.
9420 * target.h (struct target_ops): Add arguments to
9421 install_fast_tracepoint_jump_pad operation, add new
9422 get_min_fast_tracepoint_insn_len operation.
9423 (target_get_min_fast_tracepoint_insn_len): New.
9424 (install_fast_tracepoint_jump_pad): Add arguments.
9425 * server.h (IPA_BUFSIZ): Define.
9426 * linux-i386-ipa.c: Include extra header files.
9427 (initialize_fast_tracepoint_trampoline_buffer): New function.
9428 (initialize_low_tracepoint): Call it.
9429 * server.h (set_trampoline_buffer_space): Declare.
9430 (claim_trampoline_space): Ditto.
9431 (have_fast_tracepoint_trampoline_buffer): Ditto.
9433 2011-11-14 Yao Qi <yao@codesourcery.com>
9435 * server.c (handle_query): Handle InstallInTrace for qSupported.
9436 * tracepoint.c (add_tracepoint): Sort list.
9437 (install_tracepoint, download_tracepoint): New.
9438 (cmd_qtdp): Call them to install and download tracepoints.
9439 (sort_tracepoints): Removed.
9440 (cmd_qtstart): Update.
9442 2011-11-14 Yao Qi <yao@codesourcery.com>
9444 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9445 * mem-break.h: Declare.
9446 * tracepoint.c (cmd_qtstart): Move some code to ...
9447 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9449 (download_tracepoints): Move some code to ...
9450 (download_tracepoint_1): ... here. New.
9452 2011-11-08 Yao Qi <yao@codesourcery.com>
9454 * remote-utils.c (relocate_instruction): A comment fix.
9456 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9458 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9459 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9460 dr_status_mirror and dr_control_mirror from debug_reg_state.
9461 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9462 (i386_initial_stuff): Remove use of deleted globals.
9463 (i386_get_thread_context, i386_set_thread_context,
9464 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9465 from debug_reg_state.
9467 2011-11-05 Yao Qi <yao@codesourcery.com>
9469 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9470 address as TPOINT's.
9472 2011-11-02 Stan Shebs <stan@codesourcery.com>
9474 * tracepoint.c (agent_mem_read_string): New function.
9475 (eval_agent_expr): Call it for tracenz.
9476 * server.c (handle_query): Report support for tracenz.
9478 2011-11-02 Yao Qi <yao@codesourcery.com>
9480 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9482 2011-11-02 Yao Qi <yao@codesourcery.com>
9484 * target.h: Fix a typo in comment.
9486 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9488 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9489 clobber the breakpoints' shadows with fast tracepoint jumps.
9490 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9491 * target.c (write_inferior_memory): Also pass MYADDR down to
9494 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9496 * configure.ac: Check support for personality routine.
9497 * configure: Regenerate.
9498 * config.in: Likewise.
9499 * linux-low.c: Include <sys/personality.h>.
9500 Define ADDR_NO_RANDOMIZE if necessary.
9501 (linux_create_inferior): Disable address space randomization when
9502 forking inferior, if requested.
9503 (linux_supports_disable_randomization): New function.
9504 (linux_target_ops): Install it.
9505 * server.h (disable_randomization): Declare.
9506 * server.c (disable_randomization): New global variable.
9507 (handle_general_set): Handle QDisableRandomization.
9508 (handle_query): Likewise for qSupported.
9509 (main): Support --disable-randomization and --no-disable-randomization
9510 command line arguments.
9511 * target.h (struct target_ops): Add supports_disable_randomization.
9512 (target_supports_disable_randomization): New macro.
9514 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9516 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9518 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9519 [!PT_GETDSBT] (target_loadmap): New definition.
9520 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9521 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9522 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9523 and PT_GETDSBT to LINUX_LOADMAP.
9524 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9525 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9527 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9529 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9530 (arm_linux_hwbp_cap): New static variable.
9531 (arm_linux_get_hwbp_cap): Replace by ...
9532 (arm_linux_init_hwbp_cap): ... this new function.
9533 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9534 (arm_linux_get_hw_watchpoint_count): Likewise.
9535 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9536 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9537 (arm_prepare_to_resume): Use perror_with_name instead of error.
9539 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9541 * linux-arm-low.c: Include <signal.h>.
9542 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9543 (struct arm_linux_hwbp_cap): New data type.
9544 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9545 (struct arm_linux_hw_breakpoint): New data type.
9546 (MAX_BPTS, MAX_WPTS): Define.
9547 (struct arch_process_info, struct arch_lwp_info): New data types.
9548 (arm_linux_get_hwbp_cap): New function.
9549 (arm_linux_get_hw_breakpoint_count): Likewise.
9550 (arm_linux_get_hw_watchpoint_count): Likewise.
9551 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9552 (arm_hwbp_control_initialize): Likewise.
9553 (arm_hwbp_control_is_enabled): Likewise.
9554 (arm_hwbp_control_is_initialized): Likewise.
9555 (arm_hwbp_control_disable): Likewise.
9556 (arm_linux_hw_breakpoint_equal): Likewise.
9557 (arm_linux_hw_point_initialize): Likewise.
9558 (struct update_registers_data): New data structure.
9559 (update_registers_callback: New function.
9560 (arm_insert_point): Likewise.
9561 (arm_remove_point): Likewise.
9562 (arm_stopped_by_watchpoint): Likewise.
9563 (arm_stopped_data_address): Likewise.
9564 (arm_new_process): Likewise.
9565 (arm_new_thread): Likewise.
9566 (arm_prepare_to_resume): Likewise.
9567 (the_low_target): Register arm_insert_point, arm_remove_point,
9568 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9569 arm_new_thread, and arm_prepare_to_resume.
9571 2011-09-15 Stan Shebs <stan@codesourcery.com>
9573 * server.h (struct emit_ops): Add compare-goto fields.
9574 * tracepoint.c (gdb_agent_op_sizes): New table.
9575 (emit_eq_goto): New function.
9576 (emit_ne_goto): New function.
9577 (emit_lt_goto): New function.
9578 (emit_le_goto): New function.
9579 (emit_gt_goto): New function.
9580 (emit_ge_goto): New function.
9581 (is_goto_target): New function.
9582 (compile_bytecodes): Recognize special cases of compare-goto
9583 combinations and call specialized emitters for them.
9584 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9585 (amd64_emit_ne_goto): New function.
9586 (amd64_emit_lt_goto): New function.
9587 (amd64_emit_le_goto): New function.
9588 (amd64_emit_gt_goto): New function.
9589 (amd64_emit_ge_goto): New function.
9590 (amd64_emit_ops): Add the new functions.
9591 (i386_emit_eq_goto): New function.
9592 (i386_emit_ne_goto): New function.
9593 (i386_emit_lt_goto): New function.
9594 (i386_emit_le_goto): New function.
9595 (i386_emit_gt_goto): New function.
9596 (i386_emit_ge_goto): New function.
9597 (i386_emit_ops): Add the new functions.
9599 2011-09-08 Stan Shebs <stan@codesourcery.com>
9601 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9602 (i386_emit_epilogue): Restore %ebx.
9604 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9606 * server.c (step_thread): Remove definition.
9607 (process_serial_event): Don't handle Hs.
9608 * server.h (step_thread): Remove declaration.
9609 * target.c (set_desired_inferior): Remove use of step_thread.
9611 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9613 * linux-low.c: Include linux-procfs.h.
9614 (linux_attach_lwp_1): Update comments.
9615 (linux_attach): Scan for existing threads when attaching to a
9616 process that is the tgid.
9617 * Makefile.in: Update dependencies.
9619 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9621 * configure.srv: Add linux-procfs.o dependencies.
9623 2011-08-14 Yao Qi <yao@codesourcery.com>
9625 * target.h (struct target_ops): Fix indent.
9626 * win32-low.c (win32_target_ops): Fix comment.
9628 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9629 Yao Qi <yao@codesourcery.com>
9631 * Makefile.in (clean): Remove tic6x-*.c files.
9632 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9633 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9634 (tic6x-c64xp-linux.c): Likewise.
9635 * configure.srv: Add support for tic6x-*-uclinux.
9636 * linux-tic6x-low.c: New.
9637 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9639 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9640 Yao Qi <yao@codesourcery.com>
9642 * target.h (struct target_ops): Add read_loadmap.
9643 * linux-low.c (struct target_loadseg): New type.
9644 (struct target_loadmap): New type.
9645 (linux_read_loadmap): New function.
9646 (linux_target_ops): Add linux_read_loadmap.
9647 * server.c (handle_query): Support qXfer:fdpic:read packet.
9648 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9651 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9653 * win32-low.c: Include <stdint.h>.
9655 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9657 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9658 to the inferior here.
9659 (i386_remove_aligned_watchpoint): Ditto.
9660 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9661 fit part of the watchpoint in the debug registers.
9662 (i386_update_inferior_debug_regs): New.
9663 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9664 registers, and only update the inferior on success.
9665 (i386_low_remove_watchpoint): Ditto.
9667 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9669 * linux-low.c (compare_ints, unique, list_threads, show_process,
9670 linux_core_of_thread): Delete.
9671 (linux_target_ops): Change linux_core_of_thread to
9672 linux_common_core_of_thread.
9673 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9674 * utils.c (malloc_failure): Change type of argument.
9675 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9676 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9677 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9678 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9679 (IPA_OBJS): Add common-utils-ipa.o.
9680 (ptid_h, linux_osdata_h): New macros.
9681 (server_h): Add common/common-utils.h, common/xml-utils.h,
9682 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9684 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9685 ptid.o, buffer.o): New rules.
9686 (linux-low.o): Add common/linux-osdata.h as a dependency.
9687 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9688 * configure.ac: Add AC_HEADER_DIRENT check.
9689 * config.in: Regenerate.
9690 * configure: Regenerate.
9691 * remote-utils.c (xml_escape_text): Delete.
9692 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9693 buffer_xml_printf): Move to common/buffer.c.
9694 * server.c (main): Remove call to initialize_inferiors.
9695 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9696 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9697 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9698 internal_error, gdb_assert, gdb_assert_fail): Delete.
9699 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9700 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9702 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9703 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9704 initialize_inferiors): Delete.
9706 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9708 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9711 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9713 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9715 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9717 2011-05-26 Yao Qi <yao@codesourcery.com>
9719 * Makefile.in (thread-db.o): Track dependence to
9720 common/gdb_thread_db.h.
9721 * thread-db.c: include gdb_thread_db.h from right place.
9723 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9725 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9726 __FILE__ and __LINE__ to internal_error.
9728 2011-05-13 Doug Evans <dje@google.com>
9730 * thread-db.c (try_thread_db_load_from_sdir): New function.
9731 (try_thread_db_load_from_dir): New function.
9732 (thread_db_load_search): Handle $sdir, ignore $pdir.
9733 Remove trying of system directories if search of
9734 libthread-db-search-path fails, that is now done via $sdir.
9736 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9738 * server.c (handle_query): Add EnableDisableTracepoints to the list
9739 of supported features.
9740 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9742 (cmd_qtenable_disable): New.
9743 (cmd_qtstart): Install tracepoints even if disabled.
9744 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9745 receiving a QTEnable or QTDisable packet.
9746 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9747 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9749 (gdb_probe): Skip data collection if static tracepoint is disabled.
9751 2011-05-10 Doug Evans <dje@google.com>
9753 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9755 2011-05-04 Doug Evans <dje@google.com>
9757 * linux-low.c (linux_join): Skip process lookup.
9758 * spu-low.c (spu_join): Ditto.
9759 * server.c (join_inferiors_callback): Delete.
9760 (process_serial_event): For 'D' packet (detach) call join_inferior
9763 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9765 * README: Don't mention xscale*-*-linux*.
9766 * configure.srv (xscale*-*-linux*): Don't handle target.
9768 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9770 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9772 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9773 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9774 (i386_emit_void_call_2): Likewise.
9776 2011-04-26 Yao Qi <yao@codesourcery.com>
9778 * linux-low.c: Move common macros to linux-ptrace.h.
9779 Include linux-ptrace.h.
9780 * Makefile.in (linux_ptrace_h): New.
9781 (linux-low.o): Depends on linux-ptrace.h.
9783 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9785 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9786 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9787 (remote_prepare): New function with most of the TCP code from ...
9788 (remote_open): ... here. Detect PORT here unconditionally. Move also
9789 setting transport_is_reliable.
9790 * server.c (run_once): New variable.
9791 (gdbserver_usage): Document it.
9792 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9793 the first run if RUN_ONCE.
9794 * server.h (run_once, remote_prepare): New declarations.
9796 2011-04-19 Tom Tromey <tromey@redhat.com>
9798 * win32-low.c (handle_load_dll): Remove duplicate "the".
9800 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9802 Remove support for old Cygwin 1.5 versions.
9803 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9804 function to avoid warning.
9805 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9808 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9810 * gdbserver/server.h (Macro _): Define it if not available.
9812 2011-03-14 Michael Snyder <msnyder@vmware.com>
9814 * hostio.c (handle_close): Remove unnecessary null test.
9816 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9818 * Makefile.in (maintainer-clean realclean distclean): Remove
9819 "make ... subdir_do" command.
9821 2011-03-10 Michael Snyder <msnyder@vmware.com>
9823 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9825 * server.c (handle_v_run): Free alloced buffer on early return.
9827 2011-03-09 Yao Qi <yao@codesourcery.com>
9830 2011-03-04 Yao Qi <yao@codesourcery.com>
9832 * Makefile.in: Remove GNU make feature --directory.
9834 2011-03-05 Yao Qi <yao@codesourcery.com>
9836 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9837 (subdir_do): New make target. Copied from gdb/Makefile.
9838 (maintainer-clean, realclean, distclean, clean): Call corresponding
9839 make targets in common/Makefile.
9841 2011-02-11 Yao Qi <yao@codesourcery.com>
9843 * configure.ac: Call AC_PROG_RANLIB.
9844 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9845 * configure: Regenerate.
9847 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9849 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9851 2011-03-06 Yao Qi <yao@codesourcery.com>
9853 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9855 2011-03-05 Yao Qi <yao@codesourcery.com>
9857 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9858 (subdir_do): New make target. Copied from gdb/Makefile.
9859 (maintainer-clean, realclean, distclean, clean): Call corresponding
9860 make targets in common/Makefile.
9862 2011-03-04 Yao Qi <yao@codesourcery.com>
9864 * Makefile.in: Remove GNU make feature --directory.
9866 2011-03-04 Michael Snyder <msnyder@vmware.com>
9868 * server.c (queue_stop_reply): Call xmalloc not malloc.
9870 2011-03-02 Michael Snyder <msnyder@vmware.com>
9872 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9874 2011-02-28 Michael Snyder <msnyder@vmware.com>
9876 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9877 (cmd_qtframe): Ditto.
9878 (cmd_qtbuffer): Ditto.
9879 (cmd_bigqtbuffer): Ditto.
9881 * utils.c (decimal2str): Initialize 'width' to nine, then
9884 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9886 * hostio.c (require_data): Free *data, not data.
9888 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9890 * hostio.c (require_data): Use free, not xfree.
9892 2011-02-27 Michael Snyder <msnyder@vmware.com>
9894 * server.c (handle_query): Discard unused value.
9896 * hostio.c (require_data): Free malloc memory before returning
9899 2011-02-26 Michael Snyder <msnyder@vmware.com>
9901 * linux-low.c (list_threads): Call closedir for dirent.
9903 2011-02-27 Michael Snyder <msnyder@vmware.com>
9905 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9906 a case statement falls through.
9908 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9910 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9913 2011-02-26 Michael Snyder <msnyder@vmware.com>
9915 * utils.c (decimal2str): Eliminate dead code and dead param.
9916 (pulongest): Drop dead param from call to decimal2str.
9919 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9921 Revert the following patch (not approved yet):
9922 2011-02-21 Hui Zhu <teawater@gmail.com>
9923 * tracepoint.c (tp_printf): New function.
9924 (eval_agent_expr): Handle gdb_agent_op_printf.
9926 2011-02-21 Hui Zhu <teawater@gmail.com>
9928 * tracepoint.c (tp_printf): New function.
9929 (eval_agent_expr): Handle gdb_agent_op_printf.
9931 2011-02-18 Tom Tromey <tromey@redhat.com>
9933 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9934 (tracepoint.o): Likewise.
9935 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9936 (gdb_agent_op_names): Likewise.
9938 2011-02-18 Tom Tromey <tromey@redhat.com>
9940 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9941 gdb_agent_op_rot>: New constants.
9942 (gdb_agent_op_names): Add pick and roll.
9943 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9946 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9948 * aclocal.m4: Regenerated with aclocal-1.11.1.
9950 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9952 * server.c (handle_qxfer_traceframe_info): New.
9953 (qxfer_packets): Register "traceframe-info".
9954 (handle_query): Report support for qXfer:traceframe-info:read+.
9955 * tracepoint.c (match_blocktype): New.
9956 (traceframe_find_block_type): Rename to ...
9957 (traceframe_walk_blocks): ... this. Add callback filter argument,
9959 (traceframe_find_block_type): New, reimplemented on top of
9960 traceframe_walk_blocks.
9961 (build_traceframe_info_xml): New.
9962 (traceframe_read_info): New.
9963 * server.h (traceframe_read_info): Declare.
9965 2011-02-11 Yao Qi <yao@codesourcery.com>
9967 * configure.ac: Call AC_PROG_RANLIB.
9968 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9969 * configure: Regenerate.
9971 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9973 * server.c (gdb_read_memory): Change return semantics to allow
9975 (handle_search_memory_1): Adjust.
9976 (process_serial_event) <'m' packet>: Handle partial transfers.
9977 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9979 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9981 * regcache.c (init_register_cache): Initialize
9982 regcache->register_status.
9983 (free_register_cache): Release regcache->register_status.
9984 (regcache_cpy): Copy register_status.
9985 (registers_to_string): Print 'x's for unavailable registers.
9986 (supply_register): Mark the register's status valid or
9987 unavailable, depending on whether a buffer was passed in or not.
9988 (supply_register_zeroed): New.
9989 (supply_regblock): Mark the registers' status valid or
9990 unavailable, depending on whether a buffer was passed in or not.
9991 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9992 (struct regcache): New `register_status' field.
9993 (supply_register_zeroed): Declare.
9994 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9995 supply_register_zeroed, rather than passing a NULL buffer to
9997 * tracepoint.c (fetch_traceframe_registers): Update comment.
9999 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10001 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10004 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10006 * server.h (decode_xfer_write): Change prototype.
10007 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10008 and don't extract the annex here.
10009 * server.c (decode_xfer_read): Remove `annex' parameter,
10010 and don't extract the annex here.
10011 (decode_xfer): New.
10012 (struct qxfer): New.
10013 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10014 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10015 (handle_qxfer_statictrace): New functions, abstracted out from
10016 handle_query, and made to use the struct qxfer interface.
10017 (handle_threads_qxfer_proper): Rename to ...
10018 (handle_qxfer_threads_proper): ... this.
10019 (handle_threads_qxfer): Rename to ...
10020 (handle_qxfer_threads): ... this. Adjust.
10021 (qxfer_packets): New array.
10022 (handle_qxfer): New function.
10023 (handle_query): Use handle_qxfer.
10025 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10027 * gdbreplay.c: Shorten lines of >= 80 columns.
10028 * linux-low.c: Ditto.
10029 * linux-ppc-low.c: Ditto.
10030 * linux-s390-low.c: Ditto.
10031 * linux-sparc-low.c: Ditto.
10032 * linux-x86-low.c: Ditto.
10033 * linux-xtensa-low.c: Ditto.
10034 * mem-break.c: Ditto.
10035 * nto-low.c: Ditto.
10036 * regcache.h: Ditto.
10037 * remote-utils.c: Ditto.
10040 * thread-db.c: Ditto.
10041 * tracepoint.c: Ditto.
10043 * win32-low.h: Ditto.
10045 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10047 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10050 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10052 * server.c (gdbserver_version): Update copyright year in version
10054 * gdbreplay.c (gdbreplay_version): Ditto.
10056 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10058 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10059 * linux-bfin-low.c: New file.
10060 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10061 PT_DATA_ADDR for BFIN targets.
10062 * Makefile.in (SFILES): Add linux-bfin-low.c.
10063 (clean): Remove reg-bfin.c.
10064 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10065 * README: Mention supported Blackfin targets.
10067 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10069 * .gitignore: New file.
10071 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10073 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10075 2010-10-22 Jie Zhang <jie@codesourcery.com>
10077 * Makefile.in: Add FLAGS_TO_PASS variable.
10078 (install): Remove dependency of install-only and recursively
10079 invoke make for install-only.
10081 2010-10-04 Doug Evans <dje@google.com>
10083 * Makefile.in (uninstall): Use $(DESTDIR).
10085 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10089 * linux-x86-low.c (compat_siginfo_from_siginfo)
10090 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10091 si_code is < 0. Check for si_code == SI_TIMER before checking for
10094 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10096 * lynx-i386-low.c: New file.
10097 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10099 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10101 * lynx-low.c (ptrace_request_to_str): Remove handling for
10102 request values that have been removed in LynxOS 5.x.
10104 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10106 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10109 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10111 * configure.ac: Add --enable-inprocess-agent option.
10112 * configure: Rebuilt.
10114 2010-09-06 Yao Qi <yao@codesourcery.com>
10116 * linux-low.c (linux_kill): Remove unused variable.
10117 (linux_stabilize_threads): Likewise.
10118 * server.c (start_inferior): Likewise.
10119 (queue_stop_reply_callback): Likewise.
10120 * tracepoint.c (do_action_at_tracepoint): Likewise.
10122 2010-09-06 Yao Qi <yao@codesourcery.com>
10124 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10127 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10129 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10131 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10133 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10136 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10138 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10139 gdbserver/lynx-ppc-low.c: New files.
10140 * Makefile.in (lynx_low_h): New variable.
10141 (lynx-low.o, lynx-ppc-low.o): New rules.
10142 * configure.ac: On LynxOS, link with -lnetinet.
10143 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10144 * configure: regenerate.
10146 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10148 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10149 * configure.ac: Add check for vasprintf and vsnprintf.
10150 * configure, config.in: Regenerate.
10151 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10153 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10155 * gdbreplay.c: Move include of alloca.h up, next to include of
10157 * server.h: Add include of malloc.h.
10158 * mem-break.c: Remove include of malloc.h.
10159 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10161 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10163 * Makefile.in (memmem.o): Build with -Wno-error.
10165 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10167 * utils.c (xsnprintf): Make non-static.
10168 * server.h: Add xsnprintf declaration.
10169 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10170 replace calls to snprintf by calls to xsnprintf throughout.
10172 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10174 * configure.ac: Add configure check for alloca.
10175 * configure, config.in: Regenerate.
10176 * server.h: Include alloca.h if it exists.
10177 * gdbreplay.c: Include alloca.h if it exists.
10179 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10181 * linux-low.c (__SIGRTMIN): Define if not already defined.
10182 (linux_create_inferior): Check for __ANDROID__ rather than
10184 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10185 are already deferred.
10186 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10187 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10188 stopped and already has a pending signal to report.
10189 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10190 a pending signal to report or is moving out of a jump pad.
10191 (linux_init_signals): Check for __ANDROID__ rather than
10194 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10196 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10197 debug_threads check. Avoid a linear search when not doing debug
10200 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10202 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10203 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10204 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10205 (process_event): Change local fd's type to gdb_fildes_t.
10206 (create_file_handler): Adjust prototype.
10207 (delete_file_handler): Adjust prototype.
10208 (handle_file_event): Adjust prototype. Use pfildes.
10209 (create_file_event): Adjsut prototype.
10210 * remote-utils.c (remote_desc, listen_desc): Change type to
10212 * server.h: New gdb_fildes_t typedef.
10213 [USE_WIN32API]: Include winsock2.h.
10214 (delete_file_handler, add_file_handler): Adjust prototypes.
10215 (pfildes): Declare.
10216 * utils.c (pfildes): New.
10218 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10220 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10221 * configure: Regenerate.
10223 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10225 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10226 (linux_done_accessing_memory): ... this.
10227 (linux_target_ops): Adjust.
10228 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10229 * nto-low.c (nto_target_ops): Adjust comment.
10230 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10231 * spu-low.c (spu_target_ops): Adjust comment.
10232 * target.h (target_ops): Rename unprepare_to_access_memory field
10233 to done_accessing_memory.
10234 (unprepare_to_access_memory): Rename to ...
10235 (done_accessing_memory): ... this.
10237 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10239 * linux-low.c (linux_prepare_to_access_memory): New.
10240 (linux_unprepare_to_access_memory): New.
10241 (linux_target_ops): Install them.
10242 * server.c (read_memory): Rename to ...
10243 (gdb_read_memory): ... this. Use
10244 prepare_to_access_memory/prepare_to_access_memory.
10245 (write_memory): Rename to ...
10246 (gdb_write_memory): ... this. Use
10247 prepare_to_access_memory/prepare_to_access_memory.
10248 (handle_search_memory_1): Adjust.
10249 (process_serial_event): Adjust.
10250 * target.h (struct target_ops): New fields
10251 prepare_to_access_memory and unprepare_to_access_memory.
10252 (prepare_to_access_memory, unprepare_to_access_memory): New.
10253 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10254 prepare_to_access_memory/prepare_to_access_memory.
10255 * nto-low.c (nto_target_ops): Adjust.
10256 * spu-low.c (spu_target_ops): Adjust.
10257 * win32-low.c (win32_target_ops): Adjust.
10259 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10261 * Makefile.in (WARN_CFLAGS): Get it from configure.
10262 (WERROR_CFLAGS): New.
10263 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10264 * configure.ac: Introduce --enable-werror, which adds -Werror to
10265 the compiler command line. Enabled by default. Disable with
10266 --disable-werror. Add -Wdeclaration-after-statement
10267 Wpointer-arith and -Wformat-nonliteral to warning flags.
10268 * configure: Regenerate.
10270 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10272 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10274 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10276 * gdbreplay.c (remote_error): New.
10278 (expect): Use gdbchar. Check for error reading from GDB.
10279 Clarify sync error output.
10280 (play): Check for errors writing to GDB.
10281 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10282 * remote-utils.c (getpkt): Check for errors writing to the remote
10285 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10287 * linux-low.c (linux_wait_1): Move non-debugging code out of
10288 `debug_threads' control.
10290 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10292 * linux-low.c (linux_wait_1): Don't set last_status here.
10293 * server.c (push_event, queue_stop_reply_callback): Assert we're
10294 not pushing a TARGET_WAITKIND_IGNORE event.
10295 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10296 (myresume, handle_target_event): Set the thread's last_resume_kind
10297 and last_status from the target returned status.
10299 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10303 * linux-x86-low.c (update_debug_registers_callback): New.
10304 (i386_dr_low_set_addr): Use it.
10305 (i386_dr_low_get_addr): New.
10306 (i386_dr_low_set_control): Use update_debug_registers_callback.
10307 (i386_dr_low_get_control): New.
10308 (i386_dr_low_get_status): Adjust.
10309 * linux-low.c (linux_stop_lwp): New.
10310 * linux-low.h (linux_stop_lwp): Declare.
10312 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10313 argument instead of a i386_debug_reg_state.
10314 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10315 a i386_debug_reg_state.
10316 (i386_insert_aligned_watchpoint): Adjust.
10317 (i386_remove_aligned_watchpoint): Adjust.
10318 (i386_low_stopped_data_address): Read the debug registers from the
10319 inferior instead of from the mirrors.
10320 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10321 (i386_dr_low_get_addr): Declare.
10322 (i386_dr_low_get_control): Declare.
10323 (i386_dr_low_get_status): Change prototype.
10325 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10326 (i386_dr_low_get_addr): New.
10327 (i386_dr_low_get_control): New.
10328 (i386_dr_low_get_status): Adjust prototype. Return
10330 (i386_initial_stuff): Clear dr_status_mirror and
10332 (i386_get_thread_context): Adjust.
10333 (i386_set_thread_context): Adjust.
10334 (i386_thread_added): Adjust.
10336 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10338 * linux-low.h (linux_thread_area): Delete declaration.
10340 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10342 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10343 after its termination.
10345 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10347 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10348 (gdb_wants_all_stopped): Delete.
10349 (linux_wait_1): Don't call them.
10350 * server.c (handle_v_cont): Tag all threads as want-stopped.
10351 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10352 stopped as "client-wants-stopped".
10354 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10356 * Makefile.in (signals_h): New.
10357 (server_h): Depend on it.
10358 (server.o): Don't depend on $(signals_def).
10359 (signals.o): Depend on $(signals_def).
10361 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10363 * Makefile.in (signals_def): New.
10364 (server_h): Append include/gdb/signals.h and signals_def.
10365 (server.o): Append signals_def.
10367 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10369 * server.c (handle_target_event): Use target_signal_to_host for
10370 resume_info.sig initialization.
10371 * target.h (struct thread_resume) <sig>: New comment.
10373 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10375 * server.c (handle_query): strcpy() the returned string from paddress()
10376 instead of sprintf().
10377 * utils.c (paddress): Return phex_nz().
10379 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10381 * server.c (handle_v_cont): Call mourn_inferior if process
10383 (myresume): Likewise.
10385 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10387 Static tracepoints, and integration with UST.
10389 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10390 * mem-break.c (uninsert_all_breakpoints)
10391 (reinsert_all_breakpoints): New.
10392 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10393 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10394 (gdb_agent_ust_loaded, helper_thread_id)
10395 (gdb_agent_helper_thread_id): New macros.
10396 (struct ipa_sym_addresses): Add addr_ust_loaded,
10397 addr_helper_thread_id, addr_cmd_buf.
10398 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10399 (in_process_agent_loaded_ust): New.
10400 (write_e_ust_not_loaded): New.
10401 (maybe_write_ipa_ust_not_loaded): New.
10402 (struct collect_static_trace_data_action): New.
10403 (enum tracepoint_type) <static_tracepoint>: New.
10404 (struct tracepoint) <handle>: Mention static tracepoints.
10405 (struct static_tracepoint_ctx): New.
10406 (CMD_BUF_SIZE): New.
10407 (add_tracepoint_action): Handle static tracepoint actions.
10408 (unprobe_marker_at): New.
10409 (clear_installed_tracepoints): Handle static tracepoints.
10410 (cmd_qtdp): Handle static tracepoints.
10411 (probe_marker_at): New.
10412 (cmd_qtstart): Handle static tracepoints.
10413 (response_tracepoint): Handle static tracepoints.
10414 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10415 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10416 (get_context_regcache): Handle static tracepoints.
10417 (do_action_at_tracepoint): Handle static tracepoint actions.
10418 (traceframe_find_block_type): Handle static trace data blocks.
10419 (traceframe_read_sdata): New.
10420 (download_tracepoints): Download static tracepoint actions.
10421 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10422 (GDB_PROBE_NAME): New.
10424 (GET_UST_SYM): New.
10427 (ust_marker_to_static_tracepoint): New.
10429 (collect_ust_data_at_tracepoint): New.
10430 (gdb_ust_probe): New.
10431 (UNIX_PATH_MAX, SOCK_DIR): New.
10432 (gdb_ust_connect_sync_socket): New.
10433 (resume_thread, stop_thread): New.
10434 (run_inferior_command): New.
10435 (init_named_socket): New.
10436 (gdb_ust_socket_init): New.
10437 (cstr_to_hexstr): New.
10439 (first_marker, next_marker): New.
10440 (response_ust_marker): New.
10441 (cmd_qtfstm, cmd_qtsstm): New.
10442 (unprobe_marker_at, probe_marker_at): New.
10443 (cmd_qtstmat, gdb_ust_thread): New.
10444 (gdb_ust_init): New.
10445 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10446 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10447 (ST_REGENTRY): New.
10448 (x86_64_st_collect_regmap): New.
10449 (X86_64_NUM_ST_COLLECT_GREGS): New.
10450 (AMD64_RIP_REGNUM): New.
10451 (supply_static_tracepoint_registers): New.
10452 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10453 (ST_REGENTRY): New.
10454 (i386_st_collect_regmap): New.
10455 (i386_NUM_ST_COLLECT_GREGS): New.
10456 (supply_static_tracepoint_registers): New.
10457 * server.c (handle_query): Handle qXfer:statictrace:read.
10458 <qSupported>: Report support for StaticTracepoints, and
10459 qXfer:statictrace:read features.
10460 * server.h (traceframe_read_sdata)
10461 (supply_static_tracepoint_registers): Declare.
10462 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10463 (unpack_varlen_hex): Include in IPA build.
10464 * Makefile.in (ustlibs, ustinc): New.
10465 (IPA_OBJS): Add remote-utils-ipa.o.
10466 ($(IPA_LIB)): Link -ldl and -lpthread.
10468 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10469 * config.in, configure: Regenerate.
10471 2010-06-20 Ian Lance Taylor <iant@google.com>
10472 Pedro Alves <pedro@codesourcery.com>
10474 * linux-x86-low.c (always_true): Delete.
10475 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10476 trying to fool the compiler with always_true.
10478 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10480 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10481 conditions in gdbserver.
10483 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10485 * spu-low.c (spu_read_memory): Wrap around local store limit.
10486 (spu_write_memory): Likewise.
10488 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10490 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10491 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10493 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10495 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10496 uses with LONGEST uses.
10498 2010-06-14 Stan Shebs <stan@codesourcery.com>
10499 Pedro Alves <pedro@codesourcery.com>
10503 * linux-x86-low.c: Include limits.h.
10505 (always_true): New.
10508 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10509 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10510 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10511 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10512 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10513 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10514 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10515 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10516 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10517 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10518 (amd64_emit_void_call_2): New.
10519 (amd64_emit_ops): New.
10520 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10521 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10522 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10523 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10524 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10525 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10526 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10527 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10528 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10529 (i386_emit_stack_adjust, i386_emit_int_call_1)
10530 (i386_emit_void_call_2): New.
10531 (i386_emit_ops): New.
10532 (x86_emit_ops): New.
10533 (the_low_target): Install x86_emit_ops.
10534 * server.h (struct emit_ops): New.
10535 (get_raw_reg_func_addr): Declare.
10536 (current_insn_ptr, emit_error): Declare.
10537 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10538 (set_trace_state_variable_value): New defines.
10539 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10540 addr_get_trace_state_variable_value and
10541 addr_set_trace_state_variable_value.
10542 (symbol_list): New fields for get_raw_reg,
10543 get_trace_state_variable_value and set_trace_state_variable_value.
10544 (condfn): New typedef.
10545 (struct tracepoint): New field `compiled_cond'.
10546 (do_action_at_tracepoint): Clear compiled_cond.
10547 (get_trace_state_variable_value, set_trace_state_variable_value):
10549 (condition_true_at_tracepoint): If there's a compiled condition,
10551 (current_insn_ptr, emit_error): New globals.
10552 (struct bytecode_address): New.
10553 (get_raw_reg_func_addr): New.
10554 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10555 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10556 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10557 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10558 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10559 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10560 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10561 (compile_tracepoint_condition, compile_bytecodes): New.
10562 * target.h (emit_ops): Forward declare.
10563 (struct target_ops): New field emit_ops.
10564 (target_emit_ops): New.
10565 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10566 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10567 * linux-low.c (linux_emit_ops): New.
10568 (linux_target_ops): Install it.
10569 * linux-low.h (struct linux_target_ops): New field emit_ops.
10571 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10573 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10574 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10576 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10577 Stan Shebs <stan@codesourcery.com>
10579 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10580 (all): Depend on $(extra_libraries).
10581 (install-only): Install the IPA.
10582 (IPA_OBJS, IPA_LIB): New.
10583 (clean): Remove the IPA lib.
10584 (IPAGENT_CFLAGS): New.
10585 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10586 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10587 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10588 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10589 * configure.ac: Check for atomic builtins support in the compiler.
10590 (IPA_DEPFILES, extra_libraries): Define.
10591 * configure.srv (ipa_obj): Add description.
10592 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10593 (i[34567]86-*-linux*): Set ipa_obj.
10594 (x86_64-*-linux*): Set ipa_obj.
10595 * linux-low.c (stabilizing_threads): New.
10596 (supports_fast_tracepoints): New.
10597 (linux_detach): Stabilize threads before detaching.
10598 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10599 the lwp is either not stabilizing, or is moving out of a jump pad.
10600 (linux_fast_tracepoint_collecting): New.
10601 (maybe_move_out_of_jump_pad): New.
10602 (enqueue_one_deferred_signal): New.
10603 (dequeue_one_deferred_signal): New.
10604 (linux_wait_for_event_1): If moving out of a jump pad, defer
10605 pending signals to later.
10606 (linux_stabilize_threads): New.
10607 (linux_wait_1): Check if threads need moving out of jump pads, and
10609 (stuck_in_jump_pad_callback): New.
10610 (move_out_of_jump_pad_callback): New.
10611 (lwp_running): New.
10612 (linux_resume_one_lwp): Handle moving out of jump pads.
10613 (linux_set_resume_request): Dequeue deferred signals.
10614 (need_step_over_p): Also step over fast tracepoint jumps.
10615 (start_step_over): Also uninsert fast tracepoint jumps.
10616 (finish_step_over): Also reinsert fast tracepoint jumps.
10617 (linux_install_fast_tracepoint_jump): New.
10618 (linux_target_ops): Install linux_stabilize_threads and
10619 linux_install_fast_tracepoint_jump_pad.
10620 * linux-low.h (linux_target_ops) <get_thread_area,
10621 install_fast_tracepoint_jump_pad>: New fields.
10622 (struct lwp_info) <collecting_fast_tracepoint,
10623 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10624 (linux_get_thread_area): Declare.
10625 * linux-x86-low.c (jump_insn): New.
10626 (x86_get_thread_area): New.
10627 (append_insns): New.
10628 (push_opcode): New.
10629 (amd64_install_fast_tracepoint_jump_pad): New.
10630 (i386_install_fast_tracepoint_jump_pad): New.
10631 (x86_install_fast_tracepoint_jump_pad): New.
10632 (the_low_target): Install x86_get_thread_area and
10633 x86_install_fast_tracepoint_jump_pad.
10634 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10635 (struct fast_tracepoint_jump): New.
10636 (fast_tracepoint_jump_insn): New.
10637 (fast_tracepoint_jump_shadow): New.
10638 (find_fast_tracepoint_jump_at): New.
10639 (fast_tracepoint_jump_here): New.
10640 (delete_fast_tracepoint_jump): New.
10641 (set_fast_tracepoint_jump): New.
10642 (uninsert_fast_tracepoint_jumps_at): New.
10643 (reinsert_fast_tracepoint_jumps_at): New.
10644 (set_breakpoint_at): Use write_inferior_memory.
10645 (uninsert_raw_breakpoint): Use write_inferior_memory.
10646 (check_mem_read): Mask out fast tracepoint jumps.
10647 (check_mem_write): Mask out fast tracepoint jumps.
10648 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10649 (set_fast_tracepoint_jump): Declare.
10650 (delete_fast_tracepoint_jump)
10651 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10652 (reinsert_fast_tracepoint_jumps_at): Declare.
10653 * regcache.c: Don't compile many functions when building the
10654 in-process agent library.
10655 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10656 the register buffer in the heap.
10657 (free_register_cache): If the register buffer isn't owned by the
10658 regcache, don't free it.
10659 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10660 pre-existing register caches.
10661 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10663 (convert_ascii_to_int): : Constify `from' parameter type.
10664 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10665 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10666 the needed buffer in-place.
10667 (relocate_instruction): New.
10668 * server.c (handle_query) <qSymbols>: If the target supports
10669 tracepoints, give it a chance of looking up symbols. Report
10670 support for fast tracepoints.
10671 (handle_status): Stabilize threads.
10672 (process_serial_event): Adjust.
10673 * server.h (struct fast_tracepoint_jump): Forward declare.
10674 (struct process_info) <fast_tracepoint_jumps>: New field.
10675 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10676 (decode_X_packet, decode_M_packet): Adjust.
10677 (relocate_instruction): Declare.
10678 (in_process_agent_loaded): Declare.
10679 (tracepoint_look_up_symbols): Declare.
10680 (struct fast_tpoint_collect_status): Declare.
10681 (fast_tracepoint_collecting): Declare.
10682 (force_unlock_trace_buffer): Declare.
10683 (handle_tracepoint_bkpts): Declare.
10684 (initialize_low_tracepoint)
10685 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10686 * target.h (struct target_ops) <stabilize_threads,
10687 install_fast_tracepoint_jump_pad>: New fields.
10688 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10689 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10690 [HAVE_STDINT_H]: Include stdint.h.
10691 (trace_debug_1): Rename to ...
10692 (trace_vdebug): ... this.
10693 (trace_debug): Rename to ...
10694 (trace_debug_1): ... this. Add `level' parameter.
10695 (trace_debug): New.
10696 (ATTR_USED, ATTR_NOINLINE): New.
10697 (IP_AGENT_EXPORT): New.
10698 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10699 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10700 (about_to_request_buffer_space, trace_buffer_is_full)
10701 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10702 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10703 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10704 (traceframe_write_count, traceframes_created)
10705 (trace_state_variables)
10706 New renaming defines.
10707 (struct ipa_sym_addresses): New.
10708 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10709 (symbol_list): New.
10710 (ipa_sym_addrs): New.
10711 (all_tracepoint_symbols_looked_up): New.
10712 (in_process_agent_loaded): New.
10713 (write_e_ipa_not_loaded): New.
10714 (maybe_write_ipa_not_loaded): New.
10715 (tracepoint_look_up_symbols): New.
10716 (debug_threads) [IN_PROCESS_AGENT]: New.
10717 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10718 (UNKNOWN_SIDE_EFFECTS): New.
10719 (stop_tracing): New.
10720 (flush_trace_buffer): New.
10721 (stop_tracing_bkpt): New.
10722 (flush_trace_buffer_bkpt): New.
10723 (read_inferior_integer): New.
10724 (read_inferior_uinteger): New.
10725 (read_inferior_data_pointer): New.
10726 (write_inferior_data_pointer): New.
10727 (write_inferior_integer): New.
10728 (write_inferior_uinteger): New.
10729 (struct collect_static_trace_data_action): Delete.
10730 (enum tracepoint_type): New.
10731 (struct tracepoint) <type>: New field `type'.
10732 <actions_str, step_actions, step_actions_str>: Only include in
10734 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10735 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10736 (tracepoints): Use IP_AGENT_EXPORT.
10737 (last_tracepoint): Don't include in the IPA.
10738 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10739 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10740 (alloced_trace_state_variables): New.
10741 (trace_state_variables): Use IP_AGENT_EXPORT.
10742 (traceframe_t): Delete unused variable.
10743 (circular_trace_buffer): Don't include in the IPA.
10744 (trace_buffer_start): Delete.
10745 (struct trace_buffer_control): New.
10746 (trace_buffer_free): Delete.
10747 (struct ipa_trace_buffer_control): New.
10748 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10749 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10751 (trace_buffer_ctrl): New.
10752 (TRACE_BUFFER_CTRL_CURR): New.
10753 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10754 Reimplement as macros.
10755 (trace_buffer_wrap): Delete.
10756 (traceframe_write_count, traceframe_read_count)
10757 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10758 (struct tracepoint_hit_ctx) <type>: New field.
10759 (struct fast_tracepoint_ctx): New.
10760 (memory_barrier): New.
10762 (record_tracepoint_error): Update atomically in the IPA.
10763 (clear_inferior_trace_buffer): New.
10764 (about_to_request_buffer_space): New.
10765 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10766 updating the same buffer.
10767 (add_tracepoint): Default the tracepoint's type to trap
10768 tracepoint, and orig_size to -1.
10769 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10770 internal variables.
10771 (create_trace_state_variable): New parameter `gdb'. Handle it.
10772 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10773 (cmd_qtdp): Handle fast tracepoints.
10774 (cmd_qtdv): Adjust.
10775 (max_jump_pad_size): New.
10776 (gdb_jump_pad_head): New.
10777 (get_jump_space_head): New.
10778 (claim_jump_space): New.
10779 (sort_tracepoints): New.
10780 (MAX_JUMP_SIZE): New.
10781 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10783 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10784 support. Upload fast traceframes, and delete internal IPA
10786 (stop_tracing_handler): New.
10787 (flush_trace_buffer_handler): New.
10788 (cmd_qtstop): Upload fast tracepoints.
10789 (response_tracepoint): Handle fast tracepoints.
10790 (tracepoint_finished_step): Upload fast traceframes. Set the
10791 tracepoint hit context's tracepoint type.
10792 (handle_tracepoint_bkpts): New.
10793 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10794 type. Add comment about fast tracepoints.
10795 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10796 non-existing action_str field.
10797 (get_context_regcache): Handle fast tracepoints.
10798 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10800 (fast_tracepoint_from_jump_pad_address): New.
10801 (fast_tracepoint_from_ipa_tpoint_address): New.
10802 (collecting_t): New.
10803 (force_unlock_trace_buffer): New.
10804 (fast_tracepoint_collecting): New.
10806 (gdb_collect): New.
10807 (write_inferior_data_ptr): New.
10808 (target_tp_heap): New.
10809 (target_malloc): New.
10810 (download_agent_expr): New.
10812 (download_tracepoints): New.
10813 (download_trace_state_variables): New.
10814 (upload_fast_traceframes): New.
10815 (IPA_FIRST_TRACEFRAME): New.
10816 (IPA_NEXT_TRACEFRAME_1): New.
10817 (IPA_NEXT_TRACEFRAME): New.
10818 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10819 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10820 (gdb_jump_pad_buffer_end): New.
10821 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10822 (initialize_tracepoint): Adjust.
10823 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10824 buffer. Initialize the low module.
10825 * utils.c (PREFIX, TOOLNAME): New.
10826 (malloc_failure): Use PREFIX.
10827 (error): In the IPA, an error causes an exit.
10828 (fatal, warning): Use PREFIX.
10829 (internal_error): Use TOOLNAME.
10830 (NUMCELLS): Increase to 10.
10831 * configure, config.in: Regenerate.
10833 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10835 * server.c (handle_query) <qSupported>: Do two passes over the
10836 qSupported string to avoid nesting strtok.
10838 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10840 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10842 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10843 -Wl,--dynamic-list.
10844 * configure: Regenerate.
10845 * proc-service.list: New.
10847 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10849 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10852 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10854 * gdbreplay.c (remote_open): Check error return from socket() call by
10855 its equality to -1 not by it being negative.
10856 * remote-utils.c (remote_open): Likewise.
10858 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10860 * config.h: Regenerate.
10862 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10864 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10865 doesn't provide PTRACE_GET_THREAD_AREA.
10867 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10869 * linux-m68k-low.c: Include <asm/ptrace.h>
10870 (ps_get_thread_area): Implement.
10872 2010-05-03 Doug Evans <dje@google.com>
10874 * event-loop.c (struct callback_event): New struct.
10875 (callback_list): New global.
10876 (append_callback_event, delete_callback_event): New functions.
10877 (process_callback): New function.
10878 (start_event_loop): Call it.
10879 * remote-utils.c (NOT_SCHEDULED): Define.
10880 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10881 moved out of readchar.
10882 (readchar): Rewrite. Call reschedule before returning.
10883 (reset_readchar): New function.
10884 (remote_close): Call it.
10885 (process_remaining, reschedule): New functions.
10886 * server.h (callback_handler_func): New typedef.
10887 (append_callback_event, delete_callback_event): Declare.
10889 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10891 * proc-service.c (ps_pglobal_lookup): Use
10892 thread_db_look_up_one_symbol.
10893 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10894 parameter. Use it instead of all_symbols_looked_up.
10895 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10897 (all_symbols_looked_up): Don't declare.
10898 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10899 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10901 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10902 Set all_symbols_looked_up here.
10903 (thread_db_look_up_one_symbol): New.
10904 (thread_db_get_tls_address): Adjust.
10905 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10906 thread_db object on the heap, and tentatively set it in the
10908 (thread_db_init): Don't set all_symbols_looked_up here.
10909 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10911 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10913 * linux-low.c (linux_kill, linux_detach): Adjust.
10914 (status_pending_p_callback): Remove redundant statement. Check
10915 for !TARGET_WAITIKIND_IGNORE, instead of
10916 TARGET_WAITKIND_STOPPED.
10917 (handle_tracepoints): Make sure LWP is locked. Adjust.
10918 (linux_wait_for_event_1): Adjust.
10919 (linux_cancel_breakpoints): New.
10920 (unsuspend_one_lwp): New.
10921 (unsuspend_all_lwps): New.
10922 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10923 (send_sigstop_callback): Change return type to int, add new
10924 `except' parameter and handle it.
10925 (suspend_and_send_sigstop_callback): New.
10926 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10927 pass them down. If SUSPEND, also increment the lwp's suspend
10929 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10930 (need_step_over_p): Don't consider suspended LWPs.
10931 (start_step_over): Adjust.
10932 (proceed_one_lwp): Change return type to int, add new `except'
10933 parameter and handle it.
10934 (unsuspend_and_proceed_one_lwp): New.
10935 (proceed_all_lwps): Use find_inferior instead of
10937 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10938 also decrement the suspend count of LWPs. Pass `except' down,
10939 instead of hacking its suspend count.
10940 (linux_pause_all): Add `freeze' parameter. Adjust.
10941 (linux_unpause_all): New.
10942 (linux_target_ops): Install linux_unpause_all.
10943 * server.c (handle_status): Adjust.
10944 * target.h (struct target_ops): New fields `unpause_all' and
10945 `cancel_breakpoints'. Add new parameter to `pause_all'.
10946 (pause_all): Add new `freeze' parameter.
10947 (unpause_all): New.
10948 (cancel_breakpoints): New.
10949 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10950 cancel breakpoints.
10951 (cmd_qtstart): Pause threads.
10952 (stop_tracing): Pause threads, and cancel breakpoints.
10953 * win32-low.c (win32_target_ops): Adjust.
10955 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10957 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10958 the inferior right away from here...
10959 (linux_wait_1): ... to here, and adjust to check the thread's
10960 last_resume_kind instead of the lwp's step or stop_expected flags.
10962 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10964 * README: Use consistent `GDB' and `GDBserver' spellings.
10966 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10968 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10969 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10970 (linux_detach_one_lwp): Assume the lwp is stopped.
10971 (any_thread_of): Delete.
10972 (linux_detach): Stop all lwps here. Don't blindly delete all
10974 (delete_lwp_callback): New.
10975 (linux_mourn): Delete all lwps of the process that is gone.
10976 (linux_wait_1): Don't delete the last lwp of the process here.
10977 * mem-break.h (mark_breakpoints_out): Declare.
10978 * mem-break.c (mark_breakpoints_out): New.
10979 (free_all_breakpoints): Use it.
10980 * server.c (handle_target_event): If the process is gone, mark
10982 * thread-db.c (struct thread_db) <create_bp>: New field.
10983 (thread_db_enable_reporting): Fix prototype. Store a thread event
10984 breakpoint reference in the thread_db struct.
10985 (thread_db_load_search): Clear the thread_db object.
10986 (try_thread_db_load_1): Ditto.
10987 (switch_to_process): New.
10988 (disable_thread_event_reporting): Use it.
10989 (remove_thread_event_breakpoints): New.
10990 (thread_db_detach, thread_db_mourn): Use it.
10992 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10994 * linux-low.c (linux_enable_event_reporting): New.
10995 (linux_wait_for_event_1, handle_extended_wait): Use it.
10997 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10999 * linux-low.c (linux_kill_one_lwp, linux_kill)
11000 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11001 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11002 SIGSTOP even if the LWP is stopped.
11003 (send_sigstop_callback): New.
11004 (stop_all_lwps): Use send_sigstop_callback instead.
11005 (linux_resume_one_thread): Adjust.
11006 (proceed_one_lwp): Still proceed an LWP that the client has
11007 requested to stop, if we haven't reported it as stopped yet. Make
11008 sure that LWPs the client want stopped, have a pending SIGSTOP.
11010 2010-04-26 Doug Evans <dje@google.com>
11012 * server.c (handle_general_set): Make static.
11014 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11015 Print received char after testing for error/eof instead of before.
11016 (input_interrupt): Tweak comment.
11018 2010-04-23 Doug Evans <dje@google.com>
11020 * server.c (start_inferior): Print inferior argv if --debug.
11022 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11024 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11025 * nto-x86-low.c: Include server.h
11027 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11029 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11030 be consistent with other sources of this directory.
11031 (init_registers_amd64): Correct name of source file of this function
11034 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11036 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11037 64-bit executables.
11039 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11041 * win32-i386-low.c: Add 64-bit support.
11042 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11043 (init_registers_amd64): Declare.
11044 (mappings): Add 64-bit version of array.
11045 (init_windows_x86): New function.
11046 (the_low_target): Change init_arch field to init_windows_x86.
11048 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11050 * win32-low.c: Adapt to support also 64-bit architecture.
11051 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11052 (get_image_name): Use SIZE_T type for local variable `done'.
11053 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11054 (toolhelp_get_dll_name): Idem.
11055 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11056 Use uintptr_t typecast to avoid warning.
11057 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11058 (handle_exception): Use phex_nz to avoid warning.
11059 (win32_wait): Remove unused local variable `process'.
11061 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11063 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11066 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11068 * configure.ac: Use `ws2_32' library for srv_mingw.
11069 * configure: Regenerate.
11070 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11071 * remote-utils.c: Likewise.
11073 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11075 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11076 if __x86_64__ is defined.
11078 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11080 * configure: Regenerate.
11082 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11084 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11085 * target.h (target_ops): New get_tib_address field.
11086 * win32-low.h (win32_thread_info): Add thread_local_base field.
11087 * win32-low.c (child_add_thread): Add tlb argument.
11088 Set thread_local_base field to TLB.
11089 (get_child_debug_event): Adapt to child_add_thread change.
11090 (win32_get_tib_address): New function.
11091 (win32_target_ops): Set get_tib_address field to
11092 win32_get_tib_address.
11093 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11095 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11097 * linux-low.c (linux_mourn): Also remove the process.
11098 * server.c (handle_target_event): Don't remove the process here.
11099 * nto-low.c (nto_mourn): New.
11100 (nto_target_ops): Install it.
11101 * spu-low.c (spu_mourn): New.
11102 (spu_target_ops): Install it.
11103 * win32-low.c (win32_mourn): New.
11104 (win32_target_ops): Install it.
11106 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11108 * server.h (buffer_xml_printf): Remove redundant `;'.
11110 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11112 * regcache.c (set_register_cache): Invalidate regcaches before
11113 changing the register cache layout.
11114 (regcache_invalidate_one): Allow a NULL regcache.
11115 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11116 regcaches before changing the register cache layout or the target
11119 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11121 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11122 variable warning on Linux/x86-64.
11124 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11126 GDBserver disconnected tracing support.
11128 * linux-low.c (linux_remove_process): Delete.
11129 (add_lwp): Don't set last_resume_kind here.
11130 (linux_kill): Use `mourn'.
11131 (linux_detach): Use `thread_db_detach', and `mourn'.
11132 (linux_mourn): New.
11133 (linux_attach_lwp_1): Adjust comment.
11134 (linux_attach): last_resume_kind moved the thread_info; adjust.
11135 (status_pending_p_callback): Adjust.
11136 (linux_wait_for_event_1): Adjust.
11137 (count_events_callback, select_singlestep_lwp_callback)
11138 (select_event_lwp_callback, cancel_breakpoints_callback)
11139 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11140 (proceed_one_lwp): Adjust.
11141 (linux_async): Add debug output.
11142 (linux_thread_stopped): New.
11143 (linux_pause_all): New.
11144 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11146 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11147 (thread_db_free): Delete declaration.
11148 (thread_db_detach, thread_db_mourn): Declare.
11149 * thread-db.c (thread_db_init): Use thread_db_mourn.
11150 (thread_db_free): Delete, split in two.
11151 (disable_thread_event_reporting): New.
11152 (thread_db_detach): New.
11153 (thread_db_mourn): New.
11155 * server.h (struct thread_info) <last_resume_kind>: New field.
11156 <attached>: Add comment.
11157 <gdb_detached>: New field.
11158 (handler_func): Change return type to int.
11159 (handle_serial_event, handle_target_event): Ditto.
11160 (gdb_connected): Declare.
11162 (disconnected_tracing): Declare.
11163 (stop_tracing): Declare.
11165 * server.c (handle_query) <qSupported>: Report support for
11166 disconnected tracing.
11167 (queue_stop_reply_callback): Account for running threads.
11168 (gdb_wants_thread_stopped): New.
11169 (gdb_wants_all_threads_stopped): New.
11170 (gdb_reattached_process): New.
11171 (handle_status): Clear the `gdb_detached' flag of all processes.
11172 In all-stop, stop all threads.
11173 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11174 (process_serial_event): If the remote connection breaks, or if an
11175 exit was forced with "monitor exit", force an event loop exit.
11176 Handle disconnected tracing on detach.
11177 (handle_serial_event): Adjust.
11178 (handle_target_event): If GDB isn't connected, forward events back
11179 to the inferior, unless the last process exited, in which case,
11180 exit gdbserver. Adjust interface.
11182 * remote-utils.c (remote_open): Don't block in accept. Instead
11183 register an event loop source on the listen socket file
11184 descriptor. Refactor bits into ...
11185 (listen_desc): ... this new global.
11186 (gdb_connected): ... this new function.
11187 (enable_async_notification): ... this new function.
11188 (handle_accept_event): ... this new function.
11189 (remote_close): Clear remote_desc.
11191 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11193 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11195 (mourn_inferior): Define.
11196 (target_process_qsupported): Avoid the dangling else problem.
11197 (thread_stopped): Define.
11198 (pause_all): Define.
11199 (target_waitstatus_to_string): Declare.
11200 * target.c (target_waitstatus_to_string): New.
11202 * tracepoint.c (tracing): Make extern.
11203 (disconnected_tracing): New.
11204 (stop_tracing): Make extern. Handle tracing stops due to GDB
11206 (cmd_qtdisconnected): New.
11207 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11208 (handle_tracepoint_general_set): Handle QTDisconnected.
11210 * event-loop.c (event_handler_func): Change return type to int.
11211 (process_event): Bail out if the event handler wants the event
11213 (handle_file_event): Ditto.
11214 (start_event_loop): Bail out if the event handler wants the event
11217 * nto-low.c (nto_target_ops): Adjust.
11218 * spu-low.c (spu_wait): Don't remove the process here.
11219 (spu_target_ops): Adjust.
11220 * win32-low.c (win32_wait): Don't remove the process here.
11221 (win32_target_ops): Adjust.
11223 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11225 * regcache.c (realloc_register_cache): Invalidate inferior's
11226 regcache before recreating it.
11228 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11230 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11232 2010-04-09 Stan Shebs <stan@codesourcery.com>
11233 Pedro Alves <pedro@codesourcery.com>
11235 * server.h (LONGEST): New.
11236 (struct thread_info) <while_stepping>: New field.
11237 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11239 (initialize_tracepoint, handle_tracepoint_general_set)
11240 (handle_tracepoint_query, tracepoint_finished_step)
11241 (tracepoint_was_hit, release_while_stepping_state_list):
11242 (current_traceframe): Declare.
11243 * server.c (handle_general_set): Handle tracepoint packets.
11244 (read_memory): New.
11245 (write_memory): New.
11246 (handle_search_memory_1): Use read_memory.
11247 (handle_query): Report support for conditional tracepoints, trace
11248 state variables, and tracepoint sources. Handle tracepoint
11250 (main): Initialize the tracepoints module.
11251 (process_serial_event): Handle traceframe reads/writes.
11253 * linux-low.c (handle_tracepoints): New.
11254 (linux_wait_1): Call it.
11255 (linux_resume_one_lwp): Handle while-stepping.
11256 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11257 (linux_target_ops): Install them.
11258 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11260 * linux-x86-low.c (x86_supports_tracepoints): New.
11261 (the_low_target). Install it.
11263 * mem-break.h (delete_breakpoint): Declare.
11264 * mem-break.c (delete_breakpoint): Make external.
11266 * target.h (struct target_ops): Add `supports_tracepoints',
11267 `read_pc', and `write_pc' fields.
11268 (target_supports_tracepoints): Define.
11269 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11272 * regcache.h (struct regcache) <registers_owned>: New field.
11273 (init_register_cache, regcache_cpy): Declare.
11274 (regcache_read_pc, regcache_write_pc): Declare.
11275 (register_cache_size): Declare.
11276 (supply_regblock): Declare.
11277 * regcache.c (init_register_cache): New.
11278 (new_register_cache): Use it.
11279 (regcache_cpy): New.
11280 (register_cache_size): New.
11281 (supply_regblock): New.
11282 (regcache_read_pc, regcache_write_pc): New.
11284 * tracepoint.c: New.
11286 * Makefile.in (OBS): Add tracepoint.o.
11287 (tracepoint.o): New rule.
11289 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11291 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11293 (i386-mmx.c): Likewise.
11294 (i386-mmx-linux.o): Likewise.
11295 (i386-mmx-linux.c): Likewise.
11297 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11298 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11299 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11300 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11302 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11303 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11304 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11306 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11308 * Makefile.in (clean): Updated.
11310 (i386-avx.c): Likewise.
11311 (i386-avx-linux.o): Likewise.
11312 (i386-avx-linux.c): Likewise.
11313 (amd64-avx.o): Likewise.
11314 (amd64-avx.c): Likewise.
11315 (amd64-avx-linux.o): Likewise.
11316 (amd64-avx-linux.c): Likewise.
11318 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11319 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11320 (srv_amd64_regobj): Add amd64-avx.o.
11321 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11322 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11323 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11324 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11325 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11326 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11327 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11329 * i387-fp.c: Include "i386-xstate.h".
11331 (i387_cache_to_xsave): Likewise.
11332 (i387_xsave_to_cache): Likewise.
11333 (x86_xcr0): Likewise.
11335 * i387-fp.h (i387_cache_to_xsave): Likewise.
11336 (i387_xsave_to_cache): Likewise.
11337 (x86_xcr0): Likewise.
11339 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11340 * linux-crisv32-low.c (target_regsets): Likewise.
11341 * linux-m68k-low.c (target_regsets): Likewise.
11342 * linux-mips-low.c (target_regsets): Likewise.
11343 * linux-ppc-low.c (target_regsets): Likewise.
11344 * linux-s390-low.c (target_regsets): Likewise.
11345 * linux-sh-low.c (target_regsets): Likewise.
11346 * linux-sparc-low.c (target_regsets): Likewise.
11347 * linux-xtensa-low.c (target_regsets): Likewise.
11349 * linux-low.c: Include <sys/uio.h>.
11350 (regsets_fetch_inferior_registers): Support nt_type.
11351 (regsets_store_inferior_registers): Likewise.
11352 (linux_process_qsupported): New.
11353 (linux_target_ops): Add linux_process_qsupported.
11355 * linux-low.h (regset_info): Add nt_type.
11356 (linux_target_ops): Add process_qsupported.
11358 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11360 (init_registers_i386_avx_linux): New.
11361 (init_registers_amd64_avx_linux): Likewise.
11362 (xmltarget_i386_linux_no_xml): Likewise.
11363 (xmltarget_amd64_linux_no_xml): Likewise.
11364 (PTRACE_GETREGSET): Likewise.
11365 (PTRACE_SETREGSET): Likewise.
11366 (x86_fill_xstateregset): Likewise.
11367 (x86_store_xstateregset): Likewise.
11368 (use_xml): Likewise.
11369 (x86_linux_update_xmltarget): Likewise.
11370 (x86_linux_process_qsupported): Likewise.
11371 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11372 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11373 init_registers_i386_linux here. Call
11374 x86_linux_update_xmltarget.
11375 (the_low_target): Add x86_linux_process_qsupported.
11377 * server.c (handle_query): Call target_process_qsupported.
11379 * target.h (target_ops): Add process_qsupported.
11380 (target_process_qsupported): New.
11382 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11384 * inferiors.c (add_thread): Set last_status kind to
11385 TARGET_WAITKIND_IGNORE.
11386 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11387 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11388 (linux_wait_1): Move `thread' local definition to block that uses
11389 it. Don't NULL initialize `event_child'.
11390 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11391 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11392 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11394 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11396 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11397 an extended waitstatus, or by a watchpoint.
11398 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11399 thread was stepping or has been stopped by a watchpoint.
11401 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11403 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11404 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11405 of another, then delete the previous, and validate all
11407 (validate_inserted_breakpoint): New.
11408 (delete_disabled_breakpoints): New.
11409 (validate_breakpoints): New.
11410 (check_mem_read): Validate breakpoints before trusting their
11411 shadow. Delete disabled breakpoints.
11412 (check_mem_write): Validate breakpoints before trusting they
11413 should be inserted. Delete disabled breakpoints.
11414 * mem-break.h (validate_breakpoints):
11415 * server.c (handle_query): Validate breakpoints when we see a
11418 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11420 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11421 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11422 if we could tell there's a GDB breakpoint at stop_pc.
11423 (need_step_over_p): Don't do a step over if we find a GDB
11424 breakpoint at the resume PC.
11426 * mem-break.c (struct raw_breakpoint): New.
11427 (enum bkpt_type): New type `gdb_breakpoint'.
11428 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11429 fields. New field `raw'.
11430 (find_raw_breakpoint_at): New.
11431 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11432 breakpoint instead.
11433 (set_breakpoint_at): Adjust.
11434 (delete_raw_breakpoint): New.
11435 (release_breakpoint): New.
11436 (delete_breakpoint): Rename to...
11437 (delete_breakpoint_1): ... this. Add proc parameter. Use
11438 release_breakpoint. Return ENOENT.
11439 (delete_breakpoint): Reimplement.
11440 (find_breakpoint_at): Delete.
11441 (find_gdb_breakpoint_at): New.
11442 (delete_breakpoint_at): Delete.
11443 (set_gdb_breakpoint_at): New.
11444 (delete_gdb_breakpoint_at): New.
11445 (gdb_breakpoint_here): New.
11446 (set_reinsert_breakpoint): Use release_breakpoint.
11447 (uninsert_breakpoint): Rename to ...
11448 (uninsert_raw_breakpoint): ... this.
11449 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11450 (reinsert_raw_breakpoint): Change parameter type to
11452 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11454 (check_breakpoints): Adjust. Use release_breakpoint.
11455 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11456 (breakpoint_inserted_here): Ditto.
11457 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11458 Don't trust the breakpoint's shadow if it is not inserted.
11459 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11460 (delete_all_breakpoints): Adjust.
11461 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11462 use delete_breakpoint_1.
11464 * mem-break.h (breakpoints_supported): Delete declaration.
11465 (set_gdb_breakpoint_at): Declare.
11466 (gdb_breakpoint_here): Declare.
11467 (delete_breakpoint_at): Delete.
11468 (delete_gdb_breakpoint_at): Declare.
11470 * server.h (struct raw_breakpoint): Forward declare.
11471 (struct process_info): New field `raw_breakpoints'.
11473 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11476 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11478 * linux-low.c (status_pending_p_callback): Fix comment.
11479 (linux_wait_for_event_1): Move most of the internal breakpoint
11480 handling from here...
11481 (linux_wait_1): ... to here.
11482 (count_events_callback): New.
11483 (select_singlestep_lwp_callback): New.
11484 (select_event_lwp_callback): New.
11485 (cancel_breakpoints_callback): New.
11486 (select_event_lwp): New.
11487 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11488 priority to all LWPs that have had events that should be reported
11489 to the client. Cancel breakpoints when about to reporting the
11490 event to the client, not while stopping lwps. No longer cancel
11491 finished single-steps here.
11492 (cancel_finished_single_step): Delete.
11493 (cancel_finished_single_steps): Delete.
11495 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11497 * mem-break.c (enum bkpt_type): New.
11498 (struct breakpoint): New field `type'.
11499 (set_breakpoint_at): Change return type to struct breakpoint
11500 pointer. Set type to `other_breakpoint' by default.
11501 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11502 in the breakpoint list.
11503 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11504 (reinsert_breakpoint): Rename to ...
11505 (reinsert_raw_breakpoint): ... this.
11506 (reinsert_breakpoints_at): Adjust.
11507 * mem-break.h (struct breakpoint): Declare.
11508 (set_breakpoint_at): Change return type to struct breakpoint
11511 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11513 * server.c (handle_query): Assign, not compare.
11515 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11517 Teach linux gdbserver to step-over-breakpoints.
11519 * linux-low.c (can_hardware_single_step): New.
11520 (supports_breakpoints): New.
11521 (handle_extended_wait): If stopping threads, read the stop pc of
11522 the new cloned LWP.
11524 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11525 low target doesn't support retrieving the PC.
11526 (add_lwp): Set last_resume_kind to resume_continue.
11527 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11528 (linux_attach): Don't clear stop_expected. Set the lwp's
11529 last_resume_kind to resume_stop.
11530 (linux_detach_one_lwp): Don't check for removed breakpoints.
11531 (check_removed_breakpoint): Delete.
11532 (status_pending_p): Rename to ...
11533 (status_pending_p_callback): ... this. Don't check for removed
11534 breakpoints. Don't consider threads that are stopped from GDB's
11536 (linux_wait_for_lwp): Always read the stop_pc here.
11537 (cancel_breakpoint): New.
11538 (step_over_bkpt): New global.
11539 (linux_wait_for_event_1): Implement stepping over breakpoints.
11540 (gdb_wants_lwp_stopped): New.
11541 (gdb_wants_all_stopped): New.
11542 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11543 single-step traps here. Store the thread's last reported target
11545 (send_sigstop): Don't clear stop_expected. Always set it,
11547 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11548 (cancel_finished_single_step): New.
11549 (cancel_finished_single_steps): New.
11550 (wait_for_sigstop): Don't cancel finished single-step traps here.
11551 (linux_resume_one_lwp): Don't check for removed breakpoints.
11552 Don't set `step' on non-hardware step archs.
11553 (linux_set_resume_request): Ignore resume_stop requests if already
11554 stopping or stopped. Set the lwp's last_resume_kind.
11555 (resume_status_pending_p): Don't check for removed breakpoints.
11556 (need_step_over_p): New.
11557 (start_step_over): New.
11558 (finish_step_over): New.
11559 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11560 requests. Clear the thread's last reported target waitstatus.
11561 Don't use the `suspended' flag. Don't consider pending breakpoints.
11562 (linux_resume): Start a step-over if necessary.
11563 (proceed_one_lwp): New.
11564 (proceed_all_lwps): New.
11565 (unstop_all_lwps): New.
11566 * linux-low.h (struct lwp_info): Rewrite comment for the
11567 `suspended' flag. Add the `stop_pc' field. Delete the
11568 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11569 Add `'last_resume_kind' and `need_step_over' fields.
11570 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11571 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11572 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11573 (set_raw_breakpoint_at): New.
11574 (set_breakpoint_at): Rewrite to use it.
11575 (reinsert_breakpoint_handler): Delete.
11576 (set_reinsert_breakpoint): New.
11577 (reinsert_breakpoint_by_bp): Delete.
11578 (delete_reinsert_breakpoints): New.
11579 (uninsert_breakpoint): Rewrite.
11580 (uninsert_breakpoints_at): New.
11581 (reinsert_breakpoint): Rewrite.
11582 (reinsert_breakpoints_at): New.
11583 (check_breakpoints): Rewrite.
11584 (breakpoint_here): New.
11585 (breakpoint_inserted_here): New.
11586 (check_mem_read): Adjust.
11587 * mem-break.h (breakpoints_supported, breakpoint_here)
11588 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11589 (reinsert_breakpoint_by_bp): Delete declaration.
11590 (delete_reinsert_breakpoints): Declare.
11591 (reinsert_breakpoint): Delete declaration.
11592 (reinsert_breakpoints_at): Declare.
11593 (uninsert_breakpoint): Delete declaration.
11594 (uninsert_breakpoints_at): Declare.
11595 (check_breakpoints): Adjust prototype.
11596 * server.h: Adjust include order.
11597 (struct thread_info): Declare here. Add a `last_status' field.
11599 2010-03-23 Michael Snyder <msnyder@vmware.com>
11601 * server.c (crc32): New function.
11602 (handle_query): Add handling for 'qCRC:' request.
11604 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11606 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11607 lwp had been stopped by a watchpoint.
11609 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11611 * server.h (internal_error): Declare.
11612 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11613 * utils.c (internal_error): New function.
11615 2010-03-15 Andreas Schwab <schwab@redhat.com>
11617 * configure.srv: Fix typo setting srv_regobj.
11619 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11621 * linux-low.c (fetch_register): Avoid passing a non string literal
11623 (usr_store_inferior_registers): Ditto.
11625 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11627 * linux-low.c (linux_write_memory): Bail out early if peeking
11630 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11632 * linux-low.h (struct lwp_info): New fields
11633 `stopped_by_watchpoint' and `stopped_data_address'.
11634 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11635 here, and cache them in the lwp object.
11636 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11638 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11640 (linux_stopped_by_watchpoint): Rewrite.
11641 (linux_stopped_data_address): Rewrite.
11643 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11645 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11646 switching the current inferior, not before.
11648 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11650 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11651 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11652 i386-linux.c and amd64-linux.c.
11653 (reg-i386.o): Removed.
11654 (reg-i386.c): Likewise.
11655 (reg-i386-linux.o): Likewise.
11656 (reg-i386-linux.c): Likewise.
11657 (reg-x86-64.o): Likewise.
11658 (reg-x86-64.c): Likewise.
11659 (reg-x86-64-linux.o): Likewise.
11660 (reg-x86-64-linux.c): Likewise.
11662 (i386.c): Likewise.
11663 (i386-linux.o): Likewise.
11664 (i386-linux.c): Likewise.
11665 (amd64.o): Likewise.
11666 (amd64.c): Likewise.
11667 (amd64-linux.o): Likewise.
11668 (amd64-linux.c): Likewise.
11670 * configure.srv (srv_i386_regobj): New.
11671 (srv_i386_linux_regobj): Likewise.
11672 (srv_amd64_regobj): Likewise.
11673 (srv_amd64_linux_regobj): Likewise.
11674 (srv_i386_32bit_xmlfiles): Likewise.
11675 (srv_i386_64bit_xmlfiles): Likewise.
11676 (srv_i386_xmlfiles): Likewise.
11677 (srv_amd64_xmlfiles): Likewise.
11678 (srv_i386_linux_xmlfiles): Likewise.
11679 (srv_amd64_linux_xmlfiles): Likewise.
11680 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11681 srv_xmlfiles to $srv_i386_xmlfiles.
11682 (i[34567]86-*-mingw32ce*): Likewise.
11683 (i[34567]86-*-mingw*): Likewise.
11684 (i[34567]86-*-nto*): Likewise.
11685 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11686 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11687 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11688 (x86_64-*-linux*): Likewise.
11690 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11691 (init_registers_amd64_linux): New.
11692 (x86_arch_setup): Replace init_registers_x86_64_linux with
11693 init_registers_amd64_linux.
11695 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11697 * configure.ac: Check for libdl. If it is not available link against
11698 static libthread_db.
11699 * configure: Regenerate.
11701 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11705 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11706 handing a read watchpoint.
11707 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11709 2010-02-12 Doug Evans <dje@google.com>
11711 * linux-low.c (linux_supports_tracefork_flag): Document.
11712 (linux_look_up_symbols): Add comment.
11714 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11716 * regcache.c (supply_register): Clear regcache if buf is NULL.
11718 2010-02-02 Nicolas Roche <roche@sourceware.org>
11719 Joel Brobecker <brobecker@adacore.com>
11721 * inferiors.c (find_inferior): Add function documentation.
11722 (unloaded_dll): Handle the case where the unloaded dll has not
11723 been previously registered in the dll list.
11725 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11727 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11728 (thumb2_breakpoint): New.
11729 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11731 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11733 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11734 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11737 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11739 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11741 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11743 * linux-s390-low.c (s390_collect_ptrace_register)
11744 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11746 2010-01-21 Doug Evans <dje@google.com>
11748 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11749 (PTRACE_ARG4_TYPE): New macro.
11750 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11751 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11752 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11753 (usr_store_inferior_registers): Ditto.
11754 (linux_read_memory, linux_write_memory): Ditto.
11755 (linux_test_for_tracefork): Ditto.
11757 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11758 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11760 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11762 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11765 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11767 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11768 prototype to take a regcache. Adjust.
11770 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11772 * regcache.h (struct thread_info): Forward declare.
11773 (struct regcache): New.
11774 (new_register_cache): Adjust prototype.
11775 (get_thread_regcache): Declare.
11776 (free_register_cache): Adjust prototype.
11777 (registers_to_string, registers_from_string): Ditto.
11778 (supply_register, supply_register_by_name, collect_register)
11779 (collect_register_as_string, collect_register_by_name): Ditto.
11780 * regcache.c (struct inferior_regcache_data): Delete.
11781 (get_regcache): Rename to ...
11782 (get_thread_regcache): ... this. Adjust. Switch inferior before
11783 fetching registers.
11784 (regcache_invalidate_one): Adjust.
11785 (regcache_invalidate): Fix prototype.
11786 (new_register_cache): Return the new register cache.
11787 (free_register_cache): Change prototype.
11788 (realloc_register_cache): Adjust.
11789 (registers_to_string): Change prototype to take a regcache. Adjust.
11790 (registers_from_string): Ditto.
11791 (register_data): Ditto.
11792 (supply_register): Ditto.
11793 (supply_register_by_name): Ditto.
11794 (collect_register): Ditto.
11795 (collect_register_as_string): Ditto.
11796 (collect_register_by_name): Ditto.
11797 * server.c (process_serial_event): Adjust.
11798 * linux-low.h (regset_fill_func, regset_store_func): Change
11800 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11802 * linux-low.c (get_stop_pc): Adjust.
11803 (check_removed_breakpoint): Adjust.
11804 (linux_wait_for_event): Adjust.
11805 (linux_resume_one_lwp): Adjust.
11806 (fetch_register): Add regcache parameter. Adjust.
11807 (usr_store_inferior_registers): Ditto.
11808 (regsets_fetch_inferior_registers): Ditto.
11809 (regsets_store_inferior_registers): Ditto.
11810 (linux_fetch_registers, linux_store_registers): Ditto.
11811 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11813 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11815 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11816 prototype to take a regcache.
11817 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11818 * remote-utils.c (convert_ascii_to_int, outreg)
11819 (prepare_resume_reply): Change prototype to take a regcache.
11821 * target.h (struct target_ops) <fetch_registers, store_registers>:
11822 Change prototype to take a regcache.
11823 (fetch_inferior_registers, store_inferior_registers): Change
11824 prototype to take a regcache. Adjust.
11825 * proc-service.c (ps_lgetregs): Adjust.
11826 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11827 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11828 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11829 take a regcache. Adjust.
11830 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11831 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11832 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11833 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11834 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11835 (cris_cannot_fetch_register):
11836 (cris_breakpoint_at): Change prototype to take a regcache.
11838 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11839 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11840 to take a regcache. Adjust.
11841 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11843 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11844 take a regcache. Adjust.
11845 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11846 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11847 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11848 * linux-mips-low.c (mips_get_pc):
11849 (mips_set_pc): Change prototype to take a regcache. Adjust.
11850 (mips_reinsert_addr): Adjust.
11851 (mips_collect_register): Change prototype to take a regcache.
11853 (mips_supply_register):
11854 (mips_collect_register_32bit, mips_supply_register_32bit)
11855 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11856 (mips_store_fpregset): Ditto.
11857 * linux-ppc-low.c (ppc_supply_ptrace_register)
11858 (ppc_supply_ptrace_register): Ditto.
11859 (parse_spufs_run): Adjust.
11860 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11861 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11862 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11863 take a regcache. Adjust.
11864 * linux-s390-low.c (s390_collect_ptrace_register)
11865 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11866 (s390_set_pc): Change prototype to take a regcache. Adjust.
11867 (s390_arch_setup): Adjust.
11868 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11869 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11870 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11871 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11872 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11874 (sparc_breakpoint_at): Adjust.
11875 * linux-xtensa-low.c (xtensa_fill_gregset):
11876 (xtensa_store_gregset):
11877 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11878 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11879 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11880 prototype to take a regcache. Adjust.
11881 * win32-arm-low.c (arm_fetch_inferior_register)
11882 (arm_store_inferior_register): Change prototype to take a
11884 * win32-i386-low.c (i386_fetch_inferior_register)
11885 (i386_store_inferior_register): Change prototype to take a
11887 * win32-low.c (child_fetch_inferior_registers)
11888 (child_store_inferior_registers): Change prototype to take a
11890 (win32_wait): Adjust.
11891 (win32_fetch_inferior_registers): Change prototype to take a
11893 (win32_store_inferior_registers): Adjust.
11894 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11895 store_inferior_register>: Change prototype to take a regcache.
11897 2010-01-20 Doug Evans <dje@google.com>
11899 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11901 (linux_wait_for_event1, linux_init_signals): Ditto.
11902 (W_STOPCODE): Provide definition if missing.
11904 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11906 * linux-low.c (linux_core_of_thread): New.
11907 (compare_ints, show_process, list_threads): New.
11908 (linux_qxfer_osdata): Report threads and cores.
11909 (linux_target_op): Register linux_core_of_thread.
11910 * remote-utils.c (prepare_resume_reply): Report the core.
11911 (buffer_xml_printf): Support %d specifier.
11912 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11914 (handle_query): Handle qXfer:threads. Announce availability
11916 * target.h (struct target_ops): New field core_of_thread.
11918 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11920 * Makefile.in (clean): Remove new generated files.
11921 (reg-s390.o, reg-s390.c): Remove rules.
11922 (reg-s390x.o, reg-s390x.c): Likewise.
11923 (s390-linux32.o, s390-linux32.c): Add rules.
11924 (s390-linux64.o, s390-linux64.c): Likewise.
11925 (s390x-linux64.o, s390x-linux64.c): Likewise.
11926 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11927 * linux-s390-low.c: Include <elf.h>.
11928 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11929 (init_registers_s390): Remove prototype.
11930 (init_registers_s390x): Likewise.
11931 (init_registers_s390_linux32): Add prototype.
11932 (init_registers_s390_linux64): Likewise.
11933 (init_registers_s390x_linux64): Likewise.
11934 (s390_num_regs_3264): New define.
11935 (s390_regmap_3264): New global variable.
11936 (s390_cannot_fetch_register): Remove obsolete check.
11937 (s390_cannot_store_register): Likewise.
11938 (s390_collect_ptrace_register): Handle upper/lower register halves.
11939 (s390_supply_ptrace_register): Likewise.
11940 (s390_fill_gregset): Update to register number changes.
11941 (s390_get_hwcap): New routine.
11942 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11943 Install appropriate regmap and register set.
11945 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11947 * server.c (gdbserver_version): Update copyright year to 2010.
11948 * gdbreplay.c (gdbreplay_version): Likewise.
11950 2009-12-28 Doug Evans <dje@google.com>
11952 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11953 elf/external.h. Include <elf.h> instead but only if necessary.
11955 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11957 * linux-low.c (linux_remove_process): Remove `detaching'
11958 parameter. Don't release/detach from thread_db here.
11959 (linux_kill): Release/detach from thread_db here, ...
11960 (linux_detach): ... and here, before actually detaching.
11961 (linux_wait_1): ... and here, when a process exits.
11962 * thread-db.c (any_thread_of): New.
11963 (thread_db_free): Switch the current inferior to a thread of the
11966 2009-12-21 Doug Evans <dje@google.com>
11968 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11970 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11971 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11972 warning ifndef __NR_tkill. Move setting of errno there too.
11973 Delete unnecessary resetting of errno after syscall.
11974 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11976 * configure.ac: Check for dladdr.
11977 * config.in: Regenerate.
11978 * configure: Regenerate.
11979 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11980 (try_thread_db_load): Update.
11982 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11984 2009-12-18 Doug Evans <dje@google.com>
11986 * event-loop.c: Include unistd.h if it exists.
11988 * linux-low.c (my_waitpid): Move definition away from being in
11989 between linux_tracefork_child/linux_test_for_tracefork.
11991 * gdb_proc_service.h (psaddr_t): Fix type.
11992 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11993 signature to match glibc.
11995 2009-12-16 Doug Evans <dje@google.com>
11997 * linux-low.c (linux_read_memory): Fix argument to read.
11999 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12001 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12002 events, don't leave current_inferior pointing at null.
12004 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12006 * win32-low.c (LOG): Delete.
12007 (OUTMSG): Output to stderr.
12008 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12009 on compile time LOG macro.
12010 (win32_wait): Fix debug output.
12012 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12014 * win32-low.c (win32_add_one_solib): If the dll name is
12015 "ntdll.dll", prepend the system directory to the dll path.
12017 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12019 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12021 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12022 Vladimir Prus <vladimir@codesourcery.com>
12024 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12025 * configure.ac: Check for __mcoldfire__ and set
12026 gdb_cv_m68k_is_coldfire.
12027 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12028 reg-cf.o and reg-m68k.o.
12029 * configure: Regenerated.
12031 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12033 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12034 Pass it to thread_db_free.
12035 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12036 proper `detaching' argument to linux_remove_process.
12037 * linux-low.h (thread_db_free): Add `detaching' parameter.
12038 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12040 (thread_db_free): Add `detaching' parameter. Only
12041 call td_ta_clear_event if detaching from process.
12043 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12045 * thread-db.c (thread_db_free): Fix typo.
12047 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12050 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12052 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12054 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12055 with an i686 compiler.
12056 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12058 * configure: Rebuilt.
12060 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12064 * server.c (handle_search_memory_1): Correct read_addr initialization
12065 in loop for searching subsequent chunks.
12067 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12069 * configure.ac: New --with-libthread-db option.
12070 * thread-db.c: Allow direct dependence on libthread_db.
12071 (thread_db_free): Adjust.
12072 * config.in: Regenerate.
12073 * configure: Likewise.
12075 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12078 * thread-db.c (attach_thread): New function.
12079 (maybe_attach_thread): Return success/failure.
12080 (find_new_threads_callback): Adjust.
12081 (thread_db_find_new_threads): Loop until no new threads.
12083 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12085 * proc-service.c (ps_lgetregs): Formatting.
12087 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12089 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12090 * configure.ac: Adjust.
12091 * linux-low.h (struct process_info_private): Move members to struct
12093 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12094 * linux-low.c (linux_remove_process): Adjust.
12095 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12096 * server.c (handle_query): Move code ...
12097 (handle_monitor_command): ... here. New function.
12098 * target.h (struct target_ops): New member.
12099 * thread-db.c (struct thread_db): New.
12100 (libthread_db_search_path): New variable.
12101 (thread_db_create_event, thread_db_enable_reporting)
12102 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12103 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12104 (try_thread_db_load_1, dladdr_to_soname): New functions.
12105 (try_thread_db_load, thread_db_load_search): New functions.
12106 (thread_db_init): Search for libthread_db.
12107 (thread_db_free): New function.
12108 (thread_db_handle_monitor_command): Likewise.
12109 * config.in: Regenerate.
12110 * configure: Regenerate.
12112 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12114 * spu-low.c (spu_kill): Wait for inferior to terminate.
12115 Call clear_inferiors.
12116 (spu_detach): Call clear_inferiors.
12118 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12120 * aclocal.m4: Regenerate.
12121 * config.in: Likewise.
12122 * configure: Likewise.
12124 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12126 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12127 (parse_spufs_run): New function.
12128 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12129 (ppc_breakpoint_at): Handle SPU breakpoints.
12131 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12133 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12134 (SPUFS_MAGIC): Define.
12135 (spu_enumerate_spu_ids): New function.
12136 (linux_qxfer_spu): New function.
12137 (linux_target_ops): Install linux_qxfer_spu.
12139 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12141 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12142 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12143 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12144 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12145 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12146 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12147 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12148 (init_registers_powerpc_cell32l): Add prototype.
12149 (init_registers_powerpc_cell64l): Likewise.
12150 (ppc_arch_setup): Detect Cell/B.E. architecture.
12152 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12154 * Makefile.in (datarootdir): New variable.
12156 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12158 * linux-low.c (linux_write_memory): Update debugging output.
12159 * Makefile.in (clean): Add new descriptions.
12160 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12161 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12162 * configure.srv: Add new files for arm*-*-linux*.
12163 * linux-arm-low.c: Add new declarations.
12164 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12165 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12166 (HWCAP_VFPv3D16): New.
12167 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12168 instead of __IWMMXT__.
12169 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12170 (arm_arch_setup): New.
12171 (target_regsets): Remove #ifdef. Add VFP regset.
12172 (the_low_target): Use arm_arch_setup.
12174 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12176 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12177 the main thread again.
12179 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12181 Adding Neutrino gdbserver.
12182 * configure: Regenerated.
12183 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12184 * configure.srv (i[34567]86-*-nto*): New target.
12185 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12186 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12187 (nto_comctrl) [__QNX__]: New function.
12188 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12190 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12192 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12195 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12196 Pedro Alves <pedro@codesourcery.com>
12198 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12199 don't support CONTEXT_EXTENDED_REGISTERS.
12200 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12201 (the_low_target): Install them.
12202 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12203 failing with ERROR_PIPE_NOT_CONNECTED.
12205 2009-06-30 Doug Evans <dje@google.com>
12206 Pierre Muller <muller@ics.u-strasbg.fr>
12208 Add h/w watchpoint support to x86-linux, win32-i386.
12209 * Makefile.in (SFILES): Add i386-low.c
12210 (i386_low_h): Define.
12211 (i386-low.o): Add dependencies.
12212 (linux-x86-low.o): Add i386-low.h dependency.
12213 (win32-i386-low.o): Ditto.
12214 * i386-low.c: New file.
12215 * i386-low.h: New file.
12216 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12217 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12218 * linux-low.c (linux_add_process): Initialize arch_private.
12219 (linux_remove_process): Free arch_private.
12220 (add_lwp): Initialize arch_private.
12221 (delete_lwp): Free arch_private.
12222 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12224 * linux-low.h (process_info_private): New member arch_private.
12225 (lwp_info): New member arch_private.
12226 (linux_target_ops): New members new_process, new_thread,
12228 (ptid_of): New macro.
12229 * linux-x86-low.c: Include stddef.h, i386-low.h.
12230 (arch_process_info): New struct.
12231 (arch_lwp_info): New struct.
12232 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12233 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12234 (i386_dr_low_get_status): New function.
12235 (x86_insert_point, x86_remove_point): New functions.
12236 (x86_stopped_by_watchpoint): New function.
12237 (x86_stopped_data_address): New function.
12238 (x86_linux_new_process, x86_linux_new_thread): New functions.
12239 (x86_linux_prepare_to_resume): New function.
12240 (the_low_target): Add entries for insert_point, remove_point,
12241 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12243 * server.c (debug_hw_points): New global.
12244 (monitor_show_help): Document set debug-hw-points.
12245 (handle_query): Process "set debug-hw-points".
12246 * server.h (debug_hw_points): Declare.
12247 (paddress): Declare.
12248 * utils.c (NUMCELLS, CELLSIZE): New macros.
12249 (get_sell, xsnprintf, paddress): New functions.
12250 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12251 remove_point, stopped_by_watchpoint, stopped_data_address.
12252 * win32-i386-low.c: Include i386-low.h.
12253 (debug_reg_state): Replaces dr.
12254 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12255 (i386_dr_low_get_status): New function.
12256 (i386_insert_point, i386_remove_point): New functions.
12257 (i386_stopped_by_watchpoint): New function.
12258 (i386_stopped_data_address): New function.
12259 (i386_initial_stuff): Update.
12260 (get_thread_context,set_thread_context,i386_thread_added): Update.
12261 (the_low_target): Add entries for insert_point,
12262 remove_point, stopped_by_watchpoint, stopped_data_address.
12263 * win32-low.c (win32_insert_watchpoint): New function.
12264 (win32_remove_watchpoint): New function.
12265 (win32_stopped_by_watchpoint): New function.
12266 (win32_stopped_data_address): New function.
12267 (win32_target_ops): Add entries for insert_watchpoint,
12268 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12269 * win32-low.h (win32_target_ops): New members insert_point,
12270 remove_point, stopped_by_watchpoint, stopped_data_address.
12272 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12274 * server.c (process_serial_event): Re-return unsupported, not
12275 error, if the type isn't recognized. Re-allow supporting only
12276 insert or remove packets. Also call require_running for
12277 breakpoints. Add missing break statement to default case. Tidy.
12278 * target.h (struct target_ops): Rename insert_watchpoint to
12279 insert_point, and remove_watchpoint to remove_point.
12281 * linux-low.h (struct linux_target_ops): Likewise.
12282 * linux-low.c (linux_insert_watchpoint): Rename to ...
12283 (linux_insert_point): ... this. Adjust.
12284 (linux_remove_watchpoint): Rename to ...
12285 (linux_remove_point): ... this. Adjust.
12286 (linux_target_ops): Adjust.
12287 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12288 (cris_insert_point): ... this.
12289 (cris_remove_watchpoint): Rename to ...
12290 (cris_remove_point): ... this.
12291 (the_low_target): Adjust.
12293 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12295 * server.c (handle_v_kill): Pass signal_pid to
12296 kill_inferior if multi_process is zero.
12298 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12300 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12301 * target.h (target_ops): Comment for *_watchpoint to make it clear
12302 the functions can get types '0' and '1'.
12304 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12306 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12307 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12308 * regcache.c (get_regcache): Likewise.
12309 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12310 * win32-low.c (child_fetch_inferior_registers): Remove check for
12313 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12314 Pedro Alves <pedro@codesourcery.com>
12316 * target.h (struct target_ops) <supports_multi_process>: New
12318 (target_supports_multi_process): New.
12319 * server.c (handle_query): Even if GDB reports support, only
12320 enable multi-process if the target also supports it. Report
12321 multi-process support only if the target backend supports it.
12322 * linux-low.c (linux_supports_multi_process): New function.
12323 (linux_target_ops): Install it as target_supports_multi_process
12326 2009-05-24 Doug Evans <dje@google.com>
12328 Global renaming of find_thread_pid to find_thread_ptid.
12329 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12330 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12331 All callers updated.
12333 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12334 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12337 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12338 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12339 (linux_resume_one_lwp): Ditto.
12341 2009-05-23 Doug Evans <dje@google.com>
12343 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12344 from struct inferior_list_entry * to struct lwp_info *.
12345 All callers updated.
12347 2009-05-13 Doug Evans <dje@google.com>
12349 * linux-x86-low.c: Don't include assert.h.
12350 (x86_siginfo_fixup): Use fatal, not assert.
12351 (x86_arch_setup): Fix comment.
12353 2009-05-12 Doug Evans <dje@google.com>
12355 Biarch support for i386/amd64 gdbserver.
12356 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12357 Add linux-x86-low.c.
12358 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12359 (linux-x86-low.o): Add.
12360 * linux-x86-64-low.c: Delete.
12361 * linux-i386-low.c: Delete.
12362 * linux-x86-low.c: New file.
12363 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12365 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12367 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12368 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12369 (linux_child_pid_to_exec_file): New function.
12370 (elf_64_header_p, elf_64_file_p): New functions.
12371 (siginfo_fixup): New function.
12372 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12373 give target a chance to convert layout.
12374 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12375 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12377 2009-05-07 Doug Evans <dje@google.com>
12379 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12380 (regsets_store_inferior_registers): Ditto.
12382 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12386 * linux-low.c (must_set_ptrace_flags): Delete.
12387 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12389 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12390 `lwp->must_set_ptrace_flags' instead.
12391 (linux_wait_for_event_1): Set ptrace options here.
12392 (linux_wait_1): ... not here.
12394 2009-04-30 Doug Evans <dje@google.com>
12396 * inferiors.c (started_inferior_callback): New function.
12397 (attached_inferior_callback): New function.
12398 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12399 * server.c (print_started_pid, print_attached_pid): New functions.
12400 (detach_or_kill_for_exit): New function.
12401 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12402 * server.h (have_started_inferiors_p): Declare.
12403 (have_attached_inferiors_p): Declare.
12405 * inferiors.c (remove_process): Fix memory leak, free process.
12406 * linux-low.c (linux_remove_process): New function.
12407 (linux_kill): Call it instead of remove_process.
12408 (linux_detach, linux_wait_1): Ditto.
12410 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12412 * configure.srv: Add x86 Windows CE target.
12414 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12416 * inferiors.c (get_thread_process): Make global.
12417 * server.h (get_thread_process): Add prototype.
12418 * thread-db.c (find_one_thread): Use get_thread_process
12419 instead of current_process.
12420 (thread_db_get_tls_address): Do not crash if called when
12421 thread layer is not yet initialized.
12423 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12425 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12426 * spu-low.c (current_tid): Rename to ...
12427 (current_ptid): ... this.
12428 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12429 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12430 ptid_get_lwp (current_ptid) instead of current_tid.
12431 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12432 instead of current_tid. Use find_process_pid to verify pid
12433 argument is valid. Pass proper argument to remove_process.
12434 (spu_thread_alive): Compare current_ptid instead of current_tid.
12435 (spu_resume): Likewise.
12437 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12439 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12442 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12444 Implement the multiprocess extensions, and add linux multiprocess
12447 * server.h (ULONGEST): Declare.
12448 (struct ptid, ptid_t): New.
12449 (minus_one_ptid, null_ptid): Declare.
12450 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12451 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12452 (struct inferior_list_entry): Change `id' type from unsigned from
12454 (struct sym_cache, struct breakpoint, struct
12455 process_info_private): Forward declare.
12456 (struct process_info): Declare.
12457 (current_process): Declare.
12458 (all_processes): Declare.
12459 (initialize_inferiors): Declare.
12460 (add_thread): Adjust to use ptid_t.
12461 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12462 (add_process, remove_process, find_thread_pid): Declare.
12463 (find_inferior_id): Adjust to use ptid_t.
12464 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12465 (multi_process): Declare.
12466 (push_event): Adjust to use ptid_t.
12467 (read_ptid, write_ptid): Declare.
12468 (prepare_resume_reply): Adjust to use ptid_t.
12469 (clear_symbol_cache): Declare.
12470 * inferiors.c (all_processes): New.
12471 (null_ptid, minus_one_ptid): New.
12472 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12473 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12474 (add_thread): Change unsigned long to ptid. Remove gdb_id
12476 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12477 (gdb_id_to_thread): Rename to ...
12478 (find_thread_pid): ... this. Change unsigned long to ptid.
12479 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12480 (loaded_dll, pull_pid_from_list): Adjust.
12481 (add_process, remove_process, find_process_pid)
12482 (get_thread_process, current_process, initialize_inferiors): New.
12483 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12484 (struct target_waitstatus) <related_pid>: Ditto.
12485 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12486 return type to int.
12487 (struct target_ops) <join>: Add `pid' argument.
12488 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12489 (struct target_ops) <wait>: Add `ptid' field. Change return type
12491 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12492 (mywait): Add `ptid' argument. Change return type to ptid_t.
12493 (target_pid_to_str): Declare.
12494 * target.c (set_desired_inferior): Adjust to use ptids.
12495 (mywait): Add new `ptid' argument. Adjust.
12496 (target_pid_to_str): New.
12497 * mem-break.h (free_all_breakpoints): Declare.
12498 * mem-break.c (breakpoints): Delelete.
12499 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12500 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12501 to use per-process breakpoint list.
12502 (free_all_breakpoints): New.
12503 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12504 (symbol_cache, all_symbols_looked_up): Delete.
12506 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12508 (prepare_resume_reply): Change ptid argument's type from unsigned
12509 long to ptid_t. Adjust. Implement W;process and X;process.
12510 (free_sym_cache, clear_symbol_cache): New.
12511 (look_up_one_symbol): Adjust to per-process symbol cache. *
12512 * server.c (cont_thread, general_thread, step_thread): Change type
12514 (attached): Delete.
12515 (multi_process): New.
12516 (last_ptid): Change type to ptid_t.
12517 (struct vstop_notif) <ptid>: Change type to ptid_t.
12518 (queue_stop_reply, push_event): Change `ptid' argument's type to
12520 (discard_queued_stop_replies): Add `pid' argument.
12521 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12522 changes. Don't reference the `attached' global.
12523 (attach_inferior): Adjust to mywait interface changes.
12524 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12525 features. Handle and report "multiprocess+". Handle
12527 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12529 (handle_v_kill): New.
12530 (handle_v_stopped): Adjust to use target_pid_to_str.
12531 (handle_v_requests): Allow multiple attaches and runs when
12532 multiprocess extensions are in effect. Handle "vKill".
12533 (myresume): Adjust to use ptids.
12534 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12535 (handle_status): Adjust to discard_queued_stop_replies interface
12537 (first_thread_of, kill_inferior_callback)
12538 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12539 (main): Call initialize_inferiors. Adjust to use ptids, killing
12540 and detaching from all inferiors. Handle multiprocess packet
12542 * linux-low.h: Include gdb_proc_service.h.
12543 (struct process_info_private): New.
12544 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12545 <lwpid_of>: Use ptid_get_lwp.
12546 (get_lwp_thread): Adjust.
12547 (struct lwp_info): Add `dead' member.
12548 (find_lwp_pid): Declare.
12549 * linux-low.c (thread_db_active): Delete.
12550 (new_inferior): Adjust comment.
12551 (inferior_pid): Delete.
12552 (linux_add_process): New.
12553 (handle_extended_wait): Adjust.
12554 (add_lwp): Change unsigned long to ptid.
12555 (linux_create_inferior): Add process to processes table. Adjust
12556 to use ptids. Don't set new_inferior here.
12557 (linux_attach_lwp): Rename to ...
12558 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12559 it. Adjust to use ptids.
12560 (linux_attach_lwp): New.
12561 (linux_attach): Add process to processes table. Don't set
12563 (struct counter): New.
12564 (second_thread_of_pid_p, last_thread_of_process_p): New.
12565 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12566 multiple processes.
12567 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12568 processes. Remove process from process table.
12569 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12570 to multiple processes.
12571 (any_thread_of): New.
12572 (linux_detach): Add `pid' argument, and handle it. Remove process
12573 from processes table.
12574 (linux_join): Add `pid' argument. Handle it.
12575 (linux_thread_alive): Change unsighed long argument to ptid_t.
12576 Consider dead lwps as not being alive.
12577 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12578 threads we're not interested in.
12579 (same_lwp, find_lwp_pid): New.
12580 (linux_wait_for_lwp): Change `pid' argument's type from int to
12582 (linux_wait_for_event): Rename to ...
12583 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12584 from int to ptid_t. Adjust.
12585 (linux_wait_for_event): New.
12586 (linux_wait_1): Add `ptid' argument. Change return type to
12587 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12588 that exit from the process table.
12589 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12591 (mark_lwp_dead): New.
12592 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12593 stopping all threads, mark its main lwp as dead.
12594 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12596 (fetch_register, usr_store_inferior_registers)
12597 (regsets_fetch_inferior_registers)
12598 (regsets_store_inferior_registers, linux_read_memory)
12599 (linux_write_memory): Inline `inferior_pid'.
12600 (linux_look_up_symbols): Adjust to use per-process
12601 `thread_db_active'.
12602 (linux_request_interrupt): Adjust to use ptids.
12603 (linux_read_auxv): Inline `inferior_pid'.
12604 (initialize_low): Don't reference thread_db_active.
12605 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12606 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12607 (ps_getpid): Return the pid of the current inferior.
12608 * thread-db.c (proc_handle, thread_agent): Delete.
12609 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12611 (find_one_thread): Change argument type to ptid_t. Adjust to
12613 (maybe_attach_thread): Adjust to per-process data and ptids.
12614 (thread_db_find_new_threads): Ditto.
12615 (thread_db_init): Ditto.
12616 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12617 processes table. Adjust to use ptids.
12618 (spu_kill, spu_detach): Adjust interface. Remove process from
12620 (spu_join, spu_thread_alive): Adjust interface.
12621 (spu_wait): Adjust interface. Remove process from processes
12622 table. Adjust to use ptids.
12623 * win32-low.c (current_inferior_tid): Delete.
12624 (current_inferior_ptid): New.
12625 (debug_event_ptid): New.
12626 (thread_rec): Take a ptid. Adjust.
12627 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12628 (child_delete_thread): Ditto.
12629 (do_initial_child_stuff): Add `attached' argument. Add process to
12631 (child_fetch_inferior_registers, child_store_inferior_registers):
12633 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12634 (win32_attach): Pass 1 to do_initial_child_stuff.
12635 (win32_kill): Adjust interface. Remove process from processes
12637 (win32_detach): Ditto.
12638 (win32_join): Adjust interface.
12639 (win32_thread_alive): Take a ptid.
12640 (win32_resume): Adjust to use ptids.
12641 (get_child_debug_event): Ditto.
12642 (win32_wait): Adjust interface. Remove exiting process from
12645 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12647 Non-stop mode support.
12649 * server.h (non_stop): Declare.
12650 (gdb_client_data, handler_func): Declare.
12651 (delete_file_handler, add_file_handler, start_event_loop):
12653 (handle_serial_event, handle_target_event, push_event)
12654 (putpkt_notif): Declare.
12655 * target.h (enum resume_kind): New.
12656 (struct thread_resume): Replace `step' field by `kind' field.
12657 (TARGET_WNOHANG): Define.
12658 (struct target_ops) <wait>: Add `options' argument.
12659 <supports_non_stop, async, start_non_stop>: New fields.
12660 (target_supports_non_stop, target_async): New.
12661 (start_non_stop): Declare.
12662 (mywait): Add `options' argument.
12663 * target.c (mywait): Add `options' argument. Print child exit
12664 notifications here.
12665 (start_non_stop): New.
12666 * server.c (non_stop, own_buf, mem_buf): New globals.
12667 (struct vstop_notif): New.
12668 (notif_queue): New global.
12669 (queue_stop_reply, push_event, discard_queued_stop_replies)
12670 (send_next_stop_reply): New.
12671 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12673 (attach_inferior): In non-stop mode, don't wait for the target
12675 (handle_general_set): Handle QNonStop.
12676 (handle_query): When handling qC, return the current general
12677 thread, instead of the first thread of the list.
12678 (handle_query): If the backend supports non-stop mode, include
12679 QNonStop+ in the qSupported query response.
12680 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12682 (handle_v_attach, handle_v_run): Handle non-stop mode.
12683 (handle_v_stopped): New.
12684 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12685 (myresume): Adjust to use resume_kind. Handle non-stop.
12686 (queue_stop_reply_callback): New.
12687 (handle_status): Handle non-stop mode.
12688 (main): Clear non_stop flag on reconnection. Use the event-loop.
12689 Refactor serial protocol handling from here ...
12690 (process_serial_event): ... to this new function. When GDB
12691 selects any thread, select one here. In non-stop mode, wait until
12692 GDB acks all pending events before exiting.
12693 (handle_serial_event, handle_target_event): New.
12694 * remote-utils.c (remote_open): Install remote_desc in the event
12696 (remote_close): Remove remote_desc from the event loop.
12697 (putpkt_binary): Rename to...
12698 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12699 (putpkt_binary): New as wrapper around putpkt_binary_1.
12700 (putpkt_notif): New.
12701 (prepare_resume_reply): In non-stop mode, don't change the
12703 * event-loop.c: New.
12704 * Makefile.in (OBJ): Add event-loop.o.
12705 (event-loop.o): New rule.
12707 * linux-low.h (pid_of): Moved here.
12709 (get_lwp_thread): Use lwpid_of.
12710 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12711 * linux-low.c (pid_of): Delete.
12712 (inferior_pid): Use lwpid_of.
12713 (linux_event_pipe): New.
12714 (target_is_async_p): New.
12716 (handle_extended_wait): Use lwpid_of.
12717 (add_lwp): Don't set lwpid field.
12718 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12719 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12720 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12721 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12722 first. Adjust to linux_wait_for_event interface changes. Use
12724 (linux_detach): Don't delete the main lwp here.
12725 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12726 (status_pending_p): Don't consider explicitly suspended lwps.
12727 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12728 pointer. Add OPTIONS argument. Change return type to int. Use
12729 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12730 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12731 pointer. Add status pointer argument. Return a pid instead of a
12732 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12733 changes. In non-stop mode, don't switch to a random thread.
12734 (linux_wait): Rename to...
12735 (linux_wait_1): ... this. Add target_options argument, and handle
12736 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12737 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12738 clean exit and signal exit code. Don't stop all threads in
12739 non-stop mode. In all-stop mode, only stop all threads when
12740 reporting a stop to GDB. Handle explicit thread stop requests.
12741 (async_file_flush, async_file_mark): New.
12743 (send_sigstop): Use lwpid_of.
12744 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12745 interface changes. In non-stop mode, don't switch to a random
12747 (linux_resume_one_lwp): Use lwpid_of.
12748 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12749 (linux_resume_one_thread): ... this. Handle resume_stop. In
12750 non-stop mode, don't look for pending flag in all threads.
12751 (resume_status_pending_p): Don't consider explicitly suspended
12753 (my_waitpid): Reimplement. Emulate __WALL.
12754 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12756 (sigchld_handler, linux_supports_non_stop, linux_async)
12757 (linux_start_non_stop): New.
12758 (linux_target_ops): Register linux_supports_non_stop, linux_async
12759 and linux_start_non_stop.
12760 (initialize_low): Install SIGCHLD handler.
12761 * thread-db.c (thread_db_create_event, find_one_thread)
12762 (thread_db_get_tls_address): Use lwpid_of.
12763 * win32-low.c (win32_detach): Adjust to use resume_kind.
12764 (win32_wait): Add `options' argument.
12765 * spu-low.c (spu_resume): Adjust to use resume_kind.
12766 (spu_wait): Add `options' argument.
12768 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12770 Decouple target code from remote protocol.
12772 * target.h (enum target_waitkind): New.
12773 (struct target_waitstatus): New.
12774 (struct target_ops) <wait>: Return an unsigned long. Take a
12775 target_waitstatus pointer instead of a char pointer.
12776 (mywait): Likewise.
12777 * target.c (mywait): Change prototype to return an unsigned long.
12778 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12779 * server.h (thread_from_wait, old_thread_from_wait): Delete
12781 (prepare_resume_reply): Change prototype to take a
12783 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12784 (last_status, last_ptid): New.
12785 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12786 pid instead of a signal.
12787 (attach_inferior): Remove "status" and "signal" parameters.
12789 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12791 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12792 (handle_v_requests, myresume): Remove "status" and "signal"
12793 parameters. Adjust.
12794 (handle_status): New.
12795 (main): Delete local `status'. Adjust.
12796 * remote-utils.c: Include target.h.
12797 (prepare_resume_reply): Change prototype to take a
12798 target_waitstatus. Adjust.
12800 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12802 * spu-low.c (spu_wait): Adjust.
12803 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12805 (win32_wait): Adjust.
12807 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12809 * target.h (struct thread_resume): Delete leave_stopped member.
12810 (struct target_ops): Add a `n' argument to the `resume' callback.
12811 * server.c (start_inferior): Adjust.
12812 (handle_v_cont, myresume): Adjust.
12813 * linux-low.c (check_removed_breakpoint): Adjust to resume
12814 interface change, and to removed leave_stopped field.
12815 (resume_ptr): Delete.
12816 (struct thread_resume_array): New.
12817 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12818 resume interface change.
12819 (linux_continue_one_thread, linux_queue_one_thread)
12820 (resume_status_pending_p): Check if the resume field is NULL
12821 instead of checking the leave_stopped member.
12822 (linux_resume): Adjust to the target resume interface change.
12823 * spu-low.c (spu_resume): Adjust to the target resume interface
12825 * win32-low.c (win32_detach, win32_resume): Ditto.
12827 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12829 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12831 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12833 (linux_continue_one_thread): Only preserve the stepping flag if
12834 there's a pending breakpoint.
12836 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12838 * server.c (main): After the inferior having exited, call
12839 remote_close before exiting gdbserver.
12841 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12843 Fix size of FPSCR in Power 7 processors.
12844 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12845 (PPC_FEATURE_HAS_DFP): New #define.
12846 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12849 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12851 * server.c (handle_query) Whitespace and formatting.
12853 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12855 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12856 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12857 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12858 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12859 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12860 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12861 Makefile.in, configure.ac: Fix whitespace throughout.
12862 * configure: Regenerate.
12864 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12866 * inferiors.c (find_inferior): Make it safe for the callback
12867 function to delete the currently iterated inferior.
12869 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12871 * Makefile.in (linuw_low_h): Move higher.
12872 (thread-db.o): Depend on $(linux_low_h).
12874 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12876 Rename "process" to "lwp" throughout.
12878 * linux-low.c (all_processes): Rename to...
12879 (all_lwps): ... this.
12880 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12881 (add_process): Rename to ...
12882 (add_lwp): ... this. Adjust.
12883 (linux_create_inferior): Adjust.
12884 (linux_attach_lwp): Adjust.
12885 (linux_attach): Adjust.
12886 (linux_kill_one_process): Rename to ...
12887 (linux_kill_one_lwp): ... this. Adjust.
12888 (linux_kill): Adjust.
12889 (linux_detach_one_process): Rename to ...
12890 (linux_detach_one_lwp): ... this. Adjust.
12891 (linux_detach): Adjust.
12892 (check_removed_breakpoint): Adjust.
12893 (status_pending_p): Adjust.
12894 (linux_wait_for_process): Rename to ...
12895 (linux_wait_for_lwp): ... this. Adjust.
12896 (linux_wait_for_event): Adjust.
12897 (send_sigstop): Adjust.
12898 (wait_for_sigstop): Adjust.
12899 (stop_all_processes): Rename to ...
12900 (stop_all_lwps): ... this.
12901 (linux_resume_one_process): Rename to ...
12902 (linux_resume_one_lwp): ... this. Adjust.
12903 (linux_set_resume_request, linux_continue_one_thread)
12904 (linux_queue_one_thread, resume_status_pending_p)
12905 (usr_store_inferior_registers, regsets_store_inferior_registers)
12906 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12908 * linux-low.h (get_process): Rename to ...
12909 (get_lwp): ... this. Adjust.
12910 (get_thread_process): Rename to ...
12911 (get_thread_lwp): ... this. Adjust.
12912 (get_process_thread): Rename to ...
12913 (get_lwp_thread): ... this. Adjust.
12914 (struct process_info): Rename to ...
12915 (struct lwp_info): ... this.
12916 (all_processes): Rename to ...
12917 (all_lwps): ... this.
12918 * proc-service.c (ps_lgetregs): Adjust.
12919 * thread-db.c (thread_db_create_event, find_one_thread)
12920 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12922 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12924 * server.c (handle_query): Handle "qAttached".
12926 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12928 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12929 GPLv3, update license URL.
12931 2009-03-01 Doug Evans <dje@google.com>
12933 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12934 (server_h): Add gdb_signals.h.
12935 (signals.o): Update.
12936 * server.h (target_signal_from_host,target_signal_to_host_p)
12937 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12939 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12941 * remote-utils.c (getpkt): Also generate remote-debug
12942 information if noack_mode is set.
12944 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12946 * server.c (handle_query): Report qXfer:siginfo:read and
12947 qXfer:siginfo:write as supported and handle them.
12948 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12949 * linux-low.c (linux_xfer_siginfo): New.
12950 (linux_target_ops): Set it.
12952 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12954 * server.c (gdbserver_usage): Mention --remote-debug.
12955 (main): Accept '--remote-debug' switch.
12957 2009-01-18 Doug Evans <dje@google.com>
12959 * regcache.c (new_register_cache): No need to check result of xcalloc.
12960 * server.c (handle_search_memory): Back out calls to xmalloc,
12961 result is checked and error is returned to user upon failure.
12962 (handle_query): Ditto. Add more checks for result of malloc.
12963 (handle_v_cont): Check result of malloc, report error back to
12965 (handle_v_run): Ditto. Call freeargv.
12966 * server.h (freeargv): Declare.
12967 * utils.c (freeargv): New fn.
12969 2009-01-15 Doug Evans <dje@google.com>
12971 * gdbreplay.c (perror_with_name): Make arg const char *.
12972 * server.h (target_signal_to_name): Make return type const char *.
12973 * thread-db.c (thread_db_err_str): Make return type const char *.
12974 * utils.c (perror_with_name): Make arg const char *.
12976 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12978 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12979 when handling a EXIT_PROCESS_DEBUG_EVENT.
12981 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12983 * gdbreplay.c (gdbreplay_version): Update copyright year.
12984 * server.c (gdbserver_version): Likewise.
12986 2009-01-05 Doug Evans <dje@google.com>
12988 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12989 (handle_extended_wait): Improve comment.
12991 2008-12-13 Doug Evans <dje@google.com>
12993 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12994 * server.h (ATTR_MALLOC): New macro.
12995 (xmalloc,xcalloc,xstrdup): Declare.
12996 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12997 * inferiors.c: Ditto.
12998 * linux-low.c: Ditto.
12999 * mem-break.c: Ditto.
13000 * regcache.c: Ditto.
13001 * remote-utils.c: Ditto.
13004 * win32-low.c: Ditto.
13006 2008-12-12 Doug Evans <dje@google.com>
13008 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13009 in debugging printf.
13011 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13013 2008-12-09 Doug Evans <dje@google.com>
13015 * linux-low.h (struct process_info): Delete member tid, unused.
13016 * thread-db.c (find_one_thread): Update.
13017 (maybe_attach_thread): Update.
13019 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13021 * target.h (struct target_ops): Add qxfer_osdata member.
13022 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13024 (linux_qxfer_osdata): New functions.
13025 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13027 * server.c (handle_query): Handle "qXfer:osdata:read:".
13028 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13029 (buffer_xml_printf): New functions.
13030 * server.h (struct buffer): New.
13031 (buffer_grow_str, buffer_grow_str0): New macros.
13032 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13033 (buffer_xml_printf): Declare.
13035 2008-11-24 Doug Evans <dje@google.com>
13037 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13039 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13041 * server.c (handle_v_run): Always use the supplied argument list.
13043 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13045 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13046 (xtensa_regmap_table): Add entry for scompare1.
13048 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13050 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13051 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13052 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13053 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13054 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13055 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13056 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13057 XML target descriptions.
13058 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13059 when inferior is running on an ISA 2.05 or later processor. Add
13060 special case to return offset for full 64-bit slot of FPSCR when
13063 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13065 * Makefile.in (SFILES, clean): Added sparc64 files.
13066 (reg-sparc64.o, reg-sparc64.c): New.
13067 * configure.srv (sparc*-*-linux*): New configuration.
13068 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13069 syscall arguments for SPARC.
13070 (regsets_store_inferior_registers): Likewise.
13071 * linux-sparc-low.c: New file.
13073 2008-10-21 Doug Evans <dje@google.com>
13075 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13076 (READLINE_DIR,READLINE_DEP): Delete.
13077 (INTERNAL_CFLAGS): Update.
13078 (LINTFLAGS): Update.
13080 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13082 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13083 whole argv from the last run, not just argv[0].
13085 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13087 * regcache.c (new_register_cache): Return NULL if the register
13088 cache size isn't known yet.
13089 (free_register_cache): Avoid dereferencing a NULL regcache.
13091 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13093 * configure.srv: Merge MIPS and MIPS64.
13095 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13097 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13099 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13101 * Makefile.in: Add required vsx dependencies.
13103 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13104 Declare init_registers_powerpc_vsx32l.
13105 Declare init_registers_powerpc_vsx64l.
13106 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13107 (ppc_arch_setup): Check for VSX in hwcap.
13108 (ppc_fill_vsxregset): New function.
13109 (ppc_store_vsxregset): New function.
13110 Add new VSX entry in regset_info target_regsets.
13112 * configure.srv: Add new VSX dependencies.
13114 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13116 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13117 (remote_open): Set or clear transport_is_reliable.
13118 (putpkt_binary): Don't expect acks in noack mode.
13119 (getpkt): Don't send ack/nac in noack mode.
13120 * server.c (handle_general_set): Handle QStartNoAckMode.
13121 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13123 (main): Reset noack_mode on every connection.
13124 * server.h (noack_mode): Declare.
13126 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13128 * Makefile.in (GDBREPLAY_OBS): New variable.
13129 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13131 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13132 Daniel Jacobowitz <dan@codesourcery.com>
13134 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13135 (usr_store_inferior_registers): Likewise.
13136 (regsets_store_inferior_registers): Likewise.
13138 2008-07-31 Rolf Jansen <rj@surtec.com>
13139 Pedro Alves <pedro@codesourcery.com>
13141 * configure.ac: Check for memmem declaration.
13142 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13143 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13144 (disable_packet_qfThreadInfo): Unconditionally compile.
13145 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13146 * configure, config.in: Regenerate.
13148 2008-07-28 Doug Kwan <dougkwan@google.com>
13150 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13151 (linux_write_memory): Remove declaration of errno.
13153 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13155 * linux-low.c (handle_extended_wait): Do not use "status"
13156 variable uninitialized.
13158 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13160 * server.c (handle_v_attach): Inhibit reporting dll changes.
13162 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13164 * remote-utils.c (prepare_resume_reply): If requested, don't
13165 output "thread:TID" in the T stop reply.
13167 * server.c (disable_packet_vCont, disable_packet_Tthread)
13168 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13169 (handle_query): If requested, disable support for qC, qfThreadInfo
13171 (handle_v_requests): If requested, disable support for vCont.
13172 (gdbserver_show_disableable): New.
13173 (main): Handle --disable-packet and --disable-packet=LIST.
13175 * server.h (disable_packet_vCont, disable_packet_Tthread)
13176 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13178 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13180 * server.c (gdbserver_usage): Mention --version.
13182 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13184 * Makefile.in (gdbreplay.o): New rule.
13186 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13188 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13189 message, not gdbserver.
13191 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13192 Nathan Sidwell <nathan@codesourcery.com>
13193 Joseph Myers <joseph@codesourcery.com>
13195 * acinclude.m4: Include ../../config/acx.m4.
13196 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13197 * configure, config.in: Regenerate.
13198 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13199 * server.c (gdbserver_version): Print PKGVERSION.
13200 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13201 (main): Adjust gdbserver_usage calls.
13202 * gdbreplay.c (version, host_name): Add declarations.
13203 (gdbreplay_version, gdbreplay_usage): New.
13204 (main): Accept --version and --help options.
13206 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13208 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13209 (arm_breakpoint_at): Handle Thumb.
13210 (the_low_target): Add comment.
13212 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13214 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13216 2008-05-09 Doug Evans <dje@google.com>
13218 * server.h (decode_search_memory_packet): Declare.
13219 * remote-utils.c (decode_search_memory_packet): New fn.
13220 * server.c (handle_search_memory_1): New fn.
13221 (handle_search_memory): New fn.
13222 (handle_query): Process qSearch:memory packets.
13224 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13226 * regcache.c (registers_length): Remove.
13227 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13228 full register packet.
13229 * regcache.h (registers_length): Remove prototype.
13230 * server.h (PBUFSIZ): Define to 16384.
13232 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13234 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13235 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13236 powerpc-64l.o, and powerpc-altivec64l.o.
13237 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13238 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13239 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13240 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13241 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13244 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13245 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13246 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13247 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13248 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13249 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13250 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13251 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13252 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13253 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13256 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13257 (init_registers_powerpc_32l): ... this new prototype.
13258 (init_registers_powerpc_32): Remove, replace by ...
13259 (init_registers_powerpc_altivec32l): ... this new prototype.
13260 (init_registers_powerpc_e500): Remove, replace by ...
13261 (init_registers_powerpc_e500l): ... this new prototype.
13262 (init_registers_ppc64): Remove, replace by ...
13263 (init_registers_powerpc_64l): ... this new prototype.
13264 (init_registers_powerpc_64): Remove, replace by ...
13265 (init_registers_powerpc_altivec64l): ... this new prototype.
13266 (ppc_num_regs): Set to 73.
13267 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13268 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13269 (ppc_cannot_store_register): Handle orig_r3 and trap.
13270 (ppc_arch_setup): Update init_registers_... calls.
13271 (ppc_fill_gregset): Handle orig_r3 and trap.
13273 * inferiors.c (clear_inferiors): Reset current_inferior.
13275 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13277 * acinclude.m4: Add override.m4.
13278 * configure: Regenerate.
13280 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13282 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13283 initial call to init_register_ppc64.
13285 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13287 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13288 single powerpc*-*-linux* case.
13289 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13291 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13293 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13294 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13296 * linux-ppc-low.c: Include <elf.h>.
13297 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13298 (ppc_hwcap): New global variable.
13299 (ppc_regmap): Remove __SPE__ #ifdef sections.
13300 (ppc_regmap_e500): New global variable.
13301 (ppc_cannot_store_register): Update __SPE__ special case.
13302 (ppc_get_hwcap): New function.
13303 (ppc_arch_setup): Use it to determine whether inferior supports
13304 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13305 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13306 Do not access registers if target does not support AltiVec.
13307 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13308 Do not access registers if target does not support SPE.
13309 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13311 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13313 * linux-low.c (disabled_regsets, num_regsets): New.
13314 (use_regsets_p): Delete.
13315 (linux_wait_for_process): Clear disabled_regsets.
13316 (regsets_fetch_inferior_registers): Check and set it.
13317 (regsets_store_inferior_registers): Likewise.
13318 (linux_fetch_registers, linux_store_registers): Do not use
13320 (initialize_low): Allocate disabled_regsets.
13322 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13324 * Makefile.in (LIBOBJS): New.
13325 (OBS): Use LIBOBJS.
13326 (memmem.o): New rule.
13327 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13328 * configure: Regenerated.
13330 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13332 * server.c (handle_query): Never return "unsupported" for
13333 qXfer:features:read queries.
13335 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13337 * server.c (get_features_xml): Fix inverted condition.
13338 (handle_query): Always support qXfer:feature:read.
13340 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13342 * server.c (wrapper_argv): New.
13343 (start_inferior): Handle wrapper_argv. If set, expect an extra
13345 (gdbserver_usage): Document --wrapper.
13346 (main): Parse --wrapper.
13348 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13350 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13351 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13352 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13353 (ppc_set_pc): Likewise.
13354 (ppc_arch_setup): New function.
13355 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13356 of collect_register.
13357 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13359 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13361 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13362 instead of linux-ppc64-low.o.
13363 * linux-ppc64-low.c: Remove file.
13364 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13365 (linux-ppc64-low.o): Remove rule.
13367 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13368 (init_registers_powerpc_64): Likewise.
13369 (ppc_regmap): Conditionally define depending on __powerpc64__.
13370 (ppc_cannot_store_register): Do not special-case "fpscr" when
13371 compiled on __powerpc64__.
13372 (ppc_collect_ptrace_register): New function.
13373 (ppc_supply_ptrace_register): New function.
13374 (ppc_breakpoint): Change type to "unsigned int".
13375 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13376 (the_low_target): Conditionally provide initializers for the
13377 arch_setup member depending on __powerpc64__. Install
13378 collect_ptrace_register and supply_ptrace_register members.
13380 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13382 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13383 * server.c (gdbserver_xmltarget): Define.
13384 (get_features_xml): Use it to replace "target.xml" and arch_string.
13386 * configure.srv: Remove srv_xmltarget. Add XML files that were
13387 mentioned there to srv_xmlfiles instead. Remove conditional tests
13388 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13389 srv_xmlfiles and srv_regobj to include all possible choices.
13390 * configure.ac (srv_xmltarget): Remove.
13391 (srv_xmlfiles): Do not add "target.xml".
13392 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13393 checks for supplementary target information.
13394 * configure: Regenerate.
13395 * Makefile.in (XML_TARGET): Remove.
13396 (target.xml): Remove rule.
13397 (clean): Do not clean up target.xml.
13398 (.PRECIOUS): Do not mention target.xml.
13400 * target.h (struct target_ops): Remove arch_string member.
13401 * linux-low.c (linux_arch_string): Remove.
13402 (linux_target_ops): Remove arch_string initializer.
13403 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13404 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13405 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13406 * spu-low.c (spu_arch_string): Remove.
13407 (spu_target_ops): Remove arch_string initializer.
13408 * win32-low.c (win32_arch_string): Remove.
13409 (win32_target_ops): Remove arch_string initializer.
13410 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13411 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13412 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13414 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13416 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13417 by collect_ptrace_register and supply_ptrace_register hooks.
13418 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13419 instead of checking for the_low_target.left_pad_xfer.
13420 (usr_store_inferior_registers): Use collect_ptrace_register callback
13421 instead of checking for the_low_target.left_pad_xfer.
13423 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13424 (s390_supply_ptrace_register): Likewise.
13425 (s390_fill_gregset): Call s390_collect_ptrace_register.
13426 (the_low_target): Update.
13428 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13429 (ppc_supply_ptrace_register): Likewise.
13430 (the_low_target): Update.
13432 * linux-i386-low.c (the_low_target): Update.
13433 * linux-x86-64-low.c (the_low_target): Update.
13435 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13437 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13438 reg-s390.o and reg-s390x.o.
13440 * linux-low.c (new_inferior): New global variable.
13441 (linux_create_inferior, linux_attach): Set it.
13442 (linux_wait_for_process): Call the_low_target.arch_setup after the
13443 target has stopped for the first time.
13444 (initialize_low): Do not call the_low_target.arch_setup.
13446 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13447 (s390_set_pc): Likewise.
13448 (s390_arch_setup): New function.
13449 (the_low_target): Use s390_arch_setup as arch_setup routine.
13451 * regcache.c (realloc_register_cache): New function.
13452 (set_register_cache): Call it for each existing regcache.
13454 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13456 * server.h (init_registers): Remove prototype.
13458 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13459 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13460 instead of init_registers ().
13461 * linux-arm-low.c (init_registers_arm): Add prototype.
13462 (init_registers_arm_with_iwmmxt): Likewise.
13463 (the_low_target): Add initializer for arch_setup field.
13464 * linux-cris-low.c (init_registers_cris): Add prototype.
13465 (the_low_target): Add initializer for arch_setup field.
13466 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13467 (the_low_target): Add initializer for arch_setup field.
13468 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13469 (the_low_target): Add initializer for arch_setup field.
13470 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13471 (the_low_target): Add initializer for arch_setup field.
13472 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13473 (the_low_target): Add initializer for arch_setup field.
13474 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13475 (the_low_target): Add initializer for arch_setup field.
13476 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13477 (init_registers_mips64_linux): Likewise.
13478 (the_low_target): Add initializer for arch_setup field.
13479 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13480 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13481 (the_low_target): Add initializer for arch_setup field.
13482 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13483 (init_registers_powerpc_64): Likewise.
13484 (the_low_target): Add initializer for arch_setup field.
13485 * linux-s390-low.c (init_registers_s390): Add prototype.
13486 (init_registers_s390x): Likewise.
13487 (the_low_target): Add initializer for arch_setup field.
13488 * linux-sh-low.c (init_registers_sh): Add prototype.
13489 (the_low_target): Add initializer for arch_setup field.
13490 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13491 (the_low_target): Add initializer for arch_setup field.
13492 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13493 (the_low_target): Add initializer for arch_setup field.
13495 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13496 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13497 instead of init_registers ().
13498 * win32-arm-low.c (init_registers_arm): Add prototype.
13499 (the_low_target): Add initializer for arch_setup field.
13500 * win32-i386-low.c (init_registers_i386): Add prototype.
13501 (the_low_target): Add initializer for arch_setup field.
13503 * spu-low.c (init_registers_spu): Add prototype.
13504 (initialize_low): Call initialie_registers_spu () instead of
13505 initialize_registers ().
13507 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13509 * server.c (handle_v_requests): When handling the vRun and vAttach
13510 packets, if already debugging a process, don't kill it. Return an
13513 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13515 * server.c (handle_query): Correct length check.
13517 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13519 * win32-low.c (do_initial_child_stuff): Add process handle
13520 parameter. Set current_process_handle and current_process_id from the
13521 parameters. Clear globals.
13522 (win32_create_inferior): Don't set current_process_handle and
13523 current_process_id here. Instead pass them on the call to
13524 do_initial_child_stuff.
13525 (win32_attach): Likewise.
13526 (win32_clear_inferiors): New.
13527 (win32_kill): Don't close the current process handle or the
13528 current thread handle here. Instead call win32_clear_inferiors.
13529 (win32_detach): Don't open a new handle to the process. Call
13530 win32_clear_inferiors.
13531 (win32_join): Don't rely on current_process_handle; open a new
13532 handle using the process id.
13533 (win32_wait): Call win32_clear_inferiors when the inferior process
13536 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13538 * server.c (monitor_show_help): Add "exit".
13540 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13542 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13543 (clean): Add reg-xtensa.c.
13544 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13545 * configure.srv (xtensa*-*-linux*) New target.
13546 * linux-xtensa-low.c: New.
13547 * xtensa-xtregs.c: New.
13549 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13551 * hostio.c: Don't include errno.h.
13552 (errno_to_fileio_errno): Move to hostio-errno.
13553 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13554 error number outputting to the target->hostio_last_error callback.
13555 (hostio_packet_error): Use FILEIO_EINVAL directly.
13556 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13557 calls to hostio_error.
13558 * hostio-errno.c: New.
13559 * server.h (hostio_last_error_from_errno): Declare.
13560 * target.h (target_ops): Add hostio_last_error member.
13561 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13562 as hostio_last_error handler.
13563 * spu-low.c (spu_target_ops): Likewise.
13564 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13565 (wince_hostio_last_error): New functions.
13566 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13567 as hostio_last_error handler.
13568 (win32_target_ops) [!_WIN32_WCE]: Register
13569 hostio_last_error_from_errno as hostio_last_error handler.
13570 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13571 (hostio-errno.o): New rule.
13572 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13573 * configure.srv (srv_hostio_err_objs): New variable. Default to
13575 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13576 * configure: Regenerate.
13578 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13580 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13581 (linux_kill, linux_detach): Clean up the process list.
13582 * remote-utils.c (remote_open): Improve port number parsing.
13583 (putpkt_binary, input_interrupt): Only send interrupts if the target
13585 * server.c (extended_protocol): Make static.
13586 (attached): Define earlier.
13587 (exit_requested, response_needed, program_argv): New variables.
13588 (target_running): New.
13589 (start_inferior): Clear attached here.
13590 (attach_inferior): Set attached here.
13591 (require_running): Define.
13592 (handle_query): Use require_running and target_running. Implement
13594 (handle_v_attach, handle_v_run): New.
13595 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13596 (gdbserver_usage): Update.
13597 (main): Redo argument parsing. Handle --debug and --multi. Handle
13598 --attach along with other options or after the port. Save
13599 program_argv. Support no initial program. Resynchronize
13600 communication with GDB after an error. Handle "monitor exit".
13601 Use require_running and target_running. Always allow the extended
13602 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13603 restart in extended mode.
13604 * README: Refer to the GDB manual. Update --attach usage.
13606 2007-12-20 Andreas Schwab <schwab@suse.de>
13608 * linux-low.c (STACK_SIZE): Define.
13609 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13610 (linux_test_for_tracefork): Likewise.
13612 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13614 * linux-low.c (linux_wait_for_event): Update messages. Do not
13615 reinsert auto-delete breakpoints.
13616 * mem-break.c (struct breakpoint): Change return type of handler to
13618 (set_breakpoint_at): Update handler type.
13619 (reinsert_breakpoint_handler): Return 1 instead of calling
13621 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13623 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13624 * mem-break.h (set_breakpoint_at): Update handler type.
13625 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13626 * win32-low.c (auto_delete_breakpoint): New.
13627 (get_child_debug_event): Use it.
13629 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13631 * configure.ac: Check for pread and pwrite.
13632 * hostio.c (handle_pread): Fall back to lseek and read.
13633 (handle_pwrite): Fall back to lseek and write.
13634 * config.in, configure: Regenerated.
13636 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13638 * server.c (myresume): Add own_buf argument.
13639 (main): Update calls.
13641 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13643 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13644 * remote-utils.c (remote_open): Do not call disable_async_io.
13645 (block_async_io): Delete.
13646 (unblock_async_io): Make static.
13647 (initialize_async_io): New.
13648 * server.c (handle_v_cont): Handle async I/O here.
13649 (myresume): Likewise. Move other common resume tasks here...
13650 (main): ... from here. Call initialize_async_io. Disable async
13651 I/O before the main loop.
13652 * server.h (initialize_async_io): Declare.
13653 (block_async_io, unblock_async_io): Delete prototypes.
13654 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13656 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13658 * remote-utils.c (readchar): Allow binary data in received messages.
13660 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13662 * win32-low.c (attaching): New global.
13663 (win32_create_inferior): Clear the `attaching' global.
13664 (win32_attach): Set the `attaching' global.
13665 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13666 attaching. Only set a breakpoint at the entry point if not
13669 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13671 * server.c (main): Don't report dll events on the initial
13672 connection on attaches.
13674 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13676 * server.c (main): Relax numerical bases supported for the pid of
13677 the --attach command line argument.
13679 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13681 * win32-low.c (win32_attach): Call OpenProcess before
13682 DebugActiveProcess, not after. Add last error output to error
13685 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13687 * win32-low.c (win32_get_thread_context)
13688 (win32_set_thread_context): New functions.
13689 (thread_rec): Use win32_get_thread_context.
13690 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13691 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13694 2007-12-03 Leo Zayas
13695 Pedro Alves <pedro_alves@portugalmail.pt>
13697 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13699 (child_add_thread): Minor cleanup.
13700 (child_continue): Resume artificially suspended threads before
13701 calling ContinueDebugEvent.
13702 (suspend_one_thread): New.
13703 (fake_breakpoint_event): New.
13704 (get_child_debug_event): Change return type to int. Check here if
13705 gdb sent an interrupt request. If a soft interrupt was requested,
13706 fake a breakpoint event. Return 0 if there is no event to handle,
13708 (win32_wait): Don't check here if gdb sent an interrupt request.
13709 Ensure there is a valid event to handle.
13710 (win32_request_interrupt): Add soft interruption method as last
13713 2007-12-03 Leo Zayas
13714 Pedro Alves <pedro_alves@portugalmail.pt>
13716 * win32-low.h (win32_thread_info): Add descriptions to the
13717 structure members. Replace `suspend_count' counter by a
13719 * win32-low.c (thread_rec): Update condition of when to get the
13720 context from the inferior. Rely on ContextFlags being set if it
13721 has already been retrieved. Only suspend the inferior thread if
13722 we haven't already. Warn if that fails.
13723 (continue_one_thread): s/suspend_count/suspended/. Only call
13724 ResumeThread once. Warn if that fails.
13726 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13728 * win32-low.c (win32_wait): Don't read from the inferior when it
13729 has already exited.
13731 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13733 * Makefile.in (win32_low_h): New variable.
13734 (win32-low.o): Add dependency on $(win32_low_h).
13735 (win32-arm-low.o, win32-i386-low.o): New rules.
13737 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13739 * hostio.c: Correct copyright year.
13741 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13743 * Makefile.in (OBS): Add hostio.o.
13744 (hostio.o): New rule.
13745 * server.h (handle_vFile): Declare.
13746 * hostio.c: New file.
13747 * server.c (handle_v_requests): Take packet_len and new_packet_len
13748 for binary packets. Call handle_vFile.
13749 (main): Update call to handle_v_requests.
13751 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13753 * linux-low.c: Include <sched.h>.
13755 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13757 * linux-low.c (linux_tracefork_grandchild): New.
13758 (linux_tracefork_child): Use clone.
13759 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13761 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13763 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13765 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13767 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13769 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13771 * inferiors.c (change_inferior_id): Delete.
13772 (add_pid_to_list, pull_pid_from_list): New.
13773 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13774 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13775 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13776 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13777 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13778 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13779 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13780 (using_threads): Always set to 1.
13781 (handle_extended_wait): New.
13782 (add_process): Do not set TID.
13783 (linux_create_inferior): Set must_set_ptrace_flags.
13784 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13785 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13786 (linux_thread_alive): Rename TID argument to LWPID.
13787 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13788 (linux_wait_for_event): Do not use TID or check using_threads. Update
13789 call to dead_thread_notify. Call handle_extended_wait.
13790 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13791 (send_sigstop): Delete sigstop_sent.
13792 (wait_for_sigstop): Avoid TID.
13793 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13794 (linux_test_for_tracefork): New.
13795 (linux_lookup_signals): Use thread_db_active and
13796 linux_supports_tracefork_flag.
13797 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13798 * linux-low.h (get_process_thread): Avoid TID.
13799 (struct process_ifo): Move thread_known and tid to the end. Remove
13801 (linux_attach_lwp, thread_db_init): Update prototypes.
13802 * server.h (change_inferior_id): Delete prototype.
13803 (add_pid_to_list, pull_pid_from_list): New prototypes.
13804 * thread-db.c (thread_db_use_events): New.
13805 (find_first_thread): Rename to...
13806 (find_one_thread): ...this. Update callers and messages. Do not
13807 call fatal. Check thread_db_use_events. Do not call
13808 change_inferior_id or new_thread_notify.
13809 (maybe_attach_thread): Update. Do not call new_thread_notify.
13810 (thread_db_init): Set thread_db_use_events. Check use_events.
13811 * utils.c (fatal, warning): Correct message prefix.
13813 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13815 * Makefile.in (clean): Remove new files.
13816 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13817 (powerpc-64.o, powerpc-64.c): New rules.
13818 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13819 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13821 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13823 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13824 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13825 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13826 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13827 (target_regsets): Add AltiVec and SPE register sets.
13828 * configure.ac: Check for AltiVec and SPE.
13829 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13830 (ppc_fill_vrregset, ppc_store_vrregset): New.
13831 (target_regsets): Add AltiVec register set.
13832 * configure: Regenerated.
13834 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13836 * linux-low.c (O_LARGEFILE): Define.
13837 (linux_read_memory): Use /proc/PID/mem.
13838 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13839 * configure, config.in: Regenerated.
13841 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13843 * linux-low.c (linux_wait_for_event): Do not pass signals while
13846 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13848 * win32-low.c (create_process): New.
13849 (win32_create_inferior): Use create_process instead of
13850 CreateProcess. If create_process failed retry appending an ".exe"
13851 suffix. Store the GetLastError result immediatelly after
13852 create_process calls and use it on the call to error.
13854 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13856 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13858 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13860 * configure.ac: Switch license to GPLv3.
13862 2007-08-01 Michael Snyder <msnyder@access-company.com>
13864 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13866 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13868 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13870 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13871 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13872 CloseToolhelp32Snapshot.
13873 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13874 CloseToolhelp32Snapshot.
13876 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13878 * server.c (main): Check for inferior exit before main loop.
13880 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13882 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13883 instead of on tmp_desc.
13885 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13886 Daniel Jacobowitz <dan@codesourcery.com>
13888 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13889 (add_thread): Minor cleanups.
13890 (clear_inferiors): Move lower in the file. Clear the DLL
13892 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13893 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13894 (xml_escape_text): New.
13895 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13897 (handle_v_cont): Report errors.
13898 (gdbserver_version): Update.
13899 (main): Correct size of own_buf. Do not report initial DLL events.
13900 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13901 (unloaded_dll, xml_escape_text): New.
13902 * win32-low.c (enum target_waitkind): Update comments.
13903 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13904 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13905 (win32_EnumProcessModules, win32_GetModuleInformation)
13906 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13907 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13908 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13909 (win32_Module32First, win32_Module32Next, load_toolhelp)
13910 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13911 (get_child_debug_event): Handle DLL events.
13912 (win32_wait): Likewise.
13914 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13916 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13917 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13919 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13921 * win32-low.c (handle_output_debug_string): Ignore event if not
13924 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13926 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13928 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13930 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13932 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13934 * inferiors.c (change_inferior_id): Add comment.
13935 * linux-low.c (check_removed_breakpoint): Add an early
13936 prototype. Improve debug output.
13937 (linux_attach): Doc update.
13938 (linux_detach_one_process, linux_detach): Clean up before releasing
13940 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13941 * linux-low.h (struct process_info): Doc improvement.
13942 * mem-break.c (delete_all_breakpoints): New.
13943 * mem-break.h (delete_all_breakpoints): New prototype.
13944 * thread-db.c (find_first_thread): New.
13945 (thread_db_create_event): Call it instead of
13946 thread_db_find_new_threads. Clean up unused variables.
13947 (maybe_attach_thread): Remove first thread handling.
13948 (thread_db_find_new_threads): Use find_first_thread.
13949 (thread_db_get_tls_address): Likewise.
13951 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13953 * thread-db.c (thread_db_find_new_threads): Add prototype.
13954 (thread_db_create_event): Check for the main thread before adding
13956 (maybe_attach_thread): Only enable event reporting if TID == 0.
13957 (thread_db_get_tls_address): Check for new threads.
13959 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13961 * linux-low.c (linux_create_inferior): Try execv before execvp.
13962 * spu-low.c (spu_create_inferior): Likewise.
13964 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13966 * linux-low.c (linux_create_inferior): Change execv to execvp.
13967 * spu-low.c (spu_create_inferior): Likewies.
13969 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13971 * Makefile.in (clean): Clean new files instead of deleted ones.
13972 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13973 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13975 * configure.srv: Specify XML files and new regformats for MIPS and
13977 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13978 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13979 an entry for the restart register.
13980 (mips_cannot_fetch_register, mips_cannot_store_register)
13981 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13982 register names to match the XML descriptions.
13983 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13984 restart register instead of $0.
13986 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13987 Markus Deuling <deuling@de.ibm.com>
13989 * remote-utils.c (decode_xfer_write): New function.
13990 * server.h (decode_xfer_write): Add prototype.
13991 * server.c (handle_query): Add PACKET_LEN argument. Support
13992 qXfer:spu:read and qXfer:spu:write packets.
13993 (main): Pass packet_len to handle_query.
13994 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13995 * target.h (target_ops): Add qxfer_spu.
13997 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13999 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14000 accessing non-seekable spufs files.
14002 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14004 * server.c (handle_query): Add reply for qC packet.
14006 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14007 Leo Zayas <lerele@champenstudios@com>
14009 * server.h (check_remote_input_interrupt_request): New function.
14010 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14011 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14012 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14013 (check_remote_input_interrupt_request): New function.
14014 * server.h (check_remote_input_interrupt_request): Declare.
14015 * win32-low.c (winapi_DebugBreakProcess,
14016 winapi_GenerateConsoleCtrlEvent): New typedefs.
14017 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14019 (win32_wait): Check for remote interrupt request
14020 with check_remote_input_interrupt_request.
14021 (win32_request_interrupt): New function.
14022 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14024 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14026 * win32-low.c (debug_registers_changed,
14027 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14028 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14029 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14030 (thread_rec): Get context using the low target.
14031 (child_add_thread): Call thread_added on the low target,
14032 which does the same thing.
14034 (do_initial_child_stuff): Remove debug registers references.
14035 Set context using the low target. Resume threads after
14036 setting the contexts.
14037 (child_continue): Remove dead variable. Remove debug
14038 registers references.
14039 (child_fetch_inferior_registers): Go through the low target.
14040 (do_child_store_inferior_registers): Remove.
14041 (child_store_inferior_registers): Go through the low target.
14042 (win32_resume): Remove debug registers references.
14043 Set context using the low target.
14044 (handle_exception): Change return type to void. Don't record
14045 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14046 first chance exception.
14047 (get_child_debug_event): Change return type to void. Remove
14048 goto loop. Always return after waiting for debug event.
14049 (win32_wait): Convert to switch statement. Handle spurious
14052 * win32-i386-low.c (debug_registers_changed,
14053 debug_registers_used): New.
14054 (initial_stuff): Rename to ...
14055 (i386_initial_stuff): ... this. Clear debug registers
14057 (store_debug_registers): Delete.
14058 (i386_get_thread_context): New.
14059 (load_debug_registers): Delete.
14060 (i386_set_thread_context): New.
14061 (i386_thread_added): New.
14062 (single_step): Rename to ...
14063 (i386_single_step): ... this.
14064 (do_fetch_inferior_registers): Rename to ...
14065 (i386_fetch_inferior_register): ... this.
14066 (i386_store_inferior_register): New.
14067 (the_low_target): Adapt to new interface.
14069 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14070 (arm_get_thread_context): New.
14071 (arm_set_thread_context): New.
14073 (do_fetch_inferior_registers): Rename to ...
14074 (arm_fetch_inferior_register): ... this.
14075 (arm_store_inferior_register): New.
14076 (arm_wince_breakpoint): Reimplement as unsigned long.
14077 (arm_wince_breakpoint_len): Define.
14078 (the_low_target): Adapt to new interface.
14080 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14081 load_debug_registers. Add get_thread_context, set_thread_context,
14082 thread_added and store_inferior_register. Rename
14083 fetch_inferior_registers to fetch_inferior_register.
14084 (regptr): Remove declaration.
14086 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14088 * linux-low.c (linux_detach): Change return type to int. Return 0.
14089 * spu-low.c (spu_detach): Likewise.
14091 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14093 * target.h (target_ops): Change return type of detach to int.
14095 (join_inferior): New.
14096 * server.c (main): Don't skip detach support on mingw32.
14097 If the inferior doesn't support detaching return error.
14098 Call join_inferior instead of using waitpid.
14099 * linux-low.c (linux_join): New.
14100 (linux_target_op): Add linux_join.
14101 * spu-low.c (spu_join): New.
14102 (spu_target_ops): Add spu_join.
14103 * win32-low.c (win32_detach): Adapt to new interface.
14104 Reopen current_process_handle before detaching. Issue a child
14105 resume before detaching.
14107 (win32_target_op): Add win32_join.
14109 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14111 * win32-low.c (win32-attach): Fix return value.
14112 * target.h (target_ops): Describe ATTACH return values.
14114 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14116 * win32-low.c (GETPROCADDRESS): Define.
14117 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14118 (winapi_DebugSetProcessKillOnExit): Likewise.
14119 (win32_create_inferior): Force usage of ansi CreateProcessA.
14120 (win32_attach): Use GETPROCADDRESS.
14121 (win32_detach): Likewise.
14123 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14125 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14127 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14129 * win32-low.c: Commit leftover changes from 2007-03-29.
14131 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14133 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14134 fields short instead of int. Add explicit padding.
14135 (i387_cache_to_fsave): Remove unnecessary casts.
14136 (i387_fsave_to_cache): Doc fix.
14137 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14139 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14141 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14142 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14144 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14146 * configure.srv (arm*-*-mingw32ce*): Move near the other
14149 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14151 * configure.ac: Add errno checking.
14152 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14153 sys/file.h and malloc.h.
14154 (AC_CHECK_DECLS): Add perror.
14155 (srv_mingwce): Handle.
14156 * configure.srv (i[34567]86-*-cygwin*): Add
14157 win32-i386-low.o to srv_tgtobj.
14158 (i[34567]86-*-mingw*): Likewise.
14159 (arm*-*-mingw32ce*): Add case.
14160 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14161 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14162 [__MINGW32CE__] (strerror): New function.
14163 [__MINGW32CE__] (errno): Define to GetLastError.
14164 [__MINGW32CE__] (COUNTOF): New macro.
14165 (remote_open): Remove extra close call.
14166 * mem-break.c (delete_breakpoint_at): New function.
14167 * mem-break.h (delete_breakpoint_at): Declare.
14168 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14169 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14170 [USE_WIN32API] (read, write): Add char* casts.
14171 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14172 * server.h: Include wincecompat.h on Windows CE.
14173 [HAVE_ERRNO_H]: Check.
14174 (perror): Declare if not declared.
14175 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14176 (perror_with_name): Remove errno declaration.
14177 * wincecompat.h: New.
14178 * wincecompat.c: New.
14179 * win32-low.h: New.
14180 * win32-arm-low.c: New.
14181 * win32-i386-low.c: New.
14182 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14183 (OUTMSG2): Make it safe.
14185 (COUNTOF): New macro.
14186 (NUM_REGS): Get it from the low target.
14187 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14188 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14189 (thread_rec): Let low target handle debug registers.
14190 (child_add_thread): Likewise.
14191 (child_init_thread_list): Likewise.
14192 (continue_one_thread): Likewise.
14194 (do_child_fetch_inferior_registers): Move to ...
14195 * win32-i386-low.c: ... here, and rename to ...
14196 (do_fetch_inferior_registers): ... this.
14197 * win32-low.c (child_fetch_inferior_registers):
14198 Go through the low target.
14199 (do_child_store_inferior_registers): Use regptr.
14200 (strwinerror): New function.
14201 (win32_create_inferior): Handle Windows CE.
14202 Use strwinerror instead of strerror on Windows error
14203 codes. Add program to the error output.
14204 Don't close the main thread handle on Windows CE.
14205 (win32_attach): Use coredll.dll on Windows CE.
14206 (win32_kill): Close current process and current
14208 (win32_detach): Use coredll.dll on Windows CE.
14209 (win32_resume): Let low target handle debug registers, and
14211 (handle_exception): Add/Remove initial breakpoint. Avoid
14212 non-existant WSTOPSIG on Windows CE.
14213 (win32_read_inferior_memory): Cast to remove warning.
14214 (win32_arch_string): Go through the low target.
14215 (initialize_low): Call set_breakpoint_data with the low
14216 target's breakpoint.
14217 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14218 FOP_REGNUM, mappings): Move to ...
14219 * win32-i386-low.c: ... here.
14220 * win32-low.c (win32_thread_info): Move to ...
14221 * win32-low.h: ... here.
14222 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14223 win32-arm-low.c and wincecompat.c.
14224 (all:): Add $EXEEXT.
14225 (install-only:): Likewise.
14226 (gdbserver:): Likewise.
14227 (gdbreplay:): Likewise.
14228 * config.in: Regenerate.
14229 * configure: Regenerate.
14231 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14233 * win32-low.c: Rename typedef thread_info to
14234 win32_thread_info throughout.
14236 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14238 * win32-i386-low.c: Rename to ...
14239 * win32-low.c: ... this.
14240 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14241 * Makefile.in: Likewise.
14243 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14245 * remote-utils.c (monitor_output): Constify msg parameter.
14246 * server.h (monitor_output): Likewise.
14247 * win32-i386-low.c (handle_output_debug_string): New.
14248 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14249 handle_output_debug_string.
14250 (get_child_debug_event): Likewise.
14252 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14254 * server.c (main): Correct strtoul check.
14256 2007-03-27 Jon Ringle <jon@ringle.org>
14258 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14260 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14262 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14264 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14266 * terminal.h: Check HAVE_SGTTY_H.
14268 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14270 * remote-utils.c (remote_open): Print out the assigned port number.
14272 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14274 * remote-utils.c (monitor_output): New function.
14275 * server.c (debug_threads): Define here.
14276 (monitor_show_help): New function.
14277 (handle_query): Handle qRcmd.
14278 (main): Do not handle 'd' packet.
14279 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14280 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14283 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14285 * Makefile.in (EXEEXT): New.
14286 (clean): Use $(EXEEXT).
14288 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14290 * target.h (target_ops): Rename send_signal to request_interrupt,
14291 and remove enum target_signal parameter.
14292 * linux-low.c (linux_request_interrupt): Rename from
14293 linux_send_signal, and always send SIGINT.
14294 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14295 and always send SIGINT.
14296 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14298 (input_interrupt): Likewise.
14300 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14302 * server.c (get_features_xml): Check if target implemented
14304 * win32-i386-low.c (win32_arch_string): New.
14305 (win32_target_ops): Add win32_arch_string as arch_string member.
14307 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14309 * spu-low.c (spu_arch_string): New.
14310 (spu_target_ops): Add spu_arch_string.
14312 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14314 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14315 * configure.ac: Do not check for terminal.h.
14316 * configure, config.in: Regenerated.
14318 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14320 * Makefile.in (OBS): Add $(XML_BUILTIN).
14321 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14323 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14324 (arm-with-iwmmxt.c): New.
14325 * config.in, configure: Regenerate.
14326 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14327 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14328 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14329 (arm*-*-linux*): Add iWMMXt and regset support.
14330 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14331 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14332 (arm_store_wmmxregset, target_regsets): New.
14333 * server.c (get_features_xml): Take annex argument. Check builtin
14335 (handle_query): Handle multiple annexes.
14337 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14339 * remote-utils.c [USE_WIN32API] (read, write): Define.
14340 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14343 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14345 * linux-i386-low.c (the_low_target): Set arch_string.
14346 * linux-x86-64-low.c (the_low_target): Likewise.
14347 * linux-low.c (linux_arch_string): New.
14348 (linux_target_ops): Add it.
14349 * linux-low.h (struct linux_target_ops): Add arch_string.
14350 * server.c (write_qxfer_response): Use const void * for DATA.
14351 (get_features_xml): New.
14352 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14353 * target.h (struct target_ops): Add arch_string method.
14355 2007-01-03 Denis Pilat <denis.pilat@st.com>
14356 Daniel Jacobowitz <dan@codesourcery.com>
14358 * linux-low.c (linux_kill): Handle being called with no threads.
14359 * win32-i386-low.c (win32_kill): Likewise.
14360 (get_child_debug_event): Clear current_process_handle.
14362 2006-12-30 Denis PILAT <denis.pilat@st.com>
14363 Daniel Jacobowitz <dan@codesourcery.com>
14365 * remote-utils.c (remote_open): Check the type of specified
14366 serial port devices before opening them.
14367 * server.c (main): Kill the inferior if an error occurs during
14368 the first remote_open.
14370 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14372 * README: Update supported targets.
14374 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14376 * Makefile.in (clean): Remove reg-mips64.c.
14377 (reg-mips64.c, reg-mips64.o): New rules.
14378 * configure.srv: Handle mips64. Include regset support for mips.
14379 * linux-mips-low.c (union mips_register): New.
14380 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14381 (mips_breakpoint, mips_breakpoint_at): Use int.
14382 (mips_collect_register, mips_supply_register)
14383 (mips_collect_register_32bit, mips_supply_register_32bit)
14384 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14385 (mips_store_fpregset, target_regsets): New.
14386 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14388 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14390 * configure.srv: Add target "spu*-*-*".
14391 * Makefile.in (clean): Remove reg-spu.c.
14392 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14393 * spu-low.c: New file.
14395 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14397 * configure.ac: Correct td_thr_tls_get_addr test.
14398 * configure: Regenerated.
14400 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14402 * linux-low.c (linux_wait_for_event): Reformat. Use the
14403 pass_signals array.
14404 * remote-utils.c (decode_address_to_semicolon): New.
14405 * server.c (pass_signals, handle_general_set): New.
14406 (handle_query): Mention QPassSignals for qSupported.
14407 (main): Call handle_general_set.
14408 * server.h (pass_signals, decode_address_to_semicolon): New.
14410 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14412 * server.c (handle_query): Correct error handling for read_auxv.
14414 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14416 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14417 and srv_linux_thread_db to yes.
14418 * linux-s390-low.c (s390_fill_gregset): New function.
14419 (target_regsets): Define data structure.
14421 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14423 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14424 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14425 * config.in, configure: Regenerated.
14426 * inferiors.c (gdb_id_to_thread): New function.
14427 (gdb_id_to_thread_id): Use it.
14428 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14429 * linux-low.h (struct process_info): Add th member.
14430 (thread_db_get_tls_address): New prototype.
14431 * remote-utils.c (decode_address): Make non-static.
14432 * server.c (handle_query): Handle qGetTLSAddr.
14433 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14434 * target.h (struct target_ops): Add get_tls_address.
14435 * thread-db.c (maybe_attach_thread): Save the thread handle.
14436 (thread_db_get_tls_address): New.
14438 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14440 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14441 (linux_resume_one_process): Take a siginfo_t *. Update all
14442 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14443 (struct pending_signals): Add a siginfo_t.
14444 (linux_wait_for_process): Always set last_status.
14445 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14446 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14447 * linux-low.h (struct process_info): Add last_status.
14449 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14451 * remote-utils.c (try_rle): New function.
14452 (putpkt_binary): Use it.
14454 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14456 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14457 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14458 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14459 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14460 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14463 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14465 * server.c (terminal_fd): New variable.
14466 (old_foreground_pgrp): Likewise.
14467 (restore_old_foreground_pgrp): New function.
14468 (start_inferior): Record the terminal file descriptor in terminal_fd
14469 and its original foreground group in old_foreground_pgrp. Register
14470 restore_old_foreground_pgrp with atexit().
14472 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14474 * server.c (handle_query): Correct qPart to qXfer.
14476 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14478 * configure.ac: Check for more headers which are missing on
14479 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14480 * configure.srv: Add Cygwin and mingw32.
14481 * remote-utils.c: Don't include headers unconditionally which
14482 are missing on mingw32. Include <winsock.h> for mingw32.
14483 (remote_open): Adjust for mingw32 support. Flush
14484 standard error after writing to it.
14485 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14486 (unblock_async_io, enable_async_io, disable_async_io)
14487 (readchar, getpkt): Update for Winsock support.
14488 (prepare_resume_reply): Expect a protocol signal number.
14489 * server.c: Disable <sys/wait.h> on mingw32.
14490 (start_inferior): Adjust for mingw32 support. Flush
14491 standard error after writing to it.
14492 (attach_inferior): Likewise. Use protocol signal
14494 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14496 * win32-i386-low.c: New file.
14497 * Makefile.in (XM_CLIBS): Set.
14498 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14499 (win32-i386-low.o): New dependency rule.
14500 * linux-low.c (linux_wait): Use target signal numbers.
14501 * target.h (struct target_ops): Doc fix.
14502 * server.h (target_signal_to_name): New prototype.
14503 * gdbreplay.c: Don't include headers unconditionally which
14504 are missing on mingw32. Include <winsock.h> for mingw32.
14505 (remote_close, remote_open): Adjust for Winsock support.
14506 * configure, config.in: Regenerated.
14508 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14510 * server.c (decode_xfer_read, write_qxfer_response): New.
14511 (handle_query): Take a packet length argument. Handle
14512 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14513 the qSupported response.
14514 (main): Update call to handle_query.
14516 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14518 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14519 (putpkt_binary): Renamed from putpkt and adjusted for binary
14521 (putpkt): New wrapper for putpkt_binary.
14522 (readchar): Don't mask off the high bit.
14523 (decode_X_packet): New function.
14524 * server.c (main): Call putpkt_binary if a handler sets the packet
14525 length. Save the length of the incoming packet. Handle 'X'.
14526 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14528 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14530 * server.c (handle_query): Handle qSupported.
14532 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14534 * remote-utils.c (all_symbols_looked_up): New variable.
14535 (look_up_one_symbol): Check it.
14536 * server.h (look_up_one_symbol): New declaration.
14537 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14539 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14541 * Makefile.in (linux-arm-low.o): Update dependencies.
14542 * linux-arm-low.c: Include "gdb_proc_service.h".
14543 (PTRACE_GET_THREAD_AREA): Define.
14544 (ps_get_thread_area): New function.
14546 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14548 * configure.srv (m68k*-*-uclinux*): New target.
14549 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14550 (linux_resume_one_process): Remove extraneous cast.
14551 (linux_read_offsets): New.
14552 (linux_target_op): Add linux_read_offsets on mmuless systems.
14553 * server.c (handle_query): Add qOffsets logic.
14554 * target.h (struct target_ops): Add read_offsets.
14556 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14558 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14559 (PTRACE_GET_THREAD_AREA): Define.
14560 (ps_get_thread_area): New function.
14561 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14562 (linux-x86-64-low.o): Update.
14564 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14566 * configure.ac: Remove checks for prfpregset_t.
14567 * gdb_proc_service.h: New file.
14568 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14569 new "gdb_proc_service.h".
14570 * proc-service.c: Likewise.
14571 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14572 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14573 * Makefile.in (gdb_proc_service_h): Updated.
14574 * configure, config.in: Regenerated.
14576 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14578 * remote-utils.c (prepare_resume_reply): Move declaration
14579 of gdb_id_from_wait to the top of the block.
14581 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14583 * linux-low.c (regsets_store_inferior_registers): Read the regset
14584 from the target before filling it.
14586 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14588 * server.c (attach_inferior): Return SIGTRAP for a successful
14591 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14593 * Makefile.in (OBS): Add version.o.
14594 (STAGESTUFF): Delete.
14595 (version.o): Add dependencies.
14596 (version.c): Replace rule.
14597 (clean): Remove version.c.
14598 * server.c (gdbserver_version): New.
14599 (gdbserver_usage): Use printf.
14600 (main): Handle --version and --help.
14601 * server.h (version, host_name): Add declarations.
14603 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14615 * linux-x86-64-low.c:
14617 * linux-s390-low.c:
14618 * linux-ppc64-low.c:
14620 * linux-mips-low.c:
14621 * linux-m68k-low.c:
14622 * linux-m32r-low.c:
14625 * linux-ia64-low.c:
14626 * linux-i386-low.c:
14627 * linux-crisv32-low.c:
14639 * gdbserver.1: Add (C) after Copyright. Update the FSF
14642 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14644 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14645 (arm_breakpoint_at): Recognize both breakpoints.
14646 (the_low_target): Use the correct breakpoint instruction.
14648 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14650 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14651 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14652 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14653 (the_low_target): Update.
14655 2005-10-25 Andreas Schwab <schwab@suse.de>
14657 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14659 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14660 (ia64_num_regs): Reduce to 462.
14662 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14664 * acinclude.m4: Correct quoting.
14665 * aclocal.m4: Regenerated.
14667 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14668 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14669 (thread_db_init): Call thread_db_err_str.
14670 * configure.ac: Check for TD_VERSION.
14671 * config.in, configure: Regenerated.
14673 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14675 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14677 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14679 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14680 is not available. Define HAVE_PTRACE_GETREGS if it is.
14681 * config.in, configure: Regenerated.
14682 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14683 * linux-i386-low.c, linux-m68k-low.c: Update to use
14684 HAVE_PTRACE_GETREGS.
14685 * linux-low.c (regsets_fetch_inferior_registers)
14686 (regsets_store_inferior_registers): Only return 0 if we processed
14688 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14689 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14691 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14693 * inferiors.c (struct thread_info): Add gdb_id.
14694 (add_thread): Add gdb_id argument.
14695 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14696 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14697 calls to add_thread.
14698 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14699 * server.c (handle_query): Use thread_to_gdb_id.
14700 (handle_v_cont, main): Use gdb_id_to_thread_id.
14701 * server.h (add_thread): Update prototype.
14702 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14705 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14707 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14708 left-padded registers.
14709 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14710 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14712 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14714 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14715 * configure: Regenerate.
14716 * config.in: Regenerate.
14717 * server.h (NEED_DECLARATION_STRERROR):
14718 Replace with !HAVE_DECL_STRERROR.
14720 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14722 * linux-low.c (linux_wait, linux_send_signal): Don't test
14723 an unsigned long variable for > 0 if it could be MAX_ULONG.
14724 * server.c (myresume): Likewise.
14725 * target.c (set_desired_inferior): Likewise.
14727 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14729 * configure.ac: Simplify and improve check for socklen_t.
14730 * configure, config.in: Regenerate.
14732 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14734 * acconfig.h: Remove.
14735 * configure.ac: Add a test for socklen_t. Use three-argument
14736 AC_DEFINE throughout.
14737 * config.in: Regenerated using autoheader 2.59.
14738 * configure: Regenerated.
14740 * gdbreplay.c (socklen_t): Provide a default.
14741 (remote_open): Use socklen_t.
14742 * remote-utils.c (socklen_t): Provide a default.
14743 (remote_open): Use socklen_t.
14744 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14747 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14749 * linux-low.c (linux_read_memory, linux_write_memory)
14750 (linux_read_auxv): Likewise.
14751 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14752 (check_mem_write): Likewise.
14753 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14755 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14756 (registers_from_string, register_data): Likewise.
14757 * server.c (handle_query, main): Likewise.
14758 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14759 (decode_M_packet): Likewise.
14760 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14761 * target.h (struct target_ops): Update read_memory, write_memory,
14763 (read_inferior_memory, write_inferior_memory): Update.
14764 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14765 to unsigned char *.
14766 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14767 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14768 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14769 linux-s390-low.c, linux-sh-low.c: Update for changes in
14770 read_inferior_memory and the_low_target->breakpoint.
14772 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14774 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14775 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14776 * configure.srv: Add powerpc64-*-linux*.
14777 * linux-ppc64-low.c: New file.
14779 2005-05-23 Orjan Friberg <orjanf@axis.com>
14781 * linux-cris-low.c: New file with support for CRIS.
14782 * linux-crisv32-low.c: Ditto for CRISv32.
14783 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14784 (clean): Add reg-cris.c and reg-crisv32.c.
14785 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14786 reg-crisv32.o, and reg-crisv32.c to make rules.
14787 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14788 recognized targets.
14790 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14792 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14793 of sizeof (PTRACE_XFER_TYPE).
14794 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14796 2005-05-12 Orjan Friberg <orjanf@axis.com>
14798 * target.h (struct target_ops): Add insert_watchpoint,
14799 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14800 pointers for hardware watchpoint support.
14801 * linux-low.h (struct linux_target_ops): Ditto.
14802 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14803 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14804 to linux_target_ops.
14805 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14807 * server.c (main): Recognize 'Z' and 'z' packets.
14809 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14811 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14812 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14813 (the_low_target): Add new members.
14815 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14817 * proc-service.c (ps_lgetregs): Search all_processes instead of
14820 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14822 * server.c (start_inferior): Change return type to int.
14823 (attach_inferior): Change sigptr to int *.
14824 (handle_v_cont, handle_v_requests): Change signal to int *.
14825 (main): Change signal to int.
14827 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14829 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14830 * configure.srv: Add m32r*-*-linux*.
14831 * linux-m32r-low.c: New file.
14833 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14835 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14837 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14839 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14840 Take unsigned long arguments for PIDs.
14841 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14842 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14843 (wait_for_sigstop, linux_resume_one_process)
14844 (regsets_fetch_inferior_registers, linux_send_signal)
14845 (linux_read_auxv): Likewise. Update the types of variables holding
14846 PIDs. Update format string specifiers.
14847 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14848 * remote-utils.c (prepare_resume_reply): Likewise.
14849 * server.c (cont_thread, general_thread, step_thread)
14850 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14852 (handle_query): Update format specifiers.
14853 (handle_v_cont, main): Use strtoul for thread IDs.
14854 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14855 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14856 (general_thread, step_thread, thread_from_wait)
14857 (old_thread_from_wait): Update.
14858 * target.h (struct thread_resume): Use unsigned long for THREAD.
14859 (struct target_ops): Use unsigned long for arguments to attach and
14862 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14864 * acinclude.m4: Include bfd/bfd.m4 directly.
14865 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14866 <agriffis@toolchain.org>.
14867 * aclocal.m4, configure: Regenerated.
14869 2005-01-07 Andrew Cagney <cagney@gnu.org>
14871 * configure.ac: Rename configure.in, require autoconf 2.59.
14872 * configure: Re-generate.
14874 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14876 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14877 LIBS when finished.
14878 * aclocal.m4: Regenerated.
14879 * configure: Regenerated.
14881 2004-11-21 Andreas Schwab <schwab@suse.de>
14883 * linux-m68k-low.c (m68k_num_gregs): Define.
14884 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14885 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14886 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14887 (m68k_breakpoint_at): New. Add to the_low_target.
14889 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14890 srv_linux_thread_db to yes.
14892 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14894 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14895 (ARCH_SET_FS): Likewise.
14896 (ARCH_GET_FS): Likewise.
14897 (ARCH_GET_GS): Likewise.
14899 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14901 * linux-i386-low.c (ps_get_thread_area): New.
14902 * linux-x86-64-low.c (ps_get_thread_area): New.
14903 * linux-low.c: Include <sys/syscall.h>.
14904 (linux_kill_one_process): Don't kill the first thread here.
14905 (linux_kill): Kill the first thread here.
14906 (kill_lwp): New function.
14907 (send_sigstop, linux_send_signal): Use it.
14908 * proc-service.c: Clean up #ifdefs.
14909 (fpregset_info): Delete.
14910 (ps_lgetregs): Update and enable implementation.
14911 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14913 * remote-utils.c (struct sym_cache, symbol_cache): New.
14914 (input_interrupt): Print a clearer message.
14915 (async_io_enabled): New variable.
14916 (enable_async_io, disable_async_io): Use it. Update comments.
14917 (look_up_one_symbol): Use the symbol cache.
14918 * thread-db.c (thread_db_look_up_symbols): New function.
14919 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14921 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14923 * configure.in: Test for -rdynamic.
14924 * configure: Regenerated.
14925 * Makefile (INTERNAL_LDFLAGS): New.
14926 (gdbserver, gdbreplay): Use it.
14928 2004-09-02 Andrew Cagney <cagney@gnu.org>
14930 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14932 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14934 * linux-low.c (linux_wait): Clear all_processes list also.
14936 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14938 * linux-low.c: Include <errno.h>. Remove extern declaration of
14941 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14943 * gdbreplay.c, server.h, utils.c: Update copyright years.
14945 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14947 * server.c (main): Print child status or termination signal from
14948 variable 'signal', not 'sig'.
14950 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14952 * linux-low.c (linux_read_memory): Change return type to
14953 int. Check for and return error from ptrace().
14954 * target.c (read_inferior_memory): Change return type to int. Pass
14955 back return status from the_target->read_memory().
14956 * target.h (struct target_ops): Adapt *read_memory() prototype.
14958 (read_inferior_memory): Adapt prototype.
14959 * server.c (main): Return an error packet if
14960 read_inferior_memory() returns an error.
14962 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14964 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14965 Unify with other clean targets.
14967 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14969 * server.c (handle_v_cont): Call set_desired_inferior.
14971 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14973 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14975 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14977 * linux-low.c (linux_wait): Unblock async I/O.
14978 (linux_resume): Block and enable async I/O.
14979 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14980 * server.h (block_async_io, unblock_async_io): Add prototypes.
14982 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14984 * remote-utils.c (remote_open): Print a status notice after
14985 opening a TCP port.
14986 * server.c (attach_inferior): Print a status notice after
14989 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14991 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14993 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14995 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14997 * server.c, target.h: Update copyright years.
14999 2004-02-25 Roland McGrath <roland@redhat.com>
15001 * target.h (struct target_ops): New member `read_auxv'.
15002 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15003 * linux-low.c (linux_read_auxv): New function.
15004 (linux_target_ops): Initialize `read_auxv' member to that.
15006 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15008 Committed by Jim Blandy <jimb@redhat.com>.
15010 * linux-s390-low.c (s390_num_regs): Update.
15011 (s390_regmap): Remove control registers. Use __s390x__ predefine
15012 instead of GPR_SIZE to distiguish s390 and s390x targets.
15014 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15016 * linux-low.c: Update copyright year.
15017 (check_removed_breakpoint): Clear pending_is_breakpoint.
15018 (linux_set_resume_request, linux_queue_one_thread)
15019 (resume_status_pending_p): New functions.
15020 (linux_continue_one_thread): Use process->resume.
15021 (linux_resume): Only resume threads if there are no pending events.
15022 * linux-low.h (struct process_info): Add resume request
15025 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15027 * regcache.c (new_register_cache): Clear the allocated register
15028 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15030 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15032 * linux-low.c (linux_resume): Take a struct thread_resume *
15034 (linux_wait): Update call.
15035 (resume_ptr): New static variable.
15036 (linux_continue_one_thread): Renamed from
15037 linux_continue_one_process. Use resume_ptr.
15038 (linux_resume): Use linux_continue_one_thread.
15039 * server.c (handle_v_cont, handle_v_requests): New functions.
15040 (myresume): New function.
15041 (main): Handle 'v' case.
15042 * target.h (struct thread_resume): New type.
15043 (struct target_ops): Change argument of "resume" to struct
15045 (myresume): Delete macro.
15047 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15049 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15050 (uninstall): Support DESTDIR.
15052 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15054 * configure.srv: Add xscale*linux copy of arm*linux entry.
15056 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15058 * linux-arm-low.c (arm_reinsert_addr): New function.
15059 (the_low_target): Add arm_reinsert_addr.
15061 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15063 * mem-break.c: Remove whitespace at end of file.
15065 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15067 * configure.in: Check whether we need to prototype strerror.
15068 * server.h: Optionally prototype strerror.
15069 * gdbreplay.c (perror_with_name): Use strerror.
15070 * linux-low.c (linux_attach_lwp): Use strerror.
15071 * utils.c (perror_with_name): Use strerror.
15072 * config.in, configure: Regenerated.
15074 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15076 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15077 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15079 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15081 * Makefile.in (SFILES): Update.
15082 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15083 low-sun3.c: Remove files.
15085 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15087 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15088 (linux_detach_one_process, linux_detach): New functions.
15089 (linux_target_ops): Add linux_detach.
15090 * server.c (main): Handle 'D' packet.
15091 * target.h (struct target_ops): Add "detach" member.
15092 (detach_inferior): Define.
15094 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15096 From Kelley Cook <kelleycook@wideopenwest.com>:
15097 * configure.srv: Accept i[34567]86 variants.
15099 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15101 * linux-low.c (linux_wait_for_event): Correct comment typos.
15102 (linux_resume_one_process): Call check_removed_breakpoint.
15103 (linux_send_signal): New function.
15104 (linux_target_ops): Add linux_send_signal.
15105 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15107 * target.h (struct target_ops): Add send_signal.
15109 2003-05-29 Jim Blandy <jimb@redhat.com>
15111 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15112 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15113 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15114 away part of the register's value.
15116 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15118 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15119 (linux_wait_for_event, linux_init_signals): Likewise.
15121 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15123 * configure.in: Check for stdlib.h.
15124 * configure: Regenerated.
15125 * config.in: Regenerated.
15127 2003-01-04 Andreas Schwab <schwab@suse.de>
15129 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15131 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15133 * Makefile.in: Remove obsolete code.
15135 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15137 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15138 defined(PT_FPR0_HI).
15140 2002-11-17 Stuart Hughes <seh@zee2.com>
15142 * linux-arm-low.c (arm_num_regs): Increase.
15143 (arm_regmap): Include status register.
15145 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15147 * linux-low.c (register_addr): Remove incorrect -1 check.
15149 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15151 * linux-low.c (linux_create_inferior): Call setpgid. Return
15153 (unstopped_p, linux_signal_pid): Remove.
15154 (linux_target_ops): Remove linux_signal_pid.
15155 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15156 global instead of target method.
15157 * target.h (struct target_ops): Remove signal_pid. Update comment
15158 for create_inferior.
15159 * server.c (signal_pid): New variable.
15160 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15161 gdbserver. Set the child to be the foreground process group.
15162 (attach_inferior): Set signal_pid.
15164 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15166 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15168 2002-08-20 Jim Blandy <jimb@redhat.com>
15170 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15173 2002-08-01 Andrew Cagney <cagney@redhat.com>
15175 * Makefile.in: Make chill references obsolete.
15177 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15179 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15180 * configure: Regenerate.
15181 * config.in: Regenerate.
15183 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15185 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15186 (perror_with_name, remote_close, remote_open, expect, play): Static.
15188 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15190 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15191 byte offsets instead of an array of indexes.
15192 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15194 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15196 * regcache.c: Add comment.
15198 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15200 * thread-db.c: New file.
15201 * proc-service.c: New file.
15202 * acinclude.m4: New file.
15203 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15204 proc-service.o, and thread-db.o.
15205 (linux-low.o): Add USE_THREAD_DB.
15206 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15207 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15208 * aclocal.m4: Regenerated.
15209 * config.in: Regenerated.
15210 * configure: Regenerated.
15211 * configure.in: Check for proc_service.h, sys/procfs.h,
15212 thread_db.h, and linux/elf.h headrs.
15213 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15214 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15215 Check for -lthread_db and thread support.
15216 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15217 PowerPC, and SuperH.
15218 * i387-fp.c: Constify arguments.
15219 * i387-fp.h: Likewise.
15220 * inferiors.c: (struct thread_info): Renamed from
15221 `struct inferior_info'. Remove PID member. Use generic inferior
15222 list header. All uses updated.
15223 (inferiors, signal_pid): Removed.
15224 (all_threads): New variable.
15225 (get_thread): Define.
15226 (add_inferior_to_list): New function.
15227 (for_each_inferior): New function.
15228 (change_inferior_id): New function.
15229 (add_inferior): Removed.
15230 (remove_inferior): New function.
15231 (add_thread): New function.
15232 (free_one_thread): New function.
15233 (remove_thread): New function.
15234 (clear_inferiors): Use for_each_inferior and free_one_thread.
15235 (find_inferior): New function.
15236 (find_inferior_id): New function.
15237 (inferior_target_data): Update argument type.
15238 (set_inferior_target_data): Likewise.
15239 (inferior_regcache_data): Likewise.
15240 (set_inferior_regcache_data): Likewise.
15241 * linux-low.c (linux_bp_reinsert): Remove.
15242 (all_processes, stopping_threads, using_thrads)
15243 (struct pending_signals, debug_threads, pid_of): New.
15244 (inferior_pid): Replace with macro.
15245 (struct inferior_linux_data): Remove.
15246 (get_stop_pc, add_process): New functions.
15247 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15248 Use add_process and add_thread.
15249 (linux_attach_lwp): New function, based on old linux_attach. Use
15250 add_process and add_thread. Set stop_expected for new threads.
15251 (linux_attach): New function.
15252 (linux_kill_one_process): New function.
15253 (linux_kill): Kill all LWPs.
15254 (linux_thread_alive): Use find_inferior_id.
15255 (check_removed_breakpoints, status_pending_p): New functions.
15256 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15257 Update. Use WNOHANG. Wait for cloned processes also. Update process
15258 struct for the found process.
15259 (linux_wait_for_event): New function.
15260 (linux_wait): Use it. Support LWPs.
15261 (send_sigstop, wait_for_sigstop, stop_all_processes)
15262 (linux_resume_one_process, linux_continue_one_process): New functions.
15263 (linux_resume): Support LWPs.
15264 (REGISTER_RAW_SIZE): Remove.
15265 (fetch_register): Use register_size instead. Call supply_register.
15266 (usr_store_inferior_registers): Likewise. Call collect_register.
15267 Fix recursive case.
15268 (regsets_fetch_inferior_registers): Improve error message.
15269 (regsets_store_inferior_registers): Add debugging.
15270 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15271 (unstopped_p, linux_signal_pid): New functions.
15272 (linux_target_ops): Add linux_signal_pid.
15273 (linux_init_signals): New function.
15274 (initialize_low): Call it. Initialize using_threads.
15275 * regcache.c (inferior_regcache_data): Add valid
15277 (get_regcache): Fetch registers lazily. Add fetch argument
15278 and update all callers.
15279 (regcache_invalidate_one, regcache_invalidate): New
15281 (new_register_cache): Renamed from create_register_cache.
15282 Return the new regcache.
15283 (free_register_cache): Change argument to a void *.
15284 (registers_to_string, registers_from_string): Call get_regcache
15285 with fetch flag set.
15286 (register_data): Make static. Pass fetch flag to get_regcache.
15287 (supply_register): Call get_regcache with fetch flag clear.
15288 (collect_register): Call get_regcache with fetch flag set.
15289 (collect_register_as_string): New function.
15290 * regcache.h: Update.
15291 * remote-utils.c (putpkt): Flush after debug output and use
15293 Handle input interrupts while waiting for an ACK.
15294 (input_interrupt): Use signal_pid method.
15295 (getpkt): Flush after debug output and use stderr.
15296 (outreg): Use collect_register_as_string.
15297 (new_thread_notify, dead_thread_notify): New functions.
15298 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15299 and general_thread.
15300 (look_up_one_symbol): Flush after debug output.
15301 * server.c (step_thread, server_waiting): New variables.
15302 (start_inferior): Don't use signal_pid. Update call to mywait.
15303 (attach_inferior): Update call to mywait.
15304 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15305 (main): Don't fetch/store registers explicitly. Use
15306 set_desired_inferior. Support proposed ``Hs'' packet. Update
15308 * server.h: Update.
15309 (struct inferior_list, struct_inferior_list_entry): New.
15310 * target.c (set_desired_inferior): New.
15311 (write_inferior_memory): Constify.
15312 (mywait): New function.
15313 * target.h: Update.
15314 (struct target_ops): New signal_pid method.
15315 (mywait): Removed macro, added prototype.
15317 * linux-low.h (regset_func): Removed.
15318 (regset_fill_func, regset_store_func): New.
15319 (enum regset_type): New.
15320 (struct regset_info): Add type field. Use new operation types.
15321 (struct linux_target_ops): stop_pc renamed to get_pc.
15322 Add decr_pc_after_break and breakpoint_at.
15323 (get_process, get_thread_proess, get_process_thread)
15324 (strut process_info, all_processes, linux_attach_lwp)
15325 (thread_db_init): New.
15327 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15328 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15329 (the_low_target): Add new members.
15330 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15331 (i386_store_fpxregset): Constify.
15332 (target_regsets): Add new kind identifier.
15333 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15334 (i386_set_pc): Add debugging.
15335 (i386_breakpoint_at): New function.
15336 (the_low_target): Add new members.
15337 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15338 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15339 (mips_breakpoint_at): New.
15340 (the_low_target): Add new members.
15341 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15342 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15343 (the_low_target): Add new members.
15344 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15345 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15346 (the_low_target): Add new members.
15347 * linux-x86-64-low.c (target_regsets): Add new kind
15350 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15352 From Martin Pool <mbp@samba.org>:
15353 * server.c (gdbserver_usage): New function.
15356 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15358 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15359 stop_at -> stop_pc.
15361 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15363 * Makefile.in: Remove obsolete code.
15365 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15367 * linux-low.c (regsets_fetch_inferior_registers),
15368 (regsets_store_inferior_registers): Removed cast to int from
15370 * regcache.h: Added declaration of struct inferior_info.
15372 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15374 * inferiors.c (struct inferior_info): Add regcache_data.
15375 (add_inferior): Call create_register_cache.
15376 (clear_inferiors): Call free_register_cache.
15377 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15378 * regcache.c (struct inferior_regcache_data): New.
15379 (registers): Remove.
15380 (get_regcache): New function.
15381 (create_register_cache, free_register_cache): New functions.
15382 (set_register_cache): Don't initialize the register cache here.
15383 (registers_to_string, registers_from_string, register_data): Call
15385 * regcache.h: Add prototypes.
15386 * server.h: Likewise.
15388 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15390 * mem-break.c: New file.
15391 * mem-break.h: New file.
15392 * Makefile.in: Add mem-break.o rule; update server.h
15394 * inferiors.c (struct inferior_info): Add target_data
15396 (clear_inferiors): Free target_data member if set.
15397 (inferior_target_data, set_inferior_target_data): New functions.
15398 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15399 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15400 * linux-low.c (linux_bp_reinsert): New variable.
15401 (struct inferior_linux_data): New.
15402 (linux_create_inferior): Use set_inferior_target_data.
15403 (linux_attach): Likewise. Call add_inferior.
15404 (linux_wait_for_one_inferior): New function.
15405 (linux_wait): Call it.
15406 (linux_write_memory): Add const.
15407 (initialize_low): Call set_breakpoint_data.
15408 * linux-low.h (struct linux_target_ops): Add breakpoint
15410 * server.c (attach_inferior): Remove extra add_inferior
15412 * server.h: Include mem-break.h. Update inferior.c
15414 * target.c (read_inferior_memory)
15415 (write_inferior_memory): New functions.
15416 * target.h (read_inferior_memory)
15417 (write_inferior_memory): Change macros to prototypes.
15418 (struct target_ops): Update comments. Add const to write_memory
15421 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15423 * linux-low.c (usr_store_inferior_registers): Support
15424 registers which are allowed to fail to store.
15425 * linux-low.h (linux_target_ops): Likewise.
15426 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15427 (ppc_cannot_store_register): FPSCR may not be storable.
15429 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15431 * server.h: Include <string.h> if HAVE_STRING_H.
15432 * ChangeLog: Correct paths in last ChangeLog entry.
15434 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15436 * linux-low.h: Remove obsolete prototypes.
15437 (struct linux_target_ops): New.
15438 (extern the_low_target): New.
15439 * linux-low.c (num_regs, regmap): Remove declarations.
15440 (register_addr): Use the_low_target explicitly.
15441 (fetch_register): Likewise.
15442 (usr_fetch_inferior_registers): Likewise.
15443 (usr_store_inferior_registers): Likewise.
15444 * linux-arm-low.c (num_regs): Remove.
15445 (arm_num_regs): Define.
15446 (arm_regmap): Renamed from regmap, made static.
15447 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15449 (arm_cannot_store_register): Renamed from cannot_store_register,
15451 (the_low_target): New.
15452 * linux-i386-low.c (num_regs): Remove.
15453 (i386_num_regs): Define.
15454 (i386_regmap): Renamed from regmap, made static.
15455 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15457 (i386_cannot_store_register): Renamed from cannot_store_register,
15459 (the_low_target): New.
15460 * linux-ia64-low.c (num_regs): Remove.
15461 (ia64_num_regs): Define.
15462 (ia64_regmap): Renamed from regmap, made static.
15463 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15465 (ia64_cannot_store_register): Renamed from cannot_store_register,
15467 (the_low_target): New.
15468 * linux-m68k-low.c (num_regs): Remove.
15469 (m68k_num_regs): Define.
15470 (m68k_regmap): Renamed from regmap, made static.
15471 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15473 (m68k_cannot_store_register): Renamed from cannot_store_register,
15475 (the_low_target): New.
15476 * linux-mips-low.c (num_regs): Remove.
15477 (mips_num_regs): Define.
15478 (mips_regmap): Renamed from regmap, made static.
15479 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15481 (mips_cannot_store_register): Renamed from cannot_store_register,
15483 (the_low_target): New.
15484 * linux-ppc-low.c (num_regs): Remove.
15485 (ppc_num_regs): Define.
15486 (ppc_regmap): Renamed from regmap, made static.
15487 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15489 (ppc_cannot_store_register): Renamed from cannot_store_register,
15491 (the_low_target): New.
15492 * linux-s390-low.c (num_regs): Remove.
15493 (s390_num_regs): Define.
15494 (s390_regmap): Renamed from regmap, made static.
15495 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15497 (s390_cannot_store_register): Renamed from cannot_store_register,
15499 (the_low_target): New.
15500 * linux-sh-low.c (num_regs): Remove.
15501 (sh_num_regs): Define.
15502 (sh_regmap): Renamed from regmap, made static.
15503 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15505 (sh_cannot_store_register): Renamed from cannot_store_register,
15507 (the_low_target): New.
15508 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15509 (the_low_target): New.
15511 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15513 * Makefile.in: Add stamp-h target.
15514 * configure.in: Create stamp-h.
15515 * configure: Regenerated.
15517 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15519 * inferiors.c: New file.
15520 * target.c: New file.
15521 * target.h: New file.
15522 * Makefile.in: Add target.o and inferiors.o. Update
15524 * linux-low.c (inferior_pid): New static variable,
15525 moved from server.c.
15526 (linux_create_inferior): Renamed from create_inferior.
15527 Call add_inferior. Return 0 on success instead of a PID.
15528 (linux_attach): Renamed from myattach.
15529 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15530 (linux_thread_alive): Renamed from mythread_alive.
15531 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15533 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15534 (regsets_store_inferior_registers): Correct error message.
15535 Add missing ``return 0''.
15536 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15537 (linux_store_registers): Renamed from store_inferior_registers.
15538 (linux_read_memory): Renamed from read_inferior_memory.
15539 (linux_write_memory): Renamed from write_inferior_memory.
15540 (linux_target_ops): New structure.
15541 (initialize_low): Call set_target_ops ().
15542 * remote-utils.c (unhexify): New function.
15543 (hexify): New function.
15544 (input_interrupt): Send signals to ``signal_pid''.
15545 * server.c (inferior_pid): Remove.
15546 (start_inferior): Update create_inferior call.
15547 (attach_inferior): Call add_inferior.
15548 (handle_query): New function.
15549 (main): Call handle_query for `q' packets.
15550 * server.h: Include "target.h". Remove obsolete prototypes.
15551 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15553 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15555 * Makefile.in: Add WARN_CFLAGS. Update configury
15557 * configure.in: Check for <string.h>
15558 * configure: Regenerate.
15559 * config.in: Regenerate.
15560 * gdbreplay.c: Include needed system headers.
15561 (remote_open): Remove strchr prototype.
15562 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15563 * regcache.c (supply_register): Change buf argument to const void *.
15564 (supply_register_by_name): Likewise.
15565 (collect_register): Change buf argument to void *.
15566 (collect_register_by_name): Likewise.
15567 * regcache.h: Add missing prototypes.
15568 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15569 * server.c (handle_query): New function.
15570 (attached): New static variable, moved out of main.
15571 (main): Quiet longjmp clobber warnings.
15572 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15573 * utils.c (error): Remove NORETURN.