1 2017-09-05 Yao Qi <yao.qi@linaro.org>
3 * configure.srv: Set srv_i386_linux_regobj empty if $development
5 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
8 with #if initialize_low_tdesc.
9 * linux-x86-tdesc-selftest.c: New file.
10 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
12 2017-09-05 Yao Qi <yao.qi@linaro.org>
14 * Makefile.in (arch-i386.o): New rule.
15 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
16 (x86_64-*-linux*): Likewise.
17 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
19 (i386_linux_read_description): Remove code and call
20 i386_create_target_description.
21 * tdesc.c (allocate_target_description): New function.
22 * tdesc.h (set_tdesc_architecture): Remove declaration.
23 (set_tdesc_osabi): Likewise.
25 2017-09-05 Yao Qi <yao.qi@linaro.org>
27 * linux-x86-tdesc.c: Don't include <inttypes.h>.
28 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
29 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
31 * server.c (get_features_xml): Call tdesc_get_features_xml.
32 * tdesc.c (set_tdesc_architecture): New function.
33 (set_tdesc_osabi): New function.
34 (tdesc_get_features_xml): New function.
35 (tdesc_create_feature): Add an argument.
36 * tdesc.h (struct target_desc) <features>: New field.
37 <arch, osabi>: New field.
38 (~target_desc): xfree features, arch, and osabi.
39 (target_desc::oerator==): Don't compare .xmltarget.
40 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
41 (set_tdesc_osabi): Likewise.
42 (tdesc_get_features_xml): Likewise.
44 2017-09-05 Yao Qi <yao.qi@linaro.org>
46 * linux-x86-tdesc.c: Include selftest.h.
47 (i386_tdesc_test): New function.
48 (initialize_low_tdesc): Call selftests::register_test.
49 * tdesc.h: Include regdef.h.
50 (target_desc): Override operator == and !=.
52 2017-09-05 Yao Qi <yao.qi@linaro.org>
54 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
56 * linux-i386-ipa.c: Include common/x86-xstate.h
57 (get_ipa_tdesc): Call i386_linux_read_description.
58 (initialize_low_tracepoint): Don't call init_registers_XXX
59 functions, call initialize_low_tdesc instead.
60 * linux-x86-low.c (x86_linux_read_description): Call
61 i386_linux_read_description.
62 (initialize_low_arch): Don't call init_registers_i386_XXX
63 functions, call initialize_low_tdesc.
64 * linux-x86-tdesc.c: New file.
65 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
66 (i386_get_ipa_tdesc_idx): Declare.
67 (i386_get_ipa_tdesc): Declare.
68 (initialize_low_tdesc): Declare.
70 2017-09-05 Yao Qi <yao.qi@linaro.org>
72 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
75 2017-09-05 Yao Qi <yao.qi@linaro.org>
77 * Makefile.in (IPA_OBJS): Add vec-ipa.o
78 * regcache.c (get_thread_regcache): Use VEC_length.
79 (init_register_cache): Likewise.
80 (regcache_cpy): Likewise.
81 (registers_to_string): Iterate reg_defs via VEC_iterate.
82 (find_regno): Likewise.
83 (find_register_by_number): Use VEC_index.
84 (register_size): Call find_register_by_number.
85 (register_data): Call find_register_by_number.
86 (supply_regblock): Use VEC_length.
87 (regcache_raw_read_unsigned): Likewise.
88 * tdesc.c (init_target_desc): Iterate reg_defs via
90 (default_description): Update initializer.
91 (copy_target_description): Don't update field num_registers.
92 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
93 <num_registers>: Remove.
95 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
97 * Makefile.in (.SECONDARY): Define target.
99 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
101 * linux-low.c (linux_wait_1): Adjust.
102 * server.c (queue_stop_reply_callback): Adjust.
104 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
106 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
107 QEnvironmentUnset and QEnvironmentReset packets.
108 (handle_query): Inform remote that QEnvironmentHexEncoded,
109 QEnvironmentUnset and QEnvironmentReset are supported.
111 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
113 * inferiors.h (inferior_target_data): Rename to ...
114 (thread_target_data): ... this.
115 (inferior_regcache_data): Rename to ...
116 (thread_regcache_data): ... this.
117 (set_inferior_regcache_data): Rename to ...
118 (set_thread_regcache_data): ... this.
119 * inferiors.c (inferior_target_data): Rename to ...
120 (thread_target_data): ... this.
121 (inferior_regcache_data): Rename to ...
122 (thread_regcache_data): ... this.
123 (set_inferior_regcache_data): Rename to ...
124 (set_thread_regcache_data): ... this.
125 (free_one_thread): Update.
126 * linux-low.h (get_thread_lwp): Update.
127 * regcache.c (get_thread_regcache): Update.
128 (regcache_invalidate_thread): Update.
129 (free_register_cache_thread): Update.
130 * win32-i386-low.c (update_debug_registers_callback): Update.
131 (win32_get_current_dr): Update.
132 * win32-low.c (thread_rec): Update.
133 (delete_thread_info): Update.
134 (continue_one_thread): Update.
135 (suspend_one_thread): Update.
137 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
139 * inferiors.c (set_inferior_target_data): Remove.
140 * inferiors.h (set_inferior_target_data): Remove.
142 2017-08-18 Yao Qi <yao.qi@linaro.org>
144 * Makefile.in (OBS): Add selftest.o.
145 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
146 * configure, config.in: Re-generated.
147 * server.c: Include common/sefltest.h.
148 (captured_main): Handle option --selftest.
150 2017-08-09 Yao Qi <yao.qi@linaro.org>
152 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
153 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
154 i386-avx-mpx.o and i386-mmx.o.
155 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
156 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
157 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
158 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
159 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
160 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
161 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
162 i386/amd64-avx-mpx.xml.
164 2017-08-09 Yao Qi <yao.qi@linaro.org>
166 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
167 and x32-avx-avx512.o.
168 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
169 i386/x32-avx-avx512.xml.
171 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
173 * tracepoint.h (enum class fast_tpoint_collect_result): New
175 (fast_tracepoint_collecting): Change return type to
176 fast_tpoint_collect_result.
177 * tracepoint.c (fast_tracepoint_collecting): Likewise.
178 * linux-low.h: Include tracepoint.h.
179 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
180 fast_tpoint_collect_result.
181 * linux-low.c (handle_tracepoints): Adjust.
182 (linux_fast_tracepoint_collecting): Change return type to
183 fast_tpoint_collect_result.
184 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
185 linux_wait_1, stuck_in_jump_pad_callback,
186 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
187 proceed_one_lwp): Adjust to type change.
189 2017-07-10 Yao Qi <yao.qi@linaro.org>
191 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
193 2017-06-29 Yao Qi <yao.qi@linaro.org>
195 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
197 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
199 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
201 * Makefile.in (IPA_OBJS): Sort and format one item per line.
203 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
205 * linux-low.c (linux_create_inferior): Adjust code to access the
206 environment information via 'gdb_environ' class.
207 * lynx-low.c (lynx_create_inferior): Likewise.
208 * server.c (our_environ): Make it an instance of 'gdb_environ'.
209 (get_environ): Return a pointer to 'our_environ'.
210 (captured_main): Initialize 'our_environ'.
211 * server.h (get_environ): Adjust prototype.
212 * spu-low.c (spu_create_inferior): Adjust code to access the
213 environment information via 'gdb_environ' class.
215 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
217 * linux-low.c (linux_read_memory, linux_write_memory): Remove
218 usage of "register" keyword.
220 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
222 * configure: Re-generate.
224 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
226 * configure: Re-generate.
228 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
230 * Makefile.in (COMPILE.pre): Add "-x c++".
232 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
234 * fork-child.c: Conditionally include <signal.h>.
236 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
238 * server.c (handle_general_set): Handle new packet
240 (handle_query): Add "QStartupWithShell" to the list of supported
242 (gdbserver_usage): Add help text explaining the
243 new "--startup-with-shell" and "--no-startup-with-shell" CLI
245 (captured_main): Recognize and act upon the presence of the new
248 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
249 Pedro Alves <palves@redhat.com>
251 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
252 * configure: Regenerate.
253 * configure.srv (srv_linux_obj): Add "fork-child.o" and
255 (i[34567]86-*-lynxos*): Likewise.
256 (spu*-*-*): Likewise.
257 * fork-child.c: New file.
258 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
260 (linux_ptrace_fun): New function.
261 (linux_create_inferior): Adjust function prototype to reflect
262 change on "target.h". Adjust function code to use
264 (linux_request_interrupt): Delete "signal_pid".
265 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
266 (lynx_ptrace_fun): New function.
267 (lynx_create_inferior): Adjust function prototype to reflect
268 change on "target.h". Adjust function code to use
270 * nto-low.c (nto_create_inferior): Adjust function prototype and
271 code to reflect change on "target.h". Update comments.
272 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
273 "common-terminal.h" and "environ.h".
274 (terminal_fd): Moved to fork-child.c.
275 (old_foreground_pgrp): Likewise.
276 (restore_old_foreground_pgrp): Likewise.
277 (last_status): Make it global.
278 (last_ptid): Likewise.
279 (our_environ): New variable.
280 (startup_with_shell): Likewise.
281 (program_name): Likewise.
282 (program_argv): Rename to...
283 (program_args): ...this.
284 (wrapper_argv): New variable.
285 (start_inferior): Delete function.
286 (get_exec_wrapper): New function.
287 (get_exec_file): Likewise.
288 (get_environ): Likewise.
289 (prefork_hook): Likewise.
290 (post_fork_inferior): Likewise.
291 (postfork_hook): Likewise.
292 (postfork_child_hook): Likewise.
293 (handle_v_run): Update code to deal with arguments coming from the
294 remote host. Update calls from "start_inferior" to
296 (captured_main): Likewise. Initialize environment variable. Call
298 * server.h (post_fork_inferior): New prototype.
299 (get_environ): Likewise.
300 (last_status): Declare.
301 (last_ptid): Likewise.
302 (signal_pid): Likewise.
303 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
304 (spu_ptrace_fun): New function.
305 (spu_create_inferior): Adjust function prototype to reflect change
306 on "target.h". Adjust function code to use "fork_inferior".
307 * target.c (target_terminal_init): New function.
308 (target_terminal_inferior): Likewise.
309 (target_terminal_ours): Likewise.
310 * target.h: Include <vector>.
311 (struct target_ops) <create_inferior>: Update prototype.
312 (create_inferior): Update macro.
313 * utils.c (gdb_flush_out_err): New function.
314 * win32-low.c (win32_create_inferior): Adjust function prototype
315 and code to reflect change on "target.h".
317 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
319 * inferiors.c (switch_to_thread): New function.
321 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
323 * Makefile.in (SFILE): Add "common/job-control.c".
324 (OBS): Add "job-control.o".
326 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
328 * Makefile: Remove "@host_makefile_frag@".
330 2017-05-05 Pedro Alves <palves@redhat.com>
332 * configure: Regenerate.
334 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
336 * configure: Regenerate.
338 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
340 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
341 software_single_step change of return type to
342 std::vector<CORE_ADDR>.
343 * linux-low.c (install_software_single_step_breakpoints):
345 * linux-low.h (install_software_single_step_breakpoints):
348 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
350 * remote-utils.c: Include "gdb_termios.h" instead of
352 * terminal.h: Delete file.
354 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
356 * server.c: Include <vector>.
357 <program_argv, wrapper_argv>: Convert to std::vector.
358 (start_inferior): Rewrite function to use C++.
359 (handle_v_run): Likewise. Update code that calculates the argv
360 based on the vRun packet; use C++.
361 (captured_main): Likewise.
363 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
365 * server.c (handle_v_cont): Initialize thread_resume::thread
368 2017-04-05 Pedro Alves <palves@redhat.com>
370 * configure: Regenerate.
372 2017-04-05 Pedro Alves <palves@redhat.com>
374 * gdbreplay.c (sync_error): Constify.
375 * linux-x86-low.c (push_opcode): Constify.
377 2017-04-05 Pedro Alves <palves@redhat.com>
379 * win32-low.c (get_child_debug_event)
380 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
381 Report TARGET_WAITKIND_SPURIOUS instead.
383 2017-04-05 Pedro Alves <palves@redhat.com>
385 * remote-utils.c (remote_prepare, remote_open): Constify.
386 * remote-utils.h (remote_prepare, remote_open): Constify.
387 * server.c (captured_main): Constify 'port' handling.
389 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
391 * Makefile.in (clean): Clear .deps.
393 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
395 * .gitignore: Remove generated files, replace with wildcard.
396 * (clean): Replace removal of generated files with wildcard.
397 (version.c): Replace with...
398 (version-generated.c): ...this.
399 (xml-builtin.c): Replace with...
400 (xml-builtin-generated.c): ...this.
401 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
402 (%.c: *regformats*): Replace with...
403 (%-generated.c: *regformats*): ...this.
405 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
407 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
408 (xtensa_fill_gregset): Call collect_register_by_name for
410 (xtensa_store_gregset): Call supply_register_by_name for
413 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
415 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
416 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
417 (xtensa_store_gregset): Call supply_register for all registers in
418 a0_regnum..a0_regnum + C0_NREGS range.
420 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
422 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
423 (ax-ipa.o: ax.c): Remove.
424 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
425 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
426 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
427 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
428 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
430 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
432 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
433 (print-utils-ipa.o: ../common/print-utils.c): Remove.
434 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
435 (errors-ipa.o: ../common/errors.c): Remove.
436 (format-ipa.o: ../common/format.c): Remove.
437 (common-utils-ipa.o: ../common/common-utils.c): Remove.
439 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
441 * Makefile.in (%-ipa.o: %.c): New rule.
442 (tracepoint-ipa.o: tracepoint.c): Remove.
443 (utils-ipa.o: utils.c): Remove.
444 (remote-utils-ipa.o: remote-utils.c): Remove.
445 (regcache-ipa.o: regcache.c): Remove.
446 (i386-linux-ipa.o: i386-linux.c): Remove.
447 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
448 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
449 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
450 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
451 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
452 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
453 (amd64-linux-ipa.o: amd64-linux.c): Remove.
454 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
455 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
456 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
457 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
458 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
459 (aarch64-ipa.o: aarch64.c): Remove.
460 (s390-linux32-ipa.o: s390-linux32.c): Remove.
461 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
462 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
463 (s390-linux64-ipa.o: s390-linux64.c): Remove.
464 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
465 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
466 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
467 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
468 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
469 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
470 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
471 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
472 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
473 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
474 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
475 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
476 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
477 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
478 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
479 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
480 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
481 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
482 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
483 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
484 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
485 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
486 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
487 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
488 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
489 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
490 (tdesc-ipa.o: tdesc.c): Remove.
491 (x32-linux-ipa.o: x32-linux.c): Remove.
492 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
493 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
495 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
497 * Makefile.in (%.o: ../arch/%.c): New rule.
498 (arm.o: ../arch/arm.c): Remove.
499 (arm-linux.o: ../arch/arm-linux.c): Remove.
500 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
501 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
503 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
505 * Makefile.in (%.o: ../nat/%.c): New rule.
506 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
507 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
508 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
509 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
510 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
511 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
512 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
513 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
514 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
515 (linux-personality.o: ../nat/linux-personality.c): Remove.
516 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
517 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
518 (x86-linux.o: ../nat/x86-linux.c): Remove.
519 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
520 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
522 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
524 * Makefile.in (%.o: ../common/%.c): New rule.
525 (signals.o: ../common/signals.c): Remove.
526 (print-utils.o: ../common/print-utils.c): Remove.
527 (rsp-low.o: ../common/rsp-low.c): Remove.
528 (common-utils.o: ../common/common-utils.c): Remove.
529 (posix-strerror.o: ../common/posix-strerror.c): Remove.
530 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
531 (vec.o: ../common/vec.c): Remove.
532 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
533 (xml-utils.o: ../common/xml-utils.c): Remove.
534 (ptid.o: ../common/ptid.c): Remove.
535 (buffer.o: ../common/buffer.c): Remove.
536 (format.o: ../common/format.c): Remove.
537 (filestuff.o: ../common/filestuff.c): Remove.
538 (agent.o: ../common/agent.c): Remove.
539 (errors.o: ../common/errors.c): Remove.
540 (environ.o: ../common/environ.c): Remove.
541 (common-debug.o: ../common/common-debug.c): Remove.
542 (cleanups.o: ../common/cleanups.c): Remove.
543 (common-exceptions.o: ../common/common-exceptions.c): Remove.
544 (fileio.o: ../common/fileio.c): Remove.
545 (common-regcache.o: ../common/common-regcache.c): Remove.
546 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
547 (new-op.o: ../common/new-op.c): Remove.
548 (btrace-common.o: ../common/btrace-common.c): Remove.
550 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
552 * Makefile.in (%.o: ../target/%.c): New rule.
553 (waitstatus.o: ../target/waitstatus.c): Remove.
555 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
558 (%.c: ../regformats/%.dat,
559 (%.c: ../regformats/arm/%.dat,
560 (%.c: ../regformats/i386/%.dat,
561 (%.c: ../regformats/rs6000/%.dat): New rules.
564 (arm-with-iwmmxt.c): Remove.
565 (arm-with-vfpv2.c): Remove.
566 (arm-with-vfpv3.c): Remove.
567 (arm-with-neon.c): Remove.
568 (reg-bfin.c): Remove.
569 (reg-cris.c): Remove.
570 (reg-crisv32.c): Remove.
572 (i386-linux.c): Remove.
573 (i386-avx.c): Remove.
574 (i386-avx-linux.c): Remove.
575 (i386-avx-avx512.c): Remove.
576 (i386-avx-avx512-linux.c): Remove.
577 (i386-mpx.c): Remove.
578 (i386-mpx-linux.c): Remove.
579 (i386-avx-mpx-avx512-pku.c): Remove.
580 (i386-avx-mpx-avx512-pku-linux.c): Remove.
581 (i386-avx-mpx.c): Remove.
582 (i386-avx-mpx-linux.c): Remove.
583 (i386-mmx.c): Remove.
584 (i386-mmx-linux.c): Remove.
585 (reg-ia64.c): Remove.
586 (reg-m32r.c): Remove.
587 (reg-m68k.c): Remove.
589 (mips-linux.c): Remove.
590 (mips-dsp-linux.c): Remove.
591 (mips64-linux.c): Remove.
592 (mips64-dsp-linux.c): Remove.
593 (nios2-linux.c): Remove.
594 (powerpc-32.c): Remove.
595 (powerpc-32l.c): Remove.
596 (powerpc-altivec32l.c): Remove.
597 (powerpc-cell32l.c): Remove.
598 (powerpc-vsx32l.c): Remove.
599 (powerpc-isa205-32l.c): Remove.
600 (powerpc-isa205-altivec32l.c): Remove.
601 (powerpc-isa205-vsx32l.c): Remove.
602 (powerpc-e500l.c): Remove.
603 (powerpc-64l.c): Remove.
604 (powerpc-altivec64l.c): Remove.
605 (powerpc-cell64l.c): Remove.
606 (powerpc-vsx64l.c): Remove.
607 (powerpc-isa205-64l.c): Remove.
608 (powerpc-isa205-altivec64l.c): Remove.
609 (powerpc-isa205-vsx64l.c): Remove.
610 (s390-linux32.c): Remove.
611 (s390-linux32v1.c): Remove.
612 (s390-linux32v2.c): Remove.
613 (s390-linux64.c): Remove.
614 (s390-linux64v1.c): Remove.
615 (s390-linux64v2.c): Remove.
616 (s390-te-linux64.c): Remove.
617 (s390-vx-linux64.c): Remove.
618 (s390-tevx-linux64.c): Remove.
619 (s390x-linux64.c): Remove.
620 (s390x-linux64v1.c): Remove.
621 (s390x-linux64v2.c): Remove.
622 (s390x-te-linux64.c): Remove.
623 (s390x-vx-linux64.c): Remove.
624 (s390x-tevx-linux64.c): Remove.
625 (tic6x-c64xp-linux.c): Remove.
626 (tic6x-c64x-linux.c): Remove.
627 (tic6x-c62x-linux.c): Remove.
629 (reg-sparc64.c): Remove.
632 (amd64-linux.c): Remove.
633 (amd64-avx.c): Remove.
634 (amd64-avx-linux.c): Remove.
635 (amd64-avx-avx512.c): Remove.
636 (amd64-avx-avx512-linux.c): Remove.
637 (amd64-mpx.c): Remove.
638 (amd64-mpx-linux.c): Remove.
639 (amd64-avx-mpx-avx512-pku.c): Remove.
640 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
641 (amd64-avx-mpx.c): Remove.
642 (amd64-avx-mpx-linux.c): Remove.
644 (x32-linux.c): Remove.
646 (x32-avx-linux.c): Remove.
647 (x32-avx-avx512.c): Remove.
648 (x32-avx-avx512-linux.c): Remove.
649 (reg-xtensa.c): Remove.
650 (reg-tilegx.c): Remove.
651 (reg-tilegx32.c): Remove.
653 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
655 * Makefile.in (SFILES): Add "common/environ.c".
656 (OBJS): Add "common/environ.h".
658 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
660 * configure.ac: Check if the fs_base and gs_base members of
661 `struct user_regs_struct' exist.
662 * config.in: Regenerated.
663 * configure: Likewise.
665 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
667 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
669 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
670 (get_next_pcs_syscall_next_pc): Likewise.
672 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
674 * win32-i386-low.c: Fix incorrect reference to a couple source files.
675 * nto-x86-low.c: Likewise.
677 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
679 * Makefile.in: Include disable-implicit-rules.mk.
681 2016-11-23 Pedro Alves <palves@redhat.com>
683 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
684 (debug_vprintf): Use std::chrono::steady_clock instead of
685 gettimeofday. Use '.' instead of ':'.
686 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
687 (get_timestamp): Use std::chrono::steady_clock instead of
690 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
692 * Makefile.in: Fix whitespace formatting.
694 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
696 * Makefile.in (SFILES, OBS): Flatten list and order
699 2016-11-23 Pedro Alves <palves@redhat.com>
701 * event-loop.c (handle_file_event): Use warning.
702 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
703 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
706 2016-11-23 Pedro Alves <palves@redhat.com>
708 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
710 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
711 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
712 debug_printf and debug_flush for debug output.
713 * server.c (handle_general_set): Likewise.
714 * thread-db.c (try_thread_db_load): Use debug_printf for debug
717 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
719 * Makefile.in (.c.o): Replace rule with ...
720 (%.o: %.c): ... this one.
722 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
724 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
725 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
727 * configure.ac: Remove checks for the make program.
728 * configure: Re-generate.
730 2016-10-28 Pedro Alves <palves@redhat.com>
732 * Makefile.in (CXX_DIALECT): Get from configure.
733 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
734 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
735 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
736 * config.in: Regenerate.
737 * configure: Regenerate.
739 2016-10-27 Yao Qi <yao.qi@linaro.org>
741 * linux-low.c (linux_supports_range_stepping): Return true if
742 can_software_single_step return true.
744 2016-10-27 Yao Qi <yao.qi@linaro.org>
746 * inferiors.c (find_inferior_in_random): New function.
747 * inferiors.h (find_inferior_in_random): Declare.
748 * linux-low.c (linux_wait_for_event_filtered): Call
749 find_inferior_in_random instead of find_inferior.
751 2016-10-27 Yao Qi <yao.qi@linaro.org>
753 * linux-low.c (linux_wait_1): If single-step breakpoints are
754 inserted, remove them.
756 2016-10-26 Pedro Alves <palves@redhat.com>
758 * linux-low.c (handle_extended_wait): Link parent/child fork
760 (linux_wait_1): Unlink them.
761 (linux_set_resume_request): Ignore resume requests for
762 already-resumed and unhandled fork child threads.
763 * linux-low.h (struct lwp_info) <fork_relative>: New field.
764 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
766 (handle_v_requests) <vCont>: Don't call require_running.
767 * server.h (in_queued_stop_replies): New declaration.
769 2016-10-24 Yao Qi <yao.qi@linaro.org>
772 * linux-aarch64-low.c (append_insns): Cast the return value to
775 2016-10-10 Yao Qi <yao.qi@linaro.org>
777 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
779 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
781 * target.c (target_supports_multi_process): New function, moved
783 * target.h (target_supports_multi_process): ... here. Remove
786 2016-10-05 Tom Tromey <tom@tromey.com>
789 * tracepoint.c (handle_tracepoint_bkpts): Check
790 ipa_error_tracepoint, not ipa_stopping_tracepoint.
792 2016-10-05 Yao Qi <yao.qi@linaro.org>
794 * configure.srv: Update the path of arm-*.xml files.
796 2016-10-05 Terry Guo <terry.guo@arm.com>
797 Yao Qi <yao.qi@linaro.org>
799 * Makefile.in: Adjust the path of rules.
800 * configure.srv: Update the path of xml files.
801 * regformats/arm-with-iwmmxt.dat: Regenerated.
802 * regformats/arm-with-neon.dat: Likewise.
803 * regformats/arm-with-vfpv2.dat: Likewise.
804 * regformats/arm-with-vfpv3.dat Likewise.
806 2016-09-30 Yao Qi <yao.qi@linaro.org>
809 * target.c (target_stop_and_wait): Don't call
810 target_continue_no_signal, use resume_stop instead.
812 2016-09-26 Yao Qi <yao.qi@linaro.org>
814 * linux-low.c (linux_wait_1): Call debug_exit.
816 2016-09-23 Pedro Alves <palves@redhat.com>
818 * Makefile.in (SFILES): Add common/new-op.c.
819 (OBS): Add common/new-op.o.
820 (new-op.o): New rule.
822 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
824 * .gitinore: Ignore more files.
826 2016-09-21 Yao Qi <yao.qi@linaro.org>
828 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
831 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
833 * server.c (start_inferior): Call target_mourn_inferior instead of
834 mourn_inferior; pass ptid_t argument to it.
836 (handle_target_event): Likewise.
837 * target.c (target_mourn_inferior): New function.
838 * target.h (mourn_inferior): Delete macro.
840 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
842 * linux-low.c (lwp_is_stepping): New function.
844 2016-09-06 Carl Love <cel@us.ibm.com>
846 * server.c (start_inferior): Fixed comment, requested comment change
847 didn't get updated correctly. Removed reference to ptrace () call as
848 it is only true on Linux systems.
850 2016-09-06 Carl Love <cel@us.ibm.com>
852 * server.c (start_inferior): Do not call
853 function target_post_create_inferior () if the
854 inferior process has already exited.
856 2016-09-05 Pedro Alves <palves@redhat.com>
858 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
859 (COMPILE.pre, CC_LD): Use CXX directly.
860 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
861 * acinclude.m4: Don't include build-with-cxx.m4.
862 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
863 * configure: Regenerate.
865 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
868 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
869 call writing data to own_buf.
871 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
873 * target.c (mywait): Call target_wait instead of
875 (target_wait): New function.
877 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
879 * server.c (start_inferior): New variable 'ptid'. Replace calls
880 to the_target->resume by target_continue{,_no_signal}, depending
882 * target.c (target_stop_and_wait): Call target_continue_no_signal
883 instead of the_target->resume.
884 (target_continue): New function.
886 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
888 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
890 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
893 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
895 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
896 * linux-arm-low.c (ps_get_thread_area): Likewise.
897 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
898 * linux-m68k-low.c (ps_get_thread_area): Likewise.
899 * linux-mips-low.c (ps_get_thread_area): Likewise.
900 * linux-nios2-low.c (ps_get_thread_area): Likewise.
901 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
902 * linux-x86-low.c (ps_get_thread_area): Likewise.
903 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
905 2016-08-19 Pedro Alves <palves@redhat.com>
907 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
909 2016-08-19 Pedro Alves <palves@redhat.com>
911 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
912 comment. Use memcpy instead of casting through unsigned long.
914 2016-08-19 Pedro Alves <palves@redhat.com>
916 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
917 allocating around 0x80000000.
919 2016-08-19 Pedro Alves <palves@redhat.com>
922 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
923 (x32-avx512-linux-ipa.o): New rules.
924 * configure.ac (x86_64-*-linux*): New x32 check.
925 * configure.srv (ipa_x32_linux_regobj): New.
926 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
927 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
929 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
931 * configure: Regenerate.
933 2016-08-09 Pedro Alves <palves@redhat.com>
936 * Makefile.in (OBS): Add signals-state-save-restore.o.
937 (signals-state-save-restore.o): New rule.
938 * config.in: Regenerate.
939 * configure: Regenerate.
940 * linux-low.c: Include "signals-state-save-restore.h".
941 (linux_create_inferior): Call
942 restore_original_signals_state.
943 * server.c: Include "dispositions-save-restore.h".
944 (captured_main): Call save_original_signals_state.
946 2016-08-05 Pedro Alves <palves@redhat.com>
948 * configure: Regenerate.
950 2016-08-04 Yao Qi <yao.qi@linaro.org>
952 * linux-low.c (regsets_fetch_inferior_registers): Check
953 errno is ESRCH or not.
955 2016-08-02 Yao Qi <yao.qi@linaro.org>
957 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
958 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
959 (thread_db_load_search): Update.
960 (try_thread_db_load_1): Don't look for td_ta_event_addr,
961 td_ta_set_event and td_ta_event_getmsg.
963 2016-07-26 Pedro Alves <palves@redhat.com>
966 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
967 of unsigned long for 64-bit registers and use uint32_t instead of
968 unsigned int for 32-bit registers.
970 2016-07-26 Pedro Alves <palves@redhat.com>
972 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
975 2016-07-21 Tom Tromey <tom@tromey.com>
977 * configure: Rebuild.
979 2016-07-21 Yao Qi <yao.qi@linaro.org>
981 * mem-break.c (find_gdb_breakpoint): Cast bp to
982 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
984 2016-07-21 Yao Qi <yao.qi@linaro.org>
986 * server.c (handle_v_requests): Support s and S actions
987 if target_supports_software_single_step return true.
989 2016-07-21 Yao Qi <yao.qi@linaro.org>
991 * linux-low.c (resume_stopped_resumed_lwps): If resume request
992 is resume_step, call maybe_hw_step.
993 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
995 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
997 (proceed_one_lwp): If resume request is resume_step, install
998 reinsert breakpoints and call maybe_hw_step.
1000 2016-07-21 Yao Qi <yao.qi@linaro.org>
1002 * linux-low.c (proceed_one_lwp): Declare.
1003 (linux_resume_one_thread): Remove local variable 'step'.
1004 Lift code enqueue signal. Call proceed_one_lwp instead of
1005 linux_resume_one_lwp.
1007 2016-07-21 Yao Qi <yao.qi@linaro.org>
1009 * linux-low.c (linux_resume_one_thread): Call
1010 enqueue_pending_signal.
1012 2016-07-21 Yao Qi <yao.qi@linaro.org>
1014 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1015 * inferiors.c (do_restore_current_thread_cleanup): New function.
1016 (make_cleanup_restore_current_thread): Likewise.
1017 * linux-low.c (install_software_single_step_breakpoints): Call
1018 make_cleanup_restore_current_thread. Switch current_thread to
1021 2016-07-21 Yao Qi <yao.qi@linaro.org>
1023 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1024 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1025 (clone_one_breakpoint): Likewise.
1026 (delete_reinsert_breakpoints): Change parameter to thread.
1028 (has_reinsert_breakpoints): Likewise.
1029 (uninsert_reinsert_breakpoints): Likewise.
1030 (reinsert_reinsert_breakpoints): Likewise.
1031 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1032 (delete_reinsert_breakpoints): Likewise.
1033 (reinsert_reinsert_breakpoints): Likewise.
1034 (uninsert_reinsert_breakpoints): Likewise.
1035 (has_reinsert_breakpoints): Likewise.
1037 2016-07-21 Yao Qi <yao.qi@linaro.org>
1039 * inferiors.c (get_thread_process): Make parameter const.
1040 * inferiors.h (get_thread_process): Update declaration.
1041 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1042 Add new parameters child_thread and parent_thread. Callers
1044 * mem-break.h (clone_all_breakpoints): Update declaration.
1046 2016-07-21 Yao Qi <yao.qi@linaro.org>
1048 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1049 <command_list, handler>: Remove.
1050 (struct gdb_breakpoint): New.
1051 (struct other_breakpoint): New.
1052 (struct reinsert_breakpoint): New.
1053 (is_gdb_breakpoint): New function.
1054 (any_persistent_commands): Update command_list if
1055 is_gdb_breakpoint returns true.
1056 (set_breakpoint): Create breakpoints according to their types.
1057 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1058 (set_gdb_breakpoint_1): Likewise.
1059 (set_gdb_breakpoint): Likewise.
1060 (clear_breakpoint_conditions): Change parameter type to
1061 'struct gdb_breakpoint *'.
1062 (clear_breakpoint_commands): Likewise.
1063 (clear_breakpoint_conditions_and_commands): Likewise.
1064 (add_condition_to_breakpoint): Likewise.
1065 (add_breakpoint_condition): Likewise.
1066 (add_commands_to_breakpoint): Likewise.
1067 (check_breakpoints): Check other_breakpoint.
1068 (clone_one_breakpoint): Clone breakpopint according to its type.
1069 * mem-break.h (struct gdb_breakpoint): Declare.
1070 (set_gdb_breakpoint): Update declaration.
1071 (clear_breakpoint_conditions_and_commands): Likewise.
1072 (add_breakpoint_condition): Likewise.
1073 (add_breakpoint_commands): Likewise.
1074 * server.c (process_point_options): Change parameter type to
1075 'struct gdb_breakpoint *'.
1077 2016-07-21 Yao Qi <yao.qi@linaro.org>
1079 * mem-break.c (set_breakpoint_at): Rename it to ...
1080 (set_breakpoint_type_at): ... it.
1081 (set_breakpoint_at): Call set_breakpoint_type_at.
1082 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1083 * mem-break.h (set_breakpoint_at): Update comments.
1085 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1087 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1089 (nios2_store_gregset): Likewise.
1091 2016-07-01 Pedro Alves <palves@redhat.com>
1092 Antoine Tremblay <antoine.tremblay@ericsson.com>
1094 * linux-low.c: Change interface to take the target lwp_info
1095 pointer directly and return void. Handle detaching from a zombie
1097 (linux_detach_lwp_callback): New function.
1098 (linux_detach): Detach from the leader thread after detaching from
1101 2016-06-28 Yao Qi <yao.qi@linaro.org>
1103 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1104 for variable new_offset.
1105 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1106 (aarch64_ftrace_insn_reloc_cb): Likewise.
1107 (aarch64_ftrace_insn_reloc_tb): Likewise.
1108 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1109 PRIx64 instead of PRIx32.
1111 2016-06-28 Yao Qi <yao.qi@linaro.org>
1113 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1114 (the_low_target): Install arm_get_syscall_trapinfo.
1116 2016-06-28 Yao Qi <yao.qi@linaro.org>
1118 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1120 (the_low_target): Install aarch64_get_syscall_trapinfo.
1122 2016-06-28 Yao Qi <yao.qi@linaro.org>
1124 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1126 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1127 Remove parameter sysno.
1128 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1131 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1133 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1134 (s390_emit_ne_goto): Likewise.
1135 (s390_emit_lt_goto): Likewise.
1136 (s390_emit_le_goto): Likewise.
1137 (s390_emit_gt_goto): Likewise.
1138 (s390_emit_ge_goto): Likewise.
1139 (s390x_emit_eq_goto): Likewise.
1140 (s390x_emit_ne_goto): Likewise.
1141 (s390x_emit_lt_goto): Likewise.
1142 (s390x_emit_le_goto): Likewise.
1143 (s390x_emit_gt_goto): Likewise.
1144 (s390x_emit_ge_goto): Likewise.
1145 (s390_emit_ops_impl): Mark variable static.
1146 (s390x_emit_ops): Likewise.
1148 2016-06-17 Yao Qi <yao.qi@linaro.org>
1150 * linux-low.c (handle_extended_wait): Call
1151 uninsert_reinsert_breakpoints for the parent process. Remove
1152 reinsert breakpoints from the child process. Reinsert them to
1153 the parent process when vfork is done.
1154 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1155 (reinsert_reinsert_breakpoints): New function.
1156 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1157 (reinsert_reinsert_breakpoints): Declare.
1159 2016-06-17 Yao Qi <yao.qi@linaro.org>
1161 * linux-low.c (handle_extended_wait): If the parent is doing
1162 step-over, remove the reinsert breakpoints from the forked child.
1164 2016-06-17 Yao Qi <yao.qi@linaro.org>
1166 * linux-low.c (unsuspend_all_lwps): Declare.
1167 (linux_low_filter_event): If thread exited, call finish_step_over.
1168 If step-over is finished, unsuspend other threads.
1170 2016-06-17 Yao Qi <yao.qi@linaro.org>
1172 * linux-low.c (linux_resume_one_lwp_throw): Assert
1173 has_reinsert_breakpoints returns false.
1174 * mem-break.c (delete_disabled_breakpoints): Assert
1175 bp type isn't reinsert_breakpoint.
1177 2016-06-17 Yao Qi <yao.qi@linaro.org>
1179 * linux-low.c (maybe_hw_step): New function.
1180 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1181 (finish_step_over): Switch current_thread to lwp temporarily,
1182 and assert has_reinsert_breakpoints returns true.
1183 (proceed_one_lwp): Call maybe_hw_step.
1184 * mem-break.c (has_reinsert_breakpoints): New function.
1185 * mem-break.h (has_reinsert_breakpoints): Declare.
1187 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1189 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1191 2016-05-17 Yao Qi <yao.qi@linaro.org>
1193 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1194 instead of find_inferior.
1196 2016-05-05 Yao Qi <yao.qi@linaro.org>
1198 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1199 Initialize res to zero.
1201 2016-05-05 Yao Qi <yao.qi@linaro.org>
1203 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1206 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1208 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1209 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1210 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1212 2016-04-28 Par Olsson <par.olsson@windriver.com>
1213 Simon Marchi <simon.marchi@ericsson.com>
1215 * tracepoint.c (write_inferior_int8): New function.
1216 (cmd_qtenable_disable): Write enable flag using
1217 write_inferior_int8.
1219 2016-04-25 Yao Qi <yao.qi@linaro.org>
1221 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1222 (need_step_over_p): Return zero if the LWP has pending signals
1223 can be delivered on software single step target.
1225 2016-04-25 Yao Qi <yao.qi@linaro.org>
1227 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1228 return instead of error.
1230 2016-04-22 Yao Qi <yao.qi@linaro.org>
1232 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1235 2016-04-22 Yao Qi <yao.qi@linaro.org>
1237 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1238 signal when stepping over breakpoint with software single
1241 2016-04-21 Pedro Alves <palves@redhat.com>
1243 * linux-s390-low.c (s390_collect_ptrace_register)
1244 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1246 (s390_check_regset): Use void * instead of gdb_byte *.
1248 2016-04-20 Pedro Alves <palves@redhat.com>
1250 * configure: Renegerate.
1252 2016-04-20 Yao Qi <yao.qi@linaro.org>
1254 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1255 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1257 (arm_store_gregset): Likewise.
1259 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1261 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1262 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1263 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1264 (amd64-avx-mpx-linux.c): New rules.
1265 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1266 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1267 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1268 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1269 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1270 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1271 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1272 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1273 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1274 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1275 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1276 * linux-x86-low.c (x86_linux_read_description): Add case for
1277 X86_XSTATE_AVX_MPX_MASK.
1278 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1279 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1280 init_registers_i386_avx_mpx_linux.
1281 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1282 (initialize_low_tracepoint): Call
1283 init_registers_i386_avx_mpx_linux.
1284 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1285 (initialize_low_tracepoint): Call
1286 init_registers_amd64_avx_mpx_linux.
1287 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1288 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1289 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1292 2016-04-18 Pedro Alves <palves@redhat.com>
1294 * configure: Regenerate.
1296 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1298 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1299 (aarch64_emit_sub): Likewise.
1301 2016-04-12 Pedro Alves <palves@redhat.com>
1303 * utils.c (prepare_to_throw_exception): Delete.
1305 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1307 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1309 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1311 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1313 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1315 * linux-aarch64-ipa.c: Add <elf.h> include.
1316 * linux-ppc-ipa.c: Add <elf.h> include.
1317 * linux-s390-ipa.c: Add <elf.h> include.
1319 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1321 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1322 (get_raw_reg_ptr): Likewise.
1323 (get_trace_state_variable_value_ptr): Likewise.
1324 (set_trace_state_variable_value_ptr): Likewise.
1325 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1328 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1329 Marcin Kościelnicki <koriakin@0x04.net>
1332 * linux-ppc-low.c (emit_insns): New function.
1333 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1334 (ppc_emit_prologue): New function.
1335 (ppc_emit_epilogue): New function.
1336 (ppc_emit_add): New function.
1337 (ppc_emit_sub): New function.
1338 (ppc_emit_mul): New function.
1339 (ppc_emit_lsh): New function.
1340 (ppc_emit_rsh_signed): New function.
1341 (ppc_emit_rsh_unsigned): New function.
1342 (ppc_emit_ext): New function.
1343 (ppc_emit_zero_ext): New function.
1344 (ppc_emit_log_not): New function.
1345 (ppc_emit_bit_and): New function.
1346 (ppc_emit_bit_or): New function.
1347 (ppc_emit_bit_xor): New function.
1348 (ppc_emit_bit_not): New function.
1349 (ppc_emit_equal): New function.
1350 (ppc_emit_less_signed): New function.
1351 (ppc_emit_less_unsigned): New function.
1352 (ppc_emit_ref): New function.
1353 (ppc_emit_const): New function.
1354 (ppc_emit_reg): New function.
1355 (ppc_emit_pop): New function.
1356 (ppc_emit_stack_flush): New function.
1357 (ppc_emit_swap): New function.
1358 (ppc_emit_stack_adjust): New function.
1359 (ppc_emit_call): New function.
1360 (ppc_emit_int_call_1): New function.
1361 (ppc_emit_void_call_2): New function.
1362 (ppc_emit_if_goto): New function.
1363 (ppc_emit_goto): New function.
1364 (ppc_emit_eq_goto): New function.
1365 (ppc_emit_ne_goto): New function.
1366 (ppc_emit_lt_goto): New function.
1367 (ppc_emit_le_goto): New function.
1368 (ppc_emit_gt_goto): New function.
1369 (ppc_emit_ge_goto): New function.
1370 (ppc_write_goto_address): New function.
1371 (ppc_emit_ops_impl): New static variable.
1372 (ppc64v1_emit_prologue): New function.
1373 (ppc64v2_emit_prologue): New function.
1374 (ppc64_emit_epilogue): New function.
1375 (ppc64_emit_add): New function.
1376 (ppc64_emit_sub): New function.
1377 (ppc64_emit_mul): New function.
1378 (ppc64_emit_lsh): New function.
1379 (ppc64_emit_rsh_signed): New function.
1380 (ppc64_emit_rsh_unsigned): New function.
1381 (ppc64_emit_ext): New function.
1382 (ppc64_emit_zero_ext): New function.
1383 (ppc64_emit_log_not): New function.
1384 (ppc64_emit_bit_and): New function.
1385 (ppc64_emit_bit_or): New function.
1386 (ppc64_emit_bit_xor): New function.
1387 (ppc64_emit_bit_not): New function.
1388 (ppc64_emit_equal): New function.
1389 (ppc64_emit_less_signed): New function.
1390 (ppc64_emit_less_unsigned): New function.
1391 (ppc64_emit_ref): New function.
1392 (ppc64_emit_const): New function.
1393 (ppc64v1_emit_reg): New function.
1394 (ppc64v2_emit_reg): New function.
1395 (ppc64_emit_pop): New function.
1396 (ppc64_emit_stack_flush): New function.
1397 (ppc64_emit_swap): New function.
1398 (ppc64v1_emit_call): New function.
1399 (ppc64v2_emit_call): New function.
1400 (ppc64v1_emit_int_call_1): New function.
1401 (ppc64v2_emit_int_call_1): New function.
1402 (ppc64v1_emit_void_call_2): New function.
1403 (ppc64v2_emit_void_call_2): New function.
1404 (ppc64_emit_if_goto): New function.
1405 (ppc64_emit_eq_goto): New function.
1406 (ppc64_emit_ne_goto): New function.
1407 (ppc64_emit_lt_goto): New function.
1408 (ppc64_emit_le_goto): New function.
1409 (ppc64_emit_gt_goto): New function.
1410 (ppc64_emit_ge_goto): New function.
1411 (ppc64v1_emit_ops_impl): New static variable.
1412 (ppc64v2_emit_ops_impl): New static variable.
1413 (ppc_emit_ops): New function.
1414 (linux_low_target): Wire in ppc_emit_ops.
1416 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1417 Marcin Kościelnicki <koriakin@0x04.net>
1420 * Makefile.in: Add powerpc-*-ipa.o
1421 * configure.srv: Add ipa_obj for powerpc*-linux.
1422 * linux-ppc-ipa.c: New file.
1423 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1425 (PPC_FIELD): New macro.
1426 (PPC_SEXT): New macro.
1427 (PPC_OP6): New macro.
1428 (PPC_BO): New macro.
1429 (PPC_LI): New macro.
1430 (PPC_BD): New macro.
1431 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1432 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1433 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1434 (ppc_get_thread_area): New function.
1435 (is_elfv2_inferior): New function.
1436 (gen_ds_form): New function.
1437 (GEN_STD): New macro.
1438 (GEN_STDU): New macro.
1439 (GEN_LD): New macro.
1440 (GEN_LDU): New macro.
1441 (gen_d_form): New function.
1442 (GEN_ADDI): New macro.
1443 (GEN_ADDIS): New macro.
1444 (GEN_LI): New macro.
1445 (GEN_LIS): New macro.
1446 (GEN_ORI): New macro.
1447 (GEN_ORIS): New macro.
1448 (GEN_LWZ): New macro.
1449 (GEN_STW): New macro.
1450 (GEN_STWU): New macro.
1451 (gen_xfx_form): New function.
1452 (GEN_MFSPR): New macro.
1453 (GEN_MTSPR): New macro.
1454 (GEN_MFCR): New macro.
1455 (GEN_MTCR): New macro.
1456 (GEN_SYNC): New macro.
1457 (GEN_LWSYNC): New macro.
1458 (gen_x_form): New function.
1459 (GEN_OR): New macro.
1460 (GEN_MR): New macro.
1461 (GEN_LWARX): New macro.
1462 (GEN_STWCX): New macro.
1463 (GEN_CMPW): New macro.
1464 (gen_md_form): New function.
1465 (GEN_RLDICL): New macro.
1466 (GEN_RLDICR): New macro.
1467 (gen_i_form): New function.
1469 (GEN_BL): New macro.
1470 (gen_b_form): New function.
1471 (GEN_BNE): New macro.
1472 (GEN_LOAD): New macro.
1473 (GEN_STORE): New macro.
1474 (gen_limm): New function.
1475 (gen_atomic_xchg): New function.
1476 (gen_call): New function.
1477 (ppc_relocate_instruction): New function.
1478 (ppc_install_fast_tracepoint_jump_pad): New function.
1479 (ppc_get_min_fast_tracepoint_insn_len): New function.
1480 (ppc_get_ipa_tdesc_idx): New function.
1481 (the_low_target): Wire in the new functions.
1482 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1484 * linux-ppc-tdesc.h: New file.
1486 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1488 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1489 (alloc_jump_pad_buffer): New function.
1490 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1491 (alloc_jump_pad_buffer): New function.
1492 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1493 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1494 (alloc_jump_pad_buffer): New function.
1495 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1496 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1497 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1498 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1500 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1502 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1503 * linux-amd64-ipa.c: Likewise.
1504 * linux-i386-ipa.c: Likewise.
1505 * linux-s390-ipa.c: Likewise.
1506 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1507 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1508 set_trace_state_variable_value_ptr.
1509 (struct ipa_sym_addresses): Likewise.
1510 (symbol_list): Likewise.
1511 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1512 accessing gdb_collect directly.
1513 (gdb_collect_ptr_type): New typedef.
1514 (get_raw_reg_ptr_type): New typedef.
1515 (get_trace_state_variable_value_ptr_type): New typedef.
1516 (set_trace_state_variable_value_ptr_type): New typedef.
1517 (gdb_collect_ptr): New global.
1518 (get_raw_reg_ptr): New global.
1519 (get_trace_state_variable_value_ptr): New global.
1520 (set_trace_state_variable_value_ptr): New global.
1521 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1522 accessing get_raw_reg directly.
1523 (get_get_tsv_func_addr): Likewise for
1524 get_trace_state_variable_value_ptr.
1525 (get_set_tsv_func_addr): Likewise for
1526 set_trace_state_variable_value_ptr.
1527 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1529 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1531 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1533 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1535 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1537 (relocate_instruction): Remove own_buf.
1538 * server.c (own_buf): Make global.
1539 (handle_v_requests): Make global.
1540 * server.h (own_buf): New declaration.
1541 (handle_v_requests): New prototype.
1543 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1546 * linux-s390-low.c (add_insns): New function.
1547 (s390_emit_prologue): New function.
1548 (s390_emit_epilogue): New function.
1549 (s390_emit_add): New function.
1550 (s390_emit_sub): New function.
1551 (s390_emit_mul): New function.
1552 (s390_emit_lsh): New function.
1553 (s390_emit_rsh_signed): New function.
1554 (s390_emit_rsh_unsigned): New function.
1555 (s390_emit_ext): New function.
1556 (s390_emit_log_not): New function.
1557 (s390_emit_bit_and): New function.
1558 (s390_emit_bit_or): New function.
1559 (s390_emit_bit_xor): New function.
1560 (s390_emit_bit_not): New function.
1561 (s390_emit_equal): New function.
1562 (s390_emit_less_signed): New function.
1563 (s390_emit_less_unsigned): New function.
1564 (s390_emit_ref): New function.
1565 (s390_emit_if_goto): New function.
1566 (s390_emit_goto): New function.
1567 (s390_write_goto_address): New function.
1568 (s390_emit_litpool): New function.
1569 (s390_emit_const): New function.
1570 (s390_emit_call): New function.
1571 (s390_emit_reg): New function.
1572 (s390_emit_pop): New function.
1573 (s390_emit_stack_flush): New function.
1574 (s390_emit_zero_ext): New function.
1575 (s390_emit_swap): New function.
1576 (s390_emit_stack_adjust): New function.
1577 (s390_emit_set_r2): New function.
1578 (s390_emit_int_call_1): New function.
1579 (s390_emit_void_call_2): New function.
1580 (s390_emit_eq_goto): New function.
1581 (s390_emit_ne_goto): New function.
1582 (s390_emit_lt_goto): New function.
1583 (s390_emit_le_goto): New function.
1584 (s390_emit_gt_goto): New function.
1585 (s390_emit_ge_goto): New function.
1586 (s390x_emit_prologue): New function.
1587 (s390x_emit_epilogue): New function.
1588 (s390x_emit_add): New function.
1589 (s390x_emit_sub): New function.
1590 (s390x_emit_mul): New function.
1591 (s390x_emit_lsh): New function.
1592 (s390x_emit_rsh_signed): New function.
1593 (s390x_emit_rsh_unsigned): New function.
1594 (s390x_emit_ext): New function.
1595 (s390x_emit_log_not): New function.
1596 (s390x_emit_bit_and): New function.
1597 (s390x_emit_bit_or): New function.
1598 (s390x_emit_bit_xor): New function.
1599 (s390x_emit_bit_not): New function.
1600 (s390x_emit_equal): New function.
1601 (s390x_emit_less_signed): New function.
1602 (s390x_emit_less_unsigned): New function.
1603 (s390x_emit_ref): New function.
1604 (s390x_emit_if_goto): New function.
1605 (s390x_emit_const): New function.
1606 (s390x_emit_call): New function.
1607 (s390x_emit_reg): New function.
1608 (s390x_emit_pop): New function.
1609 (s390x_emit_stack_flush): New function.
1610 (s390x_emit_zero_ext): New function.
1611 (s390x_emit_swap): New function.
1612 (s390x_emit_stack_adjust): New function.
1613 (s390x_emit_int_call_1): New function.
1614 (s390x_emit_void_call_2): New function.
1615 (s390x_emit_eq_goto): New function.
1616 (s390x_emit_ne_goto): New function.
1617 (s390x_emit_lt_goto): New function.
1618 (s390x_emit_le_goto): New function.
1619 (s390x_emit_gt_goto): New function.
1620 (s390x_emit_ge_goto): New function.
1621 (s390_emit_ops): New function.
1622 (struct linux_target_ops): Fill in emit_ops hook.
1624 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1627 * Makefile.in: Add s390 IPA files.
1628 * configure.srv: Build IPA for s390.
1629 * linux-s390-ipa.c: New file.
1630 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1631 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1632 (tdesc_s390_linux32): Likewise.
1633 (init_registers_s390_linux32v1): Likewise.
1634 (tdesc_s390_linux32v1): Likewise.
1635 (init_registers_s390_linux32v2): Likewise.
1636 (tdesc_s390_linux32v2): Likewise.
1637 (init_registers_s390_linux64): Likewise.
1638 (tdesc_s390_linux64): Likewise.
1639 (init_registers_s390_linux64v1): Likewise.
1640 (tdesc_s390_linux64v1): Likewise.
1641 (init_registers_s390_linux64v2): Likewise.
1642 (tdesc_s390_linux64v2): Likewise.
1643 (init_registers_s390_te_linux64): Likewise.
1644 (tdesc_s390_te_linux64): Likewise.
1645 (init_registers_s390_vx_linux64): Likewise.
1646 (tdesc_s390_vx_linux64): Likewise.
1647 (init_registers_s390_tevx_linux64): Likewise.
1648 (tdesc_s390_tevx_linux64): Likewise.
1649 (init_registers_s390x_linux64): Likewise.
1650 (tdesc_s390x_linux64): Likewise.
1651 (init_registers_s390x_linux64v1): Likewise.
1652 (tdesc_s390x_linux64v1): Likewise.
1653 (init_registers_s390x_linux64v2): Likewise.
1654 (tdesc_s390x_linux64v2): Likewise.
1655 (init_registers_s390x_te_linux64): Likewise.
1656 (tdesc_s390x_te_linux64): Likewise.
1657 (init_registers_s390x_vx_linux64): Likewise.
1658 (tdesc_s390x_vx_linux64): Likewise.
1659 (init_registers_s390x_tevx_linux64): Likewise.
1660 (tdesc_s390x_tevx_linux64): Likewise.
1661 (have_hwcap_s390_vx): New static variable.
1662 (s390_arch_setup): Fill have_hwcap_s390_vx.
1663 (s390_get_thread_area): New function.
1664 (s390_ft_entry_gpr_esa): New const.
1665 (s390_ft_entry_gpr_zarch): New const.
1666 (s390_ft_entry_misc): New const.
1667 (s390_ft_entry_fr): New const.
1668 (s390_ft_entry_vr): New const.
1669 (s390_ft_main_31): New const.
1670 (s390_ft_main_64): New const.
1671 (s390_ft_exit_fr): New const.
1672 (s390_ft_exit_vr): New const.
1673 (s390_ft_exit_misc): New const.
1674 (s390_ft_exit_gpr_esa): New const.
1675 (s390_ft_exit_gpr_zarch): New const.
1676 (append_insns): New function.
1677 (s390_relocate_instruction): New function.
1678 (s390_install_fast_tracepoint_jump_pad): New function.
1679 (s390_get_min_fast_tracepoint_insn_len): New function.
1680 (s390_get_ipa_tdesc_idx): New function.
1681 (struct linux_target_ops): Wire in the above functions.
1682 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1683 * linux-s390-tdesc.h: New file.
1685 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1687 * linux-s390-low.c (s390_supports_tracepoints): New function.
1688 (struct linux_target_ops): Fill supports_tracepoints hook.
1690 2016-03-18 Yao Qi <yao.qi@linaro.org>
1692 * linux-low.c (lwp_signal_can_be_delivered): New function.
1693 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1695 2016-03-18 Yao Qi <yao.qi@linaro.org>
1697 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1698 0 if signal is enqueued. Remove 'signal' from one debugging
1699 message. Move one debugging message to some lines below.
1700 Remove code setting 'signal' to 0.
1702 2016-03-18 Yao Qi <yao.qi@linaro.org>
1704 * linux-low.c (linux_low_filter_event): Remove redundant
1705 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1707 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1709 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1710 (struct linux_target_ops): Wire in the above.
1712 2016-03-03 Yao Qi <yao.qi@linaro.org>
1714 * linux-low.c: Update comments to start_step_over.
1716 2016-03-03 Yao Qi <yao.qi@linaro.org>
1719 * linux-low.c (handle_extended_wait): Set child suspended
1720 if event_lwp->bp_reinsert isn't zero.
1722 2016-03-02 Yao Qi <yao.qi@linaro.org>
1724 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1725 enqueue_pending_signal.
1727 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1729 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1732 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1734 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1735 (s390_regmap_3264) [!__s390x__]: New global.
1736 (s390_collect_ptrace_register): Skip map entries containing -1.
1737 (s390_supply_ptrace_register): Ditto.
1738 (s390_fill_gprs_high): New function.
1739 (s390_store_gprs_high): New function.
1740 (s390_regsets): Add NT_S390_HIGH_GPRS.
1741 (s390_get_hwcap): Enable on 31-bit.
1742 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1743 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1744 Detect NT_S390_HIGH_GPRS.
1745 (s390_usrregs_info_3264): Enable on 31-bit.
1746 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1747 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1749 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1752 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1753 * configure.srv: Ditto.
1754 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1755 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1756 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1757 (init_registers_amd64_linux): Remove prototype.
1758 (tdesc_amd64_linux): Remove declaration.
1759 (get_ipa_tdesc): New function.
1760 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1761 initialize remaining tdescs.
1762 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1763 (init_registers_i386_linux): Remove prototype.
1764 (tdesc_i386_linux): Remove declaration.
1765 (get_ipa_tdesc): New function.
1766 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1767 initialize remaining tdescs.
1768 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1769 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1770 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1771 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1772 (x86_get_ipa_tdesc_idx): New function.
1773 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1774 * linux-x86-tdesc.h: New file.
1775 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1776 (target_get_ipa_tdesc_idx): New macro.
1777 * tracepoint.c (ipa_tdesc_idx): New macro.
1778 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1779 (symbol_list): Add ipa_tdesc_idx.
1780 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1781 (ipa_tdesc): Remove.
1782 (ipa_tdesc_idx): New variable.
1783 (get_context_regcache): Use get_ipa_tdesc.
1784 (gdb_collect): Ditto.
1786 * tracepoint.h (get_ipa_tdesc): New prototype.
1787 (ipa_tdesc): Remove.
1789 2016-02-24 Pedro Alves <palves@redhat.com>
1791 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1792 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1793 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1794 Factor out common code between the USE_SIGTRAP_SIGINFO and
1795 !USE_SIGTRAP_SIGINFO blocks.
1796 (linux_low_filter_event): Call save_stop_reason instead of
1797 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1799 (linux_wait_1): Update comments.
1801 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1803 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1804 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1805 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1806 ppc_insert_point, ppc_remove_point.
1808 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1810 * linux-s390-low.c (s390_supports_z_point_type): New function.
1811 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1813 2016-02-16 Yao Qi <yao.qi@linaro.org>
1815 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1816 PC. Get pc from regcache_read_pc.
1818 2016-02-12 Yao Qi <yao.qi@linaro.org>
1820 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1821 or linux_get_pc_32bit.
1822 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1824 2016-02-12 Yao Qi <yao.qi@linaro.org>
1826 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1827 arm_linux_get_next_pcs_fixup.
1829 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1831 * tracepoint.c (x_tracepoint_action_download): Change
1832 write_inferior_data_ptr to write_inferior_data_pointer.
1833 (cmd_qtstart): Likewise.
1834 (write_inferior_data_ptr): Remove.
1835 (download_agent_expr): Change write_inferior_data_ptr to
1836 write_inferior_data_pointer.
1837 (download_tracepoint_1): Likewise.
1838 (download_tracepoint): Likewise.
1839 (download_trace_state_variables): Likewise.
1841 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1842 Marcin Kościelnicki <koriakin@0x04.net>
1844 * tracepoint.c (struct tracepoint_action_ops): Remove.
1845 (struct tracepoint_action): Remove ops.
1846 (m_tracepoint_action_download, r_tracepoint_action_download)
1847 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1848 size and offset accordingly.
1849 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1850 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1851 (tracepoint_action_send, tracepoint_action_download): New functions.
1852 Helpers for trace action handlers.
1853 (add_tracepoint_action): Remove setup actions ops.
1854 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1856 2016-02-10 Yao Qi <yao.qi@linaro.org>
1858 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1860 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1862 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1864 * configure: Regenerate.
1866 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1868 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1869 void * to gdb_byte *.
1870 * linux-low.c (siginfo_fixup): Likewise.
1871 (linux_xfer_siginfo): Likewise.
1872 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1874 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1876 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1878 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1880 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1882 * linux-x86-low.c [__x86_64__]: Include
1883 "nat/amd64-linux-siginfo.h".
1884 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1885 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1886 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1887 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1888 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1889 (cpt_si_fd, si_timerid, si_overrun): Move from
1890 nat/amd64-linux-siginfo.c.
1891 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1893 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1895 * server.c (skip_to_semicolon): Remove.
1896 (process_point_options): Use strchrnul instead of
1899 2016-01-26 Yao Qi <yao.qi@linaro.org>
1901 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1902 * linux-low.c (install_software_single_step_breakpoints): Don't
1903 call regcache_read_pc.
1904 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1907 2016-01-26 Yao Qi <yao.qi@linaro.org>
1909 * linux-low.c (install_software_single_step_breakpoints): Call
1910 regcache_read_pc instead of get_pc.
1912 2016-01-26 Yao Qi <yao.qi@linaro.org>
1914 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1915 (unblock_async_io): Rename to ...
1916 (block_unblock_async_io): ... it. New function.
1917 (enable_async_io): Don't install SIGIO handler. Unblock it
1919 (disable_async_io): Don't ignore SIGIO. Block it instead.
1920 (initialize_async_io): Install SIGIO handler. Don't call
1923 2016-01-26 Yao Qi <yao.qi@linaro.org>
1925 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1926 first character is '\003', call *the_target->request_interrupt.
1928 2016-01-25 Yao Qi <yao.qi@linaro.org>
1930 * remote-utils.c (new_thread_notify): Remove.
1931 (dead_thread_notify): Likewise.
1932 * remote-utils.h (new_thread_notify): Remove declaration.
1933 (dead_thread_notify): Likewise.
1935 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1937 * gdb.trace/pending.exp: Fix expected message on continue.
1939 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1941 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1942 it works properly on big-endian machines where sizeof (CORE_ADDR)
1945 2016-01-21 Pedro Alves <palves@redhat.com>
1947 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1948 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1949 * configure: Regenerate.
1951 2016-01-21 Yao Qi <yao.qi@linaro.org>
1953 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1954 is_thumb and set it according to CPSR saved on the stack.
1955 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1956 arm_sigreturn_next_pc.
1958 2016-01-18 Yao Qi <yao.qi@linaro.org>
1960 * linux-low.c (linux_set_pc_64bit): New function.
1961 (linux_get_pc_64bit): New function.
1962 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1964 * linux-sparc-low.c (debug_threads): Remove declaration.
1965 (sparc_get_pc): Remove.
1966 (the_low_target): Use linux_get_pc_64bit instead of
1968 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1969 (the_low_target): Use linux_get_pc_64bit and
1972 2016-01-18 Yao Qi <yao.qi@linaro.org>
1974 * linux-arm-low.c (debug_threads): Remove declaration.
1975 (arm_get_pc, arm_set_pc): Remove.
1976 (the_low_target): Use linux_get_pc_32bit and
1978 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1979 (the_low_target): Use linux_get_pc_32bit and
1981 * linux-cris-low.c (debug_threads): Remove declaration.
1982 (cris_get_pc, cris_set_pc,): Remove.
1983 (the_low_target): Use linux_get_pc_32bit and
1985 * linux-crisv32-low.c (debug_threads): Remove declaration.
1986 (cris_get_pc, cris_set_pc): Remove.
1987 (the_low_target): Use linux_get_pc_32bit and
1989 * linux-low.c: Include inttypes.h.
1990 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1991 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1992 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1993 (the_low_target): Use linux_get_pc_32bit and
1995 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1996 (the_low_target): Use linux_get_pc_32bit and
1998 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1999 (the_low_target): Use linux_get_pc_32bit and
2001 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2002 (the_low_target): Use linux_get_pc_32bit and
2004 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2005 (the_low_target): Use linux_get_pc_32bit and
2008 2016-01-18 Gary Benson <gbenson@redhat.com>
2010 * configure.ac (AC_FUNC_FORK): New check.
2011 * config.in: Regenerate.
2012 * configure: Likewise.
2014 2016-01-14 Yao Qi <yao.qi@linaro.org>
2016 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2017 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2018 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2019 arm_get_next_pcs_ctor.
2021 2016-01-12 Josh Stone <jistone@redhat.com>
2022 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2024 * inferiors.h: Include "gdb_vecs.h".
2025 (struct process_info): Add syscalls_to_catch.
2026 * inferiors.c (remove_process): Free syscalls_to_catch.
2027 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2028 syscall_return stops.
2029 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2030 * server.c (handle_general_set): Handle QCatchSyscalls.
2031 (handle_query): Report support for QCatchSyscalls.
2032 * target.h (struct target_ops): Add supports_catch_syscall.
2033 (target_supports_catch_syscall): New macro.
2034 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2035 (struct lwp_info): Add syscall_state.
2036 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2037 Maintain syscall_state and syscalls_to_catch across exec.
2038 (get_syscall_trapinfo): New function, proxy to the_low_target.
2039 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2040 (linux_low_filter_event): Toggle syscall_state entry/return for
2041 syscall traps, and set it ignored for all others.
2042 (gdb_catching_syscalls_p): New function.
2043 (gdb_catch_this_syscall_p): New function.
2044 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2045 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2046 (linux_supports_catch_syscall): New function.
2047 (linux_target_ops): Install it.
2048 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2049 (the_low_target): Install it.
2051 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2053 * acinclude.m4: Include new ../warning.m4 file.
2054 * configure: Regenerated.
2055 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2057 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2059 * ax.c (is_goto_target): Mark static.
2060 * linux-low.c (register_addr): Likewise.
2061 (linux_fetch_registers, linux_store_registers): Likewise.
2062 * mem-break.c (any_persistent_commands): Fix old prototype.
2063 (add_commands_to_breakpoint): Mark static.
2064 * regcache.c (find_register_by_name): Delete unused func.
2065 * remote-utils.c (hex_or_minus_one): Mark static.
2066 * server.c (monitor_show_help): Mark static.
2067 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2068 handle_v_requests): Likewise.
2070 2016-01-12 Pedro Alves <palves@redhat.com>
2072 Remove use of the registered trademark symbol throughout.
2074 2016-01-08 Yao Qi <yao.qi@linaro.org>
2076 * remote-utils.c (getpkt): If c is '\003', call target hook
2079 2016-01-06 Yao Qi <yao.qi@linaro.org>
2081 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2082 linux-aarch32-low.c.
2083 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2084 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2085 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2086 (thumb2_breakpoint): Declare.
2087 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2088 linux-aarch32-low.h.
2089 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2090 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2091 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2093 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2095 * gdbreplay.c (gdbreplay_version): Change copyright year in
2097 * server.c (gdbserver_version): Likewise.
2099 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2101 * server.c (crc32_table): Delete.
2102 (crc32): Use libiberty's xcrc32 function.
2104 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2106 * lynx-low.c (lynx_delete_thread_callback): New function.
2107 (lynx_mourn): Properly delete our process and all of its
2108 threads. Remove call to clear_inferiors.
2110 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2112 * target.c (thread_search_callback): Add check that
2113 the thread_stopped target callback is not NULL before
2116 2015-12-21 Yao Qi <yao.qi@linaro.org>
2118 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2121 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2123 * server.c (handle_query): Call target_supports_software_single_step.
2125 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2127 * linux-low.c (single_step): New function.
2128 (linux_resume_one_lwp_throw): Call single_step.
2129 (start_step_over): Likewise.
2131 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2133 * Makefile.in (SFILES): Append arch/arm-linux.c,
2134 arch/arm-get-next-pcs.c.
2135 (arm-linux.o): New rule.
2136 (arm-get-next-pcs.o): New rule.
2137 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2139 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2140 to linux-aarch32-low.c.
2141 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2142 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2143 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2144 (thumb2_breakpoint_len): Likewise.
2145 (arm_is_thumb_mode): Make non-static.
2146 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2147 from linux-aarch32-low.c.
2148 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2149 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2150 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2151 (thumb2_breakpoint_len): Likewise.
2152 (arm_is_thumb_mode): New declaration.
2153 * linux-arm-low.c: Include arch/arm-linux.h
2154 aarch/arm-get-next-pcs.h, sys/syscall.h.
2155 (get_next_pcs_ops): New struct.
2156 (get_next_pcs_addr_bits_remove): New function.
2157 (get_next_pcs_is_thumb): New function.
2158 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2159 (arm_sigreturn_next_pc): Likewise.
2160 (get_next_pcs_syscall_next_pc): Likewise.
2161 (arm_gdbserver_get_next_pcs): Likewise.
2162 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2164 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2165 * server.h: Include gdb_vecs.h.
2167 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2169 * Makefile.in (SFILES): Append common/common-regcache.c.
2170 (OBS): Append common-regcache.o.
2171 (common-regcache.o): New rule.
2172 * regcache.c (init_register_cache): Initialize cache to
2174 (regcache_raw_read_unsigned): New function.
2175 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2176 register_status enum.
2178 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2180 * linux-aarch64-low.c (the_low_targets): Rename
2181 breakpoint_reinsert_addr to get_next_pcs.
2182 * linux-arm-low.c (the_low_targets): Likewise.
2183 * linux-bfin-low.c (the_low_targets): Likewise.
2184 * linux-cris-low.c (the_low_targets): Likewise.
2185 * linux-crisv32-low.c (the_low_targets): Likewise.
2186 * linux-low.c (can_software_single_step): Likewise.
2187 (install_software_single_step_breakpoints): New function.
2188 (start_step_over): Use install_software_single_step_breakpoints.
2189 * linux-low.h: New CORE_ADDR vector.
2190 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2192 * linux-mips-low.c (the_low_targets): Likewise.
2193 * linux-nios2-low.c (the_low_targets): Likewise.
2194 * linux-sparc-low.c (the_low_targets): Likewise.
2196 2015-12-17 Pedro Alves <palves@redhat.com>
2198 * linux-low.c (linux_kill_one_lwp): Remove references to
2200 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2202 (linux_init_signals): Delete.
2203 (initialize_low): Adjust.
2204 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2206 2015-12-16 Pedro Alves <palves@redhat.com>
2208 * configure.ac (compiler warning flags): When testing a
2209 -Wno-foo option, check whether -Wfoo works instead.
2210 * configure: Regenerate.
2212 2015-12-11 Don Breazeal <donb@codesourcery.com>
2214 * server.c (process_serial_event): Don't exit from gdbserver
2215 in remote mode if there are still active inferiors.
2217 2015-12-11 Yao Qi <yao.qi@linaro.org>
2219 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2220 arm_breakpoint_at if the process is 32-bit.
2222 2015-12-11 Yao Qi <yao.qi@linaro.org>
2224 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2227 2015-12-07 Yao Qi <yao.qi@linaro.org>
2229 * configure.srv: Append arm.o to srv_tgtobj for
2230 aarch64*-*-linux* target.
2231 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2232 from linux-arm-low.c.
2233 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2234 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2235 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2236 (thumb2_breakpoint_len): Likewise.
2237 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2238 (arm_breakpoint_kinds): Likewise.
2239 (arm_breakpoint_kind_from_pc): Likewise.
2240 (arm_sw_breakpoint_from_kind): Likewise.
2241 (arm_breakpoint_kind_from_current_state): Likewise.
2242 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2243 (arm_sw_breakpoint_from_kind): Declare.
2244 (arm_breakpoint_kind_from_current_state): Declare.
2245 (arm_breakpoint_at): Declare.
2246 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2247 arm_sw_breakpoint_from_kind if process is 32-bit.
2248 (aarch64_breakpoint_kind_from_pc): New function.
2249 (aarch64_breakpoint_kind_from_current_state): New function.
2250 (the_low_target): Initialize fields breakpoint_kind_from_pc
2251 and breakpoint_kind_from_current_state.
2252 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2253 linux-aarch32-low.c.
2254 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2255 (arm_breakpoint, arm_breakpoint_len): Likewise.
2256 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2257 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2258 (arm_is_thumb_mode): Likewise.
2259 (arm_breakpoint_at): Likewise.
2260 (arm_breakpoint_kind_from_pc): Likewise.
2261 (arm_sw_breakpoint_from_kind): Likewise.
2262 (arm_breakpoint_kind_from_current_state): Likewise.
2265 2015-08-04 Yao Qi <yao.qi@linaro.org>
2267 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2268 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2269 * server.c (extended_protocol): Remove "static".
2270 * server.h (extended_protocol): Declare it.
2272 2015-12-04 Josh Stone <jistone@redhat.com>
2274 * target.h (struct target_ops) <arch_setup>: Rename to ...
2275 (struct target_ops) <post_create_inferior>: ... this.
2276 (target_arch_setup): Rename to ...
2277 (target_post_create_inferior): ... this, calling post_create_inferior.
2278 * server.c (start_inferior): Update target_arch_setup calls to
2279 target_post_create_inferior.
2280 * linux-low.c (linux_low_ptrace_options): Forward declare.
2281 (linux_arch_setup): Update its comment for general use.
2282 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2283 (struct linux_target_ops): Use linux_post_create_inferior.
2284 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2285 to post_create_inferior.
2286 * nto-low.c (struct nto_target_ops): Likewise.
2287 * spu-low.c (struct spu_target_ops): Likewise.
2288 * win32-low.c (struct win32_target_ops): Likewise.
2290 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2292 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2294 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2296 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2297 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2298 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2299 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2300 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2301 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2302 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2303 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2304 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2305 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2306 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2307 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2309 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2311 * linux-low.c (linux_look_up_symbols): Don't call
2312 linux_supports_traceclone.
2313 * linux-low.h (thread_db_init): Remove use_events argument.
2314 * thread-db.c (thread_db_use_event): Remove global variable.
2315 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2316 (struct thread_db) <td_create_bp>: Remove field.
2317 (thread_db_create_event): Remove function.
2318 (thread_db_enable_reporting): Likewise.
2319 (find_one_thread): Don't check for thread_db_use_events.
2320 (attach_thread): Likewise.
2321 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2322 (try_thread_db_load_1): Don't check for thread_db_use_events.
2323 (thread_db_init): Remove use_events argument and thread events
2325 (remove_thread_event_breakpoints): Remove function.
2326 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2328 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2330 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2332 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2333 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2334 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2335 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2336 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2338 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2340 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2341 * linux-low.c (can_hardware_single_step): Use
2342 supports_hardware_single_step.
2343 (can_software_single_step): New function.
2344 (start_step_over): Call can_software_single_step.
2345 (linux_supports_hardware_single_step): New function.
2346 (struct target_ops) <supports_software_single_step>: Initialize.
2347 * linux-low.h (struct linux_target_ops)
2348 <supports_hardware_single_step>: Initialize.
2349 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2350 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2351 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2352 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2353 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2354 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2355 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2356 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2357 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2358 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2360 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2361 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2363 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2364 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2365 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2367 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2368 * target.h (struct target_ops): <supports_software_single_step>:
2370 (target_supports_software_single_step): New macro.
2372 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2374 * linux-low.c (linux_wait_1): Fix pc advance condition.
2375 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2376 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2378 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2380 * linux-arm-low.c (arm_is_thumb_mode): New function.
2381 (arm_breakpoint_at): Use arm_is_thumb_mode.
2382 (arm_breakpoint_kind_from_current_state): New function.
2383 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2385 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2386 (linux_breakpoint_kind_from_current_state): New function.
2387 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2388 * linux-low.h (struct linux_target_ops)
2389 <breakpoint_kind_from_current_state>: New field.
2390 * target.h (struct target_ops): Likewise.
2391 (target_breakpoint_kind_from_current_state): New macro.
2393 2015-11-30 Pedro Alves <palves@redhat.com>
2395 * linux-low.c (linux_resume): Wake up the event loop before
2398 2015-11-30 Pedro Alves <palves@redhat.com>
2400 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2402 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2404 * target.c (struct thread_search): New structure.
2405 (thread_search_callback): New function.
2406 (prev_general_thread): New global.
2407 (prepare_to_access_memory, done_accessing_memory): New functions.
2408 * target.h (prepare_to_access_memory, done_accessing_memory):
2409 Replace macros with function declarations.
2411 2015-11-30 Pedro Alves <palves@redhat.com>
2414 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2415 report TARGET_WAITKIND_NO_RESUMED.
2416 * remote-utils.c (prepare_resume_reply): Handle
2417 TARGET_WAITKIND_NO_RESUMED.
2418 * server.c (report_no_resumed): New global.
2419 (handle_query) <qSupported>: Handle "no-resumed+". Report
2420 "no-resumed+" support.
2421 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2422 return error if the client doesn't support no-resumed events.
2423 (push_stop_notification): New function.
2424 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2425 events if the client supports them.
2427 2015-11-30 Pedro Alves <palves@redhat.com>
2429 * linux-low.c (thread_still_has_status_pending_p): Don't check
2431 (lwp_resumed): New function.
2432 (status_pending_p_callback): Return early if the LWP is not
2433 supposed to be resumed.
2435 2015-11-30 Pedro Alves <palves@redhat.com>
2437 * linux-low.c (handle_extended_wait): Assert that the LWP's
2438 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2439 thread create events, leave the new child's status pending.
2440 (linux_low_filter_event): If GDB wants to hear about thread exit
2441 events, leave the LWP marked dead and don't delete it.
2442 (linux_wait_for_event_filtered): Don't check for thread exit.
2443 (filter_exit_event): New function.
2444 (linux_wait_1): Use it, when returning an exit event.
2445 (linux_resume_one_lwp_throw): Assert that the LWP's
2446 waitstatus is TARGET_WAITKIND_IGNORE.
2447 * remote-utils.c (prepare_resume_reply): Handle
2448 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2449 * server.c (report_thread_events): New global.
2450 (handle_general_set): Handle QThreadEvents.
2451 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2452 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2453 TARGET_WAITKIND_THREAD_EXITED.
2454 * server.h (report_thread_events): Declare.
2456 2015-11-30 Pedro Alves <palves@redhat.com>
2458 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2459 the thread's last_resume_kind was resume_stop.
2461 2015-11-30 Pedro Alves <palves@redhat.com>
2463 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2466 2015-11-30 Pedro Alves <palves@redhat.com>
2468 * server.c (handle_v_requests): Handle vCtrlC.
2470 2015-11-30 Pedro Alves <palves@redhat.com>
2472 * gdbthread.h (find_any_thread_of_pid): Declare.
2473 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2475 * server.c (handle_query): If current_thread is NULL, look for
2476 another thread of the selected process.
2478 2015-11-26 Daniel Colascione <dancol@dancol.org>
2479 Simon Marchi <simon.marchi@ericsson.com>
2481 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2482 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2484 * target.h (struct target_ops) <thread_name>: New field.
2485 (target_thread_name): New macro.
2487 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2489 * regcache.h (regcache_invalidate_pid): Add declaration.
2490 * regcache.c (regcache_invalidate_pid): New function, extracted
2491 from regcache_invalidate.
2492 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2493 Add trivial documentation comment.
2494 * lynx-low.c: Use regcache_invalidate_pid instead of
2495 regcache_invalidate.
2497 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2499 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2500 and Elf64_auxv_t if the target is Android.
2502 2015-11-22 Doug Evans <xdje42@gmail.com>
2504 * target.h: #include <sys/types.h>.
2506 2015-11-19 Pedro Alves <palves@redhat.com>
2508 * linux-low.c (linux_process_qsupported): Change prototype.
2510 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2512 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2513 and adjust to loop over all features.
2514 * server.c (handle_query) <qSupported>: Adjust to call
2515 target_process_qsupported once, passing it a vector of unprocessed
2517 * target.h (struct target_ops) <process_qsupported>: Change
2519 (target_process_qsupported): Adjust.
2521 2015-11-19 Pedro Alves <palves@redhat.com>
2523 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2525 * configure: Regenerate.
2527 2015-11-19 Pedro Alves <palves@redhat.com>
2529 * configure: Regenerate.
2531 2015-11-19 Yao Qi <yao.qi@linaro.org>
2533 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2536 2015-11-19 Yao Qi <yao.qi@linaro.org>
2538 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2539 (struct aarch64_operand): Move enum out.
2541 2015-11-19 Yao Qi <yao.qi@linaro.org>
2543 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2544 struct user_fpsimd_state *.
2545 (aarch64_store_fpregset): Likewise.
2547 2015-11-19 Yao Qi <yao.qi@linaro.org>
2549 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2550 struct user_pt_regs *.
2551 (aarch64_store_gregset): Likewise.
2553 2015-11-18 Pedro Alves <palves@redhat.com>
2555 * Makefile.in (all_object_files): Add $IPA_OBJS.
2557 2015-11-17 Pedro Alves <palves@redhat.com>
2559 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2560 GDB_SIGNAL_0 and gdb_signal_to_string.
2562 2015-11-17 Pedro Alves <palves@redhat.com>
2564 * win32-low.c (handle_output_debug_string): Remove parameter.
2565 (win32_kill): Remove our_status local and adjust call to
2566 handle_output_debug_string.
2567 (get_child_debug_event): Adjust call to
2568 handle_output_debug_string.
2570 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2572 * linux-mips-low.c (mips_fill_gregset): Add cast.
2573 (mips_store_gregset): Likewise.
2574 (mips_fill_fpregset): Likewise.
2575 (mips_store_fpregset): Likewise.
2577 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2579 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2582 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2584 * linux-mips-low.c (mips_linux_new_thread): Change type of
2585 watch_type to enum target_hw_bp_type.
2587 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2589 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2590 Change return type to arm_hwbp_type.
2592 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2594 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2595 (arm_store_gregset): Likewise.
2596 * linux-arm-low.c (arm_get_hwcap): Likewise.
2597 (arm_read_description): Likewise.
2599 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2601 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2603 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2605 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2606 (ppc_fill_vsxregset): Likewise.
2607 (ppc_store_vsxregset): Likewise.
2608 (ppc_fill_vrregset): Likewise.
2609 (ppc_store_vrregset): Likewise.
2610 (ppc_fill_evrregset): Likewise.
2611 (ppc_store_evrregset): Likewise.
2613 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2615 * linux-ppc-low.c (ppc_usrregs_info): Remove
2616 forward-declaration.
2617 (ppc_arch_setup): Move lower in file.
2619 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2621 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2622 (ps_pdwrite): Likewise.
2624 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2626 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2627 to after assert checks.
2629 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2631 * proc-service.c (ps_pdread): Add/adjust casts.
2632 (ps_pdwrite): Add/adjust casts.
2634 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2636 * server.c (handle_search_memory_1): Cast return value of
2639 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2641 * server.c (write_qxfer_response): Change type of data to
2644 2015-10-29 Pedro Alves <palves@redhat.com>
2646 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2648 2015-10-29 Pedro Alves <palves@redhat.com>
2650 * tracepoint.c (clear_installed_tracepoints): Add casts.
2652 2015-10-29 Pedro Alves <palves@redhat.com>
2654 * server.c (handle_v_cont, process_serial_event): Add enum
2655 gdb_signal casts to signal parsing code.
2657 2015-10-29 Pedro Alves <palves@redhat.com>
2659 * linux-low.h (NULL_REGSET): Define.
2660 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2661 * linux-arm-low.c (arm_regsets): Likewise.
2662 * linux-crisv32-low.c (cris_regsets): Likewise.
2663 * linux-m68k-low.c (m68k_regsets): Likewise.
2664 * linux-mips-low.c (mips_regsets): Likewise.
2665 * linux-nios2-low.c (nios2_regsets): Likewise.
2666 * linux-ppc-low.c (ppc_regsets): Likewise.
2667 * linux-s390-low.c (s390_regsets): Likewise.
2668 * linux-sh-low.c (sh_regsets): Likewise.
2669 * linux-sparc-low.c (sparc_regsets): Likewise.
2670 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2671 * linux-tile-low.c (tile_regsets): Likewise.
2672 * linux-x86-low.c (x86_regsets): Likewise.
2673 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2675 2015-10-29 Pedro Alves <palves@redhat.com>
2677 * linux-low.h (NULL_REGSET): Define.
2678 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2679 * linux-arm-low.c (arm_regsets): Likewise.
2680 * linux-crisv32-low.c (cris_regsets): Likewise.
2681 * linux-m68k-low.c (m68k_regsets): Likewise.
2682 * linux-mips-low.c (mips_regsets): Likewise.
2683 * linux-nios2-low.c (nios2_regsets): Likewise.
2684 * linux-ppc-low.c (ppc_regsets): Likewise.
2685 * linux-s390-low.c (s390_regsets): Likewise.
2686 * linux-sh-low.c (sh_regsets): Likewise.
2687 * linux-sparc-low.c (sparc_regsets): Likewise.
2688 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2689 * linux-tile-low.c (tile_regsets): Likewise.
2690 * linux-x86-low.c (x86_regsets): Likewise.
2691 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2693 2015-10-26 Doug Evans <dje@google.com>
2695 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2697 2015-10-26 Doug Evans <dje@google.com>
2699 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2701 2015-10-26 Doug Evans <dje@google.com>
2703 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2705 (attach_thread, find_new_threads_callback): Ditto.
2707 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2709 * mem-break.h (set_breakpoint_data): Remove.
2711 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2713 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2714 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2715 (initialize_low): Remove set_breakpoint_data call.
2716 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2717 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2718 (initialize_low): Remove set_breakpoint_data call.
2719 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2720 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2721 (initialize_low): Remove set_breakpoint_data call.
2723 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2725 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2726 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2727 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2728 * target.h (target_breakpoint_kind_from_pc): New macro.
2730 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2732 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2733 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2734 the default breakpoint kind.
2736 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2738 * linux-arm-low.c (arm_supports_z_point_type): Add software
2741 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2743 * linux-arm-low.c: Refactor breakpoint definitions.
2744 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2745 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2747 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2749 * Makefile.in: Add arm.c/o.
2750 * configure.srv: Likewise.
2751 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2752 (arm_breakpoint_kind_from_pc): New function.
2753 (arm_sw_breakpoint_from_kind): Return proper kind.
2754 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2756 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2758 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2760 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2761 (struct raw_breakpoint) <size>: Remove.
2762 (struct raw_breakpoint) <kind>: Add.
2763 (bp_size): New function.
2764 (bp_opcode): Likewise.
2765 (find_raw_breakpoint_at): Adjust for kind.
2766 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2767 (remove_memory_breakpoint): Adjust for kind call bp_size.
2768 (set_raw_breakpoint_at): Adjust for kind.
2769 (set_breakpoint): Likewise.
2770 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2771 (delete_raw_breakpoint): Adjust for kind.
2772 (delete_breakpoint): Likewise.
2773 (find_gdb_breakpoint): Likewise.
2774 (set_gdb_breakpoint_1): Likewise.
2775 (set_gdb_breakpoint): Likewise.
2776 (delete_gdb_breakpoint_1): Likewise.
2777 (delete_gdb_breakpoint): Likewise.
2778 (uninsert_raw_breakpoint): Likewise.
2779 (reinsert_raw_breakpoint): Likewise.
2780 (set_breakpoint_data): Remove.
2781 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2782 (check_mem_read): Adjust for kind call bp_size.
2783 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2784 (clone_one_breakpoint): Adjust for kind.
2785 * mem-break.h (set_gdb_breakpoint): Likewise.
2786 (delete_gdb_breakpoint): Likewise.
2787 * server.c (process_serial_event): Likewise.
2789 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2791 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2792 (struct linux_target_ops) <breakpoint>: Remove.
2793 (struct linux_target_ops) <breakpoint_len>: Remove.
2794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2796 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2797 (arm_sw_breakpoint_from_kind): New function.
2798 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2799 (struct linux_target_ops) <breakpoint>: Remove.
2800 (struct linux_target_ops) <breakpoint_len>: Remove.
2801 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2802 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2803 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2804 (struct linux_target_ops) <breakpoint>: Remove.
2805 (struct linux_target_ops) <breakpoint_len>: Remove.
2806 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2807 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2808 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2809 (struct linux_target_ops) <breakpoint>: Remove.
2810 (struct linux_target_ops) <breakpoint_len>: Remove.
2811 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2812 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2813 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2814 and sw_breakpoint_from_kind to increment the pc.
2815 (linux_breakpoint_kind_from_pc): New function.
2816 (linux_sw_breakpoint_from_kind): New function.
2817 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2818 (initialize_low): Call breakpoint_kind_from_pc and
2819 sw_breakpoint_from_kind to replace breakpoint_data/len.
2820 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2822 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2823 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2824 (struct linux_target_ops) <breakpoint>: Remove.
2825 (struct linux_target_ops) <breakpoint_len>: Remove.
2826 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2827 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2828 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2829 (struct linux_target_ops) <breakpoint>: Remove.
2830 (struct linux_target_ops) <breakpoint_len>: Remove.
2831 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2832 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2833 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2834 (struct linux_target_ops) <breakpoint>: Remove.
2835 (struct linux_target_ops) <breakpoint_len>: Remove.
2836 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2837 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2838 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2839 (struct linux_target_ops) <breakpoint>: Remove.
2840 (struct linux_target_ops) <breakpoint_len>: Remove.
2841 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2842 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2843 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2844 (struct linux_target_ops) <breakpoint>: Remove.
2845 (struct linux_target_ops) <breakpoint_len>: Remove.
2846 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2847 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2848 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2849 (struct linux_target_ops) <breakpoint>: Remove.
2850 (struct linux_target_ops) <breakpoint_len>: Remove.
2851 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2852 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2853 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2854 (struct linux_target_ops) <breakpoint>: Remove.
2855 (struct linux_target_ops) <breakpoint_len>: Remove.
2856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2857 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2858 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2859 (struct linux_target_ops) <breakpoint>: Remove.
2860 (struct linux_target_ops) <breakpoint_len>: Remove.
2861 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2862 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2863 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2864 (struct linux_target_ops) <breakpoint>: Remove.
2865 (struct linux_target_ops) <breakpoint_len>: Remove.
2866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2868 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2869 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2870 (struct linux_target_ops) <breakpoint>: Remove.
2871 (struct linux_target_ops) <breakpoint_len>: Remove.
2872 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2873 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2874 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2875 (struct linux_target_ops) <breakpoint>: Remove.
2876 (struct linux_target_ops) <breakpoint_len>: Remove.
2877 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2878 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2880 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2882 * linux-cris-low.c (cris_get_pc): Remove void arg.
2884 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2886 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2889 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2891 * inferiors.c (thread_pid_matches_callback): New function.
2892 (find_thread_process): New function.
2893 (remove_thread): Reset current_thread.
2894 (remove_process): Assert threads have been removed first.
2896 2015-10-15 Yao Qi <yao.qi@linaro.org>
2898 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2900 (aarch64_remove_point): Likewise.
2901 * regcache.c (regcache_register_size): New function.
2903 2015-10-12 Yao Qi <yao.qi@linaro.org>
2905 * linux-aarch64-low.c: Update all callers as emit_load_store
2906 is renamed to aarch64_emit_load_store.
2908 2015-10-12 Yao Qi <yao.qi@linaro.org>
2910 * linux-aarch64-low.c: Update all callers of function renaming
2911 from emit_insn to aarch64_emit_insn.
2913 2015-10-12 Yao Qi <yao.qi@linaro.org>
2915 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2916 arch/aarch64-insn.h.
2917 (struct aarch64_memory_operand): Likewise.
2919 (emit_insn): Move to arch/aarch64-insn.c.
2920 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2921 (emit_load_store): Move to arch/aarch64-insn.c.
2922 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2923 (can_encode_int32): Remove.
2925 2015-10-12 Yao Qi <yao.qi@linaro.org>
2927 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2928 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2929 (aarch64_relocate_instruction): Likewise.
2930 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2931 (struct aarch64_insn_visitor): Likewise.
2933 2015-10-12 Yao Qi <yao.qi@linaro.org>
2935 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2936 (struct aarch64_insn_visitor): New.
2937 (struct aarch64_insn_relocation_data): New.
2938 (aarch64_ftrace_insn_reloc_b): New function.
2939 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2940 (aarch64_ftrace_insn_reloc_cb): Likewise.
2941 (aarch64_ftrace_insn_reloc_tb): Likewise.
2942 (aarch64_ftrace_insn_reloc_adr): Likewise.
2943 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2944 (aarch64_ftrace_insn_reloc_others): Likewise.
2946 (aarch64_relocate_instruction): Use visitor.
2948 2015-10-12 Yao Qi <yao.qi@linaro.org>
2950 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2951 int. Add argument buf.
2952 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2953 aarch64_relocate_instruction.
2955 2015-10-12 Yao Qi <yao.qi@linaro.org>
2957 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2958 argument insn. Remove local variable insn. Don't call
2960 (aarch64_install_fast_tracepoint_jump_pad): Call
2963 2015-09-30 Yao Qi <yao.qi@linaro.org>
2965 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2966 (emit_load_store_pair): Likewise.
2968 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2970 * dll.c (match_dll): Add cast(s).
2971 (unloaded_dll): Likewise.
2972 * linux-low.c (second_thread_of_pid_p): Likewise.
2973 (delete_lwp_callback): Likewise.
2974 (count_events_callback): Likewise.
2975 (select_event_lwp_callback): Likewise.
2976 (linux_set_resume_request): Likewise.
2977 * server.c (accumulate_file_name_length): Likewise.
2978 (emit_dll_description): Likewise.
2979 (handle_qxfer_threads_worker): Likewise.
2980 (visit_actioned_threads): Likewise.
2981 * thread-db.c (any_thread_of): Likewise.
2982 * tracepoint.c (same_process_p): Likewise.
2983 (match_blocktype): Likewise.
2984 (build_traceframe_info_xml): Likewise.
2986 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2988 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2990 (gdb_unparse_agent_expr): Likewise.
2991 * hostio.c (require_data): Likewise.
2992 (handle_pread): Likewise.
2993 * linux-low.c (disable_regset): Likewise.
2994 (fetch_register): Likewise.
2995 (store_register): Likewise.
2996 (get_dynamic): Likewise.
2997 (linux_qxfer_libraries_svr4): Likewise.
2998 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2999 (set_fast_tracepoint_jump): Likewise.
3000 (uninsert_fast_tracepoint_jumps_at): Likewise.
3001 (reinsert_fast_tracepoint_jumps_at): Likewise.
3002 (validate_inserted_breakpoint): Likewise.
3003 (clone_agent_expr): Likewise.
3004 * regcache.c (init_register_cache): Likewise.
3005 * remote-utils.c (putpkt_binary_1): Likewise.
3006 (decode_M_packet): Likewise.
3007 (decode_X_packet): Likewise.
3008 (look_up_one_symbol): Likewise.
3009 (relocate_instruction): Likewise.
3010 (monitor_output): Likewise.
3011 * server.c (handle_search_memory): Likewise.
3012 (handle_qxfer_exec_file): Likewise.
3013 (handle_qxfer_libraries): Likewise.
3014 (handle_qxfer): Likewise.
3015 (handle_query): Likewise.
3016 (handle_v_cont): Likewise.
3017 (handle_v_run): Likewise.
3018 (captured_main): Likewise.
3019 * target.c (write_inferior_memory): Likewise.
3020 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3021 * tracepoint.c (init_trace_buffer): Likewise.
3022 (add_tracepoint_action): Likewise.
3023 (add_traceframe): Likewise.
3024 (add_traceframe_block): Likewise.
3025 (cmd_qtdpsrc): Likewise.
3026 (cmd_qtdv): Likewise.
3027 (cmd_qtstatus): Likewise.
3028 (response_source): Likewise.
3029 (response_tsv): Likewise.
3030 (cmd_qtnotes): Likewise.
3031 (gdb_collect): Likewise.
3032 (initialize_tracepoint): Likewise.
3034 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3036 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3037 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3038 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3040 (enum aarch64_condition_codes): New enum.
3041 (w0): New static global.
3044 (struct aarch64_memory_operand) <type>: New
3045 MEMORY_OPERAND_POSTINDEX type.
3046 (postindex_memory_operand): New helper function.
3047 (emit_ret): New function.
3048 (emit_load_store_pair): New function, factored out of emit_stp
3049 with support for MEMORY_OPERAND_POSTINDEX.
3050 (emit_stp): Rewrite using emit_load_store_pair.
3051 (emit_ldp): New function.
3052 (emit_load_store): Likewise.
3053 (emit_ldr): Mention post-index instruction in comment.
3054 (emit_ldrh): New function.
3055 (emit_ldrb): New function.
3056 (emit_ldrsw): Mention post-index instruction in comment.
3057 (emit_str): Likewise.
3058 (emit_subs): New function.
3059 (emit_cmp): Likewise.
3060 (emit_and): Likewise.
3061 (emit_orr): Likewise.
3062 (emit_orn): Likewise.
3063 (emit_eor): Likewise.
3064 (emit_mvn): Likewise.
3065 (emit_lslv): Likewise.
3066 (emit_lsrv): Likewise.
3067 (emit_asrv): Likewise.
3068 (emit_mul): Likewise.
3069 (emit_sbfm): Likewise.
3070 (emit_sbfx): Likewise.
3071 (emit_ubfm): Likewise.
3072 (emit_ubfx): Likewise.
3073 (emit_csinc): Likewise.
3074 (emit_cset): Likewise.
3075 (emit_nop): Likewise.
3076 (emit_ops_insns): New helper function.
3077 (emit_pop): Likewise.
3078 (emit_push): Likewise.
3079 (aarch64_emit_prologue): New function.
3080 (aarch64_emit_epilogue): Likewise.
3081 (aarch64_emit_add): Likewise.
3082 (aarch64_emit_sub): Likewise.
3083 (aarch64_emit_mul): Likewise.
3084 (aarch64_emit_lsh): Likewise.
3085 (aarch64_emit_rsh_signed): Likewise.
3086 (aarch64_emit_rsh_unsigned): Likewise.
3087 (aarch64_emit_ext): Likewise.
3088 (aarch64_emit_log_not): Likewise.
3089 (aarch64_emit_bit_and): Likewise.
3090 (aarch64_emit_bit_or): Likewise.
3091 (aarch64_emit_bit_xor): Likewise.
3092 (aarch64_emit_bit_not): Likewise.
3093 (aarch64_emit_equal): Likewise.
3094 (aarch64_emit_less_signed): Likewise.
3095 (aarch64_emit_less_unsigned): Likewise.
3096 (aarch64_emit_ref): Likewise.
3097 (aarch64_emit_if_goto): Likewise.
3098 (aarch64_emit_goto): Likewise.
3099 (aarch64_write_goto_address): Likewise.
3100 (aarch64_emit_const): Likewise.
3101 (aarch64_emit_call): Likewise.
3102 (aarch64_emit_reg): Likewise.
3103 (aarch64_emit_pop): Likewise.
3104 (aarch64_emit_stack_flush): Likewise.
3105 (aarch64_emit_zero_ext): Likewise.
3106 (aarch64_emit_swap): Likewise.
3107 (aarch64_emit_stack_adjust): Likewise.
3108 (aarch64_emit_int_call_1): Likewise.
3109 (aarch64_emit_void_call_2): Likewise.
3110 (aarch64_emit_eq_goto): Likewise.
3111 (aarch64_emit_ne_goto): Likewise.
3112 (aarch64_emit_lt_goto): Likewise.
3113 (aarch64_emit_le_goto): Likewise.
3114 (aarch64_emit_gt_goto): Likewise.
3115 (aarch64_emit_ge_got): Likewise.
3116 (aarch64_emit_ops_impl): New static global variable.
3117 (aarch64_emit_ops): New target function, return
3118 &aarch64_emit_ops_impl.
3119 (struct linux_target_ops): Install it.
3121 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3123 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3124 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3126 * linux-aarch64-ipa.c: New file.
3127 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3129 (aarch64_get_thread_area): New target method.
3130 (extract_signed_bitfield): New helper function.
3131 (aarch64_decode_ldr_literal): New function.
3132 (enum aarch64_opcodes): New enum.
3133 (struct aarch64_register): New struct.
3134 (struct aarch64_operand): New struct.
3135 (x0): New static global.
3144 (aarch64_register): New helper function.
3145 (register_operand): Likewise.
3146 (immediate_operand): Likewise.
3147 (struct aarch64_memory_operand): New struct.
3148 (offset_memory_operand): New helper function.
3149 (preindex_memory_operand): Likewise.
3150 (enum aarch64_system_control_registers): New enum.
3151 (ENCODE): New macro.
3152 (emit_insn): New helper function.
3153 (emit_b): New function.
3154 (emit_bcond): Likewise.
3155 (emit_cb): Likewise.
3156 (emit_tb): Likewise.
3157 (emit_blr): Likewise.
3158 (emit_stp): Likewise.
3159 (emit_ldp_q_offset): Likewise.
3160 (emit_stp_q_offset): Likewise.
3161 (emit_load_store): Likewise.
3162 (emit_ldr): Likewise.
3163 (emit_ldrsw): Likewise.
3164 (emit_str): Likewise.
3165 (emit_ldaxr): Likewise.
3166 (emit_stxr): Likewise.
3167 (emit_stlr): Likewise.
3168 (emit_data_processing_reg): Likewise.
3169 (emit_data_processing): Likewise.
3170 (emit_add): Likewise.
3171 (emit_sub): Likewise.
3172 (emit_mov): Likewise.
3173 (emit_movk): Likewise.
3174 (emit_mov_addr): Likewise.
3175 (emit_mrs): Likewise.
3176 (emit_msr): Likewise.
3177 (emit_sevl): Likewise.
3178 (emit_wfe): Likewise.
3179 (append_insns): Likewise.
3180 (can_encode_int32_in): New helper function.
3181 (aarch64_relocate_instruction): New function.
3182 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3183 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3184 (struct linux_target_ops): Install aarch64_get_thread_area,
3185 aarch64_install_fast_tracepoint_jump_pad and
3186 aarch64_get_min_fast_tracepoint_insn_len.
3188 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3190 * Makefile.in (aarch64-insn.o): New rule.
3191 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3193 2015-09-21 Yao Qi <yao.qi@linaro.org>
3195 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3197 2015-09-21 Yao Qi <yao.qi@linaro.org>
3199 * tracepoint.c (max_jump_pad_size): Remove.
3201 2015-09-18 Yao Qi <yao.qi@linaro.org>
3203 * linux-aarch64-low.c: Don't include sys/uio.h.
3204 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3206 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3208 * tracepoint.c (eval_result_type): Change prototype.
3209 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3211 2015-09-15 Pedro Alves <palves@redhat.com>
3213 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3214 Check whether to report exec events instead of checking whether
3215 multiprocess is enabled.
3217 2015-09-15 Pedro Alves <palves@redhat.com>
3220 * remote-utils.c (prepare_resume_reply): Merge
3221 TARGET_WAITKIND_VFORK_DONE switch case with the
3222 TARGET_WAITKIND_FORKED case.
3224 2015-09-15 Yao Qi <yao.qi@linaro.org>
3226 * server.c (handle_query): Check string comparison using
3227 "else if" instead of "if".
3229 2015-09-15 Yao Qi <yao.qi@linaro.org>
3231 * server.c (vCont_supported): New global variable.
3232 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3233 matches. Append ";vContSupported+" to own_buf.
3234 (handle_v_requests): Append ";s;S" to own_buf if target supports
3235 hardware single step or vCont_supported is false.
3236 (capture_main): Set vCont_supported to zero.
3238 2015-09-15 Yao Qi <yao.qi@linaro.org>
3240 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3242 (linux_supports_hardware_single_step): ... New function.
3243 (linux_target_ops): Update.
3244 * lynx-low.c (lynx_target_ops): Set field
3245 supports_hardware_single_step to target_can_do_hardware_single_step.
3246 * nto-low.c (nto_target_ops): Likewise.
3247 * spu-low.c (spu_target_ops): Likewise.
3248 * win32-low.c (win32_target_ops): Likewise.
3249 * target.c (target_can_do_hardware_single_step): New function.
3250 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3251 Remove. <supports_hardware_single_step>: New field.
3252 (target_supports_conditional_breakpoints): Remove.
3253 (target_supports_hardware_single_step): New macro.
3254 (target_can_do_hardware_single_step): Declare.
3255 * server.c (handle_query): Use target_supports_hardware_single_step
3256 instead of target_supports_conditional_breakpoints.
3258 2015-09-15 Yao Qi <yao.qi@linaro.org>
3260 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3262 (struct linux_target_ops the_low_target): Install
3263 aarch64_linux_siginfo_fixup.
3265 2015-09-11 Don Breazeal <donb@codesourcery.com>
3266 Luis Machado <lgustavo@codesourcery.com>
3268 * linux-low.c (linux_mourn): Static declaration.
3269 (linux_arch_setup): Move in front of
3270 handle_extended_wait.
3271 (linux_arch_setup_thread): New function.
3272 (handle_extended_wait): Handle exec events. Call
3273 linux_arch_setup_thread. Make event_lwp argument a
3274 pointer-to-a-pointer.
3275 (check_zombie_leaders): Do not check stopped threads.
3276 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3277 (linux_low_filter_event): Add lwp and thread for exec'ing
3278 non-leader thread if leader thread has been deleted.
3279 Refactor code into linux_arch_setup_thread and call it.
3280 Pass child lwp pointer by reference to handle_extended_wait.
3281 (linux_wait_for_event_filtered): Update comment.
3282 (linux_wait_1): Prevent clobbering exec event status.
3283 (linux_supports_exec_events): New function.
3284 (linux_target_ops) <supports_exec_events>: Initialize new member.
3285 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3287 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3288 * server.c (report_exec_events): New global variable.
3289 (handle_query): Handle qSupported query for exec-events feature.
3290 (captured_main): Initialize report_exec_events.
3291 * server.h (report_exec_events): Declare new global variable.
3292 * target.h (struct target_ops) <supports_exec_events>: New
3294 (target_supports_exec_events): New macro.
3295 * win32-low.c (win32_target_ops) <supports_exec_events>:
3296 Initialize new member.
3298 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3300 * linux-low.c (linux_low_enable_btrace): Remove.
3301 (linux_target_ops): Replace linux_low_enable_btrace with
3302 linux_enable_btrace.
3304 2015-09-03 Yao Qi <yao.qi@linaro.org>
3306 * linux-aarch64-low.c (aarch64_insert_point): Call
3307 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3310 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3312 * linux-low.c (check_stopped_by_breakpoint): Use
3313 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3315 2015-08-27 Pedro Alves <palves@redhat.com>
3317 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3319 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3321 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3322 the XNEW-family equivalent.
3323 (compile_bytecodes): Likewise.
3324 * dll.c (loaded_dll): Likewise.
3325 * event-loop.c (append_callback_event): Likewise.
3326 (create_file_handler): Likewise.
3327 (create_file_event): Likewise.
3328 * hostio.c (handle_open): Likewise.
3329 * inferiors.c (add_thread): Likewise.
3330 (add_process): Likewise.
3331 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3332 * linux-arm-low.c (arm_new_process): Likewise.
3333 (arm_new_thread): Likewise.
3334 * linux-low.c (add_to_pid_list): Likewise.
3335 (linux_add_process): Likewise.
3336 (handle_extended_wait): Likewise.
3337 (add_lwp): Likewise.
3338 (enqueue_one_deferred_signal): Likewise.
3339 (enqueue_pending_signal): Likewise.
3340 (linux_resume_one_lwp_throw): Likewise.
3341 (linux_resume_one_thread): Likewise.
3342 (linux_read_memory): Likewise.
3343 (linux_write_memory): Likewise.
3344 * linux-mips-low.c (mips_linux_new_process): Likewise.
3345 (mips_linux_new_thread): Likewise.
3346 (mips_add_watchpoint): Likewise.
3347 * linux-x86-low.c (initialize_low_arch): Likewise.
3348 * lynx-low.c (lynx_add_process): Likewise.
3349 * mem-break.c (set_raw_breakpoint_at): Likewise.
3350 (set_breakpoint): Likewise.
3351 (add_condition_to_breakpoint): Likewise.
3352 (add_commands_to_breakpoint): Likewise.
3353 (clone_agent_expr): Likewise.
3354 (clone_one_breakpoint): Likewise.
3355 * regcache.c (new_register_cache): Likewise.
3356 * remote-utils.c (look_up_one_symbol): Likewise.
3357 * server.c (queue_stop_reply): Likewise.
3358 (start_inferior): Likewise.
3359 (queue_stop_reply_callback): Likewise.
3360 (handle_target_event): Likewise.
3361 * spu-low.c (fetch_ppc_memory): Likewise.
3362 (store_ppc_memory): Likewise.
3363 * target.c (set_target_ops): Likewise.
3364 * thread-db.c (thread_db_load_search): Likewise.
3365 (try_thread_db_load_1): Likewise.
3366 * tracepoint.c (add_tracepoint): Likewise.
3367 (add_tracepoint_action): Likewise.
3368 (create_trace_state_variable): Likewise.
3369 (cmd_qtdpsrc): Likewise.
3370 (cmd_qtro): Likewise.
3371 (add_while_stepping_state): Likewise.
3372 * win32-low.c (child_add_thread): Likewise.
3373 (get_image_name): Likewise.
3375 2015-08-25 Yao Qi <yao.qi@linaro.org>
3377 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3379 2015-08-25 Yao Qi <yao.qi@linaro.org>
3381 * Makefile.in (aarch64-linux.o): New rule.
3382 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3384 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3385 (aarch64_init_debug_reg_state): Make it extern.
3386 (aarch64_linux_prepare_to_resume): Remove.
3388 2015-08-25 Yao Qi <yao.qi@linaro.org>
3390 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3391 lwp_arch_private_info and ptid_of_lwp.
3393 2015-08-25 Yao Qi <yao.qi@linaro.org>
3395 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3396 Find proc_info by find_process_pid. All callers updated.
3398 2015-08-25 Yao Qi <yao.qi@linaro.org>
3400 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3402 (debug_reg_change_callback): Remove.
3403 (aarch64_notify_debug_reg_change): Remove.
3405 2015-08-25 Yao Qi <yao.qi@linaro.org>
3407 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3408 Call current_lwp_ptid.
3410 2015-08-25 Yao Qi <yao.qi@linaro.org>
3412 * linux-aarch64-low.c (debug_reg_change_callback): Use
3415 2015-08-25 Yao Qi <yao.qi@linaro.org>
3417 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3419 2015-08-25 Yao Qi <yao.qi@linaro.org>
3421 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3423 2015-08-25 Yao Qi <yao.qi@linaro.org>
3425 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3428 2015-08-25 Yao Qi <yao.qi@linaro.org>
3430 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3432 (debug_reg_change_callback): Remove argument entry and add argument
3433 lwp. Remove local variable thread. Don't print thread id in the
3434 debugging output. Don't check whether pid of thread equals to pid.
3435 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3436 iterate_over_lwps instead find_inferior.
3438 2015-08-24 Pedro Alves <palves@redhat.com>
3440 * inferiors.c (get_first_process): New function.
3441 * inferiors.h (get_first_process): New declaration.
3442 * remote-utils.c (read_ptid): Default to the first process in the
3443 list, instead of to the current thread's process.
3445 2015-08-24 Pedro Alves <palves@redhat.com>
3447 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3448 * event-loop.c: Likewise.
3449 * remote-utils.c: Likewise.
3450 * tracepoint.c: Likewise.
3452 2015-08-24 Pedro Alves <palves@redhat.com>
3454 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3457 2015-08-21 Pedro Alves <palves@redhat.com>
3459 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3460 instead of literal 1.
3462 2015-08-21 Pedro Alves <palves@redhat.com>
3464 * tdesc.c (default_description): Explicitly zero-initialize.
3466 2015-08-21 Pedro Alves <palves@redhat.com>
3469 * inferiors.c (remove_thread): Discard any pending stop reply for
3471 * server.c (remove_all_on_match_pid): Rename to ...
3472 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3474 (discard_queued_stop_replies): Change parameter to a ptid. Now
3476 (handle_v_kill, kill_inferior_callback, captured_main)
3477 (process_serial_event): Adjust.
3478 * server.h (discard_queued_stop_replies): Declare.
3480 2015-08-21 Pedro Alves <palves@redhat.com>
3482 * linux-low.c (wait_for_sigstop): Always switch to no thread
3483 selected if the previously current thread dies.
3484 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3485 process instead of the current thread's.
3486 * remote-utils.c (input_interrupt): Don't check if there's no
3488 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3489 current thread to the general thread fails, error out.
3490 (handle_qxfer_auxv, handle_qxfer_libraries)
3491 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3492 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3493 (handle_query): Check if there's a thread selected instead of
3494 checking whether there's any thread in the thread list.
3495 (handle_qxfer_threads, handle_qxfer_btrace)
3496 (handle_qxfer_btrace_conf): Don't error out early if there's no
3497 thread in the thread list.
3498 (handle_v_cont, myresume): Don't set the current thread to the
3500 (process_serial_event) <Hg handling>: Also set thread_id if the
3501 previous general thread is still alive.
3502 (process_serial_event) <g/G handling>: If setting the current
3503 thread to the general thread fails, error out.
3504 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3505 thread's lwp instead of the current thread's.
3506 * target.c (set_desired_thread): If the desired thread was not
3507 found, leave the current thread pointing to NULL. Return an int
3508 (boolean) indicating success.
3509 * target.h (set_desired_thread): Change return type to int.
3511 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3513 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3514 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3516 (ps_get_thread_area): New function.
3518 2015-08-19 Gary Benson <gbenson@redhat.com>
3520 * hostio.c (handle_pread): Do not attempt to read more data
3521 than hostio_reply_with_data can fit in a packet.
3523 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3525 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3527 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3529 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3531 2015-08-06 Pedro Alves <palves@redhat.com>
3533 * tracepoint.c (expr_eval_result): Now an int.
3535 2015-08-06 Pedro Alves <palves@redhat.com>
3537 * gdbthread.h (struct regcache): Forward declare.
3538 (struct thread_info) <regcache_data>: Now a struct regcache
3540 * inferiors.c (inferior_regcache_data)
3541 (set_inferior_regcache_data): Now work with struct regcache
3543 * inferiors.h (struct regcache): Forward declare.
3544 (inferior_regcache_data, set_inferior_regcache_data): Now work
3545 with struct regcache pointers.
3546 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3547 (free_register_cache_thread): Remove struct regcache pointer
3550 2015-08-06 Pedro Alves <palves@redhat.com>
3552 * server.c (captured_main): On error, print the exception message
3553 to stderr, and if run_once is set, throw a quit.
3555 2015-08-06 Pedro Alves <palves@redhat.com>
3557 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3560 2015-08-06 Pedro Alves <palves@redhat.com>
3562 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3563 reading beyond the passed in buffer length.
3565 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3567 * tracepoint.c (symbol_list) <required>: Remove.
3569 2015-08-06 Pedro Alves <palves@redhat.com>
3571 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3572 count if stopping and suspending threads.
3573 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3574 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3575 (linux_detach): Complete an ongoing step-over.
3576 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3578 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3579 (linux_wait_1): If passing a signal to the inferior after
3580 finishing a step-over, unsuspend and re-resume all lwps. If we
3581 see a single-step event but the thread should be continuing, don't
3582 pass the trap to gdb.
3583 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3584 internal_error instead of gdb_assert.
3585 (enqueue_pending_signal): New function.
3586 (check_ptrace_stopped_lwp_gone): Add debug output.
3587 (start_step_over): Use internal_error instead of gdb_assert.
3588 (complete_ongoing_step_over): New function.
3589 (linux_resume_one_thread): Don't resume a suspended thread.
3590 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3593 2015-08-06 Pedro Alves <palves@redhat.com>
3595 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3596 (linux_thread_alive): Use lwp_is_marked_dead.
3597 (extended_event_reported): Delete.
3598 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3599 instead of extended_event_reported.
3600 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3602 (lwp_is_marked_dead): New function.
3603 (lwp_running): Use lwp_is_marked_dead.
3604 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3607 2015-08-06 Pedro Alves <palves@redhat.com>
3609 * linux-low.c (linux_wait_1): Move fork event output out of the
3610 !report_to_gdb check. Pass event_child->waitstatus to
3611 target_waitstatus_to_string instead of ourstatus.
3613 2015-08-04 Yao Qi <yao.qi@linaro.org>
3615 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3616 if current_thread is 32 bit.
3618 2015-08-04 Yao Qi <yao.qi@linaro.org>
3620 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3621 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3622 * server.c (extended_protocol): Remove "static".
3623 * server.h (extended_protocol): Declare it.
3625 2015-08-04 Yao Qi <yao.qi@linaro.org>
3627 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3628 both aarch64 and aarch32.
3629 (aarch64_set_pc): Likewise.
3631 2015-08-04 Yao Qi <yao.qi@linaro.org>
3633 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3634 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3635 arm-with-neon.xml to srv_xmlfiles.
3636 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3637 (is_64bit_tdesc): New function.
3638 (aarch64_linux_read_description): New function.
3639 (aarch64_arch_setup): Call aarch64_linux_read_description.
3640 (regs_info): Rename to regs_info_aarch64.
3641 (aarch64_regs_info): Return right regs_info.
3642 (initialize_low_arch): Call initialize_low_arch_aarch32.
3644 2015-08-04 Yao Qi <yao.qi@linaro.org>
3646 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3647 * linux-aarch32-low.c: New file.
3648 * linux-aarch32-low.h: New file.
3649 * linux-arm-low.c (arm_fill_gregset): Move it to
3650 linux-aarch32-low.c.
3651 (arm_store_gregset): Likewise.
3652 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3653 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3654 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3655 (regs_info): Rename to regs_info_arm.
3656 (arm_regs_info): Return regs_info_aarch32 if
3657 have_ptrace_getregset is 1 and target description is
3658 arm_with_neon or arm_with_vfpv3.
3659 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3660 Call initialize_low_arch_aarch32 instead.
3662 2015-08-04 Yao Qi <yao.qi@linaro.org>
3664 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3665 * linux-low.c: ... here.
3666 * linux-low.h (have_ptrace_getregset): Declare it.
3668 2015-08-04 Pedro Alves <palves@redhat.com>
3670 * thread-db.c (struct thread_db): Use new typedefs.
3671 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3673 (disable_thread_event_reporting): Cast result of dlsym to
3674 destination function pointer type.
3675 (thread_db_mourn): Use td_ta_delete_ftype.
3677 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3679 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3681 (CDX_BREAKPOINT): Define for R2.
3682 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3683 (the_low_target): Add comments.
3685 2015-07-30 Yao Qi <yao.qi@linaro.org>
3687 * linux-arm-low.c (arm_hwcap): Remove it.
3688 (arm_read_description): New local variable arm_hwcap. Don't
3689 set arm_hwcap to zero.
3691 2015-07-30 Yao Qi <yao.qi@linaro.org>
3693 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3694 Use regcache->tdesc instead.
3695 (arm_store_wmmxregset): Likewise.
3696 (arm_fill_vfpregset): Likewise.
3697 (arm_store_vfpregset): Likewise.
3699 2015-07-30 Yao Qi <yao.qi@linaro.org>
3701 * linux-arm-low.c: Include arch/arm.h.
3702 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3703 (arm_store_gregset): Likewise.
3705 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3707 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3708 ptrace's 4th parameter.
3710 2015-07-27 Yao Qi <yao.qi@linaro.org>
3712 * configure.srv (case aarch64*-*-linux*): Don't set
3715 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3717 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3719 * linux-arm-low.c: Likewise.
3720 * linux-cris-low.c: Likewise.
3721 * linux-crisv32-low.c: Likewise.
3722 * linux-low.c: Likewise.
3723 * linux-m68k-low.c: Likewise.
3724 * linux-mips-low.c: Likewise.
3725 * linux-nios2-low.c: Likewise.
3726 * linux-s390-low.c: Likewise.
3727 * linux-sparc-low.c: Likewise.
3728 * linux-tic6x-low.c: Likewise.
3729 * linux-tile-low.c: Likewise.
3730 * linux-x86-low.c: Likewise.
3732 2015-07-24 Pedro Alves <palves@redhat.com>
3734 * config.in: Regenerate.
3735 * configure: Regenerate.
3737 2015-07-24 Pedro Alves <palves@redhat.com>
3739 * acinclude.m4: Include ../ptrace.m4.
3740 * configure.ac: Call GDB_AC_PTRACE.
3741 * config.in, configure: Regenerate.
3743 2015-07-24 Yao Qi <yao.qi@linaro.org>
3745 * linux-low.c (linux_create_inferior): Remove setting to
3746 proc->priv->new_inferior.
3747 (linux_attach): Likewise.
3748 (linux_low_filter_event): Likewise.
3749 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3751 2015-07-24 Yao Qi <yao.qi@linaro.org>
3753 * linux-low.c (linux_arch_setup): New function.
3754 (linux_low_filter_event): If proc->tdesc is NULL and
3755 proc->attached is true, call the_low_target.arch_setup.
3756 Otherwise, keep status pending, and return.
3757 (linux_resume_one_lwp_throw): Don't call get_pc if
3758 thread->while_stepping isn't NULL. Don't call
3759 get_thread_regcache if proc->tdesc is NULL.
3760 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3761 (linux_target_ops): Install arch_setup.
3762 * server.c (start_inferior): Call the_target->arch_setup.
3763 * target.h (struct target_ops) <arch_setup>: New field.
3764 (target_arch_setup): New marco.
3765 * lynx-low.c (lynx_target_ops): Update.
3766 * nto-low.c (nto_target_ops): Update.
3767 * spu-low.c (spu_target_ops): Update.
3768 * win32-low.c (win32_target_ops): Update.
3770 2015-07-24 Yao Qi <yao.qi@linaro.org>
3772 * linux-low.c (linux_add_process): Don't set
3773 proc->priv->new_inferior.
3774 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3775 (linux_attach): Likewise.
3777 2015-07-24 Yao Qi <yao.qi@linaro.org>
3779 * server.c (start_inferior): Code refactor.
3781 2015-07-24 Yao Qi <yao.qi@linaro.org>
3783 * server.c (process_serial_event): Set general_thread.
3785 2015-07-21 Yao Qi <yao.qi@linaro.org>
3787 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3788 aarch64_linux_get_debug_reg_capacity.
3790 2015-07-17 Yao Qi <yao.qi@linaro.org>
3792 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3793 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3794 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3795 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3796 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3797 (AARCH64_HWP_ALIGNMENT): Likewise.
3798 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3799 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3800 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3801 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3802 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3803 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3804 (struct aarch64_debug_reg_state): Likewise.
3805 (struct arch_lwp_info): Likewise.
3806 (aarch64_align_watchpoint): Likewise.
3807 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3808 (aarch64_watchpoint_length): Likewise.
3809 (aarch64_point_encode_ctrl_reg): Likewise
3810 (aarch64_point_is_aligned): Likewise.
3811 (aarch64_align_watchpoint): Likewise.
3812 (aarch64_linux_set_debug_regs):
3813 (aarch64_dr_state_insert_one_point): Likewise.
3814 (aarch64_dr_state_remove_one_point): Likewise.
3815 (aarch64_handle_breakpoint): Likewise.
3816 (aarch64_handle_aligned_watchpoint): Likewise.
3817 (aarch64_handle_unaligned_watchpoint): Likewise.
3818 (aarch64_handle_watchpoint): Likewise.
3820 2015-07-17 Yao Qi <yao.qi@linaro.org>
3822 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3823 and don't aarch64_get_debug_reg_state. All callers update.
3824 (aarch64_handle_aligned_watchpoint): Likewise.
3825 (aarch64_handle_unaligned_watchpoint): Likewise.
3826 (aarch64_handle_watchpoint): Likewise.
3827 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3828 (aarch64_remove_point): Likewise.
3830 2015-07-17 Yao Qi <yao.qi@linaro.org>
3832 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3834 (aarch64_handle_unaligned_watchpoint): Likewise.
3836 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3838 Revert the previous 3 commits:
3839 Move gdb_regex* to common/
3840 Move linux_find_memory_regions_full & co.
3841 gdbserver build-id attribute generator
3843 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3844 Jan Kratochvil <jan.kratochvil@redhat.com>
3846 gdbserver build-id attribute generator.
3847 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3848 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3849 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3851 (get_dynamic): Use find_pdhr to traverse program headers.
3852 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3853 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3854 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3855 (get_hex_build_id): New.
3856 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3857 to reply XML document.
3859 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3860 Jan Kratochvil <jan.kratochvil@redhat.com>
3862 * target.c: Include target/target-utils.h and fcntl.h.
3863 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3864 (target_fileio_read_stralloc): New functions.
3866 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3868 * Makefile.in (OBS): Add gdb_regex.o.
3870 * config.in: Rebuilt.
3871 * configure: Rebuilt.
3873 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3874 Jan Kratochvil <jan.kratochvil@redhat.com>
3876 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3877 * Makefile.in (OBS): Add target-utils.o.
3878 (linux-maps.o, target-utils.o): New.
3879 * configure.srv (srv_linux_obj): Add linux-maps.o.
3881 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3883 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3885 (the_low_target): Install it.
3887 2015-07-14 Pedro Alves <palves@redhat.com>
3889 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3890 Instead, ignore ECHILD, and throw an error for other errnos.
3892 2015-07-10 Pedro Alves <palves@redhat.com>
3894 * event-loop.c (struct callback_event) <data>: Change type to
3895 gdb_client_data instance instead of gdb_client_data pointer.
3896 (append_callback_event): Adjust.
3898 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3900 * linux-aarch64-low.c: Add comments for each linux_target_ops
3901 method. Remove comments already covered in target_ops and
3902 linux_target_ops definitions.
3903 (the_low_target): Add comments for each unimplemented method.
3905 2015-07-09 Yao Qi <yao.qi@linaro.org>
3907 * linux-aarch64-low.c (aarch64_regmap): Remove.
3908 (aarch64_usrregs_info): Remove.
3909 (regs_info): Set field usrregs to NULL.
3911 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3913 * linux-low.c: Include "rsp-low.h"
3914 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3915 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3916 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3917 (handle_btrace_enable_pt): New.
3918 (handle_btrace_general_set): Support "pt".
3919 (handle_btrace_conf_general_set): Support "pt:size".
3921 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3923 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3926 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3928 * linux-aarch64-low.c: Remove comment about endianness.
3929 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3930 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3933 2015-06-24 Gary Benson <gbenson@redhat.com>
3935 * linux-i386-ipa.c (stdint.h): Do not include.
3936 * lynx-i386-low.c (stdint.h): Likewise.
3937 * lynx-ppc-low.c (stdint.h): Likewise.
3938 * mem-break.c (stdint.h): Likewise.
3939 * thread-db.c (stdint.h): Likewise.
3940 * tracepoint.c (stdint.h): Likewise.
3941 * win32-low.c (stdint.h): Likewise.
3943 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3945 * server.c (write_qxfer_response): Update call to
3946 remote_escape_output.
3948 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3949 Jan Kratochvil <jan.kratochvil@redhat.com>
3951 Merge multiple hex conversions.
3952 * gdbreplay.c (tohex): Rename to 'fromhex'.
3953 (logchar): Use fromhex.
3955 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3957 * server.c (handle_qxfer_libraries): Set `version' attribute for
3960 2015-06-10 Gary Benson <gbenson@redhat.com>
3962 * target.h (struct target_ops) <multifs_open>: New field.
3963 <multifs_unlink>: Likewise.
3964 <multifs_readlink>: Likewise.
3965 * linux-low.c (nat/linux-namespaces.h): New include.
3966 (linux_target_ops): Initialize the_target->multifs_open,
3967 the_target->multifs_unlink and the_target->multifs_readlink.
3968 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3969 * hostio.c (hostio_fs_pid): New static variable.
3970 (hostio_handle_new_gdb_connection): New function.
3971 (handle_setfs): Likewise.
3972 (handle_open): Use the_target->multifs_open as appropriate.
3973 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3974 (handle_readlink): Use the_target->multifs_readlink as
3976 (handle_vFile): Handle vFile:setfs packets.
3977 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3978 after target_handle_new_gdb_connection.
3980 2015-06-10 Gary Benson <gbenson@redhat.com>
3982 * configure.ac (AC_CHECK_FUNCS): Add setns.
3983 * config.in: Regenerate.
3984 * configure: Likewise.
3985 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3986 (linux-namespaces.o): New rule.
3987 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3989 2015-06-09 Gary Benson <gbenson@redhat.com>
3991 * hostio.c (handle_open): Process mode argument with
3992 fileio_to_host_mode.
3994 2015-06-01 Yao Qi <yao.qi@linaro.org>
3996 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3997 * linux-x86-low.c: Likewise.
3999 2015-05-28 Don Breazeal <donb@codesourcery.com>
4001 * linux-low.c (handle_extended_wait): Initialize
4002 thread_info.last_resume_kind for new fork children.
4004 2015-05-15 Pedro Alves <palves@redhat.com>
4006 * target.h (target_handle_new_gdb_connection): Rewrite using if
4007 wrapped in do/while.
4009 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4011 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4012 * configure, config.in: Regenerate.
4013 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4016 2015-05-12 Don Breazeal <donb@codesourcery.com>
4018 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4019 PTRACE_EVENT_VFORK_DONE.
4020 (linux_low_ptrace_options, extended_event_reported): Add vfork
4022 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4023 and "vforkdone" for RSP 'T' Stop Reply Packet.
4024 * server.h (report_vfork_events): Declare
4027 2015-05-12 Don Breazeal <donb@codesourcery.com>
4029 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4030 (the_low_target) <new_fork>: Initialize new member.
4031 * linux-arm-low.c (arm_new_fork): New function.
4032 (the_low_target) <new_fork>: Initialize new member.
4033 * linux-low.c (handle_extended_wait): Call new target function
4035 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4036 * linux-mips-low.c (mips_add_watchpoint): New function
4037 extracted from mips_insert_point.
4038 (the_low_target) <new_fork>: Initialize new member.
4039 (mips_linux_new_fork): New function.
4040 (mips_insert_point): Call mips_add_watchpoint.
4041 * linux-x86-low.c (x86_linux_new_fork): New function.
4042 (the_low_target) <new_fork>: Initialize new member.
4044 2015-05-12 Don Breazeal <donb@codesourcery.com>
4046 * linux-low.c (handle_extended_wait): Implement return value,
4047 rename argument 'event_child' to 'event_lwp', handle
4048 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4049 (linux_low_ptrace_options): New function.
4050 (linux_low_filter_event): Call linux_low_ptrace_options,
4051 use different argument fo linux_enable_event_reporting,
4052 use return value from handle_extended_wait.
4053 (extended_event_reported): New function.
4054 (linux_wait_1): Call extended_event_reported and set
4055 status to report fork events.
4056 (linux_write_memory): Add pid to debug message.
4057 (reset_lwp_ptrace_options_callback): New function.
4058 (linux_handle_new_gdb_connection): New function.
4059 (linux_target_ops): Initialize new structure member.
4060 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4061 * lynx-low.c: Initialize new structure member.
4062 * remote-utils.c (prepare_resume_reply): Implement stop reason
4063 "fork" for "T" stop message.
4064 * server.c (handle_query): Call handle_new_gdb_connection.
4065 * server.h (report_fork_events): Declare global flag.
4066 * target.h (struct target_ops) <handle_new_gdb_connection>:
4068 (target_handle_new_gdb_connection): New macro.
4069 * win32-low.c: Initialize new structure member.
4071 2015-05-12 Don Breazeal <donb@codesourcery.com>
4073 * mem-break.c (APPEND_TO_LIST): Define macro.
4074 (clone_agent_expr): New function.
4075 (clone_one_breakpoint): New function.
4076 (clone_all_breakpoints): New function.
4077 * mem-break.h: Declare new functions.
4079 2015-05-12 Don Breazeal <donb@codesourcery.com>
4081 * linux-low.c (linux_supports_fork_events): New function.
4082 (linux_supports_vfork_events): New function.
4083 (linux_target_ops): Initialize new structure members.
4084 (initialize_low): Call linux_check_ptrace_features.
4085 * lynx-low.c (lynx_target_ops): Initialize new structure
4087 * server.c (report_fork_events, report_vfork_events):
4089 (handle_query): Add new features to qSupported packet and
4091 (captured_main): Initialize new global variables.
4092 * target.h (struct target_ops) <supports_fork_events>:
4094 <supports_vfork_events>: New member.
4095 (target_supports_fork_events): New macro.
4096 (target_supports_vfork_events): New macro.
4097 * win32-low.c (win32_target_ops): Initialize new structure
4100 2015-05-12 Gary Benson <gbenson@redhat.com>
4102 * server.c (handle_qxfer_exec_file): Use current process
4105 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4107 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4108 Remove HAVE_PTRACE_GETREGS conditionals.
4109 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4110 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4112 2015-05-08 Yao Qi <yao.qi@linaro.org>
4114 * linux-low.c (linux_supports_conditional_breakpoints): New
4116 (linux_target_ops): Install new target method.
4117 * lynx-low.c (lynx_target_ops): Install NULL hook for
4118 supports_conditional_breakpoints.
4119 * nto-low.c (nto_target_ops): Likewise.
4120 * spu-low.c (spu_target_ops): Likewise.
4121 * win32-low.c (win32_target_ops): Likewise.
4122 * server.c (handle_query): Check
4123 target_supports_conditional_breakpoints.
4124 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4126 (target_supports_conditional_breakpoints): New macro.
4128 2015-05-06 Pedro Alves <palves@redhat.com>
4131 * server.c (start_inferior): If the process exits, mourn it.
4133 2015-04-21 Gary Benson <gbenson@redhat.com>
4135 * hostio.c (fileio_open_flags_to_host): Factored out to
4136 fileio_to_host_openflags in common/fileio.c. Single use
4139 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4141 * linux-xtensa-low.c (xtensa_fill_gregset)
4142 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4145 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4147 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4148 (regs_info): Replace usrregs pointer with NULL.
4150 2015-04-17 Gary Benson <gbenson@redhat.com>
4152 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4153 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4154 * server.c (handle_qxfer_exec_file): New function.
4155 (qxfer_packets): Add exec-file entry.
4156 (handle_query): Report qXfer:exec-file:read as supported packet.
4158 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4160 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4162 2015-04-09 Gary Benson <gbenson@redhat.com>
4164 * hostio-errno.c (errno_to_fileio_error): Remove function.
4165 Update caller to use remote_fileio_to_fio_error.
4167 2015-04-09 Yao Qi <yao.qi@linaro.org>
4169 * linux-low.c (linux_insert_point): Call
4170 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4171 (linux_remove_point): Call remove_memory_breakpoint if type is
4173 * linux-x86-low.c (x86_insert_point): Don't call
4174 insert_memory_breakpoint.
4175 (x86_remove_point): Don't call remove_memory_breakpoint.
4177 2015-04-01 Pedro Alves <palves@redhat.com>
4178 Cleber Rosa <crosa@redhat.com>
4180 * server.c (gdbserver_usage): Reorganize and extend the usage
4183 2015-03-24 Pedro Alves <palves@redhat.com>
4185 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4186 output. Also dump TRAP_TRACE.
4187 (linux_low_filter_event): In debug output, distinguish a
4188 resume_stop SIGSTOP from a delayed SIGSTOP.
4190 2015-03-24 Gary Benson <gbenson@redhat.com>
4192 * linux-x86-low.c (x86_linux_new_thread): Moved to
4194 (x86_linux_prepare_to_resume): Likewise.
4196 2015-03-24 Gary Benson <gbenson@redhat.com>
4198 * Makefile.in (x86-linux-dregs.o): New rule.
4199 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4200 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4201 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4202 (x86_linux_dr_get): Likewise.
4203 (x86_linux_dr_set): Likewise.
4204 (update_debug_registers_callback): Likewise.
4205 (x86_linux_dr_set_addr): Likewise.
4206 (x86_linux_dr_get_addr): Likewise.
4207 (x86_linux_dr_set_control): Likewise.
4208 (x86_linux_dr_get_control): Likewise.
4209 (x86_linux_dr_get_status): Likewise.
4210 (x86_linux_update_debug_registers): Likewise.
4212 2015-03-24 Gary Benson <gbenson@redhat.com>
4214 * linux-x86-low.c (x86_linux_update_debug_registers):
4215 New function, factored out from...
4216 (x86_linux_prepare_to_resume): ...this.
4218 2015-03-24 Gary Benson <gbenson@redhat.com>
4220 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4221 (x86_linux_dr_set): Likewise.
4222 (update_debug_registers_callback): Likewise.
4223 (x86_linux_dr_set_addr): Likewise.
4224 (x86_linux_dr_get_addr): Likewise.
4225 (x86_linux_dr_set_control): Likewise.
4226 (x86_linux_dr_get_control): Likewise.
4227 (x86_linux_dr_get_status): Likewise.
4228 (x86_linux_prepare_to_resume): Likewise.
4230 2015-03-24 Gary Benson <gbenson@redhat.com>
4232 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4233 Use perror_with_name. Pass string through gettext.
4234 (x86_linux_dr_set): Likewise.
4236 2015-03-24 Gary Benson <gbenson@redhat.com>
4238 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4239 (x86_linux_dr_set_addr): ...this.
4240 (x86_dr_low_get_addr): Rename to...
4241 (x86_linux_dr_get_addr): ...this.
4242 (x86_dr_low_set_control): Rename to...
4243 (x86_linux_dr_set_control): ...this.
4244 (x86_dr_low_get_control): Rename to...
4245 (x86_linux_dr_get_control): ...this.
4246 (x86_dr_low_get_status): Rename to...
4247 (x86_linux_dr_get_status): ...this.
4248 (x86_dr_low): Update with new function names.
4250 2015-03-24 Gary Benson <gbenson@redhat.com>
4252 * Makefile.in (x86-linux.o): New rule.
4253 * configure.srv: Add x86-linux.o to relevant targets.
4254 * linux-low.c (lwp_set_arch_private_info): New function.
4255 (lwp_arch_private_info): Likewise.
4256 * linux-x86-low.c: Include nat/x86-linux.h.
4257 (arch_lwp_info): Removed structure.
4258 (update_debug_registers_callback):
4259 Use lwp_set_debug_registers_changed.
4260 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4261 and lwp_set_debug_registers_changed.
4262 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4264 2015-03-24 Gary Benson <gbenson@redhat.com>
4266 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4267 * linux-arm-low.c (arm_new_thread): Likewise.
4268 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4269 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4270 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4271 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4273 2015-03-24 Gary Benson <gbenson@redhat.com>
4275 * linux-low.c (ptid_of_lwp): New function.
4276 (lwp_is_stopped): Likewise.
4277 (lwp_stop_reason): Likewise.
4278 * linux-x86-low.c (update_debug_registers_callback):
4280 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4283 2015-03-24 Gary Benson <gbenson@redhat.com>
4285 * linux-low.h (linux_stop_lwp): Remove declaration.
4287 2015-03-24 Gary Benson <gbenson@redhat.com>
4289 * linux-low.h: Include nat/linux-nat.h.
4290 * linux-low.c (iterate_over_lwps_args): New structure.
4291 (iterate_over_lwps_filter): New function.
4292 (iterate_over_lwps): Likewise.
4293 * linux-x86-low.c (update_debug_registers_callback):
4294 Update signature to what iterate_over_lwps expects.
4295 Remove PID check that iterate_over_lwps now performs.
4296 (x86_dr_low_set_addr): Use iterate_over_lwps.
4297 (x86_dr_low_set_control): Likewise.
4299 2015-03-24 Gary Benson <gbenson@redhat.com>
4301 * linux-x86-low.c (x86_debug_reg_state): New function.
4302 (x86_linux_prepare_to_resume): Use the above.
4304 2015-03-24 Gary Benson <gbenson@redhat.com>
4306 * linux-low.c (current_lwp_ptid): New function.
4307 * linux-x86-low.c: Include nat/linux-nat.h.
4308 (x86_dr_low_get_addr): Use current_lwp_ptid.
4309 (x86_dr_low_get_control): Likewise.
4310 (x86_dr_low_get_status): Likewise.
4312 2015-03-20 Pedro Alves <palves@redhat.com>
4314 * tracepoint.c (cmd_qtstatus): Make "str" const.
4316 2015-03-20 Pedro Alves <palves@redhat.com>
4318 * server.c (handle_general_set): Make "req_str" const.
4320 2015-03-19 Pedro Alves <palves@redhat.com>
4322 * linux-low.c (linux_resume_one_lwp): Rename to ...
4323 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4324 instead call perror_with_name.
4325 (check_ptrace_stopped_lwp_gone): New function.
4326 (linux_resume_one_lwp): Reimplement as wrapper around
4327 linux_resume_one_lwp_throw that swallows errors if the LWP is
4330 2015-03-19 Pedro Alves <palves@redhat.com>
4332 * linux-low.c (count_events_callback, select_event_lwp_callback):
4333 No longer check whether the thread has resume_stop as last resume
4336 2015-03-19 Pedro Alves <palves@redhat.com>
4338 * linux-low.c (count_events_callback, select_event_lwp_callback):
4339 Use the lwp's status_pending_p field, not the thread's.
4341 2015-03-19 Pedro Alves <palves@redhat.com>
4343 * linux-low.c (select_event_lwp_callback): Update comments to
4344 no longer mention SIGTRAP.
4346 2015-03-18 Gary Benson <gbenson@redhat.com>
4348 * server.c (handle_query): Do not report vFile:fstat as supported.
4350 2015-03-11 Gary Benson <gbenson@redhat.com>
4352 * hostio.c (sys/types.h): New include.
4353 (sys/stat.h): Likewise.
4354 (common-remote-fileio.h): Likewise.
4355 (handle_fstat): New function.
4356 (handle_vFile): Handle vFile:fstat packets.
4358 2015-03-11 Gary Benson <gbenson@redhat.com>
4360 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4361 struct stat.st_blocks and struct stat.st_blksize.
4362 * configure: Regenerate.
4363 * config.in: Likewise.
4364 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4365 (OBS): Add common-remote-fileio.o.
4366 (common-remote-fileio.o): New rule.
4368 2015-03-09 Pedro Alves <palves@redhat.com>
4370 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4371 'struct sockaddr' pointer in 'accept' call.
4373 2015-03-09 Pedro Alves <palves@redhat.com>
4376 2015-03-07 Pedro Alves <palves@redhat.com>
4377 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4378 or <winsock2.h> here. Instead include "gdb_socket.h".
4379 (remote_open): Use union gdb_sockaddr_u.
4380 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4381 or <winsock2.h> here. Instead include "gdb_socket.h".
4382 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4383 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4385 (init_named_socket, gdb_agent_helper_thread): Use union
4388 2015-03-07 Pedro Alves <palves@redhat.com>
4390 * configure.ac (build_warnings): Move
4391 -Wdeclaration-after-statement to the C-specific set.
4392 * configure: Regenerate.
4394 2015-03-07 Pedro Alves <palves@redhat.com>
4396 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4397 or <winsock2.h> here. Instead include "gdb_socket.h".
4398 (remote_open): Use union gdb_sockaddr_u.
4399 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4400 or <winsock2.h> here. Instead include "gdb_socket.h".
4401 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4402 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4404 (init_named_socket, gdb_agent_helper_thread): Use union
4407 2015-03-07 Pedro Alves <palves@redhat.com>
4409 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4412 2015-03-06 Yao Qi <yao.qi@linaro.org>
4414 * linux-aarch64-low.c (aarch64_insert_point): Use
4415 show_debug_regs as a boolean.
4416 (aarch64_remove_point): Likewise.
4418 2015-03-05 Pedro Alves <palves@redhat.com>
4420 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4421 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4422 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4423 * nto-low.c (nto_target_ops): Likewise.
4424 * spu-low.c (spu_target_ops): Likewise.
4425 * win32-low.c (win32_target_ops): Likewise.
4427 2015-03-04 Pedro Alves <palves@redhat.com>
4429 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4430 Decide whether a breakpoint triggered based on the SIGTRAP's
4432 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4433 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4434 (linux_low_filter_event): Check for breakpoints before checking
4436 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4438 (linux_stopped_by_sw_breakpoint)
4439 (linux_supports_stopped_by_sw_breakpoint)
4440 (linux_stopped_by_hw_breakpoint)
4441 (linux_supports_stopped_by_hw_breakpoint): New functions.
4442 (linux_target_ops): Install new target methods.
4444 2015-03-04 Pedro Alves <palves@redhat.com>
4446 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4447 * server.c (swbreak_feature, hwbreak_feature): New globals.
4448 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4449 (captured_main): Clear swbreak_feature and hwbreak_feature.
4450 * server.h (swbreak_feature, hwbreak_feature): Declare.
4451 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4452 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4453 supports_stopped_by_hw_breakpoint>: New fields.
4454 (target_supports_stopped_by_sw_breakpoint)
4455 (target_stopped_by_sw_breakpoint)
4456 (target_supports_stopped_by_hw_breakpoint)
4457 (target_stopped_by_hw_breakpoint): Declare.
4459 2015-03-04 Pedro Alves <palves@redhat.com>
4461 enum lwp_stop_reason -> enum target_stop_reason
4462 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4463 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4464 (linux_wait_1, stuck_in_jump_pad_callback)
4465 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4466 (linux_stopped_by_watchpoint):
4467 * linux-low.h (enum lwp_stop_reason): Delete.
4468 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4469 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4471 2015-03-04 Yao Qi <yao.qi@linaro.org>
4473 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4475 2015-03-03 Gary Benson <gbenson@redhat.com>
4477 * hostio.c (handle_vFile): Fix prefix lengths.
4479 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4481 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4484 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4486 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4487 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4488 (clean): Add "rm -f" for above C files.
4489 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4490 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4491 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4492 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4493 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4494 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4495 (init_registers_s390x_vx_linux64)
4496 (init_registers_s390x_tevx_linux64)
4497 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4498 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4500 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4501 (s390_store_vxrs_high): New functions.
4502 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4504 (s390_arch_setup): Add logic for selecting one of the new target
4505 descriptions. Activate the new vector regsets if applicable.
4506 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4507 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4508 and init_registers_s390x_tevx_linux64.
4510 2015-03-01 Pedro Alves <palves@redhat.com>
4512 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4515 2015-02-27 Pedro Alves <palves@redhat.com>
4517 * linux-x86-low.c (u_debugreg_offset): New function.
4518 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4520 2015-02-27 Pedro Alves <palves@redhat.com>
4522 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4523 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4524 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4525 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4526 (ps_lsetfpregs, ps_getpid)
4527 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4528 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4529 (ps_lsetxregs, ps_plog): Declare.
4531 2015-02-27 Pedro Alves <palves@redhat.com>
4533 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4534 IP_AGENT_EXPORT_FUNC.
4535 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4536 IP_AGENT_EXPORT_FUNC.
4537 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4538 (IP_AGENT_EXPORT): Delete.
4539 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4540 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4541 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4542 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4543 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4544 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4545 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4546 (traceframe_read_count, traceframe_write_count)
4547 (traceframes_created, trace_state_variables, get_raw_reg)
4548 (get_trace_state_variable_value, set_trace_state_variable_value)
4549 (ust_loaded, helper_thread_id, cmd_buf): Use
4550 IPA_SYM_EXPORTED_NAME.
4551 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4552 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4553 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4554 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4555 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4556 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4557 EXTERN_C_PUSH/EXTERN_C_POP.
4558 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4559 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4560 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4561 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4562 (traceframe_write_count, traceframe_read_count)
4563 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4564 (about_to_request_buffer_space, get_trace_state_variable_value)
4565 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4566 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4567 EXTERN_C_PUSH/EXTERN_C_POP.
4568 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4569 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4570 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4571 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4572 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4573 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4574 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4575 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4577 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4578 (IP_AGENT_EXPORT_VAR_DECL): Define.
4580 (gdb_agent_get_raw_reg): Declare.
4582 2015-02-27 Tom Tromey <tromey@redhat.com>
4583 Pedro Alves <palves@redhat.com>
4585 Rename symbols whose names are reserved C++ keywords throughout.
4587 2015-02-27 Pedro Alves <palves@redhat.com>
4589 * Makefile.in (COMPILER): New, get it from autoconf.
4590 (CXX): Get from autoconf instead.
4591 (COMPILE.pre): Use COMPILER.
4592 (CC-LD): Rename to ...
4593 (CC_LD): ... this. Use COMPILER.
4594 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4595 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4596 * acinclude.m4: Include build-with-cxx.m4.
4597 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4598 Disable -Werror by default if building in C++ mode.
4599 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4600 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4601 the C++ compiler. Save/restore CXXFLAGS too.
4602 * configure: Regenerate.
4604 2015-02-27 Pedro Alves <palves@redhat.com>
4606 * acinclude.m4: Include libiberty.m4.
4607 * configure.ac: Call libiberty_INIT.
4608 * config.in, configure: Regenerate.
4610 2015-02-26 Pedro Alves <palves@redhat.com>
4612 * linux-low.c (linux_wait_1): When incrementing the PC past a
4613 program breakpoint always use the_low_target.breakpoint_len as
4614 increment, rather than the maximum between that and
4615 the_low_target.decr_pc_after_break.
4617 2015-02-23 Pedro Alves <palves@redhat.com>
4619 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4620 thread was doing a step-over; always adjust the PC if
4621 we stepped over a permanent breakpoint.
4622 (linux_wait_1): If we stepped over breakpoint that was on top of a
4623 permanent breakpoint, manually advance the PC past it.
4625 2015-02-23 Pedro Alves <palves@redhat.com>
4627 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4629 (x86_fill_gregset, x86_store_gregset): Use it when handling
4632 2015-02-20 Pedro Alves <palves@redhat.com>
4634 * thread-db.c: Include "nat/linux-procfs.h".
4635 (thread_db_init): Skip listing new threads if the kernel supports
4636 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4638 2015-02-20 Pedro Alves <palves@redhat.com>
4640 * linux-low.c (status_pending_p_callback): Use ptid_match.
4642 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4644 PR breakpoints/16812
4645 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4646 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4647 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4649 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4651 PR breakpoints/15956
4652 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4654 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4656 * linux-low.c (linux_low_btrace_conf): Print size.
4657 * server.c (handle_btrace_conf_general_set): New.
4658 (hanle_general_set): Call handle_btrace_conf_general_set.
4659 (handle_query): Report Qbtrace-conf:bts:size as supported.
4661 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4663 * linux-low.c (linux_low_enable_btrace): Update parameters.
4664 (linux_low_btrace_conf): New.
4665 (linux_target_ops)<to_btrace_conf>: Initialize.
4666 * server.c (current_btrace_conf): New.
4667 (handle_btrace_enable): Rename to ...
4668 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4669 to target_enable_btrace. Update comment. Update users.
4670 (handle_qxfer_btrace_conf): New.
4671 (qxfer_packets): Add btrace-conf entry.
4672 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4673 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4674 (target_ops)<read_btrace_conf>: New.
4675 (target_enable_btrace): Update parameters.
4676 (target_read_btrace_conf): New.
4678 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4680 * server.c (handle_btrace_general_set): Remove call to
4681 target_supports_btrace.
4682 (supported_btrace_packets): New.
4683 (handle_query): Call supported_btrace_packets.
4684 * target.h: include btrace-common.h.
4685 (btrace_target_info): Removed.
4686 (supports_btrace, target_supports_btrace): Update parameters.
4688 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4690 * Makefile.in (SFILES): Add common/btrace-common.c.
4691 (OBS): Add common/btrace-common.o.
4692 (btrace-common.o): Add build rules.
4693 * linux-low: Include btrace-common.h.
4694 (linux_low_read_btrace): Use struct btrace_data. Call
4695 btrace_data_init and btrace_data_fini.
4697 2015-02-06 Pedro Alves <palves@redhat.com>
4699 * thread-db.c (find_new_threads_callback): Add debug output.
4701 2015-02-04 Pedro Alves <palves@redhat.com>
4703 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4704 (resume_stopped_resumed_lwps): New function.
4705 (linux_wait_for_event_filtered): Use it.
4707 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4709 * Makefile.in (SFILES): Add linux-personality.c.
4710 (linux-personality.o): New rule.
4711 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4712 list of objects to be built.
4713 * linux-low.c: Include nat/linux-personality.h.
4714 (linux_create_inferior): Remove code to disable address space
4715 randomization (moved to ../nat/linux-personality.c). Create
4716 cleanup to disable address space randomization.
4718 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4720 * Makefile.in (posix-strerror.o): New rule.
4721 (mingw-strerror.o): Likewise.
4722 * configure: Regenerated.
4723 * configure.ac: Source file ../common/common.host. Initialize new
4724 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4726 2015-01-14 Yao Qi <yao@codesourcery.com>
4728 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4729 (ppc-linux.o): New rule.
4730 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4731 * configure.ac: AC_CHECK_FUNCS(getauxval).
4732 * config.in: Re-generated.
4733 * configure: Re-generated.
4734 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4735 ppc64_64bit_inferior_p
4737 2015-01-14 Yao Qi <yao@codesourcery.com>
4739 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4740 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4741 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4742 (PT_ORIG_R3, PT_TRAP): Likewise.
4743 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4744 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4745 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4747 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4749 * i387-fp.c (i387_cache_to_xsave): In look over
4750 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4751 zmmh_low_space field by use of zmmh_high_space.
4753 2015-01-09 Pedro Alves <palves@redhat.com>
4755 * linux-low.c (step_over_bkpt): Move higher up in the file.
4756 (handle_extended_wait): Don't store the stop_pc here.
4757 (get_stop_pc): Adjust comments and rename to ...
4758 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4759 stopped for a software breakpoint or hardware breakpoint.
4760 (thread_still_has_status_pending_p): New function.
4761 (status_pending_p_callback): Use
4762 thread_still_has_status_pending_p. If the event is no longer
4763 interesting, resume the LWP.
4764 (handle_tracepoints): Add assert.
4765 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4766 (wstatus_maybe_breakpoint): New function.
4767 (cancel_breakpoint): Delete function.
4768 (check_stopped_by_watchpoint): New function, factored out from
4769 linux_low_filter_event.
4770 (lp_status_maybe_breakpoint): Delete function.
4771 (linux_low_filter_event): Remove filter_ptid argument.
4772 Leave thread group exits pending here. Store the LWP's stop PC.
4773 Always leave events pending.
4774 (linux_wait_for_event_filtered): Pull all events out of the
4775 kernel, and leave them all pending.
4776 (count_events_callback, select_event_lwp_callback): Consider all
4778 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4779 (select_event_lwp): Only give preference to the stepping LWP in
4780 all-stop mode. Adjust comments.
4781 (ignore_event): New function.
4782 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4783 references to cancel_breakpoints. Adjust to renames. Also give
4784 equal priority to all LWPs that have had events in non-stop mode.
4785 If reporting a software breakpoint event, unadjust the LWP's PC.
4786 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4787 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4789 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4790 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4791 (linux_stopped_by_watchpoint): Adjust.
4792 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4793 * linux-low.h (enum lwp_stop_reason): New.
4794 (struct lwp_info) <stop_pc>: Adjust comment.
4795 <stopped_by_watchpoint>: Delete field.
4796 <stop_reason>: New field.
4797 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4798 * mem-break.c (software_breakpoint_inserted_here)
4799 (hardware_breakpoint_inserted_here): New function.
4800 * mem-break.h (software_breakpoint_inserted_here)
4801 (hardware_breakpoint_inserted_here): Declare.
4802 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4803 (cancel_breakpoints): Delete.
4804 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4805 (upload_fast_traceframes): Remove references to
4808 2015-01-09 Pedro Alves <palves@redhat.com>
4810 * thread-db.c (find_new_threads_callback): Ignore thread if the
4811 kernel thread ID is -1.
4813 2015-01-09 Pedro Alves <palves@redhat.com>
4815 * linux-low.c (linux_attach_fail_reason_string): Move to
4816 nat/linux-ptrace.c, and rename.
4817 (linux_attach_lwp): Update comment.
4818 (attach_proc_task_lwp_callback): New function.
4819 (linux_attach): Adjust to rename and use
4820 linux_proc_attach_tgid_threads.
4821 (linux_attach_fail_reason_string): Delete declaration.
4823 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4825 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4826 * server.c (gdbserver_version): Likewise.
4828 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4830 * remote-utils.c: Include ctype.h.
4831 (input_interrupt): Explicitly handle the case when the char
4832 received is the NUL byte. Improve the printing of non-ASCII
4835 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4837 * linux-low.c (linux_low_filter_event): Update call to
4838 linux_enable_event_reporting following the addition of
4839 a new parameter to that function.
4841 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4844 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4845 (AARCH64_FPCR_REGNO): Likewise.
4846 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4847 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4848 (aarch64_store_fpregset): Likewise.
4850 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4852 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4853 Remove FIXME comment about assumption about N.
4855 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4857 * configure.ac: If large-file support is disabled in GDBserver,
4858 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4859 * configure: Regenerate.
4861 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4863 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4864 warning upon ENODATA from ptrace.
4865 * linux-s390-low.c (s390_store_tdb): New.
4866 (s390_regsets): Add regset for NT_S390_TDB.
4868 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4870 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4871 without a fill_function.
4872 * linux-s390-low.c (s390_fill_last_break): Remove.
4873 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4874 (s390_arch_setup): Use regset's size instead of fill_function for
4877 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4879 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4880 the regset's store function when ptrace returned an error.
4881 * regcache.c (get_thread_regcache): Invalidate register cache
4882 before fetching inferior's registers.
4884 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4886 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4887 while-loop as for-loop.
4888 (regsets_store_inferior_registers): Likewise.
4890 2014-11-28 Yao Qi <yao@codesourcery.com>
4892 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4893 * config.in, configure: Re-generate.
4894 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4897 2014-11-21 Yao Qi <yao@codesourcery.com>
4899 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4900 (AC_CHECK_HEADERS): Remove malloc.h.
4901 * configure: Re-generated.
4902 * config.in: Re-generated.
4903 * server.h: Don't include alloca.h and malloc.h.
4904 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4905 Don't include malloc.h.
4907 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4909 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4910 corresponding ERRNO check in same block.
4912 2014-11-12 Pedro Alves <palves@redhat.com>
4914 * server.c (cont_thread): Update comment.
4915 (start_inferior, attach_inferior): No longer clear cont_thread.
4916 (handle_v_cont): No longer set cont_thread.
4917 (captured_main): Clear cont_thread each time a GDB connects.
4919 2014-11-12 Pedro Alves <palves@redhat.com>
4921 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4922 thread, and don't resume all threads if the Hc thread has exited.
4924 2014-11-12 Pedro Alves <palves@redhat.com>
4926 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4927 the process group instead of to a specific LWP.
4929 2014-10-15 Pedro Alves <palves@redhat.com>
4932 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4934 (arm_set_thread_context): Delete.
4935 (the_low_target): Adjust.
4936 * win32-i386-low.c (debug_registers_changed)
4937 (debug_registers_used): Delete.
4938 (update_debug_registers_callback): New function.
4939 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4940 needing to update their debug registers.
4941 (win32_get_current_dr): New function.
4942 (x86_dr_low_get_addr, x86_dr_low_get_control)
4943 (x86_dr_low_get_status): Fetch the debug register from the thread
4945 (i386_initial_stuff): Adjust.
4946 (i386_get_thread_context): Remove current_event parameter. Don't
4947 clear debug_registers_changed nor copy DR values to
4949 (i386_set_thread_context): Delete.
4950 (i386_prepare_to_resume): New function.
4951 (i386_thread_added): Mark the thread as needing to update irs
4953 (the_low_target): Remove i386_set_thread_context and install
4954 i386_prepare_to_resume.
4955 * win32-low.c (win32_get_thread_context): Adjust.
4956 (win32_set_thread_context): Use SetThreadContext
4958 (win32_prepare_to_resume): New function.
4959 (win32_require_context): New function, factored out from ...
4960 (thread_rec): ... this.
4961 (continue_one_thread): Call win32_prepare_to_resume on each thread
4962 we're about to continue.
4963 (win32_resume): Call win32_prepare_to_resume on the event thread.
4964 * win32-low.h (struct win32_thread_info)
4965 <debug_registers_changed>: New field.
4966 (struct win32_target_ops): Change prototype of set_thread_context,
4967 delete set_thread_context and add prepare_to_resume.
4968 (win32_require_context): New declaration.
4970 2014-10-08 Gary Benson <gbenson@redhat.com>
4972 * server.h: Do not include common-exceptions.h.
4974 2014-10-08 Gary Benson <gbenson@redhat.com>
4976 * server.h: Do not include cleanups.h.
4978 2014-09-30 James Hogan <james.hogan@imgtec.com>
4980 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4983 2014-09-23 Yao Qi <yao@codesourcery.com>
4985 * linux-low.c (lp_status_maybe_breakpoint): New function.
4986 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4987 (count_events_callback): Likewise.
4988 (select_event_lwp_callback): Likewise.
4989 (cancel_breakpoints_callback): Likewise.
4991 2014-09-19 Don Breazeal <donb@codesourcery.com>
4993 * linux-low.c (handle_extended_wait): Call
4994 linux_ptrace_get_extended_event.
4995 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4996 linux_is_extended_waitstatus.
4998 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5000 * Makefile.in (CPPFLAGS): Define.
5001 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5002 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5004 2014-09-16 Gary Benson <gbenson@redhat.com>
5006 * inferiors.h (current_inferior): Renamed as...
5007 (current_thread): New variable. All uses updated.
5008 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5009 (maybe_move_out_of_jump_pad): Likewise.
5010 (cancel_breakpoint): Likewise.
5011 (linux_low_filter_event): Likewise.
5012 (wait_for_sigstop): Likewise.
5013 (linux_resume_one_lwp): Likewise.
5014 (need_step_over_p): Likewise.
5015 (start_step_over): Likewise.
5016 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5017 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5018 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5019 and save_inferior as saved_thread.
5020 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5022 (regcache_invalidate_thread): Likewise.
5023 * remote-utils.c (prepare_resume_reply): Likewise.
5024 * thread-db.c (thread_db_get_tls_address): Likewise.
5025 (disable_thread_event_reporting): Likewise.
5026 (remove_thread_event_breakpoints): Likewise.
5027 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5029 * target.h (set_desired_inferior): Renamed as...
5030 (set_desired_thread): New declaration. All uses updated.
5031 * server.c (myresume): Updated comment to reference thread instead
5033 (handle_serial_event): Likewise.
5034 (handle_target_event): Likewise.
5036 2014-09-12 Tom Tromey <tromey@redhat.com>
5037 Gary Benson <gbenson@redhat.com>
5039 * regcache.h: Include common-regcache.h.
5040 (regcache_read_pc): Don't declare.
5041 * regcache.c (get_thread_regcache_for_ptid): New function.
5043 2014-09-11 Tom Tromey <tromey@redhat.com>
5044 Gary Benson <gbenson@redhat.com>
5046 * symbol.c: New file.
5047 * Makefile.in (SFILES): Add symbol.c.
5048 (OBS): Add symbol.o.
5050 2014-09-11 Gary Benson <gbenson@redhat.com>
5052 * target.c (target_stop_ptid, target_continue_ptid): New
5055 2014-09-11 Tom Tromey <tromey@redhat.com>
5056 Gary Benson <gbenson@redhat.com>
5058 * target.h: Include target/target.h.
5059 * target.c (target_read_memory, target_read_uint32)
5060 (target_write_memory): New functions.
5062 2014-09-11 Gary Benson <gbenson@redhat.com>
5064 * server.h (debug_hw_points): Don't declare.
5065 * server.c (debug_hw_points): Don't define. Replace all uses
5066 with show_debug_regs.
5067 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5068 all uses with show_debug_regs.
5070 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5072 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5073 endianness into account.
5074 (ppc_supply_ptrace_register): Likewise.
5076 2014-09-03 James Hogan <james.hogan@imgtec.com>
5078 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5079 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5081 2014-09-03 Gary Benson <gbenson@redhat.com>
5083 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5084 ALL_DEBUG_ADDRESS_REGISTERS.
5086 2014-09-02 Gary Benson <gbenson@redhat.com>
5088 * i386-low.h: Renamed as...
5089 * x86-low.h: New file. All type, function and variable name
5090 prefixes changed from "i386_" to "x86_". All references updated.
5091 * i386-low.c: Renamed as...
5092 * x86-low.c: New file. All type, function and variable name
5093 prefixes changed from "i386_" to "x86_". All references updated.
5095 2014-09-02 Gary Benson <gbenson@redhat.com>
5097 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5098 (x86_linux_new_thread): Likewise.
5100 2014-08-29 Gary Benson <gbenson@redhat.com>
5102 * server.h (setjmp.h): Do not include.
5103 (toplevel): Do not declare.
5104 (common-exceptions.h): Include.
5105 (cleanups.h): Likewise.
5106 * server.c (toplevel): Do not define.
5107 (exit_code): New static global.
5108 (detach_or_kill_for_exit_cleanup): New function.
5109 (main): New function. Original main renamed to...
5110 (captured_main): New function.
5111 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5113 2014-08-29 Gary Benson <gbenson@redhat.com>
5115 * Makefile.in (SFILES): Add common/common-exceptions.c.
5116 (OBS): Add common-exceptions.o.
5117 (common-exceptions.o): New rule.
5118 * utils.c (prepare_to_throw_exception): New function.
5120 2014-08-29 Gary Benson <gbenson@redhat.com>
5122 * config.in: Regenerate.
5123 * configure: Likewise.
5125 2014-08-29 Gary Benson <gbenson@redhat.com>
5127 * Makefile.in (SFILES): Add common/cleanups.c.
5129 (cleanups.o): New rule.
5131 2014-08-29 Gary Benson <gbenson@redhat.com>
5133 * utils.c (internal_vwarning): New function.
5135 2014-08-28 Gary Benson <gbenson@redhat.com>
5137 * utils.h (fatal): Remove declaration.
5138 * utils.c (fatal): Remove function.
5140 2014-08-28 Gary Benson <gbenson@redhat.com>
5142 * tracepoint.c (gdb_agent_init): Replace fatal with
5144 (initialize_tracepoint): Likewise.
5146 2014-08-28 Gary Benson <gbenson@redhat.com>
5148 * remote-utils.c (remote_prepare): Replace fatal with error.
5150 2014-08-28 Gary Benson <gbenson@redhat.com>
5152 * linux-low.c (linux_async): Replace fatal with warning.
5154 (linux_start_non_stop): Return -1 if linux_async failed.
5156 2014-08-28 Gary Benson <gbenson@redhat.com>
5158 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5160 (i386_dr_low_get_addr): Remove vague comment.
5161 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5164 2014-08-28 Gary Benson <gbenson@redhat.com>
5166 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5167 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5169 (linux_resume_one_lwp): Likewise.
5170 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5172 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5173 with internal_error.
5174 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5175 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5176 (find_register_by_name): Replace fatal with internal_error.
5177 (find_regno): Likewise.
5178 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5179 * thread-db.c (thread_db_create_event): Likewise.
5180 (thread_db_load_search): Likewise.
5181 (try_thread_db_load_1): Likewise.
5182 * tracepoint.c (get_jump_space_head): Replace fatal with
5184 (claim_trampoline_space): Likewise.
5185 (have_fast_tracepoint_trampoline_buffer): Likewise.
5186 (cmd_qtstart): Likewise.
5187 (stop_tracing): Likewise.
5188 (fast_tracepoint_collecting): Likewise.
5189 (target_malloc): Likewise.
5190 (download_tracepoint): Likewise.
5191 (download_trace_state_variables): Replace check with gdb_assert.
5192 (upload_fast_traceframes): Replace fatal with internal_error.
5194 2014-08-19 Tom Tromey <tromey@redhat.com>
5195 Gary Benson <gbenson@redhat.com>
5197 * Makefile.in (SFILES): Add common/common-debug.c.
5198 (OBS): Add common-debug.o.
5199 (common-debug.o): New rule.
5200 * debug.h (debug_printf): Don't declare.
5201 * debug.c (debug_printf): Renamed and rewritten as...
5202 (debug_vprintf): New function.
5204 2014-08-19 Gary Benson <gbenson@redhat.com>
5206 * utils.h: Do not include print-utils.h.
5208 2014-08-19 Tom Tromey <tromey@redhat.com>
5209 Gary Benson <gbenson@redhat.com>
5211 * server.h: Add static assertion.
5212 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5214 2014-08-19 Tom Tromey <tromey@redhat.com>
5215 Gary Benson <gbenson@redhat.com>
5217 * Makefile.in (SFILES): Add common/errors.c.
5218 (OBS): Add errors.o.
5219 (IPA_OBS): Add errors-ipa.o.
5220 (errors.o): New rule.
5221 (errors-ipa.o): Likewise.
5222 * utils.h (perror_with_name, error, warning): Don't declare.
5223 * utils.c (warning): Renamed and rewritten as...
5224 (vwarning): New function.
5225 (error): Renamed and rewritten as...
5226 (verror): New function.
5227 (internal_error): Renamed and rewritten as...
5228 (internal_verror): New function.
5230 2014-08-07 Gary Benson <gbenson@redhat.com>
5232 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5233 * configure: Regenerate.
5234 * config.in: Likewise.
5235 * server.h: Do not include errno.h.
5236 * event-loop.c: Likewise.
5237 * hostio-errno.c: Likewise.
5238 * linux-low.c: Likewise.
5239 * remote-utils.c: Likewise.
5240 * spu-low.c: Likewise.
5241 * utils.c: Likewise.
5242 * gdbreplay.c: Unconditionally include errno.h.
5244 2014-08-07 Gary Benson <gbenson@redhat.com>
5246 * server.h: Do not include string.h.
5247 * event-loop.c: Likewise.
5248 * linux-low.c: Likewise.
5249 * regcache.c: Likewise.
5250 * remote-utils.c: Likewise.
5251 * spu-low.c: Likewise.
5252 * utils.c: Likewise.
5254 2014-08-07 Gary Benson <gbenson@redhat.com>
5256 * server.h: Do not include gdb_assert.h.
5258 2014-08-07 Gary Benson <gbenson@redhat.com>
5260 * server.h: Do not include common-utils.h.
5262 2014-08-07 Gary Benson <gbenson@redhat.com>
5264 * server.h: Do not include ptid.h.
5265 * notif.h: Likewise.
5267 2014-08-07 Gary Benson <gbenson@redhat.com>
5269 * server.h: Do not include gdb_locale.h.
5271 2014-08-07 Gary Benson <gbenson@redhat.com>
5273 * server.h: Do not include gdb/signals.h.
5274 * win32-low.c: Likewise.
5276 2014-08-07 Gary Benson <gbenson@redhat.com>
5278 * server.h: Do not include pathmax.h.
5280 2014-08-07 Gary Benson <gbenson@redhat.com>
5282 * server.h: Do not include libiberty.h.
5283 * linux-bfin-low.c: Likewise.
5285 2014-08-07 Gary Benson <gbenson@redhat.com>
5287 * server.h: Do not include ansidecl.h.
5289 2014-08-07 Gary Benson <gbenson@redhat.com>
5291 * linux-x86-low.c: Do not include stddef.h.
5292 * lynx-ppc-low.c: Likewise.
5293 * tracepoint.c: Likewise.
5295 2014-08-07 Gary Benson <gbenson@redhat.com>
5297 * server.h: Do not include stdarg.h.
5298 * nto-low.c: Likewise.
5300 2014-08-07 Gary Benson <gbenson@redhat.com>
5302 * server.h: Do not include stdlib.h.
5303 * inferiors.c: Likewise.
5304 * linux-low.c: Likewise.
5305 * regcache.c: Likewise.
5306 * spu-low.c: Likewise.
5307 * tracepoint.c: Likewise.
5308 * utils.c: Likewise.
5310 2014-08-07 Gary Benson <gbenson@redhat.com>
5312 * server.h: Do not include stdio.h.
5313 * linux-low.c: Likewise.
5314 * remote-utils.c: Likewise.
5315 * spu-low.c: Likewise.
5316 * utils.c: Likewise.
5317 * wincecompat.c: Likewise.
5319 2014-08-06 Gary Benson <gbenson@redhat.com>
5321 * regcache.c (init_register_cache): Move conditionals inside if.
5323 2014-08-06 Gary Benson <gbenson@redhat.com>
5325 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5327 2014-07-31 Gary Benson <gbenson@redhat.com>
5329 * ax.h: Do not include server.h.
5330 * gdbthread.h: Likewise.
5331 * lynx-low.h: Likewise.
5332 * notif.h: Likewise.
5334 2014-07-30 Gary Benson <gbenson@redhat.com>
5336 * server.h: Include common-defs.h.
5337 Do not include config.h or build-gnulib-gdbserver/config.h.
5339 2014-07-30 Gary Benson <gbenson@redhat.com>
5341 * hostio-errno.c: Move server.h to top of includes list.
5342 * inferiors.c: Likewise.
5343 * linux-x86-low.c: Likewise.
5344 * notif.c: Include server.h.
5346 2014-07-24 Tom Tromey <tromey@redhat.com>
5347 Gary Benson <gbenson@redhat.com>
5349 * server.h (CORE_ADDR): Now unsigned.
5351 2014-07-16 Pedro Alves <palves@redhat.com>
5353 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5355 2014-07-15 Pedro Alves <palves@redhat.com>
5357 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5360 2014-07-11 Pedro Alves <palves@redhat.com>
5362 * linux-low.c (kill_wait_lwp): New function, based on
5363 kill_one_lwp_callback, but use my_waitpid directly.
5364 (kill_one_lwp_callback, linux_kill): Use it.
5366 2014-06-23 Pedro Alves <palves@redhat.com>
5368 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5369 before setting DR0..DR3.
5371 2014-06-20 Gary Benson <gbenson@redhat.com>
5373 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5374 * configure: Regenerated.
5375 * config.in: Likewise.
5377 2014-06-20 Gary Benson <gbenson@redhat.com>
5379 * Makefile.in (SFILES): Update locations for files moved
5381 (object file files): Reordered.
5383 2014-06-20 Gary Benson <gbenson@redhat.com>
5385 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5386 (i386_dr_low_set_addr): Likewise.
5387 (i386_dr_low_get_addr): Likewise.
5388 (i386_dr_low_can_set_control): Likewise.
5389 (i386_dr_low_set_control): Likewise.
5390 (i386_dr_low_get_control): Likewise.
5391 (i386_dr_low_get_status): Likewise.
5392 (i386_get_debug_register_length): Likewise.
5393 * linux-x86-low.c (i386_dr_low_set_addr):
5394 Changed signature. Made static.
5395 (i386_dr_low_get_addr): Likewise.
5396 (i386_dr_low_set_control): Likewise.
5397 (i386_dr_low_get_control): Likewise.
5398 (i386_dr_low_get_status): Likewise.
5399 (i386_dr_low): New global variable.
5400 * win32-i386-low.c (i386_dr_low_set_addr):
5401 Changed signature. Made static.
5402 (i386_dr_low_get_addr): Likewise.
5403 (i386_dr_low_set_control): Likewise.
5404 (i386_dr_low_get_control): Likewise.
5405 (i386_dr_low_get_status): Likewise.
5406 (i386_dr_low): New global variable.
5408 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5410 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5411 * Makefile.in (AR, AR_FLAGS): Define.
5412 * configure: Regenerate.
5414 2014-06-19 Gary Benson <gbenson@redhat.com>
5416 * Makefile.in (i386-dregs.o): New rule.
5417 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5418 * i386-low.c (target.h): Remove include.
5419 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5420 (DR_CONTROL_SHIFT): Likewise.
5421 (DR_CONTROL_SIZE): Likewise.
5422 (DR_RW_EXECUTE): Likewise.
5423 (DR_RW_WRITE): Likewise.
5424 (DR_RW_READ): Likewise.
5425 (DR_RW_IORW): Likewise.
5426 (DR_LEN_1): Likewise.
5427 (DR_LEN_2): Likewise.
5428 (DR_LEN_4): Likewise.
5429 (DR_LEN_8): Likewise.
5430 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5431 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5432 (DR_ENABLE_SIZE): Likewise.
5433 (DR_LOCAL_SLOWDOWN): Likewise.
5434 (DR_GLOBAL_SLOWDOWN): Likewise.
5435 (DR_CONTROL_RESERVED): Likewise.
5436 (I386_DR_CONTROL_MASK): Likewise.
5437 (I386_DR_VACANT): Likewise.
5438 (I386_DR_LOCAL_ENABLE): Likewise.
5439 (I386_DR_GLOBAL_ENABLE): Likewise.
5440 (I386_DR_DISABLE): Likewise.
5441 (I386_DR_SET_RW_LEN): Likewise.
5442 (I386_DR_GET_RW_LEN): Likewise.
5443 (I386_DR_WATCH_HIT): Likewise.
5444 (i386_wp_op_t): Likewise.
5445 (i386_show_dr): Likewise.
5446 (i386_length_and_rw_bits): Likewise.
5447 (i386_insert_aligned_watchpoint): Likewise.
5448 (i386_remove_aligned_watchpoint): Likewise.
5449 (i386_handle_nonaligned_watchpoint): Likewise.
5450 i386_update_inferior_debug_regs(): Likewise.
5451 (i386_dr_insert_watchpoint): Likewise.
5452 (i386_dr_remove_watchpoint): Likewise.
5453 (i386_dr_region_ok_for_watchpoint): Likewise.
5454 (i386_dr_stopped_data_address): Likewise.
5455 (i386_dr_stopped_by_watchpoint): Likewise.
5457 2014-06-19 Gary Benson <gbenson@redhat.com>
5459 * i386-low.c (i386_dr_show): Renamed to
5460 i386_show_dr and made static. All uses updated.
5461 (i386_dr_length_and_rw_bits): Renamed to
5462 i386_length_and_rw_bits and made static.
5464 (i386_dr_insert_aligned_watchpoint): Renamed to
5465 i386_insert_aligned_watchpoint and made static.
5467 (i386_dr_remove_aligned_watchpoint): Renamed to
5468 i386_remove_aligned_watchpoint and made static.
5470 (i386_dr_update_inferior_debug_regs): Renamed to
5471 i386_update_inferior_debug_regs and made static.
5474 2014-06-18 Gary Benson <gbenson@redhat.com>
5476 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5477 (i386_dr_low_can_set_control): Likewise.
5478 (i386_get_debug_register_length): Likewise.
5479 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5480 (i386_dr_low_can_set_control): Likewise.
5481 (i386_get_debug_register_length): Likewise.
5483 2014-06-17 Gary Benson <gbenson@redhat.com>
5485 * i386-low.h (i386-dregs.h): New include.
5486 (DR_FIRSTADDR): Now in i386-dregs.h.
5487 (DR_LASTADDR): Likewise.
5488 (DR_NADDR): Likewise.
5489 (DR_STATUS): Likewise.
5490 (DR_CONTROL): Likewise.
5491 (i386_debug_reg_state): Likewise.
5492 (i386_dr_insert_watchpoint): Likewise.
5493 (i386_dr_remove_watchpoint): Likewise.
5494 (i386_dr_region_ok_for_watchpoint): Likewise.
5495 (i386_dr_stopped_data_address): Likewise.
5496 (i386_dr_stopped_by_watchpoint): Likewise.
5497 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5499 2014-06-18 Gary Benson <gbenson@redhat.com>
5501 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5502 i386_dr_insert_watchpoint.
5503 (i386_low_remove_watchpoint): Renamed to
5504 i386_dr_remove_watchpoint.
5505 (i386_low_region_ok_for_watchpoint): Renamed to
5506 i386_dr_region_ok_for_watchpoint.
5507 (i386_low_stopped_data_address): Renamed to
5508 i386_dr_stopped_data_address.
5509 (i386_low_stopped_by_watchpoint): Renamed to
5510 i386_dr_stopped_by_watchpoint.
5511 * i386-low.c (i386_show_dr): Renamed to
5512 i386_dr_show and made nonstatic. All uses updated.
5513 (i386_length_and_rw_bits): Renamed to
5514 i386_dr_length_and_rw_bits and made nonstatic.
5516 (i386_insert_aligned_watchpoint): Renamed to
5517 i386_dr_insert_aligned_watchpoint and made nonstatic.
5519 (i386_remove_aligned_watchpoint): Renamed to
5520 i386_dr_remove_aligned_watchpoint and made nonstatic.
5522 (i386_update_inferior_debug_regs): Renamed to
5523 i386_dr_update_inferior_debug_regs and made nonstatic.
5525 (i386_low_insert_watchpoint): Renamed to
5526 i386_dr_insert_watchpoint. All uses updated.
5527 (i386_low_remove_watchpoint): Renamed to
5528 i386_dr_remove_watchpoint. All uses updated.
5529 (i386_low_region_ok_for_watchpoint): Renamed to
5530 i386_dr_region_ok_for_watchpoint. All uses updated.
5531 (i386_low_stopped_data_address): Renamed to
5532 i386_dr_stopped_data_address. All uses updated.
5533 (i386_low_stopped_by_watchpoint): Renamed to
5534 i386_dr_stopped_by_watchpoint. All uses updated.
5536 2014-06-18 Gary Benson <gbenson@redhat.com>
5538 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5539 (i386_dr_low_can_set_control): Likewise.
5540 (i386_insert_aligned_watchpoint): New check.
5542 2014-06-18 Gary Benson <gbenson@redhat.com>
5544 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5547 2014-06-18 Gary Benson <gbenson@redhat.com>
5549 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5550 instead of fatal and error.
5551 (i386_handle_nonaligned_watchpoint): Likewise.
5553 2014-06-18 Gary Benson <gbenson@redhat.com>
5555 * i386-low.c (i386_get_debug_register_length): New macro.
5556 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5557 (i386_show_dr): Use debug_printf instead of fprintf. Use
5558 phex to format values.
5560 2014-06-18 Gary Benson <gbenson@redhat.com>
5562 * i386-low.h: Comment changes.
5563 * i386-low.c: Likewise.
5565 2014-06-18 Gary Benson <gbenson@redhat.com>
5567 * i386-low.c: Whitespace changes.
5569 2014-06-12 Tom Tromey <tromey@redhat.com>
5571 * utils.c (freeargv): Remove.
5573 2014-06-12 Tom Tromey <tromey@redhat.com>
5575 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5576 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5577 (parse_debug_format_options): Likewise.
5578 (gdbserver_usage): Likewise.
5579 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5580 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5581 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5583 ($(LIBGNU)): Depend on libiberty.
5584 (all-lib): Recurse into all subdirs.
5585 (install-only): Invoke "install" target in subdirs.
5586 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5588 * configure: Rebuild.
5589 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5590 for vasprintf, vsnprintf, or gettimeofday.
5591 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5594 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5596 * development.sh: Delete.
5597 * Makefile.in (config.status): Adjust dependency on development.sh.
5598 * configure.ac: Adjust development.sh source call.
5599 * configure: Regenerate.
5601 2014-06-02 Pedro Alves <palves@redhat.com>
5603 * ax.c (gdb_free_agent_expr): New function.
5604 * ax.h (gdb_free_agent_expr): New declaration.
5605 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5607 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5609 (clear_breakpoint_conditions_and_commands): New function.
5610 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5611 (clear_breakpoint_conditions_and_commands): New declaration.
5613 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5615 * linux-aarch64-low.c (asm/ptrace.h): Include.
5617 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5619 Fix TLS access for -static -pthread.
5620 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5621 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5622 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5624 2014-05-20 Pedro Alves <palves@redhat.com>
5626 * linux-aarch64-low.c (aarch64_insert_point)
5627 (aarch64_remove_point): No longer check whether the type is
5628 supported here. Adjust to new interface.
5629 (the_low_target): Install aarch64_supports_z_point_type as
5630 supports_z_point_type method.
5631 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5632 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5633 instead of a Z packet char. Adjust.
5634 (arm_supports_z_point_type): New function.
5635 (arm_insert_point, arm_remove_point): Adjust to new interface.
5636 (the_low_target): Install arm_supports_z_point_type.
5637 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5638 (cris_insert_point, cris_remove_point): Adjust to new interface.
5639 Don't check whether the type is supported here.
5640 (the_low_target): Install cris_supports_z_point_type.
5641 * linux-low.c (linux_supports_z_point_type): New function.
5642 (linux_insert_point, linux_remove_point): Adjust to new interface.
5643 * linux-low.h (struct linux_target_ops) <insert_point,
5644 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5645 raw_breakpoint pointer parameter.
5646 <supports_z_point_type>: New method.
5647 * linux-mips-low.c (mips_supports_z_point_type): New function.
5648 (mips_insert_point, mips_remove_point): Adjust to new interface.
5649 Use mips_supports_z_point_type.
5650 (the_low_target): Install mips_supports_z_point_type.
5651 * linux-ppc-low.c (the_low_target): Install NULL as
5652 supports_z_point_type method.
5653 * linux-s390-low.c (the_low_target): Install NULL as
5654 supports_z_point_type method.
5655 * linux-sparc-low.c (the_low_target): Install NULL as
5656 supports_z_point_type method.
5657 * linux-x86-low.c (x86_supports_z_point_type): New function.
5658 (x86_insert_point): Adjust to new insert_point interface. Use
5659 insert_memory_breakpoint. Adjust to new
5660 i386_low_insert_watchpoint interface.
5661 (x86_remove_point): Adjust to remove_point interface. Use
5662 remove_memory_breakpoint. Adjust to new
5663 i386_low_remove_watchpoint interface.
5664 (the_low_target): Install x86_supports_z_point_type.
5665 * lynx-low.c (lynx_target_ops): Install NULL as
5666 supports_z_point_type callback.
5667 * nto-low.c (nto_supports_z_point_type): New.
5668 (nto_insert_point, nto_remove_point): Adjust to new interface.
5669 (nto_target_ops): Install nto_supports_z_point_type.
5670 * mem-break.c: Adjust intro comment.
5671 (struct raw_breakpoint) <raw_type, size>: New fields.
5672 <inserted>: Update comment.
5673 <shlib_disabled>: Delete field.
5674 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5675 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5676 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5677 (raw_bkpt_type_to_target_hw_bp_type): New function.
5678 (find_enabled_raw_code_breakpoint_at): New function.
5679 (find_raw_breakpoint_at): New type and size parameters. Use them.
5680 (insert_memory_breakpoint): New function, based off
5681 set_raw_breakpoint_at.
5682 (remove_memory_breakpoint): New function.
5683 (set_raw_breakpoint_at): Reimplement.
5684 (set_breakpoint): New, based on set_breakpoint_at.
5685 (set_breakpoint_at): Reimplement.
5686 (delete_raw_breakpoint): Go through the_target->remove_point
5687 instead of assuming memory breakpoints.
5688 (find_gdb_breakpoint_at): Delete.
5689 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5690 (find_gdb_breakpoint): New function.
5691 (set_gdb_breakpoint_at): Delete.
5692 (z_type_supported): New function.
5693 (set_gdb_breakpoint_1): New function, loosely based off
5694 set_gdb_breakpoint_at.
5695 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5696 (delete_gdb_breakpoint_at): Delete.
5697 (delete_gdb_breakpoint_1): New function, loosely based off
5698 delete_gdb_breakpoint_at.
5699 (delete_gdb_breakpoint): New function.
5700 (clear_gdb_breakpoint_conditions): Rename to ...
5701 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5703 (add_condition_to_breakpoint): Make static.
5704 (add_breakpoint_condition): Take a struct breakpoint pointer
5705 instead of an address. Adjust.
5706 (gdb_condition_true_at_breakpoint): Rename to ...
5707 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5709 (gdb_condition_true_at_breakpoint): Reimplement.
5710 (add_breakpoint_commands): Take a struct breakpoint pointer
5711 instead of an address. Adjust.
5712 (gdb_no_commands_at_breakpoint): Rename to ...
5713 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5714 parameter. Return true if no breakpoint was found. Change debug
5716 (gdb_no_commands_at_breakpoint): Reimplement.
5717 (run_breakpoint_commands): Rename to ...
5718 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5719 and change return type to boolean.
5720 (run_breakpoint_commands): New function.
5721 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5722 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5723 breakpoint. Go through the_target->remove_point instead of
5724 assuming memory breakpoint.
5725 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5726 software and hardware breakpoints.
5727 (reinsert_raw_breakpoint): Go through the_target->insert_point
5728 instead of assuming memory breakpoint.
5729 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5730 software and hardware breakpoints.
5731 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5732 Check both software and hardware breakpoints.
5733 (validate_inserted_breakpoint): Assert the breakpoint is a
5734 software breakpoint. Set the inserted flag to -1 instead of
5735 setting shlib_disabled.
5736 (delete_disabled_breakpoints): Adjust.
5737 (validate_breakpoints): Only validate software breakpoints.
5738 Adjust to inserted flag change.
5739 (check_mem_read, check_mem_write): Skip breakpoint types other
5740 than software breakpoints. Adjust to inserted flag change.
5741 * mem-break.h (enum raw_bkpt_type): New enum.
5742 (raw_breakpoint, struct process_info): Forward declare.
5743 (Z_packet_to_target_hw_bp_type): Delete declaration.
5744 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5745 (set_gdb_breakpoint, delete_gdb_breakpoint)
5746 (clear_breakpoint_conditions): New declarations.
5747 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5748 (breakpoint_inserted_here): Update comment.
5749 (add_breakpoint_condition, add_breakpoint_commands): Replace
5750 address parameter with a breakpoint pointer parameter.
5751 (gdb_breakpoint_here): Update comment.
5752 (delete_gdb_breakpoint_at): Delete.
5753 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5754 * server.c (process_point_options): Take a struct breakpoint
5755 pointer instead of an address. Adjust.
5756 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5757 delete_gdb_breakpoint.
5758 * spu-low.c (spu_target_ops): Install NULL as
5759 supports_z_point_type method.
5760 * target.h: Include mem-break.h.
5761 (struct target_ops) <prepare_to_access_memory>: Update comment.
5762 <supports_z_point_type>: New field.
5763 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5764 instead of a char. Also take a raw breakpoint pointer.
5765 * win32-arm-low.c (the_low_target): Install NULL as
5766 supports_z_point_type.
5767 * win32-i386-low.c (i386_supports_z_point_type): New function.
5768 (i386_insert_point, i386_remove_point): Adjust to new interface.
5769 (the_low_target): Install i386_supports_z_point_type.
5770 * win32-low.c (win32_supports_z_point_type): New function.
5771 (win32_insert_point, win32_remove_point): Adjust to new interface.
5772 (win32_target_ops): Install win32_supports_z_point_type.
5773 * win32-low.h (struct win32_target_ops):
5774 <supports_z_point_type>: New method.
5775 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5776 instead of a char. Also take a raw breakpoint pointer.
5778 2014-05-20 Pedro Alves <palves@redhat.com>
5780 * mem-break.h: Include break-common.h.
5781 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5782 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5783 (Z_packet_to_target_hw_bp_type): New declaration.
5784 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5785 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5786 (Z_PACKET_ACCESS_WP): Delete macros.
5787 (Z_packet_to_hw_type): Delete function.
5788 * i386-low.h: Don't include break-common.h here.
5789 (Z_packet_to_hw_type): Delete declaration.
5790 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5791 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5792 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5793 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5794 * linux-aarch64-low.c: Don't include break-common.h here.
5795 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5796 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5797 (Z_packet_to_target_hw_bp_type): Delete function.
5798 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5800 (mips_insert_point, mips_remove_point): Use
5801 Z_packet_to_target_hw_bp_type.
5803 2014-05-20 Pedro Alves <palves@redhat.com>
5805 * linux-aarch64-low.c: Include break-common.h.
5806 (enum target_point_type): Delete.
5807 (Z_packet_to_point_type): Rename to ...
5808 (Z_packet_to_target_hw_bp_type): ... this, and return a
5809 target_hw_bp_type instead.
5810 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5811 instead of an enum target_point_type.
5812 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5814 (aarch64_dr_state_insert_one_point)
5815 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5816 (aarch64_handle_aligned_watchpoint)
5817 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5818 Take an enum target_hw_bp_type instead of an enum
5820 (aarch64_supports_z_point_type): New function.
5821 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5822 use Z_packet_to_target_hw_bp_type.
5824 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5826 * configure.ac: Only use -Werror by default when DEVELOPMENT
5828 * configure: Regenerate.
5830 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5832 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5833 * linux-x86-low.c (X86_64_USER_REGS): New.
5834 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5836 2014-04-28 Yao Qi <yao@codesourcery.com>
5838 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5841 2014-04-25 Pedro Alves <palves@redhat.com>
5844 * linux-low.c (linux_attach_fail_reason_string): New function.
5845 (linux_attach_lwp): Delete.
5846 (linux_attach_lwp_1): Rename to ...
5847 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5848 argument. Remove "initial" parameter. Return int instead of
5849 void. Don't error or warn here.
5850 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5851 failure to attach to the tgid. Call warning when failing to
5853 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5854 argument. Remove "initial" parameter. Return int instead of
5855 void. Don't error or warn here.
5856 (linux_attach_fail_reason_string): New declaration.
5857 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5858 interface change. Use linux_attach_fail_reason_string.
5860 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5861 Walfred Tedeschi <walfred.tedeschi@intel.com>
5863 * Makefile.in: Added rules to handle new files
5864 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5865 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5866 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5867 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5868 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5869 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5871 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5872 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5873 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5874 i386/x32-avx512.xml.
5875 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5876 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5877 i386/x32-avx512-linux.xml.
5878 * i387-fp.c (num_avx512_k_registers): New constant for number
5880 (num_avx512_zmmh_low_registers): New constant for number of
5881 lower ZMM registers (0-15).
5882 (num_avx512_zmmh_high_registers): New constant for number of
5883 higher ZMM registers (16-31).
5884 (num_avx512_ymmh_registers): New contant for number of higher
5885 YMM registers (ymm16-31 added by avx521 on x86_64).
5886 (num_avx512_xmm_registers): New constant for number of higher
5887 XMM registers (xmm16-31 added by AVX512 on x86_64).
5888 (struct i387_xsave): Add space for AVX512 registers.
5889 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5890 Add code to handle AVX512 registers.
5891 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5892 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5893 prototypei from generated file.
5894 (tdesc_amd64_avx512_linux): Likewise.
5895 (init_registers_x32_avx512_linux): Likewise.
5896 (tdesc_x32_avx512_linux): Likewise.
5897 (init_registers_i386_avx512_linux): Likewise.
5898 (tdesc_i386_avx512_linux): Likewise.
5899 (x86_64_regmap): Add AVX512 registers.
5900 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5902 (initialize_low_arch): Add code to initialize AVX512 registers.
5904 2014-04-23 Pedro Alves <palves@redhat.com>
5906 * mem-break.c (find_gdb_breakpoint_at): Make static.
5907 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5909 2014-04-23 Pedro Alves <palves@redhat.com>
5911 * i386-low.c: Don't include break-common.h here.
5912 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5913 prototype to take target_hw_bp_type as argument instead of a Z
5915 * i386-low.h: Include break-common.h here.
5916 (Z_packet_to_hw_type): Declare.
5917 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5919 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5920 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5921 (x86_remove_point): Convert the packet number to a
5922 target_hw_bp_type before calling i386_low_remove_watchpoint.
5923 * win32-i386-low.c (i386_insert_point): Convert the packet number
5924 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5925 (i386_remove_point): Convert the packet number to a
5926 target_hw_bp_type before calling i386_low_remove_watchpoint.
5928 2014-04-23 Pedro Alves <palves@redhat.com>
5930 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5932 2014-04-10 Pedro Alves <palves@redhat.com>
5934 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5935 Check if the condition or command is NULL before checking if the
5936 breakpoint is known. On success, return true.
5937 * mem-break.h (add_breakpoint_condition): Document return.
5938 (add_breakpoint_commands): Add describing comment.
5939 * server.c (skip_to_semicolon): New function.
5940 (process_point_options): Use it.
5942 2014-04-09 Pedro Alves <palves@redhat.com>
5944 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5947 2014-02-27 Pedro Alves <palves@redhat.com>
5950 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5952 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5954 (last_thread_of_process_p): Take a PID argument instead of a
5956 (linux_wait_for_lwp): Delete.
5957 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5959 (linux_low_filter_event): New function, party factored out from
5960 linux_wait_for_event.
5961 (linux_wait_for_event): Rename to ...
5962 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5963 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5964 sigsuspend. Check for zombie leaders.
5965 (linux_wait_for_event): Reimplement as wrapper around
5966 linux_wait_for_event_filtered.
5967 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5968 a normal or signal exit is seen, it's the whole process exiting.
5969 (wait_for_sigstop): No longer a for_each_inferior callback.
5970 Rewrite on top of linux_wait_for_event_filtered.
5971 (stop_all_lwps): Call wait_for_sigstop directly.
5972 * server.c (resume, handle_target_event): Handle
5973 TARGET_WAITKIND_NO_RESUMED.
5975 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5977 * win32-low.c (psapi_get_dll_name,
5978 * win32_CreateToolhelp32Snapshot): Delete.
5979 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5980 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5982 (handle_load_dll): Add function description.
5983 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5985 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5987 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5989 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5990 base address when calling win32_add_one_solib.
5991 (handle_load_dll): Delete local variable load_addr.
5992 Remove 0x1000 offset applied to DLL base address when calling
5993 win32_add_one_solib.
5994 (handle_unload_dll): Add comment.
5996 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5998 * win32-low.c (win32_add_all_dlls): Renames
5999 win32_ensure_ntdll_loaded. Rewrite function documentation.
6000 Adjust implementation to always load all DLLs.
6001 Add 0x1000 offset to DLL base address when calling
6002 win32_add_one_solib.
6003 (child_initialization_done): New static global.
6004 (do_initial_child_stuff): Set child_initialization_done to
6005 zero during child initialization, and 1 after. Replace call
6006 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6008 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6009 (handle_unload_dll): Add function documentation.
6010 (get_child_debug_event): Ignore load and unload DLL events
6011 during child initialization.
6013 2014-02-20 Doug Evans <dje@google.com>
6015 Remove global all_lwps.
6016 * inferiors.h (ptid_of): Move here from linux-low.h.
6017 (pid_of, lwpid_of): Ditto.
6018 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6019 parameter is a struct thread_info * now.
6020 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6021 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6022 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6024 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6025 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6026 * linux-arm-low.c (update_registers_callback): Update, "entry"
6027 parameter is a struct thread_info * now.
6028 Fetch lwpid from current_inferior directly.
6029 (arm_insert_point): Pass &all_threads to find_inferior instead of
6031 (arm_remove_point): Ditto.
6032 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6033 (arm_prepare_to_resume): Fetch pid from thread.
6034 (arm_read_description): Fetch lwpid from current_inferior directly.
6035 * linux-low.c (all_lwps): Delete.
6036 (delete_lwp): Delete call to remove_inferior.
6037 (handle_extended_wait): Fetch lwpid from thread.
6038 (add_lwp): Don't set lwp->entry.id. Remove call to
6039 add_inferior_to_list.
6040 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6041 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6042 (kill_one_lwp_callback): Ditto.
6043 (linux_kill): Don't dereference NULL pointer.
6044 Fetch ptid,lwpid from thread.
6045 (get_detach_signal): Fetch ptid from thread.
6046 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6047 Simplify call to regcache_invalidate_thread.
6048 (delete_lwp_callback): Update, "entry" parameter is a
6049 struct thread_info * now. Fetch pid from thread.
6050 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6051 (status_pending_p_callback): Update, "entry" parameter is a
6052 struct thread_info * now. Fetch ptid from thread.
6053 (find_lwp_pid): Update, "entry" parameter is a
6054 struct thread_info * now.
6055 (linux_wait_for_lwp): Fetch pid from thread.
6056 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6057 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6058 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6059 (dequeue_one_deferred_signal): Ditto.
6060 (cancel_breakpoint): Fetch ptid from current_inferior.
6061 (linux_wait_for_event): Pass &all_threads to find_inferior,
6062 not &all_lwps. Fetch ptid, lwpid from thread.
6063 (count_events_callback): Update, "entry" parameter is a
6064 struct thread_info * now.
6065 (select_singlestep_lwp_callback): Ditto.
6066 (select_event_lwp_callback): Ditto.
6067 (cancel_breakpoints_callback): Ditto.
6068 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6070 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6071 (unsuspend_one_lwp): Update, "entry" parameter is a
6072 struct thread_info * now.
6073 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6075 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6076 Fetch lwpid from thread, not lwp.
6077 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6078 Pass &all_threads to find_inferior, not &all_lwps.
6079 (send_sigstop): Fetch lwpid from thread, not lwp.
6080 (send_sigstop_callback): Update, "entry" parameter is a
6081 struct thread_info * now.
6082 (suspend_and_send_sigstop_callback): Ditto.
6083 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6084 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6085 struct thread_info * now.
6086 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6088 (lwp_running): Update, "entry" parameter is a
6089 struct thread_info * now.
6090 (stop_all_lwps): Fetch ptid from thread.
6091 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6092 (linux_resume_one_lwp): Fetch lwpid from thread.
6093 (linux_set_resume_request): Update, "entry" parameter is a
6094 struct thread_info * now. Fetch pid, lwpid from thread.
6095 (resume_status_pending_p): Update, "entry" parameter is a
6096 struct thread_info * now.
6097 (need_step_over_p): Ditto. Fetch lwpid from thread.
6098 (start_step_over): Fetch lwpid from thread.
6099 (linux_resume_one_thread): Update, "entry" parameter is a
6100 struct thread_info * now. Fetch lwpid from thread.
6101 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6102 (proceed_one_lwp): Update, "entry" parameter is a
6103 struct thread_info * now. Fetch lwpid from thread.
6104 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6105 struct thread_info * now.
6106 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6107 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6108 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6110 (regsets_store_inferior_registers): Ditto.
6111 (fetch_register, store_register): Ditto.
6112 (linux_read_memory, linux_write_memory): Ditto.
6113 (linux_request_interrupt): Ditto.
6114 (linux_read_auxv): Ditto.
6115 (linux_xfer_siginfo): Ditto.
6116 (linux_qxfer_spu): Ditto.
6117 (linux_qxfer_libraries_svr4): Ditto.
6118 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6119 moved to inferiors.h.
6121 (get_thread_lwp): Update.
6122 (struct lwp_info): Delete member "entry". Simplify comment for
6125 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6126 current_inferior directly.
6127 (update_watch_registers_callback): Update, "entry" parameter is a
6128 struct thread_info * now. Fetch pid from thread.
6129 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6130 (mips_insert_point): Fetch lwpid from current_inferior.
6131 Pass &all_threads to find_inferior, not &all_lwps.
6132 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6133 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6135 (mips_stopped_data_address): Ditto.
6136 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6138 * linux-tile-low.c (tile_arch_setup): Ditto.
6139 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6140 (update_debug_registers_callback): Update, "entry" parameter is a
6141 struct thread_info * now. Fetch pid from thread.
6142 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6143 Pass &all_threads to find_inferior, not &all_lwps.
6144 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6145 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6146 Pass &all_threads to find_inferior, not &all_lwps.
6147 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6148 (i386_dr_low_get_status): Ditto.
6149 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6150 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6151 (x86_linux_read_description): Ditto.
6152 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6154 2014-02-20 Doug Evans <dje@google.com>
6156 * inferiors.c (get_first_inferior): Fix buglet.
6158 2014-02-19 Doug Evans <dje@google.com>
6160 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6161 * inferiors.c (add_thread): Change result type to struct thread_info *.
6162 All callers updated.
6163 (add_lwp): Call add_thread here instead of in callers.
6164 All callers updated.
6165 * linux-low.h (get_lwp_thread): Rewrite.
6166 (struct lwp_info): New member "thread".
6168 2014-02-19 Doug Evans <dje@google.com>
6170 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6171 All callers updated.
6173 2014-02-19 Doug Evans <dje@google.com>
6175 * inferiors.c (add_thread): Fix whitespace.
6177 2014-02-19 Doug Evans <dje@google.com>
6179 * dll.c (clear_dlls): Replace accessing list implemention details
6181 * gdbthread.h (get_first_thread): Declare.
6182 * inferiors.c (for_each_inferior_with_data): New function.
6183 (get_first_thread): New function.
6184 (find_thread_ptid): Simplify.
6185 (get_first_inferior): New function.
6186 (clear_list): Delete.
6187 (one_inferior_p): New function.
6188 (clear_inferior_list): New function.
6189 (clear_inferiors): Update.
6190 * inferiors.h (for_each_inferior_with_data): Declare.
6191 (clear_inferior_list): Declare.
6192 (one_inferior_p): Declare.
6193 (get_first_inferior): Declare.
6194 * linux-low.c (linux_wait_for_event): Replace accessing list
6195 implemention details with API function.
6196 * server.c (target_running): Ditto.
6197 (accumulate_file_name_length): New function.
6198 (emit_dll_description): New function.
6199 (handle_qxfer_libraries): Replace accessing list implemention
6200 details with API function.
6201 (handle_qxfer_threads_worker): New function.
6202 (handle_qxfer_threads_proper): Replace accessing list implemention
6203 details with API function.
6204 (handle_query): Ditto.
6205 (visit_actioned_threads_callback_ftype): New typedef.
6206 (visit_actioned_threads_data): New struct.
6207 (visit_actioned_threads): Rewrite to be find_inferior callback.
6208 (resume): Call find_inferior.
6209 (handle_status): Replace accessing list implemention
6210 details with API function.
6211 (process_serial_event): Replace accessing list implemention details
6213 * target.c (set_desired_inferior): Replace accessing list implemention
6214 details with API function.
6215 * tracepoint.c (same_process_p): New function.
6216 (gdb_agent_about_to_close): Replace accessing list implemention
6217 details with API function.
6218 * win32-low.c (child_delete_thread): Replace accessing list
6219 implemention details with API function.
6220 (match_dll_by_basename): New function.
6221 (dll_is_loaded_by_basename): New function.
6222 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6223 details call to dll_is_loaded_by_basename.
6225 2014-02-19 Doug Evans <dje@google.com>
6227 * dll.h (struct dll_info): Add comment.
6228 * gdbthread.h (struct thread_info): Add comment.
6229 (current_ptid): Simplify.
6230 * inferiors.c (add_process): Update.
6231 (remove_process): Update.
6232 * inferiors.h (struct process_info): Rename member "head" to "entry".
6233 * linux-low.c (delete_lwp): Update.
6235 (last_thread_of_process_p): Update.
6236 (kill_one_lwp_callback, linux_kill): Update.
6237 (status_pending_p_callback): Update.
6238 (wait_for_sigstop): Update. Simplify read of ptid.
6239 (start_step_over): Update.
6240 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6241 (get_lwp_thread): Update.
6242 (struct lwp_info): Rename member "head" to "entry".
6243 * regcache.h (inferior_list_entry): Delete.
6244 * server.c (kill_inferior_callback): Update.
6245 (detach_or_kill_inferior_callback): Update.
6246 (print_started_pid): Update.
6247 (print_attached_pid): Update.
6248 (process_serial_event): Simplify read of ptid.
6249 * thread-db.c (thread_db_create_event): Update.
6250 (thread_db_get_tls_address): Update.
6251 * win32-low.c (current_inferior_ptid): Simplify.
6253 2014-02-19 Tom Tromey <tromey@redhat.com>
6255 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6257 (target_supports_btrace): Update.
6259 2014-02-14 Yao Qi <yao@codesourcery.com>
6261 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6262 (rsp-low-ipa.o): New target.
6264 2014-02-12 Tom Tromey <tromey@redhat.com>
6266 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6267 convert_ascii_to_int.
6268 * regcache.c (registers_to_string): Likewise.
6269 * remote-utils.c (decode_M_packet): Likewise.
6270 * server.c (process_serial_event): Likewise.
6272 2014-02-12 Tom Tromey <tromey@redhat.com>
6274 * server.c (handle_query, handle_v_run): Use hex2bin, not
6276 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6278 2014-02-12 Tom Tromey <tromey@redhat.com>
6280 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6281 convert_int_to_ascii.
6282 * regcache.c (registers_to_string, collect_register_as_string):
6284 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6286 * server.c (process_serial_event): Likewise.
6287 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6288 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6290 2014-02-12 Tom Tromey <tromey@redhat.com>
6292 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6293 bin2hex, not hexify.
6294 * tracepoint.c (cmd_qtstatus): Likewise.
6296 2014-02-12 Tom Tromey <tromey@redhat.com>
6298 * remote-utils.c (monitor_output): Pass explicit length to
6301 2014-02-12 Tom Tromey <tromey@redhat.com>
6303 * tracepoint.c: Include rsp-low.h.
6304 * server.c: Include rsp-low.h.
6305 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6306 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6308 * remote-utils.c: Include rsp-low.h.
6309 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6310 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6311 (convert_int_to_ascii, convert_ascii_to_int): Move to
6313 * regcache.c: Include rsp-low.h.
6314 * ax.c: Include rsp-low.h.
6315 * Makefile.in (SFILES): Add common/rsp-low.c.
6316 (OBS): Add rsp-low.o.
6317 (rsp-low.o): New target.
6319 2014-02-12 Tom Tromey <tromey@redhat.com>
6321 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6322 Include print-utils.h.
6323 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6324 (plongest, thirty_two, phex_nz): Remove.
6325 * Makefile.in (SFILES): Add common/print-utils.c.
6326 (OBS): Add print-utils.o.
6327 (print-utils-ipa.o): New target.
6328 (print-utils.o): New target.
6329 (IPA_OBJS): Add print-utils-ipa.o.
6331 2014-02-06 Tom Tromey <tromey@redhat.com>
6333 * Makefile.in (SFILES): Fix indentation.
6335 2014-02-05 Doug Evans <dje@google.com>
6337 * linux-low.c (linux_wait_for_event): Improve comment.
6338 (linux_wait_1): Keep current_inferior in sync with event_child.
6340 2014-01-22 Doug Evans <dje@google.com>
6342 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6344 2014-01-22 Doug Evans <dje@google.com>
6346 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6347 * configure: Regenerate.
6348 * config.in: Regenerate.
6349 * Makefile.in (SFILES): Add debug.c.
6351 * debug.c: New file.
6352 * debug.h: New file.
6353 * linux-aarch64-low.c (*): Update all debugging printfs to use
6354 debug_printf instead of fprintf.
6355 * linux-arm-low.c (*): Ditto.
6356 * linux-cris-low.c (*): Ditto.
6357 * linux-crisv32-low.c (*): Ditto.
6358 * linux-m32r-low.c (*): Ditto.
6359 * linux-sparc-low.c (*): Ditto.
6360 * linux-x86.c (*): Ditto.
6361 * linux-low.c (*): Ditto.
6362 (linux_wait_1): Add calls to debug_enter, debug_exit.
6363 (linux_wait): Remove redundant debugging printf.
6364 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6365 (linux_resume, unstop_all_lwps): Ditto.
6366 * mem-break.c (*): Update all debugging printfs to use
6367 debug_printf instead of fprintf.
6368 * remote-utils.c (*): Ditto.
6369 * thread-db.c (*): Ditto.
6370 * server.c #include <ctype.h>, "gdb_vecs.h".
6371 (debug_threads): Moved to debug.c.
6372 (*): Update all debugging printfs to use debug_printf instead of
6374 (start_inferior): Replace call to fflush with call to debug_flush.
6375 (monitor_show_help): Mention set debug-format.
6376 (parse_debug_format_options): New function.
6377 (handle_monitor_command): Handle "monitor set debug-format".
6378 (gdbserver_usage): Mention --debug-format.
6379 (main): Parse --debug-format.
6380 * server.h (debug_threads): Declaration moved to debug.h.
6382 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6383 trace_debug_1 that uses debug_printf.
6384 (tracepoint_look_up_symbols): Update all debugging printfs to use
6385 debug_printf instead of fprintf.
6387 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6389 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6392 2014-01-17 Pedro Alves <palves@redhat.com>
6395 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6396 defined after including gdb_proc_service.h.
6398 2014-01-16 Doug Evans <dje@google.com>
6400 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6401 (match_dll): Use it.
6403 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6405 * target.h (target_ops) <read_btrace>: Change parameters and
6406 return type to allow error reporting.
6407 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6408 trace reading errors on.
6409 * linux-low.c (linux_low_read_btrace): Pass trace reading
6411 (linux_low_disable_btrace): New.
6413 2014-01-15 Doug Evans <dje@google.com>
6415 * inferiors.c (thread_id_to_gdb_id): Delete.
6416 * inferiors.h (thread_id_to_gdb_id): Delete.
6418 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6420 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6421 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6424 2014-01-08 Pedro Alves <palves@redhat.com>
6426 * server.c (handle_status): Don't discard previous queued stop
6427 replies or thread's pending status here.
6428 (main) <disconnection>: Do it here instead.
6430 2014-01-08 Pedro Alves <palves@redhat.com>
6432 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6433 * server.c (visit_actioned_threads, handle_pending_status): New
6435 (handle_v_cont): Factor out parts to ...
6436 (resume): ... this new function. If in all-stop, and a thread
6437 being resumed has a pending status, report it without actually
6439 (myresume): Adjust to use the new 'resume' function.
6440 (clear_pending_status_callback, set_pending_status_callback)
6441 (find_status_pending_thread_callback): New functions.
6442 (handle_status): Handle the case of multiple threads having
6443 interesting statuses to report. Report threads' real last signal
6444 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6445 with an interesting thread to report the status for, instead of
6446 always reporting the status of the first thread.
6448 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6450 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6451 * gdbreplay.c (gdbreplay_version): Likewise.
6453 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6455 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6456 iov.iov_len with the real length in use.
6458 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6460 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6461 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6462 for all targets that use win32-low.c.
6463 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6464 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6466 2013-12-13 Pedro Alves <palves@redhat.com>
6468 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6469 if equal to TARGET_WAITKIND_LOADED.
6470 * win32-low.c (cached_status): New static global.
6471 (win32_wait): Add declaration.
6472 (do_initial_child_stuff): Flush all initial pending debug events
6473 up to the initial breakpoint.
6474 (win32_wait): If CACHED_STATUS was set, return that instead
6475 of doing a real wait. Remove the code resuming the execution
6476 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6477 during the initial phase. Also remove the code changing
6478 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6479 TARGET_WAITKIND_STOPPED.
6481 2013-12-11 Yao Qi <yao@codesourcery.com>
6483 * notif.c (handle_notif_ack): Return 0 if no notification
6486 2013-11-20 Doug Evans <dje@google.com>
6488 * linux-low.c (linux_set_resume_request): Fix comment.
6490 2013-11-20 Doug Evans <dje@google.com>
6492 * linux-low.c (resume_status_pending_p): Tweak comment.
6494 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6496 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6497 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6498 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6499 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6500 (srv_amd64_regobj): Add amd64-mpx.o.
6501 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6502 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6503 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6504 * i387-fp.c (num_pl_bnd_register) Added constant.
6505 (num_pl_bnd_cfg_registers) Added constant.
6506 (struct i387_xsave) Added reserved area and MPX fields.
6507 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6508 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6510 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6511 (init_registers_amd64_mpx_linux): Declare new function.
6512 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6513 (x86_64_regmap): Add MPX registers.
6514 (x86_linux_read_description): Add MPX case.
6515 (initialize_low_arch): Initialize MPX targets.
6517 2013-11-18 Tom Tromey <tromey@redhat.com>
6519 * configure: Rebuild.
6520 * configure.ac: Don't check for stdlib.h.
6521 * gdbreplay.c: Unconditionally include stdlib.h.
6523 2013-11-18 Tom Tromey <tromey@redhat.com>
6525 * config.in: Rebuild.
6526 * configure: Rebuild.
6527 * configure.ac: Don't use AC_HEADER_DIRENT.
6529 2013-11-18 Tom Tromey <tromey@redhat.com>
6531 * server.h: Don't check HAVE_STRING_H.
6532 * gdbreplay.c: Don't check HAVE_STRING_H.
6533 * configure: Rebuild.
6535 2013-11-18 Tom Tromey <tromey@redhat.com>
6537 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6540 2013-11-08 Tom Tromey <tromey@redhat.com>
6542 * configure, config.in: Rebuild.
6543 * configure.ac: Remove unused configury.
6545 2013-11-08 Tom Tromey <tromey@redhat.com>
6547 * acinclude.m4: Include common.m4, codeset.m4.
6548 * configure, config.in: Rebuild.
6549 * configure.ac: Use GDB_AC_COMMON.
6551 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6553 * linux-s390-low.c (HWCAP_S390_TE): New define.
6554 (s390_arch_setup): Consider the TE field in the HWCAP for
6555 determining 'have_regset_tdb'.
6557 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6560 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6563 2013-10-02 Pedro Alves <palves@redhat.com>
6565 * server.c (process_serial_event): Don't output "GDBserver
6566 exiting" if GDB is connected through stdio.
6567 * target.c (mywait): Likewise, be silent if GDB is connected
6570 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6572 * lynx-low.c (lynx_add_threads_after_attach): New function.
6573 (lynx_attach): Remove call to add_thread. Add call to
6574 lynx_add_threads_after_attach instead.
6576 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6578 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6579 * config.in, configure: Regenerated.
6581 2013-09-18 Yao Qi <yao@codesourcery.com>
6584 * server.c (start_inferior): Clear 'resume_info'.
6586 2013-09-16 Jiong Wang <jiwang@tilera.com>
6588 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6591 2013-09-16 Jiong Wang <jiwang@tilera.com>
6593 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6594 linux-tile-low.o to srv_tgtobj.
6596 2013-09-16 Will Newton <will.newton@linaro.org>
6598 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6601 2013-09-06 Pedro Alves <palves@redhat.com>
6603 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6604 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6605 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6606 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6607 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6608 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6610 2013-09-06 Pedro Alves <palves@redhat.com>
6612 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6613 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6615 2013-09-06 Pedro Alves <palves@redhat.com>
6617 * linux-amd64-ipa.c: Include tracepoint.h.
6618 * linux-i386-ipa.c: Include tracepoint.h.
6620 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6622 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6623 (ps_get_thread_area): New function.
6625 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6627 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6628 (initialize_low_arch): Call init_registers_crisv32 rather than
6629 init_register_crisv32.
6631 2013-09-05 Pedro Alves <palves@redhat.com>
6633 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6635 * hostio.h: ... this new file.
6636 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6637 win32-low.c: Include hostio.h.
6639 2013-09-05 Pedro Alves <palves@redhat.com>
6641 * server.h (gdb_client_data, handler_func, callback_handler_func)
6642 (delete_file_handler, add_file_handler, append_callback_event)
6643 (delete_callback_event, start_event_loop, initialize_event_loop):
6644 Move to event-loop.h and include it.
6645 * event-loop.h: New file.
6647 2013-09-05 Pedro Alves <palves@redhat.com>
6649 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6650 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6651 (loaded_dll, unloaded_dll): Move to ...
6652 * dll.h: ... this new file.
6653 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6655 2013-09-05 Pedro Alves <palves@redhat.com>
6657 * server.h (current_process, get_thread_process, all_processes)
6658 (add_inferior_to_list, for_each_inferior, current_inferior)
6659 (remove_inferior, add_process, remove_process, find_process_pid)
6660 (have_started_inferiors_p, have_attached_inferiors_p)
6661 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6662 (clear_inferiors, find_inferior, find_inferior_id)
6663 (inferior_target_data, set_inferior_target_data)
6664 (inferior_regcache_data, set_inferior_regcache_data): Move to
6665 inferiors.h, and include it.
6666 * inferiors.h: New file.
6668 2013-09-05 Pedro Alves <palves@redhat.com>
6670 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6674 2013-09-05 Pedro Alves <palves@redhat.com>
6676 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6678 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6679 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6680 (handle_tracepoint_general_set, handle_tracepoint_query)
6681 (tracepoint_finished_step, tracepoint_was_hit)
6682 (release_while_stepping_state_list, current_traceframe)
6683 (in_readonly_region, traceframe_read_mem)
6684 (fetch_traceframe_registers, traceframe_read_sdata)
6685 (traceframe_read_info, struct fast_tpoint_collect_status)
6686 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6687 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6688 (supply_fast_tracepoint_registers)
6689 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6690 (ipa_tdesc, claim_trampoline_space)
6691 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6692 (agent_mem_read, agent_get_trace_state_variable_value)
6693 (agent_set_trace_state_variable_value, agent_tsv_read)
6694 (agent_mem_read_string, get_raw_reg_func_addr)
6695 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6696 * tracepoint.h: ... this new file.
6698 2013-09-05 Pedro Alves <palves@redhat.com>
6700 * server.h (perror_with_name, error, fatal, warning, paddress)
6701 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6703 * utils.h: New file.
6705 2013-09-05 Pedro Alves <palves@redhat.com>
6707 * server.h (remote_debug, noack_mode, transport_is_reliable)
6708 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6709 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6710 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6711 (write_enn, initialize_async_io, enable_async_io)
6712 (disable_async_io, check_remote_input_interrupt_request)
6713 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6714 (dead_thread_notify, prepare_resume_reply)
6715 (decode_address_to_semicolon, decode_address, decode_m_packet)
6716 (decode_M_packet, decode_X_packet, decode_xfer_write)
6717 (decode_search_memory_packet, unhexify, hexify)
6718 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6719 (look_up_one_symbol, relocate_instruction)
6720 (monitor_output): Move to remote-utils.h, and include it.
6721 * remote-utils.h: New file.
6723 2013-09-05 Pedro Alves <palves@redhat.com>
6725 * server.h (_): Delete.
6727 2013-09-02 Pedro Alves <palves@redhat.com>
6729 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6730 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6732 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6734 2013-09-02 Pierre Muller <muller@sourceware.org>
6736 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6737 or WriteProcessMemory complete successfully and handle
6738 ERROR_PARTIAL_COPY error.
6740 2013-09-02 Pedro Alves <palves@redhat.com>
6742 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6743 error instead of EIO.
6745 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6748 * linux-low.c: Include filestuff.h.
6749 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6750 * lynx-low.c: Include filestuff.h.
6751 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6752 * server.c: Include filestuff.h.
6753 (main): Call notice_open_fds.
6754 * spu-low.c: Include filestuff.h.
6755 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6757 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6759 * Makefile.in: Explain why ../target and ../nat are not
6760 listed as include file search paths.
6761 (linux-waitpid.o): New object file rule.
6762 * configure.srv (srv_native_linux_obj): New variable.
6763 Replace all occurrences of linux native object files with
6764 $srv_native_linux_obj.
6765 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6766 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6767 (linux_enable_event_reporting): Remove declaration.
6768 (my_waitpid): Moved to common/linux-waitpid.c.
6769 (linux_wait_for_event): Pass ptid when calling
6770 linux_enable_event_reporting.
6771 (linux_supports_tracefork_flag): Remove.
6772 (linux_enable_event_reporting): Likewise.
6773 (linux_tracefork_grandchild): Remove.
6774 (STACK_SIZE): Moved to common/linux-ptrace.c.
6775 (linux_tracefork_child): Remove.
6776 (linux_test_for_tracefork): Remove.
6777 (linux_look_up_symbols): Call linux_supports_traceclone.
6778 (initialize_low): Remove call to linux_test_for_tracefork.
6779 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6780 common/linux-ptrace.h.
6781 (PTRACE_TYPE_ARG4): Likewise.
6782 Include linux-ptrace.h.
6784 2013-08-21 Pedro Alves <palves@redhat.com>
6786 * config.in: Renegerate.
6788 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6790 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6791 (SFILES): Remove $(srcdir)/common/target-common.c and
6792 add $(srcdir)/target/waitstatus.c.
6793 (OBS): Remove target-common.o and add waitstatus.o.
6794 (server_h): Remove $(srcdir)/../common/target-common.h and
6795 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6796 and $(srcdir)/../target/waitstatus.h.
6797 (target-common.o): Remove.
6798 (waitstatus.o): New target object file.
6799 * target.h: Do not include target-common.h and
6800 include target/resume.h, target/wait.h and
6801 target/waitstatus.h.
6803 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6805 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6806 to PTRACE_TYPE_ARG3.
6807 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6808 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6810 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6811 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6813 2013-07-27 Jie Zhang <jie@codesourcery.com>
6814 Daniel Jacobowitz <dan@codesourcery.com>
6815 Yao Qi <yao@codesourcery.com>
6817 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6818 (mips-linux-watch.o): New rule.
6819 (mips_linux_watch_h): New variable.
6820 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6822 * linux-mips-low.c: Include mips-linux-watch.h.
6823 (struct arch_process_info, struct arch_lwp_info): New.
6824 (update_watch_registers_callback): New function.
6825 (mips_linux_new_process, mips_linux_new_thread) New functions.
6826 (mips_linux_prepare_to_resume, mips_insert_point): New
6828 (mips_remove_point, mips_stopped_by_watchpoint): New
6830 (rsp_bp_type_to_target_hw_bp_type): New function.
6831 (mips_stopped_data_address): New function.
6832 (the_low_target): Add watchpoint support functions.
6834 2013-07-27 Yao Qi <yao@codesourcery.com>
6836 * i386-low.c: Include break-common.h.
6837 (enum target_hw_bp_type): Remove.
6839 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6841 * Makefile.in (SFILES): /common/target-common.c.
6842 (OBS): Add target-common.o.
6843 (server_h): Add $(srcdir)/../common/target-common.h.
6844 (target-common.o): New target.
6845 * server.c (queue_stop_reply_callback): Free
6846 status string after use.
6847 * target.c (target_waitstatus_to_string): Remove.
6848 * target.h: Include target-common.h.
6849 (resume_kind): Likewise.
6850 (target_waitkind): Likewise.
6851 (target_waitstatus): Likewise.
6852 (TARGET_WNOHANG): Likewise.
6854 2013-07-04 Yao Qi <yao@codesourcery.com>
6856 * Makefile.in (host_alias): Use @host_noncanonical@.
6857 (target_alias): Use @target_noncanonical@.
6858 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6859 ACX_NONCANONICAL_HOST.
6860 * configure: Regenerated.
6863 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6865 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6866 * configure: Rebuild.
6867 * Makefile.in (version_host, version_target): Get from configure.
6868 (version.c): Use $(version_host) and $(version_target).
6870 2013-07-03 Pedro Alves <palves@redhat.com>
6872 * Makefile.in (config.status): Depend on development.sh.
6873 * acinclude.m4: Include libmcheck.m4.
6874 * configure: Regenerate.
6876 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6878 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6879 attribute inside the parentheses.
6880 (winapi_DebugSetProcessKillOnExit): Ditto.
6881 (winapi_DebugBreakProcess): Ditto.
6882 (winapi_GenerateConsoleCtrlEvent): Ditto.
6884 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6886 * notif.h (notif_event): Add a dummy member to avoid compiler
6889 2013-07-01 Pedro Alves <palves@redhat.com>
6891 * hostio.c (HOSTIO_PATH_MAX): Define.
6892 (require_filename, handle_open, handle_unlink, handle_readlink):
6895 2013-07-01 Pedro Alves <palves@redhat.com>
6897 * server.h: Include "pathmax.h".
6898 * linux-low.c: Don't include sys/param.h.
6899 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6901 * win32-low.c: Don't include sys/param.h.
6902 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6904 2013-07-01 Pedro Alves <palves@redhat.com>
6906 * event-loop.c: Don't check HAVE_UNISTD_H before including
6908 * gdbreplay.c: Likewise.
6909 * remote-utils.c: Likewise.
6910 * server.c: Likewise.
6911 * configure.ac: Don't check for unistd.h.
6912 * configure: Regenerate.
6914 2013-06-28 Tom Tromey <tromey@redhat.com>
6916 * Makefile.in (version.c): Use version.in, not
6919 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6921 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6922 * configure: Rebuild.
6923 * Makefile.in (version_host, version_target): Get from configure.
6924 (version.c): Use $(version_host) and $(version_target).
6926 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6928 Fix trace-status to output user name without trailing colon.
6929 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6931 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6933 Fix trace-status to output proper start-time and stop-time.
6934 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6935 output start time and stop time in hex as gdb expects.
6937 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6939 * tracepoint.c (build_traceframe_info_xml): Output trace state
6940 variables present in the trace buffer.
6942 2013-06-24 Tom Tromey <tromey@redhat.com>
6944 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6946 (version.o): Remove.
6947 * gdbreplay.c: Include version.h.
6948 (version, host_name): Don't declare.
6949 * server.h: Include version.h.
6950 (version, host_name): Don't declare.
6952 2013-06-12 Pedro Alves <palves@redhat.com>
6954 * linux-x86-low.c (linux_is_elf64): Delete global.
6955 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6956 with local linux_pid_exe_is_elf_64_file use.
6958 2013-06-11 Pedro Alves <palves@redhat.com>
6960 * linux-low.c (regset_disabled, disable_regset): New functions.
6961 (regsets_fetch_inferior_registers)
6962 (regsets_store_inferior_registers): Use them.
6963 (initialize_regsets_info); Don't allocate the disabled_regsets
6965 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6968 2013-06-11 Pedro Alves <palves@redhat.com>
6970 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6973 2013-06-11 Pedro Alves <palves@redhat.com>
6975 * linux-x86-low.c (initialize_low_arch): Call
6976 init_registers_x32_avx_linux.
6978 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6980 Fix compatibility with Android Bionic.
6981 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6984 2013-06-07 Pedro Alves <palves@redhat.com>
6987 * Makefile.in (OBS): Add tdesc.o.
6988 (IPA_OBJS): Add tdesc-ipa.o.
6989 (tdesc-ipa.o): New rule.
6990 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6992 * linux-low.c (new_inferior): Delete.
6993 (disabled_regsets, num_regsets): Delete.
6994 (linux_add_process): Adjust to set the new per-process
6996 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6997 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6998 was a stop. When calling arch_setup, switch the current inferior
6999 to the thread that got an event.
7000 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7001 (regsets_fetch_inferior_registers)
7002 (regsets_store_inferior_registers): New regsets_info parameter.
7004 (linux_register_in_regsets): New regs_info parameter. Adjust to
7006 (register_addr, fetch_register, store_register): New usrregs_info
7007 parameter. Adjust to use it.
7008 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7009 parameter regs_info. Adjust to use it.
7010 (linux_fetch_registers): Get the current inferior's regs_info, and
7012 (linux_store_registers): Ditto.
7013 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7014 (initialize_low): Don't initialize the target_regsets here. Call
7015 initialize_low_arch.
7016 * linux-low.h (target_regsets): Delete declaration.
7017 (struct regsets_info): New.
7018 (struct usrregs_info): New.
7019 (struct regs_info): New.
7020 (struct process_info_private) <new_inferior>: New field.
7021 (struct linux_target_ops): Delete the num_regs, regmap, and
7022 regset_bitmap fields. New field regs_info.
7023 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7024 * i387-fp.c (num_xmm_registers): Delete.
7025 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7026 calls to new interface.
7027 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7028 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7029 Infer the number of xmm registers from the regcache's target
7031 * i387-fp.h (num_xmm_registers): Delete.
7032 * inferiors.c (add_thread): Don't install the thread's regcache
7034 * proc-service.c (gregset_info): Fetch the current inferior's
7035 regs_info. Adjust to use it.
7036 * regcache.c: Include tdesc.h.
7037 (register_bytes, reg_defs, num_registers)
7038 (gdbserver_expedite_regs): Delete.
7039 (get_thread_regcache): If the thread doesn't have a regcache yet,
7040 create one, instead of aborting gdbserver.
7041 (regcache_invalidate_one): Rename to ...
7042 (regcache_invalidate_thread): ... this.
7043 (regcache_invalidate_one): New.
7044 (regcache_invalidate): Only invalidate registers of the current
7046 (init_register_cache): Add target_desc parameter, and use it.
7047 (new_register_cache): Ditto. Assert the target description has a
7048 non zero registers_size.
7049 (regcache_cpy): Add assertions. Adjust.
7050 (realloc_register_cache, set_register_cache): Delete.
7051 (registers_to_string, registers_from_string): Adjust.
7052 (find_register_by_name, find_regno, find_register_by_number)
7053 (register_cache_size): Add target_desc parameter, and use it.
7054 (free_register_cache_thread, free_register_cache_thread_one)
7055 (regcache_release, register_cache_size): New.
7056 (register_size): Add target_desc parameter, and use it.
7057 (register_data, supply_register, supply_register_zeroed)
7058 (supply_regblock, supply_register_by_name, collect_register)
7059 (collect_register_as_string, collect_register_by_name): Adjust.
7060 * regcache.h (struct target_desc): Forward declare.
7061 (struct regcache) <tdesc>: New field.
7062 (init_register_cache, new_register_cache): Add target_desc
7064 (regcache_invalidate_thread): Declare.
7065 (regcache_invalidate_one): Delete declaration.
7066 (regcache_release): Declare.
7067 (find_register_by_number, register_cache_size, register_size)
7068 (find_regno): Add target_desc parameter.
7069 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7071 * remote-utils.c: Include tdesc.h.
7072 (outreg, prepare_resume_reply): Adjust.
7073 * server.c: Include tdesc.h.
7074 (gdbserver_xmltarget): Delete declaration.
7075 (get_features_xml, process_serial_event): Adjust.
7076 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7078 (struct process_info) <tdesc>: New field.
7079 (ipa_tdesc): Declare.
7080 * tdesc.c: New file.
7081 * tdesc.h: New file.
7082 * tracepoint.c: Include tdesc.h.
7083 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7084 (get_context_regcache): Adjust to pass ipa_tdesc down.
7085 (do_action_at_tracepoint): Adjust to get the register cache size
7086 from the context regcache's description.
7087 (traceframe_walk_blocks): Adjust to get the register cache size
7088 from the current trace frame's description.
7089 (traceframe_get_pc): Adjust to get current trace frame's
7090 description and pass it down.
7091 (gdb_collect): Adjust to get the register cache size from the
7093 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7094 (gdbserver_xmltarget): Delete.
7095 (initialize_low_tracepoint): Set the ipa's target description.
7096 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7097 (initialize_low_tracepoint): Set the ipa's target description.
7098 * linux-x86-low.c: Include tdesc.h.
7099 [__x86_64__] (is_64bit_tdesc): New.
7100 (ps_get_thread_area, x86_get_thread_area): Use it.
7101 (i386_cannot_store_register): Rename to ...
7102 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7103 (i386_cannot_fetch_register): Rename to ...
7104 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7105 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7107 (target_regsets): Rename to ...
7108 (x86_regsets): ... this.
7109 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7111 (x86_siginfo_fixup): Use is_64bit_tdesc.
7112 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7113 (tdesc_x32_avx_linux, tdesc_x32_linux)
7114 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7116 (x86_linux_update_xmltarget): Delete.
7117 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7118 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7119 (AMD64_LINUX_USER64_CS): New.
7120 (x86_linux_read_description): New, based on
7121 x86_linux_update_xmltarget.
7122 (same_process_callback): New.
7123 (x86_arch_setup_process_callback): New.
7124 (x86_linux_update_xmltarget): New.
7125 (x86_regsets_info): New.
7126 (amd64_linux_regs_info): New.
7127 (i386_linux_usrregs_info): New.
7128 (i386_linux_regs_info): New.
7129 (x86_linux_regs_info): New.
7130 (x86_arch_setup): Reimplement.
7131 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7132 (x86_emit_ops): Ditto.
7133 (the_low_target): Adjust. Install x86_linux_regs_info,
7134 x86_cannot_fetch_register, and x86_cannot_store_register.
7135 (initialize_low_arch): New.
7136 * linux-ia64-low.c (tdesc_ia64): Declare.
7137 (ia64_fetch_register): Adjust.
7138 (ia64_usrregs_info, regs_info): New globals.
7139 (ia64_regs_info): New function.
7140 (the_low_target): Adjust.
7141 (initialize_low_arch): New function.
7142 * linux-sparc-low.c (tdesc_sparc64): Declare.
7143 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7145 (sparc_arch_setup): New function.
7146 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7147 (the_low_target): Adjust.
7148 (initialize_low_arch): New function.
7149 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7150 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7151 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7152 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7153 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7154 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7155 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7156 (tdesc_powerpc_isa205_vsx64l): Declare.
7157 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7158 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7159 (ppc_set_pc, ppc_get_hwcap): Adjust.
7160 (ppc_usrregs_info): Forward declare.
7161 (!__powerpc64__) ppc_regmap_adjusted: New global.
7162 (ppc_arch_setup): Adjust to the current process'es target
7164 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7165 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7166 (ppc_store_evrregset): Adjust.
7167 (target_regsets): Rename to ...
7168 (ppc_regsets): ... this, and make static.
7169 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7170 (ppc_regs_info): New function.
7171 (the_low_target): Adjust.
7172 (initialize_low_arch): New function.
7173 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7174 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7175 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7176 (tdesc_s390x_linux64v2): Declare.
7177 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7178 (s390_fill_gregset, s390_store_last_break): Adjust.
7179 (target_regsets): Rename to ...
7180 (s390_regsets): ... this, and make static.
7181 (s390_get_pc, s390_set_pc): Adjust.
7182 (s390_get_hwcap): New target_desc parameter, and use it.
7183 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7184 (s390_arch_setup): Adjust to set the current process'es target
7185 description. Don't adjust the regmap.
7186 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7187 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7188 (regs_info_3264): New globals.
7189 (s390_regs_info): New function.
7190 (the_low_target): Adjust.
7191 (initialize_low_arch): New function.
7192 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7193 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7194 [__mips64] (init_registers_mips_linux)
7195 (init_registers_mips_dsp_linux): Delete defines.
7196 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7197 (have_dsp): New global.
7198 (mips_read_description): New, based on mips_arch_setup.
7199 (mips_arch_setup): Reimplement.
7200 (get_usrregs_info): New function.
7201 (mips_cannot_fetch_register, mips_cannot_store_register)
7202 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7203 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7204 (target_regsets): Rename to ...
7205 (mips_regsets): ... this, and make static.
7206 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7207 (dsp_regs_info, regs_info): New globals.
7208 (mips_regs_info): New function.
7209 (the_low_target): Adjust.
7210 (initialize_low_arch): New function.
7211 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7212 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7214 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7215 (arm_read_description): New, with bits factored from
7217 (arm_arch_setup): Reimplement.
7218 (target_regsets): Rename to ...
7219 (arm_regsets): ... this, and make static.
7220 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7221 (arm_regs_info): New function.
7222 (the_low_target): Adjust.
7223 (initialize_low_arch): New function.
7224 * linux-m68k-low.c (tdesc_m68k): Declare.
7225 (target_regsets): Rename to ...
7226 (m68k_regsets): ... this, and make static.
7227 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7228 (m68k_regs_info): New function.
7229 (m68k_arch_setup): New function.
7230 (the_low_target): Adjust.
7231 (initialize_low_arch): New function.
7232 * linux-sh-low.c (tdesc_sharch): Declare.
7233 (target_regsets): Rename to ...
7234 (sh_regsets): ... this, and make static.
7235 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7236 (sh_regs_info, sh_arch_setup): New functions.
7237 (the_low_target): Adjust.
7238 (initialize_low_arch): New function.
7239 * linux-bfin-low.c (tdesc_bfin): Declare.
7240 (bfin_arch_setup): New function.
7241 (bfin_usrregs_info, regs_info): New globals.
7242 (bfin_regs_info): New function.
7243 (the_low_target): Adjust.
7244 (initialize_low_arch): New function.
7245 * linux-cris-low.c (tdesc_cris): Declare.
7246 (cris_arch_setup): New function.
7247 (cris_usrregs_info, regs_info): New globals.
7248 (cris_regs_info): New function.
7249 (the_low_target): Adjust.
7250 (initialize_low_arch): New function.
7251 * linux-cris-low.c (tdesc_crisv32): Declare.
7252 (cris_arch_setup): New function.
7253 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7254 (cris_regs_info): New function.
7255 (the_low_target): Adjust.
7256 (initialize_low_arch): New function.
7257 * linux-m32r-low.c (tdesc_m32r): Declare.
7258 (m32r_arch_setup): New function.
7259 (m32r_usrregs_info, regs_info): New globals.
7260 (m32r_regs_info): Adjust.
7261 (initialize_low_arch): New function.
7262 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7263 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7264 (tic6x_usrregs_info): Forward declare.
7265 (tic6x_read_description): New function, based on ...
7266 (tic6x_arch_setup): ... this. Reimplement.
7267 (target_regsets): Rename to ...
7268 (tic6x_regsets): ... this, and make static.
7269 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7270 (tic6x_regs_info): New function.
7271 (the_low_target): Adjust.
7272 (initialize_low_arch): New function.
7273 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7274 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7275 (target_regsets): Rename to ...
7276 (xtensa_regsets): ... this, and make static.
7277 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7279 (xtensa_arch_setup, xtensa_regs_info): New functions.
7280 (the_low_target): Adjust.
7281 (initialize_low_arch): New function.
7282 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7283 (nios2_arch_setup): Set the current process'es tdesc.
7284 (target_regsets): Rename to ...
7285 (nios2_regsets): ... this.
7286 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7287 (nios2_regs_info): New function.
7288 (the_low_target): Adjust.
7289 (initialize_low_arch): New function.
7290 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7291 (aarch64_arch_setup): Set the current process'es tdesc.
7292 (target_regsets): Rename to ...
7293 (aarch64_regsets): ... this.
7294 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7295 (aarch64_regs_info): New function.
7296 (the_low_target): Adjust.
7297 (initialize_low_arch): New function.
7298 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7300 (target_regsets): Rename to ...
7301 (tile_regsets): ... this.
7302 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7303 (tile_regs_info): New function.
7304 (tile_arch_setup): Set the current process'es tdesc.
7305 (the_low_target): Adjust.
7306 (initialize_low_arch): New function.
7307 * spu-low.c (tdesc_spu): Declare.
7308 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7309 * win32-arm-low.c (tdesc_arm): Declare.
7310 (arm_arch_setup): New function.
7311 (the_low_target): Install arm_arch_setup instead of
7313 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7314 (init_windows_x86): Rename to ...
7315 (i386_arch_setup): ... this. Set `win32_tdesc'.
7316 (the_low_target): Adjust.
7317 * win32-low.c (win32_tdesc): New global.
7318 (child_add_thread): Don't create the thread cache here.
7319 (do_initial_child_stuff): Set the new process'es tdesc.
7320 * win32-low.h (struct target_desc): Forward declare.
7321 (win32_tdesc): Declare.
7322 * lynx-i386-low.c (tdesc_i386): Declare global.
7323 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7324 * lynx-low.c (lynx_tdesc): New global.
7325 (lynx_add_process): Set the new process'es tdesc.
7326 * lynx-low.h (struct target_desc): Forward declare.
7327 (lynx_tdesc): Declare global.
7328 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7329 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7330 * nto-low.c (nto_tdesc): New global.
7331 (do_attach): Set the new process'es tdesc.
7332 * nto-low.h (struct target_desc): Forward declare.
7333 (nto_tdesc): Declare.
7334 * nto-x86-low.c (tdesc_i386): Declare.
7335 (nto_x86_arch_setup): Set `nto_tdesc'.
7337 2013-06-04 Gary Benson <gbenson@redhat.com>
7339 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7340 to qSupported response when appropriate.
7341 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7342 with nonzero-length annex.
7343 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7344 arguments supplied in annex.
7346 2013-05-31 Doug Evans <dje@google.com>
7349 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7350 64 bits in 64-cross-32 environment.
7352 2013-05-28 Pedro Alves <palves@redhat.com>
7354 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7355 (aarch64-without-fpu.c): Delete rule.
7356 * configure.srv (aarch64*-*-linux*): Remove references to
7357 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7358 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7361 2013-05-24 Pedro Alves <palves@redhat.com>
7363 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7364 instead of strchr/decode_address. Error if the range isn't split
7365 with a ','. Don't assume there's be a ':' in the action.
7367 2013-05-23 Yao Qi <yao@codesourcery.com>
7368 Pedro Alves <palves@redhat.com>
7370 * linux-low.c (lwp_in_step_range): New function.
7371 (linux_wait_1): If the thread was range stepping and stopped
7372 outside the stepping range, report the stop to GDB. Otherwise,
7373 continue stepping. Add range stepping debug output.
7374 (linux_set_resume_request): Copy the step range from the resume
7376 (linux_supports_range_stepping): New.
7377 (linux_target_ops) <supports_range_stepping>: Set to
7378 linux_supports_range_stepping.
7379 * linux-low.h (struct linux_target_ops)
7380 <supports_range_stepping>: New field.
7381 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7382 * linux-x86-low.c (x86_supports_range_stepping): New.
7383 (the_low_target) <supports_range_stepping>: Set to
7384 x86_supports_range_stepping.
7385 * server.c (handle_v_cont): Handle 'r' action.
7386 (handle_v_requests): Append ";r" if the target supports range
7388 * target.h (struct thread_resume) <step_range_start,
7389 step_range_end>: New fields.
7390 (struct target_ops) <supports_range_stepping>:
7392 (target_supports_range_stepping): New macro.
7394 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7396 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7397 confusion in comment.
7399 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7401 * lynx-low.c (struct process_info_private): New type.
7402 (lynx_add_process): New function.
7403 (lynx_create_inferior, lynx_attach): Replace calls to
7404 add_process by calls to lynx_add_process.
7405 (lynx_resume): If PTID is null, then try using
7406 current_process()->private->last_wait_event_ptid.
7408 (lynx_clear_inferiors): Delete. The contents of that function
7409 has been inlined in lynx_mourn;
7410 (lynx_wait_1): Save the ptid in the process's private data.
7411 (lynx_mourn): Free the process' private data. Replace call
7412 to lynx_clear_inferiors by call to clear_inferiors.
7414 2013-05-17 Yao Qi <yao@codesourcery.com>
7416 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7419 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7421 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7422 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7423 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7424 PT_TEXT_END_ADDR guards. Update comments.
7425 (linux_target_op) <read_offsets>: Conditionally define to
7426 linux_read_offsets if the target is UCLIBC and if it defines
7427 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7429 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7430 Andrew Jenner <andrew@codesourcery.com>
7432 * Makefile.in (SFILES): Add linux-nios2-low.c.
7433 (clean): Add action to delete nios2-linux.c.
7434 (nios2-linux.c): New rule.
7435 * configure.srv: Add nios2*-*-linux*.
7436 * linux-nios2-low.c: New.
7438 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7440 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7442 2013-04-25 Hui Zhu <hui@codesourcery.com>
7445 * ax.c (ax_printf): Add fflush.
7447 2013-04-22 Tom Tromey <tromey@redhat.com>
7449 * Makefile.in (SFILES): Add filestuff.c.
7450 (OBS): Add filestuff.o.
7451 (filestuff.o): New target.
7452 * config.in, configure: Rebuild.
7453 * configure.ac: Check for fdwalk, pipe2.
7455 2013-04-17 Pedro Alves <palves@redhat.com>
7457 * configure.ac (USE_THREAD_DB): Delete variable.
7458 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7459 Don't AC_SUBST USE_THREAD_DB.
7460 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7461 * config.in, configure: Regenerate.
7463 2013-04-16 Pedro Alves <palves@redhat.com>
7465 * linux-low.h (struct lwp_info) <thread_known>: Move under
7466 the USE_THREAD_DB #ifdef.
7468 2013-04-16 Pedro Alves <palves@redhat.com>
7470 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7471 (linux-low.o): Delete rule.
7472 * linux-low.h: Always include "gdb_thread_db.h" instead of
7473 conditionally including thread_db.h.
7474 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7477 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7479 * Makefile.in (install-only): Fix make install regression.
7481 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7483 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7484 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7486 * gdbserver.1: Remove.
7488 2013-03-22 Pedro Alves <palves@redhat.com>
7490 * linux-low.c (handle_extended_wait): Don't call
7491 linux_enable_event_reporting.
7493 2013-03-15 Tony Theodore <tonyt@logyst.com>
7496 * Makefile.in (SHELL): Use @SHELL@.
7498 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7500 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7503 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7505 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7506 Remove extraneous NULL element.
7508 2013-03-13 Yao Qi <yao@codesourcery.com>
7510 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7511 'V' block in trace frame.
7513 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7515 * target.h (struct target_ops): Add btrace ops.
7516 (target_supports_btrace): New macro.
7517 (target_enable_btrace): New macro.
7518 (target_disable_btrace): New macro.
7519 (target_read_btrace): New macro.
7520 * gdbthread.h (struct thread_info): Add btrace field.
7521 * server.c: Include btrace-common.h.
7522 (handle_btrace_general_set): New function.
7523 (handle_btrace_enable): New function.
7524 (handle_btrace_disable): New function.
7525 (handle_general_set): Call handle_btrace_general_set.
7526 (handle_qxfer_btrace): New function.
7527 (struct qxfer qxfer_packets[]): Add btrace entry.
7528 * inferiors.c (remove_thread): Disable btrace.
7529 * linux-low: Include linux-btrace.h.
7530 (linux_low_enable_btrace): New function.
7531 (linux_low_read_btrace): New function.
7532 (linux_target_ops): Add btrace ops.
7533 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7534 Add srv_linux_btrace=yes.
7535 (x86_64-*-linux*): Add linux-btrace.o.
7536 Add srv_linux_btrace=yes.
7537 * configure.ac: Define HAVE_LINUX_BTRACE.
7538 * config.in: Regenerated.
7539 * configure: Regenerated.
7541 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7543 * server.c (handle_qxfer): Preserve error message if -3 is
7545 (qxfer): Document the -3 return value.
7547 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7549 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7550 (linux_btrace_h): New variable.
7551 (linux-btrace.o): New rule.
7553 2013-03-08 Stan Shebs <stan@codesourcery.com>
7554 Hafiz Abid Qadeer <abidh@codesourcery.com>
7556 * tracepoint.c (trace_buffer_size): New global.
7557 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7558 (init_trace_buffer): Change to one-argument function. Allocate
7559 trace buffer memory.
7560 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7561 handle QTBuffer:size packet.
7562 (cmd_bigqtbuffer_size): New function.
7563 (initialize_tracepoint): Call init_trace_buffer with
7564 DEFAULT_TRACE_BUFFER_SIZE.
7565 * server.c (handle_query): Add QTBuffer:size in the
7568 2013-03-07 Yao Qi <yao@codesourcery.com>
7570 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7571 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7573 (cmd_qtsp): Adjust condition. Do post increment.
7574 Set cur_action and cur_step_action back to 0.
7576 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7579 * linux-low.c (linux_write_memory): Return early success if LEN is
7582 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7584 * configure.srv: Add x86_64-*-cygwin* as target.
7586 2013-02-28 Tom Tromey <tromey@redhat.com>
7588 * configure.ac: Invoke AC_SYS_LARGEFILE.
7589 * configure, config.in: Rebuild.
7591 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7593 * win32-low.c: Throughout, fix format strings and casts of
7594 printf-like functions to avoid type related warnings on all
7596 (get_child_debug_event): Print dwDebugEventCode as hex since
7597 that's how it's usually documented.
7599 2013-02-28 Yao Qi <yao@codesourcery.com>
7601 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7604 2013-02-27 Jiong Wang <jiwang@tilera.com>
7606 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7607 (reg-tilegx32.c): New rule.
7608 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7609 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7610 different register info initializer according to elf class.
7611 (init_registers_tilgx32): New function. The tilegx32 register info
7613 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7614 (tile_store_gregset): Likewise.
7616 2013-02-27 Yao Qi <yao@codesourcery.com>
7618 * server.c (process_point_options): Print debug message when
7619 debug_threads is true.
7621 2013-02-26 Yao Qi <yao@codesourcery.com>
7623 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7625 2013-02-19 Pedro Alves <palves@redhat.com>
7626 Kai Tietz <ktietz@redhat.com>
7630 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7631 instead of strtoul to extract address from packet.
7632 (process_serial_event) <'z'>: Likewise.
7634 2013-02-18 Yao Qi <yao@codesourcery.com>
7636 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7638 2013-02-14 Pedro Alves <palves@redhat.com>
7642 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7643 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7645 2013-02-14 Pedro Alves <palves@redhat.com>
7647 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7649 2013-02-14 Pedro Alves <palves@redhat.com>
7651 * tracepoint.c (save_string): Delete.
7652 (add_tracepoint_action): Use savestring instead of save_string.
7654 2013-02-12 Pedro Alves <palves@redhat.com>
7656 * linux-xtensa-low.c: Ditto.
7657 * xtensa-xtregs.c: Ditto.
7659 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7661 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7664 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7666 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7667 aarch64_num_wp_regs and aarch64_num_bp_regs to
7668 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7670 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7672 * linux-aarch64-low.c (ps_get_thread_area): Replace
7673 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7675 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7676 Marcus Shawcroft <marcus.shawcroft@arm.com>
7677 Nigel Stephens <nigel.stephens@arm.com>
7678 Yufeng Zhang <yufeng.zhang@arm.com>
7680 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7681 (aarch64.c, aarch64-without-fpu.c): New targets.
7682 * configure.srv (aarch64*-*-linux*): New.
7683 * linux-aarch64-low.c: New file.
7685 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7687 * linux-low.c (handle_extended_wait, linux_create_inferior)
7688 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7689 (dequeue_one_deferred_signal, linux_resume_one_thread)
7690 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7691 (linux_tracefork_grandchild, linux_test_for_tracefork)
7692 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7693 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7694 where the argument is 0.
7696 2013-01-25 Yao Qi <yao@codesourcery.com>
7698 * event-loop.c: Include "queue.h".
7699 (gdb_event_p): New typedef.
7700 (struct gdb_event) <next_event>: Remove.
7701 (event_queue): Change to QUEUE(gdb_event_p).
7702 (async_queue_event): Remove.
7703 (gdb_event_xfree): New.
7704 (initialize_event_loop): New.
7705 (process_event): Use API from QUEUE.
7706 (wait_for_event): Likewise.
7707 * server.c (main): Call initialize_event_loop.
7708 * server.h (initialize_event_loop): Declare.
7710 2013-01-18 Yao Qi <yao@codesourcery.com>
7712 * ax.h (struct eval_agent_expr_context): New.
7713 (gdb_eval_agent_expr): Update declaration.
7714 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7715 TFRAME. Add new argument CTX.
7716 * server.h (struct eval_agent_expr_context): Declare.
7717 (agent_mem_read, agent_tsv_read): Update declaration.
7718 (agent_mem_read_string): Likewise.
7719 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7720 (add_traceframe_block): Add new argument TPOINT.
7721 Increase TPOINT->traceframe_usage.
7722 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7723 eval_tracepoint_agent_expr.
7724 (condition_true_at_tracepoint): Likewise.
7725 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7726 (agent_mem_read_string, agent_tsv_read): Likewise.
7728 2013-01-16 Yao Qi <yao@codesourcery.com>
7730 * linux-low.c (linux_resume_one_lwp): Don't check
7731 'lwp->bp_reinsert != 0'.
7733 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7734 Pedro Alves <palves@redhat.com>
7736 * lynx-low.c (ptrace_request_to_str): Define a temporary
7737 macro and use it to simplify this function's implementation.
7739 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7741 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7744 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7746 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7748 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7750 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7752 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7754 * lynx-low.c (lynx_resume): Use the resume_info parameter
7755 to determine the ptid for the lynx_ptrace call, unless
7756 it is equal to minus_one_ptid, in which case we use the
7757 ptid of the current_inferior.
7758 (lynx_wait_1): After having received a thread create/exit
7759 event, resume the inferior's execution using the signaling
7760 thread's ptid, rather than the old ptid.
7762 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7764 * lynx-low.c (lynx_resume): Delete variable ret.
7766 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7768 * gdbreplay.c (gdbreplay_version): Update copyright year.
7769 * server.c (gdbserver_version): Likewise.
7771 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7773 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7776 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7778 * lynx-low.c (ptrace_request_to_str): Add handling for
7781 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7783 * lynx-low.c (lynx_attach): Delete variable new_process.
7785 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7787 * lynx-low.c (lynx_create_inferior): Delete variable
7790 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7792 * lynx-low.c (ptrace_request_to_str): Do not handle
7793 PTRACE_GETTHREADLIST if this macro does not exist.
7795 2012-12-15 Yao Qi <yao@codesourcery.com>
7797 * Makefile.in (OBS): Add notif.o.
7798 * notif.c, notif.h: New.
7799 * server.c: Include "notif.h".
7800 (struct vstop_notif) <next>: Remove.
7802 (queue_stop_reply): Update.
7803 (push_event, send_next_stop_reply): Remove.
7804 (discard_queued_stop_replies): Update.
7805 (notif_stop): New variable.
7806 (handle_v_stopped): Remove.
7807 (handle_v_requests): Don't call handle_v_stopped. Call
7808 handle_ack_notif instead.
7809 (queue_stop_reply_callback): Call notif_event_enque instead
7810 of queue_stop_reply.
7811 (handle_status): Don't call send_next_stop_reply, call
7812 notif_write_event instead.
7813 (kill_inferior_callback): Likewise.
7814 (detach_or_kill_inferior_callback): Likewise.
7815 (main): Call initialize_notif.
7816 (process_serial_event): Call QUEUE_is_empty.
7817 (handle_target_event): Call notif_push instead of push event.
7818 * server.h (push_event): Remove declaration.
7820 2012-12-10 Tom Tromey <tromey@redhat.com>
7822 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7823 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7826 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7827 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7828 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7829 (amd64-linux-ipa.o, ax.o): Rewrite.
7830 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7831 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7832 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7833 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7834 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7835 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7836 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7837 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7838 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7839 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7840 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7841 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7842 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7843 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7844 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7845 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7846 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7847 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7848 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7849 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7850 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7851 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7852 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7853 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7854 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7855 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7856 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7857 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7858 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7859 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7860 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7861 (reg-tilegx.o): Remove.
7862 (all_object_files): New macro.
7863 Include .deps files.
7864 * aclocal.m4, configure: Rebuild.
7865 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7866 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7867 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7869 2012-12-05 Tom Tromey <tromey@redhat.com>
7872 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7874 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7876 * configure.ac: Check for linux/perf_event.h.
7877 * config.in: Regenerated.
7878 * configure: Regenerated.
7880 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7882 * hostio.c (handle_readlink): Decrease buffer size
7883 parameter passed to readlink by one byte.
7885 2012-11-26 Yao Qi <yao@codesourcery.com>
7887 * configure.ac (build_warnings): Append '-Wempty-body'.
7888 * configure: Regenerated.
7889 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7892 2012-11-15 Pierre Muller <muller@sourceware.org>
7894 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7895 * config.in: Regenerate.
7896 * configure: Regenerate.
7897 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7898 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7899 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7900 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7902 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7903 instead of <sys/wait.h> header.
7904 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7906 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7908 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7909 (various make rules): Remove -DGDBSERVER
7911 2012-11-09 Yao Qi <yao@codesourcery.com>
7913 * spu-low.c (current_ptid): Move it to ..
7914 * gdbthread.h: ... here. New.
7915 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7916 * server.c (myresume, process_serial_event): Likewise.
7917 * thread-db.c (thread_db_find_new_threads): Likewise.
7918 * tracepoint.c (run_inferior_command): Likewise.
7920 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7922 * server.c (handle_search_memory_1): Include access length in
7925 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7927 * linux-crisv32-low.c: Fix compile errors.
7929 2012-09-04 Yao Qi <yao@codesourcery.com>
7931 * tracepoint.c (cmd_qtsv): Adjust debug message.
7932 Don't check CUR_TPOINT.
7934 2012-08-28 Yao Qi <yao@codesourcery.com>
7936 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7937 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7938 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7939 Remove declarations of xmalloc, xreallloc, xstrdup and
7941 * Makefile.in (libiberty_h): New.
7942 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7943 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7945 2012-08-23 Yao Qi <yao@codesourcery.com>
7947 * server.h: Remove declaration of 'xsnprintf'.
7949 2012-08-22 Keith Seitz <keiths@redhat.com>
7951 * server.h: Include build-gnulib-gbserver/config.h.
7952 * gdbreplay.c: Likewise.
7954 2012-08-08 Doug Evans <dje@google.com>
7956 * Makefile.in (SFILES): Add gdb_vecs.c.
7957 (OBS): Add gdb_vecs.o.
7958 (gdb_vecs_h, host_defs_h): New variables.
7959 (thread-db.o): Add $(gdb_vecs_h) dependency.
7960 (gdb_vecs.o): New rule.
7961 * thread-db.c: #include "gdb_vecs.h".
7962 (thread_db_load_search): Use a vector to iterate over path elements.
7963 Handle text appearing after "$pdir".
7965 * configure.ac: Add check for strstr.
7966 * config.in: Regenerate.
7967 * configure: Regenerate.
7969 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7971 * hostio.c (handle_pread): If pread fails, fall back to attempting
7973 (handle_pwrite): Likewise for pwrite.
7975 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7977 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7978 between unsupported TYPE and unimplementable ADDR/LEN combination.
7979 (arm_insert_point): Act on new return value.
7981 2012-07-31 Pedro Alves <palves@redhat.com>
7983 * server.c (process_point_options): Only skip tokens if we find
7984 one that is unrecognized. Don't treat 'X' specially while
7985 skipping unrecognized tokens.
7987 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7989 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7990 to 4-byte-align HW breakpoint addresses for Thumb.
7992 2012-07-27 Yao Qi <yao@codesourcery.com>
7996 * server.h: Declare gdb_agent_about_to_close.
7997 * target.c (kill_inferior): Include "agent.h".
7998 New. Send command 'kill'.
7999 * target.h (kill_inferior): Removed macro.
8000 * tracepoint.c (gdb_agent_about_to_close): New.
8001 (gdb_agent_helper_thread): Handle command 'close'.
8002 Wait endlessly until the inferior stops.
8003 Install gdb_agent_remove_socket to atexit hook.
8004 (agent_socket_name): New static variable.
8005 (gdb_agent_socket_init): Replace local variable 'name' with
8006 'agent_socket_name'.
8007 (gdb_agent_remove_socket): New.
8009 2012-07-27 Yao Qi <yao@codesourcery.com>
8011 * server.c (process_point_options): Stop at 'X' when parsing.
8013 2012-07-19 Michael Eager <eager@eagercon.com>
8015 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8017 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8018 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8019 hardware breakpoint.
8021 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8023 * gdbserver/linux-low.c (initialize_low): Call
8024 linux_ptrace_init_warnings.
8026 2012-07-02 Doug Evans <dje@google.com>
8028 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8031 2012-07-02 Stan Shebs <stan@codesourcery.com>
8033 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8034 (ax.o): Add it to build rule.
8036 (OBS): Add format.o.
8037 (IPA_OBS): Add format.o.
8038 * server.c (handle_query): Claim support for breakpoint commands.
8039 (process_point_options): Add command case.
8040 (process_serial_event): Leave running if there are printfs in
8042 * mem-break.h (any_persistent_commands): Declare.
8043 (add_breakpoint_commands): Declare.
8044 (gdb_no_commands_at_breakpoint): Declare.
8045 (run_breakpoint_commands): Declare.
8046 * mem-break.c (struct point_command_list): New struct.
8047 (struct breakpoint): New field command_list.
8048 (any_persistent_commands): New function.
8049 (add_commands_to_breakpoint): New function.
8050 (add_breakpoint_commands): New function.
8051 (gdb_no_commands_at_breakpoint): New function.
8052 (run_breakpoint_commands): New function.
8053 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8055 * ax.c: Include format.h.
8056 (ax_printf): New function.
8057 (gdb_eval_agent_expr): Add printf opcode.
8059 2012-06-13 Yao Qi <yao@codesourcery.com>
8061 * server.c (start_inferior): Remove duplicated writes to fields
8062 'last_resume_kind' and 'last_status' of 'current_inferior'.
8064 2012-06-12 Yao Qi <yao@codesourcery.com>
8065 Pedro Alves <palves@redhat.com>
8067 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8069 * server.c (handle_v_cont): Extend comment.
8071 2012-06-11 Yao Qi <yao@codesourcery.com>
8073 * linux-low.c (linux_attach): Add 'static'.
8075 2012-06-06 Yao Qi <yao@codesourcery.com>
8077 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8079 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8081 Fix gcc -flto compilation warning.
8082 * server.c (main): Make variable multi_mode and attach volatile.
8084 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8086 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8087 if the platform doesn't know about it.
8089 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8091 * Makefile.in (SFILES): Add linux-tile-low.c.
8092 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8093 * configure.srv: Handle tilegx-*-linux*.
8094 * linux-tile-low.c: New file.
8096 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8098 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8100 2012-05-24 Pedro Alves <palves@redhat.com>
8104 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8106 2012-05-24 Pedro Alves <palves@redhat.com>
8110 Replace target_signal with gdb_signal throughout.
8112 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8114 * linux-low.c (linux_store_registers): Avoid the copying sequence
8115 when no data has been retrieved by ptrace.
8117 2012-05-22 Will Deacon <will.deacon@arm.com>
8119 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8120 Include asm/ptrace.h.
8121 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8124 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8126 * linux-low.c (linux_store_registers): Don't re-retrieve data
8127 with ptrace that has already been obtained from /proc. Always
8128 copy any data retrieved with ptrace to the buffer supplied.
8130 2012-05-11 Yao Qi <yao@codesourcery.com>
8131 Pedro Alves <palves@redhat.com>
8133 * linux-low.c (enum stopping_threads_kind): New.
8134 (stopping_threads): Change type to `enum stopping_threads_kind'.
8135 (handle_extended_wait): If stopping and suspending threads, leave
8136 the new_lwp suspended too.
8137 (linux_wait_for_event): Adjust.
8138 (stop_all_lwps): Set `stopping_threads' to
8139 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8140 whether we're suspending threads or just stopping them. Assert no
8143 2012-04-29 Yao Qi <yao@codesourcery.com>
8145 * server.h: Move some code to ...
8146 * gdbthread.h: ... here. New.
8147 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8148 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8149 (nto-low.o, win32-low.o): Likewise.
8150 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8151 * regcache.c, remote-utils.c, server.c: Likewise.
8152 * target.c, tracepoint.c, win32-low.c: Likewise.
8154 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8156 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8157 (PTRACE_ARG4_TYPE): Likewise.
8158 (PTRACE_XFER_TYPE): Likewise.
8159 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8160 ptrace to PTRACE_ARG3_TYPE.
8161 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8162 (PTRACE_ARG4_TYPE): Likewise.
8163 (PTRACE_XFER_TYPE): Likewise.
8164 (linux_detach_one_lwp): Cast fourth argument of
8165 ptrace to long then PTRACE_ARG4_TYPE.
8166 (regsets_fetch_inferior_registers): Cast third argument of
8167 ptrace to long then PTRACE_ARG3_TYPE.
8168 (regsets_store_inferior_registers): Likewise.
8170 2012-04-20 Pedro Alves <palves@redhat.com>
8172 * configure: Regenerate.
8174 2012-04-19 Pedro Alves <palves@redhat.com>
8176 * Makefile.in (GNULIB_BUILDDIR): New.
8177 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8178 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8179 (all, install-only, uninstall, clean-info, all-lib, clean): No
8180 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8181 (maintainer-clean realclean distclean): Use subdir_do.
8183 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8184 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8185 * acinclude.m4: Include acx_configure_dir.m4.
8186 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8187 calls. Call AC_PROG_RANLIB. Configure gnulib using
8190 (GNULIB_STDINT_H): Adjust.
8191 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8192 * gdbreplay.c: Include build-gnulib/config.h.
8193 * server.h: Likewise.
8194 * aclocal.m4: Regenerate.
8195 * config.in: Regenerate.
8196 * configure: Regenerate.
8198 2012-04-19 Pedro Alves <palves@redhat.com>
8200 * Makefile.in (LIBGNU, INCGNU): Adjust.
8201 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8202 (all, install-only, uninstall, clean-info, all-lib, clean)
8203 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8204 * configure.ac: Adjust AC_OUTPUT output.
8205 * aclocal.m4: Regenerate.
8206 * configure: Regenerate.
8208 2012-04-19 Pedro Alves <palves@redhat.com>
8210 * Makefile.in (generated_files): New.
8211 (server_h): Remove the explicit dependency on config.h, and depend
8212 on $generated_files.
8214 2012-04-19 Pedro Alves <palves@redhat.com>
8216 * Makefile.in (INCGNU): Add -Ignulib.
8218 2012-04-19 Pedro Alves <palves@redhat.com>
8220 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8221 (INCGNU): ... this, and spell out -I here.
8222 (GNULIB_LIB): Rename to ...
8224 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8226 2012-04-19 Pedro Alves <palves@redhat.com>
8228 * config.in: Regenerate.
8230 2012-04-19 Pedro Alves <palves@redhat.com>
8232 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8233 * server.h (memmem): Remove declaration.
8234 * config.in: Regenerate.
8235 * configure: Regenerate.
8237 2012-04-19 Yao Qi <yao@codesourcery.com>
8239 * Makefile.in (SFILES): Add common/vec.c.
8243 2012-04-19 Yao Qi <yao@codesourcery.com>
8245 * remote-utils.c (prepare_resume_reply): Replace with macro
8246 target_core_of_thread.
8247 * server.c (handle_qxfer_threads_proper): Likewise.
8248 * target.h (traget_core_of_thread): New macro.
8250 2012-04-18 Pedro Alves <palves@redhat.com>
8252 * aclocal.m4: Regenerate.
8253 * configure: Regenerate.
8255 2012-04-16 Yao Qi <yao@codesourcery.com>
8257 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8258 duplicated on address.
8260 2012-04-16 Yao Qi <yao@codesourcery.com>
8262 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8263 (struct tracepoint_action_ops) <send>: New field.
8264 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8265 (agent_expr_send, x_tracepoint_action_send): New.
8266 (l_tracepoint_action_send): New.
8267 (cmd_qtdp): Download and install tracepoint
8268 according to `use_agent'.
8269 (run_inferior_command): Add one more parameter `len'.
8271 (tracepoint_send_agent): New.
8272 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8274 2012-04-16 Yao Qi <yao@codesourcery.com>
8276 * tracepoint.c (download_tracepoints): Moved to ...
8277 (cmd_qtstart): ... here.
8279 2012-04-14 Yao Qi <yao@codesourcery.com>
8281 * tracepoint.c: Include inttypes.h.
8282 (struct collect_memory_action): Use sized types.
8283 (struct tracepoint): Likewise.
8284 (cmd_qtdp, stop_tracing): Update print specifiers.
8285 (cmd_qtp, response_tracepoint): Likewise.
8286 (collect_data_at_tracepoint): Likewise.
8287 (collect_data_at_step): Likewise.
8289 2012-04-14 Yao Qi <yao@codesourcery.com>
8291 Import gnulib module inttypes.
8292 * aclocal.m4, config.in, configure: Regenerated.
8294 2012-04-14 Yao Qi <yao@codesourcery.com>
8296 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8297 Makefile and config.status at last.
8299 2012-04-13 Yao Qi <yao@codesourcery.com>
8301 * tracepoint.c: Include stdint.h unconditionally.
8303 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8305 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8306 on BFD_HAVE_SYS_PROCFS_TYPE.
8307 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8308 * configure: Regenerate.
8309 * config.in: Likewise.
8311 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8313 * Makefile.in (clean): Also remove x32.c x32-linux.c
8314 x32-avx.c x32-avx-linux.c.
8315 (x32.o): New target.
8317 (x32-linux.o): Likewise.
8318 (x32-linux.c): Likewise.
8319 (x32-avx.o): Likewise.
8320 (x32-avx.c): Likewise.
8321 (x32-avx-linux.o): Likewise.
8322 (x32-avx-linux.c): Likewise.
8324 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8325 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8326 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8327 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8328 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8329 i386/x32-avx-linux.xml.
8331 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8332 (init_registers_x32_avx_linux): Likwise.
8333 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8334 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8336 2012-04-13 Pedro Alves <palves@redhat.com>
8338 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8339 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8340 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8341 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8344 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8346 * linux-x86-low.c (compat_x32_clock_t): New.
8347 (compat_x32_siginfo_t): Likewise.
8348 (compat_x32_siginfo_from_siginfo): Likewise.
8349 (siginfo_from_compat_x32_siginfo): Likewise.
8350 (linux_is_elf64): Likewise.
8351 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8352 and siginfo_from_compat_x32_siginfo for x32.
8353 (x86_arch_setup): Set linux_is_elf64.
8355 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8358 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8360 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8361 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8362 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8363 compatible with process.
8365 2012-04-12 Yao Qi <yao@codesourcery.com>
8367 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8368 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8369 (install-only, install-info, clean): Handle sub dir gnulib.
8370 (all-lib, am--refresh): New targets.
8371 (memmem.o): Remove target.
8372 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8373 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8374 (AC_REPLACE_FUNCS): Remove memmem.
8375 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8376 (AC_OUTPUT): Generate Makefile in gnulib/.
8377 * aclocal.m4, config.in, configure: Regenerated.
8379 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8381 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8383 2012-04-05 Pedro Alves <palves@redhat.com>
8385 -Werror=strict-aliasing
8387 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8390 2012-04-04 Pedro Alves <palves@redhat.com>
8392 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8393 (sparc_store_gregset_from_stack, sparc_store_gregset)
8394 (sparc_breakpoint_at): Fix formatting.
8396 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8398 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8400 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8401 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8402 * config.in: Regenerate.
8403 * configure: Likewise.
8405 2012-03-29 Pedro Alves <palves@redhat.com>
8407 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8408 Correct ptrace arguments.
8410 2012-03-28 Pedro Alves <palves@redhat.com>
8412 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8413 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8414 (IA64_FR1_REGNUM): New defines.
8415 (ia64_fetch_register): New.
8416 (the_low_target): Install it.
8417 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8419 * linux-low.c (linux_fetch_registers): Try the
8420 the_low_target.fetch_register hook first.
8422 * linux-arm-low.c (the_low_target): Adjust.
8423 * linux-bfin-low.c (the_low_target): Adjust.
8424 * linux-cris-low.c (the_low_target): Adjust.
8425 * linux-crisv32-low.c (the_low_target): Adjust.
8426 * linux-m32r-low.c (the_low_target): Adjust.
8427 * linux-m68k-low.c (the_low_target): Adjust.
8428 * linux-mips-low.c (the_low_target): Adjust.
8429 * linux-ppc-low.c (the_low_target): Adjust.
8430 * linux-s390-low.c (the_low_target): Adjust.
8431 * linux-sh-low.c (the_low_target): Adjust.
8432 * linux-sparc-low.c (the_low_target): Adjust.
8433 * linux-tic6x-low.c (the_low_target): Adjust.
8434 * linux-x86-low.c (the_low_target): Adjust.
8435 * linux-xtensa-low.c (the_low_target): Adjust.
8437 2012-03-26 Pedro Alves <palves@redhat.com>
8439 * server.c (handle_qxfer_libraries): Don't bail early if
8440 the_target->qxfer_libraries_svr4 is not NULL.
8442 2012-03-26 Pedro Alves <palves@redhat.com>
8444 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8446 2012-03-23 Pedro Alves <palves@redhat.com>
8448 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8449 "library-list-svr4" element's start tag when the the DSO list is
8452 2012-03-23 Pedro Alves <palves@redhat.com>
8454 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8455 a variable whose type size is the same as the inferior's pointer
8458 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8460 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8462 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8463 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8464 * linux-low.h: Include <signal.h>.
8465 (struct siginfo): Remove forward declaration.
8466 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8469 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8471 * .gitignore: Ignore more files.
8473 2012-03-19 Pedro Alves <palves@redhat.com>
8474 Jan Kratochvil <jan.kratochvil@redhat.com>
8476 * server.c (cont_thread, general_thread): Add describing comments.
8477 (start_inferior): Clear `cont_thread'.
8478 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8481 2012-03-15 Yao Qi <yao@codesourcery.com>
8483 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8485 (cmd_qtdp): ... here.
8487 2012-03-15 Yao Qi <yao@codesourcery.com>
8489 * tracepoint.c (struct tracepoint_action_ops): New.
8490 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8491 (m_tracepoint_action_download): New.
8492 (r_tracepoint_action_download): New.
8493 (x_tracepoint_action_download): New.
8494 (l_tracepoint_action_download): New.
8495 (add_tracepoint_action): Install `action->ops' according type.
8496 (download_tracepoint_1): Move code `download' function pointer
8497 of various tracepoint_action_ops.
8499 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8501 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8502 linux_ptrace_attach_warnings.
8504 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8506 * Makefile.in (linux-ptrace.o): New.
8507 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8508 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8509 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8510 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8511 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8513 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8515 2012-03-08 Yao Qi <yao@codesourcery.com>
8516 Pedro Alves <palves@redhat.com>
8518 Fix PR server/13392.
8519 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8521 * tracepoint.c (remove_tracepoint): New.
8522 (cmd_qtdp): Call remove_tracepoint when failed to install.
8524 2012-03-07 Pedro Alves <palves@redhat.com>
8526 * linux-low.c (get_detach_signal): New.
8527 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8528 Pass on pending signals to PTRACE_DETACH. Check the result of the
8530 * server.c (program_signals, program_signals_p): New.
8531 (handle_general_set): Handle QProgramSignals.
8532 * server.h (program_signals, program_signals_p): Declare.
8534 2012-03-05 Pedro Alves <palves@redhat.com>
8535 Jan Kratochvil <jan.kratochvil@redhat.com>
8537 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8540 2012-03-03 Yao Qi <yao@codesourcery.com>
8542 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8543 agent_look_up_symbols.
8545 2012-03-03 Yao Qi <yao@codesourcery.com>
8547 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8548 (linux-x86-low.o): Likewise.
8549 * server.h: Remove in_process_agent_loaded.
8550 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8554 2012-03-03 Yao Qi <yao@codesourcery.com>
8556 * tracepoint.c (gdb_agent_capability): New global.
8557 (in_process_agent_loaded_ust): Renamed to
8558 `in_process_agent_supports_ust'.
8560 (in_process_agent_supports_ust): Call agent_capability_check.
8561 (clear_installed_tracepoints): Assert that agent supports
8564 2012-03-03 Yao Qi <yao@codesourcery.com>
8566 * linux-low.c (linux_supports_agent): New.
8567 (linux_target_ops): Initialize field `supports_agent' with
8568 linux_supports_agent.
8569 * target.h (struct target_ops) <supports_agent>: New.
8570 (target_supports_agent): New macro.
8571 * server.c (handle_general_set): Handle packet 'QAgent'.
8572 (handle_query): Send `QAgent+'.
8573 * Makefile.in (server.o): Depends on agent.h.
8575 2012-03-03 Yao Qi <yao@codesourcery.com>
8577 * Makefile.in (OBS): Add agent.o.
8578 Add new rule for agent.o.
8579 Track dependence of tracepoint.c on agent.h.
8580 * tracepoint.c (run_inferior_command_1):
8581 (run_inferior_command): Call agent_run_command.
8582 (gdb_ust_connect_sync_socket): Deleted. Move it to
8584 (resume_thread, stop_thread): Likewise.
8585 (gdb_ust_socket_init): Renamed to ...
8586 (gdb_agent_socket_init): ... New.
8587 (gdb_ust_thread): Renamed to ...
8588 (gdb_agent_helper_thread): ... New.
8589 (gdb_ust_init): Move some code to ...
8590 (gdb_agent_init): ... here. New.
8591 [HAVE_UST]: Call gdb_ust_init.
8592 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8593 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8594 * config.in, configure: Regenerated.
8596 2012-03-02 Pedro Alves <palves@redhat.com>
8598 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8599 * linux-low.c (struct simple_pid_list): New.
8600 (stopped_pids): New a struct simple_pid_list pointer.
8601 (add_to_pid_list, pull_pid_from_list): New.
8602 (handle_extended_wait): Don't assume the first signal new children
8603 report is SIGSTOP. Adjust call to pull_pid_from_list.
8604 (linux_wait_for_lwp): Adjust.
8606 2012-03-02 Yao Qi <yao@codesourcery.com>
8608 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8611 2012-03-02 Yao Qi <yao@codesourcery.com>
8613 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8614 `stop_pc' and `tpoint'. Update caller.
8616 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8618 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8619 * linux-low.c (use_linux_regsets): New macro.
8620 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8621 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8622 (linux_register_in_regsets): New function.
8623 (usr_fetch_inferior_registers): Skip registers covered by
8625 (usr_store_inferior_registers): Likewise.
8626 (usr_fetch_inferior_registers): New macro.
8627 (usr_store_inferior_registers): Likewise.
8628 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8629 (linux_store_registers): Likewise.
8630 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8632 (init_registers_mips64_dsp_linux): Likewise.
8633 (init_registers_mips_linux): New macro.
8634 (init_registers_mips_dsp_linux): Likewise.
8635 (mips_dsp_num_regs): Likewise.
8636 (DSP_BASE, DSP_CONTROL): New fallback macros.
8637 (mips_base_regs): New macro.
8638 (mips_regmap): Use it. Fix the size.
8639 (mips_dsp_regmap): New variable.
8640 (mips_dsp_regset_bitmap): Likewise.
8641 (mips_arch_setup): New function.
8642 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8644 (mips_cannot_store_register): Likewise.
8645 (the_low_target): Update .arch_setup, .num_regs and .regmap
8646 initializers. Add .regset_bitmap initializer.
8647 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8649 * linux-bfin-low.c (the_low_target): Likewise.
8650 * linux-cris-low.c (the_low_target): Likewise.
8651 * linux-crisv32-low.c (the_low_target): Likewise.
8652 * linux-ia64-low.c (the_low_target): Likewise.
8653 * linux-m32r-low.c (the_low_target): Likewise.
8654 * linux-m68k-low.c (the_low_target): Likewise.
8655 * linux-ppc-low.c (the_low_target): Likewise.
8656 * linux-s390-low.c (the_low_target): Likewise.
8657 * linux-sh-low.c (the_low_target): Likewise.
8658 * linux-sparc-low.c (the_low_target): Likewise.
8659 * linux-tic6x-low.c (the_low_target): Likewise.
8660 * linux-x86-low.c (the_low_target): Likewise.
8661 * linux-xtensa-low.c (the_low_target): Likewise.
8662 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8663 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8664 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8666 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8667 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8669 2012-02-29 Yao Qi <yao@codesourcery.com>
8670 Pedro Alves <palves@redhat.com>
8672 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8673 `step_over_finished' is true.
8675 2012-02-27 Pedro Alves <palves@redhat.com>
8677 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8678 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8680 2012-02-27 Pedro Alves <palves@redhat.com>
8683 * linux-low.c (pid_is_stopped): New.
8684 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8686 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8688 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8691 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8693 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8695 2012-02-24 Luis Machado <lgustavo@codesourcery>
8697 * server.c (handle_query): Advertise support for target-side
8698 breakpoint condition evaluation.
8699 (process_point_options): New function.
8700 (process_serial_event): When inserting a breakpoint, check for
8701 a target-side condition that should be evaluated.
8703 * mem-break.c: Include regcache.h and ax.h.
8704 (point_cond_list_t): New data structure.
8705 (breakpoint) <cond_list>: New field.
8706 (find_gdb_breakpoint_at): Make non-static.
8707 (delete_gdb_breakpoint_at): Clear any target-side
8709 (clear_gdb_breakpoint_conditions): New function.
8710 (add_condition_to_breakpoint): Likewise.
8711 (add_breakpoint_condition): Likewise.
8712 (gdb_condition_true_at_breakpoint): Likewise.
8713 (gdb_breakpoint_here): Return result directly instead
8714 of going through a local variable.
8716 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8717 (clear_gdb_breakpoint_conditions): Likewise.
8718 (add_breakpoint_condition): Likewise.
8719 (gdb_condition_true_at_breakpoint): Likewise.
8721 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8722 (need_step_over_p): Take target-side breakpoint condition into
8725 2012-02-24 Luis Machado <lgustavo@codesourcery>
8727 * server.h: Include tracepoint.h.
8728 (agent_mem_read, agent_get_trace_state_variable_value,
8729 agent_set_trace_state_variable_value,
8730 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8731 get_set_tsv_func_addr): New prototypes.
8733 * ax.h: New include file.
8734 * ax.c: New source file.
8736 * tracepoint.c: Include ax.h.
8737 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8738 agent_expr, eval_result_type): Move to ax.h.
8739 (parse_agent_expr): Rename to ...
8740 (gdb_parse_agent_expr): ... this, make it non-static and move
8742 (unparse_agent_expr) Rename to ...
8743 (gdb_unparse_agent_expr): ... this, make it non-static and move
8745 (eval_agent_expr): Rename to ...
8746 (eval_tracepoint_agent_expr): ... this.
8747 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8748 forward declarations.
8749 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8750 (agent_get_trace_state_variable_value): New function.
8751 (agent_set_trace_state_variable_value): New function.
8752 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8753 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8754 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8755 (condition_true_at_tracepoint): Likewise.
8756 (parse_agent_expr): Rename to ...
8757 (gdb_parse_agent_expr): ... this and move to ax.c.
8758 (unparse_agent_expr): Rename to ...
8759 (gdb_unparse_agent_expr): ... this and move to ax.c.
8760 (gdb_agent_op_name): Move to ax.c.
8761 (eval_agent_expr): Rename to ...
8762 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8764 (eval_tracepoint_agent_expr): New function.
8765 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8767 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8769 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8770 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8771 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8772 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8773 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8774 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8775 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8776 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8777 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8778 (compile_bytecodes): Remove forward declaration.
8779 (is_goto_target): Move to ax.c.
8780 (compile_bytecodes): Move to ax.c and call
8781 agent_get_trace_state_variable_value (...) and
8782 agent_set_trace_state_variable_value (...).
8784 * Makefile.in: Update ax.c and IPA dependencies.
8786 2012-02-24 Pedro Alves <palves@redhat.com>
8788 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8789 (cmd_bigqtbuffer_circular): ... this. Only handle
8790 'QTBuffer:circular:'.
8791 (handle_tracepoint_general_set): Adjust.
8793 2012-02-16 Yao Qi <yao@codesourcery.com>
8795 * inferiors.c: Move code to ...
8796 * dll.c: .... here. New.
8797 * server.h: Declare clear_dlls.
8798 * Makefile.in (SFILES): Add dll.c.
8802 2012-02-11 Yao Qi <yao@codesourcery.com>
8804 * server.c: (handle_monitor_command): Add a new parameter
8806 (handle_query): Update caller.
8808 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8810 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8811 * configure, config.in: Regenerate.
8812 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8815 2012-02-02 Pedro Alves <palves@redhat.com>
8817 Try SIGKILL first, then PTRACE_KILL.
8818 * linux-low.c (linux_kill_one_lwp): New.
8819 (linux_kill_one_lwp): Rename to ...
8820 (kill_one_lwp_callback): ... this. Use the new
8823 2012-02-02 Pedro Alves <palves@redhat.com>
8825 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8828 2012-01-27 Pedro Alves <palves@redhat.com>
8830 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8831 (elf_64_file_p): Make static.
8832 (linux_pid_exe_is_elf_64_file): New.
8833 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8834 Delete declarations.
8835 (linux_pid_exe_is_elf_64_file): Declare.
8836 * linux-x86-low.c (x86_arch_setup): Use
8837 linux_pid_exe_is_elf_64_file.
8839 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8841 * linux-low.c (linux_wait_for_event_1): Rename to ...
8842 (linux_wait_for_event): ... here and merge it with former
8843 linux_wait_for_event - new variable wait_ptid, use it.
8844 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8846 2012-01-23 Pedro Alves <palves@redhat.com>
8848 * server.c (main): Avoid yet another case of infinite loop while
8849 detaching/killing after a longjmp.
8851 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8854 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8856 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8858 * hostio.c (handle_readlink): New function.
8859 (handle_vFile): Call it to handle "vFile:readlink" packets.
8861 2012-01-20 Pedro Alves <palves@redhat.com>
8862 Ulrich Weigand <ulrich.weigand@linaro.org>
8864 * server.c (handle_v_requests): Only support vAttach and vRun to
8865 start multiple processes when in extended protocol mode.
8867 2012-01-17 Pedro Alves <palves@redhat.com>
8869 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8870 memalign plus mprotect to allocate the scratch buffer.
8872 2012-01-13 Pedro Alves <palves@redhat.com>
8874 * server.c (attach_inferior): Clear `cont_thread'.
8876 2012-01-13 Pedro Alves <palves@redhat.com>
8878 * server.c (main): Avoid infinite loop while detaching/killing
8881 2012-01-09 Doug Evans <dje@google.com>
8883 * server.c (start_inferior): Set last_ptid in --wrapper case.
8885 2012-01-06 Yao Qi <yao@codesourcery.com>
8887 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8889 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8891 2012-01-04 Yao Qi <yao@codesourcery.com>
8893 * tracepoint.c (cmd_qtdp): Print debug message
8894 for static tracepoint.
8896 2012-01-04 Yao Qi <yao@codesourcery.com>
8898 * tracepoint.c (trace_vdebug): Differentiate debug message
8899 between gdbserver and IPA.
8901 2012-01-03 Yao Qi <yao@codesourcery.com>
8903 * tracepoint.c (tracepoint_was_hit): Don't collect for
8906 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8908 * terminal.h: Reformat copyright header.
8910 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8912 * server.c (gdbserver_version): Update copyright year.
8913 * gdbreplay.c (gdbreplay_version): Likewise.
8915 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8917 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8920 2011-12-18 Hui Zhu <teawater@gmail.com>
8921 * linux-low.c (linux_create_inferior): Save return value to ret.
8923 2011-12-18 Hui Zhu <teawater@gmail.com>
8925 * linux-low.c (linux_create_inferior): Save return value to ret.
8927 2011-12-16 Doug Evans <dje@google.com>
8929 * linux-low.c (linux_create_inferior): If stdio connection,
8930 redirect stdin from /dev/null, stdout to stderr.
8931 * remote-utils.c (remote_is_stdio): New static global.
8932 (remote_connection_is_stdio): New function.
8933 (remote_prepare): Handle stdio connection.
8934 (remote_open): Ditto.
8935 (remote_close): Don't close stdin for stdio connections.
8936 (read_prim,write_prim): New functions. Replace all calls to
8937 read/write to these.
8938 * server.c (main): Watch for "-" argument. Move call to
8939 remote_prepare before start_inferior.
8940 * server.h (STDIO_CONNECTION_NAME): New macro.
8941 (remote_connection_is_stdio): Declare.
8943 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8944 in debugging output.
8946 2011-12-15 Yao Qi <yao@codesourcery.com>
8948 * tracepoint.c: Include sys/syscall.h.
8949 (gdb_ust_thread): Remove preprocessor conditional.
8951 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8953 * linux-low.c (linux_detach_one_lwp): Call
8954 the_low_target.prepare_to_resume before detaching.
8956 2011-12-14 Yao Qi <yao@codesourcery.com>
8958 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8961 2011-12-14 Yao Qi <yao@codesourcery.com>
8963 * i386-low.c (i386_low_stopped_data_address): Initialize local
8966 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8970 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8971 DR_CONTROL unless necessary. Extend comments.
8972 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8973 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8975 2011-12-13 Yao Qi <yao@codesourcery.com>
8977 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8979 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8981 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8983 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8984 Print new debug message for such case.
8986 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8988 Fix overlapping memcpy.
8989 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8990 the read_inferior_memory transfer.
8991 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8992 write_inferior_memory transfer.
8993 (set_fast_tracepoint_jump): New variable buf. Use it for the
8994 read_inferior_memory and write_inferior_memory transfers.
8995 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8996 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8997 Use it for the write_inferior_memory transfer.
8998 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9001 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9003 * linux-low.c (fetch_register, store_register): Make code
9004 consistent, fix formatting.
9006 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9008 * linux-low.c (usr_store_inferior_registers): Factor out code
9009 to handle individual registers into...
9010 (store_register): ... this new function.
9012 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9014 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9015 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9016 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9017 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9018 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9019 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9020 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9021 (srv_xmlfiles): Add new XML files.
9023 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9025 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9026 (init_registers_s390_linux32v1): Add prototype.
9027 (init_registers_s390_linux32v2): Likewise.
9028 (init_registers_s390_linux64v1): Likewise.
9029 (init_registers_s390_linux64v2): Likewise.
9030 (init_registers_s390x_linux64v1): Likewise.
9031 (init_registers_s390x_linux64v2): Likewise.
9032 (s390_num_regs): Increment to 52.
9033 (s390_regmap): Add orig_r2 register.
9034 (s390_num_regs_3264): Increment to 68.
9035 (s390_regmap_3264): Add orig_r2 register.
9036 (s390_collect_ptrace_register): Handle orig_r2 register.
9037 (s390_supply_ptrace_register): Likewise.
9038 (s390_fill_last_break): New function.
9039 (s390_store_last_break): Likewise.
9040 (s390_fill_system_call): New function.
9041 (s390_store_system_call): Likewise.
9042 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9044 (s390_check_regset): New function.
9045 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9046 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9047 Update target_regsets for available register sets.
9049 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9050 Jan Kratochvil <jan.kratochvil@redhat.com>
9052 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9053 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9055 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9056 * linux-low.h (struct process_info_private): New member r_debug.
9057 * server.c (handle_qxfer_libraries): Call
9058 the_target->qxfer_libraries_svr4.
9059 (handle_qxfer_libraries_svr4): New function.
9060 (qxfer_packets): New entry "libraries-svr4".
9061 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9062 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9063 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9064 PACKET_qXfer_libraries_svr4.
9066 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9068 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9069 PSW address/mask between 8-byte and 16-byte formats.
9070 (s390_supply_ptrace_register): Likewise.
9071 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9072 basic addressing mode bit.
9074 2011-11-24 Stan Shebs <stan@codesourcery.com>
9076 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9078 2011-11-17 Stan Shebs <stan@codesourcery.com>
9080 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9081 (tracing_start_time): New global.
9082 (tracing_stop_time): New global.
9083 (tracing_user_name): New global.
9084 (tracing_notes): New global.
9085 (tracing_stop_note): New global.
9086 (cmd_qtstart): Set traceframe_usage, start_time.
9087 (stop_tracing): Set stop_time.
9088 (cmd_qtstatus): Report additional status.
9089 (cmd_qtp): New function.
9090 (handle_tracepoint_query): Call it.
9091 (cmd_qtnotes): New function.
9092 (handle_tracepoint_general_set): Call it.
9093 (get_timestamp): Rename from tsv_get_timestamp.
9095 2011-11-14 Stan Shebs <stan@codesourcery.com>
9096 Kwok Cheung Yeung <kcy@codesourcery.com>
9098 * linux-x86-low.c (small_jump_insn): New.
9099 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9100 trampoline and error message, build a trampoline and issue a small
9101 jump instruction to it.
9102 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9103 trampoline and error message.
9104 (x86_get_min_fast_tracepoint_insn_len): New.
9105 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9106 * linux-low.h (struct linux_target_ops): Add arguments to
9107 install_fast_tracepoint_jump_pad operation, add new operation.
9108 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9110 (linux_get_min_fast_tracepoint_insn_len): New function.
9111 (linux_target_op): Add new operation.
9112 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9113 (gdb_trampoline_buffer_end): Ditto.
9114 (gdb_trampoline_buffer_error): Ditto.
9115 (struct ipa_sym_addresses): Add fields for new IPA variables.
9116 (symbol_list): Add entries for new IPA variables.
9117 (struct tracepoint): Add fields to hold the address range of the
9118 trampoline used by the tracepoint.
9119 (trampoline_buffer_head): New static variable.
9120 (trampoline_buffer_tail): Ditto.
9121 (claim_trampoline_space): New function.
9122 (have_fast_tracepoint_trampoline_buffer): New function.
9123 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9125 (install_fast_tracepoint): Ditto, also add error buffer argument.
9126 (cmd_qtminftpilen): New function.
9127 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9128 (fast_tracepoint_from_trampoline_address): New function.
9129 (fast_tracepoint_collecting): Handle trampoline as part of jump
9131 (set_trampoline_buffer_space): New function.
9132 (initialize_tracepoint): Initialize new IPA variables.
9133 * target.h (struct target_ops): Add arguments to
9134 install_fast_tracepoint_jump_pad operation, add new
9135 get_min_fast_tracepoint_insn_len operation.
9136 (target_get_min_fast_tracepoint_insn_len): New.
9137 (install_fast_tracepoint_jump_pad): Add arguments.
9138 * server.h (IPA_BUFSIZ): Define.
9139 * linux-i386-ipa.c: Include extra header files.
9140 (initialize_fast_tracepoint_trampoline_buffer): New function.
9141 (initialize_low_tracepoint): Call it.
9142 * server.h (set_trampoline_buffer_space): Declare.
9143 (claim_trampoline_space): Ditto.
9144 (have_fast_tracepoint_trampoline_buffer): Ditto.
9146 2011-11-14 Yao Qi <yao@codesourcery.com>
9148 * server.c (handle_query): Handle InstallInTrace for qSupported.
9149 * tracepoint.c (add_tracepoint): Sort list.
9150 (install_tracepoint, download_tracepoint): New.
9151 (cmd_qtdp): Call them to install and download tracepoints.
9152 (sort_tracepoints): Removed.
9153 (cmd_qtstart): Update.
9155 2011-11-14 Yao Qi <yao@codesourcery.com>
9157 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9158 * mem-break.h: Declare.
9159 * tracepoint.c (cmd_qtstart): Move some code to ...
9160 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9162 (download_tracepoints): Move some code to ...
9163 (download_tracepoint_1): ... here. New.
9165 2011-11-08 Yao Qi <yao@codesourcery.com>
9167 * remote-utils.c (relocate_instruction): A comment fix.
9169 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9171 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9172 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9173 dr_status_mirror and dr_control_mirror from debug_reg_state.
9174 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9175 (i386_initial_stuff): Remove use of deleted globals.
9176 (i386_get_thread_context, i386_set_thread_context,
9177 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9178 from debug_reg_state.
9180 2011-11-05 Yao Qi <yao@codesourcery.com>
9182 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9183 address as TPOINT's.
9185 2011-11-02 Stan Shebs <stan@codesourcery.com>
9187 * tracepoint.c (agent_mem_read_string): New function.
9188 (eval_agent_expr): Call it for tracenz.
9189 * server.c (handle_query): Report support for tracenz.
9191 2011-11-02 Yao Qi <yao@codesourcery.com>
9193 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9195 2011-11-02 Yao Qi <yao@codesourcery.com>
9197 * target.h: Fix a typo in comment.
9199 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9201 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9202 clobber the breakpoints' shadows with fast tracepoint jumps.
9203 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9204 * target.c (write_inferior_memory): Also pass MYADDR down to
9207 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9209 * configure.ac: Check support for personality routine.
9210 * configure: Regenerate.
9211 * config.in: Likewise.
9212 * linux-low.c: Include <sys/personality.h>.
9213 Define ADDR_NO_RANDOMIZE if necessary.
9214 (linux_create_inferior): Disable address space randomization when
9215 forking inferior, if requested.
9216 (linux_supports_disable_randomization): New function.
9217 (linux_target_ops): Install it.
9218 * server.h (disable_randomization): Declare.
9219 * server.c (disable_randomization): New global variable.
9220 (handle_general_set): Handle QDisableRandomization.
9221 (handle_query): Likewise for qSupported.
9222 (main): Support --disable-randomization and --no-disable-randomization
9223 command line arguments.
9224 * target.h (struct target_ops): Add supports_disable_randomization.
9225 (target_supports_disable_randomization): New macro.
9227 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9229 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9231 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9232 [!PT_GETDSBT] (target_loadmap): New definition.
9233 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9234 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9235 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9236 and PT_GETDSBT to LINUX_LOADMAP.
9237 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9238 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9240 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9242 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9243 (arm_linux_hwbp_cap): New static variable.
9244 (arm_linux_get_hwbp_cap): Replace by ...
9245 (arm_linux_init_hwbp_cap): ... this new function.
9246 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9247 (arm_linux_get_hw_watchpoint_count): Likewise.
9248 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9249 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9250 (arm_prepare_to_resume): Use perror_with_name instead of error.
9252 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9254 * linux-arm-low.c: Include <signal.h>.
9255 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9256 (struct arm_linux_hwbp_cap): New data type.
9257 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9258 (struct arm_linux_hw_breakpoint): New data type.
9259 (MAX_BPTS, MAX_WPTS): Define.
9260 (struct arch_process_info, struct arch_lwp_info): New data types.
9261 (arm_linux_get_hwbp_cap): New function.
9262 (arm_linux_get_hw_breakpoint_count): Likewise.
9263 (arm_linux_get_hw_watchpoint_count): Likewise.
9264 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9265 (arm_hwbp_control_initialize): Likewise.
9266 (arm_hwbp_control_is_enabled): Likewise.
9267 (arm_hwbp_control_is_initialized): Likewise.
9268 (arm_hwbp_control_disable): Likewise.
9269 (arm_linux_hw_breakpoint_equal): Likewise.
9270 (arm_linux_hw_point_initialize): Likewise.
9271 (struct update_registers_data): New data structure.
9272 (update_registers_callback: New function.
9273 (arm_insert_point): Likewise.
9274 (arm_remove_point): Likewise.
9275 (arm_stopped_by_watchpoint): Likewise.
9276 (arm_stopped_data_address): Likewise.
9277 (arm_new_process): Likewise.
9278 (arm_new_thread): Likewise.
9279 (arm_prepare_to_resume): Likewise.
9280 (the_low_target): Register arm_insert_point, arm_remove_point,
9281 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9282 arm_new_thread, and arm_prepare_to_resume.
9284 2011-09-15 Stan Shebs <stan@codesourcery.com>
9286 * server.h (struct emit_ops): Add compare-goto fields.
9287 * tracepoint.c (gdb_agent_op_sizes): New table.
9288 (emit_eq_goto): New function.
9289 (emit_ne_goto): New function.
9290 (emit_lt_goto): New function.
9291 (emit_le_goto): New function.
9292 (emit_gt_goto): New function.
9293 (emit_ge_goto): New function.
9294 (is_goto_target): New function.
9295 (compile_bytecodes): Recognize special cases of compare-goto
9296 combinations and call specialized emitters for them.
9297 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9298 (amd64_emit_ne_goto): New function.
9299 (amd64_emit_lt_goto): New function.
9300 (amd64_emit_le_goto): New function.
9301 (amd64_emit_gt_goto): New function.
9302 (amd64_emit_ge_goto): New function.
9303 (amd64_emit_ops): Add the new functions.
9304 (i386_emit_eq_goto): New function.
9305 (i386_emit_ne_goto): New function.
9306 (i386_emit_lt_goto): New function.
9307 (i386_emit_le_goto): New function.
9308 (i386_emit_gt_goto): New function.
9309 (i386_emit_ge_goto): New function.
9310 (i386_emit_ops): Add the new functions.
9312 2011-09-08 Stan Shebs <stan@codesourcery.com>
9314 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9315 (i386_emit_epilogue): Restore %ebx.
9317 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9319 * server.c (step_thread): Remove definition.
9320 (process_serial_event): Don't handle Hs.
9321 * server.h (step_thread): Remove declaration.
9322 * target.c (set_desired_inferior): Remove use of step_thread.
9324 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9326 * linux-low.c: Include linux-procfs.h.
9327 (linux_attach_lwp_1): Update comments.
9328 (linux_attach): Scan for existing threads when attaching to a
9329 process that is the tgid.
9330 * Makefile.in: Update dependencies.
9332 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9334 * configure.srv: Add linux-procfs.o dependencies.
9336 2011-08-14 Yao Qi <yao@codesourcery.com>
9338 * target.h (struct target_ops): Fix indent.
9339 * win32-low.c (win32_target_ops): Fix comment.
9341 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9342 Yao Qi <yao@codesourcery.com>
9344 * Makefile.in (clean): Remove tic6x-*.c files.
9345 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9346 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9347 (tic6x-c64xp-linux.c): Likewise.
9348 * configure.srv: Add support for tic6x-*-uclinux.
9349 * linux-tic6x-low.c: New.
9350 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9352 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9353 Yao Qi <yao@codesourcery.com>
9355 * target.h (struct target_ops): Add read_loadmap.
9356 * linux-low.c (struct target_loadseg): New type.
9357 (struct target_loadmap): New type.
9358 (linux_read_loadmap): New function.
9359 (linux_target_ops): Add linux_read_loadmap.
9360 * server.c (handle_query): Support qXfer:fdpic:read packet.
9361 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9364 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9366 * win32-low.c: Include <stdint.h>.
9368 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9370 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9371 to the inferior here.
9372 (i386_remove_aligned_watchpoint): Ditto.
9373 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9374 fit part of the watchpoint in the debug registers.
9375 (i386_update_inferior_debug_regs): New.
9376 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9377 registers, and only update the inferior on success.
9378 (i386_low_remove_watchpoint): Ditto.
9380 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9382 * linux-low.c (compare_ints, unique, list_threads, show_process,
9383 linux_core_of_thread): Delete.
9384 (linux_target_ops): Change linux_core_of_thread to
9385 linux_common_core_of_thread.
9386 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9387 * utils.c (malloc_failure): Change type of argument.
9388 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9389 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9390 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9391 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9392 (IPA_OBJS): Add common-utils-ipa.o.
9393 (ptid_h, linux_osdata_h): New macros.
9394 (server_h): Add common/common-utils.h, common/xml-utils.h,
9395 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9397 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9398 ptid.o, buffer.o): New rules.
9399 (linux-low.o): Add common/linux-osdata.h as a dependency.
9400 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9401 * configure.ac: Add AC_HEADER_DIRENT check.
9402 * config.in: Regenerate.
9403 * configure: Regenerate.
9404 * remote-utils.c (xml_escape_text): Delete.
9405 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9406 buffer_xml_printf): Move to common/buffer.c.
9407 * server.c (main): Remove call to initialize_inferiors.
9408 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9409 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9410 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9411 internal_error, gdb_assert, gdb_assert_fail): Delete.
9412 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9413 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9415 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9416 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9417 initialize_inferiors): Delete.
9419 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9421 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9424 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9426 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9428 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9430 2011-05-26 Yao Qi <yao@codesourcery.com>
9432 * Makefile.in (thread-db.o): Track dependence to
9433 common/gdb_thread_db.h.
9434 * thread-db.c: include gdb_thread_db.h from right place.
9436 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9438 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9439 __FILE__ and __LINE__ to internal_error.
9441 2011-05-13 Doug Evans <dje@google.com>
9443 * thread-db.c (try_thread_db_load_from_sdir): New function.
9444 (try_thread_db_load_from_dir): New function.
9445 (thread_db_load_search): Handle $sdir, ignore $pdir.
9446 Remove trying of system directories if search of
9447 libthread-db-search-path fails, that is now done via $sdir.
9449 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9451 * server.c (handle_query): Add EnableDisableTracepoints to the list
9452 of supported features.
9453 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9455 (cmd_qtenable_disable): New.
9456 (cmd_qtstart): Install tracepoints even if disabled.
9457 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9458 receiving a QTEnable or QTDisable packet.
9459 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9460 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9462 (gdb_probe): Skip data collection if static tracepoint is disabled.
9464 2011-05-10 Doug Evans <dje@google.com>
9466 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9468 2011-05-04 Doug Evans <dje@google.com>
9470 * linux-low.c (linux_join): Skip process lookup.
9471 * spu-low.c (spu_join): Ditto.
9472 * server.c (join_inferiors_callback): Delete.
9473 (process_serial_event): For 'D' packet (detach) call join_inferior
9476 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9478 * README: Don't mention xscale*-*-linux*.
9479 * configure.srv (xscale*-*-linux*): Don't handle target.
9481 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9483 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9485 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9486 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9487 (i386_emit_void_call_2): Likewise.
9489 2011-04-26 Yao Qi <yao@codesourcery.com>
9491 * linux-low.c: Move common macros to linux-ptrace.h.
9492 Include linux-ptrace.h.
9493 * Makefile.in (linux_ptrace_h): New.
9494 (linux-low.o): Depends on linux-ptrace.h.
9496 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9498 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9499 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9500 (remote_prepare): New function with most of the TCP code from ...
9501 (remote_open): ... here. Detect PORT here unconditionally. Move also
9502 setting transport_is_reliable.
9503 * server.c (run_once): New variable.
9504 (gdbserver_usage): Document it.
9505 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9506 the first run if RUN_ONCE.
9507 * server.h (run_once, remote_prepare): New declarations.
9509 2011-04-19 Tom Tromey <tromey@redhat.com>
9511 * win32-low.c (handle_load_dll): Remove duplicate "the".
9513 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9515 Remove support for old Cygwin 1.5 versions.
9516 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9517 function to avoid warning.
9518 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9521 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9523 * gdbserver/server.h (Macro _): Define it if not available.
9525 2011-03-14 Michael Snyder <msnyder@vmware.com>
9527 * hostio.c (handle_close): Remove unnecessary null test.
9529 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9531 * Makefile.in (maintainer-clean realclean distclean): Remove
9532 "make ... subdir_do" command.
9534 2011-03-10 Michael Snyder <msnyder@vmware.com>
9536 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9538 * server.c (handle_v_run): Free alloced buffer on early return.
9540 2011-03-09 Yao Qi <yao@codesourcery.com>
9543 2011-03-04 Yao Qi <yao@codesourcery.com>
9545 * Makefile.in: Remove GNU make feature --directory.
9547 2011-03-05 Yao Qi <yao@codesourcery.com>
9549 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9550 (subdir_do): New make target. Copied from gdb/Makefile.
9551 (maintainer-clean, realclean, distclean, clean): Call corresponding
9552 make targets in common/Makefile.
9554 2011-02-11 Yao Qi <yao@codesourcery.com>
9556 * configure.ac: Call AC_PROG_RANLIB.
9557 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9558 * configure: Regenerate.
9560 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9562 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9564 2011-03-06 Yao Qi <yao@codesourcery.com>
9566 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9568 2011-03-05 Yao Qi <yao@codesourcery.com>
9570 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9571 (subdir_do): New make target. Copied from gdb/Makefile.
9572 (maintainer-clean, realclean, distclean, clean): Call corresponding
9573 make targets in common/Makefile.
9575 2011-03-04 Yao Qi <yao@codesourcery.com>
9577 * Makefile.in: Remove GNU make feature --directory.
9579 2011-03-04 Michael Snyder <msnyder@vmware.com>
9581 * server.c (queue_stop_reply): Call xmalloc not malloc.
9583 2011-03-02 Michael Snyder <msnyder@vmware.com>
9585 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9587 2011-02-28 Michael Snyder <msnyder@vmware.com>
9589 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9590 (cmd_qtframe): Ditto.
9591 (cmd_qtbuffer): Ditto.
9592 (cmd_bigqtbuffer): Ditto.
9594 * utils.c (decimal2str): Initialize 'width' to nine, then
9597 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9599 * hostio.c (require_data): Free *data, not data.
9601 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9603 * hostio.c (require_data): Use free, not xfree.
9605 2011-02-27 Michael Snyder <msnyder@vmware.com>
9607 * server.c (handle_query): Discard unused value.
9609 * hostio.c (require_data): Free malloc memory before returning
9612 2011-02-26 Michael Snyder <msnyder@vmware.com>
9614 * linux-low.c (list_threads): Call closedir for dirent.
9616 2011-02-27 Michael Snyder <msnyder@vmware.com>
9618 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9619 a case statement falls through.
9621 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9623 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9626 2011-02-26 Michael Snyder <msnyder@vmware.com>
9628 * utils.c (decimal2str): Eliminate dead code and dead param.
9629 (pulongest): Drop dead param from call to decimal2str.
9632 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9634 Revert the following patch (not approved yet):
9635 2011-02-21 Hui Zhu <teawater@gmail.com>
9636 * tracepoint.c (tp_printf): New function.
9637 (eval_agent_expr): Handle gdb_agent_op_printf.
9639 2011-02-21 Hui Zhu <teawater@gmail.com>
9641 * tracepoint.c (tp_printf): New function.
9642 (eval_agent_expr): Handle gdb_agent_op_printf.
9644 2011-02-18 Tom Tromey <tromey@redhat.com>
9646 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9647 (tracepoint.o): Likewise.
9648 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9649 (gdb_agent_op_names): Likewise.
9651 2011-02-18 Tom Tromey <tromey@redhat.com>
9653 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9654 gdb_agent_op_rot>: New constants.
9655 (gdb_agent_op_names): Add pick and roll.
9656 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9659 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9661 * aclocal.m4: Regenerated with aclocal-1.11.1.
9663 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9665 * server.c (handle_qxfer_traceframe_info): New.
9666 (qxfer_packets): Register "traceframe-info".
9667 (handle_query): Report support for qXfer:traceframe-info:read+.
9668 * tracepoint.c (match_blocktype): New.
9669 (traceframe_find_block_type): Rename to ...
9670 (traceframe_walk_blocks): ... this. Add callback filter argument,
9672 (traceframe_find_block_type): New, reimplemented on top of
9673 traceframe_walk_blocks.
9674 (build_traceframe_info_xml): New.
9675 (traceframe_read_info): New.
9676 * server.h (traceframe_read_info): Declare.
9678 2011-02-11 Yao Qi <yao@codesourcery.com>
9680 * configure.ac: Call AC_PROG_RANLIB.
9681 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9682 * configure: Regenerate.
9684 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9686 * server.c (gdb_read_memory): Change return semantics to allow
9688 (handle_search_memory_1): Adjust.
9689 (process_serial_event) <'m' packet>: Handle partial transfers.
9690 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9692 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9694 * regcache.c (init_register_cache): Initialize
9695 regcache->register_status.
9696 (free_register_cache): Release regcache->register_status.
9697 (regcache_cpy): Copy register_status.
9698 (registers_to_string): Print 'x's for unavailable registers.
9699 (supply_register): Mark the register's status valid or
9700 unavailable, depending on whether a buffer was passed in or not.
9701 (supply_register_zeroed): New.
9702 (supply_regblock): Mark the registers' status valid or
9703 unavailable, depending on whether a buffer was passed in or not.
9704 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9705 (struct regcache): New `register_status' field.
9706 (supply_register_zeroed): Declare.
9707 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9708 supply_register_zeroed, rather than passing a NULL buffer to
9710 * tracepoint.c (fetch_traceframe_registers): Update comment.
9712 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9714 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9717 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9719 * server.h (decode_xfer_write): Change prototype.
9720 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9721 and don't extract the annex here.
9722 * server.c (decode_xfer_read): Remove `annex' parameter,
9723 and don't extract the annex here.
9725 (struct qxfer): New.
9726 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9727 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9728 (handle_qxfer_statictrace): New functions, abstracted out from
9729 handle_query, and made to use the struct qxfer interface.
9730 (handle_threads_qxfer_proper): Rename to ...
9731 (handle_qxfer_threads_proper): ... this.
9732 (handle_threads_qxfer): Rename to ...
9733 (handle_qxfer_threads): ... this. Adjust.
9734 (qxfer_packets): New array.
9735 (handle_qxfer): New function.
9736 (handle_query): Use handle_qxfer.
9738 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9740 * gdbreplay.c: Shorten lines of >= 80 columns.
9741 * linux-low.c: Ditto.
9742 * linux-ppc-low.c: Ditto.
9743 * linux-s390-low.c: Ditto.
9744 * linux-sparc-low.c: Ditto.
9745 * linux-x86-low.c: Ditto.
9746 * linux-xtensa-low.c: Ditto.
9747 * mem-break.c: Ditto.
9749 * regcache.h: Ditto.
9750 * remote-utils.c: Ditto.
9753 * thread-db.c: Ditto.
9754 * tracepoint.c: Ditto.
9756 * win32-low.h: Ditto.
9758 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9760 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9763 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9765 * server.c (gdbserver_version): Update copyright year in version
9767 * gdbreplay.c (gdbreplay_version): Ditto.
9769 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9771 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9772 * linux-bfin-low.c: New file.
9773 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9774 PT_DATA_ADDR for BFIN targets.
9775 * Makefile.in (SFILES): Add linux-bfin-low.c.
9776 (clean): Remove reg-bfin.c.
9777 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9778 * README: Mention supported Blackfin targets.
9780 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9782 * .gitignore: New file.
9784 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9786 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9788 2010-10-22 Jie Zhang <jie@codesourcery.com>
9790 * Makefile.in: Add FLAGS_TO_PASS variable.
9791 (install): Remove dependency of install-only and recursively
9792 invoke make for install-only.
9794 2010-10-04 Doug Evans <dje@google.com>
9796 * Makefile.in (uninstall): Use $(DESTDIR).
9798 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9802 * linux-x86-low.c (compat_siginfo_from_siginfo)
9803 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9804 si_code is < 0. Check for si_code == SI_TIMER before checking for
9807 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9809 * lynx-i386-low.c: New file.
9810 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9812 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9814 * lynx-low.c (ptrace_request_to_str): Remove handling for
9815 request values that have been removed in LynxOS 5.x.
9817 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9819 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9822 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9824 * configure.ac: Add --enable-inprocess-agent option.
9825 * configure: Rebuilt.
9827 2010-09-06 Yao Qi <yao@codesourcery.com>
9829 * linux-low.c (linux_kill): Remove unused variable.
9830 (linux_stabilize_threads): Likewise.
9831 * server.c (start_inferior): Likewise.
9832 (queue_stop_reply_callback): Likewise.
9833 * tracepoint.c (do_action_at_tracepoint): Likewise.
9835 2010-09-06 Yao Qi <yao@codesourcery.com>
9837 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9840 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9842 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9844 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9846 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9849 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9851 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9852 gdbserver/lynx-ppc-low.c: New files.
9853 * Makefile.in (lynx_low_h): New variable.
9854 (lynx-low.o, lynx-ppc-low.o): New rules.
9855 * configure.ac: On LynxOS, link with -lnetinet.
9856 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9857 * configure: regenerate.
9859 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9861 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9862 * configure.ac: Add check for vasprintf and vsnprintf.
9863 * configure, config.in: Regenerate.
9864 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9866 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9868 * gdbreplay.c: Move include of alloca.h up, next to include of
9870 * server.h: Add include of malloc.h.
9871 * mem-break.c: Remove include of malloc.h.
9872 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9874 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9876 * Makefile.in (memmem.o): Build with -Wno-error.
9878 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9880 * utils.c (xsnprintf): Make non-static.
9881 * server.h: Add xsnprintf declaration.
9882 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9883 replace calls to snprintf by calls to xsnprintf throughout.
9885 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9887 * configure.ac: Add configure check for alloca.
9888 * configure, config.in: Regenerate.
9889 * server.h: Include alloca.h if it exists.
9890 * gdbreplay.c: Include alloca.h if it exists.
9892 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9894 * linux-low.c (__SIGRTMIN): Define if not already defined.
9895 (linux_create_inferior): Check for __ANDROID__ rather than
9897 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9898 are already deferred.
9899 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9900 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9901 stopped and already has a pending signal to report.
9902 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9903 a pending signal to report or is moving out of a jump pad.
9904 (linux_init_signals): Check for __ANDROID__ rather than
9907 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9909 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9910 debug_threads check. Avoid a linear search when not doing debug
9913 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9915 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9916 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9917 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9918 (process_event): Change local fd's type to gdb_fildes_t.
9919 (create_file_handler): Adjust prototype.
9920 (delete_file_handler): Adjust prototype.
9921 (handle_file_event): Adjust prototype. Use pfildes.
9922 (create_file_event): Adjsut prototype.
9923 * remote-utils.c (remote_desc, listen_desc): Change type to
9925 * server.h: New gdb_fildes_t typedef.
9926 [USE_WIN32API]: Include winsock2.h.
9927 (delete_file_handler, add_file_handler): Adjust prototypes.
9929 * utils.c (pfildes): New.
9931 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9933 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9934 * configure: Regenerate.
9936 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9938 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9939 (linux_done_accessing_memory): ... this.
9940 (linux_target_ops): Adjust.
9941 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9942 * nto-low.c (nto_target_ops): Adjust comment.
9943 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9944 * spu-low.c (spu_target_ops): Adjust comment.
9945 * target.h (target_ops): Rename unprepare_to_access_memory field
9946 to done_accessing_memory.
9947 (unprepare_to_access_memory): Rename to ...
9948 (done_accessing_memory): ... this.
9950 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9952 * linux-low.c (linux_prepare_to_access_memory): New.
9953 (linux_unprepare_to_access_memory): New.
9954 (linux_target_ops): Install them.
9955 * server.c (read_memory): Rename to ...
9956 (gdb_read_memory): ... this. Use
9957 prepare_to_access_memory/prepare_to_access_memory.
9958 (write_memory): Rename to ...
9959 (gdb_write_memory): ... this. Use
9960 prepare_to_access_memory/prepare_to_access_memory.
9961 (handle_search_memory_1): Adjust.
9962 (process_serial_event): Adjust.
9963 * target.h (struct target_ops): New fields
9964 prepare_to_access_memory and unprepare_to_access_memory.
9965 (prepare_to_access_memory, unprepare_to_access_memory): New.
9966 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9967 prepare_to_access_memory/prepare_to_access_memory.
9968 * nto-low.c (nto_target_ops): Adjust.
9969 * spu-low.c (spu_target_ops): Adjust.
9970 * win32-low.c (win32_target_ops): Adjust.
9972 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9974 * Makefile.in (WARN_CFLAGS): Get it from configure.
9975 (WERROR_CFLAGS): New.
9976 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9977 * configure.ac: Introduce --enable-werror, which adds -Werror to
9978 the compiler command line. Enabled by default. Disable with
9979 --disable-werror. Add -Wdeclaration-after-statement
9980 Wpointer-arith and -Wformat-nonliteral to warning flags.
9981 * configure: Regenerate.
9983 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9985 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9987 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9989 * gdbreplay.c (remote_error): New.
9991 (expect): Use gdbchar. Check for error reading from GDB.
9992 Clarify sync error output.
9993 (play): Check for errors writing to GDB.
9994 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9995 * remote-utils.c (getpkt): Check for errors writing to the remote
9998 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10000 * linux-low.c (linux_wait_1): Move non-debugging code out of
10001 `debug_threads' control.
10003 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10005 * linux-low.c (linux_wait_1): Don't set last_status here.
10006 * server.c (push_event, queue_stop_reply_callback): Assert we're
10007 not pushing a TARGET_WAITKIND_IGNORE event.
10008 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10009 (myresume, handle_target_event): Set the thread's last_resume_kind
10010 and last_status from the target returned status.
10012 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10016 * linux-x86-low.c (update_debug_registers_callback): New.
10017 (i386_dr_low_set_addr): Use it.
10018 (i386_dr_low_get_addr): New.
10019 (i386_dr_low_set_control): Use update_debug_registers_callback.
10020 (i386_dr_low_get_control): New.
10021 (i386_dr_low_get_status): Adjust.
10022 * linux-low.c (linux_stop_lwp): New.
10023 * linux-low.h (linux_stop_lwp): Declare.
10025 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10026 argument instead of a i386_debug_reg_state.
10027 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10028 a i386_debug_reg_state.
10029 (i386_insert_aligned_watchpoint): Adjust.
10030 (i386_remove_aligned_watchpoint): Adjust.
10031 (i386_low_stopped_data_address): Read the debug registers from the
10032 inferior instead of from the mirrors.
10033 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10034 (i386_dr_low_get_addr): Declare.
10035 (i386_dr_low_get_control): Declare.
10036 (i386_dr_low_get_status): Change prototype.
10038 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10039 (i386_dr_low_get_addr): New.
10040 (i386_dr_low_get_control): New.
10041 (i386_dr_low_get_status): Adjust prototype. Return
10043 (i386_initial_stuff): Clear dr_status_mirror and
10045 (i386_get_thread_context): Adjust.
10046 (i386_set_thread_context): Adjust.
10047 (i386_thread_added): Adjust.
10049 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10051 * linux-low.h (linux_thread_area): Delete declaration.
10053 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10055 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10056 after its termination.
10058 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10060 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10061 (gdb_wants_all_stopped): Delete.
10062 (linux_wait_1): Don't call them.
10063 * server.c (handle_v_cont): Tag all threads as want-stopped.
10064 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10065 stopped as "client-wants-stopped".
10067 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10069 * Makefile.in (signals_h): New.
10070 (server_h): Depend on it.
10071 (server.o): Don't depend on $(signals_def).
10072 (signals.o): Depend on $(signals_def).
10074 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10076 * Makefile.in (signals_def): New.
10077 (server_h): Append include/gdb/signals.h and signals_def.
10078 (server.o): Append signals_def.
10080 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10082 * server.c (handle_target_event): Use target_signal_to_host for
10083 resume_info.sig initialization.
10084 * target.h (struct thread_resume) <sig>: New comment.
10086 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10088 * server.c (handle_query): strcpy() the returned string from paddress()
10089 instead of sprintf().
10090 * utils.c (paddress): Return phex_nz().
10092 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10094 * server.c (handle_v_cont): Call mourn_inferior if process
10096 (myresume): Likewise.
10098 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10100 Static tracepoints, and integration with UST.
10102 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10103 * mem-break.c (uninsert_all_breakpoints)
10104 (reinsert_all_breakpoints): New.
10105 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10106 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10107 (gdb_agent_ust_loaded, helper_thread_id)
10108 (gdb_agent_helper_thread_id): New macros.
10109 (struct ipa_sym_addresses): Add addr_ust_loaded,
10110 addr_helper_thread_id, addr_cmd_buf.
10111 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10112 (in_process_agent_loaded_ust): New.
10113 (write_e_ust_not_loaded): New.
10114 (maybe_write_ipa_ust_not_loaded): New.
10115 (struct collect_static_trace_data_action): New.
10116 (enum tracepoint_type) <static_tracepoint>: New.
10117 (struct tracepoint) <handle>: Mention static tracepoints.
10118 (struct static_tracepoint_ctx): New.
10119 (CMD_BUF_SIZE): New.
10120 (add_tracepoint_action): Handle static tracepoint actions.
10121 (unprobe_marker_at): New.
10122 (clear_installed_tracepoints): Handle static tracepoints.
10123 (cmd_qtdp): Handle static tracepoints.
10124 (probe_marker_at): New.
10125 (cmd_qtstart): Handle static tracepoints.
10126 (response_tracepoint): Handle static tracepoints.
10127 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10128 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10129 (get_context_regcache): Handle static tracepoints.
10130 (do_action_at_tracepoint): Handle static tracepoint actions.
10131 (traceframe_find_block_type): Handle static trace data blocks.
10132 (traceframe_read_sdata): New.
10133 (download_tracepoints): Download static tracepoint actions.
10134 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10135 (GDB_PROBE_NAME): New.
10137 (GET_UST_SYM): New.
10140 (ust_marker_to_static_tracepoint): New.
10142 (collect_ust_data_at_tracepoint): New.
10143 (gdb_ust_probe): New.
10144 (UNIX_PATH_MAX, SOCK_DIR): New.
10145 (gdb_ust_connect_sync_socket): New.
10146 (resume_thread, stop_thread): New.
10147 (run_inferior_command): New.
10148 (init_named_socket): New.
10149 (gdb_ust_socket_init): New.
10150 (cstr_to_hexstr): New.
10152 (first_marker, next_marker): New.
10153 (response_ust_marker): New.
10154 (cmd_qtfstm, cmd_qtsstm): New.
10155 (unprobe_marker_at, probe_marker_at): New.
10156 (cmd_qtstmat, gdb_ust_thread): New.
10157 (gdb_ust_init): New.
10158 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10159 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10160 (ST_REGENTRY): New.
10161 (x86_64_st_collect_regmap): New.
10162 (X86_64_NUM_ST_COLLECT_GREGS): New.
10163 (AMD64_RIP_REGNUM): New.
10164 (supply_static_tracepoint_registers): New.
10165 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10166 (ST_REGENTRY): New.
10167 (i386_st_collect_regmap): New.
10168 (i386_NUM_ST_COLLECT_GREGS): New.
10169 (supply_static_tracepoint_registers): New.
10170 * server.c (handle_query): Handle qXfer:statictrace:read.
10171 <qSupported>: Report support for StaticTracepoints, and
10172 qXfer:statictrace:read features.
10173 * server.h (traceframe_read_sdata)
10174 (supply_static_tracepoint_registers): Declare.
10175 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10176 (unpack_varlen_hex): Include in IPA build.
10177 * Makefile.in (ustlibs, ustinc): New.
10178 (IPA_OBJS): Add remote-utils-ipa.o.
10179 ($(IPA_LIB)): Link -ldl and -lpthread.
10181 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10182 * config.in, configure: Regenerate.
10184 2010-06-20 Ian Lance Taylor <iant@google.com>
10185 Pedro Alves <pedro@codesourcery.com>
10187 * linux-x86-low.c (always_true): Delete.
10188 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10189 trying to fool the compiler with always_true.
10191 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10193 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10194 conditions in gdbserver.
10196 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10198 * spu-low.c (spu_read_memory): Wrap around local store limit.
10199 (spu_write_memory): Likewise.
10201 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10203 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10204 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10206 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10208 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10209 uses with LONGEST uses.
10211 2010-06-14 Stan Shebs <stan@codesourcery.com>
10212 Pedro Alves <pedro@codesourcery.com>
10216 * linux-x86-low.c: Include limits.h.
10218 (always_true): New.
10221 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10222 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10223 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10224 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10225 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10226 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10227 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10228 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10229 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10230 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10231 (amd64_emit_void_call_2): New.
10232 (amd64_emit_ops): New.
10233 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10234 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10235 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10236 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10237 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10238 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10239 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10240 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10241 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10242 (i386_emit_stack_adjust, i386_emit_int_call_1)
10243 (i386_emit_void_call_2): New.
10244 (i386_emit_ops): New.
10245 (x86_emit_ops): New.
10246 (the_low_target): Install x86_emit_ops.
10247 * server.h (struct emit_ops): New.
10248 (get_raw_reg_func_addr): Declare.
10249 (current_insn_ptr, emit_error): Declare.
10250 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10251 (set_trace_state_variable_value): New defines.
10252 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10253 addr_get_trace_state_variable_value and
10254 addr_set_trace_state_variable_value.
10255 (symbol_list): New fields for get_raw_reg,
10256 get_trace_state_variable_value and set_trace_state_variable_value.
10257 (condfn): New typedef.
10258 (struct tracepoint): New field `compiled_cond'.
10259 (do_action_at_tracepoint): Clear compiled_cond.
10260 (get_trace_state_variable_value, set_trace_state_variable_value):
10262 (condition_true_at_tracepoint): If there's a compiled condition,
10264 (current_insn_ptr, emit_error): New globals.
10265 (struct bytecode_address): New.
10266 (get_raw_reg_func_addr): New.
10267 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10268 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10269 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10270 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10271 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10272 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10273 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10274 (compile_tracepoint_condition, compile_bytecodes): New.
10275 * target.h (emit_ops): Forward declare.
10276 (struct target_ops): New field emit_ops.
10277 (target_emit_ops): New.
10278 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10279 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10280 * linux-low.c (linux_emit_ops): New.
10281 (linux_target_ops): Install it.
10282 * linux-low.h (struct linux_target_ops): New field emit_ops.
10284 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10286 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10287 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10289 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10290 Stan Shebs <stan@codesourcery.com>
10292 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10293 (all): Depend on $(extra_libraries).
10294 (install-only): Install the IPA.
10295 (IPA_OBJS, IPA_LIB): New.
10296 (clean): Remove the IPA lib.
10297 (IPAGENT_CFLAGS): New.
10298 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10299 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10300 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10301 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10302 * configure.ac: Check for atomic builtins support in the compiler.
10303 (IPA_DEPFILES, extra_libraries): Define.
10304 * configure.srv (ipa_obj): Add description.
10305 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10306 (i[34567]86-*-linux*): Set ipa_obj.
10307 (x86_64-*-linux*): Set ipa_obj.
10308 * linux-low.c (stabilizing_threads): New.
10309 (supports_fast_tracepoints): New.
10310 (linux_detach): Stabilize threads before detaching.
10311 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10312 the lwp is either not stabilizing, or is moving out of a jump pad.
10313 (linux_fast_tracepoint_collecting): New.
10314 (maybe_move_out_of_jump_pad): New.
10315 (enqueue_one_deferred_signal): New.
10316 (dequeue_one_deferred_signal): New.
10317 (linux_wait_for_event_1): If moving out of a jump pad, defer
10318 pending signals to later.
10319 (linux_stabilize_threads): New.
10320 (linux_wait_1): Check if threads need moving out of jump pads, and
10322 (stuck_in_jump_pad_callback): New.
10323 (move_out_of_jump_pad_callback): New.
10324 (lwp_running): New.
10325 (linux_resume_one_lwp): Handle moving out of jump pads.
10326 (linux_set_resume_request): Dequeue deferred signals.
10327 (need_step_over_p): Also step over fast tracepoint jumps.
10328 (start_step_over): Also uninsert fast tracepoint jumps.
10329 (finish_step_over): Also reinsert fast tracepoint jumps.
10330 (linux_install_fast_tracepoint_jump): New.
10331 (linux_target_ops): Install linux_stabilize_threads and
10332 linux_install_fast_tracepoint_jump_pad.
10333 * linux-low.h (linux_target_ops) <get_thread_area,
10334 install_fast_tracepoint_jump_pad>: New fields.
10335 (struct lwp_info) <collecting_fast_tracepoint,
10336 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10337 (linux_get_thread_area): Declare.
10338 * linux-x86-low.c (jump_insn): New.
10339 (x86_get_thread_area): New.
10340 (append_insns): New.
10341 (push_opcode): New.
10342 (amd64_install_fast_tracepoint_jump_pad): New.
10343 (i386_install_fast_tracepoint_jump_pad): New.
10344 (x86_install_fast_tracepoint_jump_pad): New.
10345 (the_low_target): Install x86_get_thread_area and
10346 x86_install_fast_tracepoint_jump_pad.
10347 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10348 (struct fast_tracepoint_jump): New.
10349 (fast_tracepoint_jump_insn): New.
10350 (fast_tracepoint_jump_shadow): New.
10351 (find_fast_tracepoint_jump_at): New.
10352 (fast_tracepoint_jump_here): New.
10353 (delete_fast_tracepoint_jump): New.
10354 (set_fast_tracepoint_jump): New.
10355 (uninsert_fast_tracepoint_jumps_at): New.
10356 (reinsert_fast_tracepoint_jumps_at): New.
10357 (set_breakpoint_at): Use write_inferior_memory.
10358 (uninsert_raw_breakpoint): Use write_inferior_memory.
10359 (check_mem_read): Mask out fast tracepoint jumps.
10360 (check_mem_write): Mask out fast tracepoint jumps.
10361 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10362 (set_fast_tracepoint_jump): Declare.
10363 (delete_fast_tracepoint_jump)
10364 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10365 (reinsert_fast_tracepoint_jumps_at): Declare.
10366 * regcache.c: Don't compile many functions when building the
10367 in-process agent library.
10368 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10369 the register buffer in the heap.
10370 (free_register_cache): If the register buffer isn't owned by the
10371 regcache, don't free it.
10372 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10373 pre-existing register caches.
10374 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10376 (convert_ascii_to_int): : Constify `from' parameter type.
10377 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10378 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10379 the needed buffer in-place.
10380 (relocate_instruction): New.
10381 * server.c (handle_query) <qSymbols>: If the target supports
10382 tracepoints, give it a chance of looking up symbols. Report
10383 support for fast tracepoints.
10384 (handle_status): Stabilize threads.
10385 (process_serial_event): Adjust.
10386 * server.h (struct fast_tracepoint_jump): Forward declare.
10387 (struct process_info) <fast_tracepoint_jumps>: New field.
10388 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10389 (decode_X_packet, decode_M_packet): Adjust.
10390 (relocate_instruction): Declare.
10391 (in_process_agent_loaded): Declare.
10392 (tracepoint_look_up_symbols): Declare.
10393 (struct fast_tpoint_collect_status): Declare.
10394 (fast_tracepoint_collecting): Declare.
10395 (force_unlock_trace_buffer): Declare.
10396 (handle_tracepoint_bkpts): Declare.
10397 (initialize_low_tracepoint)
10398 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10399 * target.h (struct target_ops) <stabilize_threads,
10400 install_fast_tracepoint_jump_pad>: New fields.
10401 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10402 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10403 [HAVE_STDINT_H]: Include stdint.h.
10404 (trace_debug_1): Rename to ...
10405 (trace_vdebug): ... this.
10406 (trace_debug): Rename to ...
10407 (trace_debug_1): ... this. Add `level' parameter.
10408 (trace_debug): New.
10409 (ATTR_USED, ATTR_NOINLINE): New.
10410 (IP_AGENT_EXPORT): New.
10411 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10412 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10413 (about_to_request_buffer_space, trace_buffer_is_full)
10414 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10415 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10416 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10417 (traceframe_write_count, traceframes_created)
10418 (trace_state_variables)
10419 New renaming defines.
10420 (struct ipa_sym_addresses): New.
10421 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10422 (symbol_list): New.
10423 (ipa_sym_addrs): New.
10424 (all_tracepoint_symbols_looked_up): New.
10425 (in_process_agent_loaded): New.
10426 (write_e_ipa_not_loaded): New.
10427 (maybe_write_ipa_not_loaded): New.
10428 (tracepoint_look_up_symbols): New.
10429 (debug_threads) [IN_PROCESS_AGENT]: New.
10430 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10431 (UNKNOWN_SIDE_EFFECTS): New.
10432 (stop_tracing): New.
10433 (flush_trace_buffer): New.
10434 (stop_tracing_bkpt): New.
10435 (flush_trace_buffer_bkpt): New.
10436 (read_inferior_integer): New.
10437 (read_inferior_uinteger): New.
10438 (read_inferior_data_pointer): New.
10439 (write_inferior_data_pointer): New.
10440 (write_inferior_integer): New.
10441 (write_inferior_uinteger): New.
10442 (struct collect_static_trace_data_action): Delete.
10443 (enum tracepoint_type): New.
10444 (struct tracepoint) <type>: New field `type'.
10445 <actions_str, step_actions, step_actions_str>: Only include in
10447 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10448 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10449 (tracepoints): Use IP_AGENT_EXPORT.
10450 (last_tracepoint): Don't include in the IPA.
10451 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10452 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10453 (alloced_trace_state_variables): New.
10454 (trace_state_variables): Use IP_AGENT_EXPORT.
10455 (traceframe_t): Delete unused variable.
10456 (circular_trace_buffer): Don't include in the IPA.
10457 (trace_buffer_start): Delete.
10458 (struct trace_buffer_control): New.
10459 (trace_buffer_free): Delete.
10460 (struct ipa_trace_buffer_control): New.
10461 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10462 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10464 (trace_buffer_ctrl): New.
10465 (TRACE_BUFFER_CTRL_CURR): New.
10466 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10467 Reimplement as macros.
10468 (trace_buffer_wrap): Delete.
10469 (traceframe_write_count, traceframe_read_count)
10470 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10471 (struct tracepoint_hit_ctx) <type>: New field.
10472 (struct fast_tracepoint_ctx): New.
10473 (memory_barrier): New.
10475 (record_tracepoint_error): Update atomically in the IPA.
10476 (clear_inferior_trace_buffer): New.
10477 (about_to_request_buffer_space): New.
10478 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10479 updating the same buffer.
10480 (add_tracepoint): Default the tracepoint's type to trap
10481 tracepoint, and orig_size to -1.
10482 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10483 internal variables.
10484 (create_trace_state_variable): New parameter `gdb'. Handle it.
10485 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10486 (cmd_qtdp): Handle fast tracepoints.
10487 (cmd_qtdv): Adjust.
10488 (max_jump_pad_size): New.
10489 (gdb_jump_pad_head): New.
10490 (get_jump_space_head): New.
10491 (claim_jump_space): New.
10492 (sort_tracepoints): New.
10493 (MAX_JUMP_SIZE): New.
10494 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10496 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10497 support. Upload fast traceframes, and delete internal IPA
10499 (stop_tracing_handler): New.
10500 (flush_trace_buffer_handler): New.
10501 (cmd_qtstop): Upload fast tracepoints.
10502 (response_tracepoint): Handle fast tracepoints.
10503 (tracepoint_finished_step): Upload fast traceframes. Set the
10504 tracepoint hit context's tracepoint type.
10505 (handle_tracepoint_bkpts): New.
10506 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10507 type. Add comment about fast tracepoints.
10508 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10509 non-existing action_str field.
10510 (get_context_regcache): Handle fast tracepoints.
10511 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10513 (fast_tracepoint_from_jump_pad_address): New.
10514 (fast_tracepoint_from_ipa_tpoint_address): New.
10515 (collecting_t): New.
10516 (force_unlock_trace_buffer): New.
10517 (fast_tracepoint_collecting): New.
10519 (gdb_collect): New.
10520 (write_inferior_data_ptr): New.
10521 (target_tp_heap): New.
10522 (target_malloc): New.
10523 (download_agent_expr): New.
10525 (download_tracepoints): New.
10526 (download_trace_state_variables): New.
10527 (upload_fast_traceframes): New.
10528 (IPA_FIRST_TRACEFRAME): New.
10529 (IPA_NEXT_TRACEFRAME_1): New.
10530 (IPA_NEXT_TRACEFRAME): New.
10531 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10532 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10533 (gdb_jump_pad_buffer_end): New.
10534 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10535 (initialize_tracepoint): Adjust.
10536 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10537 buffer. Initialize the low module.
10538 * utils.c (PREFIX, TOOLNAME): New.
10539 (malloc_failure): Use PREFIX.
10540 (error): In the IPA, an error causes an exit.
10541 (fatal, warning): Use PREFIX.
10542 (internal_error): Use TOOLNAME.
10543 (NUMCELLS): Increase to 10.
10544 * configure, config.in: Regenerate.
10546 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10548 * server.c (handle_query) <qSupported>: Do two passes over the
10549 qSupported string to avoid nesting strtok.
10551 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10553 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10555 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10556 -Wl,--dynamic-list.
10557 * configure: Regenerate.
10558 * proc-service.list: New.
10560 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10562 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10565 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10567 * gdbreplay.c (remote_open): Check error return from socket() call by
10568 its equality to -1 not by it being negative.
10569 * remote-utils.c (remote_open): Likewise.
10571 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10573 * config.h: Regenerate.
10575 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10577 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10578 doesn't provide PTRACE_GET_THREAD_AREA.
10580 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10582 * linux-m68k-low.c: Include <asm/ptrace.h>
10583 (ps_get_thread_area): Implement.
10585 2010-05-03 Doug Evans <dje@google.com>
10587 * event-loop.c (struct callback_event): New struct.
10588 (callback_list): New global.
10589 (append_callback_event, delete_callback_event): New functions.
10590 (process_callback): New function.
10591 (start_event_loop): Call it.
10592 * remote-utils.c (NOT_SCHEDULED): Define.
10593 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10594 moved out of readchar.
10595 (readchar): Rewrite. Call reschedule before returning.
10596 (reset_readchar): New function.
10597 (remote_close): Call it.
10598 (process_remaining, reschedule): New functions.
10599 * server.h (callback_handler_func): New typedef.
10600 (append_callback_event, delete_callback_event): Declare.
10602 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10604 * proc-service.c (ps_pglobal_lookup): Use
10605 thread_db_look_up_one_symbol.
10606 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10607 parameter. Use it instead of all_symbols_looked_up.
10608 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10610 (all_symbols_looked_up): Don't declare.
10611 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10612 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10614 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10615 Set all_symbols_looked_up here.
10616 (thread_db_look_up_one_symbol): New.
10617 (thread_db_get_tls_address): Adjust.
10618 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10619 thread_db object on the heap, and tentatively set it in the
10621 (thread_db_init): Don't set all_symbols_looked_up here.
10622 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10624 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10626 * linux-low.c (linux_kill, linux_detach): Adjust.
10627 (status_pending_p_callback): Remove redundant statement. Check
10628 for !TARGET_WAITIKIND_IGNORE, instead of
10629 TARGET_WAITKIND_STOPPED.
10630 (handle_tracepoints): Make sure LWP is locked. Adjust.
10631 (linux_wait_for_event_1): Adjust.
10632 (linux_cancel_breakpoints): New.
10633 (unsuspend_one_lwp): New.
10634 (unsuspend_all_lwps): New.
10635 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10636 (send_sigstop_callback): Change return type to int, add new
10637 `except' parameter and handle it.
10638 (suspend_and_send_sigstop_callback): New.
10639 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10640 pass them down. If SUSPEND, also increment the lwp's suspend
10642 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10643 (need_step_over_p): Don't consider suspended LWPs.
10644 (start_step_over): Adjust.
10645 (proceed_one_lwp): Change return type to int, add new `except'
10646 parameter and handle it.
10647 (unsuspend_and_proceed_one_lwp): New.
10648 (proceed_all_lwps): Use find_inferior instead of
10650 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10651 also decrement the suspend count of LWPs. Pass `except' down,
10652 instead of hacking its suspend count.
10653 (linux_pause_all): Add `freeze' parameter. Adjust.
10654 (linux_unpause_all): New.
10655 (linux_target_ops): Install linux_unpause_all.
10656 * server.c (handle_status): Adjust.
10657 * target.h (struct target_ops): New fields `unpause_all' and
10658 `cancel_breakpoints'. Add new parameter to `pause_all'.
10659 (pause_all): Add new `freeze' parameter.
10660 (unpause_all): New.
10661 (cancel_breakpoints): New.
10662 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10663 cancel breakpoints.
10664 (cmd_qtstart): Pause threads.
10665 (stop_tracing): Pause threads, and cancel breakpoints.
10666 * win32-low.c (win32_target_ops): Adjust.
10668 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10670 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10671 the inferior right away from here...
10672 (linux_wait_1): ... to here, and adjust to check the thread's
10673 last_resume_kind instead of the lwp's step or stop_expected flags.
10675 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10677 * README: Use consistent `GDB' and `GDBserver' spellings.
10679 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10681 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10682 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10683 (linux_detach_one_lwp): Assume the lwp is stopped.
10684 (any_thread_of): Delete.
10685 (linux_detach): Stop all lwps here. Don't blindly delete all
10687 (delete_lwp_callback): New.
10688 (linux_mourn): Delete all lwps of the process that is gone.
10689 (linux_wait_1): Don't delete the last lwp of the process here.
10690 * mem-break.h (mark_breakpoints_out): Declare.
10691 * mem-break.c (mark_breakpoints_out): New.
10692 (free_all_breakpoints): Use it.
10693 * server.c (handle_target_event): If the process is gone, mark
10695 * thread-db.c (struct thread_db) <create_bp>: New field.
10696 (thread_db_enable_reporting): Fix prototype. Store a thread event
10697 breakpoint reference in the thread_db struct.
10698 (thread_db_load_search): Clear the thread_db object.
10699 (try_thread_db_load_1): Ditto.
10700 (switch_to_process): New.
10701 (disable_thread_event_reporting): Use it.
10702 (remove_thread_event_breakpoints): New.
10703 (thread_db_detach, thread_db_mourn): Use it.
10705 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10707 * linux-low.c (linux_enable_event_reporting): New.
10708 (linux_wait_for_event_1, handle_extended_wait): Use it.
10710 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10712 * linux-low.c (linux_kill_one_lwp, linux_kill)
10713 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10714 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10715 SIGSTOP even if the LWP is stopped.
10716 (send_sigstop_callback): New.
10717 (stop_all_lwps): Use send_sigstop_callback instead.
10718 (linux_resume_one_thread): Adjust.
10719 (proceed_one_lwp): Still proceed an LWP that the client has
10720 requested to stop, if we haven't reported it as stopped yet. Make
10721 sure that LWPs the client want stopped, have a pending SIGSTOP.
10723 2010-04-26 Doug Evans <dje@google.com>
10725 * server.c (handle_general_set): Make static.
10727 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10728 Print received char after testing for error/eof instead of before.
10729 (input_interrupt): Tweak comment.
10731 2010-04-23 Doug Evans <dje@google.com>
10733 * server.c (start_inferior): Print inferior argv if --debug.
10735 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10737 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10738 * nto-x86-low.c: Include server.h
10740 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10742 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10743 be consistent with other sources of this directory.
10744 (init_registers_amd64): Correct name of source file of this function
10747 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10749 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10750 64-bit executables.
10752 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10754 * win32-i386-low.c: Add 64-bit support.
10755 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10756 (init_registers_amd64): Declare.
10757 (mappings): Add 64-bit version of array.
10758 (init_windows_x86): New function.
10759 (the_low_target): Change init_arch field to init_windows_x86.
10761 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10763 * win32-low.c: Adapt to support also 64-bit architecture.
10764 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10765 (get_image_name): Use SIZE_T type for local variable `done'.
10766 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10767 (toolhelp_get_dll_name): Idem.
10768 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10769 Use uintptr_t typecast to avoid warning.
10770 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10771 (handle_exception): Use phex_nz to avoid warning.
10772 (win32_wait): Remove unused local variable `process'.
10774 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10776 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10779 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10781 * configure.ac: Use `ws2_32' library for srv_mingw.
10782 * configure: Regenerate.
10783 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10784 * remote-utils.c: Likewise.
10786 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10788 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10789 if __x86_64__ is defined.
10791 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10793 * configure: Regenerate.
10795 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10797 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10798 * target.h (target_ops): New get_tib_address field.
10799 * win32-low.h (win32_thread_info): Add thread_local_base field.
10800 * win32-low.c (child_add_thread): Add tlb argument.
10801 Set thread_local_base field to TLB.
10802 (get_child_debug_event): Adapt to child_add_thread change.
10803 (win32_get_tib_address): New function.
10804 (win32_target_ops): Set get_tib_address field to
10805 win32_get_tib_address.
10806 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10808 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10810 * linux-low.c (linux_mourn): Also remove the process.
10811 * server.c (handle_target_event): Don't remove the process here.
10812 * nto-low.c (nto_mourn): New.
10813 (nto_target_ops): Install it.
10814 * spu-low.c (spu_mourn): New.
10815 (spu_target_ops): Install it.
10816 * win32-low.c (win32_mourn): New.
10817 (win32_target_ops): Install it.
10819 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10821 * server.h (buffer_xml_printf): Remove redundant `;'.
10823 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10825 * regcache.c (set_register_cache): Invalidate regcaches before
10826 changing the register cache layout.
10827 (regcache_invalidate_one): Allow a NULL regcache.
10828 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10829 regcaches before changing the register cache layout or the target
10832 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10834 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10835 variable warning on Linux/x86-64.
10837 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10839 GDBserver disconnected tracing support.
10841 * linux-low.c (linux_remove_process): Delete.
10842 (add_lwp): Don't set last_resume_kind here.
10843 (linux_kill): Use `mourn'.
10844 (linux_detach): Use `thread_db_detach', and `mourn'.
10845 (linux_mourn): New.
10846 (linux_attach_lwp_1): Adjust comment.
10847 (linux_attach): last_resume_kind moved the thread_info; adjust.
10848 (status_pending_p_callback): Adjust.
10849 (linux_wait_for_event_1): Adjust.
10850 (count_events_callback, select_singlestep_lwp_callback)
10851 (select_event_lwp_callback, cancel_breakpoints_callback)
10852 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10853 (proceed_one_lwp): Adjust.
10854 (linux_async): Add debug output.
10855 (linux_thread_stopped): New.
10856 (linux_pause_all): New.
10857 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10859 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10860 (thread_db_free): Delete declaration.
10861 (thread_db_detach, thread_db_mourn): Declare.
10862 * thread-db.c (thread_db_init): Use thread_db_mourn.
10863 (thread_db_free): Delete, split in two.
10864 (disable_thread_event_reporting): New.
10865 (thread_db_detach): New.
10866 (thread_db_mourn): New.
10868 * server.h (struct thread_info) <last_resume_kind>: New field.
10869 <attached>: Add comment.
10870 <gdb_detached>: New field.
10871 (handler_func): Change return type to int.
10872 (handle_serial_event, handle_target_event): Ditto.
10873 (gdb_connected): Declare.
10875 (disconnected_tracing): Declare.
10876 (stop_tracing): Declare.
10878 * server.c (handle_query) <qSupported>: Report support for
10879 disconnected tracing.
10880 (queue_stop_reply_callback): Account for running threads.
10881 (gdb_wants_thread_stopped): New.
10882 (gdb_wants_all_threads_stopped): New.
10883 (gdb_reattached_process): New.
10884 (handle_status): Clear the `gdb_detached' flag of all processes.
10885 In all-stop, stop all threads.
10886 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10887 (process_serial_event): If the remote connection breaks, or if an
10888 exit was forced with "monitor exit", force an event loop exit.
10889 Handle disconnected tracing on detach.
10890 (handle_serial_event): Adjust.
10891 (handle_target_event): If GDB isn't connected, forward events back
10892 to the inferior, unless the last process exited, in which case,
10893 exit gdbserver. Adjust interface.
10895 * remote-utils.c (remote_open): Don't block in accept. Instead
10896 register an event loop source on the listen socket file
10897 descriptor. Refactor bits into ...
10898 (listen_desc): ... this new global.
10899 (gdb_connected): ... this new function.
10900 (enable_async_notification): ... this new function.
10901 (handle_accept_event): ... this new function.
10902 (remote_close): Clear remote_desc.
10904 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10906 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10908 (mourn_inferior): Define.
10909 (target_process_qsupported): Avoid the dangling else problem.
10910 (thread_stopped): Define.
10911 (pause_all): Define.
10912 (target_waitstatus_to_string): Declare.
10913 * target.c (target_waitstatus_to_string): New.
10915 * tracepoint.c (tracing): Make extern.
10916 (disconnected_tracing): New.
10917 (stop_tracing): Make extern. Handle tracing stops due to GDB
10919 (cmd_qtdisconnected): New.
10920 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10921 (handle_tracepoint_general_set): Handle QTDisconnected.
10923 * event-loop.c (event_handler_func): Change return type to int.
10924 (process_event): Bail out if the event handler wants the event
10926 (handle_file_event): Ditto.
10927 (start_event_loop): Bail out if the event handler wants the event
10930 * nto-low.c (nto_target_ops): Adjust.
10931 * spu-low.c (spu_wait): Don't remove the process here.
10932 (spu_target_ops): Adjust.
10933 * win32-low.c (win32_wait): Don't remove the process here.
10934 (win32_target_ops): Adjust.
10936 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10938 * regcache.c (realloc_register_cache): Invalidate inferior's
10939 regcache before recreating it.
10941 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10943 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10945 2010-04-09 Stan Shebs <stan@codesourcery.com>
10946 Pedro Alves <pedro@codesourcery.com>
10948 * server.h (LONGEST): New.
10949 (struct thread_info) <while_stepping>: New field.
10950 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10952 (initialize_tracepoint, handle_tracepoint_general_set)
10953 (handle_tracepoint_query, tracepoint_finished_step)
10954 (tracepoint_was_hit, release_while_stepping_state_list):
10955 (current_traceframe): Declare.
10956 * server.c (handle_general_set): Handle tracepoint packets.
10957 (read_memory): New.
10958 (write_memory): New.
10959 (handle_search_memory_1): Use read_memory.
10960 (handle_query): Report support for conditional tracepoints, trace
10961 state variables, and tracepoint sources. Handle tracepoint
10963 (main): Initialize the tracepoints module.
10964 (process_serial_event): Handle traceframe reads/writes.
10966 * linux-low.c (handle_tracepoints): New.
10967 (linux_wait_1): Call it.
10968 (linux_resume_one_lwp): Handle while-stepping.
10969 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10970 (linux_target_ops): Install them.
10971 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10973 * linux-x86-low.c (x86_supports_tracepoints): New.
10974 (the_low_target). Install it.
10976 * mem-break.h (delete_breakpoint): Declare.
10977 * mem-break.c (delete_breakpoint): Make external.
10979 * target.h (struct target_ops): Add `supports_tracepoints',
10980 `read_pc', and `write_pc' fields.
10981 (target_supports_tracepoints): Define.
10982 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10985 * regcache.h (struct regcache) <registers_owned>: New field.
10986 (init_register_cache, regcache_cpy): Declare.
10987 (regcache_read_pc, regcache_write_pc): Declare.
10988 (register_cache_size): Declare.
10989 (supply_regblock): Declare.
10990 * regcache.c (init_register_cache): New.
10991 (new_register_cache): Use it.
10992 (regcache_cpy): New.
10993 (register_cache_size): New.
10994 (supply_regblock): New.
10995 (regcache_read_pc, regcache_write_pc): New.
10997 * tracepoint.c: New.
10999 * Makefile.in (OBS): Add tracepoint.o.
11000 (tracepoint.o): New rule.
11002 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11004 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11006 (i386-mmx.c): Likewise.
11007 (i386-mmx-linux.o): Likewise.
11008 (i386-mmx-linux.c): Likewise.
11010 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11011 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11012 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11013 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11015 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11016 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11017 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11019 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11021 * Makefile.in (clean): Updated.
11023 (i386-avx.c): Likewise.
11024 (i386-avx-linux.o): Likewise.
11025 (i386-avx-linux.c): Likewise.
11026 (amd64-avx.o): Likewise.
11027 (amd64-avx.c): Likewise.
11028 (amd64-avx-linux.o): Likewise.
11029 (amd64-avx-linux.c): Likewise.
11031 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11032 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11033 (srv_amd64_regobj): Add amd64-avx.o.
11034 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11035 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11036 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11037 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11038 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11039 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11040 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11042 * i387-fp.c: Include "i386-xstate.h".
11044 (i387_cache_to_xsave): Likewise.
11045 (i387_xsave_to_cache): Likewise.
11046 (x86_xcr0): Likewise.
11048 * i387-fp.h (i387_cache_to_xsave): Likewise.
11049 (i387_xsave_to_cache): Likewise.
11050 (x86_xcr0): Likewise.
11052 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11053 * linux-crisv32-low.c (target_regsets): Likewise.
11054 * linux-m68k-low.c (target_regsets): Likewise.
11055 * linux-mips-low.c (target_regsets): Likewise.
11056 * linux-ppc-low.c (target_regsets): Likewise.
11057 * linux-s390-low.c (target_regsets): Likewise.
11058 * linux-sh-low.c (target_regsets): Likewise.
11059 * linux-sparc-low.c (target_regsets): Likewise.
11060 * linux-xtensa-low.c (target_regsets): Likewise.
11062 * linux-low.c: Include <sys/uio.h>.
11063 (regsets_fetch_inferior_registers): Support nt_type.
11064 (regsets_store_inferior_registers): Likewise.
11065 (linux_process_qsupported): New.
11066 (linux_target_ops): Add linux_process_qsupported.
11068 * linux-low.h (regset_info): Add nt_type.
11069 (linux_target_ops): Add process_qsupported.
11071 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11073 (init_registers_i386_avx_linux): New.
11074 (init_registers_amd64_avx_linux): Likewise.
11075 (xmltarget_i386_linux_no_xml): Likewise.
11076 (xmltarget_amd64_linux_no_xml): Likewise.
11077 (PTRACE_GETREGSET): Likewise.
11078 (PTRACE_SETREGSET): Likewise.
11079 (x86_fill_xstateregset): Likewise.
11080 (x86_store_xstateregset): Likewise.
11081 (use_xml): Likewise.
11082 (x86_linux_update_xmltarget): Likewise.
11083 (x86_linux_process_qsupported): Likewise.
11084 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11085 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11086 init_registers_i386_linux here. Call
11087 x86_linux_update_xmltarget.
11088 (the_low_target): Add x86_linux_process_qsupported.
11090 * server.c (handle_query): Call target_process_qsupported.
11092 * target.h (target_ops): Add process_qsupported.
11093 (target_process_qsupported): New.
11095 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11097 * inferiors.c (add_thread): Set last_status kind to
11098 TARGET_WAITKIND_IGNORE.
11099 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11100 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11101 (linux_wait_1): Move `thread' local definition to block that uses
11102 it. Don't NULL initialize `event_child'.
11103 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11104 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11105 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11107 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11109 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11110 an extended waitstatus, or by a watchpoint.
11111 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11112 thread was stepping or has been stopped by a watchpoint.
11114 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11116 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11117 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11118 of another, then delete the previous, and validate all
11120 (validate_inserted_breakpoint): New.
11121 (delete_disabled_breakpoints): New.
11122 (validate_breakpoints): New.
11123 (check_mem_read): Validate breakpoints before trusting their
11124 shadow. Delete disabled breakpoints.
11125 (check_mem_write): Validate breakpoints before trusting they
11126 should be inserted. Delete disabled breakpoints.
11127 * mem-break.h (validate_breakpoints):
11128 * server.c (handle_query): Validate breakpoints when we see a
11131 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11133 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11134 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11135 if we could tell there's a GDB breakpoint at stop_pc.
11136 (need_step_over_p): Don't do a step over if we find a GDB
11137 breakpoint at the resume PC.
11139 * mem-break.c (struct raw_breakpoint): New.
11140 (enum bkpt_type): New type `gdb_breakpoint'.
11141 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11142 fields. New field `raw'.
11143 (find_raw_breakpoint_at): New.
11144 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11145 breakpoint instead.
11146 (set_breakpoint_at): Adjust.
11147 (delete_raw_breakpoint): New.
11148 (release_breakpoint): New.
11149 (delete_breakpoint): Rename to...
11150 (delete_breakpoint_1): ... this. Add proc parameter. Use
11151 release_breakpoint. Return ENOENT.
11152 (delete_breakpoint): Reimplement.
11153 (find_breakpoint_at): Delete.
11154 (find_gdb_breakpoint_at): New.
11155 (delete_breakpoint_at): Delete.
11156 (set_gdb_breakpoint_at): New.
11157 (delete_gdb_breakpoint_at): New.
11158 (gdb_breakpoint_here): New.
11159 (set_reinsert_breakpoint): Use release_breakpoint.
11160 (uninsert_breakpoint): Rename to ...
11161 (uninsert_raw_breakpoint): ... this.
11162 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11163 (reinsert_raw_breakpoint): Change parameter type to
11165 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11167 (check_breakpoints): Adjust. Use release_breakpoint.
11168 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11169 (breakpoint_inserted_here): Ditto.
11170 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11171 Don't trust the breakpoint's shadow if it is not inserted.
11172 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11173 (delete_all_breakpoints): Adjust.
11174 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11175 use delete_breakpoint_1.
11177 * mem-break.h (breakpoints_supported): Delete declaration.
11178 (set_gdb_breakpoint_at): Declare.
11179 (gdb_breakpoint_here): Declare.
11180 (delete_breakpoint_at): Delete.
11181 (delete_gdb_breakpoint_at): Declare.
11183 * server.h (struct raw_breakpoint): Forward declare.
11184 (struct process_info): New field `raw_breakpoints'.
11186 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11189 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11191 * linux-low.c (status_pending_p_callback): Fix comment.
11192 (linux_wait_for_event_1): Move most of the internal breakpoint
11193 handling from here...
11194 (linux_wait_1): ... to here.
11195 (count_events_callback): New.
11196 (select_singlestep_lwp_callback): New.
11197 (select_event_lwp_callback): New.
11198 (cancel_breakpoints_callback): New.
11199 (select_event_lwp): New.
11200 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11201 priority to all LWPs that have had events that should be reported
11202 to the client. Cancel breakpoints when about to reporting the
11203 event to the client, not while stopping lwps. No longer cancel
11204 finished single-steps here.
11205 (cancel_finished_single_step): Delete.
11206 (cancel_finished_single_steps): Delete.
11208 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11210 * mem-break.c (enum bkpt_type): New.
11211 (struct breakpoint): New field `type'.
11212 (set_breakpoint_at): Change return type to struct breakpoint
11213 pointer. Set type to `other_breakpoint' by default.
11214 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11215 in the breakpoint list.
11216 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11217 (reinsert_breakpoint): Rename to ...
11218 (reinsert_raw_breakpoint): ... this.
11219 (reinsert_breakpoints_at): Adjust.
11220 * mem-break.h (struct breakpoint): Declare.
11221 (set_breakpoint_at): Change return type to struct breakpoint
11224 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11226 * server.c (handle_query): Assign, not compare.
11228 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11230 Teach linux gdbserver to step-over-breakpoints.
11232 * linux-low.c (can_hardware_single_step): New.
11233 (supports_breakpoints): New.
11234 (handle_extended_wait): If stopping threads, read the stop pc of
11235 the new cloned LWP.
11237 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11238 low target doesn't support retrieving the PC.
11239 (add_lwp): Set last_resume_kind to resume_continue.
11240 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11241 (linux_attach): Don't clear stop_expected. Set the lwp's
11242 last_resume_kind to resume_stop.
11243 (linux_detach_one_lwp): Don't check for removed breakpoints.
11244 (check_removed_breakpoint): Delete.
11245 (status_pending_p): Rename to ...
11246 (status_pending_p_callback): ... this. Don't check for removed
11247 breakpoints. Don't consider threads that are stopped from GDB's
11249 (linux_wait_for_lwp): Always read the stop_pc here.
11250 (cancel_breakpoint): New.
11251 (step_over_bkpt): New global.
11252 (linux_wait_for_event_1): Implement stepping over breakpoints.
11253 (gdb_wants_lwp_stopped): New.
11254 (gdb_wants_all_stopped): New.
11255 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11256 single-step traps here. Store the thread's last reported target
11258 (send_sigstop): Don't clear stop_expected. Always set it,
11260 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11261 (cancel_finished_single_step): New.
11262 (cancel_finished_single_steps): New.
11263 (wait_for_sigstop): Don't cancel finished single-step traps here.
11264 (linux_resume_one_lwp): Don't check for removed breakpoints.
11265 Don't set `step' on non-hardware step archs.
11266 (linux_set_resume_request): Ignore resume_stop requests if already
11267 stopping or stopped. Set the lwp's last_resume_kind.
11268 (resume_status_pending_p): Don't check for removed breakpoints.
11269 (need_step_over_p): New.
11270 (start_step_over): New.
11271 (finish_step_over): New.
11272 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11273 requests. Clear the thread's last reported target waitstatus.
11274 Don't use the `suspended' flag. Don't consider pending breakpoints.
11275 (linux_resume): Start a step-over if necessary.
11276 (proceed_one_lwp): New.
11277 (proceed_all_lwps): New.
11278 (unstop_all_lwps): New.
11279 * linux-low.h (struct lwp_info): Rewrite comment for the
11280 `suspended' flag. Add the `stop_pc' field. Delete the
11281 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11282 Add `'last_resume_kind' and `need_step_over' fields.
11283 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11284 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11285 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11286 (set_raw_breakpoint_at): New.
11287 (set_breakpoint_at): Rewrite to use it.
11288 (reinsert_breakpoint_handler): Delete.
11289 (set_reinsert_breakpoint): New.
11290 (reinsert_breakpoint_by_bp): Delete.
11291 (delete_reinsert_breakpoints): New.
11292 (uninsert_breakpoint): Rewrite.
11293 (uninsert_breakpoints_at): New.
11294 (reinsert_breakpoint): Rewrite.
11295 (reinsert_breakpoints_at): New.
11296 (check_breakpoints): Rewrite.
11297 (breakpoint_here): New.
11298 (breakpoint_inserted_here): New.
11299 (check_mem_read): Adjust.
11300 * mem-break.h (breakpoints_supported, breakpoint_here)
11301 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11302 (reinsert_breakpoint_by_bp): Delete declaration.
11303 (delete_reinsert_breakpoints): Declare.
11304 (reinsert_breakpoint): Delete declaration.
11305 (reinsert_breakpoints_at): Declare.
11306 (uninsert_breakpoint): Delete declaration.
11307 (uninsert_breakpoints_at): Declare.
11308 (check_breakpoints): Adjust prototype.
11309 * server.h: Adjust include order.
11310 (struct thread_info): Declare here. Add a `last_status' field.
11312 2010-03-23 Michael Snyder <msnyder@vmware.com>
11314 * server.c (crc32): New function.
11315 (handle_query): Add handling for 'qCRC:' request.
11317 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11319 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11320 lwp had been stopped by a watchpoint.
11322 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11324 * server.h (internal_error): Declare.
11325 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11326 * utils.c (internal_error): New function.
11328 2010-03-15 Andreas Schwab <schwab@redhat.com>
11330 * configure.srv: Fix typo setting srv_regobj.
11332 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11334 * linux-low.c (fetch_register): Avoid passing a non string literal
11336 (usr_store_inferior_registers): Ditto.
11338 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11340 * linux-low.c (linux_write_memory): Bail out early if peeking
11343 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11345 * linux-low.h (struct lwp_info): New fields
11346 `stopped_by_watchpoint' and `stopped_data_address'.
11347 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11348 here, and cache them in the lwp object.
11349 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11351 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11353 (linux_stopped_by_watchpoint): Rewrite.
11354 (linux_stopped_data_address): Rewrite.
11356 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11358 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11359 switching the current inferior, not before.
11361 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11363 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11364 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11365 i386-linux.c and amd64-linux.c.
11366 (reg-i386.o): Removed.
11367 (reg-i386.c): Likewise.
11368 (reg-i386-linux.o): Likewise.
11369 (reg-i386-linux.c): Likewise.
11370 (reg-x86-64.o): Likewise.
11371 (reg-x86-64.c): Likewise.
11372 (reg-x86-64-linux.o): Likewise.
11373 (reg-x86-64-linux.c): Likewise.
11375 (i386.c): Likewise.
11376 (i386-linux.o): Likewise.
11377 (i386-linux.c): Likewise.
11378 (amd64.o): Likewise.
11379 (amd64.c): Likewise.
11380 (amd64-linux.o): Likewise.
11381 (amd64-linux.c): Likewise.
11383 * configure.srv (srv_i386_regobj): New.
11384 (srv_i386_linux_regobj): Likewise.
11385 (srv_amd64_regobj): Likewise.
11386 (srv_amd64_linux_regobj): Likewise.
11387 (srv_i386_32bit_xmlfiles): Likewise.
11388 (srv_i386_64bit_xmlfiles): Likewise.
11389 (srv_i386_xmlfiles): Likewise.
11390 (srv_amd64_xmlfiles): Likewise.
11391 (srv_i386_linux_xmlfiles): Likewise.
11392 (srv_amd64_linux_xmlfiles): Likewise.
11393 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11394 srv_xmlfiles to $srv_i386_xmlfiles.
11395 (i[34567]86-*-mingw32ce*): Likewise.
11396 (i[34567]86-*-mingw*): Likewise.
11397 (i[34567]86-*-nto*): Likewise.
11398 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11399 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11400 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11401 (x86_64-*-linux*): Likewise.
11403 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11404 (init_registers_amd64_linux): New.
11405 (x86_arch_setup): Replace init_registers_x86_64_linux with
11406 init_registers_amd64_linux.
11408 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11410 * configure.ac: Check for libdl. If it is not available link against
11411 static libthread_db.
11412 * configure: Regenerate.
11414 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11418 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11419 handing a read watchpoint.
11420 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11422 2010-02-12 Doug Evans <dje@google.com>
11424 * linux-low.c (linux_supports_tracefork_flag): Document.
11425 (linux_look_up_symbols): Add comment.
11427 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11429 * regcache.c (supply_register): Clear regcache if buf is NULL.
11431 2010-02-02 Nicolas Roche <roche@sourceware.org>
11432 Joel Brobecker <brobecker@adacore.com>
11434 * inferiors.c (find_inferior): Add function documentation.
11435 (unloaded_dll): Handle the case where the unloaded dll has not
11436 been previously registered in the dll list.
11438 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11440 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11441 (thumb2_breakpoint): New.
11442 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11444 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11446 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11447 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11450 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11452 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11454 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11456 * linux-s390-low.c (s390_collect_ptrace_register)
11457 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11459 2010-01-21 Doug Evans <dje@google.com>
11461 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11462 (PTRACE_ARG4_TYPE): New macro.
11463 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11464 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11465 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11466 (usr_store_inferior_registers): Ditto.
11467 (linux_read_memory, linux_write_memory): Ditto.
11468 (linux_test_for_tracefork): Ditto.
11470 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11471 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11473 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11475 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11478 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11480 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11481 prototype to take a regcache. Adjust.
11483 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11485 * regcache.h (struct thread_info): Forward declare.
11486 (struct regcache): New.
11487 (new_register_cache): Adjust prototype.
11488 (get_thread_regcache): Declare.
11489 (free_register_cache): Adjust prototype.
11490 (registers_to_string, registers_from_string): Ditto.
11491 (supply_register, supply_register_by_name, collect_register)
11492 (collect_register_as_string, collect_register_by_name): Ditto.
11493 * regcache.c (struct inferior_regcache_data): Delete.
11494 (get_regcache): Rename to ...
11495 (get_thread_regcache): ... this. Adjust. Switch inferior before
11496 fetching registers.
11497 (regcache_invalidate_one): Adjust.
11498 (regcache_invalidate): Fix prototype.
11499 (new_register_cache): Return the new register cache.
11500 (free_register_cache): Change prototype.
11501 (realloc_register_cache): Adjust.
11502 (registers_to_string): Change prototype to take a regcache. Adjust.
11503 (registers_from_string): Ditto.
11504 (register_data): Ditto.
11505 (supply_register): Ditto.
11506 (supply_register_by_name): Ditto.
11507 (collect_register): Ditto.
11508 (collect_register_as_string): Ditto.
11509 (collect_register_by_name): Ditto.
11510 * server.c (process_serial_event): Adjust.
11511 * linux-low.h (regset_fill_func, regset_store_func): Change
11513 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11515 * linux-low.c (get_stop_pc): Adjust.
11516 (check_removed_breakpoint): Adjust.
11517 (linux_wait_for_event): Adjust.
11518 (linux_resume_one_lwp): Adjust.
11519 (fetch_register): Add regcache parameter. Adjust.
11520 (usr_store_inferior_registers): Ditto.
11521 (regsets_fetch_inferior_registers): Ditto.
11522 (regsets_store_inferior_registers): Ditto.
11523 (linux_fetch_registers, linux_store_registers): Ditto.
11524 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11526 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11528 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11529 prototype to take a regcache.
11530 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11531 * remote-utils.c (convert_ascii_to_int, outreg)
11532 (prepare_resume_reply): Change prototype to take a regcache.
11534 * target.h (struct target_ops) <fetch_registers, store_registers>:
11535 Change prototype to take a regcache.
11536 (fetch_inferior_registers, store_inferior_registers): Change
11537 prototype to take a regcache. Adjust.
11538 * proc-service.c (ps_lgetregs): Adjust.
11539 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11540 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11541 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11542 take a regcache. Adjust.
11543 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11544 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11545 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11546 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11547 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11548 (cris_cannot_fetch_register):
11549 (cris_breakpoint_at): Change prototype to take a regcache.
11551 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11552 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11553 to take a regcache. Adjust.
11554 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11556 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11557 take a regcache. Adjust.
11558 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11559 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11560 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11561 * linux-mips-low.c (mips_get_pc):
11562 (mips_set_pc): Change prototype to take a regcache. Adjust.
11563 (mips_reinsert_addr): Adjust.
11564 (mips_collect_register): Change prototype to take a regcache.
11566 (mips_supply_register):
11567 (mips_collect_register_32bit, mips_supply_register_32bit)
11568 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11569 (mips_store_fpregset): Ditto.
11570 * linux-ppc-low.c (ppc_supply_ptrace_register)
11571 (ppc_supply_ptrace_register): Ditto.
11572 (parse_spufs_run): Adjust.
11573 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11574 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11575 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11576 take a regcache. Adjust.
11577 * linux-s390-low.c (s390_collect_ptrace_register)
11578 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11579 (s390_set_pc): Change prototype to take a regcache. Adjust.
11580 (s390_arch_setup): Adjust.
11581 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11582 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11583 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11584 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11585 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11587 (sparc_breakpoint_at): Adjust.
11588 * linux-xtensa-low.c (xtensa_fill_gregset):
11589 (xtensa_store_gregset):
11590 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11591 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11592 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11593 prototype to take a regcache. Adjust.
11594 * win32-arm-low.c (arm_fetch_inferior_register)
11595 (arm_store_inferior_register): Change prototype to take a
11597 * win32-i386-low.c (i386_fetch_inferior_register)
11598 (i386_store_inferior_register): Change prototype to take a
11600 * win32-low.c (child_fetch_inferior_registers)
11601 (child_store_inferior_registers): Change prototype to take a
11603 (win32_wait): Adjust.
11604 (win32_fetch_inferior_registers): Change prototype to take a
11606 (win32_store_inferior_registers): Adjust.
11607 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11608 store_inferior_register>: Change prototype to take a regcache.
11610 2010-01-20 Doug Evans <dje@google.com>
11612 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11614 (linux_wait_for_event1, linux_init_signals): Ditto.
11615 (W_STOPCODE): Provide definition if missing.
11617 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11619 * linux-low.c (linux_core_of_thread): New.
11620 (compare_ints, show_process, list_threads): New.
11621 (linux_qxfer_osdata): Report threads and cores.
11622 (linux_target_op): Register linux_core_of_thread.
11623 * remote-utils.c (prepare_resume_reply): Report the core.
11624 (buffer_xml_printf): Support %d specifier.
11625 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11627 (handle_query): Handle qXfer:threads. Announce availability
11629 * target.h (struct target_ops): New field core_of_thread.
11631 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11633 * Makefile.in (clean): Remove new generated files.
11634 (reg-s390.o, reg-s390.c): Remove rules.
11635 (reg-s390x.o, reg-s390x.c): Likewise.
11636 (s390-linux32.o, s390-linux32.c): Add rules.
11637 (s390-linux64.o, s390-linux64.c): Likewise.
11638 (s390x-linux64.o, s390x-linux64.c): Likewise.
11639 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11640 * linux-s390-low.c: Include <elf.h>.
11641 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11642 (init_registers_s390): Remove prototype.
11643 (init_registers_s390x): Likewise.
11644 (init_registers_s390_linux32): Add prototype.
11645 (init_registers_s390_linux64): Likewise.
11646 (init_registers_s390x_linux64): Likewise.
11647 (s390_num_regs_3264): New define.
11648 (s390_regmap_3264): New global variable.
11649 (s390_cannot_fetch_register): Remove obsolete check.
11650 (s390_cannot_store_register): Likewise.
11651 (s390_collect_ptrace_register): Handle upper/lower register halves.
11652 (s390_supply_ptrace_register): Likewise.
11653 (s390_fill_gregset): Update to register number changes.
11654 (s390_get_hwcap): New routine.
11655 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11656 Install appropriate regmap and register set.
11658 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11660 * server.c (gdbserver_version): Update copyright year to 2010.
11661 * gdbreplay.c (gdbreplay_version): Likewise.
11663 2009-12-28 Doug Evans <dje@google.com>
11665 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11666 elf/external.h. Include <elf.h> instead but only if necessary.
11668 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11670 * linux-low.c (linux_remove_process): Remove `detaching'
11671 parameter. Don't release/detach from thread_db here.
11672 (linux_kill): Release/detach from thread_db here, ...
11673 (linux_detach): ... and here, before actually detaching.
11674 (linux_wait_1): ... and here, when a process exits.
11675 * thread-db.c (any_thread_of): New.
11676 (thread_db_free): Switch the current inferior to a thread of the
11679 2009-12-21 Doug Evans <dje@google.com>
11681 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11683 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11684 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11685 warning ifndef __NR_tkill. Move setting of errno there too.
11686 Delete unnecessary resetting of errno after syscall.
11687 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11689 * configure.ac: Check for dladdr.
11690 * config.in: Regenerate.
11691 * configure: Regenerate.
11692 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11693 (try_thread_db_load): Update.
11695 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11697 2009-12-18 Doug Evans <dje@google.com>
11699 * event-loop.c: Include unistd.h if it exists.
11701 * linux-low.c (my_waitpid): Move definition away from being in
11702 between linux_tracefork_child/linux_test_for_tracefork.
11704 * gdb_proc_service.h (psaddr_t): Fix type.
11705 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11706 signature to match glibc.
11708 2009-12-16 Doug Evans <dje@google.com>
11710 * linux-low.c (linux_read_memory): Fix argument to read.
11712 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11714 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11715 events, don't leave current_inferior pointing at null.
11717 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11719 * win32-low.c (LOG): Delete.
11720 (OUTMSG): Output to stderr.
11721 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11722 on compile time LOG macro.
11723 (win32_wait): Fix debug output.
11725 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11727 * win32-low.c (win32_add_one_solib): If the dll name is
11728 "ntdll.dll", prepend the system directory to the dll path.
11730 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11732 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11734 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11735 Vladimir Prus <vladimir@codesourcery.com>
11737 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11738 * configure.ac: Check for __mcoldfire__ and set
11739 gdb_cv_m68k_is_coldfire.
11740 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11741 reg-cf.o and reg-m68k.o.
11742 * configure: Regenerated.
11744 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11746 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11747 Pass it to thread_db_free.
11748 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11749 proper `detaching' argument to linux_remove_process.
11750 * linux-low.h (thread_db_free): Add `detaching' parameter.
11751 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11753 (thread_db_free): Add `detaching' parameter. Only
11754 call td_ta_clear_event if detaching from process.
11756 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11758 * thread-db.c (thread_db_free): Fix typo.
11760 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11763 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11765 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11767 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11768 with an i686 compiler.
11769 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11771 * configure: Rebuilt.
11773 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11777 * server.c (handle_search_memory_1): Correct read_addr initialization
11778 in loop for searching subsequent chunks.
11780 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11782 * configure.ac: New --with-libthread-db option.
11783 * thread-db.c: Allow direct dependence on libthread_db.
11784 (thread_db_free): Adjust.
11785 * config.in: Regenerate.
11786 * configure: Likewise.
11788 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11791 * thread-db.c (attach_thread): New function.
11792 (maybe_attach_thread): Return success/failure.
11793 (find_new_threads_callback): Adjust.
11794 (thread_db_find_new_threads): Loop until no new threads.
11796 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11798 * proc-service.c (ps_lgetregs): Formatting.
11800 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11802 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11803 * configure.ac: Adjust.
11804 * linux-low.h (struct process_info_private): Move members to struct
11806 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11807 * linux-low.c (linux_remove_process): Adjust.
11808 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11809 * server.c (handle_query): Move code ...
11810 (handle_monitor_command): ... here. New function.
11811 * target.h (struct target_ops): New member.
11812 * thread-db.c (struct thread_db): New.
11813 (libthread_db_search_path): New variable.
11814 (thread_db_create_event, thread_db_enable_reporting)
11815 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11816 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11817 (try_thread_db_load_1, dladdr_to_soname): New functions.
11818 (try_thread_db_load, thread_db_load_search): New functions.
11819 (thread_db_init): Search for libthread_db.
11820 (thread_db_free): New function.
11821 (thread_db_handle_monitor_command): Likewise.
11822 * config.in: Regenerate.
11823 * configure: Regenerate.
11825 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11827 * spu-low.c (spu_kill): Wait for inferior to terminate.
11828 Call clear_inferiors.
11829 (spu_detach): Call clear_inferiors.
11831 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11833 * aclocal.m4: Regenerate.
11834 * config.in: Likewise.
11835 * configure: Likewise.
11837 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11839 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11840 (parse_spufs_run): New function.
11841 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11842 (ppc_breakpoint_at): Handle SPU breakpoints.
11844 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11846 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11847 (SPUFS_MAGIC): Define.
11848 (spu_enumerate_spu_ids): New function.
11849 (linux_qxfer_spu): New function.
11850 (linux_target_ops): Install linux_qxfer_spu.
11852 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11854 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11855 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11856 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11857 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11858 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11859 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11860 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11861 (init_registers_powerpc_cell32l): Add prototype.
11862 (init_registers_powerpc_cell64l): Likewise.
11863 (ppc_arch_setup): Detect Cell/B.E. architecture.
11865 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11867 * Makefile.in (datarootdir): New variable.
11869 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11871 * linux-low.c (linux_write_memory): Update debugging output.
11872 * Makefile.in (clean): Add new descriptions.
11873 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11874 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11875 * configure.srv: Add new files for arm*-*-linux*.
11876 * linux-arm-low.c: Add new declarations.
11877 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11878 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11879 (HWCAP_VFPv3D16): New.
11880 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11881 instead of __IWMMXT__.
11882 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11883 (arm_arch_setup): New.
11884 (target_regsets): Remove #ifdef. Add VFP regset.
11885 (the_low_target): Use arm_arch_setup.
11887 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11889 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11890 the main thread again.
11892 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11894 Adding Neutrino gdbserver.
11895 * configure: Regenerated.
11896 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11897 * configure.srv (i[34567]86-*-nto*): New target.
11898 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11899 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11900 (nto_comctrl) [__QNX__]: New function.
11901 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11903 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11905 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11908 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11909 Pedro Alves <pedro@codesourcery.com>
11911 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11912 don't support CONTEXT_EXTENDED_REGISTERS.
11913 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11914 (the_low_target): Install them.
11915 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11916 failing with ERROR_PIPE_NOT_CONNECTED.
11918 2009-06-30 Doug Evans <dje@google.com>
11919 Pierre Muller <muller@ics.u-strasbg.fr>
11921 Add h/w watchpoint support to x86-linux, win32-i386.
11922 * Makefile.in (SFILES): Add i386-low.c
11923 (i386_low_h): Define.
11924 (i386-low.o): Add dependencies.
11925 (linux-x86-low.o): Add i386-low.h dependency.
11926 (win32-i386-low.o): Ditto.
11927 * i386-low.c: New file.
11928 * i386-low.h: New file.
11929 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11930 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11931 * linux-low.c (linux_add_process): Initialize arch_private.
11932 (linux_remove_process): Free arch_private.
11933 (add_lwp): Initialize arch_private.
11934 (delete_lwp): Free arch_private.
11935 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11937 * linux-low.h (process_info_private): New member arch_private.
11938 (lwp_info): New member arch_private.
11939 (linux_target_ops): New members new_process, new_thread,
11941 (ptid_of): New macro.
11942 * linux-x86-low.c: Include stddef.h, i386-low.h.
11943 (arch_process_info): New struct.
11944 (arch_lwp_info): New struct.
11945 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11946 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11947 (i386_dr_low_get_status): New function.
11948 (x86_insert_point, x86_remove_point): New functions.
11949 (x86_stopped_by_watchpoint): New function.
11950 (x86_stopped_data_address): New function.
11951 (x86_linux_new_process, x86_linux_new_thread): New functions.
11952 (x86_linux_prepare_to_resume): New function.
11953 (the_low_target): Add entries for insert_point, remove_point,
11954 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11956 * server.c (debug_hw_points): New global.
11957 (monitor_show_help): Document set debug-hw-points.
11958 (handle_query): Process "set debug-hw-points".
11959 * server.h (debug_hw_points): Declare.
11960 (paddress): Declare.
11961 * utils.c (NUMCELLS, CELLSIZE): New macros.
11962 (get_sell, xsnprintf, paddress): New functions.
11963 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11964 remove_point, stopped_by_watchpoint, stopped_data_address.
11965 * win32-i386-low.c: Include i386-low.h.
11966 (debug_reg_state): Replaces dr.
11967 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11968 (i386_dr_low_get_status): New function.
11969 (i386_insert_point, i386_remove_point): New functions.
11970 (i386_stopped_by_watchpoint): New function.
11971 (i386_stopped_data_address): New function.
11972 (i386_initial_stuff): Update.
11973 (get_thread_context,set_thread_context,i386_thread_added): Update.
11974 (the_low_target): Add entries for insert_point,
11975 remove_point, stopped_by_watchpoint, stopped_data_address.
11976 * win32-low.c (win32_insert_watchpoint): New function.
11977 (win32_remove_watchpoint): New function.
11978 (win32_stopped_by_watchpoint): New function.
11979 (win32_stopped_data_address): New function.
11980 (win32_target_ops): Add entries for insert_watchpoint,
11981 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11982 * win32-low.h (win32_target_ops): New members insert_point,
11983 remove_point, stopped_by_watchpoint, stopped_data_address.
11985 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11987 * server.c (process_serial_event): Re-return unsupported, not
11988 error, if the type isn't recognized. Re-allow supporting only
11989 insert or remove packets. Also call require_running for
11990 breakpoints. Add missing break statement to default case. Tidy.
11991 * target.h (struct target_ops): Rename insert_watchpoint to
11992 insert_point, and remove_watchpoint to remove_point.
11994 * linux-low.h (struct linux_target_ops): Likewise.
11995 * linux-low.c (linux_insert_watchpoint): Rename to ...
11996 (linux_insert_point): ... this. Adjust.
11997 (linux_remove_watchpoint): Rename to ...
11998 (linux_remove_point): ... this. Adjust.
11999 (linux_target_ops): Adjust.
12000 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12001 (cris_insert_point): ... this.
12002 (cris_remove_watchpoint): Rename to ...
12003 (cris_remove_point): ... this.
12004 (the_low_target): Adjust.
12006 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12008 * server.c (handle_v_kill): Pass signal_pid to
12009 kill_inferior if multi_process is zero.
12011 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12013 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12014 * target.h (target_ops): Comment for *_watchpoint to make it clear
12015 the functions can get types '0' and '1'.
12017 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12019 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12020 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12021 * regcache.c (get_regcache): Likewise.
12022 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12023 * win32-low.c (child_fetch_inferior_registers): Remove check for
12026 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12027 Pedro Alves <pedro@codesourcery.com>
12029 * target.h (struct target_ops) <supports_multi_process>: New
12031 (target_supports_multi_process): New.
12032 * server.c (handle_query): Even if GDB reports support, only
12033 enable multi-process if the target also supports it. Report
12034 multi-process support only if the target backend supports it.
12035 * linux-low.c (linux_supports_multi_process): New function.
12036 (linux_target_ops): Install it as target_supports_multi_process
12039 2009-05-24 Doug Evans <dje@google.com>
12041 Global renaming of find_thread_pid to find_thread_ptid.
12042 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12043 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12044 All callers updated.
12046 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12047 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12050 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12051 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12052 (linux_resume_one_lwp): Ditto.
12054 2009-05-23 Doug Evans <dje@google.com>
12056 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12057 from struct inferior_list_entry * to struct lwp_info *.
12058 All callers updated.
12060 2009-05-13 Doug Evans <dje@google.com>
12062 * linux-x86-low.c: Don't include assert.h.
12063 (x86_siginfo_fixup): Use fatal, not assert.
12064 (x86_arch_setup): Fix comment.
12066 2009-05-12 Doug Evans <dje@google.com>
12068 Biarch support for i386/amd64 gdbserver.
12069 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12070 Add linux-x86-low.c.
12071 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12072 (linux-x86-low.o): Add.
12073 * linux-x86-64-low.c: Delete.
12074 * linux-i386-low.c: Delete.
12075 * linux-x86-low.c: New file.
12076 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12078 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12080 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12081 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12082 (linux_child_pid_to_exec_file): New function.
12083 (elf_64_header_p, elf_64_file_p): New functions.
12084 (siginfo_fixup): New function.
12085 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12086 give target a chance to convert layout.
12087 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12088 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12090 2009-05-07 Doug Evans <dje@google.com>
12092 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12093 (regsets_store_inferior_registers): Ditto.
12095 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12099 * linux-low.c (must_set_ptrace_flags): Delete.
12100 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12102 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12103 `lwp->must_set_ptrace_flags' instead.
12104 (linux_wait_for_event_1): Set ptrace options here.
12105 (linux_wait_1): ... not here.
12107 2009-04-30 Doug Evans <dje@google.com>
12109 * inferiors.c (started_inferior_callback): New function.
12110 (attached_inferior_callback): New function.
12111 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12112 * server.c (print_started_pid, print_attached_pid): New functions.
12113 (detach_or_kill_for_exit): New function.
12114 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12115 * server.h (have_started_inferiors_p): Declare.
12116 (have_attached_inferiors_p): Declare.
12118 * inferiors.c (remove_process): Fix memory leak, free process.
12119 * linux-low.c (linux_remove_process): New function.
12120 (linux_kill): Call it instead of remove_process.
12121 (linux_detach, linux_wait_1): Ditto.
12123 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12125 * configure.srv: Add x86 Windows CE target.
12127 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12129 * inferiors.c (get_thread_process): Make global.
12130 * server.h (get_thread_process): Add prototype.
12131 * thread-db.c (find_one_thread): Use get_thread_process
12132 instead of current_process.
12133 (thread_db_get_tls_address): Do not crash if called when
12134 thread layer is not yet initialized.
12136 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12138 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12139 * spu-low.c (current_tid): Rename to ...
12140 (current_ptid): ... this.
12141 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12142 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12143 ptid_get_lwp (current_ptid) instead of current_tid.
12144 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12145 instead of current_tid. Use find_process_pid to verify pid
12146 argument is valid. Pass proper argument to remove_process.
12147 (spu_thread_alive): Compare current_ptid instead of current_tid.
12148 (spu_resume): Likewise.
12150 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12152 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12155 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12157 Implement the multiprocess extensions, and add linux multiprocess
12160 * server.h (ULONGEST): Declare.
12161 (struct ptid, ptid_t): New.
12162 (minus_one_ptid, null_ptid): Declare.
12163 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12164 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12165 (struct inferior_list_entry): Change `id' type from unsigned from
12167 (struct sym_cache, struct breakpoint, struct
12168 process_info_private): Forward declare.
12169 (struct process_info): Declare.
12170 (current_process): Declare.
12171 (all_processes): Declare.
12172 (initialize_inferiors): Declare.
12173 (add_thread): Adjust to use ptid_t.
12174 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12175 (add_process, remove_process, find_thread_pid): Declare.
12176 (find_inferior_id): Adjust to use ptid_t.
12177 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12178 (multi_process): Declare.
12179 (push_event): Adjust to use ptid_t.
12180 (read_ptid, write_ptid): Declare.
12181 (prepare_resume_reply): Adjust to use ptid_t.
12182 (clear_symbol_cache): Declare.
12183 * inferiors.c (all_processes): New.
12184 (null_ptid, minus_one_ptid): New.
12185 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12186 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12187 (add_thread): Change unsigned long to ptid. Remove gdb_id
12189 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12190 (gdb_id_to_thread): Rename to ...
12191 (find_thread_pid): ... this. Change unsigned long to ptid.
12192 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12193 (loaded_dll, pull_pid_from_list): Adjust.
12194 (add_process, remove_process, find_process_pid)
12195 (get_thread_process, current_process, initialize_inferiors): New.
12196 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12197 (struct target_waitstatus) <related_pid>: Ditto.
12198 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12199 return type to int.
12200 (struct target_ops) <join>: Add `pid' argument.
12201 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12202 (struct target_ops) <wait>: Add `ptid' field. Change return type
12204 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12205 (mywait): Add `ptid' argument. Change return type to ptid_t.
12206 (target_pid_to_str): Declare.
12207 * target.c (set_desired_inferior): Adjust to use ptids.
12208 (mywait): Add new `ptid' argument. Adjust.
12209 (target_pid_to_str): New.
12210 * mem-break.h (free_all_breakpoints): Declare.
12211 * mem-break.c (breakpoints): Delelete.
12212 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12213 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12214 to use per-process breakpoint list.
12215 (free_all_breakpoints): New.
12216 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12217 (symbol_cache, all_symbols_looked_up): Delete.
12219 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12221 (prepare_resume_reply): Change ptid argument's type from unsigned
12222 long to ptid_t. Adjust. Implement W;process and X;process.
12223 (free_sym_cache, clear_symbol_cache): New.
12224 (look_up_one_symbol): Adjust to per-process symbol cache. *
12225 * server.c (cont_thread, general_thread, step_thread): Change type
12227 (attached): Delete.
12228 (multi_process): New.
12229 (last_ptid): Change type to ptid_t.
12230 (struct vstop_notif) <ptid>: Change type to ptid_t.
12231 (queue_stop_reply, push_event): Change `ptid' argument's type to
12233 (discard_queued_stop_replies): Add `pid' argument.
12234 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12235 changes. Don't reference the `attached' global.
12236 (attach_inferior): Adjust to mywait interface changes.
12237 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12238 features. Handle and report "multiprocess+". Handle
12240 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12242 (handle_v_kill): New.
12243 (handle_v_stopped): Adjust to use target_pid_to_str.
12244 (handle_v_requests): Allow multiple attaches and runs when
12245 multiprocess extensions are in effect. Handle "vKill".
12246 (myresume): Adjust to use ptids.
12247 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12248 (handle_status): Adjust to discard_queued_stop_replies interface
12250 (first_thread_of, kill_inferior_callback)
12251 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12252 (main): Call initialize_inferiors. Adjust to use ptids, killing
12253 and detaching from all inferiors. Handle multiprocess packet
12255 * linux-low.h: Include gdb_proc_service.h.
12256 (struct process_info_private): New.
12257 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12258 <lwpid_of>: Use ptid_get_lwp.
12259 (get_lwp_thread): Adjust.
12260 (struct lwp_info): Add `dead' member.
12261 (find_lwp_pid): Declare.
12262 * linux-low.c (thread_db_active): Delete.
12263 (new_inferior): Adjust comment.
12264 (inferior_pid): Delete.
12265 (linux_add_process): New.
12266 (handle_extended_wait): Adjust.
12267 (add_lwp): Change unsigned long to ptid.
12268 (linux_create_inferior): Add process to processes table. Adjust
12269 to use ptids. Don't set new_inferior here.
12270 (linux_attach_lwp): Rename to ...
12271 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12272 it. Adjust to use ptids.
12273 (linux_attach_lwp): New.
12274 (linux_attach): Add process to processes table. Don't set
12276 (struct counter): New.
12277 (second_thread_of_pid_p, last_thread_of_process_p): New.
12278 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12279 multiple processes.
12280 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12281 processes. Remove process from process table.
12282 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12283 to multiple processes.
12284 (any_thread_of): New.
12285 (linux_detach): Add `pid' argument, and handle it. Remove process
12286 from processes table.
12287 (linux_join): Add `pid' argument. Handle it.
12288 (linux_thread_alive): Change unsighed long argument to ptid_t.
12289 Consider dead lwps as not being alive.
12290 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12291 threads we're not interested in.
12292 (same_lwp, find_lwp_pid): New.
12293 (linux_wait_for_lwp): Change `pid' argument's type from int to
12295 (linux_wait_for_event): Rename to ...
12296 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12297 from int to ptid_t. Adjust.
12298 (linux_wait_for_event): New.
12299 (linux_wait_1): Add `ptid' argument. Change return type to
12300 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12301 that exit from the process table.
12302 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12304 (mark_lwp_dead): New.
12305 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12306 stopping all threads, mark its main lwp as dead.
12307 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12309 (fetch_register, usr_store_inferior_registers)
12310 (regsets_fetch_inferior_registers)
12311 (regsets_store_inferior_registers, linux_read_memory)
12312 (linux_write_memory): Inline `inferior_pid'.
12313 (linux_look_up_symbols): Adjust to use per-process
12314 `thread_db_active'.
12315 (linux_request_interrupt): Adjust to use ptids.
12316 (linux_read_auxv): Inline `inferior_pid'.
12317 (initialize_low): Don't reference thread_db_active.
12318 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12319 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12320 (ps_getpid): Return the pid of the current inferior.
12321 * thread-db.c (proc_handle, thread_agent): Delete.
12322 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12324 (find_one_thread): Change argument type to ptid_t. Adjust to
12326 (maybe_attach_thread): Adjust to per-process data and ptids.
12327 (thread_db_find_new_threads): Ditto.
12328 (thread_db_init): Ditto.
12329 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12330 processes table. Adjust to use ptids.
12331 (spu_kill, spu_detach): Adjust interface. Remove process from
12333 (spu_join, spu_thread_alive): Adjust interface.
12334 (spu_wait): Adjust interface. Remove process from processes
12335 table. Adjust to use ptids.
12336 * win32-low.c (current_inferior_tid): Delete.
12337 (current_inferior_ptid): New.
12338 (debug_event_ptid): New.
12339 (thread_rec): Take a ptid. Adjust.
12340 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12341 (child_delete_thread): Ditto.
12342 (do_initial_child_stuff): Add `attached' argument. Add process to
12344 (child_fetch_inferior_registers, child_store_inferior_registers):
12346 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12347 (win32_attach): Pass 1 to do_initial_child_stuff.
12348 (win32_kill): Adjust interface. Remove process from processes
12350 (win32_detach): Ditto.
12351 (win32_join): Adjust interface.
12352 (win32_thread_alive): Take a ptid.
12353 (win32_resume): Adjust to use ptids.
12354 (get_child_debug_event): Ditto.
12355 (win32_wait): Adjust interface. Remove exiting process from
12358 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12360 Non-stop mode support.
12362 * server.h (non_stop): Declare.
12363 (gdb_client_data, handler_func): Declare.
12364 (delete_file_handler, add_file_handler, start_event_loop):
12366 (handle_serial_event, handle_target_event, push_event)
12367 (putpkt_notif): Declare.
12368 * target.h (enum resume_kind): New.
12369 (struct thread_resume): Replace `step' field by `kind' field.
12370 (TARGET_WNOHANG): Define.
12371 (struct target_ops) <wait>: Add `options' argument.
12372 <supports_non_stop, async, start_non_stop>: New fields.
12373 (target_supports_non_stop, target_async): New.
12374 (start_non_stop): Declare.
12375 (mywait): Add `options' argument.
12376 * target.c (mywait): Add `options' argument. Print child exit
12377 notifications here.
12378 (start_non_stop): New.
12379 * server.c (non_stop, own_buf, mem_buf): New globals.
12380 (struct vstop_notif): New.
12381 (notif_queue): New global.
12382 (queue_stop_reply, push_event, discard_queued_stop_replies)
12383 (send_next_stop_reply): New.
12384 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12386 (attach_inferior): In non-stop mode, don't wait for the target
12388 (handle_general_set): Handle QNonStop.
12389 (handle_query): When handling qC, return the current general
12390 thread, instead of the first thread of the list.
12391 (handle_query): If the backend supports non-stop mode, include
12392 QNonStop+ in the qSupported query response.
12393 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12395 (handle_v_attach, handle_v_run): Handle non-stop mode.
12396 (handle_v_stopped): New.
12397 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12398 (myresume): Adjust to use resume_kind. Handle non-stop.
12399 (queue_stop_reply_callback): New.
12400 (handle_status): Handle non-stop mode.
12401 (main): Clear non_stop flag on reconnection. Use the event-loop.
12402 Refactor serial protocol handling from here ...
12403 (process_serial_event): ... to this new function. When GDB
12404 selects any thread, select one here. In non-stop mode, wait until
12405 GDB acks all pending events before exiting.
12406 (handle_serial_event, handle_target_event): New.
12407 * remote-utils.c (remote_open): Install remote_desc in the event
12409 (remote_close): Remove remote_desc from the event loop.
12410 (putpkt_binary): Rename to...
12411 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12412 (putpkt_binary): New as wrapper around putpkt_binary_1.
12413 (putpkt_notif): New.
12414 (prepare_resume_reply): In non-stop mode, don't change the
12416 * event-loop.c: New.
12417 * Makefile.in (OBJ): Add event-loop.o.
12418 (event-loop.o): New rule.
12420 * linux-low.h (pid_of): Moved here.
12422 (get_lwp_thread): Use lwpid_of.
12423 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12424 * linux-low.c (pid_of): Delete.
12425 (inferior_pid): Use lwpid_of.
12426 (linux_event_pipe): New.
12427 (target_is_async_p): New.
12429 (handle_extended_wait): Use lwpid_of.
12430 (add_lwp): Don't set lwpid field.
12431 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12432 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12433 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12434 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12435 first. Adjust to linux_wait_for_event interface changes. Use
12437 (linux_detach): Don't delete the main lwp here.
12438 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12439 (status_pending_p): Don't consider explicitly suspended lwps.
12440 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12441 pointer. Add OPTIONS argument. Change return type to int. Use
12442 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12443 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12444 pointer. Add status pointer argument. Return a pid instead of a
12445 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12446 changes. In non-stop mode, don't switch to a random thread.
12447 (linux_wait): Rename to...
12448 (linux_wait_1): ... this. Add target_options argument, and handle
12449 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12450 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12451 clean exit and signal exit code. Don't stop all threads in
12452 non-stop mode. In all-stop mode, only stop all threads when
12453 reporting a stop to GDB. Handle explicit thread stop requests.
12454 (async_file_flush, async_file_mark): New.
12456 (send_sigstop): Use lwpid_of.
12457 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12458 interface changes. In non-stop mode, don't switch to a random
12460 (linux_resume_one_lwp): Use lwpid_of.
12461 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12462 (linux_resume_one_thread): ... this. Handle resume_stop. In
12463 non-stop mode, don't look for pending flag in all threads.
12464 (resume_status_pending_p): Don't consider explicitly suspended
12466 (my_waitpid): Reimplement. Emulate __WALL.
12467 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12469 (sigchld_handler, linux_supports_non_stop, linux_async)
12470 (linux_start_non_stop): New.
12471 (linux_target_ops): Register linux_supports_non_stop, linux_async
12472 and linux_start_non_stop.
12473 (initialize_low): Install SIGCHLD handler.
12474 * thread-db.c (thread_db_create_event, find_one_thread)
12475 (thread_db_get_tls_address): Use lwpid_of.
12476 * win32-low.c (win32_detach): Adjust to use resume_kind.
12477 (win32_wait): Add `options' argument.
12478 * spu-low.c (spu_resume): Adjust to use resume_kind.
12479 (spu_wait): Add `options' argument.
12481 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12483 Decouple target code from remote protocol.
12485 * target.h (enum target_waitkind): New.
12486 (struct target_waitstatus): New.
12487 (struct target_ops) <wait>: Return an unsigned long. Take a
12488 target_waitstatus pointer instead of a char pointer.
12489 (mywait): Likewise.
12490 * target.c (mywait): Change prototype to return an unsigned long.
12491 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12492 * server.h (thread_from_wait, old_thread_from_wait): Delete
12494 (prepare_resume_reply): Change prototype to take a
12496 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12497 (last_status, last_ptid): New.
12498 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12499 pid instead of a signal.
12500 (attach_inferior): Remove "status" and "signal" parameters.
12502 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12504 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12505 (handle_v_requests, myresume): Remove "status" and "signal"
12506 parameters. Adjust.
12507 (handle_status): New.
12508 (main): Delete local `status'. Adjust.
12509 * remote-utils.c: Include target.h.
12510 (prepare_resume_reply): Change prototype to take a
12511 target_waitstatus. Adjust.
12513 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12515 * spu-low.c (spu_wait): Adjust.
12516 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12518 (win32_wait): Adjust.
12520 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12522 * target.h (struct thread_resume): Delete leave_stopped member.
12523 (struct target_ops): Add a `n' argument to the `resume' callback.
12524 * server.c (start_inferior): Adjust.
12525 (handle_v_cont, myresume): Adjust.
12526 * linux-low.c (check_removed_breakpoint): Adjust to resume
12527 interface change, and to removed leave_stopped field.
12528 (resume_ptr): Delete.
12529 (struct thread_resume_array): New.
12530 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12531 resume interface change.
12532 (linux_continue_one_thread, linux_queue_one_thread)
12533 (resume_status_pending_p): Check if the resume field is NULL
12534 instead of checking the leave_stopped member.
12535 (linux_resume): Adjust to the target resume interface change.
12536 * spu-low.c (spu_resume): Adjust to the target resume interface
12538 * win32-low.c (win32_detach, win32_resume): Ditto.
12540 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12542 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12544 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12546 (linux_continue_one_thread): Only preserve the stepping flag if
12547 there's a pending breakpoint.
12549 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12551 * server.c (main): After the inferior having exited, call
12552 remote_close before exiting gdbserver.
12554 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12556 Fix size of FPSCR in Power 7 processors.
12557 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12558 (PPC_FEATURE_HAS_DFP): New #define.
12559 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12562 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12564 * server.c (handle_query) Whitespace and formatting.
12566 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12568 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12569 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12570 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12571 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12572 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12573 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12574 Makefile.in, configure.ac: Fix whitespace throughout.
12575 * configure: Regenerate.
12577 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12579 * inferiors.c (find_inferior): Make it safe for the callback
12580 function to delete the currently iterated inferior.
12582 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12584 * Makefile.in (linuw_low_h): Move higher.
12585 (thread-db.o): Depend on $(linux_low_h).
12587 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12589 Rename "process" to "lwp" throughout.
12591 * linux-low.c (all_processes): Rename to...
12592 (all_lwps): ... this.
12593 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12594 (add_process): Rename to ...
12595 (add_lwp): ... this. Adjust.
12596 (linux_create_inferior): Adjust.
12597 (linux_attach_lwp): Adjust.
12598 (linux_attach): Adjust.
12599 (linux_kill_one_process): Rename to ...
12600 (linux_kill_one_lwp): ... this. Adjust.
12601 (linux_kill): Adjust.
12602 (linux_detach_one_process): Rename to ...
12603 (linux_detach_one_lwp): ... this. Adjust.
12604 (linux_detach): Adjust.
12605 (check_removed_breakpoint): Adjust.
12606 (status_pending_p): Adjust.
12607 (linux_wait_for_process): Rename to ...
12608 (linux_wait_for_lwp): ... this. Adjust.
12609 (linux_wait_for_event): Adjust.
12610 (send_sigstop): Adjust.
12611 (wait_for_sigstop): Adjust.
12612 (stop_all_processes): Rename to ...
12613 (stop_all_lwps): ... this.
12614 (linux_resume_one_process): Rename to ...
12615 (linux_resume_one_lwp): ... this. Adjust.
12616 (linux_set_resume_request, linux_continue_one_thread)
12617 (linux_queue_one_thread, resume_status_pending_p)
12618 (usr_store_inferior_registers, regsets_store_inferior_registers)
12619 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12621 * linux-low.h (get_process): Rename to ...
12622 (get_lwp): ... this. Adjust.
12623 (get_thread_process): Rename to ...
12624 (get_thread_lwp): ... this. Adjust.
12625 (get_process_thread): Rename to ...
12626 (get_lwp_thread): ... this. Adjust.
12627 (struct process_info): Rename to ...
12628 (struct lwp_info): ... this.
12629 (all_processes): Rename to ...
12630 (all_lwps): ... this.
12631 * proc-service.c (ps_lgetregs): Adjust.
12632 * thread-db.c (thread_db_create_event, find_one_thread)
12633 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12635 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12637 * server.c (handle_query): Handle "qAttached".
12639 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12641 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12642 GPLv3, update license URL.
12644 2009-03-01 Doug Evans <dje@google.com>
12646 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12647 (server_h): Add gdb_signals.h.
12648 (signals.o): Update.
12649 * server.h (target_signal_from_host,target_signal_to_host_p)
12650 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12652 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12654 * remote-utils.c (getpkt): Also generate remote-debug
12655 information if noack_mode is set.
12657 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12659 * server.c (handle_query): Report qXfer:siginfo:read and
12660 qXfer:siginfo:write as supported and handle them.
12661 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12662 * linux-low.c (linux_xfer_siginfo): New.
12663 (linux_target_ops): Set it.
12665 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12667 * server.c (gdbserver_usage): Mention --remote-debug.
12668 (main): Accept '--remote-debug' switch.
12670 2009-01-18 Doug Evans <dje@google.com>
12672 * regcache.c (new_register_cache): No need to check result of xcalloc.
12673 * server.c (handle_search_memory): Back out calls to xmalloc,
12674 result is checked and error is returned to user upon failure.
12675 (handle_query): Ditto. Add more checks for result of malloc.
12676 (handle_v_cont): Check result of malloc, report error back to
12678 (handle_v_run): Ditto. Call freeargv.
12679 * server.h (freeargv): Declare.
12680 * utils.c (freeargv): New fn.
12682 2009-01-15 Doug Evans <dje@google.com>
12684 * gdbreplay.c (perror_with_name): Make arg const char *.
12685 * server.h (target_signal_to_name): Make return type const char *.
12686 * thread-db.c (thread_db_err_str): Make return type const char *.
12687 * utils.c (perror_with_name): Make arg const char *.
12689 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12691 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12692 when handling a EXIT_PROCESS_DEBUG_EVENT.
12694 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12696 * gdbreplay.c (gdbreplay_version): Update copyright year.
12697 * server.c (gdbserver_version): Likewise.
12699 2009-01-05 Doug Evans <dje@google.com>
12701 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12702 (handle_extended_wait): Improve comment.
12704 2008-12-13 Doug Evans <dje@google.com>
12706 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12707 * server.h (ATTR_MALLOC): New macro.
12708 (xmalloc,xcalloc,xstrdup): Declare.
12709 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12710 * inferiors.c: Ditto.
12711 * linux-low.c: Ditto.
12712 * mem-break.c: Ditto.
12713 * regcache.c: Ditto.
12714 * remote-utils.c: Ditto.
12717 * win32-low.c: Ditto.
12719 2008-12-12 Doug Evans <dje@google.com>
12721 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12722 in debugging printf.
12724 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12726 2008-12-09 Doug Evans <dje@google.com>
12728 * linux-low.h (struct process_info): Delete member tid, unused.
12729 * thread-db.c (find_one_thread): Update.
12730 (maybe_attach_thread): Update.
12732 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12734 * target.h (struct target_ops): Add qxfer_osdata member.
12735 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12737 (linux_qxfer_osdata): New functions.
12738 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12740 * server.c (handle_query): Handle "qXfer:osdata:read:".
12741 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12742 (buffer_xml_printf): New functions.
12743 * server.h (struct buffer): New.
12744 (buffer_grow_str, buffer_grow_str0): New macros.
12745 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12746 (buffer_xml_printf): Declare.
12748 2008-11-24 Doug Evans <dje@google.com>
12750 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12752 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12754 * server.c (handle_v_run): Always use the supplied argument list.
12756 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12758 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12759 (xtensa_regmap_table): Add entry for scompare1.
12761 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12763 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12764 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12765 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12766 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12767 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12768 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12769 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12770 XML target descriptions.
12771 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12772 when inferior is running on an ISA 2.05 or later processor. Add
12773 special case to return offset for full 64-bit slot of FPSCR when
12776 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12778 * Makefile.in (SFILES, clean): Added sparc64 files.
12779 (reg-sparc64.o, reg-sparc64.c): New.
12780 * configure.srv (sparc*-*-linux*): New configuration.
12781 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12782 syscall arguments for SPARC.
12783 (regsets_store_inferior_registers): Likewise.
12784 * linux-sparc-low.c: New file.
12786 2008-10-21 Doug Evans <dje@google.com>
12788 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12789 (READLINE_DIR,READLINE_DEP): Delete.
12790 (INTERNAL_CFLAGS): Update.
12791 (LINTFLAGS): Update.
12793 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12795 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12796 whole argv from the last run, not just argv[0].
12798 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12800 * regcache.c (new_register_cache): Return NULL if the register
12801 cache size isn't known yet.
12802 (free_register_cache): Avoid dereferencing a NULL regcache.
12804 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12806 * configure.srv: Merge MIPS and MIPS64.
12808 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12810 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12812 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12814 * Makefile.in: Add required vsx dependencies.
12816 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12817 Declare init_registers_powerpc_vsx32l.
12818 Declare init_registers_powerpc_vsx64l.
12819 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12820 (ppc_arch_setup): Check for VSX in hwcap.
12821 (ppc_fill_vsxregset): New function.
12822 (ppc_store_vsxregset): New function.
12823 Add new VSX entry in regset_info target_regsets.
12825 * configure.srv: Add new VSX dependencies.
12827 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12829 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12830 (remote_open): Set or clear transport_is_reliable.
12831 (putpkt_binary): Don't expect acks in noack mode.
12832 (getpkt): Don't send ack/nac in noack mode.
12833 * server.c (handle_general_set): Handle QStartNoAckMode.
12834 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12836 (main): Reset noack_mode on every connection.
12837 * server.h (noack_mode): Declare.
12839 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12841 * Makefile.in (GDBREPLAY_OBS): New variable.
12842 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12844 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12845 Daniel Jacobowitz <dan@codesourcery.com>
12847 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12848 (usr_store_inferior_registers): Likewise.
12849 (regsets_store_inferior_registers): Likewise.
12851 2008-07-31 Rolf Jansen <rj@surtec.com>
12852 Pedro Alves <pedro@codesourcery.com>
12854 * configure.ac: Check for memmem declaration.
12855 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12856 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12857 (disable_packet_qfThreadInfo): Unconditionally compile.
12858 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12859 * configure, config.in: Regenerate.
12861 2008-07-28 Doug Kwan <dougkwan@google.com>
12863 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12864 (linux_write_memory): Remove declaration of errno.
12866 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12868 * linux-low.c (handle_extended_wait): Do not use "status"
12869 variable uninitialized.
12871 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12873 * server.c (handle_v_attach): Inhibit reporting dll changes.
12875 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12877 * remote-utils.c (prepare_resume_reply): If requested, don't
12878 output "thread:TID" in the T stop reply.
12880 * server.c (disable_packet_vCont, disable_packet_Tthread)
12881 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12882 (handle_query): If requested, disable support for qC, qfThreadInfo
12884 (handle_v_requests): If requested, disable support for vCont.
12885 (gdbserver_show_disableable): New.
12886 (main): Handle --disable-packet and --disable-packet=LIST.
12888 * server.h (disable_packet_vCont, disable_packet_Tthread)
12889 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12891 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12893 * server.c (gdbserver_usage): Mention --version.
12895 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12897 * Makefile.in (gdbreplay.o): New rule.
12899 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12901 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12902 message, not gdbserver.
12904 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12905 Nathan Sidwell <nathan@codesourcery.com>
12906 Joseph Myers <joseph@codesourcery.com>
12908 * acinclude.m4: Include ../../config/acx.m4.
12909 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12910 * configure, config.in: Regenerate.
12911 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12912 * server.c (gdbserver_version): Print PKGVERSION.
12913 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12914 (main): Adjust gdbserver_usage calls.
12915 * gdbreplay.c (version, host_name): Add declarations.
12916 (gdbreplay_version, gdbreplay_usage): New.
12917 (main): Accept --version and --help options.
12919 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12921 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12922 (arm_breakpoint_at): Handle Thumb.
12923 (the_low_target): Add comment.
12925 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12927 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12929 2008-05-09 Doug Evans <dje@google.com>
12931 * server.h (decode_search_memory_packet): Declare.
12932 * remote-utils.c (decode_search_memory_packet): New fn.
12933 * server.c (handle_search_memory_1): New fn.
12934 (handle_search_memory): New fn.
12935 (handle_query): Process qSearch:memory packets.
12937 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12939 * regcache.c (registers_length): Remove.
12940 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12941 full register packet.
12942 * regcache.h (registers_length): Remove prototype.
12943 * server.h (PBUFSIZ): Define to 16384.
12945 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12947 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12948 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12949 powerpc-64l.o, and powerpc-altivec64l.o.
12950 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12951 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12952 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12953 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12954 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12957 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12958 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12959 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12960 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12961 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12962 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12963 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12964 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12965 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12966 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12969 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12970 (init_registers_powerpc_32l): ... this new prototype.
12971 (init_registers_powerpc_32): Remove, replace by ...
12972 (init_registers_powerpc_altivec32l): ... this new prototype.
12973 (init_registers_powerpc_e500): Remove, replace by ...
12974 (init_registers_powerpc_e500l): ... this new prototype.
12975 (init_registers_ppc64): Remove, replace by ...
12976 (init_registers_powerpc_64l): ... this new prototype.
12977 (init_registers_powerpc_64): Remove, replace by ...
12978 (init_registers_powerpc_altivec64l): ... this new prototype.
12979 (ppc_num_regs): Set to 73.
12980 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12981 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12982 (ppc_cannot_store_register): Handle orig_r3 and trap.
12983 (ppc_arch_setup): Update init_registers_... calls.
12984 (ppc_fill_gregset): Handle orig_r3 and trap.
12986 * inferiors.c (clear_inferiors): Reset current_inferior.
12988 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12990 * acinclude.m4: Add override.m4.
12991 * configure: Regenerate.
12993 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12995 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12996 initial call to init_register_ppc64.
12998 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13000 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13001 single powerpc*-*-linux* case.
13002 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13004 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13006 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13007 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13009 * linux-ppc-low.c: Include <elf.h>.
13010 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13011 (ppc_hwcap): New global variable.
13012 (ppc_regmap): Remove __SPE__ #ifdef sections.
13013 (ppc_regmap_e500): New global variable.
13014 (ppc_cannot_store_register): Update __SPE__ special case.
13015 (ppc_get_hwcap): New function.
13016 (ppc_arch_setup): Use it to determine whether inferior supports
13017 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13018 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13019 Do not access registers if target does not support AltiVec.
13020 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13021 Do not access registers if target does not support SPE.
13022 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13024 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13026 * linux-low.c (disabled_regsets, num_regsets): New.
13027 (use_regsets_p): Delete.
13028 (linux_wait_for_process): Clear disabled_regsets.
13029 (regsets_fetch_inferior_registers): Check and set it.
13030 (regsets_store_inferior_registers): Likewise.
13031 (linux_fetch_registers, linux_store_registers): Do not use
13033 (initialize_low): Allocate disabled_regsets.
13035 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13037 * Makefile.in (LIBOBJS): New.
13038 (OBS): Use LIBOBJS.
13039 (memmem.o): New rule.
13040 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13041 * configure: Regenerated.
13043 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13045 * server.c (handle_query): Never return "unsupported" for
13046 qXfer:features:read queries.
13048 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13050 * server.c (get_features_xml): Fix inverted condition.
13051 (handle_query): Always support qXfer:feature:read.
13053 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13055 * server.c (wrapper_argv): New.
13056 (start_inferior): Handle wrapper_argv. If set, expect an extra
13058 (gdbserver_usage): Document --wrapper.
13059 (main): Parse --wrapper.
13061 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13063 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13064 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13065 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13066 (ppc_set_pc): Likewise.
13067 (ppc_arch_setup): New function.
13068 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13069 of collect_register.
13070 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13072 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13074 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13075 instead of linux-ppc64-low.o.
13076 * linux-ppc64-low.c: Remove file.
13077 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13078 (linux-ppc64-low.o): Remove rule.
13080 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13081 (init_registers_powerpc_64): Likewise.
13082 (ppc_regmap): Conditionally define depending on __powerpc64__.
13083 (ppc_cannot_store_register): Do not special-case "fpscr" when
13084 compiled on __powerpc64__.
13085 (ppc_collect_ptrace_register): New function.
13086 (ppc_supply_ptrace_register): New function.
13087 (ppc_breakpoint): Change type to "unsigned int".
13088 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13089 (the_low_target): Conditionally provide initializers for the
13090 arch_setup member depending on __powerpc64__. Install
13091 collect_ptrace_register and supply_ptrace_register members.
13093 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13095 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13096 * server.c (gdbserver_xmltarget): Define.
13097 (get_features_xml): Use it to replace "target.xml" and arch_string.
13099 * configure.srv: Remove srv_xmltarget. Add XML files that were
13100 mentioned there to srv_xmlfiles instead. Remove conditional tests
13101 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13102 srv_xmlfiles and srv_regobj to include all possible choices.
13103 * configure.ac (srv_xmltarget): Remove.
13104 (srv_xmlfiles): Do not add "target.xml".
13105 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13106 checks for supplementary target information.
13107 * configure: Regenerate.
13108 * Makefile.in (XML_TARGET): Remove.
13109 (target.xml): Remove rule.
13110 (clean): Do not clean up target.xml.
13111 (.PRECIOUS): Do not mention target.xml.
13113 * target.h (struct target_ops): Remove arch_string member.
13114 * linux-low.c (linux_arch_string): Remove.
13115 (linux_target_ops): Remove arch_string initializer.
13116 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13117 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13118 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13119 * spu-low.c (spu_arch_string): Remove.
13120 (spu_target_ops): Remove arch_string initializer.
13121 * win32-low.c (win32_arch_string): Remove.
13122 (win32_target_ops): Remove arch_string initializer.
13123 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13124 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13125 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13127 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13129 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13130 by collect_ptrace_register and supply_ptrace_register hooks.
13131 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13132 instead of checking for the_low_target.left_pad_xfer.
13133 (usr_store_inferior_registers): Use collect_ptrace_register callback
13134 instead of checking for the_low_target.left_pad_xfer.
13136 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13137 (s390_supply_ptrace_register): Likewise.
13138 (s390_fill_gregset): Call s390_collect_ptrace_register.
13139 (the_low_target): Update.
13141 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13142 (ppc_supply_ptrace_register): Likewise.
13143 (the_low_target): Update.
13145 * linux-i386-low.c (the_low_target): Update.
13146 * linux-x86-64-low.c (the_low_target): Update.
13148 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13150 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13151 reg-s390.o and reg-s390x.o.
13153 * linux-low.c (new_inferior): New global variable.
13154 (linux_create_inferior, linux_attach): Set it.
13155 (linux_wait_for_process): Call the_low_target.arch_setup after the
13156 target has stopped for the first time.
13157 (initialize_low): Do not call the_low_target.arch_setup.
13159 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13160 (s390_set_pc): Likewise.
13161 (s390_arch_setup): New function.
13162 (the_low_target): Use s390_arch_setup as arch_setup routine.
13164 * regcache.c (realloc_register_cache): New function.
13165 (set_register_cache): Call it for each existing regcache.
13167 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13169 * server.h (init_registers): Remove prototype.
13171 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13172 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13173 instead of init_registers ().
13174 * linux-arm-low.c (init_registers_arm): Add prototype.
13175 (init_registers_arm_with_iwmmxt): Likewise.
13176 (the_low_target): Add initializer for arch_setup field.
13177 * linux-cris-low.c (init_registers_cris): Add prototype.
13178 (the_low_target): Add initializer for arch_setup field.
13179 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13180 (the_low_target): Add initializer for arch_setup field.
13181 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13182 (the_low_target): Add initializer for arch_setup field.
13183 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13184 (the_low_target): Add initializer for arch_setup field.
13185 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13186 (the_low_target): Add initializer for arch_setup field.
13187 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13188 (the_low_target): Add initializer for arch_setup field.
13189 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13190 (init_registers_mips64_linux): Likewise.
13191 (the_low_target): Add initializer for arch_setup field.
13192 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13193 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13194 (the_low_target): Add initializer for arch_setup field.
13195 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13196 (init_registers_powerpc_64): Likewise.
13197 (the_low_target): Add initializer for arch_setup field.
13198 * linux-s390-low.c (init_registers_s390): Add prototype.
13199 (init_registers_s390x): Likewise.
13200 (the_low_target): Add initializer for arch_setup field.
13201 * linux-sh-low.c (init_registers_sh): Add prototype.
13202 (the_low_target): Add initializer for arch_setup field.
13203 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13204 (the_low_target): Add initializer for arch_setup field.
13205 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13206 (the_low_target): Add initializer for arch_setup field.
13208 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13209 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13210 instead of init_registers ().
13211 * win32-arm-low.c (init_registers_arm): Add prototype.
13212 (the_low_target): Add initializer for arch_setup field.
13213 * win32-i386-low.c (init_registers_i386): Add prototype.
13214 (the_low_target): Add initializer for arch_setup field.
13216 * spu-low.c (init_registers_spu): Add prototype.
13217 (initialize_low): Call initialie_registers_spu () instead of
13218 initialize_registers ().
13220 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13222 * server.c (handle_v_requests): When handling the vRun and vAttach
13223 packets, if already debugging a process, don't kill it. Return an
13226 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13228 * server.c (handle_query): Correct length check.
13230 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13232 * win32-low.c (do_initial_child_stuff): Add process handle
13233 parameter. Set current_process_handle and current_process_id from the
13234 parameters. Clear globals.
13235 (win32_create_inferior): Don't set current_process_handle and
13236 current_process_id here. Instead pass them on the call to
13237 do_initial_child_stuff.
13238 (win32_attach): Likewise.
13239 (win32_clear_inferiors): New.
13240 (win32_kill): Don't close the current process handle or the
13241 current thread handle here. Instead call win32_clear_inferiors.
13242 (win32_detach): Don't open a new handle to the process. Call
13243 win32_clear_inferiors.
13244 (win32_join): Don't rely on current_process_handle; open a new
13245 handle using the process id.
13246 (win32_wait): Call win32_clear_inferiors when the inferior process
13249 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13251 * server.c (monitor_show_help): Add "exit".
13253 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13255 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13256 (clean): Add reg-xtensa.c.
13257 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13258 * configure.srv (xtensa*-*-linux*) New target.
13259 * linux-xtensa-low.c: New.
13260 * xtensa-xtregs.c: New.
13262 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13264 * hostio.c: Don't include errno.h.
13265 (errno_to_fileio_errno): Move to hostio-errno.
13266 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13267 error number outputting to the target->hostio_last_error callback.
13268 (hostio_packet_error): Use FILEIO_EINVAL directly.
13269 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13270 calls to hostio_error.
13271 * hostio-errno.c: New.
13272 * server.h (hostio_last_error_from_errno): Declare.
13273 * target.h (target_ops): Add hostio_last_error member.
13274 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13275 as hostio_last_error handler.
13276 * spu-low.c (spu_target_ops): Likewise.
13277 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13278 (wince_hostio_last_error): New functions.
13279 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13280 as hostio_last_error handler.
13281 (win32_target_ops) [!_WIN32_WCE]: Register
13282 hostio_last_error_from_errno as hostio_last_error handler.
13283 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13284 (hostio-errno.o): New rule.
13285 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13286 * configure.srv (srv_hostio_err_objs): New variable. Default to
13288 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13289 * configure: Regenerate.
13291 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13293 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13294 (linux_kill, linux_detach): Clean up the process list.
13295 * remote-utils.c (remote_open): Improve port number parsing.
13296 (putpkt_binary, input_interrupt): Only send interrupts if the target
13298 * server.c (extended_protocol): Make static.
13299 (attached): Define earlier.
13300 (exit_requested, response_needed, program_argv): New variables.
13301 (target_running): New.
13302 (start_inferior): Clear attached here.
13303 (attach_inferior): Set attached here.
13304 (require_running): Define.
13305 (handle_query): Use require_running and target_running. Implement
13307 (handle_v_attach, handle_v_run): New.
13308 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13309 (gdbserver_usage): Update.
13310 (main): Redo argument parsing. Handle --debug and --multi. Handle
13311 --attach along with other options or after the port. Save
13312 program_argv. Support no initial program. Resynchronize
13313 communication with GDB after an error. Handle "monitor exit".
13314 Use require_running and target_running. Always allow the extended
13315 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13316 restart in extended mode.
13317 * README: Refer to the GDB manual. Update --attach usage.
13319 2007-12-20 Andreas Schwab <schwab@suse.de>
13321 * linux-low.c (STACK_SIZE): Define.
13322 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13323 (linux_test_for_tracefork): Likewise.
13325 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13327 * linux-low.c (linux_wait_for_event): Update messages. Do not
13328 reinsert auto-delete breakpoints.
13329 * mem-break.c (struct breakpoint): Change return type of handler to
13331 (set_breakpoint_at): Update handler type.
13332 (reinsert_breakpoint_handler): Return 1 instead of calling
13334 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13336 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13337 * mem-break.h (set_breakpoint_at): Update handler type.
13338 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13339 * win32-low.c (auto_delete_breakpoint): New.
13340 (get_child_debug_event): Use it.
13342 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13344 * configure.ac: Check for pread and pwrite.
13345 * hostio.c (handle_pread): Fall back to lseek and read.
13346 (handle_pwrite): Fall back to lseek and write.
13347 * config.in, configure: Regenerated.
13349 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13351 * server.c (myresume): Add own_buf argument.
13352 (main): Update calls.
13354 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13356 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13357 * remote-utils.c (remote_open): Do not call disable_async_io.
13358 (block_async_io): Delete.
13359 (unblock_async_io): Make static.
13360 (initialize_async_io): New.
13361 * server.c (handle_v_cont): Handle async I/O here.
13362 (myresume): Likewise. Move other common resume tasks here...
13363 (main): ... from here. Call initialize_async_io. Disable async
13364 I/O before the main loop.
13365 * server.h (initialize_async_io): Declare.
13366 (block_async_io, unblock_async_io): Delete prototypes.
13367 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13369 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13371 * remote-utils.c (readchar): Allow binary data in received messages.
13373 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13375 * win32-low.c (attaching): New global.
13376 (win32_create_inferior): Clear the `attaching' global.
13377 (win32_attach): Set the `attaching' global.
13378 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13379 attaching. Only set a breakpoint at the entry point if not
13382 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13384 * server.c (main): Don't report dll events on the initial
13385 connection on attaches.
13387 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13389 * server.c (main): Relax numerical bases supported for the pid of
13390 the --attach command line argument.
13392 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13394 * win32-low.c (win32_attach): Call OpenProcess before
13395 DebugActiveProcess, not after. Add last error output to error
13398 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13400 * win32-low.c (win32_get_thread_context)
13401 (win32_set_thread_context): New functions.
13402 (thread_rec): Use win32_get_thread_context.
13403 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13404 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13407 2007-12-03 Leo Zayas
13408 Pedro Alves <pedro_alves@portugalmail.pt>
13410 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13412 (child_add_thread): Minor cleanup.
13413 (child_continue): Resume artificially suspended threads before
13414 calling ContinueDebugEvent.
13415 (suspend_one_thread): New.
13416 (fake_breakpoint_event): New.
13417 (get_child_debug_event): Change return type to int. Check here if
13418 gdb sent an interrupt request. If a soft interrupt was requested,
13419 fake a breakpoint event. Return 0 if there is no event to handle,
13421 (win32_wait): Don't check here if gdb sent an interrupt request.
13422 Ensure there is a valid event to handle.
13423 (win32_request_interrupt): Add soft interruption method as last
13426 2007-12-03 Leo Zayas
13427 Pedro Alves <pedro_alves@portugalmail.pt>
13429 * win32-low.h (win32_thread_info): Add descriptions to the
13430 structure members. Replace `suspend_count' counter by a
13432 * win32-low.c (thread_rec): Update condition of when to get the
13433 context from the inferior. Rely on ContextFlags being set if it
13434 has already been retrieved. Only suspend the inferior thread if
13435 we haven't already. Warn if that fails.
13436 (continue_one_thread): s/suspend_count/suspended/. Only call
13437 ResumeThread once. Warn if that fails.
13439 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13441 * win32-low.c (win32_wait): Don't read from the inferior when it
13442 has already exited.
13444 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13446 * Makefile.in (win32_low_h): New variable.
13447 (win32-low.o): Add dependency on $(win32_low_h).
13448 (win32-arm-low.o, win32-i386-low.o): New rules.
13450 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13452 * hostio.c: Correct copyright year.
13454 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13456 * Makefile.in (OBS): Add hostio.o.
13457 (hostio.o): New rule.
13458 * server.h (handle_vFile): Declare.
13459 * hostio.c: New file.
13460 * server.c (handle_v_requests): Take packet_len and new_packet_len
13461 for binary packets. Call handle_vFile.
13462 (main): Update call to handle_v_requests.
13464 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13466 * linux-low.c: Include <sched.h>.
13468 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13470 * linux-low.c (linux_tracefork_grandchild): New.
13471 (linux_tracefork_child): Use clone.
13472 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13474 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13476 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13478 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13480 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13482 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13484 * inferiors.c (change_inferior_id): Delete.
13485 (add_pid_to_list, pull_pid_from_list): New.
13486 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13487 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13488 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13489 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13490 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13491 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13492 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13493 (using_threads): Always set to 1.
13494 (handle_extended_wait): New.
13495 (add_process): Do not set TID.
13496 (linux_create_inferior): Set must_set_ptrace_flags.
13497 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13498 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13499 (linux_thread_alive): Rename TID argument to LWPID.
13500 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13501 (linux_wait_for_event): Do not use TID or check using_threads. Update
13502 call to dead_thread_notify. Call handle_extended_wait.
13503 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13504 (send_sigstop): Delete sigstop_sent.
13505 (wait_for_sigstop): Avoid TID.
13506 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13507 (linux_test_for_tracefork): New.
13508 (linux_lookup_signals): Use thread_db_active and
13509 linux_supports_tracefork_flag.
13510 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13511 * linux-low.h (get_process_thread): Avoid TID.
13512 (struct process_ifo): Move thread_known and tid to the end. Remove
13514 (linux_attach_lwp, thread_db_init): Update prototypes.
13515 * server.h (change_inferior_id): Delete prototype.
13516 (add_pid_to_list, pull_pid_from_list): New prototypes.
13517 * thread-db.c (thread_db_use_events): New.
13518 (find_first_thread): Rename to...
13519 (find_one_thread): ...this. Update callers and messages. Do not
13520 call fatal. Check thread_db_use_events. Do not call
13521 change_inferior_id or new_thread_notify.
13522 (maybe_attach_thread): Update. Do not call new_thread_notify.
13523 (thread_db_init): Set thread_db_use_events. Check use_events.
13524 * utils.c (fatal, warning): Correct message prefix.
13526 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13528 * Makefile.in (clean): Remove new files.
13529 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13530 (powerpc-64.o, powerpc-64.c): New rules.
13531 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13532 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13534 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13536 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13537 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13538 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13539 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13540 (target_regsets): Add AltiVec and SPE register sets.
13541 * configure.ac: Check for AltiVec and SPE.
13542 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13543 (ppc_fill_vrregset, ppc_store_vrregset): New.
13544 (target_regsets): Add AltiVec register set.
13545 * configure: Regenerated.
13547 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13549 * linux-low.c (O_LARGEFILE): Define.
13550 (linux_read_memory): Use /proc/PID/mem.
13551 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13552 * configure, config.in: Regenerated.
13554 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13556 * linux-low.c (linux_wait_for_event): Do not pass signals while
13559 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13561 * win32-low.c (create_process): New.
13562 (win32_create_inferior): Use create_process instead of
13563 CreateProcess. If create_process failed retry appending an ".exe"
13564 suffix. Store the GetLastError result immediatelly after
13565 create_process calls and use it on the call to error.
13567 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13569 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13571 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13573 * configure.ac: Switch license to GPLv3.
13575 2007-08-01 Michael Snyder <msnyder@access-company.com>
13577 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13579 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13581 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13583 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13584 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13585 CloseToolhelp32Snapshot.
13586 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13587 CloseToolhelp32Snapshot.
13589 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13591 * server.c (main): Check for inferior exit before main loop.
13593 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13595 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13596 instead of on tmp_desc.
13598 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13599 Daniel Jacobowitz <dan@codesourcery.com>
13601 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13602 (add_thread): Minor cleanups.
13603 (clear_inferiors): Move lower in the file. Clear the DLL
13605 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13606 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13607 (xml_escape_text): New.
13608 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13610 (handle_v_cont): Report errors.
13611 (gdbserver_version): Update.
13612 (main): Correct size of own_buf. Do not report initial DLL events.
13613 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13614 (unloaded_dll, xml_escape_text): New.
13615 * win32-low.c (enum target_waitkind): Update comments.
13616 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13617 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13618 (win32_EnumProcessModules, win32_GetModuleInformation)
13619 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13620 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13621 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13622 (win32_Module32First, win32_Module32Next, load_toolhelp)
13623 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13624 (get_child_debug_event): Handle DLL events.
13625 (win32_wait): Likewise.
13627 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13629 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13630 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13632 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13634 * win32-low.c (handle_output_debug_string): Ignore event if not
13637 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13639 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13641 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13643 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13645 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13647 * inferiors.c (change_inferior_id): Add comment.
13648 * linux-low.c (check_removed_breakpoint): Add an early
13649 prototype. Improve debug output.
13650 (linux_attach): Doc update.
13651 (linux_detach_one_process, linux_detach): Clean up before releasing
13653 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13654 * linux-low.h (struct process_info): Doc improvement.
13655 * mem-break.c (delete_all_breakpoints): New.
13656 * mem-break.h (delete_all_breakpoints): New prototype.
13657 * thread-db.c (find_first_thread): New.
13658 (thread_db_create_event): Call it instead of
13659 thread_db_find_new_threads. Clean up unused variables.
13660 (maybe_attach_thread): Remove first thread handling.
13661 (thread_db_find_new_threads): Use find_first_thread.
13662 (thread_db_get_tls_address): Likewise.
13664 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13666 * thread-db.c (thread_db_find_new_threads): Add prototype.
13667 (thread_db_create_event): Check for the main thread before adding
13669 (maybe_attach_thread): Only enable event reporting if TID == 0.
13670 (thread_db_get_tls_address): Check for new threads.
13672 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13674 * linux-low.c (linux_create_inferior): Try execv before execvp.
13675 * spu-low.c (spu_create_inferior): Likewise.
13677 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13679 * linux-low.c (linux_create_inferior): Change execv to execvp.
13680 * spu-low.c (spu_create_inferior): Likewies.
13682 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13684 * Makefile.in (clean): Clean new files instead of deleted ones.
13685 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13686 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13688 * configure.srv: Specify XML files and new regformats for MIPS and
13690 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13691 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13692 an entry for the restart register.
13693 (mips_cannot_fetch_register, mips_cannot_store_register)
13694 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13695 register names to match the XML descriptions.
13696 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13697 restart register instead of $0.
13699 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13700 Markus Deuling <deuling@de.ibm.com>
13702 * remote-utils.c (decode_xfer_write): New function.
13703 * server.h (decode_xfer_write): Add prototype.
13704 * server.c (handle_query): Add PACKET_LEN argument. Support
13705 qXfer:spu:read and qXfer:spu:write packets.
13706 (main): Pass packet_len to handle_query.
13707 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13708 * target.h (target_ops): Add qxfer_spu.
13710 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13712 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13713 accessing non-seekable spufs files.
13715 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13717 * server.c (handle_query): Add reply for qC packet.
13719 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13720 Leo Zayas <lerele@champenstudios@com>
13722 * server.h (check_remote_input_interrupt_request): New function.
13723 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13724 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13725 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13726 (check_remote_input_interrupt_request): New function.
13727 * server.h (check_remote_input_interrupt_request): Declare.
13728 * win32-low.c (winapi_DebugBreakProcess,
13729 winapi_GenerateConsoleCtrlEvent): New typedefs.
13730 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13732 (win32_wait): Check for remote interrupt request
13733 with check_remote_input_interrupt_request.
13734 (win32_request_interrupt): New function.
13735 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13737 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13739 * win32-low.c (debug_registers_changed,
13740 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13741 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13742 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13743 (thread_rec): Get context using the low target.
13744 (child_add_thread): Call thread_added on the low target,
13745 which does the same thing.
13747 (do_initial_child_stuff): Remove debug registers references.
13748 Set context using the low target. Resume threads after
13749 setting the contexts.
13750 (child_continue): Remove dead variable. Remove debug
13751 registers references.
13752 (child_fetch_inferior_registers): Go through the low target.
13753 (do_child_store_inferior_registers): Remove.
13754 (child_store_inferior_registers): Go through the low target.
13755 (win32_resume): Remove debug registers references.
13756 Set context using the low target.
13757 (handle_exception): Change return type to void. Don't record
13758 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13759 first chance exception.
13760 (get_child_debug_event): Change return type to void. Remove
13761 goto loop. Always return after waiting for debug event.
13762 (win32_wait): Convert to switch statement. Handle spurious
13765 * win32-i386-low.c (debug_registers_changed,
13766 debug_registers_used): New.
13767 (initial_stuff): Rename to ...
13768 (i386_initial_stuff): ... this. Clear debug registers
13770 (store_debug_registers): Delete.
13771 (i386_get_thread_context): New.
13772 (load_debug_registers): Delete.
13773 (i386_set_thread_context): New.
13774 (i386_thread_added): New.
13775 (single_step): Rename to ...
13776 (i386_single_step): ... this.
13777 (do_fetch_inferior_registers): Rename to ...
13778 (i386_fetch_inferior_register): ... this.
13779 (i386_store_inferior_register): New.
13780 (the_low_target): Adapt to new interface.
13782 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13783 (arm_get_thread_context): New.
13784 (arm_set_thread_context): New.
13786 (do_fetch_inferior_registers): Rename to ...
13787 (arm_fetch_inferior_register): ... this.
13788 (arm_store_inferior_register): New.
13789 (arm_wince_breakpoint): Reimplement as unsigned long.
13790 (arm_wince_breakpoint_len): Define.
13791 (the_low_target): Adapt to new interface.
13793 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13794 load_debug_registers. Add get_thread_context, set_thread_context,
13795 thread_added and store_inferior_register. Rename
13796 fetch_inferior_registers to fetch_inferior_register.
13797 (regptr): Remove declaration.
13799 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13801 * linux-low.c (linux_detach): Change return type to int. Return 0.
13802 * spu-low.c (spu_detach): Likewise.
13804 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13806 * target.h (target_ops): Change return type of detach to int.
13808 (join_inferior): New.
13809 * server.c (main): Don't skip detach support on mingw32.
13810 If the inferior doesn't support detaching return error.
13811 Call join_inferior instead of using waitpid.
13812 * linux-low.c (linux_join): New.
13813 (linux_target_op): Add linux_join.
13814 * spu-low.c (spu_join): New.
13815 (spu_target_ops): Add spu_join.
13816 * win32-low.c (win32_detach): Adapt to new interface.
13817 Reopen current_process_handle before detaching. Issue a child
13818 resume before detaching.
13820 (win32_target_op): Add win32_join.
13822 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13824 * win32-low.c (win32-attach): Fix return value.
13825 * target.h (target_ops): Describe ATTACH return values.
13827 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13829 * win32-low.c (GETPROCADDRESS): Define.
13830 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13831 (winapi_DebugSetProcessKillOnExit): Likewise.
13832 (win32_create_inferior): Force usage of ansi CreateProcessA.
13833 (win32_attach): Use GETPROCADDRESS.
13834 (win32_detach): Likewise.
13836 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13838 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13840 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13842 * win32-low.c: Commit leftover changes from 2007-03-29.
13844 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13846 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13847 fields short instead of int. Add explicit padding.
13848 (i387_cache_to_fsave): Remove unnecessary casts.
13849 (i387_fsave_to_cache): Doc fix.
13850 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13852 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13854 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13855 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13857 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13859 * configure.srv (arm*-*-mingw32ce*): Move near the other
13862 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13864 * configure.ac: Add errno checking.
13865 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13866 sys/file.h and malloc.h.
13867 (AC_CHECK_DECLS): Add perror.
13868 (srv_mingwce): Handle.
13869 * configure.srv (i[34567]86-*-cygwin*): Add
13870 win32-i386-low.o to srv_tgtobj.
13871 (i[34567]86-*-mingw*): Likewise.
13872 (arm*-*-mingw32ce*): Add case.
13873 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13874 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13875 [__MINGW32CE__] (strerror): New function.
13876 [__MINGW32CE__] (errno): Define to GetLastError.
13877 [__MINGW32CE__] (COUNTOF): New macro.
13878 (remote_open): Remove extra close call.
13879 * mem-break.c (delete_breakpoint_at): New function.
13880 * mem-break.h (delete_breakpoint_at): Declare.
13881 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13882 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13883 [USE_WIN32API] (read, write): Add char* casts.
13884 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13885 * server.h: Include wincecompat.h on Windows CE.
13886 [HAVE_ERRNO_H]: Check.
13887 (perror): Declare if not declared.
13888 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13889 (perror_with_name): Remove errno declaration.
13890 * wincecompat.h: New.
13891 * wincecompat.c: New.
13892 * win32-low.h: New.
13893 * win32-arm-low.c: New.
13894 * win32-i386-low.c: New.
13895 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13896 (OUTMSG2): Make it safe.
13898 (COUNTOF): New macro.
13899 (NUM_REGS): Get it from the low target.
13900 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13901 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13902 (thread_rec): Let low target handle debug registers.
13903 (child_add_thread): Likewise.
13904 (child_init_thread_list): Likewise.
13905 (continue_one_thread): Likewise.
13907 (do_child_fetch_inferior_registers): Move to ...
13908 * win32-i386-low.c: ... here, and rename to ...
13909 (do_fetch_inferior_registers): ... this.
13910 * win32-low.c (child_fetch_inferior_registers):
13911 Go through the low target.
13912 (do_child_store_inferior_registers): Use regptr.
13913 (strwinerror): New function.
13914 (win32_create_inferior): Handle Windows CE.
13915 Use strwinerror instead of strerror on Windows error
13916 codes. Add program to the error output.
13917 Don't close the main thread handle on Windows CE.
13918 (win32_attach): Use coredll.dll on Windows CE.
13919 (win32_kill): Close current process and current
13921 (win32_detach): Use coredll.dll on Windows CE.
13922 (win32_resume): Let low target handle debug registers, and
13924 (handle_exception): Add/Remove initial breakpoint. Avoid
13925 non-existant WSTOPSIG on Windows CE.
13926 (win32_read_inferior_memory): Cast to remove warning.
13927 (win32_arch_string): Go through the low target.
13928 (initialize_low): Call set_breakpoint_data with the low
13929 target's breakpoint.
13930 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13931 FOP_REGNUM, mappings): Move to ...
13932 * win32-i386-low.c: ... here.
13933 * win32-low.c (win32_thread_info): Move to ...
13934 * win32-low.h: ... here.
13935 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13936 win32-arm-low.c and wincecompat.c.
13937 (all:): Add $EXEEXT.
13938 (install-only:): Likewise.
13939 (gdbserver:): Likewise.
13940 (gdbreplay:): Likewise.
13941 * config.in: Regenerate.
13942 * configure: Regenerate.
13944 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13946 * win32-low.c: Rename typedef thread_info to
13947 win32_thread_info throughout.
13949 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13951 * win32-i386-low.c: Rename to ...
13952 * win32-low.c: ... this.
13953 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13954 * Makefile.in: Likewise.
13956 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13958 * remote-utils.c (monitor_output): Constify msg parameter.
13959 * server.h (monitor_output): Likewise.
13960 * win32-i386-low.c (handle_output_debug_string): New.
13961 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13962 handle_output_debug_string.
13963 (get_child_debug_event): Likewise.
13965 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13967 * server.c (main): Correct strtoul check.
13969 2007-03-27 Jon Ringle <jon@ringle.org>
13971 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13973 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13975 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13977 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13979 * terminal.h: Check HAVE_SGTTY_H.
13981 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13983 * remote-utils.c (remote_open): Print out the assigned port number.
13985 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13987 * remote-utils.c (monitor_output): New function.
13988 * server.c (debug_threads): Define here.
13989 (monitor_show_help): New function.
13990 (handle_query): Handle qRcmd.
13991 (main): Do not handle 'd' packet.
13992 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13993 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13996 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13998 * Makefile.in (EXEEXT): New.
13999 (clean): Use $(EXEEXT).
14001 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14003 * target.h (target_ops): Rename send_signal to request_interrupt,
14004 and remove enum target_signal parameter.
14005 * linux-low.c (linux_request_interrupt): Rename from
14006 linux_send_signal, and always send SIGINT.
14007 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14008 and always send SIGINT.
14009 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14011 (input_interrupt): Likewise.
14013 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14015 * server.c (get_features_xml): Check if target implemented
14017 * win32-i386-low.c (win32_arch_string): New.
14018 (win32_target_ops): Add win32_arch_string as arch_string member.
14020 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14022 * spu-low.c (spu_arch_string): New.
14023 (spu_target_ops): Add spu_arch_string.
14025 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14027 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14028 * configure.ac: Do not check for terminal.h.
14029 * configure, config.in: Regenerated.
14031 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14033 * Makefile.in (OBS): Add $(XML_BUILTIN).
14034 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14036 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14037 (arm-with-iwmmxt.c): New.
14038 * config.in, configure: Regenerate.
14039 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14040 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14041 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14042 (arm*-*-linux*): Add iWMMXt and regset support.
14043 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14044 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14045 (arm_store_wmmxregset, target_regsets): New.
14046 * server.c (get_features_xml): Take annex argument. Check builtin
14048 (handle_query): Handle multiple annexes.
14050 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14052 * remote-utils.c [USE_WIN32API] (read, write): Define.
14053 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14056 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14058 * linux-i386-low.c (the_low_target): Set arch_string.
14059 * linux-x86-64-low.c (the_low_target): Likewise.
14060 * linux-low.c (linux_arch_string): New.
14061 (linux_target_ops): Add it.
14062 * linux-low.h (struct linux_target_ops): Add arch_string.
14063 * server.c (write_qxfer_response): Use const void * for DATA.
14064 (get_features_xml): New.
14065 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14066 * target.h (struct target_ops): Add arch_string method.
14068 2007-01-03 Denis Pilat <denis.pilat@st.com>
14069 Daniel Jacobowitz <dan@codesourcery.com>
14071 * linux-low.c (linux_kill): Handle being called with no threads.
14072 * win32-i386-low.c (win32_kill): Likewise.
14073 (get_child_debug_event): Clear current_process_handle.
14075 2006-12-30 Denis PILAT <denis.pilat@st.com>
14076 Daniel Jacobowitz <dan@codesourcery.com>
14078 * remote-utils.c (remote_open): Check the type of specified
14079 serial port devices before opening them.
14080 * server.c (main): Kill the inferior if an error occurs during
14081 the first remote_open.
14083 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14085 * README: Update supported targets.
14087 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14089 * Makefile.in (clean): Remove reg-mips64.c.
14090 (reg-mips64.c, reg-mips64.o): New rules.
14091 * configure.srv: Handle mips64. Include regset support for mips.
14092 * linux-mips-low.c (union mips_register): New.
14093 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14094 (mips_breakpoint, mips_breakpoint_at): Use int.
14095 (mips_collect_register, mips_supply_register)
14096 (mips_collect_register_32bit, mips_supply_register_32bit)
14097 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14098 (mips_store_fpregset, target_regsets): New.
14099 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14101 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14103 * configure.srv: Add target "spu*-*-*".
14104 * Makefile.in (clean): Remove reg-spu.c.
14105 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14106 * spu-low.c: New file.
14108 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14110 * configure.ac: Correct td_thr_tls_get_addr test.
14111 * configure: Regenerated.
14113 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14115 * linux-low.c (linux_wait_for_event): Reformat. Use the
14116 pass_signals array.
14117 * remote-utils.c (decode_address_to_semicolon): New.
14118 * server.c (pass_signals, handle_general_set): New.
14119 (handle_query): Mention QPassSignals for qSupported.
14120 (main): Call handle_general_set.
14121 * server.h (pass_signals, decode_address_to_semicolon): New.
14123 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14125 * server.c (handle_query): Correct error handling for read_auxv.
14127 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14129 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14130 and srv_linux_thread_db to yes.
14131 * linux-s390-low.c (s390_fill_gregset): New function.
14132 (target_regsets): Define data structure.
14134 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14136 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14137 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14138 * config.in, configure: Regenerated.
14139 * inferiors.c (gdb_id_to_thread): New function.
14140 (gdb_id_to_thread_id): Use it.
14141 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14142 * linux-low.h (struct process_info): Add th member.
14143 (thread_db_get_tls_address): New prototype.
14144 * remote-utils.c (decode_address): Make non-static.
14145 * server.c (handle_query): Handle qGetTLSAddr.
14146 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14147 * target.h (struct target_ops): Add get_tls_address.
14148 * thread-db.c (maybe_attach_thread): Save the thread handle.
14149 (thread_db_get_tls_address): New.
14151 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14153 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14154 (linux_resume_one_process): Take a siginfo_t *. Update all
14155 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14156 (struct pending_signals): Add a siginfo_t.
14157 (linux_wait_for_process): Always set last_status.
14158 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14159 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14160 * linux-low.h (struct process_info): Add last_status.
14162 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14164 * remote-utils.c (try_rle): New function.
14165 (putpkt_binary): Use it.
14167 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14169 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14170 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14171 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14172 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14173 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14176 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14178 * server.c (terminal_fd): New variable.
14179 (old_foreground_pgrp): Likewise.
14180 (restore_old_foreground_pgrp): New function.
14181 (start_inferior): Record the terminal file descriptor in terminal_fd
14182 and its original foreground group in old_foreground_pgrp. Register
14183 restore_old_foreground_pgrp with atexit().
14185 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14187 * server.c (handle_query): Correct qPart to qXfer.
14189 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14191 * configure.ac: Check for more headers which are missing on
14192 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14193 * configure.srv: Add Cygwin and mingw32.
14194 * remote-utils.c: Don't include headers unconditionally which
14195 are missing on mingw32. Include <winsock.h> for mingw32.
14196 (remote_open): Adjust for mingw32 support. Flush
14197 standard error after writing to it.
14198 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14199 (unblock_async_io, enable_async_io, disable_async_io)
14200 (readchar, getpkt): Update for Winsock support.
14201 (prepare_resume_reply): Expect a protocol signal number.
14202 * server.c: Disable <sys/wait.h> on mingw32.
14203 (start_inferior): Adjust for mingw32 support. Flush
14204 standard error after writing to it.
14205 (attach_inferior): Likewise. Use protocol signal
14207 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14209 * win32-i386-low.c: New file.
14210 * Makefile.in (XM_CLIBS): Set.
14211 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14212 (win32-i386-low.o): New dependency rule.
14213 * linux-low.c (linux_wait): Use target signal numbers.
14214 * target.h (struct target_ops): Doc fix.
14215 * server.h (target_signal_to_name): New prototype.
14216 * gdbreplay.c: Don't include headers unconditionally which
14217 are missing on mingw32. Include <winsock.h> for mingw32.
14218 (remote_close, remote_open): Adjust for Winsock support.
14219 * configure, config.in: Regenerated.
14221 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14223 * server.c (decode_xfer_read, write_qxfer_response): New.
14224 (handle_query): Take a packet length argument. Handle
14225 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14226 the qSupported response.
14227 (main): Update call to handle_query.
14229 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14231 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14232 (putpkt_binary): Renamed from putpkt and adjusted for binary
14234 (putpkt): New wrapper for putpkt_binary.
14235 (readchar): Don't mask off the high bit.
14236 (decode_X_packet): New function.
14237 * server.c (main): Call putpkt_binary if a handler sets the packet
14238 length. Save the length of the incoming packet. Handle 'X'.
14239 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14241 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14243 * server.c (handle_query): Handle qSupported.
14245 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14247 * remote-utils.c (all_symbols_looked_up): New variable.
14248 (look_up_one_symbol): Check it.
14249 * server.h (look_up_one_symbol): New declaration.
14250 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14252 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14254 * Makefile.in (linux-arm-low.o): Update dependencies.
14255 * linux-arm-low.c: Include "gdb_proc_service.h".
14256 (PTRACE_GET_THREAD_AREA): Define.
14257 (ps_get_thread_area): New function.
14259 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14261 * configure.srv (m68k*-*-uclinux*): New target.
14262 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14263 (linux_resume_one_process): Remove extraneous cast.
14264 (linux_read_offsets): New.
14265 (linux_target_op): Add linux_read_offsets on mmuless systems.
14266 * server.c (handle_query): Add qOffsets logic.
14267 * target.h (struct target_ops): Add read_offsets.
14269 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14271 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14272 (PTRACE_GET_THREAD_AREA): Define.
14273 (ps_get_thread_area): New function.
14274 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14275 (linux-x86-64-low.o): Update.
14277 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14279 * configure.ac: Remove checks for prfpregset_t.
14280 * gdb_proc_service.h: New file.
14281 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14282 new "gdb_proc_service.h".
14283 * proc-service.c: Likewise.
14284 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14285 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14286 * Makefile.in (gdb_proc_service_h): Updated.
14287 * configure, config.in: Regenerated.
14289 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14291 * remote-utils.c (prepare_resume_reply): Move declaration
14292 of gdb_id_from_wait to the top of the block.
14294 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14296 * linux-low.c (regsets_store_inferior_registers): Read the regset
14297 from the target before filling it.
14299 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14301 * server.c (attach_inferior): Return SIGTRAP for a successful
14304 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14306 * Makefile.in (OBS): Add version.o.
14307 (STAGESTUFF): Delete.
14308 (version.o): Add dependencies.
14309 (version.c): Replace rule.
14310 (clean): Remove version.c.
14311 * server.c (gdbserver_version): New.
14312 (gdbserver_usage): Use printf.
14313 (main): Handle --version and --help.
14314 * server.h (version, host_name): Add declarations.
14316 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14328 * linux-x86-64-low.c:
14330 * linux-s390-low.c:
14331 * linux-ppc64-low.c:
14333 * linux-mips-low.c:
14334 * linux-m68k-low.c:
14335 * linux-m32r-low.c:
14338 * linux-ia64-low.c:
14339 * linux-i386-low.c:
14340 * linux-crisv32-low.c:
14352 * gdbserver.1: Add (C) after Copyright. Update the FSF
14355 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14357 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14358 (arm_breakpoint_at): Recognize both breakpoints.
14359 (the_low_target): Use the correct breakpoint instruction.
14361 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14363 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14364 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14365 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14366 (the_low_target): Update.
14368 2005-10-25 Andreas Schwab <schwab@suse.de>
14370 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14372 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14373 (ia64_num_regs): Reduce to 462.
14375 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14377 * acinclude.m4: Correct quoting.
14378 * aclocal.m4: Regenerated.
14380 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14381 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14382 (thread_db_init): Call thread_db_err_str.
14383 * configure.ac: Check for TD_VERSION.
14384 * config.in, configure: Regenerated.
14386 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14388 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14390 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14392 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14393 is not available. Define HAVE_PTRACE_GETREGS if it is.
14394 * config.in, configure: Regenerated.
14395 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14396 * linux-i386-low.c, linux-m68k-low.c: Update to use
14397 HAVE_PTRACE_GETREGS.
14398 * linux-low.c (regsets_fetch_inferior_registers)
14399 (regsets_store_inferior_registers): Only return 0 if we processed
14401 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14402 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14404 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14406 * inferiors.c (struct thread_info): Add gdb_id.
14407 (add_thread): Add gdb_id argument.
14408 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14409 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14410 calls to add_thread.
14411 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14412 * server.c (handle_query): Use thread_to_gdb_id.
14413 (handle_v_cont, main): Use gdb_id_to_thread_id.
14414 * server.h (add_thread): Update prototype.
14415 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14418 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14420 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14421 left-padded registers.
14422 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14423 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14425 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14427 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14428 * configure: Regenerate.
14429 * config.in: Regenerate.
14430 * server.h (NEED_DECLARATION_STRERROR):
14431 Replace with !HAVE_DECL_STRERROR.
14433 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14435 * linux-low.c (linux_wait, linux_send_signal): Don't test
14436 an unsigned long variable for > 0 if it could be MAX_ULONG.
14437 * server.c (myresume): Likewise.
14438 * target.c (set_desired_inferior): Likewise.
14440 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14442 * configure.ac: Simplify and improve check for socklen_t.
14443 * configure, config.in: Regenerate.
14445 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14447 * acconfig.h: Remove.
14448 * configure.ac: Add a test for socklen_t. Use three-argument
14449 AC_DEFINE throughout.
14450 * config.in: Regenerated using autoheader 2.59.
14451 * configure: Regenerated.
14453 * gdbreplay.c (socklen_t): Provide a default.
14454 (remote_open): Use socklen_t.
14455 * remote-utils.c (socklen_t): Provide a default.
14456 (remote_open): Use socklen_t.
14457 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14460 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14462 * linux-low.c (linux_read_memory, linux_write_memory)
14463 (linux_read_auxv): Likewise.
14464 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14465 (check_mem_write): Likewise.
14466 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14468 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14469 (registers_from_string, register_data): Likewise.
14470 * server.c (handle_query, main): Likewise.
14471 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14472 (decode_M_packet): Likewise.
14473 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14474 * target.h (struct target_ops): Update read_memory, write_memory,
14476 (read_inferior_memory, write_inferior_memory): Update.
14477 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14478 to unsigned char *.
14479 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14480 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14481 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14482 linux-s390-low.c, linux-sh-low.c: Update for changes in
14483 read_inferior_memory and the_low_target->breakpoint.
14485 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14487 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14488 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14489 * configure.srv: Add powerpc64-*-linux*.
14490 * linux-ppc64-low.c: New file.
14492 2005-05-23 Orjan Friberg <orjanf@axis.com>
14494 * linux-cris-low.c: New file with support for CRIS.
14495 * linux-crisv32-low.c: Ditto for CRISv32.
14496 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14497 (clean): Add reg-cris.c and reg-crisv32.c.
14498 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14499 reg-crisv32.o, and reg-crisv32.c to make rules.
14500 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14501 recognized targets.
14503 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14505 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14506 of sizeof (PTRACE_XFER_TYPE).
14507 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14509 2005-05-12 Orjan Friberg <orjanf@axis.com>
14511 * target.h (struct target_ops): Add insert_watchpoint,
14512 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14513 pointers for hardware watchpoint support.
14514 * linux-low.h (struct linux_target_ops): Ditto.
14515 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14516 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14517 to linux_target_ops.
14518 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14520 * server.c (main): Recognize 'Z' and 'z' packets.
14522 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14524 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14525 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14526 (the_low_target): Add new members.
14528 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14530 * proc-service.c (ps_lgetregs): Search all_processes instead of
14533 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14535 * server.c (start_inferior): Change return type to int.
14536 (attach_inferior): Change sigptr to int *.
14537 (handle_v_cont, handle_v_requests): Change signal to int *.
14538 (main): Change signal to int.
14540 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14542 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14543 * configure.srv: Add m32r*-*-linux*.
14544 * linux-m32r-low.c: New file.
14546 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14548 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14550 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14552 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14553 Take unsigned long arguments for PIDs.
14554 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14555 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14556 (wait_for_sigstop, linux_resume_one_process)
14557 (regsets_fetch_inferior_registers, linux_send_signal)
14558 (linux_read_auxv): Likewise. Update the types of variables holding
14559 PIDs. Update format string specifiers.
14560 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14561 * remote-utils.c (prepare_resume_reply): Likewise.
14562 * server.c (cont_thread, general_thread, step_thread)
14563 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14565 (handle_query): Update format specifiers.
14566 (handle_v_cont, main): Use strtoul for thread IDs.
14567 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14568 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14569 (general_thread, step_thread, thread_from_wait)
14570 (old_thread_from_wait): Update.
14571 * target.h (struct thread_resume): Use unsigned long for THREAD.
14572 (struct target_ops): Use unsigned long for arguments to attach and
14575 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14577 * acinclude.m4: Include bfd/bfd.m4 directly.
14578 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14579 <agriffis@toolchain.org>.
14580 * aclocal.m4, configure: Regenerated.
14582 2005-01-07 Andrew Cagney <cagney@gnu.org>
14584 * configure.ac: Rename configure.in, require autoconf 2.59.
14585 * configure: Re-generate.
14587 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14589 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14590 LIBS when finished.
14591 * aclocal.m4: Regenerated.
14592 * configure: Regenerated.
14594 2004-11-21 Andreas Schwab <schwab@suse.de>
14596 * linux-m68k-low.c (m68k_num_gregs): Define.
14597 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14598 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14599 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14600 (m68k_breakpoint_at): New. Add to the_low_target.
14602 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14603 srv_linux_thread_db to yes.
14605 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14607 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14608 (ARCH_SET_FS): Likewise.
14609 (ARCH_GET_FS): Likewise.
14610 (ARCH_GET_GS): Likewise.
14612 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14614 * linux-i386-low.c (ps_get_thread_area): New.
14615 * linux-x86-64-low.c (ps_get_thread_area): New.
14616 * linux-low.c: Include <sys/syscall.h>.
14617 (linux_kill_one_process): Don't kill the first thread here.
14618 (linux_kill): Kill the first thread here.
14619 (kill_lwp): New function.
14620 (send_sigstop, linux_send_signal): Use it.
14621 * proc-service.c: Clean up #ifdefs.
14622 (fpregset_info): Delete.
14623 (ps_lgetregs): Update and enable implementation.
14624 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14626 * remote-utils.c (struct sym_cache, symbol_cache): New.
14627 (input_interrupt): Print a clearer message.
14628 (async_io_enabled): New variable.
14629 (enable_async_io, disable_async_io): Use it. Update comments.
14630 (look_up_one_symbol): Use the symbol cache.
14631 * thread-db.c (thread_db_look_up_symbols): New function.
14632 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14634 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14636 * configure.in: Test for -rdynamic.
14637 * configure: Regenerated.
14638 * Makefile (INTERNAL_LDFLAGS): New.
14639 (gdbserver, gdbreplay): Use it.
14641 2004-09-02 Andrew Cagney <cagney@gnu.org>
14643 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14645 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14647 * linux-low.c (linux_wait): Clear all_processes list also.
14649 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14651 * linux-low.c: Include <errno.h>. Remove extern declaration of
14654 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14656 * gdbreplay.c, server.h, utils.c: Update copyright years.
14658 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14660 * server.c (main): Print child status or termination signal from
14661 variable 'signal', not 'sig'.
14663 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14665 * linux-low.c (linux_read_memory): Change return type to
14666 int. Check for and return error from ptrace().
14667 * target.c (read_inferior_memory): Change return type to int. Pass
14668 back return status from the_target->read_memory().
14669 * target.h (struct target_ops): Adapt *read_memory() prototype.
14671 (read_inferior_memory): Adapt prototype.
14672 * server.c (main): Return an error packet if
14673 read_inferior_memory() returns an error.
14675 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14677 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14678 Unify with other clean targets.
14680 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14682 * server.c (handle_v_cont): Call set_desired_inferior.
14684 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14686 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14688 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14690 * linux-low.c (linux_wait): Unblock async I/O.
14691 (linux_resume): Block and enable async I/O.
14692 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14693 * server.h (block_async_io, unblock_async_io): Add prototypes.
14695 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14697 * remote-utils.c (remote_open): Print a status notice after
14698 opening a TCP port.
14699 * server.c (attach_inferior): Print a status notice after
14702 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14704 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14706 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14708 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14710 * server.c, target.h: Update copyright years.
14712 2004-02-25 Roland McGrath <roland@redhat.com>
14714 * target.h (struct target_ops): New member `read_auxv'.
14715 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14716 * linux-low.c (linux_read_auxv): New function.
14717 (linux_target_ops): Initialize `read_auxv' member to that.
14719 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14721 Committed by Jim Blandy <jimb@redhat.com>.
14723 * linux-s390-low.c (s390_num_regs): Update.
14724 (s390_regmap): Remove control registers. Use __s390x__ predefine
14725 instead of GPR_SIZE to distiguish s390 and s390x targets.
14727 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14729 * linux-low.c: Update copyright year.
14730 (check_removed_breakpoint): Clear pending_is_breakpoint.
14731 (linux_set_resume_request, linux_queue_one_thread)
14732 (resume_status_pending_p): New functions.
14733 (linux_continue_one_thread): Use process->resume.
14734 (linux_resume): Only resume threads if there are no pending events.
14735 * linux-low.h (struct process_info): Add resume request
14738 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14740 * regcache.c (new_register_cache): Clear the allocated register
14741 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14743 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14745 * linux-low.c (linux_resume): Take a struct thread_resume *
14747 (linux_wait): Update call.
14748 (resume_ptr): New static variable.
14749 (linux_continue_one_thread): Renamed from
14750 linux_continue_one_process. Use resume_ptr.
14751 (linux_resume): Use linux_continue_one_thread.
14752 * server.c (handle_v_cont, handle_v_requests): New functions.
14753 (myresume): New function.
14754 (main): Handle 'v' case.
14755 * target.h (struct thread_resume): New type.
14756 (struct target_ops): Change argument of "resume" to struct
14758 (myresume): Delete macro.
14760 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14762 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14763 (uninstall): Support DESTDIR.
14765 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14767 * configure.srv: Add xscale*linux copy of arm*linux entry.
14769 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14771 * linux-arm-low.c (arm_reinsert_addr): New function.
14772 (the_low_target): Add arm_reinsert_addr.
14774 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14776 * mem-break.c: Remove whitespace at end of file.
14778 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14780 * configure.in: Check whether we need to prototype strerror.
14781 * server.h: Optionally prototype strerror.
14782 * gdbreplay.c (perror_with_name): Use strerror.
14783 * linux-low.c (linux_attach_lwp): Use strerror.
14784 * utils.c (perror_with_name): Use strerror.
14785 * config.in, configure: Regenerated.
14787 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14789 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14790 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14792 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14794 * Makefile.in (SFILES): Update.
14795 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14796 low-sun3.c: Remove files.
14798 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14800 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14801 (linux_detach_one_process, linux_detach): New functions.
14802 (linux_target_ops): Add linux_detach.
14803 * server.c (main): Handle 'D' packet.
14804 * target.h (struct target_ops): Add "detach" member.
14805 (detach_inferior): Define.
14807 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14809 From Kelley Cook <kelleycook@wideopenwest.com>:
14810 * configure.srv: Accept i[34567]86 variants.
14812 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14814 * linux-low.c (linux_wait_for_event): Correct comment typos.
14815 (linux_resume_one_process): Call check_removed_breakpoint.
14816 (linux_send_signal): New function.
14817 (linux_target_ops): Add linux_send_signal.
14818 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14820 * target.h (struct target_ops): Add send_signal.
14822 2003-05-29 Jim Blandy <jimb@redhat.com>
14824 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14825 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14826 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14827 away part of the register's value.
14829 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14831 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14832 (linux_wait_for_event, linux_init_signals): Likewise.
14834 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14836 * configure.in: Check for stdlib.h.
14837 * configure: Regenerated.
14838 * config.in: Regenerated.
14840 2003-01-04 Andreas Schwab <schwab@suse.de>
14842 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14844 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14846 * Makefile.in: Remove obsolete code.
14848 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14850 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14851 defined(PT_FPR0_HI).
14853 2002-11-17 Stuart Hughes <seh@zee2.com>
14855 * linux-arm-low.c (arm_num_regs): Increase.
14856 (arm_regmap): Include status register.
14858 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14860 * linux-low.c (register_addr): Remove incorrect -1 check.
14862 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14864 * linux-low.c (linux_create_inferior): Call setpgid. Return
14866 (unstopped_p, linux_signal_pid): Remove.
14867 (linux_target_ops): Remove linux_signal_pid.
14868 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14869 global instead of target method.
14870 * target.h (struct target_ops): Remove signal_pid. Update comment
14871 for create_inferior.
14872 * server.c (signal_pid): New variable.
14873 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14874 gdbserver. Set the child to be the foreground process group.
14875 (attach_inferior): Set signal_pid.
14877 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14879 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14881 2002-08-20 Jim Blandy <jimb@redhat.com>
14883 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14886 2002-08-01 Andrew Cagney <cagney@redhat.com>
14888 * Makefile.in: Make chill references obsolete.
14890 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14892 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14893 * configure: Regenerate.
14894 * config.in: Regenerate.
14896 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14898 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14899 (perror_with_name, remote_close, remote_open, expect, play): Static.
14901 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14903 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14904 byte offsets instead of an array of indexes.
14905 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14907 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14909 * regcache.c: Add comment.
14911 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14913 * thread-db.c: New file.
14914 * proc-service.c: New file.
14915 * acinclude.m4: New file.
14916 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14917 proc-service.o, and thread-db.o.
14918 (linux-low.o): Add USE_THREAD_DB.
14919 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14920 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14921 * aclocal.m4: Regenerated.
14922 * config.in: Regenerated.
14923 * configure: Regenerated.
14924 * configure.in: Check for proc_service.h, sys/procfs.h,
14925 thread_db.h, and linux/elf.h headrs.
14926 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14927 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14928 Check for -lthread_db and thread support.
14929 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14930 PowerPC, and SuperH.
14931 * i387-fp.c: Constify arguments.
14932 * i387-fp.h: Likewise.
14933 * inferiors.c: (struct thread_info): Renamed from
14934 `struct inferior_info'. Remove PID member. Use generic inferior
14935 list header. All uses updated.
14936 (inferiors, signal_pid): Removed.
14937 (all_threads): New variable.
14938 (get_thread): Define.
14939 (add_inferior_to_list): New function.
14940 (for_each_inferior): New function.
14941 (change_inferior_id): New function.
14942 (add_inferior): Removed.
14943 (remove_inferior): New function.
14944 (add_thread): New function.
14945 (free_one_thread): New function.
14946 (remove_thread): New function.
14947 (clear_inferiors): Use for_each_inferior and free_one_thread.
14948 (find_inferior): New function.
14949 (find_inferior_id): New function.
14950 (inferior_target_data): Update argument type.
14951 (set_inferior_target_data): Likewise.
14952 (inferior_regcache_data): Likewise.
14953 (set_inferior_regcache_data): Likewise.
14954 * linux-low.c (linux_bp_reinsert): Remove.
14955 (all_processes, stopping_threads, using_thrads)
14956 (struct pending_signals, debug_threads, pid_of): New.
14957 (inferior_pid): Replace with macro.
14958 (struct inferior_linux_data): Remove.
14959 (get_stop_pc, add_process): New functions.
14960 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14961 Use add_process and add_thread.
14962 (linux_attach_lwp): New function, based on old linux_attach. Use
14963 add_process and add_thread. Set stop_expected for new threads.
14964 (linux_attach): New function.
14965 (linux_kill_one_process): New function.
14966 (linux_kill): Kill all LWPs.
14967 (linux_thread_alive): Use find_inferior_id.
14968 (check_removed_breakpoints, status_pending_p): New functions.
14969 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14970 Update. Use WNOHANG. Wait for cloned processes also. Update process
14971 struct for the found process.
14972 (linux_wait_for_event): New function.
14973 (linux_wait): Use it. Support LWPs.
14974 (send_sigstop, wait_for_sigstop, stop_all_processes)
14975 (linux_resume_one_process, linux_continue_one_process): New functions.
14976 (linux_resume): Support LWPs.
14977 (REGISTER_RAW_SIZE): Remove.
14978 (fetch_register): Use register_size instead. Call supply_register.
14979 (usr_store_inferior_registers): Likewise. Call collect_register.
14980 Fix recursive case.
14981 (regsets_fetch_inferior_registers): Improve error message.
14982 (regsets_store_inferior_registers): Add debugging.
14983 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14984 (unstopped_p, linux_signal_pid): New functions.
14985 (linux_target_ops): Add linux_signal_pid.
14986 (linux_init_signals): New function.
14987 (initialize_low): Call it. Initialize using_threads.
14988 * regcache.c (inferior_regcache_data): Add valid
14990 (get_regcache): Fetch registers lazily. Add fetch argument
14991 and update all callers.
14992 (regcache_invalidate_one, regcache_invalidate): New
14994 (new_register_cache): Renamed from create_register_cache.
14995 Return the new regcache.
14996 (free_register_cache): Change argument to a void *.
14997 (registers_to_string, registers_from_string): Call get_regcache
14998 with fetch flag set.
14999 (register_data): Make static. Pass fetch flag to get_regcache.
15000 (supply_register): Call get_regcache with fetch flag clear.
15001 (collect_register): Call get_regcache with fetch flag set.
15002 (collect_register_as_string): New function.
15003 * regcache.h: Update.
15004 * remote-utils.c (putpkt): Flush after debug output and use
15006 Handle input interrupts while waiting for an ACK.
15007 (input_interrupt): Use signal_pid method.
15008 (getpkt): Flush after debug output and use stderr.
15009 (outreg): Use collect_register_as_string.
15010 (new_thread_notify, dead_thread_notify): New functions.
15011 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15012 and general_thread.
15013 (look_up_one_symbol): Flush after debug output.
15014 * server.c (step_thread, server_waiting): New variables.
15015 (start_inferior): Don't use signal_pid. Update call to mywait.
15016 (attach_inferior): Update call to mywait.
15017 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15018 (main): Don't fetch/store registers explicitly. Use
15019 set_desired_inferior. Support proposed ``Hs'' packet. Update
15021 * server.h: Update.
15022 (struct inferior_list, struct_inferior_list_entry): New.
15023 * target.c (set_desired_inferior): New.
15024 (write_inferior_memory): Constify.
15025 (mywait): New function.
15026 * target.h: Update.
15027 (struct target_ops): New signal_pid method.
15028 (mywait): Removed macro, added prototype.
15030 * linux-low.h (regset_func): Removed.
15031 (regset_fill_func, regset_store_func): New.
15032 (enum regset_type): New.
15033 (struct regset_info): Add type field. Use new operation types.
15034 (struct linux_target_ops): stop_pc renamed to get_pc.
15035 Add decr_pc_after_break and breakpoint_at.
15036 (get_process, get_thread_proess, get_process_thread)
15037 (strut process_info, all_processes, linux_attach_lwp)
15038 (thread_db_init): New.
15040 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15041 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15042 (the_low_target): Add new members.
15043 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15044 (i386_store_fpxregset): Constify.
15045 (target_regsets): Add new kind identifier.
15046 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15047 (i386_set_pc): Add debugging.
15048 (i386_breakpoint_at): New function.
15049 (the_low_target): Add new members.
15050 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15051 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15052 (mips_breakpoint_at): New.
15053 (the_low_target): Add new members.
15054 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15055 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15056 (the_low_target): Add new members.
15057 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15058 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15059 (the_low_target): Add new members.
15060 * linux-x86-64-low.c (target_regsets): Add new kind
15063 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15065 From Martin Pool <mbp@samba.org>:
15066 * server.c (gdbserver_usage): New function.
15069 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15071 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15072 stop_at -> stop_pc.
15074 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15076 * Makefile.in: Remove obsolete code.
15078 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15080 * linux-low.c (regsets_fetch_inferior_registers),
15081 (regsets_store_inferior_registers): Removed cast to int from
15083 * regcache.h: Added declaration of struct inferior_info.
15085 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15087 * inferiors.c (struct inferior_info): Add regcache_data.
15088 (add_inferior): Call create_register_cache.
15089 (clear_inferiors): Call free_register_cache.
15090 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15091 * regcache.c (struct inferior_regcache_data): New.
15092 (registers): Remove.
15093 (get_regcache): New function.
15094 (create_register_cache, free_register_cache): New functions.
15095 (set_register_cache): Don't initialize the register cache here.
15096 (registers_to_string, registers_from_string, register_data): Call
15098 * regcache.h: Add prototypes.
15099 * server.h: Likewise.
15101 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15103 * mem-break.c: New file.
15104 * mem-break.h: New file.
15105 * Makefile.in: Add mem-break.o rule; update server.h
15107 * inferiors.c (struct inferior_info): Add target_data
15109 (clear_inferiors): Free target_data member if set.
15110 (inferior_target_data, set_inferior_target_data): New functions.
15111 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15112 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15113 * linux-low.c (linux_bp_reinsert): New variable.
15114 (struct inferior_linux_data): New.
15115 (linux_create_inferior): Use set_inferior_target_data.
15116 (linux_attach): Likewise. Call add_inferior.
15117 (linux_wait_for_one_inferior): New function.
15118 (linux_wait): Call it.
15119 (linux_write_memory): Add const.
15120 (initialize_low): Call set_breakpoint_data.
15121 * linux-low.h (struct linux_target_ops): Add breakpoint
15123 * server.c (attach_inferior): Remove extra add_inferior
15125 * server.h: Include mem-break.h. Update inferior.c
15127 * target.c (read_inferior_memory)
15128 (write_inferior_memory): New functions.
15129 * target.h (read_inferior_memory)
15130 (write_inferior_memory): Change macros to prototypes.
15131 (struct target_ops): Update comments. Add const to write_memory
15134 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15136 * linux-low.c (usr_store_inferior_registers): Support
15137 registers which are allowed to fail to store.
15138 * linux-low.h (linux_target_ops): Likewise.
15139 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15140 (ppc_cannot_store_register): FPSCR may not be storable.
15142 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15144 * server.h: Include <string.h> if HAVE_STRING_H.
15145 * ChangeLog: Correct paths in last ChangeLog entry.
15147 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15149 * linux-low.h: Remove obsolete prototypes.
15150 (struct linux_target_ops): New.
15151 (extern the_low_target): New.
15152 * linux-low.c (num_regs, regmap): Remove declarations.
15153 (register_addr): Use the_low_target explicitly.
15154 (fetch_register): Likewise.
15155 (usr_fetch_inferior_registers): Likewise.
15156 (usr_store_inferior_registers): Likewise.
15157 * linux-arm-low.c (num_regs): Remove.
15158 (arm_num_regs): Define.
15159 (arm_regmap): Renamed from regmap, made static.
15160 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15162 (arm_cannot_store_register): Renamed from cannot_store_register,
15164 (the_low_target): New.
15165 * linux-i386-low.c (num_regs): Remove.
15166 (i386_num_regs): Define.
15167 (i386_regmap): Renamed from regmap, made static.
15168 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15170 (i386_cannot_store_register): Renamed from cannot_store_register,
15172 (the_low_target): New.
15173 * linux-ia64-low.c (num_regs): Remove.
15174 (ia64_num_regs): Define.
15175 (ia64_regmap): Renamed from regmap, made static.
15176 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15178 (ia64_cannot_store_register): Renamed from cannot_store_register,
15180 (the_low_target): New.
15181 * linux-m68k-low.c (num_regs): Remove.
15182 (m68k_num_regs): Define.
15183 (m68k_regmap): Renamed from regmap, made static.
15184 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15186 (m68k_cannot_store_register): Renamed from cannot_store_register,
15188 (the_low_target): New.
15189 * linux-mips-low.c (num_regs): Remove.
15190 (mips_num_regs): Define.
15191 (mips_regmap): Renamed from regmap, made static.
15192 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15194 (mips_cannot_store_register): Renamed from cannot_store_register,
15196 (the_low_target): New.
15197 * linux-ppc-low.c (num_regs): Remove.
15198 (ppc_num_regs): Define.
15199 (ppc_regmap): Renamed from regmap, made static.
15200 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15202 (ppc_cannot_store_register): Renamed from cannot_store_register,
15204 (the_low_target): New.
15205 * linux-s390-low.c (num_regs): Remove.
15206 (s390_num_regs): Define.
15207 (s390_regmap): Renamed from regmap, made static.
15208 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15210 (s390_cannot_store_register): Renamed from cannot_store_register,
15212 (the_low_target): New.
15213 * linux-sh-low.c (num_regs): Remove.
15214 (sh_num_regs): Define.
15215 (sh_regmap): Renamed from regmap, made static.
15216 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15218 (sh_cannot_store_register): Renamed from cannot_store_register,
15220 (the_low_target): New.
15221 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15222 (the_low_target): New.
15224 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15226 * Makefile.in: Add stamp-h target.
15227 * configure.in: Create stamp-h.
15228 * configure: Regenerated.
15230 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15232 * inferiors.c: New file.
15233 * target.c: New file.
15234 * target.h: New file.
15235 * Makefile.in: Add target.o and inferiors.o. Update
15237 * linux-low.c (inferior_pid): New static variable,
15238 moved from server.c.
15239 (linux_create_inferior): Renamed from create_inferior.
15240 Call add_inferior. Return 0 on success instead of a PID.
15241 (linux_attach): Renamed from myattach.
15242 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15243 (linux_thread_alive): Renamed from mythread_alive.
15244 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15246 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15247 (regsets_store_inferior_registers): Correct error message.
15248 Add missing ``return 0''.
15249 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15250 (linux_store_registers): Renamed from store_inferior_registers.
15251 (linux_read_memory): Renamed from read_inferior_memory.
15252 (linux_write_memory): Renamed from write_inferior_memory.
15253 (linux_target_ops): New structure.
15254 (initialize_low): Call set_target_ops ().
15255 * remote-utils.c (unhexify): New function.
15256 (hexify): New function.
15257 (input_interrupt): Send signals to ``signal_pid''.
15258 * server.c (inferior_pid): Remove.
15259 (start_inferior): Update create_inferior call.
15260 (attach_inferior): Call add_inferior.
15261 (handle_query): New function.
15262 (main): Call handle_query for `q' packets.
15263 * server.h: Include "target.h". Remove obsolete prototypes.
15264 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15266 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15268 * Makefile.in: Add WARN_CFLAGS. Update configury
15270 * configure.in: Check for <string.h>
15271 * configure: Regenerate.
15272 * config.in: Regenerate.
15273 * gdbreplay.c: Include needed system headers.
15274 (remote_open): Remove strchr prototype.
15275 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15276 * regcache.c (supply_register): Change buf argument to const void *.
15277 (supply_register_by_name): Likewise.
15278 (collect_register): Change buf argument to void *.
15279 (collect_register_by_name): Likewise.
15280 * regcache.h: Add missing prototypes.
15281 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15282 * server.c (handle_query): New function.
15283 (attached): New static variable, moved out of main.
15284 (main): Quiet longjmp clobber warnings.
15285 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15286 * utils.c (error): Remove NORETURN.