1 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3 * gdbthread.h: Include "common-gdbthread.h".
4 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5 "if" when validating the ptid.
6 * remote-utils.c: Include "gdbthread.h".
7 (prepare_resume_reply): Use "switch_to_thread".
8 * target.c (done_accessing_memory): Likewise.
10 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
12 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
13 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
14 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
15 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
16 s390x-gs-linux64-ipa.o to ipa_obj.
17 * linux-s390-low.c (HWCAP_S390_GS): New define.
18 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
20 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
21 (s390_arch_setup): Check for guarded-storage support and choose
23 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
24 init_registers_s390x_gs_linux64.
25 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
27 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
28 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
30 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
32 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
34 2017-09-21 Kevin Buettner <kevinb@redhat.com>
36 * linux-low.h (struct lwp_info): Add new field, thread_handle.
37 (thread_db_thread_handle): Declare.
38 * linux-low.c (linux_target_ops): Initialize thread_handle.
39 * server.c (handle_qxfer_threads_worker): Add support for
41 * target.h (struct target_ops): Add new function pointer,
43 (target_thread_handle): Define.
44 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
46 (thread_db_thread_handle): New function.
48 2017-09-21 Kevin Buettner <kevinb@redhat.com>
50 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
51 * linux-low.h (thread_db_notice_clone): Declare.
52 * thread-db.c (thread_db_notice_clone): New function.
54 2017-09-21 Pedro Alves <palves@redhat.com>
56 * server.c (gdb_read_memory, handle_status, process_serial_event)
57 (handle_serial_event, handle_target_event): Adjust to
58 set_desired_thread prototype change.
59 * target.c (set_desired_thread): Remove 'use_general' parameter
61 * target.h (set_desired_thread): Remove 'use_general' parameter.
63 2017-09-20 Tom Tromey <tom@tromey.com>
65 * target.c (target_terminal::terminal_state): Define.
66 (target_terminal::init): Rename from target_terminal_init.
67 (target_terminal::inferior): Rename from
68 target_terminal_inferior.
69 (target_terminal::ours): Rename from target_terminal_ours.
70 (target_terminal::ours_for_output, target_terminal::info): New.
72 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
74 * server.c (accumulate_file_name_length): Remove.
75 (emit_dll_description): Adjust to std::string change.
76 (handle_qxfer_libraries): Use std::string to hold document.
78 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
80 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
81 return type of xml_escape_text.
82 * server.c (emit_dll_description): Likewise.
84 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
86 * server.c (captured_main): Accept argument for --selftest.
87 Update run_tests call.
88 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
89 when registering selftests.
91 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
93 * regcache.c (get_thread_regcache): Update code to use "std::vector"
94 instead of "VEC" for "target_desc.reg_defs".
95 (regcache_cpy): Likewise.
96 (registers_to_string): Likewise.
97 (registers_from_string): Likewise.
98 (find_regno): Likewise.
99 (supply_regblock): Likewise.
100 (regcache_raw_read_unsigned): Likewise.
101 * tdesc.c (init_target_desc): Likewise.
102 (tdesc_create_reg): Likewise.
103 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
104 (struct target_desc) <reg_defs>: Convert to "std::vector".
105 (target_desc): Do not initialize "reg_defs".
106 (~target_desc): Update code to use "std::vector" instead of "VEC"
107 for "target_desc.reg_defs".
108 (operator==): Likewise.
110 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
112 * inferiors.h (thread_to_gdb_id): Remove.
113 * inferiors.c (thread_to_gdb_id): Remove.
114 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
115 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
116 lynx_store_registers, lynx_read_memory, lynx_write_memory):
118 * nto-low.c (nto_fetch_registers, nto_store_registers,
119 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
121 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
123 * inferiors.h (gdb_id_to_thread_id): Remove.
124 * inferiors.c (gdb_id_to_thread_id): Remove.
125 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
126 removal. Move pid declaration closer to where it's used.
128 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
130 * server.c (handle_detach): New function.
131 (process_serial_event): Move code out, call handle_detach.
133 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
135 * server.c (require_running): Rename to ...
136 (require_running_or_return): ... this ...
137 (require_running_or_break): ... and this.
138 (handle_query, process_serial_event): Adjust.
140 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
142 * linux-low.c (linux_set_resume_request): Remove unused
145 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
147 * server.c (first_thread_of): Remove.
148 (process_serial_event): Replace usage of first_thread_of with
149 find_any_thread_of_pid.
150 * tracepoint.c (same_process_p): Remove.
151 (gdb_agent_about_to_close): Replace usage of same_process_p with
152 find_any_thread_of_pid.
153 * linux-x86-low.c (same_process_callback): Remove.
154 (x86_arch_setup_process_callback): Replace usage of
155 same_process_callback with find_any_thread_of_pid.
156 * thread-db.c (any_thread_of): Remove.
157 (switch_to_process): Replace usage of any_thread_of with
158 find_any_thread_of_pid.
159 * inferiors.c (thread_pid_matches_callback): Remove.
160 (find_thread_process): Adjust to use find_any_thread_of_pid.
162 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
164 * regcache.c (get_thread_regcache): Guard calls to "memset"
167 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
169 * linux-low.c (handle_extended_wait): Use
170 "allocate_target_description" instead of "XNEW".
171 * linux-x86-low.c (initialize_low_arch): Likewise.
173 2017-09-05 Yao Qi <yao.qi@linaro.org>
175 * configure.srv (srv_i386_regobj): Remove.
176 (srv_amd64_regobj): Remove.
177 (srv_regobj): Set it to "" for x86 non-linux targets.
178 * linux-x86-tdesc.c (i386_linux_read_description):
179 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
180 (init_registers_i386): Remove the declaration.
181 (tdesc_i386): Remove the declaration.
182 (lynx_i386_arch_setup): Call i386_create_target_description.
183 * nto-x86-low.c: Likewise.
184 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
185 [!__x86_64__]: include arch/i386.h.
186 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
188 2017-09-05 Yao Qi <yao.qi@linaro.org>
190 * configure.srv (srv_amd64_linux_xmlfiles): Remove
191 i386/amd64-XXX-linux from it.
193 2017-09-05 Yao Qi <yao.qi@linaro.org>
195 * configure.srv: Empty srv_amd64_linux_regobj if $development is
197 (ipa_amd64_linux_regobj): Remove.
198 (ipa_x32_linux_regobj): Remove.
200 2017-09-05 Yao Qi <yao.qi@linaro.org>
202 * Makefile.in (arch-amd64.o): New rule.
203 * configure.srv: Append arch-amd64.o.
204 * linux-amd64-ipa.c: Include common/x86-xstate.h.
205 (get_ipa_tdesc): Call amd64_linux_read_description.
206 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
207 and init_registers_amd64_XXX.
208 * linux-x86-low.c (x86_linux_read_description): Call
209 amd64_linux_read_description.
210 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
211 (initialize_low_arch): Don't call init_registers_x32_XXX and
212 init_registers_amd64_XXX.
213 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
215 [__x86_64__] (amd64_tdesc_test): New function.
216 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
217 and init_registers_amd64_XXX.
218 * linux-x86-tdesc.c: Include arch/amd64.h.
219 (xcr0_to_tdesc_idx): New function.
220 (i386_linux_read_description): New function.
221 (amd64_get_ipa_tdesc_idx): New function.
222 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
223 (amd64_get_ipa_tdesc): Declare.
225 2017-09-05 Yao Qi <yao.qi@linaro.org>
227 * configure.srv (srv_i386_linux_xmlfiles): Remove
228 i386/i386-XXX-linux.xml from it.
230 2017-09-05 Yao Qi <yao.qi@linaro.org>
232 * configure.srv: Set srv_i386_linux_regobj empty if $development
234 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
235 initialize_low_tdesc.
236 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
237 with #if initialize_low_tdesc.
238 * linux-x86-tdesc-selftest.c: New file.
239 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
241 2017-09-05 Yao Qi <yao.qi@linaro.org>
243 * Makefile.in (arch-i386.o): New rule.
244 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
245 (x86_64-*-linux*): Likewise.
246 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
248 (i386_linux_read_description): Remove code and call
249 i386_create_target_description.
250 * tdesc.c (allocate_target_description): New function.
251 * tdesc.h (set_tdesc_architecture): Remove declaration.
252 (set_tdesc_osabi): Likewise.
254 2017-09-05 Yao Qi <yao.qi@linaro.org>
256 * linux-x86-tdesc.c: Don't include <inttypes.h>.
257 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
258 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
260 * server.c (get_features_xml): Call tdesc_get_features_xml.
261 * tdesc.c (set_tdesc_architecture): New function.
262 (set_tdesc_osabi): New function.
263 (tdesc_get_features_xml): New function.
264 (tdesc_create_feature): Add an argument.
265 * tdesc.h (struct target_desc) <features>: New field.
266 <arch, osabi>: New field.
267 (~target_desc): xfree features, arch, and osabi.
268 (target_desc::oerator==): Don't compare .xmltarget.
269 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
270 (set_tdesc_osabi): Likewise.
271 (tdesc_get_features_xml): Likewise.
273 2017-09-05 Yao Qi <yao.qi@linaro.org>
275 * linux-x86-tdesc.c: Include selftest.h.
276 (i386_tdesc_test): New function.
277 (initialize_low_tdesc): Call selftests::register_test.
278 * tdesc.h: Include regdef.h.
279 (target_desc): Override operator == and !=.
281 2017-09-05 Yao Qi <yao.qi@linaro.org>
283 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
285 * linux-i386-ipa.c: Include common/x86-xstate.h
286 (get_ipa_tdesc): Call i386_linux_read_description.
287 (initialize_low_tracepoint): Don't call init_registers_XXX
288 functions, call initialize_low_tdesc instead.
289 * linux-x86-low.c (x86_linux_read_description): Call
290 i386_linux_read_description.
291 (initialize_low_arch): Don't call init_registers_i386_XXX
292 functions, call initialize_low_tdesc.
293 * linux-x86-tdesc.c: New file.
294 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
295 (i386_get_ipa_tdesc_idx): Declare.
296 (i386_get_ipa_tdesc): Declare.
297 (initialize_low_tdesc): Declare.
299 2017-09-05 Yao Qi <yao.qi@linaro.org>
301 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
304 2017-09-05 Yao Qi <yao.qi@linaro.org>
306 * Makefile.in (IPA_OBJS): Add vec-ipa.o
307 * regcache.c (get_thread_regcache): Use VEC_length.
308 (init_register_cache): Likewise.
309 (regcache_cpy): Likewise.
310 (registers_to_string): Iterate reg_defs via VEC_iterate.
311 (find_regno): Likewise.
312 (find_register_by_number): Use VEC_index.
313 (register_size): Call find_register_by_number.
314 (register_data): Call find_register_by_number.
315 (supply_regblock): Use VEC_length.
316 (regcache_raw_read_unsigned): Likewise.
317 * tdesc.c (init_target_desc): Iterate reg_defs via
319 (default_description): Update initializer.
320 (copy_target_description): Don't update field num_registers.
321 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
322 <num_registers>: Remove.
324 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
326 * Makefile.in (.SECONDARY): Define target.
328 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
330 * linux-low.c (linux_wait_1): Adjust.
331 * server.c (queue_stop_reply_callback): Adjust.
333 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
335 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
336 QEnvironmentUnset and QEnvironmentReset packets.
337 (handle_query): Inform remote that QEnvironmentHexEncoded,
338 QEnvironmentUnset and QEnvironmentReset are supported.
340 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
342 * inferiors.h (inferior_target_data): Rename to ...
343 (thread_target_data): ... this.
344 (inferior_regcache_data): Rename to ...
345 (thread_regcache_data): ... this.
346 (set_inferior_regcache_data): Rename to ...
347 (set_thread_regcache_data): ... this.
348 * inferiors.c (inferior_target_data): Rename to ...
349 (thread_target_data): ... this.
350 (inferior_regcache_data): Rename to ...
351 (thread_regcache_data): ... this.
352 (set_inferior_regcache_data): Rename to ...
353 (set_thread_regcache_data): ... this.
354 (free_one_thread): Update.
355 * linux-low.h (get_thread_lwp): Update.
356 * regcache.c (get_thread_regcache): Update.
357 (regcache_invalidate_thread): Update.
358 (free_register_cache_thread): Update.
359 * win32-i386-low.c (update_debug_registers_callback): Update.
360 (win32_get_current_dr): Update.
361 * win32-low.c (thread_rec): Update.
362 (delete_thread_info): Update.
363 (continue_one_thread): Update.
364 (suspend_one_thread): Update.
366 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
368 * inferiors.c (set_inferior_target_data): Remove.
369 * inferiors.h (set_inferior_target_data): Remove.
371 2017-08-18 Yao Qi <yao.qi@linaro.org>
373 * Makefile.in (OBS): Add selftest.o.
374 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
375 * configure, config.in: Re-generated.
376 * server.c: Include common/sefltest.h.
377 (captured_main): Handle option --selftest.
379 2017-08-09 Yao Qi <yao.qi@linaro.org>
381 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
382 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
383 i386-avx-mpx.o and i386-mmx.o.
384 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
385 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
386 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
387 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
388 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
389 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
390 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
391 i386/amd64-avx-mpx.xml.
393 2017-08-09 Yao Qi <yao.qi@linaro.org>
395 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
396 and x32-avx-avx512.o.
397 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
398 i386/x32-avx-avx512.xml.
400 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
402 * tracepoint.h (enum class fast_tpoint_collect_result): New
404 (fast_tracepoint_collecting): Change return type to
405 fast_tpoint_collect_result.
406 * tracepoint.c (fast_tracepoint_collecting): Likewise.
407 * linux-low.h: Include tracepoint.h.
408 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
409 fast_tpoint_collect_result.
410 * linux-low.c (handle_tracepoints): Adjust.
411 (linux_fast_tracepoint_collecting): Change return type to
412 fast_tpoint_collect_result.
413 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
414 linux_wait_1, stuck_in_jump_pad_callback,
415 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
416 proceed_one_lwp): Adjust to type change.
418 2017-07-10 Yao Qi <yao.qi@linaro.org>
420 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
422 2017-06-29 Yao Qi <yao.qi@linaro.org>
424 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
426 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
428 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
430 * Makefile.in (IPA_OBJS): Sort and format one item per line.
432 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
434 * linux-low.c (linux_create_inferior): Adjust code to access the
435 environment information via 'gdb_environ' class.
436 * lynx-low.c (lynx_create_inferior): Likewise.
437 * server.c (our_environ): Make it an instance of 'gdb_environ'.
438 (get_environ): Return a pointer to 'our_environ'.
439 (captured_main): Initialize 'our_environ'.
440 * server.h (get_environ): Adjust prototype.
441 * spu-low.c (spu_create_inferior): Adjust code to access the
442 environment information via 'gdb_environ' class.
444 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
446 * linux-low.c (linux_read_memory, linux_write_memory): Remove
447 usage of "register" keyword.
449 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
451 * configure: Re-generate.
453 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
455 * configure: Re-generate.
457 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
459 * Makefile.in (COMPILE.pre): Add "-x c++".
461 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
463 * fork-child.c: Conditionally include <signal.h>.
465 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
467 * server.c (handle_general_set): Handle new packet
469 (handle_query): Add "QStartupWithShell" to the list of supported
471 (gdbserver_usage): Add help text explaining the
472 new "--startup-with-shell" and "--no-startup-with-shell" CLI
474 (captured_main): Recognize and act upon the presence of the new
477 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
478 Pedro Alves <palves@redhat.com>
480 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
481 * configure: Regenerate.
482 * configure.srv (srv_linux_obj): Add "fork-child.o" and
484 (i[34567]86-*-lynxos*): Likewise.
485 (spu*-*-*): Likewise.
486 * fork-child.c: New file.
487 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
489 (linux_ptrace_fun): New function.
490 (linux_create_inferior): Adjust function prototype to reflect
491 change on "target.h". Adjust function code to use
493 (linux_request_interrupt): Delete "signal_pid".
494 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
495 (lynx_ptrace_fun): New function.
496 (lynx_create_inferior): Adjust function prototype to reflect
497 change on "target.h". Adjust function code to use
499 * nto-low.c (nto_create_inferior): Adjust function prototype and
500 code to reflect change on "target.h". Update comments.
501 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
502 "common-terminal.h" and "environ.h".
503 (terminal_fd): Moved to fork-child.c.
504 (old_foreground_pgrp): Likewise.
505 (restore_old_foreground_pgrp): Likewise.
506 (last_status): Make it global.
507 (last_ptid): Likewise.
508 (our_environ): New variable.
509 (startup_with_shell): Likewise.
510 (program_name): Likewise.
511 (program_argv): Rename to...
512 (program_args): ...this.
513 (wrapper_argv): New variable.
514 (start_inferior): Delete function.
515 (get_exec_wrapper): New function.
516 (get_exec_file): Likewise.
517 (get_environ): Likewise.
518 (prefork_hook): Likewise.
519 (post_fork_inferior): Likewise.
520 (postfork_hook): Likewise.
521 (postfork_child_hook): Likewise.
522 (handle_v_run): Update code to deal with arguments coming from the
523 remote host. Update calls from "start_inferior" to
525 (captured_main): Likewise. Initialize environment variable. Call
527 * server.h (post_fork_inferior): New prototype.
528 (get_environ): Likewise.
529 (last_status): Declare.
530 (last_ptid): Likewise.
531 (signal_pid): Likewise.
532 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
533 (spu_ptrace_fun): New function.
534 (spu_create_inferior): Adjust function prototype to reflect change
535 on "target.h". Adjust function code to use "fork_inferior".
536 * target.c (target_terminal_init): New function.
537 (target_terminal_inferior): Likewise.
538 (target_terminal_ours): Likewise.
539 * target.h: Include <vector>.
540 (struct target_ops) <create_inferior>: Update prototype.
541 (create_inferior): Update macro.
542 * utils.c (gdb_flush_out_err): New function.
543 * win32-low.c (win32_create_inferior): Adjust function prototype
544 and code to reflect change on "target.h".
546 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
548 * inferiors.c (switch_to_thread): New function.
550 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
552 * Makefile.in (SFILE): Add "common/job-control.c".
553 (OBS): Add "job-control.o".
555 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
557 * Makefile: Remove "@host_makefile_frag@".
559 2017-05-05 Pedro Alves <palves@redhat.com>
561 * configure: Regenerate.
563 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
565 * configure: Regenerate.
567 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
569 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
570 software_single_step change of return type to
571 std::vector<CORE_ADDR>.
572 * linux-low.c (install_software_single_step_breakpoints):
574 * linux-low.h (install_software_single_step_breakpoints):
577 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
579 * remote-utils.c: Include "gdb_termios.h" instead of
581 * terminal.h: Delete file.
583 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
585 * server.c: Include <vector>.
586 <program_argv, wrapper_argv>: Convert to std::vector.
587 (start_inferior): Rewrite function to use C++.
588 (handle_v_run): Likewise. Update code that calculates the argv
589 based on the vRun packet; use C++.
590 (captured_main): Likewise.
592 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
594 * server.c (handle_v_cont): Initialize thread_resume::thread
597 2017-04-05 Pedro Alves <palves@redhat.com>
599 * configure: Regenerate.
601 2017-04-05 Pedro Alves <palves@redhat.com>
603 * gdbreplay.c (sync_error): Constify.
604 * linux-x86-low.c (push_opcode): Constify.
606 2017-04-05 Pedro Alves <palves@redhat.com>
608 * win32-low.c (get_child_debug_event)
609 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
610 Report TARGET_WAITKIND_SPURIOUS instead.
612 2017-04-05 Pedro Alves <palves@redhat.com>
614 * remote-utils.c (remote_prepare, remote_open): Constify.
615 * remote-utils.h (remote_prepare, remote_open): Constify.
616 * server.c (captured_main): Constify 'port' handling.
618 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
620 * Makefile.in (clean): Clear .deps.
622 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
624 * .gitignore: Remove generated files, replace with wildcard.
625 * (clean): Replace removal of generated files with wildcard.
626 (version.c): Replace with...
627 (version-generated.c): ...this.
628 (xml-builtin.c): Replace with...
629 (xml-builtin-generated.c): ...this.
630 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
631 (%.c: *regformats*): Replace with...
632 (%-generated.c: *regformats*): ...this.
634 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
636 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
637 (xtensa_fill_gregset): Call collect_register_by_name for
639 (xtensa_store_gregset): Call supply_register_by_name for
642 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
644 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
645 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
646 (xtensa_store_gregset): Call supply_register for all registers in
647 a0_regnum..a0_regnum + C0_NREGS range.
649 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
651 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
652 (ax-ipa.o: ax.c): Remove.
653 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
654 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
655 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
656 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
657 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
659 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
661 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
662 (print-utils-ipa.o: ../common/print-utils.c): Remove.
663 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
664 (errors-ipa.o: ../common/errors.c): Remove.
665 (format-ipa.o: ../common/format.c): Remove.
666 (common-utils-ipa.o: ../common/common-utils.c): Remove.
668 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
670 * Makefile.in (%-ipa.o: %.c): New rule.
671 (tracepoint-ipa.o: tracepoint.c): Remove.
672 (utils-ipa.o: utils.c): Remove.
673 (remote-utils-ipa.o: remote-utils.c): Remove.
674 (regcache-ipa.o: regcache.c): Remove.
675 (i386-linux-ipa.o: i386-linux.c): Remove.
676 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
677 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
678 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
679 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
680 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
681 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
682 (amd64-linux-ipa.o: amd64-linux.c): Remove.
683 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
684 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
685 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
686 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
687 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
688 (aarch64-ipa.o: aarch64.c): Remove.
689 (s390-linux32-ipa.o: s390-linux32.c): Remove.
690 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
691 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
692 (s390-linux64-ipa.o: s390-linux64.c): Remove.
693 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
694 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
695 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
696 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
697 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
698 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
699 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
700 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
701 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
702 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
703 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
704 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
705 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
706 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
707 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
708 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
709 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
710 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
711 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
712 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
713 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
714 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
715 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
716 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
717 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
718 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
719 (tdesc-ipa.o: tdesc.c): Remove.
720 (x32-linux-ipa.o: x32-linux.c): Remove.
721 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
722 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
724 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
726 * Makefile.in (%.o: ../arch/%.c): New rule.
727 (arm.o: ../arch/arm.c): Remove.
728 (arm-linux.o: ../arch/arm-linux.c): Remove.
729 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
730 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
732 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
734 * Makefile.in (%.o: ../nat/%.c): New rule.
735 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
736 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
737 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
738 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
739 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
740 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
741 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
742 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
743 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
744 (linux-personality.o: ../nat/linux-personality.c): Remove.
745 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
746 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
747 (x86-linux.o: ../nat/x86-linux.c): Remove.
748 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
749 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
751 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
753 * Makefile.in (%.o: ../common/%.c): New rule.
754 (signals.o: ../common/signals.c): Remove.
755 (print-utils.o: ../common/print-utils.c): Remove.
756 (rsp-low.o: ../common/rsp-low.c): Remove.
757 (common-utils.o: ../common/common-utils.c): Remove.
758 (posix-strerror.o: ../common/posix-strerror.c): Remove.
759 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
760 (vec.o: ../common/vec.c): Remove.
761 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
762 (xml-utils.o: ../common/xml-utils.c): Remove.
763 (ptid.o: ../common/ptid.c): Remove.
764 (buffer.o: ../common/buffer.c): Remove.
765 (format.o: ../common/format.c): Remove.
766 (filestuff.o: ../common/filestuff.c): Remove.
767 (agent.o: ../common/agent.c): Remove.
768 (errors.o: ../common/errors.c): Remove.
769 (environ.o: ../common/environ.c): Remove.
770 (common-debug.o: ../common/common-debug.c): Remove.
771 (cleanups.o: ../common/cleanups.c): Remove.
772 (common-exceptions.o: ../common/common-exceptions.c): Remove.
773 (fileio.o: ../common/fileio.c): Remove.
774 (common-regcache.o: ../common/common-regcache.c): Remove.
775 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
776 (new-op.o: ../common/new-op.c): Remove.
777 (btrace-common.o: ../common/btrace-common.c): Remove.
779 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
781 * Makefile.in (%.o: ../target/%.c): New rule.
782 (waitstatus.o: ../target/waitstatus.c): Remove.
784 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
787 (%.c: ../regformats/%.dat,
788 (%.c: ../regformats/arm/%.dat,
789 (%.c: ../regformats/i386/%.dat,
790 (%.c: ../regformats/rs6000/%.dat): New rules.
793 (arm-with-iwmmxt.c): Remove.
794 (arm-with-vfpv2.c): Remove.
795 (arm-with-vfpv3.c): Remove.
796 (arm-with-neon.c): Remove.
797 (reg-bfin.c): Remove.
798 (reg-cris.c): Remove.
799 (reg-crisv32.c): Remove.
801 (i386-linux.c): Remove.
802 (i386-avx.c): Remove.
803 (i386-avx-linux.c): Remove.
804 (i386-avx-avx512.c): Remove.
805 (i386-avx-avx512-linux.c): Remove.
806 (i386-mpx.c): Remove.
807 (i386-mpx-linux.c): Remove.
808 (i386-avx-mpx-avx512-pku.c): Remove.
809 (i386-avx-mpx-avx512-pku-linux.c): Remove.
810 (i386-avx-mpx.c): Remove.
811 (i386-avx-mpx-linux.c): Remove.
812 (i386-mmx.c): Remove.
813 (i386-mmx-linux.c): Remove.
814 (reg-ia64.c): Remove.
815 (reg-m32r.c): Remove.
816 (reg-m68k.c): Remove.
818 (mips-linux.c): Remove.
819 (mips-dsp-linux.c): Remove.
820 (mips64-linux.c): Remove.
821 (mips64-dsp-linux.c): Remove.
822 (nios2-linux.c): Remove.
823 (powerpc-32.c): Remove.
824 (powerpc-32l.c): Remove.
825 (powerpc-altivec32l.c): Remove.
826 (powerpc-cell32l.c): Remove.
827 (powerpc-vsx32l.c): Remove.
828 (powerpc-isa205-32l.c): Remove.
829 (powerpc-isa205-altivec32l.c): Remove.
830 (powerpc-isa205-vsx32l.c): Remove.
831 (powerpc-e500l.c): Remove.
832 (powerpc-64l.c): Remove.
833 (powerpc-altivec64l.c): Remove.
834 (powerpc-cell64l.c): Remove.
835 (powerpc-vsx64l.c): Remove.
836 (powerpc-isa205-64l.c): Remove.
837 (powerpc-isa205-altivec64l.c): Remove.
838 (powerpc-isa205-vsx64l.c): Remove.
839 (s390-linux32.c): Remove.
840 (s390-linux32v1.c): Remove.
841 (s390-linux32v2.c): Remove.
842 (s390-linux64.c): Remove.
843 (s390-linux64v1.c): Remove.
844 (s390-linux64v2.c): Remove.
845 (s390-te-linux64.c): Remove.
846 (s390-vx-linux64.c): Remove.
847 (s390-tevx-linux64.c): Remove.
848 (s390x-linux64.c): Remove.
849 (s390x-linux64v1.c): Remove.
850 (s390x-linux64v2.c): Remove.
851 (s390x-te-linux64.c): Remove.
852 (s390x-vx-linux64.c): Remove.
853 (s390x-tevx-linux64.c): Remove.
854 (tic6x-c64xp-linux.c): Remove.
855 (tic6x-c64x-linux.c): Remove.
856 (tic6x-c62x-linux.c): Remove.
858 (reg-sparc64.c): Remove.
861 (amd64-linux.c): Remove.
862 (amd64-avx.c): Remove.
863 (amd64-avx-linux.c): Remove.
864 (amd64-avx-avx512.c): Remove.
865 (amd64-avx-avx512-linux.c): Remove.
866 (amd64-mpx.c): Remove.
867 (amd64-mpx-linux.c): Remove.
868 (amd64-avx-mpx-avx512-pku.c): Remove.
869 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
870 (amd64-avx-mpx.c): Remove.
871 (amd64-avx-mpx-linux.c): Remove.
873 (x32-linux.c): Remove.
875 (x32-avx-linux.c): Remove.
876 (x32-avx-avx512.c): Remove.
877 (x32-avx-avx512-linux.c): Remove.
878 (reg-xtensa.c): Remove.
879 (reg-tilegx.c): Remove.
880 (reg-tilegx32.c): Remove.
882 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
884 * Makefile.in (SFILES): Add "common/environ.c".
885 (OBJS): Add "common/environ.h".
887 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
889 * configure.ac: Check if the fs_base and gs_base members of
890 `struct user_regs_struct' exist.
891 * config.in: Regenerated.
892 * configure: Likewise.
894 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
896 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
898 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
899 (get_next_pcs_syscall_next_pc): Likewise.
901 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
903 * win32-i386-low.c: Fix incorrect reference to a couple source files.
904 * nto-x86-low.c: Likewise.
906 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
908 * Makefile.in: Include disable-implicit-rules.mk.
910 2016-11-23 Pedro Alves <palves@redhat.com>
912 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
913 (debug_vprintf): Use std::chrono::steady_clock instead of
914 gettimeofday. Use '.' instead of ':'.
915 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
916 (get_timestamp): Use std::chrono::steady_clock instead of
919 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
921 * Makefile.in: Fix whitespace formatting.
923 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
925 * Makefile.in (SFILES, OBS): Flatten list and order
928 2016-11-23 Pedro Alves <palves@redhat.com>
930 * event-loop.c (handle_file_event): Use warning.
931 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
932 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
935 2016-11-23 Pedro Alves <palves@redhat.com>
937 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
939 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
940 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
941 debug_printf and debug_flush for debug output.
942 * server.c (handle_general_set): Likewise.
943 * thread-db.c (try_thread_db_load): Use debug_printf for debug
946 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
948 * Makefile.in (.c.o): Replace rule with ...
949 (%.o: %.c): ... this one.
951 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
953 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
954 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
956 * configure.ac: Remove checks for the make program.
957 * configure: Re-generate.
959 2016-10-28 Pedro Alves <palves@redhat.com>
961 * Makefile.in (CXX_DIALECT): Get from configure.
962 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
963 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
964 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
965 * config.in: Regenerate.
966 * configure: Regenerate.
968 2016-10-27 Yao Qi <yao.qi@linaro.org>
970 * linux-low.c (linux_supports_range_stepping): Return true if
971 can_software_single_step return true.
973 2016-10-27 Yao Qi <yao.qi@linaro.org>
975 * inferiors.c (find_inferior_in_random): New function.
976 * inferiors.h (find_inferior_in_random): Declare.
977 * linux-low.c (linux_wait_for_event_filtered): Call
978 find_inferior_in_random instead of find_inferior.
980 2016-10-27 Yao Qi <yao.qi@linaro.org>
982 * linux-low.c (linux_wait_1): If single-step breakpoints are
983 inserted, remove them.
985 2016-10-26 Pedro Alves <palves@redhat.com>
987 * linux-low.c (handle_extended_wait): Link parent/child fork
989 (linux_wait_1): Unlink them.
990 (linux_set_resume_request): Ignore resume requests for
991 already-resumed and unhandled fork child threads.
992 * linux-low.h (struct lwp_info) <fork_relative>: New field.
993 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
995 (handle_v_requests) <vCont>: Don't call require_running.
996 * server.h (in_queued_stop_replies): New declaration.
998 2016-10-24 Yao Qi <yao.qi@linaro.org>
1001 * linux-aarch64-low.c (append_insns): Cast the return value to
1004 2016-10-10 Yao Qi <yao.qi@linaro.org>
1006 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1008 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1010 * target.c (target_supports_multi_process): New function, moved
1012 * target.h (target_supports_multi_process): ... here. Remove
1015 2016-10-05 Tom Tromey <tom@tromey.com>
1018 * tracepoint.c (handle_tracepoint_bkpts): Check
1019 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1021 2016-10-05 Yao Qi <yao.qi@linaro.org>
1023 * configure.srv: Update the path of arm-*.xml files.
1025 2016-10-05 Terry Guo <terry.guo@arm.com>
1026 Yao Qi <yao.qi@linaro.org>
1028 * Makefile.in: Adjust the path of rules.
1029 * configure.srv: Update the path of xml files.
1030 * regformats/arm-with-iwmmxt.dat: Regenerated.
1031 * regformats/arm-with-neon.dat: Likewise.
1032 * regformats/arm-with-vfpv2.dat: Likewise.
1033 * regformats/arm-with-vfpv3.dat Likewise.
1035 2016-09-30 Yao Qi <yao.qi@linaro.org>
1038 * target.c (target_stop_and_wait): Don't call
1039 target_continue_no_signal, use resume_stop instead.
1041 2016-09-26 Yao Qi <yao.qi@linaro.org>
1043 * linux-low.c (linux_wait_1): Call debug_exit.
1045 2016-09-23 Pedro Alves <palves@redhat.com>
1047 * Makefile.in (SFILES): Add common/new-op.c.
1048 (OBS): Add common/new-op.o.
1049 (new-op.o): New rule.
1051 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1053 * .gitinore: Ignore more files.
1055 2016-09-21 Yao Qi <yao.qi@linaro.org>
1057 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1060 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1062 * server.c (start_inferior): Call target_mourn_inferior instead of
1063 mourn_inferior; pass ptid_t argument to it.
1065 (handle_target_event): Likewise.
1066 * target.c (target_mourn_inferior): New function.
1067 * target.h (mourn_inferior): Delete macro.
1069 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1071 * linux-low.c (lwp_is_stepping): New function.
1073 2016-09-06 Carl Love <cel@us.ibm.com>
1075 * server.c (start_inferior): Fixed comment, requested comment change
1076 didn't get updated correctly. Removed reference to ptrace () call as
1077 it is only true on Linux systems.
1079 2016-09-06 Carl Love <cel@us.ibm.com>
1081 * server.c (start_inferior): Do not call
1082 function target_post_create_inferior () if the
1083 inferior process has already exited.
1085 2016-09-05 Pedro Alves <palves@redhat.com>
1087 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1088 (COMPILE.pre, CC_LD): Use CXX directly.
1089 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1090 * acinclude.m4: Don't include build-with-cxx.m4.
1091 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1092 * configure: Regenerate.
1094 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1097 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1098 call writing data to own_buf.
1100 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1102 * target.c (mywait): Call target_wait instead of
1104 (target_wait): New function.
1106 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1108 * server.c (start_inferior): New variable 'ptid'. Replace calls
1109 to the_target->resume by target_continue{,_no_signal}, depending
1111 * target.c (target_stop_and_wait): Call target_continue_no_signal
1112 instead of the_target->resume.
1113 (target_continue): New function.
1115 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1117 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1119 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1122 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1124 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1125 * linux-arm-low.c (ps_get_thread_area): Likewise.
1126 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1127 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1128 * linux-mips-low.c (ps_get_thread_area): Likewise.
1129 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1130 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1131 * linux-x86-low.c (ps_get_thread_area): Likewise.
1132 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1134 2016-08-19 Pedro Alves <palves@redhat.com>
1136 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1138 2016-08-19 Pedro Alves <palves@redhat.com>
1140 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1141 comment. Use memcpy instead of casting through unsigned long.
1143 2016-08-19 Pedro Alves <palves@redhat.com>
1145 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1146 allocating around 0x80000000.
1148 2016-08-19 Pedro Alves <palves@redhat.com>
1151 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1152 (x32-avx512-linux-ipa.o): New rules.
1153 * configure.ac (x86_64-*-linux*): New x32 check.
1154 * configure.srv (ipa_x32_linux_regobj): New.
1155 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1156 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1158 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1160 * configure: Regenerate.
1162 2016-08-09 Pedro Alves <palves@redhat.com>
1165 * Makefile.in (OBS): Add signals-state-save-restore.o.
1166 (signals-state-save-restore.o): New rule.
1167 * config.in: Regenerate.
1168 * configure: Regenerate.
1169 * linux-low.c: Include "signals-state-save-restore.h".
1170 (linux_create_inferior): Call
1171 restore_original_signals_state.
1172 * server.c: Include "dispositions-save-restore.h".
1173 (captured_main): Call save_original_signals_state.
1175 2016-08-05 Pedro Alves <palves@redhat.com>
1177 * configure: Regenerate.
1179 2016-08-04 Yao Qi <yao.qi@linaro.org>
1181 * linux-low.c (regsets_fetch_inferior_registers): Check
1182 errno is ESRCH or not.
1184 2016-08-02 Yao Qi <yao.qi@linaro.org>
1186 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1187 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1188 (thread_db_load_search): Update.
1189 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1190 td_ta_set_event and td_ta_event_getmsg.
1192 2016-07-26 Pedro Alves <palves@redhat.com>
1195 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1196 of unsigned long for 64-bit registers and use uint32_t instead of
1197 unsigned int for 32-bit registers.
1199 2016-07-26 Pedro Alves <palves@redhat.com>
1201 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1204 2016-07-21 Tom Tromey <tom@tromey.com>
1206 * configure: Rebuild.
1208 2016-07-21 Yao Qi <yao.qi@linaro.org>
1210 * mem-break.c (find_gdb_breakpoint): Cast bp to
1211 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1213 2016-07-21 Yao Qi <yao.qi@linaro.org>
1215 * server.c (handle_v_requests): Support s and S actions
1216 if target_supports_software_single_step return true.
1218 2016-07-21 Yao Qi <yao.qi@linaro.org>
1220 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1221 is resume_step, call maybe_hw_step.
1222 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1224 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1226 (proceed_one_lwp): If resume request is resume_step, install
1227 reinsert breakpoints and call maybe_hw_step.
1229 2016-07-21 Yao Qi <yao.qi@linaro.org>
1231 * linux-low.c (proceed_one_lwp): Declare.
1232 (linux_resume_one_thread): Remove local variable 'step'.
1233 Lift code enqueue signal. Call proceed_one_lwp instead of
1234 linux_resume_one_lwp.
1236 2016-07-21 Yao Qi <yao.qi@linaro.org>
1238 * linux-low.c (linux_resume_one_thread): Call
1239 enqueue_pending_signal.
1241 2016-07-21 Yao Qi <yao.qi@linaro.org>
1243 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1244 * inferiors.c (do_restore_current_thread_cleanup): New function.
1245 (make_cleanup_restore_current_thread): Likewise.
1246 * linux-low.c (install_software_single_step_breakpoints): Call
1247 make_cleanup_restore_current_thread. Switch current_thread to
1250 2016-07-21 Yao Qi <yao.qi@linaro.org>
1252 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1253 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1254 (clone_one_breakpoint): Likewise.
1255 (delete_reinsert_breakpoints): Change parameter to thread.
1257 (has_reinsert_breakpoints): Likewise.
1258 (uninsert_reinsert_breakpoints): Likewise.
1259 (reinsert_reinsert_breakpoints): Likewise.
1260 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1261 (delete_reinsert_breakpoints): Likewise.
1262 (reinsert_reinsert_breakpoints): Likewise.
1263 (uninsert_reinsert_breakpoints): Likewise.
1264 (has_reinsert_breakpoints): Likewise.
1266 2016-07-21 Yao Qi <yao.qi@linaro.org>
1268 * inferiors.c (get_thread_process): Make parameter const.
1269 * inferiors.h (get_thread_process): Update declaration.
1270 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1271 Add new parameters child_thread and parent_thread. Callers
1273 * mem-break.h (clone_all_breakpoints): Update declaration.
1275 2016-07-21 Yao Qi <yao.qi@linaro.org>
1277 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1278 <command_list, handler>: Remove.
1279 (struct gdb_breakpoint): New.
1280 (struct other_breakpoint): New.
1281 (struct reinsert_breakpoint): New.
1282 (is_gdb_breakpoint): New function.
1283 (any_persistent_commands): Update command_list if
1284 is_gdb_breakpoint returns true.
1285 (set_breakpoint): Create breakpoints according to their types.
1286 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1287 (set_gdb_breakpoint_1): Likewise.
1288 (set_gdb_breakpoint): Likewise.
1289 (clear_breakpoint_conditions): Change parameter type to
1290 'struct gdb_breakpoint *'.
1291 (clear_breakpoint_commands): Likewise.
1292 (clear_breakpoint_conditions_and_commands): Likewise.
1293 (add_condition_to_breakpoint): Likewise.
1294 (add_breakpoint_condition): Likewise.
1295 (add_commands_to_breakpoint): Likewise.
1296 (check_breakpoints): Check other_breakpoint.
1297 (clone_one_breakpoint): Clone breakpopint according to its type.
1298 * mem-break.h (struct gdb_breakpoint): Declare.
1299 (set_gdb_breakpoint): Update declaration.
1300 (clear_breakpoint_conditions_and_commands): Likewise.
1301 (add_breakpoint_condition): Likewise.
1302 (add_breakpoint_commands): Likewise.
1303 * server.c (process_point_options): Change parameter type to
1304 'struct gdb_breakpoint *'.
1306 2016-07-21 Yao Qi <yao.qi@linaro.org>
1308 * mem-break.c (set_breakpoint_at): Rename it to ...
1309 (set_breakpoint_type_at): ... it.
1310 (set_breakpoint_at): Call set_breakpoint_type_at.
1311 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1312 * mem-break.h (set_breakpoint_at): Update comments.
1314 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1316 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1318 (nios2_store_gregset): Likewise.
1320 2016-07-01 Pedro Alves <palves@redhat.com>
1321 Antoine Tremblay <antoine.tremblay@ericsson.com>
1323 * linux-low.c: Change interface to take the target lwp_info
1324 pointer directly and return void. Handle detaching from a zombie
1326 (linux_detach_lwp_callback): New function.
1327 (linux_detach): Detach from the leader thread after detaching from
1330 2016-06-28 Yao Qi <yao.qi@linaro.org>
1332 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1333 for variable new_offset.
1334 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1335 (aarch64_ftrace_insn_reloc_cb): Likewise.
1336 (aarch64_ftrace_insn_reloc_tb): Likewise.
1337 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1338 PRIx64 instead of PRIx32.
1340 2016-06-28 Yao Qi <yao.qi@linaro.org>
1342 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1343 (the_low_target): Install arm_get_syscall_trapinfo.
1345 2016-06-28 Yao Qi <yao.qi@linaro.org>
1347 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1349 (the_low_target): Install aarch64_get_syscall_trapinfo.
1351 2016-06-28 Yao Qi <yao.qi@linaro.org>
1353 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1355 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1356 Remove parameter sysno.
1357 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1360 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1362 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1363 (s390_emit_ne_goto): Likewise.
1364 (s390_emit_lt_goto): Likewise.
1365 (s390_emit_le_goto): Likewise.
1366 (s390_emit_gt_goto): Likewise.
1367 (s390_emit_ge_goto): Likewise.
1368 (s390x_emit_eq_goto): Likewise.
1369 (s390x_emit_ne_goto): Likewise.
1370 (s390x_emit_lt_goto): Likewise.
1371 (s390x_emit_le_goto): Likewise.
1372 (s390x_emit_gt_goto): Likewise.
1373 (s390x_emit_ge_goto): Likewise.
1374 (s390_emit_ops_impl): Mark variable static.
1375 (s390x_emit_ops): Likewise.
1377 2016-06-17 Yao Qi <yao.qi@linaro.org>
1379 * linux-low.c (handle_extended_wait): Call
1380 uninsert_reinsert_breakpoints for the parent process. Remove
1381 reinsert breakpoints from the child process. Reinsert them to
1382 the parent process when vfork is done.
1383 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1384 (reinsert_reinsert_breakpoints): New function.
1385 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1386 (reinsert_reinsert_breakpoints): Declare.
1388 2016-06-17 Yao Qi <yao.qi@linaro.org>
1390 * linux-low.c (handle_extended_wait): If the parent is doing
1391 step-over, remove the reinsert breakpoints from the forked child.
1393 2016-06-17 Yao Qi <yao.qi@linaro.org>
1395 * linux-low.c (unsuspend_all_lwps): Declare.
1396 (linux_low_filter_event): If thread exited, call finish_step_over.
1397 If step-over is finished, unsuspend other threads.
1399 2016-06-17 Yao Qi <yao.qi@linaro.org>
1401 * linux-low.c (linux_resume_one_lwp_throw): Assert
1402 has_reinsert_breakpoints returns false.
1403 * mem-break.c (delete_disabled_breakpoints): Assert
1404 bp type isn't reinsert_breakpoint.
1406 2016-06-17 Yao Qi <yao.qi@linaro.org>
1408 * linux-low.c (maybe_hw_step): New function.
1409 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1410 (finish_step_over): Switch current_thread to lwp temporarily,
1411 and assert has_reinsert_breakpoints returns true.
1412 (proceed_one_lwp): Call maybe_hw_step.
1413 * mem-break.c (has_reinsert_breakpoints): New function.
1414 * mem-break.h (has_reinsert_breakpoints): Declare.
1416 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1418 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1420 2016-05-17 Yao Qi <yao.qi@linaro.org>
1422 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1423 instead of find_inferior.
1425 2016-05-05 Yao Qi <yao.qi@linaro.org>
1427 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1428 Initialize res to zero.
1430 2016-05-05 Yao Qi <yao.qi@linaro.org>
1432 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1435 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1437 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1438 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1439 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1441 2016-04-28 Par Olsson <par.olsson@windriver.com>
1442 Simon Marchi <simon.marchi@ericsson.com>
1444 * tracepoint.c (write_inferior_int8): New function.
1445 (cmd_qtenable_disable): Write enable flag using
1446 write_inferior_int8.
1448 2016-04-25 Yao Qi <yao.qi@linaro.org>
1450 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1451 (need_step_over_p): Return zero if the LWP has pending signals
1452 can be delivered on software single step target.
1454 2016-04-25 Yao Qi <yao.qi@linaro.org>
1456 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1457 return instead of error.
1459 2016-04-22 Yao Qi <yao.qi@linaro.org>
1461 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1464 2016-04-22 Yao Qi <yao.qi@linaro.org>
1466 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1467 signal when stepping over breakpoint with software single
1470 2016-04-21 Pedro Alves <palves@redhat.com>
1472 * linux-s390-low.c (s390_collect_ptrace_register)
1473 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1475 (s390_check_regset): Use void * instead of gdb_byte *.
1477 2016-04-20 Pedro Alves <palves@redhat.com>
1479 * configure: Renegerate.
1481 2016-04-20 Yao Qi <yao.qi@linaro.org>
1483 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1484 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1486 (arm_store_gregset): Likewise.
1488 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1490 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1491 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1492 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1493 (amd64-avx-mpx-linux.c): New rules.
1494 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1495 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1496 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1497 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1498 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1499 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1500 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1501 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1502 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1503 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1504 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1505 * linux-x86-low.c (x86_linux_read_description): Add case for
1506 X86_XSTATE_AVX_MPX_MASK.
1507 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1508 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1509 init_registers_i386_avx_mpx_linux.
1510 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1511 (initialize_low_tracepoint): Call
1512 init_registers_i386_avx_mpx_linux.
1513 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1514 (initialize_low_tracepoint): Call
1515 init_registers_amd64_avx_mpx_linux.
1516 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1517 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1518 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1521 2016-04-18 Pedro Alves <palves@redhat.com>
1523 * configure: Regenerate.
1525 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1527 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1528 (aarch64_emit_sub): Likewise.
1530 2016-04-12 Pedro Alves <palves@redhat.com>
1532 * utils.c (prepare_to_throw_exception): Delete.
1534 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1536 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1538 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1540 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1542 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1544 * linux-aarch64-ipa.c: Add <elf.h> include.
1545 * linux-ppc-ipa.c: Add <elf.h> include.
1546 * linux-s390-ipa.c: Add <elf.h> include.
1548 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1550 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1551 (get_raw_reg_ptr): Likewise.
1552 (get_trace_state_variable_value_ptr): Likewise.
1553 (set_trace_state_variable_value_ptr): Likewise.
1554 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1557 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1558 Marcin Kościelnicki <koriakin@0x04.net>
1561 * linux-ppc-low.c (emit_insns): New function.
1562 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1563 (ppc_emit_prologue): New function.
1564 (ppc_emit_epilogue): New function.
1565 (ppc_emit_add): New function.
1566 (ppc_emit_sub): New function.
1567 (ppc_emit_mul): New function.
1568 (ppc_emit_lsh): New function.
1569 (ppc_emit_rsh_signed): New function.
1570 (ppc_emit_rsh_unsigned): New function.
1571 (ppc_emit_ext): New function.
1572 (ppc_emit_zero_ext): New function.
1573 (ppc_emit_log_not): New function.
1574 (ppc_emit_bit_and): New function.
1575 (ppc_emit_bit_or): New function.
1576 (ppc_emit_bit_xor): New function.
1577 (ppc_emit_bit_not): New function.
1578 (ppc_emit_equal): New function.
1579 (ppc_emit_less_signed): New function.
1580 (ppc_emit_less_unsigned): New function.
1581 (ppc_emit_ref): New function.
1582 (ppc_emit_const): New function.
1583 (ppc_emit_reg): New function.
1584 (ppc_emit_pop): New function.
1585 (ppc_emit_stack_flush): New function.
1586 (ppc_emit_swap): New function.
1587 (ppc_emit_stack_adjust): New function.
1588 (ppc_emit_call): New function.
1589 (ppc_emit_int_call_1): New function.
1590 (ppc_emit_void_call_2): New function.
1591 (ppc_emit_if_goto): New function.
1592 (ppc_emit_goto): New function.
1593 (ppc_emit_eq_goto): New function.
1594 (ppc_emit_ne_goto): New function.
1595 (ppc_emit_lt_goto): New function.
1596 (ppc_emit_le_goto): New function.
1597 (ppc_emit_gt_goto): New function.
1598 (ppc_emit_ge_goto): New function.
1599 (ppc_write_goto_address): New function.
1600 (ppc_emit_ops_impl): New static variable.
1601 (ppc64v1_emit_prologue): New function.
1602 (ppc64v2_emit_prologue): New function.
1603 (ppc64_emit_epilogue): New function.
1604 (ppc64_emit_add): New function.
1605 (ppc64_emit_sub): New function.
1606 (ppc64_emit_mul): New function.
1607 (ppc64_emit_lsh): New function.
1608 (ppc64_emit_rsh_signed): New function.
1609 (ppc64_emit_rsh_unsigned): New function.
1610 (ppc64_emit_ext): New function.
1611 (ppc64_emit_zero_ext): New function.
1612 (ppc64_emit_log_not): New function.
1613 (ppc64_emit_bit_and): New function.
1614 (ppc64_emit_bit_or): New function.
1615 (ppc64_emit_bit_xor): New function.
1616 (ppc64_emit_bit_not): New function.
1617 (ppc64_emit_equal): New function.
1618 (ppc64_emit_less_signed): New function.
1619 (ppc64_emit_less_unsigned): New function.
1620 (ppc64_emit_ref): New function.
1621 (ppc64_emit_const): New function.
1622 (ppc64v1_emit_reg): New function.
1623 (ppc64v2_emit_reg): New function.
1624 (ppc64_emit_pop): New function.
1625 (ppc64_emit_stack_flush): New function.
1626 (ppc64_emit_swap): New function.
1627 (ppc64v1_emit_call): New function.
1628 (ppc64v2_emit_call): New function.
1629 (ppc64v1_emit_int_call_1): New function.
1630 (ppc64v2_emit_int_call_1): New function.
1631 (ppc64v1_emit_void_call_2): New function.
1632 (ppc64v2_emit_void_call_2): New function.
1633 (ppc64_emit_if_goto): New function.
1634 (ppc64_emit_eq_goto): New function.
1635 (ppc64_emit_ne_goto): New function.
1636 (ppc64_emit_lt_goto): New function.
1637 (ppc64_emit_le_goto): New function.
1638 (ppc64_emit_gt_goto): New function.
1639 (ppc64_emit_ge_goto): New function.
1640 (ppc64v1_emit_ops_impl): New static variable.
1641 (ppc64v2_emit_ops_impl): New static variable.
1642 (ppc_emit_ops): New function.
1643 (linux_low_target): Wire in ppc_emit_ops.
1645 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1646 Marcin Kościelnicki <koriakin@0x04.net>
1649 * Makefile.in: Add powerpc-*-ipa.o
1650 * configure.srv: Add ipa_obj for powerpc*-linux.
1651 * linux-ppc-ipa.c: New file.
1652 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1654 (PPC_FIELD): New macro.
1655 (PPC_SEXT): New macro.
1656 (PPC_OP6): New macro.
1657 (PPC_BO): New macro.
1658 (PPC_LI): New macro.
1659 (PPC_BD): New macro.
1660 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1661 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1662 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1663 (ppc_get_thread_area): New function.
1664 (is_elfv2_inferior): New function.
1665 (gen_ds_form): New function.
1666 (GEN_STD): New macro.
1667 (GEN_STDU): New macro.
1668 (GEN_LD): New macro.
1669 (GEN_LDU): New macro.
1670 (gen_d_form): New function.
1671 (GEN_ADDI): New macro.
1672 (GEN_ADDIS): New macro.
1673 (GEN_LI): New macro.
1674 (GEN_LIS): New macro.
1675 (GEN_ORI): New macro.
1676 (GEN_ORIS): New macro.
1677 (GEN_LWZ): New macro.
1678 (GEN_STW): New macro.
1679 (GEN_STWU): New macro.
1680 (gen_xfx_form): New function.
1681 (GEN_MFSPR): New macro.
1682 (GEN_MTSPR): New macro.
1683 (GEN_MFCR): New macro.
1684 (GEN_MTCR): New macro.
1685 (GEN_SYNC): New macro.
1686 (GEN_LWSYNC): New macro.
1687 (gen_x_form): New function.
1688 (GEN_OR): New macro.
1689 (GEN_MR): New macro.
1690 (GEN_LWARX): New macro.
1691 (GEN_STWCX): New macro.
1692 (GEN_CMPW): New macro.
1693 (gen_md_form): New function.
1694 (GEN_RLDICL): New macro.
1695 (GEN_RLDICR): New macro.
1696 (gen_i_form): New function.
1698 (GEN_BL): New macro.
1699 (gen_b_form): New function.
1700 (GEN_BNE): New macro.
1701 (GEN_LOAD): New macro.
1702 (GEN_STORE): New macro.
1703 (gen_limm): New function.
1704 (gen_atomic_xchg): New function.
1705 (gen_call): New function.
1706 (ppc_relocate_instruction): New function.
1707 (ppc_install_fast_tracepoint_jump_pad): New function.
1708 (ppc_get_min_fast_tracepoint_insn_len): New function.
1709 (ppc_get_ipa_tdesc_idx): New function.
1710 (the_low_target): Wire in the new functions.
1711 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1713 * linux-ppc-tdesc.h: New file.
1715 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1717 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1718 (alloc_jump_pad_buffer): New function.
1719 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1720 (alloc_jump_pad_buffer): New function.
1721 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1722 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1723 (alloc_jump_pad_buffer): New function.
1724 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1725 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1726 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1727 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1729 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1731 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1732 * linux-amd64-ipa.c: Likewise.
1733 * linux-i386-ipa.c: Likewise.
1734 * linux-s390-ipa.c: Likewise.
1735 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1736 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1737 set_trace_state_variable_value_ptr.
1738 (struct ipa_sym_addresses): Likewise.
1739 (symbol_list): Likewise.
1740 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1741 accessing gdb_collect directly.
1742 (gdb_collect_ptr_type): New typedef.
1743 (get_raw_reg_ptr_type): New typedef.
1744 (get_trace_state_variable_value_ptr_type): New typedef.
1745 (set_trace_state_variable_value_ptr_type): New typedef.
1746 (gdb_collect_ptr): New global.
1747 (get_raw_reg_ptr): New global.
1748 (get_trace_state_variable_value_ptr): New global.
1749 (set_trace_state_variable_value_ptr): New global.
1750 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1751 accessing get_raw_reg directly.
1752 (get_get_tsv_func_addr): Likewise for
1753 get_trace_state_variable_value_ptr.
1754 (get_set_tsv_func_addr): Likewise for
1755 set_trace_state_variable_value_ptr.
1756 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1758 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1760 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1762 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1764 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1766 (relocate_instruction): Remove own_buf.
1767 * server.c (own_buf): Make global.
1768 (handle_v_requests): Make global.
1769 * server.h (own_buf): New declaration.
1770 (handle_v_requests): New prototype.
1772 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1775 * linux-s390-low.c (add_insns): New function.
1776 (s390_emit_prologue): New function.
1777 (s390_emit_epilogue): New function.
1778 (s390_emit_add): New function.
1779 (s390_emit_sub): New function.
1780 (s390_emit_mul): New function.
1781 (s390_emit_lsh): New function.
1782 (s390_emit_rsh_signed): New function.
1783 (s390_emit_rsh_unsigned): New function.
1784 (s390_emit_ext): New function.
1785 (s390_emit_log_not): New function.
1786 (s390_emit_bit_and): New function.
1787 (s390_emit_bit_or): New function.
1788 (s390_emit_bit_xor): New function.
1789 (s390_emit_bit_not): New function.
1790 (s390_emit_equal): New function.
1791 (s390_emit_less_signed): New function.
1792 (s390_emit_less_unsigned): New function.
1793 (s390_emit_ref): New function.
1794 (s390_emit_if_goto): New function.
1795 (s390_emit_goto): New function.
1796 (s390_write_goto_address): New function.
1797 (s390_emit_litpool): New function.
1798 (s390_emit_const): New function.
1799 (s390_emit_call): New function.
1800 (s390_emit_reg): New function.
1801 (s390_emit_pop): New function.
1802 (s390_emit_stack_flush): New function.
1803 (s390_emit_zero_ext): New function.
1804 (s390_emit_swap): New function.
1805 (s390_emit_stack_adjust): New function.
1806 (s390_emit_set_r2): New function.
1807 (s390_emit_int_call_1): New function.
1808 (s390_emit_void_call_2): New function.
1809 (s390_emit_eq_goto): New function.
1810 (s390_emit_ne_goto): New function.
1811 (s390_emit_lt_goto): New function.
1812 (s390_emit_le_goto): New function.
1813 (s390_emit_gt_goto): New function.
1814 (s390_emit_ge_goto): New function.
1815 (s390x_emit_prologue): New function.
1816 (s390x_emit_epilogue): New function.
1817 (s390x_emit_add): New function.
1818 (s390x_emit_sub): New function.
1819 (s390x_emit_mul): New function.
1820 (s390x_emit_lsh): New function.
1821 (s390x_emit_rsh_signed): New function.
1822 (s390x_emit_rsh_unsigned): New function.
1823 (s390x_emit_ext): New function.
1824 (s390x_emit_log_not): New function.
1825 (s390x_emit_bit_and): New function.
1826 (s390x_emit_bit_or): New function.
1827 (s390x_emit_bit_xor): New function.
1828 (s390x_emit_bit_not): New function.
1829 (s390x_emit_equal): New function.
1830 (s390x_emit_less_signed): New function.
1831 (s390x_emit_less_unsigned): New function.
1832 (s390x_emit_ref): New function.
1833 (s390x_emit_if_goto): New function.
1834 (s390x_emit_const): New function.
1835 (s390x_emit_call): New function.
1836 (s390x_emit_reg): New function.
1837 (s390x_emit_pop): New function.
1838 (s390x_emit_stack_flush): New function.
1839 (s390x_emit_zero_ext): New function.
1840 (s390x_emit_swap): New function.
1841 (s390x_emit_stack_adjust): New function.
1842 (s390x_emit_int_call_1): New function.
1843 (s390x_emit_void_call_2): New function.
1844 (s390x_emit_eq_goto): New function.
1845 (s390x_emit_ne_goto): New function.
1846 (s390x_emit_lt_goto): New function.
1847 (s390x_emit_le_goto): New function.
1848 (s390x_emit_gt_goto): New function.
1849 (s390x_emit_ge_goto): New function.
1850 (s390_emit_ops): New function.
1851 (struct linux_target_ops): Fill in emit_ops hook.
1853 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1856 * Makefile.in: Add s390 IPA files.
1857 * configure.srv: Build IPA for s390.
1858 * linux-s390-ipa.c: New file.
1859 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1860 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1861 (tdesc_s390_linux32): Likewise.
1862 (init_registers_s390_linux32v1): Likewise.
1863 (tdesc_s390_linux32v1): Likewise.
1864 (init_registers_s390_linux32v2): Likewise.
1865 (tdesc_s390_linux32v2): Likewise.
1866 (init_registers_s390_linux64): Likewise.
1867 (tdesc_s390_linux64): Likewise.
1868 (init_registers_s390_linux64v1): Likewise.
1869 (tdesc_s390_linux64v1): Likewise.
1870 (init_registers_s390_linux64v2): Likewise.
1871 (tdesc_s390_linux64v2): Likewise.
1872 (init_registers_s390_te_linux64): Likewise.
1873 (tdesc_s390_te_linux64): Likewise.
1874 (init_registers_s390_vx_linux64): Likewise.
1875 (tdesc_s390_vx_linux64): Likewise.
1876 (init_registers_s390_tevx_linux64): Likewise.
1877 (tdesc_s390_tevx_linux64): Likewise.
1878 (init_registers_s390x_linux64): Likewise.
1879 (tdesc_s390x_linux64): Likewise.
1880 (init_registers_s390x_linux64v1): Likewise.
1881 (tdesc_s390x_linux64v1): Likewise.
1882 (init_registers_s390x_linux64v2): Likewise.
1883 (tdesc_s390x_linux64v2): Likewise.
1884 (init_registers_s390x_te_linux64): Likewise.
1885 (tdesc_s390x_te_linux64): Likewise.
1886 (init_registers_s390x_vx_linux64): Likewise.
1887 (tdesc_s390x_vx_linux64): Likewise.
1888 (init_registers_s390x_tevx_linux64): Likewise.
1889 (tdesc_s390x_tevx_linux64): Likewise.
1890 (have_hwcap_s390_vx): New static variable.
1891 (s390_arch_setup): Fill have_hwcap_s390_vx.
1892 (s390_get_thread_area): New function.
1893 (s390_ft_entry_gpr_esa): New const.
1894 (s390_ft_entry_gpr_zarch): New const.
1895 (s390_ft_entry_misc): New const.
1896 (s390_ft_entry_fr): New const.
1897 (s390_ft_entry_vr): New const.
1898 (s390_ft_main_31): New const.
1899 (s390_ft_main_64): New const.
1900 (s390_ft_exit_fr): New const.
1901 (s390_ft_exit_vr): New const.
1902 (s390_ft_exit_misc): New const.
1903 (s390_ft_exit_gpr_esa): New const.
1904 (s390_ft_exit_gpr_zarch): New const.
1905 (append_insns): New function.
1906 (s390_relocate_instruction): New function.
1907 (s390_install_fast_tracepoint_jump_pad): New function.
1908 (s390_get_min_fast_tracepoint_insn_len): New function.
1909 (s390_get_ipa_tdesc_idx): New function.
1910 (struct linux_target_ops): Wire in the above functions.
1911 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1912 * linux-s390-tdesc.h: New file.
1914 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1916 * linux-s390-low.c (s390_supports_tracepoints): New function.
1917 (struct linux_target_ops): Fill supports_tracepoints hook.
1919 2016-03-18 Yao Qi <yao.qi@linaro.org>
1921 * linux-low.c (lwp_signal_can_be_delivered): New function.
1922 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1924 2016-03-18 Yao Qi <yao.qi@linaro.org>
1926 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1927 0 if signal is enqueued. Remove 'signal' from one debugging
1928 message. Move one debugging message to some lines below.
1929 Remove code setting 'signal' to 0.
1931 2016-03-18 Yao Qi <yao.qi@linaro.org>
1933 * linux-low.c (linux_low_filter_event): Remove redundant
1934 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1936 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1938 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1939 (struct linux_target_ops): Wire in the above.
1941 2016-03-03 Yao Qi <yao.qi@linaro.org>
1943 * linux-low.c: Update comments to start_step_over.
1945 2016-03-03 Yao Qi <yao.qi@linaro.org>
1948 * linux-low.c (handle_extended_wait): Set child suspended
1949 if event_lwp->bp_reinsert isn't zero.
1951 2016-03-02 Yao Qi <yao.qi@linaro.org>
1953 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1954 enqueue_pending_signal.
1956 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1958 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1961 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1963 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1964 (s390_regmap_3264) [!__s390x__]: New global.
1965 (s390_collect_ptrace_register): Skip map entries containing -1.
1966 (s390_supply_ptrace_register): Ditto.
1967 (s390_fill_gprs_high): New function.
1968 (s390_store_gprs_high): New function.
1969 (s390_regsets): Add NT_S390_HIGH_GPRS.
1970 (s390_get_hwcap): Enable on 31-bit.
1971 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1972 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1973 Detect NT_S390_HIGH_GPRS.
1974 (s390_usrregs_info_3264): Enable on 31-bit.
1975 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1976 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1978 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1981 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1982 * configure.srv: Ditto.
1983 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1984 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1985 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1986 (init_registers_amd64_linux): Remove prototype.
1987 (tdesc_amd64_linux): Remove declaration.
1988 (get_ipa_tdesc): New function.
1989 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1990 initialize remaining tdescs.
1991 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1992 (init_registers_i386_linux): Remove prototype.
1993 (tdesc_i386_linux): Remove declaration.
1994 (get_ipa_tdesc): New function.
1995 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1996 initialize remaining tdescs.
1997 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1998 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1999 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2000 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2001 (x86_get_ipa_tdesc_idx): New function.
2002 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2003 * linux-x86-tdesc.h: New file.
2004 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2005 (target_get_ipa_tdesc_idx): New macro.
2006 * tracepoint.c (ipa_tdesc_idx): New macro.
2007 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2008 (symbol_list): Add ipa_tdesc_idx.
2009 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2010 (ipa_tdesc): Remove.
2011 (ipa_tdesc_idx): New variable.
2012 (get_context_regcache): Use get_ipa_tdesc.
2013 (gdb_collect): Ditto.
2015 * tracepoint.h (get_ipa_tdesc): New prototype.
2016 (ipa_tdesc): Remove.
2018 2016-02-24 Pedro Alves <palves@redhat.com>
2020 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2021 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2022 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2023 Factor out common code between the USE_SIGTRAP_SIGINFO and
2024 !USE_SIGTRAP_SIGINFO blocks.
2025 (linux_low_filter_event): Call save_stop_reason instead of
2026 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2028 (linux_wait_1): Update comments.
2030 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2032 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2033 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2034 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2035 ppc_insert_point, ppc_remove_point.
2037 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2039 * linux-s390-low.c (s390_supports_z_point_type): New function.
2040 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2042 2016-02-16 Yao Qi <yao.qi@linaro.org>
2044 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2045 PC. Get pc from regcache_read_pc.
2047 2016-02-12 Yao Qi <yao.qi@linaro.org>
2049 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2050 or linux_get_pc_32bit.
2051 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2053 2016-02-12 Yao Qi <yao.qi@linaro.org>
2055 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2056 arm_linux_get_next_pcs_fixup.
2058 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2060 * tracepoint.c (x_tracepoint_action_download): Change
2061 write_inferior_data_ptr to write_inferior_data_pointer.
2062 (cmd_qtstart): Likewise.
2063 (write_inferior_data_ptr): Remove.
2064 (download_agent_expr): Change write_inferior_data_ptr to
2065 write_inferior_data_pointer.
2066 (download_tracepoint_1): Likewise.
2067 (download_tracepoint): Likewise.
2068 (download_trace_state_variables): Likewise.
2070 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2071 Marcin Kościelnicki <koriakin@0x04.net>
2073 * tracepoint.c (struct tracepoint_action_ops): Remove.
2074 (struct tracepoint_action): Remove ops.
2075 (m_tracepoint_action_download, r_tracepoint_action_download)
2076 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2077 size and offset accordingly.
2078 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2079 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2080 (tracepoint_action_send, tracepoint_action_download): New functions.
2081 Helpers for trace action handlers.
2082 (add_tracepoint_action): Remove setup actions ops.
2083 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2085 2016-02-10 Yao Qi <yao.qi@linaro.org>
2087 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2089 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2091 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2093 * configure: Regenerate.
2095 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2097 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2098 void * to gdb_byte *.
2099 * linux-low.c (siginfo_fixup): Likewise.
2100 (linux_xfer_siginfo): Likewise.
2101 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2103 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2105 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2107 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2109 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2111 * linux-x86-low.c [__x86_64__]: Include
2112 "nat/amd64-linux-siginfo.h".
2113 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2114 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2115 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2116 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2117 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2118 (cpt_si_fd, si_timerid, si_overrun): Move from
2119 nat/amd64-linux-siginfo.c.
2120 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2122 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2124 * server.c (skip_to_semicolon): Remove.
2125 (process_point_options): Use strchrnul instead of
2128 2016-01-26 Yao Qi <yao.qi@linaro.org>
2130 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2131 * linux-low.c (install_software_single_step_breakpoints): Don't
2132 call regcache_read_pc.
2133 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2136 2016-01-26 Yao Qi <yao.qi@linaro.org>
2138 * linux-low.c (install_software_single_step_breakpoints): Call
2139 regcache_read_pc instead of get_pc.
2141 2016-01-26 Yao Qi <yao.qi@linaro.org>
2143 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2144 (unblock_async_io): Rename to ...
2145 (block_unblock_async_io): ... it. New function.
2146 (enable_async_io): Don't install SIGIO handler. Unblock it
2148 (disable_async_io): Don't ignore SIGIO. Block it instead.
2149 (initialize_async_io): Install SIGIO handler. Don't call
2152 2016-01-26 Yao Qi <yao.qi@linaro.org>
2154 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2155 first character is '\003', call *the_target->request_interrupt.
2157 2016-01-25 Yao Qi <yao.qi@linaro.org>
2159 * remote-utils.c (new_thread_notify): Remove.
2160 (dead_thread_notify): Likewise.
2161 * remote-utils.h (new_thread_notify): Remove declaration.
2162 (dead_thread_notify): Likewise.
2164 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2166 * gdb.trace/pending.exp: Fix expected message on continue.
2168 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2170 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2171 it works properly on big-endian machines where sizeof (CORE_ADDR)
2174 2016-01-21 Pedro Alves <palves@redhat.com>
2176 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2177 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2178 * configure: Regenerate.
2180 2016-01-21 Yao Qi <yao.qi@linaro.org>
2182 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2183 is_thumb and set it according to CPSR saved on the stack.
2184 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2185 arm_sigreturn_next_pc.
2187 2016-01-18 Yao Qi <yao.qi@linaro.org>
2189 * linux-low.c (linux_set_pc_64bit): New function.
2190 (linux_get_pc_64bit): New function.
2191 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2193 * linux-sparc-low.c (debug_threads): Remove declaration.
2194 (sparc_get_pc): Remove.
2195 (the_low_target): Use linux_get_pc_64bit instead of
2197 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2198 (the_low_target): Use linux_get_pc_64bit and
2201 2016-01-18 Yao Qi <yao.qi@linaro.org>
2203 * linux-arm-low.c (debug_threads): Remove declaration.
2204 (arm_get_pc, arm_set_pc): Remove.
2205 (the_low_target): Use linux_get_pc_32bit and
2207 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2208 (the_low_target): Use linux_get_pc_32bit and
2210 * linux-cris-low.c (debug_threads): Remove declaration.
2211 (cris_get_pc, cris_set_pc,): Remove.
2212 (the_low_target): Use linux_get_pc_32bit and
2214 * linux-crisv32-low.c (debug_threads): Remove declaration.
2215 (cris_get_pc, cris_set_pc): Remove.
2216 (the_low_target): Use linux_get_pc_32bit and
2218 * linux-low.c: Include inttypes.h.
2219 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2220 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2221 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2222 (the_low_target): Use linux_get_pc_32bit and
2224 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2225 (the_low_target): Use linux_get_pc_32bit and
2227 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2228 (the_low_target): Use linux_get_pc_32bit and
2230 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2231 (the_low_target): Use linux_get_pc_32bit and
2233 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2234 (the_low_target): Use linux_get_pc_32bit and
2237 2016-01-18 Gary Benson <gbenson@redhat.com>
2239 * configure.ac (AC_FUNC_FORK): New check.
2240 * config.in: Regenerate.
2241 * configure: Likewise.
2243 2016-01-14 Yao Qi <yao.qi@linaro.org>
2245 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2246 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2247 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2248 arm_get_next_pcs_ctor.
2250 2016-01-12 Josh Stone <jistone@redhat.com>
2251 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2253 * inferiors.h: Include "gdb_vecs.h".
2254 (struct process_info): Add syscalls_to_catch.
2255 * inferiors.c (remove_process): Free syscalls_to_catch.
2256 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2257 syscall_return stops.
2258 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2259 * server.c (handle_general_set): Handle QCatchSyscalls.
2260 (handle_query): Report support for QCatchSyscalls.
2261 * target.h (struct target_ops): Add supports_catch_syscall.
2262 (target_supports_catch_syscall): New macro.
2263 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2264 (struct lwp_info): Add syscall_state.
2265 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2266 Maintain syscall_state and syscalls_to_catch across exec.
2267 (get_syscall_trapinfo): New function, proxy to the_low_target.
2268 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2269 (linux_low_filter_event): Toggle syscall_state entry/return for
2270 syscall traps, and set it ignored for all others.
2271 (gdb_catching_syscalls_p): New function.
2272 (gdb_catch_this_syscall_p): New function.
2273 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2274 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2275 (linux_supports_catch_syscall): New function.
2276 (linux_target_ops): Install it.
2277 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2278 (the_low_target): Install it.
2280 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2282 * acinclude.m4: Include new ../warning.m4 file.
2283 * configure: Regenerated.
2284 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2286 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2288 * ax.c (is_goto_target): Mark static.
2289 * linux-low.c (register_addr): Likewise.
2290 (linux_fetch_registers, linux_store_registers): Likewise.
2291 * mem-break.c (any_persistent_commands): Fix old prototype.
2292 (add_commands_to_breakpoint): Mark static.
2293 * regcache.c (find_register_by_name): Delete unused func.
2294 * remote-utils.c (hex_or_minus_one): Mark static.
2295 * server.c (monitor_show_help): Mark static.
2296 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2297 handle_v_requests): Likewise.
2299 2016-01-12 Pedro Alves <palves@redhat.com>
2301 Remove use of the registered trademark symbol throughout.
2303 2016-01-08 Yao Qi <yao.qi@linaro.org>
2305 * remote-utils.c (getpkt): If c is '\003', call target hook
2308 2016-01-06 Yao Qi <yao.qi@linaro.org>
2310 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2311 linux-aarch32-low.c.
2312 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2313 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2314 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2315 (thumb2_breakpoint): Declare.
2316 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2317 linux-aarch32-low.h.
2318 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2319 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2320 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2322 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2324 * gdbreplay.c (gdbreplay_version): Change copyright year in
2326 * server.c (gdbserver_version): Likewise.
2328 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2330 * server.c (crc32_table): Delete.
2331 (crc32): Use libiberty's xcrc32 function.
2333 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2335 * lynx-low.c (lynx_delete_thread_callback): New function.
2336 (lynx_mourn): Properly delete our process and all of its
2337 threads. Remove call to clear_inferiors.
2339 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2341 * target.c (thread_search_callback): Add check that
2342 the thread_stopped target callback is not NULL before
2345 2015-12-21 Yao Qi <yao.qi@linaro.org>
2347 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2350 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2352 * server.c (handle_query): Call target_supports_software_single_step.
2354 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2356 * linux-low.c (single_step): New function.
2357 (linux_resume_one_lwp_throw): Call single_step.
2358 (start_step_over): Likewise.
2360 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2362 * Makefile.in (SFILES): Append arch/arm-linux.c,
2363 arch/arm-get-next-pcs.c.
2364 (arm-linux.o): New rule.
2365 (arm-get-next-pcs.o): New rule.
2366 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2368 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2369 to linux-aarch32-low.c.
2370 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2371 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2372 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2373 (thumb2_breakpoint_len): Likewise.
2374 (arm_is_thumb_mode): Make non-static.
2375 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2376 from linux-aarch32-low.c.
2377 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2378 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2379 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2380 (thumb2_breakpoint_len): Likewise.
2381 (arm_is_thumb_mode): New declaration.
2382 * linux-arm-low.c: Include arch/arm-linux.h
2383 aarch/arm-get-next-pcs.h, sys/syscall.h.
2384 (get_next_pcs_ops): New struct.
2385 (get_next_pcs_addr_bits_remove): New function.
2386 (get_next_pcs_is_thumb): New function.
2387 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2388 (arm_sigreturn_next_pc): Likewise.
2389 (get_next_pcs_syscall_next_pc): Likewise.
2390 (arm_gdbserver_get_next_pcs): Likewise.
2391 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2393 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2394 * server.h: Include gdb_vecs.h.
2396 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2398 * Makefile.in (SFILES): Append common/common-regcache.c.
2399 (OBS): Append common-regcache.o.
2400 (common-regcache.o): New rule.
2401 * regcache.c (init_register_cache): Initialize cache to
2403 (regcache_raw_read_unsigned): New function.
2404 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2405 register_status enum.
2407 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2409 * linux-aarch64-low.c (the_low_targets): Rename
2410 breakpoint_reinsert_addr to get_next_pcs.
2411 * linux-arm-low.c (the_low_targets): Likewise.
2412 * linux-bfin-low.c (the_low_targets): Likewise.
2413 * linux-cris-low.c (the_low_targets): Likewise.
2414 * linux-crisv32-low.c (the_low_targets): Likewise.
2415 * linux-low.c (can_software_single_step): Likewise.
2416 (install_software_single_step_breakpoints): New function.
2417 (start_step_over): Use install_software_single_step_breakpoints.
2418 * linux-low.h: New CORE_ADDR vector.
2419 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2421 * linux-mips-low.c (the_low_targets): Likewise.
2422 * linux-nios2-low.c (the_low_targets): Likewise.
2423 * linux-sparc-low.c (the_low_targets): Likewise.
2425 2015-12-17 Pedro Alves <palves@redhat.com>
2427 * linux-low.c (linux_kill_one_lwp): Remove references to
2429 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2431 (linux_init_signals): Delete.
2432 (initialize_low): Adjust.
2433 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2435 2015-12-16 Pedro Alves <palves@redhat.com>
2437 * configure.ac (compiler warning flags): When testing a
2438 -Wno-foo option, check whether -Wfoo works instead.
2439 * configure: Regenerate.
2441 2015-12-11 Don Breazeal <donb@codesourcery.com>
2443 * server.c (process_serial_event): Don't exit from gdbserver
2444 in remote mode if there are still active inferiors.
2446 2015-12-11 Yao Qi <yao.qi@linaro.org>
2448 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2449 arm_breakpoint_at if the process is 32-bit.
2451 2015-12-11 Yao Qi <yao.qi@linaro.org>
2453 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2456 2015-12-07 Yao Qi <yao.qi@linaro.org>
2458 * configure.srv: Append arm.o to srv_tgtobj for
2459 aarch64*-*-linux* target.
2460 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2461 from linux-arm-low.c.
2462 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2463 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2464 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2465 (thumb2_breakpoint_len): Likewise.
2466 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2467 (arm_breakpoint_kinds): Likewise.
2468 (arm_breakpoint_kind_from_pc): Likewise.
2469 (arm_sw_breakpoint_from_kind): Likewise.
2470 (arm_breakpoint_kind_from_current_state): Likewise.
2471 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2472 (arm_sw_breakpoint_from_kind): Declare.
2473 (arm_breakpoint_kind_from_current_state): Declare.
2474 (arm_breakpoint_at): Declare.
2475 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2476 arm_sw_breakpoint_from_kind if process is 32-bit.
2477 (aarch64_breakpoint_kind_from_pc): New function.
2478 (aarch64_breakpoint_kind_from_current_state): New function.
2479 (the_low_target): Initialize fields breakpoint_kind_from_pc
2480 and breakpoint_kind_from_current_state.
2481 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2482 linux-aarch32-low.c.
2483 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2484 (arm_breakpoint, arm_breakpoint_len): Likewise.
2485 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2486 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2487 (arm_is_thumb_mode): Likewise.
2488 (arm_breakpoint_at): Likewise.
2489 (arm_breakpoint_kind_from_pc): Likewise.
2490 (arm_sw_breakpoint_from_kind): Likewise.
2491 (arm_breakpoint_kind_from_current_state): Likewise.
2494 2015-08-04 Yao Qi <yao.qi@linaro.org>
2496 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2497 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2498 * server.c (extended_protocol): Remove "static".
2499 * server.h (extended_protocol): Declare it.
2501 2015-12-04 Josh Stone <jistone@redhat.com>
2503 * target.h (struct target_ops) <arch_setup>: Rename to ...
2504 (struct target_ops) <post_create_inferior>: ... this.
2505 (target_arch_setup): Rename to ...
2506 (target_post_create_inferior): ... this, calling post_create_inferior.
2507 * server.c (start_inferior): Update target_arch_setup calls to
2508 target_post_create_inferior.
2509 * linux-low.c (linux_low_ptrace_options): Forward declare.
2510 (linux_arch_setup): Update its comment for general use.
2511 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2512 (struct linux_target_ops): Use linux_post_create_inferior.
2513 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2514 to post_create_inferior.
2515 * nto-low.c (struct nto_target_ops): Likewise.
2516 * spu-low.c (struct spu_target_ops): Likewise.
2517 * win32-low.c (struct win32_target_ops): Likewise.
2519 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2521 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2523 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2525 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2526 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2527 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2528 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2529 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2530 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2531 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2532 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2533 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2534 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2535 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2536 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2538 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2540 * linux-low.c (linux_look_up_symbols): Don't call
2541 linux_supports_traceclone.
2542 * linux-low.h (thread_db_init): Remove use_events argument.
2543 * thread-db.c (thread_db_use_event): Remove global variable.
2544 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2545 (struct thread_db) <td_create_bp>: Remove field.
2546 (thread_db_create_event): Remove function.
2547 (thread_db_enable_reporting): Likewise.
2548 (find_one_thread): Don't check for thread_db_use_events.
2549 (attach_thread): Likewise.
2550 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2551 (try_thread_db_load_1): Don't check for thread_db_use_events.
2552 (thread_db_init): Remove use_events argument and thread events
2554 (remove_thread_event_breakpoints): Remove function.
2555 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2557 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2559 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2561 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2562 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2563 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2564 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2565 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2567 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2569 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2570 * linux-low.c (can_hardware_single_step): Use
2571 supports_hardware_single_step.
2572 (can_software_single_step): New function.
2573 (start_step_over): Call can_software_single_step.
2574 (linux_supports_hardware_single_step): New function.
2575 (struct target_ops) <supports_software_single_step>: Initialize.
2576 * linux-low.h (struct linux_target_ops)
2577 <supports_hardware_single_step>: Initialize.
2578 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2579 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2580 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2581 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2582 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2583 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2584 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2585 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2586 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2587 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2589 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2590 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2592 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2593 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2594 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2596 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2597 * target.h (struct target_ops): <supports_software_single_step>:
2599 (target_supports_software_single_step): New macro.
2601 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2603 * linux-low.c (linux_wait_1): Fix pc advance condition.
2604 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2605 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2607 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2609 * linux-arm-low.c (arm_is_thumb_mode): New function.
2610 (arm_breakpoint_at): Use arm_is_thumb_mode.
2611 (arm_breakpoint_kind_from_current_state): New function.
2612 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2614 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2615 (linux_breakpoint_kind_from_current_state): New function.
2616 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2617 * linux-low.h (struct linux_target_ops)
2618 <breakpoint_kind_from_current_state>: New field.
2619 * target.h (struct target_ops): Likewise.
2620 (target_breakpoint_kind_from_current_state): New macro.
2622 2015-11-30 Pedro Alves <palves@redhat.com>
2624 * linux-low.c (linux_resume): Wake up the event loop before
2627 2015-11-30 Pedro Alves <palves@redhat.com>
2629 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2631 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2633 * target.c (struct thread_search): New structure.
2634 (thread_search_callback): New function.
2635 (prev_general_thread): New global.
2636 (prepare_to_access_memory, done_accessing_memory): New functions.
2637 * target.h (prepare_to_access_memory, done_accessing_memory):
2638 Replace macros with function declarations.
2640 2015-11-30 Pedro Alves <palves@redhat.com>
2643 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2644 report TARGET_WAITKIND_NO_RESUMED.
2645 * remote-utils.c (prepare_resume_reply): Handle
2646 TARGET_WAITKIND_NO_RESUMED.
2647 * server.c (report_no_resumed): New global.
2648 (handle_query) <qSupported>: Handle "no-resumed+". Report
2649 "no-resumed+" support.
2650 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2651 return error if the client doesn't support no-resumed events.
2652 (push_stop_notification): New function.
2653 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2654 events if the client supports them.
2656 2015-11-30 Pedro Alves <palves@redhat.com>
2658 * linux-low.c (thread_still_has_status_pending_p): Don't check
2660 (lwp_resumed): New function.
2661 (status_pending_p_callback): Return early if the LWP is not
2662 supposed to be resumed.
2664 2015-11-30 Pedro Alves <palves@redhat.com>
2666 * linux-low.c (handle_extended_wait): Assert that the LWP's
2667 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2668 thread create events, leave the new child's status pending.
2669 (linux_low_filter_event): If GDB wants to hear about thread exit
2670 events, leave the LWP marked dead and don't delete it.
2671 (linux_wait_for_event_filtered): Don't check for thread exit.
2672 (filter_exit_event): New function.
2673 (linux_wait_1): Use it, when returning an exit event.
2674 (linux_resume_one_lwp_throw): Assert that the LWP's
2675 waitstatus is TARGET_WAITKIND_IGNORE.
2676 * remote-utils.c (prepare_resume_reply): Handle
2677 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2678 * server.c (report_thread_events): New global.
2679 (handle_general_set): Handle QThreadEvents.
2680 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2681 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2682 TARGET_WAITKIND_THREAD_EXITED.
2683 * server.h (report_thread_events): Declare.
2685 2015-11-30 Pedro Alves <palves@redhat.com>
2687 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2688 the thread's last_resume_kind was resume_stop.
2690 2015-11-30 Pedro Alves <palves@redhat.com>
2692 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2695 2015-11-30 Pedro Alves <palves@redhat.com>
2697 * server.c (handle_v_requests): Handle vCtrlC.
2699 2015-11-30 Pedro Alves <palves@redhat.com>
2701 * gdbthread.h (find_any_thread_of_pid): Declare.
2702 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2704 * server.c (handle_query): If current_thread is NULL, look for
2705 another thread of the selected process.
2707 2015-11-26 Daniel Colascione <dancol@dancol.org>
2708 Simon Marchi <simon.marchi@ericsson.com>
2710 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2711 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2713 * target.h (struct target_ops) <thread_name>: New field.
2714 (target_thread_name): New macro.
2716 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2718 * regcache.h (regcache_invalidate_pid): Add declaration.
2719 * regcache.c (regcache_invalidate_pid): New function, extracted
2720 from regcache_invalidate.
2721 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2722 Add trivial documentation comment.
2723 * lynx-low.c: Use regcache_invalidate_pid instead of
2724 regcache_invalidate.
2726 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2728 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2729 and Elf64_auxv_t if the target is Android.
2731 2015-11-22 Doug Evans <xdje42@gmail.com>
2733 * target.h: #include <sys/types.h>.
2735 2015-11-19 Pedro Alves <palves@redhat.com>
2737 * linux-low.c (linux_process_qsupported): Change prototype.
2739 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2741 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2742 and adjust to loop over all features.
2743 * server.c (handle_query) <qSupported>: Adjust to call
2744 target_process_qsupported once, passing it a vector of unprocessed
2746 * target.h (struct target_ops) <process_qsupported>: Change
2748 (target_process_qsupported): Adjust.
2750 2015-11-19 Pedro Alves <palves@redhat.com>
2752 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2754 * configure: Regenerate.
2756 2015-11-19 Pedro Alves <palves@redhat.com>
2758 * configure: Regenerate.
2760 2015-11-19 Yao Qi <yao.qi@linaro.org>
2762 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2765 2015-11-19 Yao Qi <yao.qi@linaro.org>
2767 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2768 (struct aarch64_operand): Move enum out.
2770 2015-11-19 Yao Qi <yao.qi@linaro.org>
2772 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2773 struct user_fpsimd_state *.
2774 (aarch64_store_fpregset): Likewise.
2776 2015-11-19 Yao Qi <yao.qi@linaro.org>
2778 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2779 struct user_pt_regs *.
2780 (aarch64_store_gregset): Likewise.
2782 2015-11-18 Pedro Alves <palves@redhat.com>
2784 * Makefile.in (all_object_files): Add $IPA_OBJS.
2786 2015-11-17 Pedro Alves <palves@redhat.com>
2788 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2789 GDB_SIGNAL_0 and gdb_signal_to_string.
2791 2015-11-17 Pedro Alves <palves@redhat.com>
2793 * win32-low.c (handle_output_debug_string): Remove parameter.
2794 (win32_kill): Remove our_status local and adjust call to
2795 handle_output_debug_string.
2796 (get_child_debug_event): Adjust call to
2797 handle_output_debug_string.
2799 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2801 * linux-mips-low.c (mips_fill_gregset): Add cast.
2802 (mips_store_gregset): Likewise.
2803 (mips_fill_fpregset): Likewise.
2804 (mips_store_fpregset): Likewise.
2806 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2808 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2811 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2813 * linux-mips-low.c (mips_linux_new_thread): Change type of
2814 watch_type to enum target_hw_bp_type.
2816 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2818 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2819 Change return type to arm_hwbp_type.
2821 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2823 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2824 (arm_store_gregset): Likewise.
2825 * linux-arm-low.c (arm_get_hwcap): Likewise.
2826 (arm_read_description): Likewise.
2828 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2830 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2832 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2834 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2835 (ppc_fill_vsxregset): Likewise.
2836 (ppc_store_vsxregset): Likewise.
2837 (ppc_fill_vrregset): Likewise.
2838 (ppc_store_vrregset): Likewise.
2839 (ppc_fill_evrregset): Likewise.
2840 (ppc_store_evrregset): Likewise.
2842 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2844 * linux-ppc-low.c (ppc_usrregs_info): Remove
2845 forward-declaration.
2846 (ppc_arch_setup): Move lower in file.
2848 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2850 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2851 (ps_pdwrite): Likewise.
2853 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2855 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2856 to after assert checks.
2858 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2860 * proc-service.c (ps_pdread): Add/adjust casts.
2861 (ps_pdwrite): Add/adjust casts.
2863 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2865 * server.c (handle_search_memory_1): Cast return value of
2868 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2870 * server.c (write_qxfer_response): Change type of data to
2873 2015-10-29 Pedro Alves <palves@redhat.com>
2875 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2877 2015-10-29 Pedro Alves <palves@redhat.com>
2879 * tracepoint.c (clear_installed_tracepoints): Add casts.
2881 2015-10-29 Pedro Alves <palves@redhat.com>
2883 * server.c (handle_v_cont, process_serial_event): Add enum
2884 gdb_signal casts to signal parsing code.
2886 2015-10-29 Pedro Alves <palves@redhat.com>
2888 * linux-low.h (NULL_REGSET): Define.
2889 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2890 * linux-arm-low.c (arm_regsets): Likewise.
2891 * linux-crisv32-low.c (cris_regsets): Likewise.
2892 * linux-m68k-low.c (m68k_regsets): Likewise.
2893 * linux-mips-low.c (mips_regsets): Likewise.
2894 * linux-nios2-low.c (nios2_regsets): Likewise.
2895 * linux-ppc-low.c (ppc_regsets): Likewise.
2896 * linux-s390-low.c (s390_regsets): Likewise.
2897 * linux-sh-low.c (sh_regsets): Likewise.
2898 * linux-sparc-low.c (sparc_regsets): Likewise.
2899 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2900 * linux-tile-low.c (tile_regsets): Likewise.
2901 * linux-x86-low.c (x86_regsets): Likewise.
2902 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2904 2015-10-29 Pedro Alves <palves@redhat.com>
2906 * linux-low.h (NULL_REGSET): Define.
2907 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2908 * linux-arm-low.c (arm_regsets): Likewise.
2909 * linux-crisv32-low.c (cris_regsets): Likewise.
2910 * linux-m68k-low.c (m68k_regsets): Likewise.
2911 * linux-mips-low.c (mips_regsets): Likewise.
2912 * linux-nios2-low.c (nios2_regsets): Likewise.
2913 * linux-ppc-low.c (ppc_regsets): Likewise.
2914 * linux-s390-low.c (s390_regsets): Likewise.
2915 * linux-sh-low.c (sh_regsets): Likewise.
2916 * linux-sparc-low.c (sparc_regsets): Likewise.
2917 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2918 * linux-tile-low.c (tile_regsets): Likewise.
2919 * linux-x86-low.c (x86_regsets): Likewise.
2920 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2922 2015-10-26 Doug Evans <dje@google.com>
2924 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2926 2015-10-26 Doug Evans <dje@google.com>
2928 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2930 2015-10-26 Doug Evans <dje@google.com>
2932 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2934 (attach_thread, find_new_threads_callback): Ditto.
2936 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2938 * mem-break.h (set_breakpoint_data): Remove.
2940 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2942 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2943 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2944 (initialize_low): Remove set_breakpoint_data call.
2945 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2946 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2947 (initialize_low): Remove set_breakpoint_data call.
2948 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2949 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2950 (initialize_low): Remove set_breakpoint_data call.
2952 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2954 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2955 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2956 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2957 * target.h (target_breakpoint_kind_from_pc): New macro.
2959 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2961 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2962 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2963 the default breakpoint kind.
2965 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2967 * linux-arm-low.c (arm_supports_z_point_type): Add software
2970 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2972 * linux-arm-low.c: Refactor breakpoint definitions.
2973 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2974 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2976 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2978 * Makefile.in: Add arm.c/o.
2979 * configure.srv: Likewise.
2980 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2981 (arm_breakpoint_kind_from_pc): New function.
2982 (arm_sw_breakpoint_from_kind): Return proper kind.
2983 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2985 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2987 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2989 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2990 (struct raw_breakpoint) <size>: Remove.
2991 (struct raw_breakpoint) <kind>: Add.
2992 (bp_size): New function.
2993 (bp_opcode): Likewise.
2994 (find_raw_breakpoint_at): Adjust for kind.
2995 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2996 (remove_memory_breakpoint): Adjust for kind call bp_size.
2997 (set_raw_breakpoint_at): Adjust for kind.
2998 (set_breakpoint): Likewise.
2999 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3000 (delete_raw_breakpoint): Adjust for kind.
3001 (delete_breakpoint): Likewise.
3002 (find_gdb_breakpoint): Likewise.
3003 (set_gdb_breakpoint_1): Likewise.
3004 (set_gdb_breakpoint): Likewise.
3005 (delete_gdb_breakpoint_1): Likewise.
3006 (delete_gdb_breakpoint): Likewise.
3007 (uninsert_raw_breakpoint): Likewise.
3008 (reinsert_raw_breakpoint): Likewise.
3009 (set_breakpoint_data): Remove.
3010 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3011 (check_mem_read): Adjust for kind call bp_size.
3012 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3013 (clone_one_breakpoint): Adjust for kind.
3014 * mem-break.h (set_gdb_breakpoint): Likewise.
3015 (delete_gdb_breakpoint): Likewise.
3016 * server.c (process_serial_event): Likewise.
3018 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3020 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3021 (struct linux_target_ops) <breakpoint>: Remove.
3022 (struct linux_target_ops) <breakpoint_len>: Remove.
3023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3025 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3026 (arm_sw_breakpoint_from_kind): New function.
3027 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3028 (struct linux_target_ops) <breakpoint>: Remove.
3029 (struct linux_target_ops) <breakpoint_len>: Remove.
3030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3032 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3033 (struct linux_target_ops) <breakpoint>: Remove.
3034 (struct linux_target_ops) <breakpoint_len>: Remove.
3035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3037 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3038 (struct linux_target_ops) <breakpoint>: Remove.
3039 (struct linux_target_ops) <breakpoint_len>: Remove.
3040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3042 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3043 and sw_breakpoint_from_kind to increment the pc.
3044 (linux_breakpoint_kind_from_pc): New function.
3045 (linux_sw_breakpoint_from_kind): New function.
3046 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3047 (initialize_low): Call breakpoint_kind_from_pc and
3048 sw_breakpoint_from_kind to replace breakpoint_data/len.
3049 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3051 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3052 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3053 (struct linux_target_ops) <breakpoint>: Remove.
3054 (struct linux_target_ops) <breakpoint_len>: Remove.
3055 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3056 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3057 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3058 (struct linux_target_ops) <breakpoint>: Remove.
3059 (struct linux_target_ops) <breakpoint_len>: Remove.
3060 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3061 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3062 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3063 (struct linux_target_ops) <breakpoint>: Remove.
3064 (struct linux_target_ops) <breakpoint_len>: Remove.
3065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3067 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3068 (struct linux_target_ops) <breakpoint>: Remove.
3069 (struct linux_target_ops) <breakpoint_len>: Remove.
3070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3072 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3073 (struct linux_target_ops) <breakpoint>: Remove.
3074 (struct linux_target_ops) <breakpoint_len>: Remove.
3075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3077 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3078 (struct linux_target_ops) <breakpoint>: Remove.
3079 (struct linux_target_ops) <breakpoint_len>: Remove.
3080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3082 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3083 (struct linux_target_ops) <breakpoint>: Remove.
3084 (struct linux_target_ops) <breakpoint_len>: Remove.
3085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3087 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3088 (struct linux_target_ops) <breakpoint>: Remove.
3089 (struct linux_target_ops) <breakpoint_len>: Remove.
3090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3092 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3093 (struct linux_target_ops) <breakpoint>: Remove.
3094 (struct linux_target_ops) <breakpoint_len>: Remove.
3095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3097 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3098 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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.
3109 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3111 * linux-cris-low.c (cris_get_pc): Remove void arg.
3113 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3115 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3118 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3120 * inferiors.c (thread_pid_matches_callback): New function.
3121 (find_thread_process): New function.
3122 (remove_thread): Reset current_thread.
3123 (remove_process): Assert threads have been removed first.
3125 2015-10-15 Yao Qi <yao.qi@linaro.org>
3127 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3129 (aarch64_remove_point): Likewise.
3130 * regcache.c (regcache_register_size): New function.
3132 2015-10-12 Yao Qi <yao.qi@linaro.org>
3134 * linux-aarch64-low.c: Update all callers as emit_load_store
3135 is renamed to aarch64_emit_load_store.
3137 2015-10-12 Yao Qi <yao.qi@linaro.org>
3139 * linux-aarch64-low.c: Update all callers of function renaming
3140 from emit_insn to aarch64_emit_insn.
3142 2015-10-12 Yao Qi <yao.qi@linaro.org>
3144 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3145 arch/aarch64-insn.h.
3146 (struct aarch64_memory_operand): Likewise.
3148 (emit_insn): Move to arch/aarch64-insn.c.
3149 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3150 (emit_load_store): Move to arch/aarch64-insn.c.
3151 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3152 (can_encode_int32): Remove.
3154 2015-10-12 Yao Qi <yao.qi@linaro.org>
3156 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3157 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3158 (aarch64_relocate_instruction): Likewise.
3159 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3160 (struct aarch64_insn_visitor): Likewise.
3162 2015-10-12 Yao Qi <yao.qi@linaro.org>
3164 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3165 (struct aarch64_insn_visitor): New.
3166 (struct aarch64_insn_relocation_data): New.
3167 (aarch64_ftrace_insn_reloc_b): New function.
3168 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3169 (aarch64_ftrace_insn_reloc_cb): Likewise.
3170 (aarch64_ftrace_insn_reloc_tb): Likewise.
3171 (aarch64_ftrace_insn_reloc_adr): Likewise.
3172 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3173 (aarch64_ftrace_insn_reloc_others): Likewise.
3175 (aarch64_relocate_instruction): Use visitor.
3177 2015-10-12 Yao Qi <yao.qi@linaro.org>
3179 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3180 int. Add argument buf.
3181 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3182 aarch64_relocate_instruction.
3184 2015-10-12 Yao Qi <yao.qi@linaro.org>
3186 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3187 argument insn. Remove local variable insn. Don't call
3189 (aarch64_install_fast_tracepoint_jump_pad): Call
3192 2015-09-30 Yao Qi <yao.qi@linaro.org>
3194 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3195 (emit_load_store_pair): Likewise.
3197 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3199 * dll.c (match_dll): Add cast(s).
3200 (unloaded_dll): Likewise.
3201 * linux-low.c (second_thread_of_pid_p): Likewise.
3202 (delete_lwp_callback): Likewise.
3203 (count_events_callback): Likewise.
3204 (select_event_lwp_callback): Likewise.
3205 (linux_set_resume_request): Likewise.
3206 * server.c (accumulate_file_name_length): Likewise.
3207 (emit_dll_description): Likewise.
3208 (handle_qxfer_threads_worker): Likewise.
3209 (visit_actioned_threads): Likewise.
3210 * thread-db.c (any_thread_of): Likewise.
3211 * tracepoint.c (same_process_p): Likewise.
3212 (match_blocktype): Likewise.
3213 (build_traceframe_info_xml): Likewise.
3215 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3217 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3219 (gdb_unparse_agent_expr): Likewise.
3220 * hostio.c (require_data): Likewise.
3221 (handle_pread): Likewise.
3222 * linux-low.c (disable_regset): Likewise.
3223 (fetch_register): Likewise.
3224 (store_register): Likewise.
3225 (get_dynamic): Likewise.
3226 (linux_qxfer_libraries_svr4): Likewise.
3227 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3228 (set_fast_tracepoint_jump): Likewise.
3229 (uninsert_fast_tracepoint_jumps_at): Likewise.
3230 (reinsert_fast_tracepoint_jumps_at): Likewise.
3231 (validate_inserted_breakpoint): Likewise.
3232 (clone_agent_expr): Likewise.
3233 * regcache.c (init_register_cache): Likewise.
3234 * remote-utils.c (putpkt_binary_1): Likewise.
3235 (decode_M_packet): Likewise.
3236 (decode_X_packet): Likewise.
3237 (look_up_one_symbol): Likewise.
3238 (relocate_instruction): Likewise.
3239 (monitor_output): Likewise.
3240 * server.c (handle_search_memory): Likewise.
3241 (handle_qxfer_exec_file): Likewise.
3242 (handle_qxfer_libraries): Likewise.
3243 (handle_qxfer): Likewise.
3244 (handle_query): Likewise.
3245 (handle_v_cont): Likewise.
3246 (handle_v_run): Likewise.
3247 (captured_main): Likewise.
3248 * target.c (write_inferior_memory): Likewise.
3249 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3250 * tracepoint.c (init_trace_buffer): Likewise.
3251 (add_tracepoint_action): Likewise.
3252 (add_traceframe): Likewise.
3253 (add_traceframe_block): Likewise.
3254 (cmd_qtdpsrc): Likewise.
3255 (cmd_qtdv): Likewise.
3256 (cmd_qtstatus): Likewise.
3257 (response_source): Likewise.
3258 (response_tsv): Likewise.
3259 (cmd_qtnotes): Likewise.
3260 (gdb_collect): Likewise.
3261 (initialize_tracepoint): Likewise.
3263 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3265 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3266 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3267 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3269 (enum aarch64_condition_codes): New enum.
3270 (w0): New static global.
3273 (struct aarch64_memory_operand) <type>: New
3274 MEMORY_OPERAND_POSTINDEX type.
3275 (postindex_memory_operand): New helper function.
3276 (emit_ret): New function.
3277 (emit_load_store_pair): New function, factored out of emit_stp
3278 with support for MEMORY_OPERAND_POSTINDEX.
3279 (emit_stp): Rewrite using emit_load_store_pair.
3280 (emit_ldp): New function.
3281 (emit_load_store): Likewise.
3282 (emit_ldr): Mention post-index instruction in comment.
3283 (emit_ldrh): New function.
3284 (emit_ldrb): New function.
3285 (emit_ldrsw): Mention post-index instruction in comment.
3286 (emit_str): Likewise.
3287 (emit_subs): New function.
3288 (emit_cmp): Likewise.
3289 (emit_and): Likewise.
3290 (emit_orr): Likewise.
3291 (emit_orn): Likewise.
3292 (emit_eor): Likewise.
3293 (emit_mvn): Likewise.
3294 (emit_lslv): Likewise.
3295 (emit_lsrv): Likewise.
3296 (emit_asrv): Likewise.
3297 (emit_mul): Likewise.
3298 (emit_sbfm): Likewise.
3299 (emit_sbfx): Likewise.
3300 (emit_ubfm): Likewise.
3301 (emit_ubfx): Likewise.
3302 (emit_csinc): Likewise.
3303 (emit_cset): Likewise.
3304 (emit_nop): Likewise.
3305 (emit_ops_insns): New helper function.
3306 (emit_pop): Likewise.
3307 (emit_push): Likewise.
3308 (aarch64_emit_prologue): New function.
3309 (aarch64_emit_epilogue): Likewise.
3310 (aarch64_emit_add): Likewise.
3311 (aarch64_emit_sub): Likewise.
3312 (aarch64_emit_mul): Likewise.
3313 (aarch64_emit_lsh): Likewise.
3314 (aarch64_emit_rsh_signed): Likewise.
3315 (aarch64_emit_rsh_unsigned): Likewise.
3316 (aarch64_emit_ext): Likewise.
3317 (aarch64_emit_log_not): Likewise.
3318 (aarch64_emit_bit_and): Likewise.
3319 (aarch64_emit_bit_or): Likewise.
3320 (aarch64_emit_bit_xor): Likewise.
3321 (aarch64_emit_bit_not): Likewise.
3322 (aarch64_emit_equal): Likewise.
3323 (aarch64_emit_less_signed): Likewise.
3324 (aarch64_emit_less_unsigned): Likewise.
3325 (aarch64_emit_ref): Likewise.
3326 (aarch64_emit_if_goto): Likewise.
3327 (aarch64_emit_goto): Likewise.
3328 (aarch64_write_goto_address): Likewise.
3329 (aarch64_emit_const): Likewise.
3330 (aarch64_emit_call): Likewise.
3331 (aarch64_emit_reg): Likewise.
3332 (aarch64_emit_pop): Likewise.
3333 (aarch64_emit_stack_flush): Likewise.
3334 (aarch64_emit_zero_ext): Likewise.
3335 (aarch64_emit_swap): Likewise.
3336 (aarch64_emit_stack_adjust): Likewise.
3337 (aarch64_emit_int_call_1): Likewise.
3338 (aarch64_emit_void_call_2): Likewise.
3339 (aarch64_emit_eq_goto): Likewise.
3340 (aarch64_emit_ne_goto): Likewise.
3341 (aarch64_emit_lt_goto): Likewise.
3342 (aarch64_emit_le_goto): Likewise.
3343 (aarch64_emit_gt_goto): Likewise.
3344 (aarch64_emit_ge_got): Likewise.
3345 (aarch64_emit_ops_impl): New static global variable.
3346 (aarch64_emit_ops): New target function, return
3347 &aarch64_emit_ops_impl.
3348 (struct linux_target_ops): Install it.
3350 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3352 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3353 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3355 * linux-aarch64-ipa.c: New file.
3356 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3358 (aarch64_get_thread_area): New target method.
3359 (extract_signed_bitfield): New helper function.
3360 (aarch64_decode_ldr_literal): New function.
3361 (enum aarch64_opcodes): New enum.
3362 (struct aarch64_register): New struct.
3363 (struct aarch64_operand): New struct.
3364 (x0): New static global.
3373 (aarch64_register): New helper function.
3374 (register_operand): Likewise.
3375 (immediate_operand): Likewise.
3376 (struct aarch64_memory_operand): New struct.
3377 (offset_memory_operand): New helper function.
3378 (preindex_memory_operand): Likewise.
3379 (enum aarch64_system_control_registers): New enum.
3380 (ENCODE): New macro.
3381 (emit_insn): New helper function.
3382 (emit_b): New function.
3383 (emit_bcond): Likewise.
3384 (emit_cb): Likewise.
3385 (emit_tb): Likewise.
3386 (emit_blr): Likewise.
3387 (emit_stp): Likewise.
3388 (emit_ldp_q_offset): Likewise.
3389 (emit_stp_q_offset): Likewise.
3390 (emit_load_store): Likewise.
3391 (emit_ldr): Likewise.
3392 (emit_ldrsw): Likewise.
3393 (emit_str): Likewise.
3394 (emit_ldaxr): Likewise.
3395 (emit_stxr): Likewise.
3396 (emit_stlr): Likewise.
3397 (emit_data_processing_reg): Likewise.
3398 (emit_data_processing): Likewise.
3399 (emit_add): Likewise.
3400 (emit_sub): Likewise.
3401 (emit_mov): Likewise.
3402 (emit_movk): Likewise.
3403 (emit_mov_addr): Likewise.
3404 (emit_mrs): Likewise.
3405 (emit_msr): Likewise.
3406 (emit_sevl): Likewise.
3407 (emit_wfe): Likewise.
3408 (append_insns): Likewise.
3409 (can_encode_int32_in): New helper function.
3410 (aarch64_relocate_instruction): New function.
3411 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3412 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3413 (struct linux_target_ops): Install aarch64_get_thread_area,
3414 aarch64_install_fast_tracepoint_jump_pad and
3415 aarch64_get_min_fast_tracepoint_insn_len.
3417 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3419 * Makefile.in (aarch64-insn.o): New rule.
3420 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3422 2015-09-21 Yao Qi <yao.qi@linaro.org>
3424 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3426 2015-09-21 Yao Qi <yao.qi@linaro.org>
3428 * tracepoint.c (max_jump_pad_size): Remove.
3430 2015-09-18 Yao Qi <yao.qi@linaro.org>
3432 * linux-aarch64-low.c: Don't include sys/uio.h.
3433 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3435 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3437 * tracepoint.c (eval_result_type): Change prototype.
3438 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3440 2015-09-15 Pedro Alves <palves@redhat.com>
3442 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3443 Check whether to report exec events instead of checking whether
3444 multiprocess is enabled.
3446 2015-09-15 Pedro Alves <palves@redhat.com>
3449 * remote-utils.c (prepare_resume_reply): Merge
3450 TARGET_WAITKIND_VFORK_DONE switch case with the
3451 TARGET_WAITKIND_FORKED case.
3453 2015-09-15 Yao Qi <yao.qi@linaro.org>
3455 * server.c (handle_query): Check string comparison using
3456 "else if" instead of "if".
3458 2015-09-15 Yao Qi <yao.qi@linaro.org>
3460 * server.c (vCont_supported): New global variable.
3461 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3462 matches. Append ";vContSupported+" to own_buf.
3463 (handle_v_requests): Append ";s;S" to own_buf if target supports
3464 hardware single step or vCont_supported is false.
3465 (capture_main): Set vCont_supported to zero.
3467 2015-09-15 Yao Qi <yao.qi@linaro.org>
3469 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3471 (linux_supports_hardware_single_step): ... New function.
3472 (linux_target_ops): Update.
3473 * lynx-low.c (lynx_target_ops): Set field
3474 supports_hardware_single_step to target_can_do_hardware_single_step.
3475 * nto-low.c (nto_target_ops): Likewise.
3476 * spu-low.c (spu_target_ops): Likewise.
3477 * win32-low.c (win32_target_ops): Likewise.
3478 * target.c (target_can_do_hardware_single_step): New function.
3479 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3480 Remove. <supports_hardware_single_step>: New field.
3481 (target_supports_conditional_breakpoints): Remove.
3482 (target_supports_hardware_single_step): New macro.
3483 (target_can_do_hardware_single_step): Declare.
3484 * server.c (handle_query): Use target_supports_hardware_single_step
3485 instead of target_supports_conditional_breakpoints.
3487 2015-09-15 Yao Qi <yao.qi@linaro.org>
3489 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3491 (struct linux_target_ops the_low_target): Install
3492 aarch64_linux_siginfo_fixup.
3494 2015-09-11 Don Breazeal <donb@codesourcery.com>
3495 Luis Machado <lgustavo@codesourcery.com>
3497 * linux-low.c (linux_mourn): Static declaration.
3498 (linux_arch_setup): Move in front of
3499 handle_extended_wait.
3500 (linux_arch_setup_thread): New function.
3501 (handle_extended_wait): Handle exec events. Call
3502 linux_arch_setup_thread. Make event_lwp argument a
3503 pointer-to-a-pointer.
3504 (check_zombie_leaders): Do not check stopped threads.
3505 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3506 (linux_low_filter_event): Add lwp and thread for exec'ing
3507 non-leader thread if leader thread has been deleted.
3508 Refactor code into linux_arch_setup_thread and call it.
3509 Pass child lwp pointer by reference to handle_extended_wait.
3510 (linux_wait_for_event_filtered): Update comment.
3511 (linux_wait_1): Prevent clobbering exec event status.
3512 (linux_supports_exec_events): New function.
3513 (linux_target_ops) <supports_exec_events>: Initialize new member.
3514 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3516 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3517 * server.c (report_exec_events): New global variable.
3518 (handle_query): Handle qSupported query for exec-events feature.
3519 (captured_main): Initialize report_exec_events.
3520 * server.h (report_exec_events): Declare new global variable.
3521 * target.h (struct target_ops) <supports_exec_events>: New
3523 (target_supports_exec_events): New macro.
3524 * win32-low.c (win32_target_ops) <supports_exec_events>:
3525 Initialize new member.
3527 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3529 * linux-low.c (linux_low_enable_btrace): Remove.
3530 (linux_target_ops): Replace linux_low_enable_btrace with
3531 linux_enable_btrace.
3533 2015-09-03 Yao Qi <yao.qi@linaro.org>
3535 * linux-aarch64-low.c (aarch64_insert_point): Call
3536 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3539 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3541 * linux-low.c (check_stopped_by_breakpoint): Use
3542 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3544 2015-08-27 Pedro Alves <palves@redhat.com>
3546 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3548 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3550 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3551 the XNEW-family equivalent.
3552 (compile_bytecodes): Likewise.
3553 * dll.c (loaded_dll): Likewise.
3554 * event-loop.c (append_callback_event): Likewise.
3555 (create_file_handler): Likewise.
3556 (create_file_event): Likewise.
3557 * hostio.c (handle_open): Likewise.
3558 * inferiors.c (add_thread): Likewise.
3559 (add_process): Likewise.
3560 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3561 * linux-arm-low.c (arm_new_process): Likewise.
3562 (arm_new_thread): Likewise.
3563 * linux-low.c (add_to_pid_list): Likewise.
3564 (linux_add_process): Likewise.
3565 (handle_extended_wait): Likewise.
3566 (add_lwp): Likewise.
3567 (enqueue_one_deferred_signal): Likewise.
3568 (enqueue_pending_signal): Likewise.
3569 (linux_resume_one_lwp_throw): Likewise.
3570 (linux_resume_one_thread): Likewise.
3571 (linux_read_memory): Likewise.
3572 (linux_write_memory): Likewise.
3573 * linux-mips-low.c (mips_linux_new_process): Likewise.
3574 (mips_linux_new_thread): Likewise.
3575 (mips_add_watchpoint): Likewise.
3576 * linux-x86-low.c (initialize_low_arch): Likewise.
3577 * lynx-low.c (lynx_add_process): Likewise.
3578 * mem-break.c (set_raw_breakpoint_at): Likewise.
3579 (set_breakpoint): Likewise.
3580 (add_condition_to_breakpoint): Likewise.
3581 (add_commands_to_breakpoint): Likewise.
3582 (clone_agent_expr): Likewise.
3583 (clone_one_breakpoint): Likewise.
3584 * regcache.c (new_register_cache): Likewise.
3585 * remote-utils.c (look_up_one_symbol): Likewise.
3586 * server.c (queue_stop_reply): Likewise.
3587 (start_inferior): Likewise.
3588 (queue_stop_reply_callback): Likewise.
3589 (handle_target_event): Likewise.
3590 * spu-low.c (fetch_ppc_memory): Likewise.
3591 (store_ppc_memory): Likewise.
3592 * target.c (set_target_ops): Likewise.
3593 * thread-db.c (thread_db_load_search): Likewise.
3594 (try_thread_db_load_1): Likewise.
3595 * tracepoint.c (add_tracepoint): Likewise.
3596 (add_tracepoint_action): Likewise.
3597 (create_trace_state_variable): Likewise.
3598 (cmd_qtdpsrc): Likewise.
3599 (cmd_qtro): Likewise.
3600 (add_while_stepping_state): Likewise.
3601 * win32-low.c (child_add_thread): Likewise.
3602 (get_image_name): Likewise.
3604 2015-08-25 Yao Qi <yao.qi@linaro.org>
3606 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3608 2015-08-25 Yao Qi <yao.qi@linaro.org>
3610 * Makefile.in (aarch64-linux.o): New rule.
3611 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3613 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3614 (aarch64_init_debug_reg_state): Make it extern.
3615 (aarch64_linux_prepare_to_resume): Remove.
3617 2015-08-25 Yao Qi <yao.qi@linaro.org>
3619 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3620 lwp_arch_private_info and ptid_of_lwp.
3622 2015-08-25 Yao Qi <yao.qi@linaro.org>
3624 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3625 Find proc_info by find_process_pid. All callers updated.
3627 2015-08-25 Yao Qi <yao.qi@linaro.org>
3629 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3631 (debug_reg_change_callback): Remove.
3632 (aarch64_notify_debug_reg_change): Remove.
3634 2015-08-25 Yao Qi <yao.qi@linaro.org>
3636 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3637 Call current_lwp_ptid.
3639 2015-08-25 Yao Qi <yao.qi@linaro.org>
3641 * linux-aarch64-low.c (debug_reg_change_callback): Use
3644 2015-08-25 Yao Qi <yao.qi@linaro.org>
3646 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3648 2015-08-25 Yao Qi <yao.qi@linaro.org>
3650 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3652 2015-08-25 Yao Qi <yao.qi@linaro.org>
3654 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3657 2015-08-25 Yao Qi <yao.qi@linaro.org>
3659 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3661 (debug_reg_change_callback): Remove argument entry and add argument
3662 lwp. Remove local variable thread. Don't print thread id in the
3663 debugging output. Don't check whether pid of thread equals to pid.
3664 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3665 iterate_over_lwps instead find_inferior.
3667 2015-08-24 Pedro Alves <palves@redhat.com>
3669 * inferiors.c (get_first_process): New function.
3670 * inferiors.h (get_first_process): New declaration.
3671 * remote-utils.c (read_ptid): Default to the first process in the
3672 list, instead of to the current thread's process.
3674 2015-08-24 Pedro Alves <palves@redhat.com>
3676 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3677 * event-loop.c: Likewise.
3678 * remote-utils.c: Likewise.
3679 * tracepoint.c: Likewise.
3681 2015-08-24 Pedro Alves <palves@redhat.com>
3683 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3686 2015-08-21 Pedro Alves <palves@redhat.com>
3688 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3689 instead of literal 1.
3691 2015-08-21 Pedro Alves <palves@redhat.com>
3693 * tdesc.c (default_description): Explicitly zero-initialize.
3695 2015-08-21 Pedro Alves <palves@redhat.com>
3698 * inferiors.c (remove_thread): Discard any pending stop reply for
3700 * server.c (remove_all_on_match_pid): Rename to ...
3701 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3703 (discard_queued_stop_replies): Change parameter to a ptid. Now
3705 (handle_v_kill, kill_inferior_callback, captured_main)
3706 (process_serial_event): Adjust.
3707 * server.h (discard_queued_stop_replies): Declare.
3709 2015-08-21 Pedro Alves <palves@redhat.com>
3711 * linux-low.c (wait_for_sigstop): Always switch to no thread
3712 selected if the previously current thread dies.
3713 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3714 process instead of the current thread's.
3715 * remote-utils.c (input_interrupt): Don't check if there's no
3717 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3718 current thread to the general thread fails, error out.
3719 (handle_qxfer_auxv, handle_qxfer_libraries)
3720 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3721 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3722 (handle_query): Check if there's a thread selected instead of
3723 checking whether there's any thread in the thread list.
3724 (handle_qxfer_threads, handle_qxfer_btrace)
3725 (handle_qxfer_btrace_conf): Don't error out early if there's no
3726 thread in the thread list.
3727 (handle_v_cont, myresume): Don't set the current thread to the
3729 (process_serial_event) <Hg handling>: Also set thread_id if the
3730 previous general thread is still alive.
3731 (process_serial_event) <g/G handling>: If setting the current
3732 thread to the general thread fails, error out.
3733 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3734 thread's lwp instead of the current thread's.
3735 * target.c (set_desired_thread): If the desired thread was not
3736 found, leave the current thread pointing to NULL. Return an int
3737 (boolean) indicating success.
3738 * target.h (set_desired_thread): Change return type to int.
3740 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3742 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3743 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3745 (ps_get_thread_area): New function.
3747 2015-08-19 Gary Benson <gbenson@redhat.com>
3749 * hostio.c (handle_pread): Do not attempt to read more data
3750 than hostio_reply_with_data can fit in a packet.
3752 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3754 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3756 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3758 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3760 2015-08-06 Pedro Alves <palves@redhat.com>
3762 * tracepoint.c (expr_eval_result): Now an int.
3764 2015-08-06 Pedro Alves <palves@redhat.com>
3766 * gdbthread.h (struct regcache): Forward declare.
3767 (struct thread_info) <regcache_data>: Now a struct regcache
3769 * inferiors.c (inferior_regcache_data)
3770 (set_inferior_regcache_data): Now work with struct regcache
3772 * inferiors.h (struct regcache): Forward declare.
3773 (inferior_regcache_data, set_inferior_regcache_data): Now work
3774 with struct regcache pointers.
3775 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3776 (free_register_cache_thread): Remove struct regcache pointer
3779 2015-08-06 Pedro Alves <palves@redhat.com>
3781 * server.c (captured_main): On error, print the exception message
3782 to stderr, and if run_once is set, throw a quit.
3784 2015-08-06 Pedro Alves <palves@redhat.com>
3786 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3789 2015-08-06 Pedro Alves <palves@redhat.com>
3791 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3792 reading beyond the passed in buffer length.
3794 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3796 * tracepoint.c (symbol_list) <required>: Remove.
3798 2015-08-06 Pedro Alves <palves@redhat.com>
3800 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3801 count if stopping and suspending threads.
3802 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3803 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3804 (linux_detach): Complete an ongoing step-over.
3805 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3807 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3808 (linux_wait_1): If passing a signal to the inferior after
3809 finishing a step-over, unsuspend and re-resume all lwps. If we
3810 see a single-step event but the thread should be continuing, don't
3811 pass the trap to gdb.
3812 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3813 internal_error instead of gdb_assert.
3814 (enqueue_pending_signal): New function.
3815 (check_ptrace_stopped_lwp_gone): Add debug output.
3816 (start_step_over): Use internal_error instead of gdb_assert.
3817 (complete_ongoing_step_over): New function.
3818 (linux_resume_one_thread): Don't resume a suspended thread.
3819 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3822 2015-08-06 Pedro Alves <palves@redhat.com>
3824 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3825 (linux_thread_alive): Use lwp_is_marked_dead.
3826 (extended_event_reported): Delete.
3827 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3828 instead of extended_event_reported.
3829 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3831 (lwp_is_marked_dead): New function.
3832 (lwp_running): Use lwp_is_marked_dead.
3833 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3836 2015-08-06 Pedro Alves <palves@redhat.com>
3838 * linux-low.c (linux_wait_1): Move fork event output out of the
3839 !report_to_gdb check. Pass event_child->waitstatus to
3840 target_waitstatus_to_string instead of ourstatus.
3842 2015-08-04 Yao Qi <yao.qi@linaro.org>
3844 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3845 if current_thread is 32 bit.
3847 2015-08-04 Yao Qi <yao.qi@linaro.org>
3849 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3850 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3851 * server.c (extended_protocol): Remove "static".
3852 * server.h (extended_protocol): Declare it.
3854 2015-08-04 Yao Qi <yao.qi@linaro.org>
3856 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3857 both aarch64 and aarch32.
3858 (aarch64_set_pc): Likewise.
3860 2015-08-04 Yao Qi <yao.qi@linaro.org>
3862 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3863 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3864 arm-with-neon.xml to srv_xmlfiles.
3865 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3866 (is_64bit_tdesc): New function.
3867 (aarch64_linux_read_description): New function.
3868 (aarch64_arch_setup): Call aarch64_linux_read_description.
3869 (regs_info): Rename to regs_info_aarch64.
3870 (aarch64_regs_info): Return right regs_info.
3871 (initialize_low_arch): Call initialize_low_arch_aarch32.
3873 2015-08-04 Yao Qi <yao.qi@linaro.org>
3875 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3876 * linux-aarch32-low.c: New file.
3877 * linux-aarch32-low.h: New file.
3878 * linux-arm-low.c (arm_fill_gregset): Move it to
3879 linux-aarch32-low.c.
3880 (arm_store_gregset): Likewise.
3881 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3882 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3883 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3884 (regs_info): Rename to regs_info_arm.
3885 (arm_regs_info): Return regs_info_aarch32 if
3886 have_ptrace_getregset is 1 and target description is
3887 arm_with_neon or arm_with_vfpv3.
3888 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3889 Call initialize_low_arch_aarch32 instead.
3891 2015-08-04 Yao Qi <yao.qi@linaro.org>
3893 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3894 * linux-low.c: ... here.
3895 * linux-low.h (have_ptrace_getregset): Declare it.
3897 2015-08-04 Pedro Alves <palves@redhat.com>
3899 * thread-db.c (struct thread_db): Use new typedefs.
3900 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3902 (disable_thread_event_reporting): Cast result of dlsym to
3903 destination function pointer type.
3904 (thread_db_mourn): Use td_ta_delete_ftype.
3906 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3908 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3910 (CDX_BREAKPOINT): Define for R2.
3911 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3912 (the_low_target): Add comments.
3914 2015-07-30 Yao Qi <yao.qi@linaro.org>
3916 * linux-arm-low.c (arm_hwcap): Remove it.
3917 (arm_read_description): New local variable arm_hwcap. Don't
3918 set arm_hwcap to zero.
3920 2015-07-30 Yao Qi <yao.qi@linaro.org>
3922 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3923 Use regcache->tdesc instead.
3924 (arm_store_wmmxregset): Likewise.
3925 (arm_fill_vfpregset): Likewise.
3926 (arm_store_vfpregset): Likewise.
3928 2015-07-30 Yao Qi <yao.qi@linaro.org>
3930 * linux-arm-low.c: Include arch/arm.h.
3931 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3932 (arm_store_gregset): Likewise.
3934 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3936 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3937 ptrace's 4th parameter.
3939 2015-07-27 Yao Qi <yao.qi@linaro.org>
3941 * configure.srv (case aarch64*-*-linux*): Don't set
3944 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3946 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3948 * linux-arm-low.c: Likewise.
3949 * linux-cris-low.c: Likewise.
3950 * linux-crisv32-low.c: Likewise.
3951 * linux-low.c: Likewise.
3952 * linux-m68k-low.c: Likewise.
3953 * linux-mips-low.c: Likewise.
3954 * linux-nios2-low.c: Likewise.
3955 * linux-s390-low.c: Likewise.
3956 * linux-sparc-low.c: Likewise.
3957 * linux-tic6x-low.c: Likewise.
3958 * linux-tile-low.c: Likewise.
3959 * linux-x86-low.c: Likewise.
3961 2015-07-24 Pedro Alves <palves@redhat.com>
3963 * config.in: Regenerate.
3964 * configure: Regenerate.
3966 2015-07-24 Pedro Alves <palves@redhat.com>
3968 * acinclude.m4: Include ../ptrace.m4.
3969 * configure.ac: Call GDB_AC_PTRACE.
3970 * config.in, configure: Regenerate.
3972 2015-07-24 Yao Qi <yao.qi@linaro.org>
3974 * linux-low.c (linux_create_inferior): Remove setting to
3975 proc->priv->new_inferior.
3976 (linux_attach): Likewise.
3977 (linux_low_filter_event): Likewise.
3978 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3980 2015-07-24 Yao Qi <yao.qi@linaro.org>
3982 * linux-low.c (linux_arch_setup): New function.
3983 (linux_low_filter_event): If proc->tdesc is NULL and
3984 proc->attached is true, call the_low_target.arch_setup.
3985 Otherwise, keep status pending, and return.
3986 (linux_resume_one_lwp_throw): Don't call get_pc if
3987 thread->while_stepping isn't NULL. Don't call
3988 get_thread_regcache if proc->tdesc is NULL.
3989 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3990 (linux_target_ops): Install arch_setup.
3991 * server.c (start_inferior): Call the_target->arch_setup.
3992 * target.h (struct target_ops) <arch_setup>: New field.
3993 (target_arch_setup): New marco.
3994 * lynx-low.c (lynx_target_ops): Update.
3995 * nto-low.c (nto_target_ops): Update.
3996 * spu-low.c (spu_target_ops): Update.
3997 * win32-low.c (win32_target_ops): Update.
3999 2015-07-24 Yao Qi <yao.qi@linaro.org>
4001 * linux-low.c (linux_add_process): Don't set
4002 proc->priv->new_inferior.
4003 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4004 (linux_attach): Likewise.
4006 2015-07-24 Yao Qi <yao.qi@linaro.org>
4008 * server.c (start_inferior): Code refactor.
4010 2015-07-24 Yao Qi <yao.qi@linaro.org>
4012 * server.c (process_serial_event): Set general_thread.
4014 2015-07-21 Yao Qi <yao.qi@linaro.org>
4016 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4017 aarch64_linux_get_debug_reg_capacity.
4019 2015-07-17 Yao Qi <yao.qi@linaro.org>
4021 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4022 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4023 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4024 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4025 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4026 (AARCH64_HWP_ALIGNMENT): Likewise.
4027 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4028 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4029 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4030 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4031 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4032 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4033 (struct aarch64_debug_reg_state): Likewise.
4034 (struct arch_lwp_info): Likewise.
4035 (aarch64_align_watchpoint): Likewise.
4036 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4037 (aarch64_watchpoint_length): Likewise.
4038 (aarch64_point_encode_ctrl_reg): Likewise
4039 (aarch64_point_is_aligned): Likewise.
4040 (aarch64_align_watchpoint): Likewise.
4041 (aarch64_linux_set_debug_regs):
4042 (aarch64_dr_state_insert_one_point): Likewise.
4043 (aarch64_dr_state_remove_one_point): Likewise.
4044 (aarch64_handle_breakpoint): Likewise.
4045 (aarch64_handle_aligned_watchpoint): Likewise.
4046 (aarch64_handle_unaligned_watchpoint): Likewise.
4047 (aarch64_handle_watchpoint): Likewise.
4049 2015-07-17 Yao Qi <yao.qi@linaro.org>
4051 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4052 and don't aarch64_get_debug_reg_state. All callers update.
4053 (aarch64_handle_aligned_watchpoint): Likewise.
4054 (aarch64_handle_unaligned_watchpoint): Likewise.
4055 (aarch64_handle_watchpoint): Likewise.
4056 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4057 (aarch64_remove_point): Likewise.
4059 2015-07-17 Yao Qi <yao.qi@linaro.org>
4061 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4063 (aarch64_handle_unaligned_watchpoint): Likewise.
4065 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4067 Revert the previous 3 commits:
4068 Move gdb_regex* to common/
4069 Move linux_find_memory_regions_full & co.
4070 gdbserver build-id attribute generator
4072 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4073 Jan Kratochvil <jan.kratochvil@redhat.com>
4075 gdbserver build-id attribute generator.
4076 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4077 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4078 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4080 (get_dynamic): Use find_pdhr to traverse program headers.
4081 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4082 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4083 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4084 (get_hex_build_id): New.
4085 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4086 to reply XML document.
4088 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4089 Jan Kratochvil <jan.kratochvil@redhat.com>
4091 * target.c: Include target/target-utils.h and fcntl.h.
4092 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4093 (target_fileio_read_stralloc): New functions.
4095 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4097 * Makefile.in (OBS): Add gdb_regex.o.
4099 * config.in: Rebuilt.
4100 * configure: Rebuilt.
4102 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4103 Jan Kratochvil <jan.kratochvil@redhat.com>
4105 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4106 * Makefile.in (OBS): Add target-utils.o.
4107 (linux-maps.o, target-utils.o): New.
4108 * configure.srv (srv_linux_obj): Add linux-maps.o.
4110 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4112 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4114 (the_low_target): Install it.
4116 2015-07-14 Pedro Alves <palves@redhat.com>
4118 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4119 Instead, ignore ECHILD, and throw an error for other errnos.
4121 2015-07-10 Pedro Alves <palves@redhat.com>
4123 * event-loop.c (struct callback_event) <data>: Change type to
4124 gdb_client_data instance instead of gdb_client_data pointer.
4125 (append_callback_event): Adjust.
4127 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4129 * linux-aarch64-low.c: Add comments for each linux_target_ops
4130 method. Remove comments already covered in target_ops and
4131 linux_target_ops definitions.
4132 (the_low_target): Add comments for each unimplemented method.
4134 2015-07-09 Yao Qi <yao.qi@linaro.org>
4136 * linux-aarch64-low.c (aarch64_regmap): Remove.
4137 (aarch64_usrregs_info): Remove.
4138 (regs_info): Set field usrregs to NULL.
4140 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4142 * linux-low.c: Include "rsp-low.h"
4143 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4144 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4145 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4146 (handle_btrace_enable_pt): New.
4147 (handle_btrace_general_set): Support "pt".
4148 (handle_btrace_conf_general_set): Support "pt:size".
4150 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4152 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4155 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4157 * linux-aarch64-low.c: Remove comment about endianness.
4158 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4159 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4162 2015-06-24 Gary Benson <gbenson@redhat.com>
4164 * linux-i386-ipa.c (stdint.h): Do not include.
4165 * lynx-i386-low.c (stdint.h): Likewise.
4166 * lynx-ppc-low.c (stdint.h): Likewise.
4167 * mem-break.c (stdint.h): Likewise.
4168 * thread-db.c (stdint.h): Likewise.
4169 * tracepoint.c (stdint.h): Likewise.
4170 * win32-low.c (stdint.h): Likewise.
4172 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4174 * server.c (write_qxfer_response): Update call to
4175 remote_escape_output.
4177 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4178 Jan Kratochvil <jan.kratochvil@redhat.com>
4180 Merge multiple hex conversions.
4181 * gdbreplay.c (tohex): Rename to 'fromhex'.
4182 (logchar): Use fromhex.
4184 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4186 * server.c (handle_qxfer_libraries): Set `version' attribute for
4189 2015-06-10 Gary Benson <gbenson@redhat.com>
4191 * target.h (struct target_ops) <multifs_open>: New field.
4192 <multifs_unlink>: Likewise.
4193 <multifs_readlink>: Likewise.
4194 * linux-low.c (nat/linux-namespaces.h): New include.
4195 (linux_target_ops): Initialize the_target->multifs_open,
4196 the_target->multifs_unlink and the_target->multifs_readlink.
4197 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4198 * hostio.c (hostio_fs_pid): New static variable.
4199 (hostio_handle_new_gdb_connection): New function.
4200 (handle_setfs): Likewise.
4201 (handle_open): Use the_target->multifs_open as appropriate.
4202 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4203 (handle_readlink): Use the_target->multifs_readlink as
4205 (handle_vFile): Handle vFile:setfs packets.
4206 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4207 after target_handle_new_gdb_connection.
4209 2015-06-10 Gary Benson <gbenson@redhat.com>
4211 * configure.ac (AC_CHECK_FUNCS): Add setns.
4212 * config.in: Regenerate.
4213 * configure: Likewise.
4214 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4215 (linux-namespaces.o): New rule.
4216 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4218 2015-06-09 Gary Benson <gbenson@redhat.com>
4220 * hostio.c (handle_open): Process mode argument with
4221 fileio_to_host_mode.
4223 2015-06-01 Yao Qi <yao.qi@linaro.org>
4225 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4226 * linux-x86-low.c: Likewise.
4228 2015-05-28 Don Breazeal <donb@codesourcery.com>
4230 * linux-low.c (handle_extended_wait): Initialize
4231 thread_info.last_resume_kind for new fork children.
4233 2015-05-15 Pedro Alves <palves@redhat.com>
4235 * target.h (target_handle_new_gdb_connection): Rewrite using if
4236 wrapped in do/while.
4238 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4240 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4241 * configure, config.in: Regenerate.
4242 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4245 2015-05-12 Don Breazeal <donb@codesourcery.com>
4247 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4248 PTRACE_EVENT_VFORK_DONE.
4249 (linux_low_ptrace_options, extended_event_reported): Add vfork
4251 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4252 and "vforkdone" for RSP 'T' Stop Reply Packet.
4253 * server.h (report_vfork_events): Declare
4256 2015-05-12 Don Breazeal <donb@codesourcery.com>
4258 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4259 (the_low_target) <new_fork>: Initialize new member.
4260 * linux-arm-low.c (arm_new_fork): New function.
4261 (the_low_target) <new_fork>: Initialize new member.
4262 * linux-low.c (handle_extended_wait): Call new target function
4264 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4265 * linux-mips-low.c (mips_add_watchpoint): New function
4266 extracted from mips_insert_point.
4267 (the_low_target) <new_fork>: Initialize new member.
4268 (mips_linux_new_fork): New function.
4269 (mips_insert_point): Call mips_add_watchpoint.
4270 * linux-x86-low.c (x86_linux_new_fork): New function.
4271 (the_low_target) <new_fork>: Initialize new member.
4273 2015-05-12 Don Breazeal <donb@codesourcery.com>
4275 * linux-low.c (handle_extended_wait): Implement return value,
4276 rename argument 'event_child' to 'event_lwp', handle
4277 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4278 (linux_low_ptrace_options): New function.
4279 (linux_low_filter_event): Call linux_low_ptrace_options,
4280 use different argument fo linux_enable_event_reporting,
4281 use return value from handle_extended_wait.
4282 (extended_event_reported): New function.
4283 (linux_wait_1): Call extended_event_reported and set
4284 status to report fork events.
4285 (linux_write_memory): Add pid to debug message.
4286 (reset_lwp_ptrace_options_callback): New function.
4287 (linux_handle_new_gdb_connection): New function.
4288 (linux_target_ops): Initialize new structure member.
4289 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4290 * lynx-low.c: Initialize new structure member.
4291 * remote-utils.c (prepare_resume_reply): Implement stop reason
4292 "fork" for "T" stop message.
4293 * server.c (handle_query): Call handle_new_gdb_connection.
4294 * server.h (report_fork_events): Declare global flag.
4295 * target.h (struct target_ops) <handle_new_gdb_connection>:
4297 (target_handle_new_gdb_connection): New macro.
4298 * win32-low.c: Initialize new structure member.
4300 2015-05-12 Don Breazeal <donb@codesourcery.com>
4302 * mem-break.c (APPEND_TO_LIST): Define macro.
4303 (clone_agent_expr): New function.
4304 (clone_one_breakpoint): New function.
4305 (clone_all_breakpoints): New function.
4306 * mem-break.h: Declare new functions.
4308 2015-05-12 Don Breazeal <donb@codesourcery.com>
4310 * linux-low.c (linux_supports_fork_events): New function.
4311 (linux_supports_vfork_events): New function.
4312 (linux_target_ops): Initialize new structure members.
4313 (initialize_low): Call linux_check_ptrace_features.
4314 * lynx-low.c (lynx_target_ops): Initialize new structure
4316 * server.c (report_fork_events, report_vfork_events):
4318 (handle_query): Add new features to qSupported packet and
4320 (captured_main): Initialize new global variables.
4321 * target.h (struct target_ops) <supports_fork_events>:
4323 <supports_vfork_events>: New member.
4324 (target_supports_fork_events): New macro.
4325 (target_supports_vfork_events): New macro.
4326 * win32-low.c (win32_target_ops): Initialize new structure
4329 2015-05-12 Gary Benson <gbenson@redhat.com>
4331 * server.c (handle_qxfer_exec_file): Use current process
4334 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4336 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4337 Remove HAVE_PTRACE_GETREGS conditionals.
4338 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4339 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4341 2015-05-08 Yao Qi <yao.qi@linaro.org>
4343 * linux-low.c (linux_supports_conditional_breakpoints): New
4345 (linux_target_ops): Install new target method.
4346 * lynx-low.c (lynx_target_ops): Install NULL hook for
4347 supports_conditional_breakpoints.
4348 * nto-low.c (nto_target_ops): Likewise.
4349 * spu-low.c (spu_target_ops): Likewise.
4350 * win32-low.c (win32_target_ops): Likewise.
4351 * server.c (handle_query): Check
4352 target_supports_conditional_breakpoints.
4353 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4355 (target_supports_conditional_breakpoints): New macro.
4357 2015-05-06 Pedro Alves <palves@redhat.com>
4360 * server.c (start_inferior): If the process exits, mourn it.
4362 2015-04-21 Gary Benson <gbenson@redhat.com>
4364 * hostio.c (fileio_open_flags_to_host): Factored out to
4365 fileio_to_host_openflags in common/fileio.c. Single use
4368 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4370 * linux-xtensa-low.c (xtensa_fill_gregset)
4371 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4374 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4376 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4377 (regs_info): Replace usrregs pointer with NULL.
4379 2015-04-17 Gary Benson <gbenson@redhat.com>
4381 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4382 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4383 * server.c (handle_qxfer_exec_file): New function.
4384 (qxfer_packets): Add exec-file entry.
4385 (handle_query): Report qXfer:exec-file:read as supported packet.
4387 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4389 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4391 2015-04-09 Gary Benson <gbenson@redhat.com>
4393 * hostio-errno.c (errno_to_fileio_error): Remove function.
4394 Update caller to use remote_fileio_to_fio_error.
4396 2015-04-09 Yao Qi <yao.qi@linaro.org>
4398 * linux-low.c (linux_insert_point): Call
4399 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4400 (linux_remove_point): Call remove_memory_breakpoint if type is
4402 * linux-x86-low.c (x86_insert_point): Don't call
4403 insert_memory_breakpoint.
4404 (x86_remove_point): Don't call remove_memory_breakpoint.
4406 2015-04-01 Pedro Alves <palves@redhat.com>
4407 Cleber Rosa <crosa@redhat.com>
4409 * server.c (gdbserver_usage): Reorganize and extend the usage
4412 2015-03-24 Pedro Alves <palves@redhat.com>
4414 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4415 output. Also dump TRAP_TRACE.
4416 (linux_low_filter_event): In debug output, distinguish a
4417 resume_stop SIGSTOP from a delayed SIGSTOP.
4419 2015-03-24 Gary Benson <gbenson@redhat.com>
4421 * linux-x86-low.c (x86_linux_new_thread): Moved to
4423 (x86_linux_prepare_to_resume): Likewise.
4425 2015-03-24 Gary Benson <gbenson@redhat.com>
4427 * Makefile.in (x86-linux-dregs.o): New rule.
4428 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4429 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4430 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4431 (x86_linux_dr_get): Likewise.
4432 (x86_linux_dr_set): Likewise.
4433 (update_debug_registers_callback): Likewise.
4434 (x86_linux_dr_set_addr): Likewise.
4435 (x86_linux_dr_get_addr): Likewise.
4436 (x86_linux_dr_set_control): Likewise.
4437 (x86_linux_dr_get_control): Likewise.
4438 (x86_linux_dr_get_status): Likewise.
4439 (x86_linux_update_debug_registers): Likewise.
4441 2015-03-24 Gary Benson <gbenson@redhat.com>
4443 * linux-x86-low.c (x86_linux_update_debug_registers):
4444 New function, factored out from...
4445 (x86_linux_prepare_to_resume): ...this.
4447 2015-03-24 Gary Benson <gbenson@redhat.com>
4449 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4450 (x86_linux_dr_set): Likewise.
4451 (update_debug_registers_callback): Likewise.
4452 (x86_linux_dr_set_addr): Likewise.
4453 (x86_linux_dr_get_addr): Likewise.
4454 (x86_linux_dr_set_control): Likewise.
4455 (x86_linux_dr_get_control): Likewise.
4456 (x86_linux_dr_get_status): Likewise.
4457 (x86_linux_prepare_to_resume): Likewise.
4459 2015-03-24 Gary Benson <gbenson@redhat.com>
4461 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4462 Use perror_with_name. Pass string through gettext.
4463 (x86_linux_dr_set): Likewise.
4465 2015-03-24 Gary Benson <gbenson@redhat.com>
4467 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4468 (x86_linux_dr_set_addr): ...this.
4469 (x86_dr_low_get_addr): Rename to...
4470 (x86_linux_dr_get_addr): ...this.
4471 (x86_dr_low_set_control): Rename to...
4472 (x86_linux_dr_set_control): ...this.
4473 (x86_dr_low_get_control): Rename to...
4474 (x86_linux_dr_get_control): ...this.
4475 (x86_dr_low_get_status): Rename to...
4476 (x86_linux_dr_get_status): ...this.
4477 (x86_dr_low): Update with new function names.
4479 2015-03-24 Gary Benson <gbenson@redhat.com>
4481 * Makefile.in (x86-linux.o): New rule.
4482 * configure.srv: Add x86-linux.o to relevant targets.
4483 * linux-low.c (lwp_set_arch_private_info): New function.
4484 (lwp_arch_private_info): Likewise.
4485 * linux-x86-low.c: Include nat/x86-linux.h.
4486 (arch_lwp_info): Removed structure.
4487 (update_debug_registers_callback):
4488 Use lwp_set_debug_registers_changed.
4489 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4490 and lwp_set_debug_registers_changed.
4491 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4493 2015-03-24 Gary Benson <gbenson@redhat.com>
4495 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4496 * linux-arm-low.c (arm_new_thread): Likewise.
4497 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4498 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4499 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4500 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4502 2015-03-24 Gary Benson <gbenson@redhat.com>
4504 * linux-low.c (ptid_of_lwp): New function.
4505 (lwp_is_stopped): Likewise.
4506 (lwp_stop_reason): Likewise.
4507 * linux-x86-low.c (update_debug_registers_callback):
4509 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4512 2015-03-24 Gary Benson <gbenson@redhat.com>
4514 * linux-low.h (linux_stop_lwp): Remove declaration.
4516 2015-03-24 Gary Benson <gbenson@redhat.com>
4518 * linux-low.h: Include nat/linux-nat.h.
4519 * linux-low.c (iterate_over_lwps_args): New structure.
4520 (iterate_over_lwps_filter): New function.
4521 (iterate_over_lwps): Likewise.
4522 * linux-x86-low.c (update_debug_registers_callback):
4523 Update signature to what iterate_over_lwps expects.
4524 Remove PID check that iterate_over_lwps now performs.
4525 (x86_dr_low_set_addr): Use iterate_over_lwps.
4526 (x86_dr_low_set_control): Likewise.
4528 2015-03-24 Gary Benson <gbenson@redhat.com>
4530 * linux-x86-low.c (x86_debug_reg_state): New function.
4531 (x86_linux_prepare_to_resume): Use the above.
4533 2015-03-24 Gary Benson <gbenson@redhat.com>
4535 * linux-low.c (current_lwp_ptid): New function.
4536 * linux-x86-low.c: Include nat/linux-nat.h.
4537 (x86_dr_low_get_addr): Use current_lwp_ptid.
4538 (x86_dr_low_get_control): Likewise.
4539 (x86_dr_low_get_status): Likewise.
4541 2015-03-20 Pedro Alves <palves@redhat.com>
4543 * tracepoint.c (cmd_qtstatus): Make "str" const.
4545 2015-03-20 Pedro Alves <palves@redhat.com>
4547 * server.c (handle_general_set): Make "req_str" const.
4549 2015-03-19 Pedro Alves <palves@redhat.com>
4551 * linux-low.c (linux_resume_one_lwp): Rename to ...
4552 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4553 instead call perror_with_name.
4554 (check_ptrace_stopped_lwp_gone): New function.
4555 (linux_resume_one_lwp): Reimplement as wrapper around
4556 linux_resume_one_lwp_throw that swallows errors if the LWP is
4559 2015-03-19 Pedro Alves <palves@redhat.com>
4561 * linux-low.c (count_events_callback, select_event_lwp_callback):
4562 No longer check whether the thread has resume_stop as last resume
4565 2015-03-19 Pedro Alves <palves@redhat.com>
4567 * linux-low.c (count_events_callback, select_event_lwp_callback):
4568 Use the lwp's status_pending_p field, not the thread's.
4570 2015-03-19 Pedro Alves <palves@redhat.com>
4572 * linux-low.c (select_event_lwp_callback): Update comments to
4573 no longer mention SIGTRAP.
4575 2015-03-18 Gary Benson <gbenson@redhat.com>
4577 * server.c (handle_query): Do not report vFile:fstat as supported.
4579 2015-03-11 Gary Benson <gbenson@redhat.com>
4581 * hostio.c (sys/types.h): New include.
4582 (sys/stat.h): Likewise.
4583 (common-remote-fileio.h): Likewise.
4584 (handle_fstat): New function.
4585 (handle_vFile): Handle vFile:fstat packets.
4587 2015-03-11 Gary Benson <gbenson@redhat.com>
4589 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4590 struct stat.st_blocks and struct stat.st_blksize.
4591 * configure: Regenerate.
4592 * config.in: Likewise.
4593 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4594 (OBS): Add common-remote-fileio.o.
4595 (common-remote-fileio.o): New rule.
4597 2015-03-09 Pedro Alves <palves@redhat.com>
4599 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4600 'struct sockaddr' pointer in 'accept' call.
4602 2015-03-09 Pedro Alves <palves@redhat.com>
4605 2015-03-07 Pedro Alves <palves@redhat.com>
4606 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4607 or <winsock2.h> here. Instead include "gdb_socket.h".
4608 (remote_open): Use union gdb_sockaddr_u.
4609 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4610 or <winsock2.h> here. Instead include "gdb_socket.h".
4611 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4612 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4614 (init_named_socket, gdb_agent_helper_thread): Use union
4617 2015-03-07 Pedro Alves <palves@redhat.com>
4619 * configure.ac (build_warnings): Move
4620 -Wdeclaration-after-statement to the C-specific set.
4621 * configure: Regenerate.
4623 2015-03-07 Pedro Alves <palves@redhat.com>
4625 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4626 or <winsock2.h> here. Instead include "gdb_socket.h".
4627 (remote_open): Use union gdb_sockaddr_u.
4628 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4629 or <winsock2.h> here. Instead include "gdb_socket.h".
4630 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4631 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4633 (init_named_socket, gdb_agent_helper_thread): Use union
4636 2015-03-07 Pedro Alves <palves@redhat.com>
4638 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4641 2015-03-06 Yao Qi <yao.qi@linaro.org>
4643 * linux-aarch64-low.c (aarch64_insert_point): Use
4644 show_debug_regs as a boolean.
4645 (aarch64_remove_point): Likewise.
4647 2015-03-05 Pedro Alves <palves@redhat.com>
4649 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4650 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4651 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4652 * nto-low.c (nto_target_ops): Likewise.
4653 * spu-low.c (spu_target_ops): Likewise.
4654 * win32-low.c (win32_target_ops): Likewise.
4656 2015-03-04 Pedro Alves <palves@redhat.com>
4658 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4659 Decide whether a breakpoint triggered based on the SIGTRAP's
4661 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4662 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4663 (linux_low_filter_event): Check for breakpoints before checking
4665 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4667 (linux_stopped_by_sw_breakpoint)
4668 (linux_supports_stopped_by_sw_breakpoint)
4669 (linux_stopped_by_hw_breakpoint)
4670 (linux_supports_stopped_by_hw_breakpoint): New functions.
4671 (linux_target_ops): Install new target methods.
4673 2015-03-04 Pedro Alves <palves@redhat.com>
4675 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4676 * server.c (swbreak_feature, hwbreak_feature): New globals.
4677 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4678 (captured_main): Clear swbreak_feature and hwbreak_feature.
4679 * server.h (swbreak_feature, hwbreak_feature): Declare.
4680 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4681 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4682 supports_stopped_by_hw_breakpoint>: New fields.
4683 (target_supports_stopped_by_sw_breakpoint)
4684 (target_stopped_by_sw_breakpoint)
4685 (target_supports_stopped_by_hw_breakpoint)
4686 (target_stopped_by_hw_breakpoint): Declare.
4688 2015-03-04 Pedro Alves <palves@redhat.com>
4690 enum lwp_stop_reason -> enum target_stop_reason
4691 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4692 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4693 (linux_wait_1, stuck_in_jump_pad_callback)
4694 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4695 (linux_stopped_by_watchpoint):
4696 * linux-low.h (enum lwp_stop_reason): Delete.
4697 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4698 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4700 2015-03-04 Yao Qi <yao.qi@linaro.org>
4702 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4704 2015-03-03 Gary Benson <gbenson@redhat.com>
4706 * hostio.c (handle_vFile): Fix prefix lengths.
4708 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4710 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4713 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4715 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4716 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4717 (clean): Add "rm -f" for above C files.
4718 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4719 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4720 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4721 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4722 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4723 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4724 (init_registers_s390x_vx_linux64)
4725 (init_registers_s390x_tevx_linux64)
4726 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4727 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4729 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4730 (s390_store_vxrs_high): New functions.
4731 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4733 (s390_arch_setup): Add logic for selecting one of the new target
4734 descriptions. Activate the new vector regsets if applicable.
4735 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4736 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4737 and init_registers_s390x_tevx_linux64.
4739 2015-03-01 Pedro Alves <palves@redhat.com>
4741 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4744 2015-02-27 Pedro Alves <palves@redhat.com>
4746 * linux-x86-low.c (u_debugreg_offset): New function.
4747 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4749 2015-02-27 Pedro Alves <palves@redhat.com>
4751 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4752 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4753 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4754 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4755 (ps_lsetfpregs, ps_getpid)
4756 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4757 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4758 (ps_lsetxregs, ps_plog): Declare.
4760 2015-02-27 Pedro Alves <palves@redhat.com>
4762 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4763 IP_AGENT_EXPORT_FUNC.
4764 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4765 IP_AGENT_EXPORT_FUNC.
4766 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4767 (IP_AGENT_EXPORT): Delete.
4768 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4769 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4770 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4771 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4772 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4773 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4774 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4775 (traceframe_read_count, traceframe_write_count)
4776 (traceframes_created, trace_state_variables, get_raw_reg)
4777 (get_trace_state_variable_value, set_trace_state_variable_value)
4778 (ust_loaded, helper_thread_id, cmd_buf): Use
4779 IPA_SYM_EXPORTED_NAME.
4780 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4781 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4782 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4783 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4784 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4785 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4786 EXTERN_C_PUSH/EXTERN_C_POP.
4787 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4788 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4789 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4790 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4791 (traceframe_write_count, traceframe_read_count)
4792 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4793 (about_to_request_buffer_space, get_trace_state_variable_value)
4794 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4795 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4796 EXTERN_C_PUSH/EXTERN_C_POP.
4797 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4798 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4799 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4800 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4801 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4802 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4803 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4804 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4806 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4807 (IP_AGENT_EXPORT_VAR_DECL): Define.
4809 (gdb_agent_get_raw_reg): Declare.
4811 2015-02-27 Tom Tromey <tromey@redhat.com>
4812 Pedro Alves <palves@redhat.com>
4814 Rename symbols whose names are reserved C++ keywords throughout.
4816 2015-02-27 Pedro Alves <palves@redhat.com>
4818 * Makefile.in (COMPILER): New, get it from autoconf.
4819 (CXX): Get from autoconf instead.
4820 (COMPILE.pre): Use COMPILER.
4821 (CC-LD): Rename to ...
4822 (CC_LD): ... this. Use COMPILER.
4823 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4824 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4825 * acinclude.m4: Include build-with-cxx.m4.
4826 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4827 Disable -Werror by default if building in C++ mode.
4828 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4829 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4830 the C++ compiler. Save/restore CXXFLAGS too.
4831 * configure: Regenerate.
4833 2015-02-27 Pedro Alves <palves@redhat.com>
4835 * acinclude.m4: Include libiberty.m4.
4836 * configure.ac: Call libiberty_INIT.
4837 * config.in, configure: Regenerate.
4839 2015-02-26 Pedro Alves <palves@redhat.com>
4841 * linux-low.c (linux_wait_1): When incrementing the PC past a
4842 program breakpoint always use the_low_target.breakpoint_len as
4843 increment, rather than the maximum between that and
4844 the_low_target.decr_pc_after_break.
4846 2015-02-23 Pedro Alves <palves@redhat.com>
4848 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4849 thread was doing a step-over; always adjust the PC if
4850 we stepped over a permanent breakpoint.
4851 (linux_wait_1): If we stepped over breakpoint that was on top of a
4852 permanent breakpoint, manually advance the PC past it.
4854 2015-02-23 Pedro Alves <palves@redhat.com>
4856 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4858 (x86_fill_gregset, x86_store_gregset): Use it when handling
4861 2015-02-20 Pedro Alves <palves@redhat.com>
4863 * thread-db.c: Include "nat/linux-procfs.h".
4864 (thread_db_init): Skip listing new threads if the kernel supports
4865 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4867 2015-02-20 Pedro Alves <palves@redhat.com>
4869 * linux-low.c (status_pending_p_callback): Use ptid_match.
4871 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4873 PR breakpoints/16812
4874 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4875 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4876 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4878 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4880 PR breakpoints/15956
4881 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4883 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4885 * linux-low.c (linux_low_btrace_conf): Print size.
4886 * server.c (handle_btrace_conf_general_set): New.
4887 (hanle_general_set): Call handle_btrace_conf_general_set.
4888 (handle_query): Report Qbtrace-conf:bts:size as supported.
4890 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4892 * linux-low.c (linux_low_enable_btrace): Update parameters.
4893 (linux_low_btrace_conf): New.
4894 (linux_target_ops)<to_btrace_conf>: Initialize.
4895 * server.c (current_btrace_conf): New.
4896 (handle_btrace_enable): Rename to ...
4897 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4898 to target_enable_btrace. Update comment. Update users.
4899 (handle_qxfer_btrace_conf): New.
4900 (qxfer_packets): Add btrace-conf entry.
4901 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4902 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4903 (target_ops)<read_btrace_conf>: New.
4904 (target_enable_btrace): Update parameters.
4905 (target_read_btrace_conf): New.
4907 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4909 * server.c (handle_btrace_general_set): Remove call to
4910 target_supports_btrace.
4911 (supported_btrace_packets): New.
4912 (handle_query): Call supported_btrace_packets.
4913 * target.h: include btrace-common.h.
4914 (btrace_target_info): Removed.
4915 (supports_btrace, target_supports_btrace): Update parameters.
4917 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4919 * Makefile.in (SFILES): Add common/btrace-common.c.
4920 (OBS): Add common/btrace-common.o.
4921 (btrace-common.o): Add build rules.
4922 * linux-low: Include btrace-common.h.
4923 (linux_low_read_btrace): Use struct btrace_data. Call
4924 btrace_data_init and btrace_data_fini.
4926 2015-02-06 Pedro Alves <palves@redhat.com>
4928 * thread-db.c (find_new_threads_callback): Add debug output.
4930 2015-02-04 Pedro Alves <palves@redhat.com>
4932 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4933 (resume_stopped_resumed_lwps): New function.
4934 (linux_wait_for_event_filtered): Use it.
4936 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4938 * Makefile.in (SFILES): Add linux-personality.c.
4939 (linux-personality.o): New rule.
4940 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4941 list of objects to be built.
4942 * linux-low.c: Include nat/linux-personality.h.
4943 (linux_create_inferior): Remove code to disable address space
4944 randomization (moved to ../nat/linux-personality.c). Create
4945 cleanup to disable address space randomization.
4947 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4949 * Makefile.in (posix-strerror.o): New rule.
4950 (mingw-strerror.o): Likewise.
4951 * configure: Regenerated.
4952 * configure.ac: Source file ../common/common.host. Initialize new
4953 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4955 2015-01-14 Yao Qi <yao@codesourcery.com>
4957 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4958 (ppc-linux.o): New rule.
4959 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4960 * configure.ac: AC_CHECK_FUNCS(getauxval).
4961 * config.in: Re-generated.
4962 * configure: Re-generated.
4963 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4964 ppc64_64bit_inferior_p
4966 2015-01-14 Yao Qi <yao@codesourcery.com>
4968 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4969 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4970 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4971 (PT_ORIG_R3, PT_TRAP): Likewise.
4972 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4973 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4974 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4976 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4978 * i387-fp.c (i387_cache_to_xsave): In look over
4979 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4980 zmmh_low_space field by use of zmmh_high_space.
4982 2015-01-09 Pedro Alves <palves@redhat.com>
4984 * linux-low.c (step_over_bkpt): Move higher up in the file.
4985 (handle_extended_wait): Don't store the stop_pc here.
4986 (get_stop_pc): Adjust comments and rename to ...
4987 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4988 stopped for a software breakpoint or hardware breakpoint.
4989 (thread_still_has_status_pending_p): New function.
4990 (status_pending_p_callback): Use
4991 thread_still_has_status_pending_p. If the event is no longer
4992 interesting, resume the LWP.
4993 (handle_tracepoints): Add assert.
4994 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4995 (wstatus_maybe_breakpoint): New function.
4996 (cancel_breakpoint): Delete function.
4997 (check_stopped_by_watchpoint): New function, factored out from
4998 linux_low_filter_event.
4999 (lp_status_maybe_breakpoint): Delete function.
5000 (linux_low_filter_event): Remove filter_ptid argument.
5001 Leave thread group exits pending here. Store the LWP's stop PC.
5002 Always leave events pending.
5003 (linux_wait_for_event_filtered): Pull all events out of the
5004 kernel, and leave them all pending.
5005 (count_events_callback, select_event_lwp_callback): Consider all
5007 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5008 (select_event_lwp): Only give preference to the stepping LWP in
5009 all-stop mode. Adjust comments.
5010 (ignore_event): New function.
5011 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5012 references to cancel_breakpoints. Adjust to renames. Also give
5013 equal priority to all LWPs that have had events in non-stop mode.
5014 If reporting a software breakpoint event, unadjust the LWP's PC.
5015 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5016 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5018 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5019 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5020 (linux_stopped_by_watchpoint): Adjust.
5021 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5022 * linux-low.h (enum lwp_stop_reason): New.
5023 (struct lwp_info) <stop_pc>: Adjust comment.
5024 <stopped_by_watchpoint>: Delete field.
5025 <stop_reason>: New field.
5026 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5027 * mem-break.c (software_breakpoint_inserted_here)
5028 (hardware_breakpoint_inserted_here): New function.
5029 * mem-break.h (software_breakpoint_inserted_here)
5030 (hardware_breakpoint_inserted_here): Declare.
5031 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5032 (cancel_breakpoints): Delete.
5033 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5034 (upload_fast_traceframes): Remove references to
5037 2015-01-09 Pedro Alves <palves@redhat.com>
5039 * thread-db.c (find_new_threads_callback): Ignore thread if the
5040 kernel thread ID is -1.
5042 2015-01-09 Pedro Alves <palves@redhat.com>
5044 * linux-low.c (linux_attach_fail_reason_string): Move to
5045 nat/linux-ptrace.c, and rename.
5046 (linux_attach_lwp): Update comment.
5047 (attach_proc_task_lwp_callback): New function.
5048 (linux_attach): Adjust to rename and use
5049 linux_proc_attach_tgid_threads.
5050 (linux_attach_fail_reason_string): Delete declaration.
5052 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5054 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5055 * server.c (gdbserver_version): Likewise.
5057 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5059 * remote-utils.c: Include ctype.h.
5060 (input_interrupt): Explicitly handle the case when the char
5061 received is the NUL byte. Improve the printing of non-ASCII
5064 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5066 * linux-low.c (linux_low_filter_event): Update call to
5067 linux_enable_event_reporting following the addition of
5068 a new parameter to that function.
5070 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5073 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5074 (AARCH64_FPCR_REGNO): Likewise.
5075 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5076 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5077 (aarch64_store_fpregset): Likewise.
5079 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5081 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5082 Remove FIXME comment about assumption about N.
5084 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5086 * configure.ac: If large-file support is disabled in GDBserver,
5087 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5088 * configure: Regenerate.
5090 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5092 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5093 warning upon ENODATA from ptrace.
5094 * linux-s390-low.c (s390_store_tdb): New.
5095 (s390_regsets): Add regset for NT_S390_TDB.
5097 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5099 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5100 without a fill_function.
5101 * linux-s390-low.c (s390_fill_last_break): Remove.
5102 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5103 (s390_arch_setup): Use regset's size instead of fill_function for
5106 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5108 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5109 the regset's store function when ptrace returned an error.
5110 * regcache.c (get_thread_regcache): Invalidate register cache
5111 before fetching inferior's registers.
5113 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5115 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5116 while-loop as for-loop.
5117 (regsets_store_inferior_registers): Likewise.
5119 2014-11-28 Yao Qi <yao@codesourcery.com>
5121 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5122 * config.in, configure: Re-generate.
5123 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5126 2014-11-21 Yao Qi <yao@codesourcery.com>
5128 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5129 (AC_CHECK_HEADERS): Remove malloc.h.
5130 * configure: Re-generated.
5131 * config.in: Re-generated.
5132 * server.h: Don't include alloca.h and malloc.h.
5133 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5134 Don't include malloc.h.
5136 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5138 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5139 corresponding ERRNO check in same block.
5141 2014-11-12 Pedro Alves <palves@redhat.com>
5143 * server.c (cont_thread): Update comment.
5144 (start_inferior, attach_inferior): No longer clear cont_thread.
5145 (handle_v_cont): No longer set cont_thread.
5146 (captured_main): Clear cont_thread each time a GDB connects.
5148 2014-11-12 Pedro Alves <palves@redhat.com>
5150 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5151 thread, and don't resume all threads if the Hc thread has exited.
5153 2014-11-12 Pedro Alves <palves@redhat.com>
5155 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5156 the process group instead of to a specific LWP.
5158 2014-10-15 Pedro Alves <palves@redhat.com>
5161 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5163 (arm_set_thread_context): Delete.
5164 (the_low_target): Adjust.
5165 * win32-i386-low.c (debug_registers_changed)
5166 (debug_registers_used): Delete.
5167 (update_debug_registers_callback): New function.
5168 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5169 needing to update their debug registers.
5170 (win32_get_current_dr): New function.
5171 (x86_dr_low_get_addr, x86_dr_low_get_control)
5172 (x86_dr_low_get_status): Fetch the debug register from the thread
5174 (i386_initial_stuff): Adjust.
5175 (i386_get_thread_context): Remove current_event parameter. Don't
5176 clear debug_registers_changed nor copy DR values to
5178 (i386_set_thread_context): Delete.
5179 (i386_prepare_to_resume): New function.
5180 (i386_thread_added): Mark the thread as needing to update irs
5182 (the_low_target): Remove i386_set_thread_context and install
5183 i386_prepare_to_resume.
5184 * win32-low.c (win32_get_thread_context): Adjust.
5185 (win32_set_thread_context): Use SetThreadContext
5187 (win32_prepare_to_resume): New function.
5188 (win32_require_context): New function, factored out from ...
5189 (thread_rec): ... this.
5190 (continue_one_thread): Call win32_prepare_to_resume on each thread
5191 we're about to continue.
5192 (win32_resume): Call win32_prepare_to_resume on the event thread.
5193 * win32-low.h (struct win32_thread_info)
5194 <debug_registers_changed>: New field.
5195 (struct win32_target_ops): Change prototype of set_thread_context,
5196 delete set_thread_context and add prepare_to_resume.
5197 (win32_require_context): New declaration.
5199 2014-10-08 Gary Benson <gbenson@redhat.com>
5201 * server.h: Do not include common-exceptions.h.
5203 2014-10-08 Gary Benson <gbenson@redhat.com>
5205 * server.h: Do not include cleanups.h.
5207 2014-09-30 James Hogan <james.hogan@imgtec.com>
5209 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5212 2014-09-23 Yao Qi <yao@codesourcery.com>
5214 * linux-low.c (lp_status_maybe_breakpoint): New function.
5215 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5216 (count_events_callback): Likewise.
5217 (select_event_lwp_callback): Likewise.
5218 (cancel_breakpoints_callback): Likewise.
5220 2014-09-19 Don Breazeal <donb@codesourcery.com>
5222 * linux-low.c (handle_extended_wait): Call
5223 linux_ptrace_get_extended_event.
5224 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5225 linux_is_extended_waitstatus.
5227 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5229 * Makefile.in (CPPFLAGS): Define.
5230 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5231 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5233 2014-09-16 Gary Benson <gbenson@redhat.com>
5235 * inferiors.h (current_inferior): Renamed as...
5236 (current_thread): New variable. All uses updated.
5237 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5238 (maybe_move_out_of_jump_pad): Likewise.
5239 (cancel_breakpoint): Likewise.
5240 (linux_low_filter_event): Likewise.
5241 (wait_for_sigstop): Likewise.
5242 (linux_resume_one_lwp): Likewise.
5243 (need_step_over_p): Likewise.
5244 (start_step_over): Likewise.
5245 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5246 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5247 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5248 and save_inferior as saved_thread.
5249 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5251 (regcache_invalidate_thread): Likewise.
5252 * remote-utils.c (prepare_resume_reply): Likewise.
5253 * thread-db.c (thread_db_get_tls_address): Likewise.
5254 (disable_thread_event_reporting): Likewise.
5255 (remove_thread_event_breakpoints): Likewise.
5256 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5258 * target.h (set_desired_inferior): Renamed as...
5259 (set_desired_thread): New declaration. All uses updated.
5260 * server.c (myresume): Updated comment to reference thread instead
5262 (handle_serial_event): Likewise.
5263 (handle_target_event): Likewise.
5265 2014-09-12 Tom Tromey <tromey@redhat.com>
5266 Gary Benson <gbenson@redhat.com>
5268 * regcache.h: Include common-regcache.h.
5269 (regcache_read_pc): Don't declare.
5270 * regcache.c (get_thread_regcache_for_ptid): New function.
5272 2014-09-11 Tom Tromey <tromey@redhat.com>
5273 Gary Benson <gbenson@redhat.com>
5275 * symbol.c: New file.
5276 * Makefile.in (SFILES): Add symbol.c.
5277 (OBS): Add symbol.o.
5279 2014-09-11 Gary Benson <gbenson@redhat.com>
5281 * target.c (target_stop_ptid, target_continue_ptid): New
5284 2014-09-11 Tom Tromey <tromey@redhat.com>
5285 Gary Benson <gbenson@redhat.com>
5287 * target.h: Include target/target.h.
5288 * target.c (target_read_memory, target_read_uint32)
5289 (target_write_memory): New functions.
5291 2014-09-11 Gary Benson <gbenson@redhat.com>
5293 * server.h (debug_hw_points): Don't declare.
5294 * server.c (debug_hw_points): Don't define. Replace all uses
5295 with show_debug_regs.
5296 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5297 all uses with show_debug_regs.
5299 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5301 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5302 endianness into account.
5303 (ppc_supply_ptrace_register): Likewise.
5305 2014-09-03 James Hogan <james.hogan@imgtec.com>
5307 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5308 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5310 2014-09-03 Gary Benson <gbenson@redhat.com>
5312 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5313 ALL_DEBUG_ADDRESS_REGISTERS.
5315 2014-09-02 Gary Benson <gbenson@redhat.com>
5317 * i386-low.h: Renamed as...
5318 * x86-low.h: New file. All type, function and variable name
5319 prefixes changed from "i386_" to "x86_". All references updated.
5320 * i386-low.c: Renamed as...
5321 * x86-low.c: New file. All type, function and variable name
5322 prefixes changed from "i386_" to "x86_". All references updated.
5324 2014-09-02 Gary Benson <gbenson@redhat.com>
5326 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5327 (x86_linux_new_thread): Likewise.
5329 2014-08-29 Gary Benson <gbenson@redhat.com>
5331 * server.h (setjmp.h): Do not include.
5332 (toplevel): Do not declare.
5333 (common-exceptions.h): Include.
5334 (cleanups.h): Likewise.
5335 * server.c (toplevel): Do not define.
5336 (exit_code): New static global.
5337 (detach_or_kill_for_exit_cleanup): New function.
5338 (main): New function. Original main renamed to...
5339 (captured_main): New function.
5340 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5342 2014-08-29 Gary Benson <gbenson@redhat.com>
5344 * Makefile.in (SFILES): Add common/common-exceptions.c.
5345 (OBS): Add common-exceptions.o.
5346 (common-exceptions.o): New rule.
5347 * utils.c (prepare_to_throw_exception): New function.
5349 2014-08-29 Gary Benson <gbenson@redhat.com>
5351 * config.in: Regenerate.
5352 * configure: Likewise.
5354 2014-08-29 Gary Benson <gbenson@redhat.com>
5356 * Makefile.in (SFILES): Add common/cleanups.c.
5358 (cleanups.o): New rule.
5360 2014-08-29 Gary Benson <gbenson@redhat.com>
5362 * utils.c (internal_vwarning): New function.
5364 2014-08-28 Gary Benson <gbenson@redhat.com>
5366 * utils.h (fatal): Remove declaration.
5367 * utils.c (fatal): Remove function.
5369 2014-08-28 Gary Benson <gbenson@redhat.com>
5371 * tracepoint.c (gdb_agent_init): Replace fatal with
5373 (initialize_tracepoint): Likewise.
5375 2014-08-28 Gary Benson <gbenson@redhat.com>
5377 * remote-utils.c (remote_prepare): Replace fatal with error.
5379 2014-08-28 Gary Benson <gbenson@redhat.com>
5381 * linux-low.c (linux_async): Replace fatal with warning.
5383 (linux_start_non_stop): Return -1 if linux_async failed.
5385 2014-08-28 Gary Benson <gbenson@redhat.com>
5387 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5389 (i386_dr_low_get_addr): Remove vague comment.
5390 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5393 2014-08-28 Gary Benson <gbenson@redhat.com>
5395 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5396 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5398 (linux_resume_one_lwp): Likewise.
5399 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5401 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5402 with internal_error.
5403 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5404 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5405 (find_register_by_name): Replace fatal with internal_error.
5406 (find_regno): Likewise.
5407 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5408 * thread-db.c (thread_db_create_event): Likewise.
5409 (thread_db_load_search): Likewise.
5410 (try_thread_db_load_1): Likewise.
5411 * tracepoint.c (get_jump_space_head): Replace fatal with
5413 (claim_trampoline_space): Likewise.
5414 (have_fast_tracepoint_trampoline_buffer): Likewise.
5415 (cmd_qtstart): Likewise.
5416 (stop_tracing): Likewise.
5417 (fast_tracepoint_collecting): Likewise.
5418 (target_malloc): Likewise.
5419 (download_tracepoint): Likewise.
5420 (download_trace_state_variables): Replace check with gdb_assert.
5421 (upload_fast_traceframes): Replace fatal with internal_error.
5423 2014-08-19 Tom Tromey <tromey@redhat.com>
5424 Gary Benson <gbenson@redhat.com>
5426 * Makefile.in (SFILES): Add common/common-debug.c.
5427 (OBS): Add common-debug.o.
5428 (common-debug.o): New rule.
5429 * debug.h (debug_printf): Don't declare.
5430 * debug.c (debug_printf): Renamed and rewritten as...
5431 (debug_vprintf): New function.
5433 2014-08-19 Gary Benson <gbenson@redhat.com>
5435 * utils.h: Do not include print-utils.h.
5437 2014-08-19 Tom Tromey <tromey@redhat.com>
5438 Gary Benson <gbenson@redhat.com>
5440 * server.h: Add static assertion.
5441 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5443 2014-08-19 Tom Tromey <tromey@redhat.com>
5444 Gary Benson <gbenson@redhat.com>
5446 * Makefile.in (SFILES): Add common/errors.c.
5447 (OBS): Add errors.o.
5448 (IPA_OBS): Add errors-ipa.o.
5449 (errors.o): New rule.
5450 (errors-ipa.o): Likewise.
5451 * utils.h (perror_with_name, error, warning): Don't declare.
5452 * utils.c (warning): Renamed and rewritten as...
5453 (vwarning): New function.
5454 (error): Renamed and rewritten as...
5455 (verror): New function.
5456 (internal_error): Renamed and rewritten as...
5457 (internal_verror): New function.
5459 2014-08-07 Gary Benson <gbenson@redhat.com>
5461 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5462 * configure: Regenerate.
5463 * config.in: Likewise.
5464 * server.h: Do not include errno.h.
5465 * event-loop.c: Likewise.
5466 * hostio-errno.c: Likewise.
5467 * linux-low.c: Likewise.
5468 * remote-utils.c: Likewise.
5469 * spu-low.c: Likewise.
5470 * utils.c: Likewise.
5471 * gdbreplay.c: Unconditionally include errno.h.
5473 2014-08-07 Gary Benson <gbenson@redhat.com>
5475 * server.h: Do not include string.h.
5476 * event-loop.c: Likewise.
5477 * linux-low.c: Likewise.
5478 * regcache.c: Likewise.
5479 * remote-utils.c: Likewise.
5480 * spu-low.c: Likewise.
5481 * utils.c: Likewise.
5483 2014-08-07 Gary Benson <gbenson@redhat.com>
5485 * server.h: Do not include gdb_assert.h.
5487 2014-08-07 Gary Benson <gbenson@redhat.com>
5489 * server.h: Do not include common-utils.h.
5491 2014-08-07 Gary Benson <gbenson@redhat.com>
5493 * server.h: Do not include ptid.h.
5494 * notif.h: Likewise.
5496 2014-08-07 Gary Benson <gbenson@redhat.com>
5498 * server.h: Do not include gdb_locale.h.
5500 2014-08-07 Gary Benson <gbenson@redhat.com>
5502 * server.h: Do not include gdb/signals.h.
5503 * win32-low.c: Likewise.
5505 2014-08-07 Gary Benson <gbenson@redhat.com>
5507 * server.h: Do not include pathmax.h.
5509 2014-08-07 Gary Benson <gbenson@redhat.com>
5511 * server.h: Do not include libiberty.h.
5512 * linux-bfin-low.c: Likewise.
5514 2014-08-07 Gary Benson <gbenson@redhat.com>
5516 * server.h: Do not include ansidecl.h.
5518 2014-08-07 Gary Benson <gbenson@redhat.com>
5520 * linux-x86-low.c: Do not include stddef.h.
5521 * lynx-ppc-low.c: Likewise.
5522 * tracepoint.c: Likewise.
5524 2014-08-07 Gary Benson <gbenson@redhat.com>
5526 * server.h: Do not include stdarg.h.
5527 * nto-low.c: Likewise.
5529 2014-08-07 Gary Benson <gbenson@redhat.com>
5531 * server.h: Do not include stdlib.h.
5532 * inferiors.c: Likewise.
5533 * linux-low.c: Likewise.
5534 * regcache.c: Likewise.
5535 * spu-low.c: Likewise.
5536 * tracepoint.c: Likewise.
5537 * utils.c: Likewise.
5539 2014-08-07 Gary Benson <gbenson@redhat.com>
5541 * server.h: Do not include stdio.h.
5542 * linux-low.c: Likewise.
5543 * remote-utils.c: Likewise.
5544 * spu-low.c: Likewise.
5545 * utils.c: Likewise.
5546 * wincecompat.c: Likewise.
5548 2014-08-06 Gary Benson <gbenson@redhat.com>
5550 * regcache.c (init_register_cache): Move conditionals inside if.
5552 2014-08-06 Gary Benson <gbenson@redhat.com>
5554 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5556 2014-07-31 Gary Benson <gbenson@redhat.com>
5558 * ax.h: Do not include server.h.
5559 * gdbthread.h: Likewise.
5560 * lynx-low.h: Likewise.
5561 * notif.h: Likewise.
5563 2014-07-30 Gary Benson <gbenson@redhat.com>
5565 * server.h: Include common-defs.h.
5566 Do not include config.h or build-gnulib-gdbserver/config.h.
5568 2014-07-30 Gary Benson <gbenson@redhat.com>
5570 * hostio-errno.c: Move server.h to top of includes list.
5571 * inferiors.c: Likewise.
5572 * linux-x86-low.c: Likewise.
5573 * notif.c: Include server.h.
5575 2014-07-24 Tom Tromey <tromey@redhat.com>
5576 Gary Benson <gbenson@redhat.com>
5578 * server.h (CORE_ADDR): Now unsigned.
5580 2014-07-16 Pedro Alves <palves@redhat.com>
5582 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5584 2014-07-15 Pedro Alves <palves@redhat.com>
5586 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5589 2014-07-11 Pedro Alves <palves@redhat.com>
5591 * linux-low.c (kill_wait_lwp): New function, based on
5592 kill_one_lwp_callback, but use my_waitpid directly.
5593 (kill_one_lwp_callback, linux_kill): Use it.
5595 2014-06-23 Pedro Alves <palves@redhat.com>
5597 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5598 before setting DR0..DR3.
5600 2014-06-20 Gary Benson <gbenson@redhat.com>
5602 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5603 * configure: Regenerated.
5604 * config.in: Likewise.
5606 2014-06-20 Gary Benson <gbenson@redhat.com>
5608 * Makefile.in (SFILES): Update locations for files moved
5610 (object file files): Reordered.
5612 2014-06-20 Gary Benson <gbenson@redhat.com>
5614 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5615 (i386_dr_low_set_addr): Likewise.
5616 (i386_dr_low_get_addr): Likewise.
5617 (i386_dr_low_can_set_control): Likewise.
5618 (i386_dr_low_set_control): Likewise.
5619 (i386_dr_low_get_control): Likewise.
5620 (i386_dr_low_get_status): Likewise.
5621 (i386_get_debug_register_length): Likewise.
5622 * linux-x86-low.c (i386_dr_low_set_addr):
5623 Changed signature. Made static.
5624 (i386_dr_low_get_addr): Likewise.
5625 (i386_dr_low_set_control): Likewise.
5626 (i386_dr_low_get_control): Likewise.
5627 (i386_dr_low_get_status): Likewise.
5628 (i386_dr_low): New global variable.
5629 * win32-i386-low.c (i386_dr_low_set_addr):
5630 Changed signature. Made static.
5631 (i386_dr_low_get_addr): Likewise.
5632 (i386_dr_low_set_control): Likewise.
5633 (i386_dr_low_get_control): Likewise.
5634 (i386_dr_low_get_status): Likewise.
5635 (i386_dr_low): New global variable.
5637 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5639 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5640 * Makefile.in (AR, AR_FLAGS): Define.
5641 * configure: Regenerate.
5643 2014-06-19 Gary Benson <gbenson@redhat.com>
5645 * Makefile.in (i386-dregs.o): New rule.
5646 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5647 * i386-low.c (target.h): Remove include.
5648 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5649 (DR_CONTROL_SHIFT): Likewise.
5650 (DR_CONTROL_SIZE): Likewise.
5651 (DR_RW_EXECUTE): Likewise.
5652 (DR_RW_WRITE): Likewise.
5653 (DR_RW_READ): Likewise.
5654 (DR_RW_IORW): Likewise.
5655 (DR_LEN_1): Likewise.
5656 (DR_LEN_2): Likewise.
5657 (DR_LEN_4): Likewise.
5658 (DR_LEN_8): Likewise.
5659 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5660 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5661 (DR_ENABLE_SIZE): Likewise.
5662 (DR_LOCAL_SLOWDOWN): Likewise.
5663 (DR_GLOBAL_SLOWDOWN): Likewise.
5664 (DR_CONTROL_RESERVED): Likewise.
5665 (I386_DR_CONTROL_MASK): Likewise.
5666 (I386_DR_VACANT): Likewise.
5667 (I386_DR_LOCAL_ENABLE): Likewise.
5668 (I386_DR_GLOBAL_ENABLE): Likewise.
5669 (I386_DR_DISABLE): Likewise.
5670 (I386_DR_SET_RW_LEN): Likewise.
5671 (I386_DR_GET_RW_LEN): Likewise.
5672 (I386_DR_WATCH_HIT): Likewise.
5673 (i386_wp_op_t): Likewise.
5674 (i386_show_dr): Likewise.
5675 (i386_length_and_rw_bits): Likewise.
5676 (i386_insert_aligned_watchpoint): Likewise.
5677 (i386_remove_aligned_watchpoint): Likewise.
5678 (i386_handle_nonaligned_watchpoint): Likewise.
5679 i386_update_inferior_debug_regs(): Likewise.
5680 (i386_dr_insert_watchpoint): Likewise.
5681 (i386_dr_remove_watchpoint): Likewise.
5682 (i386_dr_region_ok_for_watchpoint): Likewise.
5683 (i386_dr_stopped_data_address): Likewise.
5684 (i386_dr_stopped_by_watchpoint): Likewise.
5686 2014-06-19 Gary Benson <gbenson@redhat.com>
5688 * i386-low.c (i386_dr_show): Renamed to
5689 i386_show_dr and made static. All uses updated.
5690 (i386_dr_length_and_rw_bits): Renamed to
5691 i386_length_and_rw_bits and made static.
5693 (i386_dr_insert_aligned_watchpoint): Renamed to
5694 i386_insert_aligned_watchpoint and made static.
5696 (i386_dr_remove_aligned_watchpoint): Renamed to
5697 i386_remove_aligned_watchpoint and made static.
5699 (i386_dr_update_inferior_debug_regs): Renamed to
5700 i386_update_inferior_debug_regs and made static.
5703 2014-06-18 Gary Benson <gbenson@redhat.com>
5705 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5706 (i386_dr_low_can_set_control): Likewise.
5707 (i386_get_debug_register_length): Likewise.
5708 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5709 (i386_dr_low_can_set_control): Likewise.
5710 (i386_get_debug_register_length): Likewise.
5712 2014-06-17 Gary Benson <gbenson@redhat.com>
5714 * i386-low.h (i386-dregs.h): New include.
5715 (DR_FIRSTADDR): Now in i386-dregs.h.
5716 (DR_LASTADDR): Likewise.
5717 (DR_NADDR): Likewise.
5718 (DR_STATUS): Likewise.
5719 (DR_CONTROL): Likewise.
5720 (i386_debug_reg_state): Likewise.
5721 (i386_dr_insert_watchpoint): Likewise.
5722 (i386_dr_remove_watchpoint): Likewise.
5723 (i386_dr_region_ok_for_watchpoint): Likewise.
5724 (i386_dr_stopped_data_address): Likewise.
5725 (i386_dr_stopped_by_watchpoint): Likewise.
5726 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5728 2014-06-18 Gary Benson <gbenson@redhat.com>
5730 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5731 i386_dr_insert_watchpoint.
5732 (i386_low_remove_watchpoint): Renamed to
5733 i386_dr_remove_watchpoint.
5734 (i386_low_region_ok_for_watchpoint): Renamed to
5735 i386_dr_region_ok_for_watchpoint.
5736 (i386_low_stopped_data_address): Renamed to
5737 i386_dr_stopped_data_address.
5738 (i386_low_stopped_by_watchpoint): Renamed to
5739 i386_dr_stopped_by_watchpoint.
5740 * i386-low.c (i386_show_dr): Renamed to
5741 i386_dr_show and made nonstatic. All uses updated.
5742 (i386_length_and_rw_bits): Renamed to
5743 i386_dr_length_and_rw_bits and made nonstatic.
5745 (i386_insert_aligned_watchpoint): Renamed to
5746 i386_dr_insert_aligned_watchpoint and made nonstatic.
5748 (i386_remove_aligned_watchpoint): Renamed to
5749 i386_dr_remove_aligned_watchpoint and made nonstatic.
5751 (i386_update_inferior_debug_regs): Renamed to
5752 i386_dr_update_inferior_debug_regs and made nonstatic.
5754 (i386_low_insert_watchpoint): Renamed to
5755 i386_dr_insert_watchpoint. All uses updated.
5756 (i386_low_remove_watchpoint): Renamed to
5757 i386_dr_remove_watchpoint. All uses updated.
5758 (i386_low_region_ok_for_watchpoint): Renamed to
5759 i386_dr_region_ok_for_watchpoint. All uses updated.
5760 (i386_low_stopped_data_address): Renamed to
5761 i386_dr_stopped_data_address. All uses updated.
5762 (i386_low_stopped_by_watchpoint): Renamed to
5763 i386_dr_stopped_by_watchpoint. All uses updated.
5765 2014-06-18 Gary Benson <gbenson@redhat.com>
5767 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5768 (i386_dr_low_can_set_control): Likewise.
5769 (i386_insert_aligned_watchpoint): New check.
5771 2014-06-18 Gary Benson <gbenson@redhat.com>
5773 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5776 2014-06-18 Gary Benson <gbenson@redhat.com>
5778 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5779 instead of fatal and error.
5780 (i386_handle_nonaligned_watchpoint): Likewise.
5782 2014-06-18 Gary Benson <gbenson@redhat.com>
5784 * i386-low.c (i386_get_debug_register_length): New macro.
5785 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5786 (i386_show_dr): Use debug_printf instead of fprintf. Use
5787 phex to format values.
5789 2014-06-18 Gary Benson <gbenson@redhat.com>
5791 * i386-low.h: Comment changes.
5792 * i386-low.c: Likewise.
5794 2014-06-18 Gary Benson <gbenson@redhat.com>
5796 * i386-low.c: Whitespace changes.
5798 2014-06-12 Tom Tromey <tromey@redhat.com>
5800 * utils.c (freeargv): Remove.
5802 2014-06-12 Tom Tromey <tromey@redhat.com>
5804 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5805 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5806 (parse_debug_format_options): Likewise.
5807 (gdbserver_usage): Likewise.
5808 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5809 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5810 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5812 ($(LIBGNU)): Depend on libiberty.
5813 (all-lib): Recurse into all subdirs.
5814 (install-only): Invoke "install" target in subdirs.
5815 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5817 * configure: Rebuild.
5818 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5819 for vasprintf, vsnprintf, or gettimeofday.
5820 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5823 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5825 * development.sh: Delete.
5826 * Makefile.in (config.status): Adjust dependency on development.sh.
5827 * configure.ac: Adjust development.sh source call.
5828 * configure: Regenerate.
5830 2014-06-02 Pedro Alves <palves@redhat.com>
5832 * ax.c (gdb_free_agent_expr): New function.
5833 * ax.h (gdb_free_agent_expr): New declaration.
5834 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5836 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5838 (clear_breakpoint_conditions_and_commands): New function.
5839 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5840 (clear_breakpoint_conditions_and_commands): New declaration.
5842 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5844 * linux-aarch64-low.c (asm/ptrace.h): Include.
5846 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5848 Fix TLS access for -static -pthread.
5849 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5850 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5851 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5853 2014-05-20 Pedro Alves <palves@redhat.com>
5855 * linux-aarch64-low.c (aarch64_insert_point)
5856 (aarch64_remove_point): No longer check whether the type is
5857 supported here. Adjust to new interface.
5858 (the_low_target): Install aarch64_supports_z_point_type as
5859 supports_z_point_type method.
5860 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5861 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5862 instead of a Z packet char. Adjust.
5863 (arm_supports_z_point_type): New function.
5864 (arm_insert_point, arm_remove_point): Adjust to new interface.
5865 (the_low_target): Install arm_supports_z_point_type.
5866 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5867 (cris_insert_point, cris_remove_point): Adjust to new interface.
5868 Don't check whether the type is supported here.
5869 (the_low_target): Install cris_supports_z_point_type.
5870 * linux-low.c (linux_supports_z_point_type): New function.
5871 (linux_insert_point, linux_remove_point): Adjust to new interface.
5872 * linux-low.h (struct linux_target_ops) <insert_point,
5873 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5874 raw_breakpoint pointer parameter.
5875 <supports_z_point_type>: New method.
5876 * linux-mips-low.c (mips_supports_z_point_type): New function.
5877 (mips_insert_point, mips_remove_point): Adjust to new interface.
5878 Use mips_supports_z_point_type.
5879 (the_low_target): Install mips_supports_z_point_type.
5880 * linux-ppc-low.c (the_low_target): Install NULL as
5881 supports_z_point_type method.
5882 * linux-s390-low.c (the_low_target): Install NULL as
5883 supports_z_point_type method.
5884 * linux-sparc-low.c (the_low_target): Install NULL as
5885 supports_z_point_type method.
5886 * linux-x86-low.c (x86_supports_z_point_type): New function.
5887 (x86_insert_point): Adjust to new insert_point interface. Use
5888 insert_memory_breakpoint. Adjust to new
5889 i386_low_insert_watchpoint interface.
5890 (x86_remove_point): Adjust to remove_point interface. Use
5891 remove_memory_breakpoint. Adjust to new
5892 i386_low_remove_watchpoint interface.
5893 (the_low_target): Install x86_supports_z_point_type.
5894 * lynx-low.c (lynx_target_ops): Install NULL as
5895 supports_z_point_type callback.
5896 * nto-low.c (nto_supports_z_point_type): New.
5897 (nto_insert_point, nto_remove_point): Adjust to new interface.
5898 (nto_target_ops): Install nto_supports_z_point_type.
5899 * mem-break.c: Adjust intro comment.
5900 (struct raw_breakpoint) <raw_type, size>: New fields.
5901 <inserted>: Update comment.
5902 <shlib_disabled>: Delete field.
5903 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5904 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5905 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5906 (raw_bkpt_type_to_target_hw_bp_type): New function.
5907 (find_enabled_raw_code_breakpoint_at): New function.
5908 (find_raw_breakpoint_at): New type and size parameters. Use them.
5909 (insert_memory_breakpoint): New function, based off
5910 set_raw_breakpoint_at.
5911 (remove_memory_breakpoint): New function.
5912 (set_raw_breakpoint_at): Reimplement.
5913 (set_breakpoint): New, based on set_breakpoint_at.
5914 (set_breakpoint_at): Reimplement.
5915 (delete_raw_breakpoint): Go through the_target->remove_point
5916 instead of assuming memory breakpoints.
5917 (find_gdb_breakpoint_at): Delete.
5918 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5919 (find_gdb_breakpoint): New function.
5920 (set_gdb_breakpoint_at): Delete.
5921 (z_type_supported): New function.
5922 (set_gdb_breakpoint_1): New function, loosely based off
5923 set_gdb_breakpoint_at.
5924 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5925 (delete_gdb_breakpoint_at): Delete.
5926 (delete_gdb_breakpoint_1): New function, loosely based off
5927 delete_gdb_breakpoint_at.
5928 (delete_gdb_breakpoint): New function.
5929 (clear_gdb_breakpoint_conditions): Rename to ...
5930 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5932 (add_condition_to_breakpoint): Make static.
5933 (add_breakpoint_condition): Take a struct breakpoint pointer
5934 instead of an address. Adjust.
5935 (gdb_condition_true_at_breakpoint): Rename to ...
5936 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5938 (gdb_condition_true_at_breakpoint): Reimplement.
5939 (add_breakpoint_commands): Take a struct breakpoint pointer
5940 instead of an address. Adjust.
5941 (gdb_no_commands_at_breakpoint): Rename to ...
5942 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5943 parameter. Return true if no breakpoint was found. Change debug
5945 (gdb_no_commands_at_breakpoint): Reimplement.
5946 (run_breakpoint_commands): Rename to ...
5947 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5948 and change return type to boolean.
5949 (run_breakpoint_commands): New function.
5950 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5951 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5952 breakpoint. Go through the_target->remove_point instead of
5953 assuming memory breakpoint.
5954 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5955 software and hardware breakpoints.
5956 (reinsert_raw_breakpoint): Go through the_target->insert_point
5957 instead of assuming memory breakpoint.
5958 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5959 software and hardware breakpoints.
5960 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5961 Check both software and hardware breakpoints.
5962 (validate_inserted_breakpoint): Assert the breakpoint is a
5963 software breakpoint. Set the inserted flag to -1 instead of
5964 setting shlib_disabled.
5965 (delete_disabled_breakpoints): Adjust.
5966 (validate_breakpoints): Only validate software breakpoints.
5967 Adjust to inserted flag change.
5968 (check_mem_read, check_mem_write): Skip breakpoint types other
5969 than software breakpoints. Adjust to inserted flag change.
5970 * mem-break.h (enum raw_bkpt_type): New enum.
5971 (raw_breakpoint, struct process_info): Forward declare.
5972 (Z_packet_to_target_hw_bp_type): Delete declaration.
5973 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5974 (set_gdb_breakpoint, delete_gdb_breakpoint)
5975 (clear_breakpoint_conditions): New declarations.
5976 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5977 (breakpoint_inserted_here): Update comment.
5978 (add_breakpoint_condition, add_breakpoint_commands): Replace
5979 address parameter with a breakpoint pointer parameter.
5980 (gdb_breakpoint_here): Update comment.
5981 (delete_gdb_breakpoint_at): Delete.
5982 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5983 * server.c (process_point_options): Take a struct breakpoint
5984 pointer instead of an address. Adjust.
5985 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5986 delete_gdb_breakpoint.
5987 * spu-low.c (spu_target_ops): Install NULL as
5988 supports_z_point_type method.
5989 * target.h: Include mem-break.h.
5990 (struct target_ops) <prepare_to_access_memory>: Update comment.
5991 <supports_z_point_type>: New field.
5992 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5993 instead of a char. Also take a raw breakpoint pointer.
5994 * win32-arm-low.c (the_low_target): Install NULL as
5995 supports_z_point_type.
5996 * win32-i386-low.c (i386_supports_z_point_type): New function.
5997 (i386_insert_point, i386_remove_point): Adjust to new interface.
5998 (the_low_target): Install i386_supports_z_point_type.
5999 * win32-low.c (win32_supports_z_point_type): New function.
6000 (win32_insert_point, win32_remove_point): Adjust to new interface.
6001 (win32_target_ops): Install win32_supports_z_point_type.
6002 * win32-low.h (struct win32_target_ops):
6003 <supports_z_point_type>: New method.
6004 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6005 instead of a char. Also take a raw breakpoint pointer.
6007 2014-05-20 Pedro Alves <palves@redhat.com>
6009 * mem-break.h: Include break-common.h.
6010 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6011 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6012 (Z_packet_to_target_hw_bp_type): New declaration.
6013 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6014 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6015 (Z_PACKET_ACCESS_WP): Delete macros.
6016 (Z_packet_to_hw_type): Delete function.
6017 * i386-low.h: Don't include break-common.h here.
6018 (Z_packet_to_hw_type): Delete declaration.
6019 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6020 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6021 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6022 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6023 * linux-aarch64-low.c: Don't include break-common.h here.
6024 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6025 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6026 (Z_packet_to_target_hw_bp_type): Delete function.
6027 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6029 (mips_insert_point, mips_remove_point): Use
6030 Z_packet_to_target_hw_bp_type.
6032 2014-05-20 Pedro Alves <palves@redhat.com>
6034 * linux-aarch64-low.c: Include break-common.h.
6035 (enum target_point_type): Delete.
6036 (Z_packet_to_point_type): Rename to ...
6037 (Z_packet_to_target_hw_bp_type): ... this, and return a
6038 target_hw_bp_type instead.
6039 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6040 instead of an enum target_point_type.
6041 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6043 (aarch64_dr_state_insert_one_point)
6044 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6045 (aarch64_handle_aligned_watchpoint)
6046 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6047 Take an enum target_hw_bp_type instead of an enum
6049 (aarch64_supports_z_point_type): New function.
6050 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6051 use Z_packet_to_target_hw_bp_type.
6053 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6055 * configure.ac: Only use -Werror by default when DEVELOPMENT
6057 * configure: Regenerate.
6059 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6061 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6062 * linux-x86-low.c (X86_64_USER_REGS): New.
6063 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6065 2014-04-28 Yao Qi <yao@codesourcery.com>
6067 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6070 2014-04-25 Pedro Alves <palves@redhat.com>
6073 * linux-low.c (linux_attach_fail_reason_string): New function.
6074 (linux_attach_lwp): Delete.
6075 (linux_attach_lwp_1): Rename to ...
6076 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6077 argument. Remove "initial" parameter. Return int instead of
6078 void. Don't error or warn here.
6079 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6080 failure to attach to the tgid. Call warning when failing to
6082 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6083 argument. Remove "initial" parameter. Return int instead of
6084 void. Don't error or warn here.
6085 (linux_attach_fail_reason_string): New declaration.
6086 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6087 interface change. Use linux_attach_fail_reason_string.
6089 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6090 Walfred Tedeschi <walfred.tedeschi@intel.com>
6092 * Makefile.in: Added rules to handle new files
6093 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6094 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6095 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6096 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6097 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6098 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6100 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6101 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6102 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6103 i386/x32-avx512.xml.
6104 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6105 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6106 i386/x32-avx512-linux.xml.
6107 * i387-fp.c (num_avx512_k_registers): New constant for number
6109 (num_avx512_zmmh_low_registers): New constant for number of
6110 lower ZMM registers (0-15).
6111 (num_avx512_zmmh_high_registers): New constant for number of
6112 higher ZMM registers (16-31).
6113 (num_avx512_ymmh_registers): New contant for number of higher
6114 YMM registers (ymm16-31 added by avx521 on x86_64).
6115 (num_avx512_xmm_registers): New constant for number of higher
6116 XMM registers (xmm16-31 added by AVX512 on x86_64).
6117 (struct i387_xsave): Add space for AVX512 registers.
6118 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6119 Add code to handle AVX512 registers.
6120 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6121 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6122 prototypei from generated file.
6123 (tdesc_amd64_avx512_linux): Likewise.
6124 (init_registers_x32_avx512_linux): Likewise.
6125 (tdesc_x32_avx512_linux): Likewise.
6126 (init_registers_i386_avx512_linux): Likewise.
6127 (tdesc_i386_avx512_linux): Likewise.
6128 (x86_64_regmap): Add AVX512 registers.
6129 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6131 (initialize_low_arch): Add code to initialize AVX512 registers.
6133 2014-04-23 Pedro Alves <palves@redhat.com>
6135 * mem-break.c (find_gdb_breakpoint_at): Make static.
6136 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6138 2014-04-23 Pedro Alves <palves@redhat.com>
6140 * i386-low.c: Don't include break-common.h here.
6141 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6142 prototype to take target_hw_bp_type as argument instead of a Z
6144 * i386-low.h: Include break-common.h here.
6145 (Z_packet_to_hw_type): Declare.
6146 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6148 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6149 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6150 (x86_remove_point): Convert the packet number to a
6151 target_hw_bp_type before calling i386_low_remove_watchpoint.
6152 * win32-i386-low.c (i386_insert_point): Convert the packet number
6153 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6154 (i386_remove_point): Convert the packet number to a
6155 target_hw_bp_type before calling i386_low_remove_watchpoint.
6157 2014-04-23 Pedro Alves <palves@redhat.com>
6159 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6161 2014-04-10 Pedro Alves <palves@redhat.com>
6163 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6164 Check if the condition or command is NULL before checking if the
6165 breakpoint is known. On success, return true.
6166 * mem-break.h (add_breakpoint_condition): Document return.
6167 (add_breakpoint_commands): Add describing comment.
6168 * server.c (skip_to_semicolon): New function.
6169 (process_point_options): Use it.
6171 2014-04-09 Pedro Alves <palves@redhat.com>
6173 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6176 2014-02-27 Pedro Alves <palves@redhat.com>
6179 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6181 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6183 (last_thread_of_process_p): Take a PID argument instead of a
6185 (linux_wait_for_lwp): Delete.
6186 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6188 (linux_low_filter_event): New function, party factored out from
6189 linux_wait_for_event.
6190 (linux_wait_for_event): Rename to ...
6191 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6192 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6193 sigsuspend. Check for zombie leaders.
6194 (linux_wait_for_event): Reimplement as wrapper around
6195 linux_wait_for_event_filtered.
6196 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6197 a normal or signal exit is seen, it's the whole process exiting.
6198 (wait_for_sigstop): No longer a for_each_inferior callback.
6199 Rewrite on top of linux_wait_for_event_filtered.
6200 (stop_all_lwps): Call wait_for_sigstop directly.
6201 * server.c (resume, handle_target_event): Handle
6202 TARGET_WAITKIND_NO_RESUMED.
6204 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6206 * win32-low.c (psapi_get_dll_name,
6207 * win32_CreateToolhelp32Snapshot): Delete.
6208 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6209 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6211 (handle_load_dll): Add function description.
6212 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6214 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6216 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6218 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6219 base address when calling win32_add_one_solib.
6220 (handle_load_dll): Delete local variable load_addr.
6221 Remove 0x1000 offset applied to DLL base address when calling
6222 win32_add_one_solib.
6223 (handle_unload_dll): Add comment.
6225 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6227 * win32-low.c (win32_add_all_dlls): Renames
6228 win32_ensure_ntdll_loaded. Rewrite function documentation.
6229 Adjust implementation to always load all DLLs.
6230 Add 0x1000 offset to DLL base address when calling
6231 win32_add_one_solib.
6232 (child_initialization_done): New static global.
6233 (do_initial_child_stuff): Set child_initialization_done to
6234 zero during child initialization, and 1 after. Replace call
6235 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6237 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6238 (handle_unload_dll): Add function documentation.
6239 (get_child_debug_event): Ignore load and unload DLL events
6240 during child initialization.
6242 2014-02-20 Doug Evans <dje@google.com>
6244 Remove global all_lwps.
6245 * inferiors.h (ptid_of): Move here from linux-low.h.
6246 (pid_of, lwpid_of): Ditto.
6247 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6248 parameter is a struct thread_info * now.
6249 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6250 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6251 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6253 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6254 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6255 * linux-arm-low.c (update_registers_callback): Update, "entry"
6256 parameter is a struct thread_info * now.
6257 Fetch lwpid from current_inferior directly.
6258 (arm_insert_point): Pass &all_threads to find_inferior instead of
6260 (arm_remove_point): Ditto.
6261 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6262 (arm_prepare_to_resume): Fetch pid from thread.
6263 (arm_read_description): Fetch lwpid from current_inferior directly.
6264 * linux-low.c (all_lwps): Delete.
6265 (delete_lwp): Delete call to remove_inferior.
6266 (handle_extended_wait): Fetch lwpid from thread.
6267 (add_lwp): Don't set lwp->entry.id. Remove call to
6268 add_inferior_to_list.
6269 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6270 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6271 (kill_one_lwp_callback): Ditto.
6272 (linux_kill): Don't dereference NULL pointer.
6273 Fetch ptid,lwpid from thread.
6274 (get_detach_signal): Fetch ptid from thread.
6275 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6276 Simplify call to regcache_invalidate_thread.
6277 (delete_lwp_callback): Update, "entry" parameter is a
6278 struct thread_info * now. Fetch pid from thread.
6279 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6280 (status_pending_p_callback): Update, "entry" parameter is a
6281 struct thread_info * now. Fetch ptid from thread.
6282 (find_lwp_pid): Update, "entry" parameter is a
6283 struct thread_info * now.
6284 (linux_wait_for_lwp): Fetch pid from thread.
6285 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6286 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6287 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6288 (dequeue_one_deferred_signal): Ditto.
6289 (cancel_breakpoint): Fetch ptid from current_inferior.
6290 (linux_wait_for_event): Pass &all_threads to find_inferior,
6291 not &all_lwps. Fetch ptid, lwpid from thread.
6292 (count_events_callback): Update, "entry" parameter is a
6293 struct thread_info * now.
6294 (select_singlestep_lwp_callback): Ditto.
6295 (select_event_lwp_callback): Ditto.
6296 (cancel_breakpoints_callback): Ditto.
6297 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6299 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6300 (unsuspend_one_lwp): Update, "entry" parameter is a
6301 struct thread_info * now.
6302 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6304 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6305 Fetch lwpid from thread, not lwp.
6306 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6307 Pass &all_threads to find_inferior, not &all_lwps.
6308 (send_sigstop): Fetch lwpid from thread, not lwp.
6309 (send_sigstop_callback): Update, "entry" parameter is a
6310 struct thread_info * now.
6311 (suspend_and_send_sigstop_callback): Ditto.
6312 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6313 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6314 struct thread_info * now.
6315 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6317 (lwp_running): Update, "entry" parameter is a
6318 struct thread_info * now.
6319 (stop_all_lwps): Fetch ptid from thread.
6320 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6321 (linux_resume_one_lwp): Fetch lwpid from thread.
6322 (linux_set_resume_request): Update, "entry" parameter is a
6323 struct thread_info * now. Fetch pid, lwpid from thread.
6324 (resume_status_pending_p): Update, "entry" parameter is a
6325 struct thread_info * now.
6326 (need_step_over_p): Ditto. Fetch lwpid from thread.
6327 (start_step_over): Fetch lwpid from thread.
6328 (linux_resume_one_thread): Update, "entry" parameter is a
6329 struct thread_info * now. Fetch lwpid from thread.
6330 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6331 (proceed_one_lwp): Update, "entry" parameter is a
6332 struct thread_info * now. Fetch lwpid from thread.
6333 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6334 struct thread_info * now.
6335 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6336 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6337 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6339 (regsets_store_inferior_registers): Ditto.
6340 (fetch_register, store_register): Ditto.
6341 (linux_read_memory, linux_write_memory): Ditto.
6342 (linux_request_interrupt): Ditto.
6343 (linux_read_auxv): Ditto.
6344 (linux_xfer_siginfo): Ditto.
6345 (linux_qxfer_spu): Ditto.
6346 (linux_qxfer_libraries_svr4): Ditto.
6347 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6348 moved to inferiors.h.
6350 (get_thread_lwp): Update.
6351 (struct lwp_info): Delete member "entry". Simplify comment for
6354 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6355 current_inferior directly.
6356 (update_watch_registers_callback): Update, "entry" parameter is a
6357 struct thread_info * now. Fetch pid from thread.
6358 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6359 (mips_insert_point): Fetch lwpid from current_inferior.
6360 Pass &all_threads to find_inferior, not &all_lwps.
6361 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6362 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6364 (mips_stopped_data_address): Ditto.
6365 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6367 * linux-tile-low.c (tile_arch_setup): Ditto.
6368 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6369 (update_debug_registers_callback): Update, "entry" parameter is a
6370 struct thread_info * now. Fetch pid from thread.
6371 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6372 Pass &all_threads to find_inferior, not &all_lwps.
6373 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6374 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6375 Pass &all_threads to find_inferior, not &all_lwps.
6376 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6377 (i386_dr_low_get_status): Ditto.
6378 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6379 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6380 (x86_linux_read_description): Ditto.
6381 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6383 2014-02-20 Doug Evans <dje@google.com>
6385 * inferiors.c (get_first_inferior): Fix buglet.
6387 2014-02-19 Doug Evans <dje@google.com>
6389 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6390 * inferiors.c (add_thread): Change result type to struct thread_info *.
6391 All callers updated.
6392 (add_lwp): Call add_thread here instead of in callers.
6393 All callers updated.
6394 * linux-low.h (get_lwp_thread): Rewrite.
6395 (struct lwp_info): New member "thread".
6397 2014-02-19 Doug Evans <dje@google.com>
6399 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6400 All callers updated.
6402 2014-02-19 Doug Evans <dje@google.com>
6404 * inferiors.c (add_thread): Fix whitespace.
6406 2014-02-19 Doug Evans <dje@google.com>
6408 * dll.c (clear_dlls): Replace accessing list implemention details
6410 * gdbthread.h (get_first_thread): Declare.
6411 * inferiors.c (for_each_inferior_with_data): New function.
6412 (get_first_thread): New function.
6413 (find_thread_ptid): Simplify.
6414 (get_first_inferior): New function.
6415 (clear_list): Delete.
6416 (one_inferior_p): New function.
6417 (clear_inferior_list): New function.
6418 (clear_inferiors): Update.
6419 * inferiors.h (for_each_inferior_with_data): Declare.
6420 (clear_inferior_list): Declare.
6421 (one_inferior_p): Declare.
6422 (get_first_inferior): Declare.
6423 * linux-low.c (linux_wait_for_event): Replace accessing list
6424 implemention details with API function.
6425 * server.c (target_running): Ditto.
6426 (accumulate_file_name_length): New function.
6427 (emit_dll_description): New function.
6428 (handle_qxfer_libraries): Replace accessing list implemention
6429 details with API function.
6430 (handle_qxfer_threads_worker): New function.
6431 (handle_qxfer_threads_proper): Replace accessing list implemention
6432 details with API function.
6433 (handle_query): Ditto.
6434 (visit_actioned_threads_callback_ftype): New typedef.
6435 (visit_actioned_threads_data): New struct.
6436 (visit_actioned_threads): Rewrite to be find_inferior callback.
6437 (resume): Call find_inferior.
6438 (handle_status): Replace accessing list implemention
6439 details with API function.
6440 (process_serial_event): Replace accessing list implemention details
6442 * target.c (set_desired_inferior): Replace accessing list implemention
6443 details with API function.
6444 * tracepoint.c (same_process_p): New function.
6445 (gdb_agent_about_to_close): Replace accessing list implemention
6446 details with API function.
6447 * win32-low.c (child_delete_thread): Replace accessing list
6448 implemention details with API function.
6449 (match_dll_by_basename): New function.
6450 (dll_is_loaded_by_basename): New function.
6451 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6452 details call to dll_is_loaded_by_basename.
6454 2014-02-19 Doug Evans <dje@google.com>
6456 * dll.h (struct dll_info): Add comment.
6457 * gdbthread.h (struct thread_info): Add comment.
6458 (current_ptid): Simplify.
6459 * inferiors.c (add_process): Update.
6460 (remove_process): Update.
6461 * inferiors.h (struct process_info): Rename member "head" to "entry".
6462 * linux-low.c (delete_lwp): Update.
6464 (last_thread_of_process_p): Update.
6465 (kill_one_lwp_callback, linux_kill): Update.
6466 (status_pending_p_callback): Update.
6467 (wait_for_sigstop): Update. Simplify read of ptid.
6468 (start_step_over): Update.
6469 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6470 (get_lwp_thread): Update.
6471 (struct lwp_info): Rename member "head" to "entry".
6472 * regcache.h (inferior_list_entry): Delete.
6473 * server.c (kill_inferior_callback): Update.
6474 (detach_or_kill_inferior_callback): Update.
6475 (print_started_pid): Update.
6476 (print_attached_pid): Update.
6477 (process_serial_event): Simplify read of ptid.
6478 * thread-db.c (thread_db_create_event): Update.
6479 (thread_db_get_tls_address): Update.
6480 * win32-low.c (current_inferior_ptid): Simplify.
6482 2014-02-19 Tom Tromey <tromey@redhat.com>
6484 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6486 (target_supports_btrace): Update.
6488 2014-02-14 Yao Qi <yao@codesourcery.com>
6490 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6491 (rsp-low-ipa.o): New target.
6493 2014-02-12 Tom Tromey <tromey@redhat.com>
6495 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6496 convert_ascii_to_int.
6497 * regcache.c (registers_to_string): Likewise.
6498 * remote-utils.c (decode_M_packet): Likewise.
6499 * server.c (process_serial_event): Likewise.
6501 2014-02-12 Tom Tromey <tromey@redhat.com>
6503 * server.c (handle_query, handle_v_run): Use hex2bin, not
6505 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6507 2014-02-12 Tom Tromey <tromey@redhat.com>
6509 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6510 convert_int_to_ascii.
6511 * regcache.c (registers_to_string, collect_register_as_string):
6513 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6515 * server.c (process_serial_event): Likewise.
6516 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6517 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6519 2014-02-12 Tom Tromey <tromey@redhat.com>
6521 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6522 bin2hex, not hexify.
6523 * tracepoint.c (cmd_qtstatus): Likewise.
6525 2014-02-12 Tom Tromey <tromey@redhat.com>
6527 * remote-utils.c (monitor_output): Pass explicit length to
6530 2014-02-12 Tom Tromey <tromey@redhat.com>
6532 * tracepoint.c: Include rsp-low.h.
6533 * server.c: Include rsp-low.h.
6534 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6535 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6537 * remote-utils.c: Include rsp-low.h.
6538 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6539 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6540 (convert_int_to_ascii, convert_ascii_to_int): Move to
6542 * regcache.c: Include rsp-low.h.
6543 * ax.c: Include rsp-low.h.
6544 * Makefile.in (SFILES): Add common/rsp-low.c.
6545 (OBS): Add rsp-low.o.
6546 (rsp-low.o): New target.
6548 2014-02-12 Tom Tromey <tromey@redhat.com>
6550 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6551 Include print-utils.h.
6552 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6553 (plongest, thirty_two, phex_nz): Remove.
6554 * Makefile.in (SFILES): Add common/print-utils.c.
6555 (OBS): Add print-utils.o.
6556 (print-utils-ipa.o): New target.
6557 (print-utils.o): New target.
6558 (IPA_OBJS): Add print-utils-ipa.o.
6560 2014-02-06 Tom Tromey <tromey@redhat.com>
6562 * Makefile.in (SFILES): Fix indentation.
6564 2014-02-05 Doug Evans <dje@google.com>
6566 * linux-low.c (linux_wait_for_event): Improve comment.
6567 (linux_wait_1): Keep current_inferior in sync with event_child.
6569 2014-01-22 Doug Evans <dje@google.com>
6571 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6573 2014-01-22 Doug Evans <dje@google.com>
6575 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6576 * configure: Regenerate.
6577 * config.in: Regenerate.
6578 * Makefile.in (SFILES): Add debug.c.
6580 * debug.c: New file.
6581 * debug.h: New file.
6582 * linux-aarch64-low.c (*): Update all debugging printfs to use
6583 debug_printf instead of fprintf.
6584 * linux-arm-low.c (*): Ditto.
6585 * linux-cris-low.c (*): Ditto.
6586 * linux-crisv32-low.c (*): Ditto.
6587 * linux-m32r-low.c (*): Ditto.
6588 * linux-sparc-low.c (*): Ditto.
6589 * linux-x86.c (*): Ditto.
6590 * linux-low.c (*): Ditto.
6591 (linux_wait_1): Add calls to debug_enter, debug_exit.
6592 (linux_wait): Remove redundant debugging printf.
6593 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6594 (linux_resume, unstop_all_lwps): Ditto.
6595 * mem-break.c (*): Update all debugging printfs to use
6596 debug_printf instead of fprintf.
6597 * remote-utils.c (*): Ditto.
6598 * thread-db.c (*): Ditto.
6599 * server.c #include <ctype.h>, "gdb_vecs.h".
6600 (debug_threads): Moved to debug.c.
6601 (*): Update all debugging printfs to use debug_printf instead of
6603 (start_inferior): Replace call to fflush with call to debug_flush.
6604 (monitor_show_help): Mention set debug-format.
6605 (parse_debug_format_options): New function.
6606 (handle_monitor_command): Handle "monitor set debug-format".
6607 (gdbserver_usage): Mention --debug-format.
6608 (main): Parse --debug-format.
6609 * server.h (debug_threads): Declaration moved to debug.h.
6611 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6612 trace_debug_1 that uses debug_printf.
6613 (tracepoint_look_up_symbols): Update all debugging printfs to use
6614 debug_printf instead of fprintf.
6616 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6618 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6621 2014-01-17 Pedro Alves <palves@redhat.com>
6624 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6625 defined after including gdb_proc_service.h.
6627 2014-01-16 Doug Evans <dje@google.com>
6629 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6630 (match_dll): Use it.
6632 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6634 * target.h (target_ops) <read_btrace>: Change parameters and
6635 return type to allow error reporting.
6636 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6637 trace reading errors on.
6638 * linux-low.c (linux_low_read_btrace): Pass trace reading
6640 (linux_low_disable_btrace): New.
6642 2014-01-15 Doug Evans <dje@google.com>
6644 * inferiors.c (thread_id_to_gdb_id): Delete.
6645 * inferiors.h (thread_id_to_gdb_id): Delete.
6647 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6649 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6650 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6653 2014-01-08 Pedro Alves <palves@redhat.com>
6655 * server.c (handle_status): Don't discard previous queued stop
6656 replies or thread's pending status here.
6657 (main) <disconnection>: Do it here instead.
6659 2014-01-08 Pedro Alves <palves@redhat.com>
6661 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6662 * server.c (visit_actioned_threads, handle_pending_status): New
6664 (handle_v_cont): Factor out parts to ...
6665 (resume): ... this new function. If in all-stop, and a thread
6666 being resumed has a pending status, report it without actually
6668 (myresume): Adjust to use the new 'resume' function.
6669 (clear_pending_status_callback, set_pending_status_callback)
6670 (find_status_pending_thread_callback): New functions.
6671 (handle_status): Handle the case of multiple threads having
6672 interesting statuses to report. Report threads' real last signal
6673 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6674 with an interesting thread to report the status for, instead of
6675 always reporting the status of the first thread.
6677 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6679 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6680 * gdbreplay.c (gdbreplay_version): Likewise.
6682 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6684 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6685 iov.iov_len with the real length in use.
6687 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6689 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6690 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6691 for all targets that use win32-low.c.
6692 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6693 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6695 2013-12-13 Pedro Alves <palves@redhat.com>
6697 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6698 if equal to TARGET_WAITKIND_LOADED.
6699 * win32-low.c (cached_status): New static global.
6700 (win32_wait): Add declaration.
6701 (do_initial_child_stuff): Flush all initial pending debug events
6702 up to the initial breakpoint.
6703 (win32_wait): If CACHED_STATUS was set, return that instead
6704 of doing a real wait. Remove the code resuming the execution
6705 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6706 during the initial phase. Also remove the code changing
6707 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6708 TARGET_WAITKIND_STOPPED.
6710 2013-12-11 Yao Qi <yao@codesourcery.com>
6712 * notif.c (handle_notif_ack): Return 0 if no notification
6715 2013-11-20 Doug Evans <dje@google.com>
6717 * linux-low.c (linux_set_resume_request): Fix comment.
6719 2013-11-20 Doug Evans <dje@google.com>
6721 * linux-low.c (resume_status_pending_p): Tweak comment.
6723 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6725 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6726 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6727 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6728 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6729 (srv_amd64_regobj): Add amd64-mpx.o.
6730 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6731 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6732 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6733 * i387-fp.c (num_pl_bnd_register) Added constant.
6734 (num_pl_bnd_cfg_registers) Added constant.
6735 (struct i387_xsave) Added reserved area and MPX fields.
6736 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6737 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6739 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6740 (init_registers_amd64_mpx_linux): Declare new function.
6741 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6742 (x86_64_regmap): Add MPX registers.
6743 (x86_linux_read_description): Add MPX case.
6744 (initialize_low_arch): Initialize MPX targets.
6746 2013-11-18 Tom Tromey <tromey@redhat.com>
6748 * configure: Rebuild.
6749 * configure.ac: Don't check for stdlib.h.
6750 * gdbreplay.c: Unconditionally include stdlib.h.
6752 2013-11-18 Tom Tromey <tromey@redhat.com>
6754 * config.in: Rebuild.
6755 * configure: Rebuild.
6756 * configure.ac: Don't use AC_HEADER_DIRENT.
6758 2013-11-18 Tom Tromey <tromey@redhat.com>
6760 * server.h: Don't check HAVE_STRING_H.
6761 * gdbreplay.c: Don't check HAVE_STRING_H.
6762 * configure: Rebuild.
6764 2013-11-18 Tom Tromey <tromey@redhat.com>
6766 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6769 2013-11-08 Tom Tromey <tromey@redhat.com>
6771 * configure, config.in: Rebuild.
6772 * configure.ac: Remove unused configury.
6774 2013-11-08 Tom Tromey <tromey@redhat.com>
6776 * acinclude.m4: Include common.m4, codeset.m4.
6777 * configure, config.in: Rebuild.
6778 * configure.ac: Use GDB_AC_COMMON.
6780 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6782 * linux-s390-low.c (HWCAP_S390_TE): New define.
6783 (s390_arch_setup): Consider the TE field in the HWCAP for
6784 determining 'have_regset_tdb'.
6786 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6789 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6792 2013-10-02 Pedro Alves <palves@redhat.com>
6794 * server.c (process_serial_event): Don't output "GDBserver
6795 exiting" if GDB is connected through stdio.
6796 * target.c (mywait): Likewise, be silent if GDB is connected
6799 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6801 * lynx-low.c (lynx_add_threads_after_attach): New function.
6802 (lynx_attach): Remove call to add_thread. Add call to
6803 lynx_add_threads_after_attach instead.
6805 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6807 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6808 * config.in, configure: Regenerated.
6810 2013-09-18 Yao Qi <yao@codesourcery.com>
6813 * server.c (start_inferior): Clear 'resume_info'.
6815 2013-09-16 Jiong Wang <jiwang@tilera.com>
6817 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6820 2013-09-16 Jiong Wang <jiwang@tilera.com>
6822 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6823 linux-tile-low.o to srv_tgtobj.
6825 2013-09-16 Will Newton <will.newton@linaro.org>
6827 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6830 2013-09-06 Pedro Alves <palves@redhat.com>
6832 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6833 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6834 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6835 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6836 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6837 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6839 2013-09-06 Pedro Alves <palves@redhat.com>
6841 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6842 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6844 2013-09-06 Pedro Alves <palves@redhat.com>
6846 * linux-amd64-ipa.c: Include tracepoint.h.
6847 * linux-i386-ipa.c: Include tracepoint.h.
6849 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6851 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6852 (ps_get_thread_area): New function.
6854 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6856 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6857 (initialize_low_arch): Call init_registers_crisv32 rather than
6858 init_register_crisv32.
6860 2013-09-05 Pedro Alves <palves@redhat.com>
6862 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6864 * hostio.h: ... this new file.
6865 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6866 win32-low.c: Include hostio.h.
6868 2013-09-05 Pedro Alves <palves@redhat.com>
6870 * server.h (gdb_client_data, handler_func, callback_handler_func)
6871 (delete_file_handler, add_file_handler, append_callback_event)
6872 (delete_callback_event, start_event_loop, initialize_event_loop):
6873 Move to event-loop.h and include it.
6874 * event-loop.h: New file.
6876 2013-09-05 Pedro Alves <palves@redhat.com>
6878 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6879 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6880 (loaded_dll, unloaded_dll): Move to ...
6881 * dll.h: ... this new file.
6882 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6884 2013-09-05 Pedro Alves <palves@redhat.com>
6886 * server.h (current_process, get_thread_process, all_processes)
6887 (add_inferior_to_list, for_each_inferior, current_inferior)
6888 (remove_inferior, add_process, remove_process, find_process_pid)
6889 (have_started_inferiors_p, have_attached_inferiors_p)
6890 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6891 (clear_inferiors, find_inferior, find_inferior_id)
6892 (inferior_target_data, set_inferior_target_data)
6893 (inferior_regcache_data, set_inferior_regcache_data): Move to
6894 inferiors.h, and include it.
6895 * inferiors.h: New file.
6897 2013-09-05 Pedro Alves <palves@redhat.com>
6899 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6903 2013-09-05 Pedro Alves <palves@redhat.com>
6905 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6907 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6908 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6909 (handle_tracepoint_general_set, handle_tracepoint_query)
6910 (tracepoint_finished_step, tracepoint_was_hit)
6911 (release_while_stepping_state_list, current_traceframe)
6912 (in_readonly_region, traceframe_read_mem)
6913 (fetch_traceframe_registers, traceframe_read_sdata)
6914 (traceframe_read_info, struct fast_tpoint_collect_status)
6915 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6916 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6917 (supply_fast_tracepoint_registers)
6918 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6919 (ipa_tdesc, claim_trampoline_space)
6920 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6921 (agent_mem_read, agent_get_trace_state_variable_value)
6922 (agent_set_trace_state_variable_value, agent_tsv_read)
6923 (agent_mem_read_string, get_raw_reg_func_addr)
6924 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6925 * tracepoint.h: ... this new file.
6927 2013-09-05 Pedro Alves <palves@redhat.com>
6929 * server.h (perror_with_name, error, fatal, warning, paddress)
6930 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6932 * utils.h: New file.
6934 2013-09-05 Pedro Alves <palves@redhat.com>
6936 * server.h (remote_debug, noack_mode, transport_is_reliable)
6937 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6938 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6939 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6940 (write_enn, initialize_async_io, enable_async_io)
6941 (disable_async_io, check_remote_input_interrupt_request)
6942 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6943 (dead_thread_notify, prepare_resume_reply)
6944 (decode_address_to_semicolon, decode_address, decode_m_packet)
6945 (decode_M_packet, decode_X_packet, decode_xfer_write)
6946 (decode_search_memory_packet, unhexify, hexify)
6947 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6948 (look_up_one_symbol, relocate_instruction)
6949 (monitor_output): Move to remote-utils.h, and include it.
6950 * remote-utils.h: New file.
6952 2013-09-05 Pedro Alves <palves@redhat.com>
6954 * server.h (_): Delete.
6956 2013-09-02 Pedro Alves <palves@redhat.com>
6958 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6959 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6961 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6963 2013-09-02 Pierre Muller <muller@sourceware.org>
6965 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6966 or WriteProcessMemory complete successfully and handle
6967 ERROR_PARTIAL_COPY error.
6969 2013-09-02 Pedro Alves <palves@redhat.com>
6971 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6972 error instead of EIO.
6974 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6977 * linux-low.c: Include filestuff.h.
6978 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6979 * lynx-low.c: Include filestuff.h.
6980 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6981 * server.c: Include filestuff.h.
6982 (main): Call notice_open_fds.
6983 * spu-low.c: Include filestuff.h.
6984 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6986 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6988 * Makefile.in: Explain why ../target and ../nat are not
6989 listed as include file search paths.
6990 (linux-waitpid.o): New object file rule.
6991 * configure.srv (srv_native_linux_obj): New variable.
6992 Replace all occurrences of linux native object files with
6993 $srv_native_linux_obj.
6994 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6995 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6996 (linux_enable_event_reporting): Remove declaration.
6997 (my_waitpid): Moved to common/linux-waitpid.c.
6998 (linux_wait_for_event): Pass ptid when calling
6999 linux_enable_event_reporting.
7000 (linux_supports_tracefork_flag): Remove.
7001 (linux_enable_event_reporting): Likewise.
7002 (linux_tracefork_grandchild): Remove.
7003 (STACK_SIZE): Moved to common/linux-ptrace.c.
7004 (linux_tracefork_child): Remove.
7005 (linux_test_for_tracefork): Remove.
7006 (linux_look_up_symbols): Call linux_supports_traceclone.
7007 (initialize_low): Remove call to linux_test_for_tracefork.
7008 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7009 common/linux-ptrace.h.
7010 (PTRACE_TYPE_ARG4): Likewise.
7011 Include linux-ptrace.h.
7013 2013-08-21 Pedro Alves <palves@redhat.com>
7015 * config.in: Renegerate.
7017 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7019 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7020 (SFILES): Remove $(srcdir)/common/target-common.c and
7021 add $(srcdir)/target/waitstatus.c.
7022 (OBS): Remove target-common.o and add waitstatus.o.
7023 (server_h): Remove $(srcdir)/../common/target-common.h and
7024 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7025 and $(srcdir)/../target/waitstatus.h.
7026 (target-common.o): Remove.
7027 (waitstatus.o): New target object file.
7028 * target.h: Do not include target-common.h and
7029 include target/resume.h, target/wait.h and
7030 target/waitstatus.h.
7032 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7034 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7035 to PTRACE_TYPE_ARG3.
7036 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7037 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7039 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7040 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7042 2013-07-27 Jie Zhang <jie@codesourcery.com>
7043 Daniel Jacobowitz <dan@codesourcery.com>
7044 Yao Qi <yao@codesourcery.com>
7046 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7047 (mips-linux-watch.o): New rule.
7048 (mips_linux_watch_h): New variable.
7049 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7051 * linux-mips-low.c: Include mips-linux-watch.h.
7052 (struct arch_process_info, struct arch_lwp_info): New.
7053 (update_watch_registers_callback): New function.
7054 (mips_linux_new_process, mips_linux_new_thread) New functions.
7055 (mips_linux_prepare_to_resume, mips_insert_point): New
7057 (mips_remove_point, mips_stopped_by_watchpoint): New
7059 (rsp_bp_type_to_target_hw_bp_type): New function.
7060 (mips_stopped_data_address): New function.
7061 (the_low_target): Add watchpoint support functions.
7063 2013-07-27 Yao Qi <yao@codesourcery.com>
7065 * i386-low.c: Include break-common.h.
7066 (enum target_hw_bp_type): Remove.
7068 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7070 * Makefile.in (SFILES): /common/target-common.c.
7071 (OBS): Add target-common.o.
7072 (server_h): Add $(srcdir)/../common/target-common.h.
7073 (target-common.o): New target.
7074 * server.c (queue_stop_reply_callback): Free
7075 status string after use.
7076 * target.c (target_waitstatus_to_string): Remove.
7077 * target.h: Include target-common.h.
7078 (resume_kind): Likewise.
7079 (target_waitkind): Likewise.
7080 (target_waitstatus): Likewise.
7081 (TARGET_WNOHANG): Likewise.
7083 2013-07-04 Yao Qi <yao@codesourcery.com>
7085 * Makefile.in (host_alias): Use @host_noncanonical@.
7086 (target_alias): Use @target_noncanonical@.
7087 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7088 ACX_NONCANONICAL_HOST.
7089 * configure: Regenerated.
7092 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7094 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7095 * configure: Rebuild.
7096 * Makefile.in (version_host, version_target): Get from configure.
7097 (version.c): Use $(version_host) and $(version_target).
7099 2013-07-03 Pedro Alves <palves@redhat.com>
7101 * Makefile.in (config.status): Depend on development.sh.
7102 * acinclude.m4: Include libmcheck.m4.
7103 * configure: Regenerate.
7105 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7107 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7108 attribute inside the parentheses.
7109 (winapi_DebugSetProcessKillOnExit): Ditto.
7110 (winapi_DebugBreakProcess): Ditto.
7111 (winapi_GenerateConsoleCtrlEvent): Ditto.
7113 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7115 * notif.h (notif_event): Add a dummy member to avoid compiler
7118 2013-07-01 Pedro Alves <palves@redhat.com>
7120 * hostio.c (HOSTIO_PATH_MAX): Define.
7121 (require_filename, handle_open, handle_unlink, handle_readlink):
7124 2013-07-01 Pedro Alves <palves@redhat.com>
7126 * server.h: Include "pathmax.h".
7127 * linux-low.c: Don't include sys/param.h.
7128 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7130 * win32-low.c: Don't include sys/param.h.
7131 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7133 2013-07-01 Pedro Alves <palves@redhat.com>
7135 * event-loop.c: Don't check HAVE_UNISTD_H before including
7137 * gdbreplay.c: Likewise.
7138 * remote-utils.c: Likewise.
7139 * server.c: Likewise.
7140 * configure.ac: Don't check for unistd.h.
7141 * configure: Regenerate.
7143 2013-06-28 Tom Tromey <tromey@redhat.com>
7145 * Makefile.in (version.c): Use version.in, not
7148 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7150 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7151 * configure: Rebuild.
7152 * Makefile.in (version_host, version_target): Get from configure.
7153 (version.c): Use $(version_host) and $(version_target).
7155 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7157 Fix trace-status to output user name without trailing colon.
7158 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7160 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7162 Fix trace-status to output proper start-time and stop-time.
7163 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7164 output start time and stop time in hex as gdb expects.
7166 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7168 * tracepoint.c (build_traceframe_info_xml): Output trace state
7169 variables present in the trace buffer.
7171 2013-06-24 Tom Tromey <tromey@redhat.com>
7173 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7175 (version.o): Remove.
7176 * gdbreplay.c: Include version.h.
7177 (version, host_name): Don't declare.
7178 * server.h: Include version.h.
7179 (version, host_name): Don't declare.
7181 2013-06-12 Pedro Alves <palves@redhat.com>
7183 * linux-x86-low.c (linux_is_elf64): Delete global.
7184 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7185 with local linux_pid_exe_is_elf_64_file use.
7187 2013-06-11 Pedro Alves <palves@redhat.com>
7189 * linux-low.c (regset_disabled, disable_regset): New functions.
7190 (regsets_fetch_inferior_registers)
7191 (regsets_store_inferior_registers): Use them.
7192 (initialize_regsets_info); Don't allocate the disabled_regsets
7194 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7197 2013-06-11 Pedro Alves <palves@redhat.com>
7199 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7202 2013-06-11 Pedro Alves <palves@redhat.com>
7204 * linux-x86-low.c (initialize_low_arch): Call
7205 init_registers_x32_avx_linux.
7207 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7209 Fix compatibility with Android Bionic.
7210 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7213 2013-06-07 Pedro Alves <palves@redhat.com>
7216 * Makefile.in (OBS): Add tdesc.o.
7217 (IPA_OBJS): Add tdesc-ipa.o.
7218 (tdesc-ipa.o): New rule.
7219 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7221 * linux-low.c (new_inferior): Delete.
7222 (disabled_regsets, num_regsets): Delete.
7223 (linux_add_process): Adjust to set the new per-process
7225 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7226 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7227 was a stop. When calling arch_setup, switch the current inferior
7228 to the thread that got an event.
7229 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7230 (regsets_fetch_inferior_registers)
7231 (regsets_store_inferior_registers): New regsets_info parameter.
7233 (linux_register_in_regsets): New regs_info parameter. Adjust to
7235 (register_addr, fetch_register, store_register): New usrregs_info
7236 parameter. Adjust to use it.
7237 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7238 parameter regs_info. Adjust to use it.
7239 (linux_fetch_registers): Get the current inferior's regs_info, and
7241 (linux_store_registers): Ditto.
7242 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7243 (initialize_low): Don't initialize the target_regsets here. Call
7244 initialize_low_arch.
7245 * linux-low.h (target_regsets): Delete declaration.
7246 (struct regsets_info): New.
7247 (struct usrregs_info): New.
7248 (struct regs_info): New.
7249 (struct process_info_private) <new_inferior>: New field.
7250 (struct linux_target_ops): Delete the num_regs, regmap, and
7251 regset_bitmap fields. New field regs_info.
7252 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7253 * i387-fp.c (num_xmm_registers): Delete.
7254 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7255 calls to new interface.
7256 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7257 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7258 Infer the number of xmm registers from the regcache's target
7260 * i387-fp.h (num_xmm_registers): Delete.
7261 * inferiors.c (add_thread): Don't install the thread's regcache
7263 * proc-service.c (gregset_info): Fetch the current inferior's
7264 regs_info. Adjust to use it.
7265 * regcache.c: Include tdesc.h.
7266 (register_bytes, reg_defs, num_registers)
7267 (gdbserver_expedite_regs): Delete.
7268 (get_thread_regcache): If the thread doesn't have a regcache yet,
7269 create one, instead of aborting gdbserver.
7270 (regcache_invalidate_one): Rename to ...
7271 (regcache_invalidate_thread): ... this.
7272 (regcache_invalidate_one): New.
7273 (regcache_invalidate): Only invalidate registers of the current
7275 (init_register_cache): Add target_desc parameter, and use it.
7276 (new_register_cache): Ditto. Assert the target description has a
7277 non zero registers_size.
7278 (regcache_cpy): Add assertions. Adjust.
7279 (realloc_register_cache, set_register_cache): Delete.
7280 (registers_to_string, registers_from_string): Adjust.
7281 (find_register_by_name, find_regno, find_register_by_number)
7282 (register_cache_size): Add target_desc parameter, and use it.
7283 (free_register_cache_thread, free_register_cache_thread_one)
7284 (regcache_release, register_cache_size): New.
7285 (register_size): Add target_desc parameter, and use it.
7286 (register_data, supply_register, supply_register_zeroed)
7287 (supply_regblock, supply_register_by_name, collect_register)
7288 (collect_register_as_string, collect_register_by_name): Adjust.
7289 * regcache.h (struct target_desc): Forward declare.
7290 (struct regcache) <tdesc>: New field.
7291 (init_register_cache, new_register_cache): Add target_desc
7293 (regcache_invalidate_thread): Declare.
7294 (regcache_invalidate_one): Delete declaration.
7295 (regcache_release): Declare.
7296 (find_register_by_number, register_cache_size, register_size)
7297 (find_regno): Add target_desc parameter.
7298 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7300 * remote-utils.c: Include tdesc.h.
7301 (outreg, prepare_resume_reply): Adjust.
7302 * server.c: Include tdesc.h.
7303 (gdbserver_xmltarget): Delete declaration.
7304 (get_features_xml, process_serial_event): Adjust.
7305 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7307 (struct process_info) <tdesc>: New field.
7308 (ipa_tdesc): Declare.
7309 * tdesc.c: New file.
7310 * tdesc.h: New file.
7311 * tracepoint.c: Include tdesc.h.
7312 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7313 (get_context_regcache): Adjust to pass ipa_tdesc down.
7314 (do_action_at_tracepoint): Adjust to get the register cache size
7315 from the context regcache's description.
7316 (traceframe_walk_blocks): Adjust to get the register cache size
7317 from the current trace frame's description.
7318 (traceframe_get_pc): Adjust to get current trace frame's
7319 description and pass it down.
7320 (gdb_collect): Adjust to get the register cache size from the
7322 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7323 (gdbserver_xmltarget): Delete.
7324 (initialize_low_tracepoint): Set the ipa's target description.
7325 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7326 (initialize_low_tracepoint): Set the ipa's target description.
7327 * linux-x86-low.c: Include tdesc.h.
7328 [__x86_64__] (is_64bit_tdesc): New.
7329 (ps_get_thread_area, x86_get_thread_area): Use it.
7330 (i386_cannot_store_register): Rename to ...
7331 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7332 (i386_cannot_fetch_register): Rename to ...
7333 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7334 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7336 (target_regsets): Rename to ...
7337 (x86_regsets): ... this.
7338 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7340 (x86_siginfo_fixup): Use is_64bit_tdesc.
7341 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7342 (tdesc_x32_avx_linux, tdesc_x32_linux)
7343 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7345 (x86_linux_update_xmltarget): Delete.
7346 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7347 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7348 (AMD64_LINUX_USER64_CS): New.
7349 (x86_linux_read_description): New, based on
7350 x86_linux_update_xmltarget.
7351 (same_process_callback): New.
7352 (x86_arch_setup_process_callback): New.
7353 (x86_linux_update_xmltarget): New.
7354 (x86_regsets_info): New.
7355 (amd64_linux_regs_info): New.
7356 (i386_linux_usrregs_info): New.
7357 (i386_linux_regs_info): New.
7358 (x86_linux_regs_info): New.
7359 (x86_arch_setup): Reimplement.
7360 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7361 (x86_emit_ops): Ditto.
7362 (the_low_target): Adjust. Install x86_linux_regs_info,
7363 x86_cannot_fetch_register, and x86_cannot_store_register.
7364 (initialize_low_arch): New.
7365 * linux-ia64-low.c (tdesc_ia64): Declare.
7366 (ia64_fetch_register): Adjust.
7367 (ia64_usrregs_info, regs_info): New globals.
7368 (ia64_regs_info): New function.
7369 (the_low_target): Adjust.
7370 (initialize_low_arch): New function.
7371 * linux-sparc-low.c (tdesc_sparc64): Declare.
7372 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7374 (sparc_arch_setup): New function.
7375 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7376 (the_low_target): Adjust.
7377 (initialize_low_arch): New function.
7378 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7379 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7380 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7381 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7382 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7383 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7384 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7385 (tdesc_powerpc_isa205_vsx64l): Declare.
7386 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7387 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7388 (ppc_set_pc, ppc_get_hwcap): Adjust.
7389 (ppc_usrregs_info): Forward declare.
7390 (!__powerpc64__) ppc_regmap_adjusted: New global.
7391 (ppc_arch_setup): Adjust to the current process'es target
7393 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7394 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7395 (ppc_store_evrregset): Adjust.
7396 (target_regsets): Rename to ...
7397 (ppc_regsets): ... this, and make static.
7398 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7399 (ppc_regs_info): New function.
7400 (the_low_target): Adjust.
7401 (initialize_low_arch): New function.
7402 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7403 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7404 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7405 (tdesc_s390x_linux64v2): Declare.
7406 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7407 (s390_fill_gregset, s390_store_last_break): Adjust.
7408 (target_regsets): Rename to ...
7409 (s390_regsets): ... this, and make static.
7410 (s390_get_pc, s390_set_pc): Adjust.
7411 (s390_get_hwcap): New target_desc parameter, and use it.
7412 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7413 (s390_arch_setup): Adjust to set the current process'es target
7414 description. Don't adjust the regmap.
7415 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7416 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7417 (regs_info_3264): New globals.
7418 (s390_regs_info): New function.
7419 (the_low_target): Adjust.
7420 (initialize_low_arch): New function.
7421 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7422 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7423 [__mips64] (init_registers_mips_linux)
7424 (init_registers_mips_dsp_linux): Delete defines.
7425 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7426 (have_dsp): New global.
7427 (mips_read_description): New, based on mips_arch_setup.
7428 (mips_arch_setup): Reimplement.
7429 (get_usrregs_info): New function.
7430 (mips_cannot_fetch_register, mips_cannot_store_register)
7431 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7432 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7433 (target_regsets): Rename to ...
7434 (mips_regsets): ... this, and make static.
7435 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7436 (dsp_regs_info, regs_info): New globals.
7437 (mips_regs_info): New function.
7438 (the_low_target): Adjust.
7439 (initialize_low_arch): New function.
7440 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7441 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7443 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7444 (arm_read_description): New, with bits factored from
7446 (arm_arch_setup): Reimplement.
7447 (target_regsets): Rename to ...
7448 (arm_regsets): ... this, and make static.
7449 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7450 (arm_regs_info): New function.
7451 (the_low_target): Adjust.
7452 (initialize_low_arch): New function.
7453 * linux-m68k-low.c (tdesc_m68k): Declare.
7454 (target_regsets): Rename to ...
7455 (m68k_regsets): ... this, and make static.
7456 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7457 (m68k_regs_info): New function.
7458 (m68k_arch_setup): New function.
7459 (the_low_target): Adjust.
7460 (initialize_low_arch): New function.
7461 * linux-sh-low.c (tdesc_sharch): Declare.
7462 (target_regsets): Rename to ...
7463 (sh_regsets): ... this, and make static.
7464 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7465 (sh_regs_info, sh_arch_setup): New functions.
7466 (the_low_target): Adjust.
7467 (initialize_low_arch): New function.
7468 * linux-bfin-low.c (tdesc_bfin): Declare.
7469 (bfin_arch_setup): New function.
7470 (bfin_usrregs_info, regs_info): New globals.
7471 (bfin_regs_info): New function.
7472 (the_low_target): Adjust.
7473 (initialize_low_arch): New function.
7474 * linux-cris-low.c (tdesc_cris): Declare.
7475 (cris_arch_setup): New function.
7476 (cris_usrregs_info, regs_info): New globals.
7477 (cris_regs_info): New function.
7478 (the_low_target): Adjust.
7479 (initialize_low_arch): New function.
7480 * linux-cris-low.c (tdesc_crisv32): Declare.
7481 (cris_arch_setup): New function.
7482 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7483 (cris_regs_info): New function.
7484 (the_low_target): Adjust.
7485 (initialize_low_arch): New function.
7486 * linux-m32r-low.c (tdesc_m32r): Declare.
7487 (m32r_arch_setup): New function.
7488 (m32r_usrregs_info, regs_info): New globals.
7489 (m32r_regs_info): Adjust.
7490 (initialize_low_arch): New function.
7491 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7492 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7493 (tic6x_usrregs_info): Forward declare.
7494 (tic6x_read_description): New function, based on ...
7495 (tic6x_arch_setup): ... this. Reimplement.
7496 (target_regsets): Rename to ...
7497 (tic6x_regsets): ... this, and make static.
7498 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7499 (tic6x_regs_info): New function.
7500 (the_low_target): Adjust.
7501 (initialize_low_arch): New function.
7502 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7503 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7504 (target_regsets): Rename to ...
7505 (xtensa_regsets): ... this, and make static.
7506 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7508 (xtensa_arch_setup, xtensa_regs_info): New functions.
7509 (the_low_target): Adjust.
7510 (initialize_low_arch): New function.
7511 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7512 (nios2_arch_setup): Set the current process'es tdesc.
7513 (target_regsets): Rename to ...
7514 (nios2_regsets): ... this.
7515 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7516 (nios2_regs_info): New function.
7517 (the_low_target): Adjust.
7518 (initialize_low_arch): New function.
7519 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7520 (aarch64_arch_setup): Set the current process'es tdesc.
7521 (target_regsets): Rename to ...
7522 (aarch64_regsets): ... this.
7523 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7524 (aarch64_regs_info): New function.
7525 (the_low_target): Adjust.
7526 (initialize_low_arch): New function.
7527 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7529 (target_regsets): Rename to ...
7530 (tile_regsets): ... this.
7531 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7532 (tile_regs_info): New function.
7533 (tile_arch_setup): Set the current process'es tdesc.
7534 (the_low_target): Adjust.
7535 (initialize_low_arch): New function.
7536 * spu-low.c (tdesc_spu): Declare.
7537 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7538 * win32-arm-low.c (tdesc_arm): Declare.
7539 (arm_arch_setup): New function.
7540 (the_low_target): Install arm_arch_setup instead of
7542 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7543 (init_windows_x86): Rename to ...
7544 (i386_arch_setup): ... this. Set `win32_tdesc'.
7545 (the_low_target): Adjust.
7546 * win32-low.c (win32_tdesc): New global.
7547 (child_add_thread): Don't create the thread cache here.
7548 (do_initial_child_stuff): Set the new process'es tdesc.
7549 * win32-low.h (struct target_desc): Forward declare.
7550 (win32_tdesc): Declare.
7551 * lynx-i386-low.c (tdesc_i386): Declare global.
7552 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7553 * lynx-low.c (lynx_tdesc): New global.
7554 (lynx_add_process): Set the new process'es tdesc.
7555 * lynx-low.h (struct target_desc): Forward declare.
7556 (lynx_tdesc): Declare global.
7557 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7558 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7559 * nto-low.c (nto_tdesc): New global.
7560 (do_attach): Set the new process'es tdesc.
7561 * nto-low.h (struct target_desc): Forward declare.
7562 (nto_tdesc): Declare.
7563 * nto-x86-low.c (tdesc_i386): Declare.
7564 (nto_x86_arch_setup): Set `nto_tdesc'.
7566 2013-06-04 Gary Benson <gbenson@redhat.com>
7568 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7569 to qSupported response when appropriate.
7570 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7571 with nonzero-length annex.
7572 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7573 arguments supplied in annex.
7575 2013-05-31 Doug Evans <dje@google.com>
7578 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7579 64 bits in 64-cross-32 environment.
7581 2013-05-28 Pedro Alves <palves@redhat.com>
7583 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7584 (aarch64-without-fpu.c): Delete rule.
7585 * configure.srv (aarch64*-*-linux*): Remove references to
7586 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7587 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7590 2013-05-24 Pedro Alves <palves@redhat.com>
7592 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7593 instead of strchr/decode_address. Error if the range isn't split
7594 with a ','. Don't assume there's be a ':' in the action.
7596 2013-05-23 Yao Qi <yao@codesourcery.com>
7597 Pedro Alves <palves@redhat.com>
7599 * linux-low.c (lwp_in_step_range): New function.
7600 (linux_wait_1): If the thread was range stepping and stopped
7601 outside the stepping range, report the stop to GDB. Otherwise,
7602 continue stepping. Add range stepping debug output.
7603 (linux_set_resume_request): Copy the step range from the resume
7605 (linux_supports_range_stepping): New.
7606 (linux_target_ops) <supports_range_stepping>: Set to
7607 linux_supports_range_stepping.
7608 * linux-low.h (struct linux_target_ops)
7609 <supports_range_stepping>: New field.
7610 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7611 * linux-x86-low.c (x86_supports_range_stepping): New.
7612 (the_low_target) <supports_range_stepping>: Set to
7613 x86_supports_range_stepping.
7614 * server.c (handle_v_cont): Handle 'r' action.
7615 (handle_v_requests): Append ";r" if the target supports range
7617 * target.h (struct thread_resume) <step_range_start,
7618 step_range_end>: New fields.
7619 (struct target_ops) <supports_range_stepping>:
7621 (target_supports_range_stepping): New macro.
7623 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7625 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7626 confusion in comment.
7628 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7630 * lynx-low.c (struct process_info_private): New type.
7631 (lynx_add_process): New function.
7632 (lynx_create_inferior, lynx_attach): Replace calls to
7633 add_process by calls to lynx_add_process.
7634 (lynx_resume): If PTID is null, then try using
7635 current_process()->private->last_wait_event_ptid.
7637 (lynx_clear_inferiors): Delete. The contents of that function
7638 has been inlined in lynx_mourn;
7639 (lynx_wait_1): Save the ptid in the process's private data.
7640 (lynx_mourn): Free the process' private data. Replace call
7641 to lynx_clear_inferiors by call to clear_inferiors.
7643 2013-05-17 Yao Qi <yao@codesourcery.com>
7645 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7648 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7650 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7651 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7652 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7653 PT_TEXT_END_ADDR guards. Update comments.
7654 (linux_target_op) <read_offsets>: Conditionally define to
7655 linux_read_offsets if the target is UCLIBC and if it defines
7656 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7658 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7659 Andrew Jenner <andrew@codesourcery.com>
7661 * Makefile.in (SFILES): Add linux-nios2-low.c.
7662 (clean): Add action to delete nios2-linux.c.
7663 (nios2-linux.c): New rule.
7664 * configure.srv: Add nios2*-*-linux*.
7665 * linux-nios2-low.c: New.
7667 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7669 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7671 2013-04-25 Hui Zhu <hui@codesourcery.com>
7674 * ax.c (ax_printf): Add fflush.
7676 2013-04-22 Tom Tromey <tromey@redhat.com>
7678 * Makefile.in (SFILES): Add filestuff.c.
7679 (OBS): Add filestuff.o.
7680 (filestuff.o): New target.
7681 * config.in, configure: Rebuild.
7682 * configure.ac: Check for fdwalk, pipe2.
7684 2013-04-17 Pedro Alves <palves@redhat.com>
7686 * configure.ac (USE_THREAD_DB): Delete variable.
7687 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7688 Don't AC_SUBST USE_THREAD_DB.
7689 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7690 * config.in, configure: Regenerate.
7692 2013-04-16 Pedro Alves <palves@redhat.com>
7694 * linux-low.h (struct lwp_info) <thread_known>: Move under
7695 the USE_THREAD_DB #ifdef.
7697 2013-04-16 Pedro Alves <palves@redhat.com>
7699 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7700 (linux-low.o): Delete rule.
7701 * linux-low.h: Always include "gdb_thread_db.h" instead of
7702 conditionally including thread_db.h.
7703 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7706 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7708 * Makefile.in (install-only): Fix make install regression.
7710 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7712 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7713 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7715 * gdbserver.1: Remove.
7717 2013-03-22 Pedro Alves <palves@redhat.com>
7719 * linux-low.c (handle_extended_wait): Don't call
7720 linux_enable_event_reporting.
7722 2013-03-15 Tony Theodore <tonyt@logyst.com>
7725 * Makefile.in (SHELL): Use @SHELL@.
7727 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7729 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7732 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7734 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7735 Remove extraneous NULL element.
7737 2013-03-13 Yao Qi <yao@codesourcery.com>
7739 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7740 'V' block in trace frame.
7742 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7744 * target.h (struct target_ops): Add btrace ops.
7745 (target_supports_btrace): New macro.
7746 (target_enable_btrace): New macro.
7747 (target_disable_btrace): New macro.
7748 (target_read_btrace): New macro.
7749 * gdbthread.h (struct thread_info): Add btrace field.
7750 * server.c: Include btrace-common.h.
7751 (handle_btrace_general_set): New function.
7752 (handle_btrace_enable): New function.
7753 (handle_btrace_disable): New function.
7754 (handle_general_set): Call handle_btrace_general_set.
7755 (handle_qxfer_btrace): New function.
7756 (struct qxfer qxfer_packets[]): Add btrace entry.
7757 * inferiors.c (remove_thread): Disable btrace.
7758 * linux-low: Include linux-btrace.h.
7759 (linux_low_enable_btrace): New function.
7760 (linux_low_read_btrace): New function.
7761 (linux_target_ops): Add btrace ops.
7762 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7763 Add srv_linux_btrace=yes.
7764 (x86_64-*-linux*): Add linux-btrace.o.
7765 Add srv_linux_btrace=yes.
7766 * configure.ac: Define HAVE_LINUX_BTRACE.
7767 * config.in: Regenerated.
7768 * configure: Regenerated.
7770 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7772 * server.c (handle_qxfer): Preserve error message if -3 is
7774 (qxfer): Document the -3 return value.
7776 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7778 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7779 (linux_btrace_h): New variable.
7780 (linux-btrace.o): New rule.
7782 2013-03-08 Stan Shebs <stan@codesourcery.com>
7783 Hafiz Abid Qadeer <abidh@codesourcery.com>
7785 * tracepoint.c (trace_buffer_size): New global.
7786 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7787 (init_trace_buffer): Change to one-argument function. Allocate
7788 trace buffer memory.
7789 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7790 handle QTBuffer:size packet.
7791 (cmd_bigqtbuffer_size): New function.
7792 (initialize_tracepoint): Call init_trace_buffer with
7793 DEFAULT_TRACE_BUFFER_SIZE.
7794 * server.c (handle_query): Add QTBuffer:size in the
7797 2013-03-07 Yao Qi <yao@codesourcery.com>
7799 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7800 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7802 (cmd_qtsp): Adjust condition. Do post increment.
7803 Set cur_action and cur_step_action back to 0.
7805 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7808 * linux-low.c (linux_write_memory): Return early success if LEN is
7811 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7813 * configure.srv: Add x86_64-*-cygwin* as target.
7815 2013-02-28 Tom Tromey <tromey@redhat.com>
7817 * configure.ac: Invoke AC_SYS_LARGEFILE.
7818 * configure, config.in: Rebuild.
7820 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7822 * win32-low.c: Throughout, fix format strings and casts of
7823 printf-like functions to avoid type related warnings on all
7825 (get_child_debug_event): Print dwDebugEventCode as hex since
7826 that's how it's usually documented.
7828 2013-02-28 Yao Qi <yao@codesourcery.com>
7830 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7833 2013-02-27 Jiong Wang <jiwang@tilera.com>
7835 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7836 (reg-tilegx32.c): New rule.
7837 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7838 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7839 different register info initializer according to elf class.
7840 (init_registers_tilgx32): New function. The tilegx32 register info
7842 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7843 (tile_store_gregset): Likewise.
7845 2013-02-27 Yao Qi <yao@codesourcery.com>
7847 * server.c (process_point_options): Print debug message when
7848 debug_threads is true.
7850 2013-02-26 Yao Qi <yao@codesourcery.com>
7852 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7854 2013-02-19 Pedro Alves <palves@redhat.com>
7855 Kai Tietz <ktietz@redhat.com>
7859 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7860 instead of strtoul to extract address from packet.
7861 (process_serial_event) <'z'>: Likewise.
7863 2013-02-18 Yao Qi <yao@codesourcery.com>
7865 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7867 2013-02-14 Pedro Alves <palves@redhat.com>
7871 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7872 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7874 2013-02-14 Pedro Alves <palves@redhat.com>
7876 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7878 2013-02-14 Pedro Alves <palves@redhat.com>
7880 * tracepoint.c (save_string): Delete.
7881 (add_tracepoint_action): Use savestring instead of save_string.
7883 2013-02-12 Pedro Alves <palves@redhat.com>
7885 * linux-xtensa-low.c: Ditto.
7886 * xtensa-xtregs.c: Ditto.
7888 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7890 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7893 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7895 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7896 aarch64_num_wp_regs and aarch64_num_bp_regs to
7897 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7899 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7901 * linux-aarch64-low.c (ps_get_thread_area): Replace
7902 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7904 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7905 Marcus Shawcroft <marcus.shawcroft@arm.com>
7906 Nigel Stephens <nigel.stephens@arm.com>
7907 Yufeng Zhang <yufeng.zhang@arm.com>
7909 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7910 (aarch64.c, aarch64-without-fpu.c): New targets.
7911 * configure.srv (aarch64*-*-linux*): New.
7912 * linux-aarch64-low.c: New file.
7914 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7916 * linux-low.c (handle_extended_wait, linux_create_inferior)
7917 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7918 (dequeue_one_deferred_signal, linux_resume_one_thread)
7919 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7920 (linux_tracefork_grandchild, linux_test_for_tracefork)
7921 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7922 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7923 where the argument is 0.
7925 2013-01-25 Yao Qi <yao@codesourcery.com>
7927 * event-loop.c: Include "queue.h".
7928 (gdb_event_p): New typedef.
7929 (struct gdb_event) <next_event>: Remove.
7930 (event_queue): Change to QUEUE(gdb_event_p).
7931 (async_queue_event): Remove.
7932 (gdb_event_xfree): New.
7933 (initialize_event_loop): New.
7934 (process_event): Use API from QUEUE.
7935 (wait_for_event): Likewise.
7936 * server.c (main): Call initialize_event_loop.
7937 * server.h (initialize_event_loop): Declare.
7939 2013-01-18 Yao Qi <yao@codesourcery.com>
7941 * ax.h (struct eval_agent_expr_context): New.
7942 (gdb_eval_agent_expr): Update declaration.
7943 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7944 TFRAME. Add new argument CTX.
7945 * server.h (struct eval_agent_expr_context): Declare.
7946 (agent_mem_read, agent_tsv_read): Update declaration.
7947 (agent_mem_read_string): Likewise.
7948 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7949 (add_traceframe_block): Add new argument TPOINT.
7950 Increase TPOINT->traceframe_usage.
7951 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7952 eval_tracepoint_agent_expr.
7953 (condition_true_at_tracepoint): Likewise.
7954 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7955 (agent_mem_read_string, agent_tsv_read): Likewise.
7957 2013-01-16 Yao Qi <yao@codesourcery.com>
7959 * linux-low.c (linux_resume_one_lwp): Don't check
7960 'lwp->bp_reinsert != 0'.
7962 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7963 Pedro Alves <palves@redhat.com>
7965 * lynx-low.c (ptrace_request_to_str): Define a temporary
7966 macro and use it to simplify this function's implementation.
7968 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7970 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7973 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7975 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7977 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7979 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7981 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7983 * lynx-low.c (lynx_resume): Use the resume_info parameter
7984 to determine the ptid for the lynx_ptrace call, unless
7985 it is equal to minus_one_ptid, in which case we use the
7986 ptid of the current_inferior.
7987 (lynx_wait_1): After having received a thread create/exit
7988 event, resume the inferior's execution using the signaling
7989 thread's ptid, rather than the old ptid.
7991 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7993 * lynx-low.c (lynx_resume): Delete variable ret.
7995 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7997 * gdbreplay.c (gdbreplay_version): Update copyright year.
7998 * server.c (gdbserver_version): Likewise.
8000 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8002 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8005 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8007 * lynx-low.c (ptrace_request_to_str): Add handling for
8010 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8012 * lynx-low.c (lynx_attach): Delete variable new_process.
8014 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8016 * lynx-low.c (lynx_create_inferior): Delete variable
8019 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8021 * lynx-low.c (ptrace_request_to_str): Do not handle
8022 PTRACE_GETTHREADLIST if this macro does not exist.
8024 2012-12-15 Yao Qi <yao@codesourcery.com>
8026 * Makefile.in (OBS): Add notif.o.
8027 * notif.c, notif.h: New.
8028 * server.c: Include "notif.h".
8029 (struct vstop_notif) <next>: Remove.
8031 (queue_stop_reply): Update.
8032 (push_event, send_next_stop_reply): Remove.
8033 (discard_queued_stop_replies): Update.
8034 (notif_stop): New variable.
8035 (handle_v_stopped): Remove.
8036 (handle_v_requests): Don't call handle_v_stopped. Call
8037 handle_ack_notif instead.
8038 (queue_stop_reply_callback): Call notif_event_enque instead
8039 of queue_stop_reply.
8040 (handle_status): Don't call send_next_stop_reply, call
8041 notif_write_event instead.
8042 (kill_inferior_callback): Likewise.
8043 (detach_or_kill_inferior_callback): Likewise.
8044 (main): Call initialize_notif.
8045 (process_serial_event): Call QUEUE_is_empty.
8046 (handle_target_event): Call notif_push instead of push event.
8047 * server.h (push_event): Remove declaration.
8049 2012-12-10 Tom Tromey <tromey@redhat.com>
8051 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8052 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8055 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8056 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8057 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8058 (amd64-linux-ipa.o, ax.o): Rewrite.
8059 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8060 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8061 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8062 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8063 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8064 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8065 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8066 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8067 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8068 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8069 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8070 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8071 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8072 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8073 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8074 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8075 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8076 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8077 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8078 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8079 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8080 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8081 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8082 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8083 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8084 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8085 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8086 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8087 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8088 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8089 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8090 (reg-tilegx.o): Remove.
8091 (all_object_files): New macro.
8092 Include .deps files.
8093 * aclocal.m4, configure: Rebuild.
8094 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8095 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8096 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8098 2012-12-05 Tom Tromey <tromey@redhat.com>
8101 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8103 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8105 * configure.ac: Check for linux/perf_event.h.
8106 * config.in: Regenerated.
8107 * configure: Regenerated.
8109 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8111 * hostio.c (handle_readlink): Decrease buffer size
8112 parameter passed to readlink by one byte.
8114 2012-11-26 Yao Qi <yao@codesourcery.com>
8116 * configure.ac (build_warnings): Append '-Wempty-body'.
8117 * configure: Regenerated.
8118 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8121 2012-11-15 Pierre Muller <muller@sourceware.org>
8123 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8124 * config.in: Regenerate.
8125 * configure: Regenerate.
8126 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8127 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8128 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8129 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8131 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8132 instead of <sys/wait.h> header.
8133 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8135 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8137 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8138 (various make rules): Remove -DGDBSERVER
8140 2012-11-09 Yao Qi <yao@codesourcery.com>
8142 * spu-low.c (current_ptid): Move it to ..
8143 * gdbthread.h: ... here. New.
8144 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8145 * server.c (myresume, process_serial_event): Likewise.
8146 * thread-db.c (thread_db_find_new_threads): Likewise.
8147 * tracepoint.c (run_inferior_command): Likewise.
8149 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8151 * server.c (handle_search_memory_1): Include access length in
8154 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8156 * linux-crisv32-low.c: Fix compile errors.
8158 2012-09-04 Yao Qi <yao@codesourcery.com>
8160 * tracepoint.c (cmd_qtsv): Adjust debug message.
8161 Don't check CUR_TPOINT.
8163 2012-08-28 Yao Qi <yao@codesourcery.com>
8165 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8166 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8167 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8168 Remove declarations of xmalloc, xreallloc, xstrdup and
8170 * Makefile.in (libiberty_h): New.
8171 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8172 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8174 2012-08-23 Yao Qi <yao@codesourcery.com>
8176 * server.h: Remove declaration of 'xsnprintf'.
8178 2012-08-22 Keith Seitz <keiths@redhat.com>
8180 * server.h: Include build-gnulib-gbserver/config.h.
8181 * gdbreplay.c: Likewise.
8183 2012-08-08 Doug Evans <dje@google.com>
8185 * Makefile.in (SFILES): Add gdb_vecs.c.
8186 (OBS): Add gdb_vecs.o.
8187 (gdb_vecs_h, host_defs_h): New variables.
8188 (thread-db.o): Add $(gdb_vecs_h) dependency.
8189 (gdb_vecs.o): New rule.
8190 * thread-db.c: #include "gdb_vecs.h".
8191 (thread_db_load_search): Use a vector to iterate over path elements.
8192 Handle text appearing after "$pdir".
8194 * configure.ac: Add check for strstr.
8195 * config.in: Regenerate.
8196 * configure: Regenerate.
8198 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8200 * hostio.c (handle_pread): If pread fails, fall back to attempting
8202 (handle_pwrite): Likewise for pwrite.
8204 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8206 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8207 between unsupported TYPE and unimplementable ADDR/LEN combination.
8208 (arm_insert_point): Act on new return value.
8210 2012-07-31 Pedro Alves <palves@redhat.com>
8212 * server.c (process_point_options): Only skip tokens if we find
8213 one that is unrecognized. Don't treat 'X' specially while
8214 skipping unrecognized tokens.
8216 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8218 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8219 to 4-byte-align HW breakpoint addresses for Thumb.
8221 2012-07-27 Yao Qi <yao@codesourcery.com>
8225 * server.h: Declare gdb_agent_about_to_close.
8226 * target.c (kill_inferior): Include "agent.h".
8227 New. Send command 'kill'.
8228 * target.h (kill_inferior): Removed macro.
8229 * tracepoint.c (gdb_agent_about_to_close): New.
8230 (gdb_agent_helper_thread): Handle command 'close'.
8231 Wait endlessly until the inferior stops.
8232 Install gdb_agent_remove_socket to atexit hook.
8233 (agent_socket_name): New static variable.
8234 (gdb_agent_socket_init): Replace local variable 'name' with
8235 'agent_socket_name'.
8236 (gdb_agent_remove_socket): New.
8238 2012-07-27 Yao Qi <yao@codesourcery.com>
8240 * server.c (process_point_options): Stop at 'X' when parsing.
8242 2012-07-19 Michael Eager <eager@eagercon.com>
8244 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8246 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8247 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8248 hardware breakpoint.
8250 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8252 * gdbserver/linux-low.c (initialize_low): Call
8253 linux_ptrace_init_warnings.
8255 2012-07-02 Doug Evans <dje@google.com>
8257 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8260 2012-07-02 Stan Shebs <stan@codesourcery.com>
8262 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8263 (ax.o): Add it to build rule.
8265 (OBS): Add format.o.
8266 (IPA_OBS): Add format.o.
8267 * server.c (handle_query): Claim support for breakpoint commands.
8268 (process_point_options): Add command case.
8269 (process_serial_event): Leave running if there are printfs in
8271 * mem-break.h (any_persistent_commands): Declare.
8272 (add_breakpoint_commands): Declare.
8273 (gdb_no_commands_at_breakpoint): Declare.
8274 (run_breakpoint_commands): Declare.
8275 * mem-break.c (struct point_command_list): New struct.
8276 (struct breakpoint): New field command_list.
8277 (any_persistent_commands): New function.
8278 (add_commands_to_breakpoint): New function.
8279 (add_breakpoint_commands): New function.
8280 (gdb_no_commands_at_breakpoint): New function.
8281 (run_breakpoint_commands): New function.
8282 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8284 * ax.c: Include format.h.
8285 (ax_printf): New function.
8286 (gdb_eval_agent_expr): Add printf opcode.
8288 2012-06-13 Yao Qi <yao@codesourcery.com>
8290 * server.c (start_inferior): Remove duplicated writes to fields
8291 'last_resume_kind' and 'last_status' of 'current_inferior'.
8293 2012-06-12 Yao Qi <yao@codesourcery.com>
8294 Pedro Alves <palves@redhat.com>
8296 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8298 * server.c (handle_v_cont): Extend comment.
8300 2012-06-11 Yao Qi <yao@codesourcery.com>
8302 * linux-low.c (linux_attach): Add 'static'.
8304 2012-06-06 Yao Qi <yao@codesourcery.com>
8306 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8308 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8310 Fix gcc -flto compilation warning.
8311 * server.c (main): Make variable multi_mode and attach volatile.
8313 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8315 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8316 if the platform doesn't know about it.
8318 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8320 * Makefile.in (SFILES): Add linux-tile-low.c.
8321 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8322 * configure.srv: Handle tilegx-*-linux*.
8323 * linux-tile-low.c: New file.
8325 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8327 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8329 2012-05-24 Pedro Alves <palves@redhat.com>
8333 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8335 2012-05-24 Pedro Alves <palves@redhat.com>
8339 Replace target_signal with gdb_signal throughout.
8341 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8343 * linux-low.c (linux_store_registers): Avoid the copying sequence
8344 when no data has been retrieved by ptrace.
8346 2012-05-22 Will Deacon <will.deacon@arm.com>
8348 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8349 Include asm/ptrace.h.
8350 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8353 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8355 * linux-low.c (linux_store_registers): Don't re-retrieve data
8356 with ptrace that has already been obtained from /proc. Always
8357 copy any data retrieved with ptrace to the buffer supplied.
8359 2012-05-11 Yao Qi <yao@codesourcery.com>
8360 Pedro Alves <palves@redhat.com>
8362 * linux-low.c (enum stopping_threads_kind): New.
8363 (stopping_threads): Change type to `enum stopping_threads_kind'.
8364 (handle_extended_wait): If stopping and suspending threads, leave
8365 the new_lwp suspended too.
8366 (linux_wait_for_event): Adjust.
8367 (stop_all_lwps): Set `stopping_threads' to
8368 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8369 whether we're suspending threads or just stopping them. Assert no
8372 2012-04-29 Yao Qi <yao@codesourcery.com>
8374 * server.h: Move some code to ...
8375 * gdbthread.h: ... here. New.
8376 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8377 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8378 (nto-low.o, win32-low.o): Likewise.
8379 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8380 * regcache.c, remote-utils.c, server.c: Likewise.
8381 * target.c, tracepoint.c, win32-low.c: Likewise.
8383 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8385 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8386 (PTRACE_ARG4_TYPE): Likewise.
8387 (PTRACE_XFER_TYPE): Likewise.
8388 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8389 ptrace to PTRACE_ARG3_TYPE.
8390 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8391 (PTRACE_ARG4_TYPE): Likewise.
8392 (PTRACE_XFER_TYPE): Likewise.
8393 (linux_detach_one_lwp): Cast fourth argument of
8394 ptrace to long then PTRACE_ARG4_TYPE.
8395 (regsets_fetch_inferior_registers): Cast third argument of
8396 ptrace to long then PTRACE_ARG3_TYPE.
8397 (regsets_store_inferior_registers): Likewise.
8399 2012-04-20 Pedro Alves <palves@redhat.com>
8401 * configure: Regenerate.
8403 2012-04-19 Pedro Alves <palves@redhat.com>
8405 * Makefile.in (GNULIB_BUILDDIR): New.
8406 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8407 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8408 (all, install-only, uninstall, clean-info, all-lib, clean): No
8409 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8410 (maintainer-clean realclean distclean): Use subdir_do.
8412 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8413 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8414 * acinclude.m4: Include acx_configure_dir.m4.
8415 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8416 calls. Call AC_PROG_RANLIB. Configure gnulib using
8419 (GNULIB_STDINT_H): Adjust.
8420 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8421 * gdbreplay.c: Include build-gnulib/config.h.
8422 * server.h: Likewise.
8423 * aclocal.m4: Regenerate.
8424 * config.in: Regenerate.
8425 * configure: Regenerate.
8427 2012-04-19 Pedro Alves <palves@redhat.com>
8429 * Makefile.in (LIBGNU, INCGNU): Adjust.
8430 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8431 (all, install-only, uninstall, clean-info, all-lib, clean)
8432 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8433 * configure.ac: Adjust AC_OUTPUT output.
8434 * aclocal.m4: Regenerate.
8435 * configure: Regenerate.
8437 2012-04-19 Pedro Alves <palves@redhat.com>
8439 * Makefile.in (generated_files): New.
8440 (server_h): Remove the explicit dependency on config.h, and depend
8441 on $generated_files.
8443 2012-04-19 Pedro Alves <palves@redhat.com>
8445 * Makefile.in (INCGNU): Add -Ignulib.
8447 2012-04-19 Pedro Alves <palves@redhat.com>
8449 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8450 (INCGNU): ... this, and spell out -I here.
8451 (GNULIB_LIB): Rename to ...
8453 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8455 2012-04-19 Pedro Alves <palves@redhat.com>
8457 * config.in: Regenerate.
8459 2012-04-19 Pedro Alves <palves@redhat.com>
8461 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8462 * server.h (memmem): Remove declaration.
8463 * config.in: Regenerate.
8464 * configure: Regenerate.
8466 2012-04-19 Yao Qi <yao@codesourcery.com>
8468 * Makefile.in (SFILES): Add common/vec.c.
8472 2012-04-19 Yao Qi <yao@codesourcery.com>
8474 * remote-utils.c (prepare_resume_reply): Replace with macro
8475 target_core_of_thread.
8476 * server.c (handle_qxfer_threads_proper): Likewise.
8477 * target.h (traget_core_of_thread): New macro.
8479 2012-04-18 Pedro Alves <palves@redhat.com>
8481 * aclocal.m4: Regenerate.
8482 * configure: Regenerate.
8484 2012-04-16 Yao Qi <yao@codesourcery.com>
8486 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8487 duplicated on address.
8489 2012-04-16 Yao Qi <yao@codesourcery.com>
8491 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8492 (struct tracepoint_action_ops) <send>: New field.
8493 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8494 (agent_expr_send, x_tracepoint_action_send): New.
8495 (l_tracepoint_action_send): New.
8496 (cmd_qtdp): Download and install tracepoint
8497 according to `use_agent'.
8498 (run_inferior_command): Add one more parameter `len'.
8500 (tracepoint_send_agent): New.
8501 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8503 2012-04-16 Yao Qi <yao@codesourcery.com>
8505 * tracepoint.c (download_tracepoints): Moved to ...
8506 (cmd_qtstart): ... here.
8508 2012-04-14 Yao Qi <yao@codesourcery.com>
8510 * tracepoint.c: Include inttypes.h.
8511 (struct collect_memory_action): Use sized types.
8512 (struct tracepoint): Likewise.
8513 (cmd_qtdp, stop_tracing): Update print specifiers.
8514 (cmd_qtp, response_tracepoint): Likewise.
8515 (collect_data_at_tracepoint): Likewise.
8516 (collect_data_at_step): Likewise.
8518 2012-04-14 Yao Qi <yao@codesourcery.com>
8520 Import gnulib module inttypes.
8521 * aclocal.m4, config.in, configure: Regenerated.
8523 2012-04-14 Yao Qi <yao@codesourcery.com>
8525 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8526 Makefile and config.status at last.
8528 2012-04-13 Yao Qi <yao@codesourcery.com>
8530 * tracepoint.c: Include stdint.h unconditionally.
8532 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8534 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8535 on BFD_HAVE_SYS_PROCFS_TYPE.
8536 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8537 * configure: Regenerate.
8538 * config.in: Likewise.
8540 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8542 * Makefile.in (clean): Also remove x32.c x32-linux.c
8543 x32-avx.c x32-avx-linux.c.
8544 (x32.o): New target.
8546 (x32-linux.o): Likewise.
8547 (x32-linux.c): Likewise.
8548 (x32-avx.o): Likewise.
8549 (x32-avx.c): Likewise.
8550 (x32-avx-linux.o): Likewise.
8551 (x32-avx-linux.c): Likewise.
8553 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8554 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8555 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8556 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8557 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8558 i386/x32-avx-linux.xml.
8560 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8561 (init_registers_x32_avx_linux): Likwise.
8562 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8563 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8565 2012-04-13 Pedro Alves <palves@redhat.com>
8567 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8568 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8569 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8570 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8573 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8575 * linux-x86-low.c (compat_x32_clock_t): New.
8576 (compat_x32_siginfo_t): Likewise.
8577 (compat_x32_siginfo_from_siginfo): Likewise.
8578 (siginfo_from_compat_x32_siginfo): Likewise.
8579 (linux_is_elf64): Likewise.
8580 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8581 and siginfo_from_compat_x32_siginfo for x32.
8582 (x86_arch_setup): Set linux_is_elf64.
8584 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8587 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8589 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8590 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8591 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8592 compatible with process.
8594 2012-04-12 Yao Qi <yao@codesourcery.com>
8596 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8597 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8598 (install-only, install-info, clean): Handle sub dir gnulib.
8599 (all-lib, am--refresh): New targets.
8600 (memmem.o): Remove target.
8601 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8602 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8603 (AC_REPLACE_FUNCS): Remove memmem.
8604 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8605 (AC_OUTPUT): Generate Makefile in gnulib/.
8606 * aclocal.m4, config.in, configure: Regenerated.
8608 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8610 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8612 2012-04-05 Pedro Alves <palves@redhat.com>
8614 -Werror=strict-aliasing
8616 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8619 2012-04-04 Pedro Alves <palves@redhat.com>
8621 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8622 (sparc_store_gregset_from_stack, sparc_store_gregset)
8623 (sparc_breakpoint_at): Fix formatting.
8625 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8627 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8629 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8630 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8631 * config.in: Regenerate.
8632 * configure: Likewise.
8634 2012-03-29 Pedro Alves <palves@redhat.com>
8636 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8637 Correct ptrace arguments.
8639 2012-03-28 Pedro Alves <palves@redhat.com>
8641 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8642 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8643 (IA64_FR1_REGNUM): New defines.
8644 (ia64_fetch_register): New.
8645 (the_low_target): Install it.
8646 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8648 * linux-low.c (linux_fetch_registers): Try the
8649 the_low_target.fetch_register hook first.
8651 * linux-arm-low.c (the_low_target): Adjust.
8652 * linux-bfin-low.c (the_low_target): Adjust.
8653 * linux-cris-low.c (the_low_target): Adjust.
8654 * linux-crisv32-low.c (the_low_target): Adjust.
8655 * linux-m32r-low.c (the_low_target): Adjust.
8656 * linux-m68k-low.c (the_low_target): Adjust.
8657 * linux-mips-low.c (the_low_target): Adjust.
8658 * linux-ppc-low.c (the_low_target): Adjust.
8659 * linux-s390-low.c (the_low_target): Adjust.
8660 * linux-sh-low.c (the_low_target): Adjust.
8661 * linux-sparc-low.c (the_low_target): Adjust.
8662 * linux-tic6x-low.c (the_low_target): Adjust.
8663 * linux-x86-low.c (the_low_target): Adjust.
8664 * linux-xtensa-low.c (the_low_target): Adjust.
8666 2012-03-26 Pedro Alves <palves@redhat.com>
8668 * server.c (handle_qxfer_libraries): Don't bail early if
8669 the_target->qxfer_libraries_svr4 is not NULL.
8671 2012-03-26 Pedro Alves <palves@redhat.com>
8673 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8675 2012-03-23 Pedro Alves <palves@redhat.com>
8677 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8678 "library-list-svr4" element's start tag when the the DSO list is
8681 2012-03-23 Pedro Alves <palves@redhat.com>
8683 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8684 a variable whose type size is the same as the inferior's pointer
8687 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8689 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8691 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8692 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8693 * linux-low.h: Include <signal.h>.
8694 (struct siginfo): Remove forward declaration.
8695 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8698 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8700 * .gitignore: Ignore more files.
8702 2012-03-19 Pedro Alves <palves@redhat.com>
8703 Jan Kratochvil <jan.kratochvil@redhat.com>
8705 * server.c (cont_thread, general_thread): Add describing comments.
8706 (start_inferior): Clear `cont_thread'.
8707 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8710 2012-03-15 Yao Qi <yao@codesourcery.com>
8712 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8714 (cmd_qtdp): ... here.
8716 2012-03-15 Yao Qi <yao@codesourcery.com>
8718 * tracepoint.c (struct tracepoint_action_ops): New.
8719 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8720 (m_tracepoint_action_download): New.
8721 (r_tracepoint_action_download): New.
8722 (x_tracepoint_action_download): New.
8723 (l_tracepoint_action_download): New.
8724 (add_tracepoint_action): Install `action->ops' according type.
8725 (download_tracepoint_1): Move code `download' function pointer
8726 of various tracepoint_action_ops.
8728 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8730 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8731 linux_ptrace_attach_warnings.
8733 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8735 * Makefile.in (linux-ptrace.o): New.
8736 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8737 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8738 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8739 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8740 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8742 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8744 2012-03-08 Yao Qi <yao@codesourcery.com>
8745 Pedro Alves <palves@redhat.com>
8747 Fix PR server/13392.
8748 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8750 * tracepoint.c (remove_tracepoint): New.
8751 (cmd_qtdp): Call remove_tracepoint when failed to install.
8753 2012-03-07 Pedro Alves <palves@redhat.com>
8755 * linux-low.c (get_detach_signal): New.
8756 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8757 Pass on pending signals to PTRACE_DETACH. Check the result of the
8759 * server.c (program_signals, program_signals_p): New.
8760 (handle_general_set): Handle QProgramSignals.
8761 * server.h (program_signals, program_signals_p): Declare.
8763 2012-03-05 Pedro Alves <palves@redhat.com>
8764 Jan Kratochvil <jan.kratochvil@redhat.com>
8766 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8769 2012-03-03 Yao Qi <yao@codesourcery.com>
8771 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8772 agent_look_up_symbols.
8774 2012-03-03 Yao Qi <yao@codesourcery.com>
8776 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8777 (linux-x86-low.o): Likewise.
8778 * server.h: Remove in_process_agent_loaded.
8779 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8783 2012-03-03 Yao Qi <yao@codesourcery.com>
8785 * tracepoint.c (gdb_agent_capability): New global.
8786 (in_process_agent_loaded_ust): Renamed to
8787 `in_process_agent_supports_ust'.
8789 (in_process_agent_supports_ust): Call agent_capability_check.
8790 (clear_installed_tracepoints): Assert that agent supports
8793 2012-03-03 Yao Qi <yao@codesourcery.com>
8795 * linux-low.c (linux_supports_agent): New.
8796 (linux_target_ops): Initialize field `supports_agent' with
8797 linux_supports_agent.
8798 * target.h (struct target_ops) <supports_agent>: New.
8799 (target_supports_agent): New macro.
8800 * server.c (handle_general_set): Handle packet 'QAgent'.
8801 (handle_query): Send `QAgent+'.
8802 * Makefile.in (server.o): Depends on agent.h.
8804 2012-03-03 Yao Qi <yao@codesourcery.com>
8806 * Makefile.in (OBS): Add agent.o.
8807 Add new rule for agent.o.
8808 Track dependence of tracepoint.c on agent.h.
8809 * tracepoint.c (run_inferior_command_1):
8810 (run_inferior_command): Call agent_run_command.
8811 (gdb_ust_connect_sync_socket): Deleted. Move it to
8813 (resume_thread, stop_thread): Likewise.
8814 (gdb_ust_socket_init): Renamed to ...
8815 (gdb_agent_socket_init): ... New.
8816 (gdb_ust_thread): Renamed to ...
8817 (gdb_agent_helper_thread): ... New.
8818 (gdb_ust_init): Move some code to ...
8819 (gdb_agent_init): ... here. New.
8820 [HAVE_UST]: Call gdb_ust_init.
8821 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8822 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8823 * config.in, configure: Regenerated.
8825 2012-03-02 Pedro Alves <palves@redhat.com>
8827 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8828 * linux-low.c (struct simple_pid_list): New.
8829 (stopped_pids): New a struct simple_pid_list pointer.
8830 (add_to_pid_list, pull_pid_from_list): New.
8831 (handle_extended_wait): Don't assume the first signal new children
8832 report is SIGSTOP. Adjust call to pull_pid_from_list.
8833 (linux_wait_for_lwp): Adjust.
8835 2012-03-02 Yao Qi <yao@codesourcery.com>
8837 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8840 2012-03-02 Yao Qi <yao@codesourcery.com>
8842 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8843 `stop_pc' and `tpoint'. Update caller.
8845 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8847 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8848 * linux-low.c (use_linux_regsets): New macro.
8849 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8850 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8851 (linux_register_in_regsets): New function.
8852 (usr_fetch_inferior_registers): Skip registers covered by
8854 (usr_store_inferior_registers): Likewise.
8855 (usr_fetch_inferior_registers): New macro.
8856 (usr_store_inferior_registers): Likewise.
8857 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8858 (linux_store_registers): Likewise.
8859 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8861 (init_registers_mips64_dsp_linux): Likewise.
8862 (init_registers_mips_linux): New macro.
8863 (init_registers_mips_dsp_linux): Likewise.
8864 (mips_dsp_num_regs): Likewise.
8865 (DSP_BASE, DSP_CONTROL): New fallback macros.
8866 (mips_base_regs): New macro.
8867 (mips_regmap): Use it. Fix the size.
8868 (mips_dsp_regmap): New variable.
8869 (mips_dsp_regset_bitmap): Likewise.
8870 (mips_arch_setup): New function.
8871 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8873 (mips_cannot_store_register): Likewise.
8874 (the_low_target): Update .arch_setup, .num_regs and .regmap
8875 initializers. Add .regset_bitmap initializer.
8876 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8878 * linux-bfin-low.c (the_low_target): Likewise.
8879 * linux-cris-low.c (the_low_target): Likewise.
8880 * linux-crisv32-low.c (the_low_target): Likewise.
8881 * linux-ia64-low.c (the_low_target): Likewise.
8882 * linux-m32r-low.c (the_low_target): Likewise.
8883 * linux-m68k-low.c (the_low_target): Likewise.
8884 * linux-ppc-low.c (the_low_target): Likewise.
8885 * linux-s390-low.c (the_low_target): Likewise.
8886 * linux-sh-low.c (the_low_target): Likewise.
8887 * linux-sparc-low.c (the_low_target): Likewise.
8888 * linux-tic6x-low.c (the_low_target): Likewise.
8889 * linux-x86-low.c (the_low_target): Likewise.
8890 * linux-xtensa-low.c (the_low_target): Likewise.
8891 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8892 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8893 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8895 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8896 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8898 2012-02-29 Yao Qi <yao@codesourcery.com>
8899 Pedro Alves <palves@redhat.com>
8901 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8902 `step_over_finished' is true.
8904 2012-02-27 Pedro Alves <palves@redhat.com>
8906 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8907 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8909 2012-02-27 Pedro Alves <palves@redhat.com>
8912 * linux-low.c (pid_is_stopped): New.
8913 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8915 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8917 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8920 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8922 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8924 2012-02-24 Luis Machado <lgustavo@codesourcery>
8926 * server.c (handle_query): Advertise support for target-side
8927 breakpoint condition evaluation.
8928 (process_point_options): New function.
8929 (process_serial_event): When inserting a breakpoint, check for
8930 a target-side condition that should be evaluated.
8932 * mem-break.c: Include regcache.h and ax.h.
8933 (point_cond_list_t): New data structure.
8934 (breakpoint) <cond_list>: New field.
8935 (find_gdb_breakpoint_at): Make non-static.
8936 (delete_gdb_breakpoint_at): Clear any target-side
8938 (clear_gdb_breakpoint_conditions): New function.
8939 (add_condition_to_breakpoint): Likewise.
8940 (add_breakpoint_condition): Likewise.
8941 (gdb_condition_true_at_breakpoint): Likewise.
8942 (gdb_breakpoint_here): Return result directly instead
8943 of going through a local variable.
8945 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8946 (clear_gdb_breakpoint_conditions): Likewise.
8947 (add_breakpoint_condition): Likewise.
8948 (gdb_condition_true_at_breakpoint): Likewise.
8950 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8951 (need_step_over_p): Take target-side breakpoint condition into
8954 2012-02-24 Luis Machado <lgustavo@codesourcery>
8956 * server.h: Include tracepoint.h.
8957 (agent_mem_read, agent_get_trace_state_variable_value,
8958 agent_set_trace_state_variable_value,
8959 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8960 get_set_tsv_func_addr): New prototypes.
8962 * ax.h: New include file.
8963 * ax.c: New source file.
8965 * tracepoint.c: Include ax.h.
8966 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8967 agent_expr, eval_result_type): Move to ax.h.
8968 (parse_agent_expr): Rename to ...
8969 (gdb_parse_agent_expr): ... this, make it non-static and move
8971 (unparse_agent_expr) Rename to ...
8972 (gdb_unparse_agent_expr): ... this, make it non-static and move
8974 (eval_agent_expr): Rename to ...
8975 (eval_tracepoint_agent_expr): ... this.
8976 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8977 forward declarations.
8978 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8979 (agent_get_trace_state_variable_value): New function.
8980 (agent_set_trace_state_variable_value): New function.
8981 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8982 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8983 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8984 (condition_true_at_tracepoint): Likewise.
8985 (parse_agent_expr): Rename to ...
8986 (gdb_parse_agent_expr): ... this and move to ax.c.
8987 (unparse_agent_expr): Rename to ...
8988 (gdb_unparse_agent_expr): ... this and move to ax.c.
8989 (gdb_agent_op_name): Move to ax.c.
8990 (eval_agent_expr): Rename to ...
8991 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8993 (eval_tracepoint_agent_expr): New function.
8994 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8996 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8998 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8999 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9000 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9001 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9002 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9003 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9004 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9005 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9006 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9007 (compile_bytecodes): Remove forward declaration.
9008 (is_goto_target): Move to ax.c.
9009 (compile_bytecodes): Move to ax.c and call
9010 agent_get_trace_state_variable_value (...) and
9011 agent_set_trace_state_variable_value (...).
9013 * Makefile.in: Update ax.c and IPA dependencies.
9015 2012-02-24 Pedro Alves <palves@redhat.com>
9017 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9018 (cmd_bigqtbuffer_circular): ... this. Only handle
9019 'QTBuffer:circular:'.
9020 (handle_tracepoint_general_set): Adjust.
9022 2012-02-16 Yao Qi <yao@codesourcery.com>
9024 * inferiors.c: Move code to ...
9025 * dll.c: .... here. New.
9026 * server.h: Declare clear_dlls.
9027 * Makefile.in (SFILES): Add dll.c.
9031 2012-02-11 Yao Qi <yao@codesourcery.com>
9033 * server.c: (handle_monitor_command): Add a new parameter
9035 (handle_query): Update caller.
9037 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9039 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9040 * configure, config.in: Regenerate.
9041 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9044 2012-02-02 Pedro Alves <palves@redhat.com>
9046 Try SIGKILL first, then PTRACE_KILL.
9047 * linux-low.c (linux_kill_one_lwp): New.
9048 (linux_kill_one_lwp): Rename to ...
9049 (kill_one_lwp_callback): ... this. Use the new
9052 2012-02-02 Pedro Alves <palves@redhat.com>
9054 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9057 2012-01-27 Pedro Alves <palves@redhat.com>
9059 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9060 (elf_64_file_p): Make static.
9061 (linux_pid_exe_is_elf_64_file): New.
9062 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9063 Delete declarations.
9064 (linux_pid_exe_is_elf_64_file): Declare.
9065 * linux-x86-low.c (x86_arch_setup): Use
9066 linux_pid_exe_is_elf_64_file.
9068 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9070 * linux-low.c (linux_wait_for_event_1): Rename to ...
9071 (linux_wait_for_event): ... here and merge it with former
9072 linux_wait_for_event - new variable wait_ptid, use it.
9073 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9075 2012-01-23 Pedro Alves <palves@redhat.com>
9077 * server.c (main): Avoid yet another case of infinite loop while
9078 detaching/killing after a longjmp.
9080 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9083 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9085 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9087 * hostio.c (handle_readlink): New function.
9088 (handle_vFile): Call it to handle "vFile:readlink" packets.
9090 2012-01-20 Pedro Alves <palves@redhat.com>
9091 Ulrich Weigand <ulrich.weigand@linaro.org>
9093 * server.c (handle_v_requests): Only support vAttach and vRun to
9094 start multiple processes when in extended protocol mode.
9096 2012-01-17 Pedro Alves <palves@redhat.com>
9098 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9099 memalign plus mprotect to allocate the scratch buffer.
9101 2012-01-13 Pedro Alves <palves@redhat.com>
9103 * server.c (attach_inferior): Clear `cont_thread'.
9105 2012-01-13 Pedro Alves <palves@redhat.com>
9107 * server.c (main): Avoid infinite loop while detaching/killing
9110 2012-01-09 Doug Evans <dje@google.com>
9112 * server.c (start_inferior): Set last_ptid in --wrapper case.
9114 2012-01-06 Yao Qi <yao@codesourcery.com>
9116 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9118 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9120 2012-01-04 Yao Qi <yao@codesourcery.com>
9122 * tracepoint.c (cmd_qtdp): Print debug message
9123 for static tracepoint.
9125 2012-01-04 Yao Qi <yao@codesourcery.com>
9127 * tracepoint.c (trace_vdebug): Differentiate debug message
9128 between gdbserver and IPA.
9130 2012-01-03 Yao Qi <yao@codesourcery.com>
9132 * tracepoint.c (tracepoint_was_hit): Don't collect for
9135 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9137 * terminal.h: Reformat copyright header.
9139 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9141 * server.c (gdbserver_version): Update copyright year.
9142 * gdbreplay.c (gdbreplay_version): Likewise.
9144 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9146 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9149 2011-12-18 Hui Zhu <teawater@gmail.com>
9150 * linux-low.c (linux_create_inferior): Save return value to ret.
9152 2011-12-18 Hui Zhu <teawater@gmail.com>
9154 * linux-low.c (linux_create_inferior): Save return value to ret.
9156 2011-12-16 Doug Evans <dje@google.com>
9158 * linux-low.c (linux_create_inferior): If stdio connection,
9159 redirect stdin from /dev/null, stdout to stderr.
9160 * remote-utils.c (remote_is_stdio): New static global.
9161 (remote_connection_is_stdio): New function.
9162 (remote_prepare): Handle stdio connection.
9163 (remote_open): Ditto.
9164 (remote_close): Don't close stdin for stdio connections.
9165 (read_prim,write_prim): New functions. Replace all calls to
9166 read/write to these.
9167 * server.c (main): Watch for "-" argument. Move call to
9168 remote_prepare before start_inferior.
9169 * server.h (STDIO_CONNECTION_NAME): New macro.
9170 (remote_connection_is_stdio): Declare.
9172 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9173 in debugging output.
9175 2011-12-15 Yao Qi <yao@codesourcery.com>
9177 * tracepoint.c: Include sys/syscall.h.
9178 (gdb_ust_thread): Remove preprocessor conditional.
9180 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9182 * linux-low.c (linux_detach_one_lwp): Call
9183 the_low_target.prepare_to_resume before detaching.
9185 2011-12-14 Yao Qi <yao@codesourcery.com>
9187 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9190 2011-12-14 Yao Qi <yao@codesourcery.com>
9192 * i386-low.c (i386_low_stopped_data_address): Initialize local
9195 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9199 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9200 DR_CONTROL unless necessary. Extend comments.
9201 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9202 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9204 2011-12-13 Yao Qi <yao@codesourcery.com>
9206 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9208 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9210 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9212 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9213 Print new debug message for such case.
9215 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9217 Fix overlapping memcpy.
9218 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9219 the read_inferior_memory transfer.
9220 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9221 write_inferior_memory transfer.
9222 (set_fast_tracepoint_jump): New variable buf. Use it for the
9223 read_inferior_memory and write_inferior_memory transfers.
9224 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9225 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9226 Use it for the write_inferior_memory transfer.
9227 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9230 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9232 * linux-low.c (fetch_register, store_register): Make code
9233 consistent, fix formatting.
9235 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9237 * linux-low.c (usr_store_inferior_registers): Factor out code
9238 to handle individual registers into...
9239 (store_register): ... this new function.
9241 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9243 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9244 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9245 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9246 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9247 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9248 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9249 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9250 (srv_xmlfiles): Add new XML files.
9252 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9254 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9255 (init_registers_s390_linux32v1): Add prototype.
9256 (init_registers_s390_linux32v2): Likewise.
9257 (init_registers_s390_linux64v1): Likewise.
9258 (init_registers_s390_linux64v2): Likewise.
9259 (init_registers_s390x_linux64v1): Likewise.
9260 (init_registers_s390x_linux64v2): Likewise.
9261 (s390_num_regs): Increment to 52.
9262 (s390_regmap): Add orig_r2 register.
9263 (s390_num_regs_3264): Increment to 68.
9264 (s390_regmap_3264): Add orig_r2 register.
9265 (s390_collect_ptrace_register): Handle orig_r2 register.
9266 (s390_supply_ptrace_register): Likewise.
9267 (s390_fill_last_break): New function.
9268 (s390_store_last_break): Likewise.
9269 (s390_fill_system_call): New function.
9270 (s390_store_system_call): Likewise.
9271 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9273 (s390_check_regset): New function.
9274 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9275 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9276 Update target_regsets for available register sets.
9278 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9279 Jan Kratochvil <jan.kratochvil@redhat.com>
9281 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9282 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9284 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9285 * linux-low.h (struct process_info_private): New member r_debug.
9286 * server.c (handle_qxfer_libraries): Call
9287 the_target->qxfer_libraries_svr4.
9288 (handle_qxfer_libraries_svr4): New function.
9289 (qxfer_packets): New entry "libraries-svr4".
9290 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9291 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9292 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9293 PACKET_qXfer_libraries_svr4.
9295 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9297 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9298 PSW address/mask between 8-byte and 16-byte formats.
9299 (s390_supply_ptrace_register): Likewise.
9300 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9301 basic addressing mode bit.
9303 2011-11-24 Stan Shebs <stan@codesourcery.com>
9305 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9307 2011-11-17 Stan Shebs <stan@codesourcery.com>
9309 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9310 (tracing_start_time): New global.
9311 (tracing_stop_time): New global.
9312 (tracing_user_name): New global.
9313 (tracing_notes): New global.
9314 (tracing_stop_note): New global.
9315 (cmd_qtstart): Set traceframe_usage, start_time.
9316 (stop_tracing): Set stop_time.
9317 (cmd_qtstatus): Report additional status.
9318 (cmd_qtp): New function.
9319 (handle_tracepoint_query): Call it.
9320 (cmd_qtnotes): New function.
9321 (handle_tracepoint_general_set): Call it.
9322 (get_timestamp): Rename from tsv_get_timestamp.
9324 2011-11-14 Stan Shebs <stan@codesourcery.com>
9325 Kwok Cheung Yeung <kcy@codesourcery.com>
9327 * linux-x86-low.c (small_jump_insn): New.
9328 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9329 trampoline and error message, build a trampoline and issue a small
9330 jump instruction to it.
9331 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9332 trampoline and error message.
9333 (x86_get_min_fast_tracepoint_insn_len): New.
9334 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9335 * linux-low.h (struct linux_target_ops): Add arguments to
9336 install_fast_tracepoint_jump_pad operation, add new operation.
9337 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9339 (linux_get_min_fast_tracepoint_insn_len): New function.
9340 (linux_target_op): Add new operation.
9341 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9342 (gdb_trampoline_buffer_end): Ditto.
9343 (gdb_trampoline_buffer_error): Ditto.
9344 (struct ipa_sym_addresses): Add fields for new IPA variables.
9345 (symbol_list): Add entries for new IPA variables.
9346 (struct tracepoint): Add fields to hold the address range of the
9347 trampoline used by the tracepoint.
9348 (trampoline_buffer_head): New static variable.
9349 (trampoline_buffer_tail): Ditto.
9350 (claim_trampoline_space): New function.
9351 (have_fast_tracepoint_trampoline_buffer): New function.
9352 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9354 (install_fast_tracepoint): Ditto, also add error buffer argument.
9355 (cmd_qtminftpilen): New function.
9356 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9357 (fast_tracepoint_from_trampoline_address): New function.
9358 (fast_tracepoint_collecting): Handle trampoline as part of jump
9360 (set_trampoline_buffer_space): New function.
9361 (initialize_tracepoint): Initialize new IPA variables.
9362 * target.h (struct target_ops): Add arguments to
9363 install_fast_tracepoint_jump_pad operation, add new
9364 get_min_fast_tracepoint_insn_len operation.
9365 (target_get_min_fast_tracepoint_insn_len): New.
9366 (install_fast_tracepoint_jump_pad): Add arguments.
9367 * server.h (IPA_BUFSIZ): Define.
9368 * linux-i386-ipa.c: Include extra header files.
9369 (initialize_fast_tracepoint_trampoline_buffer): New function.
9370 (initialize_low_tracepoint): Call it.
9371 * server.h (set_trampoline_buffer_space): Declare.
9372 (claim_trampoline_space): Ditto.
9373 (have_fast_tracepoint_trampoline_buffer): Ditto.
9375 2011-11-14 Yao Qi <yao@codesourcery.com>
9377 * server.c (handle_query): Handle InstallInTrace for qSupported.
9378 * tracepoint.c (add_tracepoint): Sort list.
9379 (install_tracepoint, download_tracepoint): New.
9380 (cmd_qtdp): Call them to install and download tracepoints.
9381 (sort_tracepoints): Removed.
9382 (cmd_qtstart): Update.
9384 2011-11-14 Yao Qi <yao@codesourcery.com>
9386 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9387 * mem-break.h: Declare.
9388 * tracepoint.c (cmd_qtstart): Move some code to ...
9389 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9391 (download_tracepoints): Move some code to ...
9392 (download_tracepoint_1): ... here. New.
9394 2011-11-08 Yao Qi <yao@codesourcery.com>
9396 * remote-utils.c (relocate_instruction): A comment fix.
9398 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9400 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9401 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9402 dr_status_mirror and dr_control_mirror from debug_reg_state.
9403 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9404 (i386_initial_stuff): Remove use of deleted globals.
9405 (i386_get_thread_context, i386_set_thread_context,
9406 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9407 from debug_reg_state.
9409 2011-11-05 Yao Qi <yao@codesourcery.com>
9411 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9412 address as TPOINT's.
9414 2011-11-02 Stan Shebs <stan@codesourcery.com>
9416 * tracepoint.c (agent_mem_read_string): New function.
9417 (eval_agent_expr): Call it for tracenz.
9418 * server.c (handle_query): Report support for tracenz.
9420 2011-11-02 Yao Qi <yao@codesourcery.com>
9422 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9424 2011-11-02 Yao Qi <yao@codesourcery.com>
9426 * target.h: Fix a typo in comment.
9428 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9430 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9431 clobber the breakpoints' shadows with fast tracepoint jumps.
9432 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9433 * target.c (write_inferior_memory): Also pass MYADDR down to
9436 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9438 * configure.ac: Check support for personality routine.
9439 * configure: Regenerate.
9440 * config.in: Likewise.
9441 * linux-low.c: Include <sys/personality.h>.
9442 Define ADDR_NO_RANDOMIZE if necessary.
9443 (linux_create_inferior): Disable address space randomization when
9444 forking inferior, if requested.
9445 (linux_supports_disable_randomization): New function.
9446 (linux_target_ops): Install it.
9447 * server.h (disable_randomization): Declare.
9448 * server.c (disable_randomization): New global variable.
9449 (handle_general_set): Handle QDisableRandomization.
9450 (handle_query): Likewise for qSupported.
9451 (main): Support --disable-randomization and --no-disable-randomization
9452 command line arguments.
9453 * target.h (struct target_ops): Add supports_disable_randomization.
9454 (target_supports_disable_randomization): New macro.
9456 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9458 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9460 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9461 [!PT_GETDSBT] (target_loadmap): New definition.
9462 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9463 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9464 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9465 and PT_GETDSBT to LINUX_LOADMAP.
9466 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9467 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9469 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9471 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9472 (arm_linux_hwbp_cap): New static variable.
9473 (arm_linux_get_hwbp_cap): Replace by ...
9474 (arm_linux_init_hwbp_cap): ... this new function.
9475 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9476 (arm_linux_get_hw_watchpoint_count): Likewise.
9477 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9478 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9479 (arm_prepare_to_resume): Use perror_with_name instead of error.
9481 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9483 * linux-arm-low.c: Include <signal.h>.
9484 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9485 (struct arm_linux_hwbp_cap): New data type.
9486 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9487 (struct arm_linux_hw_breakpoint): New data type.
9488 (MAX_BPTS, MAX_WPTS): Define.
9489 (struct arch_process_info, struct arch_lwp_info): New data types.
9490 (arm_linux_get_hwbp_cap): New function.
9491 (arm_linux_get_hw_breakpoint_count): Likewise.
9492 (arm_linux_get_hw_watchpoint_count): Likewise.
9493 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9494 (arm_hwbp_control_initialize): Likewise.
9495 (arm_hwbp_control_is_enabled): Likewise.
9496 (arm_hwbp_control_is_initialized): Likewise.
9497 (arm_hwbp_control_disable): Likewise.
9498 (arm_linux_hw_breakpoint_equal): Likewise.
9499 (arm_linux_hw_point_initialize): Likewise.
9500 (struct update_registers_data): New data structure.
9501 (update_registers_callback: New function.
9502 (arm_insert_point): Likewise.
9503 (arm_remove_point): Likewise.
9504 (arm_stopped_by_watchpoint): Likewise.
9505 (arm_stopped_data_address): Likewise.
9506 (arm_new_process): Likewise.
9507 (arm_new_thread): Likewise.
9508 (arm_prepare_to_resume): Likewise.
9509 (the_low_target): Register arm_insert_point, arm_remove_point,
9510 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9511 arm_new_thread, and arm_prepare_to_resume.
9513 2011-09-15 Stan Shebs <stan@codesourcery.com>
9515 * server.h (struct emit_ops): Add compare-goto fields.
9516 * tracepoint.c (gdb_agent_op_sizes): New table.
9517 (emit_eq_goto): New function.
9518 (emit_ne_goto): New function.
9519 (emit_lt_goto): New function.
9520 (emit_le_goto): New function.
9521 (emit_gt_goto): New function.
9522 (emit_ge_goto): New function.
9523 (is_goto_target): New function.
9524 (compile_bytecodes): Recognize special cases of compare-goto
9525 combinations and call specialized emitters for them.
9526 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9527 (amd64_emit_ne_goto): New function.
9528 (amd64_emit_lt_goto): New function.
9529 (amd64_emit_le_goto): New function.
9530 (amd64_emit_gt_goto): New function.
9531 (amd64_emit_ge_goto): New function.
9532 (amd64_emit_ops): Add the new functions.
9533 (i386_emit_eq_goto): New function.
9534 (i386_emit_ne_goto): New function.
9535 (i386_emit_lt_goto): New function.
9536 (i386_emit_le_goto): New function.
9537 (i386_emit_gt_goto): New function.
9538 (i386_emit_ge_goto): New function.
9539 (i386_emit_ops): Add the new functions.
9541 2011-09-08 Stan Shebs <stan@codesourcery.com>
9543 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9544 (i386_emit_epilogue): Restore %ebx.
9546 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9548 * server.c (step_thread): Remove definition.
9549 (process_serial_event): Don't handle Hs.
9550 * server.h (step_thread): Remove declaration.
9551 * target.c (set_desired_inferior): Remove use of step_thread.
9553 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9555 * linux-low.c: Include linux-procfs.h.
9556 (linux_attach_lwp_1): Update comments.
9557 (linux_attach): Scan for existing threads when attaching to a
9558 process that is the tgid.
9559 * Makefile.in: Update dependencies.
9561 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9563 * configure.srv: Add linux-procfs.o dependencies.
9565 2011-08-14 Yao Qi <yao@codesourcery.com>
9567 * target.h (struct target_ops): Fix indent.
9568 * win32-low.c (win32_target_ops): Fix comment.
9570 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9571 Yao Qi <yao@codesourcery.com>
9573 * Makefile.in (clean): Remove tic6x-*.c files.
9574 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9575 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9576 (tic6x-c64xp-linux.c): Likewise.
9577 * configure.srv: Add support for tic6x-*-uclinux.
9578 * linux-tic6x-low.c: New.
9579 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9581 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9582 Yao Qi <yao@codesourcery.com>
9584 * target.h (struct target_ops): Add read_loadmap.
9585 * linux-low.c (struct target_loadseg): New type.
9586 (struct target_loadmap): New type.
9587 (linux_read_loadmap): New function.
9588 (linux_target_ops): Add linux_read_loadmap.
9589 * server.c (handle_query): Support qXfer:fdpic:read packet.
9590 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9593 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9595 * win32-low.c: Include <stdint.h>.
9597 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9599 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9600 to the inferior here.
9601 (i386_remove_aligned_watchpoint): Ditto.
9602 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9603 fit part of the watchpoint in the debug registers.
9604 (i386_update_inferior_debug_regs): New.
9605 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9606 registers, and only update the inferior on success.
9607 (i386_low_remove_watchpoint): Ditto.
9609 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9611 * linux-low.c (compare_ints, unique, list_threads, show_process,
9612 linux_core_of_thread): Delete.
9613 (linux_target_ops): Change linux_core_of_thread to
9614 linux_common_core_of_thread.
9615 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9616 * utils.c (malloc_failure): Change type of argument.
9617 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9618 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9619 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9620 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9621 (IPA_OBJS): Add common-utils-ipa.o.
9622 (ptid_h, linux_osdata_h): New macros.
9623 (server_h): Add common/common-utils.h, common/xml-utils.h,
9624 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9626 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9627 ptid.o, buffer.o): New rules.
9628 (linux-low.o): Add common/linux-osdata.h as a dependency.
9629 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9630 * configure.ac: Add AC_HEADER_DIRENT check.
9631 * config.in: Regenerate.
9632 * configure: Regenerate.
9633 * remote-utils.c (xml_escape_text): Delete.
9634 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9635 buffer_xml_printf): Move to common/buffer.c.
9636 * server.c (main): Remove call to initialize_inferiors.
9637 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9638 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9639 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9640 internal_error, gdb_assert, gdb_assert_fail): Delete.
9641 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9642 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9644 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9645 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9646 initialize_inferiors): Delete.
9648 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9650 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9653 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9655 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9657 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9659 2011-05-26 Yao Qi <yao@codesourcery.com>
9661 * Makefile.in (thread-db.o): Track dependence to
9662 common/gdb_thread_db.h.
9663 * thread-db.c: include gdb_thread_db.h from right place.
9665 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9667 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9668 __FILE__ and __LINE__ to internal_error.
9670 2011-05-13 Doug Evans <dje@google.com>
9672 * thread-db.c (try_thread_db_load_from_sdir): New function.
9673 (try_thread_db_load_from_dir): New function.
9674 (thread_db_load_search): Handle $sdir, ignore $pdir.
9675 Remove trying of system directories if search of
9676 libthread-db-search-path fails, that is now done via $sdir.
9678 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9680 * server.c (handle_query): Add EnableDisableTracepoints to the list
9681 of supported features.
9682 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9684 (cmd_qtenable_disable): New.
9685 (cmd_qtstart): Install tracepoints even if disabled.
9686 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9687 receiving a QTEnable or QTDisable packet.
9688 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9689 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9691 (gdb_probe): Skip data collection if static tracepoint is disabled.
9693 2011-05-10 Doug Evans <dje@google.com>
9695 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9697 2011-05-04 Doug Evans <dje@google.com>
9699 * linux-low.c (linux_join): Skip process lookup.
9700 * spu-low.c (spu_join): Ditto.
9701 * server.c (join_inferiors_callback): Delete.
9702 (process_serial_event): For 'D' packet (detach) call join_inferior
9705 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9707 * README: Don't mention xscale*-*-linux*.
9708 * configure.srv (xscale*-*-linux*): Don't handle target.
9710 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9712 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9714 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9715 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9716 (i386_emit_void_call_2): Likewise.
9718 2011-04-26 Yao Qi <yao@codesourcery.com>
9720 * linux-low.c: Move common macros to linux-ptrace.h.
9721 Include linux-ptrace.h.
9722 * Makefile.in (linux_ptrace_h): New.
9723 (linux-low.o): Depends on linux-ptrace.h.
9725 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9727 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9728 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9729 (remote_prepare): New function with most of the TCP code from ...
9730 (remote_open): ... here. Detect PORT here unconditionally. Move also
9731 setting transport_is_reliable.
9732 * server.c (run_once): New variable.
9733 (gdbserver_usage): Document it.
9734 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9735 the first run if RUN_ONCE.
9736 * server.h (run_once, remote_prepare): New declarations.
9738 2011-04-19 Tom Tromey <tromey@redhat.com>
9740 * win32-low.c (handle_load_dll): Remove duplicate "the".
9742 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9744 Remove support for old Cygwin 1.5 versions.
9745 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9746 function to avoid warning.
9747 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9750 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9752 * gdbserver/server.h (Macro _): Define it if not available.
9754 2011-03-14 Michael Snyder <msnyder@vmware.com>
9756 * hostio.c (handle_close): Remove unnecessary null test.
9758 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9760 * Makefile.in (maintainer-clean realclean distclean): Remove
9761 "make ... subdir_do" command.
9763 2011-03-10 Michael Snyder <msnyder@vmware.com>
9765 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9767 * server.c (handle_v_run): Free alloced buffer on early return.
9769 2011-03-09 Yao Qi <yao@codesourcery.com>
9772 2011-03-04 Yao Qi <yao@codesourcery.com>
9774 * Makefile.in: Remove GNU make feature --directory.
9776 2011-03-05 Yao Qi <yao@codesourcery.com>
9778 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9779 (subdir_do): New make target. Copied from gdb/Makefile.
9780 (maintainer-clean, realclean, distclean, clean): Call corresponding
9781 make targets in common/Makefile.
9783 2011-02-11 Yao Qi <yao@codesourcery.com>
9785 * configure.ac: Call AC_PROG_RANLIB.
9786 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9787 * configure: Regenerate.
9789 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9791 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9793 2011-03-06 Yao Qi <yao@codesourcery.com>
9795 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9797 2011-03-05 Yao Qi <yao@codesourcery.com>
9799 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9800 (subdir_do): New make target. Copied from gdb/Makefile.
9801 (maintainer-clean, realclean, distclean, clean): Call corresponding
9802 make targets in common/Makefile.
9804 2011-03-04 Yao Qi <yao@codesourcery.com>
9806 * Makefile.in: Remove GNU make feature --directory.
9808 2011-03-04 Michael Snyder <msnyder@vmware.com>
9810 * server.c (queue_stop_reply): Call xmalloc not malloc.
9812 2011-03-02 Michael Snyder <msnyder@vmware.com>
9814 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9816 2011-02-28 Michael Snyder <msnyder@vmware.com>
9818 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9819 (cmd_qtframe): Ditto.
9820 (cmd_qtbuffer): Ditto.
9821 (cmd_bigqtbuffer): Ditto.
9823 * utils.c (decimal2str): Initialize 'width' to nine, then
9826 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9828 * hostio.c (require_data): Free *data, not data.
9830 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9832 * hostio.c (require_data): Use free, not xfree.
9834 2011-02-27 Michael Snyder <msnyder@vmware.com>
9836 * server.c (handle_query): Discard unused value.
9838 * hostio.c (require_data): Free malloc memory before returning
9841 2011-02-26 Michael Snyder <msnyder@vmware.com>
9843 * linux-low.c (list_threads): Call closedir for dirent.
9845 2011-02-27 Michael Snyder <msnyder@vmware.com>
9847 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9848 a case statement falls through.
9850 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9852 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9855 2011-02-26 Michael Snyder <msnyder@vmware.com>
9857 * utils.c (decimal2str): Eliminate dead code and dead param.
9858 (pulongest): Drop dead param from call to decimal2str.
9861 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9863 Revert the following patch (not approved yet):
9864 2011-02-21 Hui Zhu <teawater@gmail.com>
9865 * tracepoint.c (tp_printf): New function.
9866 (eval_agent_expr): Handle gdb_agent_op_printf.
9868 2011-02-21 Hui Zhu <teawater@gmail.com>
9870 * tracepoint.c (tp_printf): New function.
9871 (eval_agent_expr): Handle gdb_agent_op_printf.
9873 2011-02-18 Tom Tromey <tromey@redhat.com>
9875 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9876 (tracepoint.o): Likewise.
9877 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9878 (gdb_agent_op_names): Likewise.
9880 2011-02-18 Tom Tromey <tromey@redhat.com>
9882 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9883 gdb_agent_op_rot>: New constants.
9884 (gdb_agent_op_names): Add pick and roll.
9885 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9888 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9890 * aclocal.m4: Regenerated with aclocal-1.11.1.
9892 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9894 * server.c (handle_qxfer_traceframe_info): New.
9895 (qxfer_packets): Register "traceframe-info".
9896 (handle_query): Report support for qXfer:traceframe-info:read+.
9897 * tracepoint.c (match_blocktype): New.
9898 (traceframe_find_block_type): Rename to ...
9899 (traceframe_walk_blocks): ... this. Add callback filter argument,
9901 (traceframe_find_block_type): New, reimplemented on top of
9902 traceframe_walk_blocks.
9903 (build_traceframe_info_xml): New.
9904 (traceframe_read_info): New.
9905 * server.h (traceframe_read_info): Declare.
9907 2011-02-11 Yao Qi <yao@codesourcery.com>
9909 * configure.ac: Call AC_PROG_RANLIB.
9910 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9911 * configure: Regenerate.
9913 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9915 * server.c (gdb_read_memory): Change return semantics to allow
9917 (handle_search_memory_1): Adjust.
9918 (process_serial_event) <'m' packet>: Handle partial transfers.
9919 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9921 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9923 * regcache.c (init_register_cache): Initialize
9924 regcache->register_status.
9925 (free_register_cache): Release regcache->register_status.
9926 (regcache_cpy): Copy register_status.
9927 (registers_to_string): Print 'x's for unavailable registers.
9928 (supply_register): Mark the register's status valid or
9929 unavailable, depending on whether a buffer was passed in or not.
9930 (supply_register_zeroed): New.
9931 (supply_regblock): Mark the registers' status valid or
9932 unavailable, depending on whether a buffer was passed in or not.
9933 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9934 (struct regcache): New `register_status' field.
9935 (supply_register_zeroed): Declare.
9936 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9937 supply_register_zeroed, rather than passing a NULL buffer to
9939 * tracepoint.c (fetch_traceframe_registers): Update comment.
9941 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9943 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9946 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9948 * server.h (decode_xfer_write): Change prototype.
9949 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9950 and don't extract the annex here.
9951 * server.c (decode_xfer_read): Remove `annex' parameter,
9952 and don't extract the annex here.
9954 (struct qxfer): New.
9955 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9956 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9957 (handle_qxfer_statictrace): New functions, abstracted out from
9958 handle_query, and made to use the struct qxfer interface.
9959 (handle_threads_qxfer_proper): Rename to ...
9960 (handle_qxfer_threads_proper): ... this.
9961 (handle_threads_qxfer): Rename to ...
9962 (handle_qxfer_threads): ... this. Adjust.
9963 (qxfer_packets): New array.
9964 (handle_qxfer): New function.
9965 (handle_query): Use handle_qxfer.
9967 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9969 * gdbreplay.c: Shorten lines of >= 80 columns.
9970 * linux-low.c: Ditto.
9971 * linux-ppc-low.c: Ditto.
9972 * linux-s390-low.c: Ditto.
9973 * linux-sparc-low.c: Ditto.
9974 * linux-x86-low.c: Ditto.
9975 * linux-xtensa-low.c: Ditto.
9976 * mem-break.c: Ditto.
9978 * regcache.h: Ditto.
9979 * remote-utils.c: Ditto.
9982 * thread-db.c: Ditto.
9983 * tracepoint.c: Ditto.
9985 * win32-low.h: Ditto.
9987 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9989 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9992 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9994 * server.c (gdbserver_version): Update copyright year in version
9996 * gdbreplay.c (gdbreplay_version): Ditto.
9998 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10000 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10001 * linux-bfin-low.c: New file.
10002 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10003 PT_DATA_ADDR for BFIN targets.
10004 * Makefile.in (SFILES): Add linux-bfin-low.c.
10005 (clean): Remove reg-bfin.c.
10006 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10007 * README: Mention supported Blackfin targets.
10009 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10011 * .gitignore: New file.
10013 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10015 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10017 2010-10-22 Jie Zhang <jie@codesourcery.com>
10019 * Makefile.in: Add FLAGS_TO_PASS variable.
10020 (install): Remove dependency of install-only and recursively
10021 invoke make for install-only.
10023 2010-10-04 Doug Evans <dje@google.com>
10025 * Makefile.in (uninstall): Use $(DESTDIR).
10027 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10031 * linux-x86-low.c (compat_siginfo_from_siginfo)
10032 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10033 si_code is < 0. Check for si_code == SI_TIMER before checking for
10036 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10038 * lynx-i386-low.c: New file.
10039 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10041 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10043 * lynx-low.c (ptrace_request_to_str): Remove handling for
10044 request values that have been removed in LynxOS 5.x.
10046 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10048 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10051 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10053 * configure.ac: Add --enable-inprocess-agent option.
10054 * configure: Rebuilt.
10056 2010-09-06 Yao Qi <yao@codesourcery.com>
10058 * linux-low.c (linux_kill): Remove unused variable.
10059 (linux_stabilize_threads): Likewise.
10060 * server.c (start_inferior): Likewise.
10061 (queue_stop_reply_callback): Likewise.
10062 * tracepoint.c (do_action_at_tracepoint): Likewise.
10064 2010-09-06 Yao Qi <yao@codesourcery.com>
10066 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10069 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10071 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10073 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10075 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10078 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10080 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10081 gdbserver/lynx-ppc-low.c: New files.
10082 * Makefile.in (lynx_low_h): New variable.
10083 (lynx-low.o, lynx-ppc-low.o): New rules.
10084 * configure.ac: On LynxOS, link with -lnetinet.
10085 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10086 * configure: regenerate.
10088 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10090 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10091 * configure.ac: Add check for vasprintf and vsnprintf.
10092 * configure, config.in: Regenerate.
10093 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10095 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10097 * gdbreplay.c: Move include of alloca.h up, next to include of
10099 * server.h: Add include of malloc.h.
10100 * mem-break.c: Remove include of malloc.h.
10101 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10103 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10105 * Makefile.in (memmem.o): Build with -Wno-error.
10107 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10109 * utils.c (xsnprintf): Make non-static.
10110 * server.h: Add xsnprintf declaration.
10111 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10112 replace calls to snprintf by calls to xsnprintf throughout.
10114 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10116 * configure.ac: Add configure check for alloca.
10117 * configure, config.in: Regenerate.
10118 * server.h: Include alloca.h if it exists.
10119 * gdbreplay.c: Include alloca.h if it exists.
10121 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10123 * linux-low.c (__SIGRTMIN): Define if not already defined.
10124 (linux_create_inferior): Check for __ANDROID__ rather than
10126 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10127 are already deferred.
10128 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10129 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10130 stopped and already has a pending signal to report.
10131 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10132 a pending signal to report or is moving out of a jump pad.
10133 (linux_init_signals): Check for __ANDROID__ rather than
10136 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10138 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10139 debug_threads check. Avoid a linear search when not doing debug
10142 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10144 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10145 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10146 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10147 (process_event): Change local fd's type to gdb_fildes_t.
10148 (create_file_handler): Adjust prototype.
10149 (delete_file_handler): Adjust prototype.
10150 (handle_file_event): Adjust prototype. Use pfildes.
10151 (create_file_event): Adjsut prototype.
10152 * remote-utils.c (remote_desc, listen_desc): Change type to
10154 * server.h: New gdb_fildes_t typedef.
10155 [USE_WIN32API]: Include winsock2.h.
10156 (delete_file_handler, add_file_handler): Adjust prototypes.
10157 (pfildes): Declare.
10158 * utils.c (pfildes): New.
10160 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10162 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10163 * configure: Regenerate.
10165 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10167 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10168 (linux_done_accessing_memory): ... this.
10169 (linux_target_ops): Adjust.
10170 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10171 * nto-low.c (nto_target_ops): Adjust comment.
10172 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10173 * spu-low.c (spu_target_ops): Adjust comment.
10174 * target.h (target_ops): Rename unprepare_to_access_memory field
10175 to done_accessing_memory.
10176 (unprepare_to_access_memory): Rename to ...
10177 (done_accessing_memory): ... this.
10179 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10181 * linux-low.c (linux_prepare_to_access_memory): New.
10182 (linux_unprepare_to_access_memory): New.
10183 (linux_target_ops): Install them.
10184 * server.c (read_memory): Rename to ...
10185 (gdb_read_memory): ... this. Use
10186 prepare_to_access_memory/prepare_to_access_memory.
10187 (write_memory): Rename to ...
10188 (gdb_write_memory): ... this. Use
10189 prepare_to_access_memory/prepare_to_access_memory.
10190 (handle_search_memory_1): Adjust.
10191 (process_serial_event): Adjust.
10192 * target.h (struct target_ops): New fields
10193 prepare_to_access_memory and unprepare_to_access_memory.
10194 (prepare_to_access_memory, unprepare_to_access_memory): New.
10195 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10196 prepare_to_access_memory/prepare_to_access_memory.
10197 * nto-low.c (nto_target_ops): Adjust.
10198 * spu-low.c (spu_target_ops): Adjust.
10199 * win32-low.c (win32_target_ops): Adjust.
10201 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10203 * Makefile.in (WARN_CFLAGS): Get it from configure.
10204 (WERROR_CFLAGS): New.
10205 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10206 * configure.ac: Introduce --enable-werror, which adds -Werror to
10207 the compiler command line. Enabled by default. Disable with
10208 --disable-werror. Add -Wdeclaration-after-statement
10209 Wpointer-arith and -Wformat-nonliteral to warning flags.
10210 * configure: Regenerate.
10212 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10214 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10216 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10218 * gdbreplay.c (remote_error): New.
10220 (expect): Use gdbchar. Check for error reading from GDB.
10221 Clarify sync error output.
10222 (play): Check for errors writing to GDB.
10223 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10224 * remote-utils.c (getpkt): Check for errors writing to the remote
10227 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10229 * linux-low.c (linux_wait_1): Move non-debugging code out of
10230 `debug_threads' control.
10232 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10234 * linux-low.c (linux_wait_1): Don't set last_status here.
10235 * server.c (push_event, queue_stop_reply_callback): Assert we're
10236 not pushing a TARGET_WAITKIND_IGNORE event.
10237 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10238 (myresume, handle_target_event): Set the thread's last_resume_kind
10239 and last_status from the target returned status.
10241 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10245 * linux-x86-low.c (update_debug_registers_callback): New.
10246 (i386_dr_low_set_addr): Use it.
10247 (i386_dr_low_get_addr): New.
10248 (i386_dr_low_set_control): Use update_debug_registers_callback.
10249 (i386_dr_low_get_control): New.
10250 (i386_dr_low_get_status): Adjust.
10251 * linux-low.c (linux_stop_lwp): New.
10252 * linux-low.h (linux_stop_lwp): Declare.
10254 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10255 argument instead of a i386_debug_reg_state.
10256 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10257 a i386_debug_reg_state.
10258 (i386_insert_aligned_watchpoint): Adjust.
10259 (i386_remove_aligned_watchpoint): Adjust.
10260 (i386_low_stopped_data_address): Read the debug registers from the
10261 inferior instead of from the mirrors.
10262 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10263 (i386_dr_low_get_addr): Declare.
10264 (i386_dr_low_get_control): Declare.
10265 (i386_dr_low_get_status): Change prototype.
10267 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10268 (i386_dr_low_get_addr): New.
10269 (i386_dr_low_get_control): New.
10270 (i386_dr_low_get_status): Adjust prototype. Return
10272 (i386_initial_stuff): Clear dr_status_mirror and
10274 (i386_get_thread_context): Adjust.
10275 (i386_set_thread_context): Adjust.
10276 (i386_thread_added): Adjust.
10278 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10280 * linux-low.h (linux_thread_area): Delete declaration.
10282 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10284 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10285 after its termination.
10287 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10289 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10290 (gdb_wants_all_stopped): Delete.
10291 (linux_wait_1): Don't call them.
10292 * server.c (handle_v_cont): Tag all threads as want-stopped.
10293 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10294 stopped as "client-wants-stopped".
10296 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10298 * Makefile.in (signals_h): New.
10299 (server_h): Depend on it.
10300 (server.o): Don't depend on $(signals_def).
10301 (signals.o): Depend on $(signals_def).
10303 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10305 * Makefile.in (signals_def): New.
10306 (server_h): Append include/gdb/signals.h and signals_def.
10307 (server.o): Append signals_def.
10309 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10311 * server.c (handle_target_event): Use target_signal_to_host for
10312 resume_info.sig initialization.
10313 * target.h (struct thread_resume) <sig>: New comment.
10315 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10317 * server.c (handle_query): strcpy() the returned string from paddress()
10318 instead of sprintf().
10319 * utils.c (paddress): Return phex_nz().
10321 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10323 * server.c (handle_v_cont): Call mourn_inferior if process
10325 (myresume): Likewise.
10327 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10329 Static tracepoints, and integration with UST.
10331 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10332 * mem-break.c (uninsert_all_breakpoints)
10333 (reinsert_all_breakpoints): New.
10334 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10335 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10336 (gdb_agent_ust_loaded, helper_thread_id)
10337 (gdb_agent_helper_thread_id): New macros.
10338 (struct ipa_sym_addresses): Add addr_ust_loaded,
10339 addr_helper_thread_id, addr_cmd_buf.
10340 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10341 (in_process_agent_loaded_ust): New.
10342 (write_e_ust_not_loaded): New.
10343 (maybe_write_ipa_ust_not_loaded): New.
10344 (struct collect_static_trace_data_action): New.
10345 (enum tracepoint_type) <static_tracepoint>: New.
10346 (struct tracepoint) <handle>: Mention static tracepoints.
10347 (struct static_tracepoint_ctx): New.
10348 (CMD_BUF_SIZE): New.
10349 (add_tracepoint_action): Handle static tracepoint actions.
10350 (unprobe_marker_at): New.
10351 (clear_installed_tracepoints): Handle static tracepoints.
10352 (cmd_qtdp): Handle static tracepoints.
10353 (probe_marker_at): New.
10354 (cmd_qtstart): Handle static tracepoints.
10355 (response_tracepoint): Handle static tracepoints.
10356 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10357 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10358 (get_context_regcache): Handle static tracepoints.
10359 (do_action_at_tracepoint): Handle static tracepoint actions.
10360 (traceframe_find_block_type): Handle static trace data blocks.
10361 (traceframe_read_sdata): New.
10362 (download_tracepoints): Download static tracepoint actions.
10363 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10364 (GDB_PROBE_NAME): New.
10366 (GET_UST_SYM): New.
10369 (ust_marker_to_static_tracepoint): New.
10371 (collect_ust_data_at_tracepoint): New.
10372 (gdb_ust_probe): New.
10373 (UNIX_PATH_MAX, SOCK_DIR): New.
10374 (gdb_ust_connect_sync_socket): New.
10375 (resume_thread, stop_thread): New.
10376 (run_inferior_command): New.
10377 (init_named_socket): New.
10378 (gdb_ust_socket_init): New.
10379 (cstr_to_hexstr): New.
10381 (first_marker, next_marker): New.
10382 (response_ust_marker): New.
10383 (cmd_qtfstm, cmd_qtsstm): New.
10384 (unprobe_marker_at, probe_marker_at): New.
10385 (cmd_qtstmat, gdb_ust_thread): New.
10386 (gdb_ust_init): New.
10387 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10388 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10389 (ST_REGENTRY): New.
10390 (x86_64_st_collect_regmap): New.
10391 (X86_64_NUM_ST_COLLECT_GREGS): New.
10392 (AMD64_RIP_REGNUM): New.
10393 (supply_static_tracepoint_registers): New.
10394 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10395 (ST_REGENTRY): New.
10396 (i386_st_collect_regmap): New.
10397 (i386_NUM_ST_COLLECT_GREGS): New.
10398 (supply_static_tracepoint_registers): New.
10399 * server.c (handle_query): Handle qXfer:statictrace:read.
10400 <qSupported>: Report support for StaticTracepoints, and
10401 qXfer:statictrace:read features.
10402 * server.h (traceframe_read_sdata)
10403 (supply_static_tracepoint_registers): Declare.
10404 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10405 (unpack_varlen_hex): Include in IPA build.
10406 * Makefile.in (ustlibs, ustinc): New.
10407 (IPA_OBJS): Add remote-utils-ipa.o.
10408 ($(IPA_LIB)): Link -ldl and -lpthread.
10410 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10411 * config.in, configure: Regenerate.
10413 2010-06-20 Ian Lance Taylor <iant@google.com>
10414 Pedro Alves <pedro@codesourcery.com>
10416 * linux-x86-low.c (always_true): Delete.
10417 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10418 trying to fool the compiler with always_true.
10420 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10422 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10423 conditions in gdbserver.
10425 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10427 * spu-low.c (spu_read_memory): Wrap around local store limit.
10428 (spu_write_memory): Likewise.
10430 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10432 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10433 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10435 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10437 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10438 uses with LONGEST uses.
10440 2010-06-14 Stan Shebs <stan@codesourcery.com>
10441 Pedro Alves <pedro@codesourcery.com>
10445 * linux-x86-low.c: Include limits.h.
10447 (always_true): New.
10450 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10451 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10452 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10453 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10454 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10455 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10456 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10457 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10458 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10459 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10460 (amd64_emit_void_call_2): New.
10461 (amd64_emit_ops): New.
10462 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10463 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10464 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10465 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10466 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10467 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10468 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10469 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10470 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10471 (i386_emit_stack_adjust, i386_emit_int_call_1)
10472 (i386_emit_void_call_2): New.
10473 (i386_emit_ops): New.
10474 (x86_emit_ops): New.
10475 (the_low_target): Install x86_emit_ops.
10476 * server.h (struct emit_ops): New.
10477 (get_raw_reg_func_addr): Declare.
10478 (current_insn_ptr, emit_error): Declare.
10479 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10480 (set_trace_state_variable_value): New defines.
10481 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10482 addr_get_trace_state_variable_value and
10483 addr_set_trace_state_variable_value.
10484 (symbol_list): New fields for get_raw_reg,
10485 get_trace_state_variable_value and set_trace_state_variable_value.
10486 (condfn): New typedef.
10487 (struct tracepoint): New field `compiled_cond'.
10488 (do_action_at_tracepoint): Clear compiled_cond.
10489 (get_trace_state_variable_value, set_trace_state_variable_value):
10491 (condition_true_at_tracepoint): If there's a compiled condition,
10493 (current_insn_ptr, emit_error): New globals.
10494 (struct bytecode_address): New.
10495 (get_raw_reg_func_addr): New.
10496 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10497 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10498 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10499 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10500 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10501 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10502 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10503 (compile_tracepoint_condition, compile_bytecodes): New.
10504 * target.h (emit_ops): Forward declare.
10505 (struct target_ops): New field emit_ops.
10506 (target_emit_ops): New.
10507 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10508 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10509 * linux-low.c (linux_emit_ops): New.
10510 (linux_target_ops): Install it.
10511 * linux-low.h (struct linux_target_ops): New field emit_ops.
10513 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10515 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10516 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10518 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10519 Stan Shebs <stan@codesourcery.com>
10521 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10522 (all): Depend on $(extra_libraries).
10523 (install-only): Install the IPA.
10524 (IPA_OBJS, IPA_LIB): New.
10525 (clean): Remove the IPA lib.
10526 (IPAGENT_CFLAGS): New.
10527 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10528 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10529 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10530 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10531 * configure.ac: Check for atomic builtins support in the compiler.
10532 (IPA_DEPFILES, extra_libraries): Define.
10533 * configure.srv (ipa_obj): Add description.
10534 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10535 (i[34567]86-*-linux*): Set ipa_obj.
10536 (x86_64-*-linux*): Set ipa_obj.
10537 * linux-low.c (stabilizing_threads): New.
10538 (supports_fast_tracepoints): New.
10539 (linux_detach): Stabilize threads before detaching.
10540 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10541 the lwp is either not stabilizing, or is moving out of a jump pad.
10542 (linux_fast_tracepoint_collecting): New.
10543 (maybe_move_out_of_jump_pad): New.
10544 (enqueue_one_deferred_signal): New.
10545 (dequeue_one_deferred_signal): New.
10546 (linux_wait_for_event_1): If moving out of a jump pad, defer
10547 pending signals to later.
10548 (linux_stabilize_threads): New.
10549 (linux_wait_1): Check if threads need moving out of jump pads, and
10551 (stuck_in_jump_pad_callback): New.
10552 (move_out_of_jump_pad_callback): New.
10553 (lwp_running): New.
10554 (linux_resume_one_lwp): Handle moving out of jump pads.
10555 (linux_set_resume_request): Dequeue deferred signals.
10556 (need_step_over_p): Also step over fast tracepoint jumps.
10557 (start_step_over): Also uninsert fast tracepoint jumps.
10558 (finish_step_over): Also reinsert fast tracepoint jumps.
10559 (linux_install_fast_tracepoint_jump): New.
10560 (linux_target_ops): Install linux_stabilize_threads and
10561 linux_install_fast_tracepoint_jump_pad.
10562 * linux-low.h (linux_target_ops) <get_thread_area,
10563 install_fast_tracepoint_jump_pad>: New fields.
10564 (struct lwp_info) <collecting_fast_tracepoint,
10565 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10566 (linux_get_thread_area): Declare.
10567 * linux-x86-low.c (jump_insn): New.
10568 (x86_get_thread_area): New.
10569 (append_insns): New.
10570 (push_opcode): New.
10571 (amd64_install_fast_tracepoint_jump_pad): New.
10572 (i386_install_fast_tracepoint_jump_pad): New.
10573 (x86_install_fast_tracepoint_jump_pad): New.
10574 (the_low_target): Install x86_get_thread_area and
10575 x86_install_fast_tracepoint_jump_pad.
10576 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10577 (struct fast_tracepoint_jump): New.
10578 (fast_tracepoint_jump_insn): New.
10579 (fast_tracepoint_jump_shadow): New.
10580 (find_fast_tracepoint_jump_at): New.
10581 (fast_tracepoint_jump_here): New.
10582 (delete_fast_tracepoint_jump): New.
10583 (set_fast_tracepoint_jump): New.
10584 (uninsert_fast_tracepoint_jumps_at): New.
10585 (reinsert_fast_tracepoint_jumps_at): New.
10586 (set_breakpoint_at): Use write_inferior_memory.
10587 (uninsert_raw_breakpoint): Use write_inferior_memory.
10588 (check_mem_read): Mask out fast tracepoint jumps.
10589 (check_mem_write): Mask out fast tracepoint jumps.
10590 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10591 (set_fast_tracepoint_jump): Declare.
10592 (delete_fast_tracepoint_jump)
10593 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10594 (reinsert_fast_tracepoint_jumps_at): Declare.
10595 * regcache.c: Don't compile many functions when building the
10596 in-process agent library.
10597 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10598 the register buffer in the heap.
10599 (free_register_cache): If the register buffer isn't owned by the
10600 regcache, don't free it.
10601 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10602 pre-existing register caches.
10603 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10605 (convert_ascii_to_int): : Constify `from' parameter type.
10606 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10607 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10608 the needed buffer in-place.
10609 (relocate_instruction): New.
10610 * server.c (handle_query) <qSymbols>: If the target supports
10611 tracepoints, give it a chance of looking up symbols. Report
10612 support for fast tracepoints.
10613 (handle_status): Stabilize threads.
10614 (process_serial_event): Adjust.
10615 * server.h (struct fast_tracepoint_jump): Forward declare.
10616 (struct process_info) <fast_tracepoint_jumps>: New field.
10617 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10618 (decode_X_packet, decode_M_packet): Adjust.
10619 (relocate_instruction): Declare.
10620 (in_process_agent_loaded): Declare.
10621 (tracepoint_look_up_symbols): Declare.
10622 (struct fast_tpoint_collect_status): Declare.
10623 (fast_tracepoint_collecting): Declare.
10624 (force_unlock_trace_buffer): Declare.
10625 (handle_tracepoint_bkpts): Declare.
10626 (initialize_low_tracepoint)
10627 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10628 * target.h (struct target_ops) <stabilize_threads,
10629 install_fast_tracepoint_jump_pad>: New fields.
10630 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10631 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10632 [HAVE_STDINT_H]: Include stdint.h.
10633 (trace_debug_1): Rename to ...
10634 (trace_vdebug): ... this.
10635 (trace_debug): Rename to ...
10636 (trace_debug_1): ... this. Add `level' parameter.
10637 (trace_debug): New.
10638 (ATTR_USED, ATTR_NOINLINE): New.
10639 (IP_AGENT_EXPORT): New.
10640 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10641 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10642 (about_to_request_buffer_space, trace_buffer_is_full)
10643 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10644 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10645 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10646 (traceframe_write_count, traceframes_created)
10647 (trace_state_variables)
10648 New renaming defines.
10649 (struct ipa_sym_addresses): New.
10650 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10651 (symbol_list): New.
10652 (ipa_sym_addrs): New.
10653 (all_tracepoint_symbols_looked_up): New.
10654 (in_process_agent_loaded): New.
10655 (write_e_ipa_not_loaded): New.
10656 (maybe_write_ipa_not_loaded): New.
10657 (tracepoint_look_up_symbols): New.
10658 (debug_threads) [IN_PROCESS_AGENT]: New.
10659 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10660 (UNKNOWN_SIDE_EFFECTS): New.
10661 (stop_tracing): New.
10662 (flush_trace_buffer): New.
10663 (stop_tracing_bkpt): New.
10664 (flush_trace_buffer_bkpt): New.
10665 (read_inferior_integer): New.
10666 (read_inferior_uinteger): New.
10667 (read_inferior_data_pointer): New.
10668 (write_inferior_data_pointer): New.
10669 (write_inferior_integer): New.
10670 (write_inferior_uinteger): New.
10671 (struct collect_static_trace_data_action): Delete.
10672 (enum tracepoint_type): New.
10673 (struct tracepoint) <type>: New field `type'.
10674 <actions_str, step_actions, step_actions_str>: Only include in
10676 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10677 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10678 (tracepoints): Use IP_AGENT_EXPORT.
10679 (last_tracepoint): Don't include in the IPA.
10680 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10681 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10682 (alloced_trace_state_variables): New.
10683 (trace_state_variables): Use IP_AGENT_EXPORT.
10684 (traceframe_t): Delete unused variable.
10685 (circular_trace_buffer): Don't include in the IPA.
10686 (trace_buffer_start): Delete.
10687 (struct trace_buffer_control): New.
10688 (trace_buffer_free): Delete.
10689 (struct ipa_trace_buffer_control): New.
10690 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10691 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10693 (trace_buffer_ctrl): New.
10694 (TRACE_BUFFER_CTRL_CURR): New.
10695 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10696 Reimplement as macros.
10697 (trace_buffer_wrap): Delete.
10698 (traceframe_write_count, traceframe_read_count)
10699 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10700 (struct tracepoint_hit_ctx) <type>: New field.
10701 (struct fast_tracepoint_ctx): New.
10702 (memory_barrier): New.
10704 (record_tracepoint_error): Update atomically in the IPA.
10705 (clear_inferior_trace_buffer): New.
10706 (about_to_request_buffer_space): New.
10707 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10708 updating the same buffer.
10709 (add_tracepoint): Default the tracepoint's type to trap
10710 tracepoint, and orig_size to -1.
10711 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10712 internal variables.
10713 (create_trace_state_variable): New parameter `gdb'. Handle it.
10714 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10715 (cmd_qtdp): Handle fast tracepoints.
10716 (cmd_qtdv): Adjust.
10717 (max_jump_pad_size): New.
10718 (gdb_jump_pad_head): New.
10719 (get_jump_space_head): New.
10720 (claim_jump_space): New.
10721 (sort_tracepoints): New.
10722 (MAX_JUMP_SIZE): New.
10723 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10725 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10726 support. Upload fast traceframes, and delete internal IPA
10728 (stop_tracing_handler): New.
10729 (flush_trace_buffer_handler): New.
10730 (cmd_qtstop): Upload fast tracepoints.
10731 (response_tracepoint): Handle fast tracepoints.
10732 (tracepoint_finished_step): Upload fast traceframes. Set the
10733 tracepoint hit context's tracepoint type.
10734 (handle_tracepoint_bkpts): New.
10735 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10736 type. Add comment about fast tracepoints.
10737 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10738 non-existing action_str field.
10739 (get_context_regcache): Handle fast tracepoints.
10740 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10742 (fast_tracepoint_from_jump_pad_address): New.
10743 (fast_tracepoint_from_ipa_tpoint_address): New.
10744 (collecting_t): New.
10745 (force_unlock_trace_buffer): New.
10746 (fast_tracepoint_collecting): New.
10748 (gdb_collect): New.
10749 (write_inferior_data_ptr): New.
10750 (target_tp_heap): New.
10751 (target_malloc): New.
10752 (download_agent_expr): New.
10754 (download_tracepoints): New.
10755 (download_trace_state_variables): New.
10756 (upload_fast_traceframes): New.
10757 (IPA_FIRST_TRACEFRAME): New.
10758 (IPA_NEXT_TRACEFRAME_1): New.
10759 (IPA_NEXT_TRACEFRAME): New.
10760 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10761 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10762 (gdb_jump_pad_buffer_end): New.
10763 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10764 (initialize_tracepoint): Adjust.
10765 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10766 buffer. Initialize the low module.
10767 * utils.c (PREFIX, TOOLNAME): New.
10768 (malloc_failure): Use PREFIX.
10769 (error): In the IPA, an error causes an exit.
10770 (fatal, warning): Use PREFIX.
10771 (internal_error): Use TOOLNAME.
10772 (NUMCELLS): Increase to 10.
10773 * configure, config.in: Regenerate.
10775 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10777 * server.c (handle_query) <qSupported>: Do two passes over the
10778 qSupported string to avoid nesting strtok.
10780 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10782 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10784 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10785 -Wl,--dynamic-list.
10786 * configure: Regenerate.
10787 * proc-service.list: New.
10789 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10791 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10794 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10796 * gdbreplay.c (remote_open): Check error return from socket() call by
10797 its equality to -1 not by it being negative.
10798 * remote-utils.c (remote_open): Likewise.
10800 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10802 * config.h: Regenerate.
10804 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10806 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10807 doesn't provide PTRACE_GET_THREAD_AREA.
10809 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10811 * linux-m68k-low.c: Include <asm/ptrace.h>
10812 (ps_get_thread_area): Implement.
10814 2010-05-03 Doug Evans <dje@google.com>
10816 * event-loop.c (struct callback_event): New struct.
10817 (callback_list): New global.
10818 (append_callback_event, delete_callback_event): New functions.
10819 (process_callback): New function.
10820 (start_event_loop): Call it.
10821 * remote-utils.c (NOT_SCHEDULED): Define.
10822 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10823 moved out of readchar.
10824 (readchar): Rewrite. Call reschedule before returning.
10825 (reset_readchar): New function.
10826 (remote_close): Call it.
10827 (process_remaining, reschedule): New functions.
10828 * server.h (callback_handler_func): New typedef.
10829 (append_callback_event, delete_callback_event): Declare.
10831 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10833 * proc-service.c (ps_pglobal_lookup): Use
10834 thread_db_look_up_one_symbol.
10835 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10836 parameter. Use it instead of all_symbols_looked_up.
10837 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10839 (all_symbols_looked_up): Don't declare.
10840 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10841 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10843 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10844 Set all_symbols_looked_up here.
10845 (thread_db_look_up_one_symbol): New.
10846 (thread_db_get_tls_address): Adjust.
10847 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10848 thread_db object on the heap, and tentatively set it in the
10850 (thread_db_init): Don't set all_symbols_looked_up here.
10851 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10853 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10855 * linux-low.c (linux_kill, linux_detach): Adjust.
10856 (status_pending_p_callback): Remove redundant statement. Check
10857 for !TARGET_WAITIKIND_IGNORE, instead of
10858 TARGET_WAITKIND_STOPPED.
10859 (handle_tracepoints): Make sure LWP is locked. Adjust.
10860 (linux_wait_for_event_1): Adjust.
10861 (linux_cancel_breakpoints): New.
10862 (unsuspend_one_lwp): New.
10863 (unsuspend_all_lwps): New.
10864 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10865 (send_sigstop_callback): Change return type to int, add new
10866 `except' parameter and handle it.
10867 (suspend_and_send_sigstop_callback): New.
10868 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10869 pass them down. If SUSPEND, also increment the lwp's suspend
10871 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10872 (need_step_over_p): Don't consider suspended LWPs.
10873 (start_step_over): Adjust.
10874 (proceed_one_lwp): Change return type to int, add new `except'
10875 parameter and handle it.
10876 (unsuspend_and_proceed_one_lwp): New.
10877 (proceed_all_lwps): Use find_inferior instead of
10879 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10880 also decrement the suspend count of LWPs. Pass `except' down,
10881 instead of hacking its suspend count.
10882 (linux_pause_all): Add `freeze' parameter. Adjust.
10883 (linux_unpause_all): New.
10884 (linux_target_ops): Install linux_unpause_all.
10885 * server.c (handle_status): Adjust.
10886 * target.h (struct target_ops): New fields `unpause_all' and
10887 `cancel_breakpoints'. Add new parameter to `pause_all'.
10888 (pause_all): Add new `freeze' parameter.
10889 (unpause_all): New.
10890 (cancel_breakpoints): New.
10891 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10892 cancel breakpoints.
10893 (cmd_qtstart): Pause threads.
10894 (stop_tracing): Pause threads, and cancel breakpoints.
10895 * win32-low.c (win32_target_ops): Adjust.
10897 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10899 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10900 the inferior right away from here...
10901 (linux_wait_1): ... to here, and adjust to check the thread's
10902 last_resume_kind instead of the lwp's step or stop_expected flags.
10904 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10906 * README: Use consistent `GDB' and `GDBserver' spellings.
10908 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10910 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10911 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10912 (linux_detach_one_lwp): Assume the lwp is stopped.
10913 (any_thread_of): Delete.
10914 (linux_detach): Stop all lwps here. Don't blindly delete all
10916 (delete_lwp_callback): New.
10917 (linux_mourn): Delete all lwps of the process that is gone.
10918 (linux_wait_1): Don't delete the last lwp of the process here.
10919 * mem-break.h (mark_breakpoints_out): Declare.
10920 * mem-break.c (mark_breakpoints_out): New.
10921 (free_all_breakpoints): Use it.
10922 * server.c (handle_target_event): If the process is gone, mark
10924 * thread-db.c (struct thread_db) <create_bp>: New field.
10925 (thread_db_enable_reporting): Fix prototype. Store a thread event
10926 breakpoint reference in the thread_db struct.
10927 (thread_db_load_search): Clear the thread_db object.
10928 (try_thread_db_load_1): Ditto.
10929 (switch_to_process): New.
10930 (disable_thread_event_reporting): Use it.
10931 (remove_thread_event_breakpoints): New.
10932 (thread_db_detach, thread_db_mourn): Use it.
10934 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10936 * linux-low.c (linux_enable_event_reporting): New.
10937 (linux_wait_for_event_1, handle_extended_wait): Use it.
10939 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10941 * linux-low.c (linux_kill_one_lwp, linux_kill)
10942 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10943 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10944 SIGSTOP even if the LWP is stopped.
10945 (send_sigstop_callback): New.
10946 (stop_all_lwps): Use send_sigstop_callback instead.
10947 (linux_resume_one_thread): Adjust.
10948 (proceed_one_lwp): Still proceed an LWP that the client has
10949 requested to stop, if we haven't reported it as stopped yet. Make
10950 sure that LWPs the client want stopped, have a pending SIGSTOP.
10952 2010-04-26 Doug Evans <dje@google.com>
10954 * server.c (handle_general_set): Make static.
10956 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10957 Print received char after testing for error/eof instead of before.
10958 (input_interrupt): Tweak comment.
10960 2010-04-23 Doug Evans <dje@google.com>
10962 * server.c (start_inferior): Print inferior argv if --debug.
10964 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10966 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10967 * nto-x86-low.c: Include server.h
10969 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10971 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10972 be consistent with other sources of this directory.
10973 (init_registers_amd64): Correct name of source file of this function
10976 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10978 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10979 64-bit executables.
10981 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10983 * win32-i386-low.c: Add 64-bit support.
10984 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10985 (init_registers_amd64): Declare.
10986 (mappings): Add 64-bit version of array.
10987 (init_windows_x86): New function.
10988 (the_low_target): Change init_arch field to init_windows_x86.
10990 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10992 * win32-low.c: Adapt to support also 64-bit architecture.
10993 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10994 (get_image_name): Use SIZE_T type for local variable `done'.
10995 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10996 (toolhelp_get_dll_name): Idem.
10997 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10998 Use uintptr_t typecast to avoid warning.
10999 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11000 (handle_exception): Use phex_nz to avoid warning.
11001 (win32_wait): Remove unused local variable `process'.
11003 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11005 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11008 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11010 * configure.ac: Use `ws2_32' library for srv_mingw.
11011 * configure: Regenerate.
11012 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11013 * remote-utils.c: Likewise.
11015 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11017 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11018 if __x86_64__ is defined.
11020 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11022 * configure: Regenerate.
11024 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11026 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11027 * target.h (target_ops): New get_tib_address field.
11028 * win32-low.h (win32_thread_info): Add thread_local_base field.
11029 * win32-low.c (child_add_thread): Add tlb argument.
11030 Set thread_local_base field to TLB.
11031 (get_child_debug_event): Adapt to child_add_thread change.
11032 (win32_get_tib_address): New function.
11033 (win32_target_ops): Set get_tib_address field to
11034 win32_get_tib_address.
11035 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11037 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11039 * linux-low.c (linux_mourn): Also remove the process.
11040 * server.c (handle_target_event): Don't remove the process here.
11041 * nto-low.c (nto_mourn): New.
11042 (nto_target_ops): Install it.
11043 * spu-low.c (spu_mourn): New.
11044 (spu_target_ops): Install it.
11045 * win32-low.c (win32_mourn): New.
11046 (win32_target_ops): Install it.
11048 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11050 * server.h (buffer_xml_printf): Remove redundant `;'.
11052 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11054 * regcache.c (set_register_cache): Invalidate regcaches before
11055 changing the register cache layout.
11056 (regcache_invalidate_one): Allow a NULL regcache.
11057 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11058 regcaches before changing the register cache layout or the target
11061 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11063 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11064 variable warning on Linux/x86-64.
11066 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11068 GDBserver disconnected tracing support.
11070 * linux-low.c (linux_remove_process): Delete.
11071 (add_lwp): Don't set last_resume_kind here.
11072 (linux_kill): Use `mourn'.
11073 (linux_detach): Use `thread_db_detach', and `mourn'.
11074 (linux_mourn): New.
11075 (linux_attach_lwp_1): Adjust comment.
11076 (linux_attach): last_resume_kind moved the thread_info; adjust.
11077 (status_pending_p_callback): Adjust.
11078 (linux_wait_for_event_1): Adjust.
11079 (count_events_callback, select_singlestep_lwp_callback)
11080 (select_event_lwp_callback, cancel_breakpoints_callback)
11081 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11082 (proceed_one_lwp): Adjust.
11083 (linux_async): Add debug output.
11084 (linux_thread_stopped): New.
11085 (linux_pause_all): New.
11086 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11088 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11089 (thread_db_free): Delete declaration.
11090 (thread_db_detach, thread_db_mourn): Declare.
11091 * thread-db.c (thread_db_init): Use thread_db_mourn.
11092 (thread_db_free): Delete, split in two.
11093 (disable_thread_event_reporting): New.
11094 (thread_db_detach): New.
11095 (thread_db_mourn): New.
11097 * server.h (struct thread_info) <last_resume_kind>: New field.
11098 <attached>: Add comment.
11099 <gdb_detached>: New field.
11100 (handler_func): Change return type to int.
11101 (handle_serial_event, handle_target_event): Ditto.
11102 (gdb_connected): Declare.
11104 (disconnected_tracing): Declare.
11105 (stop_tracing): Declare.
11107 * server.c (handle_query) <qSupported>: Report support for
11108 disconnected tracing.
11109 (queue_stop_reply_callback): Account for running threads.
11110 (gdb_wants_thread_stopped): New.
11111 (gdb_wants_all_threads_stopped): New.
11112 (gdb_reattached_process): New.
11113 (handle_status): Clear the `gdb_detached' flag of all processes.
11114 In all-stop, stop all threads.
11115 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11116 (process_serial_event): If the remote connection breaks, or if an
11117 exit was forced with "monitor exit", force an event loop exit.
11118 Handle disconnected tracing on detach.
11119 (handle_serial_event): Adjust.
11120 (handle_target_event): If GDB isn't connected, forward events back
11121 to the inferior, unless the last process exited, in which case,
11122 exit gdbserver. Adjust interface.
11124 * remote-utils.c (remote_open): Don't block in accept. Instead
11125 register an event loop source on the listen socket file
11126 descriptor. Refactor bits into ...
11127 (listen_desc): ... this new global.
11128 (gdb_connected): ... this new function.
11129 (enable_async_notification): ... this new function.
11130 (handle_accept_event): ... this new function.
11131 (remote_close): Clear remote_desc.
11133 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11135 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11137 (mourn_inferior): Define.
11138 (target_process_qsupported): Avoid the dangling else problem.
11139 (thread_stopped): Define.
11140 (pause_all): Define.
11141 (target_waitstatus_to_string): Declare.
11142 * target.c (target_waitstatus_to_string): New.
11144 * tracepoint.c (tracing): Make extern.
11145 (disconnected_tracing): New.
11146 (stop_tracing): Make extern. Handle tracing stops due to GDB
11148 (cmd_qtdisconnected): New.
11149 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11150 (handle_tracepoint_general_set): Handle QTDisconnected.
11152 * event-loop.c (event_handler_func): Change return type to int.
11153 (process_event): Bail out if the event handler wants the event
11155 (handle_file_event): Ditto.
11156 (start_event_loop): Bail out if the event handler wants the event
11159 * nto-low.c (nto_target_ops): Adjust.
11160 * spu-low.c (spu_wait): Don't remove the process here.
11161 (spu_target_ops): Adjust.
11162 * win32-low.c (win32_wait): Don't remove the process here.
11163 (win32_target_ops): Adjust.
11165 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11167 * regcache.c (realloc_register_cache): Invalidate inferior's
11168 regcache before recreating it.
11170 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11172 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11174 2010-04-09 Stan Shebs <stan@codesourcery.com>
11175 Pedro Alves <pedro@codesourcery.com>
11177 * server.h (LONGEST): New.
11178 (struct thread_info) <while_stepping>: New field.
11179 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11181 (initialize_tracepoint, handle_tracepoint_general_set)
11182 (handle_tracepoint_query, tracepoint_finished_step)
11183 (tracepoint_was_hit, release_while_stepping_state_list):
11184 (current_traceframe): Declare.
11185 * server.c (handle_general_set): Handle tracepoint packets.
11186 (read_memory): New.
11187 (write_memory): New.
11188 (handle_search_memory_1): Use read_memory.
11189 (handle_query): Report support for conditional tracepoints, trace
11190 state variables, and tracepoint sources. Handle tracepoint
11192 (main): Initialize the tracepoints module.
11193 (process_serial_event): Handle traceframe reads/writes.
11195 * linux-low.c (handle_tracepoints): New.
11196 (linux_wait_1): Call it.
11197 (linux_resume_one_lwp): Handle while-stepping.
11198 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11199 (linux_target_ops): Install them.
11200 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11202 * linux-x86-low.c (x86_supports_tracepoints): New.
11203 (the_low_target). Install it.
11205 * mem-break.h (delete_breakpoint): Declare.
11206 * mem-break.c (delete_breakpoint): Make external.
11208 * target.h (struct target_ops): Add `supports_tracepoints',
11209 `read_pc', and `write_pc' fields.
11210 (target_supports_tracepoints): Define.
11211 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11214 * regcache.h (struct regcache) <registers_owned>: New field.
11215 (init_register_cache, regcache_cpy): Declare.
11216 (regcache_read_pc, regcache_write_pc): Declare.
11217 (register_cache_size): Declare.
11218 (supply_regblock): Declare.
11219 * regcache.c (init_register_cache): New.
11220 (new_register_cache): Use it.
11221 (regcache_cpy): New.
11222 (register_cache_size): New.
11223 (supply_regblock): New.
11224 (regcache_read_pc, regcache_write_pc): New.
11226 * tracepoint.c: New.
11228 * Makefile.in (OBS): Add tracepoint.o.
11229 (tracepoint.o): New rule.
11231 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11233 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11235 (i386-mmx.c): Likewise.
11236 (i386-mmx-linux.o): Likewise.
11237 (i386-mmx-linux.c): Likewise.
11239 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11240 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11241 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11242 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11244 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11245 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11246 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11248 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11250 * Makefile.in (clean): Updated.
11252 (i386-avx.c): Likewise.
11253 (i386-avx-linux.o): Likewise.
11254 (i386-avx-linux.c): Likewise.
11255 (amd64-avx.o): Likewise.
11256 (amd64-avx.c): Likewise.
11257 (amd64-avx-linux.o): Likewise.
11258 (amd64-avx-linux.c): Likewise.
11260 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11261 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11262 (srv_amd64_regobj): Add amd64-avx.o.
11263 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11264 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11265 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11266 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11267 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11268 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11269 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11271 * i387-fp.c: Include "i386-xstate.h".
11273 (i387_cache_to_xsave): Likewise.
11274 (i387_xsave_to_cache): Likewise.
11275 (x86_xcr0): Likewise.
11277 * i387-fp.h (i387_cache_to_xsave): Likewise.
11278 (i387_xsave_to_cache): Likewise.
11279 (x86_xcr0): Likewise.
11281 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11282 * linux-crisv32-low.c (target_regsets): Likewise.
11283 * linux-m68k-low.c (target_regsets): Likewise.
11284 * linux-mips-low.c (target_regsets): Likewise.
11285 * linux-ppc-low.c (target_regsets): Likewise.
11286 * linux-s390-low.c (target_regsets): Likewise.
11287 * linux-sh-low.c (target_regsets): Likewise.
11288 * linux-sparc-low.c (target_regsets): Likewise.
11289 * linux-xtensa-low.c (target_regsets): Likewise.
11291 * linux-low.c: Include <sys/uio.h>.
11292 (regsets_fetch_inferior_registers): Support nt_type.
11293 (regsets_store_inferior_registers): Likewise.
11294 (linux_process_qsupported): New.
11295 (linux_target_ops): Add linux_process_qsupported.
11297 * linux-low.h (regset_info): Add nt_type.
11298 (linux_target_ops): Add process_qsupported.
11300 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11302 (init_registers_i386_avx_linux): New.
11303 (init_registers_amd64_avx_linux): Likewise.
11304 (xmltarget_i386_linux_no_xml): Likewise.
11305 (xmltarget_amd64_linux_no_xml): Likewise.
11306 (PTRACE_GETREGSET): Likewise.
11307 (PTRACE_SETREGSET): Likewise.
11308 (x86_fill_xstateregset): Likewise.
11309 (x86_store_xstateregset): Likewise.
11310 (use_xml): Likewise.
11311 (x86_linux_update_xmltarget): Likewise.
11312 (x86_linux_process_qsupported): Likewise.
11313 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11314 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11315 init_registers_i386_linux here. Call
11316 x86_linux_update_xmltarget.
11317 (the_low_target): Add x86_linux_process_qsupported.
11319 * server.c (handle_query): Call target_process_qsupported.
11321 * target.h (target_ops): Add process_qsupported.
11322 (target_process_qsupported): New.
11324 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11326 * inferiors.c (add_thread): Set last_status kind to
11327 TARGET_WAITKIND_IGNORE.
11328 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11329 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11330 (linux_wait_1): Move `thread' local definition to block that uses
11331 it. Don't NULL initialize `event_child'.
11332 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11333 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11334 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11336 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11338 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11339 an extended waitstatus, or by a watchpoint.
11340 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11341 thread was stepping or has been stopped by a watchpoint.
11343 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11345 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11346 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11347 of another, then delete the previous, and validate all
11349 (validate_inserted_breakpoint): New.
11350 (delete_disabled_breakpoints): New.
11351 (validate_breakpoints): New.
11352 (check_mem_read): Validate breakpoints before trusting their
11353 shadow. Delete disabled breakpoints.
11354 (check_mem_write): Validate breakpoints before trusting they
11355 should be inserted. Delete disabled breakpoints.
11356 * mem-break.h (validate_breakpoints):
11357 * server.c (handle_query): Validate breakpoints when we see a
11360 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11362 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11363 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11364 if we could tell there's a GDB breakpoint at stop_pc.
11365 (need_step_over_p): Don't do a step over if we find a GDB
11366 breakpoint at the resume PC.
11368 * mem-break.c (struct raw_breakpoint): New.
11369 (enum bkpt_type): New type `gdb_breakpoint'.
11370 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11371 fields. New field `raw'.
11372 (find_raw_breakpoint_at): New.
11373 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11374 breakpoint instead.
11375 (set_breakpoint_at): Adjust.
11376 (delete_raw_breakpoint): New.
11377 (release_breakpoint): New.
11378 (delete_breakpoint): Rename to...
11379 (delete_breakpoint_1): ... this. Add proc parameter. Use
11380 release_breakpoint. Return ENOENT.
11381 (delete_breakpoint): Reimplement.
11382 (find_breakpoint_at): Delete.
11383 (find_gdb_breakpoint_at): New.
11384 (delete_breakpoint_at): Delete.
11385 (set_gdb_breakpoint_at): New.
11386 (delete_gdb_breakpoint_at): New.
11387 (gdb_breakpoint_here): New.
11388 (set_reinsert_breakpoint): Use release_breakpoint.
11389 (uninsert_breakpoint): Rename to ...
11390 (uninsert_raw_breakpoint): ... this.
11391 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11392 (reinsert_raw_breakpoint): Change parameter type to
11394 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11396 (check_breakpoints): Adjust. Use release_breakpoint.
11397 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11398 (breakpoint_inserted_here): Ditto.
11399 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11400 Don't trust the breakpoint's shadow if it is not inserted.
11401 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11402 (delete_all_breakpoints): Adjust.
11403 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11404 use delete_breakpoint_1.
11406 * mem-break.h (breakpoints_supported): Delete declaration.
11407 (set_gdb_breakpoint_at): Declare.
11408 (gdb_breakpoint_here): Declare.
11409 (delete_breakpoint_at): Delete.
11410 (delete_gdb_breakpoint_at): Declare.
11412 * server.h (struct raw_breakpoint): Forward declare.
11413 (struct process_info): New field `raw_breakpoints'.
11415 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11418 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11420 * linux-low.c (status_pending_p_callback): Fix comment.
11421 (linux_wait_for_event_1): Move most of the internal breakpoint
11422 handling from here...
11423 (linux_wait_1): ... to here.
11424 (count_events_callback): New.
11425 (select_singlestep_lwp_callback): New.
11426 (select_event_lwp_callback): New.
11427 (cancel_breakpoints_callback): New.
11428 (select_event_lwp): New.
11429 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11430 priority to all LWPs that have had events that should be reported
11431 to the client. Cancel breakpoints when about to reporting the
11432 event to the client, not while stopping lwps. No longer cancel
11433 finished single-steps here.
11434 (cancel_finished_single_step): Delete.
11435 (cancel_finished_single_steps): Delete.
11437 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11439 * mem-break.c (enum bkpt_type): New.
11440 (struct breakpoint): New field `type'.
11441 (set_breakpoint_at): Change return type to struct breakpoint
11442 pointer. Set type to `other_breakpoint' by default.
11443 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11444 in the breakpoint list.
11445 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11446 (reinsert_breakpoint): Rename to ...
11447 (reinsert_raw_breakpoint): ... this.
11448 (reinsert_breakpoints_at): Adjust.
11449 * mem-break.h (struct breakpoint): Declare.
11450 (set_breakpoint_at): Change return type to struct breakpoint
11453 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11455 * server.c (handle_query): Assign, not compare.
11457 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11459 Teach linux gdbserver to step-over-breakpoints.
11461 * linux-low.c (can_hardware_single_step): New.
11462 (supports_breakpoints): New.
11463 (handle_extended_wait): If stopping threads, read the stop pc of
11464 the new cloned LWP.
11466 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11467 low target doesn't support retrieving the PC.
11468 (add_lwp): Set last_resume_kind to resume_continue.
11469 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11470 (linux_attach): Don't clear stop_expected. Set the lwp's
11471 last_resume_kind to resume_stop.
11472 (linux_detach_one_lwp): Don't check for removed breakpoints.
11473 (check_removed_breakpoint): Delete.
11474 (status_pending_p): Rename to ...
11475 (status_pending_p_callback): ... this. Don't check for removed
11476 breakpoints. Don't consider threads that are stopped from GDB's
11478 (linux_wait_for_lwp): Always read the stop_pc here.
11479 (cancel_breakpoint): New.
11480 (step_over_bkpt): New global.
11481 (linux_wait_for_event_1): Implement stepping over breakpoints.
11482 (gdb_wants_lwp_stopped): New.
11483 (gdb_wants_all_stopped): New.
11484 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11485 single-step traps here. Store the thread's last reported target
11487 (send_sigstop): Don't clear stop_expected. Always set it,
11489 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11490 (cancel_finished_single_step): New.
11491 (cancel_finished_single_steps): New.
11492 (wait_for_sigstop): Don't cancel finished single-step traps here.
11493 (linux_resume_one_lwp): Don't check for removed breakpoints.
11494 Don't set `step' on non-hardware step archs.
11495 (linux_set_resume_request): Ignore resume_stop requests if already
11496 stopping or stopped. Set the lwp's last_resume_kind.
11497 (resume_status_pending_p): Don't check for removed breakpoints.
11498 (need_step_over_p): New.
11499 (start_step_over): New.
11500 (finish_step_over): New.
11501 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11502 requests. Clear the thread's last reported target waitstatus.
11503 Don't use the `suspended' flag. Don't consider pending breakpoints.
11504 (linux_resume): Start a step-over if necessary.
11505 (proceed_one_lwp): New.
11506 (proceed_all_lwps): New.
11507 (unstop_all_lwps): New.
11508 * linux-low.h (struct lwp_info): Rewrite comment for the
11509 `suspended' flag. Add the `stop_pc' field. Delete the
11510 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11511 Add `'last_resume_kind' and `need_step_over' fields.
11512 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11513 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11514 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11515 (set_raw_breakpoint_at): New.
11516 (set_breakpoint_at): Rewrite to use it.
11517 (reinsert_breakpoint_handler): Delete.
11518 (set_reinsert_breakpoint): New.
11519 (reinsert_breakpoint_by_bp): Delete.
11520 (delete_reinsert_breakpoints): New.
11521 (uninsert_breakpoint): Rewrite.
11522 (uninsert_breakpoints_at): New.
11523 (reinsert_breakpoint): Rewrite.
11524 (reinsert_breakpoints_at): New.
11525 (check_breakpoints): Rewrite.
11526 (breakpoint_here): New.
11527 (breakpoint_inserted_here): New.
11528 (check_mem_read): Adjust.
11529 * mem-break.h (breakpoints_supported, breakpoint_here)
11530 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11531 (reinsert_breakpoint_by_bp): Delete declaration.
11532 (delete_reinsert_breakpoints): Declare.
11533 (reinsert_breakpoint): Delete declaration.
11534 (reinsert_breakpoints_at): Declare.
11535 (uninsert_breakpoint): Delete declaration.
11536 (uninsert_breakpoints_at): Declare.
11537 (check_breakpoints): Adjust prototype.
11538 * server.h: Adjust include order.
11539 (struct thread_info): Declare here. Add a `last_status' field.
11541 2010-03-23 Michael Snyder <msnyder@vmware.com>
11543 * server.c (crc32): New function.
11544 (handle_query): Add handling for 'qCRC:' request.
11546 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11548 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11549 lwp had been stopped by a watchpoint.
11551 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11553 * server.h (internal_error): Declare.
11554 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11555 * utils.c (internal_error): New function.
11557 2010-03-15 Andreas Schwab <schwab@redhat.com>
11559 * configure.srv: Fix typo setting srv_regobj.
11561 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11563 * linux-low.c (fetch_register): Avoid passing a non string literal
11565 (usr_store_inferior_registers): Ditto.
11567 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11569 * linux-low.c (linux_write_memory): Bail out early if peeking
11572 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11574 * linux-low.h (struct lwp_info): New fields
11575 `stopped_by_watchpoint' and `stopped_data_address'.
11576 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11577 here, and cache them in the lwp object.
11578 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11580 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11582 (linux_stopped_by_watchpoint): Rewrite.
11583 (linux_stopped_data_address): Rewrite.
11585 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11587 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11588 switching the current inferior, not before.
11590 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11592 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11593 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11594 i386-linux.c and amd64-linux.c.
11595 (reg-i386.o): Removed.
11596 (reg-i386.c): Likewise.
11597 (reg-i386-linux.o): Likewise.
11598 (reg-i386-linux.c): Likewise.
11599 (reg-x86-64.o): Likewise.
11600 (reg-x86-64.c): Likewise.
11601 (reg-x86-64-linux.o): Likewise.
11602 (reg-x86-64-linux.c): Likewise.
11604 (i386.c): Likewise.
11605 (i386-linux.o): Likewise.
11606 (i386-linux.c): Likewise.
11607 (amd64.o): Likewise.
11608 (amd64.c): Likewise.
11609 (amd64-linux.o): Likewise.
11610 (amd64-linux.c): Likewise.
11612 * configure.srv (srv_i386_regobj): New.
11613 (srv_i386_linux_regobj): Likewise.
11614 (srv_amd64_regobj): Likewise.
11615 (srv_amd64_linux_regobj): Likewise.
11616 (srv_i386_32bit_xmlfiles): Likewise.
11617 (srv_i386_64bit_xmlfiles): Likewise.
11618 (srv_i386_xmlfiles): Likewise.
11619 (srv_amd64_xmlfiles): Likewise.
11620 (srv_i386_linux_xmlfiles): Likewise.
11621 (srv_amd64_linux_xmlfiles): Likewise.
11622 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11623 srv_xmlfiles to $srv_i386_xmlfiles.
11624 (i[34567]86-*-mingw32ce*): Likewise.
11625 (i[34567]86-*-mingw*): Likewise.
11626 (i[34567]86-*-nto*): Likewise.
11627 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11628 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11629 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11630 (x86_64-*-linux*): Likewise.
11632 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11633 (init_registers_amd64_linux): New.
11634 (x86_arch_setup): Replace init_registers_x86_64_linux with
11635 init_registers_amd64_linux.
11637 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11639 * configure.ac: Check for libdl. If it is not available link against
11640 static libthread_db.
11641 * configure: Regenerate.
11643 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11647 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11648 handing a read watchpoint.
11649 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11651 2010-02-12 Doug Evans <dje@google.com>
11653 * linux-low.c (linux_supports_tracefork_flag): Document.
11654 (linux_look_up_symbols): Add comment.
11656 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11658 * regcache.c (supply_register): Clear regcache if buf is NULL.
11660 2010-02-02 Nicolas Roche <roche@sourceware.org>
11661 Joel Brobecker <brobecker@adacore.com>
11663 * inferiors.c (find_inferior): Add function documentation.
11664 (unloaded_dll): Handle the case where the unloaded dll has not
11665 been previously registered in the dll list.
11667 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11669 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11670 (thumb2_breakpoint): New.
11671 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11673 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11675 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11676 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11679 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11681 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11683 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11685 * linux-s390-low.c (s390_collect_ptrace_register)
11686 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11688 2010-01-21 Doug Evans <dje@google.com>
11690 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11691 (PTRACE_ARG4_TYPE): New macro.
11692 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11693 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11694 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11695 (usr_store_inferior_registers): Ditto.
11696 (linux_read_memory, linux_write_memory): Ditto.
11697 (linux_test_for_tracefork): Ditto.
11699 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11700 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11702 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11704 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11707 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11709 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11710 prototype to take a regcache. Adjust.
11712 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11714 * regcache.h (struct thread_info): Forward declare.
11715 (struct regcache): New.
11716 (new_register_cache): Adjust prototype.
11717 (get_thread_regcache): Declare.
11718 (free_register_cache): Adjust prototype.
11719 (registers_to_string, registers_from_string): Ditto.
11720 (supply_register, supply_register_by_name, collect_register)
11721 (collect_register_as_string, collect_register_by_name): Ditto.
11722 * regcache.c (struct inferior_regcache_data): Delete.
11723 (get_regcache): Rename to ...
11724 (get_thread_regcache): ... this. Adjust. Switch inferior before
11725 fetching registers.
11726 (regcache_invalidate_one): Adjust.
11727 (regcache_invalidate): Fix prototype.
11728 (new_register_cache): Return the new register cache.
11729 (free_register_cache): Change prototype.
11730 (realloc_register_cache): Adjust.
11731 (registers_to_string): Change prototype to take a regcache. Adjust.
11732 (registers_from_string): Ditto.
11733 (register_data): Ditto.
11734 (supply_register): Ditto.
11735 (supply_register_by_name): Ditto.
11736 (collect_register): Ditto.
11737 (collect_register_as_string): Ditto.
11738 (collect_register_by_name): Ditto.
11739 * server.c (process_serial_event): Adjust.
11740 * linux-low.h (regset_fill_func, regset_store_func): Change
11742 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11744 * linux-low.c (get_stop_pc): Adjust.
11745 (check_removed_breakpoint): Adjust.
11746 (linux_wait_for_event): Adjust.
11747 (linux_resume_one_lwp): Adjust.
11748 (fetch_register): Add regcache parameter. Adjust.
11749 (usr_store_inferior_registers): Ditto.
11750 (regsets_fetch_inferior_registers): Ditto.
11751 (regsets_store_inferior_registers): Ditto.
11752 (linux_fetch_registers, linux_store_registers): Ditto.
11753 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11755 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11757 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11758 prototype to take a regcache.
11759 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11760 * remote-utils.c (convert_ascii_to_int, outreg)
11761 (prepare_resume_reply): Change prototype to take a regcache.
11763 * target.h (struct target_ops) <fetch_registers, store_registers>:
11764 Change prototype to take a regcache.
11765 (fetch_inferior_registers, store_inferior_registers): Change
11766 prototype to take a regcache. Adjust.
11767 * proc-service.c (ps_lgetregs): Adjust.
11768 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11769 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11770 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11771 take a regcache. Adjust.
11772 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11773 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11774 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11775 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11776 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11777 (cris_cannot_fetch_register):
11778 (cris_breakpoint_at): Change prototype to take a regcache.
11780 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11781 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11782 to take a regcache. Adjust.
11783 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11785 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11786 take a regcache. Adjust.
11787 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11788 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11789 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11790 * linux-mips-low.c (mips_get_pc):
11791 (mips_set_pc): Change prototype to take a regcache. Adjust.
11792 (mips_reinsert_addr): Adjust.
11793 (mips_collect_register): Change prototype to take a regcache.
11795 (mips_supply_register):
11796 (mips_collect_register_32bit, mips_supply_register_32bit)
11797 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11798 (mips_store_fpregset): Ditto.
11799 * linux-ppc-low.c (ppc_supply_ptrace_register)
11800 (ppc_supply_ptrace_register): Ditto.
11801 (parse_spufs_run): Adjust.
11802 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11803 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11804 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11805 take a regcache. Adjust.
11806 * linux-s390-low.c (s390_collect_ptrace_register)
11807 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11808 (s390_set_pc): Change prototype to take a regcache. Adjust.
11809 (s390_arch_setup): Adjust.
11810 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11811 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11812 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11813 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11814 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11816 (sparc_breakpoint_at): Adjust.
11817 * linux-xtensa-low.c (xtensa_fill_gregset):
11818 (xtensa_store_gregset):
11819 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11820 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11821 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11822 prototype to take a regcache. Adjust.
11823 * win32-arm-low.c (arm_fetch_inferior_register)
11824 (arm_store_inferior_register): Change prototype to take a
11826 * win32-i386-low.c (i386_fetch_inferior_register)
11827 (i386_store_inferior_register): Change prototype to take a
11829 * win32-low.c (child_fetch_inferior_registers)
11830 (child_store_inferior_registers): Change prototype to take a
11832 (win32_wait): Adjust.
11833 (win32_fetch_inferior_registers): Change prototype to take a
11835 (win32_store_inferior_registers): Adjust.
11836 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11837 store_inferior_register>: Change prototype to take a regcache.
11839 2010-01-20 Doug Evans <dje@google.com>
11841 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11843 (linux_wait_for_event1, linux_init_signals): Ditto.
11844 (W_STOPCODE): Provide definition if missing.
11846 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11848 * linux-low.c (linux_core_of_thread): New.
11849 (compare_ints, show_process, list_threads): New.
11850 (linux_qxfer_osdata): Report threads and cores.
11851 (linux_target_op): Register linux_core_of_thread.
11852 * remote-utils.c (prepare_resume_reply): Report the core.
11853 (buffer_xml_printf): Support %d specifier.
11854 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11856 (handle_query): Handle qXfer:threads. Announce availability
11858 * target.h (struct target_ops): New field core_of_thread.
11860 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11862 * Makefile.in (clean): Remove new generated files.
11863 (reg-s390.o, reg-s390.c): Remove rules.
11864 (reg-s390x.o, reg-s390x.c): Likewise.
11865 (s390-linux32.o, s390-linux32.c): Add rules.
11866 (s390-linux64.o, s390-linux64.c): Likewise.
11867 (s390x-linux64.o, s390x-linux64.c): Likewise.
11868 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11869 * linux-s390-low.c: Include <elf.h>.
11870 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11871 (init_registers_s390): Remove prototype.
11872 (init_registers_s390x): Likewise.
11873 (init_registers_s390_linux32): Add prototype.
11874 (init_registers_s390_linux64): Likewise.
11875 (init_registers_s390x_linux64): Likewise.
11876 (s390_num_regs_3264): New define.
11877 (s390_regmap_3264): New global variable.
11878 (s390_cannot_fetch_register): Remove obsolete check.
11879 (s390_cannot_store_register): Likewise.
11880 (s390_collect_ptrace_register): Handle upper/lower register halves.
11881 (s390_supply_ptrace_register): Likewise.
11882 (s390_fill_gregset): Update to register number changes.
11883 (s390_get_hwcap): New routine.
11884 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11885 Install appropriate regmap and register set.
11887 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11889 * server.c (gdbserver_version): Update copyright year to 2010.
11890 * gdbreplay.c (gdbreplay_version): Likewise.
11892 2009-12-28 Doug Evans <dje@google.com>
11894 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11895 elf/external.h. Include <elf.h> instead but only if necessary.
11897 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11899 * linux-low.c (linux_remove_process): Remove `detaching'
11900 parameter. Don't release/detach from thread_db here.
11901 (linux_kill): Release/detach from thread_db here, ...
11902 (linux_detach): ... and here, before actually detaching.
11903 (linux_wait_1): ... and here, when a process exits.
11904 * thread-db.c (any_thread_of): New.
11905 (thread_db_free): Switch the current inferior to a thread of the
11908 2009-12-21 Doug Evans <dje@google.com>
11910 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11912 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11913 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11914 warning ifndef __NR_tkill. Move setting of errno there too.
11915 Delete unnecessary resetting of errno after syscall.
11916 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11918 * configure.ac: Check for dladdr.
11919 * config.in: Regenerate.
11920 * configure: Regenerate.
11921 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11922 (try_thread_db_load): Update.
11924 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11926 2009-12-18 Doug Evans <dje@google.com>
11928 * event-loop.c: Include unistd.h if it exists.
11930 * linux-low.c (my_waitpid): Move definition away from being in
11931 between linux_tracefork_child/linux_test_for_tracefork.
11933 * gdb_proc_service.h (psaddr_t): Fix type.
11934 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11935 signature to match glibc.
11937 2009-12-16 Doug Evans <dje@google.com>
11939 * linux-low.c (linux_read_memory): Fix argument to read.
11941 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11943 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11944 events, don't leave current_inferior pointing at null.
11946 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11948 * win32-low.c (LOG): Delete.
11949 (OUTMSG): Output to stderr.
11950 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11951 on compile time LOG macro.
11952 (win32_wait): Fix debug output.
11954 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11956 * win32-low.c (win32_add_one_solib): If the dll name is
11957 "ntdll.dll", prepend the system directory to the dll path.
11959 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11961 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11963 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11964 Vladimir Prus <vladimir@codesourcery.com>
11966 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11967 * configure.ac: Check for __mcoldfire__ and set
11968 gdb_cv_m68k_is_coldfire.
11969 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11970 reg-cf.o and reg-m68k.o.
11971 * configure: Regenerated.
11973 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11975 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11976 Pass it to thread_db_free.
11977 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11978 proper `detaching' argument to linux_remove_process.
11979 * linux-low.h (thread_db_free): Add `detaching' parameter.
11980 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11982 (thread_db_free): Add `detaching' parameter. Only
11983 call td_ta_clear_event if detaching from process.
11985 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11987 * thread-db.c (thread_db_free): Fix typo.
11989 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11992 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11994 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11996 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11997 with an i686 compiler.
11998 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12000 * configure: Rebuilt.
12002 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12006 * server.c (handle_search_memory_1): Correct read_addr initialization
12007 in loop for searching subsequent chunks.
12009 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12011 * configure.ac: New --with-libthread-db option.
12012 * thread-db.c: Allow direct dependence on libthread_db.
12013 (thread_db_free): Adjust.
12014 * config.in: Regenerate.
12015 * configure: Likewise.
12017 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12020 * thread-db.c (attach_thread): New function.
12021 (maybe_attach_thread): Return success/failure.
12022 (find_new_threads_callback): Adjust.
12023 (thread_db_find_new_threads): Loop until no new threads.
12025 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12027 * proc-service.c (ps_lgetregs): Formatting.
12029 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12031 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12032 * configure.ac: Adjust.
12033 * linux-low.h (struct process_info_private): Move members to struct
12035 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12036 * linux-low.c (linux_remove_process): Adjust.
12037 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12038 * server.c (handle_query): Move code ...
12039 (handle_monitor_command): ... here. New function.
12040 * target.h (struct target_ops): New member.
12041 * thread-db.c (struct thread_db): New.
12042 (libthread_db_search_path): New variable.
12043 (thread_db_create_event, thread_db_enable_reporting)
12044 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12045 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12046 (try_thread_db_load_1, dladdr_to_soname): New functions.
12047 (try_thread_db_load, thread_db_load_search): New functions.
12048 (thread_db_init): Search for libthread_db.
12049 (thread_db_free): New function.
12050 (thread_db_handle_monitor_command): Likewise.
12051 * config.in: Regenerate.
12052 * configure: Regenerate.
12054 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12056 * spu-low.c (spu_kill): Wait for inferior to terminate.
12057 Call clear_inferiors.
12058 (spu_detach): Call clear_inferiors.
12060 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12062 * aclocal.m4: Regenerate.
12063 * config.in: Likewise.
12064 * configure: Likewise.
12066 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12068 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12069 (parse_spufs_run): New function.
12070 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12071 (ppc_breakpoint_at): Handle SPU breakpoints.
12073 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12075 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12076 (SPUFS_MAGIC): Define.
12077 (spu_enumerate_spu_ids): New function.
12078 (linux_qxfer_spu): New function.
12079 (linux_target_ops): Install linux_qxfer_spu.
12081 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12083 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12084 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12085 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12086 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12087 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12088 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12089 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12090 (init_registers_powerpc_cell32l): Add prototype.
12091 (init_registers_powerpc_cell64l): Likewise.
12092 (ppc_arch_setup): Detect Cell/B.E. architecture.
12094 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12096 * Makefile.in (datarootdir): New variable.
12098 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12100 * linux-low.c (linux_write_memory): Update debugging output.
12101 * Makefile.in (clean): Add new descriptions.
12102 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12103 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12104 * configure.srv: Add new files for arm*-*-linux*.
12105 * linux-arm-low.c: Add new declarations.
12106 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12107 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12108 (HWCAP_VFPv3D16): New.
12109 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12110 instead of __IWMMXT__.
12111 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12112 (arm_arch_setup): New.
12113 (target_regsets): Remove #ifdef. Add VFP regset.
12114 (the_low_target): Use arm_arch_setup.
12116 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12118 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12119 the main thread again.
12121 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12123 Adding Neutrino gdbserver.
12124 * configure: Regenerated.
12125 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12126 * configure.srv (i[34567]86-*-nto*): New target.
12127 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12128 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12129 (nto_comctrl) [__QNX__]: New function.
12130 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12132 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12134 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12137 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12138 Pedro Alves <pedro@codesourcery.com>
12140 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12141 don't support CONTEXT_EXTENDED_REGISTERS.
12142 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12143 (the_low_target): Install them.
12144 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12145 failing with ERROR_PIPE_NOT_CONNECTED.
12147 2009-06-30 Doug Evans <dje@google.com>
12148 Pierre Muller <muller@ics.u-strasbg.fr>
12150 Add h/w watchpoint support to x86-linux, win32-i386.
12151 * Makefile.in (SFILES): Add i386-low.c
12152 (i386_low_h): Define.
12153 (i386-low.o): Add dependencies.
12154 (linux-x86-low.o): Add i386-low.h dependency.
12155 (win32-i386-low.o): Ditto.
12156 * i386-low.c: New file.
12157 * i386-low.h: New file.
12158 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12159 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12160 * linux-low.c (linux_add_process): Initialize arch_private.
12161 (linux_remove_process): Free arch_private.
12162 (add_lwp): Initialize arch_private.
12163 (delete_lwp): Free arch_private.
12164 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12166 * linux-low.h (process_info_private): New member arch_private.
12167 (lwp_info): New member arch_private.
12168 (linux_target_ops): New members new_process, new_thread,
12170 (ptid_of): New macro.
12171 * linux-x86-low.c: Include stddef.h, i386-low.h.
12172 (arch_process_info): New struct.
12173 (arch_lwp_info): New struct.
12174 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12175 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12176 (i386_dr_low_get_status): New function.
12177 (x86_insert_point, x86_remove_point): New functions.
12178 (x86_stopped_by_watchpoint): New function.
12179 (x86_stopped_data_address): New function.
12180 (x86_linux_new_process, x86_linux_new_thread): New functions.
12181 (x86_linux_prepare_to_resume): New function.
12182 (the_low_target): Add entries for insert_point, remove_point,
12183 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12185 * server.c (debug_hw_points): New global.
12186 (monitor_show_help): Document set debug-hw-points.
12187 (handle_query): Process "set debug-hw-points".
12188 * server.h (debug_hw_points): Declare.
12189 (paddress): Declare.
12190 * utils.c (NUMCELLS, CELLSIZE): New macros.
12191 (get_sell, xsnprintf, paddress): New functions.
12192 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12193 remove_point, stopped_by_watchpoint, stopped_data_address.
12194 * win32-i386-low.c: Include i386-low.h.
12195 (debug_reg_state): Replaces dr.
12196 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12197 (i386_dr_low_get_status): New function.
12198 (i386_insert_point, i386_remove_point): New functions.
12199 (i386_stopped_by_watchpoint): New function.
12200 (i386_stopped_data_address): New function.
12201 (i386_initial_stuff): Update.
12202 (get_thread_context,set_thread_context,i386_thread_added): Update.
12203 (the_low_target): Add entries for insert_point,
12204 remove_point, stopped_by_watchpoint, stopped_data_address.
12205 * win32-low.c (win32_insert_watchpoint): New function.
12206 (win32_remove_watchpoint): New function.
12207 (win32_stopped_by_watchpoint): New function.
12208 (win32_stopped_data_address): New function.
12209 (win32_target_ops): Add entries for insert_watchpoint,
12210 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12211 * win32-low.h (win32_target_ops): New members insert_point,
12212 remove_point, stopped_by_watchpoint, stopped_data_address.
12214 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12216 * server.c (process_serial_event): Re-return unsupported, not
12217 error, if the type isn't recognized. Re-allow supporting only
12218 insert or remove packets. Also call require_running for
12219 breakpoints. Add missing break statement to default case. Tidy.
12220 * target.h (struct target_ops): Rename insert_watchpoint to
12221 insert_point, and remove_watchpoint to remove_point.
12223 * linux-low.h (struct linux_target_ops): Likewise.
12224 * linux-low.c (linux_insert_watchpoint): Rename to ...
12225 (linux_insert_point): ... this. Adjust.
12226 (linux_remove_watchpoint): Rename to ...
12227 (linux_remove_point): ... this. Adjust.
12228 (linux_target_ops): Adjust.
12229 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12230 (cris_insert_point): ... this.
12231 (cris_remove_watchpoint): Rename to ...
12232 (cris_remove_point): ... this.
12233 (the_low_target): Adjust.
12235 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12237 * server.c (handle_v_kill): Pass signal_pid to
12238 kill_inferior if multi_process is zero.
12240 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12242 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12243 * target.h (target_ops): Comment for *_watchpoint to make it clear
12244 the functions can get types '0' and '1'.
12246 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12248 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12249 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12250 * regcache.c (get_regcache): Likewise.
12251 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12252 * win32-low.c (child_fetch_inferior_registers): Remove check for
12255 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12256 Pedro Alves <pedro@codesourcery.com>
12258 * target.h (struct target_ops) <supports_multi_process>: New
12260 (target_supports_multi_process): New.
12261 * server.c (handle_query): Even if GDB reports support, only
12262 enable multi-process if the target also supports it. Report
12263 multi-process support only if the target backend supports it.
12264 * linux-low.c (linux_supports_multi_process): New function.
12265 (linux_target_ops): Install it as target_supports_multi_process
12268 2009-05-24 Doug Evans <dje@google.com>
12270 Global renaming of find_thread_pid to find_thread_ptid.
12271 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12272 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12273 All callers updated.
12275 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12276 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12279 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12280 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12281 (linux_resume_one_lwp): Ditto.
12283 2009-05-23 Doug Evans <dje@google.com>
12285 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12286 from struct inferior_list_entry * to struct lwp_info *.
12287 All callers updated.
12289 2009-05-13 Doug Evans <dje@google.com>
12291 * linux-x86-low.c: Don't include assert.h.
12292 (x86_siginfo_fixup): Use fatal, not assert.
12293 (x86_arch_setup): Fix comment.
12295 2009-05-12 Doug Evans <dje@google.com>
12297 Biarch support for i386/amd64 gdbserver.
12298 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12299 Add linux-x86-low.c.
12300 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12301 (linux-x86-low.o): Add.
12302 * linux-x86-64-low.c: Delete.
12303 * linux-i386-low.c: Delete.
12304 * linux-x86-low.c: New file.
12305 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12307 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12309 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12310 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12311 (linux_child_pid_to_exec_file): New function.
12312 (elf_64_header_p, elf_64_file_p): New functions.
12313 (siginfo_fixup): New function.
12314 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12315 give target a chance to convert layout.
12316 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12317 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12319 2009-05-07 Doug Evans <dje@google.com>
12321 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12322 (regsets_store_inferior_registers): Ditto.
12324 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12328 * linux-low.c (must_set_ptrace_flags): Delete.
12329 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12331 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12332 `lwp->must_set_ptrace_flags' instead.
12333 (linux_wait_for_event_1): Set ptrace options here.
12334 (linux_wait_1): ... not here.
12336 2009-04-30 Doug Evans <dje@google.com>
12338 * inferiors.c (started_inferior_callback): New function.
12339 (attached_inferior_callback): New function.
12340 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12341 * server.c (print_started_pid, print_attached_pid): New functions.
12342 (detach_or_kill_for_exit): New function.
12343 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12344 * server.h (have_started_inferiors_p): Declare.
12345 (have_attached_inferiors_p): Declare.
12347 * inferiors.c (remove_process): Fix memory leak, free process.
12348 * linux-low.c (linux_remove_process): New function.
12349 (linux_kill): Call it instead of remove_process.
12350 (linux_detach, linux_wait_1): Ditto.
12352 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12354 * configure.srv: Add x86 Windows CE target.
12356 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12358 * inferiors.c (get_thread_process): Make global.
12359 * server.h (get_thread_process): Add prototype.
12360 * thread-db.c (find_one_thread): Use get_thread_process
12361 instead of current_process.
12362 (thread_db_get_tls_address): Do not crash if called when
12363 thread layer is not yet initialized.
12365 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12367 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12368 * spu-low.c (current_tid): Rename to ...
12369 (current_ptid): ... this.
12370 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12371 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12372 ptid_get_lwp (current_ptid) instead of current_tid.
12373 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12374 instead of current_tid. Use find_process_pid to verify pid
12375 argument is valid. Pass proper argument to remove_process.
12376 (spu_thread_alive): Compare current_ptid instead of current_tid.
12377 (spu_resume): Likewise.
12379 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12381 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12384 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12386 Implement the multiprocess extensions, and add linux multiprocess
12389 * server.h (ULONGEST): Declare.
12390 (struct ptid, ptid_t): New.
12391 (minus_one_ptid, null_ptid): Declare.
12392 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12393 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12394 (struct inferior_list_entry): Change `id' type from unsigned from
12396 (struct sym_cache, struct breakpoint, struct
12397 process_info_private): Forward declare.
12398 (struct process_info): Declare.
12399 (current_process): Declare.
12400 (all_processes): Declare.
12401 (initialize_inferiors): Declare.
12402 (add_thread): Adjust to use ptid_t.
12403 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12404 (add_process, remove_process, find_thread_pid): Declare.
12405 (find_inferior_id): Adjust to use ptid_t.
12406 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12407 (multi_process): Declare.
12408 (push_event): Adjust to use ptid_t.
12409 (read_ptid, write_ptid): Declare.
12410 (prepare_resume_reply): Adjust to use ptid_t.
12411 (clear_symbol_cache): Declare.
12412 * inferiors.c (all_processes): New.
12413 (null_ptid, minus_one_ptid): New.
12414 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12415 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12416 (add_thread): Change unsigned long to ptid. Remove gdb_id
12418 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12419 (gdb_id_to_thread): Rename to ...
12420 (find_thread_pid): ... this. Change unsigned long to ptid.
12421 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12422 (loaded_dll, pull_pid_from_list): Adjust.
12423 (add_process, remove_process, find_process_pid)
12424 (get_thread_process, current_process, initialize_inferiors): New.
12425 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12426 (struct target_waitstatus) <related_pid>: Ditto.
12427 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12428 return type to int.
12429 (struct target_ops) <join>: Add `pid' argument.
12430 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12431 (struct target_ops) <wait>: Add `ptid' field. Change return type
12433 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12434 (mywait): Add `ptid' argument. Change return type to ptid_t.
12435 (target_pid_to_str): Declare.
12436 * target.c (set_desired_inferior): Adjust to use ptids.
12437 (mywait): Add new `ptid' argument. Adjust.
12438 (target_pid_to_str): New.
12439 * mem-break.h (free_all_breakpoints): Declare.
12440 * mem-break.c (breakpoints): Delelete.
12441 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12442 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12443 to use per-process breakpoint list.
12444 (free_all_breakpoints): New.
12445 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12446 (symbol_cache, all_symbols_looked_up): Delete.
12448 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12450 (prepare_resume_reply): Change ptid argument's type from unsigned
12451 long to ptid_t. Adjust. Implement W;process and X;process.
12452 (free_sym_cache, clear_symbol_cache): New.
12453 (look_up_one_symbol): Adjust to per-process symbol cache. *
12454 * server.c (cont_thread, general_thread, step_thread): Change type
12456 (attached): Delete.
12457 (multi_process): New.
12458 (last_ptid): Change type to ptid_t.
12459 (struct vstop_notif) <ptid>: Change type to ptid_t.
12460 (queue_stop_reply, push_event): Change `ptid' argument's type to
12462 (discard_queued_stop_replies): Add `pid' argument.
12463 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12464 changes. Don't reference the `attached' global.
12465 (attach_inferior): Adjust to mywait interface changes.
12466 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12467 features. Handle and report "multiprocess+". Handle
12469 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12471 (handle_v_kill): New.
12472 (handle_v_stopped): Adjust to use target_pid_to_str.
12473 (handle_v_requests): Allow multiple attaches and runs when
12474 multiprocess extensions are in effect. Handle "vKill".
12475 (myresume): Adjust to use ptids.
12476 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12477 (handle_status): Adjust to discard_queued_stop_replies interface
12479 (first_thread_of, kill_inferior_callback)
12480 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12481 (main): Call initialize_inferiors. Adjust to use ptids, killing
12482 and detaching from all inferiors. Handle multiprocess packet
12484 * linux-low.h: Include gdb_proc_service.h.
12485 (struct process_info_private): New.
12486 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12487 <lwpid_of>: Use ptid_get_lwp.
12488 (get_lwp_thread): Adjust.
12489 (struct lwp_info): Add `dead' member.
12490 (find_lwp_pid): Declare.
12491 * linux-low.c (thread_db_active): Delete.
12492 (new_inferior): Adjust comment.
12493 (inferior_pid): Delete.
12494 (linux_add_process): New.
12495 (handle_extended_wait): Adjust.
12496 (add_lwp): Change unsigned long to ptid.
12497 (linux_create_inferior): Add process to processes table. Adjust
12498 to use ptids. Don't set new_inferior here.
12499 (linux_attach_lwp): Rename to ...
12500 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12501 it. Adjust to use ptids.
12502 (linux_attach_lwp): New.
12503 (linux_attach): Add process to processes table. Don't set
12505 (struct counter): New.
12506 (second_thread_of_pid_p, last_thread_of_process_p): New.
12507 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12508 multiple processes.
12509 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12510 processes. Remove process from process table.
12511 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12512 to multiple processes.
12513 (any_thread_of): New.
12514 (linux_detach): Add `pid' argument, and handle it. Remove process
12515 from processes table.
12516 (linux_join): Add `pid' argument. Handle it.
12517 (linux_thread_alive): Change unsighed long argument to ptid_t.
12518 Consider dead lwps as not being alive.
12519 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12520 threads we're not interested in.
12521 (same_lwp, find_lwp_pid): New.
12522 (linux_wait_for_lwp): Change `pid' argument's type from int to
12524 (linux_wait_for_event): Rename to ...
12525 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12526 from int to ptid_t. Adjust.
12527 (linux_wait_for_event): New.
12528 (linux_wait_1): Add `ptid' argument. Change return type to
12529 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12530 that exit from the process table.
12531 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12533 (mark_lwp_dead): New.
12534 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12535 stopping all threads, mark its main lwp as dead.
12536 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12538 (fetch_register, usr_store_inferior_registers)
12539 (regsets_fetch_inferior_registers)
12540 (regsets_store_inferior_registers, linux_read_memory)
12541 (linux_write_memory): Inline `inferior_pid'.
12542 (linux_look_up_symbols): Adjust to use per-process
12543 `thread_db_active'.
12544 (linux_request_interrupt): Adjust to use ptids.
12545 (linux_read_auxv): Inline `inferior_pid'.
12546 (initialize_low): Don't reference thread_db_active.
12547 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12548 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12549 (ps_getpid): Return the pid of the current inferior.
12550 * thread-db.c (proc_handle, thread_agent): Delete.
12551 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12553 (find_one_thread): Change argument type to ptid_t. Adjust to
12555 (maybe_attach_thread): Adjust to per-process data and ptids.
12556 (thread_db_find_new_threads): Ditto.
12557 (thread_db_init): Ditto.
12558 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12559 processes table. Adjust to use ptids.
12560 (spu_kill, spu_detach): Adjust interface. Remove process from
12562 (spu_join, spu_thread_alive): Adjust interface.
12563 (spu_wait): Adjust interface. Remove process from processes
12564 table. Adjust to use ptids.
12565 * win32-low.c (current_inferior_tid): Delete.
12566 (current_inferior_ptid): New.
12567 (debug_event_ptid): New.
12568 (thread_rec): Take a ptid. Adjust.
12569 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12570 (child_delete_thread): Ditto.
12571 (do_initial_child_stuff): Add `attached' argument. Add process to
12573 (child_fetch_inferior_registers, child_store_inferior_registers):
12575 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12576 (win32_attach): Pass 1 to do_initial_child_stuff.
12577 (win32_kill): Adjust interface. Remove process from processes
12579 (win32_detach): Ditto.
12580 (win32_join): Adjust interface.
12581 (win32_thread_alive): Take a ptid.
12582 (win32_resume): Adjust to use ptids.
12583 (get_child_debug_event): Ditto.
12584 (win32_wait): Adjust interface. Remove exiting process from
12587 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12589 Non-stop mode support.
12591 * server.h (non_stop): Declare.
12592 (gdb_client_data, handler_func): Declare.
12593 (delete_file_handler, add_file_handler, start_event_loop):
12595 (handle_serial_event, handle_target_event, push_event)
12596 (putpkt_notif): Declare.
12597 * target.h (enum resume_kind): New.
12598 (struct thread_resume): Replace `step' field by `kind' field.
12599 (TARGET_WNOHANG): Define.
12600 (struct target_ops) <wait>: Add `options' argument.
12601 <supports_non_stop, async, start_non_stop>: New fields.
12602 (target_supports_non_stop, target_async): New.
12603 (start_non_stop): Declare.
12604 (mywait): Add `options' argument.
12605 * target.c (mywait): Add `options' argument. Print child exit
12606 notifications here.
12607 (start_non_stop): New.
12608 * server.c (non_stop, own_buf, mem_buf): New globals.
12609 (struct vstop_notif): New.
12610 (notif_queue): New global.
12611 (queue_stop_reply, push_event, discard_queued_stop_replies)
12612 (send_next_stop_reply): New.
12613 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12615 (attach_inferior): In non-stop mode, don't wait for the target
12617 (handle_general_set): Handle QNonStop.
12618 (handle_query): When handling qC, return the current general
12619 thread, instead of the first thread of the list.
12620 (handle_query): If the backend supports non-stop mode, include
12621 QNonStop+ in the qSupported query response.
12622 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12624 (handle_v_attach, handle_v_run): Handle non-stop mode.
12625 (handle_v_stopped): New.
12626 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12627 (myresume): Adjust to use resume_kind. Handle non-stop.
12628 (queue_stop_reply_callback): New.
12629 (handle_status): Handle non-stop mode.
12630 (main): Clear non_stop flag on reconnection. Use the event-loop.
12631 Refactor serial protocol handling from here ...
12632 (process_serial_event): ... to this new function. When GDB
12633 selects any thread, select one here. In non-stop mode, wait until
12634 GDB acks all pending events before exiting.
12635 (handle_serial_event, handle_target_event): New.
12636 * remote-utils.c (remote_open): Install remote_desc in the event
12638 (remote_close): Remove remote_desc from the event loop.
12639 (putpkt_binary): Rename to...
12640 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12641 (putpkt_binary): New as wrapper around putpkt_binary_1.
12642 (putpkt_notif): New.
12643 (prepare_resume_reply): In non-stop mode, don't change the
12645 * event-loop.c: New.
12646 * Makefile.in (OBJ): Add event-loop.o.
12647 (event-loop.o): New rule.
12649 * linux-low.h (pid_of): Moved here.
12651 (get_lwp_thread): Use lwpid_of.
12652 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12653 * linux-low.c (pid_of): Delete.
12654 (inferior_pid): Use lwpid_of.
12655 (linux_event_pipe): New.
12656 (target_is_async_p): New.
12658 (handle_extended_wait): Use lwpid_of.
12659 (add_lwp): Don't set lwpid field.
12660 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12661 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12662 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12663 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12664 first. Adjust to linux_wait_for_event interface changes. Use
12666 (linux_detach): Don't delete the main lwp here.
12667 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12668 (status_pending_p): Don't consider explicitly suspended lwps.
12669 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12670 pointer. Add OPTIONS argument. Change return type to int. Use
12671 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12672 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12673 pointer. Add status pointer argument. Return a pid instead of a
12674 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12675 changes. In non-stop mode, don't switch to a random thread.
12676 (linux_wait): Rename to...
12677 (linux_wait_1): ... this. Add target_options argument, and handle
12678 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12679 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12680 clean exit and signal exit code. Don't stop all threads in
12681 non-stop mode. In all-stop mode, only stop all threads when
12682 reporting a stop to GDB. Handle explicit thread stop requests.
12683 (async_file_flush, async_file_mark): New.
12685 (send_sigstop): Use lwpid_of.
12686 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12687 interface changes. In non-stop mode, don't switch to a random
12689 (linux_resume_one_lwp): Use lwpid_of.
12690 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12691 (linux_resume_one_thread): ... this. Handle resume_stop. In
12692 non-stop mode, don't look for pending flag in all threads.
12693 (resume_status_pending_p): Don't consider explicitly suspended
12695 (my_waitpid): Reimplement. Emulate __WALL.
12696 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12698 (sigchld_handler, linux_supports_non_stop, linux_async)
12699 (linux_start_non_stop): New.
12700 (linux_target_ops): Register linux_supports_non_stop, linux_async
12701 and linux_start_non_stop.
12702 (initialize_low): Install SIGCHLD handler.
12703 * thread-db.c (thread_db_create_event, find_one_thread)
12704 (thread_db_get_tls_address): Use lwpid_of.
12705 * win32-low.c (win32_detach): Adjust to use resume_kind.
12706 (win32_wait): Add `options' argument.
12707 * spu-low.c (spu_resume): Adjust to use resume_kind.
12708 (spu_wait): Add `options' argument.
12710 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12712 Decouple target code from remote protocol.
12714 * target.h (enum target_waitkind): New.
12715 (struct target_waitstatus): New.
12716 (struct target_ops) <wait>: Return an unsigned long. Take a
12717 target_waitstatus pointer instead of a char pointer.
12718 (mywait): Likewise.
12719 * target.c (mywait): Change prototype to return an unsigned long.
12720 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12721 * server.h (thread_from_wait, old_thread_from_wait): Delete
12723 (prepare_resume_reply): Change prototype to take a
12725 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12726 (last_status, last_ptid): New.
12727 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12728 pid instead of a signal.
12729 (attach_inferior): Remove "status" and "signal" parameters.
12731 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12733 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12734 (handle_v_requests, myresume): Remove "status" and "signal"
12735 parameters. Adjust.
12736 (handle_status): New.
12737 (main): Delete local `status'. Adjust.
12738 * remote-utils.c: Include target.h.
12739 (prepare_resume_reply): Change prototype to take a
12740 target_waitstatus. Adjust.
12742 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12744 * spu-low.c (spu_wait): Adjust.
12745 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12747 (win32_wait): Adjust.
12749 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12751 * target.h (struct thread_resume): Delete leave_stopped member.
12752 (struct target_ops): Add a `n' argument to the `resume' callback.
12753 * server.c (start_inferior): Adjust.
12754 (handle_v_cont, myresume): Adjust.
12755 * linux-low.c (check_removed_breakpoint): Adjust to resume
12756 interface change, and to removed leave_stopped field.
12757 (resume_ptr): Delete.
12758 (struct thread_resume_array): New.
12759 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12760 resume interface change.
12761 (linux_continue_one_thread, linux_queue_one_thread)
12762 (resume_status_pending_p): Check if the resume field is NULL
12763 instead of checking the leave_stopped member.
12764 (linux_resume): Adjust to the target resume interface change.
12765 * spu-low.c (spu_resume): Adjust to the target resume interface
12767 * win32-low.c (win32_detach, win32_resume): Ditto.
12769 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12771 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12773 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12775 (linux_continue_one_thread): Only preserve the stepping flag if
12776 there's a pending breakpoint.
12778 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12780 * server.c (main): After the inferior having exited, call
12781 remote_close before exiting gdbserver.
12783 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12785 Fix size of FPSCR in Power 7 processors.
12786 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12787 (PPC_FEATURE_HAS_DFP): New #define.
12788 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12791 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12793 * server.c (handle_query) Whitespace and formatting.
12795 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12797 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12798 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12799 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12800 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12801 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12802 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12803 Makefile.in, configure.ac: Fix whitespace throughout.
12804 * configure: Regenerate.
12806 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12808 * inferiors.c (find_inferior): Make it safe for the callback
12809 function to delete the currently iterated inferior.
12811 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12813 * Makefile.in (linuw_low_h): Move higher.
12814 (thread-db.o): Depend on $(linux_low_h).
12816 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12818 Rename "process" to "lwp" throughout.
12820 * linux-low.c (all_processes): Rename to...
12821 (all_lwps): ... this.
12822 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12823 (add_process): Rename to ...
12824 (add_lwp): ... this. Adjust.
12825 (linux_create_inferior): Adjust.
12826 (linux_attach_lwp): Adjust.
12827 (linux_attach): Adjust.
12828 (linux_kill_one_process): Rename to ...
12829 (linux_kill_one_lwp): ... this. Adjust.
12830 (linux_kill): Adjust.
12831 (linux_detach_one_process): Rename to ...
12832 (linux_detach_one_lwp): ... this. Adjust.
12833 (linux_detach): Adjust.
12834 (check_removed_breakpoint): Adjust.
12835 (status_pending_p): Adjust.
12836 (linux_wait_for_process): Rename to ...
12837 (linux_wait_for_lwp): ... this. Adjust.
12838 (linux_wait_for_event): Adjust.
12839 (send_sigstop): Adjust.
12840 (wait_for_sigstop): Adjust.
12841 (stop_all_processes): Rename to ...
12842 (stop_all_lwps): ... this.
12843 (linux_resume_one_process): Rename to ...
12844 (linux_resume_one_lwp): ... this. Adjust.
12845 (linux_set_resume_request, linux_continue_one_thread)
12846 (linux_queue_one_thread, resume_status_pending_p)
12847 (usr_store_inferior_registers, regsets_store_inferior_registers)
12848 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12850 * linux-low.h (get_process): Rename to ...
12851 (get_lwp): ... this. Adjust.
12852 (get_thread_process): Rename to ...
12853 (get_thread_lwp): ... this. Adjust.
12854 (get_process_thread): Rename to ...
12855 (get_lwp_thread): ... this. Adjust.
12856 (struct process_info): Rename to ...
12857 (struct lwp_info): ... this.
12858 (all_processes): Rename to ...
12859 (all_lwps): ... this.
12860 * proc-service.c (ps_lgetregs): Adjust.
12861 * thread-db.c (thread_db_create_event, find_one_thread)
12862 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12864 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12866 * server.c (handle_query): Handle "qAttached".
12868 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12870 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12871 GPLv3, update license URL.
12873 2009-03-01 Doug Evans <dje@google.com>
12875 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12876 (server_h): Add gdb_signals.h.
12877 (signals.o): Update.
12878 * server.h (target_signal_from_host,target_signal_to_host_p)
12879 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12881 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12883 * remote-utils.c (getpkt): Also generate remote-debug
12884 information if noack_mode is set.
12886 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12888 * server.c (handle_query): Report qXfer:siginfo:read and
12889 qXfer:siginfo:write as supported and handle them.
12890 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12891 * linux-low.c (linux_xfer_siginfo): New.
12892 (linux_target_ops): Set it.
12894 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12896 * server.c (gdbserver_usage): Mention --remote-debug.
12897 (main): Accept '--remote-debug' switch.
12899 2009-01-18 Doug Evans <dje@google.com>
12901 * regcache.c (new_register_cache): No need to check result of xcalloc.
12902 * server.c (handle_search_memory): Back out calls to xmalloc,
12903 result is checked and error is returned to user upon failure.
12904 (handle_query): Ditto. Add more checks for result of malloc.
12905 (handle_v_cont): Check result of malloc, report error back to
12907 (handle_v_run): Ditto. Call freeargv.
12908 * server.h (freeargv): Declare.
12909 * utils.c (freeargv): New fn.
12911 2009-01-15 Doug Evans <dje@google.com>
12913 * gdbreplay.c (perror_with_name): Make arg const char *.
12914 * server.h (target_signal_to_name): Make return type const char *.
12915 * thread-db.c (thread_db_err_str): Make return type const char *.
12916 * utils.c (perror_with_name): Make arg const char *.
12918 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12920 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12921 when handling a EXIT_PROCESS_DEBUG_EVENT.
12923 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12925 * gdbreplay.c (gdbreplay_version): Update copyright year.
12926 * server.c (gdbserver_version): Likewise.
12928 2009-01-05 Doug Evans <dje@google.com>
12930 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12931 (handle_extended_wait): Improve comment.
12933 2008-12-13 Doug Evans <dje@google.com>
12935 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12936 * server.h (ATTR_MALLOC): New macro.
12937 (xmalloc,xcalloc,xstrdup): Declare.
12938 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12939 * inferiors.c: Ditto.
12940 * linux-low.c: Ditto.
12941 * mem-break.c: Ditto.
12942 * regcache.c: Ditto.
12943 * remote-utils.c: Ditto.
12946 * win32-low.c: Ditto.
12948 2008-12-12 Doug Evans <dje@google.com>
12950 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12951 in debugging printf.
12953 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12955 2008-12-09 Doug Evans <dje@google.com>
12957 * linux-low.h (struct process_info): Delete member tid, unused.
12958 * thread-db.c (find_one_thread): Update.
12959 (maybe_attach_thread): Update.
12961 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12963 * target.h (struct target_ops): Add qxfer_osdata member.
12964 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12966 (linux_qxfer_osdata): New functions.
12967 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12969 * server.c (handle_query): Handle "qXfer:osdata:read:".
12970 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12971 (buffer_xml_printf): New functions.
12972 * server.h (struct buffer): New.
12973 (buffer_grow_str, buffer_grow_str0): New macros.
12974 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12975 (buffer_xml_printf): Declare.
12977 2008-11-24 Doug Evans <dje@google.com>
12979 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12981 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12983 * server.c (handle_v_run): Always use the supplied argument list.
12985 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12987 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12988 (xtensa_regmap_table): Add entry for scompare1.
12990 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12992 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12993 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12994 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12995 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12996 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12997 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12998 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12999 XML target descriptions.
13000 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13001 when inferior is running on an ISA 2.05 or later processor. Add
13002 special case to return offset for full 64-bit slot of FPSCR when
13005 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13007 * Makefile.in (SFILES, clean): Added sparc64 files.
13008 (reg-sparc64.o, reg-sparc64.c): New.
13009 * configure.srv (sparc*-*-linux*): New configuration.
13010 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13011 syscall arguments for SPARC.
13012 (regsets_store_inferior_registers): Likewise.
13013 * linux-sparc-low.c: New file.
13015 2008-10-21 Doug Evans <dje@google.com>
13017 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13018 (READLINE_DIR,READLINE_DEP): Delete.
13019 (INTERNAL_CFLAGS): Update.
13020 (LINTFLAGS): Update.
13022 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13024 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13025 whole argv from the last run, not just argv[0].
13027 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13029 * regcache.c (new_register_cache): Return NULL if the register
13030 cache size isn't known yet.
13031 (free_register_cache): Avoid dereferencing a NULL regcache.
13033 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13035 * configure.srv: Merge MIPS and MIPS64.
13037 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13039 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13041 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13043 * Makefile.in: Add required vsx dependencies.
13045 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13046 Declare init_registers_powerpc_vsx32l.
13047 Declare init_registers_powerpc_vsx64l.
13048 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13049 (ppc_arch_setup): Check for VSX in hwcap.
13050 (ppc_fill_vsxregset): New function.
13051 (ppc_store_vsxregset): New function.
13052 Add new VSX entry in regset_info target_regsets.
13054 * configure.srv: Add new VSX dependencies.
13056 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13058 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13059 (remote_open): Set or clear transport_is_reliable.
13060 (putpkt_binary): Don't expect acks in noack mode.
13061 (getpkt): Don't send ack/nac in noack mode.
13062 * server.c (handle_general_set): Handle QStartNoAckMode.
13063 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13065 (main): Reset noack_mode on every connection.
13066 * server.h (noack_mode): Declare.
13068 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13070 * Makefile.in (GDBREPLAY_OBS): New variable.
13071 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13073 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13074 Daniel Jacobowitz <dan@codesourcery.com>
13076 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13077 (usr_store_inferior_registers): Likewise.
13078 (regsets_store_inferior_registers): Likewise.
13080 2008-07-31 Rolf Jansen <rj@surtec.com>
13081 Pedro Alves <pedro@codesourcery.com>
13083 * configure.ac: Check for memmem declaration.
13084 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13085 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13086 (disable_packet_qfThreadInfo): Unconditionally compile.
13087 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13088 * configure, config.in: Regenerate.
13090 2008-07-28 Doug Kwan <dougkwan@google.com>
13092 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13093 (linux_write_memory): Remove declaration of errno.
13095 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13097 * linux-low.c (handle_extended_wait): Do not use "status"
13098 variable uninitialized.
13100 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13102 * server.c (handle_v_attach): Inhibit reporting dll changes.
13104 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13106 * remote-utils.c (prepare_resume_reply): If requested, don't
13107 output "thread:TID" in the T stop reply.
13109 * server.c (disable_packet_vCont, disable_packet_Tthread)
13110 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13111 (handle_query): If requested, disable support for qC, qfThreadInfo
13113 (handle_v_requests): If requested, disable support for vCont.
13114 (gdbserver_show_disableable): New.
13115 (main): Handle --disable-packet and --disable-packet=LIST.
13117 * server.h (disable_packet_vCont, disable_packet_Tthread)
13118 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13120 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13122 * server.c (gdbserver_usage): Mention --version.
13124 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13126 * Makefile.in (gdbreplay.o): New rule.
13128 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13130 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13131 message, not gdbserver.
13133 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13134 Nathan Sidwell <nathan@codesourcery.com>
13135 Joseph Myers <joseph@codesourcery.com>
13137 * acinclude.m4: Include ../../config/acx.m4.
13138 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13139 * configure, config.in: Regenerate.
13140 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13141 * server.c (gdbserver_version): Print PKGVERSION.
13142 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13143 (main): Adjust gdbserver_usage calls.
13144 * gdbreplay.c (version, host_name): Add declarations.
13145 (gdbreplay_version, gdbreplay_usage): New.
13146 (main): Accept --version and --help options.
13148 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13150 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13151 (arm_breakpoint_at): Handle Thumb.
13152 (the_low_target): Add comment.
13154 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13156 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13158 2008-05-09 Doug Evans <dje@google.com>
13160 * server.h (decode_search_memory_packet): Declare.
13161 * remote-utils.c (decode_search_memory_packet): New fn.
13162 * server.c (handle_search_memory_1): New fn.
13163 (handle_search_memory): New fn.
13164 (handle_query): Process qSearch:memory packets.
13166 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13168 * regcache.c (registers_length): Remove.
13169 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13170 full register packet.
13171 * regcache.h (registers_length): Remove prototype.
13172 * server.h (PBUFSIZ): Define to 16384.
13174 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13176 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13177 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13178 powerpc-64l.o, and powerpc-altivec64l.o.
13179 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13180 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13181 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13182 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13183 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13186 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13187 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13188 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13189 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13190 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13191 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13192 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13193 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13194 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13195 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13198 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13199 (init_registers_powerpc_32l): ... this new prototype.
13200 (init_registers_powerpc_32): Remove, replace by ...
13201 (init_registers_powerpc_altivec32l): ... this new prototype.
13202 (init_registers_powerpc_e500): Remove, replace by ...
13203 (init_registers_powerpc_e500l): ... this new prototype.
13204 (init_registers_ppc64): Remove, replace by ...
13205 (init_registers_powerpc_64l): ... this new prototype.
13206 (init_registers_powerpc_64): Remove, replace by ...
13207 (init_registers_powerpc_altivec64l): ... this new prototype.
13208 (ppc_num_regs): Set to 73.
13209 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13210 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13211 (ppc_cannot_store_register): Handle orig_r3 and trap.
13212 (ppc_arch_setup): Update init_registers_... calls.
13213 (ppc_fill_gregset): Handle orig_r3 and trap.
13215 * inferiors.c (clear_inferiors): Reset current_inferior.
13217 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13219 * acinclude.m4: Add override.m4.
13220 * configure: Regenerate.
13222 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13224 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13225 initial call to init_register_ppc64.
13227 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13229 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13230 single powerpc*-*-linux* case.
13231 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13233 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13235 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13236 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13238 * linux-ppc-low.c: Include <elf.h>.
13239 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13240 (ppc_hwcap): New global variable.
13241 (ppc_regmap): Remove __SPE__ #ifdef sections.
13242 (ppc_regmap_e500): New global variable.
13243 (ppc_cannot_store_register): Update __SPE__ special case.
13244 (ppc_get_hwcap): New function.
13245 (ppc_arch_setup): Use it to determine whether inferior supports
13246 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13247 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13248 Do not access registers if target does not support AltiVec.
13249 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13250 Do not access registers if target does not support SPE.
13251 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13253 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13255 * linux-low.c (disabled_regsets, num_regsets): New.
13256 (use_regsets_p): Delete.
13257 (linux_wait_for_process): Clear disabled_regsets.
13258 (regsets_fetch_inferior_registers): Check and set it.
13259 (regsets_store_inferior_registers): Likewise.
13260 (linux_fetch_registers, linux_store_registers): Do not use
13262 (initialize_low): Allocate disabled_regsets.
13264 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13266 * Makefile.in (LIBOBJS): New.
13267 (OBS): Use LIBOBJS.
13268 (memmem.o): New rule.
13269 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13270 * configure: Regenerated.
13272 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13274 * server.c (handle_query): Never return "unsupported" for
13275 qXfer:features:read queries.
13277 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13279 * server.c (get_features_xml): Fix inverted condition.
13280 (handle_query): Always support qXfer:feature:read.
13282 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13284 * server.c (wrapper_argv): New.
13285 (start_inferior): Handle wrapper_argv. If set, expect an extra
13287 (gdbserver_usage): Document --wrapper.
13288 (main): Parse --wrapper.
13290 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13292 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13293 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13294 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13295 (ppc_set_pc): Likewise.
13296 (ppc_arch_setup): New function.
13297 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13298 of collect_register.
13299 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13301 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13303 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13304 instead of linux-ppc64-low.o.
13305 * linux-ppc64-low.c: Remove file.
13306 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13307 (linux-ppc64-low.o): Remove rule.
13309 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13310 (init_registers_powerpc_64): Likewise.
13311 (ppc_regmap): Conditionally define depending on __powerpc64__.
13312 (ppc_cannot_store_register): Do not special-case "fpscr" when
13313 compiled on __powerpc64__.
13314 (ppc_collect_ptrace_register): New function.
13315 (ppc_supply_ptrace_register): New function.
13316 (ppc_breakpoint): Change type to "unsigned int".
13317 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13318 (the_low_target): Conditionally provide initializers for the
13319 arch_setup member depending on __powerpc64__. Install
13320 collect_ptrace_register and supply_ptrace_register members.
13322 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13324 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13325 * server.c (gdbserver_xmltarget): Define.
13326 (get_features_xml): Use it to replace "target.xml" and arch_string.
13328 * configure.srv: Remove srv_xmltarget. Add XML files that were
13329 mentioned there to srv_xmlfiles instead. Remove conditional tests
13330 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13331 srv_xmlfiles and srv_regobj to include all possible choices.
13332 * configure.ac (srv_xmltarget): Remove.
13333 (srv_xmlfiles): Do not add "target.xml".
13334 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13335 checks for supplementary target information.
13336 * configure: Regenerate.
13337 * Makefile.in (XML_TARGET): Remove.
13338 (target.xml): Remove rule.
13339 (clean): Do not clean up target.xml.
13340 (.PRECIOUS): Do not mention target.xml.
13342 * target.h (struct target_ops): Remove arch_string member.
13343 * linux-low.c (linux_arch_string): Remove.
13344 (linux_target_ops): Remove arch_string initializer.
13345 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13346 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13347 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13348 * spu-low.c (spu_arch_string): Remove.
13349 (spu_target_ops): Remove arch_string initializer.
13350 * win32-low.c (win32_arch_string): Remove.
13351 (win32_target_ops): Remove arch_string initializer.
13352 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13353 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13354 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13356 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13358 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13359 by collect_ptrace_register and supply_ptrace_register hooks.
13360 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13361 instead of checking for the_low_target.left_pad_xfer.
13362 (usr_store_inferior_registers): Use collect_ptrace_register callback
13363 instead of checking for the_low_target.left_pad_xfer.
13365 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13366 (s390_supply_ptrace_register): Likewise.
13367 (s390_fill_gregset): Call s390_collect_ptrace_register.
13368 (the_low_target): Update.
13370 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13371 (ppc_supply_ptrace_register): Likewise.
13372 (the_low_target): Update.
13374 * linux-i386-low.c (the_low_target): Update.
13375 * linux-x86-64-low.c (the_low_target): Update.
13377 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13379 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13380 reg-s390.o and reg-s390x.o.
13382 * linux-low.c (new_inferior): New global variable.
13383 (linux_create_inferior, linux_attach): Set it.
13384 (linux_wait_for_process): Call the_low_target.arch_setup after the
13385 target has stopped for the first time.
13386 (initialize_low): Do not call the_low_target.arch_setup.
13388 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13389 (s390_set_pc): Likewise.
13390 (s390_arch_setup): New function.
13391 (the_low_target): Use s390_arch_setup as arch_setup routine.
13393 * regcache.c (realloc_register_cache): New function.
13394 (set_register_cache): Call it for each existing regcache.
13396 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13398 * server.h (init_registers): Remove prototype.
13400 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13401 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13402 instead of init_registers ().
13403 * linux-arm-low.c (init_registers_arm): Add prototype.
13404 (init_registers_arm_with_iwmmxt): Likewise.
13405 (the_low_target): Add initializer for arch_setup field.
13406 * linux-cris-low.c (init_registers_cris): Add prototype.
13407 (the_low_target): Add initializer for arch_setup field.
13408 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13409 (the_low_target): Add initializer for arch_setup field.
13410 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13411 (the_low_target): Add initializer for arch_setup field.
13412 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13413 (the_low_target): Add initializer for arch_setup field.
13414 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13415 (the_low_target): Add initializer for arch_setup field.
13416 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13417 (the_low_target): Add initializer for arch_setup field.
13418 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13419 (init_registers_mips64_linux): Likewise.
13420 (the_low_target): Add initializer for arch_setup field.
13421 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13422 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13423 (the_low_target): Add initializer for arch_setup field.
13424 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13425 (init_registers_powerpc_64): Likewise.
13426 (the_low_target): Add initializer for arch_setup field.
13427 * linux-s390-low.c (init_registers_s390): Add prototype.
13428 (init_registers_s390x): Likewise.
13429 (the_low_target): Add initializer for arch_setup field.
13430 * linux-sh-low.c (init_registers_sh): Add prototype.
13431 (the_low_target): Add initializer for arch_setup field.
13432 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13433 (the_low_target): Add initializer for arch_setup field.
13434 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13435 (the_low_target): Add initializer for arch_setup field.
13437 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13438 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13439 instead of init_registers ().
13440 * win32-arm-low.c (init_registers_arm): Add prototype.
13441 (the_low_target): Add initializer for arch_setup field.
13442 * win32-i386-low.c (init_registers_i386): Add prototype.
13443 (the_low_target): Add initializer for arch_setup field.
13445 * spu-low.c (init_registers_spu): Add prototype.
13446 (initialize_low): Call initialie_registers_spu () instead of
13447 initialize_registers ().
13449 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13451 * server.c (handle_v_requests): When handling the vRun and vAttach
13452 packets, if already debugging a process, don't kill it. Return an
13455 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13457 * server.c (handle_query): Correct length check.
13459 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13461 * win32-low.c (do_initial_child_stuff): Add process handle
13462 parameter. Set current_process_handle and current_process_id from the
13463 parameters. Clear globals.
13464 (win32_create_inferior): Don't set current_process_handle and
13465 current_process_id here. Instead pass them on the call to
13466 do_initial_child_stuff.
13467 (win32_attach): Likewise.
13468 (win32_clear_inferiors): New.
13469 (win32_kill): Don't close the current process handle or the
13470 current thread handle here. Instead call win32_clear_inferiors.
13471 (win32_detach): Don't open a new handle to the process. Call
13472 win32_clear_inferiors.
13473 (win32_join): Don't rely on current_process_handle; open a new
13474 handle using the process id.
13475 (win32_wait): Call win32_clear_inferiors when the inferior process
13478 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13480 * server.c (monitor_show_help): Add "exit".
13482 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13484 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13485 (clean): Add reg-xtensa.c.
13486 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13487 * configure.srv (xtensa*-*-linux*) New target.
13488 * linux-xtensa-low.c: New.
13489 * xtensa-xtregs.c: New.
13491 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13493 * hostio.c: Don't include errno.h.
13494 (errno_to_fileio_errno): Move to hostio-errno.
13495 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13496 error number outputting to the target->hostio_last_error callback.
13497 (hostio_packet_error): Use FILEIO_EINVAL directly.
13498 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13499 calls to hostio_error.
13500 * hostio-errno.c: New.
13501 * server.h (hostio_last_error_from_errno): Declare.
13502 * target.h (target_ops): Add hostio_last_error member.
13503 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13504 as hostio_last_error handler.
13505 * spu-low.c (spu_target_ops): Likewise.
13506 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13507 (wince_hostio_last_error): New functions.
13508 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13509 as hostio_last_error handler.
13510 (win32_target_ops) [!_WIN32_WCE]: Register
13511 hostio_last_error_from_errno as hostio_last_error handler.
13512 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13513 (hostio-errno.o): New rule.
13514 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13515 * configure.srv (srv_hostio_err_objs): New variable. Default to
13517 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13518 * configure: Regenerate.
13520 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13522 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13523 (linux_kill, linux_detach): Clean up the process list.
13524 * remote-utils.c (remote_open): Improve port number parsing.
13525 (putpkt_binary, input_interrupt): Only send interrupts if the target
13527 * server.c (extended_protocol): Make static.
13528 (attached): Define earlier.
13529 (exit_requested, response_needed, program_argv): New variables.
13530 (target_running): New.
13531 (start_inferior): Clear attached here.
13532 (attach_inferior): Set attached here.
13533 (require_running): Define.
13534 (handle_query): Use require_running and target_running. Implement
13536 (handle_v_attach, handle_v_run): New.
13537 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13538 (gdbserver_usage): Update.
13539 (main): Redo argument parsing. Handle --debug and --multi. Handle
13540 --attach along with other options or after the port. Save
13541 program_argv. Support no initial program. Resynchronize
13542 communication with GDB after an error. Handle "monitor exit".
13543 Use require_running and target_running. Always allow the extended
13544 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13545 restart in extended mode.
13546 * README: Refer to the GDB manual. Update --attach usage.
13548 2007-12-20 Andreas Schwab <schwab@suse.de>
13550 * linux-low.c (STACK_SIZE): Define.
13551 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13552 (linux_test_for_tracefork): Likewise.
13554 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13556 * linux-low.c (linux_wait_for_event): Update messages. Do not
13557 reinsert auto-delete breakpoints.
13558 * mem-break.c (struct breakpoint): Change return type of handler to
13560 (set_breakpoint_at): Update handler type.
13561 (reinsert_breakpoint_handler): Return 1 instead of calling
13563 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13565 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13566 * mem-break.h (set_breakpoint_at): Update handler type.
13567 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13568 * win32-low.c (auto_delete_breakpoint): New.
13569 (get_child_debug_event): Use it.
13571 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13573 * configure.ac: Check for pread and pwrite.
13574 * hostio.c (handle_pread): Fall back to lseek and read.
13575 (handle_pwrite): Fall back to lseek and write.
13576 * config.in, configure: Regenerated.
13578 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13580 * server.c (myresume): Add own_buf argument.
13581 (main): Update calls.
13583 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13585 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13586 * remote-utils.c (remote_open): Do not call disable_async_io.
13587 (block_async_io): Delete.
13588 (unblock_async_io): Make static.
13589 (initialize_async_io): New.
13590 * server.c (handle_v_cont): Handle async I/O here.
13591 (myresume): Likewise. Move other common resume tasks here...
13592 (main): ... from here. Call initialize_async_io. Disable async
13593 I/O before the main loop.
13594 * server.h (initialize_async_io): Declare.
13595 (block_async_io, unblock_async_io): Delete prototypes.
13596 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13598 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13600 * remote-utils.c (readchar): Allow binary data in received messages.
13602 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13604 * win32-low.c (attaching): New global.
13605 (win32_create_inferior): Clear the `attaching' global.
13606 (win32_attach): Set the `attaching' global.
13607 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13608 attaching. Only set a breakpoint at the entry point if not
13611 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13613 * server.c (main): Don't report dll events on the initial
13614 connection on attaches.
13616 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13618 * server.c (main): Relax numerical bases supported for the pid of
13619 the --attach command line argument.
13621 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13623 * win32-low.c (win32_attach): Call OpenProcess before
13624 DebugActiveProcess, not after. Add last error output to error
13627 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13629 * win32-low.c (win32_get_thread_context)
13630 (win32_set_thread_context): New functions.
13631 (thread_rec): Use win32_get_thread_context.
13632 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13633 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13636 2007-12-03 Leo Zayas
13637 Pedro Alves <pedro_alves@portugalmail.pt>
13639 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13641 (child_add_thread): Minor cleanup.
13642 (child_continue): Resume artificially suspended threads before
13643 calling ContinueDebugEvent.
13644 (suspend_one_thread): New.
13645 (fake_breakpoint_event): New.
13646 (get_child_debug_event): Change return type to int. Check here if
13647 gdb sent an interrupt request. If a soft interrupt was requested,
13648 fake a breakpoint event. Return 0 if there is no event to handle,
13650 (win32_wait): Don't check here if gdb sent an interrupt request.
13651 Ensure there is a valid event to handle.
13652 (win32_request_interrupt): Add soft interruption method as last
13655 2007-12-03 Leo Zayas
13656 Pedro Alves <pedro_alves@portugalmail.pt>
13658 * win32-low.h (win32_thread_info): Add descriptions to the
13659 structure members. Replace `suspend_count' counter by a
13661 * win32-low.c (thread_rec): Update condition of when to get the
13662 context from the inferior. Rely on ContextFlags being set if it
13663 has already been retrieved. Only suspend the inferior thread if
13664 we haven't already. Warn if that fails.
13665 (continue_one_thread): s/suspend_count/suspended/. Only call
13666 ResumeThread once. Warn if that fails.
13668 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13670 * win32-low.c (win32_wait): Don't read from the inferior when it
13671 has already exited.
13673 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13675 * Makefile.in (win32_low_h): New variable.
13676 (win32-low.o): Add dependency on $(win32_low_h).
13677 (win32-arm-low.o, win32-i386-low.o): New rules.
13679 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13681 * hostio.c: Correct copyright year.
13683 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13685 * Makefile.in (OBS): Add hostio.o.
13686 (hostio.o): New rule.
13687 * server.h (handle_vFile): Declare.
13688 * hostio.c: New file.
13689 * server.c (handle_v_requests): Take packet_len and new_packet_len
13690 for binary packets. Call handle_vFile.
13691 (main): Update call to handle_v_requests.
13693 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13695 * linux-low.c: Include <sched.h>.
13697 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13699 * linux-low.c (linux_tracefork_grandchild): New.
13700 (linux_tracefork_child): Use clone.
13701 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13703 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13705 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13707 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13709 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13711 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13713 * inferiors.c (change_inferior_id): Delete.
13714 (add_pid_to_list, pull_pid_from_list): New.
13715 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13716 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13717 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13718 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13719 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13720 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13721 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13722 (using_threads): Always set to 1.
13723 (handle_extended_wait): New.
13724 (add_process): Do not set TID.
13725 (linux_create_inferior): Set must_set_ptrace_flags.
13726 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13727 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13728 (linux_thread_alive): Rename TID argument to LWPID.
13729 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13730 (linux_wait_for_event): Do not use TID or check using_threads. Update
13731 call to dead_thread_notify. Call handle_extended_wait.
13732 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13733 (send_sigstop): Delete sigstop_sent.
13734 (wait_for_sigstop): Avoid TID.
13735 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13736 (linux_test_for_tracefork): New.
13737 (linux_lookup_signals): Use thread_db_active and
13738 linux_supports_tracefork_flag.
13739 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13740 * linux-low.h (get_process_thread): Avoid TID.
13741 (struct process_ifo): Move thread_known and tid to the end. Remove
13743 (linux_attach_lwp, thread_db_init): Update prototypes.
13744 * server.h (change_inferior_id): Delete prototype.
13745 (add_pid_to_list, pull_pid_from_list): New prototypes.
13746 * thread-db.c (thread_db_use_events): New.
13747 (find_first_thread): Rename to...
13748 (find_one_thread): ...this. Update callers and messages. Do not
13749 call fatal. Check thread_db_use_events. Do not call
13750 change_inferior_id or new_thread_notify.
13751 (maybe_attach_thread): Update. Do not call new_thread_notify.
13752 (thread_db_init): Set thread_db_use_events. Check use_events.
13753 * utils.c (fatal, warning): Correct message prefix.
13755 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13757 * Makefile.in (clean): Remove new files.
13758 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13759 (powerpc-64.o, powerpc-64.c): New rules.
13760 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13761 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13763 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13765 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13766 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13767 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13768 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13769 (target_regsets): Add AltiVec and SPE register sets.
13770 * configure.ac: Check for AltiVec and SPE.
13771 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13772 (ppc_fill_vrregset, ppc_store_vrregset): New.
13773 (target_regsets): Add AltiVec register set.
13774 * configure: Regenerated.
13776 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13778 * linux-low.c (O_LARGEFILE): Define.
13779 (linux_read_memory): Use /proc/PID/mem.
13780 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13781 * configure, config.in: Regenerated.
13783 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13785 * linux-low.c (linux_wait_for_event): Do not pass signals while
13788 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13790 * win32-low.c (create_process): New.
13791 (win32_create_inferior): Use create_process instead of
13792 CreateProcess. If create_process failed retry appending an ".exe"
13793 suffix. Store the GetLastError result immediatelly after
13794 create_process calls and use it on the call to error.
13796 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13798 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13800 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13802 * configure.ac: Switch license to GPLv3.
13804 2007-08-01 Michael Snyder <msnyder@access-company.com>
13806 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13808 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13810 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13812 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13813 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13814 CloseToolhelp32Snapshot.
13815 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13816 CloseToolhelp32Snapshot.
13818 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13820 * server.c (main): Check for inferior exit before main loop.
13822 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13824 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13825 instead of on tmp_desc.
13827 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13828 Daniel Jacobowitz <dan@codesourcery.com>
13830 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13831 (add_thread): Minor cleanups.
13832 (clear_inferiors): Move lower in the file. Clear the DLL
13834 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13835 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13836 (xml_escape_text): New.
13837 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13839 (handle_v_cont): Report errors.
13840 (gdbserver_version): Update.
13841 (main): Correct size of own_buf. Do not report initial DLL events.
13842 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13843 (unloaded_dll, xml_escape_text): New.
13844 * win32-low.c (enum target_waitkind): Update comments.
13845 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13846 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13847 (win32_EnumProcessModules, win32_GetModuleInformation)
13848 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13849 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13850 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13851 (win32_Module32First, win32_Module32Next, load_toolhelp)
13852 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13853 (get_child_debug_event): Handle DLL events.
13854 (win32_wait): Likewise.
13856 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13858 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13859 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13861 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13863 * win32-low.c (handle_output_debug_string): Ignore event if not
13866 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13868 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13870 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13872 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13874 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13876 * inferiors.c (change_inferior_id): Add comment.
13877 * linux-low.c (check_removed_breakpoint): Add an early
13878 prototype. Improve debug output.
13879 (linux_attach): Doc update.
13880 (linux_detach_one_process, linux_detach): Clean up before releasing
13882 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13883 * linux-low.h (struct process_info): Doc improvement.
13884 * mem-break.c (delete_all_breakpoints): New.
13885 * mem-break.h (delete_all_breakpoints): New prototype.
13886 * thread-db.c (find_first_thread): New.
13887 (thread_db_create_event): Call it instead of
13888 thread_db_find_new_threads. Clean up unused variables.
13889 (maybe_attach_thread): Remove first thread handling.
13890 (thread_db_find_new_threads): Use find_first_thread.
13891 (thread_db_get_tls_address): Likewise.
13893 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13895 * thread-db.c (thread_db_find_new_threads): Add prototype.
13896 (thread_db_create_event): Check for the main thread before adding
13898 (maybe_attach_thread): Only enable event reporting if TID == 0.
13899 (thread_db_get_tls_address): Check for new threads.
13901 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13903 * linux-low.c (linux_create_inferior): Try execv before execvp.
13904 * spu-low.c (spu_create_inferior): Likewise.
13906 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13908 * linux-low.c (linux_create_inferior): Change execv to execvp.
13909 * spu-low.c (spu_create_inferior): Likewies.
13911 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13913 * Makefile.in (clean): Clean new files instead of deleted ones.
13914 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13915 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13917 * configure.srv: Specify XML files and new regformats for MIPS and
13919 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13920 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13921 an entry for the restart register.
13922 (mips_cannot_fetch_register, mips_cannot_store_register)
13923 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13924 register names to match the XML descriptions.
13925 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13926 restart register instead of $0.
13928 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13929 Markus Deuling <deuling@de.ibm.com>
13931 * remote-utils.c (decode_xfer_write): New function.
13932 * server.h (decode_xfer_write): Add prototype.
13933 * server.c (handle_query): Add PACKET_LEN argument. Support
13934 qXfer:spu:read and qXfer:spu:write packets.
13935 (main): Pass packet_len to handle_query.
13936 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13937 * target.h (target_ops): Add qxfer_spu.
13939 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13941 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13942 accessing non-seekable spufs files.
13944 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13946 * server.c (handle_query): Add reply for qC packet.
13948 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13949 Leo Zayas <lerele@champenstudios@com>
13951 * server.h (check_remote_input_interrupt_request): New function.
13952 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13953 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13954 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13955 (check_remote_input_interrupt_request): New function.
13956 * server.h (check_remote_input_interrupt_request): Declare.
13957 * win32-low.c (winapi_DebugBreakProcess,
13958 winapi_GenerateConsoleCtrlEvent): New typedefs.
13959 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13961 (win32_wait): Check for remote interrupt request
13962 with check_remote_input_interrupt_request.
13963 (win32_request_interrupt): New function.
13964 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13966 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13968 * win32-low.c (debug_registers_changed,
13969 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13970 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13971 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13972 (thread_rec): Get context using the low target.
13973 (child_add_thread): Call thread_added on the low target,
13974 which does the same thing.
13976 (do_initial_child_stuff): Remove debug registers references.
13977 Set context using the low target. Resume threads after
13978 setting the contexts.
13979 (child_continue): Remove dead variable. Remove debug
13980 registers references.
13981 (child_fetch_inferior_registers): Go through the low target.
13982 (do_child_store_inferior_registers): Remove.
13983 (child_store_inferior_registers): Go through the low target.
13984 (win32_resume): Remove debug registers references.
13985 Set context using the low target.
13986 (handle_exception): Change return type to void. Don't record
13987 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13988 first chance exception.
13989 (get_child_debug_event): Change return type to void. Remove
13990 goto loop. Always return after waiting for debug event.
13991 (win32_wait): Convert to switch statement. Handle spurious
13994 * win32-i386-low.c (debug_registers_changed,
13995 debug_registers_used): New.
13996 (initial_stuff): Rename to ...
13997 (i386_initial_stuff): ... this. Clear debug registers
13999 (store_debug_registers): Delete.
14000 (i386_get_thread_context): New.
14001 (load_debug_registers): Delete.
14002 (i386_set_thread_context): New.
14003 (i386_thread_added): New.
14004 (single_step): Rename to ...
14005 (i386_single_step): ... this.
14006 (do_fetch_inferior_registers): Rename to ...
14007 (i386_fetch_inferior_register): ... this.
14008 (i386_store_inferior_register): New.
14009 (the_low_target): Adapt to new interface.
14011 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14012 (arm_get_thread_context): New.
14013 (arm_set_thread_context): New.
14015 (do_fetch_inferior_registers): Rename to ...
14016 (arm_fetch_inferior_register): ... this.
14017 (arm_store_inferior_register): New.
14018 (arm_wince_breakpoint): Reimplement as unsigned long.
14019 (arm_wince_breakpoint_len): Define.
14020 (the_low_target): Adapt to new interface.
14022 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14023 load_debug_registers. Add get_thread_context, set_thread_context,
14024 thread_added and store_inferior_register. Rename
14025 fetch_inferior_registers to fetch_inferior_register.
14026 (regptr): Remove declaration.
14028 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14030 * linux-low.c (linux_detach): Change return type to int. Return 0.
14031 * spu-low.c (spu_detach): Likewise.
14033 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14035 * target.h (target_ops): Change return type of detach to int.
14037 (join_inferior): New.
14038 * server.c (main): Don't skip detach support on mingw32.
14039 If the inferior doesn't support detaching return error.
14040 Call join_inferior instead of using waitpid.
14041 * linux-low.c (linux_join): New.
14042 (linux_target_op): Add linux_join.
14043 * spu-low.c (spu_join): New.
14044 (spu_target_ops): Add spu_join.
14045 * win32-low.c (win32_detach): Adapt to new interface.
14046 Reopen current_process_handle before detaching. Issue a child
14047 resume before detaching.
14049 (win32_target_op): Add win32_join.
14051 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14053 * win32-low.c (win32-attach): Fix return value.
14054 * target.h (target_ops): Describe ATTACH return values.
14056 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14058 * win32-low.c (GETPROCADDRESS): Define.
14059 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14060 (winapi_DebugSetProcessKillOnExit): Likewise.
14061 (win32_create_inferior): Force usage of ansi CreateProcessA.
14062 (win32_attach): Use GETPROCADDRESS.
14063 (win32_detach): Likewise.
14065 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14067 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14069 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14071 * win32-low.c: Commit leftover changes from 2007-03-29.
14073 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14075 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14076 fields short instead of int. Add explicit padding.
14077 (i387_cache_to_fsave): Remove unnecessary casts.
14078 (i387_fsave_to_cache): Doc fix.
14079 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14081 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14083 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14084 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14086 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14088 * configure.srv (arm*-*-mingw32ce*): Move near the other
14091 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14093 * configure.ac: Add errno checking.
14094 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14095 sys/file.h and malloc.h.
14096 (AC_CHECK_DECLS): Add perror.
14097 (srv_mingwce): Handle.
14098 * configure.srv (i[34567]86-*-cygwin*): Add
14099 win32-i386-low.o to srv_tgtobj.
14100 (i[34567]86-*-mingw*): Likewise.
14101 (arm*-*-mingw32ce*): Add case.
14102 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14103 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14104 [__MINGW32CE__] (strerror): New function.
14105 [__MINGW32CE__] (errno): Define to GetLastError.
14106 [__MINGW32CE__] (COUNTOF): New macro.
14107 (remote_open): Remove extra close call.
14108 * mem-break.c (delete_breakpoint_at): New function.
14109 * mem-break.h (delete_breakpoint_at): Declare.
14110 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14111 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14112 [USE_WIN32API] (read, write): Add char* casts.
14113 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14114 * server.h: Include wincecompat.h on Windows CE.
14115 [HAVE_ERRNO_H]: Check.
14116 (perror): Declare if not declared.
14117 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14118 (perror_with_name): Remove errno declaration.
14119 * wincecompat.h: New.
14120 * wincecompat.c: New.
14121 * win32-low.h: New.
14122 * win32-arm-low.c: New.
14123 * win32-i386-low.c: New.
14124 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14125 (OUTMSG2): Make it safe.
14127 (COUNTOF): New macro.
14128 (NUM_REGS): Get it from the low target.
14129 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14130 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14131 (thread_rec): Let low target handle debug registers.
14132 (child_add_thread): Likewise.
14133 (child_init_thread_list): Likewise.
14134 (continue_one_thread): Likewise.
14136 (do_child_fetch_inferior_registers): Move to ...
14137 * win32-i386-low.c: ... here, and rename to ...
14138 (do_fetch_inferior_registers): ... this.
14139 * win32-low.c (child_fetch_inferior_registers):
14140 Go through the low target.
14141 (do_child_store_inferior_registers): Use regptr.
14142 (strwinerror): New function.
14143 (win32_create_inferior): Handle Windows CE.
14144 Use strwinerror instead of strerror on Windows error
14145 codes. Add program to the error output.
14146 Don't close the main thread handle on Windows CE.
14147 (win32_attach): Use coredll.dll on Windows CE.
14148 (win32_kill): Close current process and current
14150 (win32_detach): Use coredll.dll on Windows CE.
14151 (win32_resume): Let low target handle debug registers, and
14153 (handle_exception): Add/Remove initial breakpoint. Avoid
14154 non-existant WSTOPSIG on Windows CE.
14155 (win32_read_inferior_memory): Cast to remove warning.
14156 (win32_arch_string): Go through the low target.
14157 (initialize_low): Call set_breakpoint_data with the low
14158 target's breakpoint.
14159 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14160 FOP_REGNUM, mappings): Move to ...
14161 * win32-i386-low.c: ... here.
14162 * win32-low.c (win32_thread_info): Move to ...
14163 * win32-low.h: ... here.
14164 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14165 win32-arm-low.c and wincecompat.c.
14166 (all:): Add $EXEEXT.
14167 (install-only:): Likewise.
14168 (gdbserver:): Likewise.
14169 (gdbreplay:): Likewise.
14170 * config.in: Regenerate.
14171 * configure: Regenerate.
14173 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14175 * win32-low.c: Rename typedef thread_info to
14176 win32_thread_info throughout.
14178 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14180 * win32-i386-low.c: Rename to ...
14181 * win32-low.c: ... this.
14182 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14183 * Makefile.in: Likewise.
14185 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14187 * remote-utils.c (monitor_output): Constify msg parameter.
14188 * server.h (monitor_output): Likewise.
14189 * win32-i386-low.c (handle_output_debug_string): New.
14190 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14191 handle_output_debug_string.
14192 (get_child_debug_event): Likewise.
14194 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14196 * server.c (main): Correct strtoul check.
14198 2007-03-27 Jon Ringle <jon@ringle.org>
14200 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14202 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14204 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14206 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14208 * terminal.h: Check HAVE_SGTTY_H.
14210 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14212 * remote-utils.c (remote_open): Print out the assigned port number.
14214 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14216 * remote-utils.c (monitor_output): New function.
14217 * server.c (debug_threads): Define here.
14218 (monitor_show_help): New function.
14219 (handle_query): Handle qRcmd.
14220 (main): Do not handle 'd' packet.
14221 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14222 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14225 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14227 * Makefile.in (EXEEXT): New.
14228 (clean): Use $(EXEEXT).
14230 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14232 * target.h (target_ops): Rename send_signal to request_interrupt,
14233 and remove enum target_signal parameter.
14234 * linux-low.c (linux_request_interrupt): Rename from
14235 linux_send_signal, and always send SIGINT.
14236 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14237 and always send SIGINT.
14238 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14240 (input_interrupt): Likewise.
14242 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14244 * server.c (get_features_xml): Check if target implemented
14246 * win32-i386-low.c (win32_arch_string): New.
14247 (win32_target_ops): Add win32_arch_string as arch_string member.
14249 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14251 * spu-low.c (spu_arch_string): New.
14252 (spu_target_ops): Add spu_arch_string.
14254 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14256 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14257 * configure.ac: Do not check for terminal.h.
14258 * configure, config.in: Regenerated.
14260 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14262 * Makefile.in (OBS): Add $(XML_BUILTIN).
14263 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14265 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14266 (arm-with-iwmmxt.c): New.
14267 * config.in, configure: Regenerate.
14268 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14269 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14270 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14271 (arm*-*-linux*): Add iWMMXt and regset support.
14272 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14273 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14274 (arm_store_wmmxregset, target_regsets): New.
14275 * server.c (get_features_xml): Take annex argument. Check builtin
14277 (handle_query): Handle multiple annexes.
14279 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14281 * remote-utils.c [USE_WIN32API] (read, write): Define.
14282 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14285 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14287 * linux-i386-low.c (the_low_target): Set arch_string.
14288 * linux-x86-64-low.c (the_low_target): Likewise.
14289 * linux-low.c (linux_arch_string): New.
14290 (linux_target_ops): Add it.
14291 * linux-low.h (struct linux_target_ops): Add arch_string.
14292 * server.c (write_qxfer_response): Use const void * for DATA.
14293 (get_features_xml): New.
14294 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14295 * target.h (struct target_ops): Add arch_string method.
14297 2007-01-03 Denis Pilat <denis.pilat@st.com>
14298 Daniel Jacobowitz <dan@codesourcery.com>
14300 * linux-low.c (linux_kill): Handle being called with no threads.
14301 * win32-i386-low.c (win32_kill): Likewise.
14302 (get_child_debug_event): Clear current_process_handle.
14304 2006-12-30 Denis PILAT <denis.pilat@st.com>
14305 Daniel Jacobowitz <dan@codesourcery.com>
14307 * remote-utils.c (remote_open): Check the type of specified
14308 serial port devices before opening them.
14309 * server.c (main): Kill the inferior if an error occurs during
14310 the first remote_open.
14312 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14314 * README: Update supported targets.
14316 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14318 * Makefile.in (clean): Remove reg-mips64.c.
14319 (reg-mips64.c, reg-mips64.o): New rules.
14320 * configure.srv: Handle mips64. Include regset support for mips.
14321 * linux-mips-low.c (union mips_register): New.
14322 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14323 (mips_breakpoint, mips_breakpoint_at): Use int.
14324 (mips_collect_register, mips_supply_register)
14325 (mips_collect_register_32bit, mips_supply_register_32bit)
14326 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14327 (mips_store_fpregset, target_regsets): New.
14328 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14330 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14332 * configure.srv: Add target "spu*-*-*".
14333 * Makefile.in (clean): Remove reg-spu.c.
14334 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14335 * spu-low.c: New file.
14337 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14339 * configure.ac: Correct td_thr_tls_get_addr test.
14340 * configure: Regenerated.
14342 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14344 * linux-low.c (linux_wait_for_event): Reformat. Use the
14345 pass_signals array.
14346 * remote-utils.c (decode_address_to_semicolon): New.
14347 * server.c (pass_signals, handle_general_set): New.
14348 (handle_query): Mention QPassSignals for qSupported.
14349 (main): Call handle_general_set.
14350 * server.h (pass_signals, decode_address_to_semicolon): New.
14352 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14354 * server.c (handle_query): Correct error handling for read_auxv.
14356 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14358 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14359 and srv_linux_thread_db to yes.
14360 * linux-s390-low.c (s390_fill_gregset): New function.
14361 (target_regsets): Define data structure.
14363 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14365 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14366 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14367 * config.in, configure: Regenerated.
14368 * inferiors.c (gdb_id_to_thread): New function.
14369 (gdb_id_to_thread_id): Use it.
14370 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14371 * linux-low.h (struct process_info): Add th member.
14372 (thread_db_get_tls_address): New prototype.
14373 * remote-utils.c (decode_address): Make non-static.
14374 * server.c (handle_query): Handle qGetTLSAddr.
14375 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14376 * target.h (struct target_ops): Add get_tls_address.
14377 * thread-db.c (maybe_attach_thread): Save the thread handle.
14378 (thread_db_get_tls_address): New.
14380 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14382 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14383 (linux_resume_one_process): Take a siginfo_t *. Update all
14384 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14385 (struct pending_signals): Add a siginfo_t.
14386 (linux_wait_for_process): Always set last_status.
14387 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14388 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14389 * linux-low.h (struct process_info): Add last_status.
14391 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14393 * remote-utils.c (try_rle): New function.
14394 (putpkt_binary): Use it.
14396 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14398 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14399 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14400 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14401 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14402 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14405 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14407 * server.c (terminal_fd): New variable.
14408 (old_foreground_pgrp): Likewise.
14409 (restore_old_foreground_pgrp): New function.
14410 (start_inferior): Record the terminal file descriptor in terminal_fd
14411 and its original foreground group in old_foreground_pgrp. Register
14412 restore_old_foreground_pgrp with atexit().
14414 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14416 * server.c (handle_query): Correct qPart to qXfer.
14418 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14420 * configure.ac: Check for more headers which are missing on
14421 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14422 * configure.srv: Add Cygwin and mingw32.
14423 * remote-utils.c: Don't include headers unconditionally which
14424 are missing on mingw32. Include <winsock.h> for mingw32.
14425 (remote_open): Adjust for mingw32 support. Flush
14426 standard error after writing to it.
14427 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14428 (unblock_async_io, enable_async_io, disable_async_io)
14429 (readchar, getpkt): Update for Winsock support.
14430 (prepare_resume_reply): Expect a protocol signal number.
14431 * server.c: Disable <sys/wait.h> on mingw32.
14432 (start_inferior): Adjust for mingw32 support. Flush
14433 standard error after writing to it.
14434 (attach_inferior): Likewise. Use protocol signal
14436 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14438 * win32-i386-low.c: New file.
14439 * Makefile.in (XM_CLIBS): Set.
14440 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14441 (win32-i386-low.o): New dependency rule.
14442 * linux-low.c (linux_wait): Use target signal numbers.
14443 * target.h (struct target_ops): Doc fix.
14444 * server.h (target_signal_to_name): New prototype.
14445 * gdbreplay.c: Don't include headers unconditionally which
14446 are missing on mingw32. Include <winsock.h> for mingw32.
14447 (remote_close, remote_open): Adjust for Winsock support.
14448 * configure, config.in: Regenerated.
14450 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14452 * server.c (decode_xfer_read, write_qxfer_response): New.
14453 (handle_query): Take a packet length argument. Handle
14454 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14455 the qSupported response.
14456 (main): Update call to handle_query.
14458 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14460 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14461 (putpkt_binary): Renamed from putpkt and adjusted for binary
14463 (putpkt): New wrapper for putpkt_binary.
14464 (readchar): Don't mask off the high bit.
14465 (decode_X_packet): New function.
14466 * server.c (main): Call putpkt_binary if a handler sets the packet
14467 length. Save the length of the incoming packet. Handle 'X'.
14468 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14470 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14472 * server.c (handle_query): Handle qSupported.
14474 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14476 * remote-utils.c (all_symbols_looked_up): New variable.
14477 (look_up_one_symbol): Check it.
14478 * server.h (look_up_one_symbol): New declaration.
14479 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14481 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14483 * Makefile.in (linux-arm-low.o): Update dependencies.
14484 * linux-arm-low.c: Include "gdb_proc_service.h".
14485 (PTRACE_GET_THREAD_AREA): Define.
14486 (ps_get_thread_area): New function.
14488 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14490 * configure.srv (m68k*-*-uclinux*): New target.
14491 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14492 (linux_resume_one_process): Remove extraneous cast.
14493 (linux_read_offsets): New.
14494 (linux_target_op): Add linux_read_offsets on mmuless systems.
14495 * server.c (handle_query): Add qOffsets logic.
14496 * target.h (struct target_ops): Add read_offsets.
14498 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14500 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14501 (PTRACE_GET_THREAD_AREA): Define.
14502 (ps_get_thread_area): New function.
14503 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14504 (linux-x86-64-low.o): Update.
14506 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14508 * configure.ac: Remove checks for prfpregset_t.
14509 * gdb_proc_service.h: New file.
14510 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14511 new "gdb_proc_service.h".
14512 * proc-service.c: Likewise.
14513 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14514 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14515 * Makefile.in (gdb_proc_service_h): Updated.
14516 * configure, config.in: Regenerated.
14518 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14520 * remote-utils.c (prepare_resume_reply): Move declaration
14521 of gdb_id_from_wait to the top of the block.
14523 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14525 * linux-low.c (regsets_store_inferior_registers): Read the regset
14526 from the target before filling it.
14528 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14530 * server.c (attach_inferior): Return SIGTRAP for a successful
14533 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14535 * Makefile.in (OBS): Add version.o.
14536 (STAGESTUFF): Delete.
14537 (version.o): Add dependencies.
14538 (version.c): Replace rule.
14539 (clean): Remove version.c.
14540 * server.c (gdbserver_version): New.
14541 (gdbserver_usage): Use printf.
14542 (main): Handle --version and --help.
14543 * server.h (version, host_name): Add declarations.
14545 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14557 * linux-x86-64-low.c:
14559 * linux-s390-low.c:
14560 * linux-ppc64-low.c:
14562 * linux-mips-low.c:
14563 * linux-m68k-low.c:
14564 * linux-m32r-low.c:
14567 * linux-ia64-low.c:
14568 * linux-i386-low.c:
14569 * linux-crisv32-low.c:
14581 * gdbserver.1: Add (C) after Copyright. Update the FSF
14584 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14586 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14587 (arm_breakpoint_at): Recognize both breakpoints.
14588 (the_low_target): Use the correct breakpoint instruction.
14590 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14592 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14593 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14594 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14595 (the_low_target): Update.
14597 2005-10-25 Andreas Schwab <schwab@suse.de>
14599 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14601 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14602 (ia64_num_regs): Reduce to 462.
14604 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14606 * acinclude.m4: Correct quoting.
14607 * aclocal.m4: Regenerated.
14609 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14610 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14611 (thread_db_init): Call thread_db_err_str.
14612 * configure.ac: Check for TD_VERSION.
14613 * config.in, configure: Regenerated.
14615 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14617 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14619 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14621 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14622 is not available. Define HAVE_PTRACE_GETREGS if it is.
14623 * config.in, configure: Regenerated.
14624 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14625 * linux-i386-low.c, linux-m68k-low.c: Update to use
14626 HAVE_PTRACE_GETREGS.
14627 * linux-low.c (regsets_fetch_inferior_registers)
14628 (regsets_store_inferior_registers): Only return 0 if we processed
14630 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14631 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14633 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14635 * inferiors.c (struct thread_info): Add gdb_id.
14636 (add_thread): Add gdb_id argument.
14637 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14638 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14639 calls to add_thread.
14640 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14641 * server.c (handle_query): Use thread_to_gdb_id.
14642 (handle_v_cont, main): Use gdb_id_to_thread_id.
14643 * server.h (add_thread): Update prototype.
14644 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14647 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14649 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14650 left-padded registers.
14651 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14652 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14654 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14656 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14657 * configure: Regenerate.
14658 * config.in: Regenerate.
14659 * server.h (NEED_DECLARATION_STRERROR):
14660 Replace with !HAVE_DECL_STRERROR.
14662 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14664 * linux-low.c (linux_wait, linux_send_signal): Don't test
14665 an unsigned long variable for > 0 if it could be MAX_ULONG.
14666 * server.c (myresume): Likewise.
14667 * target.c (set_desired_inferior): Likewise.
14669 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14671 * configure.ac: Simplify and improve check for socklen_t.
14672 * configure, config.in: Regenerate.
14674 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14676 * acconfig.h: Remove.
14677 * configure.ac: Add a test for socklen_t. Use three-argument
14678 AC_DEFINE throughout.
14679 * config.in: Regenerated using autoheader 2.59.
14680 * configure: Regenerated.
14682 * gdbreplay.c (socklen_t): Provide a default.
14683 (remote_open): Use socklen_t.
14684 * remote-utils.c (socklen_t): Provide a default.
14685 (remote_open): Use socklen_t.
14686 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14689 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14691 * linux-low.c (linux_read_memory, linux_write_memory)
14692 (linux_read_auxv): Likewise.
14693 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14694 (check_mem_write): Likewise.
14695 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14697 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14698 (registers_from_string, register_data): Likewise.
14699 * server.c (handle_query, main): Likewise.
14700 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14701 (decode_M_packet): Likewise.
14702 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14703 * target.h (struct target_ops): Update read_memory, write_memory,
14705 (read_inferior_memory, write_inferior_memory): Update.
14706 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14707 to unsigned char *.
14708 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14709 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14710 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14711 linux-s390-low.c, linux-sh-low.c: Update for changes in
14712 read_inferior_memory and the_low_target->breakpoint.
14714 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14716 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14717 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14718 * configure.srv: Add powerpc64-*-linux*.
14719 * linux-ppc64-low.c: New file.
14721 2005-05-23 Orjan Friberg <orjanf@axis.com>
14723 * linux-cris-low.c: New file with support for CRIS.
14724 * linux-crisv32-low.c: Ditto for CRISv32.
14725 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14726 (clean): Add reg-cris.c and reg-crisv32.c.
14727 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14728 reg-crisv32.o, and reg-crisv32.c to make rules.
14729 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14730 recognized targets.
14732 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14734 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14735 of sizeof (PTRACE_XFER_TYPE).
14736 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14738 2005-05-12 Orjan Friberg <orjanf@axis.com>
14740 * target.h (struct target_ops): Add insert_watchpoint,
14741 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14742 pointers for hardware watchpoint support.
14743 * linux-low.h (struct linux_target_ops): Ditto.
14744 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14745 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14746 to linux_target_ops.
14747 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14749 * server.c (main): Recognize 'Z' and 'z' packets.
14751 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14753 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14754 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14755 (the_low_target): Add new members.
14757 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14759 * proc-service.c (ps_lgetregs): Search all_processes instead of
14762 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14764 * server.c (start_inferior): Change return type to int.
14765 (attach_inferior): Change sigptr to int *.
14766 (handle_v_cont, handle_v_requests): Change signal to int *.
14767 (main): Change signal to int.
14769 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14771 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14772 * configure.srv: Add m32r*-*-linux*.
14773 * linux-m32r-low.c: New file.
14775 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14777 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14779 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14781 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14782 Take unsigned long arguments for PIDs.
14783 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14784 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14785 (wait_for_sigstop, linux_resume_one_process)
14786 (regsets_fetch_inferior_registers, linux_send_signal)
14787 (linux_read_auxv): Likewise. Update the types of variables holding
14788 PIDs. Update format string specifiers.
14789 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14790 * remote-utils.c (prepare_resume_reply): Likewise.
14791 * server.c (cont_thread, general_thread, step_thread)
14792 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14794 (handle_query): Update format specifiers.
14795 (handle_v_cont, main): Use strtoul for thread IDs.
14796 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14797 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14798 (general_thread, step_thread, thread_from_wait)
14799 (old_thread_from_wait): Update.
14800 * target.h (struct thread_resume): Use unsigned long for THREAD.
14801 (struct target_ops): Use unsigned long for arguments to attach and
14804 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14806 * acinclude.m4: Include bfd/bfd.m4 directly.
14807 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14808 <agriffis@toolchain.org>.
14809 * aclocal.m4, configure: Regenerated.
14811 2005-01-07 Andrew Cagney <cagney@gnu.org>
14813 * configure.ac: Rename configure.in, require autoconf 2.59.
14814 * configure: Re-generate.
14816 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14818 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14819 LIBS when finished.
14820 * aclocal.m4: Regenerated.
14821 * configure: Regenerated.
14823 2004-11-21 Andreas Schwab <schwab@suse.de>
14825 * linux-m68k-low.c (m68k_num_gregs): Define.
14826 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14827 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14828 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14829 (m68k_breakpoint_at): New. Add to the_low_target.
14831 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14832 srv_linux_thread_db to yes.
14834 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14836 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14837 (ARCH_SET_FS): Likewise.
14838 (ARCH_GET_FS): Likewise.
14839 (ARCH_GET_GS): Likewise.
14841 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14843 * linux-i386-low.c (ps_get_thread_area): New.
14844 * linux-x86-64-low.c (ps_get_thread_area): New.
14845 * linux-low.c: Include <sys/syscall.h>.
14846 (linux_kill_one_process): Don't kill the first thread here.
14847 (linux_kill): Kill the first thread here.
14848 (kill_lwp): New function.
14849 (send_sigstop, linux_send_signal): Use it.
14850 * proc-service.c: Clean up #ifdefs.
14851 (fpregset_info): Delete.
14852 (ps_lgetregs): Update and enable implementation.
14853 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14855 * remote-utils.c (struct sym_cache, symbol_cache): New.
14856 (input_interrupt): Print a clearer message.
14857 (async_io_enabled): New variable.
14858 (enable_async_io, disable_async_io): Use it. Update comments.
14859 (look_up_one_symbol): Use the symbol cache.
14860 * thread-db.c (thread_db_look_up_symbols): New function.
14861 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14863 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14865 * configure.in: Test for -rdynamic.
14866 * configure: Regenerated.
14867 * Makefile (INTERNAL_LDFLAGS): New.
14868 (gdbserver, gdbreplay): Use it.
14870 2004-09-02 Andrew Cagney <cagney@gnu.org>
14872 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14874 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14876 * linux-low.c (linux_wait): Clear all_processes list also.
14878 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14880 * linux-low.c: Include <errno.h>. Remove extern declaration of
14883 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14885 * gdbreplay.c, server.h, utils.c: Update copyright years.
14887 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14889 * server.c (main): Print child status or termination signal from
14890 variable 'signal', not 'sig'.
14892 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14894 * linux-low.c (linux_read_memory): Change return type to
14895 int. Check for and return error from ptrace().
14896 * target.c (read_inferior_memory): Change return type to int. Pass
14897 back return status from the_target->read_memory().
14898 * target.h (struct target_ops): Adapt *read_memory() prototype.
14900 (read_inferior_memory): Adapt prototype.
14901 * server.c (main): Return an error packet if
14902 read_inferior_memory() returns an error.
14904 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14906 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14907 Unify with other clean targets.
14909 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14911 * server.c (handle_v_cont): Call set_desired_inferior.
14913 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14915 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14917 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14919 * linux-low.c (linux_wait): Unblock async I/O.
14920 (linux_resume): Block and enable async I/O.
14921 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14922 * server.h (block_async_io, unblock_async_io): Add prototypes.
14924 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14926 * remote-utils.c (remote_open): Print a status notice after
14927 opening a TCP port.
14928 * server.c (attach_inferior): Print a status notice after
14931 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14933 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14935 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14937 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14939 * server.c, target.h: Update copyright years.
14941 2004-02-25 Roland McGrath <roland@redhat.com>
14943 * target.h (struct target_ops): New member `read_auxv'.
14944 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14945 * linux-low.c (linux_read_auxv): New function.
14946 (linux_target_ops): Initialize `read_auxv' member to that.
14948 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14950 Committed by Jim Blandy <jimb@redhat.com>.
14952 * linux-s390-low.c (s390_num_regs): Update.
14953 (s390_regmap): Remove control registers. Use __s390x__ predefine
14954 instead of GPR_SIZE to distiguish s390 and s390x targets.
14956 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14958 * linux-low.c: Update copyright year.
14959 (check_removed_breakpoint): Clear pending_is_breakpoint.
14960 (linux_set_resume_request, linux_queue_one_thread)
14961 (resume_status_pending_p): New functions.
14962 (linux_continue_one_thread): Use process->resume.
14963 (linux_resume): Only resume threads if there are no pending events.
14964 * linux-low.h (struct process_info): Add resume request
14967 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14969 * regcache.c (new_register_cache): Clear the allocated register
14970 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14972 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14974 * linux-low.c (linux_resume): Take a struct thread_resume *
14976 (linux_wait): Update call.
14977 (resume_ptr): New static variable.
14978 (linux_continue_one_thread): Renamed from
14979 linux_continue_one_process. Use resume_ptr.
14980 (linux_resume): Use linux_continue_one_thread.
14981 * server.c (handle_v_cont, handle_v_requests): New functions.
14982 (myresume): New function.
14983 (main): Handle 'v' case.
14984 * target.h (struct thread_resume): New type.
14985 (struct target_ops): Change argument of "resume" to struct
14987 (myresume): Delete macro.
14989 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14991 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14992 (uninstall): Support DESTDIR.
14994 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14996 * configure.srv: Add xscale*linux copy of arm*linux entry.
14998 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15000 * linux-arm-low.c (arm_reinsert_addr): New function.
15001 (the_low_target): Add arm_reinsert_addr.
15003 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15005 * mem-break.c: Remove whitespace at end of file.
15007 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15009 * configure.in: Check whether we need to prototype strerror.
15010 * server.h: Optionally prototype strerror.
15011 * gdbreplay.c (perror_with_name): Use strerror.
15012 * linux-low.c (linux_attach_lwp): Use strerror.
15013 * utils.c (perror_with_name): Use strerror.
15014 * config.in, configure: Regenerated.
15016 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15018 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15019 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15021 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15023 * Makefile.in (SFILES): Update.
15024 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15025 low-sun3.c: Remove files.
15027 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15029 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15030 (linux_detach_one_process, linux_detach): New functions.
15031 (linux_target_ops): Add linux_detach.
15032 * server.c (main): Handle 'D' packet.
15033 * target.h (struct target_ops): Add "detach" member.
15034 (detach_inferior): Define.
15036 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15038 From Kelley Cook <kelleycook@wideopenwest.com>:
15039 * configure.srv: Accept i[34567]86 variants.
15041 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15043 * linux-low.c (linux_wait_for_event): Correct comment typos.
15044 (linux_resume_one_process): Call check_removed_breakpoint.
15045 (linux_send_signal): New function.
15046 (linux_target_ops): Add linux_send_signal.
15047 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15049 * target.h (struct target_ops): Add send_signal.
15051 2003-05-29 Jim Blandy <jimb@redhat.com>
15053 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15054 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15055 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15056 away part of the register's value.
15058 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15060 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15061 (linux_wait_for_event, linux_init_signals): Likewise.
15063 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15065 * configure.in: Check for stdlib.h.
15066 * configure: Regenerated.
15067 * config.in: Regenerated.
15069 2003-01-04 Andreas Schwab <schwab@suse.de>
15071 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15073 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15075 * Makefile.in: Remove obsolete code.
15077 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15079 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15080 defined(PT_FPR0_HI).
15082 2002-11-17 Stuart Hughes <seh@zee2.com>
15084 * linux-arm-low.c (arm_num_regs): Increase.
15085 (arm_regmap): Include status register.
15087 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15089 * linux-low.c (register_addr): Remove incorrect -1 check.
15091 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15093 * linux-low.c (linux_create_inferior): Call setpgid. Return
15095 (unstopped_p, linux_signal_pid): Remove.
15096 (linux_target_ops): Remove linux_signal_pid.
15097 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15098 global instead of target method.
15099 * target.h (struct target_ops): Remove signal_pid. Update comment
15100 for create_inferior.
15101 * server.c (signal_pid): New variable.
15102 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15103 gdbserver. Set the child to be the foreground process group.
15104 (attach_inferior): Set signal_pid.
15106 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15108 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15110 2002-08-20 Jim Blandy <jimb@redhat.com>
15112 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15115 2002-08-01 Andrew Cagney <cagney@redhat.com>
15117 * Makefile.in: Make chill references obsolete.
15119 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15121 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15122 * configure: Regenerate.
15123 * config.in: Regenerate.
15125 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15127 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15128 (perror_with_name, remote_close, remote_open, expect, play): Static.
15130 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15132 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15133 byte offsets instead of an array of indexes.
15134 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15136 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15138 * regcache.c: Add comment.
15140 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15142 * thread-db.c: New file.
15143 * proc-service.c: New file.
15144 * acinclude.m4: New file.
15145 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15146 proc-service.o, and thread-db.o.
15147 (linux-low.o): Add USE_THREAD_DB.
15148 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15149 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15150 * aclocal.m4: Regenerated.
15151 * config.in: Regenerated.
15152 * configure: Regenerated.
15153 * configure.in: Check for proc_service.h, sys/procfs.h,
15154 thread_db.h, and linux/elf.h headrs.
15155 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15156 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15157 Check for -lthread_db and thread support.
15158 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15159 PowerPC, and SuperH.
15160 * i387-fp.c: Constify arguments.
15161 * i387-fp.h: Likewise.
15162 * inferiors.c: (struct thread_info): Renamed from
15163 `struct inferior_info'. Remove PID member. Use generic inferior
15164 list header. All uses updated.
15165 (inferiors, signal_pid): Removed.
15166 (all_threads): New variable.
15167 (get_thread): Define.
15168 (add_inferior_to_list): New function.
15169 (for_each_inferior): New function.
15170 (change_inferior_id): New function.
15171 (add_inferior): Removed.
15172 (remove_inferior): New function.
15173 (add_thread): New function.
15174 (free_one_thread): New function.
15175 (remove_thread): New function.
15176 (clear_inferiors): Use for_each_inferior and free_one_thread.
15177 (find_inferior): New function.
15178 (find_inferior_id): New function.
15179 (inferior_target_data): Update argument type.
15180 (set_inferior_target_data): Likewise.
15181 (inferior_regcache_data): Likewise.
15182 (set_inferior_regcache_data): Likewise.
15183 * linux-low.c (linux_bp_reinsert): Remove.
15184 (all_processes, stopping_threads, using_thrads)
15185 (struct pending_signals, debug_threads, pid_of): New.
15186 (inferior_pid): Replace with macro.
15187 (struct inferior_linux_data): Remove.
15188 (get_stop_pc, add_process): New functions.
15189 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15190 Use add_process and add_thread.
15191 (linux_attach_lwp): New function, based on old linux_attach. Use
15192 add_process and add_thread. Set stop_expected for new threads.
15193 (linux_attach): New function.
15194 (linux_kill_one_process): New function.
15195 (linux_kill): Kill all LWPs.
15196 (linux_thread_alive): Use find_inferior_id.
15197 (check_removed_breakpoints, status_pending_p): New functions.
15198 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15199 Update. Use WNOHANG. Wait for cloned processes also. Update process
15200 struct for the found process.
15201 (linux_wait_for_event): New function.
15202 (linux_wait): Use it. Support LWPs.
15203 (send_sigstop, wait_for_sigstop, stop_all_processes)
15204 (linux_resume_one_process, linux_continue_one_process): New functions.
15205 (linux_resume): Support LWPs.
15206 (REGISTER_RAW_SIZE): Remove.
15207 (fetch_register): Use register_size instead. Call supply_register.
15208 (usr_store_inferior_registers): Likewise. Call collect_register.
15209 Fix recursive case.
15210 (regsets_fetch_inferior_registers): Improve error message.
15211 (regsets_store_inferior_registers): Add debugging.
15212 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15213 (unstopped_p, linux_signal_pid): New functions.
15214 (linux_target_ops): Add linux_signal_pid.
15215 (linux_init_signals): New function.
15216 (initialize_low): Call it. Initialize using_threads.
15217 * regcache.c (inferior_regcache_data): Add valid
15219 (get_regcache): Fetch registers lazily. Add fetch argument
15220 and update all callers.
15221 (regcache_invalidate_one, regcache_invalidate): New
15223 (new_register_cache): Renamed from create_register_cache.
15224 Return the new regcache.
15225 (free_register_cache): Change argument to a void *.
15226 (registers_to_string, registers_from_string): Call get_regcache
15227 with fetch flag set.
15228 (register_data): Make static. Pass fetch flag to get_regcache.
15229 (supply_register): Call get_regcache with fetch flag clear.
15230 (collect_register): Call get_regcache with fetch flag set.
15231 (collect_register_as_string): New function.
15232 * regcache.h: Update.
15233 * remote-utils.c (putpkt): Flush after debug output and use
15235 Handle input interrupts while waiting for an ACK.
15236 (input_interrupt): Use signal_pid method.
15237 (getpkt): Flush after debug output and use stderr.
15238 (outreg): Use collect_register_as_string.
15239 (new_thread_notify, dead_thread_notify): New functions.
15240 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15241 and general_thread.
15242 (look_up_one_symbol): Flush after debug output.
15243 * server.c (step_thread, server_waiting): New variables.
15244 (start_inferior): Don't use signal_pid. Update call to mywait.
15245 (attach_inferior): Update call to mywait.
15246 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15247 (main): Don't fetch/store registers explicitly. Use
15248 set_desired_inferior. Support proposed ``Hs'' packet. Update
15250 * server.h: Update.
15251 (struct inferior_list, struct_inferior_list_entry): New.
15252 * target.c (set_desired_inferior): New.
15253 (write_inferior_memory): Constify.
15254 (mywait): New function.
15255 * target.h: Update.
15256 (struct target_ops): New signal_pid method.
15257 (mywait): Removed macro, added prototype.
15259 * linux-low.h (regset_func): Removed.
15260 (regset_fill_func, regset_store_func): New.
15261 (enum regset_type): New.
15262 (struct regset_info): Add type field. Use new operation types.
15263 (struct linux_target_ops): stop_pc renamed to get_pc.
15264 Add decr_pc_after_break and breakpoint_at.
15265 (get_process, get_thread_proess, get_process_thread)
15266 (strut process_info, all_processes, linux_attach_lwp)
15267 (thread_db_init): New.
15269 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15270 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15271 (the_low_target): Add new members.
15272 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15273 (i386_store_fpxregset): Constify.
15274 (target_regsets): Add new kind identifier.
15275 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15276 (i386_set_pc): Add debugging.
15277 (i386_breakpoint_at): New function.
15278 (the_low_target): Add new members.
15279 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15280 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15281 (mips_breakpoint_at): New.
15282 (the_low_target): Add new members.
15283 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15284 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15285 (the_low_target): Add new members.
15286 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15287 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15288 (the_low_target): Add new members.
15289 * linux-x86-64-low.c (target_regsets): Add new kind
15292 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15294 From Martin Pool <mbp@samba.org>:
15295 * server.c (gdbserver_usage): New function.
15298 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15300 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15301 stop_at -> stop_pc.
15303 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15305 * Makefile.in: Remove obsolete code.
15307 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15309 * linux-low.c (regsets_fetch_inferior_registers),
15310 (regsets_store_inferior_registers): Removed cast to int from
15312 * regcache.h: Added declaration of struct inferior_info.
15314 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15316 * inferiors.c (struct inferior_info): Add regcache_data.
15317 (add_inferior): Call create_register_cache.
15318 (clear_inferiors): Call free_register_cache.
15319 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15320 * regcache.c (struct inferior_regcache_data): New.
15321 (registers): Remove.
15322 (get_regcache): New function.
15323 (create_register_cache, free_register_cache): New functions.
15324 (set_register_cache): Don't initialize the register cache here.
15325 (registers_to_string, registers_from_string, register_data): Call
15327 * regcache.h: Add prototypes.
15328 * server.h: Likewise.
15330 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15332 * mem-break.c: New file.
15333 * mem-break.h: New file.
15334 * Makefile.in: Add mem-break.o rule; update server.h
15336 * inferiors.c (struct inferior_info): Add target_data
15338 (clear_inferiors): Free target_data member if set.
15339 (inferior_target_data, set_inferior_target_data): New functions.
15340 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15341 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15342 * linux-low.c (linux_bp_reinsert): New variable.
15343 (struct inferior_linux_data): New.
15344 (linux_create_inferior): Use set_inferior_target_data.
15345 (linux_attach): Likewise. Call add_inferior.
15346 (linux_wait_for_one_inferior): New function.
15347 (linux_wait): Call it.
15348 (linux_write_memory): Add const.
15349 (initialize_low): Call set_breakpoint_data.
15350 * linux-low.h (struct linux_target_ops): Add breakpoint
15352 * server.c (attach_inferior): Remove extra add_inferior
15354 * server.h: Include mem-break.h. Update inferior.c
15356 * target.c (read_inferior_memory)
15357 (write_inferior_memory): New functions.
15358 * target.h (read_inferior_memory)
15359 (write_inferior_memory): Change macros to prototypes.
15360 (struct target_ops): Update comments. Add const to write_memory
15363 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15365 * linux-low.c (usr_store_inferior_registers): Support
15366 registers which are allowed to fail to store.
15367 * linux-low.h (linux_target_ops): Likewise.
15368 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15369 (ppc_cannot_store_register): FPSCR may not be storable.
15371 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15373 * server.h: Include <string.h> if HAVE_STRING_H.
15374 * ChangeLog: Correct paths in last ChangeLog entry.
15376 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15378 * linux-low.h: Remove obsolete prototypes.
15379 (struct linux_target_ops): New.
15380 (extern the_low_target): New.
15381 * linux-low.c (num_regs, regmap): Remove declarations.
15382 (register_addr): Use the_low_target explicitly.
15383 (fetch_register): Likewise.
15384 (usr_fetch_inferior_registers): Likewise.
15385 (usr_store_inferior_registers): Likewise.
15386 * linux-arm-low.c (num_regs): Remove.
15387 (arm_num_regs): Define.
15388 (arm_regmap): Renamed from regmap, made static.
15389 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15391 (arm_cannot_store_register): Renamed from cannot_store_register,
15393 (the_low_target): New.
15394 * linux-i386-low.c (num_regs): Remove.
15395 (i386_num_regs): Define.
15396 (i386_regmap): Renamed from regmap, made static.
15397 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15399 (i386_cannot_store_register): Renamed from cannot_store_register,
15401 (the_low_target): New.
15402 * linux-ia64-low.c (num_regs): Remove.
15403 (ia64_num_regs): Define.
15404 (ia64_regmap): Renamed from regmap, made static.
15405 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15407 (ia64_cannot_store_register): Renamed from cannot_store_register,
15409 (the_low_target): New.
15410 * linux-m68k-low.c (num_regs): Remove.
15411 (m68k_num_regs): Define.
15412 (m68k_regmap): Renamed from regmap, made static.
15413 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15415 (m68k_cannot_store_register): Renamed from cannot_store_register,
15417 (the_low_target): New.
15418 * linux-mips-low.c (num_regs): Remove.
15419 (mips_num_regs): Define.
15420 (mips_regmap): Renamed from regmap, made static.
15421 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15423 (mips_cannot_store_register): Renamed from cannot_store_register,
15425 (the_low_target): New.
15426 * linux-ppc-low.c (num_regs): Remove.
15427 (ppc_num_regs): Define.
15428 (ppc_regmap): Renamed from regmap, made static.
15429 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15431 (ppc_cannot_store_register): Renamed from cannot_store_register,
15433 (the_low_target): New.
15434 * linux-s390-low.c (num_regs): Remove.
15435 (s390_num_regs): Define.
15436 (s390_regmap): Renamed from regmap, made static.
15437 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15439 (s390_cannot_store_register): Renamed from cannot_store_register,
15441 (the_low_target): New.
15442 * linux-sh-low.c (num_regs): Remove.
15443 (sh_num_regs): Define.
15444 (sh_regmap): Renamed from regmap, made static.
15445 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15447 (sh_cannot_store_register): Renamed from cannot_store_register,
15449 (the_low_target): New.
15450 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15451 (the_low_target): New.
15453 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15455 * Makefile.in: Add stamp-h target.
15456 * configure.in: Create stamp-h.
15457 * configure: Regenerated.
15459 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15461 * inferiors.c: New file.
15462 * target.c: New file.
15463 * target.h: New file.
15464 * Makefile.in: Add target.o and inferiors.o. Update
15466 * linux-low.c (inferior_pid): New static variable,
15467 moved from server.c.
15468 (linux_create_inferior): Renamed from create_inferior.
15469 Call add_inferior. Return 0 on success instead of a PID.
15470 (linux_attach): Renamed from myattach.
15471 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15472 (linux_thread_alive): Renamed from mythread_alive.
15473 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15475 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15476 (regsets_store_inferior_registers): Correct error message.
15477 Add missing ``return 0''.
15478 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15479 (linux_store_registers): Renamed from store_inferior_registers.
15480 (linux_read_memory): Renamed from read_inferior_memory.
15481 (linux_write_memory): Renamed from write_inferior_memory.
15482 (linux_target_ops): New structure.
15483 (initialize_low): Call set_target_ops ().
15484 * remote-utils.c (unhexify): New function.
15485 (hexify): New function.
15486 (input_interrupt): Send signals to ``signal_pid''.
15487 * server.c (inferior_pid): Remove.
15488 (start_inferior): Update create_inferior call.
15489 (attach_inferior): Call add_inferior.
15490 (handle_query): New function.
15491 (main): Call handle_query for `q' packets.
15492 * server.h: Include "target.h". Remove obsolete prototypes.
15493 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15495 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15497 * Makefile.in: Add WARN_CFLAGS. Update configury
15499 * configure.in: Check for <string.h>
15500 * configure: Regenerate.
15501 * config.in: Regenerate.
15502 * gdbreplay.c: Include needed system headers.
15503 (remote_open): Remove strchr prototype.
15504 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15505 * regcache.c (supply_register): Change buf argument to const void *.
15506 (supply_register_by_name): Likewise.
15507 (collect_register): Change buf argument to void *.
15508 (collect_register_by_name): Likewise.
15509 * regcache.h: Add missing prototypes.
15510 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15511 * server.c (handle_query): New function.
15512 (attached): New static variable, moved out of main.
15513 (main): Quiet longjmp clobber warnings.
15514 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15515 * utils.c (error): Remove NORETURN.