1 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3 * inferiors.c (current_inferior_cwd): New global variable.
4 (get_inferior_cwd): New function.
5 * inferiors.h (struct process_info) <cwd>: New field.
7 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
9 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
10 (OBS): Add gdb_tilde_expand.o.
12 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
14 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
15 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
17 2017-09-29 Pedro Alves <palves@redhat.com>
19 * ax.c (gdb_parse_agent_expr): Constify.
20 * ax.h (gdb_parse_agent_expr): Constify.
21 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
23 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
24 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
25 * remote-utils.h (read_ptid): Constify.
26 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
27 (process_point_options, process_serial_event): Constify.
28 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
29 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
30 (cmd_qtbuffer): Constify.
32 2017-09-29 Pedro Alves <palves@redhat.com>
34 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
37 2017-09-29 Pedro Alves <palves@redhat.com>
39 * linux-low.c (handle_extended_wait): Pass parent thread instead
40 of process to thread_db_notice_clone.
41 * linux-low.h (thread_db_notice_clone): Replace parent process
42 parameter with parent thread parameter.
43 * thread-db.c (find_one_thread): Add comment.
44 (thread_db_notice_clone): Replace parent process parameter with
45 parent thread parameter. Temporarily switch to the parent thread.
47 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
49 * gdbthread.h: Include "common-gdbthread.h".
50 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
51 "if" when validating the ptid.
52 * remote-utils.c: Include "gdbthread.h".
53 (prepare_resume_reply): Use "switch_to_thread".
54 * target.c (done_accessing_memory): Likewise.
56 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
58 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
59 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
60 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
61 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
62 s390x-gs-linux64-ipa.o to ipa_obj.
63 * linux-s390-low.c (HWCAP_S390_GS): New define.
64 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
66 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
67 (s390_arch_setup): Check for guarded-storage support and choose
69 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
70 init_registers_s390x_gs_linux64.
71 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
73 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
74 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
76 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
78 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
80 2017-09-21 Kevin Buettner <kevinb@redhat.com>
82 * linux-low.h (struct lwp_info): Add new field, thread_handle.
83 (thread_db_thread_handle): Declare.
84 * linux-low.c (linux_target_ops): Initialize thread_handle.
85 * server.c (handle_qxfer_threads_worker): Add support for
87 * target.h (struct target_ops): Add new function pointer,
89 (target_thread_handle): Define.
90 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
92 (thread_db_thread_handle): New function.
94 2017-09-21 Kevin Buettner <kevinb@redhat.com>
96 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
97 * linux-low.h (thread_db_notice_clone): Declare.
98 * thread-db.c (thread_db_notice_clone): New function.
100 2017-09-21 Pedro Alves <palves@redhat.com>
102 * server.c (gdb_read_memory, handle_status, process_serial_event)
103 (handle_serial_event, handle_target_event): Adjust to
104 set_desired_thread prototype change.
105 * target.c (set_desired_thread): Remove 'use_general' parameter
107 * target.h (set_desired_thread): Remove 'use_general' parameter.
109 2017-09-20 Tom Tromey <tom@tromey.com>
111 * target.c (target_terminal::terminal_state): Define.
112 (target_terminal::init): Rename from target_terminal_init.
113 (target_terminal::inferior): Rename from
114 target_terminal_inferior.
115 (target_terminal::ours): Rename from target_terminal_ours.
116 (target_terminal::ours_for_output, target_terminal::info): New.
118 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
120 * server.c (accumulate_file_name_length): Remove.
121 (emit_dll_description): Adjust to std::string change.
122 (handle_qxfer_libraries): Use std::string to hold document.
124 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
126 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
127 return type of xml_escape_text.
128 * server.c (emit_dll_description): Likewise.
130 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
132 * server.c (captured_main): Accept argument for --selftest.
133 Update run_tests call.
134 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
135 when registering selftests.
137 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
139 * regcache.c (get_thread_regcache): Update code to use "std::vector"
140 instead of "VEC" for "target_desc.reg_defs".
141 (regcache_cpy): Likewise.
142 (registers_to_string): Likewise.
143 (registers_from_string): Likewise.
144 (find_regno): Likewise.
145 (supply_regblock): Likewise.
146 (regcache_raw_read_unsigned): Likewise.
147 * tdesc.c (init_target_desc): Likewise.
148 (tdesc_create_reg): Likewise.
149 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
150 (struct target_desc) <reg_defs>: Convert to "std::vector".
151 (target_desc): Do not initialize "reg_defs".
152 (~target_desc): Update code to use "std::vector" instead of "VEC"
153 for "target_desc.reg_defs".
154 (operator==): Likewise.
156 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
158 * inferiors.h (thread_to_gdb_id): Remove.
159 * inferiors.c (thread_to_gdb_id): Remove.
160 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
161 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
162 lynx_store_registers, lynx_read_memory, lynx_write_memory):
164 * nto-low.c (nto_fetch_registers, nto_store_registers,
165 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
167 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
169 * inferiors.h (gdb_id_to_thread_id): Remove.
170 * inferiors.c (gdb_id_to_thread_id): Remove.
171 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
172 removal. Move pid declaration closer to where it's used.
174 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
176 * server.c (handle_detach): New function.
177 (process_serial_event): Move code out, call handle_detach.
179 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
181 * server.c (require_running): Rename to ...
182 (require_running_or_return): ... this ...
183 (require_running_or_break): ... and this.
184 (handle_query, process_serial_event): Adjust.
186 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
188 * linux-low.c (linux_set_resume_request): Remove unused
191 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
193 * server.c (first_thread_of): Remove.
194 (process_serial_event): Replace usage of first_thread_of with
195 find_any_thread_of_pid.
196 * tracepoint.c (same_process_p): Remove.
197 (gdb_agent_about_to_close): Replace usage of same_process_p with
198 find_any_thread_of_pid.
199 * linux-x86-low.c (same_process_callback): Remove.
200 (x86_arch_setup_process_callback): Replace usage of
201 same_process_callback with find_any_thread_of_pid.
202 * thread-db.c (any_thread_of): Remove.
203 (switch_to_process): Replace usage of any_thread_of with
204 find_any_thread_of_pid.
205 * inferiors.c (thread_pid_matches_callback): Remove.
206 (find_thread_process): Adjust to use find_any_thread_of_pid.
208 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
210 * regcache.c (get_thread_regcache): Guard calls to "memset"
213 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
215 * linux-low.c (handle_extended_wait): Use
216 "allocate_target_description" instead of "XNEW".
217 * linux-x86-low.c (initialize_low_arch): Likewise.
219 2017-09-05 Yao Qi <yao.qi@linaro.org>
221 * configure.srv (srv_i386_regobj): Remove.
222 (srv_amd64_regobj): Remove.
223 (srv_regobj): Set it to "" for x86 non-linux targets.
224 * linux-x86-tdesc.c (i386_linux_read_description):
225 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
226 (init_registers_i386): Remove the declaration.
227 (tdesc_i386): Remove the declaration.
228 (lynx_i386_arch_setup): Call i386_create_target_description.
229 * nto-x86-low.c: Likewise.
230 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
231 [!__x86_64__]: include arch/i386.h.
232 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
234 2017-09-05 Yao Qi <yao.qi@linaro.org>
236 * configure.srv (srv_amd64_linux_xmlfiles): Remove
237 i386/amd64-XXX-linux from it.
239 2017-09-05 Yao Qi <yao.qi@linaro.org>
241 * configure.srv: Empty srv_amd64_linux_regobj if $development is
243 (ipa_amd64_linux_regobj): Remove.
244 (ipa_x32_linux_regobj): Remove.
246 2017-09-05 Yao Qi <yao.qi@linaro.org>
248 * Makefile.in (arch-amd64.o): New rule.
249 * configure.srv: Append arch-amd64.o.
250 * linux-amd64-ipa.c: Include common/x86-xstate.h.
251 (get_ipa_tdesc): Call amd64_linux_read_description.
252 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
253 and init_registers_amd64_XXX.
254 * linux-x86-low.c (x86_linux_read_description): Call
255 amd64_linux_read_description.
256 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
257 (initialize_low_arch): Don't call init_registers_x32_XXX and
258 init_registers_amd64_XXX.
259 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
261 [__x86_64__] (amd64_tdesc_test): New function.
262 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
263 and init_registers_amd64_XXX.
264 * linux-x86-tdesc.c: Include arch/amd64.h.
265 (xcr0_to_tdesc_idx): New function.
266 (i386_linux_read_description): New function.
267 (amd64_get_ipa_tdesc_idx): New function.
268 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
269 (amd64_get_ipa_tdesc): Declare.
271 2017-09-05 Yao Qi <yao.qi@linaro.org>
273 * configure.srv (srv_i386_linux_xmlfiles): Remove
274 i386/i386-XXX-linux.xml from it.
276 2017-09-05 Yao Qi <yao.qi@linaro.org>
278 * configure.srv: Set srv_i386_linux_regobj empty if $development
280 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
281 initialize_low_tdesc.
282 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
283 with #if initialize_low_tdesc.
284 * linux-x86-tdesc-selftest.c: New file.
285 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
287 2017-09-05 Yao Qi <yao.qi@linaro.org>
289 * Makefile.in (arch-i386.o): New rule.
290 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
291 (x86_64-*-linux*): Likewise.
292 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
294 (i386_linux_read_description): Remove code and call
295 i386_create_target_description.
296 * tdesc.c (allocate_target_description): New function.
297 * tdesc.h (set_tdesc_architecture): Remove declaration.
298 (set_tdesc_osabi): Likewise.
300 2017-09-05 Yao Qi <yao.qi@linaro.org>
302 * linux-x86-tdesc.c: Don't include <inttypes.h>.
303 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
304 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
306 * server.c (get_features_xml): Call tdesc_get_features_xml.
307 * tdesc.c (set_tdesc_architecture): New function.
308 (set_tdesc_osabi): New function.
309 (tdesc_get_features_xml): New function.
310 (tdesc_create_feature): Add an argument.
311 * tdesc.h (struct target_desc) <features>: New field.
312 <arch, osabi>: New field.
313 (~target_desc): xfree features, arch, and osabi.
314 (target_desc::oerator==): Don't compare .xmltarget.
315 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
316 (set_tdesc_osabi): Likewise.
317 (tdesc_get_features_xml): Likewise.
319 2017-09-05 Yao Qi <yao.qi@linaro.org>
321 * linux-x86-tdesc.c: Include selftest.h.
322 (i386_tdesc_test): New function.
323 (initialize_low_tdesc): Call selftests::register_test.
324 * tdesc.h: Include regdef.h.
325 (target_desc): Override operator == and !=.
327 2017-09-05 Yao Qi <yao.qi@linaro.org>
329 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
331 * linux-i386-ipa.c: Include common/x86-xstate.h
332 (get_ipa_tdesc): Call i386_linux_read_description.
333 (initialize_low_tracepoint): Don't call init_registers_XXX
334 functions, call initialize_low_tdesc instead.
335 * linux-x86-low.c (x86_linux_read_description): Call
336 i386_linux_read_description.
337 (initialize_low_arch): Don't call init_registers_i386_XXX
338 functions, call initialize_low_tdesc.
339 * linux-x86-tdesc.c: New file.
340 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
341 (i386_get_ipa_tdesc_idx): Declare.
342 (i386_get_ipa_tdesc): Declare.
343 (initialize_low_tdesc): Declare.
345 2017-09-05 Yao Qi <yao.qi@linaro.org>
347 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
350 2017-09-05 Yao Qi <yao.qi@linaro.org>
352 * Makefile.in (IPA_OBJS): Add vec-ipa.o
353 * regcache.c (get_thread_regcache): Use VEC_length.
354 (init_register_cache): Likewise.
355 (regcache_cpy): Likewise.
356 (registers_to_string): Iterate reg_defs via VEC_iterate.
357 (find_regno): Likewise.
358 (find_register_by_number): Use VEC_index.
359 (register_size): Call find_register_by_number.
360 (register_data): Call find_register_by_number.
361 (supply_regblock): Use VEC_length.
362 (regcache_raw_read_unsigned): Likewise.
363 * tdesc.c (init_target_desc): Iterate reg_defs via
365 (default_description): Update initializer.
366 (copy_target_description): Don't update field num_registers.
367 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
368 <num_registers>: Remove.
370 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
372 * Makefile.in (.SECONDARY): Define target.
374 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
376 * linux-low.c (linux_wait_1): Adjust.
377 * server.c (queue_stop_reply_callback): Adjust.
379 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
381 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
382 QEnvironmentUnset and QEnvironmentReset packets.
383 (handle_query): Inform remote that QEnvironmentHexEncoded,
384 QEnvironmentUnset and QEnvironmentReset are supported.
386 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
388 * inferiors.h (inferior_target_data): Rename to ...
389 (thread_target_data): ... this.
390 (inferior_regcache_data): Rename to ...
391 (thread_regcache_data): ... this.
392 (set_inferior_regcache_data): Rename to ...
393 (set_thread_regcache_data): ... this.
394 * inferiors.c (inferior_target_data): Rename to ...
395 (thread_target_data): ... this.
396 (inferior_regcache_data): Rename to ...
397 (thread_regcache_data): ... this.
398 (set_inferior_regcache_data): Rename to ...
399 (set_thread_regcache_data): ... this.
400 (free_one_thread): Update.
401 * linux-low.h (get_thread_lwp): Update.
402 * regcache.c (get_thread_regcache): Update.
403 (regcache_invalidate_thread): Update.
404 (free_register_cache_thread): Update.
405 * win32-i386-low.c (update_debug_registers_callback): Update.
406 (win32_get_current_dr): Update.
407 * win32-low.c (thread_rec): Update.
408 (delete_thread_info): Update.
409 (continue_one_thread): Update.
410 (suspend_one_thread): Update.
412 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
414 * inferiors.c (set_inferior_target_data): Remove.
415 * inferiors.h (set_inferior_target_data): Remove.
417 2017-08-18 Yao Qi <yao.qi@linaro.org>
419 * Makefile.in (OBS): Add selftest.o.
420 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
421 * configure, config.in: Re-generated.
422 * server.c: Include common/sefltest.h.
423 (captured_main): Handle option --selftest.
425 2017-08-09 Yao Qi <yao.qi@linaro.org>
427 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
428 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
429 i386-avx-mpx.o and i386-mmx.o.
430 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
431 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
432 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
433 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
434 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
435 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
436 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
437 i386/amd64-avx-mpx.xml.
439 2017-08-09 Yao Qi <yao.qi@linaro.org>
441 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
442 and x32-avx-avx512.o.
443 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
444 i386/x32-avx-avx512.xml.
446 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
448 * tracepoint.h (enum class fast_tpoint_collect_result): New
450 (fast_tracepoint_collecting): Change return type to
451 fast_tpoint_collect_result.
452 * tracepoint.c (fast_tracepoint_collecting): Likewise.
453 * linux-low.h: Include tracepoint.h.
454 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
455 fast_tpoint_collect_result.
456 * linux-low.c (handle_tracepoints): Adjust.
457 (linux_fast_tracepoint_collecting): Change return type to
458 fast_tpoint_collect_result.
459 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
460 linux_wait_1, stuck_in_jump_pad_callback,
461 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
462 proceed_one_lwp): Adjust to type change.
464 2017-07-10 Yao Qi <yao.qi@linaro.org>
466 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
468 2017-06-29 Yao Qi <yao.qi@linaro.org>
470 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
472 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
474 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
476 * Makefile.in (IPA_OBJS): Sort and format one item per line.
478 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
480 * linux-low.c (linux_create_inferior): Adjust code to access the
481 environment information via 'gdb_environ' class.
482 * lynx-low.c (lynx_create_inferior): Likewise.
483 * server.c (our_environ): Make it an instance of 'gdb_environ'.
484 (get_environ): Return a pointer to 'our_environ'.
485 (captured_main): Initialize 'our_environ'.
486 * server.h (get_environ): Adjust prototype.
487 * spu-low.c (spu_create_inferior): Adjust code to access the
488 environment information via 'gdb_environ' class.
490 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
492 * linux-low.c (linux_read_memory, linux_write_memory): Remove
493 usage of "register" keyword.
495 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
497 * configure: Re-generate.
499 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
501 * configure: Re-generate.
503 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
505 * Makefile.in (COMPILE.pre): Add "-x c++".
507 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
509 * fork-child.c: Conditionally include <signal.h>.
511 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
513 * server.c (handle_general_set): Handle new packet
515 (handle_query): Add "QStartupWithShell" to the list of supported
517 (gdbserver_usage): Add help text explaining the
518 new "--startup-with-shell" and "--no-startup-with-shell" CLI
520 (captured_main): Recognize and act upon the presence of the new
523 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
524 Pedro Alves <palves@redhat.com>
526 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
527 * configure: Regenerate.
528 * configure.srv (srv_linux_obj): Add "fork-child.o" and
530 (i[34567]86-*-lynxos*): Likewise.
531 (spu*-*-*): Likewise.
532 * fork-child.c: New file.
533 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
535 (linux_ptrace_fun): New function.
536 (linux_create_inferior): Adjust function prototype to reflect
537 change on "target.h". Adjust function code to use
539 (linux_request_interrupt): Delete "signal_pid".
540 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
541 (lynx_ptrace_fun): New function.
542 (lynx_create_inferior): Adjust function prototype to reflect
543 change on "target.h". Adjust function code to use
545 * nto-low.c (nto_create_inferior): Adjust function prototype and
546 code to reflect change on "target.h". Update comments.
547 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
548 "common-terminal.h" and "environ.h".
549 (terminal_fd): Moved to fork-child.c.
550 (old_foreground_pgrp): Likewise.
551 (restore_old_foreground_pgrp): Likewise.
552 (last_status): Make it global.
553 (last_ptid): Likewise.
554 (our_environ): New variable.
555 (startup_with_shell): Likewise.
556 (program_name): Likewise.
557 (program_argv): Rename to...
558 (program_args): ...this.
559 (wrapper_argv): New variable.
560 (start_inferior): Delete function.
561 (get_exec_wrapper): New function.
562 (get_exec_file): Likewise.
563 (get_environ): Likewise.
564 (prefork_hook): Likewise.
565 (post_fork_inferior): Likewise.
566 (postfork_hook): Likewise.
567 (postfork_child_hook): Likewise.
568 (handle_v_run): Update code to deal with arguments coming from the
569 remote host. Update calls from "start_inferior" to
571 (captured_main): Likewise. Initialize environment variable. Call
573 * server.h (post_fork_inferior): New prototype.
574 (get_environ): Likewise.
575 (last_status): Declare.
576 (last_ptid): Likewise.
577 (signal_pid): Likewise.
578 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
579 (spu_ptrace_fun): New function.
580 (spu_create_inferior): Adjust function prototype to reflect change
581 on "target.h". Adjust function code to use "fork_inferior".
582 * target.c (target_terminal_init): New function.
583 (target_terminal_inferior): Likewise.
584 (target_terminal_ours): Likewise.
585 * target.h: Include <vector>.
586 (struct target_ops) <create_inferior>: Update prototype.
587 (create_inferior): Update macro.
588 * utils.c (gdb_flush_out_err): New function.
589 * win32-low.c (win32_create_inferior): Adjust function prototype
590 and code to reflect change on "target.h".
592 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
594 * inferiors.c (switch_to_thread): New function.
596 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
598 * Makefile.in (SFILE): Add "common/job-control.c".
599 (OBS): Add "job-control.o".
601 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
603 * Makefile: Remove "@host_makefile_frag@".
605 2017-05-05 Pedro Alves <palves@redhat.com>
607 * configure: Regenerate.
609 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
611 * configure: Regenerate.
613 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
615 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
616 software_single_step change of return type to
617 std::vector<CORE_ADDR>.
618 * linux-low.c (install_software_single_step_breakpoints):
620 * linux-low.h (install_software_single_step_breakpoints):
623 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
625 * remote-utils.c: Include "gdb_termios.h" instead of
627 * terminal.h: Delete file.
629 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
631 * server.c: Include <vector>.
632 <program_argv, wrapper_argv>: Convert to std::vector.
633 (start_inferior): Rewrite function to use C++.
634 (handle_v_run): Likewise. Update code that calculates the argv
635 based on the vRun packet; use C++.
636 (captured_main): Likewise.
638 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
640 * server.c (handle_v_cont): Initialize thread_resume::thread
643 2017-04-05 Pedro Alves <palves@redhat.com>
645 * configure: Regenerate.
647 2017-04-05 Pedro Alves <palves@redhat.com>
649 * gdbreplay.c (sync_error): Constify.
650 * linux-x86-low.c (push_opcode): Constify.
652 2017-04-05 Pedro Alves <palves@redhat.com>
654 * win32-low.c (get_child_debug_event)
655 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
656 Report TARGET_WAITKIND_SPURIOUS instead.
658 2017-04-05 Pedro Alves <palves@redhat.com>
660 * remote-utils.c (remote_prepare, remote_open): Constify.
661 * remote-utils.h (remote_prepare, remote_open): Constify.
662 * server.c (captured_main): Constify 'port' handling.
664 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
666 * Makefile.in (clean): Clear .deps.
668 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
670 * .gitignore: Remove generated files, replace with wildcard.
671 * (clean): Replace removal of generated files with wildcard.
672 (version.c): Replace with...
673 (version-generated.c): ...this.
674 (xml-builtin.c): Replace with...
675 (xml-builtin-generated.c): ...this.
676 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
677 (%.c: *regformats*): Replace with...
678 (%-generated.c: *regformats*): ...this.
680 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
682 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
683 (xtensa_fill_gregset): Call collect_register_by_name for
685 (xtensa_store_gregset): Call supply_register_by_name for
688 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
690 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
691 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
692 (xtensa_store_gregset): Call supply_register for all registers in
693 a0_regnum..a0_regnum + C0_NREGS range.
695 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
697 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
698 (ax-ipa.o: ax.c): Remove.
699 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
700 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
701 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
702 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
703 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
705 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
707 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
708 (print-utils-ipa.o: ../common/print-utils.c): Remove.
709 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
710 (errors-ipa.o: ../common/errors.c): Remove.
711 (format-ipa.o: ../common/format.c): Remove.
712 (common-utils-ipa.o: ../common/common-utils.c): Remove.
714 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
716 * Makefile.in (%-ipa.o: %.c): New rule.
717 (tracepoint-ipa.o: tracepoint.c): Remove.
718 (utils-ipa.o: utils.c): Remove.
719 (remote-utils-ipa.o: remote-utils.c): Remove.
720 (regcache-ipa.o: regcache.c): Remove.
721 (i386-linux-ipa.o: i386-linux.c): Remove.
722 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
723 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
724 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
725 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
726 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
727 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
728 (amd64-linux-ipa.o: amd64-linux.c): Remove.
729 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
730 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
731 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
732 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
733 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
734 (aarch64-ipa.o: aarch64.c): Remove.
735 (s390-linux32-ipa.o: s390-linux32.c): Remove.
736 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
737 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
738 (s390-linux64-ipa.o: s390-linux64.c): Remove.
739 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
740 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
741 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
742 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
743 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
744 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
745 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
746 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
747 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
748 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
749 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
750 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
751 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
752 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
753 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
754 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
755 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
756 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
757 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
758 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
759 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
760 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
761 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
762 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
763 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
764 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
765 (tdesc-ipa.o: tdesc.c): Remove.
766 (x32-linux-ipa.o: x32-linux.c): Remove.
767 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
768 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
770 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
772 * Makefile.in (%.o: ../arch/%.c): New rule.
773 (arm.o: ../arch/arm.c): Remove.
774 (arm-linux.o: ../arch/arm-linux.c): Remove.
775 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
776 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
778 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
780 * Makefile.in (%.o: ../nat/%.c): New rule.
781 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
782 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
783 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
784 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
785 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
786 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
787 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
788 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
789 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
790 (linux-personality.o: ../nat/linux-personality.c): Remove.
791 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
792 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
793 (x86-linux.o: ../nat/x86-linux.c): Remove.
794 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
795 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
797 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
799 * Makefile.in (%.o: ../common/%.c): New rule.
800 (signals.o: ../common/signals.c): Remove.
801 (print-utils.o: ../common/print-utils.c): Remove.
802 (rsp-low.o: ../common/rsp-low.c): Remove.
803 (common-utils.o: ../common/common-utils.c): Remove.
804 (posix-strerror.o: ../common/posix-strerror.c): Remove.
805 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
806 (vec.o: ../common/vec.c): Remove.
807 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
808 (xml-utils.o: ../common/xml-utils.c): Remove.
809 (ptid.o: ../common/ptid.c): Remove.
810 (buffer.o: ../common/buffer.c): Remove.
811 (format.o: ../common/format.c): Remove.
812 (filestuff.o: ../common/filestuff.c): Remove.
813 (agent.o: ../common/agent.c): Remove.
814 (errors.o: ../common/errors.c): Remove.
815 (environ.o: ../common/environ.c): Remove.
816 (common-debug.o: ../common/common-debug.c): Remove.
817 (cleanups.o: ../common/cleanups.c): Remove.
818 (common-exceptions.o: ../common/common-exceptions.c): Remove.
819 (fileio.o: ../common/fileio.c): Remove.
820 (common-regcache.o: ../common/common-regcache.c): Remove.
821 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
822 (new-op.o: ../common/new-op.c): Remove.
823 (btrace-common.o: ../common/btrace-common.c): Remove.
825 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
827 * Makefile.in (%.o: ../target/%.c): New rule.
828 (waitstatus.o: ../target/waitstatus.c): Remove.
830 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
833 (%.c: ../regformats/%.dat,
834 (%.c: ../regformats/arm/%.dat,
835 (%.c: ../regformats/i386/%.dat,
836 (%.c: ../regformats/rs6000/%.dat): New rules.
839 (arm-with-iwmmxt.c): Remove.
840 (arm-with-vfpv2.c): Remove.
841 (arm-with-vfpv3.c): Remove.
842 (arm-with-neon.c): Remove.
843 (reg-bfin.c): Remove.
844 (reg-cris.c): Remove.
845 (reg-crisv32.c): Remove.
847 (i386-linux.c): Remove.
848 (i386-avx.c): Remove.
849 (i386-avx-linux.c): Remove.
850 (i386-avx-avx512.c): Remove.
851 (i386-avx-avx512-linux.c): Remove.
852 (i386-mpx.c): Remove.
853 (i386-mpx-linux.c): Remove.
854 (i386-avx-mpx-avx512-pku.c): Remove.
855 (i386-avx-mpx-avx512-pku-linux.c): Remove.
856 (i386-avx-mpx.c): Remove.
857 (i386-avx-mpx-linux.c): Remove.
858 (i386-mmx.c): Remove.
859 (i386-mmx-linux.c): Remove.
860 (reg-ia64.c): Remove.
861 (reg-m32r.c): Remove.
862 (reg-m68k.c): Remove.
864 (mips-linux.c): Remove.
865 (mips-dsp-linux.c): Remove.
866 (mips64-linux.c): Remove.
867 (mips64-dsp-linux.c): Remove.
868 (nios2-linux.c): Remove.
869 (powerpc-32.c): Remove.
870 (powerpc-32l.c): Remove.
871 (powerpc-altivec32l.c): Remove.
872 (powerpc-cell32l.c): Remove.
873 (powerpc-vsx32l.c): Remove.
874 (powerpc-isa205-32l.c): Remove.
875 (powerpc-isa205-altivec32l.c): Remove.
876 (powerpc-isa205-vsx32l.c): Remove.
877 (powerpc-e500l.c): Remove.
878 (powerpc-64l.c): Remove.
879 (powerpc-altivec64l.c): Remove.
880 (powerpc-cell64l.c): Remove.
881 (powerpc-vsx64l.c): Remove.
882 (powerpc-isa205-64l.c): Remove.
883 (powerpc-isa205-altivec64l.c): Remove.
884 (powerpc-isa205-vsx64l.c): Remove.
885 (s390-linux32.c): Remove.
886 (s390-linux32v1.c): Remove.
887 (s390-linux32v2.c): Remove.
888 (s390-linux64.c): Remove.
889 (s390-linux64v1.c): Remove.
890 (s390-linux64v2.c): Remove.
891 (s390-te-linux64.c): Remove.
892 (s390-vx-linux64.c): Remove.
893 (s390-tevx-linux64.c): Remove.
894 (s390x-linux64.c): Remove.
895 (s390x-linux64v1.c): Remove.
896 (s390x-linux64v2.c): Remove.
897 (s390x-te-linux64.c): Remove.
898 (s390x-vx-linux64.c): Remove.
899 (s390x-tevx-linux64.c): Remove.
900 (tic6x-c64xp-linux.c): Remove.
901 (tic6x-c64x-linux.c): Remove.
902 (tic6x-c62x-linux.c): Remove.
904 (reg-sparc64.c): Remove.
907 (amd64-linux.c): Remove.
908 (amd64-avx.c): Remove.
909 (amd64-avx-linux.c): Remove.
910 (amd64-avx-avx512.c): Remove.
911 (amd64-avx-avx512-linux.c): Remove.
912 (amd64-mpx.c): Remove.
913 (amd64-mpx-linux.c): Remove.
914 (amd64-avx-mpx-avx512-pku.c): Remove.
915 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
916 (amd64-avx-mpx.c): Remove.
917 (amd64-avx-mpx-linux.c): Remove.
919 (x32-linux.c): Remove.
921 (x32-avx-linux.c): Remove.
922 (x32-avx-avx512.c): Remove.
923 (x32-avx-avx512-linux.c): Remove.
924 (reg-xtensa.c): Remove.
925 (reg-tilegx.c): Remove.
926 (reg-tilegx32.c): Remove.
928 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
930 * Makefile.in (SFILES): Add "common/environ.c".
931 (OBJS): Add "common/environ.h".
933 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
935 * configure.ac: Check if the fs_base and gs_base members of
936 `struct user_regs_struct' exist.
937 * config.in: Regenerated.
938 * configure: Likewise.
940 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
942 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
944 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
945 (get_next_pcs_syscall_next_pc): Likewise.
947 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
949 * win32-i386-low.c: Fix incorrect reference to a couple source files.
950 * nto-x86-low.c: Likewise.
952 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
954 * Makefile.in: Include disable-implicit-rules.mk.
956 2016-11-23 Pedro Alves <palves@redhat.com>
958 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
959 (debug_vprintf): Use std::chrono::steady_clock instead of
960 gettimeofday. Use '.' instead of ':'.
961 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
962 (get_timestamp): Use std::chrono::steady_clock instead of
965 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
967 * Makefile.in: Fix whitespace formatting.
969 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
971 * Makefile.in (SFILES, OBS): Flatten list and order
974 2016-11-23 Pedro Alves <palves@redhat.com>
976 * event-loop.c (handle_file_event): Use warning.
977 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
978 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
981 2016-11-23 Pedro Alves <palves@redhat.com>
983 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
985 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
986 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
987 debug_printf and debug_flush for debug output.
988 * server.c (handle_general_set): Likewise.
989 * thread-db.c (try_thread_db_load): Use debug_printf for debug
992 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
994 * Makefile.in (.c.o): Replace rule with ...
995 (%.o: %.c): ... this one.
997 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
999 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1000 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1002 * configure.ac: Remove checks for the make program.
1003 * configure: Re-generate.
1005 2016-10-28 Pedro Alves <palves@redhat.com>
1007 * Makefile.in (CXX_DIALECT): Get from configure.
1008 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1009 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1010 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1011 * config.in: Regenerate.
1012 * configure: Regenerate.
1014 2016-10-27 Yao Qi <yao.qi@linaro.org>
1016 * linux-low.c (linux_supports_range_stepping): Return true if
1017 can_software_single_step return true.
1019 2016-10-27 Yao Qi <yao.qi@linaro.org>
1021 * inferiors.c (find_inferior_in_random): New function.
1022 * inferiors.h (find_inferior_in_random): Declare.
1023 * linux-low.c (linux_wait_for_event_filtered): Call
1024 find_inferior_in_random instead of find_inferior.
1026 2016-10-27 Yao Qi <yao.qi@linaro.org>
1028 * linux-low.c (linux_wait_1): If single-step breakpoints are
1029 inserted, remove them.
1031 2016-10-26 Pedro Alves <palves@redhat.com>
1033 * linux-low.c (handle_extended_wait): Link parent/child fork
1035 (linux_wait_1): Unlink them.
1036 (linux_set_resume_request): Ignore resume requests for
1037 already-resumed and unhandled fork child threads.
1038 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1039 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1041 (handle_v_requests) <vCont>: Don't call require_running.
1042 * server.h (in_queued_stop_replies): New declaration.
1044 2016-10-24 Yao Qi <yao.qi@linaro.org>
1047 * linux-aarch64-low.c (append_insns): Cast the return value to
1050 2016-10-10 Yao Qi <yao.qi@linaro.org>
1052 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1054 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1056 * target.c (target_supports_multi_process): New function, moved
1058 * target.h (target_supports_multi_process): ... here. Remove
1061 2016-10-05 Tom Tromey <tom@tromey.com>
1064 * tracepoint.c (handle_tracepoint_bkpts): Check
1065 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1067 2016-10-05 Yao Qi <yao.qi@linaro.org>
1069 * configure.srv: Update the path of arm-*.xml files.
1071 2016-10-05 Terry Guo <terry.guo@arm.com>
1072 Yao Qi <yao.qi@linaro.org>
1074 * Makefile.in: Adjust the path of rules.
1075 * configure.srv: Update the path of xml files.
1076 * regformats/arm-with-iwmmxt.dat: Regenerated.
1077 * regformats/arm-with-neon.dat: Likewise.
1078 * regformats/arm-with-vfpv2.dat: Likewise.
1079 * regformats/arm-with-vfpv3.dat Likewise.
1081 2016-09-30 Yao Qi <yao.qi@linaro.org>
1084 * target.c (target_stop_and_wait): Don't call
1085 target_continue_no_signal, use resume_stop instead.
1087 2016-09-26 Yao Qi <yao.qi@linaro.org>
1089 * linux-low.c (linux_wait_1): Call debug_exit.
1091 2016-09-23 Pedro Alves <palves@redhat.com>
1093 * Makefile.in (SFILES): Add common/new-op.c.
1094 (OBS): Add common/new-op.o.
1095 (new-op.o): New rule.
1097 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1099 * .gitinore: Ignore more files.
1101 2016-09-21 Yao Qi <yao.qi@linaro.org>
1103 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1106 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1108 * server.c (start_inferior): Call target_mourn_inferior instead of
1109 mourn_inferior; pass ptid_t argument to it.
1111 (handle_target_event): Likewise.
1112 * target.c (target_mourn_inferior): New function.
1113 * target.h (mourn_inferior): Delete macro.
1115 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1117 * linux-low.c (lwp_is_stepping): New function.
1119 2016-09-06 Carl Love <cel@us.ibm.com>
1121 * server.c (start_inferior): Fixed comment, requested comment change
1122 didn't get updated correctly. Removed reference to ptrace () call as
1123 it is only true on Linux systems.
1125 2016-09-06 Carl Love <cel@us.ibm.com>
1127 * server.c (start_inferior): Do not call
1128 function target_post_create_inferior () if the
1129 inferior process has already exited.
1131 2016-09-05 Pedro Alves <palves@redhat.com>
1133 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1134 (COMPILE.pre, CC_LD): Use CXX directly.
1135 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1136 * acinclude.m4: Don't include build-with-cxx.m4.
1137 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1138 * configure: Regenerate.
1140 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1143 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1144 call writing data to own_buf.
1146 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1148 * target.c (mywait): Call target_wait instead of
1150 (target_wait): New function.
1152 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1154 * server.c (start_inferior): New variable 'ptid'. Replace calls
1155 to the_target->resume by target_continue{,_no_signal}, depending
1157 * target.c (target_stop_and_wait): Call target_continue_no_signal
1158 instead of the_target->resume.
1159 (target_continue): New function.
1161 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1163 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1165 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1168 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1170 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1171 * linux-arm-low.c (ps_get_thread_area): Likewise.
1172 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1173 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1174 * linux-mips-low.c (ps_get_thread_area): Likewise.
1175 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1176 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1177 * linux-x86-low.c (ps_get_thread_area): Likewise.
1178 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1180 2016-08-19 Pedro Alves <palves@redhat.com>
1182 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1184 2016-08-19 Pedro Alves <palves@redhat.com>
1186 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1187 comment. Use memcpy instead of casting through unsigned long.
1189 2016-08-19 Pedro Alves <palves@redhat.com>
1191 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1192 allocating around 0x80000000.
1194 2016-08-19 Pedro Alves <palves@redhat.com>
1197 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1198 (x32-avx512-linux-ipa.o): New rules.
1199 * configure.ac (x86_64-*-linux*): New x32 check.
1200 * configure.srv (ipa_x32_linux_regobj): New.
1201 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1202 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1204 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1206 * configure: Regenerate.
1208 2016-08-09 Pedro Alves <palves@redhat.com>
1211 * Makefile.in (OBS): Add signals-state-save-restore.o.
1212 (signals-state-save-restore.o): New rule.
1213 * config.in: Regenerate.
1214 * configure: Regenerate.
1215 * linux-low.c: Include "signals-state-save-restore.h".
1216 (linux_create_inferior): Call
1217 restore_original_signals_state.
1218 * server.c: Include "dispositions-save-restore.h".
1219 (captured_main): Call save_original_signals_state.
1221 2016-08-05 Pedro Alves <palves@redhat.com>
1223 * configure: Regenerate.
1225 2016-08-04 Yao Qi <yao.qi@linaro.org>
1227 * linux-low.c (regsets_fetch_inferior_registers): Check
1228 errno is ESRCH or not.
1230 2016-08-02 Yao Qi <yao.qi@linaro.org>
1232 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1233 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1234 (thread_db_load_search): Update.
1235 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1236 td_ta_set_event and td_ta_event_getmsg.
1238 2016-07-26 Pedro Alves <palves@redhat.com>
1241 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1242 of unsigned long for 64-bit registers and use uint32_t instead of
1243 unsigned int for 32-bit registers.
1245 2016-07-26 Pedro Alves <palves@redhat.com>
1247 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1250 2016-07-21 Tom Tromey <tom@tromey.com>
1252 * configure: Rebuild.
1254 2016-07-21 Yao Qi <yao.qi@linaro.org>
1256 * mem-break.c (find_gdb_breakpoint): Cast bp to
1257 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1259 2016-07-21 Yao Qi <yao.qi@linaro.org>
1261 * server.c (handle_v_requests): Support s and S actions
1262 if target_supports_software_single_step return true.
1264 2016-07-21 Yao Qi <yao.qi@linaro.org>
1266 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1267 is resume_step, call maybe_hw_step.
1268 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1270 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1272 (proceed_one_lwp): If resume request is resume_step, install
1273 reinsert breakpoints and call maybe_hw_step.
1275 2016-07-21 Yao Qi <yao.qi@linaro.org>
1277 * linux-low.c (proceed_one_lwp): Declare.
1278 (linux_resume_one_thread): Remove local variable 'step'.
1279 Lift code enqueue signal. Call proceed_one_lwp instead of
1280 linux_resume_one_lwp.
1282 2016-07-21 Yao Qi <yao.qi@linaro.org>
1284 * linux-low.c (linux_resume_one_thread): Call
1285 enqueue_pending_signal.
1287 2016-07-21 Yao Qi <yao.qi@linaro.org>
1289 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1290 * inferiors.c (do_restore_current_thread_cleanup): New function.
1291 (make_cleanup_restore_current_thread): Likewise.
1292 * linux-low.c (install_software_single_step_breakpoints): Call
1293 make_cleanup_restore_current_thread. Switch current_thread to
1296 2016-07-21 Yao Qi <yao.qi@linaro.org>
1298 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1299 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1300 (clone_one_breakpoint): Likewise.
1301 (delete_reinsert_breakpoints): Change parameter to thread.
1303 (has_reinsert_breakpoints): Likewise.
1304 (uninsert_reinsert_breakpoints): Likewise.
1305 (reinsert_reinsert_breakpoints): Likewise.
1306 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1307 (delete_reinsert_breakpoints): Likewise.
1308 (reinsert_reinsert_breakpoints): Likewise.
1309 (uninsert_reinsert_breakpoints): Likewise.
1310 (has_reinsert_breakpoints): Likewise.
1312 2016-07-21 Yao Qi <yao.qi@linaro.org>
1314 * inferiors.c (get_thread_process): Make parameter const.
1315 * inferiors.h (get_thread_process): Update declaration.
1316 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1317 Add new parameters child_thread and parent_thread. Callers
1319 * mem-break.h (clone_all_breakpoints): Update declaration.
1321 2016-07-21 Yao Qi <yao.qi@linaro.org>
1323 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1324 <command_list, handler>: Remove.
1325 (struct gdb_breakpoint): New.
1326 (struct other_breakpoint): New.
1327 (struct reinsert_breakpoint): New.
1328 (is_gdb_breakpoint): New function.
1329 (any_persistent_commands): Update command_list if
1330 is_gdb_breakpoint returns true.
1331 (set_breakpoint): Create breakpoints according to their types.
1332 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1333 (set_gdb_breakpoint_1): Likewise.
1334 (set_gdb_breakpoint): Likewise.
1335 (clear_breakpoint_conditions): Change parameter type to
1336 'struct gdb_breakpoint *'.
1337 (clear_breakpoint_commands): Likewise.
1338 (clear_breakpoint_conditions_and_commands): Likewise.
1339 (add_condition_to_breakpoint): Likewise.
1340 (add_breakpoint_condition): Likewise.
1341 (add_commands_to_breakpoint): Likewise.
1342 (check_breakpoints): Check other_breakpoint.
1343 (clone_one_breakpoint): Clone breakpopint according to its type.
1344 * mem-break.h (struct gdb_breakpoint): Declare.
1345 (set_gdb_breakpoint): Update declaration.
1346 (clear_breakpoint_conditions_and_commands): Likewise.
1347 (add_breakpoint_condition): Likewise.
1348 (add_breakpoint_commands): Likewise.
1349 * server.c (process_point_options): Change parameter type to
1350 'struct gdb_breakpoint *'.
1352 2016-07-21 Yao Qi <yao.qi@linaro.org>
1354 * mem-break.c (set_breakpoint_at): Rename it to ...
1355 (set_breakpoint_type_at): ... it.
1356 (set_breakpoint_at): Call set_breakpoint_type_at.
1357 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1358 * mem-break.h (set_breakpoint_at): Update comments.
1360 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1362 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1364 (nios2_store_gregset): Likewise.
1366 2016-07-01 Pedro Alves <palves@redhat.com>
1367 Antoine Tremblay <antoine.tremblay@ericsson.com>
1369 * linux-low.c: Change interface to take the target lwp_info
1370 pointer directly and return void. Handle detaching from a zombie
1372 (linux_detach_lwp_callback): New function.
1373 (linux_detach): Detach from the leader thread after detaching from
1376 2016-06-28 Yao Qi <yao.qi@linaro.org>
1378 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1379 for variable new_offset.
1380 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1381 (aarch64_ftrace_insn_reloc_cb): Likewise.
1382 (aarch64_ftrace_insn_reloc_tb): Likewise.
1383 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1384 PRIx64 instead of PRIx32.
1386 2016-06-28 Yao Qi <yao.qi@linaro.org>
1388 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1389 (the_low_target): Install arm_get_syscall_trapinfo.
1391 2016-06-28 Yao Qi <yao.qi@linaro.org>
1393 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1395 (the_low_target): Install aarch64_get_syscall_trapinfo.
1397 2016-06-28 Yao Qi <yao.qi@linaro.org>
1399 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1401 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1402 Remove parameter sysno.
1403 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1406 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1408 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1409 (s390_emit_ne_goto): Likewise.
1410 (s390_emit_lt_goto): Likewise.
1411 (s390_emit_le_goto): Likewise.
1412 (s390_emit_gt_goto): Likewise.
1413 (s390_emit_ge_goto): Likewise.
1414 (s390x_emit_eq_goto): Likewise.
1415 (s390x_emit_ne_goto): Likewise.
1416 (s390x_emit_lt_goto): Likewise.
1417 (s390x_emit_le_goto): Likewise.
1418 (s390x_emit_gt_goto): Likewise.
1419 (s390x_emit_ge_goto): Likewise.
1420 (s390_emit_ops_impl): Mark variable static.
1421 (s390x_emit_ops): Likewise.
1423 2016-06-17 Yao Qi <yao.qi@linaro.org>
1425 * linux-low.c (handle_extended_wait): Call
1426 uninsert_reinsert_breakpoints for the parent process. Remove
1427 reinsert breakpoints from the child process. Reinsert them to
1428 the parent process when vfork is done.
1429 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1430 (reinsert_reinsert_breakpoints): New function.
1431 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1432 (reinsert_reinsert_breakpoints): Declare.
1434 2016-06-17 Yao Qi <yao.qi@linaro.org>
1436 * linux-low.c (handle_extended_wait): If the parent is doing
1437 step-over, remove the reinsert breakpoints from the forked child.
1439 2016-06-17 Yao Qi <yao.qi@linaro.org>
1441 * linux-low.c (unsuspend_all_lwps): Declare.
1442 (linux_low_filter_event): If thread exited, call finish_step_over.
1443 If step-over is finished, unsuspend other threads.
1445 2016-06-17 Yao Qi <yao.qi@linaro.org>
1447 * linux-low.c (linux_resume_one_lwp_throw): Assert
1448 has_reinsert_breakpoints returns false.
1449 * mem-break.c (delete_disabled_breakpoints): Assert
1450 bp type isn't reinsert_breakpoint.
1452 2016-06-17 Yao Qi <yao.qi@linaro.org>
1454 * linux-low.c (maybe_hw_step): New function.
1455 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1456 (finish_step_over): Switch current_thread to lwp temporarily,
1457 and assert has_reinsert_breakpoints returns true.
1458 (proceed_one_lwp): Call maybe_hw_step.
1459 * mem-break.c (has_reinsert_breakpoints): New function.
1460 * mem-break.h (has_reinsert_breakpoints): Declare.
1462 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1464 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1466 2016-05-17 Yao Qi <yao.qi@linaro.org>
1468 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1469 instead of find_inferior.
1471 2016-05-05 Yao Qi <yao.qi@linaro.org>
1473 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1474 Initialize res to zero.
1476 2016-05-05 Yao Qi <yao.qi@linaro.org>
1478 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1481 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1483 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1484 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1485 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1487 2016-04-28 Par Olsson <par.olsson@windriver.com>
1488 Simon Marchi <simon.marchi@ericsson.com>
1490 * tracepoint.c (write_inferior_int8): New function.
1491 (cmd_qtenable_disable): Write enable flag using
1492 write_inferior_int8.
1494 2016-04-25 Yao Qi <yao.qi@linaro.org>
1496 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1497 (need_step_over_p): Return zero if the LWP has pending signals
1498 can be delivered on software single step target.
1500 2016-04-25 Yao Qi <yao.qi@linaro.org>
1502 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1503 return instead of error.
1505 2016-04-22 Yao Qi <yao.qi@linaro.org>
1507 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1510 2016-04-22 Yao Qi <yao.qi@linaro.org>
1512 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1513 signal when stepping over breakpoint with software single
1516 2016-04-21 Pedro Alves <palves@redhat.com>
1518 * linux-s390-low.c (s390_collect_ptrace_register)
1519 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1521 (s390_check_regset): Use void * instead of gdb_byte *.
1523 2016-04-20 Pedro Alves <palves@redhat.com>
1525 * configure: Renegerate.
1527 2016-04-20 Yao Qi <yao.qi@linaro.org>
1529 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1530 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1532 (arm_store_gregset): Likewise.
1534 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1536 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1537 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1538 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1539 (amd64-avx-mpx-linux.c): New rules.
1540 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1541 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1542 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1543 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1544 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1545 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1546 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1547 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1548 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1549 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1550 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1551 * linux-x86-low.c (x86_linux_read_description): Add case for
1552 X86_XSTATE_AVX_MPX_MASK.
1553 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1554 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1555 init_registers_i386_avx_mpx_linux.
1556 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1557 (initialize_low_tracepoint): Call
1558 init_registers_i386_avx_mpx_linux.
1559 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1560 (initialize_low_tracepoint): Call
1561 init_registers_amd64_avx_mpx_linux.
1562 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1563 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1564 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1567 2016-04-18 Pedro Alves <palves@redhat.com>
1569 * configure: Regenerate.
1571 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1573 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1574 (aarch64_emit_sub): Likewise.
1576 2016-04-12 Pedro Alves <palves@redhat.com>
1578 * utils.c (prepare_to_throw_exception): Delete.
1580 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1582 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1584 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1586 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1588 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1590 * linux-aarch64-ipa.c: Add <elf.h> include.
1591 * linux-ppc-ipa.c: Add <elf.h> include.
1592 * linux-s390-ipa.c: Add <elf.h> include.
1594 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1596 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1597 (get_raw_reg_ptr): Likewise.
1598 (get_trace_state_variable_value_ptr): Likewise.
1599 (set_trace_state_variable_value_ptr): Likewise.
1600 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1603 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1604 Marcin Kościelnicki <koriakin@0x04.net>
1607 * linux-ppc-low.c (emit_insns): New function.
1608 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1609 (ppc_emit_prologue): New function.
1610 (ppc_emit_epilogue): New function.
1611 (ppc_emit_add): New function.
1612 (ppc_emit_sub): New function.
1613 (ppc_emit_mul): New function.
1614 (ppc_emit_lsh): New function.
1615 (ppc_emit_rsh_signed): New function.
1616 (ppc_emit_rsh_unsigned): New function.
1617 (ppc_emit_ext): New function.
1618 (ppc_emit_zero_ext): New function.
1619 (ppc_emit_log_not): New function.
1620 (ppc_emit_bit_and): New function.
1621 (ppc_emit_bit_or): New function.
1622 (ppc_emit_bit_xor): New function.
1623 (ppc_emit_bit_not): New function.
1624 (ppc_emit_equal): New function.
1625 (ppc_emit_less_signed): New function.
1626 (ppc_emit_less_unsigned): New function.
1627 (ppc_emit_ref): New function.
1628 (ppc_emit_const): New function.
1629 (ppc_emit_reg): New function.
1630 (ppc_emit_pop): New function.
1631 (ppc_emit_stack_flush): New function.
1632 (ppc_emit_swap): New function.
1633 (ppc_emit_stack_adjust): New function.
1634 (ppc_emit_call): New function.
1635 (ppc_emit_int_call_1): New function.
1636 (ppc_emit_void_call_2): New function.
1637 (ppc_emit_if_goto): New function.
1638 (ppc_emit_goto): New function.
1639 (ppc_emit_eq_goto): New function.
1640 (ppc_emit_ne_goto): New function.
1641 (ppc_emit_lt_goto): New function.
1642 (ppc_emit_le_goto): New function.
1643 (ppc_emit_gt_goto): New function.
1644 (ppc_emit_ge_goto): New function.
1645 (ppc_write_goto_address): New function.
1646 (ppc_emit_ops_impl): New static variable.
1647 (ppc64v1_emit_prologue): New function.
1648 (ppc64v2_emit_prologue): New function.
1649 (ppc64_emit_epilogue): New function.
1650 (ppc64_emit_add): New function.
1651 (ppc64_emit_sub): New function.
1652 (ppc64_emit_mul): New function.
1653 (ppc64_emit_lsh): New function.
1654 (ppc64_emit_rsh_signed): New function.
1655 (ppc64_emit_rsh_unsigned): New function.
1656 (ppc64_emit_ext): New function.
1657 (ppc64_emit_zero_ext): New function.
1658 (ppc64_emit_log_not): New function.
1659 (ppc64_emit_bit_and): New function.
1660 (ppc64_emit_bit_or): New function.
1661 (ppc64_emit_bit_xor): New function.
1662 (ppc64_emit_bit_not): New function.
1663 (ppc64_emit_equal): New function.
1664 (ppc64_emit_less_signed): New function.
1665 (ppc64_emit_less_unsigned): New function.
1666 (ppc64_emit_ref): New function.
1667 (ppc64_emit_const): New function.
1668 (ppc64v1_emit_reg): New function.
1669 (ppc64v2_emit_reg): New function.
1670 (ppc64_emit_pop): New function.
1671 (ppc64_emit_stack_flush): New function.
1672 (ppc64_emit_swap): New function.
1673 (ppc64v1_emit_call): New function.
1674 (ppc64v2_emit_call): New function.
1675 (ppc64v1_emit_int_call_1): New function.
1676 (ppc64v2_emit_int_call_1): New function.
1677 (ppc64v1_emit_void_call_2): New function.
1678 (ppc64v2_emit_void_call_2): New function.
1679 (ppc64_emit_if_goto): New function.
1680 (ppc64_emit_eq_goto): New function.
1681 (ppc64_emit_ne_goto): New function.
1682 (ppc64_emit_lt_goto): New function.
1683 (ppc64_emit_le_goto): New function.
1684 (ppc64_emit_gt_goto): New function.
1685 (ppc64_emit_ge_goto): New function.
1686 (ppc64v1_emit_ops_impl): New static variable.
1687 (ppc64v2_emit_ops_impl): New static variable.
1688 (ppc_emit_ops): New function.
1689 (linux_low_target): Wire in ppc_emit_ops.
1691 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1692 Marcin Kościelnicki <koriakin@0x04.net>
1695 * Makefile.in: Add powerpc-*-ipa.o
1696 * configure.srv: Add ipa_obj for powerpc*-linux.
1697 * linux-ppc-ipa.c: New file.
1698 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1700 (PPC_FIELD): New macro.
1701 (PPC_SEXT): New macro.
1702 (PPC_OP6): New macro.
1703 (PPC_BO): New macro.
1704 (PPC_LI): New macro.
1705 (PPC_BD): New macro.
1706 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1707 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1708 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1709 (ppc_get_thread_area): New function.
1710 (is_elfv2_inferior): New function.
1711 (gen_ds_form): New function.
1712 (GEN_STD): New macro.
1713 (GEN_STDU): New macro.
1714 (GEN_LD): New macro.
1715 (GEN_LDU): New macro.
1716 (gen_d_form): New function.
1717 (GEN_ADDI): New macro.
1718 (GEN_ADDIS): New macro.
1719 (GEN_LI): New macro.
1720 (GEN_LIS): New macro.
1721 (GEN_ORI): New macro.
1722 (GEN_ORIS): New macro.
1723 (GEN_LWZ): New macro.
1724 (GEN_STW): New macro.
1725 (GEN_STWU): New macro.
1726 (gen_xfx_form): New function.
1727 (GEN_MFSPR): New macro.
1728 (GEN_MTSPR): New macro.
1729 (GEN_MFCR): New macro.
1730 (GEN_MTCR): New macro.
1731 (GEN_SYNC): New macro.
1732 (GEN_LWSYNC): New macro.
1733 (gen_x_form): New function.
1734 (GEN_OR): New macro.
1735 (GEN_MR): New macro.
1736 (GEN_LWARX): New macro.
1737 (GEN_STWCX): New macro.
1738 (GEN_CMPW): New macro.
1739 (gen_md_form): New function.
1740 (GEN_RLDICL): New macro.
1741 (GEN_RLDICR): New macro.
1742 (gen_i_form): New function.
1744 (GEN_BL): New macro.
1745 (gen_b_form): New function.
1746 (GEN_BNE): New macro.
1747 (GEN_LOAD): New macro.
1748 (GEN_STORE): New macro.
1749 (gen_limm): New function.
1750 (gen_atomic_xchg): New function.
1751 (gen_call): New function.
1752 (ppc_relocate_instruction): New function.
1753 (ppc_install_fast_tracepoint_jump_pad): New function.
1754 (ppc_get_min_fast_tracepoint_insn_len): New function.
1755 (ppc_get_ipa_tdesc_idx): New function.
1756 (the_low_target): Wire in the new functions.
1757 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1759 * linux-ppc-tdesc.h: New file.
1761 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1763 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1764 (alloc_jump_pad_buffer): New function.
1765 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1766 (alloc_jump_pad_buffer): New function.
1767 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1768 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1769 (alloc_jump_pad_buffer): New function.
1770 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1771 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1772 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1773 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1775 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1777 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1778 * linux-amd64-ipa.c: Likewise.
1779 * linux-i386-ipa.c: Likewise.
1780 * linux-s390-ipa.c: Likewise.
1781 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1782 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1783 set_trace_state_variable_value_ptr.
1784 (struct ipa_sym_addresses): Likewise.
1785 (symbol_list): Likewise.
1786 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1787 accessing gdb_collect directly.
1788 (gdb_collect_ptr_type): New typedef.
1789 (get_raw_reg_ptr_type): New typedef.
1790 (get_trace_state_variable_value_ptr_type): New typedef.
1791 (set_trace_state_variable_value_ptr_type): New typedef.
1792 (gdb_collect_ptr): New global.
1793 (get_raw_reg_ptr): New global.
1794 (get_trace_state_variable_value_ptr): New global.
1795 (set_trace_state_variable_value_ptr): New global.
1796 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1797 accessing get_raw_reg directly.
1798 (get_get_tsv_func_addr): Likewise for
1799 get_trace_state_variable_value_ptr.
1800 (get_set_tsv_func_addr): Likewise for
1801 set_trace_state_variable_value_ptr.
1802 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1804 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1806 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1808 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1810 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1812 (relocate_instruction): Remove own_buf.
1813 * server.c (own_buf): Make global.
1814 (handle_v_requests): Make global.
1815 * server.h (own_buf): New declaration.
1816 (handle_v_requests): New prototype.
1818 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1821 * linux-s390-low.c (add_insns): New function.
1822 (s390_emit_prologue): New function.
1823 (s390_emit_epilogue): New function.
1824 (s390_emit_add): New function.
1825 (s390_emit_sub): New function.
1826 (s390_emit_mul): New function.
1827 (s390_emit_lsh): New function.
1828 (s390_emit_rsh_signed): New function.
1829 (s390_emit_rsh_unsigned): New function.
1830 (s390_emit_ext): New function.
1831 (s390_emit_log_not): New function.
1832 (s390_emit_bit_and): New function.
1833 (s390_emit_bit_or): New function.
1834 (s390_emit_bit_xor): New function.
1835 (s390_emit_bit_not): New function.
1836 (s390_emit_equal): New function.
1837 (s390_emit_less_signed): New function.
1838 (s390_emit_less_unsigned): New function.
1839 (s390_emit_ref): New function.
1840 (s390_emit_if_goto): New function.
1841 (s390_emit_goto): New function.
1842 (s390_write_goto_address): New function.
1843 (s390_emit_litpool): New function.
1844 (s390_emit_const): New function.
1845 (s390_emit_call): New function.
1846 (s390_emit_reg): New function.
1847 (s390_emit_pop): New function.
1848 (s390_emit_stack_flush): New function.
1849 (s390_emit_zero_ext): New function.
1850 (s390_emit_swap): New function.
1851 (s390_emit_stack_adjust): New function.
1852 (s390_emit_set_r2): New function.
1853 (s390_emit_int_call_1): New function.
1854 (s390_emit_void_call_2): New function.
1855 (s390_emit_eq_goto): New function.
1856 (s390_emit_ne_goto): New function.
1857 (s390_emit_lt_goto): New function.
1858 (s390_emit_le_goto): New function.
1859 (s390_emit_gt_goto): New function.
1860 (s390_emit_ge_goto): New function.
1861 (s390x_emit_prologue): New function.
1862 (s390x_emit_epilogue): New function.
1863 (s390x_emit_add): New function.
1864 (s390x_emit_sub): New function.
1865 (s390x_emit_mul): New function.
1866 (s390x_emit_lsh): New function.
1867 (s390x_emit_rsh_signed): New function.
1868 (s390x_emit_rsh_unsigned): New function.
1869 (s390x_emit_ext): New function.
1870 (s390x_emit_log_not): New function.
1871 (s390x_emit_bit_and): New function.
1872 (s390x_emit_bit_or): New function.
1873 (s390x_emit_bit_xor): New function.
1874 (s390x_emit_bit_not): New function.
1875 (s390x_emit_equal): New function.
1876 (s390x_emit_less_signed): New function.
1877 (s390x_emit_less_unsigned): New function.
1878 (s390x_emit_ref): New function.
1879 (s390x_emit_if_goto): New function.
1880 (s390x_emit_const): New function.
1881 (s390x_emit_call): New function.
1882 (s390x_emit_reg): New function.
1883 (s390x_emit_pop): New function.
1884 (s390x_emit_stack_flush): New function.
1885 (s390x_emit_zero_ext): New function.
1886 (s390x_emit_swap): New function.
1887 (s390x_emit_stack_adjust): New function.
1888 (s390x_emit_int_call_1): New function.
1889 (s390x_emit_void_call_2): New function.
1890 (s390x_emit_eq_goto): New function.
1891 (s390x_emit_ne_goto): New function.
1892 (s390x_emit_lt_goto): New function.
1893 (s390x_emit_le_goto): New function.
1894 (s390x_emit_gt_goto): New function.
1895 (s390x_emit_ge_goto): New function.
1896 (s390_emit_ops): New function.
1897 (struct linux_target_ops): Fill in emit_ops hook.
1899 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1902 * Makefile.in: Add s390 IPA files.
1903 * configure.srv: Build IPA for s390.
1904 * linux-s390-ipa.c: New file.
1905 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1906 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1907 (tdesc_s390_linux32): Likewise.
1908 (init_registers_s390_linux32v1): Likewise.
1909 (tdesc_s390_linux32v1): Likewise.
1910 (init_registers_s390_linux32v2): Likewise.
1911 (tdesc_s390_linux32v2): Likewise.
1912 (init_registers_s390_linux64): Likewise.
1913 (tdesc_s390_linux64): Likewise.
1914 (init_registers_s390_linux64v1): Likewise.
1915 (tdesc_s390_linux64v1): Likewise.
1916 (init_registers_s390_linux64v2): Likewise.
1917 (tdesc_s390_linux64v2): Likewise.
1918 (init_registers_s390_te_linux64): Likewise.
1919 (tdesc_s390_te_linux64): Likewise.
1920 (init_registers_s390_vx_linux64): Likewise.
1921 (tdesc_s390_vx_linux64): Likewise.
1922 (init_registers_s390_tevx_linux64): Likewise.
1923 (tdesc_s390_tevx_linux64): Likewise.
1924 (init_registers_s390x_linux64): Likewise.
1925 (tdesc_s390x_linux64): Likewise.
1926 (init_registers_s390x_linux64v1): Likewise.
1927 (tdesc_s390x_linux64v1): Likewise.
1928 (init_registers_s390x_linux64v2): Likewise.
1929 (tdesc_s390x_linux64v2): Likewise.
1930 (init_registers_s390x_te_linux64): Likewise.
1931 (tdesc_s390x_te_linux64): Likewise.
1932 (init_registers_s390x_vx_linux64): Likewise.
1933 (tdesc_s390x_vx_linux64): Likewise.
1934 (init_registers_s390x_tevx_linux64): Likewise.
1935 (tdesc_s390x_tevx_linux64): Likewise.
1936 (have_hwcap_s390_vx): New static variable.
1937 (s390_arch_setup): Fill have_hwcap_s390_vx.
1938 (s390_get_thread_area): New function.
1939 (s390_ft_entry_gpr_esa): New const.
1940 (s390_ft_entry_gpr_zarch): New const.
1941 (s390_ft_entry_misc): New const.
1942 (s390_ft_entry_fr): New const.
1943 (s390_ft_entry_vr): New const.
1944 (s390_ft_main_31): New const.
1945 (s390_ft_main_64): New const.
1946 (s390_ft_exit_fr): New const.
1947 (s390_ft_exit_vr): New const.
1948 (s390_ft_exit_misc): New const.
1949 (s390_ft_exit_gpr_esa): New const.
1950 (s390_ft_exit_gpr_zarch): New const.
1951 (append_insns): New function.
1952 (s390_relocate_instruction): New function.
1953 (s390_install_fast_tracepoint_jump_pad): New function.
1954 (s390_get_min_fast_tracepoint_insn_len): New function.
1955 (s390_get_ipa_tdesc_idx): New function.
1956 (struct linux_target_ops): Wire in the above functions.
1957 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1958 * linux-s390-tdesc.h: New file.
1960 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1962 * linux-s390-low.c (s390_supports_tracepoints): New function.
1963 (struct linux_target_ops): Fill supports_tracepoints hook.
1965 2016-03-18 Yao Qi <yao.qi@linaro.org>
1967 * linux-low.c (lwp_signal_can_be_delivered): New function.
1968 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1970 2016-03-18 Yao Qi <yao.qi@linaro.org>
1972 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1973 0 if signal is enqueued. Remove 'signal' from one debugging
1974 message. Move one debugging message to some lines below.
1975 Remove code setting 'signal' to 0.
1977 2016-03-18 Yao Qi <yao.qi@linaro.org>
1979 * linux-low.c (linux_low_filter_event): Remove redundant
1980 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1982 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1984 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1985 (struct linux_target_ops): Wire in the above.
1987 2016-03-03 Yao Qi <yao.qi@linaro.org>
1989 * linux-low.c: Update comments to start_step_over.
1991 2016-03-03 Yao Qi <yao.qi@linaro.org>
1994 * linux-low.c (handle_extended_wait): Set child suspended
1995 if event_lwp->bp_reinsert isn't zero.
1997 2016-03-02 Yao Qi <yao.qi@linaro.org>
1999 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2000 enqueue_pending_signal.
2002 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2004 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2007 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2009 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2010 (s390_regmap_3264) [!__s390x__]: New global.
2011 (s390_collect_ptrace_register): Skip map entries containing -1.
2012 (s390_supply_ptrace_register): Ditto.
2013 (s390_fill_gprs_high): New function.
2014 (s390_store_gprs_high): New function.
2015 (s390_regsets): Add NT_S390_HIGH_GPRS.
2016 (s390_get_hwcap): Enable on 31-bit.
2017 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2018 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2019 Detect NT_S390_HIGH_GPRS.
2020 (s390_usrregs_info_3264): Enable on 31-bit.
2021 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2022 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2024 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2027 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2028 * configure.srv: Ditto.
2029 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2030 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2031 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2032 (init_registers_amd64_linux): Remove prototype.
2033 (tdesc_amd64_linux): Remove declaration.
2034 (get_ipa_tdesc): New function.
2035 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2036 initialize remaining tdescs.
2037 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2038 (init_registers_i386_linux): Remove prototype.
2039 (tdesc_i386_linux): Remove declaration.
2040 (get_ipa_tdesc): New function.
2041 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2042 initialize remaining tdescs.
2043 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2044 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2045 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2046 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2047 (x86_get_ipa_tdesc_idx): New function.
2048 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2049 * linux-x86-tdesc.h: New file.
2050 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2051 (target_get_ipa_tdesc_idx): New macro.
2052 * tracepoint.c (ipa_tdesc_idx): New macro.
2053 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2054 (symbol_list): Add ipa_tdesc_idx.
2055 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2056 (ipa_tdesc): Remove.
2057 (ipa_tdesc_idx): New variable.
2058 (get_context_regcache): Use get_ipa_tdesc.
2059 (gdb_collect): Ditto.
2061 * tracepoint.h (get_ipa_tdesc): New prototype.
2062 (ipa_tdesc): Remove.
2064 2016-02-24 Pedro Alves <palves@redhat.com>
2066 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2067 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2068 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2069 Factor out common code between the USE_SIGTRAP_SIGINFO and
2070 !USE_SIGTRAP_SIGINFO blocks.
2071 (linux_low_filter_event): Call save_stop_reason instead of
2072 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2074 (linux_wait_1): Update comments.
2076 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2078 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2079 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2080 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2081 ppc_insert_point, ppc_remove_point.
2083 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2085 * linux-s390-low.c (s390_supports_z_point_type): New function.
2086 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2088 2016-02-16 Yao Qi <yao.qi@linaro.org>
2090 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2091 PC. Get pc from regcache_read_pc.
2093 2016-02-12 Yao Qi <yao.qi@linaro.org>
2095 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2096 or linux_get_pc_32bit.
2097 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2099 2016-02-12 Yao Qi <yao.qi@linaro.org>
2101 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2102 arm_linux_get_next_pcs_fixup.
2104 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2106 * tracepoint.c (x_tracepoint_action_download): Change
2107 write_inferior_data_ptr to write_inferior_data_pointer.
2108 (cmd_qtstart): Likewise.
2109 (write_inferior_data_ptr): Remove.
2110 (download_agent_expr): Change write_inferior_data_ptr to
2111 write_inferior_data_pointer.
2112 (download_tracepoint_1): Likewise.
2113 (download_tracepoint): Likewise.
2114 (download_trace_state_variables): Likewise.
2116 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2117 Marcin Kościelnicki <koriakin@0x04.net>
2119 * tracepoint.c (struct tracepoint_action_ops): Remove.
2120 (struct tracepoint_action): Remove ops.
2121 (m_tracepoint_action_download, r_tracepoint_action_download)
2122 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2123 size and offset accordingly.
2124 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2125 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2126 (tracepoint_action_send, tracepoint_action_download): New functions.
2127 Helpers for trace action handlers.
2128 (add_tracepoint_action): Remove setup actions ops.
2129 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2131 2016-02-10 Yao Qi <yao.qi@linaro.org>
2133 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2135 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2137 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2139 * configure: Regenerate.
2141 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2143 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2144 void * to gdb_byte *.
2145 * linux-low.c (siginfo_fixup): Likewise.
2146 (linux_xfer_siginfo): Likewise.
2147 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2149 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2151 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2153 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2155 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2157 * linux-x86-low.c [__x86_64__]: Include
2158 "nat/amd64-linux-siginfo.h".
2159 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2160 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2161 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2162 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2163 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2164 (cpt_si_fd, si_timerid, si_overrun): Move from
2165 nat/amd64-linux-siginfo.c.
2166 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2168 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2170 * server.c (skip_to_semicolon): Remove.
2171 (process_point_options): Use strchrnul instead of
2174 2016-01-26 Yao Qi <yao.qi@linaro.org>
2176 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2177 * linux-low.c (install_software_single_step_breakpoints): Don't
2178 call regcache_read_pc.
2179 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2182 2016-01-26 Yao Qi <yao.qi@linaro.org>
2184 * linux-low.c (install_software_single_step_breakpoints): Call
2185 regcache_read_pc instead of get_pc.
2187 2016-01-26 Yao Qi <yao.qi@linaro.org>
2189 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2190 (unblock_async_io): Rename to ...
2191 (block_unblock_async_io): ... it. New function.
2192 (enable_async_io): Don't install SIGIO handler. Unblock it
2194 (disable_async_io): Don't ignore SIGIO. Block it instead.
2195 (initialize_async_io): Install SIGIO handler. Don't call
2198 2016-01-26 Yao Qi <yao.qi@linaro.org>
2200 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2201 first character is '\003', call *the_target->request_interrupt.
2203 2016-01-25 Yao Qi <yao.qi@linaro.org>
2205 * remote-utils.c (new_thread_notify): Remove.
2206 (dead_thread_notify): Likewise.
2207 * remote-utils.h (new_thread_notify): Remove declaration.
2208 (dead_thread_notify): Likewise.
2210 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2212 * gdb.trace/pending.exp: Fix expected message on continue.
2214 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2216 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2217 it works properly on big-endian machines where sizeof (CORE_ADDR)
2220 2016-01-21 Pedro Alves <palves@redhat.com>
2222 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2223 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2224 * configure: Regenerate.
2226 2016-01-21 Yao Qi <yao.qi@linaro.org>
2228 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2229 is_thumb and set it according to CPSR saved on the stack.
2230 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2231 arm_sigreturn_next_pc.
2233 2016-01-18 Yao Qi <yao.qi@linaro.org>
2235 * linux-low.c (linux_set_pc_64bit): New function.
2236 (linux_get_pc_64bit): New function.
2237 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2239 * linux-sparc-low.c (debug_threads): Remove declaration.
2240 (sparc_get_pc): Remove.
2241 (the_low_target): Use linux_get_pc_64bit instead of
2243 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2244 (the_low_target): Use linux_get_pc_64bit and
2247 2016-01-18 Yao Qi <yao.qi@linaro.org>
2249 * linux-arm-low.c (debug_threads): Remove declaration.
2250 (arm_get_pc, arm_set_pc): Remove.
2251 (the_low_target): Use linux_get_pc_32bit and
2253 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2254 (the_low_target): Use linux_get_pc_32bit and
2256 * linux-cris-low.c (debug_threads): Remove declaration.
2257 (cris_get_pc, cris_set_pc,): Remove.
2258 (the_low_target): Use linux_get_pc_32bit and
2260 * linux-crisv32-low.c (debug_threads): Remove declaration.
2261 (cris_get_pc, cris_set_pc): Remove.
2262 (the_low_target): Use linux_get_pc_32bit and
2264 * linux-low.c: Include inttypes.h.
2265 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2266 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2267 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2268 (the_low_target): Use linux_get_pc_32bit and
2270 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2271 (the_low_target): Use linux_get_pc_32bit and
2273 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2274 (the_low_target): Use linux_get_pc_32bit and
2276 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2277 (the_low_target): Use linux_get_pc_32bit and
2279 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2280 (the_low_target): Use linux_get_pc_32bit and
2283 2016-01-18 Gary Benson <gbenson@redhat.com>
2285 * configure.ac (AC_FUNC_FORK): New check.
2286 * config.in: Regenerate.
2287 * configure: Likewise.
2289 2016-01-14 Yao Qi <yao.qi@linaro.org>
2291 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2292 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2293 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2294 arm_get_next_pcs_ctor.
2296 2016-01-12 Josh Stone <jistone@redhat.com>
2297 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2299 * inferiors.h: Include "gdb_vecs.h".
2300 (struct process_info): Add syscalls_to_catch.
2301 * inferiors.c (remove_process): Free syscalls_to_catch.
2302 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2303 syscall_return stops.
2304 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2305 * server.c (handle_general_set): Handle QCatchSyscalls.
2306 (handle_query): Report support for QCatchSyscalls.
2307 * target.h (struct target_ops): Add supports_catch_syscall.
2308 (target_supports_catch_syscall): New macro.
2309 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2310 (struct lwp_info): Add syscall_state.
2311 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2312 Maintain syscall_state and syscalls_to_catch across exec.
2313 (get_syscall_trapinfo): New function, proxy to the_low_target.
2314 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2315 (linux_low_filter_event): Toggle syscall_state entry/return for
2316 syscall traps, and set it ignored for all others.
2317 (gdb_catching_syscalls_p): New function.
2318 (gdb_catch_this_syscall_p): New function.
2319 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2320 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2321 (linux_supports_catch_syscall): New function.
2322 (linux_target_ops): Install it.
2323 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2324 (the_low_target): Install it.
2326 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2328 * acinclude.m4: Include new ../warning.m4 file.
2329 * configure: Regenerated.
2330 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2332 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2334 * ax.c (is_goto_target): Mark static.
2335 * linux-low.c (register_addr): Likewise.
2336 (linux_fetch_registers, linux_store_registers): Likewise.
2337 * mem-break.c (any_persistent_commands): Fix old prototype.
2338 (add_commands_to_breakpoint): Mark static.
2339 * regcache.c (find_register_by_name): Delete unused func.
2340 * remote-utils.c (hex_or_minus_one): Mark static.
2341 * server.c (monitor_show_help): Mark static.
2342 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2343 handle_v_requests): Likewise.
2345 2016-01-12 Pedro Alves <palves@redhat.com>
2347 Remove use of the registered trademark symbol throughout.
2349 2016-01-08 Yao Qi <yao.qi@linaro.org>
2351 * remote-utils.c (getpkt): If c is '\003', call target hook
2354 2016-01-06 Yao Qi <yao.qi@linaro.org>
2356 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2357 linux-aarch32-low.c.
2358 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2359 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2360 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2361 (thumb2_breakpoint): Declare.
2362 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2363 linux-aarch32-low.h.
2364 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2365 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2366 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2368 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2370 * gdbreplay.c (gdbreplay_version): Change copyright year in
2372 * server.c (gdbserver_version): Likewise.
2374 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2376 * server.c (crc32_table): Delete.
2377 (crc32): Use libiberty's xcrc32 function.
2379 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2381 * lynx-low.c (lynx_delete_thread_callback): New function.
2382 (lynx_mourn): Properly delete our process and all of its
2383 threads. Remove call to clear_inferiors.
2385 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2387 * target.c (thread_search_callback): Add check that
2388 the thread_stopped target callback is not NULL before
2391 2015-12-21 Yao Qi <yao.qi@linaro.org>
2393 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2396 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2398 * server.c (handle_query): Call target_supports_software_single_step.
2400 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2402 * linux-low.c (single_step): New function.
2403 (linux_resume_one_lwp_throw): Call single_step.
2404 (start_step_over): Likewise.
2406 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2408 * Makefile.in (SFILES): Append arch/arm-linux.c,
2409 arch/arm-get-next-pcs.c.
2410 (arm-linux.o): New rule.
2411 (arm-get-next-pcs.o): New rule.
2412 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2414 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2415 to linux-aarch32-low.c.
2416 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2417 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2418 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2419 (thumb2_breakpoint_len): Likewise.
2420 (arm_is_thumb_mode): Make non-static.
2421 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2422 from linux-aarch32-low.c.
2423 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2424 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2425 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2426 (thumb2_breakpoint_len): Likewise.
2427 (arm_is_thumb_mode): New declaration.
2428 * linux-arm-low.c: Include arch/arm-linux.h
2429 aarch/arm-get-next-pcs.h, sys/syscall.h.
2430 (get_next_pcs_ops): New struct.
2431 (get_next_pcs_addr_bits_remove): New function.
2432 (get_next_pcs_is_thumb): New function.
2433 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2434 (arm_sigreturn_next_pc): Likewise.
2435 (get_next_pcs_syscall_next_pc): Likewise.
2436 (arm_gdbserver_get_next_pcs): Likewise.
2437 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2439 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2440 * server.h: Include gdb_vecs.h.
2442 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2444 * Makefile.in (SFILES): Append common/common-regcache.c.
2445 (OBS): Append common-regcache.o.
2446 (common-regcache.o): New rule.
2447 * regcache.c (init_register_cache): Initialize cache to
2449 (regcache_raw_read_unsigned): New function.
2450 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2451 register_status enum.
2453 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2455 * linux-aarch64-low.c (the_low_targets): Rename
2456 breakpoint_reinsert_addr to get_next_pcs.
2457 * linux-arm-low.c (the_low_targets): Likewise.
2458 * linux-bfin-low.c (the_low_targets): Likewise.
2459 * linux-cris-low.c (the_low_targets): Likewise.
2460 * linux-crisv32-low.c (the_low_targets): Likewise.
2461 * linux-low.c (can_software_single_step): Likewise.
2462 (install_software_single_step_breakpoints): New function.
2463 (start_step_over): Use install_software_single_step_breakpoints.
2464 * linux-low.h: New CORE_ADDR vector.
2465 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2467 * linux-mips-low.c (the_low_targets): Likewise.
2468 * linux-nios2-low.c (the_low_targets): Likewise.
2469 * linux-sparc-low.c (the_low_targets): Likewise.
2471 2015-12-17 Pedro Alves <palves@redhat.com>
2473 * linux-low.c (linux_kill_one_lwp): Remove references to
2475 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2477 (linux_init_signals): Delete.
2478 (initialize_low): Adjust.
2479 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2481 2015-12-16 Pedro Alves <palves@redhat.com>
2483 * configure.ac (compiler warning flags): When testing a
2484 -Wno-foo option, check whether -Wfoo works instead.
2485 * configure: Regenerate.
2487 2015-12-11 Don Breazeal <donb@codesourcery.com>
2489 * server.c (process_serial_event): Don't exit from gdbserver
2490 in remote mode if there are still active inferiors.
2492 2015-12-11 Yao Qi <yao.qi@linaro.org>
2494 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2495 arm_breakpoint_at if the process is 32-bit.
2497 2015-12-11 Yao Qi <yao.qi@linaro.org>
2499 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2502 2015-12-07 Yao Qi <yao.qi@linaro.org>
2504 * configure.srv: Append arm.o to srv_tgtobj for
2505 aarch64*-*-linux* target.
2506 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2507 from linux-arm-low.c.
2508 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2509 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2510 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2511 (thumb2_breakpoint_len): Likewise.
2512 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2513 (arm_breakpoint_kinds): Likewise.
2514 (arm_breakpoint_kind_from_pc): Likewise.
2515 (arm_sw_breakpoint_from_kind): Likewise.
2516 (arm_breakpoint_kind_from_current_state): Likewise.
2517 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2518 (arm_sw_breakpoint_from_kind): Declare.
2519 (arm_breakpoint_kind_from_current_state): Declare.
2520 (arm_breakpoint_at): Declare.
2521 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2522 arm_sw_breakpoint_from_kind if process is 32-bit.
2523 (aarch64_breakpoint_kind_from_pc): New function.
2524 (aarch64_breakpoint_kind_from_current_state): New function.
2525 (the_low_target): Initialize fields breakpoint_kind_from_pc
2526 and breakpoint_kind_from_current_state.
2527 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2528 linux-aarch32-low.c.
2529 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2530 (arm_breakpoint, arm_breakpoint_len): Likewise.
2531 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2532 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2533 (arm_is_thumb_mode): Likewise.
2534 (arm_breakpoint_at): Likewise.
2535 (arm_breakpoint_kind_from_pc): Likewise.
2536 (arm_sw_breakpoint_from_kind): Likewise.
2537 (arm_breakpoint_kind_from_current_state): Likewise.
2540 2015-08-04 Yao Qi <yao.qi@linaro.org>
2542 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2543 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2544 * server.c (extended_protocol): Remove "static".
2545 * server.h (extended_protocol): Declare it.
2547 2015-12-04 Josh Stone <jistone@redhat.com>
2549 * target.h (struct target_ops) <arch_setup>: Rename to ...
2550 (struct target_ops) <post_create_inferior>: ... this.
2551 (target_arch_setup): Rename to ...
2552 (target_post_create_inferior): ... this, calling post_create_inferior.
2553 * server.c (start_inferior): Update target_arch_setup calls to
2554 target_post_create_inferior.
2555 * linux-low.c (linux_low_ptrace_options): Forward declare.
2556 (linux_arch_setup): Update its comment for general use.
2557 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2558 (struct linux_target_ops): Use linux_post_create_inferior.
2559 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2560 to post_create_inferior.
2561 * nto-low.c (struct nto_target_ops): Likewise.
2562 * spu-low.c (struct spu_target_ops): Likewise.
2563 * win32-low.c (struct win32_target_ops): Likewise.
2565 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2567 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2569 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2571 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2572 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2573 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2574 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2575 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2576 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2577 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2578 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2579 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2580 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2581 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2582 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2584 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2586 * linux-low.c (linux_look_up_symbols): Don't call
2587 linux_supports_traceclone.
2588 * linux-low.h (thread_db_init): Remove use_events argument.
2589 * thread-db.c (thread_db_use_event): Remove global variable.
2590 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2591 (struct thread_db) <td_create_bp>: Remove field.
2592 (thread_db_create_event): Remove function.
2593 (thread_db_enable_reporting): Likewise.
2594 (find_one_thread): Don't check for thread_db_use_events.
2595 (attach_thread): Likewise.
2596 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2597 (try_thread_db_load_1): Don't check for thread_db_use_events.
2598 (thread_db_init): Remove use_events argument and thread events
2600 (remove_thread_event_breakpoints): Remove function.
2601 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2603 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2605 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2607 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2608 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2609 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2610 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2611 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2613 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2615 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2616 * linux-low.c (can_hardware_single_step): Use
2617 supports_hardware_single_step.
2618 (can_software_single_step): New function.
2619 (start_step_over): Call can_software_single_step.
2620 (linux_supports_hardware_single_step): New function.
2621 (struct target_ops) <supports_software_single_step>: Initialize.
2622 * linux-low.h (struct linux_target_ops)
2623 <supports_hardware_single_step>: Initialize.
2624 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2626 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2627 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2628 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2630 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2631 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2632 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2633 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2635 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2636 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2638 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2639 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2640 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2642 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2643 * target.h (struct target_ops): <supports_software_single_step>:
2645 (target_supports_software_single_step): New macro.
2647 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2649 * linux-low.c (linux_wait_1): Fix pc advance condition.
2650 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2651 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2653 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2655 * linux-arm-low.c (arm_is_thumb_mode): New function.
2656 (arm_breakpoint_at): Use arm_is_thumb_mode.
2657 (arm_breakpoint_kind_from_current_state): New function.
2658 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2660 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2661 (linux_breakpoint_kind_from_current_state): New function.
2662 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2663 * linux-low.h (struct linux_target_ops)
2664 <breakpoint_kind_from_current_state>: New field.
2665 * target.h (struct target_ops): Likewise.
2666 (target_breakpoint_kind_from_current_state): New macro.
2668 2015-11-30 Pedro Alves <palves@redhat.com>
2670 * linux-low.c (linux_resume): Wake up the event loop before
2673 2015-11-30 Pedro Alves <palves@redhat.com>
2675 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2677 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2679 * target.c (struct thread_search): New structure.
2680 (thread_search_callback): New function.
2681 (prev_general_thread): New global.
2682 (prepare_to_access_memory, done_accessing_memory): New functions.
2683 * target.h (prepare_to_access_memory, done_accessing_memory):
2684 Replace macros with function declarations.
2686 2015-11-30 Pedro Alves <palves@redhat.com>
2689 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2690 report TARGET_WAITKIND_NO_RESUMED.
2691 * remote-utils.c (prepare_resume_reply): Handle
2692 TARGET_WAITKIND_NO_RESUMED.
2693 * server.c (report_no_resumed): New global.
2694 (handle_query) <qSupported>: Handle "no-resumed+". Report
2695 "no-resumed+" support.
2696 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2697 return error if the client doesn't support no-resumed events.
2698 (push_stop_notification): New function.
2699 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2700 events if the client supports them.
2702 2015-11-30 Pedro Alves <palves@redhat.com>
2704 * linux-low.c (thread_still_has_status_pending_p): Don't check
2706 (lwp_resumed): New function.
2707 (status_pending_p_callback): Return early if the LWP is not
2708 supposed to be resumed.
2710 2015-11-30 Pedro Alves <palves@redhat.com>
2712 * linux-low.c (handle_extended_wait): Assert that the LWP's
2713 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2714 thread create events, leave the new child's status pending.
2715 (linux_low_filter_event): If GDB wants to hear about thread exit
2716 events, leave the LWP marked dead and don't delete it.
2717 (linux_wait_for_event_filtered): Don't check for thread exit.
2718 (filter_exit_event): New function.
2719 (linux_wait_1): Use it, when returning an exit event.
2720 (linux_resume_one_lwp_throw): Assert that the LWP's
2721 waitstatus is TARGET_WAITKIND_IGNORE.
2722 * remote-utils.c (prepare_resume_reply): Handle
2723 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2724 * server.c (report_thread_events): New global.
2725 (handle_general_set): Handle QThreadEvents.
2726 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2727 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2728 TARGET_WAITKIND_THREAD_EXITED.
2729 * server.h (report_thread_events): Declare.
2731 2015-11-30 Pedro Alves <palves@redhat.com>
2733 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2734 the thread's last_resume_kind was resume_stop.
2736 2015-11-30 Pedro Alves <palves@redhat.com>
2738 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2741 2015-11-30 Pedro Alves <palves@redhat.com>
2743 * server.c (handle_v_requests): Handle vCtrlC.
2745 2015-11-30 Pedro Alves <palves@redhat.com>
2747 * gdbthread.h (find_any_thread_of_pid): Declare.
2748 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2750 * server.c (handle_query): If current_thread is NULL, look for
2751 another thread of the selected process.
2753 2015-11-26 Daniel Colascione <dancol@dancol.org>
2754 Simon Marchi <simon.marchi@ericsson.com>
2756 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2757 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2759 * target.h (struct target_ops) <thread_name>: New field.
2760 (target_thread_name): New macro.
2762 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2764 * regcache.h (regcache_invalidate_pid): Add declaration.
2765 * regcache.c (regcache_invalidate_pid): New function, extracted
2766 from regcache_invalidate.
2767 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2768 Add trivial documentation comment.
2769 * lynx-low.c: Use regcache_invalidate_pid instead of
2770 regcache_invalidate.
2772 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2774 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2775 and Elf64_auxv_t if the target is Android.
2777 2015-11-22 Doug Evans <xdje42@gmail.com>
2779 * target.h: #include <sys/types.h>.
2781 2015-11-19 Pedro Alves <palves@redhat.com>
2783 * linux-low.c (linux_process_qsupported): Change prototype.
2785 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2787 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2788 and adjust to loop over all features.
2789 * server.c (handle_query) <qSupported>: Adjust to call
2790 target_process_qsupported once, passing it a vector of unprocessed
2792 * target.h (struct target_ops) <process_qsupported>: Change
2794 (target_process_qsupported): Adjust.
2796 2015-11-19 Pedro Alves <palves@redhat.com>
2798 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2800 * configure: Regenerate.
2802 2015-11-19 Pedro Alves <palves@redhat.com>
2804 * configure: Regenerate.
2806 2015-11-19 Yao Qi <yao.qi@linaro.org>
2808 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2811 2015-11-19 Yao Qi <yao.qi@linaro.org>
2813 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2814 (struct aarch64_operand): Move enum out.
2816 2015-11-19 Yao Qi <yao.qi@linaro.org>
2818 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2819 struct user_fpsimd_state *.
2820 (aarch64_store_fpregset): Likewise.
2822 2015-11-19 Yao Qi <yao.qi@linaro.org>
2824 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2825 struct user_pt_regs *.
2826 (aarch64_store_gregset): Likewise.
2828 2015-11-18 Pedro Alves <palves@redhat.com>
2830 * Makefile.in (all_object_files): Add $IPA_OBJS.
2832 2015-11-17 Pedro Alves <palves@redhat.com>
2834 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2835 GDB_SIGNAL_0 and gdb_signal_to_string.
2837 2015-11-17 Pedro Alves <palves@redhat.com>
2839 * win32-low.c (handle_output_debug_string): Remove parameter.
2840 (win32_kill): Remove our_status local and adjust call to
2841 handle_output_debug_string.
2842 (get_child_debug_event): Adjust call to
2843 handle_output_debug_string.
2845 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2847 * linux-mips-low.c (mips_fill_gregset): Add cast.
2848 (mips_store_gregset): Likewise.
2849 (mips_fill_fpregset): Likewise.
2850 (mips_store_fpregset): Likewise.
2852 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2854 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2857 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2859 * linux-mips-low.c (mips_linux_new_thread): Change type of
2860 watch_type to enum target_hw_bp_type.
2862 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2864 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2865 Change return type to arm_hwbp_type.
2867 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2869 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2870 (arm_store_gregset): Likewise.
2871 * linux-arm-low.c (arm_get_hwcap): Likewise.
2872 (arm_read_description): Likewise.
2874 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2876 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2878 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2880 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2881 (ppc_fill_vsxregset): Likewise.
2882 (ppc_store_vsxregset): Likewise.
2883 (ppc_fill_vrregset): Likewise.
2884 (ppc_store_vrregset): Likewise.
2885 (ppc_fill_evrregset): Likewise.
2886 (ppc_store_evrregset): Likewise.
2888 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2890 * linux-ppc-low.c (ppc_usrregs_info): Remove
2891 forward-declaration.
2892 (ppc_arch_setup): Move lower in file.
2894 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2896 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2897 (ps_pdwrite): Likewise.
2899 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2901 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2902 to after assert checks.
2904 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2906 * proc-service.c (ps_pdread): Add/adjust casts.
2907 (ps_pdwrite): Add/adjust casts.
2909 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2911 * server.c (handle_search_memory_1): Cast return value of
2914 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2916 * server.c (write_qxfer_response): Change type of data to
2919 2015-10-29 Pedro Alves <palves@redhat.com>
2921 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2923 2015-10-29 Pedro Alves <palves@redhat.com>
2925 * tracepoint.c (clear_installed_tracepoints): Add casts.
2927 2015-10-29 Pedro Alves <palves@redhat.com>
2929 * server.c (handle_v_cont, process_serial_event): Add enum
2930 gdb_signal casts to signal parsing code.
2932 2015-10-29 Pedro Alves <palves@redhat.com>
2934 * linux-low.h (NULL_REGSET): Define.
2935 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2936 * linux-arm-low.c (arm_regsets): Likewise.
2937 * linux-crisv32-low.c (cris_regsets): Likewise.
2938 * linux-m68k-low.c (m68k_regsets): Likewise.
2939 * linux-mips-low.c (mips_regsets): Likewise.
2940 * linux-nios2-low.c (nios2_regsets): Likewise.
2941 * linux-ppc-low.c (ppc_regsets): Likewise.
2942 * linux-s390-low.c (s390_regsets): Likewise.
2943 * linux-sh-low.c (sh_regsets): Likewise.
2944 * linux-sparc-low.c (sparc_regsets): Likewise.
2945 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2946 * linux-tile-low.c (tile_regsets): Likewise.
2947 * linux-x86-low.c (x86_regsets): Likewise.
2948 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2950 2015-10-29 Pedro Alves <palves@redhat.com>
2952 * linux-low.h (NULL_REGSET): Define.
2953 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2954 * linux-arm-low.c (arm_regsets): Likewise.
2955 * linux-crisv32-low.c (cris_regsets): Likewise.
2956 * linux-m68k-low.c (m68k_regsets): Likewise.
2957 * linux-mips-low.c (mips_regsets): Likewise.
2958 * linux-nios2-low.c (nios2_regsets): Likewise.
2959 * linux-ppc-low.c (ppc_regsets): Likewise.
2960 * linux-s390-low.c (s390_regsets): Likewise.
2961 * linux-sh-low.c (sh_regsets): Likewise.
2962 * linux-sparc-low.c (sparc_regsets): Likewise.
2963 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2964 * linux-tile-low.c (tile_regsets): Likewise.
2965 * linux-x86-low.c (x86_regsets): Likewise.
2966 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2968 2015-10-26 Doug Evans <dje@google.com>
2970 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2972 2015-10-26 Doug Evans <dje@google.com>
2974 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2976 2015-10-26 Doug Evans <dje@google.com>
2978 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2980 (attach_thread, find_new_threads_callback): Ditto.
2982 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2984 * mem-break.h (set_breakpoint_data): Remove.
2986 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2988 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2989 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2990 (initialize_low): Remove set_breakpoint_data call.
2991 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2992 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2993 (initialize_low): Remove set_breakpoint_data call.
2994 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2995 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2996 (initialize_low): Remove set_breakpoint_data call.
2998 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3000 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3001 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3002 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3003 * target.h (target_breakpoint_kind_from_pc): New macro.
3005 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3007 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3008 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3009 the default breakpoint kind.
3011 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3013 * linux-arm-low.c (arm_supports_z_point_type): Add software
3016 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3018 * linux-arm-low.c: Refactor breakpoint definitions.
3019 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3020 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3022 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3024 * Makefile.in: Add arm.c/o.
3025 * configure.srv: Likewise.
3026 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3027 (arm_breakpoint_kind_from_pc): New function.
3028 (arm_sw_breakpoint_from_kind): Return proper kind.
3029 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3031 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3033 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3035 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3036 (struct raw_breakpoint) <size>: Remove.
3037 (struct raw_breakpoint) <kind>: Add.
3038 (bp_size): New function.
3039 (bp_opcode): Likewise.
3040 (find_raw_breakpoint_at): Adjust for kind.
3041 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3042 (remove_memory_breakpoint): Adjust for kind call bp_size.
3043 (set_raw_breakpoint_at): Adjust for kind.
3044 (set_breakpoint): Likewise.
3045 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3046 (delete_raw_breakpoint): Adjust for kind.
3047 (delete_breakpoint): Likewise.
3048 (find_gdb_breakpoint): Likewise.
3049 (set_gdb_breakpoint_1): Likewise.
3050 (set_gdb_breakpoint): Likewise.
3051 (delete_gdb_breakpoint_1): Likewise.
3052 (delete_gdb_breakpoint): Likewise.
3053 (uninsert_raw_breakpoint): Likewise.
3054 (reinsert_raw_breakpoint): Likewise.
3055 (set_breakpoint_data): Remove.
3056 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3057 (check_mem_read): Adjust for kind call bp_size.
3058 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3059 (clone_one_breakpoint): Adjust for kind.
3060 * mem-break.h (set_gdb_breakpoint): Likewise.
3061 (delete_gdb_breakpoint): Likewise.
3062 * server.c (process_serial_event): Likewise.
3064 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3066 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3067 (struct linux_target_ops) <breakpoint>: Remove.
3068 (struct linux_target_ops) <breakpoint_len>: Remove.
3069 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3070 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3071 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3072 (arm_sw_breakpoint_from_kind): New function.
3073 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3074 (struct linux_target_ops) <breakpoint>: Remove.
3075 (struct linux_target_ops) <breakpoint_len>: Remove.
3076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3078 * linux-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3084 (struct linux_target_ops) <breakpoint>: Remove.
3085 (struct linux_target_ops) <breakpoint_len>: Remove.
3086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3088 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3089 and sw_breakpoint_from_kind to increment the pc.
3090 (linux_breakpoint_kind_from_pc): New function.
3091 (linux_sw_breakpoint_from_kind): New function.
3092 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3093 (initialize_low): Call breakpoint_kind_from_pc and
3094 sw_breakpoint_from_kind to replace breakpoint_data/len.
3095 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3098 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3099 (struct linux_target_ops) <breakpoint>: Remove.
3100 (struct linux_target_ops) <breakpoint_len>: Remove.
3101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3103 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3104 (struct linux_target_ops) <breakpoint>: Remove.
3105 (struct linux_target_ops) <breakpoint_len>: Remove.
3106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3108 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3109 (struct linux_target_ops) <breakpoint>: Remove.
3110 (struct linux_target_ops) <breakpoint_len>: Remove.
3111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3113 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3114 (struct linux_target_ops) <breakpoint>: Remove.
3115 (struct linux_target_ops) <breakpoint_len>: Remove.
3116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3118 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3119 (struct linux_target_ops) <breakpoint>: Remove.
3120 (struct linux_target_ops) <breakpoint_len>: Remove.
3121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3123 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3124 (struct linux_target_ops) <breakpoint>: Remove.
3125 (struct linux_target_ops) <breakpoint_len>: Remove.
3126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3128 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3129 (struct linux_target_ops) <breakpoint>: Remove.
3130 (struct linux_target_ops) <breakpoint_len>: Remove.
3131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3133 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3134 (struct linux_target_ops) <breakpoint>: Remove.
3135 (struct linux_target_ops) <breakpoint_len>: Remove.
3136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3138 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3139 (struct linux_target_ops) <breakpoint>: Remove.
3140 (struct linux_target_ops) <breakpoint_len>: Remove.
3141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3143 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3144 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3145 (struct linux_target_ops) <breakpoint>: Remove.
3146 (struct linux_target_ops) <breakpoint_len>: Remove.
3147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3149 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3150 (struct linux_target_ops) <breakpoint>: Remove.
3151 (struct linux_target_ops) <breakpoint_len>: Remove.
3152 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3153 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3155 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3157 * linux-cris-low.c (cris_get_pc): Remove void arg.
3159 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3161 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3164 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3166 * inferiors.c (thread_pid_matches_callback): New function.
3167 (find_thread_process): New function.
3168 (remove_thread): Reset current_thread.
3169 (remove_process): Assert threads have been removed first.
3171 2015-10-15 Yao Qi <yao.qi@linaro.org>
3173 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3175 (aarch64_remove_point): Likewise.
3176 * regcache.c (regcache_register_size): New function.
3178 2015-10-12 Yao Qi <yao.qi@linaro.org>
3180 * linux-aarch64-low.c: Update all callers as emit_load_store
3181 is renamed to aarch64_emit_load_store.
3183 2015-10-12 Yao Qi <yao.qi@linaro.org>
3185 * linux-aarch64-low.c: Update all callers of function renaming
3186 from emit_insn to aarch64_emit_insn.
3188 2015-10-12 Yao Qi <yao.qi@linaro.org>
3190 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3191 arch/aarch64-insn.h.
3192 (struct aarch64_memory_operand): Likewise.
3194 (emit_insn): Move to arch/aarch64-insn.c.
3195 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3196 (emit_load_store): Move to arch/aarch64-insn.c.
3197 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3198 (can_encode_int32): Remove.
3200 2015-10-12 Yao Qi <yao.qi@linaro.org>
3202 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3203 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3204 (aarch64_relocate_instruction): Likewise.
3205 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3206 (struct aarch64_insn_visitor): Likewise.
3208 2015-10-12 Yao Qi <yao.qi@linaro.org>
3210 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3211 (struct aarch64_insn_visitor): New.
3212 (struct aarch64_insn_relocation_data): New.
3213 (aarch64_ftrace_insn_reloc_b): New function.
3214 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3215 (aarch64_ftrace_insn_reloc_cb): Likewise.
3216 (aarch64_ftrace_insn_reloc_tb): Likewise.
3217 (aarch64_ftrace_insn_reloc_adr): Likewise.
3218 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3219 (aarch64_ftrace_insn_reloc_others): Likewise.
3221 (aarch64_relocate_instruction): Use visitor.
3223 2015-10-12 Yao Qi <yao.qi@linaro.org>
3225 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3226 int. Add argument buf.
3227 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3228 aarch64_relocate_instruction.
3230 2015-10-12 Yao Qi <yao.qi@linaro.org>
3232 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3233 argument insn. Remove local variable insn. Don't call
3235 (aarch64_install_fast_tracepoint_jump_pad): Call
3238 2015-09-30 Yao Qi <yao.qi@linaro.org>
3240 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3241 (emit_load_store_pair): Likewise.
3243 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3245 * dll.c (match_dll): Add cast(s).
3246 (unloaded_dll): Likewise.
3247 * linux-low.c (second_thread_of_pid_p): Likewise.
3248 (delete_lwp_callback): Likewise.
3249 (count_events_callback): Likewise.
3250 (select_event_lwp_callback): Likewise.
3251 (linux_set_resume_request): Likewise.
3252 * server.c (accumulate_file_name_length): Likewise.
3253 (emit_dll_description): Likewise.
3254 (handle_qxfer_threads_worker): Likewise.
3255 (visit_actioned_threads): Likewise.
3256 * thread-db.c (any_thread_of): Likewise.
3257 * tracepoint.c (same_process_p): Likewise.
3258 (match_blocktype): Likewise.
3259 (build_traceframe_info_xml): Likewise.
3261 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3263 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3265 (gdb_unparse_agent_expr): Likewise.
3266 * hostio.c (require_data): Likewise.
3267 (handle_pread): Likewise.
3268 * linux-low.c (disable_regset): Likewise.
3269 (fetch_register): Likewise.
3270 (store_register): Likewise.
3271 (get_dynamic): Likewise.
3272 (linux_qxfer_libraries_svr4): Likewise.
3273 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3274 (set_fast_tracepoint_jump): Likewise.
3275 (uninsert_fast_tracepoint_jumps_at): Likewise.
3276 (reinsert_fast_tracepoint_jumps_at): Likewise.
3277 (validate_inserted_breakpoint): Likewise.
3278 (clone_agent_expr): Likewise.
3279 * regcache.c (init_register_cache): Likewise.
3280 * remote-utils.c (putpkt_binary_1): Likewise.
3281 (decode_M_packet): Likewise.
3282 (decode_X_packet): Likewise.
3283 (look_up_one_symbol): Likewise.
3284 (relocate_instruction): Likewise.
3285 (monitor_output): Likewise.
3286 * server.c (handle_search_memory): Likewise.
3287 (handle_qxfer_exec_file): Likewise.
3288 (handle_qxfer_libraries): Likewise.
3289 (handle_qxfer): Likewise.
3290 (handle_query): Likewise.
3291 (handle_v_cont): Likewise.
3292 (handle_v_run): Likewise.
3293 (captured_main): Likewise.
3294 * target.c (write_inferior_memory): Likewise.
3295 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3296 * tracepoint.c (init_trace_buffer): Likewise.
3297 (add_tracepoint_action): Likewise.
3298 (add_traceframe): Likewise.
3299 (add_traceframe_block): Likewise.
3300 (cmd_qtdpsrc): Likewise.
3301 (cmd_qtdv): Likewise.
3302 (cmd_qtstatus): Likewise.
3303 (response_source): Likewise.
3304 (response_tsv): Likewise.
3305 (cmd_qtnotes): Likewise.
3306 (gdb_collect): Likewise.
3307 (initialize_tracepoint): Likewise.
3309 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3311 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3312 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3313 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3315 (enum aarch64_condition_codes): New enum.
3316 (w0): New static global.
3319 (struct aarch64_memory_operand) <type>: New
3320 MEMORY_OPERAND_POSTINDEX type.
3321 (postindex_memory_operand): New helper function.
3322 (emit_ret): New function.
3323 (emit_load_store_pair): New function, factored out of emit_stp
3324 with support for MEMORY_OPERAND_POSTINDEX.
3325 (emit_stp): Rewrite using emit_load_store_pair.
3326 (emit_ldp): New function.
3327 (emit_load_store): Likewise.
3328 (emit_ldr): Mention post-index instruction in comment.
3329 (emit_ldrh): New function.
3330 (emit_ldrb): New function.
3331 (emit_ldrsw): Mention post-index instruction in comment.
3332 (emit_str): Likewise.
3333 (emit_subs): New function.
3334 (emit_cmp): Likewise.
3335 (emit_and): Likewise.
3336 (emit_orr): Likewise.
3337 (emit_orn): Likewise.
3338 (emit_eor): Likewise.
3339 (emit_mvn): Likewise.
3340 (emit_lslv): Likewise.
3341 (emit_lsrv): Likewise.
3342 (emit_asrv): Likewise.
3343 (emit_mul): Likewise.
3344 (emit_sbfm): Likewise.
3345 (emit_sbfx): Likewise.
3346 (emit_ubfm): Likewise.
3347 (emit_ubfx): Likewise.
3348 (emit_csinc): Likewise.
3349 (emit_cset): Likewise.
3350 (emit_nop): Likewise.
3351 (emit_ops_insns): New helper function.
3352 (emit_pop): Likewise.
3353 (emit_push): Likewise.
3354 (aarch64_emit_prologue): New function.
3355 (aarch64_emit_epilogue): Likewise.
3356 (aarch64_emit_add): Likewise.
3357 (aarch64_emit_sub): Likewise.
3358 (aarch64_emit_mul): Likewise.
3359 (aarch64_emit_lsh): Likewise.
3360 (aarch64_emit_rsh_signed): Likewise.
3361 (aarch64_emit_rsh_unsigned): Likewise.
3362 (aarch64_emit_ext): Likewise.
3363 (aarch64_emit_log_not): Likewise.
3364 (aarch64_emit_bit_and): Likewise.
3365 (aarch64_emit_bit_or): Likewise.
3366 (aarch64_emit_bit_xor): Likewise.
3367 (aarch64_emit_bit_not): Likewise.
3368 (aarch64_emit_equal): Likewise.
3369 (aarch64_emit_less_signed): Likewise.
3370 (aarch64_emit_less_unsigned): Likewise.
3371 (aarch64_emit_ref): Likewise.
3372 (aarch64_emit_if_goto): Likewise.
3373 (aarch64_emit_goto): Likewise.
3374 (aarch64_write_goto_address): Likewise.
3375 (aarch64_emit_const): Likewise.
3376 (aarch64_emit_call): Likewise.
3377 (aarch64_emit_reg): Likewise.
3378 (aarch64_emit_pop): Likewise.
3379 (aarch64_emit_stack_flush): Likewise.
3380 (aarch64_emit_zero_ext): Likewise.
3381 (aarch64_emit_swap): Likewise.
3382 (aarch64_emit_stack_adjust): Likewise.
3383 (aarch64_emit_int_call_1): Likewise.
3384 (aarch64_emit_void_call_2): Likewise.
3385 (aarch64_emit_eq_goto): Likewise.
3386 (aarch64_emit_ne_goto): Likewise.
3387 (aarch64_emit_lt_goto): Likewise.
3388 (aarch64_emit_le_goto): Likewise.
3389 (aarch64_emit_gt_goto): Likewise.
3390 (aarch64_emit_ge_got): Likewise.
3391 (aarch64_emit_ops_impl): New static global variable.
3392 (aarch64_emit_ops): New target function, return
3393 &aarch64_emit_ops_impl.
3394 (struct linux_target_ops): Install it.
3396 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3398 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3399 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3401 * linux-aarch64-ipa.c: New file.
3402 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3404 (aarch64_get_thread_area): New target method.
3405 (extract_signed_bitfield): New helper function.
3406 (aarch64_decode_ldr_literal): New function.
3407 (enum aarch64_opcodes): New enum.
3408 (struct aarch64_register): New struct.
3409 (struct aarch64_operand): New struct.
3410 (x0): New static global.
3419 (aarch64_register): New helper function.
3420 (register_operand): Likewise.
3421 (immediate_operand): Likewise.
3422 (struct aarch64_memory_operand): New struct.
3423 (offset_memory_operand): New helper function.
3424 (preindex_memory_operand): Likewise.
3425 (enum aarch64_system_control_registers): New enum.
3426 (ENCODE): New macro.
3427 (emit_insn): New helper function.
3428 (emit_b): New function.
3429 (emit_bcond): Likewise.
3430 (emit_cb): Likewise.
3431 (emit_tb): Likewise.
3432 (emit_blr): Likewise.
3433 (emit_stp): Likewise.
3434 (emit_ldp_q_offset): Likewise.
3435 (emit_stp_q_offset): Likewise.
3436 (emit_load_store): Likewise.
3437 (emit_ldr): Likewise.
3438 (emit_ldrsw): Likewise.
3439 (emit_str): Likewise.
3440 (emit_ldaxr): Likewise.
3441 (emit_stxr): Likewise.
3442 (emit_stlr): Likewise.
3443 (emit_data_processing_reg): Likewise.
3444 (emit_data_processing): Likewise.
3445 (emit_add): Likewise.
3446 (emit_sub): Likewise.
3447 (emit_mov): Likewise.
3448 (emit_movk): Likewise.
3449 (emit_mov_addr): Likewise.
3450 (emit_mrs): Likewise.
3451 (emit_msr): Likewise.
3452 (emit_sevl): Likewise.
3453 (emit_wfe): Likewise.
3454 (append_insns): Likewise.
3455 (can_encode_int32_in): New helper function.
3456 (aarch64_relocate_instruction): New function.
3457 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3458 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3459 (struct linux_target_ops): Install aarch64_get_thread_area,
3460 aarch64_install_fast_tracepoint_jump_pad and
3461 aarch64_get_min_fast_tracepoint_insn_len.
3463 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3465 * Makefile.in (aarch64-insn.o): New rule.
3466 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3468 2015-09-21 Yao Qi <yao.qi@linaro.org>
3470 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3472 2015-09-21 Yao Qi <yao.qi@linaro.org>
3474 * tracepoint.c (max_jump_pad_size): Remove.
3476 2015-09-18 Yao Qi <yao.qi@linaro.org>
3478 * linux-aarch64-low.c: Don't include sys/uio.h.
3479 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3481 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3483 * tracepoint.c (eval_result_type): Change prototype.
3484 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3486 2015-09-15 Pedro Alves <palves@redhat.com>
3488 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3489 Check whether to report exec events instead of checking whether
3490 multiprocess is enabled.
3492 2015-09-15 Pedro Alves <palves@redhat.com>
3495 * remote-utils.c (prepare_resume_reply): Merge
3496 TARGET_WAITKIND_VFORK_DONE switch case with the
3497 TARGET_WAITKIND_FORKED case.
3499 2015-09-15 Yao Qi <yao.qi@linaro.org>
3501 * server.c (handle_query): Check string comparison using
3502 "else if" instead of "if".
3504 2015-09-15 Yao Qi <yao.qi@linaro.org>
3506 * server.c (vCont_supported): New global variable.
3507 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3508 matches. Append ";vContSupported+" to own_buf.
3509 (handle_v_requests): Append ";s;S" to own_buf if target supports
3510 hardware single step or vCont_supported is false.
3511 (capture_main): Set vCont_supported to zero.
3513 2015-09-15 Yao Qi <yao.qi@linaro.org>
3515 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3517 (linux_supports_hardware_single_step): ... New function.
3518 (linux_target_ops): Update.
3519 * lynx-low.c (lynx_target_ops): Set field
3520 supports_hardware_single_step to target_can_do_hardware_single_step.
3521 * nto-low.c (nto_target_ops): Likewise.
3522 * spu-low.c (spu_target_ops): Likewise.
3523 * win32-low.c (win32_target_ops): Likewise.
3524 * target.c (target_can_do_hardware_single_step): New function.
3525 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3526 Remove. <supports_hardware_single_step>: New field.
3527 (target_supports_conditional_breakpoints): Remove.
3528 (target_supports_hardware_single_step): New macro.
3529 (target_can_do_hardware_single_step): Declare.
3530 * server.c (handle_query): Use target_supports_hardware_single_step
3531 instead of target_supports_conditional_breakpoints.
3533 2015-09-15 Yao Qi <yao.qi@linaro.org>
3535 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3537 (struct linux_target_ops the_low_target): Install
3538 aarch64_linux_siginfo_fixup.
3540 2015-09-11 Don Breazeal <donb@codesourcery.com>
3541 Luis Machado <lgustavo@codesourcery.com>
3543 * linux-low.c (linux_mourn): Static declaration.
3544 (linux_arch_setup): Move in front of
3545 handle_extended_wait.
3546 (linux_arch_setup_thread): New function.
3547 (handle_extended_wait): Handle exec events. Call
3548 linux_arch_setup_thread. Make event_lwp argument a
3549 pointer-to-a-pointer.
3550 (check_zombie_leaders): Do not check stopped threads.
3551 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3552 (linux_low_filter_event): Add lwp and thread for exec'ing
3553 non-leader thread if leader thread has been deleted.
3554 Refactor code into linux_arch_setup_thread and call it.
3555 Pass child lwp pointer by reference to handle_extended_wait.
3556 (linux_wait_for_event_filtered): Update comment.
3557 (linux_wait_1): Prevent clobbering exec event status.
3558 (linux_supports_exec_events): New function.
3559 (linux_target_ops) <supports_exec_events>: Initialize new member.
3560 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3562 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3563 * server.c (report_exec_events): New global variable.
3564 (handle_query): Handle qSupported query for exec-events feature.
3565 (captured_main): Initialize report_exec_events.
3566 * server.h (report_exec_events): Declare new global variable.
3567 * target.h (struct target_ops) <supports_exec_events>: New
3569 (target_supports_exec_events): New macro.
3570 * win32-low.c (win32_target_ops) <supports_exec_events>:
3571 Initialize new member.
3573 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3575 * linux-low.c (linux_low_enable_btrace): Remove.
3576 (linux_target_ops): Replace linux_low_enable_btrace with
3577 linux_enable_btrace.
3579 2015-09-03 Yao Qi <yao.qi@linaro.org>
3581 * linux-aarch64-low.c (aarch64_insert_point): Call
3582 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3585 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3587 * linux-low.c (check_stopped_by_breakpoint): Use
3588 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3590 2015-08-27 Pedro Alves <palves@redhat.com>
3592 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3594 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3596 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3597 the XNEW-family equivalent.
3598 (compile_bytecodes): Likewise.
3599 * dll.c (loaded_dll): Likewise.
3600 * event-loop.c (append_callback_event): Likewise.
3601 (create_file_handler): Likewise.
3602 (create_file_event): Likewise.
3603 * hostio.c (handle_open): Likewise.
3604 * inferiors.c (add_thread): Likewise.
3605 (add_process): Likewise.
3606 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3607 * linux-arm-low.c (arm_new_process): Likewise.
3608 (arm_new_thread): Likewise.
3609 * linux-low.c (add_to_pid_list): Likewise.
3610 (linux_add_process): Likewise.
3611 (handle_extended_wait): Likewise.
3612 (add_lwp): Likewise.
3613 (enqueue_one_deferred_signal): Likewise.
3614 (enqueue_pending_signal): Likewise.
3615 (linux_resume_one_lwp_throw): Likewise.
3616 (linux_resume_one_thread): Likewise.
3617 (linux_read_memory): Likewise.
3618 (linux_write_memory): Likewise.
3619 * linux-mips-low.c (mips_linux_new_process): Likewise.
3620 (mips_linux_new_thread): Likewise.
3621 (mips_add_watchpoint): Likewise.
3622 * linux-x86-low.c (initialize_low_arch): Likewise.
3623 * lynx-low.c (lynx_add_process): Likewise.
3624 * mem-break.c (set_raw_breakpoint_at): Likewise.
3625 (set_breakpoint): Likewise.
3626 (add_condition_to_breakpoint): Likewise.
3627 (add_commands_to_breakpoint): Likewise.
3628 (clone_agent_expr): Likewise.
3629 (clone_one_breakpoint): Likewise.
3630 * regcache.c (new_register_cache): Likewise.
3631 * remote-utils.c (look_up_one_symbol): Likewise.
3632 * server.c (queue_stop_reply): Likewise.
3633 (start_inferior): Likewise.
3634 (queue_stop_reply_callback): Likewise.
3635 (handle_target_event): Likewise.
3636 * spu-low.c (fetch_ppc_memory): Likewise.
3637 (store_ppc_memory): Likewise.
3638 * target.c (set_target_ops): Likewise.
3639 * thread-db.c (thread_db_load_search): Likewise.
3640 (try_thread_db_load_1): Likewise.
3641 * tracepoint.c (add_tracepoint): Likewise.
3642 (add_tracepoint_action): Likewise.
3643 (create_trace_state_variable): Likewise.
3644 (cmd_qtdpsrc): Likewise.
3645 (cmd_qtro): Likewise.
3646 (add_while_stepping_state): Likewise.
3647 * win32-low.c (child_add_thread): Likewise.
3648 (get_image_name): Likewise.
3650 2015-08-25 Yao Qi <yao.qi@linaro.org>
3652 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3654 2015-08-25 Yao Qi <yao.qi@linaro.org>
3656 * Makefile.in (aarch64-linux.o): New rule.
3657 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3659 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3660 (aarch64_init_debug_reg_state): Make it extern.
3661 (aarch64_linux_prepare_to_resume): Remove.
3663 2015-08-25 Yao Qi <yao.qi@linaro.org>
3665 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3666 lwp_arch_private_info and ptid_of_lwp.
3668 2015-08-25 Yao Qi <yao.qi@linaro.org>
3670 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3671 Find proc_info by find_process_pid. All callers updated.
3673 2015-08-25 Yao Qi <yao.qi@linaro.org>
3675 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3677 (debug_reg_change_callback): Remove.
3678 (aarch64_notify_debug_reg_change): Remove.
3680 2015-08-25 Yao Qi <yao.qi@linaro.org>
3682 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3683 Call current_lwp_ptid.
3685 2015-08-25 Yao Qi <yao.qi@linaro.org>
3687 * linux-aarch64-low.c (debug_reg_change_callback): Use
3690 2015-08-25 Yao Qi <yao.qi@linaro.org>
3692 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3694 2015-08-25 Yao Qi <yao.qi@linaro.org>
3696 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3698 2015-08-25 Yao Qi <yao.qi@linaro.org>
3700 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3703 2015-08-25 Yao Qi <yao.qi@linaro.org>
3705 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3707 (debug_reg_change_callback): Remove argument entry and add argument
3708 lwp. Remove local variable thread. Don't print thread id in the
3709 debugging output. Don't check whether pid of thread equals to pid.
3710 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3711 iterate_over_lwps instead find_inferior.
3713 2015-08-24 Pedro Alves <palves@redhat.com>
3715 * inferiors.c (get_first_process): New function.
3716 * inferiors.h (get_first_process): New declaration.
3717 * remote-utils.c (read_ptid): Default to the first process in the
3718 list, instead of to the current thread's process.
3720 2015-08-24 Pedro Alves <palves@redhat.com>
3722 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3723 * event-loop.c: Likewise.
3724 * remote-utils.c: Likewise.
3725 * tracepoint.c: Likewise.
3727 2015-08-24 Pedro Alves <palves@redhat.com>
3729 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3732 2015-08-21 Pedro Alves <palves@redhat.com>
3734 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3735 instead of literal 1.
3737 2015-08-21 Pedro Alves <palves@redhat.com>
3739 * tdesc.c (default_description): Explicitly zero-initialize.
3741 2015-08-21 Pedro Alves <palves@redhat.com>
3744 * inferiors.c (remove_thread): Discard any pending stop reply for
3746 * server.c (remove_all_on_match_pid): Rename to ...
3747 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3749 (discard_queued_stop_replies): Change parameter to a ptid. Now
3751 (handle_v_kill, kill_inferior_callback, captured_main)
3752 (process_serial_event): Adjust.
3753 * server.h (discard_queued_stop_replies): Declare.
3755 2015-08-21 Pedro Alves <palves@redhat.com>
3757 * linux-low.c (wait_for_sigstop): Always switch to no thread
3758 selected if the previously current thread dies.
3759 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3760 process instead of the current thread's.
3761 * remote-utils.c (input_interrupt): Don't check if there's no
3763 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3764 current thread to the general thread fails, error out.
3765 (handle_qxfer_auxv, handle_qxfer_libraries)
3766 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3767 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3768 (handle_query): Check if there's a thread selected instead of
3769 checking whether there's any thread in the thread list.
3770 (handle_qxfer_threads, handle_qxfer_btrace)
3771 (handle_qxfer_btrace_conf): Don't error out early if there's no
3772 thread in the thread list.
3773 (handle_v_cont, myresume): Don't set the current thread to the
3775 (process_serial_event) <Hg handling>: Also set thread_id if the
3776 previous general thread is still alive.
3777 (process_serial_event) <g/G handling>: If setting the current
3778 thread to the general thread fails, error out.
3779 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3780 thread's lwp instead of the current thread's.
3781 * target.c (set_desired_thread): If the desired thread was not
3782 found, leave the current thread pointing to NULL. Return an int
3783 (boolean) indicating success.
3784 * target.h (set_desired_thread): Change return type to int.
3786 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3788 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3789 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3791 (ps_get_thread_area): New function.
3793 2015-08-19 Gary Benson <gbenson@redhat.com>
3795 * hostio.c (handle_pread): Do not attempt to read more data
3796 than hostio_reply_with_data can fit in a packet.
3798 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3800 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3802 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3804 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3806 2015-08-06 Pedro Alves <palves@redhat.com>
3808 * tracepoint.c (expr_eval_result): Now an int.
3810 2015-08-06 Pedro Alves <palves@redhat.com>
3812 * gdbthread.h (struct regcache): Forward declare.
3813 (struct thread_info) <regcache_data>: Now a struct regcache
3815 * inferiors.c (inferior_regcache_data)
3816 (set_inferior_regcache_data): Now work with struct regcache
3818 * inferiors.h (struct regcache): Forward declare.
3819 (inferior_regcache_data, set_inferior_regcache_data): Now work
3820 with struct regcache pointers.
3821 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3822 (free_register_cache_thread): Remove struct regcache pointer
3825 2015-08-06 Pedro Alves <palves@redhat.com>
3827 * server.c (captured_main): On error, print the exception message
3828 to stderr, and if run_once is set, throw a quit.
3830 2015-08-06 Pedro Alves <palves@redhat.com>
3832 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3835 2015-08-06 Pedro Alves <palves@redhat.com>
3837 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3838 reading beyond the passed in buffer length.
3840 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3842 * tracepoint.c (symbol_list) <required>: Remove.
3844 2015-08-06 Pedro Alves <palves@redhat.com>
3846 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3847 count if stopping and suspending threads.
3848 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3849 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3850 (linux_detach): Complete an ongoing step-over.
3851 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3853 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3854 (linux_wait_1): If passing a signal to the inferior after
3855 finishing a step-over, unsuspend and re-resume all lwps. If we
3856 see a single-step event but the thread should be continuing, don't
3857 pass the trap to gdb.
3858 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3859 internal_error instead of gdb_assert.
3860 (enqueue_pending_signal): New function.
3861 (check_ptrace_stopped_lwp_gone): Add debug output.
3862 (start_step_over): Use internal_error instead of gdb_assert.
3863 (complete_ongoing_step_over): New function.
3864 (linux_resume_one_thread): Don't resume a suspended thread.
3865 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3868 2015-08-06 Pedro Alves <palves@redhat.com>
3870 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3871 (linux_thread_alive): Use lwp_is_marked_dead.
3872 (extended_event_reported): Delete.
3873 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3874 instead of extended_event_reported.
3875 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3877 (lwp_is_marked_dead): New function.
3878 (lwp_running): Use lwp_is_marked_dead.
3879 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3882 2015-08-06 Pedro Alves <palves@redhat.com>
3884 * linux-low.c (linux_wait_1): Move fork event output out of the
3885 !report_to_gdb check. Pass event_child->waitstatus to
3886 target_waitstatus_to_string instead of ourstatus.
3888 2015-08-04 Yao Qi <yao.qi@linaro.org>
3890 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3891 if current_thread is 32 bit.
3893 2015-08-04 Yao Qi <yao.qi@linaro.org>
3895 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3896 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3897 * server.c (extended_protocol): Remove "static".
3898 * server.h (extended_protocol): Declare it.
3900 2015-08-04 Yao Qi <yao.qi@linaro.org>
3902 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3903 both aarch64 and aarch32.
3904 (aarch64_set_pc): Likewise.
3906 2015-08-04 Yao Qi <yao.qi@linaro.org>
3908 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3909 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3910 arm-with-neon.xml to srv_xmlfiles.
3911 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3912 (is_64bit_tdesc): New function.
3913 (aarch64_linux_read_description): New function.
3914 (aarch64_arch_setup): Call aarch64_linux_read_description.
3915 (regs_info): Rename to regs_info_aarch64.
3916 (aarch64_regs_info): Return right regs_info.
3917 (initialize_low_arch): Call initialize_low_arch_aarch32.
3919 2015-08-04 Yao Qi <yao.qi@linaro.org>
3921 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3922 * linux-aarch32-low.c: New file.
3923 * linux-aarch32-low.h: New file.
3924 * linux-arm-low.c (arm_fill_gregset): Move it to
3925 linux-aarch32-low.c.
3926 (arm_store_gregset): Likewise.
3927 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3928 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3929 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3930 (regs_info): Rename to regs_info_arm.
3931 (arm_regs_info): Return regs_info_aarch32 if
3932 have_ptrace_getregset is 1 and target description is
3933 arm_with_neon or arm_with_vfpv3.
3934 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3935 Call initialize_low_arch_aarch32 instead.
3937 2015-08-04 Yao Qi <yao.qi@linaro.org>
3939 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3940 * linux-low.c: ... here.
3941 * linux-low.h (have_ptrace_getregset): Declare it.
3943 2015-08-04 Pedro Alves <palves@redhat.com>
3945 * thread-db.c (struct thread_db): Use new typedefs.
3946 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3948 (disable_thread_event_reporting): Cast result of dlsym to
3949 destination function pointer type.
3950 (thread_db_mourn): Use td_ta_delete_ftype.
3952 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3954 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3956 (CDX_BREAKPOINT): Define for R2.
3957 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3958 (the_low_target): Add comments.
3960 2015-07-30 Yao Qi <yao.qi@linaro.org>
3962 * linux-arm-low.c (arm_hwcap): Remove it.
3963 (arm_read_description): New local variable arm_hwcap. Don't
3964 set arm_hwcap to zero.
3966 2015-07-30 Yao Qi <yao.qi@linaro.org>
3968 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3969 Use regcache->tdesc instead.
3970 (arm_store_wmmxregset): Likewise.
3971 (arm_fill_vfpregset): Likewise.
3972 (arm_store_vfpregset): Likewise.
3974 2015-07-30 Yao Qi <yao.qi@linaro.org>
3976 * linux-arm-low.c: Include arch/arm.h.
3977 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3978 (arm_store_gregset): Likewise.
3980 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3982 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3983 ptrace's 4th parameter.
3985 2015-07-27 Yao Qi <yao.qi@linaro.org>
3987 * configure.srv (case aarch64*-*-linux*): Don't set
3990 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3992 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3994 * linux-arm-low.c: Likewise.
3995 * linux-cris-low.c: Likewise.
3996 * linux-crisv32-low.c: Likewise.
3997 * linux-low.c: Likewise.
3998 * linux-m68k-low.c: Likewise.
3999 * linux-mips-low.c: Likewise.
4000 * linux-nios2-low.c: Likewise.
4001 * linux-s390-low.c: Likewise.
4002 * linux-sparc-low.c: Likewise.
4003 * linux-tic6x-low.c: Likewise.
4004 * linux-tile-low.c: Likewise.
4005 * linux-x86-low.c: Likewise.
4007 2015-07-24 Pedro Alves <palves@redhat.com>
4009 * config.in: Regenerate.
4010 * configure: Regenerate.
4012 2015-07-24 Pedro Alves <palves@redhat.com>
4014 * acinclude.m4: Include ../ptrace.m4.
4015 * configure.ac: Call GDB_AC_PTRACE.
4016 * config.in, configure: Regenerate.
4018 2015-07-24 Yao Qi <yao.qi@linaro.org>
4020 * linux-low.c (linux_create_inferior): Remove setting to
4021 proc->priv->new_inferior.
4022 (linux_attach): Likewise.
4023 (linux_low_filter_event): Likewise.
4024 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4026 2015-07-24 Yao Qi <yao.qi@linaro.org>
4028 * linux-low.c (linux_arch_setup): New function.
4029 (linux_low_filter_event): If proc->tdesc is NULL and
4030 proc->attached is true, call the_low_target.arch_setup.
4031 Otherwise, keep status pending, and return.
4032 (linux_resume_one_lwp_throw): Don't call get_pc if
4033 thread->while_stepping isn't NULL. Don't call
4034 get_thread_regcache if proc->tdesc is NULL.
4035 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4036 (linux_target_ops): Install arch_setup.
4037 * server.c (start_inferior): Call the_target->arch_setup.
4038 * target.h (struct target_ops) <arch_setup>: New field.
4039 (target_arch_setup): New marco.
4040 * lynx-low.c (lynx_target_ops): Update.
4041 * nto-low.c (nto_target_ops): Update.
4042 * spu-low.c (spu_target_ops): Update.
4043 * win32-low.c (win32_target_ops): Update.
4045 2015-07-24 Yao Qi <yao.qi@linaro.org>
4047 * linux-low.c (linux_add_process): Don't set
4048 proc->priv->new_inferior.
4049 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4050 (linux_attach): Likewise.
4052 2015-07-24 Yao Qi <yao.qi@linaro.org>
4054 * server.c (start_inferior): Code refactor.
4056 2015-07-24 Yao Qi <yao.qi@linaro.org>
4058 * server.c (process_serial_event): Set general_thread.
4060 2015-07-21 Yao Qi <yao.qi@linaro.org>
4062 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4063 aarch64_linux_get_debug_reg_capacity.
4065 2015-07-17 Yao Qi <yao.qi@linaro.org>
4067 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4068 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4069 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4070 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4071 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4072 (AARCH64_HWP_ALIGNMENT): Likewise.
4073 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4074 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4075 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4076 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4077 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4078 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4079 (struct aarch64_debug_reg_state): Likewise.
4080 (struct arch_lwp_info): Likewise.
4081 (aarch64_align_watchpoint): Likewise.
4082 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4083 (aarch64_watchpoint_length): Likewise.
4084 (aarch64_point_encode_ctrl_reg): Likewise
4085 (aarch64_point_is_aligned): Likewise.
4086 (aarch64_align_watchpoint): Likewise.
4087 (aarch64_linux_set_debug_regs):
4088 (aarch64_dr_state_insert_one_point): Likewise.
4089 (aarch64_dr_state_remove_one_point): Likewise.
4090 (aarch64_handle_breakpoint): Likewise.
4091 (aarch64_handle_aligned_watchpoint): Likewise.
4092 (aarch64_handle_unaligned_watchpoint): Likewise.
4093 (aarch64_handle_watchpoint): Likewise.
4095 2015-07-17 Yao Qi <yao.qi@linaro.org>
4097 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4098 and don't aarch64_get_debug_reg_state. All callers update.
4099 (aarch64_handle_aligned_watchpoint): Likewise.
4100 (aarch64_handle_unaligned_watchpoint): Likewise.
4101 (aarch64_handle_watchpoint): Likewise.
4102 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4103 (aarch64_remove_point): Likewise.
4105 2015-07-17 Yao Qi <yao.qi@linaro.org>
4107 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4109 (aarch64_handle_unaligned_watchpoint): Likewise.
4111 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4113 Revert the previous 3 commits:
4114 Move gdb_regex* to common/
4115 Move linux_find_memory_regions_full & co.
4116 gdbserver build-id attribute generator
4118 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4119 Jan Kratochvil <jan.kratochvil@redhat.com>
4121 gdbserver build-id attribute generator.
4122 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4123 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4124 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4126 (get_dynamic): Use find_pdhr to traverse program headers.
4127 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4128 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4129 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4130 (get_hex_build_id): New.
4131 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4132 to reply XML document.
4134 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4135 Jan Kratochvil <jan.kratochvil@redhat.com>
4137 * target.c: Include target/target-utils.h and fcntl.h.
4138 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4139 (target_fileio_read_stralloc): New functions.
4141 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4143 * Makefile.in (OBS): Add gdb_regex.o.
4145 * config.in: Rebuilt.
4146 * configure: Rebuilt.
4148 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4149 Jan Kratochvil <jan.kratochvil@redhat.com>
4151 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4152 * Makefile.in (OBS): Add target-utils.o.
4153 (linux-maps.o, target-utils.o): New.
4154 * configure.srv (srv_linux_obj): Add linux-maps.o.
4156 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4158 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4160 (the_low_target): Install it.
4162 2015-07-14 Pedro Alves <palves@redhat.com>
4164 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4165 Instead, ignore ECHILD, and throw an error for other errnos.
4167 2015-07-10 Pedro Alves <palves@redhat.com>
4169 * event-loop.c (struct callback_event) <data>: Change type to
4170 gdb_client_data instance instead of gdb_client_data pointer.
4171 (append_callback_event): Adjust.
4173 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4175 * linux-aarch64-low.c: Add comments for each linux_target_ops
4176 method. Remove comments already covered in target_ops and
4177 linux_target_ops definitions.
4178 (the_low_target): Add comments for each unimplemented method.
4180 2015-07-09 Yao Qi <yao.qi@linaro.org>
4182 * linux-aarch64-low.c (aarch64_regmap): Remove.
4183 (aarch64_usrregs_info): Remove.
4184 (regs_info): Set field usrregs to NULL.
4186 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4188 * linux-low.c: Include "rsp-low.h"
4189 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4190 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4191 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4192 (handle_btrace_enable_pt): New.
4193 (handle_btrace_general_set): Support "pt".
4194 (handle_btrace_conf_general_set): Support "pt:size".
4196 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4198 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4201 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4203 * linux-aarch64-low.c: Remove comment about endianness.
4204 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4205 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4208 2015-06-24 Gary Benson <gbenson@redhat.com>
4210 * linux-i386-ipa.c (stdint.h): Do not include.
4211 * lynx-i386-low.c (stdint.h): Likewise.
4212 * lynx-ppc-low.c (stdint.h): Likewise.
4213 * mem-break.c (stdint.h): Likewise.
4214 * thread-db.c (stdint.h): Likewise.
4215 * tracepoint.c (stdint.h): Likewise.
4216 * win32-low.c (stdint.h): Likewise.
4218 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4220 * server.c (write_qxfer_response): Update call to
4221 remote_escape_output.
4223 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4224 Jan Kratochvil <jan.kratochvil@redhat.com>
4226 Merge multiple hex conversions.
4227 * gdbreplay.c (tohex): Rename to 'fromhex'.
4228 (logchar): Use fromhex.
4230 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4232 * server.c (handle_qxfer_libraries): Set `version' attribute for
4235 2015-06-10 Gary Benson <gbenson@redhat.com>
4237 * target.h (struct target_ops) <multifs_open>: New field.
4238 <multifs_unlink>: Likewise.
4239 <multifs_readlink>: Likewise.
4240 * linux-low.c (nat/linux-namespaces.h): New include.
4241 (linux_target_ops): Initialize the_target->multifs_open,
4242 the_target->multifs_unlink and the_target->multifs_readlink.
4243 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4244 * hostio.c (hostio_fs_pid): New static variable.
4245 (hostio_handle_new_gdb_connection): New function.
4246 (handle_setfs): Likewise.
4247 (handle_open): Use the_target->multifs_open as appropriate.
4248 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4249 (handle_readlink): Use the_target->multifs_readlink as
4251 (handle_vFile): Handle vFile:setfs packets.
4252 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4253 after target_handle_new_gdb_connection.
4255 2015-06-10 Gary Benson <gbenson@redhat.com>
4257 * configure.ac (AC_CHECK_FUNCS): Add setns.
4258 * config.in: Regenerate.
4259 * configure: Likewise.
4260 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4261 (linux-namespaces.o): New rule.
4262 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4264 2015-06-09 Gary Benson <gbenson@redhat.com>
4266 * hostio.c (handle_open): Process mode argument with
4267 fileio_to_host_mode.
4269 2015-06-01 Yao Qi <yao.qi@linaro.org>
4271 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4272 * linux-x86-low.c: Likewise.
4274 2015-05-28 Don Breazeal <donb@codesourcery.com>
4276 * linux-low.c (handle_extended_wait): Initialize
4277 thread_info.last_resume_kind for new fork children.
4279 2015-05-15 Pedro Alves <palves@redhat.com>
4281 * target.h (target_handle_new_gdb_connection): Rewrite using if
4282 wrapped in do/while.
4284 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4286 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4287 * configure, config.in: Regenerate.
4288 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4291 2015-05-12 Don Breazeal <donb@codesourcery.com>
4293 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4294 PTRACE_EVENT_VFORK_DONE.
4295 (linux_low_ptrace_options, extended_event_reported): Add vfork
4297 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4298 and "vforkdone" for RSP 'T' Stop Reply Packet.
4299 * server.h (report_vfork_events): Declare
4302 2015-05-12 Don Breazeal <donb@codesourcery.com>
4304 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4305 (the_low_target) <new_fork>: Initialize new member.
4306 * linux-arm-low.c (arm_new_fork): New function.
4307 (the_low_target) <new_fork>: Initialize new member.
4308 * linux-low.c (handle_extended_wait): Call new target function
4310 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4311 * linux-mips-low.c (mips_add_watchpoint): New function
4312 extracted from mips_insert_point.
4313 (the_low_target) <new_fork>: Initialize new member.
4314 (mips_linux_new_fork): New function.
4315 (mips_insert_point): Call mips_add_watchpoint.
4316 * linux-x86-low.c (x86_linux_new_fork): New function.
4317 (the_low_target) <new_fork>: Initialize new member.
4319 2015-05-12 Don Breazeal <donb@codesourcery.com>
4321 * linux-low.c (handle_extended_wait): Implement return value,
4322 rename argument 'event_child' to 'event_lwp', handle
4323 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4324 (linux_low_ptrace_options): New function.
4325 (linux_low_filter_event): Call linux_low_ptrace_options,
4326 use different argument fo linux_enable_event_reporting,
4327 use return value from handle_extended_wait.
4328 (extended_event_reported): New function.
4329 (linux_wait_1): Call extended_event_reported and set
4330 status to report fork events.
4331 (linux_write_memory): Add pid to debug message.
4332 (reset_lwp_ptrace_options_callback): New function.
4333 (linux_handle_new_gdb_connection): New function.
4334 (linux_target_ops): Initialize new structure member.
4335 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4336 * lynx-low.c: Initialize new structure member.
4337 * remote-utils.c (prepare_resume_reply): Implement stop reason
4338 "fork" for "T" stop message.
4339 * server.c (handle_query): Call handle_new_gdb_connection.
4340 * server.h (report_fork_events): Declare global flag.
4341 * target.h (struct target_ops) <handle_new_gdb_connection>:
4343 (target_handle_new_gdb_connection): New macro.
4344 * win32-low.c: Initialize new structure member.
4346 2015-05-12 Don Breazeal <donb@codesourcery.com>
4348 * mem-break.c (APPEND_TO_LIST): Define macro.
4349 (clone_agent_expr): New function.
4350 (clone_one_breakpoint): New function.
4351 (clone_all_breakpoints): New function.
4352 * mem-break.h: Declare new functions.
4354 2015-05-12 Don Breazeal <donb@codesourcery.com>
4356 * linux-low.c (linux_supports_fork_events): New function.
4357 (linux_supports_vfork_events): New function.
4358 (linux_target_ops): Initialize new structure members.
4359 (initialize_low): Call linux_check_ptrace_features.
4360 * lynx-low.c (lynx_target_ops): Initialize new structure
4362 * server.c (report_fork_events, report_vfork_events):
4364 (handle_query): Add new features to qSupported packet and
4366 (captured_main): Initialize new global variables.
4367 * target.h (struct target_ops) <supports_fork_events>:
4369 <supports_vfork_events>: New member.
4370 (target_supports_fork_events): New macro.
4371 (target_supports_vfork_events): New macro.
4372 * win32-low.c (win32_target_ops): Initialize new structure
4375 2015-05-12 Gary Benson <gbenson@redhat.com>
4377 * server.c (handle_qxfer_exec_file): Use current process
4380 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4382 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4383 Remove HAVE_PTRACE_GETREGS conditionals.
4384 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4385 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4387 2015-05-08 Yao Qi <yao.qi@linaro.org>
4389 * linux-low.c (linux_supports_conditional_breakpoints): New
4391 (linux_target_ops): Install new target method.
4392 * lynx-low.c (lynx_target_ops): Install NULL hook for
4393 supports_conditional_breakpoints.
4394 * nto-low.c (nto_target_ops): Likewise.
4395 * spu-low.c (spu_target_ops): Likewise.
4396 * win32-low.c (win32_target_ops): Likewise.
4397 * server.c (handle_query): Check
4398 target_supports_conditional_breakpoints.
4399 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4401 (target_supports_conditional_breakpoints): New macro.
4403 2015-05-06 Pedro Alves <palves@redhat.com>
4406 * server.c (start_inferior): If the process exits, mourn it.
4408 2015-04-21 Gary Benson <gbenson@redhat.com>
4410 * hostio.c (fileio_open_flags_to_host): Factored out to
4411 fileio_to_host_openflags in common/fileio.c. Single use
4414 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4416 * linux-xtensa-low.c (xtensa_fill_gregset)
4417 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4420 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4422 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4423 (regs_info): Replace usrregs pointer with NULL.
4425 2015-04-17 Gary Benson <gbenson@redhat.com>
4427 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4428 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4429 * server.c (handle_qxfer_exec_file): New function.
4430 (qxfer_packets): Add exec-file entry.
4431 (handle_query): Report qXfer:exec-file:read as supported packet.
4433 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4435 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4437 2015-04-09 Gary Benson <gbenson@redhat.com>
4439 * hostio-errno.c (errno_to_fileio_error): Remove function.
4440 Update caller to use remote_fileio_to_fio_error.
4442 2015-04-09 Yao Qi <yao.qi@linaro.org>
4444 * linux-low.c (linux_insert_point): Call
4445 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4446 (linux_remove_point): Call remove_memory_breakpoint if type is
4448 * linux-x86-low.c (x86_insert_point): Don't call
4449 insert_memory_breakpoint.
4450 (x86_remove_point): Don't call remove_memory_breakpoint.
4452 2015-04-01 Pedro Alves <palves@redhat.com>
4453 Cleber Rosa <crosa@redhat.com>
4455 * server.c (gdbserver_usage): Reorganize and extend the usage
4458 2015-03-24 Pedro Alves <palves@redhat.com>
4460 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4461 output. Also dump TRAP_TRACE.
4462 (linux_low_filter_event): In debug output, distinguish a
4463 resume_stop SIGSTOP from a delayed SIGSTOP.
4465 2015-03-24 Gary Benson <gbenson@redhat.com>
4467 * linux-x86-low.c (x86_linux_new_thread): Moved to
4469 (x86_linux_prepare_to_resume): Likewise.
4471 2015-03-24 Gary Benson <gbenson@redhat.com>
4473 * Makefile.in (x86-linux-dregs.o): New rule.
4474 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4475 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4476 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4477 (x86_linux_dr_get): Likewise.
4478 (x86_linux_dr_set): Likewise.
4479 (update_debug_registers_callback): Likewise.
4480 (x86_linux_dr_set_addr): Likewise.
4481 (x86_linux_dr_get_addr): Likewise.
4482 (x86_linux_dr_set_control): Likewise.
4483 (x86_linux_dr_get_control): Likewise.
4484 (x86_linux_dr_get_status): Likewise.
4485 (x86_linux_update_debug_registers): Likewise.
4487 2015-03-24 Gary Benson <gbenson@redhat.com>
4489 * linux-x86-low.c (x86_linux_update_debug_registers):
4490 New function, factored out from...
4491 (x86_linux_prepare_to_resume): ...this.
4493 2015-03-24 Gary Benson <gbenson@redhat.com>
4495 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4496 (x86_linux_dr_set): Likewise.
4497 (update_debug_registers_callback): Likewise.
4498 (x86_linux_dr_set_addr): Likewise.
4499 (x86_linux_dr_get_addr): Likewise.
4500 (x86_linux_dr_set_control): Likewise.
4501 (x86_linux_dr_get_control): Likewise.
4502 (x86_linux_dr_get_status): Likewise.
4503 (x86_linux_prepare_to_resume): Likewise.
4505 2015-03-24 Gary Benson <gbenson@redhat.com>
4507 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4508 Use perror_with_name. Pass string through gettext.
4509 (x86_linux_dr_set): Likewise.
4511 2015-03-24 Gary Benson <gbenson@redhat.com>
4513 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4514 (x86_linux_dr_set_addr): ...this.
4515 (x86_dr_low_get_addr): Rename to...
4516 (x86_linux_dr_get_addr): ...this.
4517 (x86_dr_low_set_control): Rename to...
4518 (x86_linux_dr_set_control): ...this.
4519 (x86_dr_low_get_control): Rename to...
4520 (x86_linux_dr_get_control): ...this.
4521 (x86_dr_low_get_status): Rename to...
4522 (x86_linux_dr_get_status): ...this.
4523 (x86_dr_low): Update with new function names.
4525 2015-03-24 Gary Benson <gbenson@redhat.com>
4527 * Makefile.in (x86-linux.o): New rule.
4528 * configure.srv: Add x86-linux.o to relevant targets.
4529 * linux-low.c (lwp_set_arch_private_info): New function.
4530 (lwp_arch_private_info): Likewise.
4531 * linux-x86-low.c: Include nat/x86-linux.h.
4532 (arch_lwp_info): Removed structure.
4533 (update_debug_registers_callback):
4534 Use lwp_set_debug_registers_changed.
4535 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4536 and lwp_set_debug_registers_changed.
4537 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4539 2015-03-24 Gary Benson <gbenson@redhat.com>
4541 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4542 * linux-arm-low.c (arm_new_thread): Likewise.
4543 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4544 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4545 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4546 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4548 2015-03-24 Gary Benson <gbenson@redhat.com>
4550 * linux-low.c (ptid_of_lwp): New function.
4551 (lwp_is_stopped): Likewise.
4552 (lwp_stop_reason): Likewise.
4553 * linux-x86-low.c (update_debug_registers_callback):
4555 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4558 2015-03-24 Gary Benson <gbenson@redhat.com>
4560 * linux-low.h (linux_stop_lwp): Remove declaration.
4562 2015-03-24 Gary Benson <gbenson@redhat.com>
4564 * linux-low.h: Include nat/linux-nat.h.
4565 * linux-low.c (iterate_over_lwps_args): New structure.
4566 (iterate_over_lwps_filter): New function.
4567 (iterate_over_lwps): Likewise.
4568 * linux-x86-low.c (update_debug_registers_callback):
4569 Update signature to what iterate_over_lwps expects.
4570 Remove PID check that iterate_over_lwps now performs.
4571 (x86_dr_low_set_addr): Use iterate_over_lwps.
4572 (x86_dr_low_set_control): Likewise.
4574 2015-03-24 Gary Benson <gbenson@redhat.com>
4576 * linux-x86-low.c (x86_debug_reg_state): New function.
4577 (x86_linux_prepare_to_resume): Use the above.
4579 2015-03-24 Gary Benson <gbenson@redhat.com>
4581 * linux-low.c (current_lwp_ptid): New function.
4582 * linux-x86-low.c: Include nat/linux-nat.h.
4583 (x86_dr_low_get_addr): Use current_lwp_ptid.
4584 (x86_dr_low_get_control): Likewise.
4585 (x86_dr_low_get_status): Likewise.
4587 2015-03-20 Pedro Alves <palves@redhat.com>
4589 * tracepoint.c (cmd_qtstatus): Make "str" const.
4591 2015-03-20 Pedro Alves <palves@redhat.com>
4593 * server.c (handle_general_set): Make "req_str" const.
4595 2015-03-19 Pedro Alves <palves@redhat.com>
4597 * linux-low.c (linux_resume_one_lwp): Rename to ...
4598 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4599 instead call perror_with_name.
4600 (check_ptrace_stopped_lwp_gone): New function.
4601 (linux_resume_one_lwp): Reimplement as wrapper around
4602 linux_resume_one_lwp_throw that swallows errors if the LWP is
4605 2015-03-19 Pedro Alves <palves@redhat.com>
4607 * linux-low.c (count_events_callback, select_event_lwp_callback):
4608 No longer check whether the thread has resume_stop as last resume
4611 2015-03-19 Pedro Alves <palves@redhat.com>
4613 * linux-low.c (count_events_callback, select_event_lwp_callback):
4614 Use the lwp's status_pending_p field, not the thread's.
4616 2015-03-19 Pedro Alves <palves@redhat.com>
4618 * linux-low.c (select_event_lwp_callback): Update comments to
4619 no longer mention SIGTRAP.
4621 2015-03-18 Gary Benson <gbenson@redhat.com>
4623 * server.c (handle_query): Do not report vFile:fstat as supported.
4625 2015-03-11 Gary Benson <gbenson@redhat.com>
4627 * hostio.c (sys/types.h): New include.
4628 (sys/stat.h): Likewise.
4629 (common-remote-fileio.h): Likewise.
4630 (handle_fstat): New function.
4631 (handle_vFile): Handle vFile:fstat packets.
4633 2015-03-11 Gary Benson <gbenson@redhat.com>
4635 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4636 struct stat.st_blocks and struct stat.st_blksize.
4637 * configure: Regenerate.
4638 * config.in: Likewise.
4639 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4640 (OBS): Add common-remote-fileio.o.
4641 (common-remote-fileio.o): New rule.
4643 2015-03-09 Pedro Alves <palves@redhat.com>
4645 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4646 'struct sockaddr' pointer in 'accept' call.
4648 2015-03-09 Pedro Alves <palves@redhat.com>
4651 2015-03-07 Pedro Alves <palves@redhat.com>
4652 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4653 or <winsock2.h> here. Instead include "gdb_socket.h".
4654 (remote_open): Use union gdb_sockaddr_u.
4655 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4656 or <winsock2.h> here. Instead include "gdb_socket.h".
4657 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4658 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4660 (init_named_socket, gdb_agent_helper_thread): Use union
4663 2015-03-07 Pedro Alves <palves@redhat.com>
4665 * configure.ac (build_warnings): Move
4666 -Wdeclaration-after-statement to the C-specific set.
4667 * configure: Regenerate.
4669 2015-03-07 Pedro Alves <palves@redhat.com>
4671 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4672 or <winsock2.h> here. Instead include "gdb_socket.h".
4673 (remote_open): Use union gdb_sockaddr_u.
4674 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4675 or <winsock2.h> here. Instead include "gdb_socket.h".
4676 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4677 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4679 (init_named_socket, gdb_agent_helper_thread): Use union
4682 2015-03-07 Pedro Alves <palves@redhat.com>
4684 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4687 2015-03-06 Yao Qi <yao.qi@linaro.org>
4689 * linux-aarch64-low.c (aarch64_insert_point): Use
4690 show_debug_regs as a boolean.
4691 (aarch64_remove_point): Likewise.
4693 2015-03-05 Pedro Alves <palves@redhat.com>
4695 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4696 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4697 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4698 * nto-low.c (nto_target_ops): Likewise.
4699 * spu-low.c (spu_target_ops): Likewise.
4700 * win32-low.c (win32_target_ops): Likewise.
4702 2015-03-04 Pedro Alves <palves@redhat.com>
4704 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4705 Decide whether a breakpoint triggered based on the SIGTRAP's
4707 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4708 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4709 (linux_low_filter_event): Check for breakpoints before checking
4711 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4713 (linux_stopped_by_sw_breakpoint)
4714 (linux_supports_stopped_by_sw_breakpoint)
4715 (linux_stopped_by_hw_breakpoint)
4716 (linux_supports_stopped_by_hw_breakpoint): New functions.
4717 (linux_target_ops): Install new target methods.
4719 2015-03-04 Pedro Alves <palves@redhat.com>
4721 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4722 * server.c (swbreak_feature, hwbreak_feature): New globals.
4723 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4724 (captured_main): Clear swbreak_feature and hwbreak_feature.
4725 * server.h (swbreak_feature, hwbreak_feature): Declare.
4726 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4727 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4728 supports_stopped_by_hw_breakpoint>: New fields.
4729 (target_supports_stopped_by_sw_breakpoint)
4730 (target_stopped_by_sw_breakpoint)
4731 (target_supports_stopped_by_hw_breakpoint)
4732 (target_stopped_by_hw_breakpoint): Declare.
4734 2015-03-04 Pedro Alves <palves@redhat.com>
4736 enum lwp_stop_reason -> enum target_stop_reason
4737 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4738 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4739 (linux_wait_1, stuck_in_jump_pad_callback)
4740 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4741 (linux_stopped_by_watchpoint):
4742 * linux-low.h (enum lwp_stop_reason): Delete.
4743 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4744 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4746 2015-03-04 Yao Qi <yao.qi@linaro.org>
4748 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4750 2015-03-03 Gary Benson <gbenson@redhat.com>
4752 * hostio.c (handle_vFile): Fix prefix lengths.
4754 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4756 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4759 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4761 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4762 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4763 (clean): Add "rm -f" for above C files.
4764 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4765 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4766 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4767 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4768 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4769 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4770 (init_registers_s390x_vx_linux64)
4771 (init_registers_s390x_tevx_linux64)
4772 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4773 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4775 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4776 (s390_store_vxrs_high): New functions.
4777 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4779 (s390_arch_setup): Add logic for selecting one of the new target
4780 descriptions. Activate the new vector regsets if applicable.
4781 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4782 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4783 and init_registers_s390x_tevx_linux64.
4785 2015-03-01 Pedro Alves <palves@redhat.com>
4787 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4790 2015-02-27 Pedro Alves <palves@redhat.com>
4792 * linux-x86-low.c (u_debugreg_offset): New function.
4793 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4795 2015-02-27 Pedro Alves <palves@redhat.com>
4797 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4798 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4799 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4800 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4801 (ps_lsetfpregs, ps_getpid)
4802 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4803 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4804 (ps_lsetxregs, ps_plog): Declare.
4806 2015-02-27 Pedro Alves <palves@redhat.com>
4808 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4809 IP_AGENT_EXPORT_FUNC.
4810 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4811 IP_AGENT_EXPORT_FUNC.
4812 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4813 (IP_AGENT_EXPORT): Delete.
4814 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4815 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4816 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4817 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4818 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4819 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4820 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4821 (traceframe_read_count, traceframe_write_count)
4822 (traceframes_created, trace_state_variables, get_raw_reg)
4823 (get_trace_state_variable_value, set_trace_state_variable_value)
4824 (ust_loaded, helper_thread_id, cmd_buf): Use
4825 IPA_SYM_EXPORTED_NAME.
4826 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4827 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4828 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4829 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4830 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4831 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4832 EXTERN_C_PUSH/EXTERN_C_POP.
4833 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4834 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4835 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4836 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4837 (traceframe_write_count, traceframe_read_count)
4838 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4839 (about_to_request_buffer_space, get_trace_state_variable_value)
4840 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4841 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4842 EXTERN_C_PUSH/EXTERN_C_POP.
4843 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4844 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4845 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4846 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4847 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4848 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4849 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4850 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4852 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4853 (IP_AGENT_EXPORT_VAR_DECL): Define.
4855 (gdb_agent_get_raw_reg): Declare.
4857 2015-02-27 Tom Tromey <tromey@redhat.com>
4858 Pedro Alves <palves@redhat.com>
4860 Rename symbols whose names are reserved C++ keywords throughout.
4862 2015-02-27 Pedro Alves <palves@redhat.com>
4864 * Makefile.in (COMPILER): New, get it from autoconf.
4865 (CXX): Get from autoconf instead.
4866 (COMPILE.pre): Use COMPILER.
4867 (CC-LD): Rename to ...
4868 (CC_LD): ... this. Use COMPILER.
4869 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4870 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4871 * acinclude.m4: Include build-with-cxx.m4.
4872 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4873 Disable -Werror by default if building in C++ mode.
4874 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4875 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4876 the C++ compiler. Save/restore CXXFLAGS too.
4877 * configure: Regenerate.
4879 2015-02-27 Pedro Alves <palves@redhat.com>
4881 * acinclude.m4: Include libiberty.m4.
4882 * configure.ac: Call libiberty_INIT.
4883 * config.in, configure: Regenerate.
4885 2015-02-26 Pedro Alves <palves@redhat.com>
4887 * linux-low.c (linux_wait_1): When incrementing the PC past a
4888 program breakpoint always use the_low_target.breakpoint_len as
4889 increment, rather than the maximum between that and
4890 the_low_target.decr_pc_after_break.
4892 2015-02-23 Pedro Alves <palves@redhat.com>
4894 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4895 thread was doing a step-over; always adjust the PC if
4896 we stepped over a permanent breakpoint.
4897 (linux_wait_1): If we stepped over breakpoint that was on top of a
4898 permanent breakpoint, manually advance the PC past it.
4900 2015-02-23 Pedro Alves <palves@redhat.com>
4902 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4904 (x86_fill_gregset, x86_store_gregset): Use it when handling
4907 2015-02-20 Pedro Alves <palves@redhat.com>
4909 * thread-db.c: Include "nat/linux-procfs.h".
4910 (thread_db_init): Skip listing new threads if the kernel supports
4911 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4913 2015-02-20 Pedro Alves <palves@redhat.com>
4915 * linux-low.c (status_pending_p_callback): Use ptid_match.
4917 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4919 PR breakpoints/16812
4920 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4921 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4922 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4924 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4926 PR breakpoints/15956
4927 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4929 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4931 * linux-low.c (linux_low_btrace_conf): Print size.
4932 * server.c (handle_btrace_conf_general_set): New.
4933 (hanle_general_set): Call handle_btrace_conf_general_set.
4934 (handle_query): Report Qbtrace-conf:bts:size as supported.
4936 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4938 * linux-low.c (linux_low_enable_btrace): Update parameters.
4939 (linux_low_btrace_conf): New.
4940 (linux_target_ops)<to_btrace_conf>: Initialize.
4941 * server.c (current_btrace_conf): New.
4942 (handle_btrace_enable): Rename to ...
4943 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4944 to target_enable_btrace. Update comment. Update users.
4945 (handle_qxfer_btrace_conf): New.
4946 (qxfer_packets): Add btrace-conf entry.
4947 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4948 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4949 (target_ops)<read_btrace_conf>: New.
4950 (target_enable_btrace): Update parameters.
4951 (target_read_btrace_conf): New.
4953 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4955 * server.c (handle_btrace_general_set): Remove call to
4956 target_supports_btrace.
4957 (supported_btrace_packets): New.
4958 (handle_query): Call supported_btrace_packets.
4959 * target.h: include btrace-common.h.
4960 (btrace_target_info): Removed.
4961 (supports_btrace, target_supports_btrace): Update parameters.
4963 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4965 * Makefile.in (SFILES): Add common/btrace-common.c.
4966 (OBS): Add common/btrace-common.o.
4967 (btrace-common.o): Add build rules.
4968 * linux-low: Include btrace-common.h.
4969 (linux_low_read_btrace): Use struct btrace_data. Call
4970 btrace_data_init and btrace_data_fini.
4972 2015-02-06 Pedro Alves <palves@redhat.com>
4974 * thread-db.c (find_new_threads_callback): Add debug output.
4976 2015-02-04 Pedro Alves <palves@redhat.com>
4978 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4979 (resume_stopped_resumed_lwps): New function.
4980 (linux_wait_for_event_filtered): Use it.
4982 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4984 * Makefile.in (SFILES): Add linux-personality.c.
4985 (linux-personality.o): New rule.
4986 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4987 list of objects to be built.
4988 * linux-low.c: Include nat/linux-personality.h.
4989 (linux_create_inferior): Remove code to disable address space
4990 randomization (moved to ../nat/linux-personality.c). Create
4991 cleanup to disable address space randomization.
4993 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4995 * Makefile.in (posix-strerror.o): New rule.
4996 (mingw-strerror.o): Likewise.
4997 * configure: Regenerated.
4998 * configure.ac: Source file ../common/common.host. Initialize new
4999 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5001 2015-01-14 Yao Qi <yao@codesourcery.com>
5003 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5004 (ppc-linux.o): New rule.
5005 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5006 * configure.ac: AC_CHECK_FUNCS(getauxval).
5007 * config.in: Re-generated.
5008 * configure: Re-generated.
5009 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5010 ppc64_64bit_inferior_p
5012 2015-01-14 Yao Qi <yao@codesourcery.com>
5014 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5015 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5016 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5017 (PT_ORIG_R3, PT_TRAP): Likewise.
5018 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5019 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5020 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5022 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5024 * i387-fp.c (i387_cache_to_xsave): In look over
5025 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5026 zmmh_low_space field by use of zmmh_high_space.
5028 2015-01-09 Pedro Alves <palves@redhat.com>
5030 * linux-low.c (step_over_bkpt): Move higher up in the file.
5031 (handle_extended_wait): Don't store the stop_pc here.
5032 (get_stop_pc): Adjust comments and rename to ...
5033 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5034 stopped for a software breakpoint or hardware breakpoint.
5035 (thread_still_has_status_pending_p): New function.
5036 (status_pending_p_callback): Use
5037 thread_still_has_status_pending_p. If the event is no longer
5038 interesting, resume the LWP.
5039 (handle_tracepoints): Add assert.
5040 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5041 (wstatus_maybe_breakpoint): New function.
5042 (cancel_breakpoint): Delete function.
5043 (check_stopped_by_watchpoint): New function, factored out from
5044 linux_low_filter_event.
5045 (lp_status_maybe_breakpoint): Delete function.
5046 (linux_low_filter_event): Remove filter_ptid argument.
5047 Leave thread group exits pending here. Store the LWP's stop PC.
5048 Always leave events pending.
5049 (linux_wait_for_event_filtered): Pull all events out of the
5050 kernel, and leave them all pending.
5051 (count_events_callback, select_event_lwp_callback): Consider all
5053 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5054 (select_event_lwp): Only give preference to the stepping LWP in
5055 all-stop mode. Adjust comments.
5056 (ignore_event): New function.
5057 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5058 references to cancel_breakpoints. Adjust to renames. Also give
5059 equal priority to all LWPs that have had events in non-stop mode.
5060 If reporting a software breakpoint event, unadjust the LWP's PC.
5061 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5062 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5064 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5065 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5066 (linux_stopped_by_watchpoint): Adjust.
5067 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5068 * linux-low.h (enum lwp_stop_reason): New.
5069 (struct lwp_info) <stop_pc>: Adjust comment.
5070 <stopped_by_watchpoint>: Delete field.
5071 <stop_reason>: New field.
5072 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5073 * mem-break.c (software_breakpoint_inserted_here)
5074 (hardware_breakpoint_inserted_here): New function.
5075 * mem-break.h (software_breakpoint_inserted_here)
5076 (hardware_breakpoint_inserted_here): Declare.
5077 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5078 (cancel_breakpoints): Delete.
5079 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5080 (upload_fast_traceframes): Remove references to
5083 2015-01-09 Pedro Alves <palves@redhat.com>
5085 * thread-db.c (find_new_threads_callback): Ignore thread if the
5086 kernel thread ID is -1.
5088 2015-01-09 Pedro Alves <palves@redhat.com>
5090 * linux-low.c (linux_attach_fail_reason_string): Move to
5091 nat/linux-ptrace.c, and rename.
5092 (linux_attach_lwp): Update comment.
5093 (attach_proc_task_lwp_callback): New function.
5094 (linux_attach): Adjust to rename and use
5095 linux_proc_attach_tgid_threads.
5096 (linux_attach_fail_reason_string): Delete declaration.
5098 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5100 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5101 * server.c (gdbserver_version): Likewise.
5103 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5105 * remote-utils.c: Include ctype.h.
5106 (input_interrupt): Explicitly handle the case when the char
5107 received is the NUL byte. Improve the printing of non-ASCII
5110 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5112 * linux-low.c (linux_low_filter_event): Update call to
5113 linux_enable_event_reporting following the addition of
5114 a new parameter to that function.
5116 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5119 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5120 (AARCH64_FPCR_REGNO): Likewise.
5121 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5122 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5123 (aarch64_store_fpregset): Likewise.
5125 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5127 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5128 Remove FIXME comment about assumption about N.
5130 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5132 * configure.ac: If large-file support is disabled in GDBserver,
5133 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5134 * configure: Regenerate.
5136 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5138 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5139 warning upon ENODATA from ptrace.
5140 * linux-s390-low.c (s390_store_tdb): New.
5141 (s390_regsets): Add regset for NT_S390_TDB.
5143 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5145 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5146 without a fill_function.
5147 * linux-s390-low.c (s390_fill_last_break): Remove.
5148 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5149 (s390_arch_setup): Use regset's size instead of fill_function for
5152 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5154 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5155 the regset's store function when ptrace returned an error.
5156 * regcache.c (get_thread_regcache): Invalidate register cache
5157 before fetching inferior's registers.
5159 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5161 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5162 while-loop as for-loop.
5163 (regsets_store_inferior_registers): Likewise.
5165 2014-11-28 Yao Qi <yao@codesourcery.com>
5167 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5168 * config.in, configure: Re-generate.
5169 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5172 2014-11-21 Yao Qi <yao@codesourcery.com>
5174 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5175 (AC_CHECK_HEADERS): Remove malloc.h.
5176 * configure: Re-generated.
5177 * config.in: Re-generated.
5178 * server.h: Don't include alloca.h and malloc.h.
5179 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5180 Don't include malloc.h.
5182 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5184 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5185 corresponding ERRNO check in same block.
5187 2014-11-12 Pedro Alves <palves@redhat.com>
5189 * server.c (cont_thread): Update comment.
5190 (start_inferior, attach_inferior): No longer clear cont_thread.
5191 (handle_v_cont): No longer set cont_thread.
5192 (captured_main): Clear cont_thread each time a GDB connects.
5194 2014-11-12 Pedro Alves <palves@redhat.com>
5196 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5197 thread, and don't resume all threads if the Hc thread has exited.
5199 2014-11-12 Pedro Alves <palves@redhat.com>
5201 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5202 the process group instead of to a specific LWP.
5204 2014-10-15 Pedro Alves <palves@redhat.com>
5207 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5209 (arm_set_thread_context): Delete.
5210 (the_low_target): Adjust.
5211 * win32-i386-low.c (debug_registers_changed)
5212 (debug_registers_used): Delete.
5213 (update_debug_registers_callback): New function.
5214 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5215 needing to update their debug registers.
5216 (win32_get_current_dr): New function.
5217 (x86_dr_low_get_addr, x86_dr_low_get_control)
5218 (x86_dr_low_get_status): Fetch the debug register from the thread
5220 (i386_initial_stuff): Adjust.
5221 (i386_get_thread_context): Remove current_event parameter. Don't
5222 clear debug_registers_changed nor copy DR values to
5224 (i386_set_thread_context): Delete.
5225 (i386_prepare_to_resume): New function.
5226 (i386_thread_added): Mark the thread as needing to update irs
5228 (the_low_target): Remove i386_set_thread_context and install
5229 i386_prepare_to_resume.
5230 * win32-low.c (win32_get_thread_context): Adjust.
5231 (win32_set_thread_context): Use SetThreadContext
5233 (win32_prepare_to_resume): New function.
5234 (win32_require_context): New function, factored out from ...
5235 (thread_rec): ... this.
5236 (continue_one_thread): Call win32_prepare_to_resume on each thread
5237 we're about to continue.
5238 (win32_resume): Call win32_prepare_to_resume on the event thread.
5239 * win32-low.h (struct win32_thread_info)
5240 <debug_registers_changed>: New field.
5241 (struct win32_target_ops): Change prototype of set_thread_context,
5242 delete set_thread_context and add prepare_to_resume.
5243 (win32_require_context): New declaration.
5245 2014-10-08 Gary Benson <gbenson@redhat.com>
5247 * server.h: Do not include common-exceptions.h.
5249 2014-10-08 Gary Benson <gbenson@redhat.com>
5251 * server.h: Do not include cleanups.h.
5253 2014-09-30 James Hogan <james.hogan@imgtec.com>
5255 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5258 2014-09-23 Yao Qi <yao@codesourcery.com>
5260 * linux-low.c (lp_status_maybe_breakpoint): New function.
5261 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5262 (count_events_callback): Likewise.
5263 (select_event_lwp_callback): Likewise.
5264 (cancel_breakpoints_callback): Likewise.
5266 2014-09-19 Don Breazeal <donb@codesourcery.com>
5268 * linux-low.c (handle_extended_wait): Call
5269 linux_ptrace_get_extended_event.
5270 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5271 linux_is_extended_waitstatus.
5273 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5275 * Makefile.in (CPPFLAGS): Define.
5276 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5277 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5279 2014-09-16 Gary Benson <gbenson@redhat.com>
5281 * inferiors.h (current_inferior): Renamed as...
5282 (current_thread): New variable. All uses updated.
5283 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5284 (maybe_move_out_of_jump_pad): Likewise.
5285 (cancel_breakpoint): Likewise.
5286 (linux_low_filter_event): Likewise.
5287 (wait_for_sigstop): Likewise.
5288 (linux_resume_one_lwp): Likewise.
5289 (need_step_over_p): Likewise.
5290 (start_step_over): Likewise.
5291 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5292 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5293 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5294 and save_inferior as saved_thread.
5295 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5297 (regcache_invalidate_thread): Likewise.
5298 * remote-utils.c (prepare_resume_reply): Likewise.
5299 * thread-db.c (thread_db_get_tls_address): Likewise.
5300 (disable_thread_event_reporting): Likewise.
5301 (remove_thread_event_breakpoints): Likewise.
5302 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5304 * target.h (set_desired_inferior): Renamed as...
5305 (set_desired_thread): New declaration. All uses updated.
5306 * server.c (myresume): Updated comment to reference thread instead
5308 (handle_serial_event): Likewise.
5309 (handle_target_event): Likewise.
5311 2014-09-12 Tom Tromey <tromey@redhat.com>
5312 Gary Benson <gbenson@redhat.com>
5314 * regcache.h: Include common-regcache.h.
5315 (regcache_read_pc): Don't declare.
5316 * regcache.c (get_thread_regcache_for_ptid): New function.
5318 2014-09-11 Tom Tromey <tromey@redhat.com>
5319 Gary Benson <gbenson@redhat.com>
5321 * symbol.c: New file.
5322 * Makefile.in (SFILES): Add symbol.c.
5323 (OBS): Add symbol.o.
5325 2014-09-11 Gary Benson <gbenson@redhat.com>
5327 * target.c (target_stop_ptid, target_continue_ptid): New
5330 2014-09-11 Tom Tromey <tromey@redhat.com>
5331 Gary Benson <gbenson@redhat.com>
5333 * target.h: Include target/target.h.
5334 * target.c (target_read_memory, target_read_uint32)
5335 (target_write_memory): New functions.
5337 2014-09-11 Gary Benson <gbenson@redhat.com>
5339 * server.h (debug_hw_points): Don't declare.
5340 * server.c (debug_hw_points): Don't define. Replace all uses
5341 with show_debug_regs.
5342 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5343 all uses with show_debug_regs.
5345 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5347 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5348 endianness into account.
5349 (ppc_supply_ptrace_register): Likewise.
5351 2014-09-03 James Hogan <james.hogan@imgtec.com>
5353 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5354 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5356 2014-09-03 Gary Benson <gbenson@redhat.com>
5358 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5359 ALL_DEBUG_ADDRESS_REGISTERS.
5361 2014-09-02 Gary Benson <gbenson@redhat.com>
5363 * i386-low.h: Renamed as...
5364 * x86-low.h: New file. All type, function and variable name
5365 prefixes changed from "i386_" to "x86_". All references updated.
5366 * i386-low.c: Renamed as...
5367 * x86-low.c: New file. All type, function and variable name
5368 prefixes changed from "i386_" to "x86_". All references updated.
5370 2014-09-02 Gary Benson <gbenson@redhat.com>
5372 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5373 (x86_linux_new_thread): Likewise.
5375 2014-08-29 Gary Benson <gbenson@redhat.com>
5377 * server.h (setjmp.h): Do not include.
5378 (toplevel): Do not declare.
5379 (common-exceptions.h): Include.
5380 (cleanups.h): Likewise.
5381 * server.c (toplevel): Do not define.
5382 (exit_code): New static global.
5383 (detach_or_kill_for_exit_cleanup): New function.
5384 (main): New function. Original main renamed to...
5385 (captured_main): New function.
5386 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5388 2014-08-29 Gary Benson <gbenson@redhat.com>
5390 * Makefile.in (SFILES): Add common/common-exceptions.c.
5391 (OBS): Add common-exceptions.o.
5392 (common-exceptions.o): New rule.
5393 * utils.c (prepare_to_throw_exception): New function.
5395 2014-08-29 Gary Benson <gbenson@redhat.com>
5397 * config.in: Regenerate.
5398 * configure: Likewise.
5400 2014-08-29 Gary Benson <gbenson@redhat.com>
5402 * Makefile.in (SFILES): Add common/cleanups.c.
5404 (cleanups.o): New rule.
5406 2014-08-29 Gary Benson <gbenson@redhat.com>
5408 * utils.c (internal_vwarning): New function.
5410 2014-08-28 Gary Benson <gbenson@redhat.com>
5412 * utils.h (fatal): Remove declaration.
5413 * utils.c (fatal): Remove function.
5415 2014-08-28 Gary Benson <gbenson@redhat.com>
5417 * tracepoint.c (gdb_agent_init): Replace fatal with
5419 (initialize_tracepoint): Likewise.
5421 2014-08-28 Gary Benson <gbenson@redhat.com>
5423 * remote-utils.c (remote_prepare): Replace fatal with error.
5425 2014-08-28 Gary Benson <gbenson@redhat.com>
5427 * linux-low.c (linux_async): Replace fatal with warning.
5429 (linux_start_non_stop): Return -1 if linux_async failed.
5431 2014-08-28 Gary Benson <gbenson@redhat.com>
5433 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5435 (i386_dr_low_get_addr): Remove vague comment.
5436 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5439 2014-08-28 Gary Benson <gbenson@redhat.com>
5441 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5442 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5444 (linux_resume_one_lwp): Likewise.
5445 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5447 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5448 with internal_error.
5449 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5450 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5451 (find_register_by_name): Replace fatal with internal_error.
5452 (find_regno): Likewise.
5453 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5454 * thread-db.c (thread_db_create_event): Likewise.
5455 (thread_db_load_search): Likewise.
5456 (try_thread_db_load_1): Likewise.
5457 * tracepoint.c (get_jump_space_head): Replace fatal with
5459 (claim_trampoline_space): Likewise.
5460 (have_fast_tracepoint_trampoline_buffer): Likewise.
5461 (cmd_qtstart): Likewise.
5462 (stop_tracing): Likewise.
5463 (fast_tracepoint_collecting): Likewise.
5464 (target_malloc): Likewise.
5465 (download_tracepoint): Likewise.
5466 (download_trace_state_variables): Replace check with gdb_assert.
5467 (upload_fast_traceframes): Replace fatal with internal_error.
5469 2014-08-19 Tom Tromey <tromey@redhat.com>
5470 Gary Benson <gbenson@redhat.com>
5472 * Makefile.in (SFILES): Add common/common-debug.c.
5473 (OBS): Add common-debug.o.
5474 (common-debug.o): New rule.
5475 * debug.h (debug_printf): Don't declare.
5476 * debug.c (debug_printf): Renamed and rewritten as...
5477 (debug_vprintf): New function.
5479 2014-08-19 Gary Benson <gbenson@redhat.com>
5481 * utils.h: Do not include print-utils.h.
5483 2014-08-19 Tom Tromey <tromey@redhat.com>
5484 Gary Benson <gbenson@redhat.com>
5486 * server.h: Add static assertion.
5487 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5489 2014-08-19 Tom Tromey <tromey@redhat.com>
5490 Gary Benson <gbenson@redhat.com>
5492 * Makefile.in (SFILES): Add common/errors.c.
5493 (OBS): Add errors.o.
5494 (IPA_OBS): Add errors-ipa.o.
5495 (errors.o): New rule.
5496 (errors-ipa.o): Likewise.
5497 * utils.h (perror_with_name, error, warning): Don't declare.
5498 * utils.c (warning): Renamed and rewritten as...
5499 (vwarning): New function.
5500 (error): Renamed and rewritten as...
5501 (verror): New function.
5502 (internal_error): Renamed and rewritten as...
5503 (internal_verror): New function.
5505 2014-08-07 Gary Benson <gbenson@redhat.com>
5507 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5508 * configure: Regenerate.
5509 * config.in: Likewise.
5510 * server.h: Do not include errno.h.
5511 * event-loop.c: Likewise.
5512 * hostio-errno.c: Likewise.
5513 * linux-low.c: Likewise.
5514 * remote-utils.c: Likewise.
5515 * spu-low.c: Likewise.
5516 * utils.c: Likewise.
5517 * gdbreplay.c: Unconditionally include errno.h.
5519 2014-08-07 Gary Benson <gbenson@redhat.com>
5521 * server.h: Do not include string.h.
5522 * event-loop.c: Likewise.
5523 * linux-low.c: Likewise.
5524 * regcache.c: Likewise.
5525 * remote-utils.c: Likewise.
5526 * spu-low.c: Likewise.
5527 * utils.c: Likewise.
5529 2014-08-07 Gary Benson <gbenson@redhat.com>
5531 * server.h: Do not include gdb_assert.h.
5533 2014-08-07 Gary Benson <gbenson@redhat.com>
5535 * server.h: Do not include common-utils.h.
5537 2014-08-07 Gary Benson <gbenson@redhat.com>
5539 * server.h: Do not include ptid.h.
5540 * notif.h: Likewise.
5542 2014-08-07 Gary Benson <gbenson@redhat.com>
5544 * server.h: Do not include gdb_locale.h.
5546 2014-08-07 Gary Benson <gbenson@redhat.com>
5548 * server.h: Do not include gdb/signals.h.
5549 * win32-low.c: Likewise.
5551 2014-08-07 Gary Benson <gbenson@redhat.com>
5553 * server.h: Do not include pathmax.h.
5555 2014-08-07 Gary Benson <gbenson@redhat.com>
5557 * server.h: Do not include libiberty.h.
5558 * linux-bfin-low.c: Likewise.
5560 2014-08-07 Gary Benson <gbenson@redhat.com>
5562 * server.h: Do not include ansidecl.h.
5564 2014-08-07 Gary Benson <gbenson@redhat.com>
5566 * linux-x86-low.c: Do not include stddef.h.
5567 * lynx-ppc-low.c: Likewise.
5568 * tracepoint.c: Likewise.
5570 2014-08-07 Gary Benson <gbenson@redhat.com>
5572 * server.h: Do not include stdarg.h.
5573 * nto-low.c: Likewise.
5575 2014-08-07 Gary Benson <gbenson@redhat.com>
5577 * server.h: Do not include stdlib.h.
5578 * inferiors.c: Likewise.
5579 * linux-low.c: Likewise.
5580 * regcache.c: Likewise.
5581 * spu-low.c: Likewise.
5582 * tracepoint.c: Likewise.
5583 * utils.c: Likewise.
5585 2014-08-07 Gary Benson <gbenson@redhat.com>
5587 * server.h: Do not include stdio.h.
5588 * linux-low.c: Likewise.
5589 * remote-utils.c: Likewise.
5590 * spu-low.c: Likewise.
5591 * utils.c: Likewise.
5592 * wincecompat.c: Likewise.
5594 2014-08-06 Gary Benson <gbenson@redhat.com>
5596 * regcache.c (init_register_cache): Move conditionals inside if.
5598 2014-08-06 Gary Benson <gbenson@redhat.com>
5600 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5602 2014-07-31 Gary Benson <gbenson@redhat.com>
5604 * ax.h: Do not include server.h.
5605 * gdbthread.h: Likewise.
5606 * lynx-low.h: Likewise.
5607 * notif.h: Likewise.
5609 2014-07-30 Gary Benson <gbenson@redhat.com>
5611 * server.h: Include common-defs.h.
5612 Do not include config.h or build-gnulib-gdbserver/config.h.
5614 2014-07-30 Gary Benson <gbenson@redhat.com>
5616 * hostio-errno.c: Move server.h to top of includes list.
5617 * inferiors.c: Likewise.
5618 * linux-x86-low.c: Likewise.
5619 * notif.c: Include server.h.
5621 2014-07-24 Tom Tromey <tromey@redhat.com>
5622 Gary Benson <gbenson@redhat.com>
5624 * server.h (CORE_ADDR): Now unsigned.
5626 2014-07-16 Pedro Alves <palves@redhat.com>
5628 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5630 2014-07-15 Pedro Alves <palves@redhat.com>
5632 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5635 2014-07-11 Pedro Alves <palves@redhat.com>
5637 * linux-low.c (kill_wait_lwp): New function, based on
5638 kill_one_lwp_callback, but use my_waitpid directly.
5639 (kill_one_lwp_callback, linux_kill): Use it.
5641 2014-06-23 Pedro Alves <palves@redhat.com>
5643 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5644 before setting DR0..DR3.
5646 2014-06-20 Gary Benson <gbenson@redhat.com>
5648 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5649 * configure: Regenerated.
5650 * config.in: Likewise.
5652 2014-06-20 Gary Benson <gbenson@redhat.com>
5654 * Makefile.in (SFILES): Update locations for files moved
5656 (object file files): Reordered.
5658 2014-06-20 Gary Benson <gbenson@redhat.com>
5660 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5661 (i386_dr_low_set_addr): Likewise.
5662 (i386_dr_low_get_addr): Likewise.
5663 (i386_dr_low_can_set_control): Likewise.
5664 (i386_dr_low_set_control): Likewise.
5665 (i386_dr_low_get_control): Likewise.
5666 (i386_dr_low_get_status): Likewise.
5667 (i386_get_debug_register_length): Likewise.
5668 * linux-x86-low.c (i386_dr_low_set_addr):
5669 Changed signature. Made static.
5670 (i386_dr_low_get_addr): Likewise.
5671 (i386_dr_low_set_control): Likewise.
5672 (i386_dr_low_get_control): Likewise.
5673 (i386_dr_low_get_status): Likewise.
5674 (i386_dr_low): New global variable.
5675 * win32-i386-low.c (i386_dr_low_set_addr):
5676 Changed signature. Made static.
5677 (i386_dr_low_get_addr): Likewise.
5678 (i386_dr_low_set_control): Likewise.
5679 (i386_dr_low_get_control): Likewise.
5680 (i386_dr_low_get_status): Likewise.
5681 (i386_dr_low): New global variable.
5683 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5685 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5686 * Makefile.in (AR, AR_FLAGS): Define.
5687 * configure: Regenerate.
5689 2014-06-19 Gary Benson <gbenson@redhat.com>
5691 * Makefile.in (i386-dregs.o): New rule.
5692 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5693 * i386-low.c (target.h): Remove include.
5694 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5695 (DR_CONTROL_SHIFT): Likewise.
5696 (DR_CONTROL_SIZE): Likewise.
5697 (DR_RW_EXECUTE): Likewise.
5698 (DR_RW_WRITE): Likewise.
5699 (DR_RW_READ): Likewise.
5700 (DR_RW_IORW): Likewise.
5701 (DR_LEN_1): Likewise.
5702 (DR_LEN_2): Likewise.
5703 (DR_LEN_4): Likewise.
5704 (DR_LEN_8): Likewise.
5705 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5706 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5707 (DR_ENABLE_SIZE): Likewise.
5708 (DR_LOCAL_SLOWDOWN): Likewise.
5709 (DR_GLOBAL_SLOWDOWN): Likewise.
5710 (DR_CONTROL_RESERVED): Likewise.
5711 (I386_DR_CONTROL_MASK): Likewise.
5712 (I386_DR_VACANT): Likewise.
5713 (I386_DR_LOCAL_ENABLE): Likewise.
5714 (I386_DR_GLOBAL_ENABLE): Likewise.
5715 (I386_DR_DISABLE): Likewise.
5716 (I386_DR_SET_RW_LEN): Likewise.
5717 (I386_DR_GET_RW_LEN): Likewise.
5718 (I386_DR_WATCH_HIT): Likewise.
5719 (i386_wp_op_t): Likewise.
5720 (i386_show_dr): Likewise.
5721 (i386_length_and_rw_bits): Likewise.
5722 (i386_insert_aligned_watchpoint): Likewise.
5723 (i386_remove_aligned_watchpoint): Likewise.
5724 (i386_handle_nonaligned_watchpoint): Likewise.
5725 i386_update_inferior_debug_regs(): Likewise.
5726 (i386_dr_insert_watchpoint): Likewise.
5727 (i386_dr_remove_watchpoint): Likewise.
5728 (i386_dr_region_ok_for_watchpoint): Likewise.
5729 (i386_dr_stopped_data_address): Likewise.
5730 (i386_dr_stopped_by_watchpoint): Likewise.
5732 2014-06-19 Gary Benson <gbenson@redhat.com>
5734 * i386-low.c (i386_dr_show): Renamed to
5735 i386_show_dr and made static. All uses updated.
5736 (i386_dr_length_and_rw_bits): Renamed to
5737 i386_length_and_rw_bits and made static.
5739 (i386_dr_insert_aligned_watchpoint): Renamed to
5740 i386_insert_aligned_watchpoint and made static.
5742 (i386_dr_remove_aligned_watchpoint): Renamed to
5743 i386_remove_aligned_watchpoint and made static.
5745 (i386_dr_update_inferior_debug_regs): Renamed to
5746 i386_update_inferior_debug_regs and made static.
5749 2014-06-18 Gary Benson <gbenson@redhat.com>
5751 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5752 (i386_dr_low_can_set_control): Likewise.
5753 (i386_get_debug_register_length): Likewise.
5754 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5755 (i386_dr_low_can_set_control): Likewise.
5756 (i386_get_debug_register_length): Likewise.
5758 2014-06-17 Gary Benson <gbenson@redhat.com>
5760 * i386-low.h (i386-dregs.h): New include.
5761 (DR_FIRSTADDR): Now in i386-dregs.h.
5762 (DR_LASTADDR): Likewise.
5763 (DR_NADDR): Likewise.
5764 (DR_STATUS): Likewise.
5765 (DR_CONTROL): Likewise.
5766 (i386_debug_reg_state): Likewise.
5767 (i386_dr_insert_watchpoint): Likewise.
5768 (i386_dr_remove_watchpoint): Likewise.
5769 (i386_dr_region_ok_for_watchpoint): Likewise.
5770 (i386_dr_stopped_data_address): Likewise.
5771 (i386_dr_stopped_by_watchpoint): Likewise.
5772 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5774 2014-06-18 Gary Benson <gbenson@redhat.com>
5776 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5777 i386_dr_insert_watchpoint.
5778 (i386_low_remove_watchpoint): Renamed to
5779 i386_dr_remove_watchpoint.
5780 (i386_low_region_ok_for_watchpoint): Renamed to
5781 i386_dr_region_ok_for_watchpoint.
5782 (i386_low_stopped_data_address): Renamed to
5783 i386_dr_stopped_data_address.
5784 (i386_low_stopped_by_watchpoint): Renamed to
5785 i386_dr_stopped_by_watchpoint.
5786 * i386-low.c (i386_show_dr): Renamed to
5787 i386_dr_show and made nonstatic. All uses updated.
5788 (i386_length_and_rw_bits): Renamed to
5789 i386_dr_length_and_rw_bits and made nonstatic.
5791 (i386_insert_aligned_watchpoint): Renamed to
5792 i386_dr_insert_aligned_watchpoint and made nonstatic.
5794 (i386_remove_aligned_watchpoint): Renamed to
5795 i386_dr_remove_aligned_watchpoint and made nonstatic.
5797 (i386_update_inferior_debug_regs): Renamed to
5798 i386_dr_update_inferior_debug_regs and made nonstatic.
5800 (i386_low_insert_watchpoint): Renamed to
5801 i386_dr_insert_watchpoint. All uses updated.
5802 (i386_low_remove_watchpoint): Renamed to
5803 i386_dr_remove_watchpoint. All uses updated.
5804 (i386_low_region_ok_for_watchpoint): Renamed to
5805 i386_dr_region_ok_for_watchpoint. All uses updated.
5806 (i386_low_stopped_data_address): Renamed to
5807 i386_dr_stopped_data_address. All uses updated.
5808 (i386_low_stopped_by_watchpoint): Renamed to
5809 i386_dr_stopped_by_watchpoint. All uses updated.
5811 2014-06-18 Gary Benson <gbenson@redhat.com>
5813 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5814 (i386_dr_low_can_set_control): Likewise.
5815 (i386_insert_aligned_watchpoint): New check.
5817 2014-06-18 Gary Benson <gbenson@redhat.com>
5819 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5822 2014-06-18 Gary Benson <gbenson@redhat.com>
5824 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5825 instead of fatal and error.
5826 (i386_handle_nonaligned_watchpoint): Likewise.
5828 2014-06-18 Gary Benson <gbenson@redhat.com>
5830 * i386-low.c (i386_get_debug_register_length): New macro.
5831 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5832 (i386_show_dr): Use debug_printf instead of fprintf. Use
5833 phex to format values.
5835 2014-06-18 Gary Benson <gbenson@redhat.com>
5837 * i386-low.h: Comment changes.
5838 * i386-low.c: Likewise.
5840 2014-06-18 Gary Benson <gbenson@redhat.com>
5842 * i386-low.c: Whitespace changes.
5844 2014-06-12 Tom Tromey <tromey@redhat.com>
5846 * utils.c (freeargv): Remove.
5848 2014-06-12 Tom Tromey <tromey@redhat.com>
5850 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5851 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5852 (parse_debug_format_options): Likewise.
5853 (gdbserver_usage): Likewise.
5854 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5855 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5856 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5858 ($(LIBGNU)): Depend on libiberty.
5859 (all-lib): Recurse into all subdirs.
5860 (install-only): Invoke "install" target in subdirs.
5861 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5863 * configure: Rebuild.
5864 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5865 for vasprintf, vsnprintf, or gettimeofday.
5866 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5869 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5871 * development.sh: Delete.
5872 * Makefile.in (config.status): Adjust dependency on development.sh.
5873 * configure.ac: Adjust development.sh source call.
5874 * configure: Regenerate.
5876 2014-06-02 Pedro Alves <palves@redhat.com>
5878 * ax.c (gdb_free_agent_expr): New function.
5879 * ax.h (gdb_free_agent_expr): New declaration.
5880 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5882 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5884 (clear_breakpoint_conditions_and_commands): New function.
5885 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5886 (clear_breakpoint_conditions_and_commands): New declaration.
5888 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5890 * linux-aarch64-low.c (asm/ptrace.h): Include.
5892 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5894 Fix TLS access for -static -pthread.
5895 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5896 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5897 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5899 2014-05-20 Pedro Alves <palves@redhat.com>
5901 * linux-aarch64-low.c (aarch64_insert_point)
5902 (aarch64_remove_point): No longer check whether the type is
5903 supported here. Adjust to new interface.
5904 (the_low_target): Install aarch64_supports_z_point_type as
5905 supports_z_point_type method.
5906 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5907 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5908 instead of a Z packet char. Adjust.
5909 (arm_supports_z_point_type): New function.
5910 (arm_insert_point, arm_remove_point): Adjust to new interface.
5911 (the_low_target): Install arm_supports_z_point_type.
5912 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5913 (cris_insert_point, cris_remove_point): Adjust to new interface.
5914 Don't check whether the type is supported here.
5915 (the_low_target): Install cris_supports_z_point_type.
5916 * linux-low.c (linux_supports_z_point_type): New function.
5917 (linux_insert_point, linux_remove_point): Adjust to new interface.
5918 * linux-low.h (struct linux_target_ops) <insert_point,
5919 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5920 raw_breakpoint pointer parameter.
5921 <supports_z_point_type>: New method.
5922 * linux-mips-low.c (mips_supports_z_point_type): New function.
5923 (mips_insert_point, mips_remove_point): Adjust to new interface.
5924 Use mips_supports_z_point_type.
5925 (the_low_target): Install mips_supports_z_point_type.
5926 * linux-ppc-low.c (the_low_target): Install NULL as
5927 supports_z_point_type method.
5928 * linux-s390-low.c (the_low_target): Install NULL as
5929 supports_z_point_type method.
5930 * linux-sparc-low.c (the_low_target): Install NULL as
5931 supports_z_point_type method.
5932 * linux-x86-low.c (x86_supports_z_point_type): New function.
5933 (x86_insert_point): Adjust to new insert_point interface. Use
5934 insert_memory_breakpoint. Adjust to new
5935 i386_low_insert_watchpoint interface.
5936 (x86_remove_point): Adjust to remove_point interface. Use
5937 remove_memory_breakpoint. Adjust to new
5938 i386_low_remove_watchpoint interface.
5939 (the_low_target): Install x86_supports_z_point_type.
5940 * lynx-low.c (lynx_target_ops): Install NULL as
5941 supports_z_point_type callback.
5942 * nto-low.c (nto_supports_z_point_type): New.
5943 (nto_insert_point, nto_remove_point): Adjust to new interface.
5944 (nto_target_ops): Install nto_supports_z_point_type.
5945 * mem-break.c: Adjust intro comment.
5946 (struct raw_breakpoint) <raw_type, size>: New fields.
5947 <inserted>: Update comment.
5948 <shlib_disabled>: Delete field.
5949 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5950 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5951 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5952 (raw_bkpt_type_to_target_hw_bp_type): New function.
5953 (find_enabled_raw_code_breakpoint_at): New function.
5954 (find_raw_breakpoint_at): New type and size parameters. Use them.
5955 (insert_memory_breakpoint): New function, based off
5956 set_raw_breakpoint_at.
5957 (remove_memory_breakpoint): New function.
5958 (set_raw_breakpoint_at): Reimplement.
5959 (set_breakpoint): New, based on set_breakpoint_at.
5960 (set_breakpoint_at): Reimplement.
5961 (delete_raw_breakpoint): Go through the_target->remove_point
5962 instead of assuming memory breakpoints.
5963 (find_gdb_breakpoint_at): Delete.
5964 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5965 (find_gdb_breakpoint): New function.
5966 (set_gdb_breakpoint_at): Delete.
5967 (z_type_supported): New function.
5968 (set_gdb_breakpoint_1): New function, loosely based off
5969 set_gdb_breakpoint_at.
5970 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5971 (delete_gdb_breakpoint_at): Delete.
5972 (delete_gdb_breakpoint_1): New function, loosely based off
5973 delete_gdb_breakpoint_at.
5974 (delete_gdb_breakpoint): New function.
5975 (clear_gdb_breakpoint_conditions): Rename to ...
5976 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5978 (add_condition_to_breakpoint): Make static.
5979 (add_breakpoint_condition): Take a struct breakpoint pointer
5980 instead of an address. Adjust.
5981 (gdb_condition_true_at_breakpoint): Rename to ...
5982 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5984 (gdb_condition_true_at_breakpoint): Reimplement.
5985 (add_breakpoint_commands): Take a struct breakpoint pointer
5986 instead of an address. Adjust.
5987 (gdb_no_commands_at_breakpoint): Rename to ...
5988 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5989 parameter. Return true if no breakpoint was found. Change debug
5991 (gdb_no_commands_at_breakpoint): Reimplement.
5992 (run_breakpoint_commands): Rename to ...
5993 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5994 and change return type to boolean.
5995 (run_breakpoint_commands): New function.
5996 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5997 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5998 breakpoint. Go through the_target->remove_point instead of
5999 assuming memory breakpoint.
6000 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6001 software and hardware breakpoints.
6002 (reinsert_raw_breakpoint): Go through the_target->insert_point
6003 instead of assuming memory breakpoint.
6004 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6005 software and hardware breakpoints.
6006 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6007 Check both software and hardware breakpoints.
6008 (validate_inserted_breakpoint): Assert the breakpoint is a
6009 software breakpoint. Set the inserted flag to -1 instead of
6010 setting shlib_disabled.
6011 (delete_disabled_breakpoints): Adjust.
6012 (validate_breakpoints): Only validate software breakpoints.
6013 Adjust to inserted flag change.
6014 (check_mem_read, check_mem_write): Skip breakpoint types other
6015 than software breakpoints. Adjust to inserted flag change.
6016 * mem-break.h (enum raw_bkpt_type): New enum.
6017 (raw_breakpoint, struct process_info): Forward declare.
6018 (Z_packet_to_target_hw_bp_type): Delete declaration.
6019 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6020 (set_gdb_breakpoint, delete_gdb_breakpoint)
6021 (clear_breakpoint_conditions): New declarations.
6022 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6023 (breakpoint_inserted_here): Update comment.
6024 (add_breakpoint_condition, add_breakpoint_commands): Replace
6025 address parameter with a breakpoint pointer parameter.
6026 (gdb_breakpoint_here): Update comment.
6027 (delete_gdb_breakpoint_at): Delete.
6028 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6029 * server.c (process_point_options): Take a struct breakpoint
6030 pointer instead of an address. Adjust.
6031 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6032 delete_gdb_breakpoint.
6033 * spu-low.c (spu_target_ops): Install NULL as
6034 supports_z_point_type method.
6035 * target.h: Include mem-break.h.
6036 (struct target_ops) <prepare_to_access_memory>: Update comment.
6037 <supports_z_point_type>: New field.
6038 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6039 instead of a char. Also take a raw breakpoint pointer.
6040 * win32-arm-low.c (the_low_target): Install NULL as
6041 supports_z_point_type.
6042 * win32-i386-low.c (i386_supports_z_point_type): New function.
6043 (i386_insert_point, i386_remove_point): Adjust to new interface.
6044 (the_low_target): Install i386_supports_z_point_type.
6045 * win32-low.c (win32_supports_z_point_type): New function.
6046 (win32_insert_point, win32_remove_point): Adjust to new interface.
6047 (win32_target_ops): Install win32_supports_z_point_type.
6048 * win32-low.h (struct win32_target_ops):
6049 <supports_z_point_type>: New method.
6050 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6051 instead of a char. Also take a raw breakpoint pointer.
6053 2014-05-20 Pedro Alves <palves@redhat.com>
6055 * mem-break.h: Include break-common.h.
6056 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6057 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6058 (Z_packet_to_target_hw_bp_type): New declaration.
6059 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6060 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6061 (Z_PACKET_ACCESS_WP): Delete macros.
6062 (Z_packet_to_hw_type): Delete function.
6063 * i386-low.h: Don't include break-common.h here.
6064 (Z_packet_to_hw_type): Delete declaration.
6065 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6066 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6067 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6068 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6069 * linux-aarch64-low.c: Don't include break-common.h here.
6070 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6071 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6072 (Z_packet_to_target_hw_bp_type): Delete function.
6073 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6075 (mips_insert_point, mips_remove_point): Use
6076 Z_packet_to_target_hw_bp_type.
6078 2014-05-20 Pedro Alves <palves@redhat.com>
6080 * linux-aarch64-low.c: Include break-common.h.
6081 (enum target_point_type): Delete.
6082 (Z_packet_to_point_type): Rename to ...
6083 (Z_packet_to_target_hw_bp_type): ... this, and return a
6084 target_hw_bp_type instead.
6085 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6086 instead of an enum target_point_type.
6087 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6089 (aarch64_dr_state_insert_one_point)
6090 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6091 (aarch64_handle_aligned_watchpoint)
6092 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6093 Take an enum target_hw_bp_type instead of an enum
6095 (aarch64_supports_z_point_type): New function.
6096 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6097 use Z_packet_to_target_hw_bp_type.
6099 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6101 * configure.ac: Only use -Werror by default when DEVELOPMENT
6103 * configure: Regenerate.
6105 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6107 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6108 * linux-x86-low.c (X86_64_USER_REGS): New.
6109 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6111 2014-04-28 Yao Qi <yao@codesourcery.com>
6113 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6116 2014-04-25 Pedro Alves <palves@redhat.com>
6119 * linux-low.c (linux_attach_fail_reason_string): New function.
6120 (linux_attach_lwp): Delete.
6121 (linux_attach_lwp_1): Rename to ...
6122 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6123 argument. Remove "initial" parameter. Return int instead of
6124 void. Don't error or warn here.
6125 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6126 failure to attach to the tgid. Call warning when failing to
6128 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6129 argument. Remove "initial" parameter. Return int instead of
6130 void. Don't error or warn here.
6131 (linux_attach_fail_reason_string): New declaration.
6132 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6133 interface change. Use linux_attach_fail_reason_string.
6135 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6136 Walfred Tedeschi <walfred.tedeschi@intel.com>
6138 * Makefile.in: Added rules to handle new files
6139 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6140 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6141 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6142 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6143 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6144 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6146 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6147 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6148 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6149 i386/x32-avx512.xml.
6150 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6151 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6152 i386/x32-avx512-linux.xml.
6153 * i387-fp.c (num_avx512_k_registers): New constant for number
6155 (num_avx512_zmmh_low_registers): New constant for number of
6156 lower ZMM registers (0-15).
6157 (num_avx512_zmmh_high_registers): New constant for number of
6158 higher ZMM registers (16-31).
6159 (num_avx512_ymmh_registers): New contant for number of higher
6160 YMM registers (ymm16-31 added by avx521 on x86_64).
6161 (num_avx512_xmm_registers): New constant for number of higher
6162 XMM registers (xmm16-31 added by AVX512 on x86_64).
6163 (struct i387_xsave): Add space for AVX512 registers.
6164 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6165 Add code to handle AVX512 registers.
6166 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6167 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6168 prototypei from generated file.
6169 (tdesc_amd64_avx512_linux): Likewise.
6170 (init_registers_x32_avx512_linux): Likewise.
6171 (tdesc_x32_avx512_linux): Likewise.
6172 (init_registers_i386_avx512_linux): Likewise.
6173 (tdesc_i386_avx512_linux): Likewise.
6174 (x86_64_regmap): Add AVX512 registers.
6175 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6177 (initialize_low_arch): Add code to initialize AVX512 registers.
6179 2014-04-23 Pedro Alves <palves@redhat.com>
6181 * mem-break.c (find_gdb_breakpoint_at): Make static.
6182 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6184 2014-04-23 Pedro Alves <palves@redhat.com>
6186 * i386-low.c: Don't include break-common.h here.
6187 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6188 prototype to take target_hw_bp_type as argument instead of a Z
6190 * i386-low.h: Include break-common.h here.
6191 (Z_packet_to_hw_type): Declare.
6192 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6194 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6195 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6196 (x86_remove_point): Convert the packet number to a
6197 target_hw_bp_type before calling i386_low_remove_watchpoint.
6198 * win32-i386-low.c (i386_insert_point): Convert the packet number
6199 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6200 (i386_remove_point): Convert the packet number to a
6201 target_hw_bp_type before calling i386_low_remove_watchpoint.
6203 2014-04-23 Pedro Alves <palves@redhat.com>
6205 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6207 2014-04-10 Pedro Alves <palves@redhat.com>
6209 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6210 Check if the condition or command is NULL before checking if the
6211 breakpoint is known. On success, return true.
6212 * mem-break.h (add_breakpoint_condition): Document return.
6213 (add_breakpoint_commands): Add describing comment.
6214 * server.c (skip_to_semicolon): New function.
6215 (process_point_options): Use it.
6217 2014-04-09 Pedro Alves <palves@redhat.com>
6219 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6222 2014-02-27 Pedro Alves <palves@redhat.com>
6225 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6227 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6229 (last_thread_of_process_p): Take a PID argument instead of a
6231 (linux_wait_for_lwp): Delete.
6232 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6234 (linux_low_filter_event): New function, party factored out from
6235 linux_wait_for_event.
6236 (linux_wait_for_event): Rename to ...
6237 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6238 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6239 sigsuspend. Check for zombie leaders.
6240 (linux_wait_for_event): Reimplement as wrapper around
6241 linux_wait_for_event_filtered.
6242 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6243 a normal or signal exit is seen, it's the whole process exiting.
6244 (wait_for_sigstop): No longer a for_each_inferior callback.
6245 Rewrite on top of linux_wait_for_event_filtered.
6246 (stop_all_lwps): Call wait_for_sigstop directly.
6247 * server.c (resume, handle_target_event): Handle
6248 TARGET_WAITKIND_NO_RESUMED.
6250 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6252 * win32-low.c (psapi_get_dll_name,
6253 * win32_CreateToolhelp32Snapshot): Delete.
6254 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6255 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6257 (handle_load_dll): Add function description.
6258 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6260 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6262 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6264 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6265 base address when calling win32_add_one_solib.
6266 (handle_load_dll): Delete local variable load_addr.
6267 Remove 0x1000 offset applied to DLL base address when calling
6268 win32_add_one_solib.
6269 (handle_unload_dll): Add comment.
6271 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6273 * win32-low.c (win32_add_all_dlls): Renames
6274 win32_ensure_ntdll_loaded. Rewrite function documentation.
6275 Adjust implementation to always load all DLLs.
6276 Add 0x1000 offset to DLL base address when calling
6277 win32_add_one_solib.
6278 (child_initialization_done): New static global.
6279 (do_initial_child_stuff): Set child_initialization_done to
6280 zero during child initialization, and 1 after. Replace call
6281 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6283 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6284 (handle_unload_dll): Add function documentation.
6285 (get_child_debug_event): Ignore load and unload DLL events
6286 during child initialization.
6288 2014-02-20 Doug Evans <dje@google.com>
6290 Remove global all_lwps.
6291 * inferiors.h (ptid_of): Move here from linux-low.h.
6292 (pid_of, lwpid_of): Ditto.
6293 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6294 parameter is a struct thread_info * now.
6295 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6296 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6297 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6299 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6300 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6301 * linux-arm-low.c (update_registers_callback): Update, "entry"
6302 parameter is a struct thread_info * now.
6303 Fetch lwpid from current_inferior directly.
6304 (arm_insert_point): Pass &all_threads to find_inferior instead of
6306 (arm_remove_point): Ditto.
6307 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6308 (arm_prepare_to_resume): Fetch pid from thread.
6309 (arm_read_description): Fetch lwpid from current_inferior directly.
6310 * linux-low.c (all_lwps): Delete.
6311 (delete_lwp): Delete call to remove_inferior.
6312 (handle_extended_wait): Fetch lwpid from thread.
6313 (add_lwp): Don't set lwp->entry.id. Remove call to
6314 add_inferior_to_list.
6315 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6316 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6317 (kill_one_lwp_callback): Ditto.
6318 (linux_kill): Don't dereference NULL pointer.
6319 Fetch ptid,lwpid from thread.
6320 (get_detach_signal): Fetch ptid from thread.
6321 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6322 Simplify call to regcache_invalidate_thread.
6323 (delete_lwp_callback): Update, "entry" parameter is a
6324 struct thread_info * now. Fetch pid from thread.
6325 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6326 (status_pending_p_callback): Update, "entry" parameter is a
6327 struct thread_info * now. Fetch ptid from thread.
6328 (find_lwp_pid): Update, "entry" parameter is a
6329 struct thread_info * now.
6330 (linux_wait_for_lwp): Fetch pid from thread.
6331 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6332 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6333 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6334 (dequeue_one_deferred_signal): Ditto.
6335 (cancel_breakpoint): Fetch ptid from current_inferior.
6336 (linux_wait_for_event): Pass &all_threads to find_inferior,
6337 not &all_lwps. Fetch ptid, lwpid from thread.
6338 (count_events_callback): Update, "entry" parameter is a
6339 struct thread_info * now.
6340 (select_singlestep_lwp_callback): Ditto.
6341 (select_event_lwp_callback): Ditto.
6342 (cancel_breakpoints_callback): Ditto.
6343 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6345 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6346 (unsuspend_one_lwp): Update, "entry" parameter is a
6347 struct thread_info * now.
6348 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6350 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6351 Fetch lwpid from thread, not lwp.
6352 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6353 Pass &all_threads to find_inferior, not &all_lwps.
6354 (send_sigstop): Fetch lwpid from thread, not lwp.
6355 (send_sigstop_callback): Update, "entry" parameter is a
6356 struct thread_info * now.
6357 (suspend_and_send_sigstop_callback): Ditto.
6358 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6359 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6360 struct thread_info * now.
6361 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6363 (lwp_running): Update, "entry" parameter is a
6364 struct thread_info * now.
6365 (stop_all_lwps): Fetch ptid from thread.
6366 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6367 (linux_resume_one_lwp): Fetch lwpid from thread.
6368 (linux_set_resume_request): Update, "entry" parameter is a
6369 struct thread_info * now. Fetch pid, lwpid from thread.
6370 (resume_status_pending_p): Update, "entry" parameter is a
6371 struct thread_info * now.
6372 (need_step_over_p): Ditto. Fetch lwpid from thread.
6373 (start_step_over): Fetch lwpid from thread.
6374 (linux_resume_one_thread): Update, "entry" parameter is a
6375 struct thread_info * now. Fetch lwpid from thread.
6376 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6377 (proceed_one_lwp): Update, "entry" parameter is a
6378 struct thread_info * now. Fetch lwpid from thread.
6379 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6380 struct thread_info * now.
6381 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6382 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6383 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6385 (regsets_store_inferior_registers): Ditto.
6386 (fetch_register, store_register): Ditto.
6387 (linux_read_memory, linux_write_memory): Ditto.
6388 (linux_request_interrupt): Ditto.
6389 (linux_read_auxv): Ditto.
6390 (linux_xfer_siginfo): Ditto.
6391 (linux_qxfer_spu): Ditto.
6392 (linux_qxfer_libraries_svr4): Ditto.
6393 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6394 moved to inferiors.h.
6396 (get_thread_lwp): Update.
6397 (struct lwp_info): Delete member "entry". Simplify comment for
6400 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6401 current_inferior directly.
6402 (update_watch_registers_callback): Update, "entry" parameter is a
6403 struct thread_info * now. Fetch pid from thread.
6404 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6405 (mips_insert_point): Fetch lwpid from current_inferior.
6406 Pass &all_threads to find_inferior, not &all_lwps.
6407 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6408 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6410 (mips_stopped_data_address): Ditto.
6411 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6413 * linux-tile-low.c (tile_arch_setup): Ditto.
6414 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6415 (update_debug_registers_callback): Update, "entry" parameter is a
6416 struct thread_info * now. Fetch pid from thread.
6417 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6418 Pass &all_threads to find_inferior, not &all_lwps.
6419 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6420 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6421 Pass &all_threads to find_inferior, not &all_lwps.
6422 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6423 (i386_dr_low_get_status): Ditto.
6424 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6425 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6426 (x86_linux_read_description): Ditto.
6427 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6429 2014-02-20 Doug Evans <dje@google.com>
6431 * inferiors.c (get_first_inferior): Fix buglet.
6433 2014-02-19 Doug Evans <dje@google.com>
6435 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6436 * inferiors.c (add_thread): Change result type to struct thread_info *.
6437 All callers updated.
6438 (add_lwp): Call add_thread here instead of in callers.
6439 All callers updated.
6440 * linux-low.h (get_lwp_thread): Rewrite.
6441 (struct lwp_info): New member "thread".
6443 2014-02-19 Doug Evans <dje@google.com>
6445 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6446 All callers updated.
6448 2014-02-19 Doug Evans <dje@google.com>
6450 * inferiors.c (add_thread): Fix whitespace.
6452 2014-02-19 Doug Evans <dje@google.com>
6454 * dll.c (clear_dlls): Replace accessing list implemention details
6456 * gdbthread.h (get_first_thread): Declare.
6457 * inferiors.c (for_each_inferior_with_data): New function.
6458 (get_first_thread): New function.
6459 (find_thread_ptid): Simplify.
6460 (get_first_inferior): New function.
6461 (clear_list): Delete.
6462 (one_inferior_p): New function.
6463 (clear_inferior_list): New function.
6464 (clear_inferiors): Update.
6465 * inferiors.h (for_each_inferior_with_data): Declare.
6466 (clear_inferior_list): Declare.
6467 (one_inferior_p): Declare.
6468 (get_first_inferior): Declare.
6469 * linux-low.c (linux_wait_for_event): Replace accessing list
6470 implemention details with API function.
6471 * server.c (target_running): Ditto.
6472 (accumulate_file_name_length): New function.
6473 (emit_dll_description): New function.
6474 (handle_qxfer_libraries): Replace accessing list implemention
6475 details with API function.
6476 (handle_qxfer_threads_worker): New function.
6477 (handle_qxfer_threads_proper): Replace accessing list implemention
6478 details with API function.
6479 (handle_query): Ditto.
6480 (visit_actioned_threads_callback_ftype): New typedef.
6481 (visit_actioned_threads_data): New struct.
6482 (visit_actioned_threads): Rewrite to be find_inferior callback.
6483 (resume): Call find_inferior.
6484 (handle_status): Replace accessing list implemention
6485 details with API function.
6486 (process_serial_event): Replace accessing list implemention details
6488 * target.c (set_desired_inferior): Replace accessing list implemention
6489 details with API function.
6490 * tracepoint.c (same_process_p): New function.
6491 (gdb_agent_about_to_close): Replace accessing list implemention
6492 details with API function.
6493 * win32-low.c (child_delete_thread): Replace accessing list
6494 implemention details with API function.
6495 (match_dll_by_basename): New function.
6496 (dll_is_loaded_by_basename): New function.
6497 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6498 details call to dll_is_loaded_by_basename.
6500 2014-02-19 Doug Evans <dje@google.com>
6502 * dll.h (struct dll_info): Add comment.
6503 * gdbthread.h (struct thread_info): Add comment.
6504 (current_ptid): Simplify.
6505 * inferiors.c (add_process): Update.
6506 (remove_process): Update.
6507 * inferiors.h (struct process_info): Rename member "head" to "entry".
6508 * linux-low.c (delete_lwp): Update.
6510 (last_thread_of_process_p): Update.
6511 (kill_one_lwp_callback, linux_kill): Update.
6512 (status_pending_p_callback): Update.
6513 (wait_for_sigstop): Update. Simplify read of ptid.
6514 (start_step_over): Update.
6515 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6516 (get_lwp_thread): Update.
6517 (struct lwp_info): Rename member "head" to "entry".
6518 * regcache.h (inferior_list_entry): Delete.
6519 * server.c (kill_inferior_callback): Update.
6520 (detach_or_kill_inferior_callback): Update.
6521 (print_started_pid): Update.
6522 (print_attached_pid): Update.
6523 (process_serial_event): Simplify read of ptid.
6524 * thread-db.c (thread_db_create_event): Update.
6525 (thread_db_get_tls_address): Update.
6526 * win32-low.c (current_inferior_ptid): Simplify.
6528 2014-02-19 Tom Tromey <tromey@redhat.com>
6530 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6532 (target_supports_btrace): Update.
6534 2014-02-14 Yao Qi <yao@codesourcery.com>
6536 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6537 (rsp-low-ipa.o): New target.
6539 2014-02-12 Tom Tromey <tromey@redhat.com>
6541 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6542 convert_ascii_to_int.
6543 * regcache.c (registers_to_string): Likewise.
6544 * remote-utils.c (decode_M_packet): Likewise.
6545 * server.c (process_serial_event): Likewise.
6547 2014-02-12 Tom Tromey <tromey@redhat.com>
6549 * server.c (handle_query, handle_v_run): Use hex2bin, not
6551 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6553 2014-02-12 Tom Tromey <tromey@redhat.com>
6555 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6556 convert_int_to_ascii.
6557 * regcache.c (registers_to_string, collect_register_as_string):
6559 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6561 * server.c (process_serial_event): Likewise.
6562 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6563 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6565 2014-02-12 Tom Tromey <tromey@redhat.com>
6567 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6568 bin2hex, not hexify.
6569 * tracepoint.c (cmd_qtstatus): Likewise.
6571 2014-02-12 Tom Tromey <tromey@redhat.com>
6573 * remote-utils.c (monitor_output): Pass explicit length to
6576 2014-02-12 Tom Tromey <tromey@redhat.com>
6578 * tracepoint.c: Include rsp-low.h.
6579 * server.c: Include rsp-low.h.
6580 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6581 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6583 * remote-utils.c: Include rsp-low.h.
6584 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6585 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6586 (convert_int_to_ascii, convert_ascii_to_int): Move to
6588 * regcache.c: Include rsp-low.h.
6589 * ax.c: Include rsp-low.h.
6590 * Makefile.in (SFILES): Add common/rsp-low.c.
6591 (OBS): Add rsp-low.o.
6592 (rsp-low.o): New target.
6594 2014-02-12 Tom Tromey <tromey@redhat.com>
6596 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6597 Include print-utils.h.
6598 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6599 (plongest, thirty_two, phex_nz): Remove.
6600 * Makefile.in (SFILES): Add common/print-utils.c.
6601 (OBS): Add print-utils.o.
6602 (print-utils-ipa.o): New target.
6603 (print-utils.o): New target.
6604 (IPA_OBJS): Add print-utils-ipa.o.
6606 2014-02-06 Tom Tromey <tromey@redhat.com>
6608 * Makefile.in (SFILES): Fix indentation.
6610 2014-02-05 Doug Evans <dje@google.com>
6612 * linux-low.c (linux_wait_for_event): Improve comment.
6613 (linux_wait_1): Keep current_inferior in sync with event_child.
6615 2014-01-22 Doug Evans <dje@google.com>
6617 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6619 2014-01-22 Doug Evans <dje@google.com>
6621 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6622 * configure: Regenerate.
6623 * config.in: Regenerate.
6624 * Makefile.in (SFILES): Add debug.c.
6626 * debug.c: New file.
6627 * debug.h: New file.
6628 * linux-aarch64-low.c (*): Update all debugging printfs to use
6629 debug_printf instead of fprintf.
6630 * linux-arm-low.c (*): Ditto.
6631 * linux-cris-low.c (*): Ditto.
6632 * linux-crisv32-low.c (*): Ditto.
6633 * linux-m32r-low.c (*): Ditto.
6634 * linux-sparc-low.c (*): Ditto.
6635 * linux-x86.c (*): Ditto.
6636 * linux-low.c (*): Ditto.
6637 (linux_wait_1): Add calls to debug_enter, debug_exit.
6638 (linux_wait): Remove redundant debugging printf.
6639 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6640 (linux_resume, unstop_all_lwps): Ditto.
6641 * mem-break.c (*): Update all debugging printfs to use
6642 debug_printf instead of fprintf.
6643 * remote-utils.c (*): Ditto.
6644 * thread-db.c (*): Ditto.
6645 * server.c #include <ctype.h>, "gdb_vecs.h".
6646 (debug_threads): Moved to debug.c.
6647 (*): Update all debugging printfs to use debug_printf instead of
6649 (start_inferior): Replace call to fflush with call to debug_flush.
6650 (monitor_show_help): Mention set debug-format.
6651 (parse_debug_format_options): New function.
6652 (handle_monitor_command): Handle "monitor set debug-format".
6653 (gdbserver_usage): Mention --debug-format.
6654 (main): Parse --debug-format.
6655 * server.h (debug_threads): Declaration moved to debug.h.
6657 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6658 trace_debug_1 that uses debug_printf.
6659 (tracepoint_look_up_symbols): Update all debugging printfs to use
6660 debug_printf instead of fprintf.
6662 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6664 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6667 2014-01-17 Pedro Alves <palves@redhat.com>
6670 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6671 defined after including gdb_proc_service.h.
6673 2014-01-16 Doug Evans <dje@google.com>
6675 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6676 (match_dll): Use it.
6678 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6680 * target.h (target_ops) <read_btrace>: Change parameters and
6681 return type to allow error reporting.
6682 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6683 trace reading errors on.
6684 * linux-low.c (linux_low_read_btrace): Pass trace reading
6686 (linux_low_disable_btrace): New.
6688 2014-01-15 Doug Evans <dje@google.com>
6690 * inferiors.c (thread_id_to_gdb_id): Delete.
6691 * inferiors.h (thread_id_to_gdb_id): Delete.
6693 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6695 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6696 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6699 2014-01-08 Pedro Alves <palves@redhat.com>
6701 * server.c (handle_status): Don't discard previous queued stop
6702 replies or thread's pending status here.
6703 (main) <disconnection>: Do it here instead.
6705 2014-01-08 Pedro Alves <palves@redhat.com>
6707 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6708 * server.c (visit_actioned_threads, handle_pending_status): New
6710 (handle_v_cont): Factor out parts to ...
6711 (resume): ... this new function. If in all-stop, and a thread
6712 being resumed has a pending status, report it without actually
6714 (myresume): Adjust to use the new 'resume' function.
6715 (clear_pending_status_callback, set_pending_status_callback)
6716 (find_status_pending_thread_callback): New functions.
6717 (handle_status): Handle the case of multiple threads having
6718 interesting statuses to report. Report threads' real last signal
6719 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6720 with an interesting thread to report the status for, instead of
6721 always reporting the status of the first thread.
6723 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6725 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6726 * gdbreplay.c (gdbreplay_version): Likewise.
6728 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6730 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6731 iov.iov_len with the real length in use.
6733 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6735 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6736 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6737 for all targets that use win32-low.c.
6738 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6739 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6741 2013-12-13 Pedro Alves <palves@redhat.com>
6743 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6744 if equal to TARGET_WAITKIND_LOADED.
6745 * win32-low.c (cached_status): New static global.
6746 (win32_wait): Add declaration.
6747 (do_initial_child_stuff): Flush all initial pending debug events
6748 up to the initial breakpoint.
6749 (win32_wait): If CACHED_STATUS was set, return that instead
6750 of doing a real wait. Remove the code resuming the execution
6751 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6752 during the initial phase. Also remove the code changing
6753 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6754 TARGET_WAITKIND_STOPPED.
6756 2013-12-11 Yao Qi <yao@codesourcery.com>
6758 * notif.c (handle_notif_ack): Return 0 if no notification
6761 2013-11-20 Doug Evans <dje@google.com>
6763 * linux-low.c (linux_set_resume_request): Fix comment.
6765 2013-11-20 Doug Evans <dje@google.com>
6767 * linux-low.c (resume_status_pending_p): Tweak comment.
6769 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6771 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6772 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6773 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6774 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6775 (srv_amd64_regobj): Add amd64-mpx.o.
6776 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6777 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6778 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6779 * i387-fp.c (num_pl_bnd_register) Added constant.
6780 (num_pl_bnd_cfg_registers) Added constant.
6781 (struct i387_xsave) Added reserved area and MPX fields.
6782 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6783 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6785 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6786 (init_registers_amd64_mpx_linux): Declare new function.
6787 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6788 (x86_64_regmap): Add MPX registers.
6789 (x86_linux_read_description): Add MPX case.
6790 (initialize_low_arch): Initialize MPX targets.
6792 2013-11-18 Tom Tromey <tromey@redhat.com>
6794 * configure: Rebuild.
6795 * configure.ac: Don't check for stdlib.h.
6796 * gdbreplay.c: Unconditionally include stdlib.h.
6798 2013-11-18 Tom Tromey <tromey@redhat.com>
6800 * config.in: Rebuild.
6801 * configure: Rebuild.
6802 * configure.ac: Don't use AC_HEADER_DIRENT.
6804 2013-11-18 Tom Tromey <tromey@redhat.com>
6806 * server.h: Don't check HAVE_STRING_H.
6807 * gdbreplay.c: Don't check HAVE_STRING_H.
6808 * configure: Rebuild.
6810 2013-11-18 Tom Tromey <tromey@redhat.com>
6812 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6815 2013-11-08 Tom Tromey <tromey@redhat.com>
6817 * configure, config.in: Rebuild.
6818 * configure.ac: Remove unused configury.
6820 2013-11-08 Tom Tromey <tromey@redhat.com>
6822 * acinclude.m4: Include common.m4, codeset.m4.
6823 * configure, config.in: Rebuild.
6824 * configure.ac: Use GDB_AC_COMMON.
6826 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6828 * linux-s390-low.c (HWCAP_S390_TE): New define.
6829 (s390_arch_setup): Consider the TE field in the HWCAP for
6830 determining 'have_regset_tdb'.
6832 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6835 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6838 2013-10-02 Pedro Alves <palves@redhat.com>
6840 * server.c (process_serial_event): Don't output "GDBserver
6841 exiting" if GDB is connected through stdio.
6842 * target.c (mywait): Likewise, be silent if GDB is connected
6845 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6847 * lynx-low.c (lynx_add_threads_after_attach): New function.
6848 (lynx_attach): Remove call to add_thread. Add call to
6849 lynx_add_threads_after_attach instead.
6851 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6853 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6854 * config.in, configure: Regenerated.
6856 2013-09-18 Yao Qi <yao@codesourcery.com>
6859 * server.c (start_inferior): Clear 'resume_info'.
6861 2013-09-16 Jiong Wang <jiwang@tilera.com>
6863 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6866 2013-09-16 Jiong Wang <jiwang@tilera.com>
6868 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6869 linux-tile-low.o to srv_tgtobj.
6871 2013-09-16 Will Newton <will.newton@linaro.org>
6873 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6876 2013-09-06 Pedro Alves <palves@redhat.com>
6878 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6879 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6880 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6881 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6882 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6883 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6885 2013-09-06 Pedro Alves <palves@redhat.com>
6887 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6888 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6890 2013-09-06 Pedro Alves <palves@redhat.com>
6892 * linux-amd64-ipa.c: Include tracepoint.h.
6893 * linux-i386-ipa.c: Include tracepoint.h.
6895 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6897 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6898 (ps_get_thread_area): New function.
6900 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6902 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6903 (initialize_low_arch): Call init_registers_crisv32 rather than
6904 init_register_crisv32.
6906 2013-09-05 Pedro Alves <palves@redhat.com>
6908 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6910 * hostio.h: ... this new file.
6911 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6912 win32-low.c: Include hostio.h.
6914 2013-09-05 Pedro Alves <palves@redhat.com>
6916 * server.h (gdb_client_data, handler_func, callback_handler_func)
6917 (delete_file_handler, add_file_handler, append_callback_event)
6918 (delete_callback_event, start_event_loop, initialize_event_loop):
6919 Move to event-loop.h and include it.
6920 * event-loop.h: New file.
6922 2013-09-05 Pedro Alves <palves@redhat.com>
6924 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6925 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6926 (loaded_dll, unloaded_dll): Move to ...
6927 * dll.h: ... this new file.
6928 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6930 2013-09-05 Pedro Alves <palves@redhat.com>
6932 * server.h (current_process, get_thread_process, all_processes)
6933 (add_inferior_to_list, for_each_inferior, current_inferior)
6934 (remove_inferior, add_process, remove_process, find_process_pid)
6935 (have_started_inferiors_p, have_attached_inferiors_p)
6936 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6937 (clear_inferiors, find_inferior, find_inferior_id)
6938 (inferior_target_data, set_inferior_target_data)
6939 (inferior_regcache_data, set_inferior_regcache_data): Move to
6940 inferiors.h, and include it.
6941 * inferiors.h: New file.
6943 2013-09-05 Pedro Alves <palves@redhat.com>
6945 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6949 2013-09-05 Pedro Alves <palves@redhat.com>
6951 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6953 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6954 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6955 (handle_tracepoint_general_set, handle_tracepoint_query)
6956 (tracepoint_finished_step, tracepoint_was_hit)
6957 (release_while_stepping_state_list, current_traceframe)
6958 (in_readonly_region, traceframe_read_mem)
6959 (fetch_traceframe_registers, traceframe_read_sdata)
6960 (traceframe_read_info, struct fast_tpoint_collect_status)
6961 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6962 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6963 (supply_fast_tracepoint_registers)
6964 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6965 (ipa_tdesc, claim_trampoline_space)
6966 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6967 (agent_mem_read, agent_get_trace_state_variable_value)
6968 (agent_set_trace_state_variable_value, agent_tsv_read)
6969 (agent_mem_read_string, get_raw_reg_func_addr)
6970 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6971 * tracepoint.h: ... this new file.
6973 2013-09-05 Pedro Alves <palves@redhat.com>
6975 * server.h (perror_with_name, error, fatal, warning, paddress)
6976 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6978 * utils.h: New file.
6980 2013-09-05 Pedro Alves <palves@redhat.com>
6982 * server.h (remote_debug, noack_mode, transport_is_reliable)
6983 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6984 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6985 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6986 (write_enn, initialize_async_io, enable_async_io)
6987 (disable_async_io, check_remote_input_interrupt_request)
6988 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6989 (dead_thread_notify, prepare_resume_reply)
6990 (decode_address_to_semicolon, decode_address, decode_m_packet)
6991 (decode_M_packet, decode_X_packet, decode_xfer_write)
6992 (decode_search_memory_packet, unhexify, hexify)
6993 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6994 (look_up_one_symbol, relocate_instruction)
6995 (monitor_output): Move to remote-utils.h, and include it.
6996 * remote-utils.h: New file.
6998 2013-09-05 Pedro Alves <palves@redhat.com>
7000 * server.h (_): Delete.
7002 2013-09-02 Pedro Alves <palves@redhat.com>
7004 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7005 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7007 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7009 2013-09-02 Pierre Muller <muller@sourceware.org>
7011 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7012 or WriteProcessMemory complete successfully and handle
7013 ERROR_PARTIAL_COPY error.
7015 2013-09-02 Pedro Alves <palves@redhat.com>
7017 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7018 error instead of EIO.
7020 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7023 * linux-low.c: Include filestuff.h.
7024 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7025 * lynx-low.c: Include filestuff.h.
7026 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7027 * server.c: Include filestuff.h.
7028 (main): Call notice_open_fds.
7029 * spu-low.c: Include filestuff.h.
7030 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7032 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7034 * Makefile.in: Explain why ../target and ../nat are not
7035 listed as include file search paths.
7036 (linux-waitpid.o): New object file rule.
7037 * configure.srv (srv_native_linux_obj): New variable.
7038 Replace all occurrences of linux native object files with
7039 $srv_native_linux_obj.
7040 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7041 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7042 (linux_enable_event_reporting): Remove declaration.
7043 (my_waitpid): Moved to common/linux-waitpid.c.
7044 (linux_wait_for_event): Pass ptid when calling
7045 linux_enable_event_reporting.
7046 (linux_supports_tracefork_flag): Remove.
7047 (linux_enable_event_reporting): Likewise.
7048 (linux_tracefork_grandchild): Remove.
7049 (STACK_SIZE): Moved to common/linux-ptrace.c.
7050 (linux_tracefork_child): Remove.
7051 (linux_test_for_tracefork): Remove.
7052 (linux_look_up_symbols): Call linux_supports_traceclone.
7053 (initialize_low): Remove call to linux_test_for_tracefork.
7054 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7055 common/linux-ptrace.h.
7056 (PTRACE_TYPE_ARG4): Likewise.
7057 Include linux-ptrace.h.
7059 2013-08-21 Pedro Alves <palves@redhat.com>
7061 * config.in: Renegerate.
7063 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7065 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7066 (SFILES): Remove $(srcdir)/common/target-common.c and
7067 add $(srcdir)/target/waitstatus.c.
7068 (OBS): Remove target-common.o and add waitstatus.o.
7069 (server_h): Remove $(srcdir)/../common/target-common.h and
7070 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7071 and $(srcdir)/../target/waitstatus.h.
7072 (target-common.o): Remove.
7073 (waitstatus.o): New target object file.
7074 * target.h: Do not include target-common.h and
7075 include target/resume.h, target/wait.h and
7076 target/waitstatus.h.
7078 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7080 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7081 to PTRACE_TYPE_ARG3.
7082 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7083 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7085 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7086 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7088 2013-07-27 Jie Zhang <jie@codesourcery.com>
7089 Daniel Jacobowitz <dan@codesourcery.com>
7090 Yao Qi <yao@codesourcery.com>
7092 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7093 (mips-linux-watch.o): New rule.
7094 (mips_linux_watch_h): New variable.
7095 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7097 * linux-mips-low.c: Include mips-linux-watch.h.
7098 (struct arch_process_info, struct arch_lwp_info): New.
7099 (update_watch_registers_callback): New function.
7100 (mips_linux_new_process, mips_linux_new_thread) New functions.
7101 (mips_linux_prepare_to_resume, mips_insert_point): New
7103 (mips_remove_point, mips_stopped_by_watchpoint): New
7105 (rsp_bp_type_to_target_hw_bp_type): New function.
7106 (mips_stopped_data_address): New function.
7107 (the_low_target): Add watchpoint support functions.
7109 2013-07-27 Yao Qi <yao@codesourcery.com>
7111 * i386-low.c: Include break-common.h.
7112 (enum target_hw_bp_type): Remove.
7114 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7116 * Makefile.in (SFILES): /common/target-common.c.
7117 (OBS): Add target-common.o.
7118 (server_h): Add $(srcdir)/../common/target-common.h.
7119 (target-common.o): New target.
7120 * server.c (queue_stop_reply_callback): Free
7121 status string after use.
7122 * target.c (target_waitstatus_to_string): Remove.
7123 * target.h: Include target-common.h.
7124 (resume_kind): Likewise.
7125 (target_waitkind): Likewise.
7126 (target_waitstatus): Likewise.
7127 (TARGET_WNOHANG): Likewise.
7129 2013-07-04 Yao Qi <yao@codesourcery.com>
7131 * Makefile.in (host_alias): Use @host_noncanonical@.
7132 (target_alias): Use @target_noncanonical@.
7133 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7134 ACX_NONCANONICAL_HOST.
7135 * configure: Regenerated.
7138 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7140 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7141 * configure: Rebuild.
7142 * Makefile.in (version_host, version_target): Get from configure.
7143 (version.c): Use $(version_host) and $(version_target).
7145 2013-07-03 Pedro Alves <palves@redhat.com>
7147 * Makefile.in (config.status): Depend on development.sh.
7148 * acinclude.m4: Include libmcheck.m4.
7149 * configure: Regenerate.
7151 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7153 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7154 attribute inside the parentheses.
7155 (winapi_DebugSetProcessKillOnExit): Ditto.
7156 (winapi_DebugBreakProcess): Ditto.
7157 (winapi_GenerateConsoleCtrlEvent): Ditto.
7159 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7161 * notif.h (notif_event): Add a dummy member to avoid compiler
7164 2013-07-01 Pedro Alves <palves@redhat.com>
7166 * hostio.c (HOSTIO_PATH_MAX): Define.
7167 (require_filename, handle_open, handle_unlink, handle_readlink):
7170 2013-07-01 Pedro Alves <palves@redhat.com>
7172 * server.h: Include "pathmax.h".
7173 * linux-low.c: Don't include sys/param.h.
7174 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7176 * win32-low.c: Don't include sys/param.h.
7177 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7179 2013-07-01 Pedro Alves <palves@redhat.com>
7181 * event-loop.c: Don't check HAVE_UNISTD_H before including
7183 * gdbreplay.c: Likewise.
7184 * remote-utils.c: Likewise.
7185 * server.c: Likewise.
7186 * configure.ac: Don't check for unistd.h.
7187 * configure: Regenerate.
7189 2013-06-28 Tom Tromey <tromey@redhat.com>
7191 * Makefile.in (version.c): Use version.in, not
7194 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7196 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7197 * configure: Rebuild.
7198 * Makefile.in (version_host, version_target): Get from configure.
7199 (version.c): Use $(version_host) and $(version_target).
7201 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7203 Fix trace-status to output user name without trailing colon.
7204 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7206 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7208 Fix trace-status to output proper start-time and stop-time.
7209 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7210 output start time and stop time in hex as gdb expects.
7212 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7214 * tracepoint.c (build_traceframe_info_xml): Output trace state
7215 variables present in the trace buffer.
7217 2013-06-24 Tom Tromey <tromey@redhat.com>
7219 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7221 (version.o): Remove.
7222 * gdbreplay.c: Include version.h.
7223 (version, host_name): Don't declare.
7224 * server.h: Include version.h.
7225 (version, host_name): Don't declare.
7227 2013-06-12 Pedro Alves <palves@redhat.com>
7229 * linux-x86-low.c (linux_is_elf64): Delete global.
7230 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7231 with local linux_pid_exe_is_elf_64_file use.
7233 2013-06-11 Pedro Alves <palves@redhat.com>
7235 * linux-low.c (regset_disabled, disable_regset): New functions.
7236 (regsets_fetch_inferior_registers)
7237 (regsets_store_inferior_registers): Use them.
7238 (initialize_regsets_info); Don't allocate the disabled_regsets
7240 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7243 2013-06-11 Pedro Alves <palves@redhat.com>
7245 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7248 2013-06-11 Pedro Alves <palves@redhat.com>
7250 * linux-x86-low.c (initialize_low_arch): Call
7251 init_registers_x32_avx_linux.
7253 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7255 Fix compatibility with Android Bionic.
7256 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7259 2013-06-07 Pedro Alves <palves@redhat.com>
7262 * Makefile.in (OBS): Add tdesc.o.
7263 (IPA_OBJS): Add tdesc-ipa.o.
7264 (tdesc-ipa.o): New rule.
7265 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7267 * linux-low.c (new_inferior): Delete.
7268 (disabled_regsets, num_regsets): Delete.
7269 (linux_add_process): Adjust to set the new per-process
7271 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7272 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7273 was a stop. When calling arch_setup, switch the current inferior
7274 to the thread that got an event.
7275 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7276 (regsets_fetch_inferior_registers)
7277 (regsets_store_inferior_registers): New regsets_info parameter.
7279 (linux_register_in_regsets): New regs_info parameter. Adjust to
7281 (register_addr, fetch_register, store_register): New usrregs_info
7282 parameter. Adjust to use it.
7283 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7284 parameter regs_info. Adjust to use it.
7285 (linux_fetch_registers): Get the current inferior's regs_info, and
7287 (linux_store_registers): Ditto.
7288 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7289 (initialize_low): Don't initialize the target_regsets here. Call
7290 initialize_low_arch.
7291 * linux-low.h (target_regsets): Delete declaration.
7292 (struct regsets_info): New.
7293 (struct usrregs_info): New.
7294 (struct regs_info): New.
7295 (struct process_info_private) <new_inferior>: New field.
7296 (struct linux_target_ops): Delete the num_regs, regmap, and
7297 regset_bitmap fields. New field regs_info.
7298 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7299 * i387-fp.c (num_xmm_registers): Delete.
7300 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7301 calls to new interface.
7302 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7303 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7304 Infer the number of xmm registers from the regcache's target
7306 * i387-fp.h (num_xmm_registers): Delete.
7307 * inferiors.c (add_thread): Don't install the thread's regcache
7309 * proc-service.c (gregset_info): Fetch the current inferior's
7310 regs_info. Adjust to use it.
7311 * regcache.c: Include tdesc.h.
7312 (register_bytes, reg_defs, num_registers)
7313 (gdbserver_expedite_regs): Delete.
7314 (get_thread_regcache): If the thread doesn't have a regcache yet,
7315 create one, instead of aborting gdbserver.
7316 (regcache_invalidate_one): Rename to ...
7317 (regcache_invalidate_thread): ... this.
7318 (regcache_invalidate_one): New.
7319 (regcache_invalidate): Only invalidate registers of the current
7321 (init_register_cache): Add target_desc parameter, and use it.
7322 (new_register_cache): Ditto. Assert the target description has a
7323 non zero registers_size.
7324 (regcache_cpy): Add assertions. Adjust.
7325 (realloc_register_cache, set_register_cache): Delete.
7326 (registers_to_string, registers_from_string): Adjust.
7327 (find_register_by_name, find_regno, find_register_by_number)
7328 (register_cache_size): Add target_desc parameter, and use it.
7329 (free_register_cache_thread, free_register_cache_thread_one)
7330 (regcache_release, register_cache_size): New.
7331 (register_size): Add target_desc parameter, and use it.
7332 (register_data, supply_register, supply_register_zeroed)
7333 (supply_regblock, supply_register_by_name, collect_register)
7334 (collect_register_as_string, collect_register_by_name): Adjust.
7335 * regcache.h (struct target_desc): Forward declare.
7336 (struct regcache) <tdesc>: New field.
7337 (init_register_cache, new_register_cache): Add target_desc
7339 (regcache_invalidate_thread): Declare.
7340 (regcache_invalidate_one): Delete declaration.
7341 (regcache_release): Declare.
7342 (find_register_by_number, register_cache_size, register_size)
7343 (find_regno): Add target_desc parameter.
7344 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7346 * remote-utils.c: Include tdesc.h.
7347 (outreg, prepare_resume_reply): Adjust.
7348 * server.c: Include tdesc.h.
7349 (gdbserver_xmltarget): Delete declaration.
7350 (get_features_xml, process_serial_event): Adjust.
7351 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7353 (struct process_info) <tdesc>: New field.
7354 (ipa_tdesc): Declare.
7355 * tdesc.c: New file.
7356 * tdesc.h: New file.
7357 * tracepoint.c: Include tdesc.h.
7358 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7359 (get_context_regcache): Adjust to pass ipa_tdesc down.
7360 (do_action_at_tracepoint): Adjust to get the register cache size
7361 from the context regcache's description.
7362 (traceframe_walk_blocks): Adjust to get the register cache size
7363 from the current trace frame's description.
7364 (traceframe_get_pc): Adjust to get current trace frame's
7365 description and pass it down.
7366 (gdb_collect): Adjust to get the register cache size from the
7368 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7369 (gdbserver_xmltarget): Delete.
7370 (initialize_low_tracepoint): Set the ipa's target description.
7371 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7372 (initialize_low_tracepoint): Set the ipa's target description.
7373 * linux-x86-low.c: Include tdesc.h.
7374 [__x86_64__] (is_64bit_tdesc): New.
7375 (ps_get_thread_area, x86_get_thread_area): Use it.
7376 (i386_cannot_store_register): Rename to ...
7377 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7378 (i386_cannot_fetch_register): Rename to ...
7379 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7380 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7382 (target_regsets): Rename to ...
7383 (x86_regsets): ... this.
7384 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7386 (x86_siginfo_fixup): Use is_64bit_tdesc.
7387 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7388 (tdesc_x32_avx_linux, tdesc_x32_linux)
7389 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7391 (x86_linux_update_xmltarget): Delete.
7392 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7393 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7394 (AMD64_LINUX_USER64_CS): New.
7395 (x86_linux_read_description): New, based on
7396 x86_linux_update_xmltarget.
7397 (same_process_callback): New.
7398 (x86_arch_setup_process_callback): New.
7399 (x86_linux_update_xmltarget): New.
7400 (x86_regsets_info): New.
7401 (amd64_linux_regs_info): New.
7402 (i386_linux_usrregs_info): New.
7403 (i386_linux_regs_info): New.
7404 (x86_linux_regs_info): New.
7405 (x86_arch_setup): Reimplement.
7406 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7407 (x86_emit_ops): Ditto.
7408 (the_low_target): Adjust. Install x86_linux_regs_info,
7409 x86_cannot_fetch_register, and x86_cannot_store_register.
7410 (initialize_low_arch): New.
7411 * linux-ia64-low.c (tdesc_ia64): Declare.
7412 (ia64_fetch_register): Adjust.
7413 (ia64_usrregs_info, regs_info): New globals.
7414 (ia64_regs_info): New function.
7415 (the_low_target): Adjust.
7416 (initialize_low_arch): New function.
7417 * linux-sparc-low.c (tdesc_sparc64): Declare.
7418 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7420 (sparc_arch_setup): New function.
7421 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7422 (the_low_target): Adjust.
7423 (initialize_low_arch): New function.
7424 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7425 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7426 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7427 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7428 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7429 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7430 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7431 (tdesc_powerpc_isa205_vsx64l): Declare.
7432 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7433 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7434 (ppc_set_pc, ppc_get_hwcap): Adjust.
7435 (ppc_usrregs_info): Forward declare.
7436 (!__powerpc64__) ppc_regmap_adjusted: New global.
7437 (ppc_arch_setup): Adjust to the current process'es target
7439 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7440 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7441 (ppc_store_evrregset): Adjust.
7442 (target_regsets): Rename to ...
7443 (ppc_regsets): ... this, and make static.
7444 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7445 (ppc_regs_info): New function.
7446 (the_low_target): Adjust.
7447 (initialize_low_arch): New function.
7448 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7449 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7450 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7451 (tdesc_s390x_linux64v2): Declare.
7452 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7453 (s390_fill_gregset, s390_store_last_break): Adjust.
7454 (target_regsets): Rename to ...
7455 (s390_regsets): ... this, and make static.
7456 (s390_get_pc, s390_set_pc): Adjust.
7457 (s390_get_hwcap): New target_desc parameter, and use it.
7458 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7459 (s390_arch_setup): Adjust to set the current process'es target
7460 description. Don't adjust the regmap.
7461 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7462 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7463 (regs_info_3264): New globals.
7464 (s390_regs_info): New function.
7465 (the_low_target): Adjust.
7466 (initialize_low_arch): New function.
7467 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7468 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7469 [__mips64] (init_registers_mips_linux)
7470 (init_registers_mips_dsp_linux): Delete defines.
7471 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7472 (have_dsp): New global.
7473 (mips_read_description): New, based on mips_arch_setup.
7474 (mips_arch_setup): Reimplement.
7475 (get_usrregs_info): New function.
7476 (mips_cannot_fetch_register, mips_cannot_store_register)
7477 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7478 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7479 (target_regsets): Rename to ...
7480 (mips_regsets): ... this, and make static.
7481 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7482 (dsp_regs_info, regs_info): New globals.
7483 (mips_regs_info): New function.
7484 (the_low_target): Adjust.
7485 (initialize_low_arch): New function.
7486 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7487 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7489 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7490 (arm_read_description): New, with bits factored from
7492 (arm_arch_setup): Reimplement.
7493 (target_regsets): Rename to ...
7494 (arm_regsets): ... this, and make static.
7495 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7496 (arm_regs_info): New function.
7497 (the_low_target): Adjust.
7498 (initialize_low_arch): New function.
7499 * linux-m68k-low.c (tdesc_m68k): Declare.
7500 (target_regsets): Rename to ...
7501 (m68k_regsets): ... this, and make static.
7502 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7503 (m68k_regs_info): New function.
7504 (m68k_arch_setup): New function.
7505 (the_low_target): Adjust.
7506 (initialize_low_arch): New function.
7507 * linux-sh-low.c (tdesc_sharch): Declare.
7508 (target_regsets): Rename to ...
7509 (sh_regsets): ... this, and make static.
7510 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7511 (sh_regs_info, sh_arch_setup): New functions.
7512 (the_low_target): Adjust.
7513 (initialize_low_arch): New function.
7514 * linux-bfin-low.c (tdesc_bfin): Declare.
7515 (bfin_arch_setup): New function.
7516 (bfin_usrregs_info, regs_info): New globals.
7517 (bfin_regs_info): New function.
7518 (the_low_target): Adjust.
7519 (initialize_low_arch): New function.
7520 * linux-cris-low.c (tdesc_cris): Declare.
7521 (cris_arch_setup): New function.
7522 (cris_usrregs_info, regs_info): New globals.
7523 (cris_regs_info): New function.
7524 (the_low_target): Adjust.
7525 (initialize_low_arch): New function.
7526 * linux-cris-low.c (tdesc_crisv32): Declare.
7527 (cris_arch_setup): New function.
7528 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7529 (cris_regs_info): New function.
7530 (the_low_target): Adjust.
7531 (initialize_low_arch): New function.
7532 * linux-m32r-low.c (tdesc_m32r): Declare.
7533 (m32r_arch_setup): New function.
7534 (m32r_usrregs_info, regs_info): New globals.
7535 (m32r_regs_info): Adjust.
7536 (initialize_low_arch): New function.
7537 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7538 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7539 (tic6x_usrregs_info): Forward declare.
7540 (tic6x_read_description): New function, based on ...
7541 (tic6x_arch_setup): ... this. Reimplement.
7542 (target_regsets): Rename to ...
7543 (tic6x_regsets): ... this, and make static.
7544 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7545 (tic6x_regs_info): New function.
7546 (the_low_target): Adjust.
7547 (initialize_low_arch): New function.
7548 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7549 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7550 (target_regsets): Rename to ...
7551 (xtensa_regsets): ... this, and make static.
7552 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7554 (xtensa_arch_setup, xtensa_regs_info): New functions.
7555 (the_low_target): Adjust.
7556 (initialize_low_arch): New function.
7557 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7558 (nios2_arch_setup): Set the current process'es tdesc.
7559 (target_regsets): Rename to ...
7560 (nios2_regsets): ... this.
7561 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7562 (nios2_regs_info): New function.
7563 (the_low_target): Adjust.
7564 (initialize_low_arch): New function.
7565 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7566 (aarch64_arch_setup): Set the current process'es tdesc.
7567 (target_regsets): Rename to ...
7568 (aarch64_regsets): ... this.
7569 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7570 (aarch64_regs_info): New function.
7571 (the_low_target): Adjust.
7572 (initialize_low_arch): New function.
7573 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7575 (target_regsets): Rename to ...
7576 (tile_regsets): ... this.
7577 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7578 (tile_regs_info): New function.
7579 (tile_arch_setup): Set the current process'es tdesc.
7580 (the_low_target): Adjust.
7581 (initialize_low_arch): New function.
7582 * spu-low.c (tdesc_spu): Declare.
7583 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7584 * win32-arm-low.c (tdesc_arm): Declare.
7585 (arm_arch_setup): New function.
7586 (the_low_target): Install arm_arch_setup instead of
7588 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7589 (init_windows_x86): Rename to ...
7590 (i386_arch_setup): ... this. Set `win32_tdesc'.
7591 (the_low_target): Adjust.
7592 * win32-low.c (win32_tdesc): New global.
7593 (child_add_thread): Don't create the thread cache here.
7594 (do_initial_child_stuff): Set the new process'es tdesc.
7595 * win32-low.h (struct target_desc): Forward declare.
7596 (win32_tdesc): Declare.
7597 * lynx-i386-low.c (tdesc_i386): Declare global.
7598 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7599 * lynx-low.c (lynx_tdesc): New global.
7600 (lynx_add_process): Set the new process'es tdesc.
7601 * lynx-low.h (struct target_desc): Forward declare.
7602 (lynx_tdesc): Declare global.
7603 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7604 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7605 * nto-low.c (nto_tdesc): New global.
7606 (do_attach): Set the new process'es tdesc.
7607 * nto-low.h (struct target_desc): Forward declare.
7608 (nto_tdesc): Declare.
7609 * nto-x86-low.c (tdesc_i386): Declare.
7610 (nto_x86_arch_setup): Set `nto_tdesc'.
7612 2013-06-04 Gary Benson <gbenson@redhat.com>
7614 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7615 to qSupported response when appropriate.
7616 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7617 with nonzero-length annex.
7618 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7619 arguments supplied in annex.
7621 2013-05-31 Doug Evans <dje@google.com>
7624 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7625 64 bits in 64-cross-32 environment.
7627 2013-05-28 Pedro Alves <palves@redhat.com>
7629 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7630 (aarch64-without-fpu.c): Delete rule.
7631 * configure.srv (aarch64*-*-linux*): Remove references to
7632 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7633 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7636 2013-05-24 Pedro Alves <palves@redhat.com>
7638 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7639 instead of strchr/decode_address. Error if the range isn't split
7640 with a ','. Don't assume there's be a ':' in the action.
7642 2013-05-23 Yao Qi <yao@codesourcery.com>
7643 Pedro Alves <palves@redhat.com>
7645 * linux-low.c (lwp_in_step_range): New function.
7646 (linux_wait_1): If the thread was range stepping and stopped
7647 outside the stepping range, report the stop to GDB. Otherwise,
7648 continue stepping. Add range stepping debug output.
7649 (linux_set_resume_request): Copy the step range from the resume
7651 (linux_supports_range_stepping): New.
7652 (linux_target_ops) <supports_range_stepping>: Set to
7653 linux_supports_range_stepping.
7654 * linux-low.h (struct linux_target_ops)
7655 <supports_range_stepping>: New field.
7656 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7657 * linux-x86-low.c (x86_supports_range_stepping): New.
7658 (the_low_target) <supports_range_stepping>: Set to
7659 x86_supports_range_stepping.
7660 * server.c (handle_v_cont): Handle 'r' action.
7661 (handle_v_requests): Append ";r" if the target supports range
7663 * target.h (struct thread_resume) <step_range_start,
7664 step_range_end>: New fields.
7665 (struct target_ops) <supports_range_stepping>:
7667 (target_supports_range_stepping): New macro.
7669 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7671 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7672 confusion in comment.
7674 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7676 * lynx-low.c (struct process_info_private): New type.
7677 (lynx_add_process): New function.
7678 (lynx_create_inferior, lynx_attach): Replace calls to
7679 add_process by calls to lynx_add_process.
7680 (lynx_resume): If PTID is null, then try using
7681 current_process()->private->last_wait_event_ptid.
7683 (lynx_clear_inferiors): Delete. The contents of that function
7684 has been inlined in lynx_mourn;
7685 (lynx_wait_1): Save the ptid in the process's private data.
7686 (lynx_mourn): Free the process' private data. Replace call
7687 to lynx_clear_inferiors by call to clear_inferiors.
7689 2013-05-17 Yao Qi <yao@codesourcery.com>
7691 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7694 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7696 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7697 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7698 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7699 PT_TEXT_END_ADDR guards. Update comments.
7700 (linux_target_op) <read_offsets>: Conditionally define to
7701 linux_read_offsets if the target is UCLIBC and if it defines
7702 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7704 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7705 Andrew Jenner <andrew@codesourcery.com>
7707 * Makefile.in (SFILES): Add linux-nios2-low.c.
7708 (clean): Add action to delete nios2-linux.c.
7709 (nios2-linux.c): New rule.
7710 * configure.srv: Add nios2*-*-linux*.
7711 * linux-nios2-low.c: New.
7713 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7715 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7717 2013-04-25 Hui Zhu <hui@codesourcery.com>
7720 * ax.c (ax_printf): Add fflush.
7722 2013-04-22 Tom Tromey <tromey@redhat.com>
7724 * Makefile.in (SFILES): Add filestuff.c.
7725 (OBS): Add filestuff.o.
7726 (filestuff.o): New target.
7727 * config.in, configure: Rebuild.
7728 * configure.ac: Check for fdwalk, pipe2.
7730 2013-04-17 Pedro Alves <palves@redhat.com>
7732 * configure.ac (USE_THREAD_DB): Delete variable.
7733 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7734 Don't AC_SUBST USE_THREAD_DB.
7735 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7736 * config.in, configure: Regenerate.
7738 2013-04-16 Pedro Alves <palves@redhat.com>
7740 * linux-low.h (struct lwp_info) <thread_known>: Move under
7741 the USE_THREAD_DB #ifdef.
7743 2013-04-16 Pedro Alves <palves@redhat.com>
7745 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7746 (linux-low.o): Delete rule.
7747 * linux-low.h: Always include "gdb_thread_db.h" instead of
7748 conditionally including thread_db.h.
7749 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7752 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7754 * Makefile.in (install-only): Fix make install regression.
7756 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7758 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7759 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7761 * gdbserver.1: Remove.
7763 2013-03-22 Pedro Alves <palves@redhat.com>
7765 * linux-low.c (handle_extended_wait): Don't call
7766 linux_enable_event_reporting.
7768 2013-03-15 Tony Theodore <tonyt@logyst.com>
7771 * Makefile.in (SHELL): Use @SHELL@.
7773 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7775 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7778 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7780 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7781 Remove extraneous NULL element.
7783 2013-03-13 Yao Qi <yao@codesourcery.com>
7785 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7786 'V' block in trace frame.
7788 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7790 * target.h (struct target_ops): Add btrace ops.
7791 (target_supports_btrace): New macro.
7792 (target_enable_btrace): New macro.
7793 (target_disable_btrace): New macro.
7794 (target_read_btrace): New macro.
7795 * gdbthread.h (struct thread_info): Add btrace field.
7796 * server.c: Include btrace-common.h.
7797 (handle_btrace_general_set): New function.
7798 (handle_btrace_enable): New function.
7799 (handle_btrace_disable): New function.
7800 (handle_general_set): Call handle_btrace_general_set.
7801 (handle_qxfer_btrace): New function.
7802 (struct qxfer qxfer_packets[]): Add btrace entry.
7803 * inferiors.c (remove_thread): Disable btrace.
7804 * linux-low: Include linux-btrace.h.
7805 (linux_low_enable_btrace): New function.
7806 (linux_low_read_btrace): New function.
7807 (linux_target_ops): Add btrace ops.
7808 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7809 Add srv_linux_btrace=yes.
7810 (x86_64-*-linux*): Add linux-btrace.o.
7811 Add srv_linux_btrace=yes.
7812 * configure.ac: Define HAVE_LINUX_BTRACE.
7813 * config.in: Regenerated.
7814 * configure: Regenerated.
7816 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7818 * server.c (handle_qxfer): Preserve error message if -3 is
7820 (qxfer): Document the -3 return value.
7822 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7824 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7825 (linux_btrace_h): New variable.
7826 (linux-btrace.o): New rule.
7828 2013-03-08 Stan Shebs <stan@codesourcery.com>
7829 Hafiz Abid Qadeer <abidh@codesourcery.com>
7831 * tracepoint.c (trace_buffer_size): New global.
7832 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7833 (init_trace_buffer): Change to one-argument function. Allocate
7834 trace buffer memory.
7835 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7836 handle QTBuffer:size packet.
7837 (cmd_bigqtbuffer_size): New function.
7838 (initialize_tracepoint): Call init_trace_buffer with
7839 DEFAULT_TRACE_BUFFER_SIZE.
7840 * server.c (handle_query): Add QTBuffer:size in the
7843 2013-03-07 Yao Qi <yao@codesourcery.com>
7845 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7846 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7848 (cmd_qtsp): Adjust condition. Do post increment.
7849 Set cur_action and cur_step_action back to 0.
7851 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7854 * linux-low.c (linux_write_memory): Return early success if LEN is
7857 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7859 * configure.srv: Add x86_64-*-cygwin* as target.
7861 2013-02-28 Tom Tromey <tromey@redhat.com>
7863 * configure.ac: Invoke AC_SYS_LARGEFILE.
7864 * configure, config.in: Rebuild.
7866 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7868 * win32-low.c: Throughout, fix format strings and casts of
7869 printf-like functions to avoid type related warnings on all
7871 (get_child_debug_event): Print dwDebugEventCode as hex since
7872 that's how it's usually documented.
7874 2013-02-28 Yao Qi <yao@codesourcery.com>
7876 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7879 2013-02-27 Jiong Wang <jiwang@tilera.com>
7881 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7882 (reg-tilegx32.c): New rule.
7883 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7884 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7885 different register info initializer according to elf class.
7886 (init_registers_tilgx32): New function. The tilegx32 register info
7888 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7889 (tile_store_gregset): Likewise.
7891 2013-02-27 Yao Qi <yao@codesourcery.com>
7893 * server.c (process_point_options): Print debug message when
7894 debug_threads is true.
7896 2013-02-26 Yao Qi <yao@codesourcery.com>
7898 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7900 2013-02-19 Pedro Alves <palves@redhat.com>
7901 Kai Tietz <ktietz@redhat.com>
7905 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7906 instead of strtoul to extract address from packet.
7907 (process_serial_event) <'z'>: Likewise.
7909 2013-02-18 Yao Qi <yao@codesourcery.com>
7911 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7913 2013-02-14 Pedro Alves <palves@redhat.com>
7917 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7918 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7920 2013-02-14 Pedro Alves <palves@redhat.com>
7922 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7924 2013-02-14 Pedro Alves <palves@redhat.com>
7926 * tracepoint.c (save_string): Delete.
7927 (add_tracepoint_action): Use savestring instead of save_string.
7929 2013-02-12 Pedro Alves <palves@redhat.com>
7931 * linux-xtensa-low.c: Ditto.
7932 * xtensa-xtregs.c: Ditto.
7934 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7936 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7939 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7941 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7942 aarch64_num_wp_regs and aarch64_num_bp_regs to
7943 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7945 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7947 * linux-aarch64-low.c (ps_get_thread_area): Replace
7948 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7950 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7951 Marcus Shawcroft <marcus.shawcroft@arm.com>
7952 Nigel Stephens <nigel.stephens@arm.com>
7953 Yufeng Zhang <yufeng.zhang@arm.com>
7955 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7956 (aarch64.c, aarch64-without-fpu.c): New targets.
7957 * configure.srv (aarch64*-*-linux*): New.
7958 * linux-aarch64-low.c: New file.
7960 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7962 * linux-low.c (handle_extended_wait, linux_create_inferior)
7963 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7964 (dequeue_one_deferred_signal, linux_resume_one_thread)
7965 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7966 (linux_tracefork_grandchild, linux_test_for_tracefork)
7967 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7968 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7969 where the argument is 0.
7971 2013-01-25 Yao Qi <yao@codesourcery.com>
7973 * event-loop.c: Include "queue.h".
7974 (gdb_event_p): New typedef.
7975 (struct gdb_event) <next_event>: Remove.
7976 (event_queue): Change to QUEUE(gdb_event_p).
7977 (async_queue_event): Remove.
7978 (gdb_event_xfree): New.
7979 (initialize_event_loop): New.
7980 (process_event): Use API from QUEUE.
7981 (wait_for_event): Likewise.
7982 * server.c (main): Call initialize_event_loop.
7983 * server.h (initialize_event_loop): Declare.
7985 2013-01-18 Yao Qi <yao@codesourcery.com>
7987 * ax.h (struct eval_agent_expr_context): New.
7988 (gdb_eval_agent_expr): Update declaration.
7989 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7990 TFRAME. Add new argument CTX.
7991 * server.h (struct eval_agent_expr_context): Declare.
7992 (agent_mem_read, agent_tsv_read): Update declaration.
7993 (agent_mem_read_string): Likewise.
7994 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7995 (add_traceframe_block): Add new argument TPOINT.
7996 Increase TPOINT->traceframe_usage.
7997 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7998 eval_tracepoint_agent_expr.
7999 (condition_true_at_tracepoint): Likewise.
8000 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8001 (agent_mem_read_string, agent_tsv_read): Likewise.
8003 2013-01-16 Yao Qi <yao@codesourcery.com>
8005 * linux-low.c (linux_resume_one_lwp): Don't check
8006 'lwp->bp_reinsert != 0'.
8008 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8009 Pedro Alves <palves@redhat.com>
8011 * lynx-low.c (ptrace_request_to_str): Define a temporary
8012 macro and use it to simplify this function's implementation.
8014 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8016 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8019 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8021 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8023 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8025 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8027 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8029 * lynx-low.c (lynx_resume): Use the resume_info parameter
8030 to determine the ptid for the lynx_ptrace call, unless
8031 it is equal to minus_one_ptid, in which case we use the
8032 ptid of the current_inferior.
8033 (lynx_wait_1): After having received a thread create/exit
8034 event, resume the inferior's execution using the signaling
8035 thread's ptid, rather than the old ptid.
8037 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8039 * lynx-low.c (lynx_resume): Delete variable ret.
8041 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8043 * gdbreplay.c (gdbreplay_version): Update copyright year.
8044 * server.c (gdbserver_version): Likewise.
8046 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8048 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8051 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8053 * lynx-low.c (ptrace_request_to_str): Add handling for
8056 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8058 * lynx-low.c (lynx_attach): Delete variable new_process.
8060 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8062 * lynx-low.c (lynx_create_inferior): Delete variable
8065 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8067 * lynx-low.c (ptrace_request_to_str): Do not handle
8068 PTRACE_GETTHREADLIST if this macro does not exist.
8070 2012-12-15 Yao Qi <yao@codesourcery.com>
8072 * Makefile.in (OBS): Add notif.o.
8073 * notif.c, notif.h: New.
8074 * server.c: Include "notif.h".
8075 (struct vstop_notif) <next>: Remove.
8077 (queue_stop_reply): Update.
8078 (push_event, send_next_stop_reply): Remove.
8079 (discard_queued_stop_replies): Update.
8080 (notif_stop): New variable.
8081 (handle_v_stopped): Remove.
8082 (handle_v_requests): Don't call handle_v_stopped. Call
8083 handle_ack_notif instead.
8084 (queue_stop_reply_callback): Call notif_event_enque instead
8085 of queue_stop_reply.
8086 (handle_status): Don't call send_next_stop_reply, call
8087 notif_write_event instead.
8088 (kill_inferior_callback): Likewise.
8089 (detach_or_kill_inferior_callback): Likewise.
8090 (main): Call initialize_notif.
8091 (process_serial_event): Call QUEUE_is_empty.
8092 (handle_target_event): Call notif_push instead of push event.
8093 * server.h (push_event): Remove declaration.
8095 2012-12-10 Tom Tromey <tromey@redhat.com>
8097 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8098 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8101 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8102 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8103 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8104 (amd64-linux-ipa.o, ax.o): Rewrite.
8105 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8106 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8107 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8108 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8109 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8110 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8111 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8112 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8113 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8114 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8115 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8116 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8117 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8118 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8119 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8120 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8121 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8122 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8123 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8124 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8125 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8126 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8127 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8128 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8129 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8130 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8131 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8132 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8133 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8134 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8135 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8136 (reg-tilegx.o): Remove.
8137 (all_object_files): New macro.
8138 Include .deps files.
8139 * aclocal.m4, configure: Rebuild.
8140 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8141 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8142 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8144 2012-12-05 Tom Tromey <tromey@redhat.com>
8147 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8149 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8151 * configure.ac: Check for linux/perf_event.h.
8152 * config.in: Regenerated.
8153 * configure: Regenerated.
8155 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8157 * hostio.c (handle_readlink): Decrease buffer size
8158 parameter passed to readlink by one byte.
8160 2012-11-26 Yao Qi <yao@codesourcery.com>
8162 * configure.ac (build_warnings): Append '-Wempty-body'.
8163 * configure: Regenerated.
8164 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8167 2012-11-15 Pierre Muller <muller@sourceware.org>
8169 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8170 * config.in: Regenerate.
8171 * configure: Regenerate.
8172 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8173 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8174 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8175 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8177 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8178 instead of <sys/wait.h> header.
8179 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8181 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8183 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8184 (various make rules): Remove -DGDBSERVER
8186 2012-11-09 Yao Qi <yao@codesourcery.com>
8188 * spu-low.c (current_ptid): Move it to ..
8189 * gdbthread.h: ... here. New.
8190 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8191 * server.c (myresume, process_serial_event): Likewise.
8192 * thread-db.c (thread_db_find_new_threads): Likewise.
8193 * tracepoint.c (run_inferior_command): Likewise.
8195 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8197 * server.c (handle_search_memory_1): Include access length in
8200 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8202 * linux-crisv32-low.c: Fix compile errors.
8204 2012-09-04 Yao Qi <yao@codesourcery.com>
8206 * tracepoint.c (cmd_qtsv): Adjust debug message.
8207 Don't check CUR_TPOINT.
8209 2012-08-28 Yao Qi <yao@codesourcery.com>
8211 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8212 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8213 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8214 Remove declarations of xmalloc, xreallloc, xstrdup and
8216 * Makefile.in (libiberty_h): New.
8217 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8218 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8220 2012-08-23 Yao Qi <yao@codesourcery.com>
8222 * server.h: Remove declaration of 'xsnprintf'.
8224 2012-08-22 Keith Seitz <keiths@redhat.com>
8226 * server.h: Include build-gnulib-gbserver/config.h.
8227 * gdbreplay.c: Likewise.
8229 2012-08-08 Doug Evans <dje@google.com>
8231 * Makefile.in (SFILES): Add gdb_vecs.c.
8232 (OBS): Add gdb_vecs.o.
8233 (gdb_vecs_h, host_defs_h): New variables.
8234 (thread-db.o): Add $(gdb_vecs_h) dependency.
8235 (gdb_vecs.o): New rule.
8236 * thread-db.c: #include "gdb_vecs.h".
8237 (thread_db_load_search): Use a vector to iterate over path elements.
8238 Handle text appearing after "$pdir".
8240 * configure.ac: Add check for strstr.
8241 * config.in: Regenerate.
8242 * configure: Regenerate.
8244 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8246 * hostio.c (handle_pread): If pread fails, fall back to attempting
8248 (handle_pwrite): Likewise for pwrite.
8250 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8252 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8253 between unsupported TYPE and unimplementable ADDR/LEN combination.
8254 (arm_insert_point): Act on new return value.
8256 2012-07-31 Pedro Alves <palves@redhat.com>
8258 * server.c (process_point_options): Only skip tokens if we find
8259 one that is unrecognized. Don't treat 'X' specially while
8260 skipping unrecognized tokens.
8262 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8264 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8265 to 4-byte-align HW breakpoint addresses for Thumb.
8267 2012-07-27 Yao Qi <yao@codesourcery.com>
8271 * server.h: Declare gdb_agent_about_to_close.
8272 * target.c (kill_inferior): Include "agent.h".
8273 New. Send command 'kill'.
8274 * target.h (kill_inferior): Removed macro.
8275 * tracepoint.c (gdb_agent_about_to_close): New.
8276 (gdb_agent_helper_thread): Handle command 'close'.
8277 Wait endlessly until the inferior stops.
8278 Install gdb_agent_remove_socket to atexit hook.
8279 (agent_socket_name): New static variable.
8280 (gdb_agent_socket_init): Replace local variable 'name' with
8281 'agent_socket_name'.
8282 (gdb_agent_remove_socket): New.
8284 2012-07-27 Yao Qi <yao@codesourcery.com>
8286 * server.c (process_point_options): Stop at 'X' when parsing.
8288 2012-07-19 Michael Eager <eager@eagercon.com>
8290 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8292 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8293 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8294 hardware breakpoint.
8296 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8298 * gdbserver/linux-low.c (initialize_low): Call
8299 linux_ptrace_init_warnings.
8301 2012-07-02 Doug Evans <dje@google.com>
8303 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8306 2012-07-02 Stan Shebs <stan@codesourcery.com>
8308 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8309 (ax.o): Add it to build rule.
8311 (OBS): Add format.o.
8312 (IPA_OBS): Add format.o.
8313 * server.c (handle_query): Claim support for breakpoint commands.
8314 (process_point_options): Add command case.
8315 (process_serial_event): Leave running if there are printfs in
8317 * mem-break.h (any_persistent_commands): Declare.
8318 (add_breakpoint_commands): Declare.
8319 (gdb_no_commands_at_breakpoint): Declare.
8320 (run_breakpoint_commands): Declare.
8321 * mem-break.c (struct point_command_list): New struct.
8322 (struct breakpoint): New field command_list.
8323 (any_persistent_commands): New function.
8324 (add_commands_to_breakpoint): New function.
8325 (add_breakpoint_commands): New function.
8326 (gdb_no_commands_at_breakpoint): New function.
8327 (run_breakpoint_commands): New function.
8328 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8330 * ax.c: Include format.h.
8331 (ax_printf): New function.
8332 (gdb_eval_agent_expr): Add printf opcode.
8334 2012-06-13 Yao Qi <yao@codesourcery.com>
8336 * server.c (start_inferior): Remove duplicated writes to fields
8337 'last_resume_kind' and 'last_status' of 'current_inferior'.
8339 2012-06-12 Yao Qi <yao@codesourcery.com>
8340 Pedro Alves <palves@redhat.com>
8342 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8344 * server.c (handle_v_cont): Extend comment.
8346 2012-06-11 Yao Qi <yao@codesourcery.com>
8348 * linux-low.c (linux_attach): Add 'static'.
8350 2012-06-06 Yao Qi <yao@codesourcery.com>
8352 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8354 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8356 Fix gcc -flto compilation warning.
8357 * server.c (main): Make variable multi_mode and attach volatile.
8359 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8361 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8362 if the platform doesn't know about it.
8364 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8366 * Makefile.in (SFILES): Add linux-tile-low.c.
8367 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8368 * configure.srv: Handle tilegx-*-linux*.
8369 * linux-tile-low.c: New file.
8371 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8373 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8375 2012-05-24 Pedro Alves <palves@redhat.com>
8379 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8381 2012-05-24 Pedro Alves <palves@redhat.com>
8385 Replace target_signal with gdb_signal throughout.
8387 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8389 * linux-low.c (linux_store_registers): Avoid the copying sequence
8390 when no data has been retrieved by ptrace.
8392 2012-05-22 Will Deacon <will.deacon@arm.com>
8394 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8395 Include asm/ptrace.h.
8396 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8399 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8401 * linux-low.c (linux_store_registers): Don't re-retrieve data
8402 with ptrace that has already been obtained from /proc. Always
8403 copy any data retrieved with ptrace to the buffer supplied.
8405 2012-05-11 Yao Qi <yao@codesourcery.com>
8406 Pedro Alves <palves@redhat.com>
8408 * linux-low.c (enum stopping_threads_kind): New.
8409 (stopping_threads): Change type to `enum stopping_threads_kind'.
8410 (handle_extended_wait): If stopping and suspending threads, leave
8411 the new_lwp suspended too.
8412 (linux_wait_for_event): Adjust.
8413 (stop_all_lwps): Set `stopping_threads' to
8414 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8415 whether we're suspending threads or just stopping them. Assert no
8418 2012-04-29 Yao Qi <yao@codesourcery.com>
8420 * server.h: Move some code to ...
8421 * gdbthread.h: ... here. New.
8422 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8423 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8424 (nto-low.o, win32-low.o): Likewise.
8425 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8426 * regcache.c, remote-utils.c, server.c: Likewise.
8427 * target.c, tracepoint.c, win32-low.c: Likewise.
8429 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8431 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8432 (PTRACE_ARG4_TYPE): Likewise.
8433 (PTRACE_XFER_TYPE): Likewise.
8434 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8435 ptrace to PTRACE_ARG3_TYPE.
8436 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8437 (PTRACE_ARG4_TYPE): Likewise.
8438 (PTRACE_XFER_TYPE): Likewise.
8439 (linux_detach_one_lwp): Cast fourth argument of
8440 ptrace to long then PTRACE_ARG4_TYPE.
8441 (regsets_fetch_inferior_registers): Cast third argument of
8442 ptrace to long then PTRACE_ARG3_TYPE.
8443 (regsets_store_inferior_registers): Likewise.
8445 2012-04-20 Pedro Alves <palves@redhat.com>
8447 * configure: Regenerate.
8449 2012-04-19 Pedro Alves <palves@redhat.com>
8451 * Makefile.in (GNULIB_BUILDDIR): New.
8452 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8453 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8454 (all, install-only, uninstall, clean-info, all-lib, clean): No
8455 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8456 (maintainer-clean realclean distclean): Use subdir_do.
8458 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8459 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8460 * acinclude.m4: Include acx_configure_dir.m4.
8461 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8462 calls. Call AC_PROG_RANLIB. Configure gnulib using
8465 (GNULIB_STDINT_H): Adjust.
8466 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8467 * gdbreplay.c: Include build-gnulib/config.h.
8468 * server.h: Likewise.
8469 * aclocal.m4: Regenerate.
8470 * config.in: Regenerate.
8471 * configure: Regenerate.
8473 2012-04-19 Pedro Alves <palves@redhat.com>
8475 * Makefile.in (LIBGNU, INCGNU): Adjust.
8476 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8477 (all, install-only, uninstall, clean-info, all-lib, clean)
8478 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8479 * configure.ac: Adjust AC_OUTPUT output.
8480 * aclocal.m4: Regenerate.
8481 * configure: Regenerate.
8483 2012-04-19 Pedro Alves <palves@redhat.com>
8485 * Makefile.in (generated_files): New.
8486 (server_h): Remove the explicit dependency on config.h, and depend
8487 on $generated_files.
8489 2012-04-19 Pedro Alves <palves@redhat.com>
8491 * Makefile.in (INCGNU): Add -Ignulib.
8493 2012-04-19 Pedro Alves <palves@redhat.com>
8495 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8496 (INCGNU): ... this, and spell out -I here.
8497 (GNULIB_LIB): Rename to ...
8499 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8501 2012-04-19 Pedro Alves <palves@redhat.com>
8503 * config.in: Regenerate.
8505 2012-04-19 Pedro Alves <palves@redhat.com>
8507 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8508 * server.h (memmem): Remove declaration.
8509 * config.in: Regenerate.
8510 * configure: Regenerate.
8512 2012-04-19 Yao Qi <yao@codesourcery.com>
8514 * Makefile.in (SFILES): Add common/vec.c.
8518 2012-04-19 Yao Qi <yao@codesourcery.com>
8520 * remote-utils.c (prepare_resume_reply): Replace with macro
8521 target_core_of_thread.
8522 * server.c (handle_qxfer_threads_proper): Likewise.
8523 * target.h (traget_core_of_thread): New macro.
8525 2012-04-18 Pedro Alves <palves@redhat.com>
8527 * aclocal.m4: Regenerate.
8528 * configure: Regenerate.
8530 2012-04-16 Yao Qi <yao@codesourcery.com>
8532 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8533 duplicated on address.
8535 2012-04-16 Yao Qi <yao@codesourcery.com>
8537 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8538 (struct tracepoint_action_ops) <send>: New field.
8539 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8540 (agent_expr_send, x_tracepoint_action_send): New.
8541 (l_tracepoint_action_send): New.
8542 (cmd_qtdp): Download and install tracepoint
8543 according to `use_agent'.
8544 (run_inferior_command): Add one more parameter `len'.
8546 (tracepoint_send_agent): New.
8547 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8549 2012-04-16 Yao Qi <yao@codesourcery.com>
8551 * tracepoint.c (download_tracepoints): Moved to ...
8552 (cmd_qtstart): ... here.
8554 2012-04-14 Yao Qi <yao@codesourcery.com>
8556 * tracepoint.c: Include inttypes.h.
8557 (struct collect_memory_action): Use sized types.
8558 (struct tracepoint): Likewise.
8559 (cmd_qtdp, stop_tracing): Update print specifiers.
8560 (cmd_qtp, response_tracepoint): Likewise.
8561 (collect_data_at_tracepoint): Likewise.
8562 (collect_data_at_step): Likewise.
8564 2012-04-14 Yao Qi <yao@codesourcery.com>
8566 Import gnulib module inttypes.
8567 * aclocal.m4, config.in, configure: Regenerated.
8569 2012-04-14 Yao Qi <yao@codesourcery.com>
8571 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8572 Makefile and config.status at last.
8574 2012-04-13 Yao Qi <yao@codesourcery.com>
8576 * tracepoint.c: Include stdint.h unconditionally.
8578 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8580 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8581 on BFD_HAVE_SYS_PROCFS_TYPE.
8582 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8583 * configure: Regenerate.
8584 * config.in: Likewise.
8586 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8588 * Makefile.in (clean): Also remove x32.c x32-linux.c
8589 x32-avx.c x32-avx-linux.c.
8590 (x32.o): New target.
8592 (x32-linux.o): Likewise.
8593 (x32-linux.c): Likewise.
8594 (x32-avx.o): Likewise.
8595 (x32-avx.c): Likewise.
8596 (x32-avx-linux.o): Likewise.
8597 (x32-avx-linux.c): Likewise.
8599 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8600 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8601 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8602 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8603 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8604 i386/x32-avx-linux.xml.
8606 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8607 (init_registers_x32_avx_linux): Likwise.
8608 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8609 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8611 2012-04-13 Pedro Alves <palves@redhat.com>
8613 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8614 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8615 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8616 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8619 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8621 * linux-x86-low.c (compat_x32_clock_t): New.
8622 (compat_x32_siginfo_t): Likewise.
8623 (compat_x32_siginfo_from_siginfo): Likewise.
8624 (siginfo_from_compat_x32_siginfo): Likewise.
8625 (linux_is_elf64): Likewise.
8626 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8627 and siginfo_from_compat_x32_siginfo for x32.
8628 (x86_arch_setup): Set linux_is_elf64.
8630 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8633 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8635 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8636 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8637 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8638 compatible with process.
8640 2012-04-12 Yao Qi <yao@codesourcery.com>
8642 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8643 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8644 (install-only, install-info, clean): Handle sub dir gnulib.
8645 (all-lib, am--refresh): New targets.
8646 (memmem.o): Remove target.
8647 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8648 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8649 (AC_REPLACE_FUNCS): Remove memmem.
8650 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8651 (AC_OUTPUT): Generate Makefile in gnulib/.
8652 * aclocal.m4, config.in, configure: Regenerated.
8654 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8656 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8658 2012-04-05 Pedro Alves <palves@redhat.com>
8660 -Werror=strict-aliasing
8662 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8665 2012-04-04 Pedro Alves <palves@redhat.com>
8667 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8668 (sparc_store_gregset_from_stack, sparc_store_gregset)
8669 (sparc_breakpoint_at): Fix formatting.
8671 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8673 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8675 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8676 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8677 * config.in: Regenerate.
8678 * configure: Likewise.
8680 2012-03-29 Pedro Alves <palves@redhat.com>
8682 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8683 Correct ptrace arguments.
8685 2012-03-28 Pedro Alves <palves@redhat.com>
8687 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8688 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8689 (IA64_FR1_REGNUM): New defines.
8690 (ia64_fetch_register): New.
8691 (the_low_target): Install it.
8692 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8694 * linux-low.c (linux_fetch_registers): Try the
8695 the_low_target.fetch_register hook first.
8697 * linux-arm-low.c (the_low_target): Adjust.
8698 * linux-bfin-low.c (the_low_target): Adjust.
8699 * linux-cris-low.c (the_low_target): Adjust.
8700 * linux-crisv32-low.c (the_low_target): Adjust.
8701 * linux-m32r-low.c (the_low_target): Adjust.
8702 * linux-m68k-low.c (the_low_target): Adjust.
8703 * linux-mips-low.c (the_low_target): Adjust.
8704 * linux-ppc-low.c (the_low_target): Adjust.
8705 * linux-s390-low.c (the_low_target): Adjust.
8706 * linux-sh-low.c (the_low_target): Adjust.
8707 * linux-sparc-low.c (the_low_target): Adjust.
8708 * linux-tic6x-low.c (the_low_target): Adjust.
8709 * linux-x86-low.c (the_low_target): Adjust.
8710 * linux-xtensa-low.c (the_low_target): Adjust.
8712 2012-03-26 Pedro Alves <palves@redhat.com>
8714 * server.c (handle_qxfer_libraries): Don't bail early if
8715 the_target->qxfer_libraries_svr4 is not NULL.
8717 2012-03-26 Pedro Alves <palves@redhat.com>
8719 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8721 2012-03-23 Pedro Alves <palves@redhat.com>
8723 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8724 "library-list-svr4" element's start tag when the the DSO list is
8727 2012-03-23 Pedro Alves <palves@redhat.com>
8729 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8730 a variable whose type size is the same as the inferior's pointer
8733 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8735 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8737 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8738 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8739 * linux-low.h: Include <signal.h>.
8740 (struct siginfo): Remove forward declaration.
8741 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8744 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8746 * .gitignore: Ignore more files.
8748 2012-03-19 Pedro Alves <palves@redhat.com>
8749 Jan Kratochvil <jan.kratochvil@redhat.com>
8751 * server.c (cont_thread, general_thread): Add describing comments.
8752 (start_inferior): Clear `cont_thread'.
8753 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8756 2012-03-15 Yao Qi <yao@codesourcery.com>
8758 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8760 (cmd_qtdp): ... here.
8762 2012-03-15 Yao Qi <yao@codesourcery.com>
8764 * tracepoint.c (struct tracepoint_action_ops): New.
8765 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8766 (m_tracepoint_action_download): New.
8767 (r_tracepoint_action_download): New.
8768 (x_tracepoint_action_download): New.
8769 (l_tracepoint_action_download): New.
8770 (add_tracepoint_action): Install `action->ops' according type.
8771 (download_tracepoint_1): Move code `download' function pointer
8772 of various tracepoint_action_ops.
8774 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8776 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8777 linux_ptrace_attach_warnings.
8779 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8781 * Makefile.in (linux-ptrace.o): New.
8782 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8783 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8784 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8785 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8786 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8788 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8790 2012-03-08 Yao Qi <yao@codesourcery.com>
8791 Pedro Alves <palves@redhat.com>
8793 Fix PR server/13392.
8794 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8796 * tracepoint.c (remove_tracepoint): New.
8797 (cmd_qtdp): Call remove_tracepoint when failed to install.
8799 2012-03-07 Pedro Alves <palves@redhat.com>
8801 * linux-low.c (get_detach_signal): New.
8802 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8803 Pass on pending signals to PTRACE_DETACH. Check the result of the
8805 * server.c (program_signals, program_signals_p): New.
8806 (handle_general_set): Handle QProgramSignals.
8807 * server.h (program_signals, program_signals_p): Declare.
8809 2012-03-05 Pedro Alves <palves@redhat.com>
8810 Jan Kratochvil <jan.kratochvil@redhat.com>
8812 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8815 2012-03-03 Yao Qi <yao@codesourcery.com>
8817 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8818 agent_look_up_symbols.
8820 2012-03-03 Yao Qi <yao@codesourcery.com>
8822 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8823 (linux-x86-low.o): Likewise.
8824 * server.h: Remove in_process_agent_loaded.
8825 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8829 2012-03-03 Yao Qi <yao@codesourcery.com>
8831 * tracepoint.c (gdb_agent_capability): New global.
8832 (in_process_agent_loaded_ust): Renamed to
8833 `in_process_agent_supports_ust'.
8835 (in_process_agent_supports_ust): Call agent_capability_check.
8836 (clear_installed_tracepoints): Assert that agent supports
8839 2012-03-03 Yao Qi <yao@codesourcery.com>
8841 * linux-low.c (linux_supports_agent): New.
8842 (linux_target_ops): Initialize field `supports_agent' with
8843 linux_supports_agent.
8844 * target.h (struct target_ops) <supports_agent>: New.
8845 (target_supports_agent): New macro.
8846 * server.c (handle_general_set): Handle packet 'QAgent'.
8847 (handle_query): Send `QAgent+'.
8848 * Makefile.in (server.o): Depends on agent.h.
8850 2012-03-03 Yao Qi <yao@codesourcery.com>
8852 * Makefile.in (OBS): Add agent.o.
8853 Add new rule for agent.o.
8854 Track dependence of tracepoint.c on agent.h.
8855 * tracepoint.c (run_inferior_command_1):
8856 (run_inferior_command): Call agent_run_command.
8857 (gdb_ust_connect_sync_socket): Deleted. Move it to
8859 (resume_thread, stop_thread): Likewise.
8860 (gdb_ust_socket_init): Renamed to ...
8861 (gdb_agent_socket_init): ... New.
8862 (gdb_ust_thread): Renamed to ...
8863 (gdb_agent_helper_thread): ... New.
8864 (gdb_ust_init): Move some code to ...
8865 (gdb_agent_init): ... here. New.
8866 [HAVE_UST]: Call gdb_ust_init.
8867 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8868 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8869 * config.in, configure: Regenerated.
8871 2012-03-02 Pedro Alves <palves@redhat.com>
8873 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8874 * linux-low.c (struct simple_pid_list): New.
8875 (stopped_pids): New a struct simple_pid_list pointer.
8876 (add_to_pid_list, pull_pid_from_list): New.
8877 (handle_extended_wait): Don't assume the first signal new children
8878 report is SIGSTOP. Adjust call to pull_pid_from_list.
8879 (linux_wait_for_lwp): Adjust.
8881 2012-03-02 Yao Qi <yao@codesourcery.com>
8883 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8886 2012-03-02 Yao Qi <yao@codesourcery.com>
8888 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8889 `stop_pc' and `tpoint'. Update caller.
8891 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8893 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8894 * linux-low.c (use_linux_regsets): New macro.
8895 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8896 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8897 (linux_register_in_regsets): New function.
8898 (usr_fetch_inferior_registers): Skip registers covered by
8900 (usr_store_inferior_registers): Likewise.
8901 (usr_fetch_inferior_registers): New macro.
8902 (usr_store_inferior_registers): Likewise.
8903 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8904 (linux_store_registers): Likewise.
8905 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8907 (init_registers_mips64_dsp_linux): Likewise.
8908 (init_registers_mips_linux): New macro.
8909 (init_registers_mips_dsp_linux): Likewise.
8910 (mips_dsp_num_regs): Likewise.
8911 (DSP_BASE, DSP_CONTROL): New fallback macros.
8912 (mips_base_regs): New macro.
8913 (mips_regmap): Use it. Fix the size.
8914 (mips_dsp_regmap): New variable.
8915 (mips_dsp_regset_bitmap): Likewise.
8916 (mips_arch_setup): New function.
8917 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8919 (mips_cannot_store_register): Likewise.
8920 (the_low_target): Update .arch_setup, .num_regs and .regmap
8921 initializers. Add .regset_bitmap initializer.
8922 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8924 * linux-bfin-low.c (the_low_target): Likewise.
8925 * linux-cris-low.c (the_low_target): Likewise.
8926 * linux-crisv32-low.c (the_low_target): Likewise.
8927 * linux-ia64-low.c (the_low_target): Likewise.
8928 * linux-m32r-low.c (the_low_target): Likewise.
8929 * linux-m68k-low.c (the_low_target): Likewise.
8930 * linux-ppc-low.c (the_low_target): Likewise.
8931 * linux-s390-low.c (the_low_target): Likewise.
8932 * linux-sh-low.c (the_low_target): Likewise.
8933 * linux-sparc-low.c (the_low_target): Likewise.
8934 * linux-tic6x-low.c (the_low_target): Likewise.
8935 * linux-x86-low.c (the_low_target): Likewise.
8936 * linux-xtensa-low.c (the_low_target): Likewise.
8937 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8938 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8939 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8941 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8942 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8944 2012-02-29 Yao Qi <yao@codesourcery.com>
8945 Pedro Alves <palves@redhat.com>
8947 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8948 `step_over_finished' is true.
8950 2012-02-27 Pedro Alves <palves@redhat.com>
8952 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8953 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8955 2012-02-27 Pedro Alves <palves@redhat.com>
8958 * linux-low.c (pid_is_stopped): New.
8959 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8961 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8963 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8966 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8968 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8970 2012-02-24 Luis Machado <lgustavo@codesourcery>
8972 * server.c (handle_query): Advertise support for target-side
8973 breakpoint condition evaluation.
8974 (process_point_options): New function.
8975 (process_serial_event): When inserting a breakpoint, check for
8976 a target-side condition that should be evaluated.
8978 * mem-break.c: Include regcache.h and ax.h.
8979 (point_cond_list_t): New data structure.
8980 (breakpoint) <cond_list>: New field.
8981 (find_gdb_breakpoint_at): Make non-static.
8982 (delete_gdb_breakpoint_at): Clear any target-side
8984 (clear_gdb_breakpoint_conditions): New function.
8985 (add_condition_to_breakpoint): Likewise.
8986 (add_breakpoint_condition): Likewise.
8987 (gdb_condition_true_at_breakpoint): Likewise.
8988 (gdb_breakpoint_here): Return result directly instead
8989 of going through a local variable.
8991 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8992 (clear_gdb_breakpoint_conditions): Likewise.
8993 (add_breakpoint_condition): Likewise.
8994 (gdb_condition_true_at_breakpoint): Likewise.
8996 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8997 (need_step_over_p): Take target-side breakpoint condition into
9000 2012-02-24 Luis Machado <lgustavo@codesourcery>
9002 * server.h: Include tracepoint.h.
9003 (agent_mem_read, agent_get_trace_state_variable_value,
9004 agent_set_trace_state_variable_value,
9005 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9006 get_set_tsv_func_addr): New prototypes.
9008 * ax.h: New include file.
9009 * ax.c: New source file.
9011 * tracepoint.c: Include ax.h.
9012 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9013 agent_expr, eval_result_type): Move to ax.h.
9014 (parse_agent_expr): Rename to ...
9015 (gdb_parse_agent_expr): ... this, make it non-static and move
9017 (unparse_agent_expr) Rename to ...
9018 (gdb_unparse_agent_expr): ... this, make it non-static and move
9020 (eval_agent_expr): Rename to ...
9021 (eval_tracepoint_agent_expr): ... this.
9022 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9023 forward declarations.
9024 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9025 (agent_get_trace_state_variable_value): New function.
9026 (agent_set_trace_state_variable_value): New function.
9027 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9028 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9029 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9030 (condition_true_at_tracepoint): Likewise.
9031 (parse_agent_expr): Rename to ...
9032 (gdb_parse_agent_expr): ... this and move to ax.c.
9033 (unparse_agent_expr): Rename to ...
9034 (gdb_unparse_agent_expr): ... this and move to ax.c.
9035 (gdb_agent_op_name): Move to ax.c.
9036 (eval_agent_expr): Rename to ...
9037 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9039 (eval_tracepoint_agent_expr): New function.
9040 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9042 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9044 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9045 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9046 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9047 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9048 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9049 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9050 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9051 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9052 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9053 (compile_bytecodes): Remove forward declaration.
9054 (is_goto_target): Move to ax.c.
9055 (compile_bytecodes): Move to ax.c and call
9056 agent_get_trace_state_variable_value (...) and
9057 agent_set_trace_state_variable_value (...).
9059 * Makefile.in: Update ax.c and IPA dependencies.
9061 2012-02-24 Pedro Alves <palves@redhat.com>
9063 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9064 (cmd_bigqtbuffer_circular): ... this. Only handle
9065 'QTBuffer:circular:'.
9066 (handle_tracepoint_general_set): Adjust.
9068 2012-02-16 Yao Qi <yao@codesourcery.com>
9070 * inferiors.c: Move code to ...
9071 * dll.c: .... here. New.
9072 * server.h: Declare clear_dlls.
9073 * Makefile.in (SFILES): Add dll.c.
9077 2012-02-11 Yao Qi <yao@codesourcery.com>
9079 * server.c: (handle_monitor_command): Add a new parameter
9081 (handle_query): Update caller.
9083 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9085 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9086 * configure, config.in: Regenerate.
9087 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9090 2012-02-02 Pedro Alves <palves@redhat.com>
9092 Try SIGKILL first, then PTRACE_KILL.
9093 * linux-low.c (linux_kill_one_lwp): New.
9094 (linux_kill_one_lwp): Rename to ...
9095 (kill_one_lwp_callback): ... this. Use the new
9098 2012-02-02 Pedro Alves <palves@redhat.com>
9100 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9103 2012-01-27 Pedro Alves <palves@redhat.com>
9105 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9106 (elf_64_file_p): Make static.
9107 (linux_pid_exe_is_elf_64_file): New.
9108 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9109 Delete declarations.
9110 (linux_pid_exe_is_elf_64_file): Declare.
9111 * linux-x86-low.c (x86_arch_setup): Use
9112 linux_pid_exe_is_elf_64_file.
9114 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9116 * linux-low.c (linux_wait_for_event_1): Rename to ...
9117 (linux_wait_for_event): ... here and merge it with former
9118 linux_wait_for_event - new variable wait_ptid, use it.
9119 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9121 2012-01-23 Pedro Alves <palves@redhat.com>
9123 * server.c (main): Avoid yet another case of infinite loop while
9124 detaching/killing after a longjmp.
9126 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9129 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9131 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9133 * hostio.c (handle_readlink): New function.
9134 (handle_vFile): Call it to handle "vFile:readlink" packets.
9136 2012-01-20 Pedro Alves <palves@redhat.com>
9137 Ulrich Weigand <ulrich.weigand@linaro.org>
9139 * server.c (handle_v_requests): Only support vAttach and vRun to
9140 start multiple processes when in extended protocol mode.
9142 2012-01-17 Pedro Alves <palves@redhat.com>
9144 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9145 memalign plus mprotect to allocate the scratch buffer.
9147 2012-01-13 Pedro Alves <palves@redhat.com>
9149 * server.c (attach_inferior): Clear `cont_thread'.
9151 2012-01-13 Pedro Alves <palves@redhat.com>
9153 * server.c (main): Avoid infinite loop while detaching/killing
9156 2012-01-09 Doug Evans <dje@google.com>
9158 * server.c (start_inferior): Set last_ptid in --wrapper case.
9160 2012-01-06 Yao Qi <yao@codesourcery.com>
9162 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9164 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9166 2012-01-04 Yao Qi <yao@codesourcery.com>
9168 * tracepoint.c (cmd_qtdp): Print debug message
9169 for static tracepoint.
9171 2012-01-04 Yao Qi <yao@codesourcery.com>
9173 * tracepoint.c (trace_vdebug): Differentiate debug message
9174 between gdbserver and IPA.
9176 2012-01-03 Yao Qi <yao@codesourcery.com>
9178 * tracepoint.c (tracepoint_was_hit): Don't collect for
9181 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9183 * terminal.h: Reformat copyright header.
9185 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9187 * server.c (gdbserver_version): Update copyright year.
9188 * gdbreplay.c (gdbreplay_version): Likewise.
9190 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9192 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9195 2011-12-18 Hui Zhu <teawater@gmail.com>
9196 * linux-low.c (linux_create_inferior): Save return value to ret.
9198 2011-12-18 Hui Zhu <teawater@gmail.com>
9200 * linux-low.c (linux_create_inferior): Save return value to ret.
9202 2011-12-16 Doug Evans <dje@google.com>
9204 * linux-low.c (linux_create_inferior): If stdio connection,
9205 redirect stdin from /dev/null, stdout to stderr.
9206 * remote-utils.c (remote_is_stdio): New static global.
9207 (remote_connection_is_stdio): New function.
9208 (remote_prepare): Handle stdio connection.
9209 (remote_open): Ditto.
9210 (remote_close): Don't close stdin for stdio connections.
9211 (read_prim,write_prim): New functions. Replace all calls to
9212 read/write to these.
9213 * server.c (main): Watch for "-" argument. Move call to
9214 remote_prepare before start_inferior.
9215 * server.h (STDIO_CONNECTION_NAME): New macro.
9216 (remote_connection_is_stdio): Declare.
9218 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9219 in debugging output.
9221 2011-12-15 Yao Qi <yao@codesourcery.com>
9223 * tracepoint.c: Include sys/syscall.h.
9224 (gdb_ust_thread): Remove preprocessor conditional.
9226 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9228 * linux-low.c (linux_detach_one_lwp): Call
9229 the_low_target.prepare_to_resume before detaching.
9231 2011-12-14 Yao Qi <yao@codesourcery.com>
9233 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9236 2011-12-14 Yao Qi <yao@codesourcery.com>
9238 * i386-low.c (i386_low_stopped_data_address): Initialize local
9241 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9245 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9246 DR_CONTROL unless necessary. Extend comments.
9247 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9248 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9250 2011-12-13 Yao Qi <yao@codesourcery.com>
9252 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9254 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9256 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9258 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9259 Print new debug message for such case.
9261 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9263 Fix overlapping memcpy.
9264 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9265 the read_inferior_memory transfer.
9266 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9267 write_inferior_memory transfer.
9268 (set_fast_tracepoint_jump): New variable buf. Use it for the
9269 read_inferior_memory and write_inferior_memory transfers.
9270 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9271 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9272 Use it for the write_inferior_memory transfer.
9273 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9276 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9278 * linux-low.c (fetch_register, store_register): Make code
9279 consistent, fix formatting.
9281 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9283 * linux-low.c (usr_store_inferior_registers): Factor out code
9284 to handle individual registers into...
9285 (store_register): ... this new function.
9287 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9289 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9290 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9291 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9292 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9293 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9294 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9295 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9296 (srv_xmlfiles): Add new XML files.
9298 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9300 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9301 (init_registers_s390_linux32v1): Add prototype.
9302 (init_registers_s390_linux32v2): Likewise.
9303 (init_registers_s390_linux64v1): Likewise.
9304 (init_registers_s390_linux64v2): Likewise.
9305 (init_registers_s390x_linux64v1): Likewise.
9306 (init_registers_s390x_linux64v2): Likewise.
9307 (s390_num_regs): Increment to 52.
9308 (s390_regmap): Add orig_r2 register.
9309 (s390_num_regs_3264): Increment to 68.
9310 (s390_regmap_3264): Add orig_r2 register.
9311 (s390_collect_ptrace_register): Handle orig_r2 register.
9312 (s390_supply_ptrace_register): Likewise.
9313 (s390_fill_last_break): New function.
9314 (s390_store_last_break): Likewise.
9315 (s390_fill_system_call): New function.
9316 (s390_store_system_call): Likewise.
9317 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9319 (s390_check_regset): New function.
9320 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9321 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9322 Update target_regsets for available register sets.
9324 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9325 Jan Kratochvil <jan.kratochvil@redhat.com>
9327 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9328 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9330 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9331 * linux-low.h (struct process_info_private): New member r_debug.
9332 * server.c (handle_qxfer_libraries): Call
9333 the_target->qxfer_libraries_svr4.
9334 (handle_qxfer_libraries_svr4): New function.
9335 (qxfer_packets): New entry "libraries-svr4".
9336 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9337 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9338 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9339 PACKET_qXfer_libraries_svr4.
9341 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9343 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9344 PSW address/mask between 8-byte and 16-byte formats.
9345 (s390_supply_ptrace_register): Likewise.
9346 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9347 basic addressing mode bit.
9349 2011-11-24 Stan Shebs <stan@codesourcery.com>
9351 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9353 2011-11-17 Stan Shebs <stan@codesourcery.com>
9355 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9356 (tracing_start_time): New global.
9357 (tracing_stop_time): New global.
9358 (tracing_user_name): New global.
9359 (tracing_notes): New global.
9360 (tracing_stop_note): New global.
9361 (cmd_qtstart): Set traceframe_usage, start_time.
9362 (stop_tracing): Set stop_time.
9363 (cmd_qtstatus): Report additional status.
9364 (cmd_qtp): New function.
9365 (handle_tracepoint_query): Call it.
9366 (cmd_qtnotes): New function.
9367 (handle_tracepoint_general_set): Call it.
9368 (get_timestamp): Rename from tsv_get_timestamp.
9370 2011-11-14 Stan Shebs <stan@codesourcery.com>
9371 Kwok Cheung Yeung <kcy@codesourcery.com>
9373 * linux-x86-low.c (small_jump_insn): New.
9374 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9375 trampoline and error message, build a trampoline and issue a small
9376 jump instruction to it.
9377 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9378 trampoline and error message.
9379 (x86_get_min_fast_tracepoint_insn_len): New.
9380 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9381 * linux-low.h (struct linux_target_ops): Add arguments to
9382 install_fast_tracepoint_jump_pad operation, add new operation.
9383 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9385 (linux_get_min_fast_tracepoint_insn_len): New function.
9386 (linux_target_op): Add new operation.
9387 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9388 (gdb_trampoline_buffer_end): Ditto.
9389 (gdb_trampoline_buffer_error): Ditto.
9390 (struct ipa_sym_addresses): Add fields for new IPA variables.
9391 (symbol_list): Add entries for new IPA variables.
9392 (struct tracepoint): Add fields to hold the address range of the
9393 trampoline used by the tracepoint.
9394 (trampoline_buffer_head): New static variable.
9395 (trampoline_buffer_tail): Ditto.
9396 (claim_trampoline_space): New function.
9397 (have_fast_tracepoint_trampoline_buffer): New function.
9398 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9400 (install_fast_tracepoint): Ditto, also add error buffer argument.
9401 (cmd_qtminftpilen): New function.
9402 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9403 (fast_tracepoint_from_trampoline_address): New function.
9404 (fast_tracepoint_collecting): Handle trampoline as part of jump
9406 (set_trampoline_buffer_space): New function.
9407 (initialize_tracepoint): Initialize new IPA variables.
9408 * target.h (struct target_ops): Add arguments to
9409 install_fast_tracepoint_jump_pad operation, add new
9410 get_min_fast_tracepoint_insn_len operation.
9411 (target_get_min_fast_tracepoint_insn_len): New.
9412 (install_fast_tracepoint_jump_pad): Add arguments.
9413 * server.h (IPA_BUFSIZ): Define.
9414 * linux-i386-ipa.c: Include extra header files.
9415 (initialize_fast_tracepoint_trampoline_buffer): New function.
9416 (initialize_low_tracepoint): Call it.
9417 * server.h (set_trampoline_buffer_space): Declare.
9418 (claim_trampoline_space): Ditto.
9419 (have_fast_tracepoint_trampoline_buffer): Ditto.
9421 2011-11-14 Yao Qi <yao@codesourcery.com>
9423 * server.c (handle_query): Handle InstallInTrace for qSupported.
9424 * tracepoint.c (add_tracepoint): Sort list.
9425 (install_tracepoint, download_tracepoint): New.
9426 (cmd_qtdp): Call them to install and download tracepoints.
9427 (sort_tracepoints): Removed.
9428 (cmd_qtstart): Update.
9430 2011-11-14 Yao Qi <yao@codesourcery.com>
9432 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9433 * mem-break.h: Declare.
9434 * tracepoint.c (cmd_qtstart): Move some code to ...
9435 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9437 (download_tracepoints): Move some code to ...
9438 (download_tracepoint_1): ... here. New.
9440 2011-11-08 Yao Qi <yao@codesourcery.com>
9442 * remote-utils.c (relocate_instruction): A comment fix.
9444 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9446 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9447 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9448 dr_status_mirror and dr_control_mirror from debug_reg_state.
9449 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9450 (i386_initial_stuff): Remove use of deleted globals.
9451 (i386_get_thread_context, i386_set_thread_context,
9452 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9453 from debug_reg_state.
9455 2011-11-05 Yao Qi <yao@codesourcery.com>
9457 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9458 address as TPOINT's.
9460 2011-11-02 Stan Shebs <stan@codesourcery.com>
9462 * tracepoint.c (agent_mem_read_string): New function.
9463 (eval_agent_expr): Call it for tracenz.
9464 * server.c (handle_query): Report support for tracenz.
9466 2011-11-02 Yao Qi <yao@codesourcery.com>
9468 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9470 2011-11-02 Yao Qi <yao@codesourcery.com>
9472 * target.h: Fix a typo in comment.
9474 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9476 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9477 clobber the breakpoints' shadows with fast tracepoint jumps.
9478 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9479 * target.c (write_inferior_memory): Also pass MYADDR down to
9482 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9484 * configure.ac: Check support for personality routine.
9485 * configure: Regenerate.
9486 * config.in: Likewise.
9487 * linux-low.c: Include <sys/personality.h>.
9488 Define ADDR_NO_RANDOMIZE if necessary.
9489 (linux_create_inferior): Disable address space randomization when
9490 forking inferior, if requested.
9491 (linux_supports_disable_randomization): New function.
9492 (linux_target_ops): Install it.
9493 * server.h (disable_randomization): Declare.
9494 * server.c (disable_randomization): New global variable.
9495 (handle_general_set): Handle QDisableRandomization.
9496 (handle_query): Likewise for qSupported.
9497 (main): Support --disable-randomization and --no-disable-randomization
9498 command line arguments.
9499 * target.h (struct target_ops): Add supports_disable_randomization.
9500 (target_supports_disable_randomization): New macro.
9502 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9504 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9506 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9507 [!PT_GETDSBT] (target_loadmap): New definition.
9508 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9509 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9510 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9511 and PT_GETDSBT to LINUX_LOADMAP.
9512 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9513 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9515 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9517 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9518 (arm_linux_hwbp_cap): New static variable.
9519 (arm_linux_get_hwbp_cap): Replace by ...
9520 (arm_linux_init_hwbp_cap): ... this new function.
9521 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9522 (arm_linux_get_hw_watchpoint_count): Likewise.
9523 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9524 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9525 (arm_prepare_to_resume): Use perror_with_name instead of error.
9527 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9529 * linux-arm-low.c: Include <signal.h>.
9530 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9531 (struct arm_linux_hwbp_cap): New data type.
9532 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9533 (struct arm_linux_hw_breakpoint): New data type.
9534 (MAX_BPTS, MAX_WPTS): Define.
9535 (struct arch_process_info, struct arch_lwp_info): New data types.
9536 (arm_linux_get_hwbp_cap): New function.
9537 (arm_linux_get_hw_breakpoint_count): Likewise.
9538 (arm_linux_get_hw_watchpoint_count): Likewise.
9539 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9540 (arm_hwbp_control_initialize): Likewise.
9541 (arm_hwbp_control_is_enabled): Likewise.
9542 (arm_hwbp_control_is_initialized): Likewise.
9543 (arm_hwbp_control_disable): Likewise.
9544 (arm_linux_hw_breakpoint_equal): Likewise.
9545 (arm_linux_hw_point_initialize): Likewise.
9546 (struct update_registers_data): New data structure.
9547 (update_registers_callback: New function.
9548 (arm_insert_point): Likewise.
9549 (arm_remove_point): Likewise.
9550 (arm_stopped_by_watchpoint): Likewise.
9551 (arm_stopped_data_address): Likewise.
9552 (arm_new_process): Likewise.
9553 (arm_new_thread): Likewise.
9554 (arm_prepare_to_resume): Likewise.
9555 (the_low_target): Register arm_insert_point, arm_remove_point,
9556 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9557 arm_new_thread, and arm_prepare_to_resume.
9559 2011-09-15 Stan Shebs <stan@codesourcery.com>
9561 * server.h (struct emit_ops): Add compare-goto fields.
9562 * tracepoint.c (gdb_agent_op_sizes): New table.
9563 (emit_eq_goto): New function.
9564 (emit_ne_goto): New function.
9565 (emit_lt_goto): New function.
9566 (emit_le_goto): New function.
9567 (emit_gt_goto): New function.
9568 (emit_ge_goto): New function.
9569 (is_goto_target): New function.
9570 (compile_bytecodes): Recognize special cases of compare-goto
9571 combinations and call specialized emitters for them.
9572 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9573 (amd64_emit_ne_goto): New function.
9574 (amd64_emit_lt_goto): New function.
9575 (amd64_emit_le_goto): New function.
9576 (amd64_emit_gt_goto): New function.
9577 (amd64_emit_ge_goto): New function.
9578 (amd64_emit_ops): Add the new functions.
9579 (i386_emit_eq_goto): New function.
9580 (i386_emit_ne_goto): New function.
9581 (i386_emit_lt_goto): New function.
9582 (i386_emit_le_goto): New function.
9583 (i386_emit_gt_goto): New function.
9584 (i386_emit_ge_goto): New function.
9585 (i386_emit_ops): Add the new functions.
9587 2011-09-08 Stan Shebs <stan@codesourcery.com>
9589 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9590 (i386_emit_epilogue): Restore %ebx.
9592 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9594 * server.c (step_thread): Remove definition.
9595 (process_serial_event): Don't handle Hs.
9596 * server.h (step_thread): Remove declaration.
9597 * target.c (set_desired_inferior): Remove use of step_thread.
9599 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9601 * linux-low.c: Include linux-procfs.h.
9602 (linux_attach_lwp_1): Update comments.
9603 (linux_attach): Scan for existing threads when attaching to a
9604 process that is the tgid.
9605 * Makefile.in: Update dependencies.
9607 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9609 * configure.srv: Add linux-procfs.o dependencies.
9611 2011-08-14 Yao Qi <yao@codesourcery.com>
9613 * target.h (struct target_ops): Fix indent.
9614 * win32-low.c (win32_target_ops): Fix comment.
9616 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9617 Yao Qi <yao@codesourcery.com>
9619 * Makefile.in (clean): Remove tic6x-*.c files.
9620 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9621 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9622 (tic6x-c64xp-linux.c): Likewise.
9623 * configure.srv: Add support for tic6x-*-uclinux.
9624 * linux-tic6x-low.c: New.
9625 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9627 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9628 Yao Qi <yao@codesourcery.com>
9630 * target.h (struct target_ops): Add read_loadmap.
9631 * linux-low.c (struct target_loadseg): New type.
9632 (struct target_loadmap): New type.
9633 (linux_read_loadmap): New function.
9634 (linux_target_ops): Add linux_read_loadmap.
9635 * server.c (handle_query): Support qXfer:fdpic:read packet.
9636 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9639 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9641 * win32-low.c: Include <stdint.h>.
9643 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9645 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9646 to the inferior here.
9647 (i386_remove_aligned_watchpoint): Ditto.
9648 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9649 fit part of the watchpoint in the debug registers.
9650 (i386_update_inferior_debug_regs): New.
9651 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9652 registers, and only update the inferior on success.
9653 (i386_low_remove_watchpoint): Ditto.
9655 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9657 * linux-low.c (compare_ints, unique, list_threads, show_process,
9658 linux_core_of_thread): Delete.
9659 (linux_target_ops): Change linux_core_of_thread to
9660 linux_common_core_of_thread.
9661 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9662 * utils.c (malloc_failure): Change type of argument.
9663 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9664 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9665 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9666 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9667 (IPA_OBJS): Add common-utils-ipa.o.
9668 (ptid_h, linux_osdata_h): New macros.
9669 (server_h): Add common/common-utils.h, common/xml-utils.h,
9670 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9672 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9673 ptid.o, buffer.o): New rules.
9674 (linux-low.o): Add common/linux-osdata.h as a dependency.
9675 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9676 * configure.ac: Add AC_HEADER_DIRENT check.
9677 * config.in: Regenerate.
9678 * configure: Regenerate.
9679 * remote-utils.c (xml_escape_text): Delete.
9680 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9681 buffer_xml_printf): Move to common/buffer.c.
9682 * server.c (main): Remove call to initialize_inferiors.
9683 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9684 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9685 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9686 internal_error, gdb_assert, gdb_assert_fail): Delete.
9687 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9688 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9690 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9691 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9692 initialize_inferiors): Delete.
9694 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9696 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9699 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9701 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9703 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9705 2011-05-26 Yao Qi <yao@codesourcery.com>
9707 * Makefile.in (thread-db.o): Track dependence to
9708 common/gdb_thread_db.h.
9709 * thread-db.c: include gdb_thread_db.h from right place.
9711 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9713 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9714 __FILE__ and __LINE__ to internal_error.
9716 2011-05-13 Doug Evans <dje@google.com>
9718 * thread-db.c (try_thread_db_load_from_sdir): New function.
9719 (try_thread_db_load_from_dir): New function.
9720 (thread_db_load_search): Handle $sdir, ignore $pdir.
9721 Remove trying of system directories if search of
9722 libthread-db-search-path fails, that is now done via $sdir.
9724 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9726 * server.c (handle_query): Add EnableDisableTracepoints to the list
9727 of supported features.
9728 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9730 (cmd_qtenable_disable): New.
9731 (cmd_qtstart): Install tracepoints even if disabled.
9732 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9733 receiving a QTEnable or QTDisable packet.
9734 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9735 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9737 (gdb_probe): Skip data collection if static tracepoint is disabled.
9739 2011-05-10 Doug Evans <dje@google.com>
9741 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9743 2011-05-04 Doug Evans <dje@google.com>
9745 * linux-low.c (linux_join): Skip process lookup.
9746 * spu-low.c (spu_join): Ditto.
9747 * server.c (join_inferiors_callback): Delete.
9748 (process_serial_event): For 'D' packet (detach) call join_inferior
9751 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9753 * README: Don't mention xscale*-*-linux*.
9754 * configure.srv (xscale*-*-linux*): Don't handle target.
9756 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9758 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9760 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9761 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9762 (i386_emit_void_call_2): Likewise.
9764 2011-04-26 Yao Qi <yao@codesourcery.com>
9766 * linux-low.c: Move common macros to linux-ptrace.h.
9767 Include linux-ptrace.h.
9768 * Makefile.in (linux_ptrace_h): New.
9769 (linux-low.o): Depends on linux-ptrace.h.
9771 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9773 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9774 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9775 (remote_prepare): New function with most of the TCP code from ...
9776 (remote_open): ... here. Detect PORT here unconditionally. Move also
9777 setting transport_is_reliable.
9778 * server.c (run_once): New variable.
9779 (gdbserver_usage): Document it.
9780 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9781 the first run if RUN_ONCE.
9782 * server.h (run_once, remote_prepare): New declarations.
9784 2011-04-19 Tom Tromey <tromey@redhat.com>
9786 * win32-low.c (handle_load_dll): Remove duplicate "the".
9788 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9790 Remove support for old Cygwin 1.5 versions.
9791 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9792 function to avoid warning.
9793 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9796 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9798 * gdbserver/server.h (Macro _): Define it if not available.
9800 2011-03-14 Michael Snyder <msnyder@vmware.com>
9802 * hostio.c (handle_close): Remove unnecessary null test.
9804 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9806 * Makefile.in (maintainer-clean realclean distclean): Remove
9807 "make ... subdir_do" command.
9809 2011-03-10 Michael Snyder <msnyder@vmware.com>
9811 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9813 * server.c (handle_v_run): Free alloced buffer on early return.
9815 2011-03-09 Yao Qi <yao@codesourcery.com>
9818 2011-03-04 Yao Qi <yao@codesourcery.com>
9820 * Makefile.in: Remove GNU make feature --directory.
9822 2011-03-05 Yao Qi <yao@codesourcery.com>
9824 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9825 (subdir_do): New make target. Copied from gdb/Makefile.
9826 (maintainer-clean, realclean, distclean, clean): Call corresponding
9827 make targets in common/Makefile.
9829 2011-02-11 Yao Qi <yao@codesourcery.com>
9831 * configure.ac: Call AC_PROG_RANLIB.
9832 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9833 * configure: Regenerate.
9835 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9837 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9839 2011-03-06 Yao Qi <yao@codesourcery.com>
9841 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9843 2011-03-05 Yao Qi <yao@codesourcery.com>
9845 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9846 (subdir_do): New make target. Copied from gdb/Makefile.
9847 (maintainer-clean, realclean, distclean, clean): Call corresponding
9848 make targets in common/Makefile.
9850 2011-03-04 Yao Qi <yao@codesourcery.com>
9852 * Makefile.in: Remove GNU make feature --directory.
9854 2011-03-04 Michael Snyder <msnyder@vmware.com>
9856 * server.c (queue_stop_reply): Call xmalloc not malloc.
9858 2011-03-02 Michael Snyder <msnyder@vmware.com>
9860 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9862 2011-02-28 Michael Snyder <msnyder@vmware.com>
9864 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9865 (cmd_qtframe): Ditto.
9866 (cmd_qtbuffer): Ditto.
9867 (cmd_bigqtbuffer): Ditto.
9869 * utils.c (decimal2str): Initialize 'width' to nine, then
9872 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9874 * hostio.c (require_data): Free *data, not data.
9876 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9878 * hostio.c (require_data): Use free, not xfree.
9880 2011-02-27 Michael Snyder <msnyder@vmware.com>
9882 * server.c (handle_query): Discard unused value.
9884 * hostio.c (require_data): Free malloc memory before returning
9887 2011-02-26 Michael Snyder <msnyder@vmware.com>
9889 * linux-low.c (list_threads): Call closedir for dirent.
9891 2011-02-27 Michael Snyder <msnyder@vmware.com>
9893 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9894 a case statement falls through.
9896 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9898 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9901 2011-02-26 Michael Snyder <msnyder@vmware.com>
9903 * utils.c (decimal2str): Eliminate dead code and dead param.
9904 (pulongest): Drop dead param from call to decimal2str.
9907 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9909 Revert the following patch (not approved yet):
9910 2011-02-21 Hui Zhu <teawater@gmail.com>
9911 * tracepoint.c (tp_printf): New function.
9912 (eval_agent_expr): Handle gdb_agent_op_printf.
9914 2011-02-21 Hui Zhu <teawater@gmail.com>
9916 * tracepoint.c (tp_printf): New function.
9917 (eval_agent_expr): Handle gdb_agent_op_printf.
9919 2011-02-18 Tom Tromey <tromey@redhat.com>
9921 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9922 (tracepoint.o): Likewise.
9923 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9924 (gdb_agent_op_names): Likewise.
9926 2011-02-18 Tom Tromey <tromey@redhat.com>
9928 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9929 gdb_agent_op_rot>: New constants.
9930 (gdb_agent_op_names): Add pick and roll.
9931 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9934 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9936 * aclocal.m4: Regenerated with aclocal-1.11.1.
9938 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9940 * server.c (handle_qxfer_traceframe_info): New.
9941 (qxfer_packets): Register "traceframe-info".
9942 (handle_query): Report support for qXfer:traceframe-info:read+.
9943 * tracepoint.c (match_blocktype): New.
9944 (traceframe_find_block_type): Rename to ...
9945 (traceframe_walk_blocks): ... this. Add callback filter argument,
9947 (traceframe_find_block_type): New, reimplemented on top of
9948 traceframe_walk_blocks.
9949 (build_traceframe_info_xml): New.
9950 (traceframe_read_info): New.
9951 * server.h (traceframe_read_info): Declare.
9953 2011-02-11 Yao Qi <yao@codesourcery.com>
9955 * configure.ac: Call AC_PROG_RANLIB.
9956 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9957 * configure: Regenerate.
9959 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9961 * server.c (gdb_read_memory): Change return semantics to allow
9963 (handle_search_memory_1): Adjust.
9964 (process_serial_event) <'m' packet>: Handle partial transfers.
9965 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9967 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9969 * regcache.c (init_register_cache): Initialize
9970 regcache->register_status.
9971 (free_register_cache): Release regcache->register_status.
9972 (regcache_cpy): Copy register_status.
9973 (registers_to_string): Print 'x's for unavailable registers.
9974 (supply_register): Mark the register's status valid or
9975 unavailable, depending on whether a buffer was passed in or not.
9976 (supply_register_zeroed): New.
9977 (supply_regblock): Mark the registers' status valid or
9978 unavailable, depending on whether a buffer was passed in or not.
9979 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9980 (struct regcache): New `register_status' field.
9981 (supply_register_zeroed): Declare.
9982 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9983 supply_register_zeroed, rather than passing a NULL buffer to
9985 * tracepoint.c (fetch_traceframe_registers): Update comment.
9987 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9989 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9992 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9994 * server.h (decode_xfer_write): Change prototype.
9995 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9996 and don't extract the annex here.
9997 * server.c (decode_xfer_read): Remove `annex' parameter,
9998 and don't extract the annex here.
10000 (struct qxfer): New.
10001 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10002 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10003 (handle_qxfer_statictrace): New functions, abstracted out from
10004 handle_query, and made to use the struct qxfer interface.
10005 (handle_threads_qxfer_proper): Rename to ...
10006 (handle_qxfer_threads_proper): ... this.
10007 (handle_threads_qxfer): Rename to ...
10008 (handle_qxfer_threads): ... this. Adjust.
10009 (qxfer_packets): New array.
10010 (handle_qxfer): New function.
10011 (handle_query): Use handle_qxfer.
10013 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10015 * gdbreplay.c: Shorten lines of >= 80 columns.
10016 * linux-low.c: Ditto.
10017 * linux-ppc-low.c: Ditto.
10018 * linux-s390-low.c: Ditto.
10019 * linux-sparc-low.c: Ditto.
10020 * linux-x86-low.c: Ditto.
10021 * linux-xtensa-low.c: Ditto.
10022 * mem-break.c: Ditto.
10023 * nto-low.c: Ditto.
10024 * regcache.h: Ditto.
10025 * remote-utils.c: Ditto.
10028 * thread-db.c: Ditto.
10029 * tracepoint.c: Ditto.
10031 * win32-low.h: Ditto.
10033 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10035 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10038 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10040 * server.c (gdbserver_version): Update copyright year in version
10042 * gdbreplay.c (gdbreplay_version): Ditto.
10044 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10046 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10047 * linux-bfin-low.c: New file.
10048 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10049 PT_DATA_ADDR for BFIN targets.
10050 * Makefile.in (SFILES): Add linux-bfin-low.c.
10051 (clean): Remove reg-bfin.c.
10052 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10053 * README: Mention supported Blackfin targets.
10055 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10057 * .gitignore: New file.
10059 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10061 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10063 2010-10-22 Jie Zhang <jie@codesourcery.com>
10065 * Makefile.in: Add FLAGS_TO_PASS variable.
10066 (install): Remove dependency of install-only and recursively
10067 invoke make for install-only.
10069 2010-10-04 Doug Evans <dje@google.com>
10071 * Makefile.in (uninstall): Use $(DESTDIR).
10073 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10077 * linux-x86-low.c (compat_siginfo_from_siginfo)
10078 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10079 si_code is < 0. Check for si_code == SI_TIMER before checking for
10082 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10084 * lynx-i386-low.c: New file.
10085 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10087 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10089 * lynx-low.c (ptrace_request_to_str): Remove handling for
10090 request values that have been removed in LynxOS 5.x.
10092 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10094 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10097 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10099 * configure.ac: Add --enable-inprocess-agent option.
10100 * configure: Rebuilt.
10102 2010-09-06 Yao Qi <yao@codesourcery.com>
10104 * linux-low.c (linux_kill): Remove unused variable.
10105 (linux_stabilize_threads): Likewise.
10106 * server.c (start_inferior): Likewise.
10107 (queue_stop_reply_callback): Likewise.
10108 * tracepoint.c (do_action_at_tracepoint): Likewise.
10110 2010-09-06 Yao Qi <yao@codesourcery.com>
10112 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10115 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10117 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10119 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10121 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10124 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10126 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10127 gdbserver/lynx-ppc-low.c: New files.
10128 * Makefile.in (lynx_low_h): New variable.
10129 (lynx-low.o, lynx-ppc-low.o): New rules.
10130 * configure.ac: On LynxOS, link with -lnetinet.
10131 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10132 * configure: regenerate.
10134 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10136 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10137 * configure.ac: Add check for vasprintf and vsnprintf.
10138 * configure, config.in: Regenerate.
10139 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10141 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10143 * gdbreplay.c: Move include of alloca.h up, next to include of
10145 * server.h: Add include of malloc.h.
10146 * mem-break.c: Remove include of malloc.h.
10147 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10149 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10151 * Makefile.in (memmem.o): Build with -Wno-error.
10153 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10155 * utils.c (xsnprintf): Make non-static.
10156 * server.h: Add xsnprintf declaration.
10157 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10158 replace calls to snprintf by calls to xsnprintf throughout.
10160 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10162 * configure.ac: Add configure check for alloca.
10163 * configure, config.in: Regenerate.
10164 * server.h: Include alloca.h if it exists.
10165 * gdbreplay.c: Include alloca.h if it exists.
10167 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10169 * linux-low.c (__SIGRTMIN): Define if not already defined.
10170 (linux_create_inferior): Check for __ANDROID__ rather than
10172 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10173 are already deferred.
10174 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10175 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10176 stopped and already has a pending signal to report.
10177 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10178 a pending signal to report or is moving out of a jump pad.
10179 (linux_init_signals): Check for __ANDROID__ rather than
10182 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10184 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10185 debug_threads check. Avoid a linear search when not doing debug
10188 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10190 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10191 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10192 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10193 (process_event): Change local fd's type to gdb_fildes_t.
10194 (create_file_handler): Adjust prototype.
10195 (delete_file_handler): Adjust prototype.
10196 (handle_file_event): Adjust prototype. Use pfildes.
10197 (create_file_event): Adjsut prototype.
10198 * remote-utils.c (remote_desc, listen_desc): Change type to
10200 * server.h: New gdb_fildes_t typedef.
10201 [USE_WIN32API]: Include winsock2.h.
10202 (delete_file_handler, add_file_handler): Adjust prototypes.
10203 (pfildes): Declare.
10204 * utils.c (pfildes): New.
10206 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10208 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10209 * configure: Regenerate.
10211 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10213 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10214 (linux_done_accessing_memory): ... this.
10215 (linux_target_ops): Adjust.
10216 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10217 * nto-low.c (nto_target_ops): Adjust comment.
10218 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10219 * spu-low.c (spu_target_ops): Adjust comment.
10220 * target.h (target_ops): Rename unprepare_to_access_memory field
10221 to done_accessing_memory.
10222 (unprepare_to_access_memory): Rename to ...
10223 (done_accessing_memory): ... this.
10225 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10227 * linux-low.c (linux_prepare_to_access_memory): New.
10228 (linux_unprepare_to_access_memory): New.
10229 (linux_target_ops): Install them.
10230 * server.c (read_memory): Rename to ...
10231 (gdb_read_memory): ... this. Use
10232 prepare_to_access_memory/prepare_to_access_memory.
10233 (write_memory): Rename to ...
10234 (gdb_write_memory): ... this. Use
10235 prepare_to_access_memory/prepare_to_access_memory.
10236 (handle_search_memory_1): Adjust.
10237 (process_serial_event): Adjust.
10238 * target.h (struct target_ops): New fields
10239 prepare_to_access_memory and unprepare_to_access_memory.
10240 (prepare_to_access_memory, unprepare_to_access_memory): New.
10241 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10242 prepare_to_access_memory/prepare_to_access_memory.
10243 * nto-low.c (nto_target_ops): Adjust.
10244 * spu-low.c (spu_target_ops): Adjust.
10245 * win32-low.c (win32_target_ops): Adjust.
10247 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10249 * Makefile.in (WARN_CFLAGS): Get it from configure.
10250 (WERROR_CFLAGS): New.
10251 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10252 * configure.ac: Introduce --enable-werror, which adds -Werror to
10253 the compiler command line. Enabled by default. Disable with
10254 --disable-werror. Add -Wdeclaration-after-statement
10255 Wpointer-arith and -Wformat-nonliteral to warning flags.
10256 * configure: Regenerate.
10258 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10260 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10262 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10264 * gdbreplay.c (remote_error): New.
10266 (expect): Use gdbchar. Check for error reading from GDB.
10267 Clarify sync error output.
10268 (play): Check for errors writing to GDB.
10269 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10270 * remote-utils.c (getpkt): Check for errors writing to the remote
10273 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10275 * linux-low.c (linux_wait_1): Move non-debugging code out of
10276 `debug_threads' control.
10278 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10280 * linux-low.c (linux_wait_1): Don't set last_status here.
10281 * server.c (push_event, queue_stop_reply_callback): Assert we're
10282 not pushing a TARGET_WAITKIND_IGNORE event.
10283 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10284 (myresume, handle_target_event): Set the thread's last_resume_kind
10285 and last_status from the target returned status.
10287 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10291 * linux-x86-low.c (update_debug_registers_callback): New.
10292 (i386_dr_low_set_addr): Use it.
10293 (i386_dr_low_get_addr): New.
10294 (i386_dr_low_set_control): Use update_debug_registers_callback.
10295 (i386_dr_low_get_control): New.
10296 (i386_dr_low_get_status): Adjust.
10297 * linux-low.c (linux_stop_lwp): New.
10298 * linux-low.h (linux_stop_lwp): Declare.
10300 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10301 argument instead of a i386_debug_reg_state.
10302 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10303 a i386_debug_reg_state.
10304 (i386_insert_aligned_watchpoint): Adjust.
10305 (i386_remove_aligned_watchpoint): Adjust.
10306 (i386_low_stopped_data_address): Read the debug registers from the
10307 inferior instead of from the mirrors.
10308 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10309 (i386_dr_low_get_addr): Declare.
10310 (i386_dr_low_get_control): Declare.
10311 (i386_dr_low_get_status): Change prototype.
10313 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10314 (i386_dr_low_get_addr): New.
10315 (i386_dr_low_get_control): New.
10316 (i386_dr_low_get_status): Adjust prototype. Return
10318 (i386_initial_stuff): Clear dr_status_mirror and
10320 (i386_get_thread_context): Adjust.
10321 (i386_set_thread_context): Adjust.
10322 (i386_thread_added): Adjust.
10324 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10326 * linux-low.h (linux_thread_area): Delete declaration.
10328 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10330 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10331 after its termination.
10333 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10335 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10336 (gdb_wants_all_stopped): Delete.
10337 (linux_wait_1): Don't call them.
10338 * server.c (handle_v_cont): Tag all threads as want-stopped.
10339 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10340 stopped as "client-wants-stopped".
10342 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10344 * Makefile.in (signals_h): New.
10345 (server_h): Depend on it.
10346 (server.o): Don't depend on $(signals_def).
10347 (signals.o): Depend on $(signals_def).
10349 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10351 * Makefile.in (signals_def): New.
10352 (server_h): Append include/gdb/signals.h and signals_def.
10353 (server.o): Append signals_def.
10355 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10357 * server.c (handle_target_event): Use target_signal_to_host for
10358 resume_info.sig initialization.
10359 * target.h (struct thread_resume) <sig>: New comment.
10361 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10363 * server.c (handle_query): strcpy() the returned string from paddress()
10364 instead of sprintf().
10365 * utils.c (paddress): Return phex_nz().
10367 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10369 * server.c (handle_v_cont): Call mourn_inferior if process
10371 (myresume): Likewise.
10373 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10375 Static tracepoints, and integration with UST.
10377 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10378 * mem-break.c (uninsert_all_breakpoints)
10379 (reinsert_all_breakpoints): New.
10380 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10381 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10382 (gdb_agent_ust_loaded, helper_thread_id)
10383 (gdb_agent_helper_thread_id): New macros.
10384 (struct ipa_sym_addresses): Add addr_ust_loaded,
10385 addr_helper_thread_id, addr_cmd_buf.
10386 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10387 (in_process_agent_loaded_ust): New.
10388 (write_e_ust_not_loaded): New.
10389 (maybe_write_ipa_ust_not_loaded): New.
10390 (struct collect_static_trace_data_action): New.
10391 (enum tracepoint_type) <static_tracepoint>: New.
10392 (struct tracepoint) <handle>: Mention static tracepoints.
10393 (struct static_tracepoint_ctx): New.
10394 (CMD_BUF_SIZE): New.
10395 (add_tracepoint_action): Handle static tracepoint actions.
10396 (unprobe_marker_at): New.
10397 (clear_installed_tracepoints): Handle static tracepoints.
10398 (cmd_qtdp): Handle static tracepoints.
10399 (probe_marker_at): New.
10400 (cmd_qtstart): Handle static tracepoints.
10401 (response_tracepoint): Handle static tracepoints.
10402 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10403 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10404 (get_context_regcache): Handle static tracepoints.
10405 (do_action_at_tracepoint): Handle static tracepoint actions.
10406 (traceframe_find_block_type): Handle static trace data blocks.
10407 (traceframe_read_sdata): New.
10408 (download_tracepoints): Download static tracepoint actions.
10409 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10410 (GDB_PROBE_NAME): New.
10412 (GET_UST_SYM): New.
10415 (ust_marker_to_static_tracepoint): New.
10417 (collect_ust_data_at_tracepoint): New.
10418 (gdb_ust_probe): New.
10419 (UNIX_PATH_MAX, SOCK_DIR): New.
10420 (gdb_ust_connect_sync_socket): New.
10421 (resume_thread, stop_thread): New.
10422 (run_inferior_command): New.
10423 (init_named_socket): New.
10424 (gdb_ust_socket_init): New.
10425 (cstr_to_hexstr): New.
10427 (first_marker, next_marker): New.
10428 (response_ust_marker): New.
10429 (cmd_qtfstm, cmd_qtsstm): New.
10430 (unprobe_marker_at, probe_marker_at): New.
10431 (cmd_qtstmat, gdb_ust_thread): New.
10432 (gdb_ust_init): New.
10433 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10434 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10435 (ST_REGENTRY): New.
10436 (x86_64_st_collect_regmap): New.
10437 (X86_64_NUM_ST_COLLECT_GREGS): New.
10438 (AMD64_RIP_REGNUM): New.
10439 (supply_static_tracepoint_registers): New.
10440 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10441 (ST_REGENTRY): New.
10442 (i386_st_collect_regmap): New.
10443 (i386_NUM_ST_COLLECT_GREGS): New.
10444 (supply_static_tracepoint_registers): New.
10445 * server.c (handle_query): Handle qXfer:statictrace:read.
10446 <qSupported>: Report support for StaticTracepoints, and
10447 qXfer:statictrace:read features.
10448 * server.h (traceframe_read_sdata)
10449 (supply_static_tracepoint_registers): Declare.
10450 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10451 (unpack_varlen_hex): Include in IPA build.
10452 * Makefile.in (ustlibs, ustinc): New.
10453 (IPA_OBJS): Add remote-utils-ipa.o.
10454 ($(IPA_LIB)): Link -ldl and -lpthread.
10456 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10457 * config.in, configure: Regenerate.
10459 2010-06-20 Ian Lance Taylor <iant@google.com>
10460 Pedro Alves <pedro@codesourcery.com>
10462 * linux-x86-low.c (always_true): Delete.
10463 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10464 trying to fool the compiler with always_true.
10466 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10468 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10469 conditions in gdbserver.
10471 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10473 * spu-low.c (spu_read_memory): Wrap around local store limit.
10474 (spu_write_memory): Likewise.
10476 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10478 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10479 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10481 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10483 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10484 uses with LONGEST uses.
10486 2010-06-14 Stan Shebs <stan@codesourcery.com>
10487 Pedro Alves <pedro@codesourcery.com>
10491 * linux-x86-low.c: Include limits.h.
10493 (always_true): New.
10496 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10497 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10498 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10499 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10500 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10501 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10502 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10503 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10504 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10505 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10506 (amd64_emit_void_call_2): New.
10507 (amd64_emit_ops): New.
10508 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10509 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10510 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10511 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10512 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10513 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10514 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10515 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10516 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10517 (i386_emit_stack_adjust, i386_emit_int_call_1)
10518 (i386_emit_void_call_2): New.
10519 (i386_emit_ops): New.
10520 (x86_emit_ops): New.
10521 (the_low_target): Install x86_emit_ops.
10522 * server.h (struct emit_ops): New.
10523 (get_raw_reg_func_addr): Declare.
10524 (current_insn_ptr, emit_error): Declare.
10525 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10526 (set_trace_state_variable_value): New defines.
10527 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10528 addr_get_trace_state_variable_value and
10529 addr_set_trace_state_variable_value.
10530 (symbol_list): New fields for get_raw_reg,
10531 get_trace_state_variable_value and set_trace_state_variable_value.
10532 (condfn): New typedef.
10533 (struct tracepoint): New field `compiled_cond'.
10534 (do_action_at_tracepoint): Clear compiled_cond.
10535 (get_trace_state_variable_value, set_trace_state_variable_value):
10537 (condition_true_at_tracepoint): If there's a compiled condition,
10539 (current_insn_ptr, emit_error): New globals.
10540 (struct bytecode_address): New.
10541 (get_raw_reg_func_addr): New.
10542 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10543 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10544 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10545 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10546 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10547 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10548 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10549 (compile_tracepoint_condition, compile_bytecodes): New.
10550 * target.h (emit_ops): Forward declare.
10551 (struct target_ops): New field emit_ops.
10552 (target_emit_ops): New.
10553 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10554 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10555 * linux-low.c (linux_emit_ops): New.
10556 (linux_target_ops): Install it.
10557 * linux-low.h (struct linux_target_ops): New field emit_ops.
10559 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10561 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10562 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10564 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10565 Stan Shebs <stan@codesourcery.com>
10567 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10568 (all): Depend on $(extra_libraries).
10569 (install-only): Install the IPA.
10570 (IPA_OBJS, IPA_LIB): New.
10571 (clean): Remove the IPA lib.
10572 (IPAGENT_CFLAGS): New.
10573 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10574 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10575 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10576 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10577 * configure.ac: Check for atomic builtins support in the compiler.
10578 (IPA_DEPFILES, extra_libraries): Define.
10579 * configure.srv (ipa_obj): Add description.
10580 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10581 (i[34567]86-*-linux*): Set ipa_obj.
10582 (x86_64-*-linux*): Set ipa_obj.
10583 * linux-low.c (stabilizing_threads): New.
10584 (supports_fast_tracepoints): New.
10585 (linux_detach): Stabilize threads before detaching.
10586 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10587 the lwp is either not stabilizing, or is moving out of a jump pad.
10588 (linux_fast_tracepoint_collecting): New.
10589 (maybe_move_out_of_jump_pad): New.
10590 (enqueue_one_deferred_signal): New.
10591 (dequeue_one_deferred_signal): New.
10592 (linux_wait_for_event_1): If moving out of a jump pad, defer
10593 pending signals to later.
10594 (linux_stabilize_threads): New.
10595 (linux_wait_1): Check if threads need moving out of jump pads, and
10597 (stuck_in_jump_pad_callback): New.
10598 (move_out_of_jump_pad_callback): New.
10599 (lwp_running): New.
10600 (linux_resume_one_lwp): Handle moving out of jump pads.
10601 (linux_set_resume_request): Dequeue deferred signals.
10602 (need_step_over_p): Also step over fast tracepoint jumps.
10603 (start_step_over): Also uninsert fast tracepoint jumps.
10604 (finish_step_over): Also reinsert fast tracepoint jumps.
10605 (linux_install_fast_tracepoint_jump): New.
10606 (linux_target_ops): Install linux_stabilize_threads and
10607 linux_install_fast_tracepoint_jump_pad.
10608 * linux-low.h (linux_target_ops) <get_thread_area,
10609 install_fast_tracepoint_jump_pad>: New fields.
10610 (struct lwp_info) <collecting_fast_tracepoint,
10611 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10612 (linux_get_thread_area): Declare.
10613 * linux-x86-low.c (jump_insn): New.
10614 (x86_get_thread_area): New.
10615 (append_insns): New.
10616 (push_opcode): New.
10617 (amd64_install_fast_tracepoint_jump_pad): New.
10618 (i386_install_fast_tracepoint_jump_pad): New.
10619 (x86_install_fast_tracepoint_jump_pad): New.
10620 (the_low_target): Install x86_get_thread_area and
10621 x86_install_fast_tracepoint_jump_pad.
10622 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10623 (struct fast_tracepoint_jump): New.
10624 (fast_tracepoint_jump_insn): New.
10625 (fast_tracepoint_jump_shadow): New.
10626 (find_fast_tracepoint_jump_at): New.
10627 (fast_tracepoint_jump_here): New.
10628 (delete_fast_tracepoint_jump): New.
10629 (set_fast_tracepoint_jump): New.
10630 (uninsert_fast_tracepoint_jumps_at): New.
10631 (reinsert_fast_tracepoint_jumps_at): New.
10632 (set_breakpoint_at): Use write_inferior_memory.
10633 (uninsert_raw_breakpoint): Use write_inferior_memory.
10634 (check_mem_read): Mask out fast tracepoint jumps.
10635 (check_mem_write): Mask out fast tracepoint jumps.
10636 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10637 (set_fast_tracepoint_jump): Declare.
10638 (delete_fast_tracepoint_jump)
10639 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10640 (reinsert_fast_tracepoint_jumps_at): Declare.
10641 * regcache.c: Don't compile many functions when building the
10642 in-process agent library.
10643 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10644 the register buffer in the heap.
10645 (free_register_cache): If the register buffer isn't owned by the
10646 regcache, don't free it.
10647 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10648 pre-existing register caches.
10649 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10651 (convert_ascii_to_int): : Constify `from' parameter type.
10652 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10653 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10654 the needed buffer in-place.
10655 (relocate_instruction): New.
10656 * server.c (handle_query) <qSymbols>: If the target supports
10657 tracepoints, give it a chance of looking up symbols. Report
10658 support for fast tracepoints.
10659 (handle_status): Stabilize threads.
10660 (process_serial_event): Adjust.
10661 * server.h (struct fast_tracepoint_jump): Forward declare.
10662 (struct process_info) <fast_tracepoint_jumps>: New field.
10663 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10664 (decode_X_packet, decode_M_packet): Adjust.
10665 (relocate_instruction): Declare.
10666 (in_process_agent_loaded): Declare.
10667 (tracepoint_look_up_symbols): Declare.
10668 (struct fast_tpoint_collect_status): Declare.
10669 (fast_tracepoint_collecting): Declare.
10670 (force_unlock_trace_buffer): Declare.
10671 (handle_tracepoint_bkpts): Declare.
10672 (initialize_low_tracepoint)
10673 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10674 * target.h (struct target_ops) <stabilize_threads,
10675 install_fast_tracepoint_jump_pad>: New fields.
10676 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10677 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10678 [HAVE_STDINT_H]: Include stdint.h.
10679 (trace_debug_1): Rename to ...
10680 (trace_vdebug): ... this.
10681 (trace_debug): Rename to ...
10682 (trace_debug_1): ... this. Add `level' parameter.
10683 (trace_debug): New.
10684 (ATTR_USED, ATTR_NOINLINE): New.
10685 (IP_AGENT_EXPORT): New.
10686 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10687 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10688 (about_to_request_buffer_space, trace_buffer_is_full)
10689 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10690 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10691 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10692 (traceframe_write_count, traceframes_created)
10693 (trace_state_variables)
10694 New renaming defines.
10695 (struct ipa_sym_addresses): New.
10696 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10697 (symbol_list): New.
10698 (ipa_sym_addrs): New.
10699 (all_tracepoint_symbols_looked_up): New.
10700 (in_process_agent_loaded): New.
10701 (write_e_ipa_not_loaded): New.
10702 (maybe_write_ipa_not_loaded): New.
10703 (tracepoint_look_up_symbols): New.
10704 (debug_threads) [IN_PROCESS_AGENT]: New.
10705 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10706 (UNKNOWN_SIDE_EFFECTS): New.
10707 (stop_tracing): New.
10708 (flush_trace_buffer): New.
10709 (stop_tracing_bkpt): New.
10710 (flush_trace_buffer_bkpt): New.
10711 (read_inferior_integer): New.
10712 (read_inferior_uinteger): New.
10713 (read_inferior_data_pointer): New.
10714 (write_inferior_data_pointer): New.
10715 (write_inferior_integer): New.
10716 (write_inferior_uinteger): New.
10717 (struct collect_static_trace_data_action): Delete.
10718 (enum tracepoint_type): New.
10719 (struct tracepoint) <type>: New field `type'.
10720 <actions_str, step_actions, step_actions_str>: Only include in
10722 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10723 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10724 (tracepoints): Use IP_AGENT_EXPORT.
10725 (last_tracepoint): Don't include in the IPA.
10726 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10727 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10728 (alloced_trace_state_variables): New.
10729 (trace_state_variables): Use IP_AGENT_EXPORT.
10730 (traceframe_t): Delete unused variable.
10731 (circular_trace_buffer): Don't include in the IPA.
10732 (trace_buffer_start): Delete.
10733 (struct trace_buffer_control): New.
10734 (trace_buffer_free): Delete.
10735 (struct ipa_trace_buffer_control): New.
10736 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10737 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10739 (trace_buffer_ctrl): New.
10740 (TRACE_BUFFER_CTRL_CURR): New.
10741 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10742 Reimplement as macros.
10743 (trace_buffer_wrap): Delete.
10744 (traceframe_write_count, traceframe_read_count)
10745 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10746 (struct tracepoint_hit_ctx) <type>: New field.
10747 (struct fast_tracepoint_ctx): New.
10748 (memory_barrier): New.
10750 (record_tracepoint_error): Update atomically in the IPA.
10751 (clear_inferior_trace_buffer): New.
10752 (about_to_request_buffer_space): New.
10753 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10754 updating the same buffer.
10755 (add_tracepoint): Default the tracepoint's type to trap
10756 tracepoint, and orig_size to -1.
10757 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10758 internal variables.
10759 (create_trace_state_variable): New parameter `gdb'. Handle it.
10760 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10761 (cmd_qtdp): Handle fast tracepoints.
10762 (cmd_qtdv): Adjust.
10763 (max_jump_pad_size): New.
10764 (gdb_jump_pad_head): New.
10765 (get_jump_space_head): New.
10766 (claim_jump_space): New.
10767 (sort_tracepoints): New.
10768 (MAX_JUMP_SIZE): New.
10769 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10771 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10772 support. Upload fast traceframes, and delete internal IPA
10774 (stop_tracing_handler): New.
10775 (flush_trace_buffer_handler): New.
10776 (cmd_qtstop): Upload fast tracepoints.
10777 (response_tracepoint): Handle fast tracepoints.
10778 (tracepoint_finished_step): Upload fast traceframes. Set the
10779 tracepoint hit context's tracepoint type.
10780 (handle_tracepoint_bkpts): New.
10781 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10782 type. Add comment about fast tracepoints.
10783 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10784 non-existing action_str field.
10785 (get_context_regcache): Handle fast tracepoints.
10786 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10788 (fast_tracepoint_from_jump_pad_address): New.
10789 (fast_tracepoint_from_ipa_tpoint_address): New.
10790 (collecting_t): New.
10791 (force_unlock_trace_buffer): New.
10792 (fast_tracepoint_collecting): New.
10794 (gdb_collect): New.
10795 (write_inferior_data_ptr): New.
10796 (target_tp_heap): New.
10797 (target_malloc): New.
10798 (download_agent_expr): New.
10800 (download_tracepoints): New.
10801 (download_trace_state_variables): New.
10802 (upload_fast_traceframes): New.
10803 (IPA_FIRST_TRACEFRAME): New.
10804 (IPA_NEXT_TRACEFRAME_1): New.
10805 (IPA_NEXT_TRACEFRAME): New.
10806 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10807 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10808 (gdb_jump_pad_buffer_end): New.
10809 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10810 (initialize_tracepoint): Adjust.
10811 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10812 buffer. Initialize the low module.
10813 * utils.c (PREFIX, TOOLNAME): New.
10814 (malloc_failure): Use PREFIX.
10815 (error): In the IPA, an error causes an exit.
10816 (fatal, warning): Use PREFIX.
10817 (internal_error): Use TOOLNAME.
10818 (NUMCELLS): Increase to 10.
10819 * configure, config.in: Regenerate.
10821 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10823 * server.c (handle_query) <qSupported>: Do two passes over the
10824 qSupported string to avoid nesting strtok.
10826 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10828 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10830 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10831 -Wl,--dynamic-list.
10832 * configure: Regenerate.
10833 * proc-service.list: New.
10835 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10837 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10840 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10842 * gdbreplay.c (remote_open): Check error return from socket() call by
10843 its equality to -1 not by it being negative.
10844 * remote-utils.c (remote_open): Likewise.
10846 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10848 * config.h: Regenerate.
10850 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10852 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10853 doesn't provide PTRACE_GET_THREAD_AREA.
10855 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10857 * linux-m68k-low.c: Include <asm/ptrace.h>
10858 (ps_get_thread_area): Implement.
10860 2010-05-03 Doug Evans <dje@google.com>
10862 * event-loop.c (struct callback_event): New struct.
10863 (callback_list): New global.
10864 (append_callback_event, delete_callback_event): New functions.
10865 (process_callback): New function.
10866 (start_event_loop): Call it.
10867 * remote-utils.c (NOT_SCHEDULED): Define.
10868 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10869 moved out of readchar.
10870 (readchar): Rewrite. Call reschedule before returning.
10871 (reset_readchar): New function.
10872 (remote_close): Call it.
10873 (process_remaining, reschedule): New functions.
10874 * server.h (callback_handler_func): New typedef.
10875 (append_callback_event, delete_callback_event): Declare.
10877 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10879 * proc-service.c (ps_pglobal_lookup): Use
10880 thread_db_look_up_one_symbol.
10881 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10882 parameter. Use it instead of all_symbols_looked_up.
10883 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10885 (all_symbols_looked_up): Don't declare.
10886 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10887 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10889 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10890 Set all_symbols_looked_up here.
10891 (thread_db_look_up_one_symbol): New.
10892 (thread_db_get_tls_address): Adjust.
10893 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10894 thread_db object on the heap, and tentatively set it in the
10896 (thread_db_init): Don't set all_symbols_looked_up here.
10897 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10899 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10901 * linux-low.c (linux_kill, linux_detach): Adjust.
10902 (status_pending_p_callback): Remove redundant statement. Check
10903 for !TARGET_WAITIKIND_IGNORE, instead of
10904 TARGET_WAITKIND_STOPPED.
10905 (handle_tracepoints): Make sure LWP is locked. Adjust.
10906 (linux_wait_for_event_1): Adjust.
10907 (linux_cancel_breakpoints): New.
10908 (unsuspend_one_lwp): New.
10909 (unsuspend_all_lwps): New.
10910 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10911 (send_sigstop_callback): Change return type to int, add new
10912 `except' parameter and handle it.
10913 (suspend_and_send_sigstop_callback): New.
10914 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10915 pass them down. If SUSPEND, also increment the lwp's suspend
10917 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10918 (need_step_over_p): Don't consider suspended LWPs.
10919 (start_step_over): Adjust.
10920 (proceed_one_lwp): Change return type to int, add new `except'
10921 parameter and handle it.
10922 (unsuspend_and_proceed_one_lwp): New.
10923 (proceed_all_lwps): Use find_inferior instead of
10925 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10926 also decrement the suspend count of LWPs. Pass `except' down,
10927 instead of hacking its suspend count.
10928 (linux_pause_all): Add `freeze' parameter. Adjust.
10929 (linux_unpause_all): New.
10930 (linux_target_ops): Install linux_unpause_all.
10931 * server.c (handle_status): Adjust.
10932 * target.h (struct target_ops): New fields `unpause_all' and
10933 `cancel_breakpoints'. Add new parameter to `pause_all'.
10934 (pause_all): Add new `freeze' parameter.
10935 (unpause_all): New.
10936 (cancel_breakpoints): New.
10937 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10938 cancel breakpoints.
10939 (cmd_qtstart): Pause threads.
10940 (stop_tracing): Pause threads, and cancel breakpoints.
10941 * win32-low.c (win32_target_ops): Adjust.
10943 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10945 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10946 the inferior right away from here...
10947 (linux_wait_1): ... to here, and adjust to check the thread's
10948 last_resume_kind instead of the lwp's step or stop_expected flags.
10950 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10952 * README: Use consistent `GDB' and `GDBserver' spellings.
10954 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10956 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10957 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10958 (linux_detach_one_lwp): Assume the lwp is stopped.
10959 (any_thread_of): Delete.
10960 (linux_detach): Stop all lwps here. Don't blindly delete all
10962 (delete_lwp_callback): New.
10963 (linux_mourn): Delete all lwps of the process that is gone.
10964 (linux_wait_1): Don't delete the last lwp of the process here.
10965 * mem-break.h (mark_breakpoints_out): Declare.
10966 * mem-break.c (mark_breakpoints_out): New.
10967 (free_all_breakpoints): Use it.
10968 * server.c (handle_target_event): If the process is gone, mark
10970 * thread-db.c (struct thread_db) <create_bp>: New field.
10971 (thread_db_enable_reporting): Fix prototype. Store a thread event
10972 breakpoint reference in the thread_db struct.
10973 (thread_db_load_search): Clear the thread_db object.
10974 (try_thread_db_load_1): Ditto.
10975 (switch_to_process): New.
10976 (disable_thread_event_reporting): Use it.
10977 (remove_thread_event_breakpoints): New.
10978 (thread_db_detach, thread_db_mourn): Use it.
10980 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10982 * linux-low.c (linux_enable_event_reporting): New.
10983 (linux_wait_for_event_1, handle_extended_wait): Use it.
10985 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10987 * linux-low.c (linux_kill_one_lwp, linux_kill)
10988 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10989 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10990 SIGSTOP even if the LWP is stopped.
10991 (send_sigstop_callback): New.
10992 (stop_all_lwps): Use send_sigstop_callback instead.
10993 (linux_resume_one_thread): Adjust.
10994 (proceed_one_lwp): Still proceed an LWP that the client has
10995 requested to stop, if we haven't reported it as stopped yet. Make
10996 sure that LWPs the client want stopped, have a pending SIGSTOP.
10998 2010-04-26 Doug Evans <dje@google.com>
11000 * server.c (handle_general_set): Make static.
11002 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11003 Print received char after testing for error/eof instead of before.
11004 (input_interrupt): Tweak comment.
11006 2010-04-23 Doug Evans <dje@google.com>
11008 * server.c (start_inferior): Print inferior argv if --debug.
11010 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11012 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11013 * nto-x86-low.c: Include server.h
11015 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11017 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11018 be consistent with other sources of this directory.
11019 (init_registers_amd64): Correct name of source file of this function
11022 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11024 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11025 64-bit executables.
11027 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11029 * win32-i386-low.c: Add 64-bit support.
11030 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11031 (init_registers_amd64): Declare.
11032 (mappings): Add 64-bit version of array.
11033 (init_windows_x86): New function.
11034 (the_low_target): Change init_arch field to init_windows_x86.
11036 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11038 * win32-low.c: Adapt to support also 64-bit architecture.
11039 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11040 (get_image_name): Use SIZE_T type for local variable `done'.
11041 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11042 (toolhelp_get_dll_name): Idem.
11043 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11044 Use uintptr_t typecast to avoid warning.
11045 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11046 (handle_exception): Use phex_nz to avoid warning.
11047 (win32_wait): Remove unused local variable `process'.
11049 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11051 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11054 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11056 * configure.ac: Use `ws2_32' library for srv_mingw.
11057 * configure: Regenerate.
11058 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11059 * remote-utils.c: Likewise.
11061 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11063 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11064 if __x86_64__ is defined.
11066 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11068 * configure: Regenerate.
11070 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11072 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11073 * target.h (target_ops): New get_tib_address field.
11074 * win32-low.h (win32_thread_info): Add thread_local_base field.
11075 * win32-low.c (child_add_thread): Add tlb argument.
11076 Set thread_local_base field to TLB.
11077 (get_child_debug_event): Adapt to child_add_thread change.
11078 (win32_get_tib_address): New function.
11079 (win32_target_ops): Set get_tib_address field to
11080 win32_get_tib_address.
11081 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11083 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11085 * linux-low.c (linux_mourn): Also remove the process.
11086 * server.c (handle_target_event): Don't remove the process here.
11087 * nto-low.c (nto_mourn): New.
11088 (nto_target_ops): Install it.
11089 * spu-low.c (spu_mourn): New.
11090 (spu_target_ops): Install it.
11091 * win32-low.c (win32_mourn): New.
11092 (win32_target_ops): Install it.
11094 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11096 * server.h (buffer_xml_printf): Remove redundant `;'.
11098 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11100 * regcache.c (set_register_cache): Invalidate regcaches before
11101 changing the register cache layout.
11102 (regcache_invalidate_one): Allow a NULL regcache.
11103 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11104 regcaches before changing the register cache layout or the target
11107 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11109 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11110 variable warning on Linux/x86-64.
11112 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11114 GDBserver disconnected tracing support.
11116 * linux-low.c (linux_remove_process): Delete.
11117 (add_lwp): Don't set last_resume_kind here.
11118 (linux_kill): Use `mourn'.
11119 (linux_detach): Use `thread_db_detach', and `mourn'.
11120 (linux_mourn): New.
11121 (linux_attach_lwp_1): Adjust comment.
11122 (linux_attach): last_resume_kind moved the thread_info; adjust.
11123 (status_pending_p_callback): Adjust.
11124 (linux_wait_for_event_1): Adjust.
11125 (count_events_callback, select_singlestep_lwp_callback)
11126 (select_event_lwp_callback, cancel_breakpoints_callback)
11127 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11128 (proceed_one_lwp): Adjust.
11129 (linux_async): Add debug output.
11130 (linux_thread_stopped): New.
11131 (linux_pause_all): New.
11132 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11134 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11135 (thread_db_free): Delete declaration.
11136 (thread_db_detach, thread_db_mourn): Declare.
11137 * thread-db.c (thread_db_init): Use thread_db_mourn.
11138 (thread_db_free): Delete, split in two.
11139 (disable_thread_event_reporting): New.
11140 (thread_db_detach): New.
11141 (thread_db_mourn): New.
11143 * server.h (struct thread_info) <last_resume_kind>: New field.
11144 <attached>: Add comment.
11145 <gdb_detached>: New field.
11146 (handler_func): Change return type to int.
11147 (handle_serial_event, handle_target_event): Ditto.
11148 (gdb_connected): Declare.
11150 (disconnected_tracing): Declare.
11151 (stop_tracing): Declare.
11153 * server.c (handle_query) <qSupported>: Report support for
11154 disconnected tracing.
11155 (queue_stop_reply_callback): Account for running threads.
11156 (gdb_wants_thread_stopped): New.
11157 (gdb_wants_all_threads_stopped): New.
11158 (gdb_reattached_process): New.
11159 (handle_status): Clear the `gdb_detached' flag of all processes.
11160 In all-stop, stop all threads.
11161 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11162 (process_serial_event): If the remote connection breaks, or if an
11163 exit was forced with "monitor exit", force an event loop exit.
11164 Handle disconnected tracing on detach.
11165 (handle_serial_event): Adjust.
11166 (handle_target_event): If GDB isn't connected, forward events back
11167 to the inferior, unless the last process exited, in which case,
11168 exit gdbserver. Adjust interface.
11170 * remote-utils.c (remote_open): Don't block in accept. Instead
11171 register an event loop source on the listen socket file
11172 descriptor. Refactor bits into ...
11173 (listen_desc): ... this new global.
11174 (gdb_connected): ... this new function.
11175 (enable_async_notification): ... this new function.
11176 (handle_accept_event): ... this new function.
11177 (remote_close): Clear remote_desc.
11179 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11181 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11183 (mourn_inferior): Define.
11184 (target_process_qsupported): Avoid the dangling else problem.
11185 (thread_stopped): Define.
11186 (pause_all): Define.
11187 (target_waitstatus_to_string): Declare.
11188 * target.c (target_waitstatus_to_string): New.
11190 * tracepoint.c (tracing): Make extern.
11191 (disconnected_tracing): New.
11192 (stop_tracing): Make extern. Handle tracing stops due to GDB
11194 (cmd_qtdisconnected): New.
11195 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11196 (handle_tracepoint_general_set): Handle QTDisconnected.
11198 * event-loop.c (event_handler_func): Change return type to int.
11199 (process_event): Bail out if the event handler wants the event
11201 (handle_file_event): Ditto.
11202 (start_event_loop): Bail out if the event handler wants the event
11205 * nto-low.c (nto_target_ops): Adjust.
11206 * spu-low.c (spu_wait): Don't remove the process here.
11207 (spu_target_ops): Adjust.
11208 * win32-low.c (win32_wait): Don't remove the process here.
11209 (win32_target_ops): Adjust.
11211 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11213 * regcache.c (realloc_register_cache): Invalidate inferior's
11214 regcache before recreating it.
11216 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11218 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11220 2010-04-09 Stan Shebs <stan@codesourcery.com>
11221 Pedro Alves <pedro@codesourcery.com>
11223 * server.h (LONGEST): New.
11224 (struct thread_info) <while_stepping>: New field.
11225 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11227 (initialize_tracepoint, handle_tracepoint_general_set)
11228 (handle_tracepoint_query, tracepoint_finished_step)
11229 (tracepoint_was_hit, release_while_stepping_state_list):
11230 (current_traceframe): Declare.
11231 * server.c (handle_general_set): Handle tracepoint packets.
11232 (read_memory): New.
11233 (write_memory): New.
11234 (handle_search_memory_1): Use read_memory.
11235 (handle_query): Report support for conditional tracepoints, trace
11236 state variables, and tracepoint sources. Handle tracepoint
11238 (main): Initialize the tracepoints module.
11239 (process_serial_event): Handle traceframe reads/writes.
11241 * linux-low.c (handle_tracepoints): New.
11242 (linux_wait_1): Call it.
11243 (linux_resume_one_lwp): Handle while-stepping.
11244 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11245 (linux_target_ops): Install them.
11246 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11248 * linux-x86-low.c (x86_supports_tracepoints): New.
11249 (the_low_target). Install it.
11251 * mem-break.h (delete_breakpoint): Declare.
11252 * mem-break.c (delete_breakpoint): Make external.
11254 * target.h (struct target_ops): Add `supports_tracepoints',
11255 `read_pc', and `write_pc' fields.
11256 (target_supports_tracepoints): Define.
11257 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11260 * regcache.h (struct regcache) <registers_owned>: New field.
11261 (init_register_cache, regcache_cpy): Declare.
11262 (regcache_read_pc, regcache_write_pc): Declare.
11263 (register_cache_size): Declare.
11264 (supply_regblock): Declare.
11265 * regcache.c (init_register_cache): New.
11266 (new_register_cache): Use it.
11267 (regcache_cpy): New.
11268 (register_cache_size): New.
11269 (supply_regblock): New.
11270 (regcache_read_pc, regcache_write_pc): New.
11272 * tracepoint.c: New.
11274 * Makefile.in (OBS): Add tracepoint.o.
11275 (tracepoint.o): New rule.
11277 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11279 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11281 (i386-mmx.c): Likewise.
11282 (i386-mmx-linux.o): Likewise.
11283 (i386-mmx-linux.c): Likewise.
11285 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11286 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11287 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11288 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11290 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11291 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11292 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11294 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11296 * Makefile.in (clean): Updated.
11298 (i386-avx.c): Likewise.
11299 (i386-avx-linux.o): Likewise.
11300 (i386-avx-linux.c): Likewise.
11301 (amd64-avx.o): Likewise.
11302 (amd64-avx.c): Likewise.
11303 (amd64-avx-linux.o): Likewise.
11304 (amd64-avx-linux.c): Likewise.
11306 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11307 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11308 (srv_amd64_regobj): Add amd64-avx.o.
11309 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11310 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11311 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11312 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11313 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11314 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11315 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11317 * i387-fp.c: Include "i386-xstate.h".
11319 (i387_cache_to_xsave): Likewise.
11320 (i387_xsave_to_cache): Likewise.
11321 (x86_xcr0): Likewise.
11323 * i387-fp.h (i387_cache_to_xsave): Likewise.
11324 (i387_xsave_to_cache): Likewise.
11325 (x86_xcr0): Likewise.
11327 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11328 * linux-crisv32-low.c (target_regsets): Likewise.
11329 * linux-m68k-low.c (target_regsets): Likewise.
11330 * linux-mips-low.c (target_regsets): Likewise.
11331 * linux-ppc-low.c (target_regsets): Likewise.
11332 * linux-s390-low.c (target_regsets): Likewise.
11333 * linux-sh-low.c (target_regsets): Likewise.
11334 * linux-sparc-low.c (target_regsets): Likewise.
11335 * linux-xtensa-low.c (target_regsets): Likewise.
11337 * linux-low.c: Include <sys/uio.h>.
11338 (regsets_fetch_inferior_registers): Support nt_type.
11339 (regsets_store_inferior_registers): Likewise.
11340 (linux_process_qsupported): New.
11341 (linux_target_ops): Add linux_process_qsupported.
11343 * linux-low.h (regset_info): Add nt_type.
11344 (linux_target_ops): Add process_qsupported.
11346 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11348 (init_registers_i386_avx_linux): New.
11349 (init_registers_amd64_avx_linux): Likewise.
11350 (xmltarget_i386_linux_no_xml): Likewise.
11351 (xmltarget_amd64_linux_no_xml): Likewise.
11352 (PTRACE_GETREGSET): Likewise.
11353 (PTRACE_SETREGSET): Likewise.
11354 (x86_fill_xstateregset): Likewise.
11355 (x86_store_xstateregset): Likewise.
11356 (use_xml): Likewise.
11357 (x86_linux_update_xmltarget): Likewise.
11358 (x86_linux_process_qsupported): Likewise.
11359 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11360 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11361 init_registers_i386_linux here. Call
11362 x86_linux_update_xmltarget.
11363 (the_low_target): Add x86_linux_process_qsupported.
11365 * server.c (handle_query): Call target_process_qsupported.
11367 * target.h (target_ops): Add process_qsupported.
11368 (target_process_qsupported): New.
11370 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11372 * inferiors.c (add_thread): Set last_status kind to
11373 TARGET_WAITKIND_IGNORE.
11374 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11375 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11376 (linux_wait_1): Move `thread' local definition to block that uses
11377 it. Don't NULL initialize `event_child'.
11378 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11379 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11380 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11382 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11384 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11385 an extended waitstatus, or by a watchpoint.
11386 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11387 thread was stepping or has been stopped by a watchpoint.
11389 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11391 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11392 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11393 of another, then delete the previous, and validate all
11395 (validate_inserted_breakpoint): New.
11396 (delete_disabled_breakpoints): New.
11397 (validate_breakpoints): New.
11398 (check_mem_read): Validate breakpoints before trusting their
11399 shadow. Delete disabled breakpoints.
11400 (check_mem_write): Validate breakpoints before trusting they
11401 should be inserted. Delete disabled breakpoints.
11402 * mem-break.h (validate_breakpoints):
11403 * server.c (handle_query): Validate breakpoints when we see a
11406 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11408 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11409 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11410 if we could tell there's a GDB breakpoint at stop_pc.
11411 (need_step_over_p): Don't do a step over if we find a GDB
11412 breakpoint at the resume PC.
11414 * mem-break.c (struct raw_breakpoint): New.
11415 (enum bkpt_type): New type `gdb_breakpoint'.
11416 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11417 fields. New field `raw'.
11418 (find_raw_breakpoint_at): New.
11419 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11420 breakpoint instead.
11421 (set_breakpoint_at): Adjust.
11422 (delete_raw_breakpoint): New.
11423 (release_breakpoint): New.
11424 (delete_breakpoint): Rename to...
11425 (delete_breakpoint_1): ... this. Add proc parameter. Use
11426 release_breakpoint. Return ENOENT.
11427 (delete_breakpoint): Reimplement.
11428 (find_breakpoint_at): Delete.
11429 (find_gdb_breakpoint_at): New.
11430 (delete_breakpoint_at): Delete.
11431 (set_gdb_breakpoint_at): New.
11432 (delete_gdb_breakpoint_at): New.
11433 (gdb_breakpoint_here): New.
11434 (set_reinsert_breakpoint): Use release_breakpoint.
11435 (uninsert_breakpoint): Rename to ...
11436 (uninsert_raw_breakpoint): ... this.
11437 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11438 (reinsert_raw_breakpoint): Change parameter type to
11440 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11442 (check_breakpoints): Adjust. Use release_breakpoint.
11443 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11444 (breakpoint_inserted_here): Ditto.
11445 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11446 Don't trust the breakpoint's shadow if it is not inserted.
11447 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11448 (delete_all_breakpoints): Adjust.
11449 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11450 use delete_breakpoint_1.
11452 * mem-break.h (breakpoints_supported): Delete declaration.
11453 (set_gdb_breakpoint_at): Declare.
11454 (gdb_breakpoint_here): Declare.
11455 (delete_breakpoint_at): Delete.
11456 (delete_gdb_breakpoint_at): Declare.
11458 * server.h (struct raw_breakpoint): Forward declare.
11459 (struct process_info): New field `raw_breakpoints'.
11461 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11464 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11466 * linux-low.c (status_pending_p_callback): Fix comment.
11467 (linux_wait_for_event_1): Move most of the internal breakpoint
11468 handling from here...
11469 (linux_wait_1): ... to here.
11470 (count_events_callback): New.
11471 (select_singlestep_lwp_callback): New.
11472 (select_event_lwp_callback): New.
11473 (cancel_breakpoints_callback): New.
11474 (select_event_lwp): New.
11475 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11476 priority to all LWPs that have had events that should be reported
11477 to the client. Cancel breakpoints when about to reporting the
11478 event to the client, not while stopping lwps. No longer cancel
11479 finished single-steps here.
11480 (cancel_finished_single_step): Delete.
11481 (cancel_finished_single_steps): Delete.
11483 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11485 * mem-break.c (enum bkpt_type): New.
11486 (struct breakpoint): New field `type'.
11487 (set_breakpoint_at): Change return type to struct breakpoint
11488 pointer. Set type to `other_breakpoint' by default.
11489 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11490 in the breakpoint list.
11491 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11492 (reinsert_breakpoint): Rename to ...
11493 (reinsert_raw_breakpoint): ... this.
11494 (reinsert_breakpoints_at): Adjust.
11495 * mem-break.h (struct breakpoint): Declare.
11496 (set_breakpoint_at): Change return type to struct breakpoint
11499 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11501 * server.c (handle_query): Assign, not compare.
11503 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11505 Teach linux gdbserver to step-over-breakpoints.
11507 * linux-low.c (can_hardware_single_step): New.
11508 (supports_breakpoints): New.
11509 (handle_extended_wait): If stopping threads, read the stop pc of
11510 the new cloned LWP.
11512 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11513 low target doesn't support retrieving the PC.
11514 (add_lwp): Set last_resume_kind to resume_continue.
11515 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11516 (linux_attach): Don't clear stop_expected. Set the lwp's
11517 last_resume_kind to resume_stop.
11518 (linux_detach_one_lwp): Don't check for removed breakpoints.
11519 (check_removed_breakpoint): Delete.
11520 (status_pending_p): Rename to ...
11521 (status_pending_p_callback): ... this. Don't check for removed
11522 breakpoints. Don't consider threads that are stopped from GDB's
11524 (linux_wait_for_lwp): Always read the stop_pc here.
11525 (cancel_breakpoint): New.
11526 (step_over_bkpt): New global.
11527 (linux_wait_for_event_1): Implement stepping over breakpoints.
11528 (gdb_wants_lwp_stopped): New.
11529 (gdb_wants_all_stopped): New.
11530 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11531 single-step traps here. Store the thread's last reported target
11533 (send_sigstop): Don't clear stop_expected. Always set it,
11535 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11536 (cancel_finished_single_step): New.
11537 (cancel_finished_single_steps): New.
11538 (wait_for_sigstop): Don't cancel finished single-step traps here.
11539 (linux_resume_one_lwp): Don't check for removed breakpoints.
11540 Don't set `step' on non-hardware step archs.
11541 (linux_set_resume_request): Ignore resume_stop requests if already
11542 stopping or stopped. Set the lwp's last_resume_kind.
11543 (resume_status_pending_p): Don't check for removed breakpoints.
11544 (need_step_over_p): New.
11545 (start_step_over): New.
11546 (finish_step_over): New.
11547 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11548 requests. Clear the thread's last reported target waitstatus.
11549 Don't use the `suspended' flag. Don't consider pending breakpoints.
11550 (linux_resume): Start a step-over if necessary.
11551 (proceed_one_lwp): New.
11552 (proceed_all_lwps): New.
11553 (unstop_all_lwps): New.
11554 * linux-low.h (struct lwp_info): Rewrite comment for the
11555 `suspended' flag. Add the `stop_pc' field. Delete the
11556 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11557 Add `'last_resume_kind' and `need_step_over' fields.
11558 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11559 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11560 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11561 (set_raw_breakpoint_at): New.
11562 (set_breakpoint_at): Rewrite to use it.
11563 (reinsert_breakpoint_handler): Delete.
11564 (set_reinsert_breakpoint): New.
11565 (reinsert_breakpoint_by_bp): Delete.
11566 (delete_reinsert_breakpoints): New.
11567 (uninsert_breakpoint): Rewrite.
11568 (uninsert_breakpoints_at): New.
11569 (reinsert_breakpoint): Rewrite.
11570 (reinsert_breakpoints_at): New.
11571 (check_breakpoints): Rewrite.
11572 (breakpoint_here): New.
11573 (breakpoint_inserted_here): New.
11574 (check_mem_read): Adjust.
11575 * mem-break.h (breakpoints_supported, breakpoint_here)
11576 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11577 (reinsert_breakpoint_by_bp): Delete declaration.
11578 (delete_reinsert_breakpoints): Declare.
11579 (reinsert_breakpoint): Delete declaration.
11580 (reinsert_breakpoints_at): Declare.
11581 (uninsert_breakpoint): Delete declaration.
11582 (uninsert_breakpoints_at): Declare.
11583 (check_breakpoints): Adjust prototype.
11584 * server.h: Adjust include order.
11585 (struct thread_info): Declare here. Add a `last_status' field.
11587 2010-03-23 Michael Snyder <msnyder@vmware.com>
11589 * server.c (crc32): New function.
11590 (handle_query): Add handling for 'qCRC:' request.
11592 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11594 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11595 lwp had been stopped by a watchpoint.
11597 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11599 * server.h (internal_error): Declare.
11600 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11601 * utils.c (internal_error): New function.
11603 2010-03-15 Andreas Schwab <schwab@redhat.com>
11605 * configure.srv: Fix typo setting srv_regobj.
11607 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11609 * linux-low.c (fetch_register): Avoid passing a non string literal
11611 (usr_store_inferior_registers): Ditto.
11613 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11615 * linux-low.c (linux_write_memory): Bail out early if peeking
11618 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11620 * linux-low.h (struct lwp_info): New fields
11621 `stopped_by_watchpoint' and `stopped_data_address'.
11622 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11623 here, and cache them in the lwp object.
11624 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11626 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11628 (linux_stopped_by_watchpoint): Rewrite.
11629 (linux_stopped_data_address): Rewrite.
11631 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11633 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11634 switching the current inferior, not before.
11636 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11638 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11639 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11640 i386-linux.c and amd64-linux.c.
11641 (reg-i386.o): Removed.
11642 (reg-i386.c): Likewise.
11643 (reg-i386-linux.o): Likewise.
11644 (reg-i386-linux.c): Likewise.
11645 (reg-x86-64.o): Likewise.
11646 (reg-x86-64.c): Likewise.
11647 (reg-x86-64-linux.o): Likewise.
11648 (reg-x86-64-linux.c): Likewise.
11650 (i386.c): Likewise.
11651 (i386-linux.o): Likewise.
11652 (i386-linux.c): Likewise.
11653 (amd64.o): Likewise.
11654 (amd64.c): Likewise.
11655 (amd64-linux.o): Likewise.
11656 (amd64-linux.c): Likewise.
11658 * configure.srv (srv_i386_regobj): New.
11659 (srv_i386_linux_regobj): Likewise.
11660 (srv_amd64_regobj): Likewise.
11661 (srv_amd64_linux_regobj): Likewise.
11662 (srv_i386_32bit_xmlfiles): Likewise.
11663 (srv_i386_64bit_xmlfiles): Likewise.
11664 (srv_i386_xmlfiles): Likewise.
11665 (srv_amd64_xmlfiles): Likewise.
11666 (srv_i386_linux_xmlfiles): Likewise.
11667 (srv_amd64_linux_xmlfiles): Likewise.
11668 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11669 srv_xmlfiles to $srv_i386_xmlfiles.
11670 (i[34567]86-*-mingw32ce*): Likewise.
11671 (i[34567]86-*-mingw*): Likewise.
11672 (i[34567]86-*-nto*): Likewise.
11673 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11674 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11675 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11676 (x86_64-*-linux*): Likewise.
11678 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11679 (init_registers_amd64_linux): New.
11680 (x86_arch_setup): Replace init_registers_x86_64_linux with
11681 init_registers_amd64_linux.
11683 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11685 * configure.ac: Check for libdl. If it is not available link against
11686 static libthread_db.
11687 * configure: Regenerate.
11689 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11693 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11694 handing a read watchpoint.
11695 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11697 2010-02-12 Doug Evans <dje@google.com>
11699 * linux-low.c (linux_supports_tracefork_flag): Document.
11700 (linux_look_up_symbols): Add comment.
11702 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11704 * regcache.c (supply_register): Clear regcache if buf is NULL.
11706 2010-02-02 Nicolas Roche <roche@sourceware.org>
11707 Joel Brobecker <brobecker@adacore.com>
11709 * inferiors.c (find_inferior): Add function documentation.
11710 (unloaded_dll): Handle the case where the unloaded dll has not
11711 been previously registered in the dll list.
11713 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11715 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11716 (thumb2_breakpoint): New.
11717 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11719 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11721 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11722 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11725 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11727 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11729 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11731 * linux-s390-low.c (s390_collect_ptrace_register)
11732 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11734 2010-01-21 Doug Evans <dje@google.com>
11736 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11737 (PTRACE_ARG4_TYPE): New macro.
11738 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11739 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11740 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11741 (usr_store_inferior_registers): Ditto.
11742 (linux_read_memory, linux_write_memory): Ditto.
11743 (linux_test_for_tracefork): Ditto.
11745 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11746 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11748 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11750 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11753 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11755 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11756 prototype to take a regcache. Adjust.
11758 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11760 * regcache.h (struct thread_info): Forward declare.
11761 (struct regcache): New.
11762 (new_register_cache): Adjust prototype.
11763 (get_thread_regcache): Declare.
11764 (free_register_cache): Adjust prototype.
11765 (registers_to_string, registers_from_string): Ditto.
11766 (supply_register, supply_register_by_name, collect_register)
11767 (collect_register_as_string, collect_register_by_name): Ditto.
11768 * regcache.c (struct inferior_regcache_data): Delete.
11769 (get_regcache): Rename to ...
11770 (get_thread_regcache): ... this. Adjust. Switch inferior before
11771 fetching registers.
11772 (regcache_invalidate_one): Adjust.
11773 (regcache_invalidate): Fix prototype.
11774 (new_register_cache): Return the new register cache.
11775 (free_register_cache): Change prototype.
11776 (realloc_register_cache): Adjust.
11777 (registers_to_string): Change prototype to take a regcache. Adjust.
11778 (registers_from_string): Ditto.
11779 (register_data): Ditto.
11780 (supply_register): Ditto.
11781 (supply_register_by_name): Ditto.
11782 (collect_register): Ditto.
11783 (collect_register_as_string): Ditto.
11784 (collect_register_by_name): Ditto.
11785 * server.c (process_serial_event): Adjust.
11786 * linux-low.h (regset_fill_func, regset_store_func): Change
11788 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11790 * linux-low.c (get_stop_pc): Adjust.
11791 (check_removed_breakpoint): Adjust.
11792 (linux_wait_for_event): Adjust.
11793 (linux_resume_one_lwp): Adjust.
11794 (fetch_register): Add regcache parameter. Adjust.
11795 (usr_store_inferior_registers): Ditto.
11796 (regsets_fetch_inferior_registers): Ditto.
11797 (regsets_store_inferior_registers): Ditto.
11798 (linux_fetch_registers, linux_store_registers): Ditto.
11799 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11801 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11803 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11804 prototype to take a regcache.
11805 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11806 * remote-utils.c (convert_ascii_to_int, outreg)
11807 (prepare_resume_reply): Change prototype to take a regcache.
11809 * target.h (struct target_ops) <fetch_registers, store_registers>:
11810 Change prototype to take a regcache.
11811 (fetch_inferior_registers, store_inferior_registers): Change
11812 prototype to take a regcache. Adjust.
11813 * proc-service.c (ps_lgetregs): Adjust.
11814 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11815 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11816 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11817 take a regcache. Adjust.
11818 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11819 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11820 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11821 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11822 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11823 (cris_cannot_fetch_register):
11824 (cris_breakpoint_at): Change prototype to take a regcache.
11826 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11827 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11828 to take a regcache. Adjust.
11829 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11831 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11832 take a regcache. Adjust.
11833 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11834 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11835 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11836 * linux-mips-low.c (mips_get_pc):
11837 (mips_set_pc): Change prototype to take a regcache. Adjust.
11838 (mips_reinsert_addr): Adjust.
11839 (mips_collect_register): Change prototype to take a regcache.
11841 (mips_supply_register):
11842 (mips_collect_register_32bit, mips_supply_register_32bit)
11843 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11844 (mips_store_fpregset): Ditto.
11845 * linux-ppc-low.c (ppc_supply_ptrace_register)
11846 (ppc_supply_ptrace_register): Ditto.
11847 (parse_spufs_run): Adjust.
11848 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11849 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11850 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11851 take a regcache. Adjust.
11852 * linux-s390-low.c (s390_collect_ptrace_register)
11853 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11854 (s390_set_pc): Change prototype to take a regcache. Adjust.
11855 (s390_arch_setup): Adjust.
11856 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11857 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11858 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11859 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11860 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11862 (sparc_breakpoint_at): Adjust.
11863 * linux-xtensa-low.c (xtensa_fill_gregset):
11864 (xtensa_store_gregset):
11865 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11866 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11867 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11868 prototype to take a regcache. Adjust.
11869 * win32-arm-low.c (arm_fetch_inferior_register)
11870 (arm_store_inferior_register): Change prototype to take a
11872 * win32-i386-low.c (i386_fetch_inferior_register)
11873 (i386_store_inferior_register): Change prototype to take a
11875 * win32-low.c (child_fetch_inferior_registers)
11876 (child_store_inferior_registers): Change prototype to take a
11878 (win32_wait): Adjust.
11879 (win32_fetch_inferior_registers): Change prototype to take a
11881 (win32_store_inferior_registers): Adjust.
11882 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11883 store_inferior_register>: Change prototype to take a regcache.
11885 2010-01-20 Doug Evans <dje@google.com>
11887 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11889 (linux_wait_for_event1, linux_init_signals): Ditto.
11890 (W_STOPCODE): Provide definition if missing.
11892 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11894 * linux-low.c (linux_core_of_thread): New.
11895 (compare_ints, show_process, list_threads): New.
11896 (linux_qxfer_osdata): Report threads and cores.
11897 (linux_target_op): Register linux_core_of_thread.
11898 * remote-utils.c (prepare_resume_reply): Report the core.
11899 (buffer_xml_printf): Support %d specifier.
11900 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11902 (handle_query): Handle qXfer:threads. Announce availability
11904 * target.h (struct target_ops): New field core_of_thread.
11906 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11908 * Makefile.in (clean): Remove new generated files.
11909 (reg-s390.o, reg-s390.c): Remove rules.
11910 (reg-s390x.o, reg-s390x.c): Likewise.
11911 (s390-linux32.o, s390-linux32.c): Add rules.
11912 (s390-linux64.o, s390-linux64.c): Likewise.
11913 (s390x-linux64.o, s390x-linux64.c): Likewise.
11914 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11915 * linux-s390-low.c: Include <elf.h>.
11916 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11917 (init_registers_s390): Remove prototype.
11918 (init_registers_s390x): Likewise.
11919 (init_registers_s390_linux32): Add prototype.
11920 (init_registers_s390_linux64): Likewise.
11921 (init_registers_s390x_linux64): Likewise.
11922 (s390_num_regs_3264): New define.
11923 (s390_regmap_3264): New global variable.
11924 (s390_cannot_fetch_register): Remove obsolete check.
11925 (s390_cannot_store_register): Likewise.
11926 (s390_collect_ptrace_register): Handle upper/lower register halves.
11927 (s390_supply_ptrace_register): Likewise.
11928 (s390_fill_gregset): Update to register number changes.
11929 (s390_get_hwcap): New routine.
11930 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11931 Install appropriate regmap and register set.
11933 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11935 * server.c (gdbserver_version): Update copyright year to 2010.
11936 * gdbreplay.c (gdbreplay_version): Likewise.
11938 2009-12-28 Doug Evans <dje@google.com>
11940 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11941 elf/external.h. Include <elf.h> instead but only if necessary.
11943 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11945 * linux-low.c (linux_remove_process): Remove `detaching'
11946 parameter. Don't release/detach from thread_db here.
11947 (linux_kill): Release/detach from thread_db here, ...
11948 (linux_detach): ... and here, before actually detaching.
11949 (linux_wait_1): ... and here, when a process exits.
11950 * thread-db.c (any_thread_of): New.
11951 (thread_db_free): Switch the current inferior to a thread of the
11954 2009-12-21 Doug Evans <dje@google.com>
11956 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11958 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11959 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11960 warning ifndef __NR_tkill. Move setting of errno there too.
11961 Delete unnecessary resetting of errno after syscall.
11962 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11964 * configure.ac: Check for dladdr.
11965 * config.in: Regenerate.
11966 * configure: Regenerate.
11967 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11968 (try_thread_db_load): Update.
11970 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11972 2009-12-18 Doug Evans <dje@google.com>
11974 * event-loop.c: Include unistd.h if it exists.
11976 * linux-low.c (my_waitpid): Move definition away from being in
11977 between linux_tracefork_child/linux_test_for_tracefork.
11979 * gdb_proc_service.h (psaddr_t): Fix type.
11980 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11981 signature to match glibc.
11983 2009-12-16 Doug Evans <dje@google.com>
11985 * linux-low.c (linux_read_memory): Fix argument to read.
11987 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11989 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11990 events, don't leave current_inferior pointing at null.
11992 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11994 * win32-low.c (LOG): Delete.
11995 (OUTMSG): Output to stderr.
11996 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11997 on compile time LOG macro.
11998 (win32_wait): Fix debug output.
12000 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12002 * win32-low.c (win32_add_one_solib): If the dll name is
12003 "ntdll.dll", prepend the system directory to the dll path.
12005 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12007 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12009 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12010 Vladimir Prus <vladimir@codesourcery.com>
12012 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12013 * configure.ac: Check for __mcoldfire__ and set
12014 gdb_cv_m68k_is_coldfire.
12015 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12016 reg-cf.o and reg-m68k.o.
12017 * configure: Regenerated.
12019 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12021 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12022 Pass it to thread_db_free.
12023 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12024 proper `detaching' argument to linux_remove_process.
12025 * linux-low.h (thread_db_free): Add `detaching' parameter.
12026 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12028 (thread_db_free): Add `detaching' parameter. Only
12029 call td_ta_clear_event if detaching from process.
12031 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12033 * thread-db.c (thread_db_free): Fix typo.
12035 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12038 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12040 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12042 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12043 with an i686 compiler.
12044 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12046 * configure: Rebuilt.
12048 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12052 * server.c (handle_search_memory_1): Correct read_addr initialization
12053 in loop for searching subsequent chunks.
12055 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12057 * configure.ac: New --with-libthread-db option.
12058 * thread-db.c: Allow direct dependence on libthread_db.
12059 (thread_db_free): Adjust.
12060 * config.in: Regenerate.
12061 * configure: Likewise.
12063 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12066 * thread-db.c (attach_thread): New function.
12067 (maybe_attach_thread): Return success/failure.
12068 (find_new_threads_callback): Adjust.
12069 (thread_db_find_new_threads): Loop until no new threads.
12071 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12073 * proc-service.c (ps_lgetregs): Formatting.
12075 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12077 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12078 * configure.ac: Adjust.
12079 * linux-low.h (struct process_info_private): Move members to struct
12081 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12082 * linux-low.c (linux_remove_process): Adjust.
12083 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12084 * server.c (handle_query): Move code ...
12085 (handle_monitor_command): ... here. New function.
12086 * target.h (struct target_ops): New member.
12087 * thread-db.c (struct thread_db): New.
12088 (libthread_db_search_path): New variable.
12089 (thread_db_create_event, thread_db_enable_reporting)
12090 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12091 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12092 (try_thread_db_load_1, dladdr_to_soname): New functions.
12093 (try_thread_db_load, thread_db_load_search): New functions.
12094 (thread_db_init): Search for libthread_db.
12095 (thread_db_free): New function.
12096 (thread_db_handle_monitor_command): Likewise.
12097 * config.in: Regenerate.
12098 * configure: Regenerate.
12100 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12102 * spu-low.c (spu_kill): Wait for inferior to terminate.
12103 Call clear_inferiors.
12104 (spu_detach): Call clear_inferiors.
12106 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12108 * aclocal.m4: Regenerate.
12109 * config.in: Likewise.
12110 * configure: Likewise.
12112 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12114 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12115 (parse_spufs_run): New function.
12116 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12117 (ppc_breakpoint_at): Handle SPU breakpoints.
12119 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12121 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12122 (SPUFS_MAGIC): Define.
12123 (spu_enumerate_spu_ids): New function.
12124 (linux_qxfer_spu): New function.
12125 (linux_target_ops): Install linux_qxfer_spu.
12127 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12129 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12130 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12131 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12132 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12133 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12134 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12135 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12136 (init_registers_powerpc_cell32l): Add prototype.
12137 (init_registers_powerpc_cell64l): Likewise.
12138 (ppc_arch_setup): Detect Cell/B.E. architecture.
12140 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12142 * Makefile.in (datarootdir): New variable.
12144 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12146 * linux-low.c (linux_write_memory): Update debugging output.
12147 * Makefile.in (clean): Add new descriptions.
12148 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12149 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12150 * configure.srv: Add new files for arm*-*-linux*.
12151 * linux-arm-low.c: Add new declarations.
12152 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12153 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12154 (HWCAP_VFPv3D16): New.
12155 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12156 instead of __IWMMXT__.
12157 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12158 (arm_arch_setup): New.
12159 (target_regsets): Remove #ifdef. Add VFP regset.
12160 (the_low_target): Use arm_arch_setup.
12162 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12164 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12165 the main thread again.
12167 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12169 Adding Neutrino gdbserver.
12170 * configure: Regenerated.
12171 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12172 * configure.srv (i[34567]86-*-nto*): New target.
12173 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12174 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12175 (nto_comctrl) [__QNX__]: New function.
12176 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12178 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12180 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12183 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12184 Pedro Alves <pedro@codesourcery.com>
12186 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12187 don't support CONTEXT_EXTENDED_REGISTERS.
12188 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12189 (the_low_target): Install them.
12190 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12191 failing with ERROR_PIPE_NOT_CONNECTED.
12193 2009-06-30 Doug Evans <dje@google.com>
12194 Pierre Muller <muller@ics.u-strasbg.fr>
12196 Add h/w watchpoint support to x86-linux, win32-i386.
12197 * Makefile.in (SFILES): Add i386-low.c
12198 (i386_low_h): Define.
12199 (i386-low.o): Add dependencies.
12200 (linux-x86-low.o): Add i386-low.h dependency.
12201 (win32-i386-low.o): Ditto.
12202 * i386-low.c: New file.
12203 * i386-low.h: New file.
12204 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12205 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12206 * linux-low.c (linux_add_process): Initialize arch_private.
12207 (linux_remove_process): Free arch_private.
12208 (add_lwp): Initialize arch_private.
12209 (delete_lwp): Free arch_private.
12210 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12212 * linux-low.h (process_info_private): New member arch_private.
12213 (lwp_info): New member arch_private.
12214 (linux_target_ops): New members new_process, new_thread,
12216 (ptid_of): New macro.
12217 * linux-x86-low.c: Include stddef.h, i386-low.h.
12218 (arch_process_info): New struct.
12219 (arch_lwp_info): New struct.
12220 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12221 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12222 (i386_dr_low_get_status): New function.
12223 (x86_insert_point, x86_remove_point): New functions.
12224 (x86_stopped_by_watchpoint): New function.
12225 (x86_stopped_data_address): New function.
12226 (x86_linux_new_process, x86_linux_new_thread): New functions.
12227 (x86_linux_prepare_to_resume): New function.
12228 (the_low_target): Add entries for insert_point, remove_point,
12229 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12231 * server.c (debug_hw_points): New global.
12232 (monitor_show_help): Document set debug-hw-points.
12233 (handle_query): Process "set debug-hw-points".
12234 * server.h (debug_hw_points): Declare.
12235 (paddress): Declare.
12236 * utils.c (NUMCELLS, CELLSIZE): New macros.
12237 (get_sell, xsnprintf, paddress): New functions.
12238 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12239 remove_point, stopped_by_watchpoint, stopped_data_address.
12240 * win32-i386-low.c: Include i386-low.h.
12241 (debug_reg_state): Replaces dr.
12242 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12243 (i386_dr_low_get_status): New function.
12244 (i386_insert_point, i386_remove_point): New functions.
12245 (i386_stopped_by_watchpoint): New function.
12246 (i386_stopped_data_address): New function.
12247 (i386_initial_stuff): Update.
12248 (get_thread_context,set_thread_context,i386_thread_added): Update.
12249 (the_low_target): Add entries for insert_point,
12250 remove_point, stopped_by_watchpoint, stopped_data_address.
12251 * win32-low.c (win32_insert_watchpoint): New function.
12252 (win32_remove_watchpoint): New function.
12253 (win32_stopped_by_watchpoint): New function.
12254 (win32_stopped_data_address): New function.
12255 (win32_target_ops): Add entries for insert_watchpoint,
12256 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12257 * win32-low.h (win32_target_ops): New members insert_point,
12258 remove_point, stopped_by_watchpoint, stopped_data_address.
12260 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12262 * server.c (process_serial_event): Re-return unsupported, not
12263 error, if the type isn't recognized. Re-allow supporting only
12264 insert or remove packets. Also call require_running for
12265 breakpoints. Add missing break statement to default case. Tidy.
12266 * target.h (struct target_ops): Rename insert_watchpoint to
12267 insert_point, and remove_watchpoint to remove_point.
12269 * linux-low.h (struct linux_target_ops): Likewise.
12270 * linux-low.c (linux_insert_watchpoint): Rename to ...
12271 (linux_insert_point): ... this. Adjust.
12272 (linux_remove_watchpoint): Rename to ...
12273 (linux_remove_point): ... this. Adjust.
12274 (linux_target_ops): Adjust.
12275 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12276 (cris_insert_point): ... this.
12277 (cris_remove_watchpoint): Rename to ...
12278 (cris_remove_point): ... this.
12279 (the_low_target): Adjust.
12281 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12283 * server.c (handle_v_kill): Pass signal_pid to
12284 kill_inferior if multi_process is zero.
12286 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12288 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12289 * target.h (target_ops): Comment for *_watchpoint to make it clear
12290 the functions can get types '0' and '1'.
12292 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12294 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12295 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12296 * regcache.c (get_regcache): Likewise.
12297 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12298 * win32-low.c (child_fetch_inferior_registers): Remove check for
12301 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12302 Pedro Alves <pedro@codesourcery.com>
12304 * target.h (struct target_ops) <supports_multi_process>: New
12306 (target_supports_multi_process): New.
12307 * server.c (handle_query): Even if GDB reports support, only
12308 enable multi-process if the target also supports it. Report
12309 multi-process support only if the target backend supports it.
12310 * linux-low.c (linux_supports_multi_process): New function.
12311 (linux_target_ops): Install it as target_supports_multi_process
12314 2009-05-24 Doug Evans <dje@google.com>
12316 Global renaming of find_thread_pid to find_thread_ptid.
12317 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12318 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12319 All callers updated.
12321 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12322 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12325 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12326 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12327 (linux_resume_one_lwp): Ditto.
12329 2009-05-23 Doug Evans <dje@google.com>
12331 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12332 from struct inferior_list_entry * to struct lwp_info *.
12333 All callers updated.
12335 2009-05-13 Doug Evans <dje@google.com>
12337 * linux-x86-low.c: Don't include assert.h.
12338 (x86_siginfo_fixup): Use fatal, not assert.
12339 (x86_arch_setup): Fix comment.
12341 2009-05-12 Doug Evans <dje@google.com>
12343 Biarch support for i386/amd64 gdbserver.
12344 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12345 Add linux-x86-low.c.
12346 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12347 (linux-x86-low.o): Add.
12348 * linux-x86-64-low.c: Delete.
12349 * linux-i386-low.c: Delete.
12350 * linux-x86-low.c: New file.
12351 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12353 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12355 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12356 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12357 (linux_child_pid_to_exec_file): New function.
12358 (elf_64_header_p, elf_64_file_p): New functions.
12359 (siginfo_fixup): New function.
12360 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12361 give target a chance to convert layout.
12362 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12363 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12365 2009-05-07 Doug Evans <dje@google.com>
12367 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12368 (regsets_store_inferior_registers): Ditto.
12370 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12374 * linux-low.c (must_set_ptrace_flags): Delete.
12375 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12377 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12378 `lwp->must_set_ptrace_flags' instead.
12379 (linux_wait_for_event_1): Set ptrace options here.
12380 (linux_wait_1): ... not here.
12382 2009-04-30 Doug Evans <dje@google.com>
12384 * inferiors.c (started_inferior_callback): New function.
12385 (attached_inferior_callback): New function.
12386 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12387 * server.c (print_started_pid, print_attached_pid): New functions.
12388 (detach_or_kill_for_exit): New function.
12389 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12390 * server.h (have_started_inferiors_p): Declare.
12391 (have_attached_inferiors_p): Declare.
12393 * inferiors.c (remove_process): Fix memory leak, free process.
12394 * linux-low.c (linux_remove_process): New function.
12395 (linux_kill): Call it instead of remove_process.
12396 (linux_detach, linux_wait_1): Ditto.
12398 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12400 * configure.srv: Add x86 Windows CE target.
12402 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12404 * inferiors.c (get_thread_process): Make global.
12405 * server.h (get_thread_process): Add prototype.
12406 * thread-db.c (find_one_thread): Use get_thread_process
12407 instead of current_process.
12408 (thread_db_get_tls_address): Do not crash if called when
12409 thread layer is not yet initialized.
12411 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12413 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12414 * spu-low.c (current_tid): Rename to ...
12415 (current_ptid): ... this.
12416 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12417 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12418 ptid_get_lwp (current_ptid) instead of current_tid.
12419 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12420 instead of current_tid. Use find_process_pid to verify pid
12421 argument is valid. Pass proper argument to remove_process.
12422 (spu_thread_alive): Compare current_ptid instead of current_tid.
12423 (spu_resume): Likewise.
12425 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12427 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12430 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12432 Implement the multiprocess extensions, and add linux multiprocess
12435 * server.h (ULONGEST): Declare.
12436 (struct ptid, ptid_t): New.
12437 (minus_one_ptid, null_ptid): Declare.
12438 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12439 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12440 (struct inferior_list_entry): Change `id' type from unsigned from
12442 (struct sym_cache, struct breakpoint, struct
12443 process_info_private): Forward declare.
12444 (struct process_info): Declare.
12445 (current_process): Declare.
12446 (all_processes): Declare.
12447 (initialize_inferiors): Declare.
12448 (add_thread): Adjust to use ptid_t.
12449 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12450 (add_process, remove_process, find_thread_pid): Declare.
12451 (find_inferior_id): Adjust to use ptid_t.
12452 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12453 (multi_process): Declare.
12454 (push_event): Adjust to use ptid_t.
12455 (read_ptid, write_ptid): Declare.
12456 (prepare_resume_reply): Adjust to use ptid_t.
12457 (clear_symbol_cache): Declare.
12458 * inferiors.c (all_processes): New.
12459 (null_ptid, minus_one_ptid): New.
12460 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12461 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12462 (add_thread): Change unsigned long to ptid. Remove gdb_id
12464 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12465 (gdb_id_to_thread): Rename to ...
12466 (find_thread_pid): ... this. Change unsigned long to ptid.
12467 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12468 (loaded_dll, pull_pid_from_list): Adjust.
12469 (add_process, remove_process, find_process_pid)
12470 (get_thread_process, current_process, initialize_inferiors): New.
12471 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12472 (struct target_waitstatus) <related_pid>: Ditto.
12473 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12474 return type to int.
12475 (struct target_ops) <join>: Add `pid' argument.
12476 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12477 (struct target_ops) <wait>: Add `ptid' field. Change return type
12479 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12480 (mywait): Add `ptid' argument. Change return type to ptid_t.
12481 (target_pid_to_str): Declare.
12482 * target.c (set_desired_inferior): Adjust to use ptids.
12483 (mywait): Add new `ptid' argument. Adjust.
12484 (target_pid_to_str): New.
12485 * mem-break.h (free_all_breakpoints): Declare.
12486 * mem-break.c (breakpoints): Delelete.
12487 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12488 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12489 to use per-process breakpoint list.
12490 (free_all_breakpoints): New.
12491 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12492 (symbol_cache, all_symbols_looked_up): Delete.
12494 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12496 (prepare_resume_reply): Change ptid argument's type from unsigned
12497 long to ptid_t. Adjust. Implement W;process and X;process.
12498 (free_sym_cache, clear_symbol_cache): New.
12499 (look_up_one_symbol): Adjust to per-process symbol cache. *
12500 * server.c (cont_thread, general_thread, step_thread): Change type
12502 (attached): Delete.
12503 (multi_process): New.
12504 (last_ptid): Change type to ptid_t.
12505 (struct vstop_notif) <ptid>: Change type to ptid_t.
12506 (queue_stop_reply, push_event): Change `ptid' argument's type to
12508 (discard_queued_stop_replies): Add `pid' argument.
12509 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12510 changes. Don't reference the `attached' global.
12511 (attach_inferior): Adjust to mywait interface changes.
12512 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12513 features. Handle and report "multiprocess+". Handle
12515 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12517 (handle_v_kill): New.
12518 (handle_v_stopped): Adjust to use target_pid_to_str.
12519 (handle_v_requests): Allow multiple attaches and runs when
12520 multiprocess extensions are in effect. Handle "vKill".
12521 (myresume): Adjust to use ptids.
12522 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12523 (handle_status): Adjust to discard_queued_stop_replies interface
12525 (first_thread_of, kill_inferior_callback)
12526 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12527 (main): Call initialize_inferiors. Adjust to use ptids, killing
12528 and detaching from all inferiors. Handle multiprocess packet
12530 * linux-low.h: Include gdb_proc_service.h.
12531 (struct process_info_private): New.
12532 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12533 <lwpid_of>: Use ptid_get_lwp.
12534 (get_lwp_thread): Adjust.
12535 (struct lwp_info): Add `dead' member.
12536 (find_lwp_pid): Declare.
12537 * linux-low.c (thread_db_active): Delete.
12538 (new_inferior): Adjust comment.
12539 (inferior_pid): Delete.
12540 (linux_add_process): New.
12541 (handle_extended_wait): Adjust.
12542 (add_lwp): Change unsigned long to ptid.
12543 (linux_create_inferior): Add process to processes table. Adjust
12544 to use ptids. Don't set new_inferior here.
12545 (linux_attach_lwp): Rename to ...
12546 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12547 it. Adjust to use ptids.
12548 (linux_attach_lwp): New.
12549 (linux_attach): Add process to processes table. Don't set
12551 (struct counter): New.
12552 (second_thread_of_pid_p, last_thread_of_process_p): New.
12553 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12554 multiple processes.
12555 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12556 processes. Remove process from process table.
12557 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12558 to multiple processes.
12559 (any_thread_of): New.
12560 (linux_detach): Add `pid' argument, and handle it. Remove process
12561 from processes table.
12562 (linux_join): Add `pid' argument. Handle it.
12563 (linux_thread_alive): Change unsighed long argument to ptid_t.
12564 Consider dead lwps as not being alive.
12565 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12566 threads we're not interested in.
12567 (same_lwp, find_lwp_pid): New.
12568 (linux_wait_for_lwp): Change `pid' argument's type from int to
12570 (linux_wait_for_event): Rename to ...
12571 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12572 from int to ptid_t. Adjust.
12573 (linux_wait_for_event): New.
12574 (linux_wait_1): Add `ptid' argument. Change return type to
12575 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12576 that exit from the process table.
12577 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12579 (mark_lwp_dead): New.
12580 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12581 stopping all threads, mark its main lwp as dead.
12582 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12584 (fetch_register, usr_store_inferior_registers)
12585 (regsets_fetch_inferior_registers)
12586 (regsets_store_inferior_registers, linux_read_memory)
12587 (linux_write_memory): Inline `inferior_pid'.
12588 (linux_look_up_symbols): Adjust to use per-process
12589 `thread_db_active'.
12590 (linux_request_interrupt): Adjust to use ptids.
12591 (linux_read_auxv): Inline `inferior_pid'.
12592 (initialize_low): Don't reference thread_db_active.
12593 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12594 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12595 (ps_getpid): Return the pid of the current inferior.
12596 * thread-db.c (proc_handle, thread_agent): Delete.
12597 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12599 (find_one_thread): Change argument type to ptid_t. Adjust to
12601 (maybe_attach_thread): Adjust to per-process data and ptids.
12602 (thread_db_find_new_threads): Ditto.
12603 (thread_db_init): Ditto.
12604 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12605 processes table. Adjust to use ptids.
12606 (spu_kill, spu_detach): Adjust interface. Remove process from
12608 (spu_join, spu_thread_alive): Adjust interface.
12609 (spu_wait): Adjust interface. Remove process from processes
12610 table. Adjust to use ptids.
12611 * win32-low.c (current_inferior_tid): Delete.
12612 (current_inferior_ptid): New.
12613 (debug_event_ptid): New.
12614 (thread_rec): Take a ptid. Adjust.
12615 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12616 (child_delete_thread): Ditto.
12617 (do_initial_child_stuff): Add `attached' argument. Add process to
12619 (child_fetch_inferior_registers, child_store_inferior_registers):
12621 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12622 (win32_attach): Pass 1 to do_initial_child_stuff.
12623 (win32_kill): Adjust interface. Remove process from processes
12625 (win32_detach): Ditto.
12626 (win32_join): Adjust interface.
12627 (win32_thread_alive): Take a ptid.
12628 (win32_resume): Adjust to use ptids.
12629 (get_child_debug_event): Ditto.
12630 (win32_wait): Adjust interface. Remove exiting process from
12633 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12635 Non-stop mode support.
12637 * server.h (non_stop): Declare.
12638 (gdb_client_data, handler_func): Declare.
12639 (delete_file_handler, add_file_handler, start_event_loop):
12641 (handle_serial_event, handle_target_event, push_event)
12642 (putpkt_notif): Declare.
12643 * target.h (enum resume_kind): New.
12644 (struct thread_resume): Replace `step' field by `kind' field.
12645 (TARGET_WNOHANG): Define.
12646 (struct target_ops) <wait>: Add `options' argument.
12647 <supports_non_stop, async, start_non_stop>: New fields.
12648 (target_supports_non_stop, target_async): New.
12649 (start_non_stop): Declare.
12650 (mywait): Add `options' argument.
12651 * target.c (mywait): Add `options' argument. Print child exit
12652 notifications here.
12653 (start_non_stop): New.
12654 * server.c (non_stop, own_buf, mem_buf): New globals.
12655 (struct vstop_notif): New.
12656 (notif_queue): New global.
12657 (queue_stop_reply, push_event, discard_queued_stop_replies)
12658 (send_next_stop_reply): New.
12659 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12661 (attach_inferior): In non-stop mode, don't wait for the target
12663 (handle_general_set): Handle QNonStop.
12664 (handle_query): When handling qC, return the current general
12665 thread, instead of the first thread of the list.
12666 (handle_query): If the backend supports non-stop mode, include
12667 QNonStop+ in the qSupported query response.
12668 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12670 (handle_v_attach, handle_v_run): Handle non-stop mode.
12671 (handle_v_stopped): New.
12672 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12673 (myresume): Adjust to use resume_kind. Handle non-stop.
12674 (queue_stop_reply_callback): New.
12675 (handle_status): Handle non-stop mode.
12676 (main): Clear non_stop flag on reconnection. Use the event-loop.
12677 Refactor serial protocol handling from here ...
12678 (process_serial_event): ... to this new function. When GDB
12679 selects any thread, select one here. In non-stop mode, wait until
12680 GDB acks all pending events before exiting.
12681 (handle_serial_event, handle_target_event): New.
12682 * remote-utils.c (remote_open): Install remote_desc in the event
12684 (remote_close): Remove remote_desc from the event loop.
12685 (putpkt_binary): Rename to...
12686 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12687 (putpkt_binary): New as wrapper around putpkt_binary_1.
12688 (putpkt_notif): New.
12689 (prepare_resume_reply): In non-stop mode, don't change the
12691 * event-loop.c: New.
12692 * Makefile.in (OBJ): Add event-loop.o.
12693 (event-loop.o): New rule.
12695 * linux-low.h (pid_of): Moved here.
12697 (get_lwp_thread): Use lwpid_of.
12698 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12699 * linux-low.c (pid_of): Delete.
12700 (inferior_pid): Use lwpid_of.
12701 (linux_event_pipe): New.
12702 (target_is_async_p): New.
12704 (handle_extended_wait): Use lwpid_of.
12705 (add_lwp): Don't set lwpid field.
12706 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12707 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12708 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12709 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12710 first. Adjust to linux_wait_for_event interface changes. Use
12712 (linux_detach): Don't delete the main lwp here.
12713 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12714 (status_pending_p): Don't consider explicitly suspended lwps.
12715 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12716 pointer. Add OPTIONS argument. Change return type to int. Use
12717 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12718 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12719 pointer. Add status pointer argument. Return a pid instead of a
12720 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12721 changes. In non-stop mode, don't switch to a random thread.
12722 (linux_wait): Rename to...
12723 (linux_wait_1): ... this. Add target_options argument, and handle
12724 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12725 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12726 clean exit and signal exit code. Don't stop all threads in
12727 non-stop mode. In all-stop mode, only stop all threads when
12728 reporting a stop to GDB. Handle explicit thread stop requests.
12729 (async_file_flush, async_file_mark): New.
12731 (send_sigstop): Use lwpid_of.
12732 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12733 interface changes. In non-stop mode, don't switch to a random
12735 (linux_resume_one_lwp): Use lwpid_of.
12736 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12737 (linux_resume_one_thread): ... this. Handle resume_stop. In
12738 non-stop mode, don't look for pending flag in all threads.
12739 (resume_status_pending_p): Don't consider explicitly suspended
12741 (my_waitpid): Reimplement. Emulate __WALL.
12742 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12744 (sigchld_handler, linux_supports_non_stop, linux_async)
12745 (linux_start_non_stop): New.
12746 (linux_target_ops): Register linux_supports_non_stop, linux_async
12747 and linux_start_non_stop.
12748 (initialize_low): Install SIGCHLD handler.
12749 * thread-db.c (thread_db_create_event, find_one_thread)
12750 (thread_db_get_tls_address): Use lwpid_of.
12751 * win32-low.c (win32_detach): Adjust to use resume_kind.
12752 (win32_wait): Add `options' argument.
12753 * spu-low.c (spu_resume): Adjust to use resume_kind.
12754 (spu_wait): Add `options' argument.
12756 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12758 Decouple target code from remote protocol.
12760 * target.h (enum target_waitkind): New.
12761 (struct target_waitstatus): New.
12762 (struct target_ops) <wait>: Return an unsigned long. Take a
12763 target_waitstatus pointer instead of a char pointer.
12764 (mywait): Likewise.
12765 * target.c (mywait): Change prototype to return an unsigned long.
12766 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12767 * server.h (thread_from_wait, old_thread_from_wait): Delete
12769 (prepare_resume_reply): Change prototype to take a
12771 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12772 (last_status, last_ptid): New.
12773 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12774 pid instead of a signal.
12775 (attach_inferior): Remove "status" and "signal" parameters.
12777 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12779 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12780 (handle_v_requests, myresume): Remove "status" and "signal"
12781 parameters. Adjust.
12782 (handle_status): New.
12783 (main): Delete local `status'. Adjust.
12784 * remote-utils.c: Include target.h.
12785 (prepare_resume_reply): Change prototype to take a
12786 target_waitstatus. Adjust.
12788 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12790 * spu-low.c (spu_wait): Adjust.
12791 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12793 (win32_wait): Adjust.
12795 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12797 * target.h (struct thread_resume): Delete leave_stopped member.
12798 (struct target_ops): Add a `n' argument to the `resume' callback.
12799 * server.c (start_inferior): Adjust.
12800 (handle_v_cont, myresume): Adjust.
12801 * linux-low.c (check_removed_breakpoint): Adjust to resume
12802 interface change, and to removed leave_stopped field.
12803 (resume_ptr): Delete.
12804 (struct thread_resume_array): New.
12805 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12806 resume interface change.
12807 (linux_continue_one_thread, linux_queue_one_thread)
12808 (resume_status_pending_p): Check if the resume field is NULL
12809 instead of checking the leave_stopped member.
12810 (linux_resume): Adjust to the target resume interface change.
12811 * spu-low.c (spu_resume): Adjust to the target resume interface
12813 * win32-low.c (win32_detach, win32_resume): Ditto.
12815 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12817 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12819 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12821 (linux_continue_one_thread): Only preserve the stepping flag if
12822 there's a pending breakpoint.
12824 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12826 * server.c (main): After the inferior having exited, call
12827 remote_close before exiting gdbserver.
12829 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12831 Fix size of FPSCR in Power 7 processors.
12832 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12833 (PPC_FEATURE_HAS_DFP): New #define.
12834 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12837 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12839 * server.c (handle_query) Whitespace and formatting.
12841 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12843 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12844 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12845 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12846 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12847 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12848 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12849 Makefile.in, configure.ac: Fix whitespace throughout.
12850 * configure: Regenerate.
12852 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12854 * inferiors.c (find_inferior): Make it safe for the callback
12855 function to delete the currently iterated inferior.
12857 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12859 * Makefile.in (linuw_low_h): Move higher.
12860 (thread-db.o): Depend on $(linux_low_h).
12862 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12864 Rename "process" to "lwp" throughout.
12866 * linux-low.c (all_processes): Rename to...
12867 (all_lwps): ... this.
12868 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12869 (add_process): Rename to ...
12870 (add_lwp): ... this. Adjust.
12871 (linux_create_inferior): Adjust.
12872 (linux_attach_lwp): Adjust.
12873 (linux_attach): Adjust.
12874 (linux_kill_one_process): Rename to ...
12875 (linux_kill_one_lwp): ... this. Adjust.
12876 (linux_kill): Adjust.
12877 (linux_detach_one_process): Rename to ...
12878 (linux_detach_one_lwp): ... this. Adjust.
12879 (linux_detach): Adjust.
12880 (check_removed_breakpoint): Adjust.
12881 (status_pending_p): Adjust.
12882 (linux_wait_for_process): Rename to ...
12883 (linux_wait_for_lwp): ... this. Adjust.
12884 (linux_wait_for_event): Adjust.
12885 (send_sigstop): Adjust.
12886 (wait_for_sigstop): Adjust.
12887 (stop_all_processes): Rename to ...
12888 (stop_all_lwps): ... this.
12889 (linux_resume_one_process): Rename to ...
12890 (linux_resume_one_lwp): ... this. Adjust.
12891 (linux_set_resume_request, linux_continue_one_thread)
12892 (linux_queue_one_thread, resume_status_pending_p)
12893 (usr_store_inferior_registers, regsets_store_inferior_registers)
12894 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12896 * linux-low.h (get_process): Rename to ...
12897 (get_lwp): ... this. Adjust.
12898 (get_thread_process): Rename to ...
12899 (get_thread_lwp): ... this. Adjust.
12900 (get_process_thread): Rename to ...
12901 (get_lwp_thread): ... this. Adjust.
12902 (struct process_info): Rename to ...
12903 (struct lwp_info): ... this.
12904 (all_processes): Rename to ...
12905 (all_lwps): ... this.
12906 * proc-service.c (ps_lgetregs): Adjust.
12907 * thread-db.c (thread_db_create_event, find_one_thread)
12908 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12910 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12912 * server.c (handle_query): Handle "qAttached".
12914 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12916 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12917 GPLv3, update license URL.
12919 2009-03-01 Doug Evans <dje@google.com>
12921 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12922 (server_h): Add gdb_signals.h.
12923 (signals.o): Update.
12924 * server.h (target_signal_from_host,target_signal_to_host_p)
12925 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12927 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12929 * remote-utils.c (getpkt): Also generate remote-debug
12930 information if noack_mode is set.
12932 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12934 * server.c (handle_query): Report qXfer:siginfo:read and
12935 qXfer:siginfo:write as supported and handle them.
12936 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12937 * linux-low.c (linux_xfer_siginfo): New.
12938 (linux_target_ops): Set it.
12940 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12942 * server.c (gdbserver_usage): Mention --remote-debug.
12943 (main): Accept '--remote-debug' switch.
12945 2009-01-18 Doug Evans <dje@google.com>
12947 * regcache.c (new_register_cache): No need to check result of xcalloc.
12948 * server.c (handle_search_memory): Back out calls to xmalloc,
12949 result is checked and error is returned to user upon failure.
12950 (handle_query): Ditto. Add more checks for result of malloc.
12951 (handle_v_cont): Check result of malloc, report error back to
12953 (handle_v_run): Ditto. Call freeargv.
12954 * server.h (freeargv): Declare.
12955 * utils.c (freeargv): New fn.
12957 2009-01-15 Doug Evans <dje@google.com>
12959 * gdbreplay.c (perror_with_name): Make arg const char *.
12960 * server.h (target_signal_to_name): Make return type const char *.
12961 * thread-db.c (thread_db_err_str): Make return type const char *.
12962 * utils.c (perror_with_name): Make arg const char *.
12964 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12966 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12967 when handling a EXIT_PROCESS_DEBUG_EVENT.
12969 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12971 * gdbreplay.c (gdbreplay_version): Update copyright year.
12972 * server.c (gdbserver_version): Likewise.
12974 2009-01-05 Doug Evans <dje@google.com>
12976 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12977 (handle_extended_wait): Improve comment.
12979 2008-12-13 Doug Evans <dje@google.com>
12981 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12982 * server.h (ATTR_MALLOC): New macro.
12983 (xmalloc,xcalloc,xstrdup): Declare.
12984 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12985 * inferiors.c: Ditto.
12986 * linux-low.c: Ditto.
12987 * mem-break.c: Ditto.
12988 * regcache.c: Ditto.
12989 * remote-utils.c: Ditto.
12992 * win32-low.c: Ditto.
12994 2008-12-12 Doug Evans <dje@google.com>
12996 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12997 in debugging printf.
12999 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13001 2008-12-09 Doug Evans <dje@google.com>
13003 * linux-low.h (struct process_info): Delete member tid, unused.
13004 * thread-db.c (find_one_thread): Update.
13005 (maybe_attach_thread): Update.
13007 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13009 * target.h (struct target_ops): Add qxfer_osdata member.
13010 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13012 (linux_qxfer_osdata): New functions.
13013 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13015 * server.c (handle_query): Handle "qXfer:osdata:read:".
13016 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13017 (buffer_xml_printf): New functions.
13018 * server.h (struct buffer): New.
13019 (buffer_grow_str, buffer_grow_str0): New macros.
13020 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13021 (buffer_xml_printf): Declare.
13023 2008-11-24 Doug Evans <dje@google.com>
13025 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13027 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13029 * server.c (handle_v_run): Always use the supplied argument list.
13031 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13033 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13034 (xtensa_regmap_table): Add entry for scompare1.
13036 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13038 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13039 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13040 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13041 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13042 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13043 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13044 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13045 XML target descriptions.
13046 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13047 when inferior is running on an ISA 2.05 or later processor. Add
13048 special case to return offset for full 64-bit slot of FPSCR when
13051 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13053 * Makefile.in (SFILES, clean): Added sparc64 files.
13054 (reg-sparc64.o, reg-sparc64.c): New.
13055 * configure.srv (sparc*-*-linux*): New configuration.
13056 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13057 syscall arguments for SPARC.
13058 (regsets_store_inferior_registers): Likewise.
13059 * linux-sparc-low.c: New file.
13061 2008-10-21 Doug Evans <dje@google.com>
13063 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13064 (READLINE_DIR,READLINE_DEP): Delete.
13065 (INTERNAL_CFLAGS): Update.
13066 (LINTFLAGS): Update.
13068 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13070 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13071 whole argv from the last run, not just argv[0].
13073 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13075 * regcache.c (new_register_cache): Return NULL if the register
13076 cache size isn't known yet.
13077 (free_register_cache): Avoid dereferencing a NULL regcache.
13079 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13081 * configure.srv: Merge MIPS and MIPS64.
13083 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13085 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13087 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13089 * Makefile.in: Add required vsx dependencies.
13091 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13092 Declare init_registers_powerpc_vsx32l.
13093 Declare init_registers_powerpc_vsx64l.
13094 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13095 (ppc_arch_setup): Check for VSX in hwcap.
13096 (ppc_fill_vsxregset): New function.
13097 (ppc_store_vsxregset): New function.
13098 Add new VSX entry in regset_info target_regsets.
13100 * configure.srv: Add new VSX dependencies.
13102 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13104 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13105 (remote_open): Set or clear transport_is_reliable.
13106 (putpkt_binary): Don't expect acks in noack mode.
13107 (getpkt): Don't send ack/nac in noack mode.
13108 * server.c (handle_general_set): Handle QStartNoAckMode.
13109 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13111 (main): Reset noack_mode on every connection.
13112 * server.h (noack_mode): Declare.
13114 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13116 * Makefile.in (GDBREPLAY_OBS): New variable.
13117 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13119 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13120 Daniel Jacobowitz <dan@codesourcery.com>
13122 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13123 (usr_store_inferior_registers): Likewise.
13124 (regsets_store_inferior_registers): Likewise.
13126 2008-07-31 Rolf Jansen <rj@surtec.com>
13127 Pedro Alves <pedro@codesourcery.com>
13129 * configure.ac: Check for memmem declaration.
13130 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13131 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13132 (disable_packet_qfThreadInfo): Unconditionally compile.
13133 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13134 * configure, config.in: Regenerate.
13136 2008-07-28 Doug Kwan <dougkwan@google.com>
13138 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13139 (linux_write_memory): Remove declaration of errno.
13141 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13143 * linux-low.c (handle_extended_wait): Do not use "status"
13144 variable uninitialized.
13146 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13148 * server.c (handle_v_attach): Inhibit reporting dll changes.
13150 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13152 * remote-utils.c (prepare_resume_reply): If requested, don't
13153 output "thread:TID" in the T stop reply.
13155 * server.c (disable_packet_vCont, disable_packet_Tthread)
13156 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13157 (handle_query): If requested, disable support for qC, qfThreadInfo
13159 (handle_v_requests): If requested, disable support for vCont.
13160 (gdbserver_show_disableable): New.
13161 (main): Handle --disable-packet and --disable-packet=LIST.
13163 * server.h (disable_packet_vCont, disable_packet_Tthread)
13164 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13166 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13168 * server.c (gdbserver_usage): Mention --version.
13170 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13172 * Makefile.in (gdbreplay.o): New rule.
13174 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13176 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13177 message, not gdbserver.
13179 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13180 Nathan Sidwell <nathan@codesourcery.com>
13181 Joseph Myers <joseph@codesourcery.com>
13183 * acinclude.m4: Include ../../config/acx.m4.
13184 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13185 * configure, config.in: Regenerate.
13186 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13187 * server.c (gdbserver_version): Print PKGVERSION.
13188 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13189 (main): Adjust gdbserver_usage calls.
13190 * gdbreplay.c (version, host_name): Add declarations.
13191 (gdbreplay_version, gdbreplay_usage): New.
13192 (main): Accept --version and --help options.
13194 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13196 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13197 (arm_breakpoint_at): Handle Thumb.
13198 (the_low_target): Add comment.
13200 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13202 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13204 2008-05-09 Doug Evans <dje@google.com>
13206 * server.h (decode_search_memory_packet): Declare.
13207 * remote-utils.c (decode_search_memory_packet): New fn.
13208 * server.c (handle_search_memory_1): New fn.
13209 (handle_search_memory): New fn.
13210 (handle_query): Process qSearch:memory packets.
13212 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13214 * regcache.c (registers_length): Remove.
13215 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13216 full register packet.
13217 * regcache.h (registers_length): Remove prototype.
13218 * server.h (PBUFSIZ): Define to 16384.
13220 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13222 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13223 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13224 powerpc-64l.o, and powerpc-altivec64l.o.
13225 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13226 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13227 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13228 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13229 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13232 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13233 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13234 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13235 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13236 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13237 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13238 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13239 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13240 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13241 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13244 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13245 (init_registers_powerpc_32l): ... this new prototype.
13246 (init_registers_powerpc_32): Remove, replace by ...
13247 (init_registers_powerpc_altivec32l): ... this new prototype.
13248 (init_registers_powerpc_e500): Remove, replace by ...
13249 (init_registers_powerpc_e500l): ... this new prototype.
13250 (init_registers_ppc64): Remove, replace by ...
13251 (init_registers_powerpc_64l): ... this new prototype.
13252 (init_registers_powerpc_64): Remove, replace by ...
13253 (init_registers_powerpc_altivec64l): ... this new prototype.
13254 (ppc_num_regs): Set to 73.
13255 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13256 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13257 (ppc_cannot_store_register): Handle orig_r3 and trap.
13258 (ppc_arch_setup): Update init_registers_... calls.
13259 (ppc_fill_gregset): Handle orig_r3 and trap.
13261 * inferiors.c (clear_inferiors): Reset current_inferior.
13263 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13265 * acinclude.m4: Add override.m4.
13266 * configure: Regenerate.
13268 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13270 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13271 initial call to init_register_ppc64.
13273 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13275 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13276 single powerpc*-*-linux* case.
13277 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13279 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13281 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13282 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13284 * linux-ppc-low.c: Include <elf.h>.
13285 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13286 (ppc_hwcap): New global variable.
13287 (ppc_regmap): Remove __SPE__ #ifdef sections.
13288 (ppc_regmap_e500): New global variable.
13289 (ppc_cannot_store_register): Update __SPE__ special case.
13290 (ppc_get_hwcap): New function.
13291 (ppc_arch_setup): Use it to determine whether inferior supports
13292 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13293 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13294 Do not access registers if target does not support AltiVec.
13295 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13296 Do not access registers if target does not support SPE.
13297 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13299 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13301 * linux-low.c (disabled_regsets, num_regsets): New.
13302 (use_regsets_p): Delete.
13303 (linux_wait_for_process): Clear disabled_regsets.
13304 (regsets_fetch_inferior_registers): Check and set it.
13305 (regsets_store_inferior_registers): Likewise.
13306 (linux_fetch_registers, linux_store_registers): Do not use
13308 (initialize_low): Allocate disabled_regsets.
13310 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13312 * Makefile.in (LIBOBJS): New.
13313 (OBS): Use LIBOBJS.
13314 (memmem.o): New rule.
13315 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13316 * configure: Regenerated.
13318 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13320 * server.c (handle_query): Never return "unsupported" for
13321 qXfer:features:read queries.
13323 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13325 * server.c (get_features_xml): Fix inverted condition.
13326 (handle_query): Always support qXfer:feature:read.
13328 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13330 * server.c (wrapper_argv): New.
13331 (start_inferior): Handle wrapper_argv. If set, expect an extra
13333 (gdbserver_usage): Document --wrapper.
13334 (main): Parse --wrapper.
13336 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13338 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13339 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13340 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13341 (ppc_set_pc): Likewise.
13342 (ppc_arch_setup): New function.
13343 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13344 of collect_register.
13345 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13347 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13349 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13350 instead of linux-ppc64-low.o.
13351 * linux-ppc64-low.c: Remove file.
13352 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13353 (linux-ppc64-low.o): Remove rule.
13355 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13356 (init_registers_powerpc_64): Likewise.
13357 (ppc_regmap): Conditionally define depending on __powerpc64__.
13358 (ppc_cannot_store_register): Do not special-case "fpscr" when
13359 compiled on __powerpc64__.
13360 (ppc_collect_ptrace_register): New function.
13361 (ppc_supply_ptrace_register): New function.
13362 (ppc_breakpoint): Change type to "unsigned int".
13363 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13364 (the_low_target): Conditionally provide initializers for the
13365 arch_setup member depending on __powerpc64__. Install
13366 collect_ptrace_register and supply_ptrace_register members.
13368 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13370 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13371 * server.c (gdbserver_xmltarget): Define.
13372 (get_features_xml): Use it to replace "target.xml" and arch_string.
13374 * configure.srv: Remove srv_xmltarget. Add XML files that were
13375 mentioned there to srv_xmlfiles instead. Remove conditional tests
13376 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13377 srv_xmlfiles and srv_regobj to include all possible choices.
13378 * configure.ac (srv_xmltarget): Remove.
13379 (srv_xmlfiles): Do not add "target.xml".
13380 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13381 checks for supplementary target information.
13382 * configure: Regenerate.
13383 * Makefile.in (XML_TARGET): Remove.
13384 (target.xml): Remove rule.
13385 (clean): Do not clean up target.xml.
13386 (.PRECIOUS): Do not mention target.xml.
13388 * target.h (struct target_ops): Remove arch_string member.
13389 * linux-low.c (linux_arch_string): Remove.
13390 (linux_target_ops): Remove arch_string initializer.
13391 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13392 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13393 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13394 * spu-low.c (spu_arch_string): Remove.
13395 (spu_target_ops): Remove arch_string initializer.
13396 * win32-low.c (win32_arch_string): Remove.
13397 (win32_target_ops): Remove arch_string initializer.
13398 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13399 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13400 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13402 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13404 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13405 by collect_ptrace_register and supply_ptrace_register hooks.
13406 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13407 instead of checking for the_low_target.left_pad_xfer.
13408 (usr_store_inferior_registers): Use collect_ptrace_register callback
13409 instead of checking for the_low_target.left_pad_xfer.
13411 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13412 (s390_supply_ptrace_register): Likewise.
13413 (s390_fill_gregset): Call s390_collect_ptrace_register.
13414 (the_low_target): Update.
13416 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13417 (ppc_supply_ptrace_register): Likewise.
13418 (the_low_target): Update.
13420 * linux-i386-low.c (the_low_target): Update.
13421 * linux-x86-64-low.c (the_low_target): Update.
13423 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13425 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13426 reg-s390.o and reg-s390x.o.
13428 * linux-low.c (new_inferior): New global variable.
13429 (linux_create_inferior, linux_attach): Set it.
13430 (linux_wait_for_process): Call the_low_target.arch_setup after the
13431 target has stopped for the first time.
13432 (initialize_low): Do not call the_low_target.arch_setup.
13434 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13435 (s390_set_pc): Likewise.
13436 (s390_arch_setup): New function.
13437 (the_low_target): Use s390_arch_setup as arch_setup routine.
13439 * regcache.c (realloc_register_cache): New function.
13440 (set_register_cache): Call it for each existing regcache.
13442 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13444 * server.h (init_registers): Remove prototype.
13446 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13447 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13448 instead of init_registers ().
13449 * linux-arm-low.c (init_registers_arm): Add prototype.
13450 (init_registers_arm_with_iwmmxt): Likewise.
13451 (the_low_target): Add initializer for arch_setup field.
13452 * linux-cris-low.c (init_registers_cris): Add prototype.
13453 (the_low_target): Add initializer for arch_setup field.
13454 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13455 (the_low_target): Add initializer for arch_setup field.
13456 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13457 (the_low_target): Add initializer for arch_setup field.
13458 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13459 (the_low_target): Add initializer for arch_setup field.
13460 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13461 (the_low_target): Add initializer for arch_setup field.
13462 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13463 (the_low_target): Add initializer for arch_setup field.
13464 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13465 (init_registers_mips64_linux): Likewise.
13466 (the_low_target): Add initializer for arch_setup field.
13467 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13468 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13469 (the_low_target): Add initializer for arch_setup field.
13470 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13471 (init_registers_powerpc_64): Likewise.
13472 (the_low_target): Add initializer for arch_setup field.
13473 * linux-s390-low.c (init_registers_s390): Add prototype.
13474 (init_registers_s390x): Likewise.
13475 (the_low_target): Add initializer for arch_setup field.
13476 * linux-sh-low.c (init_registers_sh): Add prototype.
13477 (the_low_target): Add initializer for arch_setup field.
13478 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13479 (the_low_target): Add initializer for arch_setup field.
13480 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13481 (the_low_target): Add initializer for arch_setup field.
13483 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13484 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13485 instead of init_registers ().
13486 * win32-arm-low.c (init_registers_arm): Add prototype.
13487 (the_low_target): Add initializer for arch_setup field.
13488 * win32-i386-low.c (init_registers_i386): Add prototype.
13489 (the_low_target): Add initializer for arch_setup field.
13491 * spu-low.c (init_registers_spu): Add prototype.
13492 (initialize_low): Call initialie_registers_spu () instead of
13493 initialize_registers ().
13495 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13497 * server.c (handle_v_requests): When handling the vRun and vAttach
13498 packets, if already debugging a process, don't kill it. Return an
13501 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13503 * server.c (handle_query): Correct length check.
13505 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13507 * win32-low.c (do_initial_child_stuff): Add process handle
13508 parameter. Set current_process_handle and current_process_id from the
13509 parameters. Clear globals.
13510 (win32_create_inferior): Don't set current_process_handle and
13511 current_process_id here. Instead pass them on the call to
13512 do_initial_child_stuff.
13513 (win32_attach): Likewise.
13514 (win32_clear_inferiors): New.
13515 (win32_kill): Don't close the current process handle or the
13516 current thread handle here. Instead call win32_clear_inferiors.
13517 (win32_detach): Don't open a new handle to the process. Call
13518 win32_clear_inferiors.
13519 (win32_join): Don't rely on current_process_handle; open a new
13520 handle using the process id.
13521 (win32_wait): Call win32_clear_inferiors when the inferior process
13524 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13526 * server.c (monitor_show_help): Add "exit".
13528 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13530 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13531 (clean): Add reg-xtensa.c.
13532 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13533 * configure.srv (xtensa*-*-linux*) New target.
13534 * linux-xtensa-low.c: New.
13535 * xtensa-xtregs.c: New.
13537 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13539 * hostio.c: Don't include errno.h.
13540 (errno_to_fileio_errno): Move to hostio-errno.
13541 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13542 error number outputting to the target->hostio_last_error callback.
13543 (hostio_packet_error): Use FILEIO_EINVAL directly.
13544 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13545 calls to hostio_error.
13546 * hostio-errno.c: New.
13547 * server.h (hostio_last_error_from_errno): Declare.
13548 * target.h (target_ops): Add hostio_last_error member.
13549 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13550 as hostio_last_error handler.
13551 * spu-low.c (spu_target_ops): Likewise.
13552 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13553 (wince_hostio_last_error): New functions.
13554 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13555 as hostio_last_error handler.
13556 (win32_target_ops) [!_WIN32_WCE]: Register
13557 hostio_last_error_from_errno as hostio_last_error handler.
13558 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13559 (hostio-errno.o): New rule.
13560 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13561 * configure.srv (srv_hostio_err_objs): New variable. Default to
13563 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13564 * configure: Regenerate.
13566 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13568 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13569 (linux_kill, linux_detach): Clean up the process list.
13570 * remote-utils.c (remote_open): Improve port number parsing.
13571 (putpkt_binary, input_interrupt): Only send interrupts if the target
13573 * server.c (extended_protocol): Make static.
13574 (attached): Define earlier.
13575 (exit_requested, response_needed, program_argv): New variables.
13576 (target_running): New.
13577 (start_inferior): Clear attached here.
13578 (attach_inferior): Set attached here.
13579 (require_running): Define.
13580 (handle_query): Use require_running and target_running. Implement
13582 (handle_v_attach, handle_v_run): New.
13583 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13584 (gdbserver_usage): Update.
13585 (main): Redo argument parsing. Handle --debug and --multi. Handle
13586 --attach along with other options or after the port. Save
13587 program_argv. Support no initial program. Resynchronize
13588 communication with GDB after an error. Handle "monitor exit".
13589 Use require_running and target_running. Always allow the extended
13590 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13591 restart in extended mode.
13592 * README: Refer to the GDB manual. Update --attach usage.
13594 2007-12-20 Andreas Schwab <schwab@suse.de>
13596 * linux-low.c (STACK_SIZE): Define.
13597 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13598 (linux_test_for_tracefork): Likewise.
13600 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13602 * linux-low.c (linux_wait_for_event): Update messages. Do not
13603 reinsert auto-delete breakpoints.
13604 * mem-break.c (struct breakpoint): Change return type of handler to
13606 (set_breakpoint_at): Update handler type.
13607 (reinsert_breakpoint_handler): Return 1 instead of calling
13609 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13611 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13612 * mem-break.h (set_breakpoint_at): Update handler type.
13613 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13614 * win32-low.c (auto_delete_breakpoint): New.
13615 (get_child_debug_event): Use it.
13617 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13619 * configure.ac: Check for pread and pwrite.
13620 * hostio.c (handle_pread): Fall back to lseek and read.
13621 (handle_pwrite): Fall back to lseek and write.
13622 * config.in, configure: Regenerated.
13624 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13626 * server.c (myresume): Add own_buf argument.
13627 (main): Update calls.
13629 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13631 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13632 * remote-utils.c (remote_open): Do not call disable_async_io.
13633 (block_async_io): Delete.
13634 (unblock_async_io): Make static.
13635 (initialize_async_io): New.
13636 * server.c (handle_v_cont): Handle async I/O here.
13637 (myresume): Likewise. Move other common resume tasks here...
13638 (main): ... from here. Call initialize_async_io. Disable async
13639 I/O before the main loop.
13640 * server.h (initialize_async_io): Declare.
13641 (block_async_io, unblock_async_io): Delete prototypes.
13642 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13644 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13646 * remote-utils.c (readchar): Allow binary data in received messages.
13648 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13650 * win32-low.c (attaching): New global.
13651 (win32_create_inferior): Clear the `attaching' global.
13652 (win32_attach): Set the `attaching' global.
13653 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13654 attaching. Only set a breakpoint at the entry point if not
13657 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13659 * server.c (main): Don't report dll events on the initial
13660 connection on attaches.
13662 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13664 * server.c (main): Relax numerical bases supported for the pid of
13665 the --attach command line argument.
13667 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13669 * win32-low.c (win32_attach): Call OpenProcess before
13670 DebugActiveProcess, not after. Add last error output to error
13673 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13675 * win32-low.c (win32_get_thread_context)
13676 (win32_set_thread_context): New functions.
13677 (thread_rec): Use win32_get_thread_context.
13678 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13679 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13682 2007-12-03 Leo Zayas
13683 Pedro Alves <pedro_alves@portugalmail.pt>
13685 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13687 (child_add_thread): Minor cleanup.
13688 (child_continue): Resume artificially suspended threads before
13689 calling ContinueDebugEvent.
13690 (suspend_one_thread): New.
13691 (fake_breakpoint_event): New.
13692 (get_child_debug_event): Change return type to int. Check here if
13693 gdb sent an interrupt request. If a soft interrupt was requested,
13694 fake a breakpoint event. Return 0 if there is no event to handle,
13696 (win32_wait): Don't check here if gdb sent an interrupt request.
13697 Ensure there is a valid event to handle.
13698 (win32_request_interrupt): Add soft interruption method as last
13701 2007-12-03 Leo Zayas
13702 Pedro Alves <pedro_alves@portugalmail.pt>
13704 * win32-low.h (win32_thread_info): Add descriptions to the
13705 structure members. Replace `suspend_count' counter by a
13707 * win32-low.c (thread_rec): Update condition of when to get the
13708 context from the inferior. Rely on ContextFlags being set if it
13709 has already been retrieved. Only suspend the inferior thread if
13710 we haven't already. Warn if that fails.
13711 (continue_one_thread): s/suspend_count/suspended/. Only call
13712 ResumeThread once. Warn if that fails.
13714 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13716 * win32-low.c (win32_wait): Don't read from the inferior when it
13717 has already exited.
13719 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13721 * Makefile.in (win32_low_h): New variable.
13722 (win32-low.o): Add dependency on $(win32_low_h).
13723 (win32-arm-low.o, win32-i386-low.o): New rules.
13725 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13727 * hostio.c: Correct copyright year.
13729 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13731 * Makefile.in (OBS): Add hostio.o.
13732 (hostio.o): New rule.
13733 * server.h (handle_vFile): Declare.
13734 * hostio.c: New file.
13735 * server.c (handle_v_requests): Take packet_len and new_packet_len
13736 for binary packets. Call handle_vFile.
13737 (main): Update call to handle_v_requests.
13739 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13741 * linux-low.c: Include <sched.h>.
13743 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13745 * linux-low.c (linux_tracefork_grandchild): New.
13746 (linux_tracefork_child): Use clone.
13747 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13749 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13751 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13753 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13755 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13757 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13759 * inferiors.c (change_inferior_id): Delete.
13760 (add_pid_to_list, pull_pid_from_list): New.
13761 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13762 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13763 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13764 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13765 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13766 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13767 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13768 (using_threads): Always set to 1.
13769 (handle_extended_wait): New.
13770 (add_process): Do not set TID.
13771 (linux_create_inferior): Set must_set_ptrace_flags.
13772 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13773 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13774 (linux_thread_alive): Rename TID argument to LWPID.
13775 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13776 (linux_wait_for_event): Do not use TID or check using_threads. Update
13777 call to dead_thread_notify. Call handle_extended_wait.
13778 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13779 (send_sigstop): Delete sigstop_sent.
13780 (wait_for_sigstop): Avoid TID.
13781 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13782 (linux_test_for_tracefork): New.
13783 (linux_lookup_signals): Use thread_db_active and
13784 linux_supports_tracefork_flag.
13785 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13786 * linux-low.h (get_process_thread): Avoid TID.
13787 (struct process_ifo): Move thread_known and tid to the end. Remove
13789 (linux_attach_lwp, thread_db_init): Update prototypes.
13790 * server.h (change_inferior_id): Delete prototype.
13791 (add_pid_to_list, pull_pid_from_list): New prototypes.
13792 * thread-db.c (thread_db_use_events): New.
13793 (find_first_thread): Rename to...
13794 (find_one_thread): ...this. Update callers and messages. Do not
13795 call fatal. Check thread_db_use_events. Do not call
13796 change_inferior_id or new_thread_notify.
13797 (maybe_attach_thread): Update. Do not call new_thread_notify.
13798 (thread_db_init): Set thread_db_use_events. Check use_events.
13799 * utils.c (fatal, warning): Correct message prefix.
13801 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13803 * Makefile.in (clean): Remove new files.
13804 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13805 (powerpc-64.o, powerpc-64.c): New rules.
13806 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13807 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13809 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13811 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13812 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13813 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13814 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13815 (target_regsets): Add AltiVec and SPE register sets.
13816 * configure.ac: Check for AltiVec and SPE.
13817 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13818 (ppc_fill_vrregset, ppc_store_vrregset): New.
13819 (target_regsets): Add AltiVec register set.
13820 * configure: Regenerated.
13822 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13824 * linux-low.c (O_LARGEFILE): Define.
13825 (linux_read_memory): Use /proc/PID/mem.
13826 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13827 * configure, config.in: Regenerated.
13829 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13831 * linux-low.c (linux_wait_for_event): Do not pass signals while
13834 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13836 * win32-low.c (create_process): New.
13837 (win32_create_inferior): Use create_process instead of
13838 CreateProcess. If create_process failed retry appending an ".exe"
13839 suffix. Store the GetLastError result immediatelly after
13840 create_process calls and use it on the call to error.
13842 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13844 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13846 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13848 * configure.ac: Switch license to GPLv3.
13850 2007-08-01 Michael Snyder <msnyder@access-company.com>
13852 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13854 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13856 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13858 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13859 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13860 CloseToolhelp32Snapshot.
13861 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13862 CloseToolhelp32Snapshot.
13864 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13866 * server.c (main): Check for inferior exit before main loop.
13868 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13870 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13871 instead of on tmp_desc.
13873 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13874 Daniel Jacobowitz <dan@codesourcery.com>
13876 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13877 (add_thread): Minor cleanups.
13878 (clear_inferiors): Move lower in the file. Clear the DLL
13880 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13881 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13882 (xml_escape_text): New.
13883 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13885 (handle_v_cont): Report errors.
13886 (gdbserver_version): Update.
13887 (main): Correct size of own_buf. Do not report initial DLL events.
13888 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13889 (unloaded_dll, xml_escape_text): New.
13890 * win32-low.c (enum target_waitkind): Update comments.
13891 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13892 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13893 (win32_EnumProcessModules, win32_GetModuleInformation)
13894 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13895 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13896 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13897 (win32_Module32First, win32_Module32Next, load_toolhelp)
13898 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13899 (get_child_debug_event): Handle DLL events.
13900 (win32_wait): Likewise.
13902 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13904 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13905 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13907 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13909 * win32-low.c (handle_output_debug_string): Ignore event if not
13912 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13914 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13916 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13918 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13920 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13922 * inferiors.c (change_inferior_id): Add comment.
13923 * linux-low.c (check_removed_breakpoint): Add an early
13924 prototype. Improve debug output.
13925 (linux_attach): Doc update.
13926 (linux_detach_one_process, linux_detach): Clean up before releasing
13928 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13929 * linux-low.h (struct process_info): Doc improvement.
13930 * mem-break.c (delete_all_breakpoints): New.
13931 * mem-break.h (delete_all_breakpoints): New prototype.
13932 * thread-db.c (find_first_thread): New.
13933 (thread_db_create_event): Call it instead of
13934 thread_db_find_new_threads. Clean up unused variables.
13935 (maybe_attach_thread): Remove first thread handling.
13936 (thread_db_find_new_threads): Use find_first_thread.
13937 (thread_db_get_tls_address): Likewise.
13939 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13941 * thread-db.c (thread_db_find_new_threads): Add prototype.
13942 (thread_db_create_event): Check for the main thread before adding
13944 (maybe_attach_thread): Only enable event reporting if TID == 0.
13945 (thread_db_get_tls_address): Check for new threads.
13947 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13949 * linux-low.c (linux_create_inferior): Try execv before execvp.
13950 * spu-low.c (spu_create_inferior): Likewise.
13952 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13954 * linux-low.c (linux_create_inferior): Change execv to execvp.
13955 * spu-low.c (spu_create_inferior): Likewies.
13957 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13959 * Makefile.in (clean): Clean new files instead of deleted ones.
13960 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13961 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13963 * configure.srv: Specify XML files and new regformats for MIPS and
13965 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13966 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13967 an entry for the restart register.
13968 (mips_cannot_fetch_register, mips_cannot_store_register)
13969 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13970 register names to match the XML descriptions.
13971 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13972 restart register instead of $0.
13974 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13975 Markus Deuling <deuling@de.ibm.com>
13977 * remote-utils.c (decode_xfer_write): New function.
13978 * server.h (decode_xfer_write): Add prototype.
13979 * server.c (handle_query): Add PACKET_LEN argument. Support
13980 qXfer:spu:read and qXfer:spu:write packets.
13981 (main): Pass packet_len to handle_query.
13982 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13983 * target.h (target_ops): Add qxfer_spu.
13985 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13987 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13988 accessing non-seekable spufs files.
13990 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13992 * server.c (handle_query): Add reply for qC packet.
13994 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13995 Leo Zayas <lerele@champenstudios@com>
13997 * server.h (check_remote_input_interrupt_request): New function.
13998 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13999 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14000 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14001 (check_remote_input_interrupt_request): New function.
14002 * server.h (check_remote_input_interrupt_request): Declare.
14003 * win32-low.c (winapi_DebugBreakProcess,
14004 winapi_GenerateConsoleCtrlEvent): New typedefs.
14005 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14007 (win32_wait): Check for remote interrupt request
14008 with check_remote_input_interrupt_request.
14009 (win32_request_interrupt): New function.
14010 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14012 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14014 * win32-low.c (debug_registers_changed,
14015 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14016 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14017 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14018 (thread_rec): Get context using the low target.
14019 (child_add_thread): Call thread_added on the low target,
14020 which does the same thing.
14022 (do_initial_child_stuff): Remove debug registers references.
14023 Set context using the low target. Resume threads after
14024 setting the contexts.
14025 (child_continue): Remove dead variable. Remove debug
14026 registers references.
14027 (child_fetch_inferior_registers): Go through the low target.
14028 (do_child_store_inferior_registers): Remove.
14029 (child_store_inferior_registers): Go through the low target.
14030 (win32_resume): Remove debug registers references.
14031 Set context using the low target.
14032 (handle_exception): Change return type to void. Don't record
14033 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14034 first chance exception.
14035 (get_child_debug_event): Change return type to void. Remove
14036 goto loop. Always return after waiting for debug event.
14037 (win32_wait): Convert to switch statement. Handle spurious
14040 * win32-i386-low.c (debug_registers_changed,
14041 debug_registers_used): New.
14042 (initial_stuff): Rename to ...
14043 (i386_initial_stuff): ... this. Clear debug registers
14045 (store_debug_registers): Delete.
14046 (i386_get_thread_context): New.
14047 (load_debug_registers): Delete.
14048 (i386_set_thread_context): New.
14049 (i386_thread_added): New.
14050 (single_step): Rename to ...
14051 (i386_single_step): ... this.
14052 (do_fetch_inferior_registers): Rename to ...
14053 (i386_fetch_inferior_register): ... this.
14054 (i386_store_inferior_register): New.
14055 (the_low_target): Adapt to new interface.
14057 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14058 (arm_get_thread_context): New.
14059 (arm_set_thread_context): New.
14061 (do_fetch_inferior_registers): Rename to ...
14062 (arm_fetch_inferior_register): ... this.
14063 (arm_store_inferior_register): New.
14064 (arm_wince_breakpoint): Reimplement as unsigned long.
14065 (arm_wince_breakpoint_len): Define.
14066 (the_low_target): Adapt to new interface.
14068 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14069 load_debug_registers. Add get_thread_context, set_thread_context,
14070 thread_added and store_inferior_register. Rename
14071 fetch_inferior_registers to fetch_inferior_register.
14072 (regptr): Remove declaration.
14074 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14076 * linux-low.c (linux_detach): Change return type to int. Return 0.
14077 * spu-low.c (spu_detach): Likewise.
14079 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14081 * target.h (target_ops): Change return type of detach to int.
14083 (join_inferior): New.
14084 * server.c (main): Don't skip detach support on mingw32.
14085 If the inferior doesn't support detaching return error.
14086 Call join_inferior instead of using waitpid.
14087 * linux-low.c (linux_join): New.
14088 (linux_target_op): Add linux_join.
14089 * spu-low.c (spu_join): New.
14090 (spu_target_ops): Add spu_join.
14091 * win32-low.c (win32_detach): Adapt to new interface.
14092 Reopen current_process_handle before detaching. Issue a child
14093 resume before detaching.
14095 (win32_target_op): Add win32_join.
14097 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14099 * win32-low.c (win32-attach): Fix return value.
14100 * target.h (target_ops): Describe ATTACH return values.
14102 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14104 * win32-low.c (GETPROCADDRESS): Define.
14105 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14106 (winapi_DebugSetProcessKillOnExit): Likewise.
14107 (win32_create_inferior): Force usage of ansi CreateProcessA.
14108 (win32_attach): Use GETPROCADDRESS.
14109 (win32_detach): Likewise.
14111 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14113 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14115 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14117 * win32-low.c: Commit leftover changes from 2007-03-29.
14119 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14121 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14122 fields short instead of int. Add explicit padding.
14123 (i387_cache_to_fsave): Remove unnecessary casts.
14124 (i387_fsave_to_cache): Doc fix.
14125 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14127 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14129 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14130 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14132 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14134 * configure.srv (arm*-*-mingw32ce*): Move near the other
14137 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14139 * configure.ac: Add errno checking.
14140 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14141 sys/file.h and malloc.h.
14142 (AC_CHECK_DECLS): Add perror.
14143 (srv_mingwce): Handle.
14144 * configure.srv (i[34567]86-*-cygwin*): Add
14145 win32-i386-low.o to srv_tgtobj.
14146 (i[34567]86-*-mingw*): Likewise.
14147 (arm*-*-mingw32ce*): Add case.
14148 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14149 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14150 [__MINGW32CE__] (strerror): New function.
14151 [__MINGW32CE__] (errno): Define to GetLastError.
14152 [__MINGW32CE__] (COUNTOF): New macro.
14153 (remote_open): Remove extra close call.
14154 * mem-break.c (delete_breakpoint_at): New function.
14155 * mem-break.h (delete_breakpoint_at): Declare.
14156 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14157 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14158 [USE_WIN32API] (read, write): Add char* casts.
14159 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14160 * server.h: Include wincecompat.h on Windows CE.
14161 [HAVE_ERRNO_H]: Check.
14162 (perror): Declare if not declared.
14163 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14164 (perror_with_name): Remove errno declaration.
14165 * wincecompat.h: New.
14166 * wincecompat.c: New.
14167 * win32-low.h: New.
14168 * win32-arm-low.c: New.
14169 * win32-i386-low.c: New.
14170 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14171 (OUTMSG2): Make it safe.
14173 (COUNTOF): New macro.
14174 (NUM_REGS): Get it from the low target.
14175 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14176 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14177 (thread_rec): Let low target handle debug registers.
14178 (child_add_thread): Likewise.
14179 (child_init_thread_list): Likewise.
14180 (continue_one_thread): Likewise.
14182 (do_child_fetch_inferior_registers): Move to ...
14183 * win32-i386-low.c: ... here, and rename to ...
14184 (do_fetch_inferior_registers): ... this.
14185 * win32-low.c (child_fetch_inferior_registers):
14186 Go through the low target.
14187 (do_child_store_inferior_registers): Use regptr.
14188 (strwinerror): New function.
14189 (win32_create_inferior): Handle Windows CE.
14190 Use strwinerror instead of strerror on Windows error
14191 codes. Add program to the error output.
14192 Don't close the main thread handle on Windows CE.
14193 (win32_attach): Use coredll.dll on Windows CE.
14194 (win32_kill): Close current process and current
14196 (win32_detach): Use coredll.dll on Windows CE.
14197 (win32_resume): Let low target handle debug registers, and
14199 (handle_exception): Add/Remove initial breakpoint. Avoid
14200 non-existant WSTOPSIG on Windows CE.
14201 (win32_read_inferior_memory): Cast to remove warning.
14202 (win32_arch_string): Go through the low target.
14203 (initialize_low): Call set_breakpoint_data with the low
14204 target's breakpoint.
14205 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14206 FOP_REGNUM, mappings): Move to ...
14207 * win32-i386-low.c: ... here.
14208 * win32-low.c (win32_thread_info): Move to ...
14209 * win32-low.h: ... here.
14210 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14211 win32-arm-low.c and wincecompat.c.
14212 (all:): Add $EXEEXT.
14213 (install-only:): Likewise.
14214 (gdbserver:): Likewise.
14215 (gdbreplay:): Likewise.
14216 * config.in: Regenerate.
14217 * configure: Regenerate.
14219 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14221 * win32-low.c: Rename typedef thread_info to
14222 win32_thread_info throughout.
14224 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14226 * win32-i386-low.c: Rename to ...
14227 * win32-low.c: ... this.
14228 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14229 * Makefile.in: Likewise.
14231 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14233 * remote-utils.c (monitor_output): Constify msg parameter.
14234 * server.h (monitor_output): Likewise.
14235 * win32-i386-low.c (handle_output_debug_string): New.
14236 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14237 handle_output_debug_string.
14238 (get_child_debug_event): Likewise.
14240 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14242 * server.c (main): Correct strtoul check.
14244 2007-03-27 Jon Ringle <jon@ringle.org>
14246 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14248 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14250 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14252 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14254 * terminal.h: Check HAVE_SGTTY_H.
14256 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14258 * remote-utils.c (remote_open): Print out the assigned port number.
14260 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14262 * remote-utils.c (monitor_output): New function.
14263 * server.c (debug_threads): Define here.
14264 (monitor_show_help): New function.
14265 (handle_query): Handle qRcmd.
14266 (main): Do not handle 'd' packet.
14267 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14268 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14271 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14273 * Makefile.in (EXEEXT): New.
14274 (clean): Use $(EXEEXT).
14276 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14278 * target.h (target_ops): Rename send_signal to request_interrupt,
14279 and remove enum target_signal parameter.
14280 * linux-low.c (linux_request_interrupt): Rename from
14281 linux_send_signal, and always send SIGINT.
14282 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14283 and always send SIGINT.
14284 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14286 (input_interrupt): Likewise.
14288 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14290 * server.c (get_features_xml): Check if target implemented
14292 * win32-i386-low.c (win32_arch_string): New.
14293 (win32_target_ops): Add win32_arch_string as arch_string member.
14295 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14297 * spu-low.c (spu_arch_string): New.
14298 (spu_target_ops): Add spu_arch_string.
14300 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14302 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14303 * configure.ac: Do not check for terminal.h.
14304 * configure, config.in: Regenerated.
14306 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14308 * Makefile.in (OBS): Add $(XML_BUILTIN).
14309 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14311 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14312 (arm-with-iwmmxt.c): New.
14313 * config.in, configure: Regenerate.
14314 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14315 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14316 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14317 (arm*-*-linux*): Add iWMMXt and regset support.
14318 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14319 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14320 (arm_store_wmmxregset, target_regsets): New.
14321 * server.c (get_features_xml): Take annex argument. Check builtin
14323 (handle_query): Handle multiple annexes.
14325 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14327 * remote-utils.c [USE_WIN32API] (read, write): Define.
14328 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14331 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14333 * linux-i386-low.c (the_low_target): Set arch_string.
14334 * linux-x86-64-low.c (the_low_target): Likewise.
14335 * linux-low.c (linux_arch_string): New.
14336 (linux_target_ops): Add it.
14337 * linux-low.h (struct linux_target_ops): Add arch_string.
14338 * server.c (write_qxfer_response): Use const void * for DATA.
14339 (get_features_xml): New.
14340 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14341 * target.h (struct target_ops): Add arch_string method.
14343 2007-01-03 Denis Pilat <denis.pilat@st.com>
14344 Daniel Jacobowitz <dan@codesourcery.com>
14346 * linux-low.c (linux_kill): Handle being called with no threads.
14347 * win32-i386-low.c (win32_kill): Likewise.
14348 (get_child_debug_event): Clear current_process_handle.
14350 2006-12-30 Denis PILAT <denis.pilat@st.com>
14351 Daniel Jacobowitz <dan@codesourcery.com>
14353 * remote-utils.c (remote_open): Check the type of specified
14354 serial port devices before opening them.
14355 * server.c (main): Kill the inferior if an error occurs during
14356 the first remote_open.
14358 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14360 * README: Update supported targets.
14362 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14364 * Makefile.in (clean): Remove reg-mips64.c.
14365 (reg-mips64.c, reg-mips64.o): New rules.
14366 * configure.srv: Handle mips64. Include regset support for mips.
14367 * linux-mips-low.c (union mips_register): New.
14368 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14369 (mips_breakpoint, mips_breakpoint_at): Use int.
14370 (mips_collect_register, mips_supply_register)
14371 (mips_collect_register_32bit, mips_supply_register_32bit)
14372 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14373 (mips_store_fpregset, target_regsets): New.
14374 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14376 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14378 * configure.srv: Add target "spu*-*-*".
14379 * Makefile.in (clean): Remove reg-spu.c.
14380 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14381 * spu-low.c: New file.
14383 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14385 * configure.ac: Correct td_thr_tls_get_addr test.
14386 * configure: Regenerated.
14388 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14390 * linux-low.c (linux_wait_for_event): Reformat. Use the
14391 pass_signals array.
14392 * remote-utils.c (decode_address_to_semicolon): New.
14393 * server.c (pass_signals, handle_general_set): New.
14394 (handle_query): Mention QPassSignals for qSupported.
14395 (main): Call handle_general_set.
14396 * server.h (pass_signals, decode_address_to_semicolon): New.
14398 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14400 * server.c (handle_query): Correct error handling for read_auxv.
14402 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14404 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14405 and srv_linux_thread_db to yes.
14406 * linux-s390-low.c (s390_fill_gregset): New function.
14407 (target_regsets): Define data structure.
14409 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14411 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14412 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14413 * config.in, configure: Regenerated.
14414 * inferiors.c (gdb_id_to_thread): New function.
14415 (gdb_id_to_thread_id): Use it.
14416 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14417 * linux-low.h (struct process_info): Add th member.
14418 (thread_db_get_tls_address): New prototype.
14419 * remote-utils.c (decode_address): Make non-static.
14420 * server.c (handle_query): Handle qGetTLSAddr.
14421 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14422 * target.h (struct target_ops): Add get_tls_address.
14423 * thread-db.c (maybe_attach_thread): Save the thread handle.
14424 (thread_db_get_tls_address): New.
14426 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14428 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14429 (linux_resume_one_process): Take a siginfo_t *. Update all
14430 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14431 (struct pending_signals): Add a siginfo_t.
14432 (linux_wait_for_process): Always set last_status.
14433 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14434 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14435 * linux-low.h (struct process_info): Add last_status.
14437 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14439 * remote-utils.c (try_rle): New function.
14440 (putpkt_binary): Use it.
14442 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14444 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14445 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14446 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14447 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14448 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14451 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14453 * server.c (terminal_fd): New variable.
14454 (old_foreground_pgrp): Likewise.
14455 (restore_old_foreground_pgrp): New function.
14456 (start_inferior): Record the terminal file descriptor in terminal_fd
14457 and its original foreground group in old_foreground_pgrp. Register
14458 restore_old_foreground_pgrp with atexit().
14460 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14462 * server.c (handle_query): Correct qPart to qXfer.
14464 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14466 * configure.ac: Check for more headers which are missing on
14467 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14468 * configure.srv: Add Cygwin and mingw32.
14469 * remote-utils.c: Don't include headers unconditionally which
14470 are missing on mingw32. Include <winsock.h> for mingw32.
14471 (remote_open): Adjust for mingw32 support. Flush
14472 standard error after writing to it.
14473 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14474 (unblock_async_io, enable_async_io, disable_async_io)
14475 (readchar, getpkt): Update for Winsock support.
14476 (prepare_resume_reply): Expect a protocol signal number.
14477 * server.c: Disable <sys/wait.h> on mingw32.
14478 (start_inferior): Adjust for mingw32 support. Flush
14479 standard error after writing to it.
14480 (attach_inferior): Likewise. Use protocol signal
14482 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14484 * win32-i386-low.c: New file.
14485 * Makefile.in (XM_CLIBS): Set.
14486 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14487 (win32-i386-low.o): New dependency rule.
14488 * linux-low.c (linux_wait): Use target signal numbers.
14489 * target.h (struct target_ops): Doc fix.
14490 * server.h (target_signal_to_name): New prototype.
14491 * gdbreplay.c: Don't include headers unconditionally which
14492 are missing on mingw32. Include <winsock.h> for mingw32.
14493 (remote_close, remote_open): Adjust for Winsock support.
14494 * configure, config.in: Regenerated.
14496 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14498 * server.c (decode_xfer_read, write_qxfer_response): New.
14499 (handle_query): Take a packet length argument. Handle
14500 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14501 the qSupported response.
14502 (main): Update call to handle_query.
14504 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14506 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14507 (putpkt_binary): Renamed from putpkt and adjusted for binary
14509 (putpkt): New wrapper for putpkt_binary.
14510 (readchar): Don't mask off the high bit.
14511 (decode_X_packet): New function.
14512 * server.c (main): Call putpkt_binary if a handler sets the packet
14513 length. Save the length of the incoming packet. Handle 'X'.
14514 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14516 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14518 * server.c (handle_query): Handle qSupported.
14520 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14522 * remote-utils.c (all_symbols_looked_up): New variable.
14523 (look_up_one_symbol): Check it.
14524 * server.h (look_up_one_symbol): New declaration.
14525 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14527 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14529 * Makefile.in (linux-arm-low.o): Update dependencies.
14530 * linux-arm-low.c: Include "gdb_proc_service.h".
14531 (PTRACE_GET_THREAD_AREA): Define.
14532 (ps_get_thread_area): New function.
14534 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14536 * configure.srv (m68k*-*-uclinux*): New target.
14537 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14538 (linux_resume_one_process): Remove extraneous cast.
14539 (linux_read_offsets): New.
14540 (linux_target_op): Add linux_read_offsets on mmuless systems.
14541 * server.c (handle_query): Add qOffsets logic.
14542 * target.h (struct target_ops): Add read_offsets.
14544 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14546 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14547 (PTRACE_GET_THREAD_AREA): Define.
14548 (ps_get_thread_area): New function.
14549 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14550 (linux-x86-64-low.o): Update.
14552 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14554 * configure.ac: Remove checks for prfpregset_t.
14555 * gdb_proc_service.h: New file.
14556 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14557 new "gdb_proc_service.h".
14558 * proc-service.c: Likewise.
14559 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14560 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14561 * Makefile.in (gdb_proc_service_h): Updated.
14562 * configure, config.in: Regenerated.
14564 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14566 * remote-utils.c (prepare_resume_reply): Move declaration
14567 of gdb_id_from_wait to the top of the block.
14569 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14571 * linux-low.c (regsets_store_inferior_registers): Read the regset
14572 from the target before filling it.
14574 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14576 * server.c (attach_inferior): Return SIGTRAP for a successful
14579 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14581 * Makefile.in (OBS): Add version.o.
14582 (STAGESTUFF): Delete.
14583 (version.o): Add dependencies.
14584 (version.c): Replace rule.
14585 (clean): Remove version.c.
14586 * server.c (gdbserver_version): New.
14587 (gdbserver_usage): Use printf.
14588 (main): Handle --version and --help.
14589 * server.h (version, host_name): Add declarations.
14591 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14603 * linux-x86-64-low.c:
14605 * linux-s390-low.c:
14606 * linux-ppc64-low.c:
14608 * linux-mips-low.c:
14609 * linux-m68k-low.c:
14610 * linux-m32r-low.c:
14613 * linux-ia64-low.c:
14614 * linux-i386-low.c:
14615 * linux-crisv32-low.c:
14627 * gdbserver.1: Add (C) after Copyright. Update the FSF
14630 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14632 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14633 (arm_breakpoint_at): Recognize both breakpoints.
14634 (the_low_target): Use the correct breakpoint instruction.
14636 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14638 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14639 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14640 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14641 (the_low_target): Update.
14643 2005-10-25 Andreas Schwab <schwab@suse.de>
14645 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14647 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14648 (ia64_num_regs): Reduce to 462.
14650 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14652 * acinclude.m4: Correct quoting.
14653 * aclocal.m4: Regenerated.
14655 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14656 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14657 (thread_db_init): Call thread_db_err_str.
14658 * configure.ac: Check for TD_VERSION.
14659 * config.in, configure: Regenerated.
14661 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14663 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14665 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14667 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14668 is not available. Define HAVE_PTRACE_GETREGS if it is.
14669 * config.in, configure: Regenerated.
14670 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14671 * linux-i386-low.c, linux-m68k-low.c: Update to use
14672 HAVE_PTRACE_GETREGS.
14673 * linux-low.c (regsets_fetch_inferior_registers)
14674 (regsets_store_inferior_registers): Only return 0 if we processed
14676 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14677 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14679 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14681 * inferiors.c (struct thread_info): Add gdb_id.
14682 (add_thread): Add gdb_id argument.
14683 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14684 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14685 calls to add_thread.
14686 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14687 * server.c (handle_query): Use thread_to_gdb_id.
14688 (handle_v_cont, main): Use gdb_id_to_thread_id.
14689 * server.h (add_thread): Update prototype.
14690 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14693 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14695 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14696 left-padded registers.
14697 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14698 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14700 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14702 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14703 * configure: Regenerate.
14704 * config.in: Regenerate.
14705 * server.h (NEED_DECLARATION_STRERROR):
14706 Replace with !HAVE_DECL_STRERROR.
14708 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14710 * linux-low.c (linux_wait, linux_send_signal): Don't test
14711 an unsigned long variable for > 0 if it could be MAX_ULONG.
14712 * server.c (myresume): Likewise.
14713 * target.c (set_desired_inferior): Likewise.
14715 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14717 * configure.ac: Simplify and improve check for socklen_t.
14718 * configure, config.in: Regenerate.
14720 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14722 * acconfig.h: Remove.
14723 * configure.ac: Add a test for socklen_t. Use three-argument
14724 AC_DEFINE throughout.
14725 * config.in: Regenerated using autoheader 2.59.
14726 * configure: Regenerated.
14728 * gdbreplay.c (socklen_t): Provide a default.
14729 (remote_open): Use socklen_t.
14730 * remote-utils.c (socklen_t): Provide a default.
14731 (remote_open): Use socklen_t.
14732 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14735 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14737 * linux-low.c (linux_read_memory, linux_write_memory)
14738 (linux_read_auxv): Likewise.
14739 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14740 (check_mem_write): Likewise.
14741 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14743 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14744 (registers_from_string, register_data): Likewise.
14745 * server.c (handle_query, main): Likewise.
14746 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14747 (decode_M_packet): Likewise.
14748 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14749 * target.h (struct target_ops): Update read_memory, write_memory,
14751 (read_inferior_memory, write_inferior_memory): Update.
14752 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14753 to unsigned char *.
14754 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14755 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14756 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14757 linux-s390-low.c, linux-sh-low.c: Update for changes in
14758 read_inferior_memory and the_low_target->breakpoint.
14760 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14762 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14763 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14764 * configure.srv: Add powerpc64-*-linux*.
14765 * linux-ppc64-low.c: New file.
14767 2005-05-23 Orjan Friberg <orjanf@axis.com>
14769 * linux-cris-low.c: New file with support for CRIS.
14770 * linux-crisv32-low.c: Ditto for CRISv32.
14771 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14772 (clean): Add reg-cris.c and reg-crisv32.c.
14773 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14774 reg-crisv32.o, and reg-crisv32.c to make rules.
14775 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14776 recognized targets.
14778 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14780 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14781 of sizeof (PTRACE_XFER_TYPE).
14782 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14784 2005-05-12 Orjan Friberg <orjanf@axis.com>
14786 * target.h (struct target_ops): Add insert_watchpoint,
14787 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14788 pointers for hardware watchpoint support.
14789 * linux-low.h (struct linux_target_ops): Ditto.
14790 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14791 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14792 to linux_target_ops.
14793 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14795 * server.c (main): Recognize 'Z' and 'z' packets.
14797 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14799 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14800 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14801 (the_low_target): Add new members.
14803 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14805 * proc-service.c (ps_lgetregs): Search all_processes instead of
14808 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14810 * server.c (start_inferior): Change return type to int.
14811 (attach_inferior): Change sigptr to int *.
14812 (handle_v_cont, handle_v_requests): Change signal to int *.
14813 (main): Change signal to int.
14815 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14817 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14818 * configure.srv: Add m32r*-*-linux*.
14819 * linux-m32r-low.c: New file.
14821 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14823 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14825 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14827 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14828 Take unsigned long arguments for PIDs.
14829 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14830 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14831 (wait_for_sigstop, linux_resume_one_process)
14832 (regsets_fetch_inferior_registers, linux_send_signal)
14833 (linux_read_auxv): Likewise. Update the types of variables holding
14834 PIDs. Update format string specifiers.
14835 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14836 * remote-utils.c (prepare_resume_reply): Likewise.
14837 * server.c (cont_thread, general_thread, step_thread)
14838 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14840 (handle_query): Update format specifiers.
14841 (handle_v_cont, main): Use strtoul for thread IDs.
14842 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14843 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14844 (general_thread, step_thread, thread_from_wait)
14845 (old_thread_from_wait): Update.
14846 * target.h (struct thread_resume): Use unsigned long for THREAD.
14847 (struct target_ops): Use unsigned long for arguments to attach and
14850 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14852 * acinclude.m4: Include bfd/bfd.m4 directly.
14853 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14854 <agriffis@toolchain.org>.
14855 * aclocal.m4, configure: Regenerated.
14857 2005-01-07 Andrew Cagney <cagney@gnu.org>
14859 * configure.ac: Rename configure.in, require autoconf 2.59.
14860 * configure: Re-generate.
14862 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14864 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14865 LIBS when finished.
14866 * aclocal.m4: Regenerated.
14867 * configure: Regenerated.
14869 2004-11-21 Andreas Schwab <schwab@suse.de>
14871 * linux-m68k-low.c (m68k_num_gregs): Define.
14872 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14873 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14874 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14875 (m68k_breakpoint_at): New. Add to the_low_target.
14877 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14878 srv_linux_thread_db to yes.
14880 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14882 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14883 (ARCH_SET_FS): Likewise.
14884 (ARCH_GET_FS): Likewise.
14885 (ARCH_GET_GS): Likewise.
14887 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14889 * linux-i386-low.c (ps_get_thread_area): New.
14890 * linux-x86-64-low.c (ps_get_thread_area): New.
14891 * linux-low.c: Include <sys/syscall.h>.
14892 (linux_kill_one_process): Don't kill the first thread here.
14893 (linux_kill): Kill the first thread here.
14894 (kill_lwp): New function.
14895 (send_sigstop, linux_send_signal): Use it.
14896 * proc-service.c: Clean up #ifdefs.
14897 (fpregset_info): Delete.
14898 (ps_lgetregs): Update and enable implementation.
14899 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14901 * remote-utils.c (struct sym_cache, symbol_cache): New.
14902 (input_interrupt): Print a clearer message.
14903 (async_io_enabled): New variable.
14904 (enable_async_io, disable_async_io): Use it. Update comments.
14905 (look_up_one_symbol): Use the symbol cache.
14906 * thread-db.c (thread_db_look_up_symbols): New function.
14907 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14909 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14911 * configure.in: Test for -rdynamic.
14912 * configure: Regenerated.
14913 * Makefile (INTERNAL_LDFLAGS): New.
14914 (gdbserver, gdbreplay): Use it.
14916 2004-09-02 Andrew Cagney <cagney@gnu.org>
14918 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14920 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14922 * linux-low.c (linux_wait): Clear all_processes list also.
14924 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14926 * linux-low.c: Include <errno.h>. Remove extern declaration of
14929 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14931 * gdbreplay.c, server.h, utils.c: Update copyright years.
14933 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14935 * server.c (main): Print child status or termination signal from
14936 variable 'signal', not 'sig'.
14938 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14940 * linux-low.c (linux_read_memory): Change return type to
14941 int. Check for and return error from ptrace().
14942 * target.c (read_inferior_memory): Change return type to int. Pass
14943 back return status from the_target->read_memory().
14944 * target.h (struct target_ops): Adapt *read_memory() prototype.
14946 (read_inferior_memory): Adapt prototype.
14947 * server.c (main): Return an error packet if
14948 read_inferior_memory() returns an error.
14950 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14952 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14953 Unify with other clean targets.
14955 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14957 * server.c (handle_v_cont): Call set_desired_inferior.
14959 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14961 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14963 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14965 * linux-low.c (linux_wait): Unblock async I/O.
14966 (linux_resume): Block and enable async I/O.
14967 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14968 * server.h (block_async_io, unblock_async_io): Add prototypes.
14970 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14972 * remote-utils.c (remote_open): Print a status notice after
14973 opening a TCP port.
14974 * server.c (attach_inferior): Print a status notice after
14977 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14979 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14981 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14983 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14985 * server.c, target.h: Update copyright years.
14987 2004-02-25 Roland McGrath <roland@redhat.com>
14989 * target.h (struct target_ops): New member `read_auxv'.
14990 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14991 * linux-low.c (linux_read_auxv): New function.
14992 (linux_target_ops): Initialize `read_auxv' member to that.
14994 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14996 Committed by Jim Blandy <jimb@redhat.com>.
14998 * linux-s390-low.c (s390_num_regs): Update.
14999 (s390_regmap): Remove control registers. Use __s390x__ predefine
15000 instead of GPR_SIZE to distiguish s390 and s390x targets.
15002 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15004 * linux-low.c: Update copyright year.
15005 (check_removed_breakpoint): Clear pending_is_breakpoint.
15006 (linux_set_resume_request, linux_queue_one_thread)
15007 (resume_status_pending_p): New functions.
15008 (linux_continue_one_thread): Use process->resume.
15009 (linux_resume): Only resume threads if there are no pending events.
15010 * linux-low.h (struct process_info): Add resume request
15013 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15015 * regcache.c (new_register_cache): Clear the allocated register
15016 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15018 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15020 * linux-low.c (linux_resume): Take a struct thread_resume *
15022 (linux_wait): Update call.
15023 (resume_ptr): New static variable.
15024 (linux_continue_one_thread): Renamed from
15025 linux_continue_one_process. Use resume_ptr.
15026 (linux_resume): Use linux_continue_one_thread.
15027 * server.c (handle_v_cont, handle_v_requests): New functions.
15028 (myresume): New function.
15029 (main): Handle 'v' case.
15030 * target.h (struct thread_resume): New type.
15031 (struct target_ops): Change argument of "resume" to struct
15033 (myresume): Delete macro.
15035 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15037 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15038 (uninstall): Support DESTDIR.
15040 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15042 * configure.srv: Add xscale*linux copy of arm*linux entry.
15044 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15046 * linux-arm-low.c (arm_reinsert_addr): New function.
15047 (the_low_target): Add arm_reinsert_addr.
15049 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15051 * mem-break.c: Remove whitespace at end of file.
15053 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15055 * configure.in: Check whether we need to prototype strerror.
15056 * server.h: Optionally prototype strerror.
15057 * gdbreplay.c (perror_with_name): Use strerror.
15058 * linux-low.c (linux_attach_lwp): Use strerror.
15059 * utils.c (perror_with_name): Use strerror.
15060 * config.in, configure: Regenerated.
15062 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15064 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15065 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15067 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15069 * Makefile.in (SFILES): Update.
15070 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15071 low-sun3.c: Remove files.
15073 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15075 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15076 (linux_detach_one_process, linux_detach): New functions.
15077 (linux_target_ops): Add linux_detach.
15078 * server.c (main): Handle 'D' packet.
15079 * target.h (struct target_ops): Add "detach" member.
15080 (detach_inferior): Define.
15082 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15084 From Kelley Cook <kelleycook@wideopenwest.com>:
15085 * configure.srv: Accept i[34567]86 variants.
15087 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15089 * linux-low.c (linux_wait_for_event): Correct comment typos.
15090 (linux_resume_one_process): Call check_removed_breakpoint.
15091 (linux_send_signal): New function.
15092 (linux_target_ops): Add linux_send_signal.
15093 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15095 * target.h (struct target_ops): Add send_signal.
15097 2003-05-29 Jim Blandy <jimb@redhat.com>
15099 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15100 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15101 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15102 away part of the register's value.
15104 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15106 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15107 (linux_wait_for_event, linux_init_signals): Likewise.
15109 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15111 * configure.in: Check for stdlib.h.
15112 * configure: Regenerated.
15113 * config.in: Regenerated.
15115 2003-01-04 Andreas Schwab <schwab@suse.de>
15117 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15119 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15121 * Makefile.in: Remove obsolete code.
15123 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15125 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15126 defined(PT_FPR0_HI).
15128 2002-11-17 Stuart Hughes <seh@zee2.com>
15130 * linux-arm-low.c (arm_num_regs): Increase.
15131 (arm_regmap): Include status register.
15133 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15135 * linux-low.c (register_addr): Remove incorrect -1 check.
15137 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15139 * linux-low.c (linux_create_inferior): Call setpgid. Return
15141 (unstopped_p, linux_signal_pid): Remove.
15142 (linux_target_ops): Remove linux_signal_pid.
15143 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15144 global instead of target method.
15145 * target.h (struct target_ops): Remove signal_pid. Update comment
15146 for create_inferior.
15147 * server.c (signal_pid): New variable.
15148 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15149 gdbserver. Set the child to be the foreground process group.
15150 (attach_inferior): Set signal_pid.
15152 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15154 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15156 2002-08-20 Jim Blandy <jimb@redhat.com>
15158 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15161 2002-08-01 Andrew Cagney <cagney@redhat.com>
15163 * Makefile.in: Make chill references obsolete.
15165 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15167 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15168 * configure: Regenerate.
15169 * config.in: Regenerate.
15171 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15173 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15174 (perror_with_name, remote_close, remote_open, expect, play): Static.
15176 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15178 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15179 byte offsets instead of an array of indexes.
15180 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15182 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15184 * regcache.c: Add comment.
15186 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15188 * thread-db.c: New file.
15189 * proc-service.c: New file.
15190 * acinclude.m4: New file.
15191 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15192 proc-service.o, and thread-db.o.
15193 (linux-low.o): Add USE_THREAD_DB.
15194 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15195 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15196 * aclocal.m4: Regenerated.
15197 * config.in: Regenerated.
15198 * configure: Regenerated.
15199 * configure.in: Check for proc_service.h, sys/procfs.h,
15200 thread_db.h, and linux/elf.h headrs.
15201 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15202 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15203 Check for -lthread_db and thread support.
15204 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15205 PowerPC, and SuperH.
15206 * i387-fp.c: Constify arguments.
15207 * i387-fp.h: Likewise.
15208 * inferiors.c: (struct thread_info): Renamed from
15209 `struct inferior_info'. Remove PID member. Use generic inferior
15210 list header. All uses updated.
15211 (inferiors, signal_pid): Removed.
15212 (all_threads): New variable.
15213 (get_thread): Define.
15214 (add_inferior_to_list): New function.
15215 (for_each_inferior): New function.
15216 (change_inferior_id): New function.
15217 (add_inferior): Removed.
15218 (remove_inferior): New function.
15219 (add_thread): New function.
15220 (free_one_thread): New function.
15221 (remove_thread): New function.
15222 (clear_inferiors): Use for_each_inferior and free_one_thread.
15223 (find_inferior): New function.
15224 (find_inferior_id): New function.
15225 (inferior_target_data): Update argument type.
15226 (set_inferior_target_data): Likewise.
15227 (inferior_regcache_data): Likewise.
15228 (set_inferior_regcache_data): Likewise.
15229 * linux-low.c (linux_bp_reinsert): Remove.
15230 (all_processes, stopping_threads, using_thrads)
15231 (struct pending_signals, debug_threads, pid_of): New.
15232 (inferior_pid): Replace with macro.
15233 (struct inferior_linux_data): Remove.
15234 (get_stop_pc, add_process): New functions.
15235 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15236 Use add_process and add_thread.
15237 (linux_attach_lwp): New function, based on old linux_attach. Use
15238 add_process and add_thread. Set stop_expected for new threads.
15239 (linux_attach): New function.
15240 (linux_kill_one_process): New function.
15241 (linux_kill): Kill all LWPs.
15242 (linux_thread_alive): Use find_inferior_id.
15243 (check_removed_breakpoints, status_pending_p): New functions.
15244 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15245 Update. Use WNOHANG. Wait for cloned processes also. Update process
15246 struct for the found process.
15247 (linux_wait_for_event): New function.
15248 (linux_wait): Use it. Support LWPs.
15249 (send_sigstop, wait_for_sigstop, stop_all_processes)
15250 (linux_resume_one_process, linux_continue_one_process): New functions.
15251 (linux_resume): Support LWPs.
15252 (REGISTER_RAW_SIZE): Remove.
15253 (fetch_register): Use register_size instead. Call supply_register.
15254 (usr_store_inferior_registers): Likewise. Call collect_register.
15255 Fix recursive case.
15256 (regsets_fetch_inferior_registers): Improve error message.
15257 (regsets_store_inferior_registers): Add debugging.
15258 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15259 (unstopped_p, linux_signal_pid): New functions.
15260 (linux_target_ops): Add linux_signal_pid.
15261 (linux_init_signals): New function.
15262 (initialize_low): Call it. Initialize using_threads.
15263 * regcache.c (inferior_regcache_data): Add valid
15265 (get_regcache): Fetch registers lazily. Add fetch argument
15266 and update all callers.
15267 (regcache_invalidate_one, regcache_invalidate): New
15269 (new_register_cache): Renamed from create_register_cache.
15270 Return the new regcache.
15271 (free_register_cache): Change argument to a void *.
15272 (registers_to_string, registers_from_string): Call get_regcache
15273 with fetch flag set.
15274 (register_data): Make static. Pass fetch flag to get_regcache.
15275 (supply_register): Call get_regcache with fetch flag clear.
15276 (collect_register): Call get_regcache with fetch flag set.
15277 (collect_register_as_string): New function.
15278 * regcache.h: Update.
15279 * remote-utils.c (putpkt): Flush after debug output and use
15281 Handle input interrupts while waiting for an ACK.
15282 (input_interrupt): Use signal_pid method.
15283 (getpkt): Flush after debug output and use stderr.
15284 (outreg): Use collect_register_as_string.
15285 (new_thread_notify, dead_thread_notify): New functions.
15286 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15287 and general_thread.
15288 (look_up_one_symbol): Flush after debug output.
15289 * server.c (step_thread, server_waiting): New variables.
15290 (start_inferior): Don't use signal_pid. Update call to mywait.
15291 (attach_inferior): Update call to mywait.
15292 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15293 (main): Don't fetch/store registers explicitly. Use
15294 set_desired_inferior. Support proposed ``Hs'' packet. Update
15296 * server.h: Update.
15297 (struct inferior_list, struct_inferior_list_entry): New.
15298 * target.c (set_desired_inferior): New.
15299 (write_inferior_memory): Constify.
15300 (mywait): New function.
15301 * target.h: Update.
15302 (struct target_ops): New signal_pid method.
15303 (mywait): Removed macro, added prototype.
15305 * linux-low.h (regset_func): Removed.
15306 (regset_fill_func, regset_store_func): New.
15307 (enum regset_type): New.
15308 (struct regset_info): Add type field. Use new operation types.
15309 (struct linux_target_ops): stop_pc renamed to get_pc.
15310 Add decr_pc_after_break and breakpoint_at.
15311 (get_process, get_thread_proess, get_process_thread)
15312 (strut process_info, all_processes, linux_attach_lwp)
15313 (thread_db_init): New.
15315 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15316 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15317 (the_low_target): Add new members.
15318 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15319 (i386_store_fpxregset): Constify.
15320 (target_regsets): Add new kind identifier.
15321 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15322 (i386_set_pc): Add debugging.
15323 (i386_breakpoint_at): New function.
15324 (the_low_target): Add new members.
15325 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15326 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15327 (mips_breakpoint_at): New.
15328 (the_low_target): Add new members.
15329 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15330 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15331 (the_low_target): Add new members.
15332 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15333 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15334 (the_low_target): Add new members.
15335 * linux-x86-64-low.c (target_regsets): Add new kind
15338 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15340 From Martin Pool <mbp@samba.org>:
15341 * server.c (gdbserver_usage): New function.
15344 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15346 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15347 stop_at -> stop_pc.
15349 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15351 * Makefile.in: Remove obsolete code.
15353 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15355 * linux-low.c (regsets_fetch_inferior_registers),
15356 (regsets_store_inferior_registers): Removed cast to int from
15358 * regcache.h: Added declaration of struct inferior_info.
15360 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15362 * inferiors.c (struct inferior_info): Add regcache_data.
15363 (add_inferior): Call create_register_cache.
15364 (clear_inferiors): Call free_register_cache.
15365 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15366 * regcache.c (struct inferior_regcache_data): New.
15367 (registers): Remove.
15368 (get_regcache): New function.
15369 (create_register_cache, free_register_cache): New functions.
15370 (set_register_cache): Don't initialize the register cache here.
15371 (registers_to_string, registers_from_string, register_data): Call
15373 * regcache.h: Add prototypes.
15374 * server.h: Likewise.
15376 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15378 * mem-break.c: New file.
15379 * mem-break.h: New file.
15380 * Makefile.in: Add mem-break.o rule; update server.h
15382 * inferiors.c (struct inferior_info): Add target_data
15384 (clear_inferiors): Free target_data member if set.
15385 (inferior_target_data, set_inferior_target_data): New functions.
15386 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15387 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15388 * linux-low.c (linux_bp_reinsert): New variable.
15389 (struct inferior_linux_data): New.
15390 (linux_create_inferior): Use set_inferior_target_data.
15391 (linux_attach): Likewise. Call add_inferior.
15392 (linux_wait_for_one_inferior): New function.
15393 (linux_wait): Call it.
15394 (linux_write_memory): Add const.
15395 (initialize_low): Call set_breakpoint_data.
15396 * linux-low.h (struct linux_target_ops): Add breakpoint
15398 * server.c (attach_inferior): Remove extra add_inferior
15400 * server.h: Include mem-break.h. Update inferior.c
15402 * target.c (read_inferior_memory)
15403 (write_inferior_memory): New functions.
15404 * target.h (read_inferior_memory)
15405 (write_inferior_memory): Change macros to prototypes.
15406 (struct target_ops): Update comments. Add const to write_memory
15409 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15411 * linux-low.c (usr_store_inferior_registers): Support
15412 registers which are allowed to fail to store.
15413 * linux-low.h (linux_target_ops): Likewise.
15414 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15415 (ppc_cannot_store_register): FPSCR may not be storable.
15417 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15419 * server.h: Include <string.h> if HAVE_STRING_H.
15420 * ChangeLog: Correct paths in last ChangeLog entry.
15422 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15424 * linux-low.h: Remove obsolete prototypes.
15425 (struct linux_target_ops): New.
15426 (extern the_low_target): New.
15427 * linux-low.c (num_regs, regmap): Remove declarations.
15428 (register_addr): Use the_low_target explicitly.
15429 (fetch_register): Likewise.
15430 (usr_fetch_inferior_registers): Likewise.
15431 (usr_store_inferior_registers): Likewise.
15432 * linux-arm-low.c (num_regs): Remove.
15433 (arm_num_regs): Define.
15434 (arm_regmap): Renamed from regmap, made static.
15435 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15437 (arm_cannot_store_register): Renamed from cannot_store_register,
15439 (the_low_target): New.
15440 * linux-i386-low.c (num_regs): Remove.
15441 (i386_num_regs): Define.
15442 (i386_regmap): Renamed from regmap, made static.
15443 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15445 (i386_cannot_store_register): Renamed from cannot_store_register,
15447 (the_low_target): New.
15448 * linux-ia64-low.c (num_regs): Remove.
15449 (ia64_num_regs): Define.
15450 (ia64_regmap): Renamed from regmap, made static.
15451 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15453 (ia64_cannot_store_register): Renamed from cannot_store_register,
15455 (the_low_target): New.
15456 * linux-m68k-low.c (num_regs): Remove.
15457 (m68k_num_regs): Define.
15458 (m68k_regmap): Renamed from regmap, made static.
15459 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15461 (m68k_cannot_store_register): Renamed from cannot_store_register,
15463 (the_low_target): New.
15464 * linux-mips-low.c (num_regs): Remove.
15465 (mips_num_regs): Define.
15466 (mips_regmap): Renamed from regmap, made static.
15467 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15469 (mips_cannot_store_register): Renamed from cannot_store_register,
15471 (the_low_target): New.
15472 * linux-ppc-low.c (num_regs): Remove.
15473 (ppc_num_regs): Define.
15474 (ppc_regmap): Renamed from regmap, made static.
15475 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15477 (ppc_cannot_store_register): Renamed from cannot_store_register,
15479 (the_low_target): New.
15480 * linux-s390-low.c (num_regs): Remove.
15481 (s390_num_regs): Define.
15482 (s390_regmap): Renamed from regmap, made static.
15483 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15485 (s390_cannot_store_register): Renamed from cannot_store_register,
15487 (the_low_target): New.
15488 * linux-sh-low.c (num_regs): Remove.
15489 (sh_num_regs): Define.
15490 (sh_regmap): Renamed from regmap, made static.
15491 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15493 (sh_cannot_store_register): Renamed from cannot_store_register,
15495 (the_low_target): New.
15496 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15497 (the_low_target): New.
15499 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15501 * Makefile.in: Add stamp-h target.
15502 * configure.in: Create stamp-h.
15503 * configure: Regenerated.
15505 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15507 * inferiors.c: New file.
15508 * target.c: New file.
15509 * target.h: New file.
15510 * Makefile.in: Add target.o and inferiors.o. Update
15512 * linux-low.c (inferior_pid): New static variable,
15513 moved from server.c.
15514 (linux_create_inferior): Renamed from create_inferior.
15515 Call add_inferior. Return 0 on success instead of a PID.
15516 (linux_attach): Renamed from myattach.
15517 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15518 (linux_thread_alive): Renamed from mythread_alive.
15519 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15521 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15522 (regsets_store_inferior_registers): Correct error message.
15523 Add missing ``return 0''.
15524 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15525 (linux_store_registers): Renamed from store_inferior_registers.
15526 (linux_read_memory): Renamed from read_inferior_memory.
15527 (linux_write_memory): Renamed from write_inferior_memory.
15528 (linux_target_ops): New structure.
15529 (initialize_low): Call set_target_ops ().
15530 * remote-utils.c (unhexify): New function.
15531 (hexify): New function.
15532 (input_interrupt): Send signals to ``signal_pid''.
15533 * server.c (inferior_pid): Remove.
15534 (start_inferior): Update create_inferior call.
15535 (attach_inferior): Call add_inferior.
15536 (handle_query): New function.
15537 (main): Call handle_query for `q' packets.
15538 * server.h: Include "target.h". Remove obsolete prototypes.
15539 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15541 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15543 * Makefile.in: Add WARN_CFLAGS. Update configury
15545 * configure.in: Check for <string.h>
15546 * configure: Regenerate.
15547 * config.in: Regenerate.
15548 * gdbreplay.c: Include needed system headers.
15549 (remote_open): Remove strchr prototype.
15550 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15551 * regcache.c (supply_register): Change buf argument to const void *.
15552 (supply_register_by_name): Likewise.
15553 (collect_register): Change buf argument to void *.
15554 (collect_register_by_name): Likewise.
15555 * regcache.h: Add missing prototypes.
15556 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15557 * server.c (handle_query): New function.
15558 (attached): New static variable, moved out of main.
15559 (main): Quiet longjmp clobber warnings.
15560 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15561 * utils.c (error): Remove NORETURN.