1 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3 * linux-low.c (linux_set_resume_request): Remove unused
6 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
8 * server.c (first_thread_of): Remove.
9 (process_serial_event): Replace usage of first_thread_of with
10 find_any_thread_of_pid.
11 * tracepoint.c (same_process_p): Remove.
12 (gdb_agent_about_to_close): Replace usage of same_process_p with
13 find_any_thread_of_pid.
14 * linux-x86-low.c (same_process_callback): Remove.
15 (x86_arch_setup_process_callback): Replace usage of
16 same_process_callback with find_any_thread_of_pid.
17 * thread-db.c (any_thread_of): Remove.
18 (switch_to_process): Replace usage of any_thread_of with
19 find_any_thread_of_pid.
20 * inferiors.c (thread_pid_matches_callback): Remove.
21 (find_thread_process): Adjust to use find_any_thread_of_pid.
23 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
25 * regcache.c (get_thread_regcache): Guard calls to "memset"
28 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
30 * linux-low.c (handle_extended_wait): Use
31 "allocate_target_description" instead of "XNEW".
32 * linux-x86-low.c (initialize_low_arch): Likewise.
34 2017-09-05 Yao Qi <yao.qi@linaro.org>
36 * configure.srv (srv_i386_regobj): Remove.
37 (srv_amd64_regobj): Remove.
38 (srv_regobj): Set it to "" for x86 non-linux targets.
39 * linux-x86-tdesc.c (i386_linux_read_description):
40 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
41 (init_registers_i386): Remove the declaration.
42 (tdesc_i386): Remove the declaration.
43 (lynx_i386_arch_setup): Call i386_create_target_description.
44 * nto-x86-low.c: Likewise.
45 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
46 [!__x86_64__]: include arch/i386.h.
47 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
49 2017-09-05 Yao Qi <yao.qi@linaro.org>
51 * configure.srv (srv_amd64_linux_xmlfiles): Remove
52 i386/amd64-XXX-linux from it.
54 2017-09-05 Yao Qi <yao.qi@linaro.org>
56 * configure.srv: Empty srv_amd64_linux_regobj if $development is
58 (ipa_amd64_linux_regobj): Remove.
59 (ipa_x32_linux_regobj): Remove.
61 2017-09-05 Yao Qi <yao.qi@linaro.org>
63 * Makefile.in (arch-amd64.o): New rule.
64 * configure.srv: Append arch-amd64.o.
65 * linux-amd64-ipa.c: Include common/x86-xstate.h.
66 (get_ipa_tdesc): Call amd64_linux_read_description.
67 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
68 and init_registers_amd64_XXX.
69 * linux-x86-low.c (x86_linux_read_description): Call
70 amd64_linux_read_description.
71 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
72 (initialize_low_arch): Don't call init_registers_x32_XXX and
73 init_registers_amd64_XXX.
74 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
76 [__x86_64__] (amd64_tdesc_test): New function.
77 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
78 and init_registers_amd64_XXX.
79 * linux-x86-tdesc.c: Include arch/amd64.h.
80 (xcr0_to_tdesc_idx): New function.
81 (i386_linux_read_description): New function.
82 (amd64_get_ipa_tdesc_idx): New function.
83 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
84 (amd64_get_ipa_tdesc): Declare.
86 2017-09-05 Yao Qi <yao.qi@linaro.org>
88 * configure.srv (srv_i386_linux_xmlfiles): Remove
89 i386/i386-XXX-linux.xml from it.
91 2017-09-05 Yao Qi <yao.qi@linaro.org>
93 * configure.srv: Set srv_i386_linux_regobj empty if $development
95 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
97 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
98 with #if initialize_low_tdesc.
99 * linux-x86-tdesc-selftest.c: New file.
100 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
102 2017-09-05 Yao Qi <yao.qi@linaro.org>
104 * Makefile.in (arch-i386.o): New rule.
105 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
106 (x86_64-*-linux*): Likewise.
107 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
109 (i386_linux_read_description): Remove code and call
110 i386_create_target_description.
111 * tdesc.c (allocate_target_description): New function.
112 * tdesc.h (set_tdesc_architecture): Remove declaration.
113 (set_tdesc_osabi): Likewise.
115 2017-09-05 Yao Qi <yao.qi@linaro.org>
117 * linux-x86-tdesc.c: Don't include <inttypes.h>.
118 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
119 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
121 * server.c (get_features_xml): Call tdesc_get_features_xml.
122 * tdesc.c (set_tdesc_architecture): New function.
123 (set_tdesc_osabi): New function.
124 (tdesc_get_features_xml): New function.
125 (tdesc_create_feature): Add an argument.
126 * tdesc.h (struct target_desc) <features>: New field.
127 <arch, osabi>: New field.
128 (~target_desc): xfree features, arch, and osabi.
129 (target_desc::oerator==): Don't compare .xmltarget.
130 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
131 (set_tdesc_osabi): Likewise.
132 (tdesc_get_features_xml): Likewise.
134 2017-09-05 Yao Qi <yao.qi@linaro.org>
136 * linux-x86-tdesc.c: Include selftest.h.
137 (i386_tdesc_test): New function.
138 (initialize_low_tdesc): Call selftests::register_test.
139 * tdesc.h: Include regdef.h.
140 (target_desc): Override operator == and !=.
142 2017-09-05 Yao Qi <yao.qi@linaro.org>
144 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
146 * linux-i386-ipa.c: Include common/x86-xstate.h
147 (get_ipa_tdesc): Call i386_linux_read_description.
148 (initialize_low_tracepoint): Don't call init_registers_XXX
149 functions, call initialize_low_tdesc instead.
150 * linux-x86-low.c (x86_linux_read_description): Call
151 i386_linux_read_description.
152 (initialize_low_arch): Don't call init_registers_i386_XXX
153 functions, call initialize_low_tdesc.
154 * linux-x86-tdesc.c: New file.
155 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
156 (i386_get_ipa_tdesc_idx): Declare.
157 (i386_get_ipa_tdesc): Declare.
158 (initialize_low_tdesc): Declare.
160 2017-09-05 Yao Qi <yao.qi@linaro.org>
162 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
165 2017-09-05 Yao Qi <yao.qi@linaro.org>
167 * Makefile.in (IPA_OBJS): Add vec-ipa.o
168 * regcache.c (get_thread_regcache): Use VEC_length.
169 (init_register_cache): Likewise.
170 (regcache_cpy): Likewise.
171 (registers_to_string): Iterate reg_defs via VEC_iterate.
172 (find_regno): Likewise.
173 (find_register_by_number): Use VEC_index.
174 (register_size): Call find_register_by_number.
175 (register_data): Call find_register_by_number.
176 (supply_regblock): Use VEC_length.
177 (regcache_raw_read_unsigned): Likewise.
178 * tdesc.c (init_target_desc): Iterate reg_defs via
180 (default_description): Update initializer.
181 (copy_target_description): Don't update field num_registers.
182 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
183 <num_registers>: Remove.
185 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
187 * Makefile.in (.SECONDARY): Define target.
189 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
191 * linux-low.c (linux_wait_1): Adjust.
192 * server.c (queue_stop_reply_callback): Adjust.
194 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
196 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
197 QEnvironmentUnset and QEnvironmentReset packets.
198 (handle_query): Inform remote that QEnvironmentHexEncoded,
199 QEnvironmentUnset and QEnvironmentReset are supported.
201 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
203 * inferiors.h (inferior_target_data): Rename to ...
204 (thread_target_data): ... this.
205 (inferior_regcache_data): Rename to ...
206 (thread_regcache_data): ... this.
207 (set_inferior_regcache_data): Rename to ...
208 (set_thread_regcache_data): ... this.
209 * inferiors.c (inferior_target_data): Rename to ...
210 (thread_target_data): ... this.
211 (inferior_regcache_data): Rename to ...
212 (thread_regcache_data): ... this.
213 (set_inferior_regcache_data): Rename to ...
214 (set_thread_regcache_data): ... this.
215 (free_one_thread): Update.
216 * linux-low.h (get_thread_lwp): Update.
217 * regcache.c (get_thread_regcache): Update.
218 (regcache_invalidate_thread): Update.
219 (free_register_cache_thread): Update.
220 * win32-i386-low.c (update_debug_registers_callback): Update.
221 (win32_get_current_dr): Update.
222 * win32-low.c (thread_rec): Update.
223 (delete_thread_info): Update.
224 (continue_one_thread): Update.
225 (suspend_one_thread): Update.
227 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
229 * inferiors.c (set_inferior_target_data): Remove.
230 * inferiors.h (set_inferior_target_data): Remove.
232 2017-08-18 Yao Qi <yao.qi@linaro.org>
234 * Makefile.in (OBS): Add selftest.o.
235 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
236 * configure, config.in: Re-generated.
237 * server.c: Include common/sefltest.h.
238 (captured_main): Handle option --selftest.
240 2017-08-09 Yao Qi <yao.qi@linaro.org>
242 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
243 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
244 i386-avx-mpx.o and i386-mmx.o.
245 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
246 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
247 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
248 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
249 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
250 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
251 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
252 i386/amd64-avx-mpx.xml.
254 2017-08-09 Yao Qi <yao.qi@linaro.org>
256 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
257 and x32-avx-avx512.o.
258 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
259 i386/x32-avx-avx512.xml.
261 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
263 * tracepoint.h (enum class fast_tpoint_collect_result): New
265 (fast_tracepoint_collecting): Change return type to
266 fast_tpoint_collect_result.
267 * tracepoint.c (fast_tracepoint_collecting): Likewise.
268 * linux-low.h: Include tracepoint.h.
269 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
270 fast_tpoint_collect_result.
271 * linux-low.c (handle_tracepoints): Adjust.
272 (linux_fast_tracepoint_collecting): Change return type to
273 fast_tpoint_collect_result.
274 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
275 linux_wait_1, stuck_in_jump_pad_callback,
276 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
277 proceed_one_lwp): Adjust to type change.
279 2017-07-10 Yao Qi <yao.qi@linaro.org>
281 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
283 2017-06-29 Yao Qi <yao.qi@linaro.org>
285 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
287 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
289 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
291 * Makefile.in (IPA_OBJS): Sort and format one item per line.
293 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
295 * linux-low.c (linux_create_inferior): Adjust code to access the
296 environment information via 'gdb_environ' class.
297 * lynx-low.c (lynx_create_inferior): Likewise.
298 * server.c (our_environ): Make it an instance of 'gdb_environ'.
299 (get_environ): Return a pointer to 'our_environ'.
300 (captured_main): Initialize 'our_environ'.
301 * server.h (get_environ): Adjust prototype.
302 * spu-low.c (spu_create_inferior): Adjust code to access the
303 environment information via 'gdb_environ' class.
305 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
307 * linux-low.c (linux_read_memory, linux_write_memory): Remove
308 usage of "register" keyword.
310 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
312 * configure: Re-generate.
314 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
316 * configure: Re-generate.
318 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
320 * Makefile.in (COMPILE.pre): Add "-x c++".
322 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
324 * fork-child.c: Conditionally include <signal.h>.
326 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
328 * server.c (handle_general_set): Handle new packet
330 (handle_query): Add "QStartupWithShell" to the list of supported
332 (gdbserver_usage): Add help text explaining the
333 new "--startup-with-shell" and "--no-startup-with-shell" CLI
335 (captured_main): Recognize and act upon the presence of the new
338 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
339 Pedro Alves <palves@redhat.com>
341 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
342 * configure: Regenerate.
343 * configure.srv (srv_linux_obj): Add "fork-child.o" and
345 (i[34567]86-*-lynxos*): Likewise.
346 (spu*-*-*): Likewise.
347 * fork-child.c: New file.
348 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
350 (linux_ptrace_fun): New function.
351 (linux_create_inferior): Adjust function prototype to reflect
352 change on "target.h". Adjust function code to use
354 (linux_request_interrupt): Delete "signal_pid".
355 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
356 (lynx_ptrace_fun): New function.
357 (lynx_create_inferior): Adjust function prototype to reflect
358 change on "target.h". Adjust function code to use
360 * nto-low.c (nto_create_inferior): Adjust function prototype and
361 code to reflect change on "target.h". Update comments.
362 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
363 "common-terminal.h" and "environ.h".
364 (terminal_fd): Moved to fork-child.c.
365 (old_foreground_pgrp): Likewise.
366 (restore_old_foreground_pgrp): Likewise.
367 (last_status): Make it global.
368 (last_ptid): Likewise.
369 (our_environ): New variable.
370 (startup_with_shell): Likewise.
371 (program_name): Likewise.
372 (program_argv): Rename to...
373 (program_args): ...this.
374 (wrapper_argv): New variable.
375 (start_inferior): Delete function.
376 (get_exec_wrapper): New function.
377 (get_exec_file): Likewise.
378 (get_environ): Likewise.
379 (prefork_hook): Likewise.
380 (post_fork_inferior): Likewise.
381 (postfork_hook): Likewise.
382 (postfork_child_hook): Likewise.
383 (handle_v_run): Update code to deal with arguments coming from the
384 remote host. Update calls from "start_inferior" to
386 (captured_main): Likewise. Initialize environment variable. Call
388 * server.h (post_fork_inferior): New prototype.
389 (get_environ): Likewise.
390 (last_status): Declare.
391 (last_ptid): Likewise.
392 (signal_pid): Likewise.
393 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
394 (spu_ptrace_fun): New function.
395 (spu_create_inferior): Adjust function prototype to reflect change
396 on "target.h". Adjust function code to use "fork_inferior".
397 * target.c (target_terminal_init): New function.
398 (target_terminal_inferior): Likewise.
399 (target_terminal_ours): Likewise.
400 * target.h: Include <vector>.
401 (struct target_ops) <create_inferior>: Update prototype.
402 (create_inferior): Update macro.
403 * utils.c (gdb_flush_out_err): New function.
404 * win32-low.c (win32_create_inferior): Adjust function prototype
405 and code to reflect change on "target.h".
407 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
409 * inferiors.c (switch_to_thread): New function.
411 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
413 * Makefile.in (SFILE): Add "common/job-control.c".
414 (OBS): Add "job-control.o".
416 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
418 * Makefile: Remove "@host_makefile_frag@".
420 2017-05-05 Pedro Alves <palves@redhat.com>
422 * configure: Regenerate.
424 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
426 * configure: Regenerate.
428 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
430 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
431 software_single_step change of return type to
432 std::vector<CORE_ADDR>.
433 * linux-low.c (install_software_single_step_breakpoints):
435 * linux-low.h (install_software_single_step_breakpoints):
438 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
440 * remote-utils.c: Include "gdb_termios.h" instead of
442 * terminal.h: Delete file.
444 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
446 * server.c: Include <vector>.
447 <program_argv, wrapper_argv>: Convert to std::vector.
448 (start_inferior): Rewrite function to use C++.
449 (handle_v_run): Likewise. Update code that calculates the argv
450 based on the vRun packet; use C++.
451 (captured_main): Likewise.
453 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
455 * server.c (handle_v_cont): Initialize thread_resume::thread
458 2017-04-05 Pedro Alves <palves@redhat.com>
460 * configure: Regenerate.
462 2017-04-05 Pedro Alves <palves@redhat.com>
464 * gdbreplay.c (sync_error): Constify.
465 * linux-x86-low.c (push_opcode): Constify.
467 2017-04-05 Pedro Alves <palves@redhat.com>
469 * win32-low.c (get_child_debug_event)
470 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
471 Report TARGET_WAITKIND_SPURIOUS instead.
473 2017-04-05 Pedro Alves <palves@redhat.com>
475 * remote-utils.c (remote_prepare, remote_open): Constify.
476 * remote-utils.h (remote_prepare, remote_open): Constify.
477 * server.c (captured_main): Constify 'port' handling.
479 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
481 * Makefile.in (clean): Clear .deps.
483 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
485 * .gitignore: Remove generated files, replace with wildcard.
486 * (clean): Replace removal of generated files with wildcard.
487 (version.c): Replace with...
488 (version-generated.c): ...this.
489 (xml-builtin.c): Replace with...
490 (xml-builtin-generated.c): ...this.
491 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
492 (%.c: *regformats*): Replace with...
493 (%-generated.c: *regformats*): ...this.
495 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
497 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
498 (xtensa_fill_gregset): Call collect_register_by_name for
500 (xtensa_store_gregset): Call supply_register_by_name for
503 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
505 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
506 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
507 (xtensa_store_gregset): Call supply_register for all registers in
508 a0_regnum..a0_regnum + C0_NREGS range.
510 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
512 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
513 (ax-ipa.o: ax.c): Remove.
514 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
515 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
516 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
517 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
518 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
520 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
522 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
523 (print-utils-ipa.o: ../common/print-utils.c): Remove.
524 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
525 (errors-ipa.o: ../common/errors.c): Remove.
526 (format-ipa.o: ../common/format.c): Remove.
527 (common-utils-ipa.o: ../common/common-utils.c): Remove.
529 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
531 * Makefile.in (%-ipa.o: %.c): New rule.
532 (tracepoint-ipa.o: tracepoint.c): Remove.
533 (utils-ipa.o: utils.c): Remove.
534 (remote-utils-ipa.o: remote-utils.c): Remove.
535 (regcache-ipa.o: regcache.c): Remove.
536 (i386-linux-ipa.o: i386-linux.c): Remove.
537 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
538 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
539 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
540 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
541 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
542 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
543 (amd64-linux-ipa.o: amd64-linux.c): Remove.
544 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
545 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
546 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
547 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
548 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
549 (aarch64-ipa.o: aarch64.c): Remove.
550 (s390-linux32-ipa.o: s390-linux32.c): Remove.
551 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
552 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
553 (s390-linux64-ipa.o: s390-linux64.c): Remove.
554 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
555 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
556 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
557 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
558 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
559 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
560 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
561 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
562 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
563 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
564 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
565 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
566 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
567 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
568 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
569 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
570 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
571 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
572 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
573 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
574 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
575 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
576 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
577 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
578 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
579 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
580 (tdesc-ipa.o: tdesc.c): Remove.
581 (x32-linux-ipa.o: x32-linux.c): Remove.
582 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
583 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
585 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
587 * Makefile.in (%.o: ../arch/%.c): New rule.
588 (arm.o: ../arch/arm.c): Remove.
589 (arm-linux.o: ../arch/arm-linux.c): Remove.
590 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
591 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
593 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
595 * Makefile.in (%.o: ../nat/%.c): New rule.
596 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
597 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
598 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
599 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
600 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
601 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
602 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
603 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
604 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
605 (linux-personality.o: ../nat/linux-personality.c): Remove.
606 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
607 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
608 (x86-linux.o: ../nat/x86-linux.c): Remove.
609 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
610 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
612 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
614 * Makefile.in (%.o: ../common/%.c): New rule.
615 (signals.o: ../common/signals.c): Remove.
616 (print-utils.o: ../common/print-utils.c): Remove.
617 (rsp-low.o: ../common/rsp-low.c): Remove.
618 (common-utils.o: ../common/common-utils.c): Remove.
619 (posix-strerror.o: ../common/posix-strerror.c): Remove.
620 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
621 (vec.o: ../common/vec.c): Remove.
622 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
623 (xml-utils.o: ../common/xml-utils.c): Remove.
624 (ptid.o: ../common/ptid.c): Remove.
625 (buffer.o: ../common/buffer.c): Remove.
626 (format.o: ../common/format.c): Remove.
627 (filestuff.o: ../common/filestuff.c): Remove.
628 (agent.o: ../common/agent.c): Remove.
629 (errors.o: ../common/errors.c): Remove.
630 (environ.o: ../common/environ.c): Remove.
631 (common-debug.o: ../common/common-debug.c): Remove.
632 (cleanups.o: ../common/cleanups.c): Remove.
633 (common-exceptions.o: ../common/common-exceptions.c): Remove.
634 (fileio.o: ../common/fileio.c): Remove.
635 (common-regcache.o: ../common/common-regcache.c): Remove.
636 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
637 (new-op.o: ../common/new-op.c): Remove.
638 (btrace-common.o: ../common/btrace-common.c): Remove.
640 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
642 * Makefile.in (%.o: ../target/%.c): New rule.
643 (waitstatus.o: ../target/waitstatus.c): Remove.
645 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
648 (%.c: ../regformats/%.dat,
649 (%.c: ../regformats/arm/%.dat,
650 (%.c: ../regformats/i386/%.dat,
651 (%.c: ../regformats/rs6000/%.dat): New rules.
654 (arm-with-iwmmxt.c): Remove.
655 (arm-with-vfpv2.c): Remove.
656 (arm-with-vfpv3.c): Remove.
657 (arm-with-neon.c): Remove.
658 (reg-bfin.c): Remove.
659 (reg-cris.c): Remove.
660 (reg-crisv32.c): Remove.
662 (i386-linux.c): Remove.
663 (i386-avx.c): Remove.
664 (i386-avx-linux.c): Remove.
665 (i386-avx-avx512.c): Remove.
666 (i386-avx-avx512-linux.c): Remove.
667 (i386-mpx.c): Remove.
668 (i386-mpx-linux.c): Remove.
669 (i386-avx-mpx-avx512-pku.c): Remove.
670 (i386-avx-mpx-avx512-pku-linux.c): Remove.
671 (i386-avx-mpx.c): Remove.
672 (i386-avx-mpx-linux.c): Remove.
673 (i386-mmx.c): Remove.
674 (i386-mmx-linux.c): Remove.
675 (reg-ia64.c): Remove.
676 (reg-m32r.c): Remove.
677 (reg-m68k.c): Remove.
679 (mips-linux.c): Remove.
680 (mips-dsp-linux.c): Remove.
681 (mips64-linux.c): Remove.
682 (mips64-dsp-linux.c): Remove.
683 (nios2-linux.c): Remove.
684 (powerpc-32.c): Remove.
685 (powerpc-32l.c): Remove.
686 (powerpc-altivec32l.c): Remove.
687 (powerpc-cell32l.c): Remove.
688 (powerpc-vsx32l.c): Remove.
689 (powerpc-isa205-32l.c): Remove.
690 (powerpc-isa205-altivec32l.c): Remove.
691 (powerpc-isa205-vsx32l.c): Remove.
692 (powerpc-e500l.c): Remove.
693 (powerpc-64l.c): Remove.
694 (powerpc-altivec64l.c): Remove.
695 (powerpc-cell64l.c): Remove.
696 (powerpc-vsx64l.c): Remove.
697 (powerpc-isa205-64l.c): Remove.
698 (powerpc-isa205-altivec64l.c): Remove.
699 (powerpc-isa205-vsx64l.c): Remove.
700 (s390-linux32.c): Remove.
701 (s390-linux32v1.c): Remove.
702 (s390-linux32v2.c): Remove.
703 (s390-linux64.c): Remove.
704 (s390-linux64v1.c): Remove.
705 (s390-linux64v2.c): Remove.
706 (s390-te-linux64.c): Remove.
707 (s390-vx-linux64.c): Remove.
708 (s390-tevx-linux64.c): Remove.
709 (s390x-linux64.c): Remove.
710 (s390x-linux64v1.c): Remove.
711 (s390x-linux64v2.c): Remove.
712 (s390x-te-linux64.c): Remove.
713 (s390x-vx-linux64.c): Remove.
714 (s390x-tevx-linux64.c): Remove.
715 (tic6x-c64xp-linux.c): Remove.
716 (tic6x-c64x-linux.c): Remove.
717 (tic6x-c62x-linux.c): Remove.
719 (reg-sparc64.c): Remove.
722 (amd64-linux.c): Remove.
723 (amd64-avx.c): Remove.
724 (amd64-avx-linux.c): Remove.
725 (amd64-avx-avx512.c): Remove.
726 (amd64-avx-avx512-linux.c): Remove.
727 (amd64-mpx.c): Remove.
728 (amd64-mpx-linux.c): Remove.
729 (amd64-avx-mpx-avx512-pku.c): Remove.
730 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
731 (amd64-avx-mpx.c): Remove.
732 (amd64-avx-mpx-linux.c): Remove.
734 (x32-linux.c): Remove.
736 (x32-avx-linux.c): Remove.
737 (x32-avx-avx512.c): Remove.
738 (x32-avx-avx512-linux.c): Remove.
739 (reg-xtensa.c): Remove.
740 (reg-tilegx.c): Remove.
741 (reg-tilegx32.c): Remove.
743 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
745 * Makefile.in (SFILES): Add "common/environ.c".
746 (OBJS): Add "common/environ.h".
748 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
750 * configure.ac: Check if the fs_base and gs_base members of
751 `struct user_regs_struct' exist.
752 * config.in: Regenerated.
753 * configure: Likewise.
755 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
757 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
759 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
760 (get_next_pcs_syscall_next_pc): Likewise.
762 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
764 * win32-i386-low.c: Fix incorrect reference to a couple source files.
765 * nto-x86-low.c: Likewise.
767 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
769 * Makefile.in: Include disable-implicit-rules.mk.
771 2016-11-23 Pedro Alves <palves@redhat.com>
773 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
774 (debug_vprintf): Use std::chrono::steady_clock instead of
775 gettimeofday. Use '.' instead of ':'.
776 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
777 (get_timestamp): Use std::chrono::steady_clock instead of
780 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
782 * Makefile.in: Fix whitespace formatting.
784 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
786 * Makefile.in (SFILES, OBS): Flatten list and order
789 2016-11-23 Pedro Alves <palves@redhat.com>
791 * event-loop.c (handle_file_event): Use warning.
792 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
793 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
796 2016-11-23 Pedro Alves <palves@redhat.com>
798 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
800 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
801 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
802 debug_printf and debug_flush for debug output.
803 * server.c (handle_general_set): Likewise.
804 * thread-db.c (try_thread_db_load): Use debug_printf for debug
807 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
809 * Makefile.in (.c.o): Replace rule with ...
810 (%.o: %.c): ... this one.
812 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
814 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
815 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
817 * configure.ac: Remove checks for the make program.
818 * configure: Re-generate.
820 2016-10-28 Pedro Alves <palves@redhat.com>
822 * Makefile.in (CXX_DIALECT): Get from configure.
823 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
824 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
825 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
826 * config.in: Regenerate.
827 * configure: Regenerate.
829 2016-10-27 Yao Qi <yao.qi@linaro.org>
831 * linux-low.c (linux_supports_range_stepping): Return true if
832 can_software_single_step return true.
834 2016-10-27 Yao Qi <yao.qi@linaro.org>
836 * inferiors.c (find_inferior_in_random): New function.
837 * inferiors.h (find_inferior_in_random): Declare.
838 * linux-low.c (linux_wait_for_event_filtered): Call
839 find_inferior_in_random instead of find_inferior.
841 2016-10-27 Yao Qi <yao.qi@linaro.org>
843 * linux-low.c (linux_wait_1): If single-step breakpoints are
844 inserted, remove them.
846 2016-10-26 Pedro Alves <palves@redhat.com>
848 * linux-low.c (handle_extended_wait): Link parent/child fork
850 (linux_wait_1): Unlink them.
851 (linux_set_resume_request): Ignore resume requests for
852 already-resumed and unhandled fork child threads.
853 * linux-low.h (struct lwp_info) <fork_relative>: New field.
854 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
856 (handle_v_requests) <vCont>: Don't call require_running.
857 * server.h (in_queued_stop_replies): New declaration.
859 2016-10-24 Yao Qi <yao.qi@linaro.org>
862 * linux-aarch64-low.c (append_insns): Cast the return value to
865 2016-10-10 Yao Qi <yao.qi@linaro.org>
867 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
869 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
871 * target.c (target_supports_multi_process): New function, moved
873 * target.h (target_supports_multi_process): ... here. Remove
876 2016-10-05 Tom Tromey <tom@tromey.com>
879 * tracepoint.c (handle_tracepoint_bkpts): Check
880 ipa_error_tracepoint, not ipa_stopping_tracepoint.
882 2016-10-05 Yao Qi <yao.qi@linaro.org>
884 * configure.srv: Update the path of arm-*.xml files.
886 2016-10-05 Terry Guo <terry.guo@arm.com>
887 Yao Qi <yao.qi@linaro.org>
889 * Makefile.in: Adjust the path of rules.
890 * configure.srv: Update the path of xml files.
891 * regformats/arm-with-iwmmxt.dat: Regenerated.
892 * regformats/arm-with-neon.dat: Likewise.
893 * regformats/arm-with-vfpv2.dat: Likewise.
894 * regformats/arm-with-vfpv3.dat Likewise.
896 2016-09-30 Yao Qi <yao.qi@linaro.org>
899 * target.c (target_stop_and_wait): Don't call
900 target_continue_no_signal, use resume_stop instead.
902 2016-09-26 Yao Qi <yao.qi@linaro.org>
904 * linux-low.c (linux_wait_1): Call debug_exit.
906 2016-09-23 Pedro Alves <palves@redhat.com>
908 * Makefile.in (SFILES): Add common/new-op.c.
909 (OBS): Add common/new-op.o.
910 (new-op.o): New rule.
912 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
914 * .gitinore: Ignore more files.
916 2016-09-21 Yao Qi <yao.qi@linaro.org>
918 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
921 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
923 * server.c (start_inferior): Call target_mourn_inferior instead of
924 mourn_inferior; pass ptid_t argument to it.
926 (handle_target_event): Likewise.
927 * target.c (target_mourn_inferior): New function.
928 * target.h (mourn_inferior): Delete macro.
930 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
932 * linux-low.c (lwp_is_stepping): New function.
934 2016-09-06 Carl Love <cel@us.ibm.com>
936 * server.c (start_inferior): Fixed comment, requested comment change
937 didn't get updated correctly. Removed reference to ptrace () call as
938 it is only true on Linux systems.
940 2016-09-06 Carl Love <cel@us.ibm.com>
942 * server.c (start_inferior): Do not call
943 function target_post_create_inferior () if the
944 inferior process has already exited.
946 2016-09-05 Pedro Alves <palves@redhat.com>
948 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
949 (COMPILE.pre, CC_LD): Use CXX directly.
950 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
951 * acinclude.m4: Don't include build-with-cxx.m4.
952 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
953 * configure: Regenerate.
955 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
958 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
959 call writing data to own_buf.
961 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
963 * target.c (mywait): Call target_wait instead of
965 (target_wait): New function.
967 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
969 * server.c (start_inferior): New variable 'ptid'. Replace calls
970 to the_target->resume by target_continue{,_no_signal}, depending
972 * target.c (target_stop_and_wait): Call target_continue_no_signal
973 instead of the_target->resume.
974 (target_continue): New function.
976 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
978 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
980 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
983 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
985 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
986 * linux-arm-low.c (ps_get_thread_area): Likewise.
987 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
988 * linux-m68k-low.c (ps_get_thread_area): Likewise.
989 * linux-mips-low.c (ps_get_thread_area): Likewise.
990 * linux-nios2-low.c (ps_get_thread_area): Likewise.
991 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
992 * linux-x86-low.c (ps_get_thread_area): Likewise.
993 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
995 2016-08-19 Pedro Alves <palves@redhat.com>
997 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
999 2016-08-19 Pedro Alves <palves@redhat.com>
1001 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1002 comment. Use memcpy instead of casting through unsigned long.
1004 2016-08-19 Pedro Alves <palves@redhat.com>
1006 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1007 allocating around 0x80000000.
1009 2016-08-19 Pedro Alves <palves@redhat.com>
1012 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1013 (x32-avx512-linux-ipa.o): New rules.
1014 * configure.ac (x86_64-*-linux*): New x32 check.
1015 * configure.srv (ipa_x32_linux_regobj): New.
1016 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1017 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1019 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1021 * configure: Regenerate.
1023 2016-08-09 Pedro Alves <palves@redhat.com>
1026 * Makefile.in (OBS): Add signals-state-save-restore.o.
1027 (signals-state-save-restore.o): New rule.
1028 * config.in: Regenerate.
1029 * configure: Regenerate.
1030 * linux-low.c: Include "signals-state-save-restore.h".
1031 (linux_create_inferior): Call
1032 restore_original_signals_state.
1033 * server.c: Include "dispositions-save-restore.h".
1034 (captured_main): Call save_original_signals_state.
1036 2016-08-05 Pedro Alves <palves@redhat.com>
1038 * configure: Regenerate.
1040 2016-08-04 Yao Qi <yao.qi@linaro.org>
1042 * linux-low.c (regsets_fetch_inferior_registers): Check
1043 errno is ESRCH or not.
1045 2016-08-02 Yao Qi <yao.qi@linaro.org>
1047 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1048 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1049 (thread_db_load_search): Update.
1050 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1051 td_ta_set_event and td_ta_event_getmsg.
1053 2016-07-26 Pedro Alves <palves@redhat.com>
1056 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1057 of unsigned long for 64-bit registers and use uint32_t instead of
1058 unsigned int for 32-bit registers.
1060 2016-07-26 Pedro Alves <palves@redhat.com>
1062 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1065 2016-07-21 Tom Tromey <tom@tromey.com>
1067 * configure: Rebuild.
1069 2016-07-21 Yao Qi <yao.qi@linaro.org>
1071 * mem-break.c (find_gdb_breakpoint): Cast bp to
1072 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1074 2016-07-21 Yao Qi <yao.qi@linaro.org>
1076 * server.c (handle_v_requests): Support s and S actions
1077 if target_supports_software_single_step return true.
1079 2016-07-21 Yao Qi <yao.qi@linaro.org>
1081 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1082 is resume_step, call maybe_hw_step.
1083 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1085 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1087 (proceed_one_lwp): If resume request is resume_step, install
1088 reinsert breakpoints and call maybe_hw_step.
1090 2016-07-21 Yao Qi <yao.qi@linaro.org>
1092 * linux-low.c (proceed_one_lwp): Declare.
1093 (linux_resume_one_thread): Remove local variable 'step'.
1094 Lift code enqueue signal. Call proceed_one_lwp instead of
1095 linux_resume_one_lwp.
1097 2016-07-21 Yao Qi <yao.qi@linaro.org>
1099 * linux-low.c (linux_resume_one_thread): Call
1100 enqueue_pending_signal.
1102 2016-07-21 Yao Qi <yao.qi@linaro.org>
1104 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1105 * inferiors.c (do_restore_current_thread_cleanup): New function.
1106 (make_cleanup_restore_current_thread): Likewise.
1107 * linux-low.c (install_software_single_step_breakpoints): Call
1108 make_cleanup_restore_current_thread. Switch current_thread to
1111 2016-07-21 Yao Qi <yao.qi@linaro.org>
1113 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1114 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1115 (clone_one_breakpoint): Likewise.
1116 (delete_reinsert_breakpoints): Change parameter to thread.
1118 (has_reinsert_breakpoints): Likewise.
1119 (uninsert_reinsert_breakpoints): Likewise.
1120 (reinsert_reinsert_breakpoints): Likewise.
1121 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1122 (delete_reinsert_breakpoints): Likewise.
1123 (reinsert_reinsert_breakpoints): Likewise.
1124 (uninsert_reinsert_breakpoints): Likewise.
1125 (has_reinsert_breakpoints): Likewise.
1127 2016-07-21 Yao Qi <yao.qi@linaro.org>
1129 * inferiors.c (get_thread_process): Make parameter const.
1130 * inferiors.h (get_thread_process): Update declaration.
1131 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1132 Add new parameters child_thread and parent_thread. Callers
1134 * mem-break.h (clone_all_breakpoints): Update declaration.
1136 2016-07-21 Yao Qi <yao.qi@linaro.org>
1138 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1139 <command_list, handler>: Remove.
1140 (struct gdb_breakpoint): New.
1141 (struct other_breakpoint): New.
1142 (struct reinsert_breakpoint): New.
1143 (is_gdb_breakpoint): New function.
1144 (any_persistent_commands): Update command_list if
1145 is_gdb_breakpoint returns true.
1146 (set_breakpoint): Create breakpoints according to their types.
1147 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1148 (set_gdb_breakpoint_1): Likewise.
1149 (set_gdb_breakpoint): Likewise.
1150 (clear_breakpoint_conditions): Change parameter type to
1151 'struct gdb_breakpoint *'.
1152 (clear_breakpoint_commands): Likewise.
1153 (clear_breakpoint_conditions_and_commands): Likewise.
1154 (add_condition_to_breakpoint): Likewise.
1155 (add_breakpoint_condition): Likewise.
1156 (add_commands_to_breakpoint): Likewise.
1157 (check_breakpoints): Check other_breakpoint.
1158 (clone_one_breakpoint): Clone breakpopint according to its type.
1159 * mem-break.h (struct gdb_breakpoint): Declare.
1160 (set_gdb_breakpoint): Update declaration.
1161 (clear_breakpoint_conditions_and_commands): Likewise.
1162 (add_breakpoint_condition): Likewise.
1163 (add_breakpoint_commands): Likewise.
1164 * server.c (process_point_options): Change parameter type to
1165 'struct gdb_breakpoint *'.
1167 2016-07-21 Yao Qi <yao.qi@linaro.org>
1169 * mem-break.c (set_breakpoint_at): Rename it to ...
1170 (set_breakpoint_type_at): ... it.
1171 (set_breakpoint_at): Call set_breakpoint_type_at.
1172 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1173 * mem-break.h (set_breakpoint_at): Update comments.
1175 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1177 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1179 (nios2_store_gregset): Likewise.
1181 2016-07-01 Pedro Alves <palves@redhat.com>
1182 Antoine Tremblay <antoine.tremblay@ericsson.com>
1184 * linux-low.c: Change interface to take the target lwp_info
1185 pointer directly and return void. Handle detaching from a zombie
1187 (linux_detach_lwp_callback): New function.
1188 (linux_detach): Detach from the leader thread after detaching from
1191 2016-06-28 Yao Qi <yao.qi@linaro.org>
1193 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1194 for variable new_offset.
1195 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1196 (aarch64_ftrace_insn_reloc_cb): Likewise.
1197 (aarch64_ftrace_insn_reloc_tb): Likewise.
1198 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1199 PRIx64 instead of PRIx32.
1201 2016-06-28 Yao Qi <yao.qi@linaro.org>
1203 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1204 (the_low_target): Install arm_get_syscall_trapinfo.
1206 2016-06-28 Yao Qi <yao.qi@linaro.org>
1208 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1210 (the_low_target): Install aarch64_get_syscall_trapinfo.
1212 2016-06-28 Yao Qi <yao.qi@linaro.org>
1214 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1216 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1217 Remove parameter sysno.
1218 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1221 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1223 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1224 (s390_emit_ne_goto): Likewise.
1225 (s390_emit_lt_goto): Likewise.
1226 (s390_emit_le_goto): Likewise.
1227 (s390_emit_gt_goto): Likewise.
1228 (s390_emit_ge_goto): Likewise.
1229 (s390x_emit_eq_goto): Likewise.
1230 (s390x_emit_ne_goto): Likewise.
1231 (s390x_emit_lt_goto): Likewise.
1232 (s390x_emit_le_goto): Likewise.
1233 (s390x_emit_gt_goto): Likewise.
1234 (s390x_emit_ge_goto): Likewise.
1235 (s390_emit_ops_impl): Mark variable static.
1236 (s390x_emit_ops): Likewise.
1238 2016-06-17 Yao Qi <yao.qi@linaro.org>
1240 * linux-low.c (handle_extended_wait): Call
1241 uninsert_reinsert_breakpoints for the parent process. Remove
1242 reinsert breakpoints from the child process. Reinsert them to
1243 the parent process when vfork is done.
1244 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1245 (reinsert_reinsert_breakpoints): New function.
1246 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1247 (reinsert_reinsert_breakpoints): Declare.
1249 2016-06-17 Yao Qi <yao.qi@linaro.org>
1251 * linux-low.c (handle_extended_wait): If the parent is doing
1252 step-over, remove the reinsert breakpoints from the forked child.
1254 2016-06-17 Yao Qi <yao.qi@linaro.org>
1256 * linux-low.c (unsuspend_all_lwps): Declare.
1257 (linux_low_filter_event): If thread exited, call finish_step_over.
1258 If step-over is finished, unsuspend other threads.
1260 2016-06-17 Yao Qi <yao.qi@linaro.org>
1262 * linux-low.c (linux_resume_one_lwp_throw): Assert
1263 has_reinsert_breakpoints returns false.
1264 * mem-break.c (delete_disabled_breakpoints): Assert
1265 bp type isn't reinsert_breakpoint.
1267 2016-06-17 Yao Qi <yao.qi@linaro.org>
1269 * linux-low.c (maybe_hw_step): New function.
1270 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1271 (finish_step_over): Switch current_thread to lwp temporarily,
1272 and assert has_reinsert_breakpoints returns true.
1273 (proceed_one_lwp): Call maybe_hw_step.
1274 * mem-break.c (has_reinsert_breakpoints): New function.
1275 * mem-break.h (has_reinsert_breakpoints): Declare.
1277 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1279 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1281 2016-05-17 Yao Qi <yao.qi@linaro.org>
1283 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1284 instead of find_inferior.
1286 2016-05-05 Yao Qi <yao.qi@linaro.org>
1288 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1289 Initialize res to zero.
1291 2016-05-05 Yao Qi <yao.qi@linaro.org>
1293 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1296 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1298 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1299 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1300 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1302 2016-04-28 Par Olsson <par.olsson@windriver.com>
1303 Simon Marchi <simon.marchi@ericsson.com>
1305 * tracepoint.c (write_inferior_int8): New function.
1306 (cmd_qtenable_disable): Write enable flag using
1307 write_inferior_int8.
1309 2016-04-25 Yao Qi <yao.qi@linaro.org>
1311 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1312 (need_step_over_p): Return zero if the LWP has pending signals
1313 can be delivered on software single step target.
1315 2016-04-25 Yao Qi <yao.qi@linaro.org>
1317 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1318 return instead of error.
1320 2016-04-22 Yao Qi <yao.qi@linaro.org>
1322 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1325 2016-04-22 Yao Qi <yao.qi@linaro.org>
1327 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1328 signal when stepping over breakpoint with software single
1331 2016-04-21 Pedro Alves <palves@redhat.com>
1333 * linux-s390-low.c (s390_collect_ptrace_register)
1334 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1336 (s390_check_regset): Use void * instead of gdb_byte *.
1338 2016-04-20 Pedro Alves <palves@redhat.com>
1340 * configure: Renegerate.
1342 2016-04-20 Yao Qi <yao.qi@linaro.org>
1344 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1345 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1347 (arm_store_gregset): Likewise.
1349 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1351 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1352 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1353 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1354 (amd64-avx-mpx-linux.c): New rules.
1355 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1356 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1357 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1358 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1359 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1360 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1361 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1362 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1363 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1364 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1365 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1366 * linux-x86-low.c (x86_linux_read_description): Add case for
1367 X86_XSTATE_AVX_MPX_MASK.
1368 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1369 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1370 init_registers_i386_avx_mpx_linux.
1371 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1372 (initialize_low_tracepoint): Call
1373 init_registers_i386_avx_mpx_linux.
1374 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1375 (initialize_low_tracepoint): Call
1376 init_registers_amd64_avx_mpx_linux.
1377 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1378 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1379 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1382 2016-04-18 Pedro Alves <palves@redhat.com>
1384 * configure: Regenerate.
1386 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1388 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1389 (aarch64_emit_sub): Likewise.
1391 2016-04-12 Pedro Alves <palves@redhat.com>
1393 * utils.c (prepare_to_throw_exception): Delete.
1395 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1397 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1399 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1401 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1403 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1405 * linux-aarch64-ipa.c: Add <elf.h> include.
1406 * linux-ppc-ipa.c: Add <elf.h> include.
1407 * linux-s390-ipa.c: Add <elf.h> include.
1409 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1411 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1412 (get_raw_reg_ptr): Likewise.
1413 (get_trace_state_variable_value_ptr): Likewise.
1414 (set_trace_state_variable_value_ptr): Likewise.
1415 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1418 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1419 Marcin Kościelnicki <koriakin@0x04.net>
1422 * linux-ppc-low.c (emit_insns): New function.
1423 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1424 (ppc_emit_prologue): New function.
1425 (ppc_emit_epilogue): New function.
1426 (ppc_emit_add): New function.
1427 (ppc_emit_sub): New function.
1428 (ppc_emit_mul): New function.
1429 (ppc_emit_lsh): New function.
1430 (ppc_emit_rsh_signed): New function.
1431 (ppc_emit_rsh_unsigned): New function.
1432 (ppc_emit_ext): New function.
1433 (ppc_emit_zero_ext): New function.
1434 (ppc_emit_log_not): New function.
1435 (ppc_emit_bit_and): New function.
1436 (ppc_emit_bit_or): New function.
1437 (ppc_emit_bit_xor): New function.
1438 (ppc_emit_bit_not): New function.
1439 (ppc_emit_equal): New function.
1440 (ppc_emit_less_signed): New function.
1441 (ppc_emit_less_unsigned): New function.
1442 (ppc_emit_ref): New function.
1443 (ppc_emit_const): New function.
1444 (ppc_emit_reg): New function.
1445 (ppc_emit_pop): New function.
1446 (ppc_emit_stack_flush): New function.
1447 (ppc_emit_swap): New function.
1448 (ppc_emit_stack_adjust): New function.
1449 (ppc_emit_call): New function.
1450 (ppc_emit_int_call_1): New function.
1451 (ppc_emit_void_call_2): New function.
1452 (ppc_emit_if_goto): New function.
1453 (ppc_emit_goto): New function.
1454 (ppc_emit_eq_goto): New function.
1455 (ppc_emit_ne_goto): New function.
1456 (ppc_emit_lt_goto): New function.
1457 (ppc_emit_le_goto): New function.
1458 (ppc_emit_gt_goto): New function.
1459 (ppc_emit_ge_goto): New function.
1460 (ppc_write_goto_address): New function.
1461 (ppc_emit_ops_impl): New static variable.
1462 (ppc64v1_emit_prologue): New function.
1463 (ppc64v2_emit_prologue): New function.
1464 (ppc64_emit_epilogue): New function.
1465 (ppc64_emit_add): New function.
1466 (ppc64_emit_sub): New function.
1467 (ppc64_emit_mul): New function.
1468 (ppc64_emit_lsh): New function.
1469 (ppc64_emit_rsh_signed): New function.
1470 (ppc64_emit_rsh_unsigned): New function.
1471 (ppc64_emit_ext): New function.
1472 (ppc64_emit_zero_ext): New function.
1473 (ppc64_emit_log_not): New function.
1474 (ppc64_emit_bit_and): New function.
1475 (ppc64_emit_bit_or): New function.
1476 (ppc64_emit_bit_xor): New function.
1477 (ppc64_emit_bit_not): New function.
1478 (ppc64_emit_equal): New function.
1479 (ppc64_emit_less_signed): New function.
1480 (ppc64_emit_less_unsigned): New function.
1481 (ppc64_emit_ref): New function.
1482 (ppc64_emit_const): New function.
1483 (ppc64v1_emit_reg): New function.
1484 (ppc64v2_emit_reg): New function.
1485 (ppc64_emit_pop): New function.
1486 (ppc64_emit_stack_flush): New function.
1487 (ppc64_emit_swap): New function.
1488 (ppc64v1_emit_call): New function.
1489 (ppc64v2_emit_call): New function.
1490 (ppc64v1_emit_int_call_1): New function.
1491 (ppc64v2_emit_int_call_1): New function.
1492 (ppc64v1_emit_void_call_2): New function.
1493 (ppc64v2_emit_void_call_2): New function.
1494 (ppc64_emit_if_goto): New function.
1495 (ppc64_emit_eq_goto): New function.
1496 (ppc64_emit_ne_goto): New function.
1497 (ppc64_emit_lt_goto): New function.
1498 (ppc64_emit_le_goto): New function.
1499 (ppc64_emit_gt_goto): New function.
1500 (ppc64_emit_ge_goto): New function.
1501 (ppc64v1_emit_ops_impl): New static variable.
1502 (ppc64v2_emit_ops_impl): New static variable.
1503 (ppc_emit_ops): New function.
1504 (linux_low_target): Wire in ppc_emit_ops.
1506 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1507 Marcin Kościelnicki <koriakin@0x04.net>
1510 * Makefile.in: Add powerpc-*-ipa.o
1511 * configure.srv: Add ipa_obj for powerpc*-linux.
1512 * linux-ppc-ipa.c: New file.
1513 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1515 (PPC_FIELD): New macro.
1516 (PPC_SEXT): New macro.
1517 (PPC_OP6): New macro.
1518 (PPC_BO): New macro.
1519 (PPC_LI): New macro.
1520 (PPC_BD): New macro.
1521 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1522 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1523 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1524 (ppc_get_thread_area): New function.
1525 (is_elfv2_inferior): New function.
1526 (gen_ds_form): New function.
1527 (GEN_STD): New macro.
1528 (GEN_STDU): New macro.
1529 (GEN_LD): New macro.
1530 (GEN_LDU): New macro.
1531 (gen_d_form): New function.
1532 (GEN_ADDI): New macro.
1533 (GEN_ADDIS): New macro.
1534 (GEN_LI): New macro.
1535 (GEN_LIS): New macro.
1536 (GEN_ORI): New macro.
1537 (GEN_ORIS): New macro.
1538 (GEN_LWZ): New macro.
1539 (GEN_STW): New macro.
1540 (GEN_STWU): New macro.
1541 (gen_xfx_form): New function.
1542 (GEN_MFSPR): New macro.
1543 (GEN_MTSPR): New macro.
1544 (GEN_MFCR): New macro.
1545 (GEN_MTCR): New macro.
1546 (GEN_SYNC): New macro.
1547 (GEN_LWSYNC): New macro.
1548 (gen_x_form): New function.
1549 (GEN_OR): New macro.
1550 (GEN_MR): New macro.
1551 (GEN_LWARX): New macro.
1552 (GEN_STWCX): New macro.
1553 (GEN_CMPW): New macro.
1554 (gen_md_form): New function.
1555 (GEN_RLDICL): New macro.
1556 (GEN_RLDICR): New macro.
1557 (gen_i_form): New function.
1559 (GEN_BL): New macro.
1560 (gen_b_form): New function.
1561 (GEN_BNE): New macro.
1562 (GEN_LOAD): New macro.
1563 (GEN_STORE): New macro.
1564 (gen_limm): New function.
1565 (gen_atomic_xchg): New function.
1566 (gen_call): New function.
1567 (ppc_relocate_instruction): New function.
1568 (ppc_install_fast_tracepoint_jump_pad): New function.
1569 (ppc_get_min_fast_tracepoint_insn_len): New function.
1570 (ppc_get_ipa_tdesc_idx): New function.
1571 (the_low_target): Wire in the new functions.
1572 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1574 * linux-ppc-tdesc.h: New file.
1576 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1578 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1579 (alloc_jump_pad_buffer): New function.
1580 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1581 (alloc_jump_pad_buffer): New function.
1582 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1583 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1584 (alloc_jump_pad_buffer): New function.
1585 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1586 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1587 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1588 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1590 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1592 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1593 * linux-amd64-ipa.c: Likewise.
1594 * linux-i386-ipa.c: Likewise.
1595 * linux-s390-ipa.c: Likewise.
1596 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1597 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1598 set_trace_state_variable_value_ptr.
1599 (struct ipa_sym_addresses): Likewise.
1600 (symbol_list): Likewise.
1601 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1602 accessing gdb_collect directly.
1603 (gdb_collect_ptr_type): New typedef.
1604 (get_raw_reg_ptr_type): New typedef.
1605 (get_trace_state_variable_value_ptr_type): New typedef.
1606 (set_trace_state_variable_value_ptr_type): New typedef.
1607 (gdb_collect_ptr): New global.
1608 (get_raw_reg_ptr): New global.
1609 (get_trace_state_variable_value_ptr): New global.
1610 (set_trace_state_variable_value_ptr): New global.
1611 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1612 accessing get_raw_reg directly.
1613 (get_get_tsv_func_addr): Likewise for
1614 get_trace_state_variable_value_ptr.
1615 (get_set_tsv_func_addr): Likewise for
1616 set_trace_state_variable_value_ptr.
1617 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1619 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1621 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1623 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1625 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1627 (relocate_instruction): Remove own_buf.
1628 * server.c (own_buf): Make global.
1629 (handle_v_requests): Make global.
1630 * server.h (own_buf): New declaration.
1631 (handle_v_requests): New prototype.
1633 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1636 * linux-s390-low.c (add_insns): New function.
1637 (s390_emit_prologue): New function.
1638 (s390_emit_epilogue): New function.
1639 (s390_emit_add): New function.
1640 (s390_emit_sub): New function.
1641 (s390_emit_mul): New function.
1642 (s390_emit_lsh): New function.
1643 (s390_emit_rsh_signed): New function.
1644 (s390_emit_rsh_unsigned): New function.
1645 (s390_emit_ext): New function.
1646 (s390_emit_log_not): New function.
1647 (s390_emit_bit_and): New function.
1648 (s390_emit_bit_or): New function.
1649 (s390_emit_bit_xor): New function.
1650 (s390_emit_bit_not): New function.
1651 (s390_emit_equal): New function.
1652 (s390_emit_less_signed): New function.
1653 (s390_emit_less_unsigned): New function.
1654 (s390_emit_ref): New function.
1655 (s390_emit_if_goto): New function.
1656 (s390_emit_goto): New function.
1657 (s390_write_goto_address): New function.
1658 (s390_emit_litpool): New function.
1659 (s390_emit_const): New function.
1660 (s390_emit_call): New function.
1661 (s390_emit_reg): New function.
1662 (s390_emit_pop): New function.
1663 (s390_emit_stack_flush): New function.
1664 (s390_emit_zero_ext): New function.
1665 (s390_emit_swap): New function.
1666 (s390_emit_stack_adjust): New function.
1667 (s390_emit_set_r2): New function.
1668 (s390_emit_int_call_1): New function.
1669 (s390_emit_void_call_2): New function.
1670 (s390_emit_eq_goto): New function.
1671 (s390_emit_ne_goto): New function.
1672 (s390_emit_lt_goto): New function.
1673 (s390_emit_le_goto): New function.
1674 (s390_emit_gt_goto): New function.
1675 (s390_emit_ge_goto): New function.
1676 (s390x_emit_prologue): New function.
1677 (s390x_emit_epilogue): New function.
1678 (s390x_emit_add): New function.
1679 (s390x_emit_sub): New function.
1680 (s390x_emit_mul): New function.
1681 (s390x_emit_lsh): New function.
1682 (s390x_emit_rsh_signed): New function.
1683 (s390x_emit_rsh_unsigned): New function.
1684 (s390x_emit_ext): New function.
1685 (s390x_emit_log_not): New function.
1686 (s390x_emit_bit_and): New function.
1687 (s390x_emit_bit_or): New function.
1688 (s390x_emit_bit_xor): New function.
1689 (s390x_emit_bit_not): New function.
1690 (s390x_emit_equal): New function.
1691 (s390x_emit_less_signed): New function.
1692 (s390x_emit_less_unsigned): New function.
1693 (s390x_emit_ref): New function.
1694 (s390x_emit_if_goto): New function.
1695 (s390x_emit_const): New function.
1696 (s390x_emit_call): New function.
1697 (s390x_emit_reg): New function.
1698 (s390x_emit_pop): New function.
1699 (s390x_emit_stack_flush): New function.
1700 (s390x_emit_zero_ext): New function.
1701 (s390x_emit_swap): New function.
1702 (s390x_emit_stack_adjust): New function.
1703 (s390x_emit_int_call_1): New function.
1704 (s390x_emit_void_call_2): New function.
1705 (s390x_emit_eq_goto): New function.
1706 (s390x_emit_ne_goto): New function.
1707 (s390x_emit_lt_goto): New function.
1708 (s390x_emit_le_goto): New function.
1709 (s390x_emit_gt_goto): New function.
1710 (s390x_emit_ge_goto): New function.
1711 (s390_emit_ops): New function.
1712 (struct linux_target_ops): Fill in emit_ops hook.
1714 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1717 * Makefile.in: Add s390 IPA files.
1718 * configure.srv: Build IPA for s390.
1719 * linux-s390-ipa.c: New file.
1720 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1721 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1722 (tdesc_s390_linux32): Likewise.
1723 (init_registers_s390_linux32v1): Likewise.
1724 (tdesc_s390_linux32v1): Likewise.
1725 (init_registers_s390_linux32v2): Likewise.
1726 (tdesc_s390_linux32v2): Likewise.
1727 (init_registers_s390_linux64): Likewise.
1728 (tdesc_s390_linux64): Likewise.
1729 (init_registers_s390_linux64v1): Likewise.
1730 (tdesc_s390_linux64v1): Likewise.
1731 (init_registers_s390_linux64v2): Likewise.
1732 (tdesc_s390_linux64v2): Likewise.
1733 (init_registers_s390_te_linux64): Likewise.
1734 (tdesc_s390_te_linux64): Likewise.
1735 (init_registers_s390_vx_linux64): Likewise.
1736 (tdesc_s390_vx_linux64): Likewise.
1737 (init_registers_s390_tevx_linux64): Likewise.
1738 (tdesc_s390_tevx_linux64): Likewise.
1739 (init_registers_s390x_linux64): Likewise.
1740 (tdesc_s390x_linux64): Likewise.
1741 (init_registers_s390x_linux64v1): Likewise.
1742 (tdesc_s390x_linux64v1): Likewise.
1743 (init_registers_s390x_linux64v2): Likewise.
1744 (tdesc_s390x_linux64v2): Likewise.
1745 (init_registers_s390x_te_linux64): Likewise.
1746 (tdesc_s390x_te_linux64): Likewise.
1747 (init_registers_s390x_vx_linux64): Likewise.
1748 (tdesc_s390x_vx_linux64): Likewise.
1749 (init_registers_s390x_tevx_linux64): Likewise.
1750 (tdesc_s390x_tevx_linux64): Likewise.
1751 (have_hwcap_s390_vx): New static variable.
1752 (s390_arch_setup): Fill have_hwcap_s390_vx.
1753 (s390_get_thread_area): New function.
1754 (s390_ft_entry_gpr_esa): New const.
1755 (s390_ft_entry_gpr_zarch): New const.
1756 (s390_ft_entry_misc): New const.
1757 (s390_ft_entry_fr): New const.
1758 (s390_ft_entry_vr): New const.
1759 (s390_ft_main_31): New const.
1760 (s390_ft_main_64): New const.
1761 (s390_ft_exit_fr): New const.
1762 (s390_ft_exit_vr): New const.
1763 (s390_ft_exit_misc): New const.
1764 (s390_ft_exit_gpr_esa): New const.
1765 (s390_ft_exit_gpr_zarch): New const.
1766 (append_insns): New function.
1767 (s390_relocate_instruction): New function.
1768 (s390_install_fast_tracepoint_jump_pad): New function.
1769 (s390_get_min_fast_tracepoint_insn_len): New function.
1770 (s390_get_ipa_tdesc_idx): New function.
1771 (struct linux_target_ops): Wire in the above functions.
1772 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1773 * linux-s390-tdesc.h: New file.
1775 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1777 * linux-s390-low.c (s390_supports_tracepoints): New function.
1778 (struct linux_target_ops): Fill supports_tracepoints hook.
1780 2016-03-18 Yao Qi <yao.qi@linaro.org>
1782 * linux-low.c (lwp_signal_can_be_delivered): New function.
1783 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1785 2016-03-18 Yao Qi <yao.qi@linaro.org>
1787 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1788 0 if signal is enqueued. Remove 'signal' from one debugging
1789 message. Move one debugging message to some lines below.
1790 Remove code setting 'signal' to 0.
1792 2016-03-18 Yao Qi <yao.qi@linaro.org>
1794 * linux-low.c (linux_low_filter_event): Remove redundant
1795 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1797 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1799 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1800 (struct linux_target_ops): Wire in the above.
1802 2016-03-03 Yao Qi <yao.qi@linaro.org>
1804 * linux-low.c: Update comments to start_step_over.
1806 2016-03-03 Yao Qi <yao.qi@linaro.org>
1809 * linux-low.c (handle_extended_wait): Set child suspended
1810 if event_lwp->bp_reinsert isn't zero.
1812 2016-03-02 Yao Qi <yao.qi@linaro.org>
1814 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1815 enqueue_pending_signal.
1817 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1819 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1822 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1824 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1825 (s390_regmap_3264) [!__s390x__]: New global.
1826 (s390_collect_ptrace_register): Skip map entries containing -1.
1827 (s390_supply_ptrace_register): Ditto.
1828 (s390_fill_gprs_high): New function.
1829 (s390_store_gprs_high): New function.
1830 (s390_regsets): Add NT_S390_HIGH_GPRS.
1831 (s390_get_hwcap): Enable on 31-bit.
1832 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1833 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1834 Detect NT_S390_HIGH_GPRS.
1835 (s390_usrregs_info_3264): Enable on 31-bit.
1836 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1837 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1839 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1842 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1843 * configure.srv: Ditto.
1844 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1845 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1846 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1847 (init_registers_amd64_linux): Remove prototype.
1848 (tdesc_amd64_linux): Remove declaration.
1849 (get_ipa_tdesc): New function.
1850 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1851 initialize remaining tdescs.
1852 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1853 (init_registers_i386_linux): Remove prototype.
1854 (tdesc_i386_linux): Remove declaration.
1855 (get_ipa_tdesc): New function.
1856 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1857 initialize remaining tdescs.
1858 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1859 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1860 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1861 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1862 (x86_get_ipa_tdesc_idx): New function.
1863 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1864 * linux-x86-tdesc.h: New file.
1865 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1866 (target_get_ipa_tdesc_idx): New macro.
1867 * tracepoint.c (ipa_tdesc_idx): New macro.
1868 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1869 (symbol_list): Add ipa_tdesc_idx.
1870 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1871 (ipa_tdesc): Remove.
1872 (ipa_tdesc_idx): New variable.
1873 (get_context_regcache): Use get_ipa_tdesc.
1874 (gdb_collect): Ditto.
1876 * tracepoint.h (get_ipa_tdesc): New prototype.
1877 (ipa_tdesc): Remove.
1879 2016-02-24 Pedro Alves <palves@redhat.com>
1881 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1882 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1883 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1884 Factor out common code between the USE_SIGTRAP_SIGINFO and
1885 !USE_SIGTRAP_SIGINFO blocks.
1886 (linux_low_filter_event): Call save_stop_reason instead of
1887 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1889 (linux_wait_1): Update comments.
1891 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1893 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1894 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1895 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1896 ppc_insert_point, ppc_remove_point.
1898 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1900 * linux-s390-low.c (s390_supports_z_point_type): New function.
1901 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1903 2016-02-16 Yao Qi <yao.qi@linaro.org>
1905 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1906 PC. Get pc from regcache_read_pc.
1908 2016-02-12 Yao Qi <yao.qi@linaro.org>
1910 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1911 or linux_get_pc_32bit.
1912 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1914 2016-02-12 Yao Qi <yao.qi@linaro.org>
1916 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1917 arm_linux_get_next_pcs_fixup.
1919 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1921 * tracepoint.c (x_tracepoint_action_download): Change
1922 write_inferior_data_ptr to write_inferior_data_pointer.
1923 (cmd_qtstart): Likewise.
1924 (write_inferior_data_ptr): Remove.
1925 (download_agent_expr): Change write_inferior_data_ptr to
1926 write_inferior_data_pointer.
1927 (download_tracepoint_1): Likewise.
1928 (download_tracepoint): Likewise.
1929 (download_trace_state_variables): Likewise.
1931 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1932 Marcin Kościelnicki <koriakin@0x04.net>
1934 * tracepoint.c (struct tracepoint_action_ops): Remove.
1935 (struct tracepoint_action): Remove ops.
1936 (m_tracepoint_action_download, r_tracepoint_action_download)
1937 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1938 size and offset accordingly.
1939 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1940 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1941 (tracepoint_action_send, tracepoint_action_download): New functions.
1942 Helpers for trace action handlers.
1943 (add_tracepoint_action): Remove setup actions ops.
1944 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1946 2016-02-10 Yao Qi <yao.qi@linaro.org>
1948 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1950 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1952 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1954 * configure: Regenerate.
1956 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1958 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1959 void * to gdb_byte *.
1960 * linux-low.c (siginfo_fixup): Likewise.
1961 (linux_xfer_siginfo): Likewise.
1962 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1964 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1966 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1968 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1970 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1972 * linux-x86-low.c [__x86_64__]: Include
1973 "nat/amd64-linux-siginfo.h".
1974 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1975 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1976 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1977 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1978 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1979 (cpt_si_fd, si_timerid, si_overrun): Move from
1980 nat/amd64-linux-siginfo.c.
1981 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1983 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1985 * server.c (skip_to_semicolon): Remove.
1986 (process_point_options): Use strchrnul instead of
1989 2016-01-26 Yao Qi <yao.qi@linaro.org>
1991 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1992 * linux-low.c (install_software_single_step_breakpoints): Don't
1993 call regcache_read_pc.
1994 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1997 2016-01-26 Yao Qi <yao.qi@linaro.org>
1999 * linux-low.c (install_software_single_step_breakpoints): Call
2000 regcache_read_pc instead of get_pc.
2002 2016-01-26 Yao Qi <yao.qi@linaro.org>
2004 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2005 (unblock_async_io): Rename to ...
2006 (block_unblock_async_io): ... it. New function.
2007 (enable_async_io): Don't install SIGIO handler. Unblock it
2009 (disable_async_io): Don't ignore SIGIO. Block it instead.
2010 (initialize_async_io): Install SIGIO handler. Don't call
2013 2016-01-26 Yao Qi <yao.qi@linaro.org>
2015 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2016 first character is '\003', call *the_target->request_interrupt.
2018 2016-01-25 Yao Qi <yao.qi@linaro.org>
2020 * remote-utils.c (new_thread_notify): Remove.
2021 (dead_thread_notify): Likewise.
2022 * remote-utils.h (new_thread_notify): Remove declaration.
2023 (dead_thread_notify): Likewise.
2025 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2027 * gdb.trace/pending.exp: Fix expected message on continue.
2029 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2031 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2032 it works properly on big-endian machines where sizeof (CORE_ADDR)
2035 2016-01-21 Pedro Alves <palves@redhat.com>
2037 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2038 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2039 * configure: Regenerate.
2041 2016-01-21 Yao Qi <yao.qi@linaro.org>
2043 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2044 is_thumb and set it according to CPSR saved on the stack.
2045 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2046 arm_sigreturn_next_pc.
2048 2016-01-18 Yao Qi <yao.qi@linaro.org>
2050 * linux-low.c (linux_set_pc_64bit): New function.
2051 (linux_get_pc_64bit): New function.
2052 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2054 * linux-sparc-low.c (debug_threads): Remove declaration.
2055 (sparc_get_pc): Remove.
2056 (the_low_target): Use linux_get_pc_64bit instead of
2058 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2059 (the_low_target): Use linux_get_pc_64bit and
2062 2016-01-18 Yao Qi <yao.qi@linaro.org>
2064 * linux-arm-low.c (debug_threads): Remove declaration.
2065 (arm_get_pc, arm_set_pc): Remove.
2066 (the_low_target): Use linux_get_pc_32bit and
2068 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2069 (the_low_target): Use linux_get_pc_32bit and
2071 * linux-cris-low.c (debug_threads): Remove declaration.
2072 (cris_get_pc, cris_set_pc,): Remove.
2073 (the_low_target): Use linux_get_pc_32bit and
2075 * linux-crisv32-low.c (debug_threads): Remove declaration.
2076 (cris_get_pc, cris_set_pc): Remove.
2077 (the_low_target): Use linux_get_pc_32bit and
2079 * linux-low.c: Include inttypes.h.
2080 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2081 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2082 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2083 (the_low_target): Use linux_get_pc_32bit and
2085 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2086 (the_low_target): Use linux_get_pc_32bit and
2088 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2089 (the_low_target): Use linux_get_pc_32bit and
2091 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2092 (the_low_target): Use linux_get_pc_32bit and
2094 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2095 (the_low_target): Use linux_get_pc_32bit and
2098 2016-01-18 Gary Benson <gbenson@redhat.com>
2100 * configure.ac (AC_FUNC_FORK): New check.
2101 * config.in: Regenerate.
2102 * configure: Likewise.
2104 2016-01-14 Yao Qi <yao.qi@linaro.org>
2106 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2107 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2108 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2109 arm_get_next_pcs_ctor.
2111 2016-01-12 Josh Stone <jistone@redhat.com>
2112 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2114 * inferiors.h: Include "gdb_vecs.h".
2115 (struct process_info): Add syscalls_to_catch.
2116 * inferiors.c (remove_process): Free syscalls_to_catch.
2117 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2118 syscall_return stops.
2119 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2120 * server.c (handle_general_set): Handle QCatchSyscalls.
2121 (handle_query): Report support for QCatchSyscalls.
2122 * target.h (struct target_ops): Add supports_catch_syscall.
2123 (target_supports_catch_syscall): New macro.
2124 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2125 (struct lwp_info): Add syscall_state.
2126 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2127 Maintain syscall_state and syscalls_to_catch across exec.
2128 (get_syscall_trapinfo): New function, proxy to the_low_target.
2129 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2130 (linux_low_filter_event): Toggle syscall_state entry/return for
2131 syscall traps, and set it ignored for all others.
2132 (gdb_catching_syscalls_p): New function.
2133 (gdb_catch_this_syscall_p): New function.
2134 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2135 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2136 (linux_supports_catch_syscall): New function.
2137 (linux_target_ops): Install it.
2138 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2139 (the_low_target): Install it.
2141 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2143 * acinclude.m4: Include new ../warning.m4 file.
2144 * configure: Regenerated.
2145 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2147 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2149 * ax.c (is_goto_target): Mark static.
2150 * linux-low.c (register_addr): Likewise.
2151 (linux_fetch_registers, linux_store_registers): Likewise.
2152 * mem-break.c (any_persistent_commands): Fix old prototype.
2153 (add_commands_to_breakpoint): Mark static.
2154 * regcache.c (find_register_by_name): Delete unused func.
2155 * remote-utils.c (hex_or_minus_one): Mark static.
2156 * server.c (monitor_show_help): Mark static.
2157 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2158 handle_v_requests): Likewise.
2160 2016-01-12 Pedro Alves <palves@redhat.com>
2162 Remove use of the registered trademark symbol throughout.
2164 2016-01-08 Yao Qi <yao.qi@linaro.org>
2166 * remote-utils.c (getpkt): If c is '\003', call target hook
2169 2016-01-06 Yao Qi <yao.qi@linaro.org>
2171 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2172 linux-aarch32-low.c.
2173 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2174 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2175 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2176 (thumb2_breakpoint): Declare.
2177 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2178 linux-aarch32-low.h.
2179 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2180 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2181 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2183 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2185 * gdbreplay.c (gdbreplay_version): Change copyright year in
2187 * server.c (gdbserver_version): Likewise.
2189 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2191 * server.c (crc32_table): Delete.
2192 (crc32): Use libiberty's xcrc32 function.
2194 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2196 * lynx-low.c (lynx_delete_thread_callback): New function.
2197 (lynx_mourn): Properly delete our process and all of its
2198 threads. Remove call to clear_inferiors.
2200 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2202 * target.c (thread_search_callback): Add check that
2203 the thread_stopped target callback is not NULL before
2206 2015-12-21 Yao Qi <yao.qi@linaro.org>
2208 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2211 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2213 * server.c (handle_query): Call target_supports_software_single_step.
2215 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2217 * linux-low.c (single_step): New function.
2218 (linux_resume_one_lwp_throw): Call single_step.
2219 (start_step_over): Likewise.
2221 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2223 * Makefile.in (SFILES): Append arch/arm-linux.c,
2224 arch/arm-get-next-pcs.c.
2225 (arm-linux.o): New rule.
2226 (arm-get-next-pcs.o): New rule.
2227 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2229 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2230 to linux-aarch32-low.c.
2231 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2232 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2233 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2234 (thumb2_breakpoint_len): Likewise.
2235 (arm_is_thumb_mode): Make non-static.
2236 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2237 from linux-aarch32-low.c.
2238 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2239 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2240 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2241 (thumb2_breakpoint_len): Likewise.
2242 (arm_is_thumb_mode): New declaration.
2243 * linux-arm-low.c: Include arch/arm-linux.h
2244 aarch/arm-get-next-pcs.h, sys/syscall.h.
2245 (get_next_pcs_ops): New struct.
2246 (get_next_pcs_addr_bits_remove): New function.
2247 (get_next_pcs_is_thumb): New function.
2248 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2249 (arm_sigreturn_next_pc): Likewise.
2250 (get_next_pcs_syscall_next_pc): Likewise.
2251 (arm_gdbserver_get_next_pcs): Likewise.
2252 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2254 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2255 * server.h: Include gdb_vecs.h.
2257 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2259 * Makefile.in (SFILES): Append common/common-regcache.c.
2260 (OBS): Append common-regcache.o.
2261 (common-regcache.o): New rule.
2262 * regcache.c (init_register_cache): Initialize cache to
2264 (regcache_raw_read_unsigned): New function.
2265 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2266 register_status enum.
2268 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2270 * linux-aarch64-low.c (the_low_targets): Rename
2271 breakpoint_reinsert_addr to get_next_pcs.
2272 * linux-arm-low.c (the_low_targets): Likewise.
2273 * linux-bfin-low.c (the_low_targets): Likewise.
2274 * linux-cris-low.c (the_low_targets): Likewise.
2275 * linux-crisv32-low.c (the_low_targets): Likewise.
2276 * linux-low.c (can_software_single_step): Likewise.
2277 (install_software_single_step_breakpoints): New function.
2278 (start_step_over): Use install_software_single_step_breakpoints.
2279 * linux-low.h: New CORE_ADDR vector.
2280 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2282 * linux-mips-low.c (the_low_targets): Likewise.
2283 * linux-nios2-low.c (the_low_targets): Likewise.
2284 * linux-sparc-low.c (the_low_targets): Likewise.
2286 2015-12-17 Pedro Alves <palves@redhat.com>
2288 * linux-low.c (linux_kill_one_lwp): Remove references to
2290 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2292 (linux_init_signals): Delete.
2293 (initialize_low): Adjust.
2294 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2296 2015-12-16 Pedro Alves <palves@redhat.com>
2298 * configure.ac (compiler warning flags): When testing a
2299 -Wno-foo option, check whether -Wfoo works instead.
2300 * configure: Regenerate.
2302 2015-12-11 Don Breazeal <donb@codesourcery.com>
2304 * server.c (process_serial_event): Don't exit from gdbserver
2305 in remote mode if there are still active inferiors.
2307 2015-12-11 Yao Qi <yao.qi@linaro.org>
2309 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2310 arm_breakpoint_at if the process is 32-bit.
2312 2015-12-11 Yao Qi <yao.qi@linaro.org>
2314 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2317 2015-12-07 Yao Qi <yao.qi@linaro.org>
2319 * configure.srv: Append arm.o to srv_tgtobj for
2320 aarch64*-*-linux* target.
2321 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2322 from linux-arm-low.c.
2323 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2324 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2325 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2326 (thumb2_breakpoint_len): Likewise.
2327 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2328 (arm_breakpoint_kinds): Likewise.
2329 (arm_breakpoint_kind_from_pc): Likewise.
2330 (arm_sw_breakpoint_from_kind): Likewise.
2331 (arm_breakpoint_kind_from_current_state): Likewise.
2332 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2333 (arm_sw_breakpoint_from_kind): Declare.
2334 (arm_breakpoint_kind_from_current_state): Declare.
2335 (arm_breakpoint_at): Declare.
2336 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2337 arm_sw_breakpoint_from_kind if process is 32-bit.
2338 (aarch64_breakpoint_kind_from_pc): New function.
2339 (aarch64_breakpoint_kind_from_current_state): New function.
2340 (the_low_target): Initialize fields breakpoint_kind_from_pc
2341 and breakpoint_kind_from_current_state.
2342 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2343 linux-aarch32-low.c.
2344 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2345 (arm_breakpoint, arm_breakpoint_len): Likewise.
2346 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2347 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2348 (arm_is_thumb_mode): Likewise.
2349 (arm_breakpoint_at): Likewise.
2350 (arm_breakpoint_kind_from_pc): Likewise.
2351 (arm_sw_breakpoint_from_kind): Likewise.
2352 (arm_breakpoint_kind_from_current_state): Likewise.
2355 2015-08-04 Yao Qi <yao.qi@linaro.org>
2357 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2358 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2359 * server.c (extended_protocol): Remove "static".
2360 * server.h (extended_protocol): Declare it.
2362 2015-12-04 Josh Stone <jistone@redhat.com>
2364 * target.h (struct target_ops) <arch_setup>: Rename to ...
2365 (struct target_ops) <post_create_inferior>: ... this.
2366 (target_arch_setup): Rename to ...
2367 (target_post_create_inferior): ... this, calling post_create_inferior.
2368 * server.c (start_inferior): Update target_arch_setup calls to
2369 target_post_create_inferior.
2370 * linux-low.c (linux_low_ptrace_options): Forward declare.
2371 (linux_arch_setup): Update its comment for general use.
2372 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2373 (struct linux_target_ops): Use linux_post_create_inferior.
2374 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2375 to post_create_inferior.
2376 * nto-low.c (struct nto_target_ops): Likewise.
2377 * spu-low.c (struct spu_target_ops): Likewise.
2378 * win32-low.c (struct win32_target_ops): Likewise.
2380 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2382 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2384 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2386 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2387 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2388 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2389 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2390 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2391 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2392 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2393 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2394 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2395 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2396 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2397 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2399 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2401 * linux-low.c (linux_look_up_symbols): Don't call
2402 linux_supports_traceclone.
2403 * linux-low.h (thread_db_init): Remove use_events argument.
2404 * thread-db.c (thread_db_use_event): Remove global variable.
2405 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2406 (struct thread_db) <td_create_bp>: Remove field.
2407 (thread_db_create_event): Remove function.
2408 (thread_db_enable_reporting): Likewise.
2409 (find_one_thread): Don't check for thread_db_use_events.
2410 (attach_thread): Likewise.
2411 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2412 (try_thread_db_load_1): Don't check for thread_db_use_events.
2413 (thread_db_init): Remove use_events argument and thread events
2415 (remove_thread_event_breakpoints): Remove function.
2416 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2418 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2420 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2422 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2423 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2424 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2425 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2426 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2428 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2430 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2431 * linux-low.c (can_hardware_single_step): Use
2432 supports_hardware_single_step.
2433 (can_software_single_step): New function.
2434 (start_step_over): Call can_software_single_step.
2435 (linux_supports_hardware_single_step): New function.
2436 (struct target_ops) <supports_software_single_step>: Initialize.
2437 * linux-low.h (struct linux_target_ops)
2438 <supports_hardware_single_step>: Initialize.
2439 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2440 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2441 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2442 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2443 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2445 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2446 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2447 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2448 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2450 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2451 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2453 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2454 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2455 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2457 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2458 * target.h (struct target_ops): <supports_software_single_step>:
2460 (target_supports_software_single_step): New macro.
2462 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2464 * linux-low.c (linux_wait_1): Fix pc advance condition.
2465 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2466 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2468 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2470 * linux-arm-low.c (arm_is_thumb_mode): New function.
2471 (arm_breakpoint_at): Use arm_is_thumb_mode.
2472 (arm_breakpoint_kind_from_current_state): New function.
2473 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2475 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2476 (linux_breakpoint_kind_from_current_state): New function.
2477 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2478 * linux-low.h (struct linux_target_ops)
2479 <breakpoint_kind_from_current_state>: New field.
2480 * target.h (struct target_ops): Likewise.
2481 (target_breakpoint_kind_from_current_state): New macro.
2483 2015-11-30 Pedro Alves <palves@redhat.com>
2485 * linux-low.c (linux_resume): Wake up the event loop before
2488 2015-11-30 Pedro Alves <palves@redhat.com>
2490 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2492 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2494 * target.c (struct thread_search): New structure.
2495 (thread_search_callback): New function.
2496 (prev_general_thread): New global.
2497 (prepare_to_access_memory, done_accessing_memory): New functions.
2498 * target.h (prepare_to_access_memory, done_accessing_memory):
2499 Replace macros with function declarations.
2501 2015-11-30 Pedro Alves <palves@redhat.com>
2504 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2505 report TARGET_WAITKIND_NO_RESUMED.
2506 * remote-utils.c (prepare_resume_reply): Handle
2507 TARGET_WAITKIND_NO_RESUMED.
2508 * server.c (report_no_resumed): New global.
2509 (handle_query) <qSupported>: Handle "no-resumed+". Report
2510 "no-resumed+" support.
2511 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2512 return error if the client doesn't support no-resumed events.
2513 (push_stop_notification): New function.
2514 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2515 events if the client supports them.
2517 2015-11-30 Pedro Alves <palves@redhat.com>
2519 * linux-low.c (thread_still_has_status_pending_p): Don't check
2521 (lwp_resumed): New function.
2522 (status_pending_p_callback): Return early if the LWP is not
2523 supposed to be resumed.
2525 2015-11-30 Pedro Alves <palves@redhat.com>
2527 * linux-low.c (handle_extended_wait): Assert that the LWP's
2528 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2529 thread create events, leave the new child's status pending.
2530 (linux_low_filter_event): If GDB wants to hear about thread exit
2531 events, leave the LWP marked dead and don't delete it.
2532 (linux_wait_for_event_filtered): Don't check for thread exit.
2533 (filter_exit_event): New function.
2534 (linux_wait_1): Use it, when returning an exit event.
2535 (linux_resume_one_lwp_throw): Assert that the LWP's
2536 waitstatus is TARGET_WAITKIND_IGNORE.
2537 * remote-utils.c (prepare_resume_reply): Handle
2538 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2539 * server.c (report_thread_events): New global.
2540 (handle_general_set): Handle QThreadEvents.
2541 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2542 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2543 TARGET_WAITKIND_THREAD_EXITED.
2544 * server.h (report_thread_events): Declare.
2546 2015-11-30 Pedro Alves <palves@redhat.com>
2548 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2549 the thread's last_resume_kind was resume_stop.
2551 2015-11-30 Pedro Alves <palves@redhat.com>
2553 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2556 2015-11-30 Pedro Alves <palves@redhat.com>
2558 * server.c (handle_v_requests): Handle vCtrlC.
2560 2015-11-30 Pedro Alves <palves@redhat.com>
2562 * gdbthread.h (find_any_thread_of_pid): Declare.
2563 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2565 * server.c (handle_query): If current_thread is NULL, look for
2566 another thread of the selected process.
2568 2015-11-26 Daniel Colascione <dancol@dancol.org>
2569 Simon Marchi <simon.marchi@ericsson.com>
2571 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2572 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2574 * target.h (struct target_ops) <thread_name>: New field.
2575 (target_thread_name): New macro.
2577 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2579 * regcache.h (regcache_invalidate_pid): Add declaration.
2580 * regcache.c (regcache_invalidate_pid): New function, extracted
2581 from regcache_invalidate.
2582 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2583 Add trivial documentation comment.
2584 * lynx-low.c: Use regcache_invalidate_pid instead of
2585 regcache_invalidate.
2587 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2589 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2590 and Elf64_auxv_t if the target is Android.
2592 2015-11-22 Doug Evans <xdje42@gmail.com>
2594 * target.h: #include <sys/types.h>.
2596 2015-11-19 Pedro Alves <palves@redhat.com>
2598 * linux-low.c (linux_process_qsupported): Change prototype.
2600 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2602 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2603 and adjust to loop over all features.
2604 * server.c (handle_query) <qSupported>: Adjust to call
2605 target_process_qsupported once, passing it a vector of unprocessed
2607 * target.h (struct target_ops) <process_qsupported>: Change
2609 (target_process_qsupported): Adjust.
2611 2015-11-19 Pedro Alves <palves@redhat.com>
2613 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2615 * configure: Regenerate.
2617 2015-11-19 Pedro Alves <palves@redhat.com>
2619 * configure: Regenerate.
2621 2015-11-19 Yao Qi <yao.qi@linaro.org>
2623 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2626 2015-11-19 Yao Qi <yao.qi@linaro.org>
2628 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2629 (struct aarch64_operand): Move enum out.
2631 2015-11-19 Yao Qi <yao.qi@linaro.org>
2633 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2634 struct user_fpsimd_state *.
2635 (aarch64_store_fpregset): Likewise.
2637 2015-11-19 Yao Qi <yao.qi@linaro.org>
2639 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2640 struct user_pt_regs *.
2641 (aarch64_store_gregset): Likewise.
2643 2015-11-18 Pedro Alves <palves@redhat.com>
2645 * Makefile.in (all_object_files): Add $IPA_OBJS.
2647 2015-11-17 Pedro Alves <palves@redhat.com>
2649 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2650 GDB_SIGNAL_0 and gdb_signal_to_string.
2652 2015-11-17 Pedro Alves <palves@redhat.com>
2654 * win32-low.c (handle_output_debug_string): Remove parameter.
2655 (win32_kill): Remove our_status local and adjust call to
2656 handle_output_debug_string.
2657 (get_child_debug_event): Adjust call to
2658 handle_output_debug_string.
2660 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2662 * linux-mips-low.c (mips_fill_gregset): Add cast.
2663 (mips_store_gregset): Likewise.
2664 (mips_fill_fpregset): Likewise.
2665 (mips_store_fpregset): Likewise.
2667 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2669 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2672 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2674 * linux-mips-low.c (mips_linux_new_thread): Change type of
2675 watch_type to enum target_hw_bp_type.
2677 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2679 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2680 Change return type to arm_hwbp_type.
2682 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2684 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2685 (arm_store_gregset): Likewise.
2686 * linux-arm-low.c (arm_get_hwcap): Likewise.
2687 (arm_read_description): Likewise.
2689 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2691 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2693 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2695 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2696 (ppc_fill_vsxregset): Likewise.
2697 (ppc_store_vsxregset): Likewise.
2698 (ppc_fill_vrregset): Likewise.
2699 (ppc_store_vrregset): Likewise.
2700 (ppc_fill_evrregset): Likewise.
2701 (ppc_store_evrregset): Likewise.
2703 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2705 * linux-ppc-low.c (ppc_usrregs_info): Remove
2706 forward-declaration.
2707 (ppc_arch_setup): Move lower in file.
2709 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2711 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2712 (ps_pdwrite): Likewise.
2714 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2716 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2717 to after assert checks.
2719 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2721 * proc-service.c (ps_pdread): Add/adjust casts.
2722 (ps_pdwrite): Add/adjust casts.
2724 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2726 * server.c (handle_search_memory_1): Cast return value of
2729 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2731 * server.c (write_qxfer_response): Change type of data to
2734 2015-10-29 Pedro Alves <palves@redhat.com>
2736 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2738 2015-10-29 Pedro Alves <palves@redhat.com>
2740 * tracepoint.c (clear_installed_tracepoints): Add casts.
2742 2015-10-29 Pedro Alves <palves@redhat.com>
2744 * server.c (handle_v_cont, process_serial_event): Add enum
2745 gdb_signal casts to signal parsing code.
2747 2015-10-29 Pedro Alves <palves@redhat.com>
2749 * linux-low.h (NULL_REGSET): Define.
2750 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2751 * linux-arm-low.c (arm_regsets): Likewise.
2752 * linux-crisv32-low.c (cris_regsets): Likewise.
2753 * linux-m68k-low.c (m68k_regsets): Likewise.
2754 * linux-mips-low.c (mips_regsets): Likewise.
2755 * linux-nios2-low.c (nios2_regsets): Likewise.
2756 * linux-ppc-low.c (ppc_regsets): Likewise.
2757 * linux-s390-low.c (s390_regsets): Likewise.
2758 * linux-sh-low.c (sh_regsets): Likewise.
2759 * linux-sparc-low.c (sparc_regsets): Likewise.
2760 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2761 * linux-tile-low.c (tile_regsets): Likewise.
2762 * linux-x86-low.c (x86_regsets): Likewise.
2763 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2765 2015-10-29 Pedro Alves <palves@redhat.com>
2767 * linux-low.h (NULL_REGSET): Define.
2768 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2769 * linux-arm-low.c (arm_regsets): Likewise.
2770 * linux-crisv32-low.c (cris_regsets): Likewise.
2771 * linux-m68k-low.c (m68k_regsets): Likewise.
2772 * linux-mips-low.c (mips_regsets): Likewise.
2773 * linux-nios2-low.c (nios2_regsets): Likewise.
2774 * linux-ppc-low.c (ppc_regsets): Likewise.
2775 * linux-s390-low.c (s390_regsets): Likewise.
2776 * linux-sh-low.c (sh_regsets): Likewise.
2777 * linux-sparc-low.c (sparc_regsets): Likewise.
2778 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2779 * linux-tile-low.c (tile_regsets): Likewise.
2780 * linux-x86-low.c (x86_regsets): Likewise.
2781 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2783 2015-10-26 Doug Evans <dje@google.com>
2785 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2787 2015-10-26 Doug Evans <dje@google.com>
2789 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2791 2015-10-26 Doug Evans <dje@google.com>
2793 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2795 (attach_thread, find_new_threads_callback): Ditto.
2797 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2799 * mem-break.h (set_breakpoint_data): Remove.
2801 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2803 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2804 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2805 (initialize_low): Remove set_breakpoint_data call.
2806 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2807 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2808 (initialize_low): Remove set_breakpoint_data call.
2809 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2810 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2811 (initialize_low): Remove set_breakpoint_data call.
2813 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2815 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2816 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2817 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2818 * target.h (target_breakpoint_kind_from_pc): New macro.
2820 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2822 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2823 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2824 the default breakpoint kind.
2826 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2828 * linux-arm-low.c (arm_supports_z_point_type): Add software
2831 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2833 * linux-arm-low.c: Refactor breakpoint definitions.
2834 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2835 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2837 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2839 * Makefile.in: Add arm.c/o.
2840 * configure.srv: Likewise.
2841 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2842 (arm_breakpoint_kind_from_pc): New function.
2843 (arm_sw_breakpoint_from_kind): Return proper kind.
2844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2846 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2848 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2850 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2851 (struct raw_breakpoint) <size>: Remove.
2852 (struct raw_breakpoint) <kind>: Add.
2853 (bp_size): New function.
2854 (bp_opcode): Likewise.
2855 (find_raw_breakpoint_at): Adjust for kind.
2856 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2857 (remove_memory_breakpoint): Adjust for kind call bp_size.
2858 (set_raw_breakpoint_at): Adjust for kind.
2859 (set_breakpoint): Likewise.
2860 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2861 (delete_raw_breakpoint): Adjust for kind.
2862 (delete_breakpoint): Likewise.
2863 (find_gdb_breakpoint): Likewise.
2864 (set_gdb_breakpoint_1): Likewise.
2865 (set_gdb_breakpoint): Likewise.
2866 (delete_gdb_breakpoint_1): Likewise.
2867 (delete_gdb_breakpoint): Likewise.
2868 (uninsert_raw_breakpoint): Likewise.
2869 (reinsert_raw_breakpoint): Likewise.
2870 (set_breakpoint_data): Remove.
2871 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2872 (check_mem_read): Adjust for kind call bp_size.
2873 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2874 (clone_one_breakpoint): Adjust for kind.
2875 * mem-break.h (set_gdb_breakpoint): Likewise.
2876 (delete_gdb_breakpoint): Likewise.
2877 * server.c (process_serial_event): Likewise.
2879 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2881 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2882 (struct linux_target_ops) <breakpoint>: Remove.
2883 (struct linux_target_ops) <breakpoint_len>: Remove.
2884 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2885 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2886 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2887 (arm_sw_breakpoint_from_kind): New function.
2888 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2889 (struct linux_target_ops) <breakpoint>: Remove.
2890 (struct linux_target_ops) <breakpoint_len>: Remove.
2891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2893 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2894 (struct linux_target_ops) <breakpoint>: Remove.
2895 (struct linux_target_ops) <breakpoint_len>: Remove.
2896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2898 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2899 (struct linux_target_ops) <breakpoint>: Remove.
2900 (struct linux_target_ops) <breakpoint_len>: Remove.
2901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2903 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2904 and sw_breakpoint_from_kind to increment the pc.
2905 (linux_breakpoint_kind_from_pc): New function.
2906 (linux_sw_breakpoint_from_kind): New function.
2907 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2908 (initialize_low): Call breakpoint_kind_from_pc and
2909 sw_breakpoint_from_kind to replace breakpoint_data/len.
2910 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2913 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2914 (struct linux_target_ops) <breakpoint>: Remove.
2915 (struct linux_target_ops) <breakpoint_len>: Remove.
2916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2918 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2919 (struct linux_target_ops) <breakpoint>: Remove.
2920 (struct linux_target_ops) <breakpoint_len>: Remove.
2921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2923 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2924 (struct linux_target_ops) <breakpoint>: Remove.
2925 (struct linux_target_ops) <breakpoint_len>: Remove.
2926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2928 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2929 (struct linux_target_ops) <breakpoint>: Remove.
2930 (struct linux_target_ops) <breakpoint_len>: Remove.
2931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2933 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2934 (struct linux_target_ops) <breakpoint>: Remove.
2935 (struct linux_target_ops) <breakpoint_len>: Remove.
2936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2938 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2939 (struct linux_target_ops) <breakpoint>: Remove.
2940 (struct linux_target_ops) <breakpoint_len>: Remove.
2941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2943 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2944 (struct linux_target_ops) <breakpoint>: Remove.
2945 (struct linux_target_ops) <breakpoint_len>: Remove.
2946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2948 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2949 (struct linux_target_ops) <breakpoint>: Remove.
2950 (struct linux_target_ops) <breakpoint_len>: Remove.
2951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2953 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2954 (struct linux_target_ops) <breakpoint>: Remove.
2955 (struct linux_target_ops) <breakpoint_len>: Remove.
2956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2958 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2959 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2960 (struct linux_target_ops) <breakpoint>: Remove.
2961 (struct linux_target_ops) <breakpoint_len>: Remove.
2962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2964 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2965 (struct linux_target_ops) <breakpoint>: Remove.
2966 (struct linux_target_ops) <breakpoint_len>: Remove.
2967 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2968 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2970 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2972 * linux-cris-low.c (cris_get_pc): Remove void arg.
2974 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2976 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2979 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2981 * inferiors.c (thread_pid_matches_callback): New function.
2982 (find_thread_process): New function.
2983 (remove_thread): Reset current_thread.
2984 (remove_process): Assert threads have been removed first.
2986 2015-10-15 Yao Qi <yao.qi@linaro.org>
2988 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2990 (aarch64_remove_point): Likewise.
2991 * regcache.c (regcache_register_size): New function.
2993 2015-10-12 Yao Qi <yao.qi@linaro.org>
2995 * linux-aarch64-low.c: Update all callers as emit_load_store
2996 is renamed to aarch64_emit_load_store.
2998 2015-10-12 Yao Qi <yao.qi@linaro.org>
3000 * linux-aarch64-low.c: Update all callers of function renaming
3001 from emit_insn to aarch64_emit_insn.
3003 2015-10-12 Yao Qi <yao.qi@linaro.org>
3005 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3006 arch/aarch64-insn.h.
3007 (struct aarch64_memory_operand): Likewise.
3009 (emit_insn): Move to arch/aarch64-insn.c.
3010 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3011 (emit_load_store): Move to arch/aarch64-insn.c.
3012 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3013 (can_encode_int32): Remove.
3015 2015-10-12 Yao Qi <yao.qi@linaro.org>
3017 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3018 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3019 (aarch64_relocate_instruction): Likewise.
3020 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3021 (struct aarch64_insn_visitor): Likewise.
3023 2015-10-12 Yao Qi <yao.qi@linaro.org>
3025 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3026 (struct aarch64_insn_visitor): New.
3027 (struct aarch64_insn_relocation_data): New.
3028 (aarch64_ftrace_insn_reloc_b): New function.
3029 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3030 (aarch64_ftrace_insn_reloc_cb): Likewise.
3031 (aarch64_ftrace_insn_reloc_tb): Likewise.
3032 (aarch64_ftrace_insn_reloc_adr): Likewise.
3033 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3034 (aarch64_ftrace_insn_reloc_others): Likewise.
3036 (aarch64_relocate_instruction): Use visitor.
3038 2015-10-12 Yao Qi <yao.qi@linaro.org>
3040 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3041 int. Add argument buf.
3042 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3043 aarch64_relocate_instruction.
3045 2015-10-12 Yao Qi <yao.qi@linaro.org>
3047 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3048 argument insn. Remove local variable insn. Don't call
3050 (aarch64_install_fast_tracepoint_jump_pad): Call
3053 2015-09-30 Yao Qi <yao.qi@linaro.org>
3055 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3056 (emit_load_store_pair): Likewise.
3058 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3060 * dll.c (match_dll): Add cast(s).
3061 (unloaded_dll): Likewise.
3062 * linux-low.c (second_thread_of_pid_p): Likewise.
3063 (delete_lwp_callback): Likewise.
3064 (count_events_callback): Likewise.
3065 (select_event_lwp_callback): Likewise.
3066 (linux_set_resume_request): Likewise.
3067 * server.c (accumulate_file_name_length): Likewise.
3068 (emit_dll_description): Likewise.
3069 (handle_qxfer_threads_worker): Likewise.
3070 (visit_actioned_threads): Likewise.
3071 * thread-db.c (any_thread_of): Likewise.
3072 * tracepoint.c (same_process_p): Likewise.
3073 (match_blocktype): Likewise.
3074 (build_traceframe_info_xml): Likewise.
3076 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3078 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3080 (gdb_unparse_agent_expr): Likewise.
3081 * hostio.c (require_data): Likewise.
3082 (handle_pread): Likewise.
3083 * linux-low.c (disable_regset): Likewise.
3084 (fetch_register): Likewise.
3085 (store_register): Likewise.
3086 (get_dynamic): Likewise.
3087 (linux_qxfer_libraries_svr4): Likewise.
3088 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3089 (set_fast_tracepoint_jump): Likewise.
3090 (uninsert_fast_tracepoint_jumps_at): Likewise.
3091 (reinsert_fast_tracepoint_jumps_at): Likewise.
3092 (validate_inserted_breakpoint): Likewise.
3093 (clone_agent_expr): Likewise.
3094 * regcache.c (init_register_cache): Likewise.
3095 * remote-utils.c (putpkt_binary_1): Likewise.
3096 (decode_M_packet): Likewise.
3097 (decode_X_packet): Likewise.
3098 (look_up_one_symbol): Likewise.
3099 (relocate_instruction): Likewise.
3100 (monitor_output): Likewise.
3101 * server.c (handle_search_memory): Likewise.
3102 (handle_qxfer_exec_file): Likewise.
3103 (handle_qxfer_libraries): Likewise.
3104 (handle_qxfer): Likewise.
3105 (handle_query): Likewise.
3106 (handle_v_cont): Likewise.
3107 (handle_v_run): Likewise.
3108 (captured_main): Likewise.
3109 * target.c (write_inferior_memory): Likewise.
3110 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3111 * tracepoint.c (init_trace_buffer): Likewise.
3112 (add_tracepoint_action): Likewise.
3113 (add_traceframe): Likewise.
3114 (add_traceframe_block): Likewise.
3115 (cmd_qtdpsrc): Likewise.
3116 (cmd_qtdv): Likewise.
3117 (cmd_qtstatus): Likewise.
3118 (response_source): Likewise.
3119 (response_tsv): Likewise.
3120 (cmd_qtnotes): Likewise.
3121 (gdb_collect): Likewise.
3122 (initialize_tracepoint): Likewise.
3124 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3126 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3127 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3128 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3130 (enum aarch64_condition_codes): New enum.
3131 (w0): New static global.
3134 (struct aarch64_memory_operand) <type>: New
3135 MEMORY_OPERAND_POSTINDEX type.
3136 (postindex_memory_operand): New helper function.
3137 (emit_ret): New function.
3138 (emit_load_store_pair): New function, factored out of emit_stp
3139 with support for MEMORY_OPERAND_POSTINDEX.
3140 (emit_stp): Rewrite using emit_load_store_pair.
3141 (emit_ldp): New function.
3142 (emit_load_store): Likewise.
3143 (emit_ldr): Mention post-index instruction in comment.
3144 (emit_ldrh): New function.
3145 (emit_ldrb): New function.
3146 (emit_ldrsw): Mention post-index instruction in comment.
3147 (emit_str): Likewise.
3148 (emit_subs): New function.
3149 (emit_cmp): Likewise.
3150 (emit_and): Likewise.
3151 (emit_orr): Likewise.
3152 (emit_orn): Likewise.
3153 (emit_eor): Likewise.
3154 (emit_mvn): Likewise.
3155 (emit_lslv): Likewise.
3156 (emit_lsrv): Likewise.
3157 (emit_asrv): Likewise.
3158 (emit_mul): Likewise.
3159 (emit_sbfm): Likewise.
3160 (emit_sbfx): Likewise.
3161 (emit_ubfm): Likewise.
3162 (emit_ubfx): Likewise.
3163 (emit_csinc): Likewise.
3164 (emit_cset): Likewise.
3165 (emit_nop): Likewise.
3166 (emit_ops_insns): New helper function.
3167 (emit_pop): Likewise.
3168 (emit_push): Likewise.
3169 (aarch64_emit_prologue): New function.
3170 (aarch64_emit_epilogue): Likewise.
3171 (aarch64_emit_add): Likewise.
3172 (aarch64_emit_sub): Likewise.
3173 (aarch64_emit_mul): Likewise.
3174 (aarch64_emit_lsh): Likewise.
3175 (aarch64_emit_rsh_signed): Likewise.
3176 (aarch64_emit_rsh_unsigned): Likewise.
3177 (aarch64_emit_ext): Likewise.
3178 (aarch64_emit_log_not): Likewise.
3179 (aarch64_emit_bit_and): Likewise.
3180 (aarch64_emit_bit_or): Likewise.
3181 (aarch64_emit_bit_xor): Likewise.
3182 (aarch64_emit_bit_not): Likewise.
3183 (aarch64_emit_equal): Likewise.
3184 (aarch64_emit_less_signed): Likewise.
3185 (aarch64_emit_less_unsigned): Likewise.
3186 (aarch64_emit_ref): Likewise.
3187 (aarch64_emit_if_goto): Likewise.
3188 (aarch64_emit_goto): Likewise.
3189 (aarch64_write_goto_address): Likewise.
3190 (aarch64_emit_const): Likewise.
3191 (aarch64_emit_call): Likewise.
3192 (aarch64_emit_reg): Likewise.
3193 (aarch64_emit_pop): Likewise.
3194 (aarch64_emit_stack_flush): Likewise.
3195 (aarch64_emit_zero_ext): Likewise.
3196 (aarch64_emit_swap): Likewise.
3197 (aarch64_emit_stack_adjust): Likewise.
3198 (aarch64_emit_int_call_1): Likewise.
3199 (aarch64_emit_void_call_2): Likewise.
3200 (aarch64_emit_eq_goto): Likewise.
3201 (aarch64_emit_ne_goto): Likewise.
3202 (aarch64_emit_lt_goto): Likewise.
3203 (aarch64_emit_le_goto): Likewise.
3204 (aarch64_emit_gt_goto): Likewise.
3205 (aarch64_emit_ge_got): Likewise.
3206 (aarch64_emit_ops_impl): New static global variable.
3207 (aarch64_emit_ops): New target function, return
3208 &aarch64_emit_ops_impl.
3209 (struct linux_target_ops): Install it.
3211 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3213 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3214 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3216 * linux-aarch64-ipa.c: New file.
3217 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3219 (aarch64_get_thread_area): New target method.
3220 (extract_signed_bitfield): New helper function.
3221 (aarch64_decode_ldr_literal): New function.
3222 (enum aarch64_opcodes): New enum.
3223 (struct aarch64_register): New struct.
3224 (struct aarch64_operand): New struct.
3225 (x0): New static global.
3234 (aarch64_register): New helper function.
3235 (register_operand): Likewise.
3236 (immediate_operand): Likewise.
3237 (struct aarch64_memory_operand): New struct.
3238 (offset_memory_operand): New helper function.
3239 (preindex_memory_operand): Likewise.
3240 (enum aarch64_system_control_registers): New enum.
3241 (ENCODE): New macro.
3242 (emit_insn): New helper function.
3243 (emit_b): New function.
3244 (emit_bcond): Likewise.
3245 (emit_cb): Likewise.
3246 (emit_tb): Likewise.
3247 (emit_blr): Likewise.
3248 (emit_stp): Likewise.
3249 (emit_ldp_q_offset): Likewise.
3250 (emit_stp_q_offset): Likewise.
3251 (emit_load_store): Likewise.
3252 (emit_ldr): Likewise.
3253 (emit_ldrsw): Likewise.
3254 (emit_str): Likewise.
3255 (emit_ldaxr): Likewise.
3256 (emit_stxr): Likewise.
3257 (emit_stlr): Likewise.
3258 (emit_data_processing_reg): Likewise.
3259 (emit_data_processing): Likewise.
3260 (emit_add): Likewise.
3261 (emit_sub): Likewise.
3262 (emit_mov): Likewise.
3263 (emit_movk): Likewise.
3264 (emit_mov_addr): Likewise.
3265 (emit_mrs): Likewise.
3266 (emit_msr): Likewise.
3267 (emit_sevl): Likewise.
3268 (emit_wfe): Likewise.
3269 (append_insns): Likewise.
3270 (can_encode_int32_in): New helper function.
3271 (aarch64_relocate_instruction): New function.
3272 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3273 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3274 (struct linux_target_ops): Install aarch64_get_thread_area,
3275 aarch64_install_fast_tracepoint_jump_pad and
3276 aarch64_get_min_fast_tracepoint_insn_len.
3278 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3280 * Makefile.in (aarch64-insn.o): New rule.
3281 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3283 2015-09-21 Yao Qi <yao.qi@linaro.org>
3285 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3287 2015-09-21 Yao Qi <yao.qi@linaro.org>
3289 * tracepoint.c (max_jump_pad_size): Remove.
3291 2015-09-18 Yao Qi <yao.qi@linaro.org>
3293 * linux-aarch64-low.c: Don't include sys/uio.h.
3294 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3296 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3298 * tracepoint.c (eval_result_type): Change prototype.
3299 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3301 2015-09-15 Pedro Alves <palves@redhat.com>
3303 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3304 Check whether to report exec events instead of checking whether
3305 multiprocess is enabled.
3307 2015-09-15 Pedro Alves <palves@redhat.com>
3310 * remote-utils.c (prepare_resume_reply): Merge
3311 TARGET_WAITKIND_VFORK_DONE switch case with the
3312 TARGET_WAITKIND_FORKED case.
3314 2015-09-15 Yao Qi <yao.qi@linaro.org>
3316 * server.c (handle_query): Check string comparison using
3317 "else if" instead of "if".
3319 2015-09-15 Yao Qi <yao.qi@linaro.org>
3321 * server.c (vCont_supported): New global variable.
3322 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3323 matches. Append ";vContSupported+" to own_buf.
3324 (handle_v_requests): Append ";s;S" to own_buf if target supports
3325 hardware single step or vCont_supported is false.
3326 (capture_main): Set vCont_supported to zero.
3328 2015-09-15 Yao Qi <yao.qi@linaro.org>
3330 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3332 (linux_supports_hardware_single_step): ... New function.
3333 (linux_target_ops): Update.
3334 * lynx-low.c (lynx_target_ops): Set field
3335 supports_hardware_single_step to target_can_do_hardware_single_step.
3336 * nto-low.c (nto_target_ops): Likewise.
3337 * spu-low.c (spu_target_ops): Likewise.
3338 * win32-low.c (win32_target_ops): Likewise.
3339 * target.c (target_can_do_hardware_single_step): New function.
3340 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3341 Remove. <supports_hardware_single_step>: New field.
3342 (target_supports_conditional_breakpoints): Remove.
3343 (target_supports_hardware_single_step): New macro.
3344 (target_can_do_hardware_single_step): Declare.
3345 * server.c (handle_query): Use target_supports_hardware_single_step
3346 instead of target_supports_conditional_breakpoints.
3348 2015-09-15 Yao Qi <yao.qi@linaro.org>
3350 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3352 (struct linux_target_ops the_low_target): Install
3353 aarch64_linux_siginfo_fixup.
3355 2015-09-11 Don Breazeal <donb@codesourcery.com>
3356 Luis Machado <lgustavo@codesourcery.com>
3358 * linux-low.c (linux_mourn): Static declaration.
3359 (linux_arch_setup): Move in front of
3360 handle_extended_wait.
3361 (linux_arch_setup_thread): New function.
3362 (handle_extended_wait): Handle exec events. Call
3363 linux_arch_setup_thread. Make event_lwp argument a
3364 pointer-to-a-pointer.
3365 (check_zombie_leaders): Do not check stopped threads.
3366 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3367 (linux_low_filter_event): Add lwp and thread for exec'ing
3368 non-leader thread if leader thread has been deleted.
3369 Refactor code into linux_arch_setup_thread and call it.
3370 Pass child lwp pointer by reference to handle_extended_wait.
3371 (linux_wait_for_event_filtered): Update comment.
3372 (linux_wait_1): Prevent clobbering exec event status.
3373 (linux_supports_exec_events): New function.
3374 (linux_target_ops) <supports_exec_events>: Initialize new member.
3375 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3377 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3378 * server.c (report_exec_events): New global variable.
3379 (handle_query): Handle qSupported query for exec-events feature.
3380 (captured_main): Initialize report_exec_events.
3381 * server.h (report_exec_events): Declare new global variable.
3382 * target.h (struct target_ops) <supports_exec_events>: New
3384 (target_supports_exec_events): New macro.
3385 * win32-low.c (win32_target_ops) <supports_exec_events>:
3386 Initialize new member.
3388 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3390 * linux-low.c (linux_low_enable_btrace): Remove.
3391 (linux_target_ops): Replace linux_low_enable_btrace with
3392 linux_enable_btrace.
3394 2015-09-03 Yao Qi <yao.qi@linaro.org>
3396 * linux-aarch64-low.c (aarch64_insert_point): Call
3397 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3400 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3402 * linux-low.c (check_stopped_by_breakpoint): Use
3403 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3405 2015-08-27 Pedro Alves <palves@redhat.com>
3407 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3409 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3411 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3412 the XNEW-family equivalent.
3413 (compile_bytecodes): Likewise.
3414 * dll.c (loaded_dll): Likewise.
3415 * event-loop.c (append_callback_event): Likewise.
3416 (create_file_handler): Likewise.
3417 (create_file_event): Likewise.
3418 * hostio.c (handle_open): Likewise.
3419 * inferiors.c (add_thread): Likewise.
3420 (add_process): Likewise.
3421 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3422 * linux-arm-low.c (arm_new_process): Likewise.
3423 (arm_new_thread): Likewise.
3424 * linux-low.c (add_to_pid_list): Likewise.
3425 (linux_add_process): Likewise.
3426 (handle_extended_wait): Likewise.
3427 (add_lwp): Likewise.
3428 (enqueue_one_deferred_signal): Likewise.
3429 (enqueue_pending_signal): Likewise.
3430 (linux_resume_one_lwp_throw): Likewise.
3431 (linux_resume_one_thread): Likewise.
3432 (linux_read_memory): Likewise.
3433 (linux_write_memory): Likewise.
3434 * linux-mips-low.c (mips_linux_new_process): Likewise.
3435 (mips_linux_new_thread): Likewise.
3436 (mips_add_watchpoint): Likewise.
3437 * linux-x86-low.c (initialize_low_arch): Likewise.
3438 * lynx-low.c (lynx_add_process): Likewise.
3439 * mem-break.c (set_raw_breakpoint_at): Likewise.
3440 (set_breakpoint): Likewise.
3441 (add_condition_to_breakpoint): Likewise.
3442 (add_commands_to_breakpoint): Likewise.
3443 (clone_agent_expr): Likewise.
3444 (clone_one_breakpoint): Likewise.
3445 * regcache.c (new_register_cache): Likewise.
3446 * remote-utils.c (look_up_one_symbol): Likewise.
3447 * server.c (queue_stop_reply): Likewise.
3448 (start_inferior): Likewise.
3449 (queue_stop_reply_callback): Likewise.
3450 (handle_target_event): Likewise.
3451 * spu-low.c (fetch_ppc_memory): Likewise.
3452 (store_ppc_memory): Likewise.
3453 * target.c (set_target_ops): Likewise.
3454 * thread-db.c (thread_db_load_search): Likewise.
3455 (try_thread_db_load_1): Likewise.
3456 * tracepoint.c (add_tracepoint): Likewise.
3457 (add_tracepoint_action): Likewise.
3458 (create_trace_state_variable): Likewise.
3459 (cmd_qtdpsrc): Likewise.
3460 (cmd_qtro): Likewise.
3461 (add_while_stepping_state): Likewise.
3462 * win32-low.c (child_add_thread): Likewise.
3463 (get_image_name): Likewise.
3465 2015-08-25 Yao Qi <yao.qi@linaro.org>
3467 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3469 2015-08-25 Yao Qi <yao.qi@linaro.org>
3471 * Makefile.in (aarch64-linux.o): New rule.
3472 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3474 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3475 (aarch64_init_debug_reg_state): Make it extern.
3476 (aarch64_linux_prepare_to_resume): Remove.
3478 2015-08-25 Yao Qi <yao.qi@linaro.org>
3480 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3481 lwp_arch_private_info and ptid_of_lwp.
3483 2015-08-25 Yao Qi <yao.qi@linaro.org>
3485 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3486 Find proc_info by find_process_pid. All callers updated.
3488 2015-08-25 Yao Qi <yao.qi@linaro.org>
3490 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3492 (debug_reg_change_callback): Remove.
3493 (aarch64_notify_debug_reg_change): Remove.
3495 2015-08-25 Yao Qi <yao.qi@linaro.org>
3497 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3498 Call current_lwp_ptid.
3500 2015-08-25 Yao Qi <yao.qi@linaro.org>
3502 * linux-aarch64-low.c (debug_reg_change_callback): Use
3505 2015-08-25 Yao Qi <yao.qi@linaro.org>
3507 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3509 2015-08-25 Yao Qi <yao.qi@linaro.org>
3511 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3513 2015-08-25 Yao Qi <yao.qi@linaro.org>
3515 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3518 2015-08-25 Yao Qi <yao.qi@linaro.org>
3520 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3522 (debug_reg_change_callback): Remove argument entry and add argument
3523 lwp. Remove local variable thread. Don't print thread id in the
3524 debugging output. Don't check whether pid of thread equals to pid.
3525 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3526 iterate_over_lwps instead find_inferior.
3528 2015-08-24 Pedro Alves <palves@redhat.com>
3530 * inferiors.c (get_first_process): New function.
3531 * inferiors.h (get_first_process): New declaration.
3532 * remote-utils.c (read_ptid): Default to the first process in the
3533 list, instead of to the current thread's process.
3535 2015-08-24 Pedro Alves <palves@redhat.com>
3537 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3538 * event-loop.c: Likewise.
3539 * remote-utils.c: Likewise.
3540 * tracepoint.c: Likewise.
3542 2015-08-24 Pedro Alves <palves@redhat.com>
3544 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3547 2015-08-21 Pedro Alves <palves@redhat.com>
3549 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3550 instead of literal 1.
3552 2015-08-21 Pedro Alves <palves@redhat.com>
3554 * tdesc.c (default_description): Explicitly zero-initialize.
3556 2015-08-21 Pedro Alves <palves@redhat.com>
3559 * inferiors.c (remove_thread): Discard any pending stop reply for
3561 * server.c (remove_all_on_match_pid): Rename to ...
3562 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3564 (discard_queued_stop_replies): Change parameter to a ptid. Now
3566 (handle_v_kill, kill_inferior_callback, captured_main)
3567 (process_serial_event): Adjust.
3568 * server.h (discard_queued_stop_replies): Declare.
3570 2015-08-21 Pedro Alves <palves@redhat.com>
3572 * linux-low.c (wait_for_sigstop): Always switch to no thread
3573 selected if the previously current thread dies.
3574 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3575 process instead of the current thread's.
3576 * remote-utils.c (input_interrupt): Don't check if there's no
3578 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3579 current thread to the general thread fails, error out.
3580 (handle_qxfer_auxv, handle_qxfer_libraries)
3581 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3582 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3583 (handle_query): Check if there's a thread selected instead of
3584 checking whether there's any thread in the thread list.
3585 (handle_qxfer_threads, handle_qxfer_btrace)
3586 (handle_qxfer_btrace_conf): Don't error out early if there's no
3587 thread in the thread list.
3588 (handle_v_cont, myresume): Don't set the current thread to the
3590 (process_serial_event) <Hg handling>: Also set thread_id if the
3591 previous general thread is still alive.
3592 (process_serial_event) <g/G handling>: If setting the current
3593 thread to the general thread fails, error out.
3594 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3595 thread's lwp instead of the current thread's.
3596 * target.c (set_desired_thread): If the desired thread was not
3597 found, leave the current thread pointing to NULL. Return an int
3598 (boolean) indicating success.
3599 * target.h (set_desired_thread): Change return type to int.
3601 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3603 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3604 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3606 (ps_get_thread_area): New function.
3608 2015-08-19 Gary Benson <gbenson@redhat.com>
3610 * hostio.c (handle_pread): Do not attempt to read more data
3611 than hostio_reply_with_data can fit in a packet.
3613 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3615 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3617 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3619 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3621 2015-08-06 Pedro Alves <palves@redhat.com>
3623 * tracepoint.c (expr_eval_result): Now an int.
3625 2015-08-06 Pedro Alves <palves@redhat.com>
3627 * gdbthread.h (struct regcache): Forward declare.
3628 (struct thread_info) <regcache_data>: Now a struct regcache
3630 * inferiors.c (inferior_regcache_data)
3631 (set_inferior_regcache_data): Now work with struct regcache
3633 * inferiors.h (struct regcache): Forward declare.
3634 (inferior_regcache_data, set_inferior_regcache_data): Now work
3635 with struct regcache pointers.
3636 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3637 (free_register_cache_thread): Remove struct regcache pointer
3640 2015-08-06 Pedro Alves <palves@redhat.com>
3642 * server.c (captured_main): On error, print the exception message
3643 to stderr, and if run_once is set, throw a quit.
3645 2015-08-06 Pedro Alves <palves@redhat.com>
3647 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3650 2015-08-06 Pedro Alves <palves@redhat.com>
3652 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3653 reading beyond the passed in buffer length.
3655 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3657 * tracepoint.c (symbol_list) <required>: Remove.
3659 2015-08-06 Pedro Alves <palves@redhat.com>
3661 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3662 count if stopping and suspending threads.
3663 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3664 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3665 (linux_detach): Complete an ongoing step-over.
3666 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3668 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3669 (linux_wait_1): If passing a signal to the inferior after
3670 finishing a step-over, unsuspend and re-resume all lwps. If we
3671 see a single-step event but the thread should be continuing, don't
3672 pass the trap to gdb.
3673 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3674 internal_error instead of gdb_assert.
3675 (enqueue_pending_signal): New function.
3676 (check_ptrace_stopped_lwp_gone): Add debug output.
3677 (start_step_over): Use internal_error instead of gdb_assert.
3678 (complete_ongoing_step_over): New function.
3679 (linux_resume_one_thread): Don't resume a suspended thread.
3680 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3683 2015-08-06 Pedro Alves <palves@redhat.com>
3685 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3686 (linux_thread_alive): Use lwp_is_marked_dead.
3687 (extended_event_reported): Delete.
3688 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3689 instead of extended_event_reported.
3690 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3692 (lwp_is_marked_dead): New function.
3693 (lwp_running): Use lwp_is_marked_dead.
3694 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3697 2015-08-06 Pedro Alves <palves@redhat.com>
3699 * linux-low.c (linux_wait_1): Move fork event output out of the
3700 !report_to_gdb check. Pass event_child->waitstatus to
3701 target_waitstatus_to_string instead of ourstatus.
3703 2015-08-04 Yao Qi <yao.qi@linaro.org>
3705 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3706 if current_thread is 32 bit.
3708 2015-08-04 Yao Qi <yao.qi@linaro.org>
3710 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3711 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3712 * server.c (extended_protocol): Remove "static".
3713 * server.h (extended_protocol): Declare it.
3715 2015-08-04 Yao Qi <yao.qi@linaro.org>
3717 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3718 both aarch64 and aarch32.
3719 (aarch64_set_pc): Likewise.
3721 2015-08-04 Yao Qi <yao.qi@linaro.org>
3723 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3724 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3725 arm-with-neon.xml to srv_xmlfiles.
3726 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3727 (is_64bit_tdesc): New function.
3728 (aarch64_linux_read_description): New function.
3729 (aarch64_arch_setup): Call aarch64_linux_read_description.
3730 (regs_info): Rename to regs_info_aarch64.
3731 (aarch64_regs_info): Return right regs_info.
3732 (initialize_low_arch): Call initialize_low_arch_aarch32.
3734 2015-08-04 Yao Qi <yao.qi@linaro.org>
3736 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3737 * linux-aarch32-low.c: New file.
3738 * linux-aarch32-low.h: New file.
3739 * linux-arm-low.c (arm_fill_gregset): Move it to
3740 linux-aarch32-low.c.
3741 (arm_store_gregset): Likewise.
3742 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3743 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3744 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3745 (regs_info): Rename to regs_info_arm.
3746 (arm_regs_info): Return regs_info_aarch32 if
3747 have_ptrace_getregset is 1 and target description is
3748 arm_with_neon or arm_with_vfpv3.
3749 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3750 Call initialize_low_arch_aarch32 instead.
3752 2015-08-04 Yao Qi <yao.qi@linaro.org>
3754 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3755 * linux-low.c: ... here.
3756 * linux-low.h (have_ptrace_getregset): Declare it.
3758 2015-08-04 Pedro Alves <palves@redhat.com>
3760 * thread-db.c (struct thread_db): Use new typedefs.
3761 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3763 (disable_thread_event_reporting): Cast result of dlsym to
3764 destination function pointer type.
3765 (thread_db_mourn): Use td_ta_delete_ftype.
3767 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3769 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3771 (CDX_BREAKPOINT): Define for R2.
3772 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3773 (the_low_target): Add comments.
3775 2015-07-30 Yao Qi <yao.qi@linaro.org>
3777 * linux-arm-low.c (arm_hwcap): Remove it.
3778 (arm_read_description): New local variable arm_hwcap. Don't
3779 set arm_hwcap to zero.
3781 2015-07-30 Yao Qi <yao.qi@linaro.org>
3783 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3784 Use regcache->tdesc instead.
3785 (arm_store_wmmxregset): Likewise.
3786 (arm_fill_vfpregset): Likewise.
3787 (arm_store_vfpregset): Likewise.
3789 2015-07-30 Yao Qi <yao.qi@linaro.org>
3791 * linux-arm-low.c: Include arch/arm.h.
3792 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3793 (arm_store_gregset): Likewise.
3795 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3797 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3798 ptrace's 4th parameter.
3800 2015-07-27 Yao Qi <yao.qi@linaro.org>
3802 * configure.srv (case aarch64*-*-linux*): Don't set
3805 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3807 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3809 * linux-arm-low.c: Likewise.
3810 * linux-cris-low.c: Likewise.
3811 * linux-crisv32-low.c: Likewise.
3812 * linux-low.c: Likewise.
3813 * linux-m68k-low.c: Likewise.
3814 * linux-mips-low.c: Likewise.
3815 * linux-nios2-low.c: Likewise.
3816 * linux-s390-low.c: Likewise.
3817 * linux-sparc-low.c: Likewise.
3818 * linux-tic6x-low.c: Likewise.
3819 * linux-tile-low.c: Likewise.
3820 * linux-x86-low.c: Likewise.
3822 2015-07-24 Pedro Alves <palves@redhat.com>
3824 * config.in: Regenerate.
3825 * configure: Regenerate.
3827 2015-07-24 Pedro Alves <palves@redhat.com>
3829 * acinclude.m4: Include ../ptrace.m4.
3830 * configure.ac: Call GDB_AC_PTRACE.
3831 * config.in, configure: Regenerate.
3833 2015-07-24 Yao Qi <yao.qi@linaro.org>
3835 * linux-low.c (linux_create_inferior): Remove setting to
3836 proc->priv->new_inferior.
3837 (linux_attach): Likewise.
3838 (linux_low_filter_event): Likewise.
3839 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3841 2015-07-24 Yao Qi <yao.qi@linaro.org>
3843 * linux-low.c (linux_arch_setup): New function.
3844 (linux_low_filter_event): If proc->tdesc is NULL and
3845 proc->attached is true, call the_low_target.arch_setup.
3846 Otherwise, keep status pending, and return.
3847 (linux_resume_one_lwp_throw): Don't call get_pc if
3848 thread->while_stepping isn't NULL. Don't call
3849 get_thread_regcache if proc->tdesc is NULL.
3850 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3851 (linux_target_ops): Install arch_setup.
3852 * server.c (start_inferior): Call the_target->arch_setup.
3853 * target.h (struct target_ops) <arch_setup>: New field.
3854 (target_arch_setup): New marco.
3855 * lynx-low.c (lynx_target_ops): Update.
3856 * nto-low.c (nto_target_ops): Update.
3857 * spu-low.c (spu_target_ops): Update.
3858 * win32-low.c (win32_target_ops): Update.
3860 2015-07-24 Yao Qi <yao.qi@linaro.org>
3862 * linux-low.c (linux_add_process): Don't set
3863 proc->priv->new_inferior.
3864 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3865 (linux_attach): Likewise.
3867 2015-07-24 Yao Qi <yao.qi@linaro.org>
3869 * server.c (start_inferior): Code refactor.
3871 2015-07-24 Yao Qi <yao.qi@linaro.org>
3873 * server.c (process_serial_event): Set general_thread.
3875 2015-07-21 Yao Qi <yao.qi@linaro.org>
3877 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3878 aarch64_linux_get_debug_reg_capacity.
3880 2015-07-17 Yao Qi <yao.qi@linaro.org>
3882 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3883 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3884 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3885 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3886 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3887 (AARCH64_HWP_ALIGNMENT): Likewise.
3888 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3889 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3890 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3891 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3892 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3893 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3894 (struct aarch64_debug_reg_state): Likewise.
3895 (struct arch_lwp_info): Likewise.
3896 (aarch64_align_watchpoint): Likewise.
3897 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3898 (aarch64_watchpoint_length): Likewise.
3899 (aarch64_point_encode_ctrl_reg): Likewise
3900 (aarch64_point_is_aligned): Likewise.
3901 (aarch64_align_watchpoint): Likewise.
3902 (aarch64_linux_set_debug_regs):
3903 (aarch64_dr_state_insert_one_point): Likewise.
3904 (aarch64_dr_state_remove_one_point): Likewise.
3905 (aarch64_handle_breakpoint): Likewise.
3906 (aarch64_handle_aligned_watchpoint): Likewise.
3907 (aarch64_handle_unaligned_watchpoint): Likewise.
3908 (aarch64_handle_watchpoint): Likewise.
3910 2015-07-17 Yao Qi <yao.qi@linaro.org>
3912 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3913 and don't aarch64_get_debug_reg_state. All callers update.
3914 (aarch64_handle_aligned_watchpoint): Likewise.
3915 (aarch64_handle_unaligned_watchpoint): Likewise.
3916 (aarch64_handle_watchpoint): Likewise.
3917 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3918 (aarch64_remove_point): Likewise.
3920 2015-07-17 Yao Qi <yao.qi@linaro.org>
3922 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3924 (aarch64_handle_unaligned_watchpoint): Likewise.
3926 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3928 Revert the previous 3 commits:
3929 Move gdb_regex* to common/
3930 Move linux_find_memory_regions_full & co.
3931 gdbserver build-id attribute generator
3933 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3934 Jan Kratochvil <jan.kratochvil@redhat.com>
3936 gdbserver build-id attribute generator.
3937 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3938 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3939 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3941 (get_dynamic): Use find_pdhr to traverse program headers.
3942 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3943 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3944 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3945 (get_hex_build_id): New.
3946 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3947 to reply XML document.
3949 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3950 Jan Kratochvil <jan.kratochvil@redhat.com>
3952 * target.c: Include target/target-utils.h and fcntl.h.
3953 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3954 (target_fileio_read_stralloc): New functions.
3956 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3958 * Makefile.in (OBS): Add gdb_regex.o.
3960 * config.in: Rebuilt.
3961 * configure: Rebuilt.
3963 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3964 Jan Kratochvil <jan.kratochvil@redhat.com>
3966 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3967 * Makefile.in (OBS): Add target-utils.o.
3968 (linux-maps.o, target-utils.o): New.
3969 * configure.srv (srv_linux_obj): Add linux-maps.o.
3971 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3973 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3975 (the_low_target): Install it.
3977 2015-07-14 Pedro Alves <palves@redhat.com>
3979 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3980 Instead, ignore ECHILD, and throw an error for other errnos.
3982 2015-07-10 Pedro Alves <palves@redhat.com>
3984 * event-loop.c (struct callback_event) <data>: Change type to
3985 gdb_client_data instance instead of gdb_client_data pointer.
3986 (append_callback_event): Adjust.
3988 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3990 * linux-aarch64-low.c: Add comments for each linux_target_ops
3991 method. Remove comments already covered in target_ops and
3992 linux_target_ops definitions.
3993 (the_low_target): Add comments for each unimplemented method.
3995 2015-07-09 Yao Qi <yao.qi@linaro.org>
3997 * linux-aarch64-low.c (aarch64_regmap): Remove.
3998 (aarch64_usrregs_info): Remove.
3999 (regs_info): Set field usrregs to NULL.
4001 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4003 * linux-low.c: Include "rsp-low.h"
4004 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4005 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4006 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4007 (handle_btrace_enable_pt): New.
4008 (handle_btrace_general_set): Support "pt".
4009 (handle_btrace_conf_general_set): Support "pt:size".
4011 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4013 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4016 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4018 * linux-aarch64-low.c: Remove comment about endianness.
4019 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4020 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4023 2015-06-24 Gary Benson <gbenson@redhat.com>
4025 * linux-i386-ipa.c (stdint.h): Do not include.
4026 * lynx-i386-low.c (stdint.h): Likewise.
4027 * lynx-ppc-low.c (stdint.h): Likewise.
4028 * mem-break.c (stdint.h): Likewise.
4029 * thread-db.c (stdint.h): Likewise.
4030 * tracepoint.c (stdint.h): Likewise.
4031 * win32-low.c (stdint.h): Likewise.
4033 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4035 * server.c (write_qxfer_response): Update call to
4036 remote_escape_output.
4038 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4039 Jan Kratochvil <jan.kratochvil@redhat.com>
4041 Merge multiple hex conversions.
4042 * gdbreplay.c (tohex): Rename to 'fromhex'.
4043 (logchar): Use fromhex.
4045 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4047 * server.c (handle_qxfer_libraries): Set `version' attribute for
4050 2015-06-10 Gary Benson <gbenson@redhat.com>
4052 * target.h (struct target_ops) <multifs_open>: New field.
4053 <multifs_unlink>: Likewise.
4054 <multifs_readlink>: Likewise.
4055 * linux-low.c (nat/linux-namespaces.h): New include.
4056 (linux_target_ops): Initialize the_target->multifs_open,
4057 the_target->multifs_unlink and the_target->multifs_readlink.
4058 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4059 * hostio.c (hostio_fs_pid): New static variable.
4060 (hostio_handle_new_gdb_connection): New function.
4061 (handle_setfs): Likewise.
4062 (handle_open): Use the_target->multifs_open as appropriate.
4063 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4064 (handle_readlink): Use the_target->multifs_readlink as
4066 (handle_vFile): Handle vFile:setfs packets.
4067 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4068 after target_handle_new_gdb_connection.
4070 2015-06-10 Gary Benson <gbenson@redhat.com>
4072 * configure.ac (AC_CHECK_FUNCS): Add setns.
4073 * config.in: Regenerate.
4074 * configure: Likewise.
4075 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4076 (linux-namespaces.o): New rule.
4077 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4079 2015-06-09 Gary Benson <gbenson@redhat.com>
4081 * hostio.c (handle_open): Process mode argument with
4082 fileio_to_host_mode.
4084 2015-06-01 Yao Qi <yao.qi@linaro.org>
4086 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4087 * linux-x86-low.c: Likewise.
4089 2015-05-28 Don Breazeal <donb@codesourcery.com>
4091 * linux-low.c (handle_extended_wait): Initialize
4092 thread_info.last_resume_kind for new fork children.
4094 2015-05-15 Pedro Alves <palves@redhat.com>
4096 * target.h (target_handle_new_gdb_connection): Rewrite using if
4097 wrapped in do/while.
4099 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4101 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4102 * configure, config.in: Regenerate.
4103 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4106 2015-05-12 Don Breazeal <donb@codesourcery.com>
4108 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4109 PTRACE_EVENT_VFORK_DONE.
4110 (linux_low_ptrace_options, extended_event_reported): Add vfork
4112 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4113 and "vforkdone" for RSP 'T' Stop Reply Packet.
4114 * server.h (report_vfork_events): Declare
4117 2015-05-12 Don Breazeal <donb@codesourcery.com>
4119 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4120 (the_low_target) <new_fork>: Initialize new member.
4121 * linux-arm-low.c (arm_new_fork): New function.
4122 (the_low_target) <new_fork>: Initialize new member.
4123 * linux-low.c (handle_extended_wait): Call new target function
4125 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4126 * linux-mips-low.c (mips_add_watchpoint): New function
4127 extracted from mips_insert_point.
4128 (the_low_target) <new_fork>: Initialize new member.
4129 (mips_linux_new_fork): New function.
4130 (mips_insert_point): Call mips_add_watchpoint.
4131 * linux-x86-low.c (x86_linux_new_fork): New function.
4132 (the_low_target) <new_fork>: Initialize new member.
4134 2015-05-12 Don Breazeal <donb@codesourcery.com>
4136 * linux-low.c (handle_extended_wait): Implement return value,
4137 rename argument 'event_child' to 'event_lwp', handle
4138 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4139 (linux_low_ptrace_options): New function.
4140 (linux_low_filter_event): Call linux_low_ptrace_options,
4141 use different argument fo linux_enable_event_reporting,
4142 use return value from handle_extended_wait.
4143 (extended_event_reported): New function.
4144 (linux_wait_1): Call extended_event_reported and set
4145 status to report fork events.
4146 (linux_write_memory): Add pid to debug message.
4147 (reset_lwp_ptrace_options_callback): New function.
4148 (linux_handle_new_gdb_connection): New function.
4149 (linux_target_ops): Initialize new structure member.
4150 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4151 * lynx-low.c: Initialize new structure member.
4152 * remote-utils.c (prepare_resume_reply): Implement stop reason
4153 "fork" for "T" stop message.
4154 * server.c (handle_query): Call handle_new_gdb_connection.
4155 * server.h (report_fork_events): Declare global flag.
4156 * target.h (struct target_ops) <handle_new_gdb_connection>:
4158 (target_handle_new_gdb_connection): New macro.
4159 * win32-low.c: Initialize new structure member.
4161 2015-05-12 Don Breazeal <donb@codesourcery.com>
4163 * mem-break.c (APPEND_TO_LIST): Define macro.
4164 (clone_agent_expr): New function.
4165 (clone_one_breakpoint): New function.
4166 (clone_all_breakpoints): New function.
4167 * mem-break.h: Declare new functions.
4169 2015-05-12 Don Breazeal <donb@codesourcery.com>
4171 * linux-low.c (linux_supports_fork_events): New function.
4172 (linux_supports_vfork_events): New function.
4173 (linux_target_ops): Initialize new structure members.
4174 (initialize_low): Call linux_check_ptrace_features.
4175 * lynx-low.c (lynx_target_ops): Initialize new structure
4177 * server.c (report_fork_events, report_vfork_events):
4179 (handle_query): Add new features to qSupported packet and
4181 (captured_main): Initialize new global variables.
4182 * target.h (struct target_ops) <supports_fork_events>:
4184 <supports_vfork_events>: New member.
4185 (target_supports_fork_events): New macro.
4186 (target_supports_vfork_events): New macro.
4187 * win32-low.c (win32_target_ops): Initialize new structure
4190 2015-05-12 Gary Benson <gbenson@redhat.com>
4192 * server.c (handle_qxfer_exec_file): Use current process
4195 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4197 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4198 Remove HAVE_PTRACE_GETREGS conditionals.
4199 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4200 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4202 2015-05-08 Yao Qi <yao.qi@linaro.org>
4204 * linux-low.c (linux_supports_conditional_breakpoints): New
4206 (linux_target_ops): Install new target method.
4207 * lynx-low.c (lynx_target_ops): Install NULL hook for
4208 supports_conditional_breakpoints.
4209 * nto-low.c (nto_target_ops): Likewise.
4210 * spu-low.c (spu_target_ops): Likewise.
4211 * win32-low.c (win32_target_ops): Likewise.
4212 * server.c (handle_query): Check
4213 target_supports_conditional_breakpoints.
4214 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4216 (target_supports_conditional_breakpoints): New macro.
4218 2015-05-06 Pedro Alves <palves@redhat.com>
4221 * server.c (start_inferior): If the process exits, mourn it.
4223 2015-04-21 Gary Benson <gbenson@redhat.com>
4225 * hostio.c (fileio_open_flags_to_host): Factored out to
4226 fileio_to_host_openflags in common/fileio.c. Single use
4229 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4231 * linux-xtensa-low.c (xtensa_fill_gregset)
4232 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4235 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4237 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4238 (regs_info): Replace usrregs pointer with NULL.
4240 2015-04-17 Gary Benson <gbenson@redhat.com>
4242 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4243 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4244 * server.c (handle_qxfer_exec_file): New function.
4245 (qxfer_packets): Add exec-file entry.
4246 (handle_query): Report qXfer:exec-file:read as supported packet.
4248 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4250 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4252 2015-04-09 Gary Benson <gbenson@redhat.com>
4254 * hostio-errno.c (errno_to_fileio_error): Remove function.
4255 Update caller to use remote_fileio_to_fio_error.
4257 2015-04-09 Yao Qi <yao.qi@linaro.org>
4259 * linux-low.c (linux_insert_point): Call
4260 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4261 (linux_remove_point): Call remove_memory_breakpoint if type is
4263 * linux-x86-low.c (x86_insert_point): Don't call
4264 insert_memory_breakpoint.
4265 (x86_remove_point): Don't call remove_memory_breakpoint.
4267 2015-04-01 Pedro Alves <palves@redhat.com>
4268 Cleber Rosa <crosa@redhat.com>
4270 * server.c (gdbserver_usage): Reorganize and extend the usage
4273 2015-03-24 Pedro Alves <palves@redhat.com>
4275 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4276 output. Also dump TRAP_TRACE.
4277 (linux_low_filter_event): In debug output, distinguish a
4278 resume_stop SIGSTOP from a delayed SIGSTOP.
4280 2015-03-24 Gary Benson <gbenson@redhat.com>
4282 * linux-x86-low.c (x86_linux_new_thread): Moved to
4284 (x86_linux_prepare_to_resume): Likewise.
4286 2015-03-24 Gary Benson <gbenson@redhat.com>
4288 * Makefile.in (x86-linux-dregs.o): New rule.
4289 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4290 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4291 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4292 (x86_linux_dr_get): Likewise.
4293 (x86_linux_dr_set): Likewise.
4294 (update_debug_registers_callback): Likewise.
4295 (x86_linux_dr_set_addr): Likewise.
4296 (x86_linux_dr_get_addr): Likewise.
4297 (x86_linux_dr_set_control): Likewise.
4298 (x86_linux_dr_get_control): Likewise.
4299 (x86_linux_dr_get_status): Likewise.
4300 (x86_linux_update_debug_registers): Likewise.
4302 2015-03-24 Gary Benson <gbenson@redhat.com>
4304 * linux-x86-low.c (x86_linux_update_debug_registers):
4305 New function, factored out from...
4306 (x86_linux_prepare_to_resume): ...this.
4308 2015-03-24 Gary Benson <gbenson@redhat.com>
4310 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4311 (x86_linux_dr_set): Likewise.
4312 (update_debug_registers_callback): Likewise.
4313 (x86_linux_dr_set_addr): Likewise.
4314 (x86_linux_dr_get_addr): Likewise.
4315 (x86_linux_dr_set_control): Likewise.
4316 (x86_linux_dr_get_control): Likewise.
4317 (x86_linux_dr_get_status): Likewise.
4318 (x86_linux_prepare_to_resume): Likewise.
4320 2015-03-24 Gary Benson <gbenson@redhat.com>
4322 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4323 Use perror_with_name. Pass string through gettext.
4324 (x86_linux_dr_set): Likewise.
4326 2015-03-24 Gary Benson <gbenson@redhat.com>
4328 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4329 (x86_linux_dr_set_addr): ...this.
4330 (x86_dr_low_get_addr): Rename to...
4331 (x86_linux_dr_get_addr): ...this.
4332 (x86_dr_low_set_control): Rename to...
4333 (x86_linux_dr_set_control): ...this.
4334 (x86_dr_low_get_control): Rename to...
4335 (x86_linux_dr_get_control): ...this.
4336 (x86_dr_low_get_status): Rename to...
4337 (x86_linux_dr_get_status): ...this.
4338 (x86_dr_low): Update with new function names.
4340 2015-03-24 Gary Benson <gbenson@redhat.com>
4342 * Makefile.in (x86-linux.o): New rule.
4343 * configure.srv: Add x86-linux.o to relevant targets.
4344 * linux-low.c (lwp_set_arch_private_info): New function.
4345 (lwp_arch_private_info): Likewise.
4346 * linux-x86-low.c: Include nat/x86-linux.h.
4347 (arch_lwp_info): Removed structure.
4348 (update_debug_registers_callback):
4349 Use lwp_set_debug_registers_changed.
4350 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4351 and lwp_set_debug_registers_changed.
4352 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4354 2015-03-24 Gary Benson <gbenson@redhat.com>
4356 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4357 * linux-arm-low.c (arm_new_thread): Likewise.
4358 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4359 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4360 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4361 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4363 2015-03-24 Gary Benson <gbenson@redhat.com>
4365 * linux-low.c (ptid_of_lwp): New function.
4366 (lwp_is_stopped): Likewise.
4367 (lwp_stop_reason): Likewise.
4368 * linux-x86-low.c (update_debug_registers_callback):
4370 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4373 2015-03-24 Gary Benson <gbenson@redhat.com>
4375 * linux-low.h (linux_stop_lwp): Remove declaration.
4377 2015-03-24 Gary Benson <gbenson@redhat.com>
4379 * linux-low.h: Include nat/linux-nat.h.
4380 * linux-low.c (iterate_over_lwps_args): New structure.
4381 (iterate_over_lwps_filter): New function.
4382 (iterate_over_lwps): Likewise.
4383 * linux-x86-low.c (update_debug_registers_callback):
4384 Update signature to what iterate_over_lwps expects.
4385 Remove PID check that iterate_over_lwps now performs.
4386 (x86_dr_low_set_addr): Use iterate_over_lwps.
4387 (x86_dr_low_set_control): Likewise.
4389 2015-03-24 Gary Benson <gbenson@redhat.com>
4391 * linux-x86-low.c (x86_debug_reg_state): New function.
4392 (x86_linux_prepare_to_resume): Use the above.
4394 2015-03-24 Gary Benson <gbenson@redhat.com>
4396 * linux-low.c (current_lwp_ptid): New function.
4397 * linux-x86-low.c: Include nat/linux-nat.h.
4398 (x86_dr_low_get_addr): Use current_lwp_ptid.
4399 (x86_dr_low_get_control): Likewise.
4400 (x86_dr_low_get_status): Likewise.
4402 2015-03-20 Pedro Alves <palves@redhat.com>
4404 * tracepoint.c (cmd_qtstatus): Make "str" const.
4406 2015-03-20 Pedro Alves <palves@redhat.com>
4408 * server.c (handle_general_set): Make "req_str" const.
4410 2015-03-19 Pedro Alves <palves@redhat.com>
4412 * linux-low.c (linux_resume_one_lwp): Rename to ...
4413 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4414 instead call perror_with_name.
4415 (check_ptrace_stopped_lwp_gone): New function.
4416 (linux_resume_one_lwp): Reimplement as wrapper around
4417 linux_resume_one_lwp_throw that swallows errors if the LWP is
4420 2015-03-19 Pedro Alves <palves@redhat.com>
4422 * linux-low.c (count_events_callback, select_event_lwp_callback):
4423 No longer check whether the thread has resume_stop as last resume
4426 2015-03-19 Pedro Alves <palves@redhat.com>
4428 * linux-low.c (count_events_callback, select_event_lwp_callback):
4429 Use the lwp's status_pending_p field, not the thread's.
4431 2015-03-19 Pedro Alves <palves@redhat.com>
4433 * linux-low.c (select_event_lwp_callback): Update comments to
4434 no longer mention SIGTRAP.
4436 2015-03-18 Gary Benson <gbenson@redhat.com>
4438 * server.c (handle_query): Do not report vFile:fstat as supported.
4440 2015-03-11 Gary Benson <gbenson@redhat.com>
4442 * hostio.c (sys/types.h): New include.
4443 (sys/stat.h): Likewise.
4444 (common-remote-fileio.h): Likewise.
4445 (handle_fstat): New function.
4446 (handle_vFile): Handle vFile:fstat packets.
4448 2015-03-11 Gary Benson <gbenson@redhat.com>
4450 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4451 struct stat.st_blocks and struct stat.st_blksize.
4452 * configure: Regenerate.
4453 * config.in: Likewise.
4454 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4455 (OBS): Add common-remote-fileio.o.
4456 (common-remote-fileio.o): New rule.
4458 2015-03-09 Pedro Alves <palves@redhat.com>
4460 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4461 'struct sockaddr' pointer in 'accept' call.
4463 2015-03-09 Pedro Alves <palves@redhat.com>
4466 2015-03-07 Pedro Alves <palves@redhat.com>
4467 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4468 or <winsock2.h> here. Instead include "gdb_socket.h".
4469 (remote_open): Use union gdb_sockaddr_u.
4470 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4471 or <winsock2.h> here. Instead include "gdb_socket.h".
4472 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4473 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4475 (init_named_socket, gdb_agent_helper_thread): Use union
4478 2015-03-07 Pedro Alves <palves@redhat.com>
4480 * configure.ac (build_warnings): Move
4481 -Wdeclaration-after-statement to the C-specific set.
4482 * configure: Regenerate.
4484 2015-03-07 Pedro Alves <palves@redhat.com>
4486 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4487 or <winsock2.h> here. Instead include "gdb_socket.h".
4488 (remote_open): Use union gdb_sockaddr_u.
4489 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4490 or <winsock2.h> here. Instead include "gdb_socket.h".
4491 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4492 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4494 (init_named_socket, gdb_agent_helper_thread): Use union
4497 2015-03-07 Pedro Alves <palves@redhat.com>
4499 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4502 2015-03-06 Yao Qi <yao.qi@linaro.org>
4504 * linux-aarch64-low.c (aarch64_insert_point): Use
4505 show_debug_regs as a boolean.
4506 (aarch64_remove_point): Likewise.
4508 2015-03-05 Pedro Alves <palves@redhat.com>
4510 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4511 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4512 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4513 * nto-low.c (nto_target_ops): Likewise.
4514 * spu-low.c (spu_target_ops): Likewise.
4515 * win32-low.c (win32_target_ops): Likewise.
4517 2015-03-04 Pedro Alves <palves@redhat.com>
4519 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4520 Decide whether a breakpoint triggered based on the SIGTRAP's
4522 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4523 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4524 (linux_low_filter_event): Check for breakpoints before checking
4526 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4528 (linux_stopped_by_sw_breakpoint)
4529 (linux_supports_stopped_by_sw_breakpoint)
4530 (linux_stopped_by_hw_breakpoint)
4531 (linux_supports_stopped_by_hw_breakpoint): New functions.
4532 (linux_target_ops): Install new target methods.
4534 2015-03-04 Pedro Alves <palves@redhat.com>
4536 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4537 * server.c (swbreak_feature, hwbreak_feature): New globals.
4538 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4539 (captured_main): Clear swbreak_feature and hwbreak_feature.
4540 * server.h (swbreak_feature, hwbreak_feature): Declare.
4541 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4542 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4543 supports_stopped_by_hw_breakpoint>: New fields.
4544 (target_supports_stopped_by_sw_breakpoint)
4545 (target_stopped_by_sw_breakpoint)
4546 (target_supports_stopped_by_hw_breakpoint)
4547 (target_stopped_by_hw_breakpoint): Declare.
4549 2015-03-04 Pedro Alves <palves@redhat.com>
4551 enum lwp_stop_reason -> enum target_stop_reason
4552 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4553 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4554 (linux_wait_1, stuck_in_jump_pad_callback)
4555 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4556 (linux_stopped_by_watchpoint):
4557 * linux-low.h (enum lwp_stop_reason): Delete.
4558 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4559 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4561 2015-03-04 Yao Qi <yao.qi@linaro.org>
4563 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4565 2015-03-03 Gary Benson <gbenson@redhat.com>
4567 * hostio.c (handle_vFile): Fix prefix lengths.
4569 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4571 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4574 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4576 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4577 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4578 (clean): Add "rm -f" for above C files.
4579 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4580 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4581 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4582 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4583 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4584 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4585 (init_registers_s390x_vx_linux64)
4586 (init_registers_s390x_tevx_linux64)
4587 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4588 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4590 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4591 (s390_store_vxrs_high): New functions.
4592 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4594 (s390_arch_setup): Add logic for selecting one of the new target
4595 descriptions. Activate the new vector regsets if applicable.
4596 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4597 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4598 and init_registers_s390x_tevx_linux64.
4600 2015-03-01 Pedro Alves <palves@redhat.com>
4602 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4605 2015-02-27 Pedro Alves <palves@redhat.com>
4607 * linux-x86-low.c (u_debugreg_offset): New function.
4608 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4610 2015-02-27 Pedro Alves <palves@redhat.com>
4612 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4613 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4614 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4615 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4616 (ps_lsetfpregs, ps_getpid)
4617 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4618 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4619 (ps_lsetxregs, ps_plog): Declare.
4621 2015-02-27 Pedro Alves <palves@redhat.com>
4623 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4624 IP_AGENT_EXPORT_FUNC.
4625 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4626 IP_AGENT_EXPORT_FUNC.
4627 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4628 (IP_AGENT_EXPORT): Delete.
4629 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4630 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4631 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4632 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4633 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4634 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4635 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4636 (traceframe_read_count, traceframe_write_count)
4637 (traceframes_created, trace_state_variables, get_raw_reg)
4638 (get_trace_state_variable_value, set_trace_state_variable_value)
4639 (ust_loaded, helper_thread_id, cmd_buf): Use
4640 IPA_SYM_EXPORTED_NAME.
4641 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4642 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4643 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4644 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4645 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4646 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4647 EXTERN_C_PUSH/EXTERN_C_POP.
4648 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4649 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4650 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4651 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4652 (traceframe_write_count, traceframe_read_count)
4653 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4654 (about_to_request_buffer_space, get_trace_state_variable_value)
4655 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4656 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4657 EXTERN_C_PUSH/EXTERN_C_POP.
4658 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4659 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4660 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4661 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4662 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4663 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4664 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4665 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4667 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4668 (IP_AGENT_EXPORT_VAR_DECL): Define.
4670 (gdb_agent_get_raw_reg): Declare.
4672 2015-02-27 Tom Tromey <tromey@redhat.com>
4673 Pedro Alves <palves@redhat.com>
4675 Rename symbols whose names are reserved C++ keywords throughout.
4677 2015-02-27 Pedro Alves <palves@redhat.com>
4679 * Makefile.in (COMPILER): New, get it from autoconf.
4680 (CXX): Get from autoconf instead.
4681 (COMPILE.pre): Use COMPILER.
4682 (CC-LD): Rename to ...
4683 (CC_LD): ... this. Use COMPILER.
4684 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4685 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4686 * acinclude.m4: Include build-with-cxx.m4.
4687 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4688 Disable -Werror by default if building in C++ mode.
4689 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4690 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4691 the C++ compiler. Save/restore CXXFLAGS too.
4692 * configure: Regenerate.
4694 2015-02-27 Pedro Alves <palves@redhat.com>
4696 * acinclude.m4: Include libiberty.m4.
4697 * configure.ac: Call libiberty_INIT.
4698 * config.in, configure: Regenerate.
4700 2015-02-26 Pedro Alves <palves@redhat.com>
4702 * linux-low.c (linux_wait_1): When incrementing the PC past a
4703 program breakpoint always use the_low_target.breakpoint_len as
4704 increment, rather than the maximum between that and
4705 the_low_target.decr_pc_after_break.
4707 2015-02-23 Pedro Alves <palves@redhat.com>
4709 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4710 thread was doing a step-over; always adjust the PC if
4711 we stepped over a permanent breakpoint.
4712 (linux_wait_1): If we stepped over breakpoint that was on top of a
4713 permanent breakpoint, manually advance the PC past it.
4715 2015-02-23 Pedro Alves <palves@redhat.com>
4717 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4719 (x86_fill_gregset, x86_store_gregset): Use it when handling
4722 2015-02-20 Pedro Alves <palves@redhat.com>
4724 * thread-db.c: Include "nat/linux-procfs.h".
4725 (thread_db_init): Skip listing new threads if the kernel supports
4726 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4728 2015-02-20 Pedro Alves <palves@redhat.com>
4730 * linux-low.c (status_pending_p_callback): Use ptid_match.
4732 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4734 PR breakpoints/16812
4735 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4736 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4737 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4739 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4741 PR breakpoints/15956
4742 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4744 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4746 * linux-low.c (linux_low_btrace_conf): Print size.
4747 * server.c (handle_btrace_conf_general_set): New.
4748 (hanle_general_set): Call handle_btrace_conf_general_set.
4749 (handle_query): Report Qbtrace-conf:bts:size as supported.
4751 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4753 * linux-low.c (linux_low_enable_btrace): Update parameters.
4754 (linux_low_btrace_conf): New.
4755 (linux_target_ops)<to_btrace_conf>: Initialize.
4756 * server.c (current_btrace_conf): New.
4757 (handle_btrace_enable): Rename to ...
4758 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4759 to target_enable_btrace. Update comment. Update users.
4760 (handle_qxfer_btrace_conf): New.
4761 (qxfer_packets): Add btrace-conf entry.
4762 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4763 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4764 (target_ops)<read_btrace_conf>: New.
4765 (target_enable_btrace): Update parameters.
4766 (target_read_btrace_conf): New.
4768 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4770 * server.c (handle_btrace_general_set): Remove call to
4771 target_supports_btrace.
4772 (supported_btrace_packets): New.
4773 (handle_query): Call supported_btrace_packets.
4774 * target.h: include btrace-common.h.
4775 (btrace_target_info): Removed.
4776 (supports_btrace, target_supports_btrace): Update parameters.
4778 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4780 * Makefile.in (SFILES): Add common/btrace-common.c.
4781 (OBS): Add common/btrace-common.o.
4782 (btrace-common.o): Add build rules.
4783 * linux-low: Include btrace-common.h.
4784 (linux_low_read_btrace): Use struct btrace_data. Call
4785 btrace_data_init and btrace_data_fini.
4787 2015-02-06 Pedro Alves <palves@redhat.com>
4789 * thread-db.c (find_new_threads_callback): Add debug output.
4791 2015-02-04 Pedro Alves <palves@redhat.com>
4793 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4794 (resume_stopped_resumed_lwps): New function.
4795 (linux_wait_for_event_filtered): Use it.
4797 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4799 * Makefile.in (SFILES): Add linux-personality.c.
4800 (linux-personality.o): New rule.
4801 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4802 list of objects to be built.
4803 * linux-low.c: Include nat/linux-personality.h.
4804 (linux_create_inferior): Remove code to disable address space
4805 randomization (moved to ../nat/linux-personality.c). Create
4806 cleanup to disable address space randomization.
4808 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4810 * Makefile.in (posix-strerror.o): New rule.
4811 (mingw-strerror.o): Likewise.
4812 * configure: Regenerated.
4813 * configure.ac: Source file ../common/common.host. Initialize new
4814 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4816 2015-01-14 Yao Qi <yao@codesourcery.com>
4818 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4819 (ppc-linux.o): New rule.
4820 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4821 * configure.ac: AC_CHECK_FUNCS(getauxval).
4822 * config.in: Re-generated.
4823 * configure: Re-generated.
4824 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4825 ppc64_64bit_inferior_p
4827 2015-01-14 Yao Qi <yao@codesourcery.com>
4829 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4830 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4831 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4832 (PT_ORIG_R3, PT_TRAP): Likewise.
4833 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4834 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4835 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4837 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4839 * i387-fp.c (i387_cache_to_xsave): In look over
4840 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4841 zmmh_low_space field by use of zmmh_high_space.
4843 2015-01-09 Pedro Alves <palves@redhat.com>
4845 * linux-low.c (step_over_bkpt): Move higher up in the file.
4846 (handle_extended_wait): Don't store the stop_pc here.
4847 (get_stop_pc): Adjust comments and rename to ...
4848 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4849 stopped for a software breakpoint or hardware breakpoint.
4850 (thread_still_has_status_pending_p): New function.
4851 (status_pending_p_callback): Use
4852 thread_still_has_status_pending_p. If the event is no longer
4853 interesting, resume the LWP.
4854 (handle_tracepoints): Add assert.
4855 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4856 (wstatus_maybe_breakpoint): New function.
4857 (cancel_breakpoint): Delete function.
4858 (check_stopped_by_watchpoint): New function, factored out from
4859 linux_low_filter_event.
4860 (lp_status_maybe_breakpoint): Delete function.
4861 (linux_low_filter_event): Remove filter_ptid argument.
4862 Leave thread group exits pending here. Store the LWP's stop PC.
4863 Always leave events pending.
4864 (linux_wait_for_event_filtered): Pull all events out of the
4865 kernel, and leave them all pending.
4866 (count_events_callback, select_event_lwp_callback): Consider all
4868 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4869 (select_event_lwp): Only give preference to the stepping LWP in
4870 all-stop mode. Adjust comments.
4871 (ignore_event): New function.
4872 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4873 references to cancel_breakpoints. Adjust to renames. Also give
4874 equal priority to all LWPs that have had events in non-stop mode.
4875 If reporting a software breakpoint event, unadjust the LWP's PC.
4876 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4877 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4879 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4880 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4881 (linux_stopped_by_watchpoint): Adjust.
4882 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4883 * linux-low.h (enum lwp_stop_reason): New.
4884 (struct lwp_info) <stop_pc>: Adjust comment.
4885 <stopped_by_watchpoint>: Delete field.
4886 <stop_reason>: New field.
4887 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4888 * mem-break.c (software_breakpoint_inserted_here)
4889 (hardware_breakpoint_inserted_here): New function.
4890 * mem-break.h (software_breakpoint_inserted_here)
4891 (hardware_breakpoint_inserted_here): Declare.
4892 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4893 (cancel_breakpoints): Delete.
4894 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4895 (upload_fast_traceframes): Remove references to
4898 2015-01-09 Pedro Alves <palves@redhat.com>
4900 * thread-db.c (find_new_threads_callback): Ignore thread if the
4901 kernel thread ID is -1.
4903 2015-01-09 Pedro Alves <palves@redhat.com>
4905 * linux-low.c (linux_attach_fail_reason_string): Move to
4906 nat/linux-ptrace.c, and rename.
4907 (linux_attach_lwp): Update comment.
4908 (attach_proc_task_lwp_callback): New function.
4909 (linux_attach): Adjust to rename and use
4910 linux_proc_attach_tgid_threads.
4911 (linux_attach_fail_reason_string): Delete declaration.
4913 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4915 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4916 * server.c (gdbserver_version): Likewise.
4918 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4920 * remote-utils.c: Include ctype.h.
4921 (input_interrupt): Explicitly handle the case when the char
4922 received is the NUL byte. Improve the printing of non-ASCII
4925 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4927 * linux-low.c (linux_low_filter_event): Update call to
4928 linux_enable_event_reporting following the addition of
4929 a new parameter to that function.
4931 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4934 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4935 (AARCH64_FPCR_REGNO): Likewise.
4936 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4937 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4938 (aarch64_store_fpregset): Likewise.
4940 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4942 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4943 Remove FIXME comment about assumption about N.
4945 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4947 * configure.ac: If large-file support is disabled in GDBserver,
4948 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4949 * configure: Regenerate.
4951 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4953 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4954 warning upon ENODATA from ptrace.
4955 * linux-s390-low.c (s390_store_tdb): New.
4956 (s390_regsets): Add regset for NT_S390_TDB.
4958 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4960 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4961 without a fill_function.
4962 * linux-s390-low.c (s390_fill_last_break): Remove.
4963 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4964 (s390_arch_setup): Use regset's size instead of fill_function for
4967 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4969 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4970 the regset's store function when ptrace returned an error.
4971 * regcache.c (get_thread_regcache): Invalidate register cache
4972 before fetching inferior's registers.
4974 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4976 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4977 while-loop as for-loop.
4978 (regsets_store_inferior_registers): Likewise.
4980 2014-11-28 Yao Qi <yao@codesourcery.com>
4982 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4983 * config.in, configure: Re-generate.
4984 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4987 2014-11-21 Yao Qi <yao@codesourcery.com>
4989 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4990 (AC_CHECK_HEADERS): Remove malloc.h.
4991 * configure: Re-generated.
4992 * config.in: Re-generated.
4993 * server.h: Don't include alloca.h and malloc.h.
4994 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4995 Don't include malloc.h.
4997 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4999 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5000 corresponding ERRNO check in same block.
5002 2014-11-12 Pedro Alves <palves@redhat.com>
5004 * server.c (cont_thread): Update comment.
5005 (start_inferior, attach_inferior): No longer clear cont_thread.
5006 (handle_v_cont): No longer set cont_thread.
5007 (captured_main): Clear cont_thread each time a GDB connects.
5009 2014-11-12 Pedro Alves <palves@redhat.com>
5011 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5012 thread, and don't resume all threads if the Hc thread has exited.
5014 2014-11-12 Pedro Alves <palves@redhat.com>
5016 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5017 the process group instead of to a specific LWP.
5019 2014-10-15 Pedro Alves <palves@redhat.com>
5022 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5024 (arm_set_thread_context): Delete.
5025 (the_low_target): Adjust.
5026 * win32-i386-low.c (debug_registers_changed)
5027 (debug_registers_used): Delete.
5028 (update_debug_registers_callback): New function.
5029 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5030 needing to update their debug registers.
5031 (win32_get_current_dr): New function.
5032 (x86_dr_low_get_addr, x86_dr_low_get_control)
5033 (x86_dr_low_get_status): Fetch the debug register from the thread
5035 (i386_initial_stuff): Adjust.
5036 (i386_get_thread_context): Remove current_event parameter. Don't
5037 clear debug_registers_changed nor copy DR values to
5039 (i386_set_thread_context): Delete.
5040 (i386_prepare_to_resume): New function.
5041 (i386_thread_added): Mark the thread as needing to update irs
5043 (the_low_target): Remove i386_set_thread_context and install
5044 i386_prepare_to_resume.
5045 * win32-low.c (win32_get_thread_context): Adjust.
5046 (win32_set_thread_context): Use SetThreadContext
5048 (win32_prepare_to_resume): New function.
5049 (win32_require_context): New function, factored out from ...
5050 (thread_rec): ... this.
5051 (continue_one_thread): Call win32_prepare_to_resume on each thread
5052 we're about to continue.
5053 (win32_resume): Call win32_prepare_to_resume on the event thread.
5054 * win32-low.h (struct win32_thread_info)
5055 <debug_registers_changed>: New field.
5056 (struct win32_target_ops): Change prototype of set_thread_context,
5057 delete set_thread_context and add prepare_to_resume.
5058 (win32_require_context): New declaration.
5060 2014-10-08 Gary Benson <gbenson@redhat.com>
5062 * server.h: Do not include common-exceptions.h.
5064 2014-10-08 Gary Benson <gbenson@redhat.com>
5066 * server.h: Do not include cleanups.h.
5068 2014-09-30 James Hogan <james.hogan@imgtec.com>
5070 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5073 2014-09-23 Yao Qi <yao@codesourcery.com>
5075 * linux-low.c (lp_status_maybe_breakpoint): New function.
5076 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5077 (count_events_callback): Likewise.
5078 (select_event_lwp_callback): Likewise.
5079 (cancel_breakpoints_callback): Likewise.
5081 2014-09-19 Don Breazeal <donb@codesourcery.com>
5083 * linux-low.c (handle_extended_wait): Call
5084 linux_ptrace_get_extended_event.
5085 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5086 linux_is_extended_waitstatus.
5088 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5090 * Makefile.in (CPPFLAGS): Define.
5091 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5092 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5094 2014-09-16 Gary Benson <gbenson@redhat.com>
5096 * inferiors.h (current_inferior): Renamed as...
5097 (current_thread): New variable. All uses updated.
5098 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5099 (maybe_move_out_of_jump_pad): Likewise.
5100 (cancel_breakpoint): Likewise.
5101 (linux_low_filter_event): Likewise.
5102 (wait_for_sigstop): Likewise.
5103 (linux_resume_one_lwp): Likewise.
5104 (need_step_over_p): Likewise.
5105 (start_step_over): Likewise.
5106 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5107 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5108 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5109 and save_inferior as saved_thread.
5110 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5112 (regcache_invalidate_thread): Likewise.
5113 * remote-utils.c (prepare_resume_reply): Likewise.
5114 * thread-db.c (thread_db_get_tls_address): Likewise.
5115 (disable_thread_event_reporting): Likewise.
5116 (remove_thread_event_breakpoints): Likewise.
5117 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5119 * target.h (set_desired_inferior): Renamed as...
5120 (set_desired_thread): New declaration. All uses updated.
5121 * server.c (myresume): Updated comment to reference thread instead
5123 (handle_serial_event): Likewise.
5124 (handle_target_event): Likewise.
5126 2014-09-12 Tom Tromey <tromey@redhat.com>
5127 Gary Benson <gbenson@redhat.com>
5129 * regcache.h: Include common-regcache.h.
5130 (regcache_read_pc): Don't declare.
5131 * regcache.c (get_thread_regcache_for_ptid): New function.
5133 2014-09-11 Tom Tromey <tromey@redhat.com>
5134 Gary Benson <gbenson@redhat.com>
5136 * symbol.c: New file.
5137 * Makefile.in (SFILES): Add symbol.c.
5138 (OBS): Add symbol.o.
5140 2014-09-11 Gary Benson <gbenson@redhat.com>
5142 * target.c (target_stop_ptid, target_continue_ptid): New
5145 2014-09-11 Tom Tromey <tromey@redhat.com>
5146 Gary Benson <gbenson@redhat.com>
5148 * target.h: Include target/target.h.
5149 * target.c (target_read_memory, target_read_uint32)
5150 (target_write_memory): New functions.
5152 2014-09-11 Gary Benson <gbenson@redhat.com>
5154 * server.h (debug_hw_points): Don't declare.
5155 * server.c (debug_hw_points): Don't define. Replace all uses
5156 with show_debug_regs.
5157 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5158 all uses with show_debug_regs.
5160 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5162 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5163 endianness into account.
5164 (ppc_supply_ptrace_register): Likewise.
5166 2014-09-03 James Hogan <james.hogan@imgtec.com>
5168 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5169 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5171 2014-09-03 Gary Benson <gbenson@redhat.com>
5173 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5174 ALL_DEBUG_ADDRESS_REGISTERS.
5176 2014-09-02 Gary Benson <gbenson@redhat.com>
5178 * i386-low.h: Renamed as...
5179 * x86-low.h: New file. All type, function and variable name
5180 prefixes changed from "i386_" to "x86_". All references updated.
5181 * i386-low.c: Renamed as...
5182 * x86-low.c: New file. All type, function and variable name
5183 prefixes changed from "i386_" to "x86_". All references updated.
5185 2014-09-02 Gary Benson <gbenson@redhat.com>
5187 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5188 (x86_linux_new_thread): Likewise.
5190 2014-08-29 Gary Benson <gbenson@redhat.com>
5192 * server.h (setjmp.h): Do not include.
5193 (toplevel): Do not declare.
5194 (common-exceptions.h): Include.
5195 (cleanups.h): Likewise.
5196 * server.c (toplevel): Do not define.
5197 (exit_code): New static global.
5198 (detach_or_kill_for_exit_cleanup): New function.
5199 (main): New function. Original main renamed to...
5200 (captured_main): New function.
5201 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5203 2014-08-29 Gary Benson <gbenson@redhat.com>
5205 * Makefile.in (SFILES): Add common/common-exceptions.c.
5206 (OBS): Add common-exceptions.o.
5207 (common-exceptions.o): New rule.
5208 * utils.c (prepare_to_throw_exception): New function.
5210 2014-08-29 Gary Benson <gbenson@redhat.com>
5212 * config.in: Regenerate.
5213 * configure: Likewise.
5215 2014-08-29 Gary Benson <gbenson@redhat.com>
5217 * Makefile.in (SFILES): Add common/cleanups.c.
5219 (cleanups.o): New rule.
5221 2014-08-29 Gary Benson <gbenson@redhat.com>
5223 * utils.c (internal_vwarning): New function.
5225 2014-08-28 Gary Benson <gbenson@redhat.com>
5227 * utils.h (fatal): Remove declaration.
5228 * utils.c (fatal): Remove function.
5230 2014-08-28 Gary Benson <gbenson@redhat.com>
5232 * tracepoint.c (gdb_agent_init): Replace fatal with
5234 (initialize_tracepoint): Likewise.
5236 2014-08-28 Gary Benson <gbenson@redhat.com>
5238 * remote-utils.c (remote_prepare): Replace fatal with error.
5240 2014-08-28 Gary Benson <gbenson@redhat.com>
5242 * linux-low.c (linux_async): Replace fatal with warning.
5244 (linux_start_non_stop): Return -1 if linux_async failed.
5246 2014-08-28 Gary Benson <gbenson@redhat.com>
5248 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5250 (i386_dr_low_get_addr): Remove vague comment.
5251 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5254 2014-08-28 Gary Benson <gbenson@redhat.com>
5256 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5257 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5259 (linux_resume_one_lwp): Likewise.
5260 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5262 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5263 with internal_error.
5264 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5265 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5266 (find_register_by_name): Replace fatal with internal_error.
5267 (find_regno): Likewise.
5268 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5269 * thread-db.c (thread_db_create_event): Likewise.
5270 (thread_db_load_search): Likewise.
5271 (try_thread_db_load_1): Likewise.
5272 * tracepoint.c (get_jump_space_head): Replace fatal with
5274 (claim_trampoline_space): Likewise.
5275 (have_fast_tracepoint_trampoline_buffer): Likewise.
5276 (cmd_qtstart): Likewise.
5277 (stop_tracing): Likewise.
5278 (fast_tracepoint_collecting): Likewise.
5279 (target_malloc): Likewise.
5280 (download_tracepoint): Likewise.
5281 (download_trace_state_variables): Replace check with gdb_assert.
5282 (upload_fast_traceframes): Replace fatal with internal_error.
5284 2014-08-19 Tom Tromey <tromey@redhat.com>
5285 Gary Benson <gbenson@redhat.com>
5287 * Makefile.in (SFILES): Add common/common-debug.c.
5288 (OBS): Add common-debug.o.
5289 (common-debug.o): New rule.
5290 * debug.h (debug_printf): Don't declare.
5291 * debug.c (debug_printf): Renamed and rewritten as...
5292 (debug_vprintf): New function.
5294 2014-08-19 Gary Benson <gbenson@redhat.com>
5296 * utils.h: Do not include print-utils.h.
5298 2014-08-19 Tom Tromey <tromey@redhat.com>
5299 Gary Benson <gbenson@redhat.com>
5301 * server.h: Add static assertion.
5302 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5304 2014-08-19 Tom Tromey <tromey@redhat.com>
5305 Gary Benson <gbenson@redhat.com>
5307 * Makefile.in (SFILES): Add common/errors.c.
5308 (OBS): Add errors.o.
5309 (IPA_OBS): Add errors-ipa.o.
5310 (errors.o): New rule.
5311 (errors-ipa.o): Likewise.
5312 * utils.h (perror_with_name, error, warning): Don't declare.
5313 * utils.c (warning): Renamed and rewritten as...
5314 (vwarning): New function.
5315 (error): Renamed and rewritten as...
5316 (verror): New function.
5317 (internal_error): Renamed and rewritten as...
5318 (internal_verror): New function.
5320 2014-08-07 Gary Benson <gbenson@redhat.com>
5322 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5323 * configure: Regenerate.
5324 * config.in: Likewise.
5325 * server.h: Do not include errno.h.
5326 * event-loop.c: Likewise.
5327 * hostio-errno.c: Likewise.
5328 * linux-low.c: Likewise.
5329 * remote-utils.c: Likewise.
5330 * spu-low.c: Likewise.
5331 * utils.c: Likewise.
5332 * gdbreplay.c: Unconditionally include errno.h.
5334 2014-08-07 Gary Benson <gbenson@redhat.com>
5336 * server.h: Do not include string.h.
5337 * event-loop.c: Likewise.
5338 * linux-low.c: Likewise.
5339 * regcache.c: Likewise.
5340 * remote-utils.c: Likewise.
5341 * spu-low.c: Likewise.
5342 * utils.c: Likewise.
5344 2014-08-07 Gary Benson <gbenson@redhat.com>
5346 * server.h: Do not include gdb_assert.h.
5348 2014-08-07 Gary Benson <gbenson@redhat.com>
5350 * server.h: Do not include common-utils.h.
5352 2014-08-07 Gary Benson <gbenson@redhat.com>
5354 * server.h: Do not include ptid.h.
5355 * notif.h: Likewise.
5357 2014-08-07 Gary Benson <gbenson@redhat.com>
5359 * server.h: Do not include gdb_locale.h.
5361 2014-08-07 Gary Benson <gbenson@redhat.com>
5363 * server.h: Do not include gdb/signals.h.
5364 * win32-low.c: Likewise.
5366 2014-08-07 Gary Benson <gbenson@redhat.com>
5368 * server.h: Do not include pathmax.h.
5370 2014-08-07 Gary Benson <gbenson@redhat.com>
5372 * server.h: Do not include libiberty.h.
5373 * linux-bfin-low.c: Likewise.
5375 2014-08-07 Gary Benson <gbenson@redhat.com>
5377 * server.h: Do not include ansidecl.h.
5379 2014-08-07 Gary Benson <gbenson@redhat.com>
5381 * linux-x86-low.c: Do not include stddef.h.
5382 * lynx-ppc-low.c: Likewise.
5383 * tracepoint.c: Likewise.
5385 2014-08-07 Gary Benson <gbenson@redhat.com>
5387 * server.h: Do not include stdarg.h.
5388 * nto-low.c: Likewise.
5390 2014-08-07 Gary Benson <gbenson@redhat.com>
5392 * server.h: Do not include stdlib.h.
5393 * inferiors.c: Likewise.
5394 * linux-low.c: Likewise.
5395 * regcache.c: Likewise.
5396 * spu-low.c: Likewise.
5397 * tracepoint.c: Likewise.
5398 * utils.c: Likewise.
5400 2014-08-07 Gary Benson <gbenson@redhat.com>
5402 * server.h: Do not include stdio.h.
5403 * linux-low.c: Likewise.
5404 * remote-utils.c: Likewise.
5405 * spu-low.c: Likewise.
5406 * utils.c: Likewise.
5407 * wincecompat.c: Likewise.
5409 2014-08-06 Gary Benson <gbenson@redhat.com>
5411 * regcache.c (init_register_cache): Move conditionals inside if.
5413 2014-08-06 Gary Benson <gbenson@redhat.com>
5415 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5417 2014-07-31 Gary Benson <gbenson@redhat.com>
5419 * ax.h: Do not include server.h.
5420 * gdbthread.h: Likewise.
5421 * lynx-low.h: Likewise.
5422 * notif.h: Likewise.
5424 2014-07-30 Gary Benson <gbenson@redhat.com>
5426 * server.h: Include common-defs.h.
5427 Do not include config.h or build-gnulib-gdbserver/config.h.
5429 2014-07-30 Gary Benson <gbenson@redhat.com>
5431 * hostio-errno.c: Move server.h to top of includes list.
5432 * inferiors.c: Likewise.
5433 * linux-x86-low.c: Likewise.
5434 * notif.c: Include server.h.
5436 2014-07-24 Tom Tromey <tromey@redhat.com>
5437 Gary Benson <gbenson@redhat.com>
5439 * server.h (CORE_ADDR): Now unsigned.
5441 2014-07-16 Pedro Alves <palves@redhat.com>
5443 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5445 2014-07-15 Pedro Alves <palves@redhat.com>
5447 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5450 2014-07-11 Pedro Alves <palves@redhat.com>
5452 * linux-low.c (kill_wait_lwp): New function, based on
5453 kill_one_lwp_callback, but use my_waitpid directly.
5454 (kill_one_lwp_callback, linux_kill): Use it.
5456 2014-06-23 Pedro Alves <palves@redhat.com>
5458 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5459 before setting DR0..DR3.
5461 2014-06-20 Gary Benson <gbenson@redhat.com>
5463 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5464 * configure: Regenerated.
5465 * config.in: Likewise.
5467 2014-06-20 Gary Benson <gbenson@redhat.com>
5469 * Makefile.in (SFILES): Update locations for files moved
5471 (object file files): Reordered.
5473 2014-06-20 Gary Benson <gbenson@redhat.com>
5475 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5476 (i386_dr_low_set_addr): Likewise.
5477 (i386_dr_low_get_addr): Likewise.
5478 (i386_dr_low_can_set_control): Likewise.
5479 (i386_dr_low_set_control): Likewise.
5480 (i386_dr_low_get_control): Likewise.
5481 (i386_dr_low_get_status): Likewise.
5482 (i386_get_debug_register_length): Likewise.
5483 * linux-x86-low.c (i386_dr_low_set_addr):
5484 Changed signature. Made static.
5485 (i386_dr_low_get_addr): Likewise.
5486 (i386_dr_low_set_control): Likewise.
5487 (i386_dr_low_get_control): Likewise.
5488 (i386_dr_low_get_status): Likewise.
5489 (i386_dr_low): New global variable.
5490 * win32-i386-low.c (i386_dr_low_set_addr):
5491 Changed signature. Made static.
5492 (i386_dr_low_get_addr): Likewise.
5493 (i386_dr_low_set_control): Likewise.
5494 (i386_dr_low_get_control): Likewise.
5495 (i386_dr_low_get_status): Likewise.
5496 (i386_dr_low): New global variable.
5498 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5500 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5501 * Makefile.in (AR, AR_FLAGS): Define.
5502 * configure: Regenerate.
5504 2014-06-19 Gary Benson <gbenson@redhat.com>
5506 * Makefile.in (i386-dregs.o): New rule.
5507 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5508 * i386-low.c (target.h): Remove include.
5509 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5510 (DR_CONTROL_SHIFT): Likewise.
5511 (DR_CONTROL_SIZE): Likewise.
5512 (DR_RW_EXECUTE): Likewise.
5513 (DR_RW_WRITE): Likewise.
5514 (DR_RW_READ): Likewise.
5515 (DR_RW_IORW): Likewise.
5516 (DR_LEN_1): Likewise.
5517 (DR_LEN_2): Likewise.
5518 (DR_LEN_4): Likewise.
5519 (DR_LEN_8): Likewise.
5520 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5521 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5522 (DR_ENABLE_SIZE): Likewise.
5523 (DR_LOCAL_SLOWDOWN): Likewise.
5524 (DR_GLOBAL_SLOWDOWN): Likewise.
5525 (DR_CONTROL_RESERVED): Likewise.
5526 (I386_DR_CONTROL_MASK): Likewise.
5527 (I386_DR_VACANT): Likewise.
5528 (I386_DR_LOCAL_ENABLE): Likewise.
5529 (I386_DR_GLOBAL_ENABLE): Likewise.
5530 (I386_DR_DISABLE): Likewise.
5531 (I386_DR_SET_RW_LEN): Likewise.
5532 (I386_DR_GET_RW_LEN): Likewise.
5533 (I386_DR_WATCH_HIT): Likewise.
5534 (i386_wp_op_t): Likewise.
5535 (i386_show_dr): Likewise.
5536 (i386_length_and_rw_bits): Likewise.
5537 (i386_insert_aligned_watchpoint): Likewise.
5538 (i386_remove_aligned_watchpoint): Likewise.
5539 (i386_handle_nonaligned_watchpoint): Likewise.
5540 i386_update_inferior_debug_regs(): Likewise.
5541 (i386_dr_insert_watchpoint): Likewise.
5542 (i386_dr_remove_watchpoint): Likewise.
5543 (i386_dr_region_ok_for_watchpoint): Likewise.
5544 (i386_dr_stopped_data_address): Likewise.
5545 (i386_dr_stopped_by_watchpoint): Likewise.
5547 2014-06-19 Gary Benson <gbenson@redhat.com>
5549 * i386-low.c (i386_dr_show): Renamed to
5550 i386_show_dr and made static. All uses updated.
5551 (i386_dr_length_and_rw_bits): Renamed to
5552 i386_length_and_rw_bits and made static.
5554 (i386_dr_insert_aligned_watchpoint): Renamed to
5555 i386_insert_aligned_watchpoint and made static.
5557 (i386_dr_remove_aligned_watchpoint): Renamed to
5558 i386_remove_aligned_watchpoint and made static.
5560 (i386_dr_update_inferior_debug_regs): Renamed to
5561 i386_update_inferior_debug_regs and made static.
5564 2014-06-18 Gary Benson <gbenson@redhat.com>
5566 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5567 (i386_dr_low_can_set_control): Likewise.
5568 (i386_get_debug_register_length): Likewise.
5569 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5570 (i386_dr_low_can_set_control): Likewise.
5571 (i386_get_debug_register_length): Likewise.
5573 2014-06-17 Gary Benson <gbenson@redhat.com>
5575 * i386-low.h (i386-dregs.h): New include.
5576 (DR_FIRSTADDR): Now in i386-dregs.h.
5577 (DR_LASTADDR): Likewise.
5578 (DR_NADDR): Likewise.
5579 (DR_STATUS): Likewise.
5580 (DR_CONTROL): Likewise.
5581 (i386_debug_reg_state): Likewise.
5582 (i386_dr_insert_watchpoint): Likewise.
5583 (i386_dr_remove_watchpoint): Likewise.
5584 (i386_dr_region_ok_for_watchpoint): Likewise.
5585 (i386_dr_stopped_data_address): Likewise.
5586 (i386_dr_stopped_by_watchpoint): Likewise.
5587 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5589 2014-06-18 Gary Benson <gbenson@redhat.com>
5591 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5592 i386_dr_insert_watchpoint.
5593 (i386_low_remove_watchpoint): Renamed to
5594 i386_dr_remove_watchpoint.
5595 (i386_low_region_ok_for_watchpoint): Renamed to
5596 i386_dr_region_ok_for_watchpoint.
5597 (i386_low_stopped_data_address): Renamed to
5598 i386_dr_stopped_data_address.
5599 (i386_low_stopped_by_watchpoint): Renamed to
5600 i386_dr_stopped_by_watchpoint.
5601 * i386-low.c (i386_show_dr): Renamed to
5602 i386_dr_show and made nonstatic. All uses updated.
5603 (i386_length_and_rw_bits): Renamed to
5604 i386_dr_length_and_rw_bits and made nonstatic.
5606 (i386_insert_aligned_watchpoint): Renamed to
5607 i386_dr_insert_aligned_watchpoint and made nonstatic.
5609 (i386_remove_aligned_watchpoint): Renamed to
5610 i386_dr_remove_aligned_watchpoint and made nonstatic.
5612 (i386_update_inferior_debug_regs): Renamed to
5613 i386_dr_update_inferior_debug_regs and made nonstatic.
5615 (i386_low_insert_watchpoint): Renamed to
5616 i386_dr_insert_watchpoint. All uses updated.
5617 (i386_low_remove_watchpoint): Renamed to
5618 i386_dr_remove_watchpoint. All uses updated.
5619 (i386_low_region_ok_for_watchpoint): Renamed to
5620 i386_dr_region_ok_for_watchpoint. All uses updated.
5621 (i386_low_stopped_data_address): Renamed to
5622 i386_dr_stopped_data_address. All uses updated.
5623 (i386_low_stopped_by_watchpoint): Renamed to
5624 i386_dr_stopped_by_watchpoint. All uses updated.
5626 2014-06-18 Gary Benson <gbenson@redhat.com>
5628 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5629 (i386_dr_low_can_set_control): Likewise.
5630 (i386_insert_aligned_watchpoint): New check.
5632 2014-06-18 Gary Benson <gbenson@redhat.com>
5634 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5637 2014-06-18 Gary Benson <gbenson@redhat.com>
5639 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5640 instead of fatal and error.
5641 (i386_handle_nonaligned_watchpoint): Likewise.
5643 2014-06-18 Gary Benson <gbenson@redhat.com>
5645 * i386-low.c (i386_get_debug_register_length): New macro.
5646 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5647 (i386_show_dr): Use debug_printf instead of fprintf. Use
5648 phex to format values.
5650 2014-06-18 Gary Benson <gbenson@redhat.com>
5652 * i386-low.h: Comment changes.
5653 * i386-low.c: Likewise.
5655 2014-06-18 Gary Benson <gbenson@redhat.com>
5657 * i386-low.c: Whitespace changes.
5659 2014-06-12 Tom Tromey <tromey@redhat.com>
5661 * utils.c (freeargv): Remove.
5663 2014-06-12 Tom Tromey <tromey@redhat.com>
5665 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5666 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5667 (parse_debug_format_options): Likewise.
5668 (gdbserver_usage): Likewise.
5669 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5670 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5671 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5673 ($(LIBGNU)): Depend on libiberty.
5674 (all-lib): Recurse into all subdirs.
5675 (install-only): Invoke "install" target in subdirs.
5676 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5678 * configure: Rebuild.
5679 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5680 for vasprintf, vsnprintf, or gettimeofday.
5681 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5684 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5686 * development.sh: Delete.
5687 * Makefile.in (config.status): Adjust dependency on development.sh.
5688 * configure.ac: Adjust development.sh source call.
5689 * configure: Regenerate.
5691 2014-06-02 Pedro Alves <palves@redhat.com>
5693 * ax.c (gdb_free_agent_expr): New function.
5694 * ax.h (gdb_free_agent_expr): New declaration.
5695 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5697 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5699 (clear_breakpoint_conditions_and_commands): New function.
5700 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5701 (clear_breakpoint_conditions_and_commands): New declaration.
5703 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5705 * linux-aarch64-low.c (asm/ptrace.h): Include.
5707 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5709 Fix TLS access for -static -pthread.
5710 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5711 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5712 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5714 2014-05-20 Pedro Alves <palves@redhat.com>
5716 * linux-aarch64-low.c (aarch64_insert_point)
5717 (aarch64_remove_point): No longer check whether the type is
5718 supported here. Adjust to new interface.
5719 (the_low_target): Install aarch64_supports_z_point_type as
5720 supports_z_point_type method.
5721 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5722 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5723 instead of a Z packet char. Adjust.
5724 (arm_supports_z_point_type): New function.
5725 (arm_insert_point, arm_remove_point): Adjust to new interface.
5726 (the_low_target): Install arm_supports_z_point_type.
5727 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5728 (cris_insert_point, cris_remove_point): Adjust to new interface.
5729 Don't check whether the type is supported here.
5730 (the_low_target): Install cris_supports_z_point_type.
5731 * linux-low.c (linux_supports_z_point_type): New function.
5732 (linux_insert_point, linux_remove_point): Adjust to new interface.
5733 * linux-low.h (struct linux_target_ops) <insert_point,
5734 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5735 raw_breakpoint pointer parameter.
5736 <supports_z_point_type>: New method.
5737 * linux-mips-low.c (mips_supports_z_point_type): New function.
5738 (mips_insert_point, mips_remove_point): Adjust to new interface.
5739 Use mips_supports_z_point_type.
5740 (the_low_target): Install mips_supports_z_point_type.
5741 * linux-ppc-low.c (the_low_target): Install NULL as
5742 supports_z_point_type method.
5743 * linux-s390-low.c (the_low_target): Install NULL as
5744 supports_z_point_type method.
5745 * linux-sparc-low.c (the_low_target): Install NULL as
5746 supports_z_point_type method.
5747 * linux-x86-low.c (x86_supports_z_point_type): New function.
5748 (x86_insert_point): Adjust to new insert_point interface. Use
5749 insert_memory_breakpoint. Adjust to new
5750 i386_low_insert_watchpoint interface.
5751 (x86_remove_point): Adjust to remove_point interface. Use
5752 remove_memory_breakpoint. Adjust to new
5753 i386_low_remove_watchpoint interface.
5754 (the_low_target): Install x86_supports_z_point_type.
5755 * lynx-low.c (lynx_target_ops): Install NULL as
5756 supports_z_point_type callback.
5757 * nto-low.c (nto_supports_z_point_type): New.
5758 (nto_insert_point, nto_remove_point): Adjust to new interface.
5759 (nto_target_ops): Install nto_supports_z_point_type.
5760 * mem-break.c: Adjust intro comment.
5761 (struct raw_breakpoint) <raw_type, size>: New fields.
5762 <inserted>: Update comment.
5763 <shlib_disabled>: Delete field.
5764 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5765 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5766 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5767 (raw_bkpt_type_to_target_hw_bp_type): New function.
5768 (find_enabled_raw_code_breakpoint_at): New function.
5769 (find_raw_breakpoint_at): New type and size parameters. Use them.
5770 (insert_memory_breakpoint): New function, based off
5771 set_raw_breakpoint_at.
5772 (remove_memory_breakpoint): New function.
5773 (set_raw_breakpoint_at): Reimplement.
5774 (set_breakpoint): New, based on set_breakpoint_at.
5775 (set_breakpoint_at): Reimplement.
5776 (delete_raw_breakpoint): Go through the_target->remove_point
5777 instead of assuming memory breakpoints.
5778 (find_gdb_breakpoint_at): Delete.
5779 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5780 (find_gdb_breakpoint): New function.
5781 (set_gdb_breakpoint_at): Delete.
5782 (z_type_supported): New function.
5783 (set_gdb_breakpoint_1): New function, loosely based off
5784 set_gdb_breakpoint_at.
5785 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5786 (delete_gdb_breakpoint_at): Delete.
5787 (delete_gdb_breakpoint_1): New function, loosely based off
5788 delete_gdb_breakpoint_at.
5789 (delete_gdb_breakpoint): New function.
5790 (clear_gdb_breakpoint_conditions): Rename to ...
5791 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5793 (add_condition_to_breakpoint): Make static.
5794 (add_breakpoint_condition): Take a struct breakpoint pointer
5795 instead of an address. Adjust.
5796 (gdb_condition_true_at_breakpoint): Rename to ...
5797 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5799 (gdb_condition_true_at_breakpoint): Reimplement.
5800 (add_breakpoint_commands): Take a struct breakpoint pointer
5801 instead of an address. Adjust.
5802 (gdb_no_commands_at_breakpoint): Rename to ...
5803 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5804 parameter. Return true if no breakpoint was found. Change debug
5806 (gdb_no_commands_at_breakpoint): Reimplement.
5807 (run_breakpoint_commands): Rename to ...
5808 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5809 and change return type to boolean.
5810 (run_breakpoint_commands): New function.
5811 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5812 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5813 breakpoint. Go through the_target->remove_point instead of
5814 assuming memory breakpoint.
5815 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5816 software and hardware breakpoints.
5817 (reinsert_raw_breakpoint): Go through the_target->insert_point
5818 instead of assuming memory breakpoint.
5819 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5820 software and hardware breakpoints.
5821 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5822 Check both software and hardware breakpoints.
5823 (validate_inserted_breakpoint): Assert the breakpoint is a
5824 software breakpoint. Set the inserted flag to -1 instead of
5825 setting shlib_disabled.
5826 (delete_disabled_breakpoints): Adjust.
5827 (validate_breakpoints): Only validate software breakpoints.
5828 Adjust to inserted flag change.
5829 (check_mem_read, check_mem_write): Skip breakpoint types other
5830 than software breakpoints. Adjust to inserted flag change.
5831 * mem-break.h (enum raw_bkpt_type): New enum.
5832 (raw_breakpoint, struct process_info): Forward declare.
5833 (Z_packet_to_target_hw_bp_type): Delete declaration.
5834 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5835 (set_gdb_breakpoint, delete_gdb_breakpoint)
5836 (clear_breakpoint_conditions): New declarations.
5837 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5838 (breakpoint_inserted_here): Update comment.
5839 (add_breakpoint_condition, add_breakpoint_commands): Replace
5840 address parameter with a breakpoint pointer parameter.
5841 (gdb_breakpoint_here): Update comment.
5842 (delete_gdb_breakpoint_at): Delete.
5843 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5844 * server.c (process_point_options): Take a struct breakpoint
5845 pointer instead of an address. Adjust.
5846 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5847 delete_gdb_breakpoint.
5848 * spu-low.c (spu_target_ops): Install NULL as
5849 supports_z_point_type method.
5850 * target.h: Include mem-break.h.
5851 (struct target_ops) <prepare_to_access_memory>: Update comment.
5852 <supports_z_point_type>: New field.
5853 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5854 instead of a char. Also take a raw breakpoint pointer.
5855 * win32-arm-low.c (the_low_target): Install NULL as
5856 supports_z_point_type.
5857 * win32-i386-low.c (i386_supports_z_point_type): New function.
5858 (i386_insert_point, i386_remove_point): Adjust to new interface.
5859 (the_low_target): Install i386_supports_z_point_type.
5860 * win32-low.c (win32_supports_z_point_type): New function.
5861 (win32_insert_point, win32_remove_point): Adjust to new interface.
5862 (win32_target_ops): Install win32_supports_z_point_type.
5863 * win32-low.h (struct win32_target_ops):
5864 <supports_z_point_type>: New method.
5865 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5866 instead of a char. Also take a raw breakpoint pointer.
5868 2014-05-20 Pedro Alves <palves@redhat.com>
5870 * mem-break.h: Include break-common.h.
5871 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5872 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5873 (Z_packet_to_target_hw_bp_type): New declaration.
5874 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5875 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5876 (Z_PACKET_ACCESS_WP): Delete macros.
5877 (Z_packet_to_hw_type): Delete function.
5878 * i386-low.h: Don't include break-common.h here.
5879 (Z_packet_to_hw_type): Delete declaration.
5880 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5881 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5882 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5883 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5884 * linux-aarch64-low.c: Don't include break-common.h here.
5885 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5886 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5887 (Z_packet_to_target_hw_bp_type): Delete function.
5888 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5890 (mips_insert_point, mips_remove_point): Use
5891 Z_packet_to_target_hw_bp_type.
5893 2014-05-20 Pedro Alves <palves@redhat.com>
5895 * linux-aarch64-low.c: Include break-common.h.
5896 (enum target_point_type): Delete.
5897 (Z_packet_to_point_type): Rename to ...
5898 (Z_packet_to_target_hw_bp_type): ... this, and return a
5899 target_hw_bp_type instead.
5900 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5901 instead of an enum target_point_type.
5902 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5904 (aarch64_dr_state_insert_one_point)
5905 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5906 (aarch64_handle_aligned_watchpoint)
5907 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5908 Take an enum target_hw_bp_type instead of an enum
5910 (aarch64_supports_z_point_type): New function.
5911 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5912 use Z_packet_to_target_hw_bp_type.
5914 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5916 * configure.ac: Only use -Werror by default when DEVELOPMENT
5918 * configure: Regenerate.
5920 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5922 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5923 * linux-x86-low.c (X86_64_USER_REGS): New.
5924 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5926 2014-04-28 Yao Qi <yao@codesourcery.com>
5928 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5931 2014-04-25 Pedro Alves <palves@redhat.com>
5934 * linux-low.c (linux_attach_fail_reason_string): New function.
5935 (linux_attach_lwp): Delete.
5936 (linux_attach_lwp_1): Rename to ...
5937 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5938 argument. Remove "initial" parameter. Return int instead of
5939 void. Don't error or warn here.
5940 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5941 failure to attach to the tgid. Call warning when failing to
5943 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5944 argument. Remove "initial" parameter. Return int instead of
5945 void. Don't error or warn here.
5946 (linux_attach_fail_reason_string): New declaration.
5947 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5948 interface change. Use linux_attach_fail_reason_string.
5950 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5951 Walfred Tedeschi <walfred.tedeschi@intel.com>
5953 * Makefile.in: Added rules to handle new files
5954 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5955 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5956 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5957 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5958 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5959 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5961 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5962 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5963 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5964 i386/x32-avx512.xml.
5965 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5966 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5967 i386/x32-avx512-linux.xml.
5968 * i387-fp.c (num_avx512_k_registers): New constant for number
5970 (num_avx512_zmmh_low_registers): New constant for number of
5971 lower ZMM registers (0-15).
5972 (num_avx512_zmmh_high_registers): New constant for number of
5973 higher ZMM registers (16-31).
5974 (num_avx512_ymmh_registers): New contant for number of higher
5975 YMM registers (ymm16-31 added by avx521 on x86_64).
5976 (num_avx512_xmm_registers): New constant for number of higher
5977 XMM registers (xmm16-31 added by AVX512 on x86_64).
5978 (struct i387_xsave): Add space for AVX512 registers.
5979 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5980 Add code to handle AVX512 registers.
5981 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5982 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5983 prototypei from generated file.
5984 (tdesc_amd64_avx512_linux): Likewise.
5985 (init_registers_x32_avx512_linux): Likewise.
5986 (tdesc_x32_avx512_linux): Likewise.
5987 (init_registers_i386_avx512_linux): Likewise.
5988 (tdesc_i386_avx512_linux): Likewise.
5989 (x86_64_regmap): Add AVX512 registers.
5990 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5992 (initialize_low_arch): Add code to initialize AVX512 registers.
5994 2014-04-23 Pedro Alves <palves@redhat.com>
5996 * mem-break.c (find_gdb_breakpoint_at): Make static.
5997 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5999 2014-04-23 Pedro Alves <palves@redhat.com>
6001 * i386-low.c: Don't include break-common.h here.
6002 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6003 prototype to take target_hw_bp_type as argument instead of a Z
6005 * i386-low.h: Include break-common.h here.
6006 (Z_packet_to_hw_type): Declare.
6007 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6009 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6010 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6011 (x86_remove_point): Convert the packet number to a
6012 target_hw_bp_type before calling i386_low_remove_watchpoint.
6013 * win32-i386-low.c (i386_insert_point): Convert the packet number
6014 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6015 (i386_remove_point): Convert the packet number to a
6016 target_hw_bp_type before calling i386_low_remove_watchpoint.
6018 2014-04-23 Pedro Alves <palves@redhat.com>
6020 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6022 2014-04-10 Pedro Alves <palves@redhat.com>
6024 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6025 Check if the condition or command is NULL before checking if the
6026 breakpoint is known. On success, return true.
6027 * mem-break.h (add_breakpoint_condition): Document return.
6028 (add_breakpoint_commands): Add describing comment.
6029 * server.c (skip_to_semicolon): New function.
6030 (process_point_options): Use it.
6032 2014-04-09 Pedro Alves <palves@redhat.com>
6034 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6037 2014-02-27 Pedro Alves <palves@redhat.com>
6040 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6042 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6044 (last_thread_of_process_p): Take a PID argument instead of a
6046 (linux_wait_for_lwp): Delete.
6047 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6049 (linux_low_filter_event): New function, party factored out from
6050 linux_wait_for_event.
6051 (linux_wait_for_event): Rename to ...
6052 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6053 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6054 sigsuspend. Check for zombie leaders.
6055 (linux_wait_for_event): Reimplement as wrapper around
6056 linux_wait_for_event_filtered.
6057 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6058 a normal or signal exit is seen, it's the whole process exiting.
6059 (wait_for_sigstop): No longer a for_each_inferior callback.
6060 Rewrite on top of linux_wait_for_event_filtered.
6061 (stop_all_lwps): Call wait_for_sigstop directly.
6062 * server.c (resume, handle_target_event): Handle
6063 TARGET_WAITKIND_NO_RESUMED.
6065 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6067 * win32-low.c (psapi_get_dll_name,
6068 * win32_CreateToolhelp32Snapshot): Delete.
6069 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6070 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6072 (handle_load_dll): Add function description.
6073 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6075 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6077 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6079 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6080 base address when calling win32_add_one_solib.
6081 (handle_load_dll): Delete local variable load_addr.
6082 Remove 0x1000 offset applied to DLL base address when calling
6083 win32_add_one_solib.
6084 (handle_unload_dll): Add comment.
6086 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6088 * win32-low.c (win32_add_all_dlls): Renames
6089 win32_ensure_ntdll_loaded. Rewrite function documentation.
6090 Adjust implementation to always load all DLLs.
6091 Add 0x1000 offset to DLL base address when calling
6092 win32_add_one_solib.
6093 (child_initialization_done): New static global.
6094 (do_initial_child_stuff): Set child_initialization_done to
6095 zero during child initialization, and 1 after. Replace call
6096 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6098 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6099 (handle_unload_dll): Add function documentation.
6100 (get_child_debug_event): Ignore load and unload DLL events
6101 during child initialization.
6103 2014-02-20 Doug Evans <dje@google.com>
6105 Remove global all_lwps.
6106 * inferiors.h (ptid_of): Move here from linux-low.h.
6107 (pid_of, lwpid_of): Ditto.
6108 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6109 parameter is a struct thread_info * now.
6110 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6111 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6112 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6114 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6115 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6116 * linux-arm-low.c (update_registers_callback): Update, "entry"
6117 parameter is a struct thread_info * now.
6118 Fetch lwpid from current_inferior directly.
6119 (arm_insert_point): Pass &all_threads to find_inferior instead of
6121 (arm_remove_point): Ditto.
6122 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6123 (arm_prepare_to_resume): Fetch pid from thread.
6124 (arm_read_description): Fetch lwpid from current_inferior directly.
6125 * linux-low.c (all_lwps): Delete.
6126 (delete_lwp): Delete call to remove_inferior.
6127 (handle_extended_wait): Fetch lwpid from thread.
6128 (add_lwp): Don't set lwp->entry.id. Remove call to
6129 add_inferior_to_list.
6130 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6131 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6132 (kill_one_lwp_callback): Ditto.
6133 (linux_kill): Don't dereference NULL pointer.
6134 Fetch ptid,lwpid from thread.
6135 (get_detach_signal): Fetch ptid from thread.
6136 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6137 Simplify call to regcache_invalidate_thread.
6138 (delete_lwp_callback): Update, "entry" parameter is a
6139 struct thread_info * now. Fetch pid from thread.
6140 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6141 (status_pending_p_callback): Update, "entry" parameter is a
6142 struct thread_info * now. Fetch ptid from thread.
6143 (find_lwp_pid): Update, "entry" parameter is a
6144 struct thread_info * now.
6145 (linux_wait_for_lwp): Fetch pid from thread.
6146 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6147 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6148 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6149 (dequeue_one_deferred_signal): Ditto.
6150 (cancel_breakpoint): Fetch ptid from current_inferior.
6151 (linux_wait_for_event): Pass &all_threads to find_inferior,
6152 not &all_lwps. Fetch ptid, lwpid from thread.
6153 (count_events_callback): Update, "entry" parameter is a
6154 struct thread_info * now.
6155 (select_singlestep_lwp_callback): Ditto.
6156 (select_event_lwp_callback): Ditto.
6157 (cancel_breakpoints_callback): Ditto.
6158 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6160 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6161 (unsuspend_one_lwp): Update, "entry" parameter is a
6162 struct thread_info * now.
6163 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6165 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6166 Fetch lwpid from thread, not lwp.
6167 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6168 Pass &all_threads to find_inferior, not &all_lwps.
6169 (send_sigstop): Fetch lwpid from thread, not lwp.
6170 (send_sigstop_callback): Update, "entry" parameter is a
6171 struct thread_info * now.
6172 (suspend_and_send_sigstop_callback): Ditto.
6173 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6174 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6175 struct thread_info * now.
6176 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6178 (lwp_running): Update, "entry" parameter is a
6179 struct thread_info * now.
6180 (stop_all_lwps): Fetch ptid from thread.
6181 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6182 (linux_resume_one_lwp): Fetch lwpid from thread.
6183 (linux_set_resume_request): Update, "entry" parameter is a
6184 struct thread_info * now. Fetch pid, lwpid from thread.
6185 (resume_status_pending_p): Update, "entry" parameter is a
6186 struct thread_info * now.
6187 (need_step_over_p): Ditto. Fetch lwpid from thread.
6188 (start_step_over): Fetch lwpid from thread.
6189 (linux_resume_one_thread): Update, "entry" parameter is a
6190 struct thread_info * now. Fetch lwpid from thread.
6191 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6192 (proceed_one_lwp): Update, "entry" parameter is a
6193 struct thread_info * now. Fetch lwpid from thread.
6194 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6195 struct thread_info * now.
6196 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6197 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6198 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6200 (regsets_store_inferior_registers): Ditto.
6201 (fetch_register, store_register): Ditto.
6202 (linux_read_memory, linux_write_memory): Ditto.
6203 (linux_request_interrupt): Ditto.
6204 (linux_read_auxv): Ditto.
6205 (linux_xfer_siginfo): Ditto.
6206 (linux_qxfer_spu): Ditto.
6207 (linux_qxfer_libraries_svr4): Ditto.
6208 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6209 moved to inferiors.h.
6211 (get_thread_lwp): Update.
6212 (struct lwp_info): Delete member "entry". Simplify comment for
6215 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6216 current_inferior directly.
6217 (update_watch_registers_callback): Update, "entry" parameter is a
6218 struct thread_info * now. Fetch pid from thread.
6219 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6220 (mips_insert_point): Fetch lwpid from current_inferior.
6221 Pass &all_threads to find_inferior, not &all_lwps.
6222 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6223 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6225 (mips_stopped_data_address): Ditto.
6226 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6228 * linux-tile-low.c (tile_arch_setup): Ditto.
6229 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6230 (update_debug_registers_callback): Update, "entry" parameter is a
6231 struct thread_info * now. Fetch pid from thread.
6232 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6233 Pass &all_threads to find_inferior, not &all_lwps.
6234 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6235 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6236 Pass &all_threads to find_inferior, not &all_lwps.
6237 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6238 (i386_dr_low_get_status): Ditto.
6239 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6240 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6241 (x86_linux_read_description): Ditto.
6242 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6244 2014-02-20 Doug Evans <dje@google.com>
6246 * inferiors.c (get_first_inferior): Fix buglet.
6248 2014-02-19 Doug Evans <dje@google.com>
6250 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6251 * inferiors.c (add_thread): Change result type to struct thread_info *.
6252 All callers updated.
6253 (add_lwp): Call add_thread here instead of in callers.
6254 All callers updated.
6255 * linux-low.h (get_lwp_thread): Rewrite.
6256 (struct lwp_info): New member "thread".
6258 2014-02-19 Doug Evans <dje@google.com>
6260 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6261 All callers updated.
6263 2014-02-19 Doug Evans <dje@google.com>
6265 * inferiors.c (add_thread): Fix whitespace.
6267 2014-02-19 Doug Evans <dje@google.com>
6269 * dll.c (clear_dlls): Replace accessing list implemention details
6271 * gdbthread.h (get_first_thread): Declare.
6272 * inferiors.c (for_each_inferior_with_data): New function.
6273 (get_first_thread): New function.
6274 (find_thread_ptid): Simplify.
6275 (get_first_inferior): New function.
6276 (clear_list): Delete.
6277 (one_inferior_p): New function.
6278 (clear_inferior_list): New function.
6279 (clear_inferiors): Update.
6280 * inferiors.h (for_each_inferior_with_data): Declare.
6281 (clear_inferior_list): Declare.
6282 (one_inferior_p): Declare.
6283 (get_first_inferior): Declare.
6284 * linux-low.c (linux_wait_for_event): Replace accessing list
6285 implemention details with API function.
6286 * server.c (target_running): Ditto.
6287 (accumulate_file_name_length): New function.
6288 (emit_dll_description): New function.
6289 (handle_qxfer_libraries): Replace accessing list implemention
6290 details with API function.
6291 (handle_qxfer_threads_worker): New function.
6292 (handle_qxfer_threads_proper): Replace accessing list implemention
6293 details with API function.
6294 (handle_query): Ditto.
6295 (visit_actioned_threads_callback_ftype): New typedef.
6296 (visit_actioned_threads_data): New struct.
6297 (visit_actioned_threads): Rewrite to be find_inferior callback.
6298 (resume): Call find_inferior.
6299 (handle_status): Replace accessing list implemention
6300 details with API function.
6301 (process_serial_event): Replace accessing list implemention details
6303 * target.c (set_desired_inferior): Replace accessing list implemention
6304 details with API function.
6305 * tracepoint.c (same_process_p): New function.
6306 (gdb_agent_about_to_close): Replace accessing list implemention
6307 details with API function.
6308 * win32-low.c (child_delete_thread): Replace accessing list
6309 implemention details with API function.
6310 (match_dll_by_basename): New function.
6311 (dll_is_loaded_by_basename): New function.
6312 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6313 details call to dll_is_loaded_by_basename.
6315 2014-02-19 Doug Evans <dje@google.com>
6317 * dll.h (struct dll_info): Add comment.
6318 * gdbthread.h (struct thread_info): Add comment.
6319 (current_ptid): Simplify.
6320 * inferiors.c (add_process): Update.
6321 (remove_process): Update.
6322 * inferiors.h (struct process_info): Rename member "head" to "entry".
6323 * linux-low.c (delete_lwp): Update.
6325 (last_thread_of_process_p): Update.
6326 (kill_one_lwp_callback, linux_kill): Update.
6327 (status_pending_p_callback): Update.
6328 (wait_for_sigstop): Update. Simplify read of ptid.
6329 (start_step_over): Update.
6330 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6331 (get_lwp_thread): Update.
6332 (struct lwp_info): Rename member "head" to "entry".
6333 * regcache.h (inferior_list_entry): Delete.
6334 * server.c (kill_inferior_callback): Update.
6335 (detach_or_kill_inferior_callback): Update.
6336 (print_started_pid): Update.
6337 (print_attached_pid): Update.
6338 (process_serial_event): Simplify read of ptid.
6339 * thread-db.c (thread_db_create_event): Update.
6340 (thread_db_get_tls_address): Update.
6341 * win32-low.c (current_inferior_ptid): Simplify.
6343 2014-02-19 Tom Tromey <tromey@redhat.com>
6345 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6347 (target_supports_btrace): Update.
6349 2014-02-14 Yao Qi <yao@codesourcery.com>
6351 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6352 (rsp-low-ipa.o): New target.
6354 2014-02-12 Tom Tromey <tromey@redhat.com>
6356 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6357 convert_ascii_to_int.
6358 * regcache.c (registers_to_string): Likewise.
6359 * remote-utils.c (decode_M_packet): Likewise.
6360 * server.c (process_serial_event): Likewise.
6362 2014-02-12 Tom Tromey <tromey@redhat.com>
6364 * server.c (handle_query, handle_v_run): Use hex2bin, not
6366 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6368 2014-02-12 Tom Tromey <tromey@redhat.com>
6370 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6371 convert_int_to_ascii.
6372 * regcache.c (registers_to_string, collect_register_as_string):
6374 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6376 * server.c (process_serial_event): Likewise.
6377 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6378 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6380 2014-02-12 Tom Tromey <tromey@redhat.com>
6382 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6383 bin2hex, not hexify.
6384 * tracepoint.c (cmd_qtstatus): Likewise.
6386 2014-02-12 Tom Tromey <tromey@redhat.com>
6388 * remote-utils.c (monitor_output): Pass explicit length to
6391 2014-02-12 Tom Tromey <tromey@redhat.com>
6393 * tracepoint.c: Include rsp-low.h.
6394 * server.c: Include rsp-low.h.
6395 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6396 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6398 * remote-utils.c: Include rsp-low.h.
6399 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6400 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6401 (convert_int_to_ascii, convert_ascii_to_int): Move to
6403 * regcache.c: Include rsp-low.h.
6404 * ax.c: Include rsp-low.h.
6405 * Makefile.in (SFILES): Add common/rsp-low.c.
6406 (OBS): Add rsp-low.o.
6407 (rsp-low.o): New target.
6409 2014-02-12 Tom Tromey <tromey@redhat.com>
6411 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6412 Include print-utils.h.
6413 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6414 (plongest, thirty_two, phex_nz): Remove.
6415 * Makefile.in (SFILES): Add common/print-utils.c.
6416 (OBS): Add print-utils.o.
6417 (print-utils-ipa.o): New target.
6418 (print-utils.o): New target.
6419 (IPA_OBJS): Add print-utils-ipa.o.
6421 2014-02-06 Tom Tromey <tromey@redhat.com>
6423 * Makefile.in (SFILES): Fix indentation.
6425 2014-02-05 Doug Evans <dje@google.com>
6427 * linux-low.c (linux_wait_for_event): Improve comment.
6428 (linux_wait_1): Keep current_inferior in sync with event_child.
6430 2014-01-22 Doug Evans <dje@google.com>
6432 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6434 2014-01-22 Doug Evans <dje@google.com>
6436 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6437 * configure: Regenerate.
6438 * config.in: Regenerate.
6439 * Makefile.in (SFILES): Add debug.c.
6441 * debug.c: New file.
6442 * debug.h: New file.
6443 * linux-aarch64-low.c (*): Update all debugging printfs to use
6444 debug_printf instead of fprintf.
6445 * linux-arm-low.c (*): Ditto.
6446 * linux-cris-low.c (*): Ditto.
6447 * linux-crisv32-low.c (*): Ditto.
6448 * linux-m32r-low.c (*): Ditto.
6449 * linux-sparc-low.c (*): Ditto.
6450 * linux-x86.c (*): Ditto.
6451 * linux-low.c (*): Ditto.
6452 (linux_wait_1): Add calls to debug_enter, debug_exit.
6453 (linux_wait): Remove redundant debugging printf.
6454 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6455 (linux_resume, unstop_all_lwps): Ditto.
6456 * mem-break.c (*): Update all debugging printfs to use
6457 debug_printf instead of fprintf.
6458 * remote-utils.c (*): Ditto.
6459 * thread-db.c (*): Ditto.
6460 * server.c #include <ctype.h>, "gdb_vecs.h".
6461 (debug_threads): Moved to debug.c.
6462 (*): Update all debugging printfs to use debug_printf instead of
6464 (start_inferior): Replace call to fflush with call to debug_flush.
6465 (monitor_show_help): Mention set debug-format.
6466 (parse_debug_format_options): New function.
6467 (handle_monitor_command): Handle "monitor set debug-format".
6468 (gdbserver_usage): Mention --debug-format.
6469 (main): Parse --debug-format.
6470 * server.h (debug_threads): Declaration moved to debug.h.
6472 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6473 trace_debug_1 that uses debug_printf.
6474 (tracepoint_look_up_symbols): Update all debugging printfs to use
6475 debug_printf instead of fprintf.
6477 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6479 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6482 2014-01-17 Pedro Alves <palves@redhat.com>
6485 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6486 defined after including gdb_proc_service.h.
6488 2014-01-16 Doug Evans <dje@google.com>
6490 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6491 (match_dll): Use it.
6493 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6495 * target.h (target_ops) <read_btrace>: Change parameters and
6496 return type to allow error reporting.
6497 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6498 trace reading errors on.
6499 * linux-low.c (linux_low_read_btrace): Pass trace reading
6501 (linux_low_disable_btrace): New.
6503 2014-01-15 Doug Evans <dje@google.com>
6505 * inferiors.c (thread_id_to_gdb_id): Delete.
6506 * inferiors.h (thread_id_to_gdb_id): Delete.
6508 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6510 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6511 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6514 2014-01-08 Pedro Alves <palves@redhat.com>
6516 * server.c (handle_status): Don't discard previous queued stop
6517 replies or thread's pending status here.
6518 (main) <disconnection>: Do it here instead.
6520 2014-01-08 Pedro Alves <palves@redhat.com>
6522 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6523 * server.c (visit_actioned_threads, handle_pending_status): New
6525 (handle_v_cont): Factor out parts to ...
6526 (resume): ... this new function. If in all-stop, and a thread
6527 being resumed has a pending status, report it without actually
6529 (myresume): Adjust to use the new 'resume' function.
6530 (clear_pending_status_callback, set_pending_status_callback)
6531 (find_status_pending_thread_callback): New functions.
6532 (handle_status): Handle the case of multiple threads having
6533 interesting statuses to report. Report threads' real last signal
6534 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6535 with an interesting thread to report the status for, instead of
6536 always reporting the status of the first thread.
6538 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6540 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6541 * gdbreplay.c (gdbreplay_version): Likewise.
6543 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6545 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6546 iov.iov_len with the real length in use.
6548 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6550 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6551 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6552 for all targets that use win32-low.c.
6553 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6554 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6556 2013-12-13 Pedro Alves <palves@redhat.com>
6558 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6559 if equal to TARGET_WAITKIND_LOADED.
6560 * win32-low.c (cached_status): New static global.
6561 (win32_wait): Add declaration.
6562 (do_initial_child_stuff): Flush all initial pending debug events
6563 up to the initial breakpoint.
6564 (win32_wait): If CACHED_STATUS was set, return that instead
6565 of doing a real wait. Remove the code resuming the execution
6566 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6567 during the initial phase. Also remove the code changing
6568 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6569 TARGET_WAITKIND_STOPPED.
6571 2013-12-11 Yao Qi <yao@codesourcery.com>
6573 * notif.c (handle_notif_ack): Return 0 if no notification
6576 2013-11-20 Doug Evans <dje@google.com>
6578 * linux-low.c (linux_set_resume_request): Fix comment.
6580 2013-11-20 Doug Evans <dje@google.com>
6582 * linux-low.c (resume_status_pending_p): Tweak comment.
6584 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6586 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6587 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6588 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6589 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6590 (srv_amd64_regobj): Add amd64-mpx.o.
6591 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6592 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6593 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6594 * i387-fp.c (num_pl_bnd_register) Added constant.
6595 (num_pl_bnd_cfg_registers) Added constant.
6596 (struct i387_xsave) Added reserved area and MPX fields.
6597 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6598 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6600 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6601 (init_registers_amd64_mpx_linux): Declare new function.
6602 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6603 (x86_64_regmap): Add MPX registers.
6604 (x86_linux_read_description): Add MPX case.
6605 (initialize_low_arch): Initialize MPX targets.
6607 2013-11-18 Tom Tromey <tromey@redhat.com>
6609 * configure: Rebuild.
6610 * configure.ac: Don't check for stdlib.h.
6611 * gdbreplay.c: Unconditionally include stdlib.h.
6613 2013-11-18 Tom Tromey <tromey@redhat.com>
6615 * config.in: Rebuild.
6616 * configure: Rebuild.
6617 * configure.ac: Don't use AC_HEADER_DIRENT.
6619 2013-11-18 Tom Tromey <tromey@redhat.com>
6621 * server.h: Don't check HAVE_STRING_H.
6622 * gdbreplay.c: Don't check HAVE_STRING_H.
6623 * configure: Rebuild.
6625 2013-11-18 Tom Tromey <tromey@redhat.com>
6627 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6630 2013-11-08 Tom Tromey <tromey@redhat.com>
6632 * configure, config.in: Rebuild.
6633 * configure.ac: Remove unused configury.
6635 2013-11-08 Tom Tromey <tromey@redhat.com>
6637 * acinclude.m4: Include common.m4, codeset.m4.
6638 * configure, config.in: Rebuild.
6639 * configure.ac: Use GDB_AC_COMMON.
6641 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6643 * linux-s390-low.c (HWCAP_S390_TE): New define.
6644 (s390_arch_setup): Consider the TE field in the HWCAP for
6645 determining 'have_regset_tdb'.
6647 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6650 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6653 2013-10-02 Pedro Alves <palves@redhat.com>
6655 * server.c (process_serial_event): Don't output "GDBserver
6656 exiting" if GDB is connected through stdio.
6657 * target.c (mywait): Likewise, be silent if GDB is connected
6660 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6662 * lynx-low.c (lynx_add_threads_after_attach): New function.
6663 (lynx_attach): Remove call to add_thread. Add call to
6664 lynx_add_threads_after_attach instead.
6666 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6668 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6669 * config.in, configure: Regenerated.
6671 2013-09-18 Yao Qi <yao@codesourcery.com>
6674 * server.c (start_inferior): Clear 'resume_info'.
6676 2013-09-16 Jiong Wang <jiwang@tilera.com>
6678 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6681 2013-09-16 Jiong Wang <jiwang@tilera.com>
6683 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6684 linux-tile-low.o to srv_tgtobj.
6686 2013-09-16 Will Newton <will.newton@linaro.org>
6688 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6691 2013-09-06 Pedro Alves <palves@redhat.com>
6693 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6694 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6695 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6696 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6697 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6698 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6700 2013-09-06 Pedro Alves <palves@redhat.com>
6702 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6703 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6705 2013-09-06 Pedro Alves <palves@redhat.com>
6707 * linux-amd64-ipa.c: Include tracepoint.h.
6708 * linux-i386-ipa.c: Include tracepoint.h.
6710 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6712 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6713 (ps_get_thread_area): New function.
6715 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6717 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6718 (initialize_low_arch): Call init_registers_crisv32 rather than
6719 init_register_crisv32.
6721 2013-09-05 Pedro Alves <palves@redhat.com>
6723 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6725 * hostio.h: ... this new file.
6726 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6727 win32-low.c: Include hostio.h.
6729 2013-09-05 Pedro Alves <palves@redhat.com>
6731 * server.h (gdb_client_data, handler_func, callback_handler_func)
6732 (delete_file_handler, add_file_handler, append_callback_event)
6733 (delete_callback_event, start_event_loop, initialize_event_loop):
6734 Move to event-loop.h and include it.
6735 * event-loop.h: New file.
6737 2013-09-05 Pedro Alves <palves@redhat.com>
6739 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6740 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6741 (loaded_dll, unloaded_dll): Move to ...
6742 * dll.h: ... this new file.
6743 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6745 2013-09-05 Pedro Alves <palves@redhat.com>
6747 * server.h (current_process, get_thread_process, all_processes)
6748 (add_inferior_to_list, for_each_inferior, current_inferior)
6749 (remove_inferior, add_process, remove_process, find_process_pid)
6750 (have_started_inferiors_p, have_attached_inferiors_p)
6751 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6752 (clear_inferiors, find_inferior, find_inferior_id)
6753 (inferior_target_data, set_inferior_target_data)
6754 (inferior_regcache_data, set_inferior_regcache_data): Move to
6755 inferiors.h, and include it.
6756 * inferiors.h: New file.
6758 2013-09-05 Pedro Alves <palves@redhat.com>
6760 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6764 2013-09-05 Pedro Alves <palves@redhat.com>
6766 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6768 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6769 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6770 (handle_tracepoint_general_set, handle_tracepoint_query)
6771 (tracepoint_finished_step, tracepoint_was_hit)
6772 (release_while_stepping_state_list, current_traceframe)
6773 (in_readonly_region, traceframe_read_mem)
6774 (fetch_traceframe_registers, traceframe_read_sdata)
6775 (traceframe_read_info, struct fast_tpoint_collect_status)
6776 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6777 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6778 (supply_fast_tracepoint_registers)
6779 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6780 (ipa_tdesc, claim_trampoline_space)
6781 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6782 (agent_mem_read, agent_get_trace_state_variable_value)
6783 (agent_set_trace_state_variable_value, agent_tsv_read)
6784 (agent_mem_read_string, get_raw_reg_func_addr)
6785 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6786 * tracepoint.h: ... this new file.
6788 2013-09-05 Pedro Alves <palves@redhat.com>
6790 * server.h (perror_with_name, error, fatal, warning, paddress)
6791 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6793 * utils.h: New file.
6795 2013-09-05 Pedro Alves <palves@redhat.com>
6797 * server.h (remote_debug, noack_mode, transport_is_reliable)
6798 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6799 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6800 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6801 (write_enn, initialize_async_io, enable_async_io)
6802 (disable_async_io, check_remote_input_interrupt_request)
6803 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6804 (dead_thread_notify, prepare_resume_reply)
6805 (decode_address_to_semicolon, decode_address, decode_m_packet)
6806 (decode_M_packet, decode_X_packet, decode_xfer_write)
6807 (decode_search_memory_packet, unhexify, hexify)
6808 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6809 (look_up_one_symbol, relocate_instruction)
6810 (monitor_output): Move to remote-utils.h, and include it.
6811 * remote-utils.h: New file.
6813 2013-09-05 Pedro Alves <palves@redhat.com>
6815 * server.h (_): Delete.
6817 2013-09-02 Pedro Alves <palves@redhat.com>
6819 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6820 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6822 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6824 2013-09-02 Pierre Muller <muller@sourceware.org>
6826 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6827 or WriteProcessMemory complete successfully and handle
6828 ERROR_PARTIAL_COPY error.
6830 2013-09-02 Pedro Alves <palves@redhat.com>
6832 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6833 error instead of EIO.
6835 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6838 * linux-low.c: Include filestuff.h.
6839 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6840 * lynx-low.c: Include filestuff.h.
6841 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6842 * server.c: Include filestuff.h.
6843 (main): Call notice_open_fds.
6844 * spu-low.c: Include filestuff.h.
6845 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6847 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6849 * Makefile.in: Explain why ../target and ../nat are not
6850 listed as include file search paths.
6851 (linux-waitpid.o): New object file rule.
6852 * configure.srv (srv_native_linux_obj): New variable.
6853 Replace all occurrences of linux native object files with
6854 $srv_native_linux_obj.
6855 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6856 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6857 (linux_enable_event_reporting): Remove declaration.
6858 (my_waitpid): Moved to common/linux-waitpid.c.
6859 (linux_wait_for_event): Pass ptid when calling
6860 linux_enable_event_reporting.
6861 (linux_supports_tracefork_flag): Remove.
6862 (linux_enable_event_reporting): Likewise.
6863 (linux_tracefork_grandchild): Remove.
6864 (STACK_SIZE): Moved to common/linux-ptrace.c.
6865 (linux_tracefork_child): Remove.
6866 (linux_test_for_tracefork): Remove.
6867 (linux_look_up_symbols): Call linux_supports_traceclone.
6868 (initialize_low): Remove call to linux_test_for_tracefork.
6869 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6870 common/linux-ptrace.h.
6871 (PTRACE_TYPE_ARG4): Likewise.
6872 Include linux-ptrace.h.
6874 2013-08-21 Pedro Alves <palves@redhat.com>
6876 * config.in: Renegerate.
6878 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6880 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6881 (SFILES): Remove $(srcdir)/common/target-common.c and
6882 add $(srcdir)/target/waitstatus.c.
6883 (OBS): Remove target-common.o and add waitstatus.o.
6884 (server_h): Remove $(srcdir)/../common/target-common.h and
6885 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6886 and $(srcdir)/../target/waitstatus.h.
6887 (target-common.o): Remove.
6888 (waitstatus.o): New target object file.
6889 * target.h: Do not include target-common.h and
6890 include target/resume.h, target/wait.h and
6891 target/waitstatus.h.
6893 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6895 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6896 to PTRACE_TYPE_ARG3.
6897 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6898 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6900 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6901 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6903 2013-07-27 Jie Zhang <jie@codesourcery.com>
6904 Daniel Jacobowitz <dan@codesourcery.com>
6905 Yao Qi <yao@codesourcery.com>
6907 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6908 (mips-linux-watch.o): New rule.
6909 (mips_linux_watch_h): New variable.
6910 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6912 * linux-mips-low.c: Include mips-linux-watch.h.
6913 (struct arch_process_info, struct arch_lwp_info): New.
6914 (update_watch_registers_callback): New function.
6915 (mips_linux_new_process, mips_linux_new_thread) New functions.
6916 (mips_linux_prepare_to_resume, mips_insert_point): New
6918 (mips_remove_point, mips_stopped_by_watchpoint): New
6920 (rsp_bp_type_to_target_hw_bp_type): New function.
6921 (mips_stopped_data_address): New function.
6922 (the_low_target): Add watchpoint support functions.
6924 2013-07-27 Yao Qi <yao@codesourcery.com>
6926 * i386-low.c: Include break-common.h.
6927 (enum target_hw_bp_type): Remove.
6929 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6931 * Makefile.in (SFILES): /common/target-common.c.
6932 (OBS): Add target-common.o.
6933 (server_h): Add $(srcdir)/../common/target-common.h.
6934 (target-common.o): New target.
6935 * server.c (queue_stop_reply_callback): Free
6936 status string after use.
6937 * target.c (target_waitstatus_to_string): Remove.
6938 * target.h: Include target-common.h.
6939 (resume_kind): Likewise.
6940 (target_waitkind): Likewise.
6941 (target_waitstatus): Likewise.
6942 (TARGET_WNOHANG): Likewise.
6944 2013-07-04 Yao Qi <yao@codesourcery.com>
6946 * Makefile.in (host_alias): Use @host_noncanonical@.
6947 (target_alias): Use @target_noncanonical@.
6948 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6949 ACX_NONCANONICAL_HOST.
6950 * configure: Regenerated.
6953 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6955 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6956 * configure: Rebuild.
6957 * Makefile.in (version_host, version_target): Get from configure.
6958 (version.c): Use $(version_host) and $(version_target).
6960 2013-07-03 Pedro Alves <palves@redhat.com>
6962 * Makefile.in (config.status): Depend on development.sh.
6963 * acinclude.m4: Include libmcheck.m4.
6964 * configure: Regenerate.
6966 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6968 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6969 attribute inside the parentheses.
6970 (winapi_DebugSetProcessKillOnExit): Ditto.
6971 (winapi_DebugBreakProcess): Ditto.
6972 (winapi_GenerateConsoleCtrlEvent): Ditto.
6974 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6976 * notif.h (notif_event): Add a dummy member to avoid compiler
6979 2013-07-01 Pedro Alves <palves@redhat.com>
6981 * hostio.c (HOSTIO_PATH_MAX): Define.
6982 (require_filename, handle_open, handle_unlink, handle_readlink):
6985 2013-07-01 Pedro Alves <palves@redhat.com>
6987 * server.h: Include "pathmax.h".
6988 * linux-low.c: Don't include sys/param.h.
6989 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6991 * win32-low.c: Don't include sys/param.h.
6992 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6994 2013-07-01 Pedro Alves <palves@redhat.com>
6996 * event-loop.c: Don't check HAVE_UNISTD_H before including
6998 * gdbreplay.c: Likewise.
6999 * remote-utils.c: Likewise.
7000 * server.c: Likewise.
7001 * configure.ac: Don't check for unistd.h.
7002 * configure: Regenerate.
7004 2013-06-28 Tom Tromey <tromey@redhat.com>
7006 * Makefile.in (version.c): Use version.in, not
7009 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7011 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7012 * configure: Rebuild.
7013 * Makefile.in (version_host, version_target): Get from configure.
7014 (version.c): Use $(version_host) and $(version_target).
7016 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7018 Fix trace-status to output user name without trailing colon.
7019 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7021 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7023 Fix trace-status to output proper start-time and stop-time.
7024 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7025 output start time and stop time in hex as gdb expects.
7027 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7029 * tracepoint.c (build_traceframe_info_xml): Output trace state
7030 variables present in the trace buffer.
7032 2013-06-24 Tom Tromey <tromey@redhat.com>
7034 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7036 (version.o): Remove.
7037 * gdbreplay.c: Include version.h.
7038 (version, host_name): Don't declare.
7039 * server.h: Include version.h.
7040 (version, host_name): Don't declare.
7042 2013-06-12 Pedro Alves <palves@redhat.com>
7044 * linux-x86-low.c (linux_is_elf64): Delete global.
7045 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7046 with local linux_pid_exe_is_elf_64_file use.
7048 2013-06-11 Pedro Alves <palves@redhat.com>
7050 * linux-low.c (regset_disabled, disable_regset): New functions.
7051 (regsets_fetch_inferior_registers)
7052 (regsets_store_inferior_registers): Use them.
7053 (initialize_regsets_info); Don't allocate the disabled_regsets
7055 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7058 2013-06-11 Pedro Alves <palves@redhat.com>
7060 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7063 2013-06-11 Pedro Alves <palves@redhat.com>
7065 * linux-x86-low.c (initialize_low_arch): Call
7066 init_registers_x32_avx_linux.
7068 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7070 Fix compatibility with Android Bionic.
7071 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7074 2013-06-07 Pedro Alves <palves@redhat.com>
7077 * Makefile.in (OBS): Add tdesc.o.
7078 (IPA_OBJS): Add tdesc-ipa.o.
7079 (tdesc-ipa.o): New rule.
7080 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7082 * linux-low.c (new_inferior): Delete.
7083 (disabled_regsets, num_regsets): Delete.
7084 (linux_add_process): Adjust to set the new per-process
7086 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7087 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7088 was a stop. When calling arch_setup, switch the current inferior
7089 to the thread that got an event.
7090 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7091 (regsets_fetch_inferior_registers)
7092 (regsets_store_inferior_registers): New regsets_info parameter.
7094 (linux_register_in_regsets): New regs_info parameter. Adjust to
7096 (register_addr, fetch_register, store_register): New usrregs_info
7097 parameter. Adjust to use it.
7098 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7099 parameter regs_info. Adjust to use it.
7100 (linux_fetch_registers): Get the current inferior's regs_info, and
7102 (linux_store_registers): Ditto.
7103 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7104 (initialize_low): Don't initialize the target_regsets here. Call
7105 initialize_low_arch.
7106 * linux-low.h (target_regsets): Delete declaration.
7107 (struct regsets_info): New.
7108 (struct usrregs_info): New.
7109 (struct regs_info): New.
7110 (struct process_info_private) <new_inferior>: New field.
7111 (struct linux_target_ops): Delete the num_regs, regmap, and
7112 regset_bitmap fields. New field regs_info.
7113 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7114 * i387-fp.c (num_xmm_registers): Delete.
7115 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7116 calls to new interface.
7117 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7118 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7119 Infer the number of xmm registers from the regcache's target
7121 * i387-fp.h (num_xmm_registers): Delete.
7122 * inferiors.c (add_thread): Don't install the thread's regcache
7124 * proc-service.c (gregset_info): Fetch the current inferior's
7125 regs_info. Adjust to use it.
7126 * regcache.c: Include tdesc.h.
7127 (register_bytes, reg_defs, num_registers)
7128 (gdbserver_expedite_regs): Delete.
7129 (get_thread_regcache): If the thread doesn't have a regcache yet,
7130 create one, instead of aborting gdbserver.
7131 (regcache_invalidate_one): Rename to ...
7132 (regcache_invalidate_thread): ... this.
7133 (regcache_invalidate_one): New.
7134 (regcache_invalidate): Only invalidate registers of the current
7136 (init_register_cache): Add target_desc parameter, and use it.
7137 (new_register_cache): Ditto. Assert the target description has a
7138 non zero registers_size.
7139 (regcache_cpy): Add assertions. Adjust.
7140 (realloc_register_cache, set_register_cache): Delete.
7141 (registers_to_string, registers_from_string): Adjust.
7142 (find_register_by_name, find_regno, find_register_by_number)
7143 (register_cache_size): Add target_desc parameter, and use it.
7144 (free_register_cache_thread, free_register_cache_thread_one)
7145 (regcache_release, register_cache_size): New.
7146 (register_size): Add target_desc parameter, and use it.
7147 (register_data, supply_register, supply_register_zeroed)
7148 (supply_regblock, supply_register_by_name, collect_register)
7149 (collect_register_as_string, collect_register_by_name): Adjust.
7150 * regcache.h (struct target_desc): Forward declare.
7151 (struct regcache) <tdesc>: New field.
7152 (init_register_cache, new_register_cache): Add target_desc
7154 (regcache_invalidate_thread): Declare.
7155 (regcache_invalidate_one): Delete declaration.
7156 (regcache_release): Declare.
7157 (find_register_by_number, register_cache_size, register_size)
7158 (find_regno): Add target_desc parameter.
7159 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7161 * remote-utils.c: Include tdesc.h.
7162 (outreg, prepare_resume_reply): Adjust.
7163 * server.c: Include tdesc.h.
7164 (gdbserver_xmltarget): Delete declaration.
7165 (get_features_xml, process_serial_event): Adjust.
7166 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7168 (struct process_info) <tdesc>: New field.
7169 (ipa_tdesc): Declare.
7170 * tdesc.c: New file.
7171 * tdesc.h: New file.
7172 * tracepoint.c: Include tdesc.h.
7173 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7174 (get_context_regcache): Adjust to pass ipa_tdesc down.
7175 (do_action_at_tracepoint): Adjust to get the register cache size
7176 from the context regcache's description.
7177 (traceframe_walk_blocks): Adjust to get the register cache size
7178 from the current trace frame's description.
7179 (traceframe_get_pc): Adjust to get current trace frame's
7180 description and pass it down.
7181 (gdb_collect): Adjust to get the register cache size from the
7183 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7184 (gdbserver_xmltarget): Delete.
7185 (initialize_low_tracepoint): Set the ipa's target description.
7186 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7187 (initialize_low_tracepoint): Set the ipa's target description.
7188 * linux-x86-low.c: Include tdesc.h.
7189 [__x86_64__] (is_64bit_tdesc): New.
7190 (ps_get_thread_area, x86_get_thread_area): Use it.
7191 (i386_cannot_store_register): Rename to ...
7192 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7193 (i386_cannot_fetch_register): Rename to ...
7194 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7195 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7197 (target_regsets): Rename to ...
7198 (x86_regsets): ... this.
7199 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7201 (x86_siginfo_fixup): Use is_64bit_tdesc.
7202 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7203 (tdesc_x32_avx_linux, tdesc_x32_linux)
7204 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7206 (x86_linux_update_xmltarget): Delete.
7207 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7208 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7209 (AMD64_LINUX_USER64_CS): New.
7210 (x86_linux_read_description): New, based on
7211 x86_linux_update_xmltarget.
7212 (same_process_callback): New.
7213 (x86_arch_setup_process_callback): New.
7214 (x86_linux_update_xmltarget): New.
7215 (x86_regsets_info): New.
7216 (amd64_linux_regs_info): New.
7217 (i386_linux_usrregs_info): New.
7218 (i386_linux_regs_info): New.
7219 (x86_linux_regs_info): New.
7220 (x86_arch_setup): Reimplement.
7221 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7222 (x86_emit_ops): Ditto.
7223 (the_low_target): Adjust. Install x86_linux_regs_info,
7224 x86_cannot_fetch_register, and x86_cannot_store_register.
7225 (initialize_low_arch): New.
7226 * linux-ia64-low.c (tdesc_ia64): Declare.
7227 (ia64_fetch_register): Adjust.
7228 (ia64_usrregs_info, regs_info): New globals.
7229 (ia64_regs_info): New function.
7230 (the_low_target): Adjust.
7231 (initialize_low_arch): New function.
7232 * linux-sparc-low.c (tdesc_sparc64): Declare.
7233 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7235 (sparc_arch_setup): New function.
7236 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7237 (the_low_target): Adjust.
7238 (initialize_low_arch): New function.
7239 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7240 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7241 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7242 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7243 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7244 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7245 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7246 (tdesc_powerpc_isa205_vsx64l): Declare.
7247 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7248 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7249 (ppc_set_pc, ppc_get_hwcap): Adjust.
7250 (ppc_usrregs_info): Forward declare.
7251 (!__powerpc64__) ppc_regmap_adjusted: New global.
7252 (ppc_arch_setup): Adjust to the current process'es target
7254 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7255 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7256 (ppc_store_evrregset): Adjust.
7257 (target_regsets): Rename to ...
7258 (ppc_regsets): ... this, and make static.
7259 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7260 (ppc_regs_info): New function.
7261 (the_low_target): Adjust.
7262 (initialize_low_arch): New function.
7263 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7264 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7265 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7266 (tdesc_s390x_linux64v2): Declare.
7267 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7268 (s390_fill_gregset, s390_store_last_break): Adjust.
7269 (target_regsets): Rename to ...
7270 (s390_regsets): ... this, and make static.
7271 (s390_get_pc, s390_set_pc): Adjust.
7272 (s390_get_hwcap): New target_desc parameter, and use it.
7273 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7274 (s390_arch_setup): Adjust to set the current process'es target
7275 description. Don't adjust the regmap.
7276 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7277 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7278 (regs_info_3264): New globals.
7279 (s390_regs_info): New function.
7280 (the_low_target): Adjust.
7281 (initialize_low_arch): New function.
7282 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7283 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7284 [__mips64] (init_registers_mips_linux)
7285 (init_registers_mips_dsp_linux): Delete defines.
7286 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7287 (have_dsp): New global.
7288 (mips_read_description): New, based on mips_arch_setup.
7289 (mips_arch_setup): Reimplement.
7290 (get_usrregs_info): New function.
7291 (mips_cannot_fetch_register, mips_cannot_store_register)
7292 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7293 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7294 (target_regsets): Rename to ...
7295 (mips_regsets): ... this, and make static.
7296 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7297 (dsp_regs_info, regs_info): New globals.
7298 (mips_regs_info): New function.
7299 (the_low_target): Adjust.
7300 (initialize_low_arch): New function.
7301 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7302 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7304 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7305 (arm_read_description): New, with bits factored from
7307 (arm_arch_setup): Reimplement.
7308 (target_regsets): Rename to ...
7309 (arm_regsets): ... this, and make static.
7310 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7311 (arm_regs_info): New function.
7312 (the_low_target): Adjust.
7313 (initialize_low_arch): New function.
7314 * linux-m68k-low.c (tdesc_m68k): Declare.
7315 (target_regsets): Rename to ...
7316 (m68k_regsets): ... this, and make static.
7317 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7318 (m68k_regs_info): New function.
7319 (m68k_arch_setup): New function.
7320 (the_low_target): Adjust.
7321 (initialize_low_arch): New function.
7322 * linux-sh-low.c (tdesc_sharch): Declare.
7323 (target_regsets): Rename to ...
7324 (sh_regsets): ... this, and make static.
7325 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7326 (sh_regs_info, sh_arch_setup): New functions.
7327 (the_low_target): Adjust.
7328 (initialize_low_arch): New function.
7329 * linux-bfin-low.c (tdesc_bfin): Declare.
7330 (bfin_arch_setup): New function.
7331 (bfin_usrregs_info, regs_info): New globals.
7332 (bfin_regs_info): New function.
7333 (the_low_target): Adjust.
7334 (initialize_low_arch): New function.
7335 * linux-cris-low.c (tdesc_cris): Declare.
7336 (cris_arch_setup): New function.
7337 (cris_usrregs_info, regs_info): New globals.
7338 (cris_regs_info): New function.
7339 (the_low_target): Adjust.
7340 (initialize_low_arch): New function.
7341 * linux-cris-low.c (tdesc_crisv32): Declare.
7342 (cris_arch_setup): New function.
7343 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7344 (cris_regs_info): New function.
7345 (the_low_target): Adjust.
7346 (initialize_low_arch): New function.
7347 * linux-m32r-low.c (tdesc_m32r): Declare.
7348 (m32r_arch_setup): New function.
7349 (m32r_usrregs_info, regs_info): New globals.
7350 (m32r_regs_info): Adjust.
7351 (initialize_low_arch): New function.
7352 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7353 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7354 (tic6x_usrregs_info): Forward declare.
7355 (tic6x_read_description): New function, based on ...
7356 (tic6x_arch_setup): ... this. Reimplement.
7357 (target_regsets): Rename to ...
7358 (tic6x_regsets): ... this, and make static.
7359 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7360 (tic6x_regs_info): New function.
7361 (the_low_target): Adjust.
7362 (initialize_low_arch): New function.
7363 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7364 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7365 (target_regsets): Rename to ...
7366 (xtensa_regsets): ... this, and make static.
7367 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7369 (xtensa_arch_setup, xtensa_regs_info): New functions.
7370 (the_low_target): Adjust.
7371 (initialize_low_arch): New function.
7372 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7373 (nios2_arch_setup): Set the current process'es tdesc.
7374 (target_regsets): Rename to ...
7375 (nios2_regsets): ... this.
7376 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7377 (nios2_regs_info): New function.
7378 (the_low_target): Adjust.
7379 (initialize_low_arch): New function.
7380 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7381 (aarch64_arch_setup): Set the current process'es tdesc.
7382 (target_regsets): Rename to ...
7383 (aarch64_regsets): ... this.
7384 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7385 (aarch64_regs_info): New function.
7386 (the_low_target): Adjust.
7387 (initialize_low_arch): New function.
7388 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7390 (target_regsets): Rename to ...
7391 (tile_regsets): ... this.
7392 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7393 (tile_regs_info): New function.
7394 (tile_arch_setup): Set the current process'es tdesc.
7395 (the_low_target): Adjust.
7396 (initialize_low_arch): New function.
7397 * spu-low.c (tdesc_spu): Declare.
7398 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7399 * win32-arm-low.c (tdesc_arm): Declare.
7400 (arm_arch_setup): New function.
7401 (the_low_target): Install arm_arch_setup instead of
7403 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7404 (init_windows_x86): Rename to ...
7405 (i386_arch_setup): ... this. Set `win32_tdesc'.
7406 (the_low_target): Adjust.
7407 * win32-low.c (win32_tdesc): New global.
7408 (child_add_thread): Don't create the thread cache here.
7409 (do_initial_child_stuff): Set the new process'es tdesc.
7410 * win32-low.h (struct target_desc): Forward declare.
7411 (win32_tdesc): Declare.
7412 * lynx-i386-low.c (tdesc_i386): Declare global.
7413 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7414 * lynx-low.c (lynx_tdesc): New global.
7415 (lynx_add_process): Set the new process'es tdesc.
7416 * lynx-low.h (struct target_desc): Forward declare.
7417 (lynx_tdesc): Declare global.
7418 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7419 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7420 * nto-low.c (nto_tdesc): New global.
7421 (do_attach): Set the new process'es tdesc.
7422 * nto-low.h (struct target_desc): Forward declare.
7423 (nto_tdesc): Declare.
7424 * nto-x86-low.c (tdesc_i386): Declare.
7425 (nto_x86_arch_setup): Set `nto_tdesc'.
7427 2013-06-04 Gary Benson <gbenson@redhat.com>
7429 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7430 to qSupported response when appropriate.
7431 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7432 with nonzero-length annex.
7433 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7434 arguments supplied in annex.
7436 2013-05-31 Doug Evans <dje@google.com>
7439 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7440 64 bits in 64-cross-32 environment.
7442 2013-05-28 Pedro Alves <palves@redhat.com>
7444 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7445 (aarch64-without-fpu.c): Delete rule.
7446 * configure.srv (aarch64*-*-linux*): Remove references to
7447 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7448 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7451 2013-05-24 Pedro Alves <palves@redhat.com>
7453 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7454 instead of strchr/decode_address. Error if the range isn't split
7455 with a ','. Don't assume there's be a ':' in the action.
7457 2013-05-23 Yao Qi <yao@codesourcery.com>
7458 Pedro Alves <palves@redhat.com>
7460 * linux-low.c (lwp_in_step_range): New function.
7461 (linux_wait_1): If the thread was range stepping and stopped
7462 outside the stepping range, report the stop to GDB. Otherwise,
7463 continue stepping. Add range stepping debug output.
7464 (linux_set_resume_request): Copy the step range from the resume
7466 (linux_supports_range_stepping): New.
7467 (linux_target_ops) <supports_range_stepping>: Set to
7468 linux_supports_range_stepping.
7469 * linux-low.h (struct linux_target_ops)
7470 <supports_range_stepping>: New field.
7471 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7472 * linux-x86-low.c (x86_supports_range_stepping): New.
7473 (the_low_target) <supports_range_stepping>: Set to
7474 x86_supports_range_stepping.
7475 * server.c (handle_v_cont): Handle 'r' action.
7476 (handle_v_requests): Append ";r" if the target supports range
7478 * target.h (struct thread_resume) <step_range_start,
7479 step_range_end>: New fields.
7480 (struct target_ops) <supports_range_stepping>:
7482 (target_supports_range_stepping): New macro.
7484 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7486 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7487 confusion in comment.
7489 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7491 * lynx-low.c (struct process_info_private): New type.
7492 (lynx_add_process): New function.
7493 (lynx_create_inferior, lynx_attach): Replace calls to
7494 add_process by calls to lynx_add_process.
7495 (lynx_resume): If PTID is null, then try using
7496 current_process()->private->last_wait_event_ptid.
7498 (lynx_clear_inferiors): Delete. The contents of that function
7499 has been inlined in lynx_mourn;
7500 (lynx_wait_1): Save the ptid in the process's private data.
7501 (lynx_mourn): Free the process' private data. Replace call
7502 to lynx_clear_inferiors by call to clear_inferiors.
7504 2013-05-17 Yao Qi <yao@codesourcery.com>
7506 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7509 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7511 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7512 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7513 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7514 PT_TEXT_END_ADDR guards. Update comments.
7515 (linux_target_op) <read_offsets>: Conditionally define to
7516 linux_read_offsets if the target is UCLIBC and if it defines
7517 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7519 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7520 Andrew Jenner <andrew@codesourcery.com>
7522 * Makefile.in (SFILES): Add linux-nios2-low.c.
7523 (clean): Add action to delete nios2-linux.c.
7524 (nios2-linux.c): New rule.
7525 * configure.srv: Add nios2*-*-linux*.
7526 * linux-nios2-low.c: New.
7528 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7530 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7532 2013-04-25 Hui Zhu <hui@codesourcery.com>
7535 * ax.c (ax_printf): Add fflush.
7537 2013-04-22 Tom Tromey <tromey@redhat.com>
7539 * Makefile.in (SFILES): Add filestuff.c.
7540 (OBS): Add filestuff.o.
7541 (filestuff.o): New target.
7542 * config.in, configure: Rebuild.
7543 * configure.ac: Check for fdwalk, pipe2.
7545 2013-04-17 Pedro Alves <palves@redhat.com>
7547 * configure.ac (USE_THREAD_DB): Delete variable.
7548 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7549 Don't AC_SUBST USE_THREAD_DB.
7550 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7551 * config.in, configure: Regenerate.
7553 2013-04-16 Pedro Alves <palves@redhat.com>
7555 * linux-low.h (struct lwp_info) <thread_known>: Move under
7556 the USE_THREAD_DB #ifdef.
7558 2013-04-16 Pedro Alves <palves@redhat.com>
7560 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7561 (linux-low.o): Delete rule.
7562 * linux-low.h: Always include "gdb_thread_db.h" instead of
7563 conditionally including thread_db.h.
7564 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7567 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7569 * Makefile.in (install-only): Fix make install regression.
7571 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7573 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7574 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7576 * gdbserver.1: Remove.
7578 2013-03-22 Pedro Alves <palves@redhat.com>
7580 * linux-low.c (handle_extended_wait): Don't call
7581 linux_enable_event_reporting.
7583 2013-03-15 Tony Theodore <tonyt@logyst.com>
7586 * Makefile.in (SHELL): Use @SHELL@.
7588 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7590 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7593 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7595 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7596 Remove extraneous NULL element.
7598 2013-03-13 Yao Qi <yao@codesourcery.com>
7600 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7601 'V' block in trace frame.
7603 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7605 * target.h (struct target_ops): Add btrace ops.
7606 (target_supports_btrace): New macro.
7607 (target_enable_btrace): New macro.
7608 (target_disable_btrace): New macro.
7609 (target_read_btrace): New macro.
7610 * gdbthread.h (struct thread_info): Add btrace field.
7611 * server.c: Include btrace-common.h.
7612 (handle_btrace_general_set): New function.
7613 (handle_btrace_enable): New function.
7614 (handle_btrace_disable): New function.
7615 (handle_general_set): Call handle_btrace_general_set.
7616 (handle_qxfer_btrace): New function.
7617 (struct qxfer qxfer_packets[]): Add btrace entry.
7618 * inferiors.c (remove_thread): Disable btrace.
7619 * linux-low: Include linux-btrace.h.
7620 (linux_low_enable_btrace): New function.
7621 (linux_low_read_btrace): New function.
7622 (linux_target_ops): Add btrace ops.
7623 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7624 Add srv_linux_btrace=yes.
7625 (x86_64-*-linux*): Add linux-btrace.o.
7626 Add srv_linux_btrace=yes.
7627 * configure.ac: Define HAVE_LINUX_BTRACE.
7628 * config.in: Regenerated.
7629 * configure: Regenerated.
7631 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7633 * server.c (handle_qxfer): Preserve error message if -3 is
7635 (qxfer): Document the -3 return value.
7637 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7639 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7640 (linux_btrace_h): New variable.
7641 (linux-btrace.o): New rule.
7643 2013-03-08 Stan Shebs <stan@codesourcery.com>
7644 Hafiz Abid Qadeer <abidh@codesourcery.com>
7646 * tracepoint.c (trace_buffer_size): New global.
7647 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7648 (init_trace_buffer): Change to one-argument function. Allocate
7649 trace buffer memory.
7650 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7651 handle QTBuffer:size packet.
7652 (cmd_bigqtbuffer_size): New function.
7653 (initialize_tracepoint): Call init_trace_buffer with
7654 DEFAULT_TRACE_BUFFER_SIZE.
7655 * server.c (handle_query): Add QTBuffer:size in the
7658 2013-03-07 Yao Qi <yao@codesourcery.com>
7660 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7661 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7663 (cmd_qtsp): Adjust condition. Do post increment.
7664 Set cur_action and cur_step_action back to 0.
7666 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7669 * linux-low.c (linux_write_memory): Return early success if LEN is
7672 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7674 * configure.srv: Add x86_64-*-cygwin* as target.
7676 2013-02-28 Tom Tromey <tromey@redhat.com>
7678 * configure.ac: Invoke AC_SYS_LARGEFILE.
7679 * configure, config.in: Rebuild.
7681 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7683 * win32-low.c: Throughout, fix format strings and casts of
7684 printf-like functions to avoid type related warnings on all
7686 (get_child_debug_event): Print dwDebugEventCode as hex since
7687 that's how it's usually documented.
7689 2013-02-28 Yao Qi <yao@codesourcery.com>
7691 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7694 2013-02-27 Jiong Wang <jiwang@tilera.com>
7696 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7697 (reg-tilegx32.c): New rule.
7698 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7699 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7700 different register info initializer according to elf class.
7701 (init_registers_tilgx32): New function. The tilegx32 register info
7703 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7704 (tile_store_gregset): Likewise.
7706 2013-02-27 Yao Qi <yao@codesourcery.com>
7708 * server.c (process_point_options): Print debug message when
7709 debug_threads is true.
7711 2013-02-26 Yao Qi <yao@codesourcery.com>
7713 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7715 2013-02-19 Pedro Alves <palves@redhat.com>
7716 Kai Tietz <ktietz@redhat.com>
7720 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7721 instead of strtoul to extract address from packet.
7722 (process_serial_event) <'z'>: Likewise.
7724 2013-02-18 Yao Qi <yao@codesourcery.com>
7726 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7728 2013-02-14 Pedro Alves <palves@redhat.com>
7732 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7733 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7735 2013-02-14 Pedro Alves <palves@redhat.com>
7737 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7739 2013-02-14 Pedro Alves <palves@redhat.com>
7741 * tracepoint.c (save_string): Delete.
7742 (add_tracepoint_action): Use savestring instead of save_string.
7744 2013-02-12 Pedro Alves <palves@redhat.com>
7746 * linux-xtensa-low.c: Ditto.
7747 * xtensa-xtregs.c: Ditto.
7749 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7751 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7754 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7756 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7757 aarch64_num_wp_regs and aarch64_num_bp_regs to
7758 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7760 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7762 * linux-aarch64-low.c (ps_get_thread_area): Replace
7763 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7765 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7766 Marcus Shawcroft <marcus.shawcroft@arm.com>
7767 Nigel Stephens <nigel.stephens@arm.com>
7768 Yufeng Zhang <yufeng.zhang@arm.com>
7770 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7771 (aarch64.c, aarch64-without-fpu.c): New targets.
7772 * configure.srv (aarch64*-*-linux*): New.
7773 * linux-aarch64-low.c: New file.
7775 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7777 * linux-low.c (handle_extended_wait, linux_create_inferior)
7778 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7779 (dequeue_one_deferred_signal, linux_resume_one_thread)
7780 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7781 (linux_tracefork_grandchild, linux_test_for_tracefork)
7782 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7783 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7784 where the argument is 0.
7786 2013-01-25 Yao Qi <yao@codesourcery.com>
7788 * event-loop.c: Include "queue.h".
7789 (gdb_event_p): New typedef.
7790 (struct gdb_event) <next_event>: Remove.
7791 (event_queue): Change to QUEUE(gdb_event_p).
7792 (async_queue_event): Remove.
7793 (gdb_event_xfree): New.
7794 (initialize_event_loop): New.
7795 (process_event): Use API from QUEUE.
7796 (wait_for_event): Likewise.
7797 * server.c (main): Call initialize_event_loop.
7798 * server.h (initialize_event_loop): Declare.
7800 2013-01-18 Yao Qi <yao@codesourcery.com>
7802 * ax.h (struct eval_agent_expr_context): New.
7803 (gdb_eval_agent_expr): Update declaration.
7804 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7805 TFRAME. Add new argument CTX.
7806 * server.h (struct eval_agent_expr_context): Declare.
7807 (agent_mem_read, agent_tsv_read): Update declaration.
7808 (agent_mem_read_string): Likewise.
7809 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7810 (add_traceframe_block): Add new argument TPOINT.
7811 Increase TPOINT->traceframe_usage.
7812 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7813 eval_tracepoint_agent_expr.
7814 (condition_true_at_tracepoint): Likewise.
7815 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7816 (agent_mem_read_string, agent_tsv_read): Likewise.
7818 2013-01-16 Yao Qi <yao@codesourcery.com>
7820 * linux-low.c (linux_resume_one_lwp): Don't check
7821 'lwp->bp_reinsert != 0'.
7823 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7824 Pedro Alves <palves@redhat.com>
7826 * lynx-low.c (ptrace_request_to_str): Define a temporary
7827 macro and use it to simplify this function's implementation.
7829 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7831 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7834 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7836 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7838 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7840 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7842 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7844 * lynx-low.c (lynx_resume): Use the resume_info parameter
7845 to determine the ptid for the lynx_ptrace call, unless
7846 it is equal to minus_one_ptid, in which case we use the
7847 ptid of the current_inferior.
7848 (lynx_wait_1): After having received a thread create/exit
7849 event, resume the inferior's execution using the signaling
7850 thread's ptid, rather than the old ptid.
7852 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7854 * lynx-low.c (lynx_resume): Delete variable ret.
7856 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7858 * gdbreplay.c (gdbreplay_version): Update copyright year.
7859 * server.c (gdbserver_version): Likewise.
7861 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7863 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7866 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7868 * lynx-low.c (ptrace_request_to_str): Add handling for
7871 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7873 * lynx-low.c (lynx_attach): Delete variable new_process.
7875 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7877 * lynx-low.c (lynx_create_inferior): Delete variable
7880 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7882 * lynx-low.c (ptrace_request_to_str): Do not handle
7883 PTRACE_GETTHREADLIST if this macro does not exist.
7885 2012-12-15 Yao Qi <yao@codesourcery.com>
7887 * Makefile.in (OBS): Add notif.o.
7888 * notif.c, notif.h: New.
7889 * server.c: Include "notif.h".
7890 (struct vstop_notif) <next>: Remove.
7892 (queue_stop_reply): Update.
7893 (push_event, send_next_stop_reply): Remove.
7894 (discard_queued_stop_replies): Update.
7895 (notif_stop): New variable.
7896 (handle_v_stopped): Remove.
7897 (handle_v_requests): Don't call handle_v_stopped. Call
7898 handle_ack_notif instead.
7899 (queue_stop_reply_callback): Call notif_event_enque instead
7900 of queue_stop_reply.
7901 (handle_status): Don't call send_next_stop_reply, call
7902 notif_write_event instead.
7903 (kill_inferior_callback): Likewise.
7904 (detach_or_kill_inferior_callback): Likewise.
7905 (main): Call initialize_notif.
7906 (process_serial_event): Call QUEUE_is_empty.
7907 (handle_target_event): Call notif_push instead of push event.
7908 * server.h (push_event): Remove declaration.
7910 2012-12-10 Tom Tromey <tromey@redhat.com>
7912 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7913 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7916 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7917 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7918 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7919 (amd64-linux-ipa.o, ax.o): Rewrite.
7920 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7921 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7922 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7923 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7924 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7925 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7926 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7927 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7928 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7929 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7930 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7931 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7932 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7933 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7934 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7935 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7936 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7937 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7938 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7939 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7940 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7941 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7942 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7943 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7944 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7945 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7946 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7947 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7948 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7949 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7950 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7951 (reg-tilegx.o): Remove.
7952 (all_object_files): New macro.
7953 Include .deps files.
7954 * aclocal.m4, configure: Rebuild.
7955 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7956 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7957 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7959 2012-12-05 Tom Tromey <tromey@redhat.com>
7962 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7964 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7966 * configure.ac: Check for linux/perf_event.h.
7967 * config.in: Regenerated.
7968 * configure: Regenerated.
7970 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7972 * hostio.c (handle_readlink): Decrease buffer size
7973 parameter passed to readlink by one byte.
7975 2012-11-26 Yao Qi <yao@codesourcery.com>
7977 * configure.ac (build_warnings): Append '-Wempty-body'.
7978 * configure: Regenerated.
7979 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7982 2012-11-15 Pierre Muller <muller@sourceware.org>
7984 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7985 * config.in: Regenerate.
7986 * configure: Regenerate.
7987 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7988 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7989 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7990 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7992 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7993 instead of <sys/wait.h> header.
7994 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7996 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7998 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7999 (various make rules): Remove -DGDBSERVER
8001 2012-11-09 Yao Qi <yao@codesourcery.com>
8003 * spu-low.c (current_ptid): Move it to ..
8004 * gdbthread.h: ... here. New.
8005 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8006 * server.c (myresume, process_serial_event): Likewise.
8007 * thread-db.c (thread_db_find_new_threads): Likewise.
8008 * tracepoint.c (run_inferior_command): Likewise.
8010 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8012 * server.c (handle_search_memory_1): Include access length in
8015 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8017 * linux-crisv32-low.c: Fix compile errors.
8019 2012-09-04 Yao Qi <yao@codesourcery.com>
8021 * tracepoint.c (cmd_qtsv): Adjust debug message.
8022 Don't check CUR_TPOINT.
8024 2012-08-28 Yao Qi <yao@codesourcery.com>
8026 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8027 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8028 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8029 Remove declarations of xmalloc, xreallloc, xstrdup and
8031 * Makefile.in (libiberty_h): New.
8032 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8033 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8035 2012-08-23 Yao Qi <yao@codesourcery.com>
8037 * server.h: Remove declaration of 'xsnprintf'.
8039 2012-08-22 Keith Seitz <keiths@redhat.com>
8041 * server.h: Include build-gnulib-gbserver/config.h.
8042 * gdbreplay.c: Likewise.
8044 2012-08-08 Doug Evans <dje@google.com>
8046 * Makefile.in (SFILES): Add gdb_vecs.c.
8047 (OBS): Add gdb_vecs.o.
8048 (gdb_vecs_h, host_defs_h): New variables.
8049 (thread-db.o): Add $(gdb_vecs_h) dependency.
8050 (gdb_vecs.o): New rule.
8051 * thread-db.c: #include "gdb_vecs.h".
8052 (thread_db_load_search): Use a vector to iterate over path elements.
8053 Handle text appearing after "$pdir".
8055 * configure.ac: Add check for strstr.
8056 * config.in: Regenerate.
8057 * configure: Regenerate.
8059 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8061 * hostio.c (handle_pread): If pread fails, fall back to attempting
8063 (handle_pwrite): Likewise for pwrite.
8065 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8067 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8068 between unsupported TYPE and unimplementable ADDR/LEN combination.
8069 (arm_insert_point): Act on new return value.
8071 2012-07-31 Pedro Alves <palves@redhat.com>
8073 * server.c (process_point_options): Only skip tokens if we find
8074 one that is unrecognized. Don't treat 'X' specially while
8075 skipping unrecognized tokens.
8077 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8079 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8080 to 4-byte-align HW breakpoint addresses for Thumb.
8082 2012-07-27 Yao Qi <yao@codesourcery.com>
8086 * server.h: Declare gdb_agent_about_to_close.
8087 * target.c (kill_inferior): Include "agent.h".
8088 New. Send command 'kill'.
8089 * target.h (kill_inferior): Removed macro.
8090 * tracepoint.c (gdb_agent_about_to_close): New.
8091 (gdb_agent_helper_thread): Handle command 'close'.
8092 Wait endlessly until the inferior stops.
8093 Install gdb_agent_remove_socket to atexit hook.
8094 (agent_socket_name): New static variable.
8095 (gdb_agent_socket_init): Replace local variable 'name' with
8096 'agent_socket_name'.
8097 (gdb_agent_remove_socket): New.
8099 2012-07-27 Yao Qi <yao@codesourcery.com>
8101 * server.c (process_point_options): Stop at 'X' when parsing.
8103 2012-07-19 Michael Eager <eager@eagercon.com>
8105 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8107 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8108 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8109 hardware breakpoint.
8111 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8113 * gdbserver/linux-low.c (initialize_low): Call
8114 linux_ptrace_init_warnings.
8116 2012-07-02 Doug Evans <dje@google.com>
8118 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8121 2012-07-02 Stan Shebs <stan@codesourcery.com>
8123 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8124 (ax.o): Add it to build rule.
8126 (OBS): Add format.o.
8127 (IPA_OBS): Add format.o.
8128 * server.c (handle_query): Claim support for breakpoint commands.
8129 (process_point_options): Add command case.
8130 (process_serial_event): Leave running if there are printfs in
8132 * mem-break.h (any_persistent_commands): Declare.
8133 (add_breakpoint_commands): Declare.
8134 (gdb_no_commands_at_breakpoint): Declare.
8135 (run_breakpoint_commands): Declare.
8136 * mem-break.c (struct point_command_list): New struct.
8137 (struct breakpoint): New field command_list.
8138 (any_persistent_commands): New function.
8139 (add_commands_to_breakpoint): New function.
8140 (add_breakpoint_commands): New function.
8141 (gdb_no_commands_at_breakpoint): New function.
8142 (run_breakpoint_commands): New function.
8143 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8145 * ax.c: Include format.h.
8146 (ax_printf): New function.
8147 (gdb_eval_agent_expr): Add printf opcode.
8149 2012-06-13 Yao Qi <yao@codesourcery.com>
8151 * server.c (start_inferior): Remove duplicated writes to fields
8152 'last_resume_kind' and 'last_status' of 'current_inferior'.
8154 2012-06-12 Yao Qi <yao@codesourcery.com>
8155 Pedro Alves <palves@redhat.com>
8157 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8159 * server.c (handle_v_cont): Extend comment.
8161 2012-06-11 Yao Qi <yao@codesourcery.com>
8163 * linux-low.c (linux_attach): Add 'static'.
8165 2012-06-06 Yao Qi <yao@codesourcery.com>
8167 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8169 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8171 Fix gcc -flto compilation warning.
8172 * server.c (main): Make variable multi_mode and attach volatile.
8174 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8176 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8177 if the platform doesn't know about it.
8179 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8181 * Makefile.in (SFILES): Add linux-tile-low.c.
8182 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8183 * configure.srv: Handle tilegx-*-linux*.
8184 * linux-tile-low.c: New file.
8186 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8188 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8190 2012-05-24 Pedro Alves <palves@redhat.com>
8194 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8196 2012-05-24 Pedro Alves <palves@redhat.com>
8200 Replace target_signal with gdb_signal throughout.
8202 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8204 * linux-low.c (linux_store_registers): Avoid the copying sequence
8205 when no data has been retrieved by ptrace.
8207 2012-05-22 Will Deacon <will.deacon@arm.com>
8209 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8210 Include asm/ptrace.h.
8211 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8214 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8216 * linux-low.c (linux_store_registers): Don't re-retrieve data
8217 with ptrace that has already been obtained from /proc. Always
8218 copy any data retrieved with ptrace to the buffer supplied.
8220 2012-05-11 Yao Qi <yao@codesourcery.com>
8221 Pedro Alves <palves@redhat.com>
8223 * linux-low.c (enum stopping_threads_kind): New.
8224 (stopping_threads): Change type to `enum stopping_threads_kind'.
8225 (handle_extended_wait): If stopping and suspending threads, leave
8226 the new_lwp suspended too.
8227 (linux_wait_for_event): Adjust.
8228 (stop_all_lwps): Set `stopping_threads' to
8229 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8230 whether we're suspending threads or just stopping them. Assert no
8233 2012-04-29 Yao Qi <yao@codesourcery.com>
8235 * server.h: Move some code to ...
8236 * gdbthread.h: ... here. New.
8237 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8238 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8239 (nto-low.o, win32-low.o): Likewise.
8240 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8241 * regcache.c, remote-utils.c, server.c: Likewise.
8242 * target.c, tracepoint.c, win32-low.c: Likewise.
8244 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8246 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8247 (PTRACE_ARG4_TYPE): Likewise.
8248 (PTRACE_XFER_TYPE): Likewise.
8249 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8250 ptrace to PTRACE_ARG3_TYPE.
8251 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8252 (PTRACE_ARG4_TYPE): Likewise.
8253 (PTRACE_XFER_TYPE): Likewise.
8254 (linux_detach_one_lwp): Cast fourth argument of
8255 ptrace to long then PTRACE_ARG4_TYPE.
8256 (regsets_fetch_inferior_registers): Cast third argument of
8257 ptrace to long then PTRACE_ARG3_TYPE.
8258 (regsets_store_inferior_registers): Likewise.
8260 2012-04-20 Pedro Alves <palves@redhat.com>
8262 * configure: Regenerate.
8264 2012-04-19 Pedro Alves <palves@redhat.com>
8266 * Makefile.in (GNULIB_BUILDDIR): New.
8267 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8268 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8269 (all, install-only, uninstall, clean-info, all-lib, clean): No
8270 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8271 (maintainer-clean realclean distclean): Use subdir_do.
8273 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8274 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8275 * acinclude.m4: Include acx_configure_dir.m4.
8276 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8277 calls. Call AC_PROG_RANLIB. Configure gnulib using
8280 (GNULIB_STDINT_H): Adjust.
8281 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8282 * gdbreplay.c: Include build-gnulib/config.h.
8283 * server.h: Likewise.
8284 * aclocal.m4: Regenerate.
8285 * config.in: Regenerate.
8286 * configure: Regenerate.
8288 2012-04-19 Pedro Alves <palves@redhat.com>
8290 * Makefile.in (LIBGNU, INCGNU): Adjust.
8291 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8292 (all, install-only, uninstall, clean-info, all-lib, clean)
8293 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8294 * configure.ac: Adjust AC_OUTPUT output.
8295 * aclocal.m4: Regenerate.
8296 * configure: Regenerate.
8298 2012-04-19 Pedro Alves <palves@redhat.com>
8300 * Makefile.in (generated_files): New.
8301 (server_h): Remove the explicit dependency on config.h, and depend
8302 on $generated_files.
8304 2012-04-19 Pedro Alves <palves@redhat.com>
8306 * Makefile.in (INCGNU): Add -Ignulib.
8308 2012-04-19 Pedro Alves <palves@redhat.com>
8310 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8311 (INCGNU): ... this, and spell out -I here.
8312 (GNULIB_LIB): Rename to ...
8314 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8316 2012-04-19 Pedro Alves <palves@redhat.com>
8318 * config.in: Regenerate.
8320 2012-04-19 Pedro Alves <palves@redhat.com>
8322 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8323 * server.h (memmem): Remove declaration.
8324 * config.in: Regenerate.
8325 * configure: Regenerate.
8327 2012-04-19 Yao Qi <yao@codesourcery.com>
8329 * Makefile.in (SFILES): Add common/vec.c.
8333 2012-04-19 Yao Qi <yao@codesourcery.com>
8335 * remote-utils.c (prepare_resume_reply): Replace with macro
8336 target_core_of_thread.
8337 * server.c (handle_qxfer_threads_proper): Likewise.
8338 * target.h (traget_core_of_thread): New macro.
8340 2012-04-18 Pedro Alves <palves@redhat.com>
8342 * aclocal.m4: Regenerate.
8343 * configure: Regenerate.
8345 2012-04-16 Yao Qi <yao@codesourcery.com>
8347 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8348 duplicated on address.
8350 2012-04-16 Yao Qi <yao@codesourcery.com>
8352 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8353 (struct tracepoint_action_ops) <send>: New field.
8354 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8355 (agent_expr_send, x_tracepoint_action_send): New.
8356 (l_tracepoint_action_send): New.
8357 (cmd_qtdp): Download and install tracepoint
8358 according to `use_agent'.
8359 (run_inferior_command): Add one more parameter `len'.
8361 (tracepoint_send_agent): New.
8362 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8364 2012-04-16 Yao Qi <yao@codesourcery.com>
8366 * tracepoint.c (download_tracepoints): Moved to ...
8367 (cmd_qtstart): ... here.
8369 2012-04-14 Yao Qi <yao@codesourcery.com>
8371 * tracepoint.c: Include inttypes.h.
8372 (struct collect_memory_action): Use sized types.
8373 (struct tracepoint): Likewise.
8374 (cmd_qtdp, stop_tracing): Update print specifiers.
8375 (cmd_qtp, response_tracepoint): Likewise.
8376 (collect_data_at_tracepoint): Likewise.
8377 (collect_data_at_step): Likewise.
8379 2012-04-14 Yao Qi <yao@codesourcery.com>
8381 Import gnulib module inttypes.
8382 * aclocal.m4, config.in, configure: Regenerated.
8384 2012-04-14 Yao Qi <yao@codesourcery.com>
8386 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8387 Makefile and config.status at last.
8389 2012-04-13 Yao Qi <yao@codesourcery.com>
8391 * tracepoint.c: Include stdint.h unconditionally.
8393 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8395 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8396 on BFD_HAVE_SYS_PROCFS_TYPE.
8397 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8398 * configure: Regenerate.
8399 * config.in: Likewise.
8401 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8403 * Makefile.in (clean): Also remove x32.c x32-linux.c
8404 x32-avx.c x32-avx-linux.c.
8405 (x32.o): New target.
8407 (x32-linux.o): Likewise.
8408 (x32-linux.c): Likewise.
8409 (x32-avx.o): Likewise.
8410 (x32-avx.c): Likewise.
8411 (x32-avx-linux.o): Likewise.
8412 (x32-avx-linux.c): Likewise.
8414 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8415 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8416 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8417 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8418 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8419 i386/x32-avx-linux.xml.
8421 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8422 (init_registers_x32_avx_linux): Likwise.
8423 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8424 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8426 2012-04-13 Pedro Alves <palves@redhat.com>
8428 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8429 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8430 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8431 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8434 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8436 * linux-x86-low.c (compat_x32_clock_t): New.
8437 (compat_x32_siginfo_t): Likewise.
8438 (compat_x32_siginfo_from_siginfo): Likewise.
8439 (siginfo_from_compat_x32_siginfo): Likewise.
8440 (linux_is_elf64): Likewise.
8441 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8442 and siginfo_from_compat_x32_siginfo for x32.
8443 (x86_arch_setup): Set linux_is_elf64.
8445 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8448 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8450 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8451 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8452 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8453 compatible with process.
8455 2012-04-12 Yao Qi <yao@codesourcery.com>
8457 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8458 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8459 (install-only, install-info, clean): Handle sub dir gnulib.
8460 (all-lib, am--refresh): New targets.
8461 (memmem.o): Remove target.
8462 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8463 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8464 (AC_REPLACE_FUNCS): Remove memmem.
8465 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8466 (AC_OUTPUT): Generate Makefile in gnulib/.
8467 * aclocal.m4, config.in, configure: Regenerated.
8469 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8471 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8473 2012-04-05 Pedro Alves <palves@redhat.com>
8475 -Werror=strict-aliasing
8477 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8480 2012-04-04 Pedro Alves <palves@redhat.com>
8482 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8483 (sparc_store_gregset_from_stack, sparc_store_gregset)
8484 (sparc_breakpoint_at): Fix formatting.
8486 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8488 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8490 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8491 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8492 * config.in: Regenerate.
8493 * configure: Likewise.
8495 2012-03-29 Pedro Alves <palves@redhat.com>
8497 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8498 Correct ptrace arguments.
8500 2012-03-28 Pedro Alves <palves@redhat.com>
8502 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8503 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8504 (IA64_FR1_REGNUM): New defines.
8505 (ia64_fetch_register): New.
8506 (the_low_target): Install it.
8507 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8509 * linux-low.c (linux_fetch_registers): Try the
8510 the_low_target.fetch_register hook first.
8512 * linux-arm-low.c (the_low_target): Adjust.
8513 * linux-bfin-low.c (the_low_target): Adjust.
8514 * linux-cris-low.c (the_low_target): Adjust.
8515 * linux-crisv32-low.c (the_low_target): Adjust.
8516 * linux-m32r-low.c (the_low_target): Adjust.
8517 * linux-m68k-low.c (the_low_target): Adjust.
8518 * linux-mips-low.c (the_low_target): Adjust.
8519 * linux-ppc-low.c (the_low_target): Adjust.
8520 * linux-s390-low.c (the_low_target): Adjust.
8521 * linux-sh-low.c (the_low_target): Adjust.
8522 * linux-sparc-low.c (the_low_target): Adjust.
8523 * linux-tic6x-low.c (the_low_target): Adjust.
8524 * linux-x86-low.c (the_low_target): Adjust.
8525 * linux-xtensa-low.c (the_low_target): Adjust.
8527 2012-03-26 Pedro Alves <palves@redhat.com>
8529 * server.c (handle_qxfer_libraries): Don't bail early if
8530 the_target->qxfer_libraries_svr4 is not NULL.
8532 2012-03-26 Pedro Alves <palves@redhat.com>
8534 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8536 2012-03-23 Pedro Alves <palves@redhat.com>
8538 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8539 "library-list-svr4" element's start tag when the the DSO list is
8542 2012-03-23 Pedro Alves <palves@redhat.com>
8544 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8545 a variable whose type size is the same as the inferior's pointer
8548 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8550 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8552 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8553 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8554 * linux-low.h: Include <signal.h>.
8555 (struct siginfo): Remove forward declaration.
8556 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8559 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8561 * .gitignore: Ignore more files.
8563 2012-03-19 Pedro Alves <palves@redhat.com>
8564 Jan Kratochvil <jan.kratochvil@redhat.com>
8566 * server.c (cont_thread, general_thread): Add describing comments.
8567 (start_inferior): Clear `cont_thread'.
8568 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8571 2012-03-15 Yao Qi <yao@codesourcery.com>
8573 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8575 (cmd_qtdp): ... here.
8577 2012-03-15 Yao Qi <yao@codesourcery.com>
8579 * tracepoint.c (struct tracepoint_action_ops): New.
8580 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8581 (m_tracepoint_action_download): New.
8582 (r_tracepoint_action_download): New.
8583 (x_tracepoint_action_download): New.
8584 (l_tracepoint_action_download): New.
8585 (add_tracepoint_action): Install `action->ops' according type.
8586 (download_tracepoint_1): Move code `download' function pointer
8587 of various tracepoint_action_ops.
8589 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8591 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8592 linux_ptrace_attach_warnings.
8594 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8596 * Makefile.in (linux-ptrace.o): New.
8597 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8598 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8599 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8600 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8601 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8603 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8605 2012-03-08 Yao Qi <yao@codesourcery.com>
8606 Pedro Alves <palves@redhat.com>
8608 Fix PR server/13392.
8609 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8611 * tracepoint.c (remove_tracepoint): New.
8612 (cmd_qtdp): Call remove_tracepoint when failed to install.
8614 2012-03-07 Pedro Alves <palves@redhat.com>
8616 * linux-low.c (get_detach_signal): New.
8617 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8618 Pass on pending signals to PTRACE_DETACH. Check the result of the
8620 * server.c (program_signals, program_signals_p): New.
8621 (handle_general_set): Handle QProgramSignals.
8622 * server.h (program_signals, program_signals_p): Declare.
8624 2012-03-05 Pedro Alves <palves@redhat.com>
8625 Jan Kratochvil <jan.kratochvil@redhat.com>
8627 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8630 2012-03-03 Yao Qi <yao@codesourcery.com>
8632 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8633 agent_look_up_symbols.
8635 2012-03-03 Yao Qi <yao@codesourcery.com>
8637 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8638 (linux-x86-low.o): Likewise.
8639 * server.h: Remove in_process_agent_loaded.
8640 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8644 2012-03-03 Yao Qi <yao@codesourcery.com>
8646 * tracepoint.c (gdb_agent_capability): New global.
8647 (in_process_agent_loaded_ust): Renamed to
8648 `in_process_agent_supports_ust'.
8650 (in_process_agent_supports_ust): Call agent_capability_check.
8651 (clear_installed_tracepoints): Assert that agent supports
8654 2012-03-03 Yao Qi <yao@codesourcery.com>
8656 * linux-low.c (linux_supports_agent): New.
8657 (linux_target_ops): Initialize field `supports_agent' with
8658 linux_supports_agent.
8659 * target.h (struct target_ops) <supports_agent>: New.
8660 (target_supports_agent): New macro.
8661 * server.c (handle_general_set): Handle packet 'QAgent'.
8662 (handle_query): Send `QAgent+'.
8663 * Makefile.in (server.o): Depends on agent.h.
8665 2012-03-03 Yao Qi <yao@codesourcery.com>
8667 * Makefile.in (OBS): Add agent.o.
8668 Add new rule for agent.o.
8669 Track dependence of tracepoint.c on agent.h.
8670 * tracepoint.c (run_inferior_command_1):
8671 (run_inferior_command): Call agent_run_command.
8672 (gdb_ust_connect_sync_socket): Deleted. Move it to
8674 (resume_thread, stop_thread): Likewise.
8675 (gdb_ust_socket_init): Renamed to ...
8676 (gdb_agent_socket_init): ... New.
8677 (gdb_ust_thread): Renamed to ...
8678 (gdb_agent_helper_thread): ... New.
8679 (gdb_ust_init): Move some code to ...
8680 (gdb_agent_init): ... here. New.
8681 [HAVE_UST]: Call gdb_ust_init.
8682 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8683 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8684 * config.in, configure: Regenerated.
8686 2012-03-02 Pedro Alves <palves@redhat.com>
8688 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8689 * linux-low.c (struct simple_pid_list): New.
8690 (stopped_pids): New a struct simple_pid_list pointer.
8691 (add_to_pid_list, pull_pid_from_list): New.
8692 (handle_extended_wait): Don't assume the first signal new children
8693 report is SIGSTOP. Adjust call to pull_pid_from_list.
8694 (linux_wait_for_lwp): Adjust.
8696 2012-03-02 Yao Qi <yao@codesourcery.com>
8698 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8701 2012-03-02 Yao Qi <yao@codesourcery.com>
8703 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8704 `stop_pc' and `tpoint'. Update caller.
8706 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8708 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8709 * linux-low.c (use_linux_regsets): New macro.
8710 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8711 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8712 (linux_register_in_regsets): New function.
8713 (usr_fetch_inferior_registers): Skip registers covered by
8715 (usr_store_inferior_registers): Likewise.
8716 (usr_fetch_inferior_registers): New macro.
8717 (usr_store_inferior_registers): Likewise.
8718 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8719 (linux_store_registers): Likewise.
8720 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8722 (init_registers_mips64_dsp_linux): Likewise.
8723 (init_registers_mips_linux): New macro.
8724 (init_registers_mips_dsp_linux): Likewise.
8725 (mips_dsp_num_regs): Likewise.
8726 (DSP_BASE, DSP_CONTROL): New fallback macros.
8727 (mips_base_regs): New macro.
8728 (mips_regmap): Use it. Fix the size.
8729 (mips_dsp_regmap): New variable.
8730 (mips_dsp_regset_bitmap): Likewise.
8731 (mips_arch_setup): New function.
8732 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8734 (mips_cannot_store_register): Likewise.
8735 (the_low_target): Update .arch_setup, .num_regs and .regmap
8736 initializers. Add .regset_bitmap initializer.
8737 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8739 * linux-bfin-low.c (the_low_target): Likewise.
8740 * linux-cris-low.c (the_low_target): Likewise.
8741 * linux-crisv32-low.c (the_low_target): Likewise.
8742 * linux-ia64-low.c (the_low_target): Likewise.
8743 * linux-m32r-low.c (the_low_target): Likewise.
8744 * linux-m68k-low.c (the_low_target): Likewise.
8745 * linux-ppc-low.c (the_low_target): Likewise.
8746 * linux-s390-low.c (the_low_target): Likewise.
8747 * linux-sh-low.c (the_low_target): Likewise.
8748 * linux-sparc-low.c (the_low_target): Likewise.
8749 * linux-tic6x-low.c (the_low_target): Likewise.
8750 * linux-x86-low.c (the_low_target): Likewise.
8751 * linux-xtensa-low.c (the_low_target): Likewise.
8752 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8753 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8754 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8756 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8757 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8759 2012-02-29 Yao Qi <yao@codesourcery.com>
8760 Pedro Alves <palves@redhat.com>
8762 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8763 `step_over_finished' is true.
8765 2012-02-27 Pedro Alves <palves@redhat.com>
8767 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8768 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8770 2012-02-27 Pedro Alves <palves@redhat.com>
8773 * linux-low.c (pid_is_stopped): New.
8774 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8776 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8778 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8781 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8783 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8785 2012-02-24 Luis Machado <lgustavo@codesourcery>
8787 * server.c (handle_query): Advertise support for target-side
8788 breakpoint condition evaluation.
8789 (process_point_options): New function.
8790 (process_serial_event): When inserting a breakpoint, check for
8791 a target-side condition that should be evaluated.
8793 * mem-break.c: Include regcache.h and ax.h.
8794 (point_cond_list_t): New data structure.
8795 (breakpoint) <cond_list>: New field.
8796 (find_gdb_breakpoint_at): Make non-static.
8797 (delete_gdb_breakpoint_at): Clear any target-side
8799 (clear_gdb_breakpoint_conditions): New function.
8800 (add_condition_to_breakpoint): Likewise.
8801 (add_breakpoint_condition): Likewise.
8802 (gdb_condition_true_at_breakpoint): Likewise.
8803 (gdb_breakpoint_here): Return result directly instead
8804 of going through a local variable.
8806 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8807 (clear_gdb_breakpoint_conditions): Likewise.
8808 (add_breakpoint_condition): Likewise.
8809 (gdb_condition_true_at_breakpoint): Likewise.
8811 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8812 (need_step_over_p): Take target-side breakpoint condition into
8815 2012-02-24 Luis Machado <lgustavo@codesourcery>
8817 * server.h: Include tracepoint.h.
8818 (agent_mem_read, agent_get_trace_state_variable_value,
8819 agent_set_trace_state_variable_value,
8820 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8821 get_set_tsv_func_addr): New prototypes.
8823 * ax.h: New include file.
8824 * ax.c: New source file.
8826 * tracepoint.c: Include ax.h.
8827 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8828 agent_expr, eval_result_type): Move to ax.h.
8829 (parse_agent_expr): Rename to ...
8830 (gdb_parse_agent_expr): ... this, make it non-static and move
8832 (unparse_agent_expr) Rename to ...
8833 (gdb_unparse_agent_expr): ... this, make it non-static and move
8835 (eval_agent_expr): Rename to ...
8836 (eval_tracepoint_agent_expr): ... this.
8837 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8838 forward declarations.
8839 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8840 (agent_get_trace_state_variable_value): New function.
8841 (agent_set_trace_state_variable_value): New function.
8842 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8843 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8844 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8845 (condition_true_at_tracepoint): Likewise.
8846 (parse_agent_expr): Rename to ...
8847 (gdb_parse_agent_expr): ... this and move to ax.c.
8848 (unparse_agent_expr): Rename to ...
8849 (gdb_unparse_agent_expr): ... this and move to ax.c.
8850 (gdb_agent_op_name): Move to ax.c.
8851 (eval_agent_expr): Rename to ...
8852 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8854 (eval_tracepoint_agent_expr): New function.
8855 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8857 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8859 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8860 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8861 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8862 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8863 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8864 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8865 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8866 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8867 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8868 (compile_bytecodes): Remove forward declaration.
8869 (is_goto_target): Move to ax.c.
8870 (compile_bytecodes): Move to ax.c and call
8871 agent_get_trace_state_variable_value (...) and
8872 agent_set_trace_state_variable_value (...).
8874 * Makefile.in: Update ax.c and IPA dependencies.
8876 2012-02-24 Pedro Alves <palves@redhat.com>
8878 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8879 (cmd_bigqtbuffer_circular): ... this. Only handle
8880 'QTBuffer:circular:'.
8881 (handle_tracepoint_general_set): Adjust.
8883 2012-02-16 Yao Qi <yao@codesourcery.com>
8885 * inferiors.c: Move code to ...
8886 * dll.c: .... here. New.
8887 * server.h: Declare clear_dlls.
8888 * Makefile.in (SFILES): Add dll.c.
8892 2012-02-11 Yao Qi <yao@codesourcery.com>
8894 * server.c: (handle_monitor_command): Add a new parameter
8896 (handle_query): Update caller.
8898 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8900 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8901 * configure, config.in: Regenerate.
8902 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8905 2012-02-02 Pedro Alves <palves@redhat.com>
8907 Try SIGKILL first, then PTRACE_KILL.
8908 * linux-low.c (linux_kill_one_lwp): New.
8909 (linux_kill_one_lwp): Rename to ...
8910 (kill_one_lwp_callback): ... this. Use the new
8913 2012-02-02 Pedro Alves <palves@redhat.com>
8915 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8918 2012-01-27 Pedro Alves <palves@redhat.com>
8920 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8921 (elf_64_file_p): Make static.
8922 (linux_pid_exe_is_elf_64_file): New.
8923 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8924 Delete declarations.
8925 (linux_pid_exe_is_elf_64_file): Declare.
8926 * linux-x86-low.c (x86_arch_setup): Use
8927 linux_pid_exe_is_elf_64_file.
8929 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8931 * linux-low.c (linux_wait_for_event_1): Rename to ...
8932 (linux_wait_for_event): ... here and merge it with former
8933 linux_wait_for_event - new variable wait_ptid, use it.
8934 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8936 2012-01-23 Pedro Alves <palves@redhat.com>
8938 * server.c (main): Avoid yet another case of infinite loop while
8939 detaching/killing after a longjmp.
8941 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8944 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8946 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8948 * hostio.c (handle_readlink): New function.
8949 (handle_vFile): Call it to handle "vFile:readlink" packets.
8951 2012-01-20 Pedro Alves <palves@redhat.com>
8952 Ulrich Weigand <ulrich.weigand@linaro.org>
8954 * server.c (handle_v_requests): Only support vAttach and vRun to
8955 start multiple processes when in extended protocol mode.
8957 2012-01-17 Pedro Alves <palves@redhat.com>
8959 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8960 memalign plus mprotect to allocate the scratch buffer.
8962 2012-01-13 Pedro Alves <palves@redhat.com>
8964 * server.c (attach_inferior): Clear `cont_thread'.
8966 2012-01-13 Pedro Alves <palves@redhat.com>
8968 * server.c (main): Avoid infinite loop while detaching/killing
8971 2012-01-09 Doug Evans <dje@google.com>
8973 * server.c (start_inferior): Set last_ptid in --wrapper case.
8975 2012-01-06 Yao Qi <yao@codesourcery.com>
8977 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8979 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8981 2012-01-04 Yao Qi <yao@codesourcery.com>
8983 * tracepoint.c (cmd_qtdp): Print debug message
8984 for static tracepoint.
8986 2012-01-04 Yao Qi <yao@codesourcery.com>
8988 * tracepoint.c (trace_vdebug): Differentiate debug message
8989 between gdbserver and IPA.
8991 2012-01-03 Yao Qi <yao@codesourcery.com>
8993 * tracepoint.c (tracepoint_was_hit): Don't collect for
8996 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8998 * terminal.h: Reformat copyright header.
9000 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9002 * server.c (gdbserver_version): Update copyright year.
9003 * gdbreplay.c (gdbreplay_version): Likewise.
9005 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9007 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9010 2011-12-18 Hui Zhu <teawater@gmail.com>
9011 * linux-low.c (linux_create_inferior): Save return value to ret.
9013 2011-12-18 Hui Zhu <teawater@gmail.com>
9015 * linux-low.c (linux_create_inferior): Save return value to ret.
9017 2011-12-16 Doug Evans <dje@google.com>
9019 * linux-low.c (linux_create_inferior): If stdio connection,
9020 redirect stdin from /dev/null, stdout to stderr.
9021 * remote-utils.c (remote_is_stdio): New static global.
9022 (remote_connection_is_stdio): New function.
9023 (remote_prepare): Handle stdio connection.
9024 (remote_open): Ditto.
9025 (remote_close): Don't close stdin for stdio connections.
9026 (read_prim,write_prim): New functions. Replace all calls to
9027 read/write to these.
9028 * server.c (main): Watch for "-" argument. Move call to
9029 remote_prepare before start_inferior.
9030 * server.h (STDIO_CONNECTION_NAME): New macro.
9031 (remote_connection_is_stdio): Declare.
9033 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9034 in debugging output.
9036 2011-12-15 Yao Qi <yao@codesourcery.com>
9038 * tracepoint.c: Include sys/syscall.h.
9039 (gdb_ust_thread): Remove preprocessor conditional.
9041 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9043 * linux-low.c (linux_detach_one_lwp): Call
9044 the_low_target.prepare_to_resume before detaching.
9046 2011-12-14 Yao Qi <yao@codesourcery.com>
9048 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9051 2011-12-14 Yao Qi <yao@codesourcery.com>
9053 * i386-low.c (i386_low_stopped_data_address): Initialize local
9056 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9060 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9061 DR_CONTROL unless necessary. Extend comments.
9062 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9063 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9065 2011-12-13 Yao Qi <yao@codesourcery.com>
9067 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9069 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9071 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9073 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9074 Print new debug message for such case.
9076 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9078 Fix overlapping memcpy.
9079 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9080 the read_inferior_memory transfer.
9081 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9082 write_inferior_memory transfer.
9083 (set_fast_tracepoint_jump): New variable buf. Use it for the
9084 read_inferior_memory and write_inferior_memory transfers.
9085 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9086 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9087 Use it for the write_inferior_memory transfer.
9088 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9091 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9093 * linux-low.c (fetch_register, store_register): Make code
9094 consistent, fix formatting.
9096 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9098 * linux-low.c (usr_store_inferior_registers): Factor out code
9099 to handle individual registers into...
9100 (store_register): ... this new function.
9102 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9104 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9105 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9106 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9107 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9108 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9109 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9110 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9111 (srv_xmlfiles): Add new XML files.
9113 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9115 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9116 (init_registers_s390_linux32v1): Add prototype.
9117 (init_registers_s390_linux32v2): Likewise.
9118 (init_registers_s390_linux64v1): Likewise.
9119 (init_registers_s390_linux64v2): Likewise.
9120 (init_registers_s390x_linux64v1): Likewise.
9121 (init_registers_s390x_linux64v2): Likewise.
9122 (s390_num_regs): Increment to 52.
9123 (s390_regmap): Add orig_r2 register.
9124 (s390_num_regs_3264): Increment to 68.
9125 (s390_regmap_3264): Add orig_r2 register.
9126 (s390_collect_ptrace_register): Handle orig_r2 register.
9127 (s390_supply_ptrace_register): Likewise.
9128 (s390_fill_last_break): New function.
9129 (s390_store_last_break): Likewise.
9130 (s390_fill_system_call): New function.
9131 (s390_store_system_call): Likewise.
9132 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9134 (s390_check_regset): New function.
9135 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9136 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9137 Update target_regsets for available register sets.
9139 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9140 Jan Kratochvil <jan.kratochvil@redhat.com>
9142 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9143 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9145 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9146 * linux-low.h (struct process_info_private): New member r_debug.
9147 * server.c (handle_qxfer_libraries): Call
9148 the_target->qxfer_libraries_svr4.
9149 (handle_qxfer_libraries_svr4): New function.
9150 (qxfer_packets): New entry "libraries-svr4".
9151 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9152 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9153 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9154 PACKET_qXfer_libraries_svr4.
9156 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9158 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9159 PSW address/mask between 8-byte and 16-byte formats.
9160 (s390_supply_ptrace_register): Likewise.
9161 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9162 basic addressing mode bit.
9164 2011-11-24 Stan Shebs <stan@codesourcery.com>
9166 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9168 2011-11-17 Stan Shebs <stan@codesourcery.com>
9170 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9171 (tracing_start_time): New global.
9172 (tracing_stop_time): New global.
9173 (tracing_user_name): New global.
9174 (tracing_notes): New global.
9175 (tracing_stop_note): New global.
9176 (cmd_qtstart): Set traceframe_usage, start_time.
9177 (stop_tracing): Set stop_time.
9178 (cmd_qtstatus): Report additional status.
9179 (cmd_qtp): New function.
9180 (handle_tracepoint_query): Call it.
9181 (cmd_qtnotes): New function.
9182 (handle_tracepoint_general_set): Call it.
9183 (get_timestamp): Rename from tsv_get_timestamp.
9185 2011-11-14 Stan Shebs <stan@codesourcery.com>
9186 Kwok Cheung Yeung <kcy@codesourcery.com>
9188 * linux-x86-low.c (small_jump_insn): New.
9189 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9190 trampoline and error message, build a trampoline and issue a small
9191 jump instruction to it.
9192 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9193 trampoline and error message.
9194 (x86_get_min_fast_tracepoint_insn_len): New.
9195 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9196 * linux-low.h (struct linux_target_ops): Add arguments to
9197 install_fast_tracepoint_jump_pad operation, add new operation.
9198 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9200 (linux_get_min_fast_tracepoint_insn_len): New function.
9201 (linux_target_op): Add new operation.
9202 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9203 (gdb_trampoline_buffer_end): Ditto.
9204 (gdb_trampoline_buffer_error): Ditto.
9205 (struct ipa_sym_addresses): Add fields for new IPA variables.
9206 (symbol_list): Add entries for new IPA variables.
9207 (struct tracepoint): Add fields to hold the address range of the
9208 trampoline used by the tracepoint.
9209 (trampoline_buffer_head): New static variable.
9210 (trampoline_buffer_tail): Ditto.
9211 (claim_trampoline_space): New function.
9212 (have_fast_tracepoint_trampoline_buffer): New function.
9213 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9215 (install_fast_tracepoint): Ditto, also add error buffer argument.
9216 (cmd_qtminftpilen): New function.
9217 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9218 (fast_tracepoint_from_trampoline_address): New function.
9219 (fast_tracepoint_collecting): Handle trampoline as part of jump
9221 (set_trampoline_buffer_space): New function.
9222 (initialize_tracepoint): Initialize new IPA variables.
9223 * target.h (struct target_ops): Add arguments to
9224 install_fast_tracepoint_jump_pad operation, add new
9225 get_min_fast_tracepoint_insn_len operation.
9226 (target_get_min_fast_tracepoint_insn_len): New.
9227 (install_fast_tracepoint_jump_pad): Add arguments.
9228 * server.h (IPA_BUFSIZ): Define.
9229 * linux-i386-ipa.c: Include extra header files.
9230 (initialize_fast_tracepoint_trampoline_buffer): New function.
9231 (initialize_low_tracepoint): Call it.
9232 * server.h (set_trampoline_buffer_space): Declare.
9233 (claim_trampoline_space): Ditto.
9234 (have_fast_tracepoint_trampoline_buffer): Ditto.
9236 2011-11-14 Yao Qi <yao@codesourcery.com>
9238 * server.c (handle_query): Handle InstallInTrace for qSupported.
9239 * tracepoint.c (add_tracepoint): Sort list.
9240 (install_tracepoint, download_tracepoint): New.
9241 (cmd_qtdp): Call them to install and download tracepoints.
9242 (sort_tracepoints): Removed.
9243 (cmd_qtstart): Update.
9245 2011-11-14 Yao Qi <yao@codesourcery.com>
9247 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9248 * mem-break.h: Declare.
9249 * tracepoint.c (cmd_qtstart): Move some code to ...
9250 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9252 (download_tracepoints): Move some code to ...
9253 (download_tracepoint_1): ... here. New.
9255 2011-11-08 Yao Qi <yao@codesourcery.com>
9257 * remote-utils.c (relocate_instruction): A comment fix.
9259 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9261 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9262 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9263 dr_status_mirror and dr_control_mirror from debug_reg_state.
9264 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9265 (i386_initial_stuff): Remove use of deleted globals.
9266 (i386_get_thread_context, i386_set_thread_context,
9267 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9268 from debug_reg_state.
9270 2011-11-05 Yao Qi <yao@codesourcery.com>
9272 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9273 address as TPOINT's.
9275 2011-11-02 Stan Shebs <stan@codesourcery.com>
9277 * tracepoint.c (agent_mem_read_string): New function.
9278 (eval_agent_expr): Call it for tracenz.
9279 * server.c (handle_query): Report support for tracenz.
9281 2011-11-02 Yao Qi <yao@codesourcery.com>
9283 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9285 2011-11-02 Yao Qi <yao@codesourcery.com>
9287 * target.h: Fix a typo in comment.
9289 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9291 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9292 clobber the breakpoints' shadows with fast tracepoint jumps.
9293 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9294 * target.c (write_inferior_memory): Also pass MYADDR down to
9297 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9299 * configure.ac: Check support for personality routine.
9300 * configure: Regenerate.
9301 * config.in: Likewise.
9302 * linux-low.c: Include <sys/personality.h>.
9303 Define ADDR_NO_RANDOMIZE if necessary.
9304 (linux_create_inferior): Disable address space randomization when
9305 forking inferior, if requested.
9306 (linux_supports_disable_randomization): New function.
9307 (linux_target_ops): Install it.
9308 * server.h (disable_randomization): Declare.
9309 * server.c (disable_randomization): New global variable.
9310 (handle_general_set): Handle QDisableRandomization.
9311 (handle_query): Likewise for qSupported.
9312 (main): Support --disable-randomization and --no-disable-randomization
9313 command line arguments.
9314 * target.h (struct target_ops): Add supports_disable_randomization.
9315 (target_supports_disable_randomization): New macro.
9317 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9319 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9321 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9322 [!PT_GETDSBT] (target_loadmap): New definition.
9323 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9324 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9325 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9326 and PT_GETDSBT to LINUX_LOADMAP.
9327 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9328 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9330 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9332 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9333 (arm_linux_hwbp_cap): New static variable.
9334 (arm_linux_get_hwbp_cap): Replace by ...
9335 (arm_linux_init_hwbp_cap): ... this new function.
9336 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9337 (arm_linux_get_hw_watchpoint_count): Likewise.
9338 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9339 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9340 (arm_prepare_to_resume): Use perror_with_name instead of error.
9342 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9344 * linux-arm-low.c: Include <signal.h>.
9345 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9346 (struct arm_linux_hwbp_cap): New data type.
9347 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9348 (struct arm_linux_hw_breakpoint): New data type.
9349 (MAX_BPTS, MAX_WPTS): Define.
9350 (struct arch_process_info, struct arch_lwp_info): New data types.
9351 (arm_linux_get_hwbp_cap): New function.
9352 (arm_linux_get_hw_breakpoint_count): Likewise.
9353 (arm_linux_get_hw_watchpoint_count): Likewise.
9354 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9355 (arm_hwbp_control_initialize): Likewise.
9356 (arm_hwbp_control_is_enabled): Likewise.
9357 (arm_hwbp_control_is_initialized): Likewise.
9358 (arm_hwbp_control_disable): Likewise.
9359 (arm_linux_hw_breakpoint_equal): Likewise.
9360 (arm_linux_hw_point_initialize): Likewise.
9361 (struct update_registers_data): New data structure.
9362 (update_registers_callback: New function.
9363 (arm_insert_point): Likewise.
9364 (arm_remove_point): Likewise.
9365 (arm_stopped_by_watchpoint): Likewise.
9366 (arm_stopped_data_address): Likewise.
9367 (arm_new_process): Likewise.
9368 (arm_new_thread): Likewise.
9369 (arm_prepare_to_resume): Likewise.
9370 (the_low_target): Register arm_insert_point, arm_remove_point,
9371 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9372 arm_new_thread, and arm_prepare_to_resume.
9374 2011-09-15 Stan Shebs <stan@codesourcery.com>
9376 * server.h (struct emit_ops): Add compare-goto fields.
9377 * tracepoint.c (gdb_agent_op_sizes): New table.
9378 (emit_eq_goto): New function.
9379 (emit_ne_goto): New function.
9380 (emit_lt_goto): New function.
9381 (emit_le_goto): New function.
9382 (emit_gt_goto): New function.
9383 (emit_ge_goto): New function.
9384 (is_goto_target): New function.
9385 (compile_bytecodes): Recognize special cases of compare-goto
9386 combinations and call specialized emitters for them.
9387 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9388 (amd64_emit_ne_goto): New function.
9389 (amd64_emit_lt_goto): New function.
9390 (amd64_emit_le_goto): New function.
9391 (amd64_emit_gt_goto): New function.
9392 (amd64_emit_ge_goto): New function.
9393 (amd64_emit_ops): Add the new functions.
9394 (i386_emit_eq_goto): New function.
9395 (i386_emit_ne_goto): New function.
9396 (i386_emit_lt_goto): New function.
9397 (i386_emit_le_goto): New function.
9398 (i386_emit_gt_goto): New function.
9399 (i386_emit_ge_goto): New function.
9400 (i386_emit_ops): Add the new functions.
9402 2011-09-08 Stan Shebs <stan@codesourcery.com>
9404 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9405 (i386_emit_epilogue): Restore %ebx.
9407 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9409 * server.c (step_thread): Remove definition.
9410 (process_serial_event): Don't handle Hs.
9411 * server.h (step_thread): Remove declaration.
9412 * target.c (set_desired_inferior): Remove use of step_thread.
9414 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9416 * linux-low.c: Include linux-procfs.h.
9417 (linux_attach_lwp_1): Update comments.
9418 (linux_attach): Scan for existing threads when attaching to a
9419 process that is the tgid.
9420 * Makefile.in: Update dependencies.
9422 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9424 * configure.srv: Add linux-procfs.o dependencies.
9426 2011-08-14 Yao Qi <yao@codesourcery.com>
9428 * target.h (struct target_ops): Fix indent.
9429 * win32-low.c (win32_target_ops): Fix comment.
9431 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9432 Yao Qi <yao@codesourcery.com>
9434 * Makefile.in (clean): Remove tic6x-*.c files.
9435 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9436 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9437 (tic6x-c64xp-linux.c): Likewise.
9438 * configure.srv: Add support for tic6x-*-uclinux.
9439 * linux-tic6x-low.c: New.
9440 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9442 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9443 Yao Qi <yao@codesourcery.com>
9445 * target.h (struct target_ops): Add read_loadmap.
9446 * linux-low.c (struct target_loadseg): New type.
9447 (struct target_loadmap): New type.
9448 (linux_read_loadmap): New function.
9449 (linux_target_ops): Add linux_read_loadmap.
9450 * server.c (handle_query): Support qXfer:fdpic:read packet.
9451 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9454 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9456 * win32-low.c: Include <stdint.h>.
9458 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9460 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9461 to the inferior here.
9462 (i386_remove_aligned_watchpoint): Ditto.
9463 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9464 fit part of the watchpoint in the debug registers.
9465 (i386_update_inferior_debug_regs): New.
9466 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9467 registers, and only update the inferior on success.
9468 (i386_low_remove_watchpoint): Ditto.
9470 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9472 * linux-low.c (compare_ints, unique, list_threads, show_process,
9473 linux_core_of_thread): Delete.
9474 (linux_target_ops): Change linux_core_of_thread to
9475 linux_common_core_of_thread.
9476 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9477 * utils.c (malloc_failure): Change type of argument.
9478 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9479 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9480 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9481 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9482 (IPA_OBJS): Add common-utils-ipa.o.
9483 (ptid_h, linux_osdata_h): New macros.
9484 (server_h): Add common/common-utils.h, common/xml-utils.h,
9485 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9487 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9488 ptid.o, buffer.o): New rules.
9489 (linux-low.o): Add common/linux-osdata.h as a dependency.
9490 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9491 * configure.ac: Add AC_HEADER_DIRENT check.
9492 * config.in: Regenerate.
9493 * configure: Regenerate.
9494 * remote-utils.c (xml_escape_text): Delete.
9495 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9496 buffer_xml_printf): Move to common/buffer.c.
9497 * server.c (main): Remove call to initialize_inferiors.
9498 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9499 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9500 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9501 internal_error, gdb_assert, gdb_assert_fail): Delete.
9502 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9503 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9505 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9506 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9507 initialize_inferiors): Delete.
9509 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9511 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9514 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9516 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9518 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9520 2011-05-26 Yao Qi <yao@codesourcery.com>
9522 * Makefile.in (thread-db.o): Track dependence to
9523 common/gdb_thread_db.h.
9524 * thread-db.c: include gdb_thread_db.h from right place.
9526 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9528 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9529 __FILE__ and __LINE__ to internal_error.
9531 2011-05-13 Doug Evans <dje@google.com>
9533 * thread-db.c (try_thread_db_load_from_sdir): New function.
9534 (try_thread_db_load_from_dir): New function.
9535 (thread_db_load_search): Handle $sdir, ignore $pdir.
9536 Remove trying of system directories if search of
9537 libthread-db-search-path fails, that is now done via $sdir.
9539 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9541 * server.c (handle_query): Add EnableDisableTracepoints to the list
9542 of supported features.
9543 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9545 (cmd_qtenable_disable): New.
9546 (cmd_qtstart): Install tracepoints even if disabled.
9547 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9548 receiving a QTEnable or QTDisable packet.
9549 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9550 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9552 (gdb_probe): Skip data collection if static tracepoint is disabled.
9554 2011-05-10 Doug Evans <dje@google.com>
9556 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9558 2011-05-04 Doug Evans <dje@google.com>
9560 * linux-low.c (linux_join): Skip process lookup.
9561 * spu-low.c (spu_join): Ditto.
9562 * server.c (join_inferiors_callback): Delete.
9563 (process_serial_event): For 'D' packet (detach) call join_inferior
9566 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9568 * README: Don't mention xscale*-*-linux*.
9569 * configure.srv (xscale*-*-linux*): Don't handle target.
9571 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9573 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9575 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9576 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9577 (i386_emit_void_call_2): Likewise.
9579 2011-04-26 Yao Qi <yao@codesourcery.com>
9581 * linux-low.c: Move common macros to linux-ptrace.h.
9582 Include linux-ptrace.h.
9583 * Makefile.in (linux_ptrace_h): New.
9584 (linux-low.o): Depends on linux-ptrace.h.
9586 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9588 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9589 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9590 (remote_prepare): New function with most of the TCP code from ...
9591 (remote_open): ... here. Detect PORT here unconditionally. Move also
9592 setting transport_is_reliable.
9593 * server.c (run_once): New variable.
9594 (gdbserver_usage): Document it.
9595 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9596 the first run if RUN_ONCE.
9597 * server.h (run_once, remote_prepare): New declarations.
9599 2011-04-19 Tom Tromey <tromey@redhat.com>
9601 * win32-low.c (handle_load_dll): Remove duplicate "the".
9603 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9605 Remove support for old Cygwin 1.5 versions.
9606 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9607 function to avoid warning.
9608 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9611 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9613 * gdbserver/server.h (Macro _): Define it if not available.
9615 2011-03-14 Michael Snyder <msnyder@vmware.com>
9617 * hostio.c (handle_close): Remove unnecessary null test.
9619 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9621 * Makefile.in (maintainer-clean realclean distclean): Remove
9622 "make ... subdir_do" command.
9624 2011-03-10 Michael Snyder <msnyder@vmware.com>
9626 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9628 * server.c (handle_v_run): Free alloced buffer on early return.
9630 2011-03-09 Yao Qi <yao@codesourcery.com>
9633 2011-03-04 Yao Qi <yao@codesourcery.com>
9635 * Makefile.in: Remove GNU make feature --directory.
9637 2011-03-05 Yao Qi <yao@codesourcery.com>
9639 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9640 (subdir_do): New make target. Copied from gdb/Makefile.
9641 (maintainer-clean, realclean, distclean, clean): Call corresponding
9642 make targets in common/Makefile.
9644 2011-02-11 Yao Qi <yao@codesourcery.com>
9646 * configure.ac: Call AC_PROG_RANLIB.
9647 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9648 * configure: Regenerate.
9650 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9652 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9654 2011-03-06 Yao Qi <yao@codesourcery.com>
9656 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9658 2011-03-05 Yao Qi <yao@codesourcery.com>
9660 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9661 (subdir_do): New make target. Copied from gdb/Makefile.
9662 (maintainer-clean, realclean, distclean, clean): Call corresponding
9663 make targets in common/Makefile.
9665 2011-03-04 Yao Qi <yao@codesourcery.com>
9667 * Makefile.in: Remove GNU make feature --directory.
9669 2011-03-04 Michael Snyder <msnyder@vmware.com>
9671 * server.c (queue_stop_reply): Call xmalloc not malloc.
9673 2011-03-02 Michael Snyder <msnyder@vmware.com>
9675 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9677 2011-02-28 Michael Snyder <msnyder@vmware.com>
9679 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9680 (cmd_qtframe): Ditto.
9681 (cmd_qtbuffer): Ditto.
9682 (cmd_bigqtbuffer): Ditto.
9684 * utils.c (decimal2str): Initialize 'width' to nine, then
9687 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9689 * hostio.c (require_data): Free *data, not data.
9691 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9693 * hostio.c (require_data): Use free, not xfree.
9695 2011-02-27 Michael Snyder <msnyder@vmware.com>
9697 * server.c (handle_query): Discard unused value.
9699 * hostio.c (require_data): Free malloc memory before returning
9702 2011-02-26 Michael Snyder <msnyder@vmware.com>
9704 * linux-low.c (list_threads): Call closedir for dirent.
9706 2011-02-27 Michael Snyder <msnyder@vmware.com>
9708 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9709 a case statement falls through.
9711 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9713 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9716 2011-02-26 Michael Snyder <msnyder@vmware.com>
9718 * utils.c (decimal2str): Eliminate dead code and dead param.
9719 (pulongest): Drop dead param from call to decimal2str.
9722 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9724 Revert the following patch (not approved yet):
9725 2011-02-21 Hui Zhu <teawater@gmail.com>
9726 * tracepoint.c (tp_printf): New function.
9727 (eval_agent_expr): Handle gdb_agent_op_printf.
9729 2011-02-21 Hui Zhu <teawater@gmail.com>
9731 * tracepoint.c (tp_printf): New function.
9732 (eval_agent_expr): Handle gdb_agent_op_printf.
9734 2011-02-18 Tom Tromey <tromey@redhat.com>
9736 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9737 (tracepoint.o): Likewise.
9738 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9739 (gdb_agent_op_names): Likewise.
9741 2011-02-18 Tom Tromey <tromey@redhat.com>
9743 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9744 gdb_agent_op_rot>: New constants.
9745 (gdb_agent_op_names): Add pick and roll.
9746 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9749 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9751 * aclocal.m4: Regenerated with aclocal-1.11.1.
9753 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9755 * server.c (handle_qxfer_traceframe_info): New.
9756 (qxfer_packets): Register "traceframe-info".
9757 (handle_query): Report support for qXfer:traceframe-info:read+.
9758 * tracepoint.c (match_blocktype): New.
9759 (traceframe_find_block_type): Rename to ...
9760 (traceframe_walk_blocks): ... this. Add callback filter argument,
9762 (traceframe_find_block_type): New, reimplemented on top of
9763 traceframe_walk_blocks.
9764 (build_traceframe_info_xml): New.
9765 (traceframe_read_info): New.
9766 * server.h (traceframe_read_info): Declare.
9768 2011-02-11 Yao Qi <yao@codesourcery.com>
9770 * configure.ac: Call AC_PROG_RANLIB.
9771 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9772 * configure: Regenerate.
9774 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9776 * server.c (gdb_read_memory): Change return semantics to allow
9778 (handle_search_memory_1): Adjust.
9779 (process_serial_event) <'m' packet>: Handle partial transfers.
9780 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9782 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9784 * regcache.c (init_register_cache): Initialize
9785 regcache->register_status.
9786 (free_register_cache): Release regcache->register_status.
9787 (regcache_cpy): Copy register_status.
9788 (registers_to_string): Print 'x's for unavailable registers.
9789 (supply_register): Mark the register's status valid or
9790 unavailable, depending on whether a buffer was passed in or not.
9791 (supply_register_zeroed): New.
9792 (supply_regblock): Mark the registers' status valid or
9793 unavailable, depending on whether a buffer was passed in or not.
9794 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9795 (struct regcache): New `register_status' field.
9796 (supply_register_zeroed): Declare.
9797 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9798 supply_register_zeroed, rather than passing a NULL buffer to
9800 * tracepoint.c (fetch_traceframe_registers): Update comment.
9802 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9804 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9807 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9809 * server.h (decode_xfer_write): Change prototype.
9810 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9811 and don't extract the annex here.
9812 * server.c (decode_xfer_read): Remove `annex' parameter,
9813 and don't extract the annex here.
9815 (struct qxfer): New.
9816 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9817 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9818 (handle_qxfer_statictrace): New functions, abstracted out from
9819 handle_query, and made to use the struct qxfer interface.
9820 (handle_threads_qxfer_proper): Rename to ...
9821 (handle_qxfer_threads_proper): ... this.
9822 (handle_threads_qxfer): Rename to ...
9823 (handle_qxfer_threads): ... this. Adjust.
9824 (qxfer_packets): New array.
9825 (handle_qxfer): New function.
9826 (handle_query): Use handle_qxfer.
9828 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9830 * gdbreplay.c: Shorten lines of >= 80 columns.
9831 * linux-low.c: Ditto.
9832 * linux-ppc-low.c: Ditto.
9833 * linux-s390-low.c: Ditto.
9834 * linux-sparc-low.c: Ditto.
9835 * linux-x86-low.c: Ditto.
9836 * linux-xtensa-low.c: Ditto.
9837 * mem-break.c: Ditto.
9839 * regcache.h: Ditto.
9840 * remote-utils.c: Ditto.
9843 * thread-db.c: Ditto.
9844 * tracepoint.c: Ditto.
9846 * win32-low.h: Ditto.
9848 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9850 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9853 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9855 * server.c (gdbserver_version): Update copyright year in version
9857 * gdbreplay.c (gdbreplay_version): Ditto.
9859 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9861 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9862 * linux-bfin-low.c: New file.
9863 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9864 PT_DATA_ADDR for BFIN targets.
9865 * Makefile.in (SFILES): Add linux-bfin-low.c.
9866 (clean): Remove reg-bfin.c.
9867 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9868 * README: Mention supported Blackfin targets.
9870 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9872 * .gitignore: New file.
9874 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9876 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9878 2010-10-22 Jie Zhang <jie@codesourcery.com>
9880 * Makefile.in: Add FLAGS_TO_PASS variable.
9881 (install): Remove dependency of install-only and recursively
9882 invoke make for install-only.
9884 2010-10-04 Doug Evans <dje@google.com>
9886 * Makefile.in (uninstall): Use $(DESTDIR).
9888 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9892 * linux-x86-low.c (compat_siginfo_from_siginfo)
9893 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9894 si_code is < 0. Check for si_code == SI_TIMER before checking for
9897 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9899 * lynx-i386-low.c: New file.
9900 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9902 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9904 * lynx-low.c (ptrace_request_to_str): Remove handling for
9905 request values that have been removed in LynxOS 5.x.
9907 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9909 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9912 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9914 * configure.ac: Add --enable-inprocess-agent option.
9915 * configure: Rebuilt.
9917 2010-09-06 Yao Qi <yao@codesourcery.com>
9919 * linux-low.c (linux_kill): Remove unused variable.
9920 (linux_stabilize_threads): Likewise.
9921 * server.c (start_inferior): Likewise.
9922 (queue_stop_reply_callback): Likewise.
9923 * tracepoint.c (do_action_at_tracepoint): Likewise.
9925 2010-09-06 Yao Qi <yao@codesourcery.com>
9927 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9930 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9932 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9934 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9936 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9939 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9941 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9942 gdbserver/lynx-ppc-low.c: New files.
9943 * Makefile.in (lynx_low_h): New variable.
9944 (lynx-low.o, lynx-ppc-low.o): New rules.
9945 * configure.ac: On LynxOS, link with -lnetinet.
9946 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9947 * configure: regenerate.
9949 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9951 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9952 * configure.ac: Add check for vasprintf and vsnprintf.
9953 * configure, config.in: Regenerate.
9954 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9956 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9958 * gdbreplay.c: Move include of alloca.h up, next to include of
9960 * server.h: Add include of malloc.h.
9961 * mem-break.c: Remove include of malloc.h.
9962 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9964 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9966 * Makefile.in (memmem.o): Build with -Wno-error.
9968 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9970 * utils.c (xsnprintf): Make non-static.
9971 * server.h: Add xsnprintf declaration.
9972 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9973 replace calls to snprintf by calls to xsnprintf throughout.
9975 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9977 * configure.ac: Add configure check for alloca.
9978 * configure, config.in: Regenerate.
9979 * server.h: Include alloca.h if it exists.
9980 * gdbreplay.c: Include alloca.h if it exists.
9982 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9984 * linux-low.c (__SIGRTMIN): Define if not already defined.
9985 (linux_create_inferior): Check for __ANDROID__ rather than
9987 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9988 are already deferred.
9989 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9990 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9991 stopped and already has a pending signal to report.
9992 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9993 a pending signal to report or is moving out of a jump pad.
9994 (linux_init_signals): Check for __ANDROID__ rather than
9997 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9999 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10000 debug_threads check. Avoid a linear search when not doing debug
10003 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10005 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10006 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10007 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10008 (process_event): Change local fd's type to gdb_fildes_t.
10009 (create_file_handler): Adjust prototype.
10010 (delete_file_handler): Adjust prototype.
10011 (handle_file_event): Adjust prototype. Use pfildes.
10012 (create_file_event): Adjsut prototype.
10013 * remote-utils.c (remote_desc, listen_desc): Change type to
10015 * server.h: New gdb_fildes_t typedef.
10016 [USE_WIN32API]: Include winsock2.h.
10017 (delete_file_handler, add_file_handler): Adjust prototypes.
10018 (pfildes): Declare.
10019 * utils.c (pfildes): New.
10021 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10023 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10024 * configure: Regenerate.
10026 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10028 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10029 (linux_done_accessing_memory): ... this.
10030 (linux_target_ops): Adjust.
10031 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10032 * nto-low.c (nto_target_ops): Adjust comment.
10033 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10034 * spu-low.c (spu_target_ops): Adjust comment.
10035 * target.h (target_ops): Rename unprepare_to_access_memory field
10036 to done_accessing_memory.
10037 (unprepare_to_access_memory): Rename to ...
10038 (done_accessing_memory): ... this.
10040 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10042 * linux-low.c (linux_prepare_to_access_memory): New.
10043 (linux_unprepare_to_access_memory): New.
10044 (linux_target_ops): Install them.
10045 * server.c (read_memory): Rename to ...
10046 (gdb_read_memory): ... this. Use
10047 prepare_to_access_memory/prepare_to_access_memory.
10048 (write_memory): Rename to ...
10049 (gdb_write_memory): ... this. Use
10050 prepare_to_access_memory/prepare_to_access_memory.
10051 (handle_search_memory_1): Adjust.
10052 (process_serial_event): Adjust.
10053 * target.h (struct target_ops): New fields
10054 prepare_to_access_memory and unprepare_to_access_memory.
10055 (prepare_to_access_memory, unprepare_to_access_memory): New.
10056 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10057 prepare_to_access_memory/prepare_to_access_memory.
10058 * nto-low.c (nto_target_ops): Adjust.
10059 * spu-low.c (spu_target_ops): Adjust.
10060 * win32-low.c (win32_target_ops): Adjust.
10062 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10064 * Makefile.in (WARN_CFLAGS): Get it from configure.
10065 (WERROR_CFLAGS): New.
10066 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10067 * configure.ac: Introduce --enable-werror, which adds -Werror to
10068 the compiler command line. Enabled by default. Disable with
10069 --disable-werror. Add -Wdeclaration-after-statement
10070 Wpointer-arith and -Wformat-nonliteral to warning flags.
10071 * configure: Regenerate.
10073 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10075 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10077 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10079 * gdbreplay.c (remote_error): New.
10081 (expect): Use gdbchar. Check for error reading from GDB.
10082 Clarify sync error output.
10083 (play): Check for errors writing to GDB.
10084 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10085 * remote-utils.c (getpkt): Check for errors writing to the remote
10088 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10090 * linux-low.c (linux_wait_1): Move non-debugging code out of
10091 `debug_threads' control.
10093 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10095 * linux-low.c (linux_wait_1): Don't set last_status here.
10096 * server.c (push_event, queue_stop_reply_callback): Assert we're
10097 not pushing a TARGET_WAITKIND_IGNORE event.
10098 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10099 (myresume, handle_target_event): Set the thread's last_resume_kind
10100 and last_status from the target returned status.
10102 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10106 * linux-x86-low.c (update_debug_registers_callback): New.
10107 (i386_dr_low_set_addr): Use it.
10108 (i386_dr_low_get_addr): New.
10109 (i386_dr_low_set_control): Use update_debug_registers_callback.
10110 (i386_dr_low_get_control): New.
10111 (i386_dr_low_get_status): Adjust.
10112 * linux-low.c (linux_stop_lwp): New.
10113 * linux-low.h (linux_stop_lwp): Declare.
10115 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10116 argument instead of a i386_debug_reg_state.
10117 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10118 a i386_debug_reg_state.
10119 (i386_insert_aligned_watchpoint): Adjust.
10120 (i386_remove_aligned_watchpoint): Adjust.
10121 (i386_low_stopped_data_address): Read the debug registers from the
10122 inferior instead of from the mirrors.
10123 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10124 (i386_dr_low_get_addr): Declare.
10125 (i386_dr_low_get_control): Declare.
10126 (i386_dr_low_get_status): Change prototype.
10128 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10129 (i386_dr_low_get_addr): New.
10130 (i386_dr_low_get_control): New.
10131 (i386_dr_low_get_status): Adjust prototype. Return
10133 (i386_initial_stuff): Clear dr_status_mirror and
10135 (i386_get_thread_context): Adjust.
10136 (i386_set_thread_context): Adjust.
10137 (i386_thread_added): Adjust.
10139 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10141 * linux-low.h (linux_thread_area): Delete declaration.
10143 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10145 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10146 after its termination.
10148 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10150 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10151 (gdb_wants_all_stopped): Delete.
10152 (linux_wait_1): Don't call them.
10153 * server.c (handle_v_cont): Tag all threads as want-stopped.
10154 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10155 stopped as "client-wants-stopped".
10157 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10159 * Makefile.in (signals_h): New.
10160 (server_h): Depend on it.
10161 (server.o): Don't depend on $(signals_def).
10162 (signals.o): Depend on $(signals_def).
10164 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10166 * Makefile.in (signals_def): New.
10167 (server_h): Append include/gdb/signals.h and signals_def.
10168 (server.o): Append signals_def.
10170 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10172 * server.c (handle_target_event): Use target_signal_to_host for
10173 resume_info.sig initialization.
10174 * target.h (struct thread_resume) <sig>: New comment.
10176 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10178 * server.c (handle_query): strcpy() the returned string from paddress()
10179 instead of sprintf().
10180 * utils.c (paddress): Return phex_nz().
10182 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10184 * server.c (handle_v_cont): Call mourn_inferior if process
10186 (myresume): Likewise.
10188 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10190 Static tracepoints, and integration with UST.
10192 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10193 * mem-break.c (uninsert_all_breakpoints)
10194 (reinsert_all_breakpoints): New.
10195 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10196 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10197 (gdb_agent_ust_loaded, helper_thread_id)
10198 (gdb_agent_helper_thread_id): New macros.
10199 (struct ipa_sym_addresses): Add addr_ust_loaded,
10200 addr_helper_thread_id, addr_cmd_buf.
10201 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10202 (in_process_agent_loaded_ust): New.
10203 (write_e_ust_not_loaded): New.
10204 (maybe_write_ipa_ust_not_loaded): New.
10205 (struct collect_static_trace_data_action): New.
10206 (enum tracepoint_type) <static_tracepoint>: New.
10207 (struct tracepoint) <handle>: Mention static tracepoints.
10208 (struct static_tracepoint_ctx): New.
10209 (CMD_BUF_SIZE): New.
10210 (add_tracepoint_action): Handle static tracepoint actions.
10211 (unprobe_marker_at): New.
10212 (clear_installed_tracepoints): Handle static tracepoints.
10213 (cmd_qtdp): Handle static tracepoints.
10214 (probe_marker_at): New.
10215 (cmd_qtstart): Handle static tracepoints.
10216 (response_tracepoint): Handle static tracepoints.
10217 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10218 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10219 (get_context_regcache): Handle static tracepoints.
10220 (do_action_at_tracepoint): Handle static tracepoint actions.
10221 (traceframe_find_block_type): Handle static trace data blocks.
10222 (traceframe_read_sdata): New.
10223 (download_tracepoints): Download static tracepoint actions.
10224 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10225 (GDB_PROBE_NAME): New.
10227 (GET_UST_SYM): New.
10230 (ust_marker_to_static_tracepoint): New.
10232 (collect_ust_data_at_tracepoint): New.
10233 (gdb_ust_probe): New.
10234 (UNIX_PATH_MAX, SOCK_DIR): New.
10235 (gdb_ust_connect_sync_socket): New.
10236 (resume_thread, stop_thread): New.
10237 (run_inferior_command): New.
10238 (init_named_socket): New.
10239 (gdb_ust_socket_init): New.
10240 (cstr_to_hexstr): New.
10242 (first_marker, next_marker): New.
10243 (response_ust_marker): New.
10244 (cmd_qtfstm, cmd_qtsstm): New.
10245 (unprobe_marker_at, probe_marker_at): New.
10246 (cmd_qtstmat, gdb_ust_thread): New.
10247 (gdb_ust_init): New.
10248 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10249 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10250 (ST_REGENTRY): New.
10251 (x86_64_st_collect_regmap): New.
10252 (X86_64_NUM_ST_COLLECT_GREGS): New.
10253 (AMD64_RIP_REGNUM): New.
10254 (supply_static_tracepoint_registers): New.
10255 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10256 (ST_REGENTRY): New.
10257 (i386_st_collect_regmap): New.
10258 (i386_NUM_ST_COLLECT_GREGS): New.
10259 (supply_static_tracepoint_registers): New.
10260 * server.c (handle_query): Handle qXfer:statictrace:read.
10261 <qSupported>: Report support for StaticTracepoints, and
10262 qXfer:statictrace:read features.
10263 * server.h (traceframe_read_sdata)
10264 (supply_static_tracepoint_registers): Declare.
10265 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10266 (unpack_varlen_hex): Include in IPA build.
10267 * Makefile.in (ustlibs, ustinc): New.
10268 (IPA_OBJS): Add remote-utils-ipa.o.
10269 ($(IPA_LIB)): Link -ldl and -lpthread.
10271 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10272 * config.in, configure: Regenerate.
10274 2010-06-20 Ian Lance Taylor <iant@google.com>
10275 Pedro Alves <pedro@codesourcery.com>
10277 * linux-x86-low.c (always_true): Delete.
10278 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10279 trying to fool the compiler with always_true.
10281 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10283 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10284 conditions in gdbserver.
10286 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10288 * spu-low.c (spu_read_memory): Wrap around local store limit.
10289 (spu_write_memory): Likewise.
10291 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10293 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10294 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10296 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10298 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10299 uses with LONGEST uses.
10301 2010-06-14 Stan Shebs <stan@codesourcery.com>
10302 Pedro Alves <pedro@codesourcery.com>
10306 * linux-x86-low.c: Include limits.h.
10308 (always_true): New.
10311 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10312 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10313 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10314 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10315 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10316 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10317 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10318 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10319 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10320 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10321 (amd64_emit_void_call_2): New.
10322 (amd64_emit_ops): New.
10323 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10324 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10325 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10326 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10327 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10328 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10329 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10330 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10331 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10332 (i386_emit_stack_adjust, i386_emit_int_call_1)
10333 (i386_emit_void_call_2): New.
10334 (i386_emit_ops): New.
10335 (x86_emit_ops): New.
10336 (the_low_target): Install x86_emit_ops.
10337 * server.h (struct emit_ops): New.
10338 (get_raw_reg_func_addr): Declare.
10339 (current_insn_ptr, emit_error): Declare.
10340 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10341 (set_trace_state_variable_value): New defines.
10342 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10343 addr_get_trace_state_variable_value and
10344 addr_set_trace_state_variable_value.
10345 (symbol_list): New fields for get_raw_reg,
10346 get_trace_state_variable_value and set_trace_state_variable_value.
10347 (condfn): New typedef.
10348 (struct tracepoint): New field `compiled_cond'.
10349 (do_action_at_tracepoint): Clear compiled_cond.
10350 (get_trace_state_variable_value, set_trace_state_variable_value):
10352 (condition_true_at_tracepoint): If there's a compiled condition,
10354 (current_insn_ptr, emit_error): New globals.
10355 (struct bytecode_address): New.
10356 (get_raw_reg_func_addr): New.
10357 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10358 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10359 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10360 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10361 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10362 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10363 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10364 (compile_tracepoint_condition, compile_bytecodes): New.
10365 * target.h (emit_ops): Forward declare.
10366 (struct target_ops): New field emit_ops.
10367 (target_emit_ops): New.
10368 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10369 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10370 * linux-low.c (linux_emit_ops): New.
10371 (linux_target_ops): Install it.
10372 * linux-low.h (struct linux_target_ops): New field emit_ops.
10374 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10376 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10377 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10379 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10380 Stan Shebs <stan@codesourcery.com>
10382 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10383 (all): Depend on $(extra_libraries).
10384 (install-only): Install the IPA.
10385 (IPA_OBJS, IPA_LIB): New.
10386 (clean): Remove the IPA lib.
10387 (IPAGENT_CFLAGS): New.
10388 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10389 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10390 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10391 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10392 * configure.ac: Check for atomic builtins support in the compiler.
10393 (IPA_DEPFILES, extra_libraries): Define.
10394 * configure.srv (ipa_obj): Add description.
10395 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10396 (i[34567]86-*-linux*): Set ipa_obj.
10397 (x86_64-*-linux*): Set ipa_obj.
10398 * linux-low.c (stabilizing_threads): New.
10399 (supports_fast_tracepoints): New.
10400 (linux_detach): Stabilize threads before detaching.
10401 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10402 the lwp is either not stabilizing, or is moving out of a jump pad.
10403 (linux_fast_tracepoint_collecting): New.
10404 (maybe_move_out_of_jump_pad): New.
10405 (enqueue_one_deferred_signal): New.
10406 (dequeue_one_deferred_signal): New.
10407 (linux_wait_for_event_1): If moving out of a jump pad, defer
10408 pending signals to later.
10409 (linux_stabilize_threads): New.
10410 (linux_wait_1): Check if threads need moving out of jump pads, and
10412 (stuck_in_jump_pad_callback): New.
10413 (move_out_of_jump_pad_callback): New.
10414 (lwp_running): New.
10415 (linux_resume_one_lwp): Handle moving out of jump pads.
10416 (linux_set_resume_request): Dequeue deferred signals.
10417 (need_step_over_p): Also step over fast tracepoint jumps.
10418 (start_step_over): Also uninsert fast tracepoint jumps.
10419 (finish_step_over): Also reinsert fast tracepoint jumps.
10420 (linux_install_fast_tracepoint_jump): New.
10421 (linux_target_ops): Install linux_stabilize_threads and
10422 linux_install_fast_tracepoint_jump_pad.
10423 * linux-low.h (linux_target_ops) <get_thread_area,
10424 install_fast_tracepoint_jump_pad>: New fields.
10425 (struct lwp_info) <collecting_fast_tracepoint,
10426 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10427 (linux_get_thread_area): Declare.
10428 * linux-x86-low.c (jump_insn): New.
10429 (x86_get_thread_area): New.
10430 (append_insns): New.
10431 (push_opcode): New.
10432 (amd64_install_fast_tracepoint_jump_pad): New.
10433 (i386_install_fast_tracepoint_jump_pad): New.
10434 (x86_install_fast_tracepoint_jump_pad): New.
10435 (the_low_target): Install x86_get_thread_area and
10436 x86_install_fast_tracepoint_jump_pad.
10437 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10438 (struct fast_tracepoint_jump): New.
10439 (fast_tracepoint_jump_insn): New.
10440 (fast_tracepoint_jump_shadow): New.
10441 (find_fast_tracepoint_jump_at): New.
10442 (fast_tracepoint_jump_here): New.
10443 (delete_fast_tracepoint_jump): New.
10444 (set_fast_tracepoint_jump): New.
10445 (uninsert_fast_tracepoint_jumps_at): New.
10446 (reinsert_fast_tracepoint_jumps_at): New.
10447 (set_breakpoint_at): Use write_inferior_memory.
10448 (uninsert_raw_breakpoint): Use write_inferior_memory.
10449 (check_mem_read): Mask out fast tracepoint jumps.
10450 (check_mem_write): Mask out fast tracepoint jumps.
10451 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10452 (set_fast_tracepoint_jump): Declare.
10453 (delete_fast_tracepoint_jump)
10454 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10455 (reinsert_fast_tracepoint_jumps_at): Declare.
10456 * regcache.c: Don't compile many functions when building the
10457 in-process agent library.
10458 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10459 the register buffer in the heap.
10460 (free_register_cache): If the register buffer isn't owned by the
10461 regcache, don't free it.
10462 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10463 pre-existing register caches.
10464 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10466 (convert_ascii_to_int): : Constify `from' parameter type.
10467 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10468 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10469 the needed buffer in-place.
10470 (relocate_instruction): New.
10471 * server.c (handle_query) <qSymbols>: If the target supports
10472 tracepoints, give it a chance of looking up symbols. Report
10473 support for fast tracepoints.
10474 (handle_status): Stabilize threads.
10475 (process_serial_event): Adjust.
10476 * server.h (struct fast_tracepoint_jump): Forward declare.
10477 (struct process_info) <fast_tracepoint_jumps>: New field.
10478 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10479 (decode_X_packet, decode_M_packet): Adjust.
10480 (relocate_instruction): Declare.
10481 (in_process_agent_loaded): Declare.
10482 (tracepoint_look_up_symbols): Declare.
10483 (struct fast_tpoint_collect_status): Declare.
10484 (fast_tracepoint_collecting): Declare.
10485 (force_unlock_trace_buffer): Declare.
10486 (handle_tracepoint_bkpts): Declare.
10487 (initialize_low_tracepoint)
10488 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10489 * target.h (struct target_ops) <stabilize_threads,
10490 install_fast_tracepoint_jump_pad>: New fields.
10491 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10492 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10493 [HAVE_STDINT_H]: Include stdint.h.
10494 (trace_debug_1): Rename to ...
10495 (trace_vdebug): ... this.
10496 (trace_debug): Rename to ...
10497 (trace_debug_1): ... this. Add `level' parameter.
10498 (trace_debug): New.
10499 (ATTR_USED, ATTR_NOINLINE): New.
10500 (IP_AGENT_EXPORT): New.
10501 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10502 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10503 (about_to_request_buffer_space, trace_buffer_is_full)
10504 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10505 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10506 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10507 (traceframe_write_count, traceframes_created)
10508 (trace_state_variables)
10509 New renaming defines.
10510 (struct ipa_sym_addresses): New.
10511 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10512 (symbol_list): New.
10513 (ipa_sym_addrs): New.
10514 (all_tracepoint_symbols_looked_up): New.
10515 (in_process_agent_loaded): New.
10516 (write_e_ipa_not_loaded): New.
10517 (maybe_write_ipa_not_loaded): New.
10518 (tracepoint_look_up_symbols): New.
10519 (debug_threads) [IN_PROCESS_AGENT]: New.
10520 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10521 (UNKNOWN_SIDE_EFFECTS): New.
10522 (stop_tracing): New.
10523 (flush_trace_buffer): New.
10524 (stop_tracing_bkpt): New.
10525 (flush_trace_buffer_bkpt): New.
10526 (read_inferior_integer): New.
10527 (read_inferior_uinteger): New.
10528 (read_inferior_data_pointer): New.
10529 (write_inferior_data_pointer): New.
10530 (write_inferior_integer): New.
10531 (write_inferior_uinteger): New.
10532 (struct collect_static_trace_data_action): Delete.
10533 (enum tracepoint_type): New.
10534 (struct tracepoint) <type>: New field `type'.
10535 <actions_str, step_actions, step_actions_str>: Only include in
10537 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10538 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10539 (tracepoints): Use IP_AGENT_EXPORT.
10540 (last_tracepoint): Don't include in the IPA.
10541 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10542 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10543 (alloced_trace_state_variables): New.
10544 (trace_state_variables): Use IP_AGENT_EXPORT.
10545 (traceframe_t): Delete unused variable.
10546 (circular_trace_buffer): Don't include in the IPA.
10547 (trace_buffer_start): Delete.
10548 (struct trace_buffer_control): New.
10549 (trace_buffer_free): Delete.
10550 (struct ipa_trace_buffer_control): New.
10551 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10552 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10554 (trace_buffer_ctrl): New.
10555 (TRACE_BUFFER_CTRL_CURR): New.
10556 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10557 Reimplement as macros.
10558 (trace_buffer_wrap): Delete.
10559 (traceframe_write_count, traceframe_read_count)
10560 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10561 (struct tracepoint_hit_ctx) <type>: New field.
10562 (struct fast_tracepoint_ctx): New.
10563 (memory_barrier): New.
10565 (record_tracepoint_error): Update atomically in the IPA.
10566 (clear_inferior_trace_buffer): New.
10567 (about_to_request_buffer_space): New.
10568 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10569 updating the same buffer.
10570 (add_tracepoint): Default the tracepoint's type to trap
10571 tracepoint, and orig_size to -1.
10572 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10573 internal variables.
10574 (create_trace_state_variable): New parameter `gdb'. Handle it.
10575 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10576 (cmd_qtdp): Handle fast tracepoints.
10577 (cmd_qtdv): Adjust.
10578 (max_jump_pad_size): New.
10579 (gdb_jump_pad_head): New.
10580 (get_jump_space_head): New.
10581 (claim_jump_space): New.
10582 (sort_tracepoints): New.
10583 (MAX_JUMP_SIZE): New.
10584 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10586 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10587 support. Upload fast traceframes, and delete internal IPA
10589 (stop_tracing_handler): New.
10590 (flush_trace_buffer_handler): New.
10591 (cmd_qtstop): Upload fast tracepoints.
10592 (response_tracepoint): Handle fast tracepoints.
10593 (tracepoint_finished_step): Upload fast traceframes. Set the
10594 tracepoint hit context's tracepoint type.
10595 (handle_tracepoint_bkpts): New.
10596 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10597 type. Add comment about fast tracepoints.
10598 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10599 non-existing action_str field.
10600 (get_context_regcache): Handle fast tracepoints.
10601 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10603 (fast_tracepoint_from_jump_pad_address): New.
10604 (fast_tracepoint_from_ipa_tpoint_address): New.
10605 (collecting_t): New.
10606 (force_unlock_trace_buffer): New.
10607 (fast_tracepoint_collecting): New.
10609 (gdb_collect): New.
10610 (write_inferior_data_ptr): New.
10611 (target_tp_heap): New.
10612 (target_malloc): New.
10613 (download_agent_expr): New.
10615 (download_tracepoints): New.
10616 (download_trace_state_variables): New.
10617 (upload_fast_traceframes): New.
10618 (IPA_FIRST_TRACEFRAME): New.
10619 (IPA_NEXT_TRACEFRAME_1): New.
10620 (IPA_NEXT_TRACEFRAME): New.
10621 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10622 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10623 (gdb_jump_pad_buffer_end): New.
10624 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10625 (initialize_tracepoint): Adjust.
10626 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10627 buffer. Initialize the low module.
10628 * utils.c (PREFIX, TOOLNAME): New.
10629 (malloc_failure): Use PREFIX.
10630 (error): In the IPA, an error causes an exit.
10631 (fatal, warning): Use PREFIX.
10632 (internal_error): Use TOOLNAME.
10633 (NUMCELLS): Increase to 10.
10634 * configure, config.in: Regenerate.
10636 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10638 * server.c (handle_query) <qSupported>: Do two passes over the
10639 qSupported string to avoid nesting strtok.
10641 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10643 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10645 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10646 -Wl,--dynamic-list.
10647 * configure: Regenerate.
10648 * proc-service.list: New.
10650 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10652 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10655 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10657 * gdbreplay.c (remote_open): Check error return from socket() call by
10658 its equality to -1 not by it being negative.
10659 * remote-utils.c (remote_open): Likewise.
10661 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10663 * config.h: Regenerate.
10665 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10667 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10668 doesn't provide PTRACE_GET_THREAD_AREA.
10670 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10672 * linux-m68k-low.c: Include <asm/ptrace.h>
10673 (ps_get_thread_area): Implement.
10675 2010-05-03 Doug Evans <dje@google.com>
10677 * event-loop.c (struct callback_event): New struct.
10678 (callback_list): New global.
10679 (append_callback_event, delete_callback_event): New functions.
10680 (process_callback): New function.
10681 (start_event_loop): Call it.
10682 * remote-utils.c (NOT_SCHEDULED): Define.
10683 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10684 moved out of readchar.
10685 (readchar): Rewrite. Call reschedule before returning.
10686 (reset_readchar): New function.
10687 (remote_close): Call it.
10688 (process_remaining, reschedule): New functions.
10689 * server.h (callback_handler_func): New typedef.
10690 (append_callback_event, delete_callback_event): Declare.
10692 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10694 * proc-service.c (ps_pglobal_lookup): Use
10695 thread_db_look_up_one_symbol.
10696 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10697 parameter. Use it instead of all_symbols_looked_up.
10698 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10700 (all_symbols_looked_up): Don't declare.
10701 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10702 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10704 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10705 Set all_symbols_looked_up here.
10706 (thread_db_look_up_one_symbol): New.
10707 (thread_db_get_tls_address): Adjust.
10708 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10709 thread_db object on the heap, and tentatively set it in the
10711 (thread_db_init): Don't set all_symbols_looked_up here.
10712 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10714 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10716 * linux-low.c (linux_kill, linux_detach): Adjust.
10717 (status_pending_p_callback): Remove redundant statement. Check
10718 for !TARGET_WAITIKIND_IGNORE, instead of
10719 TARGET_WAITKIND_STOPPED.
10720 (handle_tracepoints): Make sure LWP is locked. Adjust.
10721 (linux_wait_for_event_1): Adjust.
10722 (linux_cancel_breakpoints): New.
10723 (unsuspend_one_lwp): New.
10724 (unsuspend_all_lwps): New.
10725 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10726 (send_sigstop_callback): Change return type to int, add new
10727 `except' parameter and handle it.
10728 (suspend_and_send_sigstop_callback): New.
10729 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10730 pass them down. If SUSPEND, also increment the lwp's suspend
10732 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10733 (need_step_over_p): Don't consider suspended LWPs.
10734 (start_step_over): Adjust.
10735 (proceed_one_lwp): Change return type to int, add new `except'
10736 parameter and handle it.
10737 (unsuspend_and_proceed_one_lwp): New.
10738 (proceed_all_lwps): Use find_inferior instead of
10740 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10741 also decrement the suspend count of LWPs. Pass `except' down,
10742 instead of hacking its suspend count.
10743 (linux_pause_all): Add `freeze' parameter. Adjust.
10744 (linux_unpause_all): New.
10745 (linux_target_ops): Install linux_unpause_all.
10746 * server.c (handle_status): Adjust.
10747 * target.h (struct target_ops): New fields `unpause_all' and
10748 `cancel_breakpoints'. Add new parameter to `pause_all'.
10749 (pause_all): Add new `freeze' parameter.
10750 (unpause_all): New.
10751 (cancel_breakpoints): New.
10752 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10753 cancel breakpoints.
10754 (cmd_qtstart): Pause threads.
10755 (stop_tracing): Pause threads, and cancel breakpoints.
10756 * win32-low.c (win32_target_ops): Adjust.
10758 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10760 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10761 the inferior right away from here...
10762 (linux_wait_1): ... to here, and adjust to check the thread's
10763 last_resume_kind instead of the lwp's step or stop_expected flags.
10765 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10767 * README: Use consistent `GDB' and `GDBserver' spellings.
10769 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10771 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10772 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10773 (linux_detach_one_lwp): Assume the lwp is stopped.
10774 (any_thread_of): Delete.
10775 (linux_detach): Stop all lwps here. Don't blindly delete all
10777 (delete_lwp_callback): New.
10778 (linux_mourn): Delete all lwps of the process that is gone.
10779 (linux_wait_1): Don't delete the last lwp of the process here.
10780 * mem-break.h (mark_breakpoints_out): Declare.
10781 * mem-break.c (mark_breakpoints_out): New.
10782 (free_all_breakpoints): Use it.
10783 * server.c (handle_target_event): If the process is gone, mark
10785 * thread-db.c (struct thread_db) <create_bp>: New field.
10786 (thread_db_enable_reporting): Fix prototype. Store a thread event
10787 breakpoint reference in the thread_db struct.
10788 (thread_db_load_search): Clear the thread_db object.
10789 (try_thread_db_load_1): Ditto.
10790 (switch_to_process): New.
10791 (disable_thread_event_reporting): Use it.
10792 (remove_thread_event_breakpoints): New.
10793 (thread_db_detach, thread_db_mourn): Use it.
10795 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10797 * linux-low.c (linux_enable_event_reporting): New.
10798 (linux_wait_for_event_1, handle_extended_wait): Use it.
10800 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10802 * linux-low.c (linux_kill_one_lwp, linux_kill)
10803 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10804 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10805 SIGSTOP even if the LWP is stopped.
10806 (send_sigstop_callback): New.
10807 (stop_all_lwps): Use send_sigstop_callback instead.
10808 (linux_resume_one_thread): Adjust.
10809 (proceed_one_lwp): Still proceed an LWP that the client has
10810 requested to stop, if we haven't reported it as stopped yet. Make
10811 sure that LWPs the client want stopped, have a pending SIGSTOP.
10813 2010-04-26 Doug Evans <dje@google.com>
10815 * server.c (handle_general_set): Make static.
10817 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10818 Print received char after testing for error/eof instead of before.
10819 (input_interrupt): Tweak comment.
10821 2010-04-23 Doug Evans <dje@google.com>
10823 * server.c (start_inferior): Print inferior argv if --debug.
10825 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10827 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10828 * nto-x86-low.c: Include server.h
10830 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10832 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10833 be consistent with other sources of this directory.
10834 (init_registers_amd64): Correct name of source file of this function
10837 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10839 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10840 64-bit executables.
10842 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10844 * win32-i386-low.c: Add 64-bit support.
10845 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10846 (init_registers_amd64): Declare.
10847 (mappings): Add 64-bit version of array.
10848 (init_windows_x86): New function.
10849 (the_low_target): Change init_arch field to init_windows_x86.
10851 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10853 * win32-low.c: Adapt to support also 64-bit architecture.
10854 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10855 (get_image_name): Use SIZE_T type for local variable `done'.
10856 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10857 (toolhelp_get_dll_name): Idem.
10858 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10859 Use uintptr_t typecast to avoid warning.
10860 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10861 (handle_exception): Use phex_nz to avoid warning.
10862 (win32_wait): Remove unused local variable `process'.
10864 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10866 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10869 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10871 * configure.ac: Use `ws2_32' library for srv_mingw.
10872 * configure: Regenerate.
10873 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10874 * remote-utils.c: Likewise.
10876 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10878 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10879 if __x86_64__ is defined.
10881 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10883 * configure: Regenerate.
10885 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10887 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10888 * target.h (target_ops): New get_tib_address field.
10889 * win32-low.h (win32_thread_info): Add thread_local_base field.
10890 * win32-low.c (child_add_thread): Add tlb argument.
10891 Set thread_local_base field to TLB.
10892 (get_child_debug_event): Adapt to child_add_thread change.
10893 (win32_get_tib_address): New function.
10894 (win32_target_ops): Set get_tib_address field to
10895 win32_get_tib_address.
10896 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10898 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10900 * linux-low.c (linux_mourn): Also remove the process.
10901 * server.c (handle_target_event): Don't remove the process here.
10902 * nto-low.c (nto_mourn): New.
10903 (nto_target_ops): Install it.
10904 * spu-low.c (spu_mourn): New.
10905 (spu_target_ops): Install it.
10906 * win32-low.c (win32_mourn): New.
10907 (win32_target_ops): Install it.
10909 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10911 * server.h (buffer_xml_printf): Remove redundant `;'.
10913 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10915 * regcache.c (set_register_cache): Invalidate regcaches before
10916 changing the register cache layout.
10917 (regcache_invalidate_one): Allow a NULL regcache.
10918 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10919 regcaches before changing the register cache layout or the target
10922 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10924 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10925 variable warning on Linux/x86-64.
10927 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10929 GDBserver disconnected tracing support.
10931 * linux-low.c (linux_remove_process): Delete.
10932 (add_lwp): Don't set last_resume_kind here.
10933 (linux_kill): Use `mourn'.
10934 (linux_detach): Use `thread_db_detach', and `mourn'.
10935 (linux_mourn): New.
10936 (linux_attach_lwp_1): Adjust comment.
10937 (linux_attach): last_resume_kind moved the thread_info; adjust.
10938 (status_pending_p_callback): Adjust.
10939 (linux_wait_for_event_1): Adjust.
10940 (count_events_callback, select_singlestep_lwp_callback)
10941 (select_event_lwp_callback, cancel_breakpoints_callback)
10942 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10943 (proceed_one_lwp): Adjust.
10944 (linux_async): Add debug output.
10945 (linux_thread_stopped): New.
10946 (linux_pause_all): New.
10947 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10949 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10950 (thread_db_free): Delete declaration.
10951 (thread_db_detach, thread_db_mourn): Declare.
10952 * thread-db.c (thread_db_init): Use thread_db_mourn.
10953 (thread_db_free): Delete, split in two.
10954 (disable_thread_event_reporting): New.
10955 (thread_db_detach): New.
10956 (thread_db_mourn): New.
10958 * server.h (struct thread_info) <last_resume_kind>: New field.
10959 <attached>: Add comment.
10960 <gdb_detached>: New field.
10961 (handler_func): Change return type to int.
10962 (handle_serial_event, handle_target_event): Ditto.
10963 (gdb_connected): Declare.
10965 (disconnected_tracing): Declare.
10966 (stop_tracing): Declare.
10968 * server.c (handle_query) <qSupported>: Report support for
10969 disconnected tracing.
10970 (queue_stop_reply_callback): Account for running threads.
10971 (gdb_wants_thread_stopped): New.
10972 (gdb_wants_all_threads_stopped): New.
10973 (gdb_reattached_process): New.
10974 (handle_status): Clear the `gdb_detached' flag of all processes.
10975 In all-stop, stop all threads.
10976 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10977 (process_serial_event): If the remote connection breaks, or if an
10978 exit was forced with "monitor exit", force an event loop exit.
10979 Handle disconnected tracing on detach.
10980 (handle_serial_event): Adjust.
10981 (handle_target_event): If GDB isn't connected, forward events back
10982 to the inferior, unless the last process exited, in which case,
10983 exit gdbserver. Adjust interface.
10985 * remote-utils.c (remote_open): Don't block in accept. Instead
10986 register an event loop source on the listen socket file
10987 descriptor. Refactor bits into ...
10988 (listen_desc): ... this new global.
10989 (gdb_connected): ... this new function.
10990 (enable_async_notification): ... this new function.
10991 (handle_accept_event): ... this new function.
10992 (remote_close): Clear remote_desc.
10994 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10996 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10998 (mourn_inferior): Define.
10999 (target_process_qsupported): Avoid the dangling else problem.
11000 (thread_stopped): Define.
11001 (pause_all): Define.
11002 (target_waitstatus_to_string): Declare.
11003 * target.c (target_waitstatus_to_string): New.
11005 * tracepoint.c (tracing): Make extern.
11006 (disconnected_tracing): New.
11007 (stop_tracing): Make extern. Handle tracing stops due to GDB
11009 (cmd_qtdisconnected): New.
11010 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11011 (handle_tracepoint_general_set): Handle QTDisconnected.
11013 * event-loop.c (event_handler_func): Change return type to int.
11014 (process_event): Bail out if the event handler wants the event
11016 (handle_file_event): Ditto.
11017 (start_event_loop): Bail out if the event handler wants the event
11020 * nto-low.c (nto_target_ops): Adjust.
11021 * spu-low.c (spu_wait): Don't remove the process here.
11022 (spu_target_ops): Adjust.
11023 * win32-low.c (win32_wait): Don't remove the process here.
11024 (win32_target_ops): Adjust.
11026 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11028 * regcache.c (realloc_register_cache): Invalidate inferior's
11029 regcache before recreating it.
11031 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11033 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11035 2010-04-09 Stan Shebs <stan@codesourcery.com>
11036 Pedro Alves <pedro@codesourcery.com>
11038 * server.h (LONGEST): New.
11039 (struct thread_info) <while_stepping>: New field.
11040 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11042 (initialize_tracepoint, handle_tracepoint_general_set)
11043 (handle_tracepoint_query, tracepoint_finished_step)
11044 (tracepoint_was_hit, release_while_stepping_state_list):
11045 (current_traceframe): Declare.
11046 * server.c (handle_general_set): Handle tracepoint packets.
11047 (read_memory): New.
11048 (write_memory): New.
11049 (handle_search_memory_1): Use read_memory.
11050 (handle_query): Report support for conditional tracepoints, trace
11051 state variables, and tracepoint sources. Handle tracepoint
11053 (main): Initialize the tracepoints module.
11054 (process_serial_event): Handle traceframe reads/writes.
11056 * linux-low.c (handle_tracepoints): New.
11057 (linux_wait_1): Call it.
11058 (linux_resume_one_lwp): Handle while-stepping.
11059 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11060 (linux_target_ops): Install them.
11061 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11063 * linux-x86-low.c (x86_supports_tracepoints): New.
11064 (the_low_target). Install it.
11066 * mem-break.h (delete_breakpoint): Declare.
11067 * mem-break.c (delete_breakpoint): Make external.
11069 * target.h (struct target_ops): Add `supports_tracepoints',
11070 `read_pc', and `write_pc' fields.
11071 (target_supports_tracepoints): Define.
11072 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11075 * regcache.h (struct regcache) <registers_owned>: New field.
11076 (init_register_cache, regcache_cpy): Declare.
11077 (regcache_read_pc, regcache_write_pc): Declare.
11078 (register_cache_size): Declare.
11079 (supply_regblock): Declare.
11080 * regcache.c (init_register_cache): New.
11081 (new_register_cache): Use it.
11082 (regcache_cpy): New.
11083 (register_cache_size): New.
11084 (supply_regblock): New.
11085 (regcache_read_pc, regcache_write_pc): New.
11087 * tracepoint.c: New.
11089 * Makefile.in (OBS): Add tracepoint.o.
11090 (tracepoint.o): New rule.
11092 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11094 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11096 (i386-mmx.c): Likewise.
11097 (i386-mmx-linux.o): Likewise.
11098 (i386-mmx-linux.c): Likewise.
11100 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11101 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11102 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11103 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11105 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11106 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11107 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11109 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11111 * Makefile.in (clean): Updated.
11113 (i386-avx.c): Likewise.
11114 (i386-avx-linux.o): Likewise.
11115 (i386-avx-linux.c): Likewise.
11116 (amd64-avx.o): Likewise.
11117 (amd64-avx.c): Likewise.
11118 (amd64-avx-linux.o): Likewise.
11119 (amd64-avx-linux.c): Likewise.
11121 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11122 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11123 (srv_amd64_regobj): Add amd64-avx.o.
11124 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11125 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11126 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11127 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11128 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11129 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11130 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11132 * i387-fp.c: Include "i386-xstate.h".
11134 (i387_cache_to_xsave): Likewise.
11135 (i387_xsave_to_cache): Likewise.
11136 (x86_xcr0): Likewise.
11138 * i387-fp.h (i387_cache_to_xsave): Likewise.
11139 (i387_xsave_to_cache): Likewise.
11140 (x86_xcr0): Likewise.
11142 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11143 * linux-crisv32-low.c (target_regsets): Likewise.
11144 * linux-m68k-low.c (target_regsets): Likewise.
11145 * linux-mips-low.c (target_regsets): Likewise.
11146 * linux-ppc-low.c (target_regsets): Likewise.
11147 * linux-s390-low.c (target_regsets): Likewise.
11148 * linux-sh-low.c (target_regsets): Likewise.
11149 * linux-sparc-low.c (target_regsets): Likewise.
11150 * linux-xtensa-low.c (target_regsets): Likewise.
11152 * linux-low.c: Include <sys/uio.h>.
11153 (regsets_fetch_inferior_registers): Support nt_type.
11154 (regsets_store_inferior_registers): Likewise.
11155 (linux_process_qsupported): New.
11156 (linux_target_ops): Add linux_process_qsupported.
11158 * linux-low.h (regset_info): Add nt_type.
11159 (linux_target_ops): Add process_qsupported.
11161 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11163 (init_registers_i386_avx_linux): New.
11164 (init_registers_amd64_avx_linux): Likewise.
11165 (xmltarget_i386_linux_no_xml): Likewise.
11166 (xmltarget_amd64_linux_no_xml): Likewise.
11167 (PTRACE_GETREGSET): Likewise.
11168 (PTRACE_SETREGSET): Likewise.
11169 (x86_fill_xstateregset): Likewise.
11170 (x86_store_xstateregset): Likewise.
11171 (use_xml): Likewise.
11172 (x86_linux_update_xmltarget): Likewise.
11173 (x86_linux_process_qsupported): Likewise.
11174 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11175 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11176 init_registers_i386_linux here. Call
11177 x86_linux_update_xmltarget.
11178 (the_low_target): Add x86_linux_process_qsupported.
11180 * server.c (handle_query): Call target_process_qsupported.
11182 * target.h (target_ops): Add process_qsupported.
11183 (target_process_qsupported): New.
11185 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11187 * inferiors.c (add_thread): Set last_status kind to
11188 TARGET_WAITKIND_IGNORE.
11189 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11190 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11191 (linux_wait_1): Move `thread' local definition to block that uses
11192 it. Don't NULL initialize `event_child'.
11193 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11194 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11195 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11197 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11199 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11200 an extended waitstatus, or by a watchpoint.
11201 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11202 thread was stepping or has been stopped by a watchpoint.
11204 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11206 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11207 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11208 of another, then delete the previous, and validate all
11210 (validate_inserted_breakpoint): New.
11211 (delete_disabled_breakpoints): New.
11212 (validate_breakpoints): New.
11213 (check_mem_read): Validate breakpoints before trusting their
11214 shadow. Delete disabled breakpoints.
11215 (check_mem_write): Validate breakpoints before trusting they
11216 should be inserted. Delete disabled breakpoints.
11217 * mem-break.h (validate_breakpoints):
11218 * server.c (handle_query): Validate breakpoints when we see a
11221 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11223 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11224 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11225 if we could tell there's a GDB breakpoint at stop_pc.
11226 (need_step_over_p): Don't do a step over if we find a GDB
11227 breakpoint at the resume PC.
11229 * mem-break.c (struct raw_breakpoint): New.
11230 (enum bkpt_type): New type `gdb_breakpoint'.
11231 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11232 fields. New field `raw'.
11233 (find_raw_breakpoint_at): New.
11234 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11235 breakpoint instead.
11236 (set_breakpoint_at): Adjust.
11237 (delete_raw_breakpoint): New.
11238 (release_breakpoint): New.
11239 (delete_breakpoint): Rename to...
11240 (delete_breakpoint_1): ... this. Add proc parameter. Use
11241 release_breakpoint. Return ENOENT.
11242 (delete_breakpoint): Reimplement.
11243 (find_breakpoint_at): Delete.
11244 (find_gdb_breakpoint_at): New.
11245 (delete_breakpoint_at): Delete.
11246 (set_gdb_breakpoint_at): New.
11247 (delete_gdb_breakpoint_at): New.
11248 (gdb_breakpoint_here): New.
11249 (set_reinsert_breakpoint): Use release_breakpoint.
11250 (uninsert_breakpoint): Rename to ...
11251 (uninsert_raw_breakpoint): ... this.
11252 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11253 (reinsert_raw_breakpoint): Change parameter type to
11255 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11257 (check_breakpoints): Adjust. Use release_breakpoint.
11258 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11259 (breakpoint_inserted_here): Ditto.
11260 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11261 Don't trust the breakpoint's shadow if it is not inserted.
11262 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11263 (delete_all_breakpoints): Adjust.
11264 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11265 use delete_breakpoint_1.
11267 * mem-break.h (breakpoints_supported): Delete declaration.
11268 (set_gdb_breakpoint_at): Declare.
11269 (gdb_breakpoint_here): Declare.
11270 (delete_breakpoint_at): Delete.
11271 (delete_gdb_breakpoint_at): Declare.
11273 * server.h (struct raw_breakpoint): Forward declare.
11274 (struct process_info): New field `raw_breakpoints'.
11276 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11279 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11281 * linux-low.c (status_pending_p_callback): Fix comment.
11282 (linux_wait_for_event_1): Move most of the internal breakpoint
11283 handling from here...
11284 (linux_wait_1): ... to here.
11285 (count_events_callback): New.
11286 (select_singlestep_lwp_callback): New.
11287 (select_event_lwp_callback): New.
11288 (cancel_breakpoints_callback): New.
11289 (select_event_lwp): New.
11290 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11291 priority to all LWPs that have had events that should be reported
11292 to the client. Cancel breakpoints when about to reporting the
11293 event to the client, not while stopping lwps. No longer cancel
11294 finished single-steps here.
11295 (cancel_finished_single_step): Delete.
11296 (cancel_finished_single_steps): Delete.
11298 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11300 * mem-break.c (enum bkpt_type): New.
11301 (struct breakpoint): New field `type'.
11302 (set_breakpoint_at): Change return type to struct breakpoint
11303 pointer. Set type to `other_breakpoint' by default.
11304 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11305 in the breakpoint list.
11306 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11307 (reinsert_breakpoint): Rename to ...
11308 (reinsert_raw_breakpoint): ... this.
11309 (reinsert_breakpoints_at): Adjust.
11310 * mem-break.h (struct breakpoint): Declare.
11311 (set_breakpoint_at): Change return type to struct breakpoint
11314 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11316 * server.c (handle_query): Assign, not compare.
11318 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11320 Teach linux gdbserver to step-over-breakpoints.
11322 * linux-low.c (can_hardware_single_step): New.
11323 (supports_breakpoints): New.
11324 (handle_extended_wait): If stopping threads, read the stop pc of
11325 the new cloned LWP.
11327 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11328 low target doesn't support retrieving the PC.
11329 (add_lwp): Set last_resume_kind to resume_continue.
11330 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11331 (linux_attach): Don't clear stop_expected. Set the lwp's
11332 last_resume_kind to resume_stop.
11333 (linux_detach_one_lwp): Don't check for removed breakpoints.
11334 (check_removed_breakpoint): Delete.
11335 (status_pending_p): Rename to ...
11336 (status_pending_p_callback): ... this. Don't check for removed
11337 breakpoints. Don't consider threads that are stopped from GDB's
11339 (linux_wait_for_lwp): Always read the stop_pc here.
11340 (cancel_breakpoint): New.
11341 (step_over_bkpt): New global.
11342 (linux_wait_for_event_1): Implement stepping over breakpoints.
11343 (gdb_wants_lwp_stopped): New.
11344 (gdb_wants_all_stopped): New.
11345 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11346 single-step traps here. Store the thread's last reported target
11348 (send_sigstop): Don't clear stop_expected. Always set it,
11350 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11351 (cancel_finished_single_step): New.
11352 (cancel_finished_single_steps): New.
11353 (wait_for_sigstop): Don't cancel finished single-step traps here.
11354 (linux_resume_one_lwp): Don't check for removed breakpoints.
11355 Don't set `step' on non-hardware step archs.
11356 (linux_set_resume_request): Ignore resume_stop requests if already
11357 stopping or stopped. Set the lwp's last_resume_kind.
11358 (resume_status_pending_p): Don't check for removed breakpoints.
11359 (need_step_over_p): New.
11360 (start_step_over): New.
11361 (finish_step_over): New.
11362 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11363 requests. Clear the thread's last reported target waitstatus.
11364 Don't use the `suspended' flag. Don't consider pending breakpoints.
11365 (linux_resume): Start a step-over if necessary.
11366 (proceed_one_lwp): New.
11367 (proceed_all_lwps): New.
11368 (unstop_all_lwps): New.
11369 * linux-low.h (struct lwp_info): Rewrite comment for the
11370 `suspended' flag. Add the `stop_pc' field. Delete the
11371 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11372 Add `'last_resume_kind' and `need_step_over' fields.
11373 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11374 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11375 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11376 (set_raw_breakpoint_at): New.
11377 (set_breakpoint_at): Rewrite to use it.
11378 (reinsert_breakpoint_handler): Delete.
11379 (set_reinsert_breakpoint): New.
11380 (reinsert_breakpoint_by_bp): Delete.
11381 (delete_reinsert_breakpoints): New.
11382 (uninsert_breakpoint): Rewrite.
11383 (uninsert_breakpoints_at): New.
11384 (reinsert_breakpoint): Rewrite.
11385 (reinsert_breakpoints_at): New.
11386 (check_breakpoints): Rewrite.
11387 (breakpoint_here): New.
11388 (breakpoint_inserted_here): New.
11389 (check_mem_read): Adjust.
11390 * mem-break.h (breakpoints_supported, breakpoint_here)
11391 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11392 (reinsert_breakpoint_by_bp): Delete declaration.
11393 (delete_reinsert_breakpoints): Declare.
11394 (reinsert_breakpoint): Delete declaration.
11395 (reinsert_breakpoints_at): Declare.
11396 (uninsert_breakpoint): Delete declaration.
11397 (uninsert_breakpoints_at): Declare.
11398 (check_breakpoints): Adjust prototype.
11399 * server.h: Adjust include order.
11400 (struct thread_info): Declare here. Add a `last_status' field.
11402 2010-03-23 Michael Snyder <msnyder@vmware.com>
11404 * server.c (crc32): New function.
11405 (handle_query): Add handling for 'qCRC:' request.
11407 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11409 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11410 lwp had been stopped by a watchpoint.
11412 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11414 * server.h (internal_error): Declare.
11415 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11416 * utils.c (internal_error): New function.
11418 2010-03-15 Andreas Schwab <schwab@redhat.com>
11420 * configure.srv: Fix typo setting srv_regobj.
11422 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11424 * linux-low.c (fetch_register): Avoid passing a non string literal
11426 (usr_store_inferior_registers): Ditto.
11428 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11430 * linux-low.c (linux_write_memory): Bail out early if peeking
11433 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11435 * linux-low.h (struct lwp_info): New fields
11436 `stopped_by_watchpoint' and `stopped_data_address'.
11437 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11438 here, and cache them in the lwp object.
11439 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11441 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11443 (linux_stopped_by_watchpoint): Rewrite.
11444 (linux_stopped_data_address): Rewrite.
11446 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11448 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11449 switching the current inferior, not before.
11451 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11453 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11454 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11455 i386-linux.c and amd64-linux.c.
11456 (reg-i386.o): Removed.
11457 (reg-i386.c): Likewise.
11458 (reg-i386-linux.o): Likewise.
11459 (reg-i386-linux.c): Likewise.
11460 (reg-x86-64.o): Likewise.
11461 (reg-x86-64.c): Likewise.
11462 (reg-x86-64-linux.o): Likewise.
11463 (reg-x86-64-linux.c): Likewise.
11465 (i386.c): Likewise.
11466 (i386-linux.o): Likewise.
11467 (i386-linux.c): Likewise.
11468 (amd64.o): Likewise.
11469 (amd64.c): Likewise.
11470 (amd64-linux.o): Likewise.
11471 (amd64-linux.c): Likewise.
11473 * configure.srv (srv_i386_regobj): New.
11474 (srv_i386_linux_regobj): Likewise.
11475 (srv_amd64_regobj): Likewise.
11476 (srv_amd64_linux_regobj): Likewise.
11477 (srv_i386_32bit_xmlfiles): Likewise.
11478 (srv_i386_64bit_xmlfiles): Likewise.
11479 (srv_i386_xmlfiles): Likewise.
11480 (srv_amd64_xmlfiles): Likewise.
11481 (srv_i386_linux_xmlfiles): Likewise.
11482 (srv_amd64_linux_xmlfiles): Likewise.
11483 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11484 srv_xmlfiles to $srv_i386_xmlfiles.
11485 (i[34567]86-*-mingw32ce*): Likewise.
11486 (i[34567]86-*-mingw*): Likewise.
11487 (i[34567]86-*-nto*): Likewise.
11488 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11489 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11490 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11491 (x86_64-*-linux*): Likewise.
11493 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11494 (init_registers_amd64_linux): New.
11495 (x86_arch_setup): Replace init_registers_x86_64_linux with
11496 init_registers_amd64_linux.
11498 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11500 * configure.ac: Check for libdl. If it is not available link against
11501 static libthread_db.
11502 * configure: Regenerate.
11504 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11508 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11509 handing a read watchpoint.
11510 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11512 2010-02-12 Doug Evans <dje@google.com>
11514 * linux-low.c (linux_supports_tracefork_flag): Document.
11515 (linux_look_up_symbols): Add comment.
11517 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11519 * regcache.c (supply_register): Clear regcache if buf is NULL.
11521 2010-02-02 Nicolas Roche <roche@sourceware.org>
11522 Joel Brobecker <brobecker@adacore.com>
11524 * inferiors.c (find_inferior): Add function documentation.
11525 (unloaded_dll): Handle the case where the unloaded dll has not
11526 been previously registered in the dll list.
11528 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11530 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11531 (thumb2_breakpoint): New.
11532 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11534 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11536 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11537 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11540 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11542 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11544 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11546 * linux-s390-low.c (s390_collect_ptrace_register)
11547 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11549 2010-01-21 Doug Evans <dje@google.com>
11551 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11552 (PTRACE_ARG4_TYPE): New macro.
11553 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11554 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11555 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11556 (usr_store_inferior_registers): Ditto.
11557 (linux_read_memory, linux_write_memory): Ditto.
11558 (linux_test_for_tracefork): Ditto.
11560 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11561 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11563 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11565 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11568 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11570 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11571 prototype to take a regcache. Adjust.
11573 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11575 * regcache.h (struct thread_info): Forward declare.
11576 (struct regcache): New.
11577 (new_register_cache): Adjust prototype.
11578 (get_thread_regcache): Declare.
11579 (free_register_cache): Adjust prototype.
11580 (registers_to_string, registers_from_string): Ditto.
11581 (supply_register, supply_register_by_name, collect_register)
11582 (collect_register_as_string, collect_register_by_name): Ditto.
11583 * regcache.c (struct inferior_regcache_data): Delete.
11584 (get_regcache): Rename to ...
11585 (get_thread_regcache): ... this. Adjust. Switch inferior before
11586 fetching registers.
11587 (regcache_invalidate_one): Adjust.
11588 (regcache_invalidate): Fix prototype.
11589 (new_register_cache): Return the new register cache.
11590 (free_register_cache): Change prototype.
11591 (realloc_register_cache): Adjust.
11592 (registers_to_string): Change prototype to take a regcache. Adjust.
11593 (registers_from_string): Ditto.
11594 (register_data): Ditto.
11595 (supply_register): Ditto.
11596 (supply_register_by_name): Ditto.
11597 (collect_register): Ditto.
11598 (collect_register_as_string): Ditto.
11599 (collect_register_by_name): Ditto.
11600 * server.c (process_serial_event): Adjust.
11601 * linux-low.h (regset_fill_func, regset_store_func): Change
11603 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11605 * linux-low.c (get_stop_pc): Adjust.
11606 (check_removed_breakpoint): Adjust.
11607 (linux_wait_for_event): Adjust.
11608 (linux_resume_one_lwp): Adjust.
11609 (fetch_register): Add regcache parameter. Adjust.
11610 (usr_store_inferior_registers): Ditto.
11611 (regsets_fetch_inferior_registers): Ditto.
11612 (regsets_store_inferior_registers): Ditto.
11613 (linux_fetch_registers, linux_store_registers): Ditto.
11614 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11616 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11618 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11619 prototype to take a regcache.
11620 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11621 * remote-utils.c (convert_ascii_to_int, outreg)
11622 (prepare_resume_reply): Change prototype to take a regcache.
11624 * target.h (struct target_ops) <fetch_registers, store_registers>:
11625 Change prototype to take a regcache.
11626 (fetch_inferior_registers, store_inferior_registers): Change
11627 prototype to take a regcache. Adjust.
11628 * proc-service.c (ps_lgetregs): Adjust.
11629 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11630 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11631 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11632 take a regcache. Adjust.
11633 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11634 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11635 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11636 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11637 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11638 (cris_cannot_fetch_register):
11639 (cris_breakpoint_at): Change prototype to take a regcache.
11641 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11642 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11643 to take a regcache. Adjust.
11644 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11646 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11647 take a regcache. Adjust.
11648 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11649 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11650 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11651 * linux-mips-low.c (mips_get_pc):
11652 (mips_set_pc): Change prototype to take a regcache. Adjust.
11653 (mips_reinsert_addr): Adjust.
11654 (mips_collect_register): Change prototype to take a regcache.
11656 (mips_supply_register):
11657 (mips_collect_register_32bit, mips_supply_register_32bit)
11658 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11659 (mips_store_fpregset): Ditto.
11660 * linux-ppc-low.c (ppc_supply_ptrace_register)
11661 (ppc_supply_ptrace_register): Ditto.
11662 (parse_spufs_run): Adjust.
11663 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11664 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11665 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11666 take a regcache. Adjust.
11667 * linux-s390-low.c (s390_collect_ptrace_register)
11668 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11669 (s390_set_pc): Change prototype to take a regcache. Adjust.
11670 (s390_arch_setup): Adjust.
11671 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11672 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11673 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11674 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11675 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11677 (sparc_breakpoint_at): Adjust.
11678 * linux-xtensa-low.c (xtensa_fill_gregset):
11679 (xtensa_store_gregset):
11680 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11681 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11682 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11683 prototype to take a regcache. Adjust.
11684 * win32-arm-low.c (arm_fetch_inferior_register)
11685 (arm_store_inferior_register): Change prototype to take a
11687 * win32-i386-low.c (i386_fetch_inferior_register)
11688 (i386_store_inferior_register): Change prototype to take a
11690 * win32-low.c (child_fetch_inferior_registers)
11691 (child_store_inferior_registers): Change prototype to take a
11693 (win32_wait): Adjust.
11694 (win32_fetch_inferior_registers): Change prototype to take a
11696 (win32_store_inferior_registers): Adjust.
11697 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11698 store_inferior_register>: Change prototype to take a regcache.
11700 2010-01-20 Doug Evans <dje@google.com>
11702 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11704 (linux_wait_for_event1, linux_init_signals): Ditto.
11705 (W_STOPCODE): Provide definition if missing.
11707 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11709 * linux-low.c (linux_core_of_thread): New.
11710 (compare_ints, show_process, list_threads): New.
11711 (linux_qxfer_osdata): Report threads and cores.
11712 (linux_target_op): Register linux_core_of_thread.
11713 * remote-utils.c (prepare_resume_reply): Report the core.
11714 (buffer_xml_printf): Support %d specifier.
11715 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11717 (handle_query): Handle qXfer:threads. Announce availability
11719 * target.h (struct target_ops): New field core_of_thread.
11721 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11723 * Makefile.in (clean): Remove new generated files.
11724 (reg-s390.o, reg-s390.c): Remove rules.
11725 (reg-s390x.o, reg-s390x.c): Likewise.
11726 (s390-linux32.o, s390-linux32.c): Add rules.
11727 (s390-linux64.o, s390-linux64.c): Likewise.
11728 (s390x-linux64.o, s390x-linux64.c): Likewise.
11729 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11730 * linux-s390-low.c: Include <elf.h>.
11731 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11732 (init_registers_s390): Remove prototype.
11733 (init_registers_s390x): Likewise.
11734 (init_registers_s390_linux32): Add prototype.
11735 (init_registers_s390_linux64): Likewise.
11736 (init_registers_s390x_linux64): Likewise.
11737 (s390_num_regs_3264): New define.
11738 (s390_regmap_3264): New global variable.
11739 (s390_cannot_fetch_register): Remove obsolete check.
11740 (s390_cannot_store_register): Likewise.
11741 (s390_collect_ptrace_register): Handle upper/lower register halves.
11742 (s390_supply_ptrace_register): Likewise.
11743 (s390_fill_gregset): Update to register number changes.
11744 (s390_get_hwcap): New routine.
11745 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11746 Install appropriate regmap and register set.
11748 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11750 * server.c (gdbserver_version): Update copyright year to 2010.
11751 * gdbreplay.c (gdbreplay_version): Likewise.
11753 2009-12-28 Doug Evans <dje@google.com>
11755 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11756 elf/external.h. Include <elf.h> instead but only if necessary.
11758 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11760 * linux-low.c (linux_remove_process): Remove `detaching'
11761 parameter. Don't release/detach from thread_db here.
11762 (linux_kill): Release/detach from thread_db here, ...
11763 (linux_detach): ... and here, before actually detaching.
11764 (linux_wait_1): ... and here, when a process exits.
11765 * thread-db.c (any_thread_of): New.
11766 (thread_db_free): Switch the current inferior to a thread of the
11769 2009-12-21 Doug Evans <dje@google.com>
11771 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11773 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11774 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11775 warning ifndef __NR_tkill. Move setting of errno there too.
11776 Delete unnecessary resetting of errno after syscall.
11777 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11779 * configure.ac: Check for dladdr.
11780 * config.in: Regenerate.
11781 * configure: Regenerate.
11782 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11783 (try_thread_db_load): Update.
11785 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11787 2009-12-18 Doug Evans <dje@google.com>
11789 * event-loop.c: Include unistd.h if it exists.
11791 * linux-low.c (my_waitpid): Move definition away from being in
11792 between linux_tracefork_child/linux_test_for_tracefork.
11794 * gdb_proc_service.h (psaddr_t): Fix type.
11795 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11796 signature to match glibc.
11798 2009-12-16 Doug Evans <dje@google.com>
11800 * linux-low.c (linux_read_memory): Fix argument to read.
11802 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11804 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11805 events, don't leave current_inferior pointing at null.
11807 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11809 * win32-low.c (LOG): Delete.
11810 (OUTMSG): Output to stderr.
11811 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11812 on compile time LOG macro.
11813 (win32_wait): Fix debug output.
11815 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11817 * win32-low.c (win32_add_one_solib): If the dll name is
11818 "ntdll.dll", prepend the system directory to the dll path.
11820 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11822 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11824 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11825 Vladimir Prus <vladimir@codesourcery.com>
11827 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11828 * configure.ac: Check for __mcoldfire__ and set
11829 gdb_cv_m68k_is_coldfire.
11830 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11831 reg-cf.o and reg-m68k.o.
11832 * configure: Regenerated.
11834 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11836 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11837 Pass it to thread_db_free.
11838 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11839 proper `detaching' argument to linux_remove_process.
11840 * linux-low.h (thread_db_free): Add `detaching' parameter.
11841 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11843 (thread_db_free): Add `detaching' parameter. Only
11844 call td_ta_clear_event if detaching from process.
11846 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11848 * thread-db.c (thread_db_free): Fix typo.
11850 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11853 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11855 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11857 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11858 with an i686 compiler.
11859 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11861 * configure: Rebuilt.
11863 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11867 * server.c (handle_search_memory_1): Correct read_addr initialization
11868 in loop for searching subsequent chunks.
11870 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11872 * configure.ac: New --with-libthread-db option.
11873 * thread-db.c: Allow direct dependence on libthread_db.
11874 (thread_db_free): Adjust.
11875 * config.in: Regenerate.
11876 * configure: Likewise.
11878 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11881 * thread-db.c (attach_thread): New function.
11882 (maybe_attach_thread): Return success/failure.
11883 (find_new_threads_callback): Adjust.
11884 (thread_db_find_new_threads): Loop until no new threads.
11886 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11888 * proc-service.c (ps_lgetregs): Formatting.
11890 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11892 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11893 * configure.ac: Adjust.
11894 * linux-low.h (struct process_info_private): Move members to struct
11896 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11897 * linux-low.c (linux_remove_process): Adjust.
11898 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11899 * server.c (handle_query): Move code ...
11900 (handle_monitor_command): ... here. New function.
11901 * target.h (struct target_ops): New member.
11902 * thread-db.c (struct thread_db): New.
11903 (libthread_db_search_path): New variable.
11904 (thread_db_create_event, thread_db_enable_reporting)
11905 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11906 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11907 (try_thread_db_load_1, dladdr_to_soname): New functions.
11908 (try_thread_db_load, thread_db_load_search): New functions.
11909 (thread_db_init): Search for libthread_db.
11910 (thread_db_free): New function.
11911 (thread_db_handle_monitor_command): Likewise.
11912 * config.in: Regenerate.
11913 * configure: Regenerate.
11915 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11917 * spu-low.c (spu_kill): Wait for inferior to terminate.
11918 Call clear_inferiors.
11919 (spu_detach): Call clear_inferiors.
11921 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11923 * aclocal.m4: Regenerate.
11924 * config.in: Likewise.
11925 * configure: Likewise.
11927 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11929 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11930 (parse_spufs_run): New function.
11931 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11932 (ppc_breakpoint_at): Handle SPU breakpoints.
11934 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11936 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11937 (SPUFS_MAGIC): Define.
11938 (spu_enumerate_spu_ids): New function.
11939 (linux_qxfer_spu): New function.
11940 (linux_target_ops): Install linux_qxfer_spu.
11942 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11944 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11945 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11946 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11947 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11948 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11949 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11950 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11951 (init_registers_powerpc_cell32l): Add prototype.
11952 (init_registers_powerpc_cell64l): Likewise.
11953 (ppc_arch_setup): Detect Cell/B.E. architecture.
11955 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11957 * Makefile.in (datarootdir): New variable.
11959 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11961 * linux-low.c (linux_write_memory): Update debugging output.
11962 * Makefile.in (clean): Add new descriptions.
11963 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11964 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11965 * configure.srv: Add new files for arm*-*-linux*.
11966 * linux-arm-low.c: Add new declarations.
11967 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11968 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11969 (HWCAP_VFPv3D16): New.
11970 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11971 instead of __IWMMXT__.
11972 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11973 (arm_arch_setup): New.
11974 (target_regsets): Remove #ifdef. Add VFP regset.
11975 (the_low_target): Use arm_arch_setup.
11977 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11979 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11980 the main thread again.
11982 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11984 Adding Neutrino gdbserver.
11985 * configure: Regenerated.
11986 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11987 * configure.srv (i[34567]86-*-nto*): New target.
11988 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11989 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11990 (nto_comctrl) [__QNX__]: New function.
11991 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11993 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11995 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11998 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11999 Pedro Alves <pedro@codesourcery.com>
12001 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12002 don't support CONTEXT_EXTENDED_REGISTERS.
12003 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12004 (the_low_target): Install them.
12005 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12006 failing with ERROR_PIPE_NOT_CONNECTED.
12008 2009-06-30 Doug Evans <dje@google.com>
12009 Pierre Muller <muller@ics.u-strasbg.fr>
12011 Add h/w watchpoint support to x86-linux, win32-i386.
12012 * Makefile.in (SFILES): Add i386-low.c
12013 (i386_low_h): Define.
12014 (i386-low.o): Add dependencies.
12015 (linux-x86-low.o): Add i386-low.h dependency.
12016 (win32-i386-low.o): Ditto.
12017 * i386-low.c: New file.
12018 * i386-low.h: New file.
12019 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12020 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12021 * linux-low.c (linux_add_process): Initialize arch_private.
12022 (linux_remove_process): Free arch_private.
12023 (add_lwp): Initialize arch_private.
12024 (delete_lwp): Free arch_private.
12025 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12027 * linux-low.h (process_info_private): New member arch_private.
12028 (lwp_info): New member arch_private.
12029 (linux_target_ops): New members new_process, new_thread,
12031 (ptid_of): New macro.
12032 * linux-x86-low.c: Include stddef.h, i386-low.h.
12033 (arch_process_info): New struct.
12034 (arch_lwp_info): New struct.
12035 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12036 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12037 (i386_dr_low_get_status): New function.
12038 (x86_insert_point, x86_remove_point): New functions.
12039 (x86_stopped_by_watchpoint): New function.
12040 (x86_stopped_data_address): New function.
12041 (x86_linux_new_process, x86_linux_new_thread): New functions.
12042 (x86_linux_prepare_to_resume): New function.
12043 (the_low_target): Add entries for insert_point, remove_point,
12044 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12046 * server.c (debug_hw_points): New global.
12047 (monitor_show_help): Document set debug-hw-points.
12048 (handle_query): Process "set debug-hw-points".
12049 * server.h (debug_hw_points): Declare.
12050 (paddress): Declare.
12051 * utils.c (NUMCELLS, CELLSIZE): New macros.
12052 (get_sell, xsnprintf, paddress): New functions.
12053 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12054 remove_point, stopped_by_watchpoint, stopped_data_address.
12055 * win32-i386-low.c: Include i386-low.h.
12056 (debug_reg_state): Replaces dr.
12057 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12058 (i386_dr_low_get_status): New function.
12059 (i386_insert_point, i386_remove_point): New functions.
12060 (i386_stopped_by_watchpoint): New function.
12061 (i386_stopped_data_address): New function.
12062 (i386_initial_stuff): Update.
12063 (get_thread_context,set_thread_context,i386_thread_added): Update.
12064 (the_low_target): Add entries for insert_point,
12065 remove_point, stopped_by_watchpoint, stopped_data_address.
12066 * win32-low.c (win32_insert_watchpoint): New function.
12067 (win32_remove_watchpoint): New function.
12068 (win32_stopped_by_watchpoint): New function.
12069 (win32_stopped_data_address): New function.
12070 (win32_target_ops): Add entries for insert_watchpoint,
12071 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12072 * win32-low.h (win32_target_ops): New members insert_point,
12073 remove_point, stopped_by_watchpoint, stopped_data_address.
12075 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12077 * server.c (process_serial_event): Re-return unsupported, not
12078 error, if the type isn't recognized. Re-allow supporting only
12079 insert or remove packets. Also call require_running for
12080 breakpoints. Add missing break statement to default case. Tidy.
12081 * target.h (struct target_ops): Rename insert_watchpoint to
12082 insert_point, and remove_watchpoint to remove_point.
12084 * linux-low.h (struct linux_target_ops): Likewise.
12085 * linux-low.c (linux_insert_watchpoint): Rename to ...
12086 (linux_insert_point): ... this. Adjust.
12087 (linux_remove_watchpoint): Rename to ...
12088 (linux_remove_point): ... this. Adjust.
12089 (linux_target_ops): Adjust.
12090 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12091 (cris_insert_point): ... this.
12092 (cris_remove_watchpoint): Rename to ...
12093 (cris_remove_point): ... this.
12094 (the_low_target): Adjust.
12096 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12098 * server.c (handle_v_kill): Pass signal_pid to
12099 kill_inferior if multi_process is zero.
12101 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12103 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12104 * target.h (target_ops): Comment for *_watchpoint to make it clear
12105 the functions can get types '0' and '1'.
12107 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12109 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12110 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12111 * regcache.c (get_regcache): Likewise.
12112 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12113 * win32-low.c (child_fetch_inferior_registers): Remove check for
12116 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12117 Pedro Alves <pedro@codesourcery.com>
12119 * target.h (struct target_ops) <supports_multi_process>: New
12121 (target_supports_multi_process): New.
12122 * server.c (handle_query): Even if GDB reports support, only
12123 enable multi-process if the target also supports it. Report
12124 multi-process support only if the target backend supports it.
12125 * linux-low.c (linux_supports_multi_process): New function.
12126 (linux_target_ops): Install it as target_supports_multi_process
12129 2009-05-24 Doug Evans <dje@google.com>
12131 Global renaming of find_thread_pid to find_thread_ptid.
12132 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12133 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12134 All callers updated.
12136 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12137 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12140 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12141 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12142 (linux_resume_one_lwp): Ditto.
12144 2009-05-23 Doug Evans <dje@google.com>
12146 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12147 from struct inferior_list_entry * to struct lwp_info *.
12148 All callers updated.
12150 2009-05-13 Doug Evans <dje@google.com>
12152 * linux-x86-low.c: Don't include assert.h.
12153 (x86_siginfo_fixup): Use fatal, not assert.
12154 (x86_arch_setup): Fix comment.
12156 2009-05-12 Doug Evans <dje@google.com>
12158 Biarch support for i386/amd64 gdbserver.
12159 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12160 Add linux-x86-low.c.
12161 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12162 (linux-x86-low.o): Add.
12163 * linux-x86-64-low.c: Delete.
12164 * linux-i386-low.c: Delete.
12165 * linux-x86-low.c: New file.
12166 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12168 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12170 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12171 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12172 (linux_child_pid_to_exec_file): New function.
12173 (elf_64_header_p, elf_64_file_p): New functions.
12174 (siginfo_fixup): New function.
12175 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12176 give target a chance to convert layout.
12177 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12178 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12180 2009-05-07 Doug Evans <dje@google.com>
12182 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12183 (regsets_store_inferior_registers): Ditto.
12185 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12189 * linux-low.c (must_set_ptrace_flags): Delete.
12190 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12192 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12193 `lwp->must_set_ptrace_flags' instead.
12194 (linux_wait_for_event_1): Set ptrace options here.
12195 (linux_wait_1): ... not here.
12197 2009-04-30 Doug Evans <dje@google.com>
12199 * inferiors.c (started_inferior_callback): New function.
12200 (attached_inferior_callback): New function.
12201 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12202 * server.c (print_started_pid, print_attached_pid): New functions.
12203 (detach_or_kill_for_exit): New function.
12204 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12205 * server.h (have_started_inferiors_p): Declare.
12206 (have_attached_inferiors_p): Declare.
12208 * inferiors.c (remove_process): Fix memory leak, free process.
12209 * linux-low.c (linux_remove_process): New function.
12210 (linux_kill): Call it instead of remove_process.
12211 (linux_detach, linux_wait_1): Ditto.
12213 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12215 * configure.srv: Add x86 Windows CE target.
12217 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12219 * inferiors.c (get_thread_process): Make global.
12220 * server.h (get_thread_process): Add prototype.
12221 * thread-db.c (find_one_thread): Use get_thread_process
12222 instead of current_process.
12223 (thread_db_get_tls_address): Do not crash if called when
12224 thread layer is not yet initialized.
12226 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12228 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12229 * spu-low.c (current_tid): Rename to ...
12230 (current_ptid): ... this.
12231 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12232 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12233 ptid_get_lwp (current_ptid) instead of current_tid.
12234 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12235 instead of current_tid. Use find_process_pid to verify pid
12236 argument is valid. Pass proper argument to remove_process.
12237 (spu_thread_alive): Compare current_ptid instead of current_tid.
12238 (spu_resume): Likewise.
12240 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12242 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12245 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12247 Implement the multiprocess extensions, and add linux multiprocess
12250 * server.h (ULONGEST): Declare.
12251 (struct ptid, ptid_t): New.
12252 (minus_one_ptid, null_ptid): Declare.
12253 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12254 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12255 (struct inferior_list_entry): Change `id' type from unsigned from
12257 (struct sym_cache, struct breakpoint, struct
12258 process_info_private): Forward declare.
12259 (struct process_info): Declare.
12260 (current_process): Declare.
12261 (all_processes): Declare.
12262 (initialize_inferiors): Declare.
12263 (add_thread): Adjust to use ptid_t.
12264 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12265 (add_process, remove_process, find_thread_pid): Declare.
12266 (find_inferior_id): Adjust to use ptid_t.
12267 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12268 (multi_process): Declare.
12269 (push_event): Adjust to use ptid_t.
12270 (read_ptid, write_ptid): Declare.
12271 (prepare_resume_reply): Adjust to use ptid_t.
12272 (clear_symbol_cache): Declare.
12273 * inferiors.c (all_processes): New.
12274 (null_ptid, minus_one_ptid): New.
12275 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12276 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12277 (add_thread): Change unsigned long to ptid. Remove gdb_id
12279 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12280 (gdb_id_to_thread): Rename to ...
12281 (find_thread_pid): ... this. Change unsigned long to ptid.
12282 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12283 (loaded_dll, pull_pid_from_list): Adjust.
12284 (add_process, remove_process, find_process_pid)
12285 (get_thread_process, current_process, initialize_inferiors): New.
12286 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12287 (struct target_waitstatus) <related_pid>: Ditto.
12288 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12289 return type to int.
12290 (struct target_ops) <join>: Add `pid' argument.
12291 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12292 (struct target_ops) <wait>: Add `ptid' field. Change return type
12294 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12295 (mywait): Add `ptid' argument. Change return type to ptid_t.
12296 (target_pid_to_str): Declare.
12297 * target.c (set_desired_inferior): Adjust to use ptids.
12298 (mywait): Add new `ptid' argument. Adjust.
12299 (target_pid_to_str): New.
12300 * mem-break.h (free_all_breakpoints): Declare.
12301 * mem-break.c (breakpoints): Delelete.
12302 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12303 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12304 to use per-process breakpoint list.
12305 (free_all_breakpoints): New.
12306 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12307 (symbol_cache, all_symbols_looked_up): Delete.
12309 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12311 (prepare_resume_reply): Change ptid argument's type from unsigned
12312 long to ptid_t. Adjust. Implement W;process and X;process.
12313 (free_sym_cache, clear_symbol_cache): New.
12314 (look_up_one_symbol): Adjust to per-process symbol cache. *
12315 * server.c (cont_thread, general_thread, step_thread): Change type
12317 (attached): Delete.
12318 (multi_process): New.
12319 (last_ptid): Change type to ptid_t.
12320 (struct vstop_notif) <ptid>: Change type to ptid_t.
12321 (queue_stop_reply, push_event): Change `ptid' argument's type to
12323 (discard_queued_stop_replies): Add `pid' argument.
12324 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12325 changes. Don't reference the `attached' global.
12326 (attach_inferior): Adjust to mywait interface changes.
12327 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12328 features. Handle and report "multiprocess+". Handle
12330 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12332 (handle_v_kill): New.
12333 (handle_v_stopped): Adjust to use target_pid_to_str.
12334 (handle_v_requests): Allow multiple attaches and runs when
12335 multiprocess extensions are in effect. Handle "vKill".
12336 (myresume): Adjust to use ptids.
12337 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12338 (handle_status): Adjust to discard_queued_stop_replies interface
12340 (first_thread_of, kill_inferior_callback)
12341 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12342 (main): Call initialize_inferiors. Adjust to use ptids, killing
12343 and detaching from all inferiors. Handle multiprocess packet
12345 * linux-low.h: Include gdb_proc_service.h.
12346 (struct process_info_private): New.
12347 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12348 <lwpid_of>: Use ptid_get_lwp.
12349 (get_lwp_thread): Adjust.
12350 (struct lwp_info): Add `dead' member.
12351 (find_lwp_pid): Declare.
12352 * linux-low.c (thread_db_active): Delete.
12353 (new_inferior): Adjust comment.
12354 (inferior_pid): Delete.
12355 (linux_add_process): New.
12356 (handle_extended_wait): Adjust.
12357 (add_lwp): Change unsigned long to ptid.
12358 (linux_create_inferior): Add process to processes table. Adjust
12359 to use ptids. Don't set new_inferior here.
12360 (linux_attach_lwp): Rename to ...
12361 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12362 it. Adjust to use ptids.
12363 (linux_attach_lwp): New.
12364 (linux_attach): Add process to processes table. Don't set
12366 (struct counter): New.
12367 (second_thread_of_pid_p, last_thread_of_process_p): New.
12368 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12369 multiple processes.
12370 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12371 processes. Remove process from process table.
12372 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12373 to multiple processes.
12374 (any_thread_of): New.
12375 (linux_detach): Add `pid' argument, and handle it. Remove process
12376 from processes table.
12377 (linux_join): Add `pid' argument. Handle it.
12378 (linux_thread_alive): Change unsighed long argument to ptid_t.
12379 Consider dead lwps as not being alive.
12380 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12381 threads we're not interested in.
12382 (same_lwp, find_lwp_pid): New.
12383 (linux_wait_for_lwp): Change `pid' argument's type from int to
12385 (linux_wait_for_event): Rename to ...
12386 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12387 from int to ptid_t. Adjust.
12388 (linux_wait_for_event): New.
12389 (linux_wait_1): Add `ptid' argument. Change return type to
12390 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12391 that exit from the process table.
12392 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12394 (mark_lwp_dead): New.
12395 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12396 stopping all threads, mark its main lwp as dead.
12397 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12399 (fetch_register, usr_store_inferior_registers)
12400 (regsets_fetch_inferior_registers)
12401 (regsets_store_inferior_registers, linux_read_memory)
12402 (linux_write_memory): Inline `inferior_pid'.
12403 (linux_look_up_symbols): Adjust to use per-process
12404 `thread_db_active'.
12405 (linux_request_interrupt): Adjust to use ptids.
12406 (linux_read_auxv): Inline `inferior_pid'.
12407 (initialize_low): Don't reference thread_db_active.
12408 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12409 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12410 (ps_getpid): Return the pid of the current inferior.
12411 * thread-db.c (proc_handle, thread_agent): Delete.
12412 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12414 (find_one_thread): Change argument type to ptid_t. Adjust to
12416 (maybe_attach_thread): Adjust to per-process data and ptids.
12417 (thread_db_find_new_threads): Ditto.
12418 (thread_db_init): Ditto.
12419 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12420 processes table. Adjust to use ptids.
12421 (spu_kill, spu_detach): Adjust interface. Remove process from
12423 (spu_join, spu_thread_alive): Adjust interface.
12424 (spu_wait): Adjust interface. Remove process from processes
12425 table. Adjust to use ptids.
12426 * win32-low.c (current_inferior_tid): Delete.
12427 (current_inferior_ptid): New.
12428 (debug_event_ptid): New.
12429 (thread_rec): Take a ptid. Adjust.
12430 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12431 (child_delete_thread): Ditto.
12432 (do_initial_child_stuff): Add `attached' argument. Add process to
12434 (child_fetch_inferior_registers, child_store_inferior_registers):
12436 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12437 (win32_attach): Pass 1 to do_initial_child_stuff.
12438 (win32_kill): Adjust interface. Remove process from processes
12440 (win32_detach): Ditto.
12441 (win32_join): Adjust interface.
12442 (win32_thread_alive): Take a ptid.
12443 (win32_resume): Adjust to use ptids.
12444 (get_child_debug_event): Ditto.
12445 (win32_wait): Adjust interface. Remove exiting process from
12448 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12450 Non-stop mode support.
12452 * server.h (non_stop): Declare.
12453 (gdb_client_data, handler_func): Declare.
12454 (delete_file_handler, add_file_handler, start_event_loop):
12456 (handle_serial_event, handle_target_event, push_event)
12457 (putpkt_notif): Declare.
12458 * target.h (enum resume_kind): New.
12459 (struct thread_resume): Replace `step' field by `kind' field.
12460 (TARGET_WNOHANG): Define.
12461 (struct target_ops) <wait>: Add `options' argument.
12462 <supports_non_stop, async, start_non_stop>: New fields.
12463 (target_supports_non_stop, target_async): New.
12464 (start_non_stop): Declare.
12465 (mywait): Add `options' argument.
12466 * target.c (mywait): Add `options' argument. Print child exit
12467 notifications here.
12468 (start_non_stop): New.
12469 * server.c (non_stop, own_buf, mem_buf): New globals.
12470 (struct vstop_notif): New.
12471 (notif_queue): New global.
12472 (queue_stop_reply, push_event, discard_queued_stop_replies)
12473 (send_next_stop_reply): New.
12474 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12476 (attach_inferior): In non-stop mode, don't wait for the target
12478 (handle_general_set): Handle QNonStop.
12479 (handle_query): When handling qC, return the current general
12480 thread, instead of the first thread of the list.
12481 (handle_query): If the backend supports non-stop mode, include
12482 QNonStop+ in the qSupported query response.
12483 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12485 (handle_v_attach, handle_v_run): Handle non-stop mode.
12486 (handle_v_stopped): New.
12487 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12488 (myresume): Adjust to use resume_kind. Handle non-stop.
12489 (queue_stop_reply_callback): New.
12490 (handle_status): Handle non-stop mode.
12491 (main): Clear non_stop flag on reconnection. Use the event-loop.
12492 Refactor serial protocol handling from here ...
12493 (process_serial_event): ... to this new function. When GDB
12494 selects any thread, select one here. In non-stop mode, wait until
12495 GDB acks all pending events before exiting.
12496 (handle_serial_event, handle_target_event): New.
12497 * remote-utils.c (remote_open): Install remote_desc in the event
12499 (remote_close): Remove remote_desc from the event loop.
12500 (putpkt_binary): Rename to...
12501 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12502 (putpkt_binary): New as wrapper around putpkt_binary_1.
12503 (putpkt_notif): New.
12504 (prepare_resume_reply): In non-stop mode, don't change the
12506 * event-loop.c: New.
12507 * Makefile.in (OBJ): Add event-loop.o.
12508 (event-loop.o): New rule.
12510 * linux-low.h (pid_of): Moved here.
12512 (get_lwp_thread): Use lwpid_of.
12513 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12514 * linux-low.c (pid_of): Delete.
12515 (inferior_pid): Use lwpid_of.
12516 (linux_event_pipe): New.
12517 (target_is_async_p): New.
12519 (handle_extended_wait): Use lwpid_of.
12520 (add_lwp): Don't set lwpid field.
12521 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12522 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12523 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12524 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12525 first. Adjust to linux_wait_for_event interface changes. Use
12527 (linux_detach): Don't delete the main lwp here.
12528 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12529 (status_pending_p): Don't consider explicitly suspended lwps.
12530 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12531 pointer. Add OPTIONS argument. Change return type to int. Use
12532 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12533 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12534 pointer. Add status pointer argument. Return a pid instead of a
12535 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12536 changes. In non-stop mode, don't switch to a random thread.
12537 (linux_wait): Rename to...
12538 (linux_wait_1): ... this. Add target_options argument, and handle
12539 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12540 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12541 clean exit and signal exit code. Don't stop all threads in
12542 non-stop mode. In all-stop mode, only stop all threads when
12543 reporting a stop to GDB. Handle explicit thread stop requests.
12544 (async_file_flush, async_file_mark): New.
12546 (send_sigstop): Use lwpid_of.
12547 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12548 interface changes. In non-stop mode, don't switch to a random
12550 (linux_resume_one_lwp): Use lwpid_of.
12551 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12552 (linux_resume_one_thread): ... this. Handle resume_stop. In
12553 non-stop mode, don't look for pending flag in all threads.
12554 (resume_status_pending_p): Don't consider explicitly suspended
12556 (my_waitpid): Reimplement. Emulate __WALL.
12557 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12559 (sigchld_handler, linux_supports_non_stop, linux_async)
12560 (linux_start_non_stop): New.
12561 (linux_target_ops): Register linux_supports_non_stop, linux_async
12562 and linux_start_non_stop.
12563 (initialize_low): Install SIGCHLD handler.
12564 * thread-db.c (thread_db_create_event, find_one_thread)
12565 (thread_db_get_tls_address): Use lwpid_of.
12566 * win32-low.c (win32_detach): Adjust to use resume_kind.
12567 (win32_wait): Add `options' argument.
12568 * spu-low.c (spu_resume): Adjust to use resume_kind.
12569 (spu_wait): Add `options' argument.
12571 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12573 Decouple target code from remote protocol.
12575 * target.h (enum target_waitkind): New.
12576 (struct target_waitstatus): New.
12577 (struct target_ops) <wait>: Return an unsigned long. Take a
12578 target_waitstatus pointer instead of a char pointer.
12579 (mywait): Likewise.
12580 * target.c (mywait): Change prototype to return an unsigned long.
12581 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12582 * server.h (thread_from_wait, old_thread_from_wait): Delete
12584 (prepare_resume_reply): Change prototype to take a
12586 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12587 (last_status, last_ptid): New.
12588 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12589 pid instead of a signal.
12590 (attach_inferior): Remove "status" and "signal" parameters.
12592 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12594 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12595 (handle_v_requests, myresume): Remove "status" and "signal"
12596 parameters. Adjust.
12597 (handle_status): New.
12598 (main): Delete local `status'. Adjust.
12599 * remote-utils.c: Include target.h.
12600 (prepare_resume_reply): Change prototype to take a
12601 target_waitstatus. Adjust.
12603 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12605 * spu-low.c (spu_wait): Adjust.
12606 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12608 (win32_wait): Adjust.
12610 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12612 * target.h (struct thread_resume): Delete leave_stopped member.
12613 (struct target_ops): Add a `n' argument to the `resume' callback.
12614 * server.c (start_inferior): Adjust.
12615 (handle_v_cont, myresume): Adjust.
12616 * linux-low.c (check_removed_breakpoint): Adjust to resume
12617 interface change, and to removed leave_stopped field.
12618 (resume_ptr): Delete.
12619 (struct thread_resume_array): New.
12620 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12621 resume interface change.
12622 (linux_continue_one_thread, linux_queue_one_thread)
12623 (resume_status_pending_p): Check if the resume field is NULL
12624 instead of checking the leave_stopped member.
12625 (linux_resume): Adjust to the target resume interface change.
12626 * spu-low.c (spu_resume): Adjust to the target resume interface
12628 * win32-low.c (win32_detach, win32_resume): Ditto.
12630 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12632 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12634 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12636 (linux_continue_one_thread): Only preserve the stepping flag if
12637 there's a pending breakpoint.
12639 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12641 * server.c (main): After the inferior having exited, call
12642 remote_close before exiting gdbserver.
12644 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12646 Fix size of FPSCR in Power 7 processors.
12647 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12648 (PPC_FEATURE_HAS_DFP): New #define.
12649 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12652 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12654 * server.c (handle_query) Whitespace and formatting.
12656 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12658 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12659 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12660 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12661 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12662 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12663 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12664 Makefile.in, configure.ac: Fix whitespace throughout.
12665 * configure: Regenerate.
12667 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12669 * inferiors.c (find_inferior): Make it safe for the callback
12670 function to delete the currently iterated inferior.
12672 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12674 * Makefile.in (linuw_low_h): Move higher.
12675 (thread-db.o): Depend on $(linux_low_h).
12677 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12679 Rename "process" to "lwp" throughout.
12681 * linux-low.c (all_processes): Rename to...
12682 (all_lwps): ... this.
12683 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12684 (add_process): Rename to ...
12685 (add_lwp): ... this. Adjust.
12686 (linux_create_inferior): Adjust.
12687 (linux_attach_lwp): Adjust.
12688 (linux_attach): Adjust.
12689 (linux_kill_one_process): Rename to ...
12690 (linux_kill_one_lwp): ... this. Adjust.
12691 (linux_kill): Adjust.
12692 (linux_detach_one_process): Rename to ...
12693 (linux_detach_one_lwp): ... this. Adjust.
12694 (linux_detach): Adjust.
12695 (check_removed_breakpoint): Adjust.
12696 (status_pending_p): Adjust.
12697 (linux_wait_for_process): Rename to ...
12698 (linux_wait_for_lwp): ... this. Adjust.
12699 (linux_wait_for_event): Adjust.
12700 (send_sigstop): Adjust.
12701 (wait_for_sigstop): Adjust.
12702 (stop_all_processes): Rename to ...
12703 (stop_all_lwps): ... this.
12704 (linux_resume_one_process): Rename to ...
12705 (linux_resume_one_lwp): ... this. Adjust.
12706 (linux_set_resume_request, linux_continue_one_thread)
12707 (linux_queue_one_thread, resume_status_pending_p)
12708 (usr_store_inferior_registers, regsets_store_inferior_registers)
12709 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12711 * linux-low.h (get_process): Rename to ...
12712 (get_lwp): ... this. Adjust.
12713 (get_thread_process): Rename to ...
12714 (get_thread_lwp): ... this. Adjust.
12715 (get_process_thread): Rename to ...
12716 (get_lwp_thread): ... this. Adjust.
12717 (struct process_info): Rename to ...
12718 (struct lwp_info): ... this.
12719 (all_processes): Rename to ...
12720 (all_lwps): ... this.
12721 * proc-service.c (ps_lgetregs): Adjust.
12722 * thread-db.c (thread_db_create_event, find_one_thread)
12723 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12725 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12727 * server.c (handle_query): Handle "qAttached".
12729 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12731 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12732 GPLv3, update license URL.
12734 2009-03-01 Doug Evans <dje@google.com>
12736 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12737 (server_h): Add gdb_signals.h.
12738 (signals.o): Update.
12739 * server.h (target_signal_from_host,target_signal_to_host_p)
12740 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12742 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12744 * remote-utils.c (getpkt): Also generate remote-debug
12745 information if noack_mode is set.
12747 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12749 * server.c (handle_query): Report qXfer:siginfo:read and
12750 qXfer:siginfo:write as supported and handle them.
12751 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12752 * linux-low.c (linux_xfer_siginfo): New.
12753 (linux_target_ops): Set it.
12755 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12757 * server.c (gdbserver_usage): Mention --remote-debug.
12758 (main): Accept '--remote-debug' switch.
12760 2009-01-18 Doug Evans <dje@google.com>
12762 * regcache.c (new_register_cache): No need to check result of xcalloc.
12763 * server.c (handle_search_memory): Back out calls to xmalloc,
12764 result is checked and error is returned to user upon failure.
12765 (handle_query): Ditto. Add more checks for result of malloc.
12766 (handle_v_cont): Check result of malloc, report error back to
12768 (handle_v_run): Ditto. Call freeargv.
12769 * server.h (freeargv): Declare.
12770 * utils.c (freeargv): New fn.
12772 2009-01-15 Doug Evans <dje@google.com>
12774 * gdbreplay.c (perror_with_name): Make arg const char *.
12775 * server.h (target_signal_to_name): Make return type const char *.
12776 * thread-db.c (thread_db_err_str): Make return type const char *.
12777 * utils.c (perror_with_name): Make arg const char *.
12779 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12781 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12782 when handling a EXIT_PROCESS_DEBUG_EVENT.
12784 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12786 * gdbreplay.c (gdbreplay_version): Update copyright year.
12787 * server.c (gdbserver_version): Likewise.
12789 2009-01-05 Doug Evans <dje@google.com>
12791 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12792 (handle_extended_wait): Improve comment.
12794 2008-12-13 Doug Evans <dje@google.com>
12796 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12797 * server.h (ATTR_MALLOC): New macro.
12798 (xmalloc,xcalloc,xstrdup): Declare.
12799 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12800 * inferiors.c: Ditto.
12801 * linux-low.c: Ditto.
12802 * mem-break.c: Ditto.
12803 * regcache.c: Ditto.
12804 * remote-utils.c: Ditto.
12807 * win32-low.c: Ditto.
12809 2008-12-12 Doug Evans <dje@google.com>
12811 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12812 in debugging printf.
12814 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12816 2008-12-09 Doug Evans <dje@google.com>
12818 * linux-low.h (struct process_info): Delete member tid, unused.
12819 * thread-db.c (find_one_thread): Update.
12820 (maybe_attach_thread): Update.
12822 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12824 * target.h (struct target_ops): Add qxfer_osdata member.
12825 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12827 (linux_qxfer_osdata): New functions.
12828 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12830 * server.c (handle_query): Handle "qXfer:osdata:read:".
12831 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12832 (buffer_xml_printf): New functions.
12833 * server.h (struct buffer): New.
12834 (buffer_grow_str, buffer_grow_str0): New macros.
12835 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12836 (buffer_xml_printf): Declare.
12838 2008-11-24 Doug Evans <dje@google.com>
12840 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12842 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12844 * server.c (handle_v_run): Always use the supplied argument list.
12846 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12848 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12849 (xtensa_regmap_table): Add entry for scompare1.
12851 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12853 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12854 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12855 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12856 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12857 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12858 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12859 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12860 XML target descriptions.
12861 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12862 when inferior is running on an ISA 2.05 or later processor. Add
12863 special case to return offset for full 64-bit slot of FPSCR when
12866 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12868 * Makefile.in (SFILES, clean): Added sparc64 files.
12869 (reg-sparc64.o, reg-sparc64.c): New.
12870 * configure.srv (sparc*-*-linux*): New configuration.
12871 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12872 syscall arguments for SPARC.
12873 (regsets_store_inferior_registers): Likewise.
12874 * linux-sparc-low.c: New file.
12876 2008-10-21 Doug Evans <dje@google.com>
12878 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12879 (READLINE_DIR,READLINE_DEP): Delete.
12880 (INTERNAL_CFLAGS): Update.
12881 (LINTFLAGS): Update.
12883 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12885 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12886 whole argv from the last run, not just argv[0].
12888 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12890 * regcache.c (new_register_cache): Return NULL if the register
12891 cache size isn't known yet.
12892 (free_register_cache): Avoid dereferencing a NULL regcache.
12894 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12896 * configure.srv: Merge MIPS and MIPS64.
12898 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12900 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12902 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12904 * Makefile.in: Add required vsx dependencies.
12906 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12907 Declare init_registers_powerpc_vsx32l.
12908 Declare init_registers_powerpc_vsx64l.
12909 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12910 (ppc_arch_setup): Check for VSX in hwcap.
12911 (ppc_fill_vsxregset): New function.
12912 (ppc_store_vsxregset): New function.
12913 Add new VSX entry in regset_info target_regsets.
12915 * configure.srv: Add new VSX dependencies.
12917 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12919 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12920 (remote_open): Set or clear transport_is_reliable.
12921 (putpkt_binary): Don't expect acks in noack mode.
12922 (getpkt): Don't send ack/nac in noack mode.
12923 * server.c (handle_general_set): Handle QStartNoAckMode.
12924 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12926 (main): Reset noack_mode on every connection.
12927 * server.h (noack_mode): Declare.
12929 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12931 * Makefile.in (GDBREPLAY_OBS): New variable.
12932 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12934 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12935 Daniel Jacobowitz <dan@codesourcery.com>
12937 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12938 (usr_store_inferior_registers): Likewise.
12939 (regsets_store_inferior_registers): Likewise.
12941 2008-07-31 Rolf Jansen <rj@surtec.com>
12942 Pedro Alves <pedro@codesourcery.com>
12944 * configure.ac: Check for memmem declaration.
12945 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12946 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12947 (disable_packet_qfThreadInfo): Unconditionally compile.
12948 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12949 * configure, config.in: Regenerate.
12951 2008-07-28 Doug Kwan <dougkwan@google.com>
12953 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12954 (linux_write_memory): Remove declaration of errno.
12956 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12958 * linux-low.c (handle_extended_wait): Do not use "status"
12959 variable uninitialized.
12961 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12963 * server.c (handle_v_attach): Inhibit reporting dll changes.
12965 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12967 * remote-utils.c (prepare_resume_reply): If requested, don't
12968 output "thread:TID" in the T stop reply.
12970 * server.c (disable_packet_vCont, disable_packet_Tthread)
12971 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12972 (handle_query): If requested, disable support for qC, qfThreadInfo
12974 (handle_v_requests): If requested, disable support for vCont.
12975 (gdbserver_show_disableable): New.
12976 (main): Handle --disable-packet and --disable-packet=LIST.
12978 * server.h (disable_packet_vCont, disable_packet_Tthread)
12979 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12981 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12983 * server.c (gdbserver_usage): Mention --version.
12985 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12987 * Makefile.in (gdbreplay.o): New rule.
12989 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12991 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12992 message, not gdbserver.
12994 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12995 Nathan Sidwell <nathan@codesourcery.com>
12996 Joseph Myers <joseph@codesourcery.com>
12998 * acinclude.m4: Include ../../config/acx.m4.
12999 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13000 * configure, config.in: Regenerate.
13001 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13002 * server.c (gdbserver_version): Print PKGVERSION.
13003 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13004 (main): Adjust gdbserver_usage calls.
13005 * gdbreplay.c (version, host_name): Add declarations.
13006 (gdbreplay_version, gdbreplay_usage): New.
13007 (main): Accept --version and --help options.
13009 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13011 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13012 (arm_breakpoint_at): Handle Thumb.
13013 (the_low_target): Add comment.
13015 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13017 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13019 2008-05-09 Doug Evans <dje@google.com>
13021 * server.h (decode_search_memory_packet): Declare.
13022 * remote-utils.c (decode_search_memory_packet): New fn.
13023 * server.c (handle_search_memory_1): New fn.
13024 (handle_search_memory): New fn.
13025 (handle_query): Process qSearch:memory packets.
13027 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13029 * regcache.c (registers_length): Remove.
13030 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13031 full register packet.
13032 * regcache.h (registers_length): Remove prototype.
13033 * server.h (PBUFSIZ): Define to 16384.
13035 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13037 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13038 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13039 powerpc-64l.o, and powerpc-altivec64l.o.
13040 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13041 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13042 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13043 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13044 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13047 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13048 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13049 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13050 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13051 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13052 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13053 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13054 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13055 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13056 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13059 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13060 (init_registers_powerpc_32l): ... this new prototype.
13061 (init_registers_powerpc_32): Remove, replace by ...
13062 (init_registers_powerpc_altivec32l): ... this new prototype.
13063 (init_registers_powerpc_e500): Remove, replace by ...
13064 (init_registers_powerpc_e500l): ... this new prototype.
13065 (init_registers_ppc64): Remove, replace by ...
13066 (init_registers_powerpc_64l): ... this new prototype.
13067 (init_registers_powerpc_64): Remove, replace by ...
13068 (init_registers_powerpc_altivec64l): ... this new prototype.
13069 (ppc_num_regs): Set to 73.
13070 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13071 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13072 (ppc_cannot_store_register): Handle orig_r3 and trap.
13073 (ppc_arch_setup): Update init_registers_... calls.
13074 (ppc_fill_gregset): Handle orig_r3 and trap.
13076 * inferiors.c (clear_inferiors): Reset current_inferior.
13078 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13080 * acinclude.m4: Add override.m4.
13081 * configure: Regenerate.
13083 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13085 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13086 initial call to init_register_ppc64.
13088 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13090 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13091 single powerpc*-*-linux* case.
13092 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13094 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13096 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13097 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13099 * linux-ppc-low.c: Include <elf.h>.
13100 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13101 (ppc_hwcap): New global variable.
13102 (ppc_regmap): Remove __SPE__ #ifdef sections.
13103 (ppc_regmap_e500): New global variable.
13104 (ppc_cannot_store_register): Update __SPE__ special case.
13105 (ppc_get_hwcap): New function.
13106 (ppc_arch_setup): Use it to determine whether inferior supports
13107 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13108 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13109 Do not access registers if target does not support AltiVec.
13110 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13111 Do not access registers if target does not support SPE.
13112 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13114 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13116 * linux-low.c (disabled_regsets, num_regsets): New.
13117 (use_regsets_p): Delete.
13118 (linux_wait_for_process): Clear disabled_regsets.
13119 (regsets_fetch_inferior_registers): Check and set it.
13120 (regsets_store_inferior_registers): Likewise.
13121 (linux_fetch_registers, linux_store_registers): Do not use
13123 (initialize_low): Allocate disabled_regsets.
13125 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13127 * Makefile.in (LIBOBJS): New.
13128 (OBS): Use LIBOBJS.
13129 (memmem.o): New rule.
13130 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13131 * configure: Regenerated.
13133 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13135 * server.c (handle_query): Never return "unsupported" for
13136 qXfer:features:read queries.
13138 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13140 * server.c (get_features_xml): Fix inverted condition.
13141 (handle_query): Always support qXfer:feature:read.
13143 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13145 * server.c (wrapper_argv): New.
13146 (start_inferior): Handle wrapper_argv. If set, expect an extra
13148 (gdbserver_usage): Document --wrapper.
13149 (main): Parse --wrapper.
13151 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13153 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13154 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13155 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13156 (ppc_set_pc): Likewise.
13157 (ppc_arch_setup): New function.
13158 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13159 of collect_register.
13160 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13162 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13164 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13165 instead of linux-ppc64-low.o.
13166 * linux-ppc64-low.c: Remove file.
13167 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13168 (linux-ppc64-low.o): Remove rule.
13170 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13171 (init_registers_powerpc_64): Likewise.
13172 (ppc_regmap): Conditionally define depending on __powerpc64__.
13173 (ppc_cannot_store_register): Do not special-case "fpscr" when
13174 compiled on __powerpc64__.
13175 (ppc_collect_ptrace_register): New function.
13176 (ppc_supply_ptrace_register): New function.
13177 (ppc_breakpoint): Change type to "unsigned int".
13178 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13179 (the_low_target): Conditionally provide initializers for the
13180 arch_setup member depending on __powerpc64__. Install
13181 collect_ptrace_register and supply_ptrace_register members.
13183 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13185 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13186 * server.c (gdbserver_xmltarget): Define.
13187 (get_features_xml): Use it to replace "target.xml" and arch_string.
13189 * configure.srv: Remove srv_xmltarget. Add XML files that were
13190 mentioned there to srv_xmlfiles instead. Remove conditional tests
13191 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13192 srv_xmlfiles and srv_regobj to include all possible choices.
13193 * configure.ac (srv_xmltarget): Remove.
13194 (srv_xmlfiles): Do not add "target.xml".
13195 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13196 checks for supplementary target information.
13197 * configure: Regenerate.
13198 * Makefile.in (XML_TARGET): Remove.
13199 (target.xml): Remove rule.
13200 (clean): Do not clean up target.xml.
13201 (.PRECIOUS): Do not mention target.xml.
13203 * target.h (struct target_ops): Remove arch_string member.
13204 * linux-low.c (linux_arch_string): Remove.
13205 (linux_target_ops): Remove arch_string initializer.
13206 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13207 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13208 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13209 * spu-low.c (spu_arch_string): Remove.
13210 (spu_target_ops): Remove arch_string initializer.
13211 * win32-low.c (win32_arch_string): Remove.
13212 (win32_target_ops): Remove arch_string initializer.
13213 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13214 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13215 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13217 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13219 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13220 by collect_ptrace_register and supply_ptrace_register hooks.
13221 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13222 instead of checking for the_low_target.left_pad_xfer.
13223 (usr_store_inferior_registers): Use collect_ptrace_register callback
13224 instead of checking for the_low_target.left_pad_xfer.
13226 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13227 (s390_supply_ptrace_register): Likewise.
13228 (s390_fill_gregset): Call s390_collect_ptrace_register.
13229 (the_low_target): Update.
13231 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13232 (ppc_supply_ptrace_register): Likewise.
13233 (the_low_target): Update.
13235 * linux-i386-low.c (the_low_target): Update.
13236 * linux-x86-64-low.c (the_low_target): Update.
13238 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13240 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13241 reg-s390.o and reg-s390x.o.
13243 * linux-low.c (new_inferior): New global variable.
13244 (linux_create_inferior, linux_attach): Set it.
13245 (linux_wait_for_process): Call the_low_target.arch_setup after the
13246 target has stopped for the first time.
13247 (initialize_low): Do not call the_low_target.arch_setup.
13249 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13250 (s390_set_pc): Likewise.
13251 (s390_arch_setup): New function.
13252 (the_low_target): Use s390_arch_setup as arch_setup routine.
13254 * regcache.c (realloc_register_cache): New function.
13255 (set_register_cache): Call it for each existing regcache.
13257 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13259 * server.h (init_registers): Remove prototype.
13261 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13262 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13263 instead of init_registers ().
13264 * linux-arm-low.c (init_registers_arm): Add prototype.
13265 (init_registers_arm_with_iwmmxt): Likewise.
13266 (the_low_target): Add initializer for arch_setup field.
13267 * linux-cris-low.c (init_registers_cris): Add prototype.
13268 (the_low_target): Add initializer for arch_setup field.
13269 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13270 (the_low_target): Add initializer for arch_setup field.
13271 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13272 (the_low_target): Add initializer for arch_setup field.
13273 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13274 (the_low_target): Add initializer for arch_setup field.
13275 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13276 (the_low_target): Add initializer for arch_setup field.
13277 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13278 (the_low_target): Add initializer for arch_setup field.
13279 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13280 (init_registers_mips64_linux): Likewise.
13281 (the_low_target): Add initializer for arch_setup field.
13282 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13283 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13284 (the_low_target): Add initializer for arch_setup field.
13285 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13286 (init_registers_powerpc_64): Likewise.
13287 (the_low_target): Add initializer for arch_setup field.
13288 * linux-s390-low.c (init_registers_s390): Add prototype.
13289 (init_registers_s390x): Likewise.
13290 (the_low_target): Add initializer for arch_setup field.
13291 * linux-sh-low.c (init_registers_sh): Add prototype.
13292 (the_low_target): Add initializer for arch_setup field.
13293 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13294 (the_low_target): Add initializer for arch_setup field.
13295 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13296 (the_low_target): Add initializer for arch_setup field.
13298 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13299 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13300 instead of init_registers ().
13301 * win32-arm-low.c (init_registers_arm): Add prototype.
13302 (the_low_target): Add initializer for arch_setup field.
13303 * win32-i386-low.c (init_registers_i386): Add prototype.
13304 (the_low_target): Add initializer for arch_setup field.
13306 * spu-low.c (init_registers_spu): Add prototype.
13307 (initialize_low): Call initialie_registers_spu () instead of
13308 initialize_registers ().
13310 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13312 * server.c (handle_v_requests): When handling the vRun and vAttach
13313 packets, if already debugging a process, don't kill it. Return an
13316 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13318 * server.c (handle_query): Correct length check.
13320 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13322 * win32-low.c (do_initial_child_stuff): Add process handle
13323 parameter. Set current_process_handle and current_process_id from the
13324 parameters. Clear globals.
13325 (win32_create_inferior): Don't set current_process_handle and
13326 current_process_id here. Instead pass them on the call to
13327 do_initial_child_stuff.
13328 (win32_attach): Likewise.
13329 (win32_clear_inferiors): New.
13330 (win32_kill): Don't close the current process handle or the
13331 current thread handle here. Instead call win32_clear_inferiors.
13332 (win32_detach): Don't open a new handle to the process. Call
13333 win32_clear_inferiors.
13334 (win32_join): Don't rely on current_process_handle; open a new
13335 handle using the process id.
13336 (win32_wait): Call win32_clear_inferiors when the inferior process
13339 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13341 * server.c (monitor_show_help): Add "exit".
13343 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13345 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13346 (clean): Add reg-xtensa.c.
13347 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13348 * configure.srv (xtensa*-*-linux*) New target.
13349 * linux-xtensa-low.c: New.
13350 * xtensa-xtregs.c: New.
13352 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13354 * hostio.c: Don't include errno.h.
13355 (errno_to_fileio_errno): Move to hostio-errno.
13356 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13357 error number outputting to the target->hostio_last_error callback.
13358 (hostio_packet_error): Use FILEIO_EINVAL directly.
13359 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13360 calls to hostio_error.
13361 * hostio-errno.c: New.
13362 * server.h (hostio_last_error_from_errno): Declare.
13363 * target.h (target_ops): Add hostio_last_error member.
13364 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13365 as hostio_last_error handler.
13366 * spu-low.c (spu_target_ops): Likewise.
13367 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13368 (wince_hostio_last_error): New functions.
13369 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13370 as hostio_last_error handler.
13371 (win32_target_ops) [!_WIN32_WCE]: Register
13372 hostio_last_error_from_errno as hostio_last_error handler.
13373 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13374 (hostio-errno.o): New rule.
13375 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13376 * configure.srv (srv_hostio_err_objs): New variable. Default to
13378 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13379 * configure: Regenerate.
13381 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13383 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13384 (linux_kill, linux_detach): Clean up the process list.
13385 * remote-utils.c (remote_open): Improve port number parsing.
13386 (putpkt_binary, input_interrupt): Only send interrupts if the target
13388 * server.c (extended_protocol): Make static.
13389 (attached): Define earlier.
13390 (exit_requested, response_needed, program_argv): New variables.
13391 (target_running): New.
13392 (start_inferior): Clear attached here.
13393 (attach_inferior): Set attached here.
13394 (require_running): Define.
13395 (handle_query): Use require_running and target_running. Implement
13397 (handle_v_attach, handle_v_run): New.
13398 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13399 (gdbserver_usage): Update.
13400 (main): Redo argument parsing. Handle --debug and --multi. Handle
13401 --attach along with other options or after the port. Save
13402 program_argv. Support no initial program. Resynchronize
13403 communication with GDB after an error. Handle "monitor exit".
13404 Use require_running and target_running. Always allow the extended
13405 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13406 restart in extended mode.
13407 * README: Refer to the GDB manual. Update --attach usage.
13409 2007-12-20 Andreas Schwab <schwab@suse.de>
13411 * linux-low.c (STACK_SIZE): Define.
13412 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13413 (linux_test_for_tracefork): Likewise.
13415 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13417 * linux-low.c (linux_wait_for_event): Update messages. Do not
13418 reinsert auto-delete breakpoints.
13419 * mem-break.c (struct breakpoint): Change return type of handler to
13421 (set_breakpoint_at): Update handler type.
13422 (reinsert_breakpoint_handler): Return 1 instead of calling
13424 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13426 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13427 * mem-break.h (set_breakpoint_at): Update handler type.
13428 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13429 * win32-low.c (auto_delete_breakpoint): New.
13430 (get_child_debug_event): Use it.
13432 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13434 * configure.ac: Check for pread and pwrite.
13435 * hostio.c (handle_pread): Fall back to lseek and read.
13436 (handle_pwrite): Fall back to lseek and write.
13437 * config.in, configure: Regenerated.
13439 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13441 * server.c (myresume): Add own_buf argument.
13442 (main): Update calls.
13444 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13446 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13447 * remote-utils.c (remote_open): Do not call disable_async_io.
13448 (block_async_io): Delete.
13449 (unblock_async_io): Make static.
13450 (initialize_async_io): New.
13451 * server.c (handle_v_cont): Handle async I/O here.
13452 (myresume): Likewise. Move other common resume tasks here...
13453 (main): ... from here. Call initialize_async_io. Disable async
13454 I/O before the main loop.
13455 * server.h (initialize_async_io): Declare.
13456 (block_async_io, unblock_async_io): Delete prototypes.
13457 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13459 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13461 * remote-utils.c (readchar): Allow binary data in received messages.
13463 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13465 * win32-low.c (attaching): New global.
13466 (win32_create_inferior): Clear the `attaching' global.
13467 (win32_attach): Set the `attaching' global.
13468 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13469 attaching. Only set a breakpoint at the entry point if not
13472 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13474 * server.c (main): Don't report dll events on the initial
13475 connection on attaches.
13477 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13479 * server.c (main): Relax numerical bases supported for the pid of
13480 the --attach command line argument.
13482 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13484 * win32-low.c (win32_attach): Call OpenProcess before
13485 DebugActiveProcess, not after. Add last error output to error
13488 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13490 * win32-low.c (win32_get_thread_context)
13491 (win32_set_thread_context): New functions.
13492 (thread_rec): Use win32_get_thread_context.
13493 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13494 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13497 2007-12-03 Leo Zayas
13498 Pedro Alves <pedro_alves@portugalmail.pt>
13500 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13502 (child_add_thread): Minor cleanup.
13503 (child_continue): Resume artificially suspended threads before
13504 calling ContinueDebugEvent.
13505 (suspend_one_thread): New.
13506 (fake_breakpoint_event): New.
13507 (get_child_debug_event): Change return type to int. Check here if
13508 gdb sent an interrupt request. If a soft interrupt was requested,
13509 fake a breakpoint event. Return 0 if there is no event to handle,
13511 (win32_wait): Don't check here if gdb sent an interrupt request.
13512 Ensure there is a valid event to handle.
13513 (win32_request_interrupt): Add soft interruption method as last
13516 2007-12-03 Leo Zayas
13517 Pedro Alves <pedro_alves@portugalmail.pt>
13519 * win32-low.h (win32_thread_info): Add descriptions to the
13520 structure members. Replace `suspend_count' counter by a
13522 * win32-low.c (thread_rec): Update condition of when to get the
13523 context from the inferior. Rely on ContextFlags being set if it
13524 has already been retrieved. Only suspend the inferior thread if
13525 we haven't already. Warn if that fails.
13526 (continue_one_thread): s/suspend_count/suspended/. Only call
13527 ResumeThread once. Warn if that fails.
13529 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13531 * win32-low.c (win32_wait): Don't read from the inferior when it
13532 has already exited.
13534 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13536 * Makefile.in (win32_low_h): New variable.
13537 (win32-low.o): Add dependency on $(win32_low_h).
13538 (win32-arm-low.o, win32-i386-low.o): New rules.
13540 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13542 * hostio.c: Correct copyright year.
13544 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13546 * Makefile.in (OBS): Add hostio.o.
13547 (hostio.o): New rule.
13548 * server.h (handle_vFile): Declare.
13549 * hostio.c: New file.
13550 * server.c (handle_v_requests): Take packet_len and new_packet_len
13551 for binary packets. Call handle_vFile.
13552 (main): Update call to handle_v_requests.
13554 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13556 * linux-low.c: Include <sched.h>.
13558 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13560 * linux-low.c (linux_tracefork_grandchild): New.
13561 (linux_tracefork_child): Use clone.
13562 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13564 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13566 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13568 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13570 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13572 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13574 * inferiors.c (change_inferior_id): Delete.
13575 (add_pid_to_list, pull_pid_from_list): New.
13576 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13577 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13578 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13579 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13580 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13581 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13582 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13583 (using_threads): Always set to 1.
13584 (handle_extended_wait): New.
13585 (add_process): Do not set TID.
13586 (linux_create_inferior): Set must_set_ptrace_flags.
13587 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13588 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13589 (linux_thread_alive): Rename TID argument to LWPID.
13590 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13591 (linux_wait_for_event): Do not use TID or check using_threads. Update
13592 call to dead_thread_notify. Call handle_extended_wait.
13593 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13594 (send_sigstop): Delete sigstop_sent.
13595 (wait_for_sigstop): Avoid TID.
13596 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13597 (linux_test_for_tracefork): New.
13598 (linux_lookup_signals): Use thread_db_active and
13599 linux_supports_tracefork_flag.
13600 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13601 * linux-low.h (get_process_thread): Avoid TID.
13602 (struct process_ifo): Move thread_known and tid to the end. Remove
13604 (linux_attach_lwp, thread_db_init): Update prototypes.
13605 * server.h (change_inferior_id): Delete prototype.
13606 (add_pid_to_list, pull_pid_from_list): New prototypes.
13607 * thread-db.c (thread_db_use_events): New.
13608 (find_first_thread): Rename to...
13609 (find_one_thread): ...this. Update callers and messages. Do not
13610 call fatal. Check thread_db_use_events. Do not call
13611 change_inferior_id or new_thread_notify.
13612 (maybe_attach_thread): Update. Do not call new_thread_notify.
13613 (thread_db_init): Set thread_db_use_events. Check use_events.
13614 * utils.c (fatal, warning): Correct message prefix.
13616 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13618 * Makefile.in (clean): Remove new files.
13619 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13620 (powerpc-64.o, powerpc-64.c): New rules.
13621 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13622 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13624 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13626 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13627 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13628 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13629 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13630 (target_regsets): Add AltiVec and SPE register sets.
13631 * configure.ac: Check for AltiVec and SPE.
13632 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13633 (ppc_fill_vrregset, ppc_store_vrregset): New.
13634 (target_regsets): Add AltiVec register set.
13635 * configure: Regenerated.
13637 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13639 * linux-low.c (O_LARGEFILE): Define.
13640 (linux_read_memory): Use /proc/PID/mem.
13641 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13642 * configure, config.in: Regenerated.
13644 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13646 * linux-low.c (linux_wait_for_event): Do not pass signals while
13649 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13651 * win32-low.c (create_process): New.
13652 (win32_create_inferior): Use create_process instead of
13653 CreateProcess. If create_process failed retry appending an ".exe"
13654 suffix. Store the GetLastError result immediatelly after
13655 create_process calls and use it on the call to error.
13657 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13659 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13661 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13663 * configure.ac: Switch license to GPLv3.
13665 2007-08-01 Michael Snyder <msnyder@access-company.com>
13667 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13669 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13671 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13673 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13674 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13675 CloseToolhelp32Snapshot.
13676 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13677 CloseToolhelp32Snapshot.
13679 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13681 * server.c (main): Check for inferior exit before main loop.
13683 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13685 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13686 instead of on tmp_desc.
13688 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13689 Daniel Jacobowitz <dan@codesourcery.com>
13691 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13692 (add_thread): Minor cleanups.
13693 (clear_inferiors): Move lower in the file. Clear the DLL
13695 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13696 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13697 (xml_escape_text): New.
13698 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13700 (handle_v_cont): Report errors.
13701 (gdbserver_version): Update.
13702 (main): Correct size of own_buf. Do not report initial DLL events.
13703 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13704 (unloaded_dll, xml_escape_text): New.
13705 * win32-low.c (enum target_waitkind): Update comments.
13706 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13707 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13708 (win32_EnumProcessModules, win32_GetModuleInformation)
13709 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13710 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13711 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13712 (win32_Module32First, win32_Module32Next, load_toolhelp)
13713 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13714 (get_child_debug_event): Handle DLL events.
13715 (win32_wait): Likewise.
13717 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13719 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13720 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13722 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13724 * win32-low.c (handle_output_debug_string): Ignore event if not
13727 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13729 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13731 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13733 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13735 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13737 * inferiors.c (change_inferior_id): Add comment.
13738 * linux-low.c (check_removed_breakpoint): Add an early
13739 prototype. Improve debug output.
13740 (linux_attach): Doc update.
13741 (linux_detach_one_process, linux_detach): Clean up before releasing
13743 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13744 * linux-low.h (struct process_info): Doc improvement.
13745 * mem-break.c (delete_all_breakpoints): New.
13746 * mem-break.h (delete_all_breakpoints): New prototype.
13747 * thread-db.c (find_first_thread): New.
13748 (thread_db_create_event): Call it instead of
13749 thread_db_find_new_threads. Clean up unused variables.
13750 (maybe_attach_thread): Remove first thread handling.
13751 (thread_db_find_new_threads): Use find_first_thread.
13752 (thread_db_get_tls_address): Likewise.
13754 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13756 * thread-db.c (thread_db_find_new_threads): Add prototype.
13757 (thread_db_create_event): Check for the main thread before adding
13759 (maybe_attach_thread): Only enable event reporting if TID == 0.
13760 (thread_db_get_tls_address): Check for new threads.
13762 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13764 * linux-low.c (linux_create_inferior): Try execv before execvp.
13765 * spu-low.c (spu_create_inferior): Likewise.
13767 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13769 * linux-low.c (linux_create_inferior): Change execv to execvp.
13770 * spu-low.c (spu_create_inferior): Likewies.
13772 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13774 * Makefile.in (clean): Clean new files instead of deleted ones.
13775 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13776 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13778 * configure.srv: Specify XML files and new regformats for MIPS and
13780 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13781 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13782 an entry for the restart register.
13783 (mips_cannot_fetch_register, mips_cannot_store_register)
13784 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13785 register names to match the XML descriptions.
13786 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13787 restart register instead of $0.
13789 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13790 Markus Deuling <deuling@de.ibm.com>
13792 * remote-utils.c (decode_xfer_write): New function.
13793 * server.h (decode_xfer_write): Add prototype.
13794 * server.c (handle_query): Add PACKET_LEN argument. Support
13795 qXfer:spu:read and qXfer:spu:write packets.
13796 (main): Pass packet_len to handle_query.
13797 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13798 * target.h (target_ops): Add qxfer_spu.
13800 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13802 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13803 accessing non-seekable spufs files.
13805 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13807 * server.c (handle_query): Add reply for qC packet.
13809 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13810 Leo Zayas <lerele@champenstudios@com>
13812 * server.h (check_remote_input_interrupt_request): New function.
13813 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13814 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13815 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13816 (check_remote_input_interrupt_request): New function.
13817 * server.h (check_remote_input_interrupt_request): Declare.
13818 * win32-low.c (winapi_DebugBreakProcess,
13819 winapi_GenerateConsoleCtrlEvent): New typedefs.
13820 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13822 (win32_wait): Check for remote interrupt request
13823 with check_remote_input_interrupt_request.
13824 (win32_request_interrupt): New function.
13825 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13827 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13829 * win32-low.c (debug_registers_changed,
13830 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13831 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13832 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13833 (thread_rec): Get context using the low target.
13834 (child_add_thread): Call thread_added on the low target,
13835 which does the same thing.
13837 (do_initial_child_stuff): Remove debug registers references.
13838 Set context using the low target. Resume threads after
13839 setting the contexts.
13840 (child_continue): Remove dead variable. Remove debug
13841 registers references.
13842 (child_fetch_inferior_registers): Go through the low target.
13843 (do_child_store_inferior_registers): Remove.
13844 (child_store_inferior_registers): Go through the low target.
13845 (win32_resume): Remove debug registers references.
13846 Set context using the low target.
13847 (handle_exception): Change return type to void. Don't record
13848 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13849 first chance exception.
13850 (get_child_debug_event): Change return type to void. Remove
13851 goto loop. Always return after waiting for debug event.
13852 (win32_wait): Convert to switch statement. Handle spurious
13855 * win32-i386-low.c (debug_registers_changed,
13856 debug_registers_used): New.
13857 (initial_stuff): Rename to ...
13858 (i386_initial_stuff): ... this. Clear debug registers
13860 (store_debug_registers): Delete.
13861 (i386_get_thread_context): New.
13862 (load_debug_registers): Delete.
13863 (i386_set_thread_context): New.
13864 (i386_thread_added): New.
13865 (single_step): Rename to ...
13866 (i386_single_step): ... this.
13867 (do_fetch_inferior_registers): Rename to ...
13868 (i386_fetch_inferior_register): ... this.
13869 (i386_store_inferior_register): New.
13870 (the_low_target): Adapt to new interface.
13872 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13873 (arm_get_thread_context): New.
13874 (arm_set_thread_context): New.
13876 (do_fetch_inferior_registers): Rename to ...
13877 (arm_fetch_inferior_register): ... this.
13878 (arm_store_inferior_register): New.
13879 (arm_wince_breakpoint): Reimplement as unsigned long.
13880 (arm_wince_breakpoint_len): Define.
13881 (the_low_target): Adapt to new interface.
13883 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13884 load_debug_registers. Add get_thread_context, set_thread_context,
13885 thread_added and store_inferior_register. Rename
13886 fetch_inferior_registers to fetch_inferior_register.
13887 (regptr): Remove declaration.
13889 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13891 * linux-low.c (linux_detach): Change return type to int. Return 0.
13892 * spu-low.c (spu_detach): Likewise.
13894 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13896 * target.h (target_ops): Change return type of detach to int.
13898 (join_inferior): New.
13899 * server.c (main): Don't skip detach support on mingw32.
13900 If the inferior doesn't support detaching return error.
13901 Call join_inferior instead of using waitpid.
13902 * linux-low.c (linux_join): New.
13903 (linux_target_op): Add linux_join.
13904 * spu-low.c (spu_join): New.
13905 (spu_target_ops): Add spu_join.
13906 * win32-low.c (win32_detach): Adapt to new interface.
13907 Reopen current_process_handle before detaching. Issue a child
13908 resume before detaching.
13910 (win32_target_op): Add win32_join.
13912 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13914 * win32-low.c (win32-attach): Fix return value.
13915 * target.h (target_ops): Describe ATTACH return values.
13917 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13919 * win32-low.c (GETPROCADDRESS): Define.
13920 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13921 (winapi_DebugSetProcessKillOnExit): Likewise.
13922 (win32_create_inferior): Force usage of ansi CreateProcessA.
13923 (win32_attach): Use GETPROCADDRESS.
13924 (win32_detach): Likewise.
13926 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13928 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13930 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13932 * win32-low.c: Commit leftover changes from 2007-03-29.
13934 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13936 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13937 fields short instead of int. Add explicit padding.
13938 (i387_cache_to_fsave): Remove unnecessary casts.
13939 (i387_fsave_to_cache): Doc fix.
13940 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13942 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13944 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13945 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13947 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13949 * configure.srv (arm*-*-mingw32ce*): Move near the other
13952 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13954 * configure.ac: Add errno checking.
13955 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13956 sys/file.h and malloc.h.
13957 (AC_CHECK_DECLS): Add perror.
13958 (srv_mingwce): Handle.
13959 * configure.srv (i[34567]86-*-cygwin*): Add
13960 win32-i386-low.o to srv_tgtobj.
13961 (i[34567]86-*-mingw*): Likewise.
13962 (arm*-*-mingw32ce*): Add case.
13963 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13964 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13965 [__MINGW32CE__] (strerror): New function.
13966 [__MINGW32CE__] (errno): Define to GetLastError.
13967 [__MINGW32CE__] (COUNTOF): New macro.
13968 (remote_open): Remove extra close call.
13969 * mem-break.c (delete_breakpoint_at): New function.
13970 * mem-break.h (delete_breakpoint_at): Declare.
13971 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13972 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13973 [USE_WIN32API] (read, write): Add char* casts.
13974 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13975 * server.h: Include wincecompat.h on Windows CE.
13976 [HAVE_ERRNO_H]: Check.
13977 (perror): Declare if not declared.
13978 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13979 (perror_with_name): Remove errno declaration.
13980 * wincecompat.h: New.
13981 * wincecompat.c: New.
13982 * win32-low.h: New.
13983 * win32-arm-low.c: New.
13984 * win32-i386-low.c: New.
13985 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13986 (OUTMSG2): Make it safe.
13988 (COUNTOF): New macro.
13989 (NUM_REGS): Get it from the low target.
13990 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13991 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13992 (thread_rec): Let low target handle debug registers.
13993 (child_add_thread): Likewise.
13994 (child_init_thread_list): Likewise.
13995 (continue_one_thread): Likewise.
13997 (do_child_fetch_inferior_registers): Move to ...
13998 * win32-i386-low.c: ... here, and rename to ...
13999 (do_fetch_inferior_registers): ... this.
14000 * win32-low.c (child_fetch_inferior_registers):
14001 Go through the low target.
14002 (do_child_store_inferior_registers): Use regptr.
14003 (strwinerror): New function.
14004 (win32_create_inferior): Handle Windows CE.
14005 Use strwinerror instead of strerror on Windows error
14006 codes. Add program to the error output.
14007 Don't close the main thread handle on Windows CE.
14008 (win32_attach): Use coredll.dll on Windows CE.
14009 (win32_kill): Close current process and current
14011 (win32_detach): Use coredll.dll on Windows CE.
14012 (win32_resume): Let low target handle debug registers, and
14014 (handle_exception): Add/Remove initial breakpoint. Avoid
14015 non-existant WSTOPSIG on Windows CE.
14016 (win32_read_inferior_memory): Cast to remove warning.
14017 (win32_arch_string): Go through the low target.
14018 (initialize_low): Call set_breakpoint_data with the low
14019 target's breakpoint.
14020 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14021 FOP_REGNUM, mappings): Move to ...
14022 * win32-i386-low.c: ... here.
14023 * win32-low.c (win32_thread_info): Move to ...
14024 * win32-low.h: ... here.
14025 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14026 win32-arm-low.c and wincecompat.c.
14027 (all:): Add $EXEEXT.
14028 (install-only:): Likewise.
14029 (gdbserver:): Likewise.
14030 (gdbreplay:): Likewise.
14031 * config.in: Regenerate.
14032 * configure: Regenerate.
14034 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14036 * win32-low.c: Rename typedef thread_info to
14037 win32_thread_info throughout.
14039 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14041 * win32-i386-low.c: Rename to ...
14042 * win32-low.c: ... this.
14043 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14044 * Makefile.in: Likewise.
14046 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14048 * remote-utils.c (monitor_output): Constify msg parameter.
14049 * server.h (monitor_output): Likewise.
14050 * win32-i386-low.c (handle_output_debug_string): New.
14051 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14052 handle_output_debug_string.
14053 (get_child_debug_event): Likewise.
14055 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14057 * server.c (main): Correct strtoul check.
14059 2007-03-27 Jon Ringle <jon@ringle.org>
14061 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14063 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14065 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14067 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14069 * terminal.h: Check HAVE_SGTTY_H.
14071 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14073 * remote-utils.c (remote_open): Print out the assigned port number.
14075 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14077 * remote-utils.c (monitor_output): New function.
14078 * server.c (debug_threads): Define here.
14079 (monitor_show_help): New function.
14080 (handle_query): Handle qRcmd.
14081 (main): Do not handle 'd' packet.
14082 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14083 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14086 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14088 * Makefile.in (EXEEXT): New.
14089 (clean): Use $(EXEEXT).
14091 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14093 * target.h (target_ops): Rename send_signal to request_interrupt,
14094 and remove enum target_signal parameter.
14095 * linux-low.c (linux_request_interrupt): Rename from
14096 linux_send_signal, and always send SIGINT.
14097 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14098 and always send SIGINT.
14099 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14101 (input_interrupt): Likewise.
14103 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14105 * server.c (get_features_xml): Check if target implemented
14107 * win32-i386-low.c (win32_arch_string): New.
14108 (win32_target_ops): Add win32_arch_string as arch_string member.
14110 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14112 * spu-low.c (spu_arch_string): New.
14113 (spu_target_ops): Add spu_arch_string.
14115 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14117 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14118 * configure.ac: Do not check for terminal.h.
14119 * configure, config.in: Regenerated.
14121 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14123 * Makefile.in (OBS): Add $(XML_BUILTIN).
14124 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14126 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14127 (arm-with-iwmmxt.c): New.
14128 * config.in, configure: Regenerate.
14129 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14130 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14131 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14132 (arm*-*-linux*): Add iWMMXt and regset support.
14133 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14134 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14135 (arm_store_wmmxregset, target_regsets): New.
14136 * server.c (get_features_xml): Take annex argument. Check builtin
14138 (handle_query): Handle multiple annexes.
14140 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14142 * remote-utils.c [USE_WIN32API] (read, write): Define.
14143 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14146 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14148 * linux-i386-low.c (the_low_target): Set arch_string.
14149 * linux-x86-64-low.c (the_low_target): Likewise.
14150 * linux-low.c (linux_arch_string): New.
14151 (linux_target_ops): Add it.
14152 * linux-low.h (struct linux_target_ops): Add arch_string.
14153 * server.c (write_qxfer_response): Use const void * for DATA.
14154 (get_features_xml): New.
14155 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14156 * target.h (struct target_ops): Add arch_string method.
14158 2007-01-03 Denis Pilat <denis.pilat@st.com>
14159 Daniel Jacobowitz <dan@codesourcery.com>
14161 * linux-low.c (linux_kill): Handle being called with no threads.
14162 * win32-i386-low.c (win32_kill): Likewise.
14163 (get_child_debug_event): Clear current_process_handle.
14165 2006-12-30 Denis PILAT <denis.pilat@st.com>
14166 Daniel Jacobowitz <dan@codesourcery.com>
14168 * remote-utils.c (remote_open): Check the type of specified
14169 serial port devices before opening them.
14170 * server.c (main): Kill the inferior if an error occurs during
14171 the first remote_open.
14173 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14175 * README: Update supported targets.
14177 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14179 * Makefile.in (clean): Remove reg-mips64.c.
14180 (reg-mips64.c, reg-mips64.o): New rules.
14181 * configure.srv: Handle mips64. Include regset support for mips.
14182 * linux-mips-low.c (union mips_register): New.
14183 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14184 (mips_breakpoint, mips_breakpoint_at): Use int.
14185 (mips_collect_register, mips_supply_register)
14186 (mips_collect_register_32bit, mips_supply_register_32bit)
14187 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14188 (mips_store_fpregset, target_regsets): New.
14189 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14191 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14193 * configure.srv: Add target "spu*-*-*".
14194 * Makefile.in (clean): Remove reg-spu.c.
14195 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14196 * spu-low.c: New file.
14198 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14200 * configure.ac: Correct td_thr_tls_get_addr test.
14201 * configure: Regenerated.
14203 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14205 * linux-low.c (linux_wait_for_event): Reformat. Use the
14206 pass_signals array.
14207 * remote-utils.c (decode_address_to_semicolon): New.
14208 * server.c (pass_signals, handle_general_set): New.
14209 (handle_query): Mention QPassSignals for qSupported.
14210 (main): Call handle_general_set.
14211 * server.h (pass_signals, decode_address_to_semicolon): New.
14213 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14215 * server.c (handle_query): Correct error handling for read_auxv.
14217 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14219 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14220 and srv_linux_thread_db to yes.
14221 * linux-s390-low.c (s390_fill_gregset): New function.
14222 (target_regsets): Define data structure.
14224 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14226 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14227 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14228 * config.in, configure: Regenerated.
14229 * inferiors.c (gdb_id_to_thread): New function.
14230 (gdb_id_to_thread_id): Use it.
14231 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14232 * linux-low.h (struct process_info): Add th member.
14233 (thread_db_get_tls_address): New prototype.
14234 * remote-utils.c (decode_address): Make non-static.
14235 * server.c (handle_query): Handle qGetTLSAddr.
14236 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14237 * target.h (struct target_ops): Add get_tls_address.
14238 * thread-db.c (maybe_attach_thread): Save the thread handle.
14239 (thread_db_get_tls_address): New.
14241 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14243 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14244 (linux_resume_one_process): Take a siginfo_t *. Update all
14245 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14246 (struct pending_signals): Add a siginfo_t.
14247 (linux_wait_for_process): Always set last_status.
14248 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14249 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14250 * linux-low.h (struct process_info): Add last_status.
14252 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14254 * remote-utils.c (try_rle): New function.
14255 (putpkt_binary): Use it.
14257 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14259 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14260 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14261 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14262 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14263 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14266 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14268 * server.c (terminal_fd): New variable.
14269 (old_foreground_pgrp): Likewise.
14270 (restore_old_foreground_pgrp): New function.
14271 (start_inferior): Record the terminal file descriptor in terminal_fd
14272 and its original foreground group in old_foreground_pgrp. Register
14273 restore_old_foreground_pgrp with atexit().
14275 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14277 * server.c (handle_query): Correct qPart to qXfer.
14279 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14281 * configure.ac: Check for more headers which are missing on
14282 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14283 * configure.srv: Add Cygwin and mingw32.
14284 * remote-utils.c: Don't include headers unconditionally which
14285 are missing on mingw32. Include <winsock.h> for mingw32.
14286 (remote_open): Adjust for mingw32 support. Flush
14287 standard error after writing to it.
14288 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14289 (unblock_async_io, enable_async_io, disable_async_io)
14290 (readchar, getpkt): Update for Winsock support.
14291 (prepare_resume_reply): Expect a protocol signal number.
14292 * server.c: Disable <sys/wait.h> on mingw32.
14293 (start_inferior): Adjust for mingw32 support. Flush
14294 standard error after writing to it.
14295 (attach_inferior): Likewise. Use protocol signal
14297 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14299 * win32-i386-low.c: New file.
14300 * Makefile.in (XM_CLIBS): Set.
14301 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14302 (win32-i386-low.o): New dependency rule.
14303 * linux-low.c (linux_wait): Use target signal numbers.
14304 * target.h (struct target_ops): Doc fix.
14305 * server.h (target_signal_to_name): New prototype.
14306 * gdbreplay.c: Don't include headers unconditionally which
14307 are missing on mingw32. Include <winsock.h> for mingw32.
14308 (remote_close, remote_open): Adjust for Winsock support.
14309 * configure, config.in: Regenerated.
14311 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14313 * server.c (decode_xfer_read, write_qxfer_response): New.
14314 (handle_query): Take a packet length argument. Handle
14315 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14316 the qSupported response.
14317 (main): Update call to handle_query.
14319 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14321 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14322 (putpkt_binary): Renamed from putpkt and adjusted for binary
14324 (putpkt): New wrapper for putpkt_binary.
14325 (readchar): Don't mask off the high bit.
14326 (decode_X_packet): New function.
14327 * server.c (main): Call putpkt_binary if a handler sets the packet
14328 length. Save the length of the incoming packet. Handle 'X'.
14329 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14331 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14333 * server.c (handle_query): Handle qSupported.
14335 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14337 * remote-utils.c (all_symbols_looked_up): New variable.
14338 (look_up_one_symbol): Check it.
14339 * server.h (look_up_one_symbol): New declaration.
14340 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14342 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14344 * Makefile.in (linux-arm-low.o): Update dependencies.
14345 * linux-arm-low.c: Include "gdb_proc_service.h".
14346 (PTRACE_GET_THREAD_AREA): Define.
14347 (ps_get_thread_area): New function.
14349 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14351 * configure.srv (m68k*-*-uclinux*): New target.
14352 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14353 (linux_resume_one_process): Remove extraneous cast.
14354 (linux_read_offsets): New.
14355 (linux_target_op): Add linux_read_offsets on mmuless systems.
14356 * server.c (handle_query): Add qOffsets logic.
14357 * target.h (struct target_ops): Add read_offsets.
14359 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14361 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14362 (PTRACE_GET_THREAD_AREA): Define.
14363 (ps_get_thread_area): New function.
14364 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14365 (linux-x86-64-low.o): Update.
14367 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14369 * configure.ac: Remove checks for prfpregset_t.
14370 * gdb_proc_service.h: New file.
14371 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14372 new "gdb_proc_service.h".
14373 * proc-service.c: Likewise.
14374 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14375 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14376 * Makefile.in (gdb_proc_service_h): Updated.
14377 * configure, config.in: Regenerated.
14379 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14381 * remote-utils.c (prepare_resume_reply): Move declaration
14382 of gdb_id_from_wait to the top of the block.
14384 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14386 * linux-low.c (regsets_store_inferior_registers): Read the regset
14387 from the target before filling it.
14389 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14391 * server.c (attach_inferior): Return SIGTRAP for a successful
14394 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14396 * Makefile.in (OBS): Add version.o.
14397 (STAGESTUFF): Delete.
14398 (version.o): Add dependencies.
14399 (version.c): Replace rule.
14400 (clean): Remove version.c.
14401 * server.c (gdbserver_version): New.
14402 (gdbserver_usage): Use printf.
14403 (main): Handle --version and --help.
14404 * server.h (version, host_name): Add declarations.
14406 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14418 * linux-x86-64-low.c:
14420 * linux-s390-low.c:
14421 * linux-ppc64-low.c:
14423 * linux-mips-low.c:
14424 * linux-m68k-low.c:
14425 * linux-m32r-low.c:
14428 * linux-ia64-low.c:
14429 * linux-i386-low.c:
14430 * linux-crisv32-low.c:
14442 * gdbserver.1: Add (C) after Copyright. Update the FSF
14445 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14447 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14448 (arm_breakpoint_at): Recognize both breakpoints.
14449 (the_low_target): Use the correct breakpoint instruction.
14451 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14453 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14454 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14455 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14456 (the_low_target): Update.
14458 2005-10-25 Andreas Schwab <schwab@suse.de>
14460 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14462 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14463 (ia64_num_regs): Reduce to 462.
14465 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14467 * acinclude.m4: Correct quoting.
14468 * aclocal.m4: Regenerated.
14470 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14471 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14472 (thread_db_init): Call thread_db_err_str.
14473 * configure.ac: Check for TD_VERSION.
14474 * config.in, configure: Regenerated.
14476 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14478 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14480 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14482 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14483 is not available. Define HAVE_PTRACE_GETREGS if it is.
14484 * config.in, configure: Regenerated.
14485 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14486 * linux-i386-low.c, linux-m68k-low.c: Update to use
14487 HAVE_PTRACE_GETREGS.
14488 * linux-low.c (regsets_fetch_inferior_registers)
14489 (regsets_store_inferior_registers): Only return 0 if we processed
14491 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14492 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14494 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14496 * inferiors.c (struct thread_info): Add gdb_id.
14497 (add_thread): Add gdb_id argument.
14498 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14499 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14500 calls to add_thread.
14501 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14502 * server.c (handle_query): Use thread_to_gdb_id.
14503 (handle_v_cont, main): Use gdb_id_to_thread_id.
14504 * server.h (add_thread): Update prototype.
14505 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14508 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14510 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14511 left-padded registers.
14512 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14513 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14515 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14517 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14518 * configure: Regenerate.
14519 * config.in: Regenerate.
14520 * server.h (NEED_DECLARATION_STRERROR):
14521 Replace with !HAVE_DECL_STRERROR.
14523 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14525 * linux-low.c (linux_wait, linux_send_signal): Don't test
14526 an unsigned long variable for > 0 if it could be MAX_ULONG.
14527 * server.c (myresume): Likewise.
14528 * target.c (set_desired_inferior): Likewise.
14530 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14532 * configure.ac: Simplify and improve check for socklen_t.
14533 * configure, config.in: Regenerate.
14535 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14537 * acconfig.h: Remove.
14538 * configure.ac: Add a test for socklen_t. Use three-argument
14539 AC_DEFINE throughout.
14540 * config.in: Regenerated using autoheader 2.59.
14541 * configure: Regenerated.
14543 * gdbreplay.c (socklen_t): Provide a default.
14544 (remote_open): Use socklen_t.
14545 * remote-utils.c (socklen_t): Provide a default.
14546 (remote_open): Use socklen_t.
14547 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14550 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14552 * linux-low.c (linux_read_memory, linux_write_memory)
14553 (linux_read_auxv): Likewise.
14554 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14555 (check_mem_write): Likewise.
14556 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14558 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14559 (registers_from_string, register_data): Likewise.
14560 * server.c (handle_query, main): Likewise.
14561 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14562 (decode_M_packet): Likewise.
14563 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14564 * target.h (struct target_ops): Update read_memory, write_memory,
14566 (read_inferior_memory, write_inferior_memory): Update.
14567 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14568 to unsigned char *.
14569 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14570 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14571 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14572 linux-s390-low.c, linux-sh-low.c: Update for changes in
14573 read_inferior_memory and the_low_target->breakpoint.
14575 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14577 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14578 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14579 * configure.srv: Add powerpc64-*-linux*.
14580 * linux-ppc64-low.c: New file.
14582 2005-05-23 Orjan Friberg <orjanf@axis.com>
14584 * linux-cris-low.c: New file with support for CRIS.
14585 * linux-crisv32-low.c: Ditto for CRISv32.
14586 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14587 (clean): Add reg-cris.c and reg-crisv32.c.
14588 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14589 reg-crisv32.o, and reg-crisv32.c to make rules.
14590 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14591 recognized targets.
14593 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14595 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14596 of sizeof (PTRACE_XFER_TYPE).
14597 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14599 2005-05-12 Orjan Friberg <orjanf@axis.com>
14601 * target.h (struct target_ops): Add insert_watchpoint,
14602 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14603 pointers for hardware watchpoint support.
14604 * linux-low.h (struct linux_target_ops): Ditto.
14605 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14606 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14607 to linux_target_ops.
14608 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14610 * server.c (main): Recognize 'Z' and 'z' packets.
14612 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14614 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14615 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14616 (the_low_target): Add new members.
14618 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14620 * proc-service.c (ps_lgetregs): Search all_processes instead of
14623 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14625 * server.c (start_inferior): Change return type to int.
14626 (attach_inferior): Change sigptr to int *.
14627 (handle_v_cont, handle_v_requests): Change signal to int *.
14628 (main): Change signal to int.
14630 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14632 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14633 * configure.srv: Add m32r*-*-linux*.
14634 * linux-m32r-low.c: New file.
14636 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14638 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14640 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14642 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14643 Take unsigned long arguments for PIDs.
14644 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14645 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14646 (wait_for_sigstop, linux_resume_one_process)
14647 (regsets_fetch_inferior_registers, linux_send_signal)
14648 (linux_read_auxv): Likewise. Update the types of variables holding
14649 PIDs. Update format string specifiers.
14650 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14651 * remote-utils.c (prepare_resume_reply): Likewise.
14652 * server.c (cont_thread, general_thread, step_thread)
14653 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14655 (handle_query): Update format specifiers.
14656 (handle_v_cont, main): Use strtoul for thread IDs.
14657 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14658 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14659 (general_thread, step_thread, thread_from_wait)
14660 (old_thread_from_wait): Update.
14661 * target.h (struct thread_resume): Use unsigned long for THREAD.
14662 (struct target_ops): Use unsigned long for arguments to attach and
14665 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14667 * acinclude.m4: Include bfd/bfd.m4 directly.
14668 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14669 <agriffis@toolchain.org>.
14670 * aclocal.m4, configure: Regenerated.
14672 2005-01-07 Andrew Cagney <cagney@gnu.org>
14674 * configure.ac: Rename configure.in, require autoconf 2.59.
14675 * configure: Re-generate.
14677 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14679 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14680 LIBS when finished.
14681 * aclocal.m4: Regenerated.
14682 * configure: Regenerated.
14684 2004-11-21 Andreas Schwab <schwab@suse.de>
14686 * linux-m68k-low.c (m68k_num_gregs): Define.
14687 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14688 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14689 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14690 (m68k_breakpoint_at): New. Add to the_low_target.
14692 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14693 srv_linux_thread_db to yes.
14695 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14697 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14698 (ARCH_SET_FS): Likewise.
14699 (ARCH_GET_FS): Likewise.
14700 (ARCH_GET_GS): Likewise.
14702 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14704 * linux-i386-low.c (ps_get_thread_area): New.
14705 * linux-x86-64-low.c (ps_get_thread_area): New.
14706 * linux-low.c: Include <sys/syscall.h>.
14707 (linux_kill_one_process): Don't kill the first thread here.
14708 (linux_kill): Kill the first thread here.
14709 (kill_lwp): New function.
14710 (send_sigstop, linux_send_signal): Use it.
14711 * proc-service.c: Clean up #ifdefs.
14712 (fpregset_info): Delete.
14713 (ps_lgetregs): Update and enable implementation.
14714 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14716 * remote-utils.c (struct sym_cache, symbol_cache): New.
14717 (input_interrupt): Print a clearer message.
14718 (async_io_enabled): New variable.
14719 (enable_async_io, disable_async_io): Use it. Update comments.
14720 (look_up_one_symbol): Use the symbol cache.
14721 * thread-db.c (thread_db_look_up_symbols): New function.
14722 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14724 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14726 * configure.in: Test for -rdynamic.
14727 * configure: Regenerated.
14728 * Makefile (INTERNAL_LDFLAGS): New.
14729 (gdbserver, gdbreplay): Use it.
14731 2004-09-02 Andrew Cagney <cagney@gnu.org>
14733 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14735 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14737 * linux-low.c (linux_wait): Clear all_processes list also.
14739 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14741 * linux-low.c: Include <errno.h>. Remove extern declaration of
14744 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14746 * gdbreplay.c, server.h, utils.c: Update copyright years.
14748 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14750 * server.c (main): Print child status or termination signal from
14751 variable 'signal', not 'sig'.
14753 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14755 * linux-low.c (linux_read_memory): Change return type to
14756 int. Check for and return error from ptrace().
14757 * target.c (read_inferior_memory): Change return type to int. Pass
14758 back return status from the_target->read_memory().
14759 * target.h (struct target_ops): Adapt *read_memory() prototype.
14761 (read_inferior_memory): Adapt prototype.
14762 * server.c (main): Return an error packet if
14763 read_inferior_memory() returns an error.
14765 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14767 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14768 Unify with other clean targets.
14770 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14772 * server.c (handle_v_cont): Call set_desired_inferior.
14774 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14776 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14778 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14780 * linux-low.c (linux_wait): Unblock async I/O.
14781 (linux_resume): Block and enable async I/O.
14782 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14783 * server.h (block_async_io, unblock_async_io): Add prototypes.
14785 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14787 * remote-utils.c (remote_open): Print a status notice after
14788 opening a TCP port.
14789 * server.c (attach_inferior): Print a status notice after
14792 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14794 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14796 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14798 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14800 * server.c, target.h: Update copyright years.
14802 2004-02-25 Roland McGrath <roland@redhat.com>
14804 * target.h (struct target_ops): New member `read_auxv'.
14805 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14806 * linux-low.c (linux_read_auxv): New function.
14807 (linux_target_ops): Initialize `read_auxv' member to that.
14809 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14811 Committed by Jim Blandy <jimb@redhat.com>.
14813 * linux-s390-low.c (s390_num_regs): Update.
14814 (s390_regmap): Remove control registers. Use __s390x__ predefine
14815 instead of GPR_SIZE to distiguish s390 and s390x targets.
14817 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14819 * linux-low.c: Update copyright year.
14820 (check_removed_breakpoint): Clear pending_is_breakpoint.
14821 (linux_set_resume_request, linux_queue_one_thread)
14822 (resume_status_pending_p): New functions.
14823 (linux_continue_one_thread): Use process->resume.
14824 (linux_resume): Only resume threads if there are no pending events.
14825 * linux-low.h (struct process_info): Add resume request
14828 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14830 * regcache.c (new_register_cache): Clear the allocated register
14831 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14833 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14835 * linux-low.c (linux_resume): Take a struct thread_resume *
14837 (linux_wait): Update call.
14838 (resume_ptr): New static variable.
14839 (linux_continue_one_thread): Renamed from
14840 linux_continue_one_process. Use resume_ptr.
14841 (linux_resume): Use linux_continue_one_thread.
14842 * server.c (handle_v_cont, handle_v_requests): New functions.
14843 (myresume): New function.
14844 (main): Handle 'v' case.
14845 * target.h (struct thread_resume): New type.
14846 (struct target_ops): Change argument of "resume" to struct
14848 (myresume): Delete macro.
14850 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14852 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14853 (uninstall): Support DESTDIR.
14855 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14857 * configure.srv: Add xscale*linux copy of arm*linux entry.
14859 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14861 * linux-arm-low.c (arm_reinsert_addr): New function.
14862 (the_low_target): Add arm_reinsert_addr.
14864 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14866 * mem-break.c: Remove whitespace at end of file.
14868 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14870 * configure.in: Check whether we need to prototype strerror.
14871 * server.h: Optionally prototype strerror.
14872 * gdbreplay.c (perror_with_name): Use strerror.
14873 * linux-low.c (linux_attach_lwp): Use strerror.
14874 * utils.c (perror_with_name): Use strerror.
14875 * config.in, configure: Regenerated.
14877 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14879 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14880 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14882 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14884 * Makefile.in (SFILES): Update.
14885 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14886 low-sun3.c: Remove files.
14888 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14890 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14891 (linux_detach_one_process, linux_detach): New functions.
14892 (linux_target_ops): Add linux_detach.
14893 * server.c (main): Handle 'D' packet.
14894 * target.h (struct target_ops): Add "detach" member.
14895 (detach_inferior): Define.
14897 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14899 From Kelley Cook <kelleycook@wideopenwest.com>:
14900 * configure.srv: Accept i[34567]86 variants.
14902 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14904 * linux-low.c (linux_wait_for_event): Correct comment typos.
14905 (linux_resume_one_process): Call check_removed_breakpoint.
14906 (linux_send_signal): New function.
14907 (linux_target_ops): Add linux_send_signal.
14908 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14910 * target.h (struct target_ops): Add send_signal.
14912 2003-05-29 Jim Blandy <jimb@redhat.com>
14914 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14915 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14916 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14917 away part of the register's value.
14919 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14921 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14922 (linux_wait_for_event, linux_init_signals): Likewise.
14924 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14926 * configure.in: Check for stdlib.h.
14927 * configure: Regenerated.
14928 * config.in: Regenerated.
14930 2003-01-04 Andreas Schwab <schwab@suse.de>
14932 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14934 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14936 * Makefile.in: Remove obsolete code.
14938 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14940 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14941 defined(PT_FPR0_HI).
14943 2002-11-17 Stuart Hughes <seh@zee2.com>
14945 * linux-arm-low.c (arm_num_regs): Increase.
14946 (arm_regmap): Include status register.
14948 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14950 * linux-low.c (register_addr): Remove incorrect -1 check.
14952 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14954 * linux-low.c (linux_create_inferior): Call setpgid. Return
14956 (unstopped_p, linux_signal_pid): Remove.
14957 (linux_target_ops): Remove linux_signal_pid.
14958 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14959 global instead of target method.
14960 * target.h (struct target_ops): Remove signal_pid. Update comment
14961 for create_inferior.
14962 * server.c (signal_pid): New variable.
14963 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14964 gdbserver. Set the child to be the foreground process group.
14965 (attach_inferior): Set signal_pid.
14967 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14969 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14971 2002-08-20 Jim Blandy <jimb@redhat.com>
14973 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14976 2002-08-01 Andrew Cagney <cagney@redhat.com>
14978 * Makefile.in: Make chill references obsolete.
14980 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14982 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14983 * configure: Regenerate.
14984 * config.in: Regenerate.
14986 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14988 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14989 (perror_with_name, remote_close, remote_open, expect, play): Static.
14991 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14993 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14994 byte offsets instead of an array of indexes.
14995 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14997 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14999 * regcache.c: Add comment.
15001 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15003 * thread-db.c: New file.
15004 * proc-service.c: New file.
15005 * acinclude.m4: New file.
15006 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15007 proc-service.o, and thread-db.o.
15008 (linux-low.o): Add USE_THREAD_DB.
15009 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15010 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15011 * aclocal.m4: Regenerated.
15012 * config.in: Regenerated.
15013 * configure: Regenerated.
15014 * configure.in: Check for proc_service.h, sys/procfs.h,
15015 thread_db.h, and linux/elf.h headrs.
15016 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15017 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15018 Check for -lthread_db and thread support.
15019 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15020 PowerPC, and SuperH.
15021 * i387-fp.c: Constify arguments.
15022 * i387-fp.h: Likewise.
15023 * inferiors.c: (struct thread_info): Renamed from
15024 `struct inferior_info'. Remove PID member. Use generic inferior
15025 list header. All uses updated.
15026 (inferiors, signal_pid): Removed.
15027 (all_threads): New variable.
15028 (get_thread): Define.
15029 (add_inferior_to_list): New function.
15030 (for_each_inferior): New function.
15031 (change_inferior_id): New function.
15032 (add_inferior): Removed.
15033 (remove_inferior): New function.
15034 (add_thread): New function.
15035 (free_one_thread): New function.
15036 (remove_thread): New function.
15037 (clear_inferiors): Use for_each_inferior and free_one_thread.
15038 (find_inferior): New function.
15039 (find_inferior_id): New function.
15040 (inferior_target_data): Update argument type.
15041 (set_inferior_target_data): Likewise.
15042 (inferior_regcache_data): Likewise.
15043 (set_inferior_regcache_data): Likewise.
15044 * linux-low.c (linux_bp_reinsert): Remove.
15045 (all_processes, stopping_threads, using_thrads)
15046 (struct pending_signals, debug_threads, pid_of): New.
15047 (inferior_pid): Replace with macro.
15048 (struct inferior_linux_data): Remove.
15049 (get_stop_pc, add_process): New functions.
15050 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15051 Use add_process and add_thread.
15052 (linux_attach_lwp): New function, based on old linux_attach. Use
15053 add_process and add_thread. Set stop_expected for new threads.
15054 (linux_attach): New function.
15055 (linux_kill_one_process): New function.
15056 (linux_kill): Kill all LWPs.
15057 (linux_thread_alive): Use find_inferior_id.
15058 (check_removed_breakpoints, status_pending_p): New functions.
15059 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15060 Update. Use WNOHANG. Wait for cloned processes also. Update process
15061 struct for the found process.
15062 (linux_wait_for_event): New function.
15063 (linux_wait): Use it. Support LWPs.
15064 (send_sigstop, wait_for_sigstop, stop_all_processes)
15065 (linux_resume_one_process, linux_continue_one_process): New functions.
15066 (linux_resume): Support LWPs.
15067 (REGISTER_RAW_SIZE): Remove.
15068 (fetch_register): Use register_size instead. Call supply_register.
15069 (usr_store_inferior_registers): Likewise. Call collect_register.
15070 Fix recursive case.
15071 (regsets_fetch_inferior_registers): Improve error message.
15072 (regsets_store_inferior_registers): Add debugging.
15073 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15074 (unstopped_p, linux_signal_pid): New functions.
15075 (linux_target_ops): Add linux_signal_pid.
15076 (linux_init_signals): New function.
15077 (initialize_low): Call it. Initialize using_threads.
15078 * regcache.c (inferior_regcache_data): Add valid
15080 (get_regcache): Fetch registers lazily. Add fetch argument
15081 and update all callers.
15082 (regcache_invalidate_one, regcache_invalidate): New
15084 (new_register_cache): Renamed from create_register_cache.
15085 Return the new regcache.
15086 (free_register_cache): Change argument to a void *.
15087 (registers_to_string, registers_from_string): Call get_regcache
15088 with fetch flag set.
15089 (register_data): Make static. Pass fetch flag to get_regcache.
15090 (supply_register): Call get_regcache with fetch flag clear.
15091 (collect_register): Call get_regcache with fetch flag set.
15092 (collect_register_as_string): New function.
15093 * regcache.h: Update.
15094 * remote-utils.c (putpkt): Flush after debug output and use
15096 Handle input interrupts while waiting for an ACK.
15097 (input_interrupt): Use signal_pid method.
15098 (getpkt): Flush after debug output and use stderr.
15099 (outreg): Use collect_register_as_string.
15100 (new_thread_notify, dead_thread_notify): New functions.
15101 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15102 and general_thread.
15103 (look_up_one_symbol): Flush after debug output.
15104 * server.c (step_thread, server_waiting): New variables.
15105 (start_inferior): Don't use signal_pid. Update call to mywait.
15106 (attach_inferior): Update call to mywait.
15107 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15108 (main): Don't fetch/store registers explicitly. Use
15109 set_desired_inferior. Support proposed ``Hs'' packet. Update
15111 * server.h: Update.
15112 (struct inferior_list, struct_inferior_list_entry): New.
15113 * target.c (set_desired_inferior): New.
15114 (write_inferior_memory): Constify.
15115 (mywait): New function.
15116 * target.h: Update.
15117 (struct target_ops): New signal_pid method.
15118 (mywait): Removed macro, added prototype.
15120 * linux-low.h (regset_func): Removed.
15121 (regset_fill_func, regset_store_func): New.
15122 (enum regset_type): New.
15123 (struct regset_info): Add type field. Use new operation types.
15124 (struct linux_target_ops): stop_pc renamed to get_pc.
15125 Add decr_pc_after_break and breakpoint_at.
15126 (get_process, get_thread_proess, get_process_thread)
15127 (strut process_info, all_processes, linux_attach_lwp)
15128 (thread_db_init): New.
15130 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15131 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15132 (the_low_target): Add new members.
15133 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15134 (i386_store_fpxregset): Constify.
15135 (target_regsets): Add new kind identifier.
15136 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15137 (i386_set_pc): Add debugging.
15138 (i386_breakpoint_at): New function.
15139 (the_low_target): Add new members.
15140 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15141 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15142 (mips_breakpoint_at): New.
15143 (the_low_target): Add new members.
15144 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15145 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15146 (the_low_target): Add new members.
15147 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15148 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15149 (the_low_target): Add new members.
15150 * linux-x86-64-low.c (target_regsets): Add new kind
15153 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15155 From Martin Pool <mbp@samba.org>:
15156 * server.c (gdbserver_usage): New function.
15159 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15161 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15162 stop_at -> stop_pc.
15164 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15166 * Makefile.in: Remove obsolete code.
15168 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15170 * linux-low.c (regsets_fetch_inferior_registers),
15171 (regsets_store_inferior_registers): Removed cast to int from
15173 * regcache.h: Added declaration of struct inferior_info.
15175 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15177 * inferiors.c (struct inferior_info): Add regcache_data.
15178 (add_inferior): Call create_register_cache.
15179 (clear_inferiors): Call free_register_cache.
15180 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15181 * regcache.c (struct inferior_regcache_data): New.
15182 (registers): Remove.
15183 (get_regcache): New function.
15184 (create_register_cache, free_register_cache): New functions.
15185 (set_register_cache): Don't initialize the register cache here.
15186 (registers_to_string, registers_from_string, register_data): Call
15188 * regcache.h: Add prototypes.
15189 * server.h: Likewise.
15191 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15193 * mem-break.c: New file.
15194 * mem-break.h: New file.
15195 * Makefile.in: Add mem-break.o rule; update server.h
15197 * inferiors.c (struct inferior_info): Add target_data
15199 (clear_inferiors): Free target_data member if set.
15200 (inferior_target_data, set_inferior_target_data): New functions.
15201 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15202 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15203 * linux-low.c (linux_bp_reinsert): New variable.
15204 (struct inferior_linux_data): New.
15205 (linux_create_inferior): Use set_inferior_target_data.
15206 (linux_attach): Likewise. Call add_inferior.
15207 (linux_wait_for_one_inferior): New function.
15208 (linux_wait): Call it.
15209 (linux_write_memory): Add const.
15210 (initialize_low): Call set_breakpoint_data.
15211 * linux-low.h (struct linux_target_ops): Add breakpoint
15213 * server.c (attach_inferior): Remove extra add_inferior
15215 * server.h: Include mem-break.h. Update inferior.c
15217 * target.c (read_inferior_memory)
15218 (write_inferior_memory): New functions.
15219 * target.h (read_inferior_memory)
15220 (write_inferior_memory): Change macros to prototypes.
15221 (struct target_ops): Update comments. Add const to write_memory
15224 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15226 * linux-low.c (usr_store_inferior_registers): Support
15227 registers which are allowed to fail to store.
15228 * linux-low.h (linux_target_ops): Likewise.
15229 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15230 (ppc_cannot_store_register): FPSCR may not be storable.
15232 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15234 * server.h: Include <string.h> if HAVE_STRING_H.
15235 * ChangeLog: Correct paths in last ChangeLog entry.
15237 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15239 * linux-low.h: Remove obsolete prototypes.
15240 (struct linux_target_ops): New.
15241 (extern the_low_target): New.
15242 * linux-low.c (num_regs, regmap): Remove declarations.
15243 (register_addr): Use the_low_target explicitly.
15244 (fetch_register): Likewise.
15245 (usr_fetch_inferior_registers): Likewise.
15246 (usr_store_inferior_registers): Likewise.
15247 * linux-arm-low.c (num_regs): Remove.
15248 (arm_num_regs): Define.
15249 (arm_regmap): Renamed from regmap, made static.
15250 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15252 (arm_cannot_store_register): Renamed from cannot_store_register,
15254 (the_low_target): New.
15255 * linux-i386-low.c (num_regs): Remove.
15256 (i386_num_regs): Define.
15257 (i386_regmap): Renamed from regmap, made static.
15258 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15260 (i386_cannot_store_register): Renamed from cannot_store_register,
15262 (the_low_target): New.
15263 * linux-ia64-low.c (num_regs): Remove.
15264 (ia64_num_regs): Define.
15265 (ia64_regmap): Renamed from regmap, made static.
15266 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15268 (ia64_cannot_store_register): Renamed from cannot_store_register,
15270 (the_low_target): New.
15271 * linux-m68k-low.c (num_regs): Remove.
15272 (m68k_num_regs): Define.
15273 (m68k_regmap): Renamed from regmap, made static.
15274 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15276 (m68k_cannot_store_register): Renamed from cannot_store_register,
15278 (the_low_target): New.
15279 * linux-mips-low.c (num_regs): Remove.
15280 (mips_num_regs): Define.
15281 (mips_regmap): Renamed from regmap, made static.
15282 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15284 (mips_cannot_store_register): Renamed from cannot_store_register,
15286 (the_low_target): New.
15287 * linux-ppc-low.c (num_regs): Remove.
15288 (ppc_num_regs): Define.
15289 (ppc_regmap): Renamed from regmap, made static.
15290 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15292 (ppc_cannot_store_register): Renamed from cannot_store_register,
15294 (the_low_target): New.
15295 * linux-s390-low.c (num_regs): Remove.
15296 (s390_num_regs): Define.
15297 (s390_regmap): Renamed from regmap, made static.
15298 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15300 (s390_cannot_store_register): Renamed from cannot_store_register,
15302 (the_low_target): New.
15303 * linux-sh-low.c (num_regs): Remove.
15304 (sh_num_regs): Define.
15305 (sh_regmap): Renamed from regmap, made static.
15306 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15308 (sh_cannot_store_register): Renamed from cannot_store_register,
15310 (the_low_target): New.
15311 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15312 (the_low_target): New.
15314 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15316 * Makefile.in: Add stamp-h target.
15317 * configure.in: Create stamp-h.
15318 * configure: Regenerated.
15320 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15322 * inferiors.c: New file.
15323 * target.c: New file.
15324 * target.h: New file.
15325 * Makefile.in: Add target.o and inferiors.o. Update
15327 * linux-low.c (inferior_pid): New static variable,
15328 moved from server.c.
15329 (linux_create_inferior): Renamed from create_inferior.
15330 Call add_inferior. Return 0 on success instead of a PID.
15331 (linux_attach): Renamed from myattach.
15332 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15333 (linux_thread_alive): Renamed from mythread_alive.
15334 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15336 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15337 (regsets_store_inferior_registers): Correct error message.
15338 Add missing ``return 0''.
15339 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15340 (linux_store_registers): Renamed from store_inferior_registers.
15341 (linux_read_memory): Renamed from read_inferior_memory.
15342 (linux_write_memory): Renamed from write_inferior_memory.
15343 (linux_target_ops): New structure.
15344 (initialize_low): Call set_target_ops ().
15345 * remote-utils.c (unhexify): New function.
15346 (hexify): New function.
15347 (input_interrupt): Send signals to ``signal_pid''.
15348 * server.c (inferior_pid): Remove.
15349 (start_inferior): Update create_inferior call.
15350 (attach_inferior): Call add_inferior.
15351 (handle_query): New function.
15352 (main): Call handle_query for `q' packets.
15353 * server.h: Include "target.h". Remove obsolete prototypes.
15354 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15356 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15358 * Makefile.in: Add WARN_CFLAGS. Update configury
15360 * configure.in: Check for <string.h>
15361 * configure: Regenerate.
15362 * config.in: Regenerate.
15363 * gdbreplay.c: Include needed system headers.
15364 (remote_open): Remove strchr prototype.
15365 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15366 * regcache.c (supply_register): Change buf argument to const void *.
15367 (supply_register_by_name): Likewise.
15368 (collect_register): Change buf argument to void *.
15369 (collect_register_by_name): Likewise.
15370 * regcache.h: Add missing prototypes.
15371 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15372 * server.c (handle_query): New function.
15373 (attached): New static variable, moved out of main.
15374 (main): Quiet longjmp clobber warnings.
15375 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15376 * utils.c (error): Remove NORETURN.