1 2017-09-05 Yao Qi <yao.qi@linaro.org>
3 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7 * server.c (get_features_xml): Call tdesc_get_features_xml.
8 * tdesc.c (set_tdesc_architecture): New function.
9 (set_tdesc_osabi): New function.
10 (tdesc_get_features_xml): New function.
11 (tdesc_create_feature): Add an argument.
12 * tdesc.h (struct target_desc) <features>: New field.
13 <arch, osabi>: New field.
14 (~target_desc): xfree features, arch, and osabi.
15 (target_desc::oerator==): Don't compare .xmltarget.
16 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
17 (set_tdesc_osabi): Likewise.
18 (tdesc_get_features_xml): Likewise.
20 2017-09-05 Yao Qi <yao.qi@linaro.org>
22 * linux-x86-tdesc.c: Include selftest.h.
23 (i386_tdesc_test): New function.
24 (initialize_low_tdesc): Call selftests::register_test.
25 * tdesc.h: Include regdef.h.
26 (target_desc): Override operator == and !=.
28 2017-09-05 Yao Qi <yao.qi@linaro.org>
30 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
32 * linux-i386-ipa.c: Include common/x86-xstate.h
33 (get_ipa_tdesc): Call i386_linux_read_description.
34 (initialize_low_tracepoint): Don't call init_registers_XXX
35 functions, call initialize_low_tdesc instead.
36 * linux-x86-low.c (x86_linux_read_description): Call
37 i386_linux_read_description.
38 (initialize_low_arch): Don't call init_registers_i386_XXX
39 functions, call initialize_low_tdesc.
40 * linux-x86-tdesc.c: New file.
41 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
42 (i386_get_ipa_tdesc_idx): Declare.
43 (i386_get_ipa_tdesc): Declare.
44 (initialize_low_tdesc): Declare.
46 2017-09-05 Yao Qi <yao.qi@linaro.org>
48 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
51 2017-09-05 Yao Qi <yao.qi@linaro.org>
53 * Makefile.in (IPA_OBJS): Add vec-ipa.o
54 * regcache.c (get_thread_regcache): Use VEC_length.
55 (init_register_cache): Likewise.
56 (regcache_cpy): Likewise.
57 (registers_to_string): Iterate reg_defs via VEC_iterate.
58 (find_regno): Likewise.
59 (find_register_by_number): Use VEC_index.
60 (register_size): Call find_register_by_number.
61 (register_data): Call find_register_by_number.
62 (supply_regblock): Use VEC_length.
63 (regcache_raw_read_unsigned): Likewise.
64 * tdesc.c (init_target_desc): Iterate reg_defs via
66 (default_description): Update initializer.
67 (copy_target_description): Don't update field num_registers.
68 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
69 <num_registers>: Remove.
71 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
73 * Makefile.in (.SECONDARY): Define target.
75 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
77 * linux-low.c (linux_wait_1): Adjust.
78 * server.c (queue_stop_reply_callback): Adjust.
80 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
82 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
83 QEnvironmentUnset and QEnvironmentReset packets.
84 (handle_query): Inform remote that QEnvironmentHexEncoded,
85 QEnvironmentUnset and QEnvironmentReset are supported.
87 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
89 * inferiors.h (inferior_target_data): Rename to ...
90 (thread_target_data): ... this.
91 (inferior_regcache_data): Rename to ...
92 (thread_regcache_data): ... this.
93 (set_inferior_regcache_data): Rename to ...
94 (set_thread_regcache_data): ... this.
95 * inferiors.c (inferior_target_data): Rename to ...
96 (thread_target_data): ... this.
97 (inferior_regcache_data): Rename to ...
98 (thread_regcache_data): ... this.
99 (set_inferior_regcache_data): Rename to ...
100 (set_thread_regcache_data): ... this.
101 (free_one_thread): Update.
102 * linux-low.h (get_thread_lwp): Update.
103 * regcache.c (get_thread_regcache): Update.
104 (regcache_invalidate_thread): Update.
105 (free_register_cache_thread): Update.
106 * win32-i386-low.c (update_debug_registers_callback): Update.
107 (win32_get_current_dr): Update.
108 * win32-low.c (thread_rec): Update.
109 (delete_thread_info): Update.
110 (continue_one_thread): Update.
111 (suspend_one_thread): Update.
113 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
115 * inferiors.c (set_inferior_target_data): Remove.
116 * inferiors.h (set_inferior_target_data): Remove.
118 2017-08-18 Yao Qi <yao.qi@linaro.org>
120 * Makefile.in (OBS): Add selftest.o.
121 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
122 * configure, config.in: Re-generated.
123 * server.c: Include common/sefltest.h.
124 (captured_main): Handle option --selftest.
126 2017-08-09 Yao Qi <yao.qi@linaro.org>
128 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
129 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
130 i386-avx-mpx.o and i386-mmx.o.
131 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
132 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
133 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
134 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
135 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
136 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
137 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
138 i386/amd64-avx-mpx.xml.
140 2017-08-09 Yao Qi <yao.qi@linaro.org>
142 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
143 and x32-avx-avx512.o.
144 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
145 i386/x32-avx-avx512.xml.
147 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
149 * tracepoint.h (enum class fast_tpoint_collect_result): New
151 (fast_tracepoint_collecting): Change return type to
152 fast_tpoint_collect_result.
153 * tracepoint.c (fast_tracepoint_collecting): Likewise.
154 * linux-low.h: Include tracepoint.h.
155 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
156 fast_tpoint_collect_result.
157 * linux-low.c (handle_tracepoints): Adjust.
158 (linux_fast_tracepoint_collecting): Change return type to
159 fast_tpoint_collect_result.
160 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
161 linux_wait_1, stuck_in_jump_pad_callback,
162 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
163 proceed_one_lwp): Adjust to type change.
165 2017-07-10 Yao Qi <yao.qi@linaro.org>
167 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
169 2017-06-29 Yao Qi <yao.qi@linaro.org>
171 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
173 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
175 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
177 * Makefile.in (IPA_OBJS): Sort and format one item per line.
179 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
181 * linux-low.c (linux_create_inferior): Adjust code to access the
182 environment information via 'gdb_environ' class.
183 * lynx-low.c (lynx_create_inferior): Likewise.
184 * server.c (our_environ): Make it an instance of 'gdb_environ'.
185 (get_environ): Return a pointer to 'our_environ'.
186 (captured_main): Initialize 'our_environ'.
187 * server.h (get_environ): Adjust prototype.
188 * spu-low.c (spu_create_inferior): Adjust code to access the
189 environment information via 'gdb_environ' class.
191 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
193 * linux-low.c (linux_read_memory, linux_write_memory): Remove
194 usage of "register" keyword.
196 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
198 * configure: Re-generate.
200 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
202 * configure: Re-generate.
204 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
206 * Makefile.in (COMPILE.pre): Add "-x c++".
208 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
210 * fork-child.c: Conditionally include <signal.h>.
212 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
214 * server.c (handle_general_set): Handle new packet
216 (handle_query): Add "QStartupWithShell" to the list of supported
218 (gdbserver_usage): Add help text explaining the
219 new "--startup-with-shell" and "--no-startup-with-shell" CLI
221 (captured_main): Recognize and act upon the presence of the new
224 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
225 Pedro Alves <palves@redhat.com>
227 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
228 * configure: Regenerate.
229 * configure.srv (srv_linux_obj): Add "fork-child.o" and
231 (i[34567]86-*-lynxos*): Likewise.
232 (spu*-*-*): Likewise.
233 * fork-child.c: New file.
234 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
236 (linux_ptrace_fun): New function.
237 (linux_create_inferior): Adjust function prototype to reflect
238 change on "target.h". Adjust function code to use
240 (linux_request_interrupt): Delete "signal_pid".
241 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
242 (lynx_ptrace_fun): New function.
243 (lynx_create_inferior): Adjust function prototype to reflect
244 change on "target.h". Adjust function code to use
246 * nto-low.c (nto_create_inferior): Adjust function prototype and
247 code to reflect change on "target.h". Update comments.
248 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
249 "common-terminal.h" and "environ.h".
250 (terminal_fd): Moved to fork-child.c.
251 (old_foreground_pgrp): Likewise.
252 (restore_old_foreground_pgrp): Likewise.
253 (last_status): Make it global.
254 (last_ptid): Likewise.
255 (our_environ): New variable.
256 (startup_with_shell): Likewise.
257 (program_name): Likewise.
258 (program_argv): Rename to...
259 (program_args): ...this.
260 (wrapper_argv): New variable.
261 (start_inferior): Delete function.
262 (get_exec_wrapper): New function.
263 (get_exec_file): Likewise.
264 (get_environ): Likewise.
265 (prefork_hook): Likewise.
266 (post_fork_inferior): Likewise.
267 (postfork_hook): Likewise.
268 (postfork_child_hook): Likewise.
269 (handle_v_run): Update code to deal with arguments coming from the
270 remote host. Update calls from "start_inferior" to
272 (captured_main): Likewise. Initialize environment variable. Call
274 * server.h (post_fork_inferior): New prototype.
275 (get_environ): Likewise.
276 (last_status): Declare.
277 (last_ptid): Likewise.
278 (signal_pid): Likewise.
279 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
280 (spu_ptrace_fun): New function.
281 (spu_create_inferior): Adjust function prototype to reflect change
282 on "target.h". Adjust function code to use "fork_inferior".
283 * target.c (target_terminal_init): New function.
284 (target_terminal_inferior): Likewise.
285 (target_terminal_ours): Likewise.
286 * target.h: Include <vector>.
287 (struct target_ops) <create_inferior>: Update prototype.
288 (create_inferior): Update macro.
289 * utils.c (gdb_flush_out_err): New function.
290 * win32-low.c (win32_create_inferior): Adjust function prototype
291 and code to reflect change on "target.h".
293 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
295 * inferiors.c (switch_to_thread): New function.
297 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
299 * Makefile.in (SFILE): Add "common/job-control.c".
300 (OBS): Add "job-control.o".
302 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
304 * Makefile: Remove "@host_makefile_frag@".
306 2017-05-05 Pedro Alves <palves@redhat.com>
308 * configure: Regenerate.
310 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
312 * configure: Regenerate.
314 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
316 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
317 software_single_step change of return type to
318 std::vector<CORE_ADDR>.
319 * linux-low.c (install_software_single_step_breakpoints):
321 * linux-low.h (install_software_single_step_breakpoints):
324 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
326 * remote-utils.c: Include "gdb_termios.h" instead of
328 * terminal.h: Delete file.
330 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
332 * server.c: Include <vector>.
333 <program_argv, wrapper_argv>: Convert to std::vector.
334 (start_inferior): Rewrite function to use C++.
335 (handle_v_run): Likewise. Update code that calculates the argv
336 based on the vRun packet; use C++.
337 (captured_main): Likewise.
339 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
341 * server.c (handle_v_cont): Initialize thread_resume::thread
344 2017-04-05 Pedro Alves <palves@redhat.com>
346 * configure: Regenerate.
348 2017-04-05 Pedro Alves <palves@redhat.com>
350 * gdbreplay.c (sync_error): Constify.
351 * linux-x86-low.c (push_opcode): Constify.
353 2017-04-05 Pedro Alves <palves@redhat.com>
355 * win32-low.c (get_child_debug_event)
356 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
357 Report TARGET_WAITKIND_SPURIOUS instead.
359 2017-04-05 Pedro Alves <palves@redhat.com>
361 * remote-utils.c (remote_prepare, remote_open): Constify.
362 * remote-utils.h (remote_prepare, remote_open): Constify.
363 * server.c (captured_main): Constify 'port' handling.
365 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
367 * Makefile.in (clean): Clear .deps.
369 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
371 * .gitignore: Remove generated files, replace with wildcard.
372 * (clean): Replace removal of generated files with wildcard.
373 (version.c): Replace with...
374 (version-generated.c): ...this.
375 (xml-builtin.c): Replace with...
376 (xml-builtin-generated.c): ...this.
377 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
378 (%.c: *regformats*): Replace with...
379 (%-generated.c: *regformats*): ...this.
381 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
383 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
384 (xtensa_fill_gregset): Call collect_register_by_name for
386 (xtensa_store_gregset): Call supply_register_by_name for
389 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
391 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
392 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
393 (xtensa_store_gregset): Call supply_register for all registers in
394 a0_regnum..a0_regnum + C0_NREGS range.
396 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
398 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
399 (ax-ipa.o: ax.c): Remove.
400 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
401 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
402 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
403 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
404 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
406 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
408 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
409 (print-utils-ipa.o: ../common/print-utils.c): Remove.
410 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
411 (errors-ipa.o: ../common/errors.c): Remove.
412 (format-ipa.o: ../common/format.c): Remove.
413 (common-utils-ipa.o: ../common/common-utils.c): Remove.
415 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
417 * Makefile.in (%-ipa.o: %.c): New rule.
418 (tracepoint-ipa.o: tracepoint.c): Remove.
419 (utils-ipa.o: utils.c): Remove.
420 (remote-utils-ipa.o: remote-utils.c): Remove.
421 (regcache-ipa.o: regcache.c): Remove.
422 (i386-linux-ipa.o: i386-linux.c): Remove.
423 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
424 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
425 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
426 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
427 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
428 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
429 (amd64-linux-ipa.o: amd64-linux.c): Remove.
430 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
431 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
432 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
433 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
434 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
435 (aarch64-ipa.o: aarch64.c): Remove.
436 (s390-linux32-ipa.o: s390-linux32.c): Remove.
437 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
438 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
439 (s390-linux64-ipa.o: s390-linux64.c): Remove.
440 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
441 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
442 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
443 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
444 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
445 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
446 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
447 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
448 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
449 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
450 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
451 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
452 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
453 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
454 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
455 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
456 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
457 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
458 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
459 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
460 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
461 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
462 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
463 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
464 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
465 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
466 (tdesc-ipa.o: tdesc.c): Remove.
467 (x32-linux-ipa.o: x32-linux.c): Remove.
468 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
469 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
471 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
473 * Makefile.in (%.o: ../arch/%.c): New rule.
474 (arm.o: ../arch/arm.c): Remove.
475 (arm-linux.o: ../arch/arm-linux.c): Remove.
476 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
477 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
479 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
481 * Makefile.in (%.o: ../nat/%.c): New rule.
482 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
483 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
484 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
485 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
486 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
487 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
488 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
489 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
490 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
491 (linux-personality.o: ../nat/linux-personality.c): Remove.
492 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
493 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
494 (x86-linux.o: ../nat/x86-linux.c): Remove.
495 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
496 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
498 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
500 * Makefile.in (%.o: ../common/%.c): New rule.
501 (signals.o: ../common/signals.c): Remove.
502 (print-utils.o: ../common/print-utils.c): Remove.
503 (rsp-low.o: ../common/rsp-low.c): Remove.
504 (common-utils.o: ../common/common-utils.c): Remove.
505 (posix-strerror.o: ../common/posix-strerror.c): Remove.
506 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
507 (vec.o: ../common/vec.c): Remove.
508 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
509 (xml-utils.o: ../common/xml-utils.c): Remove.
510 (ptid.o: ../common/ptid.c): Remove.
511 (buffer.o: ../common/buffer.c): Remove.
512 (format.o: ../common/format.c): Remove.
513 (filestuff.o: ../common/filestuff.c): Remove.
514 (agent.o: ../common/agent.c): Remove.
515 (errors.o: ../common/errors.c): Remove.
516 (environ.o: ../common/environ.c): Remove.
517 (common-debug.o: ../common/common-debug.c): Remove.
518 (cleanups.o: ../common/cleanups.c): Remove.
519 (common-exceptions.o: ../common/common-exceptions.c): Remove.
520 (fileio.o: ../common/fileio.c): Remove.
521 (common-regcache.o: ../common/common-regcache.c): Remove.
522 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
523 (new-op.o: ../common/new-op.c): Remove.
524 (btrace-common.o: ../common/btrace-common.c): Remove.
526 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
528 * Makefile.in (%.o: ../target/%.c): New rule.
529 (waitstatus.o: ../target/waitstatus.c): Remove.
531 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
534 (%.c: ../regformats/%.dat,
535 (%.c: ../regformats/arm/%.dat,
536 (%.c: ../regformats/i386/%.dat,
537 (%.c: ../regformats/rs6000/%.dat): New rules.
540 (arm-with-iwmmxt.c): Remove.
541 (arm-with-vfpv2.c): Remove.
542 (arm-with-vfpv3.c): Remove.
543 (arm-with-neon.c): Remove.
544 (reg-bfin.c): Remove.
545 (reg-cris.c): Remove.
546 (reg-crisv32.c): Remove.
548 (i386-linux.c): Remove.
549 (i386-avx.c): Remove.
550 (i386-avx-linux.c): Remove.
551 (i386-avx-avx512.c): Remove.
552 (i386-avx-avx512-linux.c): Remove.
553 (i386-mpx.c): Remove.
554 (i386-mpx-linux.c): Remove.
555 (i386-avx-mpx-avx512-pku.c): Remove.
556 (i386-avx-mpx-avx512-pku-linux.c): Remove.
557 (i386-avx-mpx.c): Remove.
558 (i386-avx-mpx-linux.c): Remove.
559 (i386-mmx.c): Remove.
560 (i386-mmx-linux.c): Remove.
561 (reg-ia64.c): Remove.
562 (reg-m32r.c): Remove.
563 (reg-m68k.c): Remove.
565 (mips-linux.c): Remove.
566 (mips-dsp-linux.c): Remove.
567 (mips64-linux.c): Remove.
568 (mips64-dsp-linux.c): Remove.
569 (nios2-linux.c): Remove.
570 (powerpc-32.c): Remove.
571 (powerpc-32l.c): Remove.
572 (powerpc-altivec32l.c): Remove.
573 (powerpc-cell32l.c): Remove.
574 (powerpc-vsx32l.c): Remove.
575 (powerpc-isa205-32l.c): Remove.
576 (powerpc-isa205-altivec32l.c): Remove.
577 (powerpc-isa205-vsx32l.c): Remove.
578 (powerpc-e500l.c): Remove.
579 (powerpc-64l.c): Remove.
580 (powerpc-altivec64l.c): Remove.
581 (powerpc-cell64l.c): Remove.
582 (powerpc-vsx64l.c): Remove.
583 (powerpc-isa205-64l.c): Remove.
584 (powerpc-isa205-altivec64l.c): Remove.
585 (powerpc-isa205-vsx64l.c): Remove.
586 (s390-linux32.c): Remove.
587 (s390-linux32v1.c): Remove.
588 (s390-linux32v2.c): Remove.
589 (s390-linux64.c): Remove.
590 (s390-linux64v1.c): Remove.
591 (s390-linux64v2.c): Remove.
592 (s390-te-linux64.c): Remove.
593 (s390-vx-linux64.c): Remove.
594 (s390-tevx-linux64.c): Remove.
595 (s390x-linux64.c): Remove.
596 (s390x-linux64v1.c): Remove.
597 (s390x-linux64v2.c): Remove.
598 (s390x-te-linux64.c): Remove.
599 (s390x-vx-linux64.c): Remove.
600 (s390x-tevx-linux64.c): Remove.
601 (tic6x-c64xp-linux.c): Remove.
602 (tic6x-c64x-linux.c): Remove.
603 (tic6x-c62x-linux.c): Remove.
605 (reg-sparc64.c): Remove.
608 (amd64-linux.c): Remove.
609 (amd64-avx.c): Remove.
610 (amd64-avx-linux.c): Remove.
611 (amd64-avx-avx512.c): Remove.
612 (amd64-avx-avx512-linux.c): Remove.
613 (amd64-mpx.c): Remove.
614 (amd64-mpx-linux.c): Remove.
615 (amd64-avx-mpx-avx512-pku.c): Remove.
616 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
617 (amd64-avx-mpx.c): Remove.
618 (amd64-avx-mpx-linux.c): Remove.
620 (x32-linux.c): Remove.
622 (x32-avx-linux.c): Remove.
623 (x32-avx-avx512.c): Remove.
624 (x32-avx-avx512-linux.c): Remove.
625 (reg-xtensa.c): Remove.
626 (reg-tilegx.c): Remove.
627 (reg-tilegx32.c): Remove.
629 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
631 * Makefile.in (SFILES): Add "common/environ.c".
632 (OBJS): Add "common/environ.h".
634 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
636 * configure.ac: Check if the fs_base and gs_base members of
637 `struct user_regs_struct' exist.
638 * config.in: Regenerated.
639 * configure: Likewise.
641 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
643 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
645 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
646 (get_next_pcs_syscall_next_pc): Likewise.
648 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
650 * win32-i386-low.c: Fix incorrect reference to a couple source files.
651 * nto-x86-low.c: Likewise.
653 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
655 * Makefile.in: Include disable-implicit-rules.mk.
657 2016-11-23 Pedro Alves <palves@redhat.com>
659 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
660 (debug_vprintf): Use std::chrono::steady_clock instead of
661 gettimeofday. Use '.' instead of ':'.
662 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
663 (get_timestamp): Use std::chrono::steady_clock instead of
666 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
668 * Makefile.in: Fix whitespace formatting.
670 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
672 * Makefile.in (SFILES, OBS): Flatten list and order
675 2016-11-23 Pedro Alves <palves@redhat.com>
677 * event-loop.c (handle_file_event): Use warning.
678 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
679 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
682 2016-11-23 Pedro Alves <palves@redhat.com>
684 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
686 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
687 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
688 debug_printf and debug_flush for debug output.
689 * server.c (handle_general_set): Likewise.
690 * thread-db.c (try_thread_db_load): Use debug_printf for debug
693 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
695 * Makefile.in (.c.o): Replace rule with ...
696 (%.o: %.c): ... this one.
698 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
700 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
701 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
703 * configure.ac: Remove checks for the make program.
704 * configure: Re-generate.
706 2016-10-28 Pedro Alves <palves@redhat.com>
708 * Makefile.in (CXX_DIALECT): Get from configure.
709 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
710 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
711 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
712 * config.in: Regenerate.
713 * configure: Regenerate.
715 2016-10-27 Yao Qi <yao.qi@linaro.org>
717 * linux-low.c (linux_supports_range_stepping): Return true if
718 can_software_single_step return true.
720 2016-10-27 Yao Qi <yao.qi@linaro.org>
722 * inferiors.c (find_inferior_in_random): New function.
723 * inferiors.h (find_inferior_in_random): Declare.
724 * linux-low.c (linux_wait_for_event_filtered): Call
725 find_inferior_in_random instead of find_inferior.
727 2016-10-27 Yao Qi <yao.qi@linaro.org>
729 * linux-low.c (linux_wait_1): If single-step breakpoints are
730 inserted, remove them.
732 2016-10-26 Pedro Alves <palves@redhat.com>
734 * linux-low.c (handle_extended_wait): Link parent/child fork
736 (linux_wait_1): Unlink them.
737 (linux_set_resume_request): Ignore resume requests for
738 already-resumed and unhandled fork child threads.
739 * linux-low.h (struct lwp_info) <fork_relative>: New field.
740 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
742 (handle_v_requests) <vCont>: Don't call require_running.
743 * server.h (in_queued_stop_replies): New declaration.
745 2016-10-24 Yao Qi <yao.qi@linaro.org>
748 * linux-aarch64-low.c (append_insns): Cast the return value to
751 2016-10-10 Yao Qi <yao.qi@linaro.org>
753 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
755 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
757 * target.c (target_supports_multi_process): New function, moved
759 * target.h (target_supports_multi_process): ... here. Remove
762 2016-10-05 Tom Tromey <tom@tromey.com>
765 * tracepoint.c (handle_tracepoint_bkpts): Check
766 ipa_error_tracepoint, not ipa_stopping_tracepoint.
768 2016-10-05 Yao Qi <yao.qi@linaro.org>
770 * configure.srv: Update the path of arm-*.xml files.
772 2016-10-05 Terry Guo <terry.guo@arm.com>
773 Yao Qi <yao.qi@linaro.org>
775 * Makefile.in: Adjust the path of rules.
776 * configure.srv: Update the path of xml files.
777 * regformats/arm-with-iwmmxt.dat: Regenerated.
778 * regformats/arm-with-neon.dat: Likewise.
779 * regformats/arm-with-vfpv2.dat: Likewise.
780 * regformats/arm-with-vfpv3.dat Likewise.
782 2016-09-30 Yao Qi <yao.qi@linaro.org>
785 * target.c (target_stop_and_wait): Don't call
786 target_continue_no_signal, use resume_stop instead.
788 2016-09-26 Yao Qi <yao.qi@linaro.org>
790 * linux-low.c (linux_wait_1): Call debug_exit.
792 2016-09-23 Pedro Alves <palves@redhat.com>
794 * Makefile.in (SFILES): Add common/new-op.c.
795 (OBS): Add common/new-op.o.
796 (new-op.o): New rule.
798 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
800 * .gitinore: Ignore more files.
802 2016-09-21 Yao Qi <yao.qi@linaro.org>
804 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
807 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
809 * server.c (start_inferior): Call target_mourn_inferior instead of
810 mourn_inferior; pass ptid_t argument to it.
812 (handle_target_event): Likewise.
813 * target.c (target_mourn_inferior): New function.
814 * target.h (mourn_inferior): Delete macro.
816 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
818 * linux-low.c (lwp_is_stepping): New function.
820 2016-09-06 Carl Love <cel@us.ibm.com>
822 * server.c (start_inferior): Fixed comment, requested comment change
823 didn't get updated correctly. Removed reference to ptrace () call as
824 it is only true on Linux systems.
826 2016-09-06 Carl Love <cel@us.ibm.com>
828 * server.c (start_inferior): Do not call
829 function target_post_create_inferior () if the
830 inferior process has already exited.
832 2016-09-05 Pedro Alves <palves@redhat.com>
834 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
835 (COMPILE.pre, CC_LD): Use CXX directly.
836 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
837 * acinclude.m4: Don't include build-with-cxx.m4.
838 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
839 * configure: Regenerate.
841 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
844 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
845 call writing data to own_buf.
847 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
849 * target.c (mywait): Call target_wait instead of
851 (target_wait): New function.
853 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
855 * server.c (start_inferior): New variable 'ptid'. Replace calls
856 to the_target->resume by target_continue{,_no_signal}, depending
858 * target.c (target_stop_and_wait): Call target_continue_no_signal
859 instead of the_target->resume.
860 (target_continue): New function.
862 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
864 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
866 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
869 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
871 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
872 * linux-arm-low.c (ps_get_thread_area): Likewise.
873 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
874 * linux-m68k-low.c (ps_get_thread_area): Likewise.
875 * linux-mips-low.c (ps_get_thread_area): Likewise.
876 * linux-nios2-low.c (ps_get_thread_area): Likewise.
877 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
878 * linux-x86-low.c (ps_get_thread_area): Likewise.
879 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
881 2016-08-19 Pedro Alves <palves@redhat.com>
883 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
885 2016-08-19 Pedro Alves <palves@redhat.com>
887 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
888 comment. Use memcpy instead of casting through unsigned long.
890 2016-08-19 Pedro Alves <palves@redhat.com>
892 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
893 allocating around 0x80000000.
895 2016-08-19 Pedro Alves <palves@redhat.com>
898 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
899 (x32-avx512-linux-ipa.o): New rules.
900 * configure.ac (x86_64-*-linux*): New x32 check.
901 * configure.srv (ipa_x32_linux_regobj): New.
902 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
903 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
905 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
907 * configure: Regenerate.
909 2016-08-09 Pedro Alves <palves@redhat.com>
912 * Makefile.in (OBS): Add signals-state-save-restore.o.
913 (signals-state-save-restore.o): New rule.
914 * config.in: Regenerate.
915 * configure: Regenerate.
916 * linux-low.c: Include "signals-state-save-restore.h".
917 (linux_create_inferior): Call
918 restore_original_signals_state.
919 * server.c: Include "dispositions-save-restore.h".
920 (captured_main): Call save_original_signals_state.
922 2016-08-05 Pedro Alves <palves@redhat.com>
924 * configure: Regenerate.
926 2016-08-04 Yao Qi <yao.qi@linaro.org>
928 * linux-low.c (regsets_fetch_inferior_registers): Check
929 errno is ESRCH or not.
931 2016-08-02 Yao Qi <yao.qi@linaro.org>
933 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
934 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
935 (thread_db_load_search): Update.
936 (try_thread_db_load_1): Don't look for td_ta_event_addr,
937 td_ta_set_event and td_ta_event_getmsg.
939 2016-07-26 Pedro Alves <palves@redhat.com>
942 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
943 of unsigned long for 64-bit registers and use uint32_t instead of
944 unsigned int for 32-bit registers.
946 2016-07-26 Pedro Alves <palves@redhat.com>
948 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
951 2016-07-21 Tom Tromey <tom@tromey.com>
953 * configure: Rebuild.
955 2016-07-21 Yao Qi <yao.qi@linaro.org>
957 * mem-break.c (find_gdb_breakpoint): Cast bp to
958 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
960 2016-07-21 Yao Qi <yao.qi@linaro.org>
962 * server.c (handle_v_requests): Support s and S actions
963 if target_supports_software_single_step return true.
965 2016-07-21 Yao Qi <yao.qi@linaro.org>
967 * linux-low.c (resume_stopped_resumed_lwps): If resume request
968 is resume_step, call maybe_hw_step.
969 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
971 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
973 (proceed_one_lwp): If resume request is resume_step, install
974 reinsert breakpoints and call maybe_hw_step.
976 2016-07-21 Yao Qi <yao.qi@linaro.org>
978 * linux-low.c (proceed_one_lwp): Declare.
979 (linux_resume_one_thread): Remove local variable 'step'.
980 Lift code enqueue signal. Call proceed_one_lwp instead of
981 linux_resume_one_lwp.
983 2016-07-21 Yao Qi <yao.qi@linaro.org>
985 * linux-low.c (linux_resume_one_thread): Call
986 enqueue_pending_signal.
988 2016-07-21 Yao Qi <yao.qi@linaro.org>
990 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
991 * inferiors.c (do_restore_current_thread_cleanup): New function.
992 (make_cleanup_restore_current_thread): Likewise.
993 * linux-low.c (install_software_single_step_breakpoints): Call
994 make_cleanup_restore_current_thread. Switch current_thread to
997 2016-07-21 Yao Qi <yao.qi@linaro.org>
999 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1000 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1001 (clone_one_breakpoint): Likewise.
1002 (delete_reinsert_breakpoints): Change parameter to thread.
1004 (has_reinsert_breakpoints): Likewise.
1005 (uninsert_reinsert_breakpoints): Likewise.
1006 (reinsert_reinsert_breakpoints): Likewise.
1007 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1008 (delete_reinsert_breakpoints): Likewise.
1009 (reinsert_reinsert_breakpoints): Likewise.
1010 (uninsert_reinsert_breakpoints): Likewise.
1011 (has_reinsert_breakpoints): Likewise.
1013 2016-07-21 Yao Qi <yao.qi@linaro.org>
1015 * inferiors.c (get_thread_process): Make parameter const.
1016 * inferiors.h (get_thread_process): Update declaration.
1017 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1018 Add new parameters child_thread and parent_thread. Callers
1020 * mem-break.h (clone_all_breakpoints): Update declaration.
1022 2016-07-21 Yao Qi <yao.qi@linaro.org>
1024 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1025 <command_list, handler>: Remove.
1026 (struct gdb_breakpoint): New.
1027 (struct other_breakpoint): New.
1028 (struct reinsert_breakpoint): New.
1029 (is_gdb_breakpoint): New function.
1030 (any_persistent_commands): Update command_list if
1031 is_gdb_breakpoint returns true.
1032 (set_breakpoint): Create breakpoints according to their types.
1033 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1034 (set_gdb_breakpoint_1): Likewise.
1035 (set_gdb_breakpoint): Likewise.
1036 (clear_breakpoint_conditions): Change parameter type to
1037 'struct gdb_breakpoint *'.
1038 (clear_breakpoint_commands): Likewise.
1039 (clear_breakpoint_conditions_and_commands): Likewise.
1040 (add_condition_to_breakpoint): Likewise.
1041 (add_breakpoint_condition): Likewise.
1042 (add_commands_to_breakpoint): Likewise.
1043 (check_breakpoints): Check other_breakpoint.
1044 (clone_one_breakpoint): Clone breakpopint according to its type.
1045 * mem-break.h (struct gdb_breakpoint): Declare.
1046 (set_gdb_breakpoint): Update declaration.
1047 (clear_breakpoint_conditions_and_commands): Likewise.
1048 (add_breakpoint_condition): Likewise.
1049 (add_breakpoint_commands): Likewise.
1050 * server.c (process_point_options): Change parameter type to
1051 'struct gdb_breakpoint *'.
1053 2016-07-21 Yao Qi <yao.qi@linaro.org>
1055 * mem-break.c (set_breakpoint_at): Rename it to ...
1056 (set_breakpoint_type_at): ... it.
1057 (set_breakpoint_at): Call set_breakpoint_type_at.
1058 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1059 * mem-break.h (set_breakpoint_at): Update comments.
1061 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1063 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1065 (nios2_store_gregset): Likewise.
1067 2016-07-01 Pedro Alves <palves@redhat.com>
1068 Antoine Tremblay <antoine.tremblay@ericsson.com>
1070 * linux-low.c: Change interface to take the target lwp_info
1071 pointer directly and return void. Handle detaching from a zombie
1073 (linux_detach_lwp_callback): New function.
1074 (linux_detach): Detach from the leader thread after detaching from
1077 2016-06-28 Yao Qi <yao.qi@linaro.org>
1079 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1080 for variable new_offset.
1081 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1082 (aarch64_ftrace_insn_reloc_cb): Likewise.
1083 (aarch64_ftrace_insn_reloc_tb): Likewise.
1084 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1085 PRIx64 instead of PRIx32.
1087 2016-06-28 Yao Qi <yao.qi@linaro.org>
1089 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1090 (the_low_target): Install arm_get_syscall_trapinfo.
1092 2016-06-28 Yao Qi <yao.qi@linaro.org>
1094 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1096 (the_low_target): Install aarch64_get_syscall_trapinfo.
1098 2016-06-28 Yao Qi <yao.qi@linaro.org>
1100 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1102 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1103 Remove parameter sysno.
1104 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1107 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1109 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1110 (s390_emit_ne_goto): Likewise.
1111 (s390_emit_lt_goto): Likewise.
1112 (s390_emit_le_goto): Likewise.
1113 (s390_emit_gt_goto): Likewise.
1114 (s390_emit_ge_goto): Likewise.
1115 (s390x_emit_eq_goto): Likewise.
1116 (s390x_emit_ne_goto): Likewise.
1117 (s390x_emit_lt_goto): Likewise.
1118 (s390x_emit_le_goto): Likewise.
1119 (s390x_emit_gt_goto): Likewise.
1120 (s390x_emit_ge_goto): Likewise.
1121 (s390_emit_ops_impl): Mark variable static.
1122 (s390x_emit_ops): Likewise.
1124 2016-06-17 Yao Qi <yao.qi@linaro.org>
1126 * linux-low.c (handle_extended_wait): Call
1127 uninsert_reinsert_breakpoints for the parent process. Remove
1128 reinsert breakpoints from the child process. Reinsert them to
1129 the parent process when vfork is done.
1130 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1131 (reinsert_reinsert_breakpoints): New function.
1132 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1133 (reinsert_reinsert_breakpoints): Declare.
1135 2016-06-17 Yao Qi <yao.qi@linaro.org>
1137 * linux-low.c (handle_extended_wait): If the parent is doing
1138 step-over, remove the reinsert breakpoints from the forked child.
1140 2016-06-17 Yao Qi <yao.qi@linaro.org>
1142 * linux-low.c (unsuspend_all_lwps): Declare.
1143 (linux_low_filter_event): If thread exited, call finish_step_over.
1144 If step-over is finished, unsuspend other threads.
1146 2016-06-17 Yao Qi <yao.qi@linaro.org>
1148 * linux-low.c (linux_resume_one_lwp_throw): Assert
1149 has_reinsert_breakpoints returns false.
1150 * mem-break.c (delete_disabled_breakpoints): Assert
1151 bp type isn't reinsert_breakpoint.
1153 2016-06-17 Yao Qi <yao.qi@linaro.org>
1155 * linux-low.c (maybe_hw_step): New function.
1156 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1157 (finish_step_over): Switch current_thread to lwp temporarily,
1158 and assert has_reinsert_breakpoints returns true.
1159 (proceed_one_lwp): Call maybe_hw_step.
1160 * mem-break.c (has_reinsert_breakpoints): New function.
1161 * mem-break.h (has_reinsert_breakpoints): Declare.
1163 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1165 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1167 2016-05-17 Yao Qi <yao.qi@linaro.org>
1169 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1170 instead of find_inferior.
1172 2016-05-05 Yao Qi <yao.qi@linaro.org>
1174 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1175 Initialize res to zero.
1177 2016-05-05 Yao Qi <yao.qi@linaro.org>
1179 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1182 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1184 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1185 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1186 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1188 2016-04-28 Par Olsson <par.olsson@windriver.com>
1189 Simon Marchi <simon.marchi@ericsson.com>
1191 * tracepoint.c (write_inferior_int8): New function.
1192 (cmd_qtenable_disable): Write enable flag using
1193 write_inferior_int8.
1195 2016-04-25 Yao Qi <yao.qi@linaro.org>
1197 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1198 (need_step_over_p): Return zero if the LWP has pending signals
1199 can be delivered on software single step target.
1201 2016-04-25 Yao Qi <yao.qi@linaro.org>
1203 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1204 return instead of error.
1206 2016-04-22 Yao Qi <yao.qi@linaro.org>
1208 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1211 2016-04-22 Yao Qi <yao.qi@linaro.org>
1213 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1214 signal when stepping over breakpoint with software single
1217 2016-04-21 Pedro Alves <palves@redhat.com>
1219 * linux-s390-low.c (s390_collect_ptrace_register)
1220 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1222 (s390_check_regset): Use void * instead of gdb_byte *.
1224 2016-04-20 Pedro Alves <palves@redhat.com>
1226 * configure: Renegerate.
1228 2016-04-20 Yao Qi <yao.qi@linaro.org>
1230 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1231 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1233 (arm_store_gregset): Likewise.
1235 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1237 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1238 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1239 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1240 (amd64-avx-mpx-linux.c): New rules.
1241 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1242 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1243 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1244 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1245 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1246 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1247 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1248 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1249 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1250 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1251 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1252 * linux-x86-low.c (x86_linux_read_description): Add case for
1253 X86_XSTATE_AVX_MPX_MASK.
1254 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1255 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1256 init_registers_i386_avx_mpx_linux.
1257 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1258 (initialize_low_tracepoint): Call
1259 init_registers_i386_avx_mpx_linux.
1260 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1261 (initialize_low_tracepoint): Call
1262 init_registers_amd64_avx_mpx_linux.
1263 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1264 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1265 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1268 2016-04-18 Pedro Alves <palves@redhat.com>
1270 * configure: Regenerate.
1272 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1274 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1275 (aarch64_emit_sub): Likewise.
1277 2016-04-12 Pedro Alves <palves@redhat.com>
1279 * utils.c (prepare_to_throw_exception): Delete.
1281 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1283 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1285 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1287 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1289 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1291 * linux-aarch64-ipa.c: Add <elf.h> include.
1292 * linux-ppc-ipa.c: Add <elf.h> include.
1293 * linux-s390-ipa.c: Add <elf.h> include.
1295 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1297 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1298 (get_raw_reg_ptr): Likewise.
1299 (get_trace_state_variable_value_ptr): Likewise.
1300 (set_trace_state_variable_value_ptr): Likewise.
1301 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1304 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1305 Marcin Kościelnicki <koriakin@0x04.net>
1308 * linux-ppc-low.c (emit_insns): New function.
1309 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1310 (ppc_emit_prologue): New function.
1311 (ppc_emit_epilogue): New function.
1312 (ppc_emit_add): New function.
1313 (ppc_emit_sub): New function.
1314 (ppc_emit_mul): New function.
1315 (ppc_emit_lsh): New function.
1316 (ppc_emit_rsh_signed): New function.
1317 (ppc_emit_rsh_unsigned): New function.
1318 (ppc_emit_ext): New function.
1319 (ppc_emit_zero_ext): New function.
1320 (ppc_emit_log_not): New function.
1321 (ppc_emit_bit_and): New function.
1322 (ppc_emit_bit_or): New function.
1323 (ppc_emit_bit_xor): New function.
1324 (ppc_emit_bit_not): New function.
1325 (ppc_emit_equal): New function.
1326 (ppc_emit_less_signed): New function.
1327 (ppc_emit_less_unsigned): New function.
1328 (ppc_emit_ref): New function.
1329 (ppc_emit_const): New function.
1330 (ppc_emit_reg): New function.
1331 (ppc_emit_pop): New function.
1332 (ppc_emit_stack_flush): New function.
1333 (ppc_emit_swap): New function.
1334 (ppc_emit_stack_adjust): New function.
1335 (ppc_emit_call): New function.
1336 (ppc_emit_int_call_1): New function.
1337 (ppc_emit_void_call_2): New function.
1338 (ppc_emit_if_goto): New function.
1339 (ppc_emit_goto): New function.
1340 (ppc_emit_eq_goto): New function.
1341 (ppc_emit_ne_goto): New function.
1342 (ppc_emit_lt_goto): New function.
1343 (ppc_emit_le_goto): New function.
1344 (ppc_emit_gt_goto): New function.
1345 (ppc_emit_ge_goto): New function.
1346 (ppc_write_goto_address): New function.
1347 (ppc_emit_ops_impl): New static variable.
1348 (ppc64v1_emit_prologue): New function.
1349 (ppc64v2_emit_prologue): New function.
1350 (ppc64_emit_epilogue): New function.
1351 (ppc64_emit_add): New function.
1352 (ppc64_emit_sub): New function.
1353 (ppc64_emit_mul): New function.
1354 (ppc64_emit_lsh): New function.
1355 (ppc64_emit_rsh_signed): New function.
1356 (ppc64_emit_rsh_unsigned): New function.
1357 (ppc64_emit_ext): New function.
1358 (ppc64_emit_zero_ext): New function.
1359 (ppc64_emit_log_not): New function.
1360 (ppc64_emit_bit_and): New function.
1361 (ppc64_emit_bit_or): New function.
1362 (ppc64_emit_bit_xor): New function.
1363 (ppc64_emit_bit_not): New function.
1364 (ppc64_emit_equal): New function.
1365 (ppc64_emit_less_signed): New function.
1366 (ppc64_emit_less_unsigned): New function.
1367 (ppc64_emit_ref): New function.
1368 (ppc64_emit_const): New function.
1369 (ppc64v1_emit_reg): New function.
1370 (ppc64v2_emit_reg): New function.
1371 (ppc64_emit_pop): New function.
1372 (ppc64_emit_stack_flush): New function.
1373 (ppc64_emit_swap): New function.
1374 (ppc64v1_emit_call): New function.
1375 (ppc64v2_emit_call): New function.
1376 (ppc64v1_emit_int_call_1): New function.
1377 (ppc64v2_emit_int_call_1): New function.
1378 (ppc64v1_emit_void_call_2): New function.
1379 (ppc64v2_emit_void_call_2): New function.
1380 (ppc64_emit_if_goto): New function.
1381 (ppc64_emit_eq_goto): New function.
1382 (ppc64_emit_ne_goto): New function.
1383 (ppc64_emit_lt_goto): New function.
1384 (ppc64_emit_le_goto): New function.
1385 (ppc64_emit_gt_goto): New function.
1386 (ppc64_emit_ge_goto): New function.
1387 (ppc64v1_emit_ops_impl): New static variable.
1388 (ppc64v2_emit_ops_impl): New static variable.
1389 (ppc_emit_ops): New function.
1390 (linux_low_target): Wire in ppc_emit_ops.
1392 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1393 Marcin Kościelnicki <koriakin@0x04.net>
1396 * Makefile.in: Add powerpc-*-ipa.o
1397 * configure.srv: Add ipa_obj for powerpc*-linux.
1398 * linux-ppc-ipa.c: New file.
1399 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1401 (PPC_FIELD): New macro.
1402 (PPC_SEXT): New macro.
1403 (PPC_OP6): New macro.
1404 (PPC_BO): New macro.
1405 (PPC_LI): New macro.
1406 (PPC_BD): New macro.
1407 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1408 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1409 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1410 (ppc_get_thread_area): New function.
1411 (is_elfv2_inferior): New function.
1412 (gen_ds_form): New function.
1413 (GEN_STD): New macro.
1414 (GEN_STDU): New macro.
1415 (GEN_LD): New macro.
1416 (GEN_LDU): New macro.
1417 (gen_d_form): New function.
1418 (GEN_ADDI): New macro.
1419 (GEN_ADDIS): New macro.
1420 (GEN_LI): New macro.
1421 (GEN_LIS): New macro.
1422 (GEN_ORI): New macro.
1423 (GEN_ORIS): New macro.
1424 (GEN_LWZ): New macro.
1425 (GEN_STW): New macro.
1426 (GEN_STWU): New macro.
1427 (gen_xfx_form): New function.
1428 (GEN_MFSPR): New macro.
1429 (GEN_MTSPR): New macro.
1430 (GEN_MFCR): New macro.
1431 (GEN_MTCR): New macro.
1432 (GEN_SYNC): New macro.
1433 (GEN_LWSYNC): New macro.
1434 (gen_x_form): New function.
1435 (GEN_OR): New macro.
1436 (GEN_MR): New macro.
1437 (GEN_LWARX): New macro.
1438 (GEN_STWCX): New macro.
1439 (GEN_CMPW): New macro.
1440 (gen_md_form): New function.
1441 (GEN_RLDICL): New macro.
1442 (GEN_RLDICR): New macro.
1443 (gen_i_form): New function.
1445 (GEN_BL): New macro.
1446 (gen_b_form): New function.
1447 (GEN_BNE): New macro.
1448 (GEN_LOAD): New macro.
1449 (GEN_STORE): New macro.
1450 (gen_limm): New function.
1451 (gen_atomic_xchg): New function.
1452 (gen_call): New function.
1453 (ppc_relocate_instruction): New function.
1454 (ppc_install_fast_tracepoint_jump_pad): New function.
1455 (ppc_get_min_fast_tracepoint_insn_len): New function.
1456 (ppc_get_ipa_tdesc_idx): New function.
1457 (the_low_target): Wire in the new functions.
1458 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1460 * linux-ppc-tdesc.h: New file.
1462 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1464 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1465 (alloc_jump_pad_buffer): New function.
1466 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1467 (alloc_jump_pad_buffer): New function.
1468 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1469 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1470 (alloc_jump_pad_buffer): New function.
1471 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1472 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1473 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1474 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1476 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1478 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1479 * linux-amd64-ipa.c: Likewise.
1480 * linux-i386-ipa.c: Likewise.
1481 * linux-s390-ipa.c: Likewise.
1482 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1483 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1484 set_trace_state_variable_value_ptr.
1485 (struct ipa_sym_addresses): Likewise.
1486 (symbol_list): Likewise.
1487 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1488 accessing gdb_collect directly.
1489 (gdb_collect_ptr_type): New typedef.
1490 (get_raw_reg_ptr_type): New typedef.
1491 (get_trace_state_variable_value_ptr_type): New typedef.
1492 (set_trace_state_variable_value_ptr_type): New typedef.
1493 (gdb_collect_ptr): New global.
1494 (get_raw_reg_ptr): New global.
1495 (get_trace_state_variable_value_ptr): New global.
1496 (set_trace_state_variable_value_ptr): New global.
1497 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1498 accessing get_raw_reg directly.
1499 (get_get_tsv_func_addr): Likewise for
1500 get_trace_state_variable_value_ptr.
1501 (get_set_tsv_func_addr): Likewise for
1502 set_trace_state_variable_value_ptr.
1503 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1505 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1507 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1509 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1511 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1513 (relocate_instruction): Remove own_buf.
1514 * server.c (own_buf): Make global.
1515 (handle_v_requests): Make global.
1516 * server.h (own_buf): New declaration.
1517 (handle_v_requests): New prototype.
1519 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1522 * linux-s390-low.c (add_insns): New function.
1523 (s390_emit_prologue): New function.
1524 (s390_emit_epilogue): New function.
1525 (s390_emit_add): New function.
1526 (s390_emit_sub): New function.
1527 (s390_emit_mul): New function.
1528 (s390_emit_lsh): New function.
1529 (s390_emit_rsh_signed): New function.
1530 (s390_emit_rsh_unsigned): New function.
1531 (s390_emit_ext): New function.
1532 (s390_emit_log_not): New function.
1533 (s390_emit_bit_and): New function.
1534 (s390_emit_bit_or): New function.
1535 (s390_emit_bit_xor): New function.
1536 (s390_emit_bit_not): New function.
1537 (s390_emit_equal): New function.
1538 (s390_emit_less_signed): New function.
1539 (s390_emit_less_unsigned): New function.
1540 (s390_emit_ref): New function.
1541 (s390_emit_if_goto): New function.
1542 (s390_emit_goto): New function.
1543 (s390_write_goto_address): New function.
1544 (s390_emit_litpool): New function.
1545 (s390_emit_const): New function.
1546 (s390_emit_call): New function.
1547 (s390_emit_reg): New function.
1548 (s390_emit_pop): New function.
1549 (s390_emit_stack_flush): New function.
1550 (s390_emit_zero_ext): New function.
1551 (s390_emit_swap): New function.
1552 (s390_emit_stack_adjust): New function.
1553 (s390_emit_set_r2): New function.
1554 (s390_emit_int_call_1): New function.
1555 (s390_emit_void_call_2): New function.
1556 (s390_emit_eq_goto): New function.
1557 (s390_emit_ne_goto): New function.
1558 (s390_emit_lt_goto): New function.
1559 (s390_emit_le_goto): New function.
1560 (s390_emit_gt_goto): New function.
1561 (s390_emit_ge_goto): New function.
1562 (s390x_emit_prologue): New function.
1563 (s390x_emit_epilogue): New function.
1564 (s390x_emit_add): New function.
1565 (s390x_emit_sub): New function.
1566 (s390x_emit_mul): New function.
1567 (s390x_emit_lsh): New function.
1568 (s390x_emit_rsh_signed): New function.
1569 (s390x_emit_rsh_unsigned): New function.
1570 (s390x_emit_ext): New function.
1571 (s390x_emit_log_not): New function.
1572 (s390x_emit_bit_and): New function.
1573 (s390x_emit_bit_or): New function.
1574 (s390x_emit_bit_xor): New function.
1575 (s390x_emit_bit_not): New function.
1576 (s390x_emit_equal): New function.
1577 (s390x_emit_less_signed): New function.
1578 (s390x_emit_less_unsigned): New function.
1579 (s390x_emit_ref): New function.
1580 (s390x_emit_if_goto): New function.
1581 (s390x_emit_const): New function.
1582 (s390x_emit_call): New function.
1583 (s390x_emit_reg): New function.
1584 (s390x_emit_pop): New function.
1585 (s390x_emit_stack_flush): New function.
1586 (s390x_emit_zero_ext): New function.
1587 (s390x_emit_swap): New function.
1588 (s390x_emit_stack_adjust): New function.
1589 (s390x_emit_int_call_1): New function.
1590 (s390x_emit_void_call_2): New function.
1591 (s390x_emit_eq_goto): New function.
1592 (s390x_emit_ne_goto): New function.
1593 (s390x_emit_lt_goto): New function.
1594 (s390x_emit_le_goto): New function.
1595 (s390x_emit_gt_goto): New function.
1596 (s390x_emit_ge_goto): New function.
1597 (s390_emit_ops): New function.
1598 (struct linux_target_ops): Fill in emit_ops hook.
1600 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1603 * Makefile.in: Add s390 IPA files.
1604 * configure.srv: Build IPA for s390.
1605 * linux-s390-ipa.c: New file.
1606 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1607 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1608 (tdesc_s390_linux32): Likewise.
1609 (init_registers_s390_linux32v1): Likewise.
1610 (tdesc_s390_linux32v1): Likewise.
1611 (init_registers_s390_linux32v2): Likewise.
1612 (tdesc_s390_linux32v2): Likewise.
1613 (init_registers_s390_linux64): Likewise.
1614 (tdesc_s390_linux64): Likewise.
1615 (init_registers_s390_linux64v1): Likewise.
1616 (tdesc_s390_linux64v1): Likewise.
1617 (init_registers_s390_linux64v2): Likewise.
1618 (tdesc_s390_linux64v2): Likewise.
1619 (init_registers_s390_te_linux64): Likewise.
1620 (tdesc_s390_te_linux64): Likewise.
1621 (init_registers_s390_vx_linux64): Likewise.
1622 (tdesc_s390_vx_linux64): Likewise.
1623 (init_registers_s390_tevx_linux64): Likewise.
1624 (tdesc_s390_tevx_linux64): Likewise.
1625 (init_registers_s390x_linux64): Likewise.
1626 (tdesc_s390x_linux64): Likewise.
1627 (init_registers_s390x_linux64v1): Likewise.
1628 (tdesc_s390x_linux64v1): Likewise.
1629 (init_registers_s390x_linux64v2): Likewise.
1630 (tdesc_s390x_linux64v2): Likewise.
1631 (init_registers_s390x_te_linux64): Likewise.
1632 (tdesc_s390x_te_linux64): Likewise.
1633 (init_registers_s390x_vx_linux64): Likewise.
1634 (tdesc_s390x_vx_linux64): Likewise.
1635 (init_registers_s390x_tevx_linux64): Likewise.
1636 (tdesc_s390x_tevx_linux64): Likewise.
1637 (have_hwcap_s390_vx): New static variable.
1638 (s390_arch_setup): Fill have_hwcap_s390_vx.
1639 (s390_get_thread_area): New function.
1640 (s390_ft_entry_gpr_esa): New const.
1641 (s390_ft_entry_gpr_zarch): New const.
1642 (s390_ft_entry_misc): New const.
1643 (s390_ft_entry_fr): New const.
1644 (s390_ft_entry_vr): New const.
1645 (s390_ft_main_31): New const.
1646 (s390_ft_main_64): New const.
1647 (s390_ft_exit_fr): New const.
1648 (s390_ft_exit_vr): New const.
1649 (s390_ft_exit_misc): New const.
1650 (s390_ft_exit_gpr_esa): New const.
1651 (s390_ft_exit_gpr_zarch): New const.
1652 (append_insns): New function.
1653 (s390_relocate_instruction): New function.
1654 (s390_install_fast_tracepoint_jump_pad): New function.
1655 (s390_get_min_fast_tracepoint_insn_len): New function.
1656 (s390_get_ipa_tdesc_idx): New function.
1657 (struct linux_target_ops): Wire in the above functions.
1658 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1659 * linux-s390-tdesc.h: New file.
1661 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1663 * linux-s390-low.c (s390_supports_tracepoints): New function.
1664 (struct linux_target_ops): Fill supports_tracepoints hook.
1666 2016-03-18 Yao Qi <yao.qi@linaro.org>
1668 * linux-low.c (lwp_signal_can_be_delivered): New function.
1669 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1671 2016-03-18 Yao Qi <yao.qi@linaro.org>
1673 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1674 0 if signal is enqueued. Remove 'signal' from one debugging
1675 message. Move one debugging message to some lines below.
1676 Remove code setting 'signal' to 0.
1678 2016-03-18 Yao Qi <yao.qi@linaro.org>
1680 * linux-low.c (linux_low_filter_event): Remove redundant
1681 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1683 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1685 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1686 (struct linux_target_ops): Wire in the above.
1688 2016-03-03 Yao Qi <yao.qi@linaro.org>
1690 * linux-low.c: Update comments to start_step_over.
1692 2016-03-03 Yao Qi <yao.qi@linaro.org>
1695 * linux-low.c (handle_extended_wait): Set child suspended
1696 if event_lwp->bp_reinsert isn't zero.
1698 2016-03-02 Yao Qi <yao.qi@linaro.org>
1700 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1701 enqueue_pending_signal.
1703 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1705 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1708 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1710 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1711 (s390_regmap_3264) [!__s390x__]: New global.
1712 (s390_collect_ptrace_register): Skip map entries containing -1.
1713 (s390_supply_ptrace_register): Ditto.
1714 (s390_fill_gprs_high): New function.
1715 (s390_store_gprs_high): New function.
1716 (s390_regsets): Add NT_S390_HIGH_GPRS.
1717 (s390_get_hwcap): Enable on 31-bit.
1718 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1719 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1720 Detect NT_S390_HIGH_GPRS.
1721 (s390_usrregs_info_3264): Enable on 31-bit.
1722 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1723 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1725 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1728 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1729 * configure.srv: Ditto.
1730 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1731 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1732 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1733 (init_registers_amd64_linux): Remove prototype.
1734 (tdesc_amd64_linux): Remove declaration.
1735 (get_ipa_tdesc): New function.
1736 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1737 initialize remaining tdescs.
1738 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1739 (init_registers_i386_linux): Remove prototype.
1740 (tdesc_i386_linux): Remove declaration.
1741 (get_ipa_tdesc): New function.
1742 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1743 initialize remaining tdescs.
1744 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1745 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1746 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1747 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1748 (x86_get_ipa_tdesc_idx): New function.
1749 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1750 * linux-x86-tdesc.h: New file.
1751 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1752 (target_get_ipa_tdesc_idx): New macro.
1753 * tracepoint.c (ipa_tdesc_idx): New macro.
1754 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1755 (symbol_list): Add ipa_tdesc_idx.
1756 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1757 (ipa_tdesc): Remove.
1758 (ipa_tdesc_idx): New variable.
1759 (get_context_regcache): Use get_ipa_tdesc.
1760 (gdb_collect): Ditto.
1762 * tracepoint.h (get_ipa_tdesc): New prototype.
1763 (ipa_tdesc): Remove.
1765 2016-02-24 Pedro Alves <palves@redhat.com>
1767 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1768 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1769 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1770 Factor out common code between the USE_SIGTRAP_SIGINFO and
1771 !USE_SIGTRAP_SIGINFO blocks.
1772 (linux_low_filter_event): Call save_stop_reason instead of
1773 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1775 (linux_wait_1): Update comments.
1777 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1779 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1780 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1781 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1782 ppc_insert_point, ppc_remove_point.
1784 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1786 * linux-s390-low.c (s390_supports_z_point_type): New function.
1787 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1789 2016-02-16 Yao Qi <yao.qi@linaro.org>
1791 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1792 PC. Get pc from regcache_read_pc.
1794 2016-02-12 Yao Qi <yao.qi@linaro.org>
1796 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1797 or linux_get_pc_32bit.
1798 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1800 2016-02-12 Yao Qi <yao.qi@linaro.org>
1802 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1803 arm_linux_get_next_pcs_fixup.
1805 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1807 * tracepoint.c (x_tracepoint_action_download): Change
1808 write_inferior_data_ptr to write_inferior_data_pointer.
1809 (cmd_qtstart): Likewise.
1810 (write_inferior_data_ptr): Remove.
1811 (download_agent_expr): Change write_inferior_data_ptr to
1812 write_inferior_data_pointer.
1813 (download_tracepoint_1): Likewise.
1814 (download_tracepoint): Likewise.
1815 (download_trace_state_variables): Likewise.
1817 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1818 Marcin Kościelnicki <koriakin@0x04.net>
1820 * tracepoint.c (struct tracepoint_action_ops): Remove.
1821 (struct tracepoint_action): Remove ops.
1822 (m_tracepoint_action_download, r_tracepoint_action_download)
1823 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1824 size and offset accordingly.
1825 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1826 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1827 (tracepoint_action_send, tracepoint_action_download): New functions.
1828 Helpers for trace action handlers.
1829 (add_tracepoint_action): Remove setup actions ops.
1830 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1832 2016-02-10 Yao Qi <yao.qi@linaro.org>
1834 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1836 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1838 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1840 * configure: Regenerate.
1842 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1844 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1845 void * to gdb_byte *.
1846 * linux-low.c (siginfo_fixup): Likewise.
1847 (linux_xfer_siginfo): Likewise.
1848 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1850 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1852 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1854 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1856 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1858 * linux-x86-low.c [__x86_64__]: Include
1859 "nat/amd64-linux-siginfo.h".
1860 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1861 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1862 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1863 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1864 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1865 (cpt_si_fd, si_timerid, si_overrun): Move from
1866 nat/amd64-linux-siginfo.c.
1867 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1869 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1871 * server.c (skip_to_semicolon): Remove.
1872 (process_point_options): Use strchrnul instead of
1875 2016-01-26 Yao Qi <yao.qi@linaro.org>
1877 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1878 * linux-low.c (install_software_single_step_breakpoints): Don't
1879 call regcache_read_pc.
1880 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1883 2016-01-26 Yao Qi <yao.qi@linaro.org>
1885 * linux-low.c (install_software_single_step_breakpoints): Call
1886 regcache_read_pc instead of get_pc.
1888 2016-01-26 Yao Qi <yao.qi@linaro.org>
1890 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1891 (unblock_async_io): Rename to ...
1892 (block_unblock_async_io): ... it. New function.
1893 (enable_async_io): Don't install SIGIO handler. Unblock it
1895 (disable_async_io): Don't ignore SIGIO. Block it instead.
1896 (initialize_async_io): Install SIGIO handler. Don't call
1899 2016-01-26 Yao Qi <yao.qi@linaro.org>
1901 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1902 first character is '\003', call *the_target->request_interrupt.
1904 2016-01-25 Yao Qi <yao.qi@linaro.org>
1906 * remote-utils.c (new_thread_notify): Remove.
1907 (dead_thread_notify): Likewise.
1908 * remote-utils.h (new_thread_notify): Remove declaration.
1909 (dead_thread_notify): Likewise.
1911 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1913 * gdb.trace/pending.exp: Fix expected message on continue.
1915 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1917 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1918 it works properly on big-endian machines where sizeof (CORE_ADDR)
1921 2016-01-21 Pedro Alves <palves@redhat.com>
1923 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1924 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1925 * configure: Regenerate.
1927 2016-01-21 Yao Qi <yao.qi@linaro.org>
1929 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1930 is_thumb and set it according to CPSR saved on the stack.
1931 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1932 arm_sigreturn_next_pc.
1934 2016-01-18 Yao Qi <yao.qi@linaro.org>
1936 * linux-low.c (linux_set_pc_64bit): New function.
1937 (linux_get_pc_64bit): New function.
1938 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1940 * linux-sparc-low.c (debug_threads): Remove declaration.
1941 (sparc_get_pc): Remove.
1942 (the_low_target): Use linux_get_pc_64bit instead of
1944 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1945 (the_low_target): Use linux_get_pc_64bit and
1948 2016-01-18 Yao Qi <yao.qi@linaro.org>
1950 * linux-arm-low.c (debug_threads): Remove declaration.
1951 (arm_get_pc, arm_set_pc): Remove.
1952 (the_low_target): Use linux_get_pc_32bit and
1954 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1955 (the_low_target): Use linux_get_pc_32bit and
1957 * linux-cris-low.c (debug_threads): Remove declaration.
1958 (cris_get_pc, cris_set_pc,): Remove.
1959 (the_low_target): Use linux_get_pc_32bit and
1961 * linux-crisv32-low.c (debug_threads): Remove declaration.
1962 (cris_get_pc, cris_set_pc): Remove.
1963 (the_low_target): Use linux_get_pc_32bit and
1965 * linux-low.c: Include inttypes.h.
1966 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1967 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1968 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1969 (the_low_target): Use linux_get_pc_32bit and
1971 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1972 (the_low_target): Use linux_get_pc_32bit and
1974 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1975 (the_low_target): Use linux_get_pc_32bit and
1977 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1978 (the_low_target): Use linux_get_pc_32bit and
1980 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1981 (the_low_target): Use linux_get_pc_32bit and
1984 2016-01-18 Gary Benson <gbenson@redhat.com>
1986 * configure.ac (AC_FUNC_FORK): New check.
1987 * config.in: Regenerate.
1988 * configure: Likewise.
1990 2016-01-14 Yao Qi <yao.qi@linaro.org>
1992 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1993 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1994 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1995 arm_get_next_pcs_ctor.
1997 2016-01-12 Josh Stone <jistone@redhat.com>
1998 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2000 * inferiors.h: Include "gdb_vecs.h".
2001 (struct process_info): Add syscalls_to_catch.
2002 * inferiors.c (remove_process): Free syscalls_to_catch.
2003 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2004 syscall_return stops.
2005 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2006 * server.c (handle_general_set): Handle QCatchSyscalls.
2007 (handle_query): Report support for QCatchSyscalls.
2008 * target.h (struct target_ops): Add supports_catch_syscall.
2009 (target_supports_catch_syscall): New macro.
2010 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2011 (struct lwp_info): Add syscall_state.
2012 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2013 Maintain syscall_state and syscalls_to_catch across exec.
2014 (get_syscall_trapinfo): New function, proxy to the_low_target.
2015 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2016 (linux_low_filter_event): Toggle syscall_state entry/return for
2017 syscall traps, and set it ignored for all others.
2018 (gdb_catching_syscalls_p): New function.
2019 (gdb_catch_this_syscall_p): New function.
2020 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2021 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2022 (linux_supports_catch_syscall): New function.
2023 (linux_target_ops): Install it.
2024 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2025 (the_low_target): Install it.
2027 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2029 * acinclude.m4: Include new ../warning.m4 file.
2030 * configure: Regenerated.
2031 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2033 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2035 * ax.c (is_goto_target): Mark static.
2036 * linux-low.c (register_addr): Likewise.
2037 (linux_fetch_registers, linux_store_registers): Likewise.
2038 * mem-break.c (any_persistent_commands): Fix old prototype.
2039 (add_commands_to_breakpoint): Mark static.
2040 * regcache.c (find_register_by_name): Delete unused func.
2041 * remote-utils.c (hex_or_minus_one): Mark static.
2042 * server.c (monitor_show_help): Mark static.
2043 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2044 handle_v_requests): Likewise.
2046 2016-01-12 Pedro Alves <palves@redhat.com>
2048 Remove use of the registered trademark symbol throughout.
2050 2016-01-08 Yao Qi <yao.qi@linaro.org>
2052 * remote-utils.c (getpkt): If c is '\003', call target hook
2055 2016-01-06 Yao Qi <yao.qi@linaro.org>
2057 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2058 linux-aarch32-low.c.
2059 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2060 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2061 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2062 (thumb2_breakpoint): Declare.
2063 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2064 linux-aarch32-low.h.
2065 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2066 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2067 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2069 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2071 * gdbreplay.c (gdbreplay_version): Change copyright year in
2073 * server.c (gdbserver_version): Likewise.
2075 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2077 * server.c (crc32_table): Delete.
2078 (crc32): Use libiberty's xcrc32 function.
2080 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2082 * lynx-low.c (lynx_delete_thread_callback): New function.
2083 (lynx_mourn): Properly delete our process and all of its
2084 threads. Remove call to clear_inferiors.
2086 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2088 * target.c (thread_search_callback): Add check that
2089 the thread_stopped target callback is not NULL before
2092 2015-12-21 Yao Qi <yao.qi@linaro.org>
2094 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2097 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2099 * server.c (handle_query): Call target_supports_software_single_step.
2101 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2103 * linux-low.c (single_step): New function.
2104 (linux_resume_one_lwp_throw): Call single_step.
2105 (start_step_over): Likewise.
2107 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2109 * Makefile.in (SFILES): Append arch/arm-linux.c,
2110 arch/arm-get-next-pcs.c.
2111 (arm-linux.o): New rule.
2112 (arm-get-next-pcs.o): New rule.
2113 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2115 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2116 to linux-aarch32-low.c.
2117 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2118 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2119 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2120 (thumb2_breakpoint_len): Likewise.
2121 (arm_is_thumb_mode): Make non-static.
2122 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2123 from linux-aarch32-low.c.
2124 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2125 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2126 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2127 (thumb2_breakpoint_len): Likewise.
2128 (arm_is_thumb_mode): New declaration.
2129 * linux-arm-low.c: Include arch/arm-linux.h
2130 aarch/arm-get-next-pcs.h, sys/syscall.h.
2131 (get_next_pcs_ops): New struct.
2132 (get_next_pcs_addr_bits_remove): New function.
2133 (get_next_pcs_is_thumb): New function.
2134 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2135 (arm_sigreturn_next_pc): Likewise.
2136 (get_next_pcs_syscall_next_pc): Likewise.
2137 (arm_gdbserver_get_next_pcs): Likewise.
2138 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2140 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2141 * server.h: Include gdb_vecs.h.
2143 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2145 * Makefile.in (SFILES): Append common/common-regcache.c.
2146 (OBS): Append common-regcache.o.
2147 (common-regcache.o): New rule.
2148 * regcache.c (init_register_cache): Initialize cache to
2150 (regcache_raw_read_unsigned): New function.
2151 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2152 register_status enum.
2154 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2156 * linux-aarch64-low.c (the_low_targets): Rename
2157 breakpoint_reinsert_addr to get_next_pcs.
2158 * linux-arm-low.c (the_low_targets): Likewise.
2159 * linux-bfin-low.c (the_low_targets): Likewise.
2160 * linux-cris-low.c (the_low_targets): Likewise.
2161 * linux-crisv32-low.c (the_low_targets): Likewise.
2162 * linux-low.c (can_software_single_step): Likewise.
2163 (install_software_single_step_breakpoints): New function.
2164 (start_step_over): Use install_software_single_step_breakpoints.
2165 * linux-low.h: New CORE_ADDR vector.
2166 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2168 * linux-mips-low.c (the_low_targets): Likewise.
2169 * linux-nios2-low.c (the_low_targets): Likewise.
2170 * linux-sparc-low.c (the_low_targets): Likewise.
2172 2015-12-17 Pedro Alves <palves@redhat.com>
2174 * linux-low.c (linux_kill_one_lwp): Remove references to
2176 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2178 (linux_init_signals): Delete.
2179 (initialize_low): Adjust.
2180 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2182 2015-12-16 Pedro Alves <palves@redhat.com>
2184 * configure.ac (compiler warning flags): When testing a
2185 -Wno-foo option, check whether -Wfoo works instead.
2186 * configure: Regenerate.
2188 2015-12-11 Don Breazeal <donb@codesourcery.com>
2190 * server.c (process_serial_event): Don't exit from gdbserver
2191 in remote mode if there are still active inferiors.
2193 2015-12-11 Yao Qi <yao.qi@linaro.org>
2195 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2196 arm_breakpoint_at if the process is 32-bit.
2198 2015-12-11 Yao Qi <yao.qi@linaro.org>
2200 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2203 2015-12-07 Yao Qi <yao.qi@linaro.org>
2205 * configure.srv: Append arm.o to srv_tgtobj for
2206 aarch64*-*-linux* target.
2207 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2208 from linux-arm-low.c.
2209 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2210 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2211 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2212 (thumb2_breakpoint_len): Likewise.
2213 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2214 (arm_breakpoint_kinds): Likewise.
2215 (arm_breakpoint_kind_from_pc): Likewise.
2216 (arm_sw_breakpoint_from_kind): Likewise.
2217 (arm_breakpoint_kind_from_current_state): Likewise.
2218 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2219 (arm_sw_breakpoint_from_kind): Declare.
2220 (arm_breakpoint_kind_from_current_state): Declare.
2221 (arm_breakpoint_at): Declare.
2222 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2223 arm_sw_breakpoint_from_kind if process is 32-bit.
2224 (aarch64_breakpoint_kind_from_pc): New function.
2225 (aarch64_breakpoint_kind_from_current_state): New function.
2226 (the_low_target): Initialize fields breakpoint_kind_from_pc
2227 and breakpoint_kind_from_current_state.
2228 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2229 linux-aarch32-low.c.
2230 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2231 (arm_breakpoint, arm_breakpoint_len): Likewise.
2232 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2233 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2234 (arm_is_thumb_mode): Likewise.
2235 (arm_breakpoint_at): Likewise.
2236 (arm_breakpoint_kind_from_pc): Likewise.
2237 (arm_sw_breakpoint_from_kind): Likewise.
2238 (arm_breakpoint_kind_from_current_state): Likewise.
2241 2015-08-04 Yao Qi <yao.qi@linaro.org>
2243 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2244 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2245 * server.c (extended_protocol): Remove "static".
2246 * server.h (extended_protocol): Declare it.
2248 2015-12-04 Josh Stone <jistone@redhat.com>
2250 * target.h (struct target_ops) <arch_setup>: Rename to ...
2251 (struct target_ops) <post_create_inferior>: ... this.
2252 (target_arch_setup): Rename to ...
2253 (target_post_create_inferior): ... this, calling post_create_inferior.
2254 * server.c (start_inferior): Update target_arch_setup calls to
2255 target_post_create_inferior.
2256 * linux-low.c (linux_low_ptrace_options): Forward declare.
2257 (linux_arch_setup): Update its comment for general use.
2258 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2259 (struct linux_target_ops): Use linux_post_create_inferior.
2260 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2261 to post_create_inferior.
2262 * nto-low.c (struct nto_target_ops): Likewise.
2263 * spu-low.c (struct spu_target_ops): Likewise.
2264 * win32-low.c (struct win32_target_ops): Likewise.
2266 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2268 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2270 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2272 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2273 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2274 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2275 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2276 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2277 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2278 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2279 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2280 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2281 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2282 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2283 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2285 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2287 * linux-low.c (linux_look_up_symbols): Don't call
2288 linux_supports_traceclone.
2289 * linux-low.h (thread_db_init): Remove use_events argument.
2290 * thread-db.c (thread_db_use_event): Remove global variable.
2291 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2292 (struct thread_db) <td_create_bp>: Remove field.
2293 (thread_db_create_event): Remove function.
2294 (thread_db_enable_reporting): Likewise.
2295 (find_one_thread): Don't check for thread_db_use_events.
2296 (attach_thread): Likewise.
2297 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2298 (try_thread_db_load_1): Don't check for thread_db_use_events.
2299 (thread_db_init): Remove use_events argument and thread events
2301 (remove_thread_event_breakpoints): Remove function.
2302 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2304 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2306 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2308 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2309 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2310 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2311 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2312 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2314 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2316 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2317 * linux-low.c (can_hardware_single_step): Use
2318 supports_hardware_single_step.
2319 (can_software_single_step): New function.
2320 (start_step_over): Call can_software_single_step.
2321 (linux_supports_hardware_single_step): New function.
2322 (struct target_ops) <supports_software_single_step>: Initialize.
2323 * linux-low.h (struct linux_target_ops)
2324 <supports_hardware_single_step>: Initialize.
2325 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2326 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2327 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2328 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2329 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2330 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2331 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2332 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2333 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2334 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2336 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2337 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2339 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2340 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2341 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2343 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2344 * target.h (struct target_ops): <supports_software_single_step>:
2346 (target_supports_software_single_step): New macro.
2348 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2350 * linux-low.c (linux_wait_1): Fix pc advance condition.
2351 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2352 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2354 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2356 * linux-arm-low.c (arm_is_thumb_mode): New function.
2357 (arm_breakpoint_at): Use arm_is_thumb_mode.
2358 (arm_breakpoint_kind_from_current_state): New function.
2359 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2361 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2362 (linux_breakpoint_kind_from_current_state): New function.
2363 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2364 * linux-low.h (struct linux_target_ops)
2365 <breakpoint_kind_from_current_state>: New field.
2366 * target.h (struct target_ops): Likewise.
2367 (target_breakpoint_kind_from_current_state): New macro.
2369 2015-11-30 Pedro Alves <palves@redhat.com>
2371 * linux-low.c (linux_resume): Wake up the event loop before
2374 2015-11-30 Pedro Alves <palves@redhat.com>
2376 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2378 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2380 * target.c (struct thread_search): New structure.
2381 (thread_search_callback): New function.
2382 (prev_general_thread): New global.
2383 (prepare_to_access_memory, done_accessing_memory): New functions.
2384 * target.h (prepare_to_access_memory, done_accessing_memory):
2385 Replace macros with function declarations.
2387 2015-11-30 Pedro Alves <palves@redhat.com>
2390 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2391 report TARGET_WAITKIND_NO_RESUMED.
2392 * remote-utils.c (prepare_resume_reply): Handle
2393 TARGET_WAITKIND_NO_RESUMED.
2394 * server.c (report_no_resumed): New global.
2395 (handle_query) <qSupported>: Handle "no-resumed+". Report
2396 "no-resumed+" support.
2397 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2398 return error if the client doesn't support no-resumed events.
2399 (push_stop_notification): New function.
2400 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2401 events if the client supports them.
2403 2015-11-30 Pedro Alves <palves@redhat.com>
2405 * linux-low.c (thread_still_has_status_pending_p): Don't check
2407 (lwp_resumed): New function.
2408 (status_pending_p_callback): Return early if the LWP is not
2409 supposed to be resumed.
2411 2015-11-30 Pedro Alves <palves@redhat.com>
2413 * linux-low.c (handle_extended_wait): Assert that the LWP's
2414 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2415 thread create events, leave the new child's status pending.
2416 (linux_low_filter_event): If GDB wants to hear about thread exit
2417 events, leave the LWP marked dead and don't delete it.
2418 (linux_wait_for_event_filtered): Don't check for thread exit.
2419 (filter_exit_event): New function.
2420 (linux_wait_1): Use it, when returning an exit event.
2421 (linux_resume_one_lwp_throw): Assert that the LWP's
2422 waitstatus is TARGET_WAITKIND_IGNORE.
2423 * remote-utils.c (prepare_resume_reply): Handle
2424 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2425 * server.c (report_thread_events): New global.
2426 (handle_general_set): Handle QThreadEvents.
2427 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2428 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2429 TARGET_WAITKIND_THREAD_EXITED.
2430 * server.h (report_thread_events): Declare.
2432 2015-11-30 Pedro Alves <palves@redhat.com>
2434 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2435 the thread's last_resume_kind was resume_stop.
2437 2015-11-30 Pedro Alves <palves@redhat.com>
2439 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2442 2015-11-30 Pedro Alves <palves@redhat.com>
2444 * server.c (handle_v_requests): Handle vCtrlC.
2446 2015-11-30 Pedro Alves <palves@redhat.com>
2448 * gdbthread.h (find_any_thread_of_pid): Declare.
2449 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2451 * server.c (handle_query): If current_thread is NULL, look for
2452 another thread of the selected process.
2454 2015-11-26 Daniel Colascione <dancol@dancol.org>
2455 Simon Marchi <simon.marchi@ericsson.com>
2457 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2458 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2460 * target.h (struct target_ops) <thread_name>: New field.
2461 (target_thread_name): New macro.
2463 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2465 * regcache.h (regcache_invalidate_pid): Add declaration.
2466 * regcache.c (regcache_invalidate_pid): New function, extracted
2467 from regcache_invalidate.
2468 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2469 Add trivial documentation comment.
2470 * lynx-low.c: Use regcache_invalidate_pid instead of
2471 regcache_invalidate.
2473 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2475 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2476 and Elf64_auxv_t if the target is Android.
2478 2015-11-22 Doug Evans <xdje42@gmail.com>
2480 * target.h: #include <sys/types.h>.
2482 2015-11-19 Pedro Alves <palves@redhat.com>
2484 * linux-low.c (linux_process_qsupported): Change prototype.
2486 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2488 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2489 and adjust to loop over all features.
2490 * server.c (handle_query) <qSupported>: Adjust to call
2491 target_process_qsupported once, passing it a vector of unprocessed
2493 * target.h (struct target_ops) <process_qsupported>: Change
2495 (target_process_qsupported): Adjust.
2497 2015-11-19 Pedro Alves <palves@redhat.com>
2499 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2501 * configure: Regenerate.
2503 2015-11-19 Pedro Alves <palves@redhat.com>
2505 * configure: Regenerate.
2507 2015-11-19 Yao Qi <yao.qi@linaro.org>
2509 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2512 2015-11-19 Yao Qi <yao.qi@linaro.org>
2514 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2515 (struct aarch64_operand): Move enum out.
2517 2015-11-19 Yao Qi <yao.qi@linaro.org>
2519 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2520 struct user_fpsimd_state *.
2521 (aarch64_store_fpregset): Likewise.
2523 2015-11-19 Yao Qi <yao.qi@linaro.org>
2525 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2526 struct user_pt_regs *.
2527 (aarch64_store_gregset): Likewise.
2529 2015-11-18 Pedro Alves <palves@redhat.com>
2531 * Makefile.in (all_object_files): Add $IPA_OBJS.
2533 2015-11-17 Pedro Alves <palves@redhat.com>
2535 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2536 GDB_SIGNAL_0 and gdb_signal_to_string.
2538 2015-11-17 Pedro Alves <palves@redhat.com>
2540 * win32-low.c (handle_output_debug_string): Remove parameter.
2541 (win32_kill): Remove our_status local and adjust call to
2542 handle_output_debug_string.
2543 (get_child_debug_event): Adjust call to
2544 handle_output_debug_string.
2546 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2548 * linux-mips-low.c (mips_fill_gregset): Add cast.
2549 (mips_store_gregset): Likewise.
2550 (mips_fill_fpregset): Likewise.
2551 (mips_store_fpregset): Likewise.
2553 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2555 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2558 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2560 * linux-mips-low.c (mips_linux_new_thread): Change type of
2561 watch_type to enum target_hw_bp_type.
2563 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2565 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2566 Change return type to arm_hwbp_type.
2568 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2570 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2571 (arm_store_gregset): Likewise.
2572 * linux-arm-low.c (arm_get_hwcap): Likewise.
2573 (arm_read_description): Likewise.
2575 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2577 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2579 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2581 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2582 (ppc_fill_vsxregset): Likewise.
2583 (ppc_store_vsxregset): Likewise.
2584 (ppc_fill_vrregset): Likewise.
2585 (ppc_store_vrregset): Likewise.
2586 (ppc_fill_evrregset): Likewise.
2587 (ppc_store_evrregset): Likewise.
2589 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2591 * linux-ppc-low.c (ppc_usrregs_info): Remove
2592 forward-declaration.
2593 (ppc_arch_setup): Move lower in file.
2595 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2597 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2598 (ps_pdwrite): Likewise.
2600 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2602 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2603 to after assert checks.
2605 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2607 * proc-service.c (ps_pdread): Add/adjust casts.
2608 (ps_pdwrite): Add/adjust casts.
2610 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2612 * server.c (handle_search_memory_1): Cast return value of
2615 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2617 * server.c (write_qxfer_response): Change type of data to
2620 2015-10-29 Pedro Alves <palves@redhat.com>
2622 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2624 2015-10-29 Pedro Alves <palves@redhat.com>
2626 * tracepoint.c (clear_installed_tracepoints): Add casts.
2628 2015-10-29 Pedro Alves <palves@redhat.com>
2630 * server.c (handle_v_cont, process_serial_event): Add enum
2631 gdb_signal casts to signal parsing code.
2633 2015-10-29 Pedro Alves <palves@redhat.com>
2635 * linux-low.h (NULL_REGSET): Define.
2636 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2637 * linux-arm-low.c (arm_regsets): Likewise.
2638 * linux-crisv32-low.c (cris_regsets): Likewise.
2639 * linux-m68k-low.c (m68k_regsets): Likewise.
2640 * linux-mips-low.c (mips_regsets): Likewise.
2641 * linux-nios2-low.c (nios2_regsets): Likewise.
2642 * linux-ppc-low.c (ppc_regsets): Likewise.
2643 * linux-s390-low.c (s390_regsets): Likewise.
2644 * linux-sh-low.c (sh_regsets): Likewise.
2645 * linux-sparc-low.c (sparc_regsets): Likewise.
2646 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2647 * linux-tile-low.c (tile_regsets): Likewise.
2648 * linux-x86-low.c (x86_regsets): Likewise.
2649 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2651 2015-10-29 Pedro Alves <palves@redhat.com>
2653 * linux-low.h (NULL_REGSET): Define.
2654 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2655 * linux-arm-low.c (arm_regsets): Likewise.
2656 * linux-crisv32-low.c (cris_regsets): Likewise.
2657 * linux-m68k-low.c (m68k_regsets): Likewise.
2658 * linux-mips-low.c (mips_regsets): Likewise.
2659 * linux-nios2-low.c (nios2_regsets): Likewise.
2660 * linux-ppc-low.c (ppc_regsets): Likewise.
2661 * linux-s390-low.c (s390_regsets): Likewise.
2662 * linux-sh-low.c (sh_regsets): Likewise.
2663 * linux-sparc-low.c (sparc_regsets): Likewise.
2664 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2665 * linux-tile-low.c (tile_regsets): Likewise.
2666 * linux-x86-low.c (x86_regsets): Likewise.
2667 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2669 2015-10-26 Doug Evans <dje@google.com>
2671 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2673 2015-10-26 Doug Evans <dje@google.com>
2675 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2677 2015-10-26 Doug Evans <dje@google.com>
2679 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2681 (attach_thread, find_new_threads_callback): Ditto.
2683 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2685 * mem-break.h (set_breakpoint_data): Remove.
2687 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2689 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2690 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2691 (initialize_low): Remove set_breakpoint_data call.
2692 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2693 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2694 (initialize_low): Remove set_breakpoint_data call.
2695 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2696 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2697 (initialize_low): Remove set_breakpoint_data call.
2699 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2701 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2702 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2703 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2704 * target.h (target_breakpoint_kind_from_pc): New macro.
2706 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2708 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2709 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2710 the default breakpoint kind.
2712 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2714 * linux-arm-low.c (arm_supports_z_point_type): Add software
2717 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2719 * linux-arm-low.c: Refactor breakpoint definitions.
2720 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2721 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2723 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2725 * Makefile.in: Add arm.c/o.
2726 * configure.srv: Likewise.
2727 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2728 (arm_breakpoint_kind_from_pc): New function.
2729 (arm_sw_breakpoint_from_kind): Return proper kind.
2730 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2732 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2734 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2736 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2737 (struct raw_breakpoint) <size>: Remove.
2738 (struct raw_breakpoint) <kind>: Add.
2739 (bp_size): New function.
2740 (bp_opcode): Likewise.
2741 (find_raw_breakpoint_at): Adjust for kind.
2742 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2743 (remove_memory_breakpoint): Adjust for kind call bp_size.
2744 (set_raw_breakpoint_at): Adjust for kind.
2745 (set_breakpoint): Likewise.
2746 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2747 (delete_raw_breakpoint): Adjust for kind.
2748 (delete_breakpoint): Likewise.
2749 (find_gdb_breakpoint): Likewise.
2750 (set_gdb_breakpoint_1): Likewise.
2751 (set_gdb_breakpoint): Likewise.
2752 (delete_gdb_breakpoint_1): Likewise.
2753 (delete_gdb_breakpoint): Likewise.
2754 (uninsert_raw_breakpoint): Likewise.
2755 (reinsert_raw_breakpoint): Likewise.
2756 (set_breakpoint_data): Remove.
2757 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2758 (check_mem_read): Adjust for kind call bp_size.
2759 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2760 (clone_one_breakpoint): Adjust for kind.
2761 * mem-break.h (set_gdb_breakpoint): Likewise.
2762 (delete_gdb_breakpoint): Likewise.
2763 * server.c (process_serial_event): Likewise.
2765 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2767 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2768 (struct linux_target_ops) <breakpoint>: Remove.
2769 (struct linux_target_ops) <breakpoint_len>: Remove.
2770 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2771 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2772 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2773 (arm_sw_breakpoint_from_kind): New function.
2774 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2775 (struct linux_target_ops) <breakpoint>: Remove.
2776 (struct linux_target_ops) <breakpoint_len>: Remove.
2777 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2778 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2779 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2780 (struct linux_target_ops) <breakpoint>: Remove.
2781 (struct linux_target_ops) <breakpoint_len>: Remove.
2782 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2783 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2784 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2785 (struct linux_target_ops) <breakpoint>: Remove.
2786 (struct linux_target_ops) <breakpoint_len>: Remove.
2787 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2788 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2789 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2790 and sw_breakpoint_from_kind to increment the pc.
2791 (linux_breakpoint_kind_from_pc): New function.
2792 (linux_sw_breakpoint_from_kind): New function.
2793 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2794 (initialize_low): Call breakpoint_kind_from_pc and
2795 sw_breakpoint_from_kind to replace breakpoint_data/len.
2796 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2798 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2799 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2800 (struct linux_target_ops) <breakpoint>: Remove.
2801 (struct linux_target_ops) <breakpoint_len>: Remove.
2802 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2803 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2804 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2805 (struct linux_target_ops) <breakpoint>: Remove.
2806 (struct linux_target_ops) <breakpoint_len>: Remove.
2807 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2808 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2809 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2810 (struct linux_target_ops) <breakpoint>: Remove.
2811 (struct linux_target_ops) <breakpoint_len>: Remove.
2812 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2813 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2814 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2815 (struct linux_target_ops) <breakpoint>: Remove.
2816 (struct linux_target_ops) <breakpoint_len>: Remove.
2817 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2818 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2819 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2820 (struct linux_target_ops) <breakpoint>: Remove.
2821 (struct linux_target_ops) <breakpoint_len>: Remove.
2822 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2823 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2824 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2825 (struct linux_target_ops) <breakpoint>: Remove.
2826 (struct linux_target_ops) <breakpoint_len>: Remove.
2827 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2828 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2829 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2830 (struct linux_target_ops) <breakpoint>: Remove.
2831 (struct linux_target_ops) <breakpoint_len>: Remove.
2832 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2833 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2834 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2835 (struct linux_target_ops) <breakpoint>: Remove.
2836 (struct linux_target_ops) <breakpoint_len>: Remove.
2837 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2838 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2839 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2840 (struct linux_target_ops) <breakpoint>: Remove.
2841 (struct linux_target_ops) <breakpoint_len>: Remove.
2842 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2843 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2844 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2845 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2846 (struct linux_target_ops) <breakpoint>: Remove.
2847 (struct linux_target_ops) <breakpoint_len>: Remove.
2848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2850 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2851 (struct linux_target_ops) <breakpoint>: Remove.
2852 (struct linux_target_ops) <breakpoint_len>: Remove.
2853 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2856 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2858 * linux-cris-low.c (cris_get_pc): Remove void arg.
2860 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2862 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2865 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2867 * inferiors.c (thread_pid_matches_callback): New function.
2868 (find_thread_process): New function.
2869 (remove_thread): Reset current_thread.
2870 (remove_process): Assert threads have been removed first.
2872 2015-10-15 Yao Qi <yao.qi@linaro.org>
2874 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2876 (aarch64_remove_point): Likewise.
2877 * regcache.c (regcache_register_size): New function.
2879 2015-10-12 Yao Qi <yao.qi@linaro.org>
2881 * linux-aarch64-low.c: Update all callers as emit_load_store
2882 is renamed to aarch64_emit_load_store.
2884 2015-10-12 Yao Qi <yao.qi@linaro.org>
2886 * linux-aarch64-low.c: Update all callers of function renaming
2887 from emit_insn to aarch64_emit_insn.
2889 2015-10-12 Yao Qi <yao.qi@linaro.org>
2891 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2892 arch/aarch64-insn.h.
2893 (struct aarch64_memory_operand): Likewise.
2895 (emit_insn): Move to arch/aarch64-insn.c.
2896 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2897 (emit_load_store): Move to arch/aarch64-insn.c.
2898 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2899 (can_encode_int32): Remove.
2901 2015-10-12 Yao Qi <yao.qi@linaro.org>
2903 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2904 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2905 (aarch64_relocate_instruction): Likewise.
2906 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2907 (struct aarch64_insn_visitor): Likewise.
2909 2015-10-12 Yao Qi <yao.qi@linaro.org>
2911 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2912 (struct aarch64_insn_visitor): New.
2913 (struct aarch64_insn_relocation_data): New.
2914 (aarch64_ftrace_insn_reloc_b): New function.
2915 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2916 (aarch64_ftrace_insn_reloc_cb): Likewise.
2917 (aarch64_ftrace_insn_reloc_tb): Likewise.
2918 (aarch64_ftrace_insn_reloc_adr): Likewise.
2919 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2920 (aarch64_ftrace_insn_reloc_others): Likewise.
2922 (aarch64_relocate_instruction): Use visitor.
2924 2015-10-12 Yao Qi <yao.qi@linaro.org>
2926 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2927 int. Add argument buf.
2928 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2929 aarch64_relocate_instruction.
2931 2015-10-12 Yao Qi <yao.qi@linaro.org>
2933 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2934 argument insn. Remove local variable insn. Don't call
2936 (aarch64_install_fast_tracepoint_jump_pad): Call
2939 2015-09-30 Yao Qi <yao.qi@linaro.org>
2941 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2942 (emit_load_store_pair): Likewise.
2944 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2946 * dll.c (match_dll): Add cast(s).
2947 (unloaded_dll): Likewise.
2948 * linux-low.c (second_thread_of_pid_p): Likewise.
2949 (delete_lwp_callback): Likewise.
2950 (count_events_callback): Likewise.
2951 (select_event_lwp_callback): Likewise.
2952 (linux_set_resume_request): Likewise.
2953 * server.c (accumulate_file_name_length): Likewise.
2954 (emit_dll_description): Likewise.
2955 (handle_qxfer_threads_worker): Likewise.
2956 (visit_actioned_threads): Likewise.
2957 * thread-db.c (any_thread_of): Likewise.
2958 * tracepoint.c (same_process_p): Likewise.
2959 (match_blocktype): Likewise.
2960 (build_traceframe_info_xml): Likewise.
2962 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2964 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2966 (gdb_unparse_agent_expr): Likewise.
2967 * hostio.c (require_data): Likewise.
2968 (handle_pread): Likewise.
2969 * linux-low.c (disable_regset): Likewise.
2970 (fetch_register): Likewise.
2971 (store_register): Likewise.
2972 (get_dynamic): Likewise.
2973 (linux_qxfer_libraries_svr4): Likewise.
2974 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2975 (set_fast_tracepoint_jump): Likewise.
2976 (uninsert_fast_tracepoint_jumps_at): Likewise.
2977 (reinsert_fast_tracepoint_jumps_at): Likewise.
2978 (validate_inserted_breakpoint): Likewise.
2979 (clone_agent_expr): Likewise.
2980 * regcache.c (init_register_cache): Likewise.
2981 * remote-utils.c (putpkt_binary_1): Likewise.
2982 (decode_M_packet): Likewise.
2983 (decode_X_packet): Likewise.
2984 (look_up_one_symbol): Likewise.
2985 (relocate_instruction): Likewise.
2986 (monitor_output): Likewise.
2987 * server.c (handle_search_memory): Likewise.
2988 (handle_qxfer_exec_file): Likewise.
2989 (handle_qxfer_libraries): Likewise.
2990 (handle_qxfer): Likewise.
2991 (handle_query): Likewise.
2992 (handle_v_cont): Likewise.
2993 (handle_v_run): Likewise.
2994 (captured_main): Likewise.
2995 * target.c (write_inferior_memory): Likewise.
2996 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2997 * tracepoint.c (init_trace_buffer): Likewise.
2998 (add_tracepoint_action): Likewise.
2999 (add_traceframe): Likewise.
3000 (add_traceframe_block): Likewise.
3001 (cmd_qtdpsrc): Likewise.
3002 (cmd_qtdv): Likewise.
3003 (cmd_qtstatus): Likewise.
3004 (response_source): Likewise.
3005 (response_tsv): Likewise.
3006 (cmd_qtnotes): Likewise.
3007 (gdb_collect): Likewise.
3008 (initialize_tracepoint): Likewise.
3010 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3012 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3013 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3014 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3016 (enum aarch64_condition_codes): New enum.
3017 (w0): New static global.
3020 (struct aarch64_memory_operand) <type>: New
3021 MEMORY_OPERAND_POSTINDEX type.
3022 (postindex_memory_operand): New helper function.
3023 (emit_ret): New function.
3024 (emit_load_store_pair): New function, factored out of emit_stp
3025 with support for MEMORY_OPERAND_POSTINDEX.
3026 (emit_stp): Rewrite using emit_load_store_pair.
3027 (emit_ldp): New function.
3028 (emit_load_store): Likewise.
3029 (emit_ldr): Mention post-index instruction in comment.
3030 (emit_ldrh): New function.
3031 (emit_ldrb): New function.
3032 (emit_ldrsw): Mention post-index instruction in comment.
3033 (emit_str): Likewise.
3034 (emit_subs): New function.
3035 (emit_cmp): Likewise.
3036 (emit_and): Likewise.
3037 (emit_orr): Likewise.
3038 (emit_orn): Likewise.
3039 (emit_eor): Likewise.
3040 (emit_mvn): Likewise.
3041 (emit_lslv): Likewise.
3042 (emit_lsrv): Likewise.
3043 (emit_asrv): Likewise.
3044 (emit_mul): Likewise.
3045 (emit_sbfm): Likewise.
3046 (emit_sbfx): Likewise.
3047 (emit_ubfm): Likewise.
3048 (emit_ubfx): Likewise.
3049 (emit_csinc): Likewise.
3050 (emit_cset): Likewise.
3051 (emit_nop): Likewise.
3052 (emit_ops_insns): New helper function.
3053 (emit_pop): Likewise.
3054 (emit_push): Likewise.
3055 (aarch64_emit_prologue): New function.
3056 (aarch64_emit_epilogue): Likewise.
3057 (aarch64_emit_add): Likewise.
3058 (aarch64_emit_sub): Likewise.
3059 (aarch64_emit_mul): Likewise.
3060 (aarch64_emit_lsh): Likewise.
3061 (aarch64_emit_rsh_signed): Likewise.
3062 (aarch64_emit_rsh_unsigned): Likewise.
3063 (aarch64_emit_ext): Likewise.
3064 (aarch64_emit_log_not): Likewise.
3065 (aarch64_emit_bit_and): Likewise.
3066 (aarch64_emit_bit_or): Likewise.
3067 (aarch64_emit_bit_xor): Likewise.
3068 (aarch64_emit_bit_not): Likewise.
3069 (aarch64_emit_equal): Likewise.
3070 (aarch64_emit_less_signed): Likewise.
3071 (aarch64_emit_less_unsigned): Likewise.
3072 (aarch64_emit_ref): Likewise.
3073 (aarch64_emit_if_goto): Likewise.
3074 (aarch64_emit_goto): Likewise.
3075 (aarch64_write_goto_address): Likewise.
3076 (aarch64_emit_const): Likewise.
3077 (aarch64_emit_call): Likewise.
3078 (aarch64_emit_reg): Likewise.
3079 (aarch64_emit_pop): Likewise.
3080 (aarch64_emit_stack_flush): Likewise.
3081 (aarch64_emit_zero_ext): Likewise.
3082 (aarch64_emit_swap): Likewise.
3083 (aarch64_emit_stack_adjust): Likewise.
3084 (aarch64_emit_int_call_1): Likewise.
3085 (aarch64_emit_void_call_2): Likewise.
3086 (aarch64_emit_eq_goto): Likewise.
3087 (aarch64_emit_ne_goto): Likewise.
3088 (aarch64_emit_lt_goto): Likewise.
3089 (aarch64_emit_le_goto): Likewise.
3090 (aarch64_emit_gt_goto): Likewise.
3091 (aarch64_emit_ge_got): Likewise.
3092 (aarch64_emit_ops_impl): New static global variable.
3093 (aarch64_emit_ops): New target function, return
3094 &aarch64_emit_ops_impl.
3095 (struct linux_target_ops): Install it.
3097 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3099 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3100 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3102 * linux-aarch64-ipa.c: New file.
3103 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3105 (aarch64_get_thread_area): New target method.
3106 (extract_signed_bitfield): New helper function.
3107 (aarch64_decode_ldr_literal): New function.
3108 (enum aarch64_opcodes): New enum.
3109 (struct aarch64_register): New struct.
3110 (struct aarch64_operand): New struct.
3111 (x0): New static global.
3120 (aarch64_register): New helper function.
3121 (register_operand): Likewise.
3122 (immediate_operand): Likewise.
3123 (struct aarch64_memory_operand): New struct.
3124 (offset_memory_operand): New helper function.
3125 (preindex_memory_operand): Likewise.
3126 (enum aarch64_system_control_registers): New enum.
3127 (ENCODE): New macro.
3128 (emit_insn): New helper function.
3129 (emit_b): New function.
3130 (emit_bcond): Likewise.
3131 (emit_cb): Likewise.
3132 (emit_tb): Likewise.
3133 (emit_blr): Likewise.
3134 (emit_stp): Likewise.
3135 (emit_ldp_q_offset): Likewise.
3136 (emit_stp_q_offset): Likewise.
3137 (emit_load_store): Likewise.
3138 (emit_ldr): Likewise.
3139 (emit_ldrsw): Likewise.
3140 (emit_str): Likewise.
3141 (emit_ldaxr): Likewise.
3142 (emit_stxr): Likewise.
3143 (emit_stlr): Likewise.
3144 (emit_data_processing_reg): Likewise.
3145 (emit_data_processing): Likewise.
3146 (emit_add): Likewise.
3147 (emit_sub): Likewise.
3148 (emit_mov): Likewise.
3149 (emit_movk): Likewise.
3150 (emit_mov_addr): Likewise.
3151 (emit_mrs): Likewise.
3152 (emit_msr): Likewise.
3153 (emit_sevl): Likewise.
3154 (emit_wfe): Likewise.
3155 (append_insns): Likewise.
3156 (can_encode_int32_in): New helper function.
3157 (aarch64_relocate_instruction): New function.
3158 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3159 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3160 (struct linux_target_ops): Install aarch64_get_thread_area,
3161 aarch64_install_fast_tracepoint_jump_pad and
3162 aarch64_get_min_fast_tracepoint_insn_len.
3164 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3166 * Makefile.in (aarch64-insn.o): New rule.
3167 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3169 2015-09-21 Yao Qi <yao.qi@linaro.org>
3171 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3173 2015-09-21 Yao Qi <yao.qi@linaro.org>
3175 * tracepoint.c (max_jump_pad_size): Remove.
3177 2015-09-18 Yao Qi <yao.qi@linaro.org>
3179 * linux-aarch64-low.c: Don't include sys/uio.h.
3180 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3182 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3184 * tracepoint.c (eval_result_type): Change prototype.
3185 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3187 2015-09-15 Pedro Alves <palves@redhat.com>
3189 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3190 Check whether to report exec events instead of checking whether
3191 multiprocess is enabled.
3193 2015-09-15 Pedro Alves <palves@redhat.com>
3196 * remote-utils.c (prepare_resume_reply): Merge
3197 TARGET_WAITKIND_VFORK_DONE switch case with the
3198 TARGET_WAITKIND_FORKED case.
3200 2015-09-15 Yao Qi <yao.qi@linaro.org>
3202 * server.c (handle_query): Check string comparison using
3203 "else if" instead of "if".
3205 2015-09-15 Yao Qi <yao.qi@linaro.org>
3207 * server.c (vCont_supported): New global variable.
3208 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3209 matches. Append ";vContSupported+" to own_buf.
3210 (handle_v_requests): Append ";s;S" to own_buf if target supports
3211 hardware single step or vCont_supported is false.
3212 (capture_main): Set vCont_supported to zero.
3214 2015-09-15 Yao Qi <yao.qi@linaro.org>
3216 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3218 (linux_supports_hardware_single_step): ... New function.
3219 (linux_target_ops): Update.
3220 * lynx-low.c (lynx_target_ops): Set field
3221 supports_hardware_single_step to target_can_do_hardware_single_step.
3222 * nto-low.c (nto_target_ops): Likewise.
3223 * spu-low.c (spu_target_ops): Likewise.
3224 * win32-low.c (win32_target_ops): Likewise.
3225 * target.c (target_can_do_hardware_single_step): New function.
3226 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3227 Remove. <supports_hardware_single_step>: New field.
3228 (target_supports_conditional_breakpoints): Remove.
3229 (target_supports_hardware_single_step): New macro.
3230 (target_can_do_hardware_single_step): Declare.
3231 * server.c (handle_query): Use target_supports_hardware_single_step
3232 instead of target_supports_conditional_breakpoints.
3234 2015-09-15 Yao Qi <yao.qi@linaro.org>
3236 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3238 (struct linux_target_ops the_low_target): Install
3239 aarch64_linux_siginfo_fixup.
3241 2015-09-11 Don Breazeal <donb@codesourcery.com>
3242 Luis Machado <lgustavo@codesourcery.com>
3244 * linux-low.c (linux_mourn): Static declaration.
3245 (linux_arch_setup): Move in front of
3246 handle_extended_wait.
3247 (linux_arch_setup_thread): New function.
3248 (handle_extended_wait): Handle exec events. Call
3249 linux_arch_setup_thread. Make event_lwp argument a
3250 pointer-to-a-pointer.
3251 (check_zombie_leaders): Do not check stopped threads.
3252 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3253 (linux_low_filter_event): Add lwp and thread for exec'ing
3254 non-leader thread if leader thread has been deleted.
3255 Refactor code into linux_arch_setup_thread and call it.
3256 Pass child lwp pointer by reference to handle_extended_wait.
3257 (linux_wait_for_event_filtered): Update comment.
3258 (linux_wait_1): Prevent clobbering exec event status.
3259 (linux_supports_exec_events): New function.
3260 (linux_target_ops) <supports_exec_events>: Initialize new member.
3261 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3263 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3264 * server.c (report_exec_events): New global variable.
3265 (handle_query): Handle qSupported query for exec-events feature.
3266 (captured_main): Initialize report_exec_events.
3267 * server.h (report_exec_events): Declare new global variable.
3268 * target.h (struct target_ops) <supports_exec_events>: New
3270 (target_supports_exec_events): New macro.
3271 * win32-low.c (win32_target_ops) <supports_exec_events>:
3272 Initialize new member.
3274 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3276 * linux-low.c (linux_low_enable_btrace): Remove.
3277 (linux_target_ops): Replace linux_low_enable_btrace with
3278 linux_enable_btrace.
3280 2015-09-03 Yao Qi <yao.qi@linaro.org>
3282 * linux-aarch64-low.c (aarch64_insert_point): Call
3283 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3286 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3288 * linux-low.c (check_stopped_by_breakpoint): Use
3289 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3291 2015-08-27 Pedro Alves <palves@redhat.com>
3293 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3295 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3297 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3298 the XNEW-family equivalent.
3299 (compile_bytecodes): Likewise.
3300 * dll.c (loaded_dll): Likewise.
3301 * event-loop.c (append_callback_event): Likewise.
3302 (create_file_handler): Likewise.
3303 (create_file_event): Likewise.
3304 * hostio.c (handle_open): Likewise.
3305 * inferiors.c (add_thread): Likewise.
3306 (add_process): Likewise.
3307 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3308 * linux-arm-low.c (arm_new_process): Likewise.
3309 (arm_new_thread): Likewise.
3310 * linux-low.c (add_to_pid_list): Likewise.
3311 (linux_add_process): Likewise.
3312 (handle_extended_wait): Likewise.
3313 (add_lwp): Likewise.
3314 (enqueue_one_deferred_signal): Likewise.
3315 (enqueue_pending_signal): Likewise.
3316 (linux_resume_one_lwp_throw): Likewise.
3317 (linux_resume_one_thread): Likewise.
3318 (linux_read_memory): Likewise.
3319 (linux_write_memory): Likewise.
3320 * linux-mips-low.c (mips_linux_new_process): Likewise.
3321 (mips_linux_new_thread): Likewise.
3322 (mips_add_watchpoint): Likewise.
3323 * linux-x86-low.c (initialize_low_arch): Likewise.
3324 * lynx-low.c (lynx_add_process): Likewise.
3325 * mem-break.c (set_raw_breakpoint_at): Likewise.
3326 (set_breakpoint): Likewise.
3327 (add_condition_to_breakpoint): Likewise.
3328 (add_commands_to_breakpoint): Likewise.
3329 (clone_agent_expr): Likewise.
3330 (clone_one_breakpoint): Likewise.
3331 * regcache.c (new_register_cache): Likewise.
3332 * remote-utils.c (look_up_one_symbol): Likewise.
3333 * server.c (queue_stop_reply): Likewise.
3334 (start_inferior): Likewise.
3335 (queue_stop_reply_callback): Likewise.
3336 (handle_target_event): Likewise.
3337 * spu-low.c (fetch_ppc_memory): Likewise.
3338 (store_ppc_memory): Likewise.
3339 * target.c (set_target_ops): Likewise.
3340 * thread-db.c (thread_db_load_search): Likewise.
3341 (try_thread_db_load_1): Likewise.
3342 * tracepoint.c (add_tracepoint): Likewise.
3343 (add_tracepoint_action): Likewise.
3344 (create_trace_state_variable): Likewise.
3345 (cmd_qtdpsrc): Likewise.
3346 (cmd_qtro): Likewise.
3347 (add_while_stepping_state): Likewise.
3348 * win32-low.c (child_add_thread): Likewise.
3349 (get_image_name): Likewise.
3351 2015-08-25 Yao Qi <yao.qi@linaro.org>
3353 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3355 2015-08-25 Yao Qi <yao.qi@linaro.org>
3357 * Makefile.in (aarch64-linux.o): New rule.
3358 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3360 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3361 (aarch64_init_debug_reg_state): Make it extern.
3362 (aarch64_linux_prepare_to_resume): Remove.
3364 2015-08-25 Yao Qi <yao.qi@linaro.org>
3366 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3367 lwp_arch_private_info and ptid_of_lwp.
3369 2015-08-25 Yao Qi <yao.qi@linaro.org>
3371 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3372 Find proc_info by find_process_pid. All callers updated.
3374 2015-08-25 Yao Qi <yao.qi@linaro.org>
3376 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3378 (debug_reg_change_callback): Remove.
3379 (aarch64_notify_debug_reg_change): Remove.
3381 2015-08-25 Yao Qi <yao.qi@linaro.org>
3383 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3384 Call current_lwp_ptid.
3386 2015-08-25 Yao Qi <yao.qi@linaro.org>
3388 * linux-aarch64-low.c (debug_reg_change_callback): Use
3391 2015-08-25 Yao Qi <yao.qi@linaro.org>
3393 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3395 2015-08-25 Yao Qi <yao.qi@linaro.org>
3397 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3399 2015-08-25 Yao Qi <yao.qi@linaro.org>
3401 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3404 2015-08-25 Yao Qi <yao.qi@linaro.org>
3406 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3408 (debug_reg_change_callback): Remove argument entry and add argument
3409 lwp. Remove local variable thread. Don't print thread id in the
3410 debugging output. Don't check whether pid of thread equals to pid.
3411 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3412 iterate_over_lwps instead find_inferior.
3414 2015-08-24 Pedro Alves <palves@redhat.com>
3416 * inferiors.c (get_first_process): New function.
3417 * inferiors.h (get_first_process): New declaration.
3418 * remote-utils.c (read_ptid): Default to the first process in the
3419 list, instead of to the current thread's process.
3421 2015-08-24 Pedro Alves <palves@redhat.com>
3423 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3424 * event-loop.c: Likewise.
3425 * remote-utils.c: Likewise.
3426 * tracepoint.c: Likewise.
3428 2015-08-24 Pedro Alves <palves@redhat.com>
3430 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3433 2015-08-21 Pedro Alves <palves@redhat.com>
3435 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3436 instead of literal 1.
3438 2015-08-21 Pedro Alves <palves@redhat.com>
3440 * tdesc.c (default_description): Explicitly zero-initialize.
3442 2015-08-21 Pedro Alves <palves@redhat.com>
3445 * inferiors.c (remove_thread): Discard any pending stop reply for
3447 * server.c (remove_all_on_match_pid): Rename to ...
3448 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3450 (discard_queued_stop_replies): Change parameter to a ptid. Now
3452 (handle_v_kill, kill_inferior_callback, captured_main)
3453 (process_serial_event): Adjust.
3454 * server.h (discard_queued_stop_replies): Declare.
3456 2015-08-21 Pedro Alves <palves@redhat.com>
3458 * linux-low.c (wait_for_sigstop): Always switch to no thread
3459 selected if the previously current thread dies.
3460 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3461 process instead of the current thread's.
3462 * remote-utils.c (input_interrupt): Don't check if there's no
3464 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3465 current thread to the general thread fails, error out.
3466 (handle_qxfer_auxv, handle_qxfer_libraries)
3467 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3468 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3469 (handle_query): Check if there's a thread selected instead of
3470 checking whether there's any thread in the thread list.
3471 (handle_qxfer_threads, handle_qxfer_btrace)
3472 (handle_qxfer_btrace_conf): Don't error out early if there's no
3473 thread in the thread list.
3474 (handle_v_cont, myresume): Don't set the current thread to the
3476 (process_serial_event) <Hg handling>: Also set thread_id if the
3477 previous general thread is still alive.
3478 (process_serial_event) <g/G handling>: If setting the current
3479 thread to the general thread fails, error out.
3480 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3481 thread's lwp instead of the current thread's.
3482 * target.c (set_desired_thread): If the desired thread was not
3483 found, leave the current thread pointing to NULL. Return an int
3484 (boolean) indicating success.
3485 * target.h (set_desired_thread): Change return type to int.
3487 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3489 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3490 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3492 (ps_get_thread_area): New function.
3494 2015-08-19 Gary Benson <gbenson@redhat.com>
3496 * hostio.c (handle_pread): Do not attempt to read more data
3497 than hostio_reply_with_data can fit in a packet.
3499 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3501 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3503 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3505 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3507 2015-08-06 Pedro Alves <palves@redhat.com>
3509 * tracepoint.c (expr_eval_result): Now an int.
3511 2015-08-06 Pedro Alves <palves@redhat.com>
3513 * gdbthread.h (struct regcache): Forward declare.
3514 (struct thread_info) <regcache_data>: Now a struct regcache
3516 * inferiors.c (inferior_regcache_data)
3517 (set_inferior_regcache_data): Now work with struct regcache
3519 * inferiors.h (struct regcache): Forward declare.
3520 (inferior_regcache_data, set_inferior_regcache_data): Now work
3521 with struct regcache pointers.
3522 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3523 (free_register_cache_thread): Remove struct regcache pointer
3526 2015-08-06 Pedro Alves <palves@redhat.com>
3528 * server.c (captured_main): On error, print the exception message
3529 to stderr, and if run_once is set, throw a quit.
3531 2015-08-06 Pedro Alves <palves@redhat.com>
3533 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3536 2015-08-06 Pedro Alves <palves@redhat.com>
3538 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3539 reading beyond the passed in buffer length.
3541 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3543 * tracepoint.c (symbol_list) <required>: Remove.
3545 2015-08-06 Pedro Alves <palves@redhat.com>
3547 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3548 count if stopping and suspending threads.
3549 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3550 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3551 (linux_detach): Complete an ongoing step-over.
3552 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3554 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3555 (linux_wait_1): If passing a signal to the inferior after
3556 finishing a step-over, unsuspend and re-resume all lwps. If we
3557 see a single-step event but the thread should be continuing, don't
3558 pass the trap to gdb.
3559 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3560 internal_error instead of gdb_assert.
3561 (enqueue_pending_signal): New function.
3562 (check_ptrace_stopped_lwp_gone): Add debug output.
3563 (start_step_over): Use internal_error instead of gdb_assert.
3564 (complete_ongoing_step_over): New function.
3565 (linux_resume_one_thread): Don't resume a suspended thread.
3566 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3569 2015-08-06 Pedro Alves <palves@redhat.com>
3571 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3572 (linux_thread_alive): Use lwp_is_marked_dead.
3573 (extended_event_reported): Delete.
3574 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3575 instead of extended_event_reported.
3576 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3578 (lwp_is_marked_dead): New function.
3579 (lwp_running): Use lwp_is_marked_dead.
3580 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3583 2015-08-06 Pedro Alves <palves@redhat.com>
3585 * linux-low.c (linux_wait_1): Move fork event output out of the
3586 !report_to_gdb check. Pass event_child->waitstatus to
3587 target_waitstatus_to_string instead of ourstatus.
3589 2015-08-04 Yao Qi <yao.qi@linaro.org>
3591 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3592 if current_thread is 32 bit.
3594 2015-08-04 Yao Qi <yao.qi@linaro.org>
3596 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3597 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3598 * server.c (extended_protocol): Remove "static".
3599 * server.h (extended_protocol): Declare it.
3601 2015-08-04 Yao Qi <yao.qi@linaro.org>
3603 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3604 both aarch64 and aarch32.
3605 (aarch64_set_pc): Likewise.
3607 2015-08-04 Yao Qi <yao.qi@linaro.org>
3609 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3610 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3611 arm-with-neon.xml to srv_xmlfiles.
3612 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3613 (is_64bit_tdesc): New function.
3614 (aarch64_linux_read_description): New function.
3615 (aarch64_arch_setup): Call aarch64_linux_read_description.
3616 (regs_info): Rename to regs_info_aarch64.
3617 (aarch64_regs_info): Return right regs_info.
3618 (initialize_low_arch): Call initialize_low_arch_aarch32.
3620 2015-08-04 Yao Qi <yao.qi@linaro.org>
3622 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3623 * linux-aarch32-low.c: New file.
3624 * linux-aarch32-low.h: New file.
3625 * linux-arm-low.c (arm_fill_gregset): Move it to
3626 linux-aarch32-low.c.
3627 (arm_store_gregset): Likewise.
3628 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3629 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3630 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3631 (regs_info): Rename to regs_info_arm.
3632 (arm_regs_info): Return regs_info_aarch32 if
3633 have_ptrace_getregset is 1 and target description is
3634 arm_with_neon or arm_with_vfpv3.
3635 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3636 Call initialize_low_arch_aarch32 instead.
3638 2015-08-04 Yao Qi <yao.qi@linaro.org>
3640 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3641 * linux-low.c: ... here.
3642 * linux-low.h (have_ptrace_getregset): Declare it.
3644 2015-08-04 Pedro Alves <palves@redhat.com>
3646 * thread-db.c (struct thread_db): Use new typedefs.
3647 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3649 (disable_thread_event_reporting): Cast result of dlsym to
3650 destination function pointer type.
3651 (thread_db_mourn): Use td_ta_delete_ftype.
3653 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3655 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3657 (CDX_BREAKPOINT): Define for R2.
3658 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3659 (the_low_target): Add comments.
3661 2015-07-30 Yao Qi <yao.qi@linaro.org>
3663 * linux-arm-low.c (arm_hwcap): Remove it.
3664 (arm_read_description): New local variable arm_hwcap. Don't
3665 set arm_hwcap to zero.
3667 2015-07-30 Yao Qi <yao.qi@linaro.org>
3669 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3670 Use regcache->tdesc instead.
3671 (arm_store_wmmxregset): Likewise.
3672 (arm_fill_vfpregset): Likewise.
3673 (arm_store_vfpregset): Likewise.
3675 2015-07-30 Yao Qi <yao.qi@linaro.org>
3677 * linux-arm-low.c: Include arch/arm.h.
3678 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3679 (arm_store_gregset): Likewise.
3681 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3683 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3684 ptrace's 4th parameter.
3686 2015-07-27 Yao Qi <yao.qi@linaro.org>
3688 * configure.srv (case aarch64*-*-linux*): Don't set
3691 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3693 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3695 * linux-arm-low.c: Likewise.
3696 * linux-cris-low.c: Likewise.
3697 * linux-crisv32-low.c: Likewise.
3698 * linux-low.c: Likewise.
3699 * linux-m68k-low.c: Likewise.
3700 * linux-mips-low.c: Likewise.
3701 * linux-nios2-low.c: Likewise.
3702 * linux-s390-low.c: Likewise.
3703 * linux-sparc-low.c: Likewise.
3704 * linux-tic6x-low.c: Likewise.
3705 * linux-tile-low.c: Likewise.
3706 * linux-x86-low.c: Likewise.
3708 2015-07-24 Pedro Alves <palves@redhat.com>
3710 * config.in: Regenerate.
3711 * configure: Regenerate.
3713 2015-07-24 Pedro Alves <palves@redhat.com>
3715 * acinclude.m4: Include ../ptrace.m4.
3716 * configure.ac: Call GDB_AC_PTRACE.
3717 * config.in, configure: Regenerate.
3719 2015-07-24 Yao Qi <yao.qi@linaro.org>
3721 * linux-low.c (linux_create_inferior): Remove setting to
3722 proc->priv->new_inferior.
3723 (linux_attach): Likewise.
3724 (linux_low_filter_event): Likewise.
3725 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3727 2015-07-24 Yao Qi <yao.qi@linaro.org>
3729 * linux-low.c (linux_arch_setup): New function.
3730 (linux_low_filter_event): If proc->tdesc is NULL and
3731 proc->attached is true, call the_low_target.arch_setup.
3732 Otherwise, keep status pending, and return.
3733 (linux_resume_one_lwp_throw): Don't call get_pc if
3734 thread->while_stepping isn't NULL. Don't call
3735 get_thread_regcache if proc->tdesc is NULL.
3736 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3737 (linux_target_ops): Install arch_setup.
3738 * server.c (start_inferior): Call the_target->arch_setup.
3739 * target.h (struct target_ops) <arch_setup>: New field.
3740 (target_arch_setup): New marco.
3741 * lynx-low.c (lynx_target_ops): Update.
3742 * nto-low.c (nto_target_ops): Update.
3743 * spu-low.c (spu_target_ops): Update.
3744 * win32-low.c (win32_target_ops): Update.
3746 2015-07-24 Yao Qi <yao.qi@linaro.org>
3748 * linux-low.c (linux_add_process): Don't set
3749 proc->priv->new_inferior.
3750 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3751 (linux_attach): Likewise.
3753 2015-07-24 Yao Qi <yao.qi@linaro.org>
3755 * server.c (start_inferior): Code refactor.
3757 2015-07-24 Yao Qi <yao.qi@linaro.org>
3759 * server.c (process_serial_event): Set general_thread.
3761 2015-07-21 Yao Qi <yao.qi@linaro.org>
3763 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3764 aarch64_linux_get_debug_reg_capacity.
3766 2015-07-17 Yao Qi <yao.qi@linaro.org>
3768 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3769 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3770 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3771 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3772 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3773 (AARCH64_HWP_ALIGNMENT): Likewise.
3774 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3775 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3776 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3777 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3778 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3779 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3780 (struct aarch64_debug_reg_state): Likewise.
3781 (struct arch_lwp_info): Likewise.
3782 (aarch64_align_watchpoint): Likewise.
3783 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3784 (aarch64_watchpoint_length): Likewise.
3785 (aarch64_point_encode_ctrl_reg): Likewise
3786 (aarch64_point_is_aligned): Likewise.
3787 (aarch64_align_watchpoint): Likewise.
3788 (aarch64_linux_set_debug_regs):
3789 (aarch64_dr_state_insert_one_point): Likewise.
3790 (aarch64_dr_state_remove_one_point): Likewise.
3791 (aarch64_handle_breakpoint): Likewise.
3792 (aarch64_handle_aligned_watchpoint): Likewise.
3793 (aarch64_handle_unaligned_watchpoint): Likewise.
3794 (aarch64_handle_watchpoint): Likewise.
3796 2015-07-17 Yao Qi <yao.qi@linaro.org>
3798 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3799 and don't aarch64_get_debug_reg_state. All callers update.
3800 (aarch64_handle_aligned_watchpoint): Likewise.
3801 (aarch64_handle_unaligned_watchpoint): Likewise.
3802 (aarch64_handle_watchpoint): Likewise.
3803 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3804 (aarch64_remove_point): Likewise.
3806 2015-07-17 Yao Qi <yao.qi@linaro.org>
3808 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3810 (aarch64_handle_unaligned_watchpoint): Likewise.
3812 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3814 Revert the previous 3 commits:
3815 Move gdb_regex* to common/
3816 Move linux_find_memory_regions_full & co.
3817 gdbserver build-id attribute generator
3819 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3820 Jan Kratochvil <jan.kratochvil@redhat.com>
3822 gdbserver build-id attribute generator.
3823 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3824 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3825 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3827 (get_dynamic): Use find_pdhr to traverse program headers.
3828 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3829 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3830 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3831 (get_hex_build_id): New.
3832 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3833 to reply XML document.
3835 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3836 Jan Kratochvil <jan.kratochvil@redhat.com>
3838 * target.c: Include target/target-utils.h and fcntl.h.
3839 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3840 (target_fileio_read_stralloc): New functions.
3842 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3844 * Makefile.in (OBS): Add gdb_regex.o.
3846 * config.in: Rebuilt.
3847 * configure: Rebuilt.
3849 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3850 Jan Kratochvil <jan.kratochvil@redhat.com>
3852 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3853 * Makefile.in (OBS): Add target-utils.o.
3854 (linux-maps.o, target-utils.o): New.
3855 * configure.srv (srv_linux_obj): Add linux-maps.o.
3857 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3859 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3861 (the_low_target): Install it.
3863 2015-07-14 Pedro Alves <palves@redhat.com>
3865 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3866 Instead, ignore ECHILD, and throw an error for other errnos.
3868 2015-07-10 Pedro Alves <palves@redhat.com>
3870 * event-loop.c (struct callback_event) <data>: Change type to
3871 gdb_client_data instance instead of gdb_client_data pointer.
3872 (append_callback_event): Adjust.
3874 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3876 * linux-aarch64-low.c: Add comments for each linux_target_ops
3877 method. Remove comments already covered in target_ops and
3878 linux_target_ops definitions.
3879 (the_low_target): Add comments for each unimplemented method.
3881 2015-07-09 Yao Qi <yao.qi@linaro.org>
3883 * linux-aarch64-low.c (aarch64_regmap): Remove.
3884 (aarch64_usrregs_info): Remove.
3885 (regs_info): Set field usrregs to NULL.
3887 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3889 * linux-low.c: Include "rsp-low.h"
3890 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3891 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3892 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3893 (handle_btrace_enable_pt): New.
3894 (handle_btrace_general_set): Support "pt".
3895 (handle_btrace_conf_general_set): Support "pt:size".
3897 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3899 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3902 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3904 * linux-aarch64-low.c: Remove comment about endianness.
3905 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3906 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3909 2015-06-24 Gary Benson <gbenson@redhat.com>
3911 * linux-i386-ipa.c (stdint.h): Do not include.
3912 * lynx-i386-low.c (stdint.h): Likewise.
3913 * lynx-ppc-low.c (stdint.h): Likewise.
3914 * mem-break.c (stdint.h): Likewise.
3915 * thread-db.c (stdint.h): Likewise.
3916 * tracepoint.c (stdint.h): Likewise.
3917 * win32-low.c (stdint.h): Likewise.
3919 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3921 * server.c (write_qxfer_response): Update call to
3922 remote_escape_output.
3924 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3925 Jan Kratochvil <jan.kratochvil@redhat.com>
3927 Merge multiple hex conversions.
3928 * gdbreplay.c (tohex): Rename to 'fromhex'.
3929 (logchar): Use fromhex.
3931 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3933 * server.c (handle_qxfer_libraries): Set `version' attribute for
3936 2015-06-10 Gary Benson <gbenson@redhat.com>
3938 * target.h (struct target_ops) <multifs_open>: New field.
3939 <multifs_unlink>: Likewise.
3940 <multifs_readlink>: Likewise.
3941 * linux-low.c (nat/linux-namespaces.h): New include.
3942 (linux_target_ops): Initialize the_target->multifs_open,
3943 the_target->multifs_unlink and the_target->multifs_readlink.
3944 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3945 * hostio.c (hostio_fs_pid): New static variable.
3946 (hostio_handle_new_gdb_connection): New function.
3947 (handle_setfs): Likewise.
3948 (handle_open): Use the_target->multifs_open as appropriate.
3949 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3950 (handle_readlink): Use the_target->multifs_readlink as
3952 (handle_vFile): Handle vFile:setfs packets.
3953 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3954 after target_handle_new_gdb_connection.
3956 2015-06-10 Gary Benson <gbenson@redhat.com>
3958 * configure.ac (AC_CHECK_FUNCS): Add setns.
3959 * config.in: Regenerate.
3960 * configure: Likewise.
3961 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3962 (linux-namespaces.o): New rule.
3963 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3965 2015-06-09 Gary Benson <gbenson@redhat.com>
3967 * hostio.c (handle_open): Process mode argument with
3968 fileio_to_host_mode.
3970 2015-06-01 Yao Qi <yao.qi@linaro.org>
3972 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3973 * linux-x86-low.c: Likewise.
3975 2015-05-28 Don Breazeal <donb@codesourcery.com>
3977 * linux-low.c (handle_extended_wait): Initialize
3978 thread_info.last_resume_kind for new fork children.
3980 2015-05-15 Pedro Alves <palves@redhat.com>
3982 * target.h (target_handle_new_gdb_connection): Rewrite using if
3983 wrapped in do/while.
3985 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3987 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3988 * configure, config.in: Regenerate.
3989 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3992 2015-05-12 Don Breazeal <donb@codesourcery.com>
3994 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3995 PTRACE_EVENT_VFORK_DONE.
3996 (linux_low_ptrace_options, extended_event_reported): Add vfork
3998 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3999 and "vforkdone" for RSP 'T' Stop Reply Packet.
4000 * server.h (report_vfork_events): Declare
4003 2015-05-12 Don Breazeal <donb@codesourcery.com>
4005 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4006 (the_low_target) <new_fork>: Initialize new member.
4007 * linux-arm-low.c (arm_new_fork): New function.
4008 (the_low_target) <new_fork>: Initialize new member.
4009 * linux-low.c (handle_extended_wait): Call new target function
4011 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4012 * linux-mips-low.c (mips_add_watchpoint): New function
4013 extracted from mips_insert_point.
4014 (the_low_target) <new_fork>: Initialize new member.
4015 (mips_linux_new_fork): New function.
4016 (mips_insert_point): Call mips_add_watchpoint.
4017 * linux-x86-low.c (x86_linux_new_fork): New function.
4018 (the_low_target) <new_fork>: Initialize new member.
4020 2015-05-12 Don Breazeal <donb@codesourcery.com>
4022 * linux-low.c (handle_extended_wait): Implement return value,
4023 rename argument 'event_child' to 'event_lwp', handle
4024 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4025 (linux_low_ptrace_options): New function.
4026 (linux_low_filter_event): Call linux_low_ptrace_options,
4027 use different argument fo linux_enable_event_reporting,
4028 use return value from handle_extended_wait.
4029 (extended_event_reported): New function.
4030 (linux_wait_1): Call extended_event_reported and set
4031 status to report fork events.
4032 (linux_write_memory): Add pid to debug message.
4033 (reset_lwp_ptrace_options_callback): New function.
4034 (linux_handle_new_gdb_connection): New function.
4035 (linux_target_ops): Initialize new structure member.
4036 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4037 * lynx-low.c: Initialize new structure member.
4038 * remote-utils.c (prepare_resume_reply): Implement stop reason
4039 "fork" for "T" stop message.
4040 * server.c (handle_query): Call handle_new_gdb_connection.
4041 * server.h (report_fork_events): Declare global flag.
4042 * target.h (struct target_ops) <handle_new_gdb_connection>:
4044 (target_handle_new_gdb_connection): New macro.
4045 * win32-low.c: Initialize new structure member.
4047 2015-05-12 Don Breazeal <donb@codesourcery.com>
4049 * mem-break.c (APPEND_TO_LIST): Define macro.
4050 (clone_agent_expr): New function.
4051 (clone_one_breakpoint): New function.
4052 (clone_all_breakpoints): New function.
4053 * mem-break.h: Declare new functions.
4055 2015-05-12 Don Breazeal <donb@codesourcery.com>
4057 * linux-low.c (linux_supports_fork_events): New function.
4058 (linux_supports_vfork_events): New function.
4059 (linux_target_ops): Initialize new structure members.
4060 (initialize_low): Call linux_check_ptrace_features.
4061 * lynx-low.c (lynx_target_ops): Initialize new structure
4063 * server.c (report_fork_events, report_vfork_events):
4065 (handle_query): Add new features to qSupported packet and
4067 (captured_main): Initialize new global variables.
4068 * target.h (struct target_ops) <supports_fork_events>:
4070 <supports_vfork_events>: New member.
4071 (target_supports_fork_events): New macro.
4072 (target_supports_vfork_events): New macro.
4073 * win32-low.c (win32_target_ops): Initialize new structure
4076 2015-05-12 Gary Benson <gbenson@redhat.com>
4078 * server.c (handle_qxfer_exec_file): Use current process
4081 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4083 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4084 Remove HAVE_PTRACE_GETREGS conditionals.
4085 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4086 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4088 2015-05-08 Yao Qi <yao.qi@linaro.org>
4090 * linux-low.c (linux_supports_conditional_breakpoints): New
4092 (linux_target_ops): Install new target method.
4093 * lynx-low.c (lynx_target_ops): Install NULL hook for
4094 supports_conditional_breakpoints.
4095 * nto-low.c (nto_target_ops): Likewise.
4096 * spu-low.c (spu_target_ops): Likewise.
4097 * win32-low.c (win32_target_ops): Likewise.
4098 * server.c (handle_query): Check
4099 target_supports_conditional_breakpoints.
4100 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4102 (target_supports_conditional_breakpoints): New macro.
4104 2015-05-06 Pedro Alves <palves@redhat.com>
4107 * server.c (start_inferior): If the process exits, mourn it.
4109 2015-04-21 Gary Benson <gbenson@redhat.com>
4111 * hostio.c (fileio_open_flags_to_host): Factored out to
4112 fileio_to_host_openflags in common/fileio.c. Single use
4115 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4117 * linux-xtensa-low.c (xtensa_fill_gregset)
4118 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4121 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4123 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4124 (regs_info): Replace usrregs pointer with NULL.
4126 2015-04-17 Gary Benson <gbenson@redhat.com>
4128 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4129 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4130 * server.c (handle_qxfer_exec_file): New function.
4131 (qxfer_packets): Add exec-file entry.
4132 (handle_query): Report qXfer:exec-file:read as supported packet.
4134 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4136 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4138 2015-04-09 Gary Benson <gbenson@redhat.com>
4140 * hostio-errno.c (errno_to_fileio_error): Remove function.
4141 Update caller to use remote_fileio_to_fio_error.
4143 2015-04-09 Yao Qi <yao.qi@linaro.org>
4145 * linux-low.c (linux_insert_point): Call
4146 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4147 (linux_remove_point): Call remove_memory_breakpoint if type is
4149 * linux-x86-low.c (x86_insert_point): Don't call
4150 insert_memory_breakpoint.
4151 (x86_remove_point): Don't call remove_memory_breakpoint.
4153 2015-04-01 Pedro Alves <palves@redhat.com>
4154 Cleber Rosa <crosa@redhat.com>
4156 * server.c (gdbserver_usage): Reorganize and extend the usage
4159 2015-03-24 Pedro Alves <palves@redhat.com>
4161 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4162 output. Also dump TRAP_TRACE.
4163 (linux_low_filter_event): In debug output, distinguish a
4164 resume_stop SIGSTOP from a delayed SIGSTOP.
4166 2015-03-24 Gary Benson <gbenson@redhat.com>
4168 * linux-x86-low.c (x86_linux_new_thread): Moved to
4170 (x86_linux_prepare_to_resume): Likewise.
4172 2015-03-24 Gary Benson <gbenson@redhat.com>
4174 * Makefile.in (x86-linux-dregs.o): New rule.
4175 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4176 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4177 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4178 (x86_linux_dr_get): Likewise.
4179 (x86_linux_dr_set): Likewise.
4180 (update_debug_registers_callback): Likewise.
4181 (x86_linux_dr_set_addr): Likewise.
4182 (x86_linux_dr_get_addr): Likewise.
4183 (x86_linux_dr_set_control): Likewise.
4184 (x86_linux_dr_get_control): Likewise.
4185 (x86_linux_dr_get_status): Likewise.
4186 (x86_linux_update_debug_registers): Likewise.
4188 2015-03-24 Gary Benson <gbenson@redhat.com>
4190 * linux-x86-low.c (x86_linux_update_debug_registers):
4191 New function, factored out from...
4192 (x86_linux_prepare_to_resume): ...this.
4194 2015-03-24 Gary Benson <gbenson@redhat.com>
4196 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4197 (x86_linux_dr_set): Likewise.
4198 (update_debug_registers_callback): Likewise.
4199 (x86_linux_dr_set_addr): Likewise.
4200 (x86_linux_dr_get_addr): Likewise.
4201 (x86_linux_dr_set_control): Likewise.
4202 (x86_linux_dr_get_control): Likewise.
4203 (x86_linux_dr_get_status): Likewise.
4204 (x86_linux_prepare_to_resume): Likewise.
4206 2015-03-24 Gary Benson <gbenson@redhat.com>
4208 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4209 Use perror_with_name. Pass string through gettext.
4210 (x86_linux_dr_set): Likewise.
4212 2015-03-24 Gary Benson <gbenson@redhat.com>
4214 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4215 (x86_linux_dr_set_addr): ...this.
4216 (x86_dr_low_get_addr): Rename to...
4217 (x86_linux_dr_get_addr): ...this.
4218 (x86_dr_low_set_control): Rename to...
4219 (x86_linux_dr_set_control): ...this.
4220 (x86_dr_low_get_control): Rename to...
4221 (x86_linux_dr_get_control): ...this.
4222 (x86_dr_low_get_status): Rename to...
4223 (x86_linux_dr_get_status): ...this.
4224 (x86_dr_low): Update with new function names.
4226 2015-03-24 Gary Benson <gbenson@redhat.com>
4228 * Makefile.in (x86-linux.o): New rule.
4229 * configure.srv: Add x86-linux.o to relevant targets.
4230 * linux-low.c (lwp_set_arch_private_info): New function.
4231 (lwp_arch_private_info): Likewise.
4232 * linux-x86-low.c: Include nat/x86-linux.h.
4233 (arch_lwp_info): Removed structure.
4234 (update_debug_registers_callback):
4235 Use lwp_set_debug_registers_changed.
4236 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4237 and lwp_set_debug_registers_changed.
4238 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4240 2015-03-24 Gary Benson <gbenson@redhat.com>
4242 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4243 * linux-arm-low.c (arm_new_thread): Likewise.
4244 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4245 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4246 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4247 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4249 2015-03-24 Gary Benson <gbenson@redhat.com>
4251 * linux-low.c (ptid_of_lwp): New function.
4252 (lwp_is_stopped): Likewise.
4253 (lwp_stop_reason): Likewise.
4254 * linux-x86-low.c (update_debug_registers_callback):
4256 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4259 2015-03-24 Gary Benson <gbenson@redhat.com>
4261 * linux-low.h (linux_stop_lwp): Remove declaration.
4263 2015-03-24 Gary Benson <gbenson@redhat.com>
4265 * linux-low.h: Include nat/linux-nat.h.
4266 * linux-low.c (iterate_over_lwps_args): New structure.
4267 (iterate_over_lwps_filter): New function.
4268 (iterate_over_lwps): Likewise.
4269 * linux-x86-low.c (update_debug_registers_callback):
4270 Update signature to what iterate_over_lwps expects.
4271 Remove PID check that iterate_over_lwps now performs.
4272 (x86_dr_low_set_addr): Use iterate_over_lwps.
4273 (x86_dr_low_set_control): Likewise.
4275 2015-03-24 Gary Benson <gbenson@redhat.com>
4277 * linux-x86-low.c (x86_debug_reg_state): New function.
4278 (x86_linux_prepare_to_resume): Use the above.
4280 2015-03-24 Gary Benson <gbenson@redhat.com>
4282 * linux-low.c (current_lwp_ptid): New function.
4283 * linux-x86-low.c: Include nat/linux-nat.h.
4284 (x86_dr_low_get_addr): Use current_lwp_ptid.
4285 (x86_dr_low_get_control): Likewise.
4286 (x86_dr_low_get_status): Likewise.
4288 2015-03-20 Pedro Alves <palves@redhat.com>
4290 * tracepoint.c (cmd_qtstatus): Make "str" const.
4292 2015-03-20 Pedro Alves <palves@redhat.com>
4294 * server.c (handle_general_set): Make "req_str" const.
4296 2015-03-19 Pedro Alves <palves@redhat.com>
4298 * linux-low.c (linux_resume_one_lwp): Rename to ...
4299 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4300 instead call perror_with_name.
4301 (check_ptrace_stopped_lwp_gone): New function.
4302 (linux_resume_one_lwp): Reimplement as wrapper around
4303 linux_resume_one_lwp_throw that swallows errors if the LWP is
4306 2015-03-19 Pedro Alves <palves@redhat.com>
4308 * linux-low.c (count_events_callback, select_event_lwp_callback):
4309 No longer check whether the thread has resume_stop as last resume
4312 2015-03-19 Pedro Alves <palves@redhat.com>
4314 * linux-low.c (count_events_callback, select_event_lwp_callback):
4315 Use the lwp's status_pending_p field, not the thread's.
4317 2015-03-19 Pedro Alves <palves@redhat.com>
4319 * linux-low.c (select_event_lwp_callback): Update comments to
4320 no longer mention SIGTRAP.
4322 2015-03-18 Gary Benson <gbenson@redhat.com>
4324 * server.c (handle_query): Do not report vFile:fstat as supported.
4326 2015-03-11 Gary Benson <gbenson@redhat.com>
4328 * hostio.c (sys/types.h): New include.
4329 (sys/stat.h): Likewise.
4330 (common-remote-fileio.h): Likewise.
4331 (handle_fstat): New function.
4332 (handle_vFile): Handle vFile:fstat packets.
4334 2015-03-11 Gary Benson <gbenson@redhat.com>
4336 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4337 struct stat.st_blocks and struct stat.st_blksize.
4338 * configure: Regenerate.
4339 * config.in: Likewise.
4340 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4341 (OBS): Add common-remote-fileio.o.
4342 (common-remote-fileio.o): New rule.
4344 2015-03-09 Pedro Alves <palves@redhat.com>
4346 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4347 'struct sockaddr' pointer in 'accept' call.
4349 2015-03-09 Pedro Alves <palves@redhat.com>
4352 2015-03-07 Pedro Alves <palves@redhat.com>
4353 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4354 or <winsock2.h> here. Instead include "gdb_socket.h".
4355 (remote_open): Use union gdb_sockaddr_u.
4356 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4357 or <winsock2.h> here. Instead include "gdb_socket.h".
4358 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4359 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4361 (init_named_socket, gdb_agent_helper_thread): Use union
4364 2015-03-07 Pedro Alves <palves@redhat.com>
4366 * configure.ac (build_warnings): Move
4367 -Wdeclaration-after-statement to the C-specific set.
4368 * configure: Regenerate.
4370 2015-03-07 Pedro Alves <palves@redhat.com>
4372 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4373 or <winsock2.h> here. Instead include "gdb_socket.h".
4374 (remote_open): Use union gdb_sockaddr_u.
4375 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4376 or <winsock2.h> here. Instead include "gdb_socket.h".
4377 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4378 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4380 (init_named_socket, gdb_agent_helper_thread): Use union
4383 2015-03-07 Pedro Alves <palves@redhat.com>
4385 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4388 2015-03-06 Yao Qi <yao.qi@linaro.org>
4390 * linux-aarch64-low.c (aarch64_insert_point): Use
4391 show_debug_regs as a boolean.
4392 (aarch64_remove_point): Likewise.
4394 2015-03-05 Pedro Alves <palves@redhat.com>
4396 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4397 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4398 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4399 * nto-low.c (nto_target_ops): Likewise.
4400 * spu-low.c (spu_target_ops): Likewise.
4401 * win32-low.c (win32_target_ops): Likewise.
4403 2015-03-04 Pedro Alves <palves@redhat.com>
4405 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4406 Decide whether a breakpoint triggered based on the SIGTRAP's
4408 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4409 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4410 (linux_low_filter_event): Check for breakpoints before checking
4412 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4414 (linux_stopped_by_sw_breakpoint)
4415 (linux_supports_stopped_by_sw_breakpoint)
4416 (linux_stopped_by_hw_breakpoint)
4417 (linux_supports_stopped_by_hw_breakpoint): New functions.
4418 (linux_target_ops): Install new target methods.
4420 2015-03-04 Pedro Alves <palves@redhat.com>
4422 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4423 * server.c (swbreak_feature, hwbreak_feature): New globals.
4424 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4425 (captured_main): Clear swbreak_feature and hwbreak_feature.
4426 * server.h (swbreak_feature, hwbreak_feature): Declare.
4427 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4428 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4429 supports_stopped_by_hw_breakpoint>: New fields.
4430 (target_supports_stopped_by_sw_breakpoint)
4431 (target_stopped_by_sw_breakpoint)
4432 (target_supports_stopped_by_hw_breakpoint)
4433 (target_stopped_by_hw_breakpoint): Declare.
4435 2015-03-04 Pedro Alves <palves@redhat.com>
4437 enum lwp_stop_reason -> enum target_stop_reason
4438 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4439 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4440 (linux_wait_1, stuck_in_jump_pad_callback)
4441 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4442 (linux_stopped_by_watchpoint):
4443 * linux-low.h (enum lwp_stop_reason): Delete.
4444 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4445 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4447 2015-03-04 Yao Qi <yao.qi@linaro.org>
4449 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4451 2015-03-03 Gary Benson <gbenson@redhat.com>
4453 * hostio.c (handle_vFile): Fix prefix lengths.
4455 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4457 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4460 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4462 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4463 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4464 (clean): Add "rm -f" for above C files.
4465 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4466 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4467 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4468 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4469 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4470 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4471 (init_registers_s390x_vx_linux64)
4472 (init_registers_s390x_tevx_linux64)
4473 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4474 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4476 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4477 (s390_store_vxrs_high): New functions.
4478 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4480 (s390_arch_setup): Add logic for selecting one of the new target
4481 descriptions. Activate the new vector regsets if applicable.
4482 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4483 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4484 and init_registers_s390x_tevx_linux64.
4486 2015-03-01 Pedro Alves <palves@redhat.com>
4488 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4491 2015-02-27 Pedro Alves <palves@redhat.com>
4493 * linux-x86-low.c (u_debugreg_offset): New function.
4494 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4496 2015-02-27 Pedro Alves <palves@redhat.com>
4498 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4499 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4500 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4501 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4502 (ps_lsetfpregs, ps_getpid)
4503 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4504 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4505 (ps_lsetxregs, ps_plog): Declare.
4507 2015-02-27 Pedro Alves <palves@redhat.com>
4509 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4510 IP_AGENT_EXPORT_FUNC.
4511 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4512 IP_AGENT_EXPORT_FUNC.
4513 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4514 (IP_AGENT_EXPORT): Delete.
4515 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4516 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4517 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4518 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4519 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4520 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4521 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4522 (traceframe_read_count, traceframe_write_count)
4523 (traceframes_created, trace_state_variables, get_raw_reg)
4524 (get_trace_state_variable_value, set_trace_state_variable_value)
4525 (ust_loaded, helper_thread_id, cmd_buf): Use
4526 IPA_SYM_EXPORTED_NAME.
4527 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4528 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4529 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4530 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4531 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4532 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4533 EXTERN_C_PUSH/EXTERN_C_POP.
4534 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4535 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4536 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4537 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4538 (traceframe_write_count, traceframe_read_count)
4539 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4540 (about_to_request_buffer_space, get_trace_state_variable_value)
4541 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4542 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4543 EXTERN_C_PUSH/EXTERN_C_POP.
4544 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4545 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4546 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4547 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4548 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4549 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4550 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4551 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4553 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4554 (IP_AGENT_EXPORT_VAR_DECL): Define.
4556 (gdb_agent_get_raw_reg): Declare.
4558 2015-02-27 Tom Tromey <tromey@redhat.com>
4559 Pedro Alves <palves@redhat.com>
4561 Rename symbols whose names are reserved C++ keywords throughout.
4563 2015-02-27 Pedro Alves <palves@redhat.com>
4565 * Makefile.in (COMPILER): New, get it from autoconf.
4566 (CXX): Get from autoconf instead.
4567 (COMPILE.pre): Use COMPILER.
4568 (CC-LD): Rename to ...
4569 (CC_LD): ... this. Use COMPILER.
4570 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4571 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4572 * acinclude.m4: Include build-with-cxx.m4.
4573 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4574 Disable -Werror by default if building in C++ mode.
4575 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4576 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4577 the C++ compiler. Save/restore CXXFLAGS too.
4578 * configure: Regenerate.
4580 2015-02-27 Pedro Alves <palves@redhat.com>
4582 * acinclude.m4: Include libiberty.m4.
4583 * configure.ac: Call libiberty_INIT.
4584 * config.in, configure: Regenerate.
4586 2015-02-26 Pedro Alves <palves@redhat.com>
4588 * linux-low.c (linux_wait_1): When incrementing the PC past a
4589 program breakpoint always use the_low_target.breakpoint_len as
4590 increment, rather than the maximum between that and
4591 the_low_target.decr_pc_after_break.
4593 2015-02-23 Pedro Alves <palves@redhat.com>
4595 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4596 thread was doing a step-over; always adjust the PC if
4597 we stepped over a permanent breakpoint.
4598 (linux_wait_1): If we stepped over breakpoint that was on top of a
4599 permanent breakpoint, manually advance the PC past it.
4601 2015-02-23 Pedro Alves <palves@redhat.com>
4603 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4605 (x86_fill_gregset, x86_store_gregset): Use it when handling
4608 2015-02-20 Pedro Alves <palves@redhat.com>
4610 * thread-db.c: Include "nat/linux-procfs.h".
4611 (thread_db_init): Skip listing new threads if the kernel supports
4612 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4614 2015-02-20 Pedro Alves <palves@redhat.com>
4616 * linux-low.c (status_pending_p_callback): Use ptid_match.
4618 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4620 PR breakpoints/16812
4621 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4622 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4623 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4625 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4627 PR breakpoints/15956
4628 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4630 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4632 * linux-low.c (linux_low_btrace_conf): Print size.
4633 * server.c (handle_btrace_conf_general_set): New.
4634 (hanle_general_set): Call handle_btrace_conf_general_set.
4635 (handle_query): Report Qbtrace-conf:bts:size as supported.
4637 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4639 * linux-low.c (linux_low_enable_btrace): Update parameters.
4640 (linux_low_btrace_conf): New.
4641 (linux_target_ops)<to_btrace_conf>: Initialize.
4642 * server.c (current_btrace_conf): New.
4643 (handle_btrace_enable): Rename to ...
4644 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4645 to target_enable_btrace. Update comment. Update users.
4646 (handle_qxfer_btrace_conf): New.
4647 (qxfer_packets): Add btrace-conf entry.
4648 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4649 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4650 (target_ops)<read_btrace_conf>: New.
4651 (target_enable_btrace): Update parameters.
4652 (target_read_btrace_conf): New.
4654 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4656 * server.c (handle_btrace_general_set): Remove call to
4657 target_supports_btrace.
4658 (supported_btrace_packets): New.
4659 (handle_query): Call supported_btrace_packets.
4660 * target.h: include btrace-common.h.
4661 (btrace_target_info): Removed.
4662 (supports_btrace, target_supports_btrace): Update parameters.
4664 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4666 * Makefile.in (SFILES): Add common/btrace-common.c.
4667 (OBS): Add common/btrace-common.o.
4668 (btrace-common.o): Add build rules.
4669 * linux-low: Include btrace-common.h.
4670 (linux_low_read_btrace): Use struct btrace_data. Call
4671 btrace_data_init and btrace_data_fini.
4673 2015-02-06 Pedro Alves <palves@redhat.com>
4675 * thread-db.c (find_new_threads_callback): Add debug output.
4677 2015-02-04 Pedro Alves <palves@redhat.com>
4679 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4680 (resume_stopped_resumed_lwps): New function.
4681 (linux_wait_for_event_filtered): Use it.
4683 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4685 * Makefile.in (SFILES): Add linux-personality.c.
4686 (linux-personality.o): New rule.
4687 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4688 list of objects to be built.
4689 * linux-low.c: Include nat/linux-personality.h.
4690 (linux_create_inferior): Remove code to disable address space
4691 randomization (moved to ../nat/linux-personality.c). Create
4692 cleanup to disable address space randomization.
4694 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4696 * Makefile.in (posix-strerror.o): New rule.
4697 (mingw-strerror.o): Likewise.
4698 * configure: Regenerated.
4699 * configure.ac: Source file ../common/common.host. Initialize new
4700 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4702 2015-01-14 Yao Qi <yao@codesourcery.com>
4704 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4705 (ppc-linux.o): New rule.
4706 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4707 * configure.ac: AC_CHECK_FUNCS(getauxval).
4708 * config.in: Re-generated.
4709 * configure: Re-generated.
4710 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4711 ppc64_64bit_inferior_p
4713 2015-01-14 Yao Qi <yao@codesourcery.com>
4715 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4716 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4717 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4718 (PT_ORIG_R3, PT_TRAP): Likewise.
4719 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4720 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4721 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4723 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4725 * i387-fp.c (i387_cache_to_xsave): In look over
4726 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4727 zmmh_low_space field by use of zmmh_high_space.
4729 2015-01-09 Pedro Alves <palves@redhat.com>
4731 * linux-low.c (step_over_bkpt): Move higher up in the file.
4732 (handle_extended_wait): Don't store the stop_pc here.
4733 (get_stop_pc): Adjust comments and rename to ...
4734 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4735 stopped for a software breakpoint or hardware breakpoint.
4736 (thread_still_has_status_pending_p): New function.
4737 (status_pending_p_callback): Use
4738 thread_still_has_status_pending_p. If the event is no longer
4739 interesting, resume the LWP.
4740 (handle_tracepoints): Add assert.
4741 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4742 (wstatus_maybe_breakpoint): New function.
4743 (cancel_breakpoint): Delete function.
4744 (check_stopped_by_watchpoint): New function, factored out from
4745 linux_low_filter_event.
4746 (lp_status_maybe_breakpoint): Delete function.
4747 (linux_low_filter_event): Remove filter_ptid argument.
4748 Leave thread group exits pending here. Store the LWP's stop PC.
4749 Always leave events pending.
4750 (linux_wait_for_event_filtered): Pull all events out of the
4751 kernel, and leave them all pending.
4752 (count_events_callback, select_event_lwp_callback): Consider all
4754 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4755 (select_event_lwp): Only give preference to the stepping LWP in
4756 all-stop mode. Adjust comments.
4757 (ignore_event): New function.
4758 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4759 references to cancel_breakpoints. Adjust to renames. Also give
4760 equal priority to all LWPs that have had events in non-stop mode.
4761 If reporting a software breakpoint event, unadjust the LWP's PC.
4762 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4763 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4765 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4766 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4767 (linux_stopped_by_watchpoint): Adjust.
4768 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4769 * linux-low.h (enum lwp_stop_reason): New.
4770 (struct lwp_info) <stop_pc>: Adjust comment.
4771 <stopped_by_watchpoint>: Delete field.
4772 <stop_reason>: New field.
4773 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4774 * mem-break.c (software_breakpoint_inserted_here)
4775 (hardware_breakpoint_inserted_here): New function.
4776 * mem-break.h (software_breakpoint_inserted_here)
4777 (hardware_breakpoint_inserted_here): Declare.
4778 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4779 (cancel_breakpoints): Delete.
4780 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4781 (upload_fast_traceframes): Remove references to
4784 2015-01-09 Pedro Alves <palves@redhat.com>
4786 * thread-db.c (find_new_threads_callback): Ignore thread if the
4787 kernel thread ID is -1.
4789 2015-01-09 Pedro Alves <palves@redhat.com>
4791 * linux-low.c (linux_attach_fail_reason_string): Move to
4792 nat/linux-ptrace.c, and rename.
4793 (linux_attach_lwp): Update comment.
4794 (attach_proc_task_lwp_callback): New function.
4795 (linux_attach): Adjust to rename and use
4796 linux_proc_attach_tgid_threads.
4797 (linux_attach_fail_reason_string): Delete declaration.
4799 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4801 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4802 * server.c (gdbserver_version): Likewise.
4804 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4806 * remote-utils.c: Include ctype.h.
4807 (input_interrupt): Explicitly handle the case when the char
4808 received is the NUL byte. Improve the printing of non-ASCII
4811 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4813 * linux-low.c (linux_low_filter_event): Update call to
4814 linux_enable_event_reporting following the addition of
4815 a new parameter to that function.
4817 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4820 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4821 (AARCH64_FPCR_REGNO): Likewise.
4822 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4823 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4824 (aarch64_store_fpregset): Likewise.
4826 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4828 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4829 Remove FIXME comment about assumption about N.
4831 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4833 * configure.ac: If large-file support is disabled in GDBserver,
4834 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4835 * configure: Regenerate.
4837 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4839 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4840 warning upon ENODATA from ptrace.
4841 * linux-s390-low.c (s390_store_tdb): New.
4842 (s390_regsets): Add regset for NT_S390_TDB.
4844 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4846 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4847 without a fill_function.
4848 * linux-s390-low.c (s390_fill_last_break): Remove.
4849 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4850 (s390_arch_setup): Use regset's size instead of fill_function for
4853 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4855 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4856 the regset's store function when ptrace returned an error.
4857 * regcache.c (get_thread_regcache): Invalidate register cache
4858 before fetching inferior's registers.
4860 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4862 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4863 while-loop as for-loop.
4864 (regsets_store_inferior_registers): Likewise.
4866 2014-11-28 Yao Qi <yao@codesourcery.com>
4868 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4869 * config.in, configure: Re-generate.
4870 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4873 2014-11-21 Yao Qi <yao@codesourcery.com>
4875 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4876 (AC_CHECK_HEADERS): Remove malloc.h.
4877 * configure: Re-generated.
4878 * config.in: Re-generated.
4879 * server.h: Don't include alloca.h and malloc.h.
4880 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4881 Don't include malloc.h.
4883 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4885 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4886 corresponding ERRNO check in same block.
4888 2014-11-12 Pedro Alves <palves@redhat.com>
4890 * server.c (cont_thread): Update comment.
4891 (start_inferior, attach_inferior): No longer clear cont_thread.
4892 (handle_v_cont): No longer set cont_thread.
4893 (captured_main): Clear cont_thread each time a GDB connects.
4895 2014-11-12 Pedro Alves <palves@redhat.com>
4897 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4898 thread, and don't resume all threads if the Hc thread has exited.
4900 2014-11-12 Pedro Alves <palves@redhat.com>
4902 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4903 the process group instead of to a specific LWP.
4905 2014-10-15 Pedro Alves <palves@redhat.com>
4908 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4910 (arm_set_thread_context): Delete.
4911 (the_low_target): Adjust.
4912 * win32-i386-low.c (debug_registers_changed)
4913 (debug_registers_used): Delete.
4914 (update_debug_registers_callback): New function.
4915 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4916 needing to update their debug registers.
4917 (win32_get_current_dr): New function.
4918 (x86_dr_low_get_addr, x86_dr_low_get_control)
4919 (x86_dr_low_get_status): Fetch the debug register from the thread
4921 (i386_initial_stuff): Adjust.
4922 (i386_get_thread_context): Remove current_event parameter. Don't
4923 clear debug_registers_changed nor copy DR values to
4925 (i386_set_thread_context): Delete.
4926 (i386_prepare_to_resume): New function.
4927 (i386_thread_added): Mark the thread as needing to update irs
4929 (the_low_target): Remove i386_set_thread_context and install
4930 i386_prepare_to_resume.
4931 * win32-low.c (win32_get_thread_context): Adjust.
4932 (win32_set_thread_context): Use SetThreadContext
4934 (win32_prepare_to_resume): New function.
4935 (win32_require_context): New function, factored out from ...
4936 (thread_rec): ... this.
4937 (continue_one_thread): Call win32_prepare_to_resume on each thread
4938 we're about to continue.
4939 (win32_resume): Call win32_prepare_to_resume on the event thread.
4940 * win32-low.h (struct win32_thread_info)
4941 <debug_registers_changed>: New field.
4942 (struct win32_target_ops): Change prototype of set_thread_context,
4943 delete set_thread_context and add prepare_to_resume.
4944 (win32_require_context): New declaration.
4946 2014-10-08 Gary Benson <gbenson@redhat.com>
4948 * server.h: Do not include common-exceptions.h.
4950 2014-10-08 Gary Benson <gbenson@redhat.com>
4952 * server.h: Do not include cleanups.h.
4954 2014-09-30 James Hogan <james.hogan@imgtec.com>
4956 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4959 2014-09-23 Yao Qi <yao@codesourcery.com>
4961 * linux-low.c (lp_status_maybe_breakpoint): New function.
4962 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4963 (count_events_callback): Likewise.
4964 (select_event_lwp_callback): Likewise.
4965 (cancel_breakpoints_callback): Likewise.
4967 2014-09-19 Don Breazeal <donb@codesourcery.com>
4969 * linux-low.c (handle_extended_wait): Call
4970 linux_ptrace_get_extended_event.
4971 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4972 linux_is_extended_waitstatus.
4974 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4976 * Makefile.in (CPPFLAGS): Define.
4977 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4978 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4980 2014-09-16 Gary Benson <gbenson@redhat.com>
4982 * inferiors.h (current_inferior): Renamed as...
4983 (current_thread): New variable. All uses updated.
4984 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4985 (maybe_move_out_of_jump_pad): Likewise.
4986 (cancel_breakpoint): Likewise.
4987 (linux_low_filter_event): Likewise.
4988 (wait_for_sigstop): Likewise.
4989 (linux_resume_one_lwp): Likewise.
4990 (need_step_over_p): Likewise.
4991 (start_step_over): Likewise.
4992 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4993 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4994 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4995 and save_inferior as saved_thread.
4996 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4998 (regcache_invalidate_thread): Likewise.
4999 * remote-utils.c (prepare_resume_reply): Likewise.
5000 * thread-db.c (thread_db_get_tls_address): Likewise.
5001 (disable_thread_event_reporting): Likewise.
5002 (remove_thread_event_breakpoints): Likewise.
5003 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5005 * target.h (set_desired_inferior): Renamed as...
5006 (set_desired_thread): New declaration. All uses updated.
5007 * server.c (myresume): Updated comment to reference thread instead
5009 (handle_serial_event): Likewise.
5010 (handle_target_event): Likewise.
5012 2014-09-12 Tom Tromey <tromey@redhat.com>
5013 Gary Benson <gbenson@redhat.com>
5015 * regcache.h: Include common-regcache.h.
5016 (regcache_read_pc): Don't declare.
5017 * regcache.c (get_thread_regcache_for_ptid): New function.
5019 2014-09-11 Tom Tromey <tromey@redhat.com>
5020 Gary Benson <gbenson@redhat.com>
5022 * symbol.c: New file.
5023 * Makefile.in (SFILES): Add symbol.c.
5024 (OBS): Add symbol.o.
5026 2014-09-11 Gary Benson <gbenson@redhat.com>
5028 * target.c (target_stop_ptid, target_continue_ptid): New
5031 2014-09-11 Tom Tromey <tromey@redhat.com>
5032 Gary Benson <gbenson@redhat.com>
5034 * target.h: Include target/target.h.
5035 * target.c (target_read_memory, target_read_uint32)
5036 (target_write_memory): New functions.
5038 2014-09-11 Gary Benson <gbenson@redhat.com>
5040 * server.h (debug_hw_points): Don't declare.
5041 * server.c (debug_hw_points): Don't define. Replace all uses
5042 with show_debug_regs.
5043 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5044 all uses with show_debug_regs.
5046 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5048 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5049 endianness into account.
5050 (ppc_supply_ptrace_register): Likewise.
5052 2014-09-03 James Hogan <james.hogan@imgtec.com>
5054 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5055 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5057 2014-09-03 Gary Benson <gbenson@redhat.com>
5059 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5060 ALL_DEBUG_ADDRESS_REGISTERS.
5062 2014-09-02 Gary Benson <gbenson@redhat.com>
5064 * i386-low.h: Renamed as...
5065 * x86-low.h: New file. All type, function and variable name
5066 prefixes changed from "i386_" to "x86_". All references updated.
5067 * i386-low.c: Renamed as...
5068 * x86-low.c: New file. All type, function and variable name
5069 prefixes changed from "i386_" to "x86_". All references updated.
5071 2014-09-02 Gary Benson <gbenson@redhat.com>
5073 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5074 (x86_linux_new_thread): Likewise.
5076 2014-08-29 Gary Benson <gbenson@redhat.com>
5078 * server.h (setjmp.h): Do not include.
5079 (toplevel): Do not declare.
5080 (common-exceptions.h): Include.
5081 (cleanups.h): Likewise.
5082 * server.c (toplevel): Do not define.
5083 (exit_code): New static global.
5084 (detach_or_kill_for_exit_cleanup): New function.
5085 (main): New function. Original main renamed to...
5086 (captured_main): New function.
5087 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5089 2014-08-29 Gary Benson <gbenson@redhat.com>
5091 * Makefile.in (SFILES): Add common/common-exceptions.c.
5092 (OBS): Add common-exceptions.o.
5093 (common-exceptions.o): New rule.
5094 * utils.c (prepare_to_throw_exception): New function.
5096 2014-08-29 Gary Benson <gbenson@redhat.com>
5098 * config.in: Regenerate.
5099 * configure: Likewise.
5101 2014-08-29 Gary Benson <gbenson@redhat.com>
5103 * Makefile.in (SFILES): Add common/cleanups.c.
5105 (cleanups.o): New rule.
5107 2014-08-29 Gary Benson <gbenson@redhat.com>
5109 * utils.c (internal_vwarning): New function.
5111 2014-08-28 Gary Benson <gbenson@redhat.com>
5113 * utils.h (fatal): Remove declaration.
5114 * utils.c (fatal): Remove function.
5116 2014-08-28 Gary Benson <gbenson@redhat.com>
5118 * tracepoint.c (gdb_agent_init): Replace fatal with
5120 (initialize_tracepoint): Likewise.
5122 2014-08-28 Gary Benson <gbenson@redhat.com>
5124 * remote-utils.c (remote_prepare): Replace fatal with error.
5126 2014-08-28 Gary Benson <gbenson@redhat.com>
5128 * linux-low.c (linux_async): Replace fatal with warning.
5130 (linux_start_non_stop): Return -1 if linux_async failed.
5132 2014-08-28 Gary Benson <gbenson@redhat.com>
5134 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5136 (i386_dr_low_get_addr): Remove vague comment.
5137 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5140 2014-08-28 Gary Benson <gbenson@redhat.com>
5142 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5143 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5145 (linux_resume_one_lwp): Likewise.
5146 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5148 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5149 with internal_error.
5150 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5151 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5152 (find_register_by_name): Replace fatal with internal_error.
5153 (find_regno): Likewise.
5154 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5155 * thread-db.c (thread_db_create_event): Likewise.
5156 (thread_db_load_search): Likewise.
5157 (try_thread_db_load_1): Likewise.
5158 * tracepoint.c (get_jump_space_head): Replace fatal with
5160 (claim_trampoline_space): Likewise.
5161 (have_fast_tracepoint_trampoline_buffer): Likewise.
5162 (cmd_qtstart): Likewise.
5163 (stop_tracing): Likewise.
5164 (fast_tracepoint_collecting): Likewise.
5165 (target_malloc): Likewise.
5166 (download_tracepoint): Likewise.
5167 (download_trace_state_variables): Replace check with gdb_assert.
5168 (upload_fast_traceframes): Replace fatal with internal_error.
5170 2014-08-19 Tom Tromey <tromey@redhat.com>
5171 Gary Benson <gbenson@redhat.com>
5173 * Makefile.in (SFILES): Add common/common-debug.c.
5174 (OBS): Add common-debug.o.
5175 (common-debug.o): New rule.
5176 * debug.h (debug_printf): Don't declare.
5177 * debug.c (debug_printf): Renamed and rewritten as...
5178 (debug_vprintf): New function.
5180 2014-08-19 Gary Benson <gbenson@redhat.com>
5182 * utils.h: Do not include print-utils.h.
5184 2014-08-19 Tom Tromey <tromey@redhat.com>
5185 Gary Benson <gbenson@redhat.com>
5187 * server.h: Add static assertion.
5188 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5190 2014-08-19 Tom Tromey <tromey@redhat.com>
5191 Gary Benson <gbenson@redhat.com>
5193 * Makefile.in (SFILES): Add common/errors.c.
5194 (OBS): Add errors.o.
5195 (IPA_OBS): Add errors-ipa.o.
5196 (errors.o): New rule.
5197 (errors-ipa.o): Likewise.
5198 * utils.h (perror_with_name, error, warning): Don't declare.
5199 * utils.c (warning): Renamed and rewritten as...
5200 (vwarning): New function.
5201 (error): Renamed and rewritten as...
5202 (verror): New function.
5203 (internal_error): Renamed and rewritten as...
5204 (internal_verror): New function.
5206 2014-08-07 Gary Benson <gbenson@redhat.com>
5208 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5209 * configure: Regenerate.
5210 * config.in: Likewise.
5211 * server.h: Do not include errno.h.
5212 * event-loop.c: Likewise.
5213 * hostio-errno.c: Likewise.
5214 * linux-low.c: Likewise.
5215 * remote-utils.c: Likewise.
5216 * spu-low.c: Likewise.
5217 * utils.c: Likewise.
5218 * gdbreplay.c: Unconditionally include errno.h.
5220 2014-08-07 Gary Benson <gbenson@redhat.com>
5222 * server.h: Do not include string.h.
5223 * event-loop.c: Likewise.
5224 * linux-low.c: Likewise.
5225 * regcache.c: Likewise.
5226 * remote-utils.c: Likewise.
5227 * spu-low.c: Likewise.
5228 * utils.c: Likewise.
5230 2014-08-07 Gary Benson <gbenson@redhat.com>
5232 * server.h: Do not include gdb_assert.h.
5234 2014-08-07 Gary Benson <gbenson@redhat.com>
5236 * server.h: Do not include common-utils.h.
5238 2014-08-07 Gary Benson <gbenson@redhat.com>
5240 * server.h: Do not include ptid.h.
5241 * notif.h: Likewise.
5243 2014-08-07 Gary Benson <gbenson@redhat.com>
5245 * server.h: Do not include gdb_locale.h.
5247 2014-08-07 Gary Benson <gbenson@redhat.com>
5249 * server.h: Do not include gdb/signals.h.
5250 * win32-low.c: Likewise.
5252 2014-08-07 Gary Benson <gbenson@redhat.com>
5254 * server.h: Do not include pathmax.h.
5256 2014-08-07 Gary Benson <gbenson@redhat.com>
5258 * server.h: Do not include libiberty.h.
5259 * linux-bfin-low.c: Likewise.
5261 2014-08-07 Gary Benson <gbenson@redhat.com>
5263 * server.h: Do not include ansidecl.h.
5265 2014-08-07 Gary Benson <gbenson@redhat.com>
5267 * linux-x86-low.c: Do not include stddef.h.
5268 * lynx-ppc-low.c: Likewise.
5269 * tracepoint.c: Likewise.
5271 2014-08-07 Gary Benson <gbenson@redhat.com>
5273 * server.h: Do not include stdarg.h.
5274 * nto-low.c: Likewise.
5276 2014-08-07 Gary Benson <gbenson@redhat.com>
5278 * server.h: Do not include stdlib.h.
5279 * inferiors.c: Likewise.
5280 * linux-low.c: Likewise.
5281 * regcache.c: Likewise.
5282 * spu-low.c: Likewise.
5283 * tracepoint.c: Likewise.
5284 * utils.c: Likewise.
5286 2014-08-07 Gary Benson <gbenson@redhat.com>
5288 * server.h: Do not include stdio.h.
5289 * linux-low.c: Likewise.
5290 * remote-utils.c: Likewise.
5291 * spu-low.c: Likewise.
5292 * utils.c: Likewise.
5293 * wincecompat.c: Likewise.
5295 2014-08-06 Gary Benson <gbenson@redhat.com>
5297 * regcache.c (init_register_cache): Move conditionals inside if.
5299 2014-08-06 Gary Benson <gbenson@redhat.com>
5301 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5303 2014-07-31 Gary Benson <gbenson@redhat.com>
5305 * ax.h: Do not include server.h.
5306 * gdbthread.h: Likewise.
5307 * lynx-low.h: Likewise.
5308 * notif.h: Likewise.
5310 2014-07-30 Gary Benson <gbenson@redhat.com>
5312 * server.h: Include common-defs.h.
5313 Do not include config.h or build-gnulib-gdbserver/config.h.
5315 2014-07-30 Gary Benson <gbenson@redhat.com>
5317 * hostio-errno.c: Move server.h to top of includes list.
5318 * inferiors.c: Likewise.
5319 * linux-x86-low.c: Likewise.
5320 * notif.c: Include server.h.
5322 2014-07-24 Tom Tromey <tromey@redhat.com>
5323 Gary Benson <gbenson@redhat.com>
5325 * server.h (CORE_ADDR): Now unsigned.
5327 2014-07-16 Pedro Alves <palves@redhat.com>
5329 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5331 2014-07-15 Pedro Alves <palves@redhat.com>
5333 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5336 2014-07-11 Pedro Alves <palves@redhat.com>
5338 * linux-low.c (kill_wait_lwp): New function, based on
5339 kill_one_lwp_callback, but use my_waitpid directly.
5340 (kill_one_lwp_callback, linux_kill): Use it.
5342 2014-06-23 Pedro Alves <palves@redhat.com>
5344 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5345 before setting DR0..DR3.
5347 2014-06-20 Gary Benson <gbenson@redhat.com>
5349 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5350 * configure: Regenerated.
5351 * config.in: Likewise.
5353 2014-06-20 Gary Benson <gbenson@redhat.com>
5355 * Makefile.in (SFILES): Update locations for files moved
5357 (object file files): Reordered.
5359 2014-06-20 Gary Benson <gbenson@redhat.com>
5361 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5362 (i386_dr_low_set_addr): Likewise.
5363 (i386_dr_low_get_addr): Likewise.
5364 (i386_dr_low_can_set_control): Likewise.
5365 (i386_dr_low_set_control): Likewise.
5366 (i386_dr_low_get_control): Likewise.
5367 (i386_dr_low_get_status): Likewise.
5368 (i386_get_debug_register_length): Likewise.
5369 * linux-x86-low.c (i386_dr_low_set_addr):
5370 Changed signature. Made static.
5371 (i386_dr_low_get_addr): Likewise.
5372 (i386_dr_low_set_control): Likewise.
5373 (i386_dr_low_get_control): Likewise.
5374 (i386_dr_low_get_status): Likewise.
5375 (i386_dr_low): New global variable.
5376 * win32-i386-low.c (i386_dr_low_set_addr):
5377 Changed signature. Made static.
5378 (i386_dr_low_get_addr): Likewise.
5379 (i386_dr_low_set_control): Likewise.
5380 (i386_dr_low_get_control): Likewise.
5381 (i386_dr_low_get_status): Likewise.
5382 (i386_dr_low): New global variable.
5384 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5386 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5387 * Makefile.in (AR, AR_FLAGS): Define.
5388 * configure: Regenerate.
5390 2014-06-19 Gary Benson <gbenson@redhat.com>
5392 * Makefile.in (i386-dregs.o): New rule.
5393 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5394 * i386-low.c (target.h): Remove include.
5395 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5396 (DR_CONTROL_SHIFT): Likewise.
5397 (DR_CONTROL_SIZE): Likewise.
5398 (DR_RW_EXECUTE): Likewise.
5399 (DR_RW_WRITE): Likewise.
5400 (DR_RW_READ): Likewise.
5401 (DR_RW_IORW): Likewise.
5402 (DR_LEN_1): Likewise.
5403 (DR_LEN_2): Likewise.
5404 (DR_LEN_4): Likewise.
5405 (DR_LEN_8): Likewise.
5406 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5407 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5408 (DR_ENABLE_SIZE): Likewise.
5409 (DR_LOCAL_SLOWDOWN): Likewise.
5410 (DR_GLOBAL_SLOWDOWN): Likewise.
5411 (DR_CONTROL_RESERVED): Likewise.
5412 (I386_DR_CONTROL_MASK): Likewise.
5413 (I386_DR_VACANT): Likewise.
5414 (I386_DR_LOCAL_ENABLE): Likewise.
5415 (I386_DR_GLOBAL_ENABLE): Likewise.
5416 (I386_DR_DISABLE): Likewise.
5417 (I386_DR_SET_RW_LEN): Likewise.
5418 (I386_DR_GET_RW_LEN): Likewise.
5419 (I386_DR_WATCH_HIT): Likewise.
5420 (i386_wp_op_t): Likewise.
5421 (i386_show_dr): Likewise.
5422 (i386_length_and_rw_bits): Likewise.
5423 (i386_insert_aligned_watchpoint): Likewise.
5424 (i386_remove_aligned_watchpoint): Likewise.
5425 (i386_handle_nonaligned_watchpoint): Likewise.
5426 i386_update_inferior_debug_regs(): Likewise.
5427 (i386_dr_insert_watchpoint): Likewise.
5428 (i386_dr_remove_watchpoint): Likewise.
5429 (i386_dr_region_ok_for_watchpoint): Likewise.
5430 (i386_dr_stopped_data_address): Likewise.
5431 (i386_dr_stopped_by_watchpoint): Likewise.
5433 2014-06-19 Gary Benson <gbenson@redhat.com>
5435 * i386-low.c (i386_dr_show): Renamed to
5436 i386_show_dr and made static. All uses updated.
5437 (i386_dr_length_and_rw_bits): Renamed to
5438 i386_length_and_rw_bits and made static.
5440 (i386_dr_insert_aligned_watchpoint): Renamed to
5441 i386_insert_aligned_watchpoint and made static.
5443 (i386_dr_remove_aligned_watchpoint): Renamed to
5444 i386_remove_aligned_watchpoint and made static.
5446 (i386_dr_update_inferior_debug_regs): Renamed to
5447 i386_update_inferior_debug_regs and made static.
5450 2014-06-18 Gary Benson <gbenson@redhat.com>
5452 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5453 (i386_dr_low_can_set_control): Likewise.
5454 (i386_get_debug_register_length): Likewise.
5455 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5456 (i386_dr_low_can_set_control): Likewise.
5457 (i386_get_debug_register_length): Likewise.
5459 2014-06-17 Gary Benson <gbenson@redhat.com>
5461 * i386-low.h (i386-dregs.h): New include.
5462 (DR_FIRSTADDR): Now in i386-dregs.h.
5463 (DR_LASTADDR): Likewise.
5464 (DR_NADDR): Likewise.
5465 (DR_STATUS): Likewise.
5466 (DR_CONTROL): Likewise.
5467 (i386_debug_reg_state): Likewise.
5468 (i386_dr_insert_watchpoint): Likewise.
5469 (i386_dr_remove_watchpoint): Likewise.
5470 (i386_dr_region_ok_for_watchpoint): Likewise.
5471 (i386_dr_stopped_data_address): Likewise.
5472 (i386_dr_stopped_by_watchpoint): Likewise.
5473 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5475 2014-06-18 Gary Benson <gbenson@redhat.com>
5477 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5478 i386_dr_insert_watchpoint.
5479 (i386_low_remove_watchpoint): Renamed to
5480 i386_dr_remove_watchpoint.
5481 (i386_low_region_ok_for_watchpoint): Renamed to
5482 i386_dr_region_ok_for_watchpoint.
5483 (i386_low_stopped_data_address): Renamed to
5484 i386_dr_stopped_data_address.
5485 (i386_low_stopped_by_watchpoint): Renamed to
5486 i386_dr_stopped_by_watchpoint.
5487 * i386-low.c (i386_show_dr): Renamed to
5488 i386_dr_show and made nonstatic. All uses updated.
5489 (i386_length_and_rw_bits): Renamed to
5490 i386_dr_length_and_rw_bits and made nonstatic.
5492 (i386_insert_aligned_watchpoint): Renamed to
5493 i386_dr_insert_aligned_watchpoint and made nonstatic.
5495 (i386_remove_aligned_watchpoint): Renamed to
5496 i386_dr_remove_aligned_watchpoint and made nonstatic.
5498 (i386_update_inferior_debug_regs): Renamed to
5499 i386_dr_update_inferior_debug_regs and made nonstatic.
5501 (i386_low_insert_watchpoint): Renamed to
5502 i386_dr_insert_watchpoint. All uses updated.
5503 (i386_low_remove_watchpoint): Renamed to
5504 i386_dr_remove_watchpoint. All uses updated.
5505 (i386_low_region_ok_for_watchpoint): Renamed to
5506 i386_dr_region_ok_for_watchpoint. All uses updated.
5507 (i386_low_stopped_data_address): Renamed to
5508 i386_dr_stopped_data_address. All uses updated.
5509 (i386_low_stopped_by_watchpoint): Renamed to
5510 i386_dr_stopped_by_watchpoint. All uses updated.
5512 2014-06-18 Gary Benson <gbenson@redhat.com>
5514 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5515 (i386_dr_low_can_set_control): Likewise.
5516 (i386_insert_aligned_watchpoint): New check.
5518 2014-06-18 Gary Benson <gbenson@redhat.com>
5520 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5523 2014-06-18 Gary Benson <gbenson@redhat.com>
5525 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5526 instead of fatal and error.
5527 (i386_handle_nonaligned_watchpoint): Likewise.
5529 2014-06-18 Gary Benson <gbenson@redhat.com>
5531 * i386-low.c (i386_get_debug_register_length): New macro.
5532 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5533 (i386_show_dr): Use debug_printf instead of fprintf. Use
5534 phex to format values.
5536 2014-06-18 Gary Benson <gbenson@redhat.com>
5538 * i386-low.h: Comment changes.
5539 * i386-low.c: Likewise.
5541 2014-06-18 Gary Benson <gbenson@redhat.com>
5543 * i386-low.c: Whitespace changes.
5545 2014-06-12 Tom Tromey <tromey@redhat.com>
5547 * utils.c (freeargv): Remove.
5549 2014-06-12 Tom Tromey <tromey@redhat.com>
5551 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5552 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5553 (parse_debug_format_options): Likewise.
5554 (gdbserver_usage): Likewise.
5555 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5556 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5557 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5559 ($(LIBGNU)): Depend on libiberty.
5560 (all-lib): Recurse into all subdirs.
5561 (install-only): Invoke "install" target in subdirs.
5562 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5564 * configure: Rebuild.
5565 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5566 for vasprintf, vsnprintf, or gettimeofday.
5567 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5570 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5572 * development.sh: Delete.
5573 * Makefile.in (config.status): Adjust dependency on development.sh.
5574 * configure.ac: Adjust development.sh source call.
5575 * configure: Regenerate.
5577 2014-06-02 Pedro Alves <palves@redhat.com>
5579 * ax.c (gdb_free_agent_expr): New function.
5580 * ax.h (gdb_free_agent_expr): New declaration.
5581 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5583 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5585 (clear_breakpoint_conditions_and_commands): New function.
5586 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5587 (clear_breakpoint_conditions_and_commands): New declaration.
5589 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5591 * linux-aarch64-low.c (asm/ptrace.h): Include.
5593 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5595 Fix TLS access for -static -pthread.
5596 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5597 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5598 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5600 2014-05-20 Pedro Alves <palves@redhat.com>
5602 * linux-aarch64-low.c (aarch64_insert_point)
5603 (aarch64_remove_point): No longer check whether the type is
5604 supported here. Adjust to new interface.
5605 (the_low_target): Install aarch64_supports_z_point_type as
5606 supports_z_point_type method.
5607 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5608 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5609 instead of a Z packet char. Adjust.
5610 (arm_supports_z_point_type): New function.
5611 (arm_insert_point, arm_remove_point): Adjust to new interface.
5612 (the_low_target): Install arm_supports_z_point_type.
5613 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5614 (cris_insert_point, cris_remove_point): Adjust to new interface.
5615 Don't check whether the type is supported here.
5616 (the_low_target): Install cris_supports_z_point_type.
5617 * linux-low.c (linux_supports_z_point_type): New function.
5618 (linux_insert_point, linux_remove_point): Adjust to new interface.
5619 * linux-low.h (struct linux_target_ops) <insert_point,
5620 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5621 raw_breakpoint pointer parameter.
5622 <supports_z_point_type>: New method.
5623 * linux-mips-low.c (mips_supports_z_point_type): New function.
5624 (mips_insert_point, mips_remove_point): Adjust to new interface.
5625 Use mips_supports_z_point_type.
5626 (the_low_target): Install mips_supports_z_point_type.
5627 * linux-ppc-low.c (the_low_target): Install NULL as
5628 supports_z_point_type method.
5629 * linux-s390-low.c (the_low_target): Install NULL as
5630 supports_z_point_type method.
5631 * linux-sparc-low.c (the_low_target): Install NULL as
5632 supports_z_point_type method.
5633 * linux-x86-low.c (x86_supports_z_point_type): New function.
5634 (x86_insert_point): Adjust to new insert_point interface. Use
5635 insert_memory_breakpoint. Adjust to new
5636 i386_low_insert_watchpoint interface.
5637 (x86_remove_point): Adjust to remove_point interface. Use
5638 remove_memory_breakpoint. Adjust to new
5639 i386_low_remove_watchpoint interface.
5640 (the_low_target): Install x86_supports_z_point_type.
5641 * lynx-low.c (lynx_target_ops): Install NULL as
5642 supports_z_point_type callback.
5643 * nto-low.c (nto_supports_z_point_type): New.
5644 (nto_insert_point, nto_remove_point): Adjust to new interface.
5645 (nto_target_ops): Install nto_supports_z_point_type.
5646 * mem-break.c: Adjust intro comment.
5647 (struct raw_breakpoint) <raw_type, size>: New fields.
5648 <inserted>: Update comment.
5649 <shlib_disabled>: Delete field.
5650 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5651 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5652 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5653 (raw_bkpt_type_to_target_hw_bp_type): New function.
5654 (find_enabled_raw_code_breakpoint_at): New function.
5655 (find_raw_breakpoint_at): New type and size parameters. Use them.
5656 (insert_memory_breakpoint): New function, based off
5657 set_raw_breakpoint_at.
5658 (remove_memory_breakpoint): New function.
5659 (set_raw_breakpoint_at): Reimplement.
5660 (set_breakpoint): New, based on set_breakpoint_at.
5661 (set_breakpoint_at): Reimplement.
5662 (delete_raw_breakpoint): Go through the_target->remove_point
5663 instead of assuming memory breakpoints.
5664 (find_gdb_breakpoint_at): Delete.
5665 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5666 (find_gdb_breakpoint): New function.
5667 (set_gdb_breakpoint_at): Delete.
5668 (z_type_supported): New function.
5669 (set_gdb_breakpoint_1): New function, loosely based off
5670 set_gdb_breakpoint_at.
5671 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5672 (delete_gdb_breakpoint_at): Delete.
5673 (delete_gdb_breakpoint_1): New function, loosely based off
5674 delete_gdb_breakpoint_at.
5675 (delete_gdb_breakpoint): New function.
5676 (clear_gdb_breakpoint_conditions): Rename to ...
5677 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5679 (add_condition_to_breakpoint): Make static.
5680 (add_breakpoint_condition): Take a struct breakpoint pointer
5681 instead of an address. Adjust.
5682 (gdb_condition_true_at_breakpoint): Rename to ...
5683 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5685 (gdb_condition_true_at_breakpoint): Reimplement.
5686 (add_breakpoint_commands): Take a struct breakpoint pointer
5687 instead of an address. Adjust.
5688 (gdb_no_commands_at_breakpoint): Rename to ...
5689 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5690 parameter. Return true if no breakpoint was found. Change debug
5692 (gdb_no_commands_at_breakpoint): Reimplement.
5693 (run_breakpoint_commands): Rename to ...
5694 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5695 and change return type to boolean.
5696 (run_breakpoint_commands): New function.
5697 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5698 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5699 breakpoint. Go through the_target->remove_point instead of
5700 assuming memory breakpoint.
5701 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5702 software and hardware breakpoints.
5703 (reinsert_raw_breakpoint): Go through the_target->insert_point
5704 instead of assuming memory breakpoint.
5705 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5706 software and hardware breakpoints.
5707 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5708 Check both software and hardware breakpoints.
5709 (validate_inserted_breakpoint): Assert the breakpoint is a
5710 software breakpoint. Set the inserted flag to -1 instead of
5711 setting shlib_disabled.
5712 (delete_disabled_breakpoints): Adjust.
5713 (validate_breakpoints): Only validate software breakpoints.
5714 Adjust to inserted flag change.
5715 (check_mem_read, check_mem_write): Skip breakpoint types other
5716 than software breakpoints. Adjust to inserted flag change.
5717 * mem-break.h (enum raw_bkpt_type): New enum.
5718 (raw_breakpoint, struct process_info): Forward declare.
5719 (Z_packet_to_target_hw_bp_type): Delete declaration.
5720 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5721 (set_gdb_breakpoint, delete_gdb_breakpoint)
5722 (clear_breakpoint_conditions): New declarations.
5723 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5724 (breakpoint_inserted_here): Update comment.
5725 (add_breakpoint_condition, add_breakpoint_commands): Replace
5726 address parameter with a breakpoint pointer parameter.
5727 (gdb_breakpoint_here): Update comment.
5728 (delete_gdb_breakpoint_at): Delete.
5729 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5730 * server.c (process_point_options): Take a struct breakpoint
5731 pointer instead of an address. Adjust.
5732 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5733 delete_gdb_breakpoint.
5734 * spu-low.c (spu_target_ops): Install NULL as
5735 supports_z_point_type method.
5736 * target.h: Include mem-break.h.
5737 (struct target_ops) <prepare_to_access_memory>: Update comment.
5738 <supports_z_point_type>: New field.
5739 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5740 instead of a char. Also take a raw breakpoint pointer.
5741 * win32-arm-low.c (the_low_target): Install NULL as
5742 supports_z_point_type.
5743 * win32-i386-low.c (i386_supports_z_point_type): New function.
5744 (i386_insert_point, i386_remove_point): Adjust to new interface.
5745 (the_low_target): Install i386_supports_z_point_type.
5746 * win32-low.c (win32_supports_z_point_type): New function.
5747 (win32_insert_point, win32_remove_point): Adjust to new interface.
5748 (win32_target_ops): Install win32_supports_z_point_type.
5749 * win32-low.h (struct win32_target_ops):
5750 <supports_z_point_type>: New method.
5751 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5752 instead of a char. Also take a raw breakpoint pointer.
5754 2014-05-20 Pedro Alves <palves@redhat.com>
5756 * mem-break.h: Include break-common.h.
5757 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5758 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5759 (Z_packet_to_target_hw_bp_type): New declaration.
5760 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5761 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5762 (Z_PACKET_ACCESS_WP): Delete macros.
5763 (Z_packet_to_hw_type): Delete function.
5764 * i386-low.h: Don't include break-common.h here.
5765 (Z_packet_to_hw_type): Delete declaration.
5766 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5767 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5768 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5769 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5770 * linux-aarch64-low.c: Don't include break-common.h here.
5771 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5772 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5773 (Z_packet_to_target_hw_bp_type): Delete function.
5774 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5776 (mips_insert_point, mips_remove_point): Use
5777 Z_packet_to_target_hw_bp_type.
5779 2014-05-20 Pedro Alves <palves@redhat.com>
5781 * linux-aarch64-low.c: Include break-common.h.
5782 (enum target_point_type): Delete.
5783 (Z_packet_to_point_type): Rename to ...
5784 (Z_packet_to_target_hw_bp_type): ... this, and return a
5785 target_hw_bp_type instead.
5786 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5787 instead of an enum target_point_type.
5788 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5790 (aarch64_dr_state_insert_one_point)
5791 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5792 (aarch64_handle_aligned_watchpoint)
5793 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5794 Take an enum target_hw_bp_type instead of an enum
5796 (aarch64_supports_z_point_type): New function.
5797 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5798 use Z_packet_to_target_hw_bp_type.
5800 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5802 * configure.ac: Only use -Werror by default when DEVELOPMENT
5804 * configure: Regenerate.
5806 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5808 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5809 * linux-x86-low.c (X86_64_USER_REGS): New.
5810 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5812 2014-04-28 Yao Qi <yao@codesourcery.com>
5814 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5817 2014-04-25 Pedro Alves <palves@redhat.com>
5820 * linux-low.c (linux_attach_fail_reason_string): New function.
5821 (linux_attach_lwp): Delete.
5822 (linux_attach_lwp_1): Rename to ...
5823 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5824 argument. Remove "initial" parameter. Return int instead of
5825 void. Don't error or warn here.
5826 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5827 failure to attach to the tgid. Call warning when failing to
5829 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5830 argument. Remove "initial" parameter. Return int instead of
5831 void. Don't error or warn here.
5832 (linux_attach_fail_reason_string): New declaration.
5833 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5834 interface change. Use linux_attach_fail_reason_string.
5836 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5837 Walfred Tedeschi <walfred.tedeschi@intel.com>
5839 * Makefile.in: Added rules to handle new files
5840 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5841 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5842 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5843 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5844 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5845 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5847 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5848 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5849 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5850 i386/x32-avx512.xml.
5851 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5853 i386/x32-avx512-linux.xml.
5854 * i387-fp.c (num_avx512_k_registers): New constant for number
5856 (num_avx512_zmmh_low_registers): New constant for number of
5857 lower ZMM registers (0-15).
5858 (num_avx512_zmmh_high_registers): New constant for number of
5859 higher ZMM registers (16-31).
5860 (num_avx512_ymmh_registers): New contant for number of higher
5861 YMM registers (ymm16-31 added by avx521 on x86_64).
5862 (num_avx512_xmm_registers): New constant for number of higher
5863 XMM registers (xmm16-31 added by AVX512 on x86_64).
5864 (struct i387_xsave): Add space for AVX512 registers.
5865 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5866 Add code to handle AVX512 registers.
5867 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5868 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5869 prototypei from generated file.
5870 (tdesc_amd64_avx512_linux): Likewise.
5871 (init_registers_x32_avx512_linux): Likewise.
5872 (tdesc_x32_avx512_linux): Likewise.
5873 (init_registers_i386_avx512_linux): Likewise.
5874 (tdesc_i386_avx512_linux): Likewise.
5875 (x86_64_regmap): Add AVX512 registers.
5876 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5878 (initialize_low_arch): Add code to initialize AVX512 registers.
5880 2014-04-23 Pedro Alves <palves@redhat.com>
5882 * mem-break.c (find_gdb_breakpoint_at): Make static.
5883 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5885 2014-04-23 Pedro Alves <palves@redhat.com>
5887 * i386-low.c: Don't include break-common.h here.
5888 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5889 prototype to take target_hw_bp_type as argument instead of a Z
5891 * i386-low.h: Include break-common.h here.
5892 (Z_packet_to_hw_type): Declare.
5893 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5895 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5896 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5897 (x86_remove_point): Convert the packet number to a
5898 target_hw_bp_type before calling i386_low_remove_watchpoint.
5899 * win32-i386-low.c (i386_insert_point): Convert the packet number
5900 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5901 (i386_remove_point): Convert the packet number to a
5902 target_hw_bp_type before calling i386_low_remove_watchpoint.
5904 2014-04-23 Pedro Alves <palves@redhat.com>
5906 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5908 2014-04-10 Pedro Alves <palves@redhat.com>
5910 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5911 Check if the condition or command is NULL before checking if the
5912 breakpoint is known. On success, return true.
5913 * mem-break.h (add_breakpoint_condition): Document return.
5914 (add_breakpoint_commands): Add describing comment.
5915 * server.c (skip_to_semicolon): New function.
5916 (process_point_options): Use it.
5918 2014-04-09 Pedro Alves <palves@redhat.com>
5920 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5923 2014-02-27 Pedro Alves <palves@redhat.com>
5926 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5928 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5930 (last_thread_of_process_p): Take a PID argument instead of a
5932 (linux_wait_for_lwp): Delete.
5933 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5935 (linux_low_filter_event): New function, party factored out from
5936 linux_wait_for_event.
5937 (linux_wait_for_event): Rename to ...
5938 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5939 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5940 sigsuspend. Check for zombie leaders.
5941 (linux_wait_for_event): Reimplement as wrapper around
5942 linux_wait_for_event_filtered.
5943 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5944 a normal or signal exit is seen, it's the whole process exiting.
5945 (wait_for_sigstop): No longer a for_each_inferior callback.
5946 Rewrite on top of linux_wait_for_event_filtered.
5947 (stop_all_lwps): Call wait_for_sigstop directly.
5948 * server.c (resume, handle_target_event): Handle
5949 TARGET_WAITKIND_NO_RESUMED.
5951 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5953 * win32-low.c (psapi_get_dll_name,
5954 * win32_CreateToolhelp32Snapshot): Delete.
5955 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5956 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5958 (handle_load_dll): Add function description.
5959 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5961 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5963 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5965 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5966 base address when calling win32_add_one_solib.
5967 (handle_load_dll): Delete local variable load_addr.
5968 Remove 0x1000 offset applied to DLL base address when calling
5969 win32_add_one_solib.
5970 (handle_unload_dll): Add comment.
5972 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5974 * win32-low.c (win32_add_all_dlls): Renames
5975 win32_ensure_ntdll_loaded. Rewrite function documentation.
5976 Adjust implementation to always load all DLLs.
5977 Add 0x1000 offset to DLL base address when calling
5978 win32_add_one_solib.
5979 (child_initialization_done): New static global.
5980 (do_initial_child_stuff): Set child_initialization_done to
5981 zero during child initialization, and 1 after. Replace call
5982 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5984 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5985 (handle_unload_dll): Add function documentation.
5986 (get_child_debug_event): Ignore load and unload DLL events
5987 during child initialization.
5989 2014-02-20 Doug Evans <dje@google.com>
5991 Remove global all_lwps.
5992 * inferiors.h (ptid_of): Move here from linux-low.h.
5993 (pid_of, lwpid_of): Ditto.
5994 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5995 parameter is a struct thread_info * now.
5996 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5997 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5998 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6000 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6001 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6002 * linux-arm-low.c (update_registers_callback): Update, "entry"
6003 parameter is a struct thread_info * now.
6004 Fetch lwpid from current_inferior directly.
6005 (arm_insert_point): Pass &all_threads to find_inferior instead of
6007 (arm_remove_point): Ditto.
6008 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6009 (arm_prepare_to_resume): Fetch pid from thread.
6010 (arm_read_description): Fetch lwpid from current_inferior directly.
6011 * linux-low.c (all_lwps): Delete.
6012 (delete_lwp): Delete call to remove_inferior.
6013 (handle_extended_wait): Fetch lwpid from thread.
6014 (add_lwp): Don't set lwp->entry.id. Remove call to
6015 add_inferior_to_list.
6016 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6017 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6018 (kill_one_lwp_callback): Ditto.
6019 (linux_kill): Don't dereference NULL pointer.
6020 Fetch ptid,lwpid from thread.
6021 (get_detach_signal): Fetch ptid from thread.
6022 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6023 Simplify call to regcache_invalidate_thread.
6024 (delete_lwp_callback): Update, "entry" parameter is a
6025 struct thread_info * now. Fetch pid from thread.
6026 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6027 (status_pending_p_callback): Update, "entry" parameter is a
6028 struct thread_info * now. Fetch ptid from thread.
6029 (find_lwp_pid): Update, "entry" parameter is a
6030 struct thread_info * now.
6031 (linux_wait_for_lwp): Fetch pid from thread.
6032 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6033 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6034 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6035 (dequeue_one_deferred_signal): Ditto.
6036 (cancel_breakpoint): Fetch ptid from current_inferior.
6037 (linux_wait_for_event): Pass &all_threads to find_inferior,
6038 not &all_lwps. Fetch ptid, lwpid from thread.
6039 (count_events_callback): Update, "entry" parameter is a
6040 struct thread_info * now.
6041 (select_singlestep_lwp_callback): Ditto.
6042 (select_event_lwp_callback): Ditto.
6043 (cancel_breakpoints_callback): Ditto.
6044 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6046 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6047 (unsuspend_one_lwp): Update, "entry" parameter is a
6048 struct thread_info * now.
6049 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6051 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6052 Fetch lwpid from thread, not lwp.
6053 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6054 Pass &all_threads to find_inferior, not &all_lwps.
6055 (send_sigstop): Fetch lwpid from thread, not lwp.
6056 (send_sigstop_callback): Update, "entry" parameter is a
6057 struct thread_info * now.
6058 (suspend_and_send_sigstop_callback): Ditto.
6059 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6060 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6061 struct thread_info * now.
6062 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6064 (lwp_running): Update, "entry" parameter is a
6065 struct thread_info * now.
6066 (stop_all_lwps): Fetch ptid from thread.
6067 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6068 (linux_resume_one_lwp): Fetch lwpid from thread.
6069 (linux_set_resume_request): Update, "entry" parameter is a
6070 struct thread_info * now. Fetch pid, lwpid from thread.
6071 (resume_status_pending_p): Update, "entry" parameter is a
6072 struct thread_info * now.
6073 (need_step_over_p): Ditto. Fetch lwpid from thread.
6074 (start_step_over): Fetch lwpid from thread.
6075 (linux_resume_one_thread): Update, "entry" parameter is a
6076 struct thread_info * now. Fetch lwpid from thread.
6077 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6078 (proceed_one_lwp): Update, "entry" parameter is a
6079 struct thread_info * now. Fetch lwpid from thread.
6080 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6081 struct thread_info * now.
6082 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6083 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6084 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6086 (regsets_store_inferior_registers): Ditto.
6087 (fetch_register, store_register): Ditto.
6088 (linux_read_memory, linux_write_memory): Ditto.
6089 (linux_request_interrupt): Ditto.
6090 (linux_read_auxv): Ditto.
6091 (linux_xfer_siginfo): Ditto.
6092 (linux_qxfer_spu): Ditto.
6093 (linux_qxfer_libraries_svr4): Ditto.
6094 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6095 moved to inferiors.h.
6097 (get_thread_lwp): Update.
6098 (struct lwp_info): Delete member "entry". Simplify comment for
6101 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6102 current_inferior directly.
6103 (update_watch_registers_callback): Update, "entry" parameter is a
6104 struct thread_info * now. Fetch pid from thread.
6105 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6106 (mips_insert_point): Fetch lwpid from current_inferior.
6107 Pass &all_threads to find_inferior, not &all_lwps.
6108 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6109 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6111 (mips_stopped_data_address): Ditto.
6112 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6114 * linux-tile-low.c (tile_arch_setup): Ditto.
6115 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6116 (update_debug_registers_callback): Update, "entry" parameter is a
6117 struct thread_info * now. Fetch pid from thread.
6118 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6119 Pass &all_threads to find_inferior, not &all_lwps.
6120 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6121 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6122 Pass &all_threads to find_inferior, not &all_lwps.
6123 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6124 (i386_dr_low_get_status): Ditto.
6125 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6126 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6127 (x86_linux_read_description): Ditto.
6128 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6130 2014-02-20 Doug Evans <dje@google.com>
6132 * inferiors.c (get_first_inferior): Fix buglet.
6134 2014-02-19 Doug Evans <dje@google.com>
6136 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6137 * inferiors.c (add_thread): Change result type to struct thread_info *.
6138 All callers updated.
6139 (add_lwp): Call add_thread here instead of in callers.
6140 All callers updated.
6141 * linux-low.h (get_lwp_thread): Rewrite.
6142 (struct lwp_info): New member "thread".
6144 2014-02-19 Doug Evans <dje@google.com>
6146 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6147 All callers updated.
6149 2014-02-19 Doug Evans <dje@google.com>
6151 * inferiors.c (add_thread): Fix whitespace.
6153 2014-02-19 Doug Evans <dje@google.com>
6155 * dll.c (clear_dlls): Replace accessing list implemention details
6157 * gdbthread.h (get_first_thread): Declare.
6158 * inferiors.c (for_each_inferior_with_data): New function.
6159 (get_first_thread): New function.
6160 (find_thread_ptid): Simplify.
6161 (get_first_inferior): New function.
6162 (clear_list): Delete.
6163 (one_inferior_p): New function.
6164 (clear_inferior_list): New function.
6165 (clear_inferiors): Update.
6166 * inferiors.h (for_each_inferior_with_data): Declare.
6167 (clear_inferior_list): Declare.
6168 (one_inferior_p): Declare.
6169 (get_first_inferior): Declare.
6170 * linux-low.c (linux_wait_for_event): Replace accessing list
6171 implemention details with API function.
6172 * server.c (target_running): Ditto.
6173 (accumulate_file_name_length): New function.
6174 (emit_dll_description): New function.
6175 (handle_qxfer_libraries): Replace accessing list implemention
6176 details with API function.
6177 (handle_qxfer_threads_worker): New function.
6178 (handle_qxfer_threads_proper): Replace accessing list implemention
6179 details with API function.
6180 (handle_query): Ditto.
6181 (visit_actioned_threads_callback_ftype): New typedef.
6182 (visit_actioned_threads_data): New struct.
6183 (visit_actioned_threads): Rewrite to be find_inferior callback.
6184 (resume): Call find_inferior.
6185 (handle_status): Replace accessing list implemention
6186 details with API function.
6187 (process_serial_event): Replace accessing list implemention details
6189 * target.c (set_desired_inferior): Replace accessing list implemention
6190 details with API function.
6191 * tracepoint.c (same_process_p): New function.
6192 (gdb_agent_about_to_close): Replace accessing list implemention
6193 details with API function.
6194 * win32-low.c (child_delete_thread): Replace accessing list
6195 implemention details with API function.
6196 (match_dll_by_basename): New function.
6197 (dll_is_loaded_by_basename): New function.
6198 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6199 details call to dll_is_loaded_by_basename.
6201 2014-02-19 Doug Evans <dje@google.com>
6203 * dll.h (struct dll_info): Add comment.
6204 * gdbthread.h (struct thread_info): Add comment.
6205 (current_ptid): Simplify.
6206 * inferiors.c (add_process): Update.
6207 (remove_process): Update.
6208 * inferiors.h (struct process_info): Rename member "head" to "entry".
6209 * linux-low.c (delete_lwp): Update.
6211 (last_thread_of_process_p): Update.
6212 (kill_one_lwp_callback, linux_kill): Update.
6213 (status_pending_p_callback): Update.
6214 (wait_for_sigstop): Update. Simplify read of ptid.
6215 (start_step_over): Update.
6216 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6217 (get_lwp_thread): Update.
6218 (struct lwp_info): Rename member "head" to "entry".
6219 * regcache.h (inferior_list_entry): Delete.
6220 * server.c (kill_inferior_callback): Update.
6221 (detach_or_kill_inferior_callback): Update.
6222 (print_started_pid): Update.
6223 (print_attached_pid): Update.
6224 (process_serial_event): Simplify read of ptid.
6225 * thread-db.c (thread_db_create_event): Update.
6226 (thread_db_get_tls_address): Update.
6227 * win32-low.c (current_inferior_ptid): Simplify.
6229 2014-02-19 Tom Tromey <tromey@redhat.com>
6231 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6233 (target_supports_btrace): Update.
6235 2014-02-14 Yao Qi <yao@codesourcery.com>
6237 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6238 (rsp-low-ipa.o): New target.
6240 2014-02-12 Tom Tromey <tromey@redhat.com>
6242 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6243 convert_ascii_to_int.
6244 * regcache.c (registers_to_string): Likewise.
6245 * remote-utils.c (decode_M_packet): Likewise.
6246 * server.c (process_serial_event): Likewise.
6248 2014-02-12 Tom Tromey <tromey@redhat.com>
6250 * server.c (handle_query, handle_v_run): Use hex2bin, not
6252 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6254 2014-02-12 Tom Tromey <tromey@redhat.com>
6256 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6257 convert_int_to_ascii.
6258 * regcache.c (registers_to_string, collect_register_as_string):
6260 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6262 * server.c (process_serial_event): Likewise.
6263 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6264 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6266 2014-02-12 Tom Tromey <tromey@redhat.com>
6268 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6269 bin2hex, not hexify.
6270 * tracepoint.c (cmd_qtstatus): Likewise.
6272 2014-02-12 Tom Tromey <tromey@redhat.com>
6274 * remote-utils.c (monitor_output): Pass explicit length to
6277 2014-02-12 Tom Tromey <tromey@redhat.com>
6279 * tracepoint.c: Include rsp-low.h.
6280 * server.c: Include rsp-low.h.
6281 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6282 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6284 * remote-utils.c: Include rsp-low.h.
6285 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6286 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6287 (convert_int_to_ascii, convert_ascii_to_int): Move to
6289 * regcache.c: Include rsp-low.h.
6290 * ax.c: Include rsp-low.h.
6291 * Makefile.in (SFILES): Add common/rsp-low.c.
6292 (OBS): Add rsp-low.o.
6293 (rsp-low.o): New target.
6295 2014-02-12 Tom Tromey <tromey@redhat.com>
6297 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6298 Include print-utils.h.
6299 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6300 (plongest, thirty_two, phex_nz): Remove.
6301 * Makefile.in (SFILES): Add common/print-utils.c.
6302 (OBS): Add print-utils.o.
6303 (print-utils-ipa.o): New target.
6304 (print-utils.o): New target.
6305 (IPA_OBJS): Add print-utils-ipa.o.
6307 2014-02-06 Tom Tromey <tromey@redhat.com>
6309 * Makefile.in (SFILES): Fix indentation.
6311 2014-02-05 Doug Evans <dje@google.com>
6313 * linux-low.c (linux_wait_for_event): Improve comment.
6314 (linux_wait_1): Keep current_inferior in sync with event_child.
6316 2014-01-22 Doug Evans <dje@google.com>
6318 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6320 2014-01-22 Doug Evans <dje@google.com>
6322 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6323 * configure: Regenerate.
6324 * config.in: Regenerate.
6325 * Makefile.in (SFILES): Add debug.c.
6327 * debug.c: New file.
6328 * debug.h: New file.
6329 * linux-aarch64-low.c (*): Update all debugging printfs to use
6330 debug_printf instead of fprintf.
6331 * linux-arm-low.c (*): Ditto.
6332 * linux-cris-low.c (*): Ditto.
6333 * linux-crisv32-low.c (*): Ditto.
6334 * linux-m32r-low.c (*): Ditto.
6335 * linux-sparc-low.c (*): Ditto.
6336 * linux-x86.c (*): Ditto.
6337 * linux-low.c (*): Ditto.
6338 (linux_wait_1): Add calls to debug_enter, debug_exit.
6339 (linux_wait): Remove redundant debugging printf.
6340 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6341 (linux_resume, unstop_all_lwps): Ditto.
6342 * mem-break.c (*): Update all debugging printfs to use
6343 debug_printf instead of fprintf.
6344 * remote-utils.c (*): Ditto.
6345 * thread-db.c (*): Ditto.
6346 * server.c #include <ctype.h>, "gdb_vecs.h".
6347 (debug_threads): Moved to debug.c.
6348 (*): Update all debugging printfs to use debug_printf instead of
6350 (start_inferior): Replace call to fflush with call to debug_flush.
6351 (monitor_show_help): Mention set debug-format.
6352 (parse_debug_format_options): New function.
6353 (handle_monitor_command): Handle "monitor set debug-format".
6354 (gdbserver_usage): Mention --debug-format.
6355 (main): Parse --debug-format.
6356 * server.h (debug_threads): Declaration moved to debug.h.
6358 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6359 trace_debug_1 that uses debug_printf.
6360 (tracepoint_look_up_symbols): Update all debugging printfs to use
6361 debug_printf instead of fprintf.
6363 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6365 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6368 2014-01-17 Pedro Alves <palves@redhat.com>
6371 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6372 defined after including gdb_proc_service.h.
6374 2014-01-16 Doug Evans <dje@google.com>
6376 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6377 (match_dll): Use it.
6379 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6381 * target.h (target_ops) <read_btrace>: Change parameters and
6382 return type to allow error reporting.
6383 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6384 trace reading errors on.
6385 * linux-low.c (linux_low_read_btrace): Pass trace reading
6387 (linux_low_disable_btrace): New.
6389 2014-01-15 Doug Evans <dje@google.com>
6391 * inferiors.c (thread_id_to_gdb_id): Delete.
6392 * inferiors.h (thread_id_to_gdb_id): Delete.
6394 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6396 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6397 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6400 2014-01-08 Pedro Alves <palves@redhat.com>
6402 * server.c (handle_status): Don't discard previous queued stop
6403 replies or thread's pending status here.
6404 (main) <disconnection>: Do it here instead.
6406 2014-01-08 Pedro Alves <palves@redhat.com>
6408 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6409 * server.c (visit_actioned_threads, handle_pending_status): New
6411 (handle_v_cont): Factor out parts to ...
6412 (resume): ... this new function. If in all-stop, and a thread
6413 being resumed has a pending status, report it without actually
6415 (myresume): Adjust to use the new 'resume' function.
6416 (clear_pending_status_callback, set_pending_status_callback)
6417 (find_status_pending_thread_callback): New functions.
6418 (handle_status): Handle the case of multiple threads having
6419 interesting statuses to report. Report threads' real last signal
6420 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6421 with an interesting thread to report the status for, instead of
6422 always reporting the status of the first thread.
6424 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6426 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6427 * gdbreplay.c (gdbreplay_version): Likewise.
6429 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6431 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6432 iov.iov_len with the real length in use.
6434 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6436 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6437 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6438 for all targets that use win32-low.c.
6439 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6440 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6442 2013-12-13 Pedro Alves <palves@redhat.com>
6444 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6445 if equal to TARGET_WAITKIND_LOADED.
6446 * win32-low.c (cached_status): New static global.
6447 (win32_wait): Add declaration.
6448 (do_initial_child_stuff): Flush all initial pending debug events
6449 up to the initial breakpoint.
6450 (win32_wait): If CACHED_STATUS was set, return that instead
6451 of doing a real wait. Remove the code resuming the execution
6452 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6453 during the initial phase. Also remove the code changing
6454 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6455 TARGET_WAITKIND_STOPPED.
6457 2013-12-11 Yao Qi <yao@codesourcery.com>
6459 * notif.c (handle_notif_ack): Return 0 if no notification
6462 2013-11-20 Doug Evans <dje@google.com>
6464 * linux-low.c (linux_set_resume_request): Fix comment.
6466 2013-11-20 Doug Evans <dje@google.com>
6468 * linux-low.c (resume_status_pending_p): Tweak comment.
6470 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6472 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6473 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6474 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6475 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6476 (srv_amd64_regobj): Add amd64-mpx.o.
6477 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6478 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6479 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6480 * i387-fp.c (num_pl_bnd_register) Added constant.
6481 (num_pl_bnd_cfg_registers) Added constant.
6482 (struct i387_xsave) Added reserved area and MPX fields.
6483 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6484 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6486 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6487 (init_registers_amd64_mpx_linux): Declare new function.
6488 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6489 (x86_64_regmap): Add MPX registers.
6490 (x86_linux_read_description): Add MPX case.
6491 (initialize_low_arch): Initialize MPX targets.
6493 2013-11-18 Tom Tromey <tromey@redhat.com>
6495 * configure: Rebuild.
6496 * configure.ac: Don't check for stdlib.h.
6497 * gdbreplay.c: Unconditionally include stdlib.h.
6499 2013-11-18 Tom Tromey <tromey@redhat.com>
6501 * config.in: Rebuild.
6502 * configure: Rebuild.
6503 * configure.ac: Don't use AC_HEADER_DIRENT.
6505 2013-11-18 Tom Tromey <tromey@redhat.com>
6507 * server.h: Don't check HAVE_STRING_H.
6508 * gdbreplay.c: Don't check HAVE_STRING_H.
6509 * configure: Rebuild.
6511 2013-11-18 Tom Tromey <tromey@redhat.com>
6513 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6516 2013-11-08 Tom Tromey <tromey@redhat.com>
6518 * configure, config.in: Rebuild.
6519 * configure.ac: Remove unused configury.
6521 2013-11-08 Tom Tromey <tromey@redhat.com>
6523 * acinclude.m4: Include common.m4, codeset.m4.
6524 * configure, config.in: Rebuild.
6525 * configure.ac: Use GDB_AC_COMMON.
6527 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6529 * linux-s390-low.c (HWCAP_S390_TE): New define.
6530 (s390_arch_setup): Consider the TE field in the HWCAP for
6531 determining 'have_regset_tdb'.
6533 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6536 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6539 2013-10-02 Pedro Alves <palves@redhat.com>
6541 * server.c (process_serial_event): Don't output "GDBserver
6542 exiting" if GDB is connected through stdio.
6543 * target.c (mywait): Likewise, be silent if GDB is connected
6546 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6548 * lynx-low.c (lynx_add_threads_after_attach): New function.
6549 (lynx_attach): Remove call to add_thread. Add call to
6550 lynx_add_threads_after_attach instead.
6552 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6554 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6555 * config.in, configure: Regenerated.
6557 2013-09-18 Yao Qi <yao@codesourcery.com>
6560 * server.c (start_inferior): Clear 'resume_info'.
6562 2013-09-16 Jiong Wang <jiwang@tilera.com>
6564 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6567 2013-09-16 Jiong Wang <jiwang@tilera.com>
6569 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6570 linux-tile-low.o to srv_tgtobj.
6572 2013-09-16 Will Newton <will.newton@linaro.org>
6574 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6577 2013-09-06 Pedro Alves <palves@redhat.com>
6579 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6580 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6581 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6582 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6583 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6584 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6586 2013-09-06 Pedro Alves <palves@redhat.com>
6588 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6589 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6591 2013-09-06 Pedro Alves <palves@redhat.com>
6593 * linux-amd64-ipa.c: Include tracepoint.h.
6594 * linux-i386-ipa.c: Include tracepoint.h.
6596 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6598 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6599 (ps_get_thread_area): New function.
6601 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6603 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6604 (initialize_low_arch): Call init_registers_crisv32 rather than
6605 init_register_crisv32.
6607 2013-09-05 Pedro Alves <palves@redhat.com>
6609 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6611 * hostio.h: ... this new file.
6612 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6613 win32-low.c: Include hostio.h.
6615 2013-09-05 Pedro Alves <palves@redhat.com>
6617 * server.h (gdb_client_data, handler_func, callback_handler_func)
6618 (delete_file_handler, add_file_handler, append_callback_event)
6619 (delete_callback_event, start_event_loop, initialize_event_loop):
6620 Move to event-loop.h and include it.
6621 * event-loop.h: New file.
6623 2013-09-05 Pedro Alves <palves@redhat.com>
6625 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6626 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6627 (loaded_dll, unloaded_dll): Move to ...
6628 * dll.h: ... this new file.
6629 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6631 2013-09-05 Pedro Alves <palves@redhat.com>
6633 * server.h (current_process, get_thread_process, all_processes)
6634 (add_inferior_to_list, for_each_inferior, current_inferior)
6635 (remove_inferior, add_process, remove_process, find_process_pid)
6636 (have_started_inferiors_p, have_attached_inferiors_p)
6637 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6638 (clear_inferiors, find_inferior, find_inferior_id)
6639 (inferior_target_data, set_inferior_target_data)
6640 (inferior_regcache_data, set_inferior_regcache_data): Move to
6641 inferiors.h, and include it.
6642 * inferiors.h: New file.
6644 2013-09-05 Pedro Alves <palves@redhat.com>
6646 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6650 2013-09-05 Pedro Alves <palves@redhat.com>
6652 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6654 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6655 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6656 (handle_tracepoint_general_set, handle_tracepoint_query)
6657 (tracepoint_finished_step, tracepoint_was_hit)
6658 (release_while_stepping_state_list, current_traceframe)
6659 (in_readonly_region, traceframe_read_mem)
6660 (fetch_traceframe_registers, traceframe_read_sdata)
6661 (traceframe_read_info, struct fast_tpoint_collect_status)
6662 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6663 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6664 (supply_fast_tracepoint_registers)
6665 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6666 (ipa_tdesc, claim_trampoline_space)
6667 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6668 (agent_mem_read, agent_get_trace_state_variable_value)
6669 (agent_set_trace_state_variable_value, agent_tsv_read)
6670 (agent_mem_read_string, get_raw_reg_func_addr)
6671 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6672 * tracepoint.h: ... this new file.
6674 2013-09-05 Pedro Alves <palves@redhat.com>
6676 * server.h (perror_with_name, error, fatal, warning, paddress)
6677 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6679 * utils.h: New file.
6681 2013-09-05 Pedro Alves <palves@redhat.com>
6683 * server.h (remote_debug, noack_mode, transport_is_reliable)
6684 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6685 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6686 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6687 (write_enn, initialize_async_io, enable_async_io)
6688 (disable_async_io, check_remote_input_interrupt_request)
6689 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6690 (dead_thread_notify, prepare_resume_reply)
6691 (decode_address_to_semicolon, decode_address, decode_m_packet)
6692 (decode_M_packet, decode_X_packet, decode_xfer_write)
6693 (decode_search_memory_packet, unhexify, hexify)
6694 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6695 (look_up_one_symbol, relocate_instruction)
6696 (monitor_output): Move to remote-utils.h, and include it.
6697 * remote-utils.h: New file.
6699 2013-09-05 Pedro Alves <palves@redhat.com>
6701 * server.h (_): Delete.
6703 2013-09-02 Pedro Alves <palves@redhat.com>
6705 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6706 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6708 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6710 2013-09-02 Pierre Muller <muller@sourceware.org>
6712 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6713 or WriteProcessMemory complete successfully and handle
6714 ERROR_PARTIAL_COPY error.
6716 2013-09-02 Pedro Alves <palves@redhat.com>
6718 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6719 error instead of EIO.
6721 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6724 * linux-low.c: Include filestuff.h.
6725 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6726 * lynx-low.c: Include filestuff.h.
6727 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6728 * server.c: Include filestuff.h.
6729 (main): Call notice_open_fds.
6730 * spu-low.c: Include filestuff.h.
6731 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6733 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6735 * Makefile.in: Explain why ../target and ../nat are not
6736 listed as include file search paths.
6737 (linux-waitpid.o): New object file rule.
6738 * configure.srv (srv_native_linux_obj): New variable.
6739 Replace all occurrences of linux native object files with
6740 $srv_native_linux_obj.
6741 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6742 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6743 (linux_enable_event_reporting): Remove declaration.
6744 (my_waitpid): Moved to common/linux-waitpid.c.
6745 (linux_wait_for_event): Pass ptid when calling
6746 linux_enable_event_reporting.
6747 (linux_supports_tracefork_flag): Remove.
6748 (linux_enable_event_reporting): Likewise.
6749 (linux_tracefork_grandchild): Remove.
6750 (STACK_SIZE): Moved to common/linux-ptrace.c.
6751 (linux_tracefork_child): Remove.
6752 (linux_test_for_tracefork): Remove.
6753 (linux_look_up_symbols): Call linux_supports_traceclone.
6754 (initialize_low): Remove call to linux_test_for_tracefork.
6755 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6756 common/linux-ptrace.h.
6757 (PTRACE_TYPE_ARG4): Likewise.
6758 Include linux-ptrace.h.
6760 2013-08-21 Pedro Alves <palves@redhat.com>
6762 * config.in: Renegerate.
6764 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6766 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6767 (SFILES): Remove $(srcdir)/common/target-common.c and
6768 add $(srcdir)/target/waitstatus.c.
6769 (OBS): Remove target-common.o and add waitstatus.o.
6770 (server_h): Remove $(srcdir)/../common/target-common.h and
6771 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6772 and $(srcdir)/../target/waitstatus.h.
6773 (target-common.o): Remove.
6774 (waitstatus.o): New target object file.
6775 * target.h: Do not include target-common.h and
6776 include target/resume.h, target/wait.h and
6777 target/waitstatus.h.
6779 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6781 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6782 to PTRACE_TYPE_ARG3.
6783 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6784 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6786 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6787 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6789 2013-07-27 Jie Zhang <jie@codesourcery.com>
6790 Daniel Jacobowitz <dan@codesourcery.com>
6791 Yao Qi <yao@codesourcery.com>
6793 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6794 (mips-linux-watch.o): New rule.
6795 (mips_linux_watch_h): New variable.
6796 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6798 * linux-mips-low.c: Include mips-linux-watch.h.
6799 (struct arch_process_info, struct arch_lwp_info): New.
6800 (update_watch_registers_callback): New function.
6801 (mips_linux_new_process, mips_linux_new_thread) New functions.
6802 (mips_linux_prepare_to_resume, mips_insert_point): New
6804 (mips_remove_point, mips_stopped_by_watchpoint): New
6806 (rsp_bp_type_to_target_hw_bp_type): New function.
6807 (mips_stopped_data_address): New function.
6808 (the_low_target): Add watchpoint support functions.
6810 2013-07-27 Yao Qi <yao@codesourcery.com>
6812 * i386-low.c: Include break-common.h.
6813 (enum target_hw_bp_type): Remove.
6815 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6817 * Makefile.in (SFILES): /common/target-common.c.
6818 (OBS): Add target-common.o.
6819 (server_h): Add $(srcdir)/../common/target-common.h.
6820 (target-common.o): New target.
6821 * server.c (queue_stop_reply_callback): Free
6822 status string after use.
6823 * target.c (target_waitstatus_to_string): Remove.
6824 * target.h: Include target-common.h.
6825 (resume_kind): Likewise.
6826 (target_waitkind): Likewise.
6827 (target_waitstatus): Likewise.
6828 (TARGET_WNOHANG): Likewise.
6830 2013-07-04 Yao Qi <yao@codesourcery.com>
6832 * Makefile.in (host_alias): Use @host_noncanonical@.
6833 (target_alias): Use @target_noncanonical@.
6834 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6835 ACX_NONCANONICAL_HOST.
6836 * configure: Regenerated.
6839 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6841 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6842 * configure: Rebuild.
6843 * Makefile.in (version_host, version_target): Get from configure.
6844 (version.c): Use $(version_host) and $(version_target).
6846 2013-07-03 Pedro Alves <palves@redhat.com>
6848 * Makefile.in (config.status): Depend on development.sh.
6849 * acinclude.m4: Include libmcheck.m4.
6850 * configure: Regenerate.
6852 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6854 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6855 attribute inside the parentheses.
6856 (winapi_DebugSetProcessKillOnExit): Ditto.
6857 (winapi_DebugBreakProcess): Ditto.
6858 (winapi_GenerateConsoleCtrlEvent): Ditto.
6860 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6862 * notif.h (notif_event): Add a dummy member to avoid compiler
6865 2013-07-01 Pedro Alves <palves@redhat.com>
6867 * hostio.c (HOSTIO_PATH_MAX): Define.
6868 (require_filename, handle_open, handle_unlink, handle_readlink):
6871 2013-07-01 Pedro Alves <palves@redhat.com>
6873 * server.h: Include "pathmax.h".
6874 * linux-low.c: Don't include sys/param.h.
6875 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6877 * win32-low.c: Don't include sys/param.h.
6878 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6880 2013-07-01 Pedro Alves <palves@redhat.com>
6882 * event-loop.c: Don't check HAVE_UNISTD_H before including
6884 * gdbreplay.c: Likewise.
6885 * remote-utils.c: Likewise.
6886 * server.c: Likewise.
6887 * configure.ac: Don't check for unistd.h.
6888 * configure: Regenerate.
6890 2013-06-28 Tom Tromey <tromey@redhat.com>
6892 * Makefile.in (version.c): Use version.in, not
6895 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6897 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6898 * configure: Rebuild.
6899 * Makefile.in (version_host, version_target): Get from configure.
6900 (version.c): Use $(version_host) and $(version_target).
6902 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6904 Fix trace-status to output user name without trailing colon.
6905 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6907 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6909 Fix trace-status to output proper start-time and stop-time.
6910 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6911 output start time and stop time in hex as gdb expects.
6913 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6915 * tracepoint.c (build_traceframe_info_xml): Output trace state
6916 variables present in the trace buffer.
6918 2013-06-24 Tom Tromey <tromey@redhat.com>
6920 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6922 (version.o): Remove.
6923 * gdbreplay.c: Include version.h.
6924 (version, host_name): Don't declare.
6925 * server.h: Include version.h.
6926 (version, host_name): Don't declare.
6928 2013-06-12 Pedro Alves <palves@redhat.com>
6930 * linux-x86-low.c (linux_is_elf64): Delete global.
6931 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6932 with local linux_pid_exe_is_elf_64_file use.
6934 2013-06-11 Pedro Alves <palves@redhat.com>
6936 * linux-low.c (regset_disabled, disable_regset): New functions.
6937 (regsets_fetch_inferior_registers)
6938 (regsets_store_inferior_registers): Use them.
6939 (initialize_regsets_info); Don't allocate the disabled_regsets
6941 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6944 2013-06-11 Pedro Alves <palves@redhat.com>
6946 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6949 2013-06-11 Pedro Alves <palves@redhat.com>
6951 * linux-x86-low.c (initialize_low_arch): Call
6952 init_registers_x32_avx_linux.
6954 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6956 Fix compatibility with Android Bionic.
6957 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6960 2013-06-07 Pedro Alves <palves@redhat.com>
6963 * Makefile.in (OBS): Add tdesc.o.
6964 (IPA_OBJS): Add tdesc-ipa.o.
6965 (tdesc-ipa.o): New rule.
6966 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6968 * linux-low.c (new_inferior): Delete.
6969 (disabled_regsets, num_regsets): Delete.
6970 (linux_add_process): Adjust to set the new per-process
6972 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6973 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6974 was a stop. When calling arch_setup, switch the current inferior
6975 to the thread that got an event.
6976 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6977 (regsets_fetch_inferior_registers)
6978 (regsets_store_inferior_registers): New regsets_info parameter.
6980 (linux_register_in_regsets): New regs_info parameter. Adjust to
6982 (register_addr, fetch_register, store_register): New usrregs_info
6983 parameter. Adjust to use it.
6984 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6985 parameter regs_info. Adjust to use it.
6986 (linux_fetch_registers): Get the current inferior's regs_info, and
6988 (linux_store_registers): Ditto.
6989 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6990 (initialize_low): Don't initialize the target_regsets here. Call
6991 initialize_low_arch.
6992 * linux-low.h (target_regsets): Delete declaration.
6993 (struct regsets_info): New.
6994 (struct usrregs_info): New.
6995 (struct regs_info): New.
6996 (struct process_info_private) <new_inferior>: New field.
6997 (struct linux_target_ops): Delete the num_regs, regmap, and
6998 regset_bitmap fields. New field regs_info.
6999 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7000 * i387-fp.c (num_xmm_registers): Delete.
7001 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7002 calls to new interface.
7003 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7004 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7005 Infer the number of xmm registers from the regcache's target
7007 * i387-fp.h (num_xmm_registers): Delete.
7008 * inferiors.c (add_thread): Don't install the thread's regcache
7010 * proc-service.c (gregset_info): Fetch the current inferior's
7011 regs_info. Adjust to use it.
7012 * regcache.c: Include tdesc.h.
7013 (register_bytes, reg_defs, num_registers)
7014 (gdbserver_expedite_regs): Delete.
7015 (get_thread_regcache): If the thread doesn't have a regcache yet,
7016 create one, instead of aborting gdbserver.
7017 (regcache_invalidate_one): Rename to ...
7018 (regcache_invalidate_thread): ... this.
7019 (regcache_invalidate_one): New.
7020 (regcache_invalidate): Only invalidate registers of the current
7022 (init_register_cache): Add target_desc parameter, and use it.
7023 (new_register_cache): Ditto. Assert the target description has a
7024 non zero registers_size.
7025 (regcache_cpy): Add assertions. Adjust.
7026 (realloc_register_cache, set_register_cache): Delete.
7027 (registers_to_string, registers_from_string): Adjust.
7028 (find_register_by_name, find_regno, find_register_by_number)
7029 (register_cache_size): Add target_desc parameter, and use it.
7030 (free_register_cache_thread, free_register_cache_thread_one)
7031 (regcache_release, register_cache_size): New.
7032 (register_size): Add target_desc parameter, and use it.
7033 (register_data, supply_register, supply_register_zeroed)
7034 (supply_regblock, supply_register_by_name, collect_register)
7035 (collect_register_as_string, collect_register_by_name): Adjust.
7036 * regcache.h (struct target_desc): Forward declare.
7037 (struct regcache) <tdesc>: New field.
7038 (init_register_cache, new_register_cache): Add target_desc
7040 (regcache_invalidate_thread): Declare.
7041 (regcache_invalidate_one): Delete declaration.
7042 (regcache_release): Declare.
7043 (find_register_by_number, register_cache_size, register_size)
7044 (find_regno): Add target_desc parameter.
7045 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7047 * remote-utils.c: Include tdesc.h.
7048 (outreg, prepare_resume_reply): Adjust.
7049 * server.c: Include tdesc.h.
7050 (gdbserver_xmltarget): Delete declaration.
7051 (get_features_xml, process_serial_event): Adjust.
7052 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7054 (struct process_info) <tdesc>: New field.
7055 (ipa_tdesc): Declare.
7056 * tdesc.c: New file.
7057 * tdesc.h: New file.
7058 * tracepoint.c: Include tdesc.h.
7059 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7060 (get_context_regcache): Adjust to pass ipa_tdesc down.
7061 (do_action_at_tracepoint): Adjust to get the register cache size
7062 from the context regcache's description.
7063 (traceframe_walk_blocks): Adjust to get the register cache size
7064 from the current trace frame's description.
7065 (traceframe_get_pc): Adjust to get current trace frame's
7066 description and pass it down.
7067 (gdb_collect): Adjust to get the register cache size from the
7069 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7070 (gdbserver_xmltarget): Delete.
7071 (initialize_low_tracepoint): Set the ipa's target description.
7072 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7073 (initialize_low_tracepoint): Set the ipa's target description.
7074 * linux-x86-low.c: Include tdesc.h.
7075 [__x86_64__] (is_64bit_tdesc): New.
7076 (ps_get_thread_area, x86_get_thread_area): Use it.
7077 (i386_cannot_store_register): Rename to ...
7078 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7079 (i386_cannot_fetch_register): Rename to ...
7080 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7081 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7083 (target_regsets): Rename to ...
7084 (x86_regsets): ... this.
7085 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7087 (x86_siginfo_fixup): Use is_64bit_tdesc.
7088 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7089 (tdesc_x32_avx_linux, tdesc_x32_linux)
7090 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7092 (x86_linux_update_xmltarget): Delete.
7093 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7094 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7095 (AMD64_LINUX_USER64_CS): New.
7096 (x86_linux_read_description): New, based on
7097 x86_linux_update_xmltarget.
7098 (same_process_callback): New.
7099 (x86_arch_setup_process_callback): New.
7100 (x86_linux_update_xmltarget): New.
7101 (x86_regsets_info): New.
7102 (amd64_linux_regs_info): New.
7103 (i386_linux_usrregs_info): New.
7104 (i386_linux_regs_info): New.
7105 (x86_linux_regs_info): New.
7106 (x86_arch_setup): Reimplement.
7107 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7108 (x86_emit_ops): Ditto.
7109 (the_low_target): Adjust. Install x86_linux_regs_info,
7110 x86_cannot_fetch_register, and x86_cannot_store_register.
7111 (initialize_low_arch): New.
7112 * linux-ia64-low.c (tdesc_ia64): Declare.
7113 (ia64_fetch_register): Adjust.
7114 (ia64_usrregs_info, regs_info): New globals.
7115 (ia64_regs_info): New function.
7116 (the_low_target): Adjust.
7117 (initialize_low_arch): New function.
7118 * linux-sparc-low.c (tdesc_sparc64): Declare.
7119 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7121 (sparc_arch_setup): New function.
7122 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7123 (the_low_target): Adjust.
7124 (initialize_low_arch): New function.
7125 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7126 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7127 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7128 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7129 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7130 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7131 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7132 (tdesc_powerpc_isa205_vsx64l): Declare.
7133 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7134 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7135 (ppc_set_pc, ppc_get_hwcap): Adjust.
7136 (ppc_usrregs_info): Forward declare.
7137 (!__powerpc64__) ppc_regmap_adjusted: New global.
7138 (ppc_arch_setup): Adjust to the current process'es target
7140 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7141 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7142 (ppc_store_evrregset): Adjust.
7143 (target_regsets): Rename to ...
7144 (ppc_regsets): ... this, and make static.
7145 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7146 (ppc_regs_info): New function.
7147 (the_low_target): Adjust.
7148 (initialize_low_arch): New function.
7149 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7150 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7151 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7152 (tdesc_s390x_linux64v2): Declare.
7153 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7154 (s390_fill_gregset, s390_store_last_break): Adjust.
7155 (target_regsets): Rename to ...
7156 (s390_regsets): ... this, and make static.
7157 (s390_get_pc, s390_set_pc): Adjust.
7158 (s390_get_hwcap): New target_desc parameter, and use it.
7159 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7160 (s390_arch_setup): Adjust to set the current process'es target
7161 description. Don't adjust the regmap.
7162 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7163 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7164 (regs_info_3264): New globals.
7165 (s390_regs_info): New function.
7166 (the_low_target): Adjust.
7167 (initialize_low_arch): New function.
7168 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7169 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7170 [__mips64] (init_registers_mips_linux)
7171 (init_registers_mips_dsp_linux): Delete defines.
7172 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7173 (have_dsp): New global.
7174 (mips_read_description): New, based on mips_arch_setup.
7175 (mips_arch_setup): Reimplement.
7176 (get_usrregs_info): New function.
7177 (mips_cannot_fetch_register, mips_cannot_store_register)
7178 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7179 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7180 (target_regsets): Rename to ...
7181 (mips_regsets): ... this, and make static.
7182 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7183 (dsp_regs_info, regs_info): New globals.
7184 (mips_regs_info): New function.
7185 (the_low_target): Adjust.
7186 (initialize_low_arch): New function.
7187 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7188 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7190 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7191 (arm_read_description): New, with bits factored from
7193 (arm_arch_setup): Reimplement.
7194 (target_regsets): Rename to ...
7195 (arm_regsets): ... this, and make static.
7196 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7197 (arm_regs_info): New function.
7198 (the_low_target): Adjust.
7199 (initialize_low_arch): New function.
7200 * linux-m68k-low.c (tdesc_m68k): Declare.
7201 (target_regsets): Rename to ...
7202 (m68k_regsets): ... this, and make static.
7203 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7204 (m68k_regs_info): New function.
7205 (m68k_arch_setup): New function.
7206 (the_low_target): Adjust.
7207 (initialize_low_arch): New function.
7208 * linux-sh-low.c (tdesc_sharch): Declare.
7209 (target_regsets): Rename to ...
7210 (sh_regsets): ... this, and make static.
7211 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7212 (sh_regs_info, sh_arch_setup): New functions.
7213 (the_low_target): Adjust.
7214 (initialize_low_arch): New function.
7215 * linux-bfin-low.c (tdesc_bfin): Declare.
7216 (bfin_arch_setup): New function.
7217 (bfin_usrregs_info, regs_info): New globals.
7218 (bfin_regs_info): New function.
7219 (the_low_target): Adjust.
7220 (initialize_low_arch): New function.
7221 * linux-cris-low.c (tdesc_cris): Declare.
7222 (cris_arch_setup): New function.
7223 (cris_usrregs_info, regs_info): New globals.
7224 (cris_regs_info): New function.
7225 (the_low_target): Adjust.
7226 (initialize_low_arch): New function.
7227 * linux-cris-low.c (tdesc_crisv32): Declare.
7228 (cris_arch_setup): New function.
7229 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7230 (cris_regs_info): New function.
7231 (the_low_target): Adjust.
7232 (initialize_low_arch): New function.
7233 * linux-m32r-low.c (tdesc_m32r): Declare.
7234 (m32r_arch_setup): New function.
7235 (m32r_usrregs_info, regs_info): New globals.
7236 (m32r_regs_info): Adjust.
7237 (initialize_low_arch): New function.
7238 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7239 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7240 (tic6x_usrregs_info): Forward declare.
7241 (tic6x_read_description): New function, based on ...
7242 (tic6x_arch_setup): ... this. Reimplement.
7243 (target_regsets): Rename to ...
7244 (tic6x_regsets): ... this, and make static.
7245 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7246 (tic6x_regs_info): New function.
7247 (the_low_target): Adjust.
7248 (initialize_low_arch): New function.
7249 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7250 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7251 (target_regsets): Rename to ...
7252 (xtensa_regsets): ... this, and make static.
7253 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7255 (xtensa_arch_setup, xtensa_regs_info): New functions.
7256 (the_low_target): Adjust.
7257 (initialize_low_arch): New function.
7258 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7259 (nios2_arch_setup): Set the current process'es tdesc.
7260 (target_regsets): Rename to ...
7261 (nios2_regsets): ... this.
7262 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7263 (nios2_regs_info): New function.
7264 (the_low_target): Adjust.
7265 (initialize_low_arch): New function.
7266 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7267 (aarch64_arch_setup): Set the current process'es tdesc.
7268 (target_regsets): Rename to ...
7269 (aarch64_regsets): ... this.
7270 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7271 (aarch64_regs_info): New function.
7272 (the_low_target): Adjust.
7273 (initialize_low_arch): New function.
7274 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7276 (target_regsets): Rename to ...
7277 (tile_regsets): ... this.
7278 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7279 (tile_regs_info): New function.
7280 (tile_arch_setup): Set the current process'es tdesc.
7281 (the_low_target): Adjust.
7282 (initialize_low_arch): New function.
7283 * spu-low.c (tdesc_spu): Declare.
7284 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7285 * win32-arm-low.c (tdesc_arm): Declare.
7286 (arm_arch_setup): New function.
7287 (the_low_target): Install arm_arch_setup instead of
7289 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7290 (init_windows_x86): Rename to ...
7291 (i386_arch_setup): ... this. Set `win32_tdesc'.
7292 (the_low_target): Adjust.
7293 * win32-low.c (win32_tdesc): New global.
7294 (child_add_thread): Don't create the thread cache here.
7295 (do_initial_child_stuff): Set the new process'es tdesc.
7296 * win32-low.h (struct target_desc): Forward declare.
7297 (win32_tdesc): Declare.
7298 * lynx-i386-low.c (tdesc_i386): Declare global.
7299 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7300 * lynx-low.c (lynx_tdesc): New global.
7301 (lynx_add_process): Set the new process'es tdesc.
7302 * lynx-low.h (struct target_desc): Forward declare.
7303 (lynx_tdesc): Declare global.
7304 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7305 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7306 * nto-low.c (nto_tdesc): New global.
7307 (do_attach): Set the new process'es tdesc.
7308 * nto-low.h (struct target_desc): Forward declare.
7309 (nto_tdesc): Declare.
7310 * nto-x86-low.c (tdesc_i386): Declare.
7311 (nto_x86_arch_setup): Set `nto_tdesc'.
7313 2013-06-04 Gary Benson <gbenson@redhat.com>
7315 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7316 to qSupported response when appropriate.
7317 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7318 with nonzero-length annex.
7319 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7320 arguments supplied in annex.
7322 2013-05-31 Doug Evans <dje@google.com>
7325 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7326 64 bits in 64-cross-32 environment.
7328 2013-05-28 Pedro Alves <palves@redhat.com>
7330 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7331 (aarch64-without-fpu.c): Delete rule.
7332 * configure.srv (aarch64*-*-linux*): Remove references to
7333 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7334 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7337 2013-05-24 Pedro Alves <palves@redhat.com>
7339 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7340 instead of strchr/decode_address. Error if the range isn't split
7341 with a ','. Don't assume there's be a ':' in the action.
7343 2013-05-23 Yao Qi <yao@codesourcery.com>
7344 Pedro Alves <palves@redhat.com>
7346 * linux-low.c (lwp_in_step_range): New function.
7347 (linux_wait_1): If the thread was range stepping and stopped
7348 outside the stepping range, report the stop to GDB. Otherwise,
7349 continue stepping. Add range stepping debug output.
7350 (linux_set_resume_request): Copy the step range from the resume
7352 (linux_supports_range_stepping): New.
7353 (linux_target_ops) <supports_range_stepping>: Set to
7354 linux_supports_range_stepping.
7355 * linux-low.h (struct linux_target_ops)
7356 <supports_range_stepping>: New field.
7357 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7358 * linux-x86-low.c (x86_supports_range_stepping): New.
7359 (the_low_target) <supports_range_stepping>: Set to
7360 x86_supports_range_stepping.
7361 * server.c (handle_v_cont): Handle 'r' action.
7362 (handle_v_requests): Append ";r" if the target supports range
7364 * target.h (struct thread_resume) <step_range_start,
7365 step_range_end>: New fields.
7366 (struct target_ops) <supports_range_stepping>:
7368 (target_supports_range_stepping): New macro.
7370 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7372 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7373 confusion in comment.
7375 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7377 * lynx-low.c (struct process_info_private): New type.
7378 (lynx_add_process): New function.
7379 (lynx_create_inferior, lynx_attach): Replace calls to
7380 add_process by calls to lynx_add_process.
7381 (lynx_resume): If PTID is null, then try using
7382 current_process()->private->last_wait_event_ptid.
7384 (lynx_clear_inferiors): Delete. The contents of that function
7385 has been inlined in lynx_mourn;
7386 (lynx_wait_1): Save the ptid in the process's private data.
7387 (lynx_mourn): Free the process' private data. Replace call
7388 to lynx_clear_inferiors by call to clear_inferiors.
7390 2013-05-17 Yao Qi <yao@codesourcery.com>
7392 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7395 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7397 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7398 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7399 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7400 PT_TEXT_END_ADDR guards. Update comments.
7401 (linux_target_op) <read_offsets>: Conditionally define to
7402 linux_read_offsets if the target is UCLIBC and if it defines
7403 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7405 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7406 Andrew Jenner <andrew@codesourcery.com>
7408 * Makefile.in (SFILES): Add linux-nios2-low.c.
7409 (clean): Add action to delete nios2-linux.c.
7410 (nios2-linux.c): New rule.
7411 * configure.srv: Add nios2*-*-linux*.
7412 * linux-nios2-low.c: New.
7414 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7416 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7418 2013-04-25 Hui Zhu <hui@codesourcery.com>
7421 * ax.c (ax_printf): Add fflush.
7423 2013-04-22 Tom Tromey <tromey@redhat.com>
7425 * Makefile.in (SFILES): Add filestuff.c.
7426 (OBS): Add filestuff.o.
7427 (filestuff.o): New target.
7428 * config.in, configure: Rebuild.
7429 * configure.ac: Check for fdwalk, pipe2.
7431 2013-04-17 Pedro Alves <palves@redhat.com>
7433 * configure.ac (USE_THREAD_DB): Delete variable.
7434 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7435 Don't AC_SUBST USE_THREAD_DB.
7436 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7437 * config.in, configure: Regenerate.
7439 2013-04-16 Pedro Alves <palves@redhat.com>
7441 * linux-low.h (struct lwp_info) <thread_known>: Move under
7442 the USE_THREAD_DB #ifdef.
7444 2013-04-16 Pedro Alves <palves@redhat.com>
7446 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7447 (linux-low.o): Delete rule.
7448 * linux-low.h: Always include "gdb_thread_db.h" instead of
7449 conditionally including thread_db.h.
7450 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7453 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7455 * Makefile.in (install-only): Fix make install regression.
7457 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7459 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7460 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7462 * gdbserver.1: Remove.
7464 2013-03-22 Pedro Alves <palves@redhat.com>
7466 * linux-low.c (handle_extended_wait): Don't call
7467 linux_enable_event_reporting.
7469 2013-03-15 Tony Theodore <tonyt@logyst.com>
7472 * Makefile.in (SHELL): Use @SHELL@.
7474 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7476 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7479 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7481 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7482 Remove extraneous NULL element.
7484 2013-03-13 Yao Qi <yao@codesourcery.com>
7486 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7487 'V' block in trace frame.
7489 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7491 * target.h (struct target_ops): Add btrace ops.
7492 (target_supports_btrace): New macro.
7493 (target_enable_btrace): New macro.
7494 (target_disable_btrace): New macro.
7495 (target_read_btrace): New macro.
7496 * gdbthread.h (struct thread_info): Add btrace field.
7497 * server.c: Include btrace-common.h.
7498 (handle_btrace_general_set): New function.
7499 (handle_btrace_enable): New function.
7500 (handle_btrace_disable): New function.
7501 (handle_general_set): Call handle_btrace_general_set.
7502 (handle_qxfer_btrace): New function.
7503 (struct qxfer qxfer_packets[]): Add btrace entry.
7504 * inferiors.c (remove_thread): Disable btrace.
7505 * linux-low: Include linux-btrace.h.
7506 (linux_low_enable_btrace): New function.
7507 (linux_low_read_btrace): New function.
7508 (linux_target_ops): Add btrace ops.
7509 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7510 Add srv_linux_btrace=yes.
7511 (x86_64-*-linux*): Add linux-btrace.o.
7512 Add srv_linux_btrace=yes.
7513 * configure.ac: Define HAVE_LINUX_BTRACE.
7514 * config.in: Regenerated.
7515 * configure: Regenerated.
7517 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7519 * server.c (handle_qxfer): Preserve error message if -3 is
7521 (qxfer): Document the -3 return value.
7523 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7525 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7526 (linux_btrace_h): New variable.
7527 (linux-btrace.o): New rule.
7529 2013-03-08 Stan Shebs <stan@codesourcery.com>
7530 Hafiz Abid Qadeer <abidh@codesourcery.com>
7532 * tracepoint.c (trace_buffer_size): New global.
7533 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7534 (init_trace_buffer): Change to one-argument function. Allocate
7535 trace buffer memory.
7536 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7537 handle QTBuffer:size packet.
7538 (cmd_bigqtbuffer_size): New function.
7539 (initialize_tracepoint): Call init_trace_buffer with
7540 DEFAULT_TRACE_BUFFER_SIZE.
7541 * server.c (handle_query): Add QTBuffer:size in the
7544 2013-03-07 Yao Qi <yao@codesourcery.com>
7546 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7547 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7549 (cmd_qtsp): Adjust condition. Do post increment.
7550 Set cur_action and cur_step_action back to 0.
7552 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7555 * linux-low.c (linux_write_memory): Return early success if LEN is
7558 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7560 * configure.srv: Add x86_64-*-cygwin* as target.
7562 2013-02-28 Tom Tromey <tromey@redhat.com>
7564 * configure.ac: Invoke AC_SYS_LARGEFILE.
7565 * configure, config.in: Rebuild.
7567 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7569 * win32-low.c: Throughout, fix format strings and casts of
7570 printf-like functions to avoid type related warnings on all
7572 (get_child_debug_event): Print dwDebugEventCode as hex since
7573 that's how it's usually documented.
7575 2013-02-28 Yao Qi <yao@codesourcery.com>
7577 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7580 2013-02-27 Jiong Wang <jiwang@tilera.com>
7582 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7583 (reg-tilegx32.c): New rule.
7584 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7585 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7586 different register info initializer according to elf class.
7587 (init_registers_tilgx32): New function. The tilegx32 register info
7589 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7590 (tile_store_gregset): Likewise.
7592 2013-02-27 Yao Qi <yao@codesourcery.com>
7594 * server.c (process_point_options): Print debug message when
7595 debug_threads is true.
7597 2013-02-26 Yao Qi <yao@codesourcery.com>
7599 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7601 2013-02-19 Pedro Alves <palves@redhat.com>
7602 Kai Tietz <ktietz@redhat.com>
7606 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7607 instead of strtoul to extract address from packet.
7608 (process_serial_event) <'z'>: Likewise.
7610 2013-02-18 Yao Qi <yao@codesourcery.com>
7612 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7614 2013-02-14 Pedro Alves <palves@redhat.com>
7618 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7619 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7621 2013-02-14 Pedro Alves <palves@redhat.com>
7623 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7625 2013-02-14 Pedro Alves <palves@redhat.com>
7627 * tracepoint.c (save_string): Delete.
7628 (add_tracepoint_action): Use savestring instead of save_string.
7630 2013-02-12 Pedro Alves <palves@redhat.com>
7632 * linux-xtensa-low.c: Ditto.
7633 * xtensa-xtregs.c: Ditto.
7635 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7637 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7640 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7642 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7643 aarch64_num_wp_regs and aarch64_num_bp_regs to
7644 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7646 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7648 * linux-aarch64-low.c (ps_get_thread_area): Replace
7649 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7651 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7652 Marcus Shawcroft <marcus.shawcroft@arm.com>
7653 Nigel Stephens <nigel.stephens@arm.com>
7654 Yufeng Zhang <yufeng.zhang@arm.com>
7656 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7657 (aarch64.c, aarch64-without-fpu.c): New targets.
7658 * configure.srv (aarch64*-*-linux*): New.
7659 * linux-aarch64-low.c: New file.
7661 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7663 * linux-low.c (handle_extended_wait, linux_create_inferior)
7664 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7665 (dequeue_one_deferred_signal, linux_resume_one_thread)
7666 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7667 (linux_tracefork_grandchild, linux_test_for_tracefork)
7668 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7669 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7670 where the argument is 0.
7672 2013-01-25 Yao Qi <yao@codesourcery.com>
7674 * event-loop.c: Include "queue.h".
7675 (gdb_event_p): New typedef.
7676 (struct gdb_event) <next_event>: Remove.
7677 (event_queue): Change to QUEUE(gdb_event_p).
7678 (async_queue_event): Remove.
7679 (gdb_event_xfree): New.
7680 (initialize_event_loop): New.
7681 (process_event): Use API from QUEUE.
7682 (wait_for_event): Likewise.
7683 * server.c (main): Call initialize_event_loop.
7684 * server.h (initialize_event_loop): Declare.
7686 2013-01-18 Yao Qi <yao@codesourcery.com>
7688 * ax.h (struct eval_agent_expr_context): New.
7689 (gdb_eval_agent_expr): Update declaration.
7690 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7691 TFRAME. Add new argument CTX.
7692 * server.h (struct eval_agent_expr_context): Declare.
7693 (agent_mem_read, agent_tsv_read): Update declaration.
7694 (agent_mem_read_string): Likewise.
7695 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7696 (add_traceframe_block): Add new argument TPOINT.
7697 Increase TPOINT->traceframe_usage.
7698 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7699 eval_tracepoint_agent_expr.
7700 (condition_true_at_tracepoint): Likewise.
7701 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7702 (agent_mem_read_string, agent_tsv_read): Likewise.
7704 2013-01-16 Yao Qi <yao@codesourcery.com>
7706 * linux-low.c (linux_resume_one_lwp): Don't check
7707 'lwp->bp_reinsert != 0'.
7709 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7710 Pedro Alves <palves@redhat.com>
7712 * lynx-low.c (ptrace_request_to_str): Define a temporary
7713 macro and use it to simplify this function's implementation.
7715 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7717 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7720 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7722 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7724 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7726 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7728 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7730 * lynx-low.c (lynx_resume): Use the resume_info parameter
7731 to determine the ptid for the lynx_ptrace call, unless
7732 it is equal to minus_one_ptid, in which case we use the
7733 ptid of the current_inferior.
7734 (lynx_wait_1): After having received a thread create/exit
7735 event, resume the inferior's execution using the signaling
7736 thread's ptid, rather than the old ptid.
7738 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7740 * lynx-low.c (lynx_resume): Delete variable ret.
7742 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7744 * gdbreplay.c (gdbreplay_version): Update copyright year.
7745 * server.c (gdbserver_version): Likewise.
7747 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7749 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7752 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7754 * lynx-low.c (ptrace_request_to_str): Add handling for
7757 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7759 * lynx-low.c (lynx_attach): Delete variable new_process.
7761 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7763 * lynx-low.c (lynx_create_inferior): Delete variable
7766 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7768 * lynx-low.c (ptrace_request_to_str): Do not handle
7769 PTRACE_GETTHREADLIST if this macro does not exist.
7771 2012-12-15 Yao Qi <yao@codesourcery.com>
7773 * Makefile.in (OBS): Add notif.o.
7774 * notif.c, notif.h: New.
7775 * server.c: Include "notif.h".
7776 (struct vstop_notif) <next>: Remove.
7778 (queue_stop_reply): Update.
7779 (push_event, send_next_stop_reply): Remove.
7780 (discard_queued_stop_replies): Update.
7781 (notif_stop): New variable.
7782 (handle_v_stopped): Remove.
7783 (handle_v_requests): Don't call handle_v_stopped. Call
7784 handle_ack_notif instead.
7785 (queue_stop_reply_callback): Call notif_event_enque instead
7786 of queue_stop_reply.
7787 (handle_status): Don't call send_next_stop_reply, call
7788 notif_write_event instead.
7789 (kill_inferior_callback): Likewise.
7790 (detach_or_kill_inferior_callback): Likewise.
7791 (main): Call initialize_notif.
7792 (process_serial_event): Call QUEUE_is_empty.
7793 (handle_target_event): Call notif_push instead of push event.
7794 * server.h (push_event): Remove declaration.
7796 2012-12-10 Tom Tromey <tromey@redhat.com>
7798 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7799 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7802 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7803 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7804 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7805 (amd64-linux-ipa.o, ax.o): Rewrite.
7806 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7807 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7808 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7809 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7810 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7811 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7812 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7813 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7814 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7815 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7816 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7817 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7818 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7819 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7820 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7821 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7822 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7823 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7824 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7825 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7826 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7827 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7828 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7829 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7830 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7831 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7832 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7833 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7834 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7835 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7836 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7837 (reg-tilegx.o): Remove.
7838 (all_object_files): New macro.
7839 Include .deps files.
7840 * aclocal.m4, configure: Rebuild.
7841 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7842 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7843 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7845 2012-12-05 Tom Tromey <tromey@redhat.com>
7848 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7850 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7852 * configure.ac: Check for linux/perf_event.h.
7853 * config.in: Regenerated.
7854 * configure: Regenerated.
7856 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7858 * hostio.c (handle_readlink): Decrease buffer size
7859 parameter passed to readlink by one byte.
7861 2012-11-26 Yao Qi <yao@codesourcery.com>
7863 * configure.ac (build_warnings): Append '-Wempty-body'.
7864 * configure: Regenerated.
7865 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7868 2012-11-15 Pierre Muller <muller@sourceware.org>
7870 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7871 * config.in: Regenerate.
7872 * configure: Regenerate.
7873 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7874 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7875 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7876 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7878 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7879 instead of <sys/wait.h> header.
7880 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7882 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7884 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7885 (various make rules): Remove -DGDBSERVER
7887 2012-11-09 Yao Qi <yao@codesourcery.com>
7889 * spu-low.c (current_ptid): Move it to ..
7890 * gdbthread.h: ... here. New.
7891 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7892 * server.c (myresume, process_serial_event): Likewise.
7893 * thread-db.c (thread_db_find_new_threads): Likewise.
7894 * tracepoint.c (run_inferior_command): Likewise.
7896 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7898 * server.c (handle_search_memory_1): Include access length in
7901 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7903 * linux-crisv32-low.c: Fix compile errors.
7905 2012-09-04 Yao Qi <yao@codesourcery.com>
7907 * tracepoint.c (cmd_qtsv): Adjust debug message.
7908 Don't check CUR_TPOINT.
7910 2012-08-28 Yao Qi <yao@codesourcery.com>
7912 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7913 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7914 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7915 Remove declarations of xmalloc, xreallloc, xstrdup and
7917 * Makefile.in (libiberty_h): New.
7918 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7919 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7921 2012-08-23 Yao Qi <yao@codesourcery.com>
7923 * server.h: Remove declaration of 'xsnprintf'.
7925 2012-08-22 Keith Seitz <keiths@redhat.com>
7927 * server.h: Include build-gnulib-gbserver/config.h.
7928 * gdbreplay.c: Likewise.
7930 2012-08-08 Doug Evans <dje@google.com>
7932 * Makefile.in (SFILES): Add gdb_vecs.c.
7933 (OBS): Add gdb_vecs.o.
7934 (gdb_vecs_h, host_defs_h): New variables.
7935 (thread-db.o): Add $(gdb_vecs_h) dependency.
7936 (gdb_vecs.o): New rule.
7937 * thread-db.c: #include "gdb_vecs.h".
7938 (thread_db_load_search): Use a vector to iterate over path elements.
7939 Handle text appearing after "$pdir".
7941 * configure.ac: Add check for strstr.
7942 * config.in: Regenerate.
7943 * configure: Regenerate.
7945 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7947 * hostio.c (handle_pread): If pread fails, fall back to attempting
7949 (handle_pwrite): Likewise for pwrite.
7951 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7953 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7954 between unsupported TYPE and unimplementable ADDR/LEN combination.
7955 (arm_insert_point): Act on new return value.
7957 2012-07-31 Pedro Alves <palves@redhat.com>
7959 * server.c (process_point_options): Only skip tokens if we find
7960 one that is unrecognized. Don't treat 'X' specially while
7961 skipping unrecognized tokens.
7963 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7965 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7966 to 4-byte-align HW breakpoint addresses for Thumb.
7968 2012-07-27 Yao Qi <yao@codesourcery.com>
7972 * server.h: Declare gdb_agent_about_to_close.
7973 * target.c (kill_inferior): Include "agent.h".
7974 New. Send command 'kill'.
7975 * target.h (kill_inferior): Removed macro.
7976 * tracepoint.c (gdb_agent_about_to_close): New.
7977 (gdb_agent_helper_thread): Handle command 'close'.
7978 Wait endlessly until the inferior stops.
7979 Install gdb_agent_remove_socket to atexit hook.
7980 (agent_socket_name): New static variable.
7981 (gdb_agent_socket_init): Replace local variable 'name' with
7982 'agent_socket_name'.
7983 (gdb_agent_remove_socket): New.
7985 2012-07-27 Yao Qi <yao@codesourcery.com>
7987 * server.c (process_point_options): Stop at 'X' when parsing.
7989 2012-07-19 Michael Eager <eager@eagercon.com>
7991 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7993 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7994 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7995 hardware breakpoint.
7997 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7999 * gdbserver/linux-low.c (initialize_low): Call
8000 linux_ptrace_init_warnings.
8002 2012-07-02 Doug Evans <dje@google.com>
8004 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8007 2012-07-02 Stan Shebs <stan@codesourcery.com>
8009 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8010 (ax.o): Add it to build rule.
8012 (OBS): Add format.o.
8013 (IPA_OBS): Add format.o.
8014 * server.c (handle_query): Claim support for breakpoint commands.
8015 (process_point_options): Add command case.
8016 (process_serial_event): Leave running if there are printfs in
8018 * mem-break.h (any_persistent_commands): Declare.
8019 (add_breakpoint_commands): Declare.
8020 (gdb_no_commands_at_breakpoint): Declare.
8021 (run_breakpoint_commands): Declare.
8022 * mem-break.c (struct point_command_list): New struct.
8023 (struct breakpoint): New field command_list.
8024 (any_persistent_commands): New function.
8025 (add_commands_to_breakpoint): New function.
8026 (add_breakpoint_commands): New function.
8027 (gdb_no_commands_at_breakpoint): New function.
8028 (run_breakpoint_commands): New function.
8029 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8031 * ax.c: Include format.h.
8032 (ax_printf): New function.
8033 (gdb_eval_agent_expr): Add printf opcode.
8035 2012-06-13 Yao Qi <yao@codesourcery.com>
8037 * server.c (start_inferior): Remove duplicated writes to fields
8038 'last_resume_kind' and 'last_status' of 'current_inferior'.
8040 2012-06-12 Yao Qi <yao@codesourcery.com>
8041 Pedro Alves <palves@redhat.com>
8043 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8045 * server.c (handle_v_cont): Extend comment.
8047 2012-06-11 Yao Qi <yao@codesourcery.com>
8049 * linux-low.c (linux_attach): Add 'static'.
8051 2012-06-06 Yao Qi <yao@codesourcery.com>
8053 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8055 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8057 Fix gcc -flto compilation warning.
8058 * server.c (main): Make variable multi_mode and attach volatile.
8060 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8062 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8063 if the platform doesn't know about it.
8065 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8067 * Makefile.in (SFILES): Add linux-tile-low.c.
8068 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8069 * configure.srv: Handle tilegx-*-linux*.
8070 * linux-tile-low.c: New file.
8072 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8074 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8076 2012-05-24 Pedro Alves <palves@redhat.com>
8080 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8082 2012-05-24 Pedro Alves <palves@redhat.com>
8086 Replace target_signal with gdb_signal throughout.
8088 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8090 * linux-low.c (linux_store_registers): Avoid the copying sequence
8091 when no data has been retrieved by ptrace.
8093 2012-05-22 Will Deacon <will.deacon@arm.com>
8095 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8096 Include asm/ptrace.h.
8097 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8100 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8102 * linux-low.c (linux_store_registers): Don't re-retrieve data
8103 with ptrace that has already been obtained from /proc. Always
8104 copy any data retrieved with ptrace to the buffer supplied.
8106 2012-05-11 Yao Qi <yao@codesourcery.com>
8107 Pedro Alves <palves@redhat.com>
8109 * linux-low.c (enum stopping_threads_kind): New.
8110 (stopping_threads): Change type to `enum stopping_threads_kind'.
8111 (handle_extended_wait): If stopping and suspending threads, leave
8112 the new_lwp suspended too.
8113 (linux_wait_for_event): Adjust.
8114 (stop_all_lwps): Set `stopping_threads' to
8115 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8116 whether we're suspending threads or just stopping them. Assert no
8119 2012-04-29 Yao Qi <yao@codesourcery.com>
8121 * server.h: Move some code to ...
8122 * gdbthread.h: ... here. New.
8123 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8124 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8125 (nto-low.o, win32-low.o): Likewise.
8126 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8127 * regcache.c, remote-utils.c, server.c: Likewise.
8128 * target.c, tracepoint.c, win32-low.c: Likewise.
8130 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8132 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8133 (PTRACE_ARG4_TYPE): Likewise.
8134 (PTRACE_XFER_TYPE): Likewise.
8135 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8136 ptrace to PTRACE_ARG3_TYPE.
8137 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8138 (PTRACE_ARG4_TYPE): Likewise.
8139 (PTRACE_XFER_TYPE): Likewise.
8140 (linux_detach_one_lwp): Cast fourth argument of
8141 ptrace to long then PTRACE_ARG4_TYPE.
8142 (regsets_fetch_inferior_registers): Cast third argument of
8143 ptrace to long then PTRACE_ARG3_TYPE.
8144 (regsets_store_inferior_registers): Likewise.
8146 2012-04-20 Pedro Alves <palves@redhat.com>
8148 * configure: Regenerate.
8150 2012-04-19 Pedro Alves <palves@redhat.com>
8152 * Makefile.in (GNULIB_BUILDDIR): New.
8153 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8154 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8155 (all, install-only, uninstall, clean-info, all-lib, clean): No
8156 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8157 (maintainer-clean realclean distclean): Use subdir_do.
8159 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8160 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8161 * acinclude.m4: Include acx_configure_dir.m4.
8162 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8163 calls. Call AC_PROG_RANLIB. Configure gnulib using
8166 (GNULIB_STDINT_H): Adjust.
8167 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8168 * gdbreplay.c: Include build-gnulib/config.h.
8169 * server.h: Likewise.
8170 * aclocal.m4: Regenerate.
8171 * config.in: Regenerate.
8172 * configure: Regenerate.
8174 2012-04-19 Pedro Alves <palves@redhat.com>
8176 * Makefile.in (LIBGNU, INCGNU): Adjust.
8177 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8178 (all, install-only, uninstall, clean-info, all-lib, clean)
8179 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8180 * configure.ac: Adjust AC_OUTPUT output.
8181 * aclocal.m4: Regenerate.
8182 * configure: Regenerate.
8184 2012-04-19 Pedro Alves <palves@redhat.com>
8186 * Makefile.in (generated_files): New.
8187 (server_h): Remove the explicit dependency on config.h, and depend
8188 on $generated_files.
8190 2012-04-19 Pedro Alves <palves@redhat.com>
8192 * Makefile.in (INCGNU): Add -Ignulib.
8194 2012-04-19 Pedro Alves <palves@redhat.com>
8196 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8197 (INCGNU): ... this, and spell out -I here.
8198 (GNULIB_LIB): Rename to ...
8200 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8202 2012-04-19 Pedro Alves <palves@redhat.com>
8204 * config.in: Regenerate.
8206 2012-04-19 Pedro Alves <palves@redhat.com>
8208 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8209 * server.h (memmem): Remove declaration.
8210 * config.in: Regenerate.
8211 * configure: Regenerate.
8213 2012-04-19 Yao Qi <yao@codesourcery.com>
8215 * Makefile.in (SFILES): Add common/vec.c.
8219 2012-04-19 Yao Qi <yao@codesourcery.com>
8221 * remote-utils.c (prepare_resume_reply): Replace with macro
8222 target_core_of_thread.
8223 * server.c (handle_qxfer_threads_proper): Likewise.
8224 * target.h (traget_core_of_thread): New macro.
8226 2012-04-18 Pedro Alves <palves@redhat.com>
8228 * aclocal.m4: Regenerate.
8229 * configure: Regenerate.
8231 2012-04-16 Yao Qi <yao@codesourcery.com>
8233 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8234 duplicated on address.
8236 2012-04-16 Yao Qi <yao@codesourcery.com>
8238 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8239 (struct tracepoint_action_ops) <send>: New field.
8240 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8241 (agent_expr_send, x_tracepoint_action_send): New.
8242 (l_tracepoint_action_send): New.
8243 (cmd_qtdp): Download and install tracepoint
8244 according to `use_agent'.
8245 (run_inferior_command): Add one more parameter `len'.
8247 (tracepoint_send_agent): New.
8248 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8250 2012-04-16 Yao Qi <yao@codesourcery.com>
8252 * tracepoint.c (download_tracepoints): Moved to ...
8253 (cmd_qtstart): ... here.
8255 2012-04-14 Yao Qi <yao@codesourcery.com>
8257 * tracepoint.c: Include inttypes.h.
8258 (struct collect_memory_action): Use sized types.
8259 (struct tracepoint): Likewise.
8260 (cmd_qtdp, stop_tracing): Update print specifiers.
8261 (cmd_qtp, response_tracepoint): Likewise.
8262 (collect_data_at_tracepoint): Likewise.
8263 (collect_data_at_step): Likewise.
8265 2012-04-14 Yao Qi <yao@codesourcery.com>
8267 Import gnulib module inttypes.
8268 * aclocal.m4, config.in, configure: Regenerated.
8270 2012-04-14 Yao Qi <yao@codesourcery.com>
8272 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8273 Makefile and config.status at last.
8275 2012-04-13 Yao Qi <yao@codesourcery.com>
8277 * tracepoint.c: Include stdint.h unconditionally.
8279 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8281 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8282 on BFD_HAVE_SYS_PROCFS_TYPE.
8283 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8284 * configure: Regenerate.
8285 * config.in: Likewise.
8287 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8289 * Makefile.in (clean): Also remove x32.c x32-linux.c
8290 x32-avx.c x32-avx-linux.c.
8291 (x32.o): New target.
8293 (x32-linux.o): Likewise.
8294 (x32-linux.c): Likewise.
8295 (x32-avx.o): Likewise.
8296 (x32-avx.c): Likewise.
8297 (x32-avx-linux.o): Likewise.
8298 (x32-avx-linux.c): Likewise.
8300 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8301 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8302 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8303 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8304 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8305 i386/x32-avx-linux.xml.
8307 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8308 (init_registers_x32_avx_linux): Likwise.
8309 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8310 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8312 2012-04-13 Pedro Alves <palves@redhat.com>
8314 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8315 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8316 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8317 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8320 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8322 * linux-x86-low.c (compat_x32_clock_t): New.
8323 (compat_x32_siginfo_t): Likewise.
8324 (compat_x32_siginfo_from_siginfo): Likewise.
8325 (siginfo_from_compat_x32_siginfo): Likewise.
8326 (linux_is_elf64): Likewise.
8327 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8328 and siginfo_from_compat_x32_siginfo for x32.
8329 (x86_arch_setup): Set linux_is_elf64.
8331 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8334 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8336 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8337 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8338 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8339 compatible with process.
8341 2012-04-12 Yao Qi <yao@codesourcery.com>
8343 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8344 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8345 (install-only, install-info, clean): Handle sub dir gnulib.
8346 (all-lib, am--refresh): New targets.
8347 (memmem.o): Remove target.
8348 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8349 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8350 (AC_REPLACE_FUNCS): Remove memmem.
8351 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8352 (AC_OUTPUT): Generate Makefile in gnulib/.
8353 * aclocal.m4, config.in, configure: Regenerated.
8355 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8357 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8359 2012-04-05 Pedro Alves <palves@redhat.com>
8361 -Werror=strict-aliasing
8363 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8366 2012-04-04 Pedro Alves <palves@redhat.com>
8368 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8369 (sparc_store_gregset_from_stack, sparc_store_gregset)
8370 (sparc_breakpoint_at): Fix formatting.
8372 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8374 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8376 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8377 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8378 * config.in: Regenerate.
8379 * configure: Likewise.
8381 2012-03-29 Pedro Alves <palves@redhat.com>
8383 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8384 Correct ptrace arguments.
8386 2012-03-28 Pedro Alves <palves@redhat.com>
8388 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8389 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8390 (IA64_FR1_REGNUM): New defines.
8391 (ia64_fetch_register): New.
8392 (the_low_target): Install it.
8393 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8395 * linux-low.c (linux_fetch_registers): Try the
8396 the_low_target.fetch_register hook first.
8398 * linux-arm-low.c (the_low_target): Adjust.
8399 * linux-bfin-low.c (the_low_target): Adjust.
8400 * linux-cris-low.c (the_low_target): Adjust.
8401 * linux-crisv32-low.c (the_low_target): Adjust.
8402 * linux-m32r-low.c (the_low_target): Adjust.
8403 * linux-m68k-low.c (the_low_target): Adjust.
8404 * linux-mips-low.c (the_low_target): Adjust.
8405 * linux-ppc-low.c (the_low_target): Adjust.
8406 * linux-s390-low.c (the_low_target): Adjust.
8407 * linux-sh-low.c (the_low_target): Adjust.
8408 * linux-sparc-low.c (the_low_target): Adjust.
8409 * linux-tic6x-low.c (the_low_target): Adjust.
8410 * linux-x86-low.c (the_low_target): Adjust.
8411 * linux-xtensa-low.c (the_low_target): Adjust.
8413 2012-03-26 Pedro Alves <palves@redhat.com>
8415 * server.c (handle_qxfer_libraries): Don't bail early if
8416 the_target->qxfer_libraries_svr4 is not NULL.
8418 2012-03-26 Pedro Alves <palves@redhat.com>
8420 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8422 2012-03-23 Pedro Alves <palves@redhat.com>
8424 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8425 "library-list-svr4" element's start tag when the the DSO list is
8428 2012-03-23 Pedro Alves <palves@redhat.com>
8430 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8431 a variable whose type size is the same as the inferior's pointer
8434 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8436 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8438 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8439 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8440 * linux-low.h: Include <signal.h>.
8441 (struct siginfo): Remove forward declaration.
8442 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8445 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8447 * .gitignore: Ignore more files.
8449 2012-03-19 Pedro Alves <palves@redhat.com>
8450 Jan Kratochvil <jan.kratochvil@redhat.com>
8452 * server.c (cont_thread, general_thread): Add describing comments.
8453 (start_inferior): Clear `cont_thread'.
8454 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8457 2012-03-15 Yao Qi <yao@codesourcery.com>
8459 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8461 (cmd_qtdp): ... here.
8463 2012-03-15 Yao Qi <yao@codesourcery.com>
8465 * tracepoint.c (struct tracepoint_action_ops): New.
8466 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8467 (m_tracepoint_action_download): New.
8468 (r_tracepoint_action_download): New.
8469 (x_tracepoint_action_download): New.
8470 (l_tracepoint_action_download): New.
8471 (add_tracepoint_action): Install `action->ops' according type.
8472 (download_tracepoint_1): Move code `download' function pointer
8473 of various tracepoint_action_ops.
8475 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8477 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8478 linux_ptrace_attach_warnings.
8480 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8482 * Makefile.in (linux-ptrace.o): New.
8483 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8484 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8485 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8486 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8487 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8489 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8491 2012-03-08 Yao Qi <yao@codesourcery.com>
8492 Pedro Alves <palves@redhat.com>
8494 Fix PR server/13392.
8495 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8497 * tracepoint.c (remove_tracepoint): New.
8498 (cmd_qtdp): Call remove_tracepoint when failed to install.
8500 2012-03-07 Pedro Alves <palves@redhat.com>
8502 * linux-low.c (get_detach_signal): New.
8503 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8504 Pass on pending signals to PTRACE_DETACH. Check the result of the
8506 * server.c (program_signals, program_signals_p): New.
8507 (handle_general_set): Handle QProgramSignals.
8508 * server.h (program_signals, program_signals_p): Declare.
8510 2012-03-05 Pedro Alves <palves@redhat.com>
8511 Jan Kratochvil <jan.kratochvil@redhat.com>
8513 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8516 2012-03-03 Yao Qi <yao@codesourcery.com>
8518 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8519 agent_look_up_symbols.
8521 2012-03-03 Yao Qi <yao@codesourcery.com>
8523 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8524 (linux-x86-low.o): Likewise.
8525 * server.h: Remove in_process_agent_loaded.
8526 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8530 2012-03-03 Yao Qi <yao@codesourcery.com>
8532 * tracepoint.c (gdb_agent_capability): New global.
8533 (in_process_agent_loaded_ust): Renamed to
8534 `in_process_agent_supports_ust'.
8536 (in_process_agent_supports_ust): Call agent_capability_check.
8537 (clear_installed_tracepoints): Assert that agent supports
8540 2012-03-03 Yao Qi <yao@codesourcery.com>
8542 * linux-low.c (linux_supports_agent): New.
8543 (linux_target_ops): Initialize field `supports_agent' with
8544 linux_supports_agent.
8545 * target.h (struct target_ops) <supports_agent>: New.
8546 (target_supports_agent): New macro.
8547 * server.c (handle_general_set): Handle packet 'QAgent'.
8548 (handle_query): Send `QAgent+'.
8549 * Makefile.in (server.o): Depends on agent.h.
8551 2012-03-03 Yao Qi <yao@codesourcery.com>
8553 * Makefile.in (OBS): Add agent.o.
8554 Add new rule for agent.o.
8555 Track dependence of tracepoint.c on agent.h.
8556 * tracepoint.c (run_inferior_command_1):
8557 (run_inferior_command): Call agent_run_command.
8558 (gdb_ust_connect_sync_socket): Deleted. Move it to
8560 (resume_thread, stop_thread): Likewise.
8561 (gdb_ust_socket_init): Renamed to ...
8562 (gdb_agent_socket_init): ... New.
8563 (gdb_ust_thread): Renamed to ...
8564 (gdb_agent_helper_thread): ... New.
8565 (gdb_ust_init): Move some code to ...
8566 (gdb_agent_init): ... here. New.
8567 [HAVE_UST]: Call gdb_ust_init.
8568 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8569 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8570 * config.in, configure: Regenerated.
8572 2012-03-02 Pedro Alves <palves@redhat.com>
8574 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8575 * linux-low.c (struct simple_pid_list): New.
8576 (stopped_pids): New a struct simple_pid_list pointer.
8577 (add_to_pid_list, pull_pid_from_list): New.
8578 (handle_extended_wait): Don't assume the first signal new children
8579 report is SIGSTOP. Adjust call to pull_pid_from_list.
8580 (linux_wait_for_lwp): Adjust.
8582 2012-03-02 Yao Qi <yao@codesourcery.com>
8584 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8587 2012-03-02 Yao Qi <yao@codesourcery.com>
8589 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8590 `stop_pc' and `tpoint'. Update caller.
8592 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8594 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8595 * linux-low.c (use_linux_regsets): New macro.
8596 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8597 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8598 (linux_register_in_regsets): New function.
8599 (usr_fetch_inferior_registers): Skip registers covered by
8601 (usr_store_inferior_registers): Likewise.
8602 (usr_fetch_inferior_registers): New macro.
8603 (usr_store_inferior_registers): Likewise.
8604 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8605 (linux_store_registers): Likewise.
8606 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8608 (init_registers_mips64_dsp_linux): Likewise.
8609 (init_registers_mips_linux): New macro.
8610 (init_registers_mips_dsp_linux): Likewise.
8611 (mips_dsp_num_regs): Likewise.
8612 (DSP_BASE, DSP_CONTROL): New fallback macros.
8613 (mips_base_regs): New macro.
8614 (mips_regmap): Use it. Fix the size.
8615 (mips_dsp_regmap): New variable.
8616 (mips_dsp_regset_bitmap): Likewise.
8617 (mips_arch_setup): New function.
8618 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8620 (mips_cannot_store_register): Likewise.
8621 (the_low_target): Update .arch_setup, .num_regs and .regmap
8622 initializers. Add .regset_bitmap initializer.
8623 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8625 * linux-bfin-low.c (the_low_target): Likewise.
8626 * linux-cris-low.c (the_low_target): Likewise.
8627 * linux-crisv32-low.c (the_low_target): Likewise.
8628 * linux-ia64-low.c (the_low_target): Likewise.
8629 * linux-m32r-low.c (the_low_target): Likewise.
8630 * linux-m68k-low.c (the_low_target): Likewise.
8631 * linux-ppc-low.c (the_low_target): Likewise.
8632 * linux-s390-low.c (the_low_target): Likewise.
8633 * linux-sh-low.c (the_low_target): Likewise.
8634 * linux-sparc-low.c (the_low_target): Likewise.
8635 * linux-tic6x-low.c (the_low_target): Likewise.
8636 * linux-x86-low.c (the_low_target): Likewise.
8637 * linux-xtensa-low.c (the_low_target): Likewise.
8638 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8639 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8640 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8642 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8643 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8645 2012-02-29 Yao Qi <yao@codesourcery.com>
8646 Pedro Alves <palves@redhat.com>
8648 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8649 `step_over_finished' is true.
8651 2012-02-27 Pedro Alves <palves@redhat.com>
8653 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8654 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8656 2012-02-27 Pedro Alves <palves@redhat.com>
8659 * linux-low.c (pid_is_stopped): New.
8660 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8662 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8664 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8667 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8669 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8671 2012-02-24 Luis Machado <lgustavo@codesourcery>
8673 * server.c (handle_query): Advertise support for target-side
8674 breakpoint condition evaluation.
8675 (process_point_options): New function.
8676 (process_serial_event): When inserting a breakpoint, check for
8677 a target-side condition that should be evaluated.
8679 * mem-break.c: Include regcache.h and ax.h.
8680 (point_cond_list_t): New data structure.
8681 (breakpoint) <cond_list>: New field.
8682 (find_gdb_breakpoint_at): Make non-static.
8683 (delete_gdb_breakpoint_at): Clear any target-side
8685 (clear_gdb_breakpoint_conditions): New function.
8686 (add_condition_to_breakpoint): Likewise.
8687 (add_breakpoint_condition): Likewise.
8688 (gdb_condition_true_at_breakpoint): Likewise.
8689 (gdb_breakpoint_here): Return result directly instead
8690 of going through a local variable.
8692 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8693 (clear_gdb_breakpoint_conditions): Likewise.
8694 (add_breakpoint_condition): Likewise.
8695 (gdb_condition_true_at_breakpoint): Likewise.
8697 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8698 (need_step_over_p): Take target-side breakpoint condition into
8701 2012-02-24 Luis Machado <lgustavo@codesourcery>
8703 * server.h: Include tracepoint.h.
8704 (agent_mem_read, agent_get_trace_state_variable_value,
8705 agent_set_trace_state_variable_value,
8706 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8707 get_set_tsv_func_addr): New prototypes.
8709 * ax.h: New include file.
8710 * ax.c: New source file.
8712 * tracepoint.c: Include ax.h.
8713 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8714 agent_expr, eval_result_type): Move to ax.h.
8715 (parse_agent_expr): Rename to ...
8716 (gdb_parse_agent_expr): ... this, make it non-static and move
8718 (unparse_agent_expr) Rename to ...
8719 (gdb_unparse_agent_expr): ... this, make it non-static and move
8721 (eval_agent_expr): Rename to ...
8722 (eval_tracepoint_agent_expr): ... this.
8723 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8724 forward declarations.
8725 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8726 (agent_get_trace_state_variable_value): New function.
8727 (agent_set_trace_state_variable_value): New function.
8728 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8729 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8730 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8731 (condition_true_at_tracepoint): Likewise.
8732 (parse_agent_expr): Rename to ...
8733 (gdb_parse_agent_expr): ... this and move to ax.c.
8734 (unparse_agent_expr): Rename to ...
8735 (gdb_unparse_agent_expr): ... this and move to ax.c.
8736 (gdb_agent_op_name): Move to ax.c.
8737 (eval_agent_expr): Rename to ...
8738 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8740 (eval_tracepoint_agent_expr): New function.
8741 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8743 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8745 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8746 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8747 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8748 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8749 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8750 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8751 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8752 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8753 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8754 (compile_bytecodes): Remove forward declaration.
8755 (is_goto_target): Move to ax.c.
8756 (compile_bytecodes): Move to ax.c and call
8757 agent_get_trace_state_variable_value (...) and
8758 agent_set_trace_state_variable_value (...).
8760 * Makefile.in: Update ax.c and IPA dependencies.
8762 2012-02-24 Pedro Alves <palves@redhat.com>
8764 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8765 (cmd_bigqtbuffer_circular): ... this. Only handle
8766 'QTBuffer:circular:'.
8767 (handle_tracepoint_general_set): Adjust.
8769 2012-02-16 Yao Qi <yao@codesourcery.com>
8771 * inferiors.c: Move code to ...
8772 * dll.c: .... here. New.
8773 * server.h: Declare clear_dlls.
8774 * Makefile.in (SFILES): Add dll.c.
8778 2012-02-11 Yao Qi <yao@codesourcery.com>
8780 * server.c: (handle_monitor_command): Add a new parameter
8782 (handle_query): Update caller.
8784 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8786 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8787 * configure, config.in: Regenerate.
8788 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8791 2012-02-02 Pedro Alves <palves@redhat.com>
8793 Try SIGKILL first, then PTRACE_KILL.
8794 * linux-low.c (linux_kill_one_lwp): New.
8795 (linux_kill_one_lwp): Rename to ...
8796 (kill_one_lwp_callback): ... this. Use the new
8799 2012-02-02 Pedro Alves <palves@redhat.com>
8801 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8804 2012-01-27 Pedro Alves <palves@redhat.com>
8806 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8807 (elf_64_file_p): Make static.
8808 (linux_pid_exe_is_elf_64_file): New.
8809 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8810 Delete declarations.
8811 (linux_pid_exe_is_elf_64_file): Declare.
8812 * linux-x86-low.c (x86_arch_setup): Use
8813 linux_pid_exe_is_elf_64_file.
8815 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8817 * linux-low.c (linux_wait_for_event_1): Rename to ...
8818 (linux_wait_for_event): ... here and merge it with former
8819 linux_wait_for_event - new variable wait_ptid, use it.
8820 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8822 2012-01-23 Pedro Alves <palves@redhat.com>
8824 * server.c (main): Avoid yet another case of infinite loop while
8825 detaching/killing after a longjmp.
8827 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8830 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8832 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8834 * hostio.c (handle_readlink): New function.
8835 (handle_vFile): Call it to handle "vFile:readlink" packets.
8837 2012-01-20 Pedro Alves <palves@redhat.com>
8838 Ulrich Weigand <ulrich.weigand@linaro.org>
8840 * server.c (handle_v_requests): Only support vAttach and vRun to
8841 start multiple processes when in extended protocol mode.
8843 2012-01-17 Pedro Alves <palves@redhat.com>
8845 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8846 memalign plus mprotect to allocate the scratch buffer.
8848 2012-01-13 Pedro Alves <palves@redhat.com>
8850 * server.c (attach_inferior): Clear `cont_thread'.
8852 2012-01-13 Pedro Alves <palves@redhat.com>
8854 * server.c (main): Avoid infinite loop while detaching/killing
8857 2012-01-09 Doug Evans <dje@google.com>
8859 * server.c (start_inferior): Set last_ptid in --wrapper case.
8861 2012-01-06 Yao Qi <yao@codesourcery.com>
8863 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8865 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8867 2012-01-04 Yao Qi <yao@codesourcery.com>
8869 * tracepoint.c (cmd_qtdp): Print debug message
8870 for static tracepoint.
8872 2012-01-04 Yao Qi <yao@codesourcery.com>
8874 * tracepoint.c (trace_vdebug): Differentiate debug message
8875 between gdbserver and IPA.
8877 2012-01-03 Yao Qi <yao@codesourcery.com>
8879 * tracepoint.c (tracepoint_was_hit): Don't collect for
8882 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8884 * terminal.h: Reformat copyright header.
8886 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8888 * server.c (gdbserver_version): Update copyright year.
8889 * gdbreplay.c (gdbreplay_version): Likewise.
8891 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8893 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8896 2011-12-18 Hui Zhu <teawater@gmail.com>
8897 * linux-low.c (linux_create_inferior): Save return value to ret.
8899 2011-12-18 Hui Zhu <teawater@gmail.com>
8901 * linux-low.c (linux_create_inferior): Save return value to ret.
8903 2011-12-16 Doug Evans <dje@google.com>
8905 * linux-low.c (linux_create_inferior): If stdio connection,
8906 redirect stdin from /dev/null, stdout to stderr.
8907 * remote-utils.c (remote_is_stdio): New static global.
8908 (remote_connection_is_stdio): New function.
8909 (remote_prepare): Handle stdio connection.
8910 (remote_open): Ditto.
8911 (remote_close): Don't close stdin for stdio connections.
8912 (read_prim,write_prim): New functions. Replace all calls to
8913 read/write to these.
8914 * server.c (main): Watch for "-" argument. Move call to
8915 remote_prepare before start_inferior.
8916 * server.h (STDIO_CONNECTION_NAME): New macro.
8917 (remote_connection_is_stdio): Declare.
8919 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8920 in debugging output.
8922 2011-12-15 Yao Qi <yao@codesourcery.com>
8924 * tracepoint.c: Include sys/syscall.h.
8925 (gdb_ust_thread): Remove preprocessor conditional.
8927 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8929 * linux-low.c (linux_detach_one_lwp): Call
8930 the_low_target.prepare_to_resume before detaching.
8932 2011-12-14 Yao Qi <yao@codesourcery.com>
8934 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8937 2011-12-14 Yao Qi <yao@codesourcery.com>
8939 * i386-low.c (i386_low_stopped_data_address): Initialize local
8942 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8946 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8947 DR_CONTROL unless necessary. Extend comments.
8948 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8949 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8951 2011-12-13 Yao Qi <yao@codesourcery.com>
8953 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8955 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8957 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8959 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8960 Print new debug message for such case.
8962 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8964 Fix overlapping memcpy.
8965 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8966 the read_inferior_memory transfer.
8967 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8968 write_inferior_memory transfer.
8969 (set_fast_tracepoint_jump): New variable buf. Use it for the
8970 read_inferior_memory and write_inferior_memory transfers.
8971 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8972 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8973 Use it for the write_inferior_memory transfer.
8974 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8977 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8979 * linux-low.c (fetch_register, store_register): Make code
8980 consistent, fix formatting.
8982 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8984 * linux-low.c (usr_store_inferior_registers): Factor out code
8985 to handle individual registers into...
8986 (store_register): ... this new function.
8988 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8990 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8991 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8992 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8993 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8994 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8995 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8996 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8997 (srv_xmlfiles): Add new XML files.
8999 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9001 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9002 (init_registers_s390_linux32v1): Add prototype.
9003 (init_registers_s390_linux32v2): Likewise.
9004 (init_registers_s390_linux64v1): Likewise.
9005 (init_registers_s390_linux64v2): Likewise.
9006 (init_registers_s390x_linux64v1): Likewise.
9007 (init_registers_s390x_linux64v2): Likewise.
9008 (s390_num_regs): Increment to 52.
9009 (s390_regmap): Add orig_r2 register.
9010 (s390_num_regs_3264): Increment to 68.
9011 (s390_regmap_3264): Add orig_r2 register.
9012 (s390_collect_ptrace_register): Handle orig_r2 register.
9013 (s390_supply_ptrace_register): Likewise.
9014 (s390_fill_last_break): New function.
9015 (s390_store_last_break): Likewise.
9016 (s390_fill_system_call): New function.
9017 (s390_store_system_call): Likewise.
9018 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9020 (s390_check_regset): New function.
9021 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9022 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9023 Update target_regsets for available register sets.
9025 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9026 Jan Kratochvil <jan.kratochvil@redhat.com>
9028 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9029 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9031 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9032 * linux-low.h (struct process_info_private): New member r_debug.
9033 * server.c (handle_qxfer_libraries): Call
9034 the_target->qxfer_libraries_svr4.
9035 (handle_qxfer_libraries_svr4): New function.
9036 (qxfer_packets): New entry "libraries-svr4".
9037 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9038 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9039 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9040 PACKET_qXfer_libraries_svr4.
9042 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9044 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9045 PSW address/mask between 8-byte and 16-byte formats.
9046 (s390_supply_ptrace_register): Likewise.
9047 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9048 basic addressing mode bit.
9050 2011-11-24 Stan Shebs <stan@codesourcery.com>
9052 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9054 2011-11-17 Stan Shebs <stan@codesourcery.com>
9056 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9057 (tracing_start_time): New global.
9058 (tracing_stop_time): New global.
9059 (tracing_user_name): New global.
9060 (tracing_notes): New global.
9061 (tracing_stop_note): New global.
9062 (cmd_qtstart): Set traceframe_usage, start_time.
9063 (stop_tracing): Set stop_time.
9064 (cmd_qtstatus): Report additional status.
9065 (cmd_qtp): New function.
9066 (handle_tracepoint_query): Call it.
9067 (cmd_qtnotes): New function.
9068 (handle_tracepoint_general_set): Call it.
9069 (get_timestamp): Rename from tsv_get_timestamp.
9071 2011-11-14 Stan Shebs <stan@codesourcery.com>
9072 Kwok Cheung Yeung <kcy@codesourcery.com>
9074 * linux-x86-low.c (small_jump_insn): New.
9075 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9076 trampoline and error message, build a trampoline and issue a small
9077 jump instruction to it.
9078 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9079 trampoline and error message.
9080 (x86_get_min_fast_tracepoint_insn_len): New.
9081 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9082 * linux-low.h (struct linux_target_ops): Add arguments to
9083 install_fast_tracepoint_jump_pad operation, add new operation.
9084 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9086 (linux_get_min_fast_tracepoint_insn_len): New function.
9087 (linux_target_op): Add new operation.
9088 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9089 (gdb_trampoline_buffer_end): Ditto.
9090 (gdb_trampoline_buffer_error): Ditto.
9091 (struct ipa_sym_addresses): Add fields for new IPA variables.
9092 (symbol_list): Add entries for new IPA variables.
9093 (struct tracepoint): Add fields to hold the address range of the
9094 trampoline used by the tracepoint.
9095 (trampoline_buffer_head): New static variable.
9096 (trampoline_buffer_tail): Ditto.
9097 (claim_trampoline_space): New function.
9098 (have_fast_tracepoint_trampoline_buffer): New function.
9099 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9101 (install_fast_tracepoint): Ditto, also add error buffer argument.
9102 (cmd_qtminftpilen): New function.
9103 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9104 (fast_tracepoint_from_trampoline_address): New function.
9105 (fast_tracepoint_collecting): Handle trampoline as part of jump
9107 (set_trampoline_buffer_space): New function.
9108 (initialize_tracepoint): Initialize new IPA variables.
9109 * target.h (struct target_ops): Add arguments to
9110 install_fast_tracepoint_jump_pad operation, add new
9111 get_min_fast_tracepoint_insn_len operation.
9112 (target_get_min_fast_tracepoint_insn_len): New.
9113 (install_fast_tracepoint_jump_pad): Add arguments.
9114 * server.h (IPA_BUFSIZ): Define.
9115 * linux-i386-ipa.c: Include extra header files.
9116 (initialize_fast_tracepoint_trampoline_buffer): New function.
9117 (initialize_low_tracepoint): Call it.
9118 * server.h (set_trampoline_buffer_space): Declare.
9119 (claim_trampoline_space): Ditto.
9120 (have_fast_tracepoint_trampoline_buffer): Ditto.
9122 2011-11-14 Yao Qi <yao@codesourcery.com>
9124 * server.c (handle_query): Handle InstallInTrace for qSupported.
9125 * tracepoint.c (add_tracepoint): Sort list.
9126 (install_tracepoint, download_tracepoint): New.
9127 (cmd_qtdp): Call them to install and download tracepoints.
9128 (sort_tracepoints): Removed.
9129 (cmd_qtstart): Update.
9131 2011-11-14 Yao Qi <yao@codesourcery.com>
9133 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9134 * mem-break.h: Declare.
9135 * tracepoint.c (cmd_qtstart): Move some code to ...
9136 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9138 (download_tracepoints): Move some code to ...
9139 (download_tracepoint_1): ... here. New.
9141 2011-11-08 Yao Qi <yao@codesourcery.com>
9143 * remote-utils.c (relocate_instruction): A comment fix.
9145 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9147 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9148 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9149 dr_status_mirror and dr_control_mirror from debug_reg_state.
9150 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9151 (i386_initial_stuff): Remove use of deleted globals.
9152 (i386_get_thread_context, i386_set_thread_context,
9153 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9154 from debug_reg_state.
9156 2011-11-05 Yao Qi <yao@codesourcery.com>
9158 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9159 address as TPOINT's.
9161 2011-11-02 Stan Shebs <stan@codesourcery.com>
9163 * tracepoint.c (agent_mem_read_string): New function.
9164 (eval_agent_expr): Call it for tracenz.
9165 * server.c (handle_query): Report support for tracenz.
9167 2011-11-02 Yao Qi <yao@codesourcery.com>
9169 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9171 2011-11-02 Yao Qi <yao@codesourcery.com>
9173 * target.h: Fix a typo in comment.
9175 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9177 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9178 clobber the breakpoints' shadows with fast tracepoint jumps.
9179 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9180 * target.c (write_inferior_memory): Also pass MYADDR down to
9183 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9185 * configure.ac: Check support for personality routine.
9186 * configure: Regenerate.
9187 * config.in: Likewise.
9188 * linux-low.c: Include <sys/personality.h>.
9189 Define ADDR_NO_RANDOMIZE if necessary.
9190 (linux_create_inferior): Disable address space randomization when
9191 forking inferior, if requested.
9192 (linux_supports_disable_randomization): New function.
9193 (linux_target_ops): Install it.
9194 * server.h (disable_randomization): Declare.
9195 * server.c (disable_randomization): New global variable.
9196 (handle_general_set): Handle QDisableRandomization.
9197 (handle_query): Likewise for qSupported.
9198 (main): Support --disable-randomization and --no-disable-randomization
9199 command line arguments.
9200 * target.h (struct target_ops): Add supports_disable_randomization.
9201 (target_supports_disable_randomization): New macro.
9203 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9205 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9207 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9208 [!PT_GETDSBT] (target_loadmap): New definition.
9209 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9210 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9211 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9212 and PT_GETDSBT to LINUX_LOADMAP.
9213 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9214 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9216 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9218 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9219 (arm_linux_hwbp_cap): New static variable.
9220 (arm_linux_get_hwbp_cap): Replace by ...
9221 (arm_linux_init_hwbp_cap): ... this new function.
9222 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9223 (arm_linux_get_hw_watchpoint_count): Likewise.
9224 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9225 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9226 (arm_prepare_to_resume): Use perror_with_name instead of error.
9228 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9230 * linux-arm-low.c: Include <signal.h>.
9231 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9232 (struct arm_linux_hwbp_cap): New data type.
9233 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9234 (struct arm_linux_hw_breakpoint): New data type.
9235 (MAX_BPTS, MAX_WPTS): Define.
9236 (struct arch_process_info, struct arch_lwp_info): New data types.
9237 (arm_linux_get_hwbp_cap): New function.
9238 (arm_linux_get_hw_breakpoint_count): Likewise.
9239 (arm_linux_get_hw_watchpoint_count): Likewise.
9240 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9241 (arm_hwbp_control_initialize): Likewise.
9242 (arm_hwbp_control_is_enabled): Likewise.
9243 (arm_hwbp_control_is_initialized): Likewise.
9244 (arm_hwbp_control_disable): Likewise.
9245 (arm_linux_hw_breakpoint_equal): Likewise.
9246 (arm_linux_hw_point_initialize): Likewise.
9247 (struct update_registers_data): New data structure.
9248 (update_registers_callback: New function.
9249 (arm_insert_point): Likewise.
9250 (arm_remove_point): Likewise.
9251 (arm_stopped_by_watchpoint): Likewise.
9252 (arm_stopped_data_address): Likewise.
9253 (arm_new_process): Likewise.
9254 (arm_new_thread): Likewise.
9255 (arm_prepare_to_resume): Likewise.
9256 (the_low_target): Register arm_insert_point, arm_remove_point,
9257 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9258 arm_new_thread, and arm_prepare_to_resume.
9260 2011-09-15 Stan Shebs <stan@codesourcery.com>
9262 * server.h (struct emit_ops): Add compare-goto fields.
9263 * tracepoint.c (gdb_agent_op_sizes): New table.
9264 (emit_eq_goto): New function.
9265 (emit_ne_goto): New function.
9266 (emit_lt_goto): New function.
9267 (emit_le_goto): New function.
9268 (emit_gt_goto): New function.
9269 (emit_ge_goto): New function.
9270 (is_goto_target): New function.
9271 (compile_bytecodes): Recognize special cases of compare-goto
9272 combinations and call specialized emitters for them.
9273 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9274 (amd64_emit_ne_goto): New function.
9275 (amd64_emit_lt_goto): New function.
9276 (amd64_emit_le_goto): New function.
9277 (amd64_emit_gt_goto): New function.
9278 (amd64_emit_ge_goto): New function.
9279 (amd64_emit_ops): Add the new functions.
9280 (i386_emit_eq_goto): New function.
9281 (i386_emit_ne_goto): New function.
9282 (i386_emit_lt_goto): New function.
9283 (i386_emit_le_goto): New function.
9284 (i386_emit_gt_goto): New function.
9285 (i386_emit_ge_goto): New function.
9286 (i386_emit_ops): Add the new functions.
9288 2011-09-08 Stan Shebs <stan@codesourcery.com>
9290 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9291 (i386_emit_epilogue): Restore %ebx.
9293 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9295 * server.c (step_thread): Remove definition.
9296 (process_serial_event): Don't handle Hs.
9297 * server.h (step_thread): Remove declaration.
9298 * target.c (set_desired_inferior): Remove use of step_thread.
9300 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9302 * linux-low.c: Include linux-procfs.h.
9303 (linux_attach_lwp_1): Update comments.
9304 (linux_attach): Scan for existing threads when attaching to a
9305 process that is the tgid.
9306 * Makefile.in: Update dependencies.
9308 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9310 * configure.srv: Add linux-procfs.o dependencies.
9312 2011-08-14 Yao Qi <yao@codesourcery.com>
9314 * target.h (struct target_ops): Fix indent.
9315 * win32-low.c (win32_target_ops): Fix comment.
9317 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9318 Yao Qi <yao@codesourcery.com>
9320 * Makefile.in (clean): Remove tic6x-*.c files.
9321 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9322 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9323 (tic6x-c64xp-linux.c): Likewise.
9324 * configure.srv: Add support for tic6x-*-uclinux.
9325 * linux-tic6x-low.c: New.
9326 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9328 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9329 Yao Qi <yao@codesourcery.com>
9331 * target.h (struct target_ops): Add read_loadmap.
9332 * linux-low.c (struct target_loadseg): New type.
9333 (struct target_loadmap): New type.
9334 (linux_read_loadmap): New function.
9335 (linux_target_ops): Add linux_read_loadmap.
9336 * server.c (handle_query): Support qXfer:fdpic:read packet.
9337 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9340 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9342 * win32-low.c: Include <stdint.h>.
9344 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9346 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9347 to the inferior here.
9348 (i386_remove_aligned_watchpoint): Ditto.
9349 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9350 fit part of the watchpoint in the debug registers.
9351 (i386_update_inferior_debug_regs): New.
9352 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9353 registers, and only update the inferior on success.
9354 (i386_low_remove_watchpoint): Ditto.
9356 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9358 * linux-low.c (compare_ints, unique, list_threads, show_process,
9359 linux_core_of_thread): Delete.
9360 (linux_target_ops): Change linux_core_of_thread to
9361 linux_common_core_of_thread.
9362 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9363 * utils.c (malloc_failure): Change type of argument.
9364 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9365 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9366 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9367 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9368 (IPA_OBJS): Add common-utils-ipa.o.
9369 (ptid_h, linux_osdata_h): New macros.
9370 (server_h): Add common/common-utils.h, common/xml-utils.h,
9371 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9373 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9374 ptid.o, buffer.o): New rules.
9375 (linux-low.o): Add common/linux-osdata.h as a dependency.
9376 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9377 * configure.ac: Add AC_HEADER_DIRENT check.
9378 * config.in: Regenerate.
9379 * configure: Regenerate.
9380 * remote-utils.c (xml_escape_text): Delete.
9381 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9382 buffer_xml_printf): Move to common/buffer.c.
9383 * server.c (main): Remove call to initialize_inferiors.
9384 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9385 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9386 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9387 internal_error, gdb_assert, gdb_assert_fail): Delete.
9388 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9389 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9391 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9392 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9393 initialize_inferiors): Delete.
9395 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9397 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9400 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9402 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9404 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9406 2011-05-26 Yao Qi <yao@codesourcery.com>
9408 * Makefile.in (thread-db.o): Track dependence to
9409 common/gdb_thread_db.h.
9410 * thread-db.c: include gdb_thread_db.h from right place.
9412 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9414 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9415 __FILE__ and __LINE__ to internal_error.
9417 2011-05-13 Doug Evans <dje@google.com>
9419 * thread-db.c (try_thread_db_load_from_sdir): New function.
9420 (try_thread_db_load_from_dir): New function.
9421 (thread_db_load_search): Handle $sdir, ignore $pdir.
9422 Remove trying of system directories if search of
9423 libthread-db-search-path fails, that is now done via $sdir.
9425 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9427 * server.c (handle_query): Add EnableDisableTracepoints to the list
9428 of supported features.
9429 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9431 (cmd_qtenable_disable): New.
9432 (cmd_qtstart): Install tracepoints even if disabled.
9433 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9434 receiving a QTEnable or QTDisable packet.
9435 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9436 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9438 (gdb_probe): Skip data collection if static tracepoint is disabled.
9440 2011-05-10 Doug Evans <dje@google.com>
9442 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9444 2011-05-04 Doug Evans <dje@google.com>
9446 * linux-low.c (linux_join): Skip process lookup.
9447 * spu-low.c (spu_join): Ditto.
9448 * server.c (join_inferiors_callback): Delete.
9449 (process_serial_event): For 'D' packet (detach) call join_inferior
9452 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9454 * README: Don't mention xscale*-*-linux*.
9455 * configure.srv (xscale*-*-linux*): Don't handle target.
9457 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9459 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9461 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9462 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9463 (i386_emit_void_call_2): Likewise.
9465 2011-04-26 Yao Qi <yao@codesourcery.com>
9467 * linux-low.c: Move common macros to linux-ptrace.h.
9468 Include linux-ptrace.h.
9469 * Makefile.in (linux_ptrace_h): New.
9470 (linux-low.o): Depends on linux-ptrace.h.
9472 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9474 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9475 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9476 (remote_prepare): New function with most of the TCP code from ...
9477 (remote_open): ... here. Detect PORT here unconditionally. Move also
9478 setting transport_is_reliable.
9479 * server.c (run_once): New variable.
9480 (gdbserver_usage): Document it.
9481 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9482 the first run if RUN_ONCE.
9483 * server.h (run_once, remote_prepare): New declarations.
9485 2011-04-19 Tom Tromey <tromey@redhat.com>
9487 * win32-low.c (handle_load_dll): Remove duplicate "the".
9489 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9491 Remove support for old Cygwin 1.5 versions.
9492 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9493 function to avoid warning.
9494 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9497 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9499 * gdbserver/server.h (Macro _): Define it if not available.
9501 2011-03-14 Michael Snyder <msnyder@vmware.com>
9503 * hostio.c (handle_close): Remove unnecessary null test.
9505 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9507 * Makefile.in (maintainer-clean realclean distclean): Remove
9508 "make ... subdir_do" command.
9510 2011-03-10 Michael Snyder <msnyder@vmware.com>
9512 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9514 * server.c (handle_v_run): Free alloced buffer on early return.
9516 2011-03-09 Yao Qi <yao@codesourcery.com>
9519 2011-03-04 Yao Qi <yao@codesourcery.com>
9521 * Makefile.in: Remove GNU make feature --directory.
9523 2011-03-05 Yao Qi <yao@codesourcery.com>
9525 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9526 (subdir_do): New make target. Copied from gdb/Makefile.
9527 (maintainer-clean, realclean, distclean, clean): Call corresponding
9528 make targets in common/Makefile.
9530 2011-02-11 Yao Qi <yao@codesourcery.com>
9532 * configure.ac: Call AC_PROG_RANLIB.
9533 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9534 * configure: Regenerate.
9536 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9538 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9540 2011-03-06 Yao Qi <yao@codesourcery.com>
9542 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9544 2011-03-05 Yao Qi <yao@codesourcery.com>
9546 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9547 (subdir_do): New make target. Copied from gdb/Makefile.
9548 (maintainer-clean, realclean, distclean, clean): Call corresponding
9549 make targets in common/Makefile.
9551 2011-03-04 Yao Qi <yao@codesourcery.com>
9553 * Makefile.in: Remove GNU make feature --directory.
9555 2011-03-04 Michael Snyder <msnyder@vmware.com>
9557 * server.c (queue_stop_reply): Call xmalloc not malloc.
9559 2011-03-02 Michael Snyder <msnyder@vmware.com>
9561 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9563 2011-02-28 Michael Snyder <msnyder@vmware.com>
9565 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9566 (cmd_qtframe): Ditto.
9567 (cmd_qtbuffer): Ditto.
9568 (cmd_bigqtbuffer): Ditto.
9570 * utils.c (decimal2str): Initialize 'width' to nine, then
9573 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9575 * hostio.c (require_data): Free *data, not data.
9577 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9579 * hostio.c (require_data): Use free, not xfree.
9581 2011-02-27 Michael Snyder <msnyder@vmware.com>
9583 * server.c (handle_query): Discard unused value.
9585 * hostio.c (require_data): Free malloc memory before returning
9588 2011-02-26 Michael Snyder <msnyder@vmware.com>
9590 * linux-low.c (list_threads): Call closedir for dirent.
9592 2011-02-27 Michael Snyder <msnyder@vmware.com>
9594 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9595 a case statement falls through.
9597 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9599 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9602 2011-02-26 Michael Snyder <msnyder@vmware.com>
9604 * utils.c (decimal2str): Eliminate dead code and dead param.
9605 (pulongest): Drop dead param from call to decimal2str.
9608 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9610 Revert the following patch (not approved yet):
9611 2011-02-21 Hui Zhu <teawater@gmail.com>
9612 * tracepoint.c (tp_printf): New function.
9613 (eval_agent_expr): Handle gdb_agent_op_printf.
9615 2011-02-21 Hui Zhu <teawater@gmail.com>
9617 * tracepoint.c (tp_printf): New function.
9618 (eval_agent_expr): Handle gdb_agent_op_printf.
9620 2011-02-18 Tom Tromey <tromey@redhat.com>
9622 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9623 (tracepoint.o): Likewise.
9624 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9625 (gdb_agent_op_names): Likewise.
9627 2011-02-18 Tom Tromey <tromey@redhat.com>
9629 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9630 gdb_agent_op_rot>: New constants.
9631 (gdb_agent_op_names): Add pick and roll.
9632 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9635 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9637 * aclocal.m4: Regenerated with aclocal-1.11.1.
9639 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9641 * server.c (handle_qxfer_traceframe_info): New.
9642 (qxfer_packets): Register "traceframe-info".
9643 (handle_query): Report support for qXfer:traceframe-info:read+.
9644 * tracepoint.c (match_blocktype): New.
9645 (traceframe_find_block_type): Rename to ...
9646 (traceframe_walk_blocks): ... this. Add callback filter argument,
9648 (traceframe_find_block_type): New, reimplemented on top of
9649 traceframe_walk_blocks.
9650 (build_traceframe_info_xml): New.
9651 (traceframe_read_info): New.
9652 * server.h (traceframe_read_info): Declare.
9654 2011-02-11 Yao Qi <yao@codesourcery.com>
9656 * configure.ac: Call AC_PROG_RANLIB.
9657 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9658 * configure: Regenerate.
9660 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9662 * server.c (gdb_read_memory): Change return semantics to allow
9664 (handle_search_memory_1): Adjust.
9665 (process_serial_event) <'m' packet>: Handle partial transfers.
9666 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9668 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9670 * regcache.c (init_register_cache): Initialize
9671 regcache->register_status.
9672 (free_register_cache): Release regcache->register_status.
9673 (regcache_cpy): Copy register_status.
9674 (registers_to_string): Print 'x's for unavailable registers.
9675 (supply_register): Mark the register's status valid or
9676 unavailable, depending on whether a buffer was passed in or not.
9677 (supply_register_zeroed): New.
9678 (supply_regblock): Mark the registers' status valid or
9679 unavailable, depending on whether a buffer was passed in or not.
9680 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9681 (struct regcache): New `register_status' field.
9682 (supply_register_zeroed): Declare.
9683 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9684 supply_register_zeroed, rather than passing a NULL buffer to
9686 * tracepoint.c (fetch_traceframe_registers): Update comment.
9688 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9690 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9693 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9695 * server.h (decode_xfer_write): Change prototype.
9696 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9697 and don't extract the annex here.
9698 * server.c (decode_xfer_read): Remove `annex' parameter,
9699 and don't extract the annex here.
9701 (struct qxfer): New.
9702 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9703 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9704 (handle_qxfer_statictrace): New functions, abstracted out from
9705 handle_query, and made to use the struct qxfer interface.
9706 (handle_threads_qxfer_proper): Rename to ...
9707 (handle_qxfer_threads_proper): ... this.
9708 (handle_threads_qxfer): Rename to ...
9709 (handle_qxfer_threads): ... this. Adjust.
9710 (qxfer_packets): New array.
9711 (handle_qxfer): New function.
9712 (handle_query): Use handle_qxfer.
9714 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9716 * gdbreplay.c: Shorten lines of >= 80 columns.
9717 * linux-low.c: Ditto.
9718 * linux-ppc-low.c: Ditto.
9719 * linux-s390-low.c: Ditto.
9720 * linux-sparc-low.c: Ditto.
9721 * linux-x86-low.c: Ditto.
9722 * linux-xtensa-low.c: Ditto.
9723 * mem-break.c: Ditto.
9725 * regcache.h: Ditto.
9726 * remote-utils.c: Ditto.
9729 * thread-db.c: Ditto.
9730 * tracepoint.c: Ditto.
9732 * win32-low.h: Ditto.
9734 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9736 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9739 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9741 * server.c (gdbserver_version): Update copyright year in version
9743 * gdbreplay.c (gdbreplay_version): Ditto.
9745 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9747 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9748 * linux-bfin-low.c: New file.
9749 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9750 PT_DATA_ADDR for BFIN targets.
9751 * Makefile.in (SFILES): Add linux-bfin-low.c.
9752 (clean): Remove reg-bfin.c.
9753 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9754 * README: Mention supported Blackfin targets.
9756 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9758 * .gitignore: New file.
9760 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9762 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9764 2010-10-22 Jie Zhang <jie@codesourcery.com>
9766 * Makefile.in: Add FLAGS_TO_PASS variable.
9767 (install): Remove dependency of install-only and recursively
9768 invoke make for install-only.
9770 2010-10-04 Doug Evans <dje@google.com>
9772 * Makefile.in (uninstall): Use $(DESTDIR).
9774 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9778 * linux-x86-low.c (compat_siginfo_from_siginfo)
9779 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9780 si_code is < 0. Check for si_code == SI_TIMER before checking for
9783 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9785 * lynx-i386-low.c: New file.
9786 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9788 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9790 * lynx-low.c (ptrace_request_to_str): Remove handling for
9791 request values that have been removed in LynxOS 5.x.
9793 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9795 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9798 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9800 * configure.ac: Add --enable-inprocess-agent option.
9801 * configure: Rebuilt.
9803 2010-09-06 Yao Qi <yao@codesourcery.com>
9805 * linux-low.c (linux_kill): Remove unused variable.
9806 (linux_stabilize_threads): Likewise.
9807 * server.c (start_inferior): Likewise.
9808 (queue_stop_reply_callback): Likewise.
9809 * tracepoint.c (do_action_at_tracepoint): Likewise.
9811 2010-09-06 Yao Qi <yao@codesourcery.com>
9813 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9816 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9818 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9820 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9822 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9825 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9827 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9828 gdbserver/lynx-ppc-low.c: New files.
9829 * Makefile.in (lynx_low_h): New variable.
9830 (lynx-low.o, lynx-ppc-low.o): New rules.
9831 * configure.ac: On LynxOS, link with -lnetinet.
9832 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9833 * configure: regenerate.
9835 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9837 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9838 * configure.ac: Add check for vasprintf and vsnprintf.
9839 * configure, config.in: Regenerate.
9840 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9842 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9844 * gdbreplay.c: Move include of alloca.h up, next to include of
9846 * server.h: Add include of malloc.h.
9847 * mem-break.c: Remove include of malloc.h.
9848 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9850 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9852 * Makefile.in (memmem.o): Build with -Wno-error.
9854 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9856 * utils.c (xsnprintf): Make non-static.
9857 * server.h: Add xsnprintf declaration.
9858 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9859 replace calls to snprintf by calls to xsnprintf throughout.
9861 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9863 * configure.ac: Add configure check for alloca.
9864 * configure, config.in: Regenerate.
9865 * server.h: Include alloca.h if it exists.
9866 * gdbreplay.c: Include alloca.h if it exists.
9868 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9870 * linux-low.c (__SIGRTMIN): Define if not already defined.
9871 (linux_create_inferior): Check for __ANDROID__ rather than
9873 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9874 are already deferred.
9875 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9876 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9877 stopped and already has a pending signal to report.
9878 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9879 a pending signal to report or is moving out of a jump pad.
9880 (linux_init_signals): Check for __ANDROID__ rather than
9883 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9885 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9886 debug_threads check. Avoid a linear search when not doing debug
9889 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9891 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9892 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9893 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9894 (process_event): Change local fd's type to gdb_fildes_t.
9895 (create_file_handler): Adjust prototype.
9896 (delete_file_handler): Adjust prototype.
9897 (handle_file_event): Adjust prototype. Use pfildes.
9898 (create_file_event): Adjsut prototype.
9899 * remote-utils.c (remote_desc, listen_desc): Change type to
9901 * server.h: New gdb_fildes_t typedef.
9902 [USE_WIN32API]: Include winsock2.h.
9903 (delete_file_handler, add_file_handler): Adjust prototypes.
9905 * utils.c (pfildes): New.
9907 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9909 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9910 * configure: Regenerate.
9912 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9914 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9915 (linux_done_accessing_memory): ... this.
9916 (linux_target_ops): Adjust.
9917 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9918 * nto-low.c (nto_target_ops): Adjust comment.
9919 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9920 * spu-low.c (spu_target_ops): Adjust comment.
9921 * target.h (target_ops): Rename unprepare_to_access_memory field
9922 to done_accessing_memory.
9923 (unprepare_to_access_memory): Rename to ...
9924 (done_accessing_memory): ... this.
9926 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9928 * linux-low.c (linux_prepare_to_access_memory): New.
9929 (linux_unprepare_to_access_memory): New.
9930 (linux_target_ops): Install them.
9931 * server.c (read_memory): Rename to ...
9932 (gdb_read_memory): ... this. Use
9933 prepare_to_access_memory/prepare_to_access_memory.
9934 (write_memory): Rename to ...
9935 (gdb_write_memory): ... this. Use
9936 prepare_to_access_memory/prepare_to_access_memory.
9937 (handle_search_memory_1): Adjust.
9938 (process_serial_event): Adjust.
9939 * target.h (struct target_ops): New fields
9940 prepare_to_access_memory and unprepare_to_access_memory.
9941 (prepare_to_access_memory, unprepare_to_access_memory): New.
9942 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9943 prepare_to_access_memory/prepare_to_access_memory.
9944 * nto-low.c (nto_target_ops): Adjust.
9945 * spu-low.c (spu_target_ops): Adjust.
9946 * win32-low.c (win32_target_ops): Adjust.
9948 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9950 * Makefile.in (WARN_CFLAGS): Get it from configure.
9951 (WERROR_CFLAGS): New.
9952 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9953 * configure.ac: Introduce --enable-werror, which adds -Werror to
9954 the compiler command line. Enabled by default. Disable with
9955 --disable-werror. Add -Wdeclaration-after-statement
9956 Wpointer-arith and -Wformat-nonliteral to warning flags.
9957 * configure: Regenerate.
9959 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9961 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9963 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9965 * gdbreplay.c (remote_error): New.
9967 (expect): Use gdbchar. Check for error reading from GDB.
9968 Clarify sync error output.
9969 (play): Check for errors writing to GDB.
9970 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9971 * remote-utils.c (getpkt): Check for errors writing to the remote
9974 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9976 * linux-low.c (linux_wait_1): Move non-debugging code out of
9977 `debug_threads' control.
9979 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9981 * linux-low.c (linux_wait_1): Don't set last_status here.
9982 * server.c (push_event, queue_stop_reply_callback): Assert we're
9983 not pushing a TARGET_WAITKIND_IGNORE event.
9984 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9985 (myresume, handle_target_event): Set the thread's last_resume_kind
9986 and last_status from the target returned status.
9988 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9992 * linux-x86-low.c (update_debug_registers_callback): New.
9993 (i386_dr_low_set_addr): Use it.
9994 (i386_dr_low_get_addr): New.
9995 (i386_dr_low_set_control): Use update_debug_registers_callback.
9996 (i386_dr_low_get_control): New.
9997 (i386_dr_low_get_status): Adjust.
9998 * linux-low.c (linux_stop_lwp): New.
9999 * linux-low.h (linux_stop_lwp): Declare.
10001 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10002 argument instead of a i386_debug_reg_state.
10003 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10004 a i386_debug_reg_state.
10005 (i386_insert_aligned_watchpoint): Adjust.
10006 (i386_remove_aligned_watchpoint): Adjust.
10007 (i386_low_stopped_data_address): Read the debug registers from the
10008 inferior instead of from the mirrors.
10009 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10010 (i386_dr_low_get_addr): Declare.
10011 (i386_dr_low_get_control): Declare.
10012 (i386_dr_low_get_status): Change prototype.
10014 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10015 (i386_dr_low_get_addr): New.
10016 (i386_dr_low_get_control): New.
10017 (i386_dr_low_get_status): Adjust prototype. Return
10019 (i386_initial_stuff): Clear dr_status_mirror and
10021 (i386_get_thread_context): Adjust.
10022 (i386_set_thread_context): Adjust.
10023 (i386_thread_added): Adjust.
10025 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10027 * linux-low.h (linux_thread_area): Delete declaration.
10029 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10031 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10032 after its termination.
10034 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10036 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10037 (gdb_wants_all_stopped): Delete.
10038 (linux_wait_1): Don't call them.
10039 * server.c (handle_v_cont): Tag all threads as want-stopped.
10040 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10041 stopped as "client-wants-stopped".
10043 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10045 * Makefile.in (signals_h): New.
10046 (server_h): Depend on it.
10047 (server.o): Don't depend on $(signals_def).
10048 (signals.o): Depend on $(signals_def).
10050 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10052 * Makefile.in (signals_def): New.
10053 (server_h): Append include/gdb/signals.h and signals_def.
10054 (server.o): Append signals_def.
10056 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10058 * server.c (handle_target_event): Use target_signal_to_host for
10059 resume_info.sig initialization.
10060 * target.h (struct thread_resume) <sig>: New comment.
10062 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10064 * server.c (handle_query): strcpy() the returned string from paddress()
10065 instead of sprintf().
10066 * utils.c (paddress): Return phex_nz().
10068 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10070 * server.c (handle_v_cont): Call mourn_inferior if process
10072 (myresume): Likewise.
10074 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10076 Static tracepoints, and integration with UST.
10078 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10079 * mem-break.c (uninsert_all_breakpoints)
10080 (reinsert_all_breakpoints): New.
10081 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10082 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10083 (gdb_agent_ust_loaded, helper_thread_id)
10084 (gdb_agent_helper_thread_id): New macros.
10085 (struct ipa_sym_addresses): Add addr_ust_loaded,
10086 addr_helper_thread_id, addr_cmd_buf.
10087 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10088 (in_process_agent_loaded_ust): New.
10089 (write_e_ust_not_loaded): New.
10090 (maybe_write_ipa_ust_not_loaded): New.
10091 (struct collect_static_trace_data_action): New.
10092 (enum tracepoint_type) <static_tracepoint>: New.
10093 (struct tracepoint) <handle>: Mention static tracepoints.
10094 (struct static_tracepoint_ctx): New.
10095 (CMD_BUF_SIZE): New.
10096 (add_tracepoint_action): Handle static tracepoint actions.
10097 (unprobe_marker_at): New.
10098 (clear_installed_tracepoints): Handle static tracepoints.
10099 (cmd_qtdp): Handle static tracepoints.
10100 (probe_marker_at): New.
10101 (cmd_qtstart): Handle static tracepoints.
10102 (response_tracepoint): Handle static tracepoints.
10103 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10104 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10105 (get_context_regcache): Handle static tracepoints.
10106 (do_action_at_tracepoint): Handle static tracepoint actions.
10107 (traceframe_find_block_type): Handle static trace data blocks.
10108 (traceframe_read_sdata): New.
10109 (download_tracepoints): Download static tracepoint actions.
10110 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10111 (GDB_PROBE_NAME): New.
10113 (GET_UST_SYM): New.
10116 (ust_marker_to_static_tracepoint): New.
10118 (collect_ust_data_at_tracepoint): New.
10119 (gdb_ust_probe): New.
10120 (UNIX_PATH_MAX, SOCK_DIR): New.
10121 (gdb_ust_connect_sync_socket): New.
10122 (resume_thread, stop_thread): New.
10123 (run_inferior_command): New.
10124 (init_named_socket): New.
10125 (gdb_ust_socket_init): New.
10126 (cstr_to_hexstr): New.
10128 (first_marker, next_marker): New.
10129 (response_ust_marker): New.
10130 (cmd_qtfstm, cmd_qtsstm): New.
10131 (unprobe_marker_at, probe_marker_at): New.
10132 (cmd_qtstmat, gdb_ust_thread): New.
10133 (gdb_ust_init): New.
10134 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10135 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10136 (ST_REGENTRY): New.
10137 (x86_64_st_collect_regmap): New.
10138 (X86_64_NUM_ST_COLLECT_GREGS): New.
10139 (AMD64_RIP_REGNUM): New.
10140 (supply_static_tracepoint_registers): New.
10141 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10142 (ST_REGENTRY): New.
10143 (i386_st_collect_regmap): New.
10144 (i386_NUM_ST_COLLECT_GREGS): New.
10145 (supply_static_tracepoint_registers): New.
10146 * server.c (handle_query): Handle qXfer:statictrace:read.
10147 <qSupported>: Report support for StaticTracepoints, and
10148 qXfer:statictrace:read features.
10149 * server.h (traceframe_read_sdata)
10150 (supply_static_tracepoint_registers): Declare.
10151 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10152 (unpack_varlen_hex): Include in IPA build.
10153 * Makefile.in (ustlibs, ustinc): New.
10154 (IPA_OBJS): Add remote-utils-ipa.o.
10155 ($(IPA_LIB)): Link -ldl and -lpthread.
10157 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10158 * config.in, configure: Regenerate.
10160 2010-06-20 Ian Lance Taylor <iant@google.com>
10161 Pedro Alves <pedro@codesourcery.com>
10163 * linux-x86-low.c (always_true): Delete.
10164 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10165 trying to fool the compiler with always_true.
10167 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10169 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10170 conditions in gdbserver.
10172 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10174 * spu-low.c (spu_read_memory): Wrap around local store limit.
10175 (spu_write_memory): Likewise.
10177 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10179 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10180 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10182 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10184 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10185 uses with LONGEST uses.
10187 2010-06-14 Stan Shebs <stan@codesourcery.com>
10188 Pedro Alves <pedro@codesourcery.com>
10192 * linux-x86-low.c: Include limits.h.
10194 (always_true): New.
10197 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10198 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10199 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10200 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10201 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10202 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10203 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10204 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10205 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10206 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10207 (amd64_emit_void_call_2): New.
10208 (amd64_emit_ops): New.
10209 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10210 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10211 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10212 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10213 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10214 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10215 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10216 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10217 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10218 (i386_emit_stack_adjust, i386_emit_int_call_1)
10219 (i386_emit_void_call_2): New.
10220 (i386_emit_ops): New.
10221 (x86_emit_ops): New.
10222 (the_low_target): Install x86_emit_ops.
10223 * server.h (struct emit_ops): New.
10224 (get_raw_reg_func_addr): Declare.
10225 (current_insn_ptr, emit_error): Declare.
10226 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10227 (set_trace_state_variable_value): New defines.
10228 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10229 addr_get_trace_state_variable_value and
10230 addr_set_trace_state_variable_value.
10231 (symbol_list): New fields for get_raw_reg,
10232 get_trace_state_variable_value and set_trace_state_variable_value.
10233 (condfn): New typedef.
10234 (struct tracepoint): New field `compiled_cond'.
10235 (do_action_at_tracepoint): Clear compiled_cond.
10236 (get_trace_state_variable_value, set_trace_state_variable_value):
10238 (condition_true_at_tracepoint): If there's a compiled condition,
10240 (current_insn_ptr, emit_error): New globals.
10241 (struct bytecode_address): New.
10242 (get_raw_reg_func_addr): New.
10243 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10244 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10245 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10246 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10247 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10248 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10249 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10250 (compile_tracepoint_condition, compile_bytecodes): New.
10251 * target.h (emit_ops): Forward declare.
10252 (struct target_ops): New field emit_ops.
10253 (target_emit_ops): New.
10254 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10255 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10256 * linux-low.c (linux_emit_ops): New.
10257 (linux_target_ops): Install it.
10258 * linux-low.h (struct linux_target_ops): New field emit_ops.
10260 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10262 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10263 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10265 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10266 Stan Shebs <stan@codesourcery.com>
10268 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10269 (all): Depend on $(extra_libraries).
10270 (install-only): Install the IPA.
10271 (IPA_OBJS, IPA_LIB): New.
10272 (clean): Remove the IPA lib.
10273 (IPAGENT_CFLAGS): New.
10274 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10275 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10276 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10277 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10278 * configure.ac: Check for atomic builtins support in the compiler.
10279 (IPA_DEPFILES, extra_libraries): Define.
10280 * configure.srv (ipa_obj): Add description.
10281 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10282 (i[34567]86-*-linux*): Set ipa_obj.
10283 (x86_64-*-linux*): Set ipa_obj.
10284 * linux-low.c (stabilizing_threads): New.
10285 (supports_fast_tracepoints): New.
10286 (linux_detach): Stabilize threads before detaching.
10287 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10288 the lwp is either not stabilizing, or is moving out of a jump pad.
10289 (linux_fast_tracepoint_collecting): New.
10290 (maybe_move_out_of_jump_pad): New.
10291 (enqueue_one_deferred_signal): New.
10292 (dequeue_one_deferred_signal): New.
10293 (linux_wait_for_event_1): If moving out of a jump pad, defer
10294 pending signals to later.
10295 (linux_stabilize_threads): New.
10296 (linux_wait_1): Check if threads need moving out of jump pads, and
10298 (stuck_in_jump_pad_callback): New.
10299 (move_out_of_jump_pad_callback): New.
10300 (lwp_running): New.
10301 (linux_resume_one_lwp): Handle moving out of jump pads.
10302 (linux_set_resume_request): Dequeue deferred signals.
10303 (need_step_over_p): Also step over fast tracepoint jumps.
10304 (start_step_over): Also uninsert fast tracepoint jumps.
10305 (finish_step_over): Also reinsert fast tracepoint jumps.
10306 (linux_install_fast_tracepoint_jump): New.
10307 (linux_target_ops): Install linux_stabilize_threads and
10308 linux_install_fast_tracepoint_jump_pad.
10309 * linux-low.h (linux_target_ops) <get_thread_area,
10310 install_fast_tracepoint_jump_pad>: New fields.
10311 (struct lwp_info) <collecting_fast_tracepoint,
10312 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10313 (linux_get_thread_area): Declare.
10314 * linux-x86-low.c (jump_insn): New.
10315 (x86_get_thread_area): New.
10316 (append_insns): New.
10317 (push_opcode): New.
10318 (amd64_install_fast_tracepoint_jump_pad): New.
10319 (i386_install_fast_tracepoint_jump_pad): New.
10320 (x86_install_fast_tracepoint_jump_pad): New.
10321 (the_low_target): Install x86_get_thread_area and
10322 x86_install_fast_tracepoint_jump_pad.
10323 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10324 (struct fast_tracepoint_jump): New.
10325 (fast_tracepoint_jump_insn): New.
10326 (fast_tracepoint_jump_shadow): New.
10327 (find_fast_tracepoint_jump_at): New.
10328 (fast_tracepoint_jump_here): New.
10329 (delete_fast_tracepoint_jump): New.
10330 (set_fast_tracepoint_jump): New.
10331 (uninsert_fast_tracepoint_jumps_at): New.
10332 (reinsert_fast_tracepoint_jumps_at): New.
10333 (set_breakpoint_at): Use write_inferior_memory.
10334 (uninsert_raw_breakpoint): Use write_inferior_memory.
10335 (check_mem_read): Mask out fast tracepoint jumps.
10336 (check_mem_write): Mask out fast tracepoint jumps.
10337 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10338 (set_fast_tracepoint_jump): Declare.
10339 (delete_fast_tracepoint_jump)
10340 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10341 (reinsert_fast_tracepoint_jumps_at): Declare.
10342 * regcache.c: Don't compile many functions when building the
10343 in-process agent library.
10344 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10345 the register buffer in the heap.
10346 (free_register_cache): If the register buffer isn't owned by the
10347 regcache, don't free it.
10348 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10349 pre-existing register caches.
10350 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10352 (convert_ascii_to_int): : Constify `from' parameter type.
10353 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10354 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10355 the needed buffer in-place.
10356 (relocate_instruction): New.
10357 * server.c (handle_query) <qSymbols>: If the target supports
10358 tracepoints, give it a chance of looking up symbols. Report
10359 support for fast tracepoints.
10360 (handle_status): Stabilize threads.
10361 (process_serial_event): Adjust.
10362 * server.h (struct fast_tracepoint_jump): Forward declare.
10363 (struct process_info) <fast_tracepoint_jumps>: New field.
10364 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10365 (decode_X_packet, decode_M_packet): Adjust.
10366 (relocate_instruction): Declare.
10367 (in_process_agent_loaded): Declare.
10368 (tracepoint_look_up_symbols): Declare.
10369 (struct fast_tpoint_collect_status): Declare.
10370 (fast_tracepoint_collecting): Declare.
10371 (force_unlock_trace_buffer): Declare.
10372 (handle_tracepoint_bkpts): Declare.
10373 (initialize_low_tracepoint)
10374 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10375 * target.h (struct target_ops) <stabilize_threads,
10376 install_fast_tracepoint_jump_pad>: New fields.
10377 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10378 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10379 [HAVE_STDINT_H]: Include stdint.h.
10380 (trace_debug_1): Rename to ...
10381 (trace_vdebug): ... this.
10382 (trace_debug): Rename to ...
10383 (trace_debug_1): ... this. Add `level' parameter.
10384 (trace_debug): New.
10385 (ATTR_USED, ATTR_NOINLINE): New.
10386 (IP_AGENT_EXPORT): New.
10387 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10388 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10389 (about_to_request_buffer_space, trace_buffer_is_full)
10390 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10391 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10392 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10393 (traceframe_write_count, traceframes_created)
10394 (trace_state_variables)
10395 New renaming defines.
10396 (struct ipa_sym_addresses): New.
10397 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10398 (symbol_list): New.
10399 (ipa_sym_addrs): New.
10400 (all_tracepoint_symbols_looked_up): New.
10401 (in_process_agent_loaded): New.
10402 (write_e_ipa_not_loaded): New.
10403 (maybe_write_ipa_not_loaded): New.
10404 (tracepoint_look_up_symbols): New.
10405 (debug_threads) [IN_PROCESS_AGENT]: New.
10406 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10407 (UNKNOWN_SIDE_EFFECTS): New.
10408 (stop_tracing): New.
10409 (flush_trace_buffer): New.
10410 (stop_tracing_bkpt): New.
10411 (flush_trace_buffer_bkpt): New.
10412 (read_inferior_integer): New.
10413 (read_inferior_uinteger): New.
10414 (read_inferior_data_pointer): New.
10415 (write_inferior_data_pointer): New.
10416 (write_inferior_integer): New.
10417 (write_inferior_uinteger): New.
10418 (struct collect_static_trace_data_action): Delete.
10419 (enum tracepoint_type): New.
10420 (struct tracepoint) <type>: New field `type'.
10421 <actions_str, step_actions, step_actions_str>: Only include in
10423 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10424 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10425 (tracepoints): Use IP_AGENT_EXPORT.
10426 (last_tracepoint): Don't include in the IPA.
10427 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10428 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10429 (alloced_trace_state_variables): New.
10430 (trace_state_variables): Use IP_AGENT_EXPORT.
10431 (traceframe_t): Delete unused variable.
10432 (circular_trace_buffer): Don't include in the IPA.
10433 (trace_buffer_start): Delete.
10434 (struct trace_buffer_control): New.
10435 (trace_buffer_free): Delete.
10436 (struct ipa_trace_buffer_control): New.
10437 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10438 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10440 (trace_buffer_ctrl): New.
10441 (TRACE_BUFFER_CTRL_CURR): New.
10442 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10443 Reimplement as macros.
10444 (trace_buffer_wrap): Delete.
10445 (traceframe_write_count, traceframe_read_count)
10446 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10447 (struct tracepoint_hit_ctx) <type>: New field.
10448 (struct fast_tracepoint_ctx): New.
10449 (memory_barrier): New.
10451 (record_tracepoint_error): Update atomically in the IPA.
10452 (clear_inferior_trace_buffer): New.
10453 (about_to_request_buffer_space): New.
10454 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10455 updating the same buffer.
10456 (add_tracepoint): Default the tracepoint's type to trap
10457 tracepoint, and orig_size to -1.
10458 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10459 internal variables.
10460 (create_trace_state_variable): New parameter `gdb'. Handle it.
10461 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10462 (cmd_qtdp): Handle fast tracepoints.
10463 (cmd_qtdv): Adjust.
10464 (max_jump_pad_size): New.
10465 (gdb_jump_pad_head): New.
10466 (get_jump_space_head): New.
10467 (claim_jump_space): New.
10468 (sort_tracepoints): New.
10469 (MAX_JUMP_SIZE): New.
10470 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10472 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10473 support. Upload fast traceframes, and delete internal IPA
10475 (stop_tracing_handler): New.
10476 (flush_trace_buffer_handler): New.
10477 (cmd_qtstop): Upload fast tracepoints.
10478 (response_tracepoint): Handle fast tracepoints.
10479 (tracepoint_finished_step): Upload fast traceframes. Set the
10480 tracepoint hit context's tracepoint type.
10481 (handle_tracepoint_bkpts): New.
10482 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10483 type. Add comment about fast tracepoints.
10484 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10485 non-existing action_str field.
10486 (get_context_regcache): Handle fast tracepoints.
10487 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10489 (fast_tracepoint_from_jump_pad_address): New.
10490 (fast_tracepoint_from_ipa_tpoint_address): New.
10491 (collecting_t): New.
10492 (force_unlock_trace_buffer): New.
10493 (fast_tracepoint_collecting): New.
10495 (gdb_collect): New.
10496 (write_inferior_data_ptr): New.
10497 (target_tp_heap): New.
10498 (target_malloc): New.
10499 (download_agent_expr): New.
10501 (download_tracepoints): New.
10502 (download_trace_state_variables): New.
10503 (upload_fast_traceframes): New.
10504 (IPA_FIRST_TRACEFRAME): New.
10505 (IPA_NEXT_TRACEFRAME_1): New.
10506 (IPA_NEXT_TRACEFRAME): New.
10507 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10508 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10509 (gdb_jump_pad_buffer_end): New.
10510 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10511 (initialize_tracepoint): Adjust.
10512 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10513 buffer. Initialize the low module.
10514 * utils.c (PREFIX, TOOLNAME): New.
10515 (malloc_failure): Use PREFIX.
10516 (error): In the IPA, an error causes an exit.
10517 (fatal, warning): Use PREFIX.
10518 (internal_error): Use TOOLNAME.
10519 (NUMCELLS): Increase to 10.
10520 * configure, config.in: Regenerate.
10522 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10524 * server.c (handle_query) <qSupported>: Do two passes over the
10525 qSupported string to avoid nesting strtok.
10527 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10529 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10531 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10532 -Wl,--dynamic-list.
10533 * configure: Regenerate.
10534 * proc-service.list: New.
10536 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10538 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10541 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10543 * gdbreplay.c (remote_open): Check error return from socket() call by
10544 its equality to -1 not by it being negative.
10545 * remote-utils.c (remote_open): Likewise.
10547 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10549 * config.h: Regenerate.
10551 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10553 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10554 doesn't provide PTRACE_GET_THREAD_AREA.
10556 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10558 * linux-m68k-low.c: Include <asm/ptrace.h>
10559 (ps_get_thread_area): Implement.
10561 2010-05-03 Doug Evans <dje@google.com>
10563 * event-loop.c (struct callback_event): New struct.
10564 (callback_list): New global.
10565 (append_callback_event, delete_callback_event): New functions.
10566 (process_callback): New function.
10567 (start_event_loop): Call it.
10568 * remote-utils.c (NOT_SCHEDULED): Define.
10569 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10570 moved out of readchar.
10571 (readchar): Rewrite. Call reschedule before returning.
10572 (reset_readchar): New function.
10573 (remote_close): Call it.
10574 (process_remaining, reschedule): New functions.
10575 * server.h (callback_handler_func): New typedef.
10576 (append_callback_event, delete_callback_event): Declare.
10578 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10580 * proc-service.c (ps_pglobal_lookup): Use
10581 thread_db_look_up_one_symbol.
10582 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10583 parameter. Use it instead of all_symbols_looked_up.
10584 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10586 (all_symbols_looked_up): Don't declare.
10587 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10588 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10590 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10591 Set all_symbols_looked_up here.
10592 (thread_db_look_up_one_symbol): New.
10593 (thread_db_get_tls_address): Adjust.
10594 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10595 thread_db object on the heap, and tentatively set it in the
10597 (thread_db_init): Don't set all_symbols_looked_up here.
10598 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10600 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10602 * linux-low.c (linux_kill, linux_detach): Adjust.
10603 (status_pending_p_callback): Remove redundant statement. Check
10604 for !TARGET_WAITIKIND_IGNORE, instead of
10605 TARGET_WAITKIND_STOPPED.
10606 (handle_tracepoints): Make sure LWP is locked. Adjust.
10607 (linux_wait_for_event_1): Adjust.
10608 (linux_cancel_breakpoints): New.
10609 (unsuspend_one_lwp): New.
10610 (unsuspend_all_lwps): New.
10611 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10612 (send_sigstop_callback): Change return type to int, add new
10613 `except' parameter and handle it.
10614 (suspend_and_send_sigstop_callback): New.
10615 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10616 pass them down. If SUSPEND, also increment the lwp's suspend
10618 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10619 (need_step_over_p): Don't consider suspended LWPs.
10620 (start_step_over): Adjust.
10621 (proceed_one_lwp): Change return type to int, add new `except'
10622 parameter and handle it.
10623 (unsuspend_and_proceed_one_lwp): New.
10624 (proceed_all_lwps): Use find_inferior instead of
10626 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10627 also decrement the suspend count of LWPs. Pass `except' down,
10628 instead of hacking its suspend count.
10629 (linux_pause_all): Add `freeze' parameter. Adjust.
10630 (linux_unpause_all): New.
10631 (linux_target_ops): Install linux_unpause_all.
10632 * server.c (handle_status): Adjust.
10633 * target.h (struct target_ops): New fields `unpause_all' and
10634 `cancel_breakpoints'. Add new parameter to `pause_all'.
10635 (pause_all): Add new `freeze' parameter.
10636 (unpause_all): New.
10637 (cancel_breakpoints): New.
10638 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10639 cancel breakpoints.
10640 (cmd_qtstart): Pause threads.
10641 (stop_tracing): Pause threads, and cancel breakpoints.
10642 * win32-low.c (win32_target_ops): Adjust.
10644 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10646 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10647 the inferior right away from here...
10648 (linux_wait_1): ... to here, and adjust to check the thread's
10649 last_resume_kind instead of the lwp's step or stop_expected flags.
10651 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10653 * README: Use consistent `GDB' and `GDBserver' spellings.
10655 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10657 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10658 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10659 (linux_detach_one_lwp): Assume the lwp is stopped.
10660 (any_thread_of): Delete.
10661 (linux_detach): Stop all lwps here. Don't blindly delete all
10663 (delete_lwp_callback): New.
10664 (linux_mourn): Delete all lwps of the process that is gone.
10665 (linux_wait_1): Don't delete the last lwp of the process here.
10666 * mem-break.h (mark_breakpoints_out): Declare.
10667 * mem-break.c (mark_breakpoints_out): New.
10668 (free_all_breakpoints): Use it.
10669 * server.c (handle_target_event): If the process is gone, mark
10671 * thread-db.c (struct thread_db) <create_bp>: New field.
10672 (thread_db_enable_reporting): Fix prototype. Store a thread event
10673 breakpoint reference in the thread_db struct.
10674 (thread_db_load_search): Clear the thread_db object.
10675 (try_thread_db_load_1): Ditto.
10676 (switch_to_process): New.
10677 (disable_thread_event_reporting): Use it.
10678 (remove_thread_event_breakpoints): New.
10679 (thread_db_detach, thread_db_mourn): Use it.
10681 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10683 * linux-low.c (linux_enable_event_reporting): New.
10684 (linux_wait_for_event_1, handle_extended_wait): Use it.
10686 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10688 * linux-low.c (linux_kill_one_lwp, linux_kill)
10689 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10690 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10691 SIGSTOP even if the LWP is stopped.
10692 (send_sigstop_callback): New.
10693 (stop_all_lwps): Use send_sigstop_callback instead.
10694 (linux_resume_one_thread): Adjust.
10695 (proceed_one_lwp): Still proceed an LWP that the client has
10696 requested to stop, if we haven't reported it as stopped yet. Make
10697 sure that LWPs the client want stopped, have a pending SIGSTOP.
10699 2010-04-26 Doug Evans <dje@google.com>
10701 * server.c (handle_general_set): Make static.
10703 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10704 Print received char after testing for error/eof instead of before.
10705 (input_interrupt): Tweak comment.
10707 2010-04-23 Doug Evans <dje@google.com>
10709 * server.c (start_inferior): Print inferior argv if --debug.
10711 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10713 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10714 * nto-x86-low.c: Include server.h
10716 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10718 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10719 be consistent with other sources of this directory.
10720 (init_registers_amd64): Correct name of source file of this function
10723 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10725 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10726 64-bit executables.
10728 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10730 * win32-i386-low.c: Add 64-bit support.
10731 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10732 (init_registers_amd64): Declare.
10733 (mappings): Add 64-bit version of array.
10734 (init_windows_x86): New function.
10735 (the_low_target): Change init_arch field to init_windows_x86.
10737 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10739 * win32-low.c: Adapt to support also 64-bit architecture.
10740 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10741 (get_image_name): Use SIZE_T type for local variable `done'.
10742 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10743 (toolhelp_get_dll_name): Idem.
10744 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10745 Use uintptr_t typecast to avoid warning.
10746 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10747 (handle_exception): Use phex_nz to avoid warning.
10748 (win32_wait): Remove unused local variable `process'.
10750 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10752 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10755 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10757 * configure.ac: Use `ws2_32' library for srv_mingw.
10758 * configure: Regenerate.
10759 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10760 * remote-utils.c: Likewise.
10762 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10764 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10765 if __x86_64__ is defined.
10767 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10769 * configure: Regenerate.
10771 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10773 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10774 * target.h (target_ops): New get_tib_address field.
10775 * win32-low.h (win32_thread_info): Add thread_local_base field.
10776 * win32-low.c (child_add_thread): Add tlb argument.
10777 Set thread_local_base field to TLB.
10778 (get_child_debug_event): Adapt to child_add_thread change.
10779 (win32_get_tib_address): New function.
10780 (win32_target_ops): Set get_tib_address field to
10781 win32_get_tib_address.
10782 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10784 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10786 * linux-low.c (linux_mourn): Also remove the process.
10787 * server.c (handle_target_event): Don't remove the process here.
10788 * nto-low.c (nto_mourn): New.
10789 (nto_target_ops): Install it.
10790 * spu-low.c (spu_mourn): New.
10791 (spu_target_ops): Install it.
10792 * win32-low.c (win32_mourn): New.
10793 (win32_target_ops): Install it.
10795 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10797 * server.h (buffer_xml_printf): Remove redundant `;'.
10799 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10801 * regcache.c (set_register_cache): Invalidate regcaches before
10802 changing the register cache layout.
10803 (regcache_invalidate_one): Allow a NULL regcache.
10804 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10805 regcaches before changing the register cache layout or the target
10808 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10810 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10811 variable warning on Linux/x86-64.
10813 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10815 GDBserver disconnected tracing support.
10817 * linux-low.c (linux_remove_process): Delete.
10818 (add_lwp): Don't set last_resume_kind here.
10819 (linux_kill): Use `mourn'.
10820 (linux_detach): Use `thread_db_detach', and `mourn'.
10821 (linux_mourn): New.
10822 (linux_attach_lwp_1): Adjust comment.
10823 (linux_attach): last_resume_kind moved the thread_info; adjust.
10824 (status_pending_p_callback): Adjust.
10825 (linux_wait_for_event_1): Adjust.
10826 (count_events_callback, select_singlestep_lwp_callback)
10827 (select_event_lwp_callback, cancel_breakpoints_callback)
10828 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10829 (proceed_one_lwp): Adjust.
10830 (linux_async): Add debug output.
10831 (linux_thread_stopped): New.
10832 (linux_pause_all): New.
10833 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10835 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10836 (thread_db_free): Delete declaration.
10837 (thread_db_detach, thread_db_mourn): Declare.
10838 * thread-db.c (thread_db_init): Use thread_db_mourn.
10839 (thread_db_free): Delete, split in two.
10840 (disable_thread_event_reporting): New.
10841 (thread_db_detach): New.
10842 (thread_db_mourn): New.
10844 * server.h (struct thread_info) <last_resume_kind>: New field.
10845 <attached>: Add comment.
10846 <gdb_detached>: New field.
10847 (handler_func): Change return type to int.
10848 (handle_serial_event, handle_target_event): Ditto.
10849 (gdb_connected): Declare.
10851 (disconnected_tracing): Declare.
10852 (stop_tracing): Declare.
10854 * server.c (handle_query) <qSupported>: Report support for
10855 disconnected tracing.
10856 (queue_stop_reply_callback): Account for running threads.
10857 (gdb_wants_thread_stopped): New.
10858 (gdb_wants_all_threads_stopped): New.
10859 (gdb_reattached_process): New.
10860 (handle_status): Clear the `gdb_detached' flag of all processes.
10861 In all-stop, stop all threads.
10862 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10863 (process_serial_event): If the remote connection breaks, or if an
10864 exit was forced with "monitor exit", force an event loop exit.
10865 Handle disconnected tracing on detach.
10866 (handle_serial_event): Adjust.
10867 (handle_target_event): If GDB isn't connected, forward events back
10868 to the inferior, unless the last process exited, in which case,
10869 exit gdbserver. Adjust interface.
10871 * remote-utils.c (remote_open): Don't block in accept. Instead
10872 register an event loop source on the listen socket file
10873 descriptor. Refactor bits into ...
10874 (listen_desc): ... this new global.
10875 (gdb_connected): ... this new function.
10876 (enable_async_notification): ... this new function.
10877 (handle_accept_event): ... this new function.
10878 (remote_close): Clear remote_desc.
10880 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10882 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10884 (mourn_inferior): Define.
10885 (target_process_qsupported): Avoid the dangling else problem.
10886 (thread_stopped): Define.
10887 (pause_all): Define.
10888 (target_waitstatus_to_string): Declare.
10889 * target.c (target_waitstatus_to_string): New.
10891 * tracepoint.c (tracing): Make extern.
10892 (disconnected_tracing): New.
10893 (stop_tracing): Make extern. Handle tracing stops due to GDB
10895 (cmd_qtdisconnected): New.
10896 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10897 (handle_tracepoint_general_set): Handle QTDisconnected.
10899 * event-loop.c (event_handler_func): Change return type to int.
10900 (process_event): Bail out if the event handler wants the event
10902 (handle_file_event): Ditto.
10903 (start_event_loop): Bail out if the event handler wants the event
10906 * nto-low.c (nto_target_ops): Adjust.
10907 * spu-low.c (spu_wait): Don't remove the process here.
10908 (spu_target_ops): Adjust.
10909 * win32-low.c (win32_wait): Don't remove the process here.
10910 (win32_target_ops): Adjust.
10912 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10914 * regcache.c (realloc_register_cache): Invalidate inferior's
10915 regcache before recreating it.
10917 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10919 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10921 2010-04-09 Stan Shebs <stan@codesourcery.com>
10922 Pedro Alves <pedro@codesourcery.com>
10924 * server.h (LONGEST): New.
10925 (struct thread_info) <while_stepping>: New field.
10926 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10928 (initialize_tracepoint, handle_tracepoint_general_set)
10929 (handle_tracepoint_query, tracepoint_finished_step)
10930 (tracepoint_was_hit, release_while_stepping_state_list):
10931 (current_traceframe): Declare.
10932 * server.c (handle_general_set): Handle tracepoint packets.
10933 (read_memory): New.
10934 (write_memory): New.
10935 (handle_search_memory_1): Use read_memory.
10936 (handle_query): Report support for conditional tracepoints, trace
10937 state variables, and tracepoint sources. Handle tracepoint
10939 (main): Initialize the tracepoints module.
10940 (process_serial_event): Handle traceframe reads/writes.
10942 * linux-low.c (handle_tracepoints): New.
10943 (linux_wait_1): Call it.
10944 (linux_resume_one_lwp): Handle while-stepping.
10945 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10946 (linux_target_ops): Install them.
10947 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10949 * linux-x86-low.c (x86_supports_tracepoints): New.
10950 (the_low_target). Install it.
10952 * mem-break.h (delete_breakpoint): Declare.
10953 * mem-break.c (delete_breakpoint): Make external.
10955 * target.h (struct target_ops): Add `supports_tracepoints',
10956 `read_pc', and `write_pc' fields.
10957 (target_supports_tracepoints): Define.
10958 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10961 * regcache.h (struct regcache) <registers_owned>: New field.
10962 (init_register_cache, regcache_cpy): Declare.
10963 (regcache_read_pc, regcache_write_pc): Declare.
10964 (register_cache_size): Declare.
10965 (supply_regblock): Declare.
10966 * regcache.c (init_register_cache): New.
10967 (new_register_cache): Use it.
10968 (regcache_cpy): New.
10969 (register_cache_size): New.
10970 (supply_regblock): New.
10971 (regcache_read_pc, regcache_write_pc): New.
10973 * tracepoint.c: New.
10975 * Makefile.in (OBS): Add tracepoint.o.
10976 (tracepoint.o): New rule.
10978 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10980 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10982 (i386-mmx.c): Likewise.
10983 (i386-mmx-linux.o): Likewise.
10984 (i386-mmx-linux.c): Likewise.
10986 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10987 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10988 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10989 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10991 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10992 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10993 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10995 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10997 * Makefile.in (clean): Updated.
10999 (i386-avx.c): Likewise.
11000 (i386-avx-linux.o): Likewise.
11001 (i386-avx-linux.c): Likewise.
11002 (amd64-avx.o): Likewise.
11003 (amd64-avx.c): Likewise.
11004 (amd64-avx-linux.o): Likewise.
11005 (amd64-avx-linux.c): Likewise.
11007 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11008 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11009 (srv_amd64_regobj): Add amd64-avx.o.
11010 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11011 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11012 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11013 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11014 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11015 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11016 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11018 * i387-fp.c: Include "i386-xstate.h".
11020 (i387_cache_to_xsave): Likewise.
11021 (i387_xsave_to_cache): Likewise.
11022 (x86_xcr0): Likewise.
11024 * i387-fp.h (i387_cache_to_xsave): Likewise.
11025 (i387_xsave_to_cache): Likewise.
11026 (x86_xcr0): Likewise.
11028 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11029 * linux-crisv32-low.c (target_regsets): Likewise.
11030 * linux-m68k-low.c (target_regsets): Likewise.
11031 * linux-mips-low.c (target_regsets): Likewise.
11032 * linux-ppc-low.c (target_regsets): Likewise.
11033 * linux-s390-low.c (target_regsets): Likewise.
11034 * linux-sh-low.c (target_regsets): Likewise.
11035 * linux-sparc-low.c (target_regsets): Likewise.
11036 * linux-xtensa-low.c (target_regsets): Likewise.
11038 * linux-low.c: Include <sys/uio.h>.
11039 (regsets_fetch_inferior_registers): Support nt_type.
11040 (regsets_store_inferior_registers): Likewise.
11041 (linux_process_qsupported): New.
11042 (linux_target_ops): Add linux_process_qsupported.
11044 * linux-low.h (regset_info): Add nt_type.
11045 (linux_target_ops): Add process_qsupported.
11047 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11049 (init_registers_i386_avx_linux): New.
11050 (init_registers_amd64_avx_linux): Likewise.
11051 (xmltarget_i386_linux_no_xml): Likewise.
11052 (xmltarget_amd64_linux_no_xml): Likewise.
11053 (PTRACE_GETREGSET): Likewise.
11054 (PTRACE_SETREGSET): Likewise.
11055 (x86_fill_xstateregset): Likewise.
11056 (x86_store_xstateregset): Likewise.
11057 (use_xml): Likewise.
11058 (x86_linux_update_xmltarget): Likewise.
11059 (x86_linux_process_qsupported): Likewise.
11060 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11061 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11062 init_registers_i386_linux here. Call
11063 x86_linux_update_xmltarget.
11064 (the_low_target): Add x86_linux_process_qsupported.
11066 * server.c (handle_query): Call target_process_qsupported.
11068 * target.h (target_ops): Add process_qsupported.
11069 (target_process_qsupported): New.
11071 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11073 * inferiors.c (add_thread): Set last_status kind to
11074 TARGET_WAITKIND_IGNORE.
11075 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11076 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11077 (linux_wait_1): Move `thread' local definition to block that uses
11078 it. Don't NULL initialize `event_child'.
11079 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11080 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11081 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11083 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11085 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11086 an extended waitstatus, or by a watchpoint.
11087 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11088 thread was stepping or has been stopped by a watchpoint.
11090 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11092 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11093 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11094 of another, then delete the previous, and validate all
11096 (validate_inserted_breakpoint): New.
11097 (delete_disabled_breakpoints): New.
11098 (validate_breakpoints): New.
11099 (check_mem_read): Validate breakpoints before trusting their
11100 shadow. Delete disabled breakpoints.
11101 (check_mem_write): Validate breakpoints before trusting they
11102 should be inserted. Delete disabled breakpoints.
11103 * mem-break.h (validate_breakpoints):
11104 * server.c (handle_query): Validate breakpoints when we see a
11107 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11109 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11110 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11111 if we could tell there's a GDB breakpoint at stop_pc.
11112 (need_step_over_p): Don't do a step over if we find a GDB
11113 breakpoint at the resume PC.
11115 * mem-break.c (struct raw_breakpoint): New.
11116 (enum bkpt_type): New type `gdb_breakpoint'.
11117 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11118 fields. New field `raw'.
11119 (find_raw_breakpoint_at): New.
11120 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11121 breakpoint instead.
11122 (set_breakpoint_at): Adjust.
11123 (delete_raw_breakpoint): New.
11124 (release_breakpoint): New.
11125 (delete_breakpoint): Rename to...
11126 (delete_breakpoint_1): ... this. Add proc parameter. Use
11127 release_breakpoint. Return ENOENT.
11128 (delete_breakpoint): Reimplement.
11129 (find_breakpoint_at): Delete.
11130 (find_gdb_breakpoint_at): New.
11131 (delete_breakpoint_at): Delete.
11132 (set_gdb_breakpoint_at): New.
11133 (delete_gdb_breakpoint_at): New.
11134 (gdb_breakpoint_here): New.
11135 (set_reinsert_breakpoint): Use release_breakpoint.
11136 (uninsert_breakpoint): Rename to ...
11137 (uninsert_raw_breakpoint): ... this.
11138 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11139 (reinsert_raw_breakpoint): Change parameter type to
11141 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11143 (check_breakpoints): Adjust. Use release_breakpoint.
11144 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11145 (breakpoint_inserted_here): Ditto.
11146 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11147 Don't trust the breakpoint's shadow if it is not inserted.
11148 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11149 (delete_all_breakpoints): Adjust.
11150 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11151 use delete_breakpoint_1.
11153 * mem-break.h (breakpoints_supported): Delete declaration.
11154 (set_gdb_breakpoint_at): Declare.
11155 (gdb_breakpoint_here): Declare.
11156 (delete_breakpoint_at): Delete.
11157 (delete_gdb_breakpoint_at): Declare.
11159 * server.h (struct raw_breakpoint): Forward declare.
11160 (struct process_info): New field `raw_breakpoints'.
11162 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11165 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11167 * linux-low.c (status_pending_p_callback): Fix comment.
11168 (linux_wait_for_event_1): Move most of the internal breakpoint
11169 handling from here...
11170 (linux_wait_1): ... to here.
11171 (count_events_callback): New.
11172 (select_singlestep_lwp_callback): New.
11173 (select_event_lwp_callback): New.
11174 (cancel_breakpoints_callback): New.
11175 (select_event_lwp): New.
11176 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11177 priority to all LWPs that have had events that should be reported
11178 to the client. Cancel breakpoints when about to reporting the
11179 event to the client, not while stopping lwps. No longer cancel
11180 finished single-steps here.
11181 (cancel_finished_single_step): Delete.
11182 (cancel_finished_single_steps): Delete.
11184 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11186 * mem-break.c (enum bkpt_type): New.
11187 (struct breakpoint): New field `type'.
11188 (set_breakpoint_at): Change return type to struct breakpoint
11189 pointer. Set type to `other_breakpoint' by default.
11190 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11191 in the breakpoint list.
11192 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11193 (reinsert_breakpoint): Rename to ...
11194 (reinsert_raw_breakpoint): ... this.
11195 (reinsert_breakpoints_at): Adjust.
11196 * mem-break.h (struct breakpoint): Declare.
11197 (set_breakpoint_at): Change return type to struct breakpoint
11200 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11202 * server.c (handle_query): Assign, not compare.
11204 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11206 Teach linux gdbserver to step-over-breakpoints.
11208 * linux-low.c (can_hardware_single_step): New.
11209 (supports_breakpoints): New.
11210 (handle_extended_wait): If stopping threads, read the stop pc of
11211 the new cloned LWP.
11213 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11214 low target doesn't support retrieving the PC.
11215 (add_lwp): Set last_resume_kind to resume_continue.
11216 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11217 (linux_attach): Don't clear stop_expected. Set the lwp's
11218 last_resume_kind to resume_stop.
11219 (linux_detach_one_lwp): Don't check for removed breakpoints.
11220 (check_removed_breakpoint): Delete.
11221 (status_pending_p): Rename to ...
11222 (status_pending_p_callback): ... this. Don't check for removed
11223 breakpoints. Don't consider threads that are stopped from GDB's
11225 (linux_wait_for_lwp): Always read the stop_pc here.
11226 (cancel_breakpoint): New.
11227 (step_over_bkpt): New global.
11228 (linux_wait_for_event_1): Implement stepping over breakpoints.
11229 (gdb_wants_lwp_stopped): New.
11230 (gdb_wants_all_stopped): New.
11231 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11232 single-step traps here. Store the thread's last reported target
11234 (send_sigstop): Don't clear stop_expected. Always set it,
11236 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11237 (cancel_finished_single_step): New.
11238 (cancel_finished_single_steps): New.
11239 (wait_for_sigstop): Don't cancel finished single-step traps here.
11240 (linux_resume_one_lwp): Don't check for removed breakpoints.
11241 Don't set `step' on non-hardware step archs.
11242 (linux_set_resume_request): Ignore resume_stop requests if already
11243 stopping or stopped. Set the lwp's last_resume_kind.
11244 (resume_status_pending_p): Don't check for removed breakpoints.
11245 (need_step_over_p): New.
11246 (start_step_over): New.
11247 (finish_step_over): New.
11248 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11249 requests. Clear the thread's last reported target waitstatus.
11250 Don't use the `suspended' flag. Don't consider pending breakpoints.
11251 (linux_resume): Start a step-over if necessary.
11252 (proceed_one_lwp): New.
11253 (proceed_all_lwps): New.
11254 (unstop_all_lwps): New.
11255 * linux-low.h (struct lwp_info): Rewrite comment for the
11256 `suspended' flag. Add the `stop_pc' field. Delete the
11257 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11258 Add `'last_resume_kind' and `need_step_over' fields.
11259 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11260 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11261 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11262 (set_raw_breakpoint_at): New.
11263 (set_breakpoint_at): Rewrite to use it.
11264 (reinsert_breakpoint_handler): Delete.
11265 (set_reinsert_breakpoint): New.
11266 (reinsert_breakpoint_by_bp): Delete.
11267 (delete_reinsert_breakpoints): New.
11268 (uninsert_breakpoint): Rewrite.
11269 (uninsert_breakpoints_at): New.
11270 (reinsert_breakpoint): Rewrite.
11271 (reinsert_breakpoints_at): New.
11272 (check_breakpoints): Rewrite.
11273 (breakpoint_here): New.
11274 (breakpoint_inserted_here): New.
11275 (check_mem_read): Adjust.
11276 * mem-break.h (breakpoints_supported, breakpoint_here)
11277 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11278 (reinsert_breakpoint_by_bp): Delete declaration.
11279 (delete_reinsert_breakpoints): Declare.
11280 (reinsert_breakpoint): Delete declaration.
11281 (reinsert_breakpoints_at): Declare.
11282 (uninsert_breakpoint): Delete declaration.
11283 (uninsert_breakpoints_at): Declare.
11284 (check_breakpoints): Adjust prototype.
11285 * server.h: Adjust include order.
11286 (struct thread_info): Declare here. Add a `last_status' field.
11288 2010-03-23 Michael Snyder <msnyder@vmware.com>
11290 * server.c (crc32): New function.
11291 (handle_query): Add handling for 'qCRC:' request.
11293 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11295 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11296 lwp had been stopped by a watchpoint.
11298 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11300 * server.h (internal_error): Declare.
11301 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11302 * utils.c (internal_error): New function.
11304 2010-03-15 Andreas Schwab <schwab@redhat.com>
11306 * configure.srv: Fix typo setting srv_regobj.
11308 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11310 * linux-low.c (fetch_register): Avoid passing a non string literal
11312 (usr_store_inferior_registers): Ditto.
11314 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11316 * linux-low.c (linux_write_memory): Bail out early if peeking
11319 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11321 * linux-low.h (struct lwp_info): New fields
11322 `stopped_by_watchpoint' and `stopped_data_address'.
11323 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11324 here, and cache them in the lwp object.
11325 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11327 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11329 (linux_stopped_by_watchpoint): Rewrite.
11330 (linux_stopped_data_address): Rewrite.
11332 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11334 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11335 switching the current inferior, not before.
11337 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11339 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11340 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11341 i386-linux.c and amd64-linux.c.
11342 (reg-i386.o): Removed.
11343 (reg-i386.c): Likewise.
11344 (reg-i386-linux.o): Likewise.
11345 (reg-i386-linux.c): Likewise.
11346 (reg-x86-64.o): Likewise.
11347 (reg-x86-64.c): Likewise.
11348 (reg-x86-64-linux.o): Likewise.
11349 (reg-x86-64-linux.c): Likewise.
11351 (i386.c): Likewise.
11352 (i386-linux.o): Likewise.
11353 (i386-linux.c): Likewise.
11354 (amd64.o): Likewise.
11355 (amd64.c): Likewise.
11356 (amd64-linux.o): Likewise.
11357 (amd64-linux.c): Likewise.
11359 * configure.srv (srv_i386_regobj): New.
11360 (srv_i386_linux_regobj): Likewise.
11361 (srv_amd64_regobj): Likewise.
11362 (srv_amd64_linux_regobj): Likewise.
11363 (srv_i386_32bit_xmlfiles): Likewise.
11364 (srv_i386_64bit_xmlfiles): Likewise.
11365 (srv_i386_xmlfiles): Likewise.
11366 (srv_amd64_xmlfiles): Likewise.
11367 (srv_i386_linux_xmlfiles): Likewise.
11368 (srv_amd64_linux_xmlfiles): Likewise.
11369 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11370 srv_xmlfiles to $srv_i386_xmlfiles.
11371 (i[34567]86-*-mingw32ce*): Likewise.
11372 (i[34567]86-*-mingw*): Likewise.
11373 (i[34567]86-*-nto*): Likewise.
11374 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11375 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11376 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11377 (x86_64-*-linux*): Likewise.
11379 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11380 (init_registers_amd64_linux): New.
11381 (x86_arch_setup): Replace init_registers_x86_64_linux with
11382 init_registers_amd64_linux.
11384 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11386 * configure.ac: Check for libdl. If it is not available link against
11387 static libthread_db.
11388 * configure: Regenerate.
11390 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11394 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11395 handing a read watchpoint.
11396 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11398 2010-02-12 Doug Evans <dje@google.com>
11400 * linux-low.c (linux_supports_tracefork_flag): Document.
11401 (linux_look_up_symbols): Add comment.
11403 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11405 * regcache.c (supply_register): Clear regcache if buf is NULL.
11407 2010-02-02 Nicolas Roche <roche@sourceware.org>
11408 Joel Brobecker <brobecker@adacore.com>
11410 * inferiors.c (find_inferior): Add function documentation.
11411 (unloaded_dll): Handle the case where the unloaded dll has not
11412 been previously registered in the dll list.
11414 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11416 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11417 (thumb2_breakpoint): New.
11418 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11420 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11422 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11423 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11426 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11428 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11430 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11432 * linux-s390-low.c (s390_collect_ptrace_register)
11433 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11435 2010-01-21 Doug Evans <dje@google.com>
11437 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11438 (PTRACE_ARG4_TYPE): New macro.
11439 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11440 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11441 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11442 (usr_store_inferior_registers): Ditto.
11443 (linux_read_memory, linux_write_memory): Ditto.
11444 (linux_test_for_tracefork): Ditto.
11446 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11447 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11449 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11451 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11454 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11456 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11457 prototype to take a regcache. Adjust.
11459 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11461 * regcache.h (struct thread_info): Forward declare.
11462 (struct regcache): New.
11463 (new_register_cache): Adjust prototype.
11464 (get_thread_regcache): Declare.
11465 (free_register_cache): Adjust prototype.
11466 (registers_to_string, registers_from_string): Ditto.
11467 (supply_register, supply_register_by_name, collect_register)
11468 (collect_register_as_string, collect_register_by_name): Ditto.
11469 * regcache.c (struct inferior_regcache_data): Delete.
11470 (get_regcache): Rename to ...
11471 (get_thread_regcache): ... this. Adjust. Switch inferior before
11472 fetching registers.
11473 (regcache_invalidate_one): Adjust.
11474 (regcache_invalidate): Fix prototype.
11475 (new_register_cache): Return the new register cache.
11476 (free_register_cache): Change prototype.
11477 (realloc_register_cache): Adjust.
11478 (registers_to_string): Change prototype to take a regcache. Adjust.
11479 (registers_from_string): Ditto.
11480 (register_data): Ditto.
11481 (supply_register): Ditto.
11482 (supply_register_by_name): Ditto.
11483 (collect_register): Ditto.
11484 (collect_register_as_string): Ditto.
11485 (collect_register_by_name): Ditto.
11486 * server.c (process_serial_event): Adjust.
11487 * linux-low.h (regset_fill_func, regset_store_func): Change
11489 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11491 * linux-low.c (get_stop_pc): Adjust.
11492 (check_removed_breakpoint): Adjust.
11493 (linux_wait_for_event): Adjust.
11494 (linux_resume_one_lwp): Adjust.
11495 (fetch_register): Add regcache parameter. Adjust.
11496 (usr_store_inferior_registers): Ditto.
11497 (regsets_fetch_inferior_registers): Ditto.
11498 (regsets_store_inferior_registers): Ditto.
11499 (linux_fetch_registers, linux_store_registers): Ditto.
11500 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11502 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11504 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11505 prototype to take a regcache.
11506 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11507 * remote-utils.c (convert_ascii_to_int, outreg)
11508 (prepare_resume_reply): Change prototype to take a regcache.
11510 * target.h (struct target_ops) <fetch_registers, store_registers>:
11511 Change prototype to take a regcache.
11512 (fetch_inferior_registers, store_inferior_registers): Change
11513 prototype to take a regcache. Adjust.
11514 * proc-service.c (ps_lgetregs): Adjust.
11515 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11516 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11517 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11518 take a regcache. Adjust.
11519 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11520 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11521 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11522 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11523 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11524 (cris_cannot_fetch_register):
11525 (cris_breakpoint_at): Change prototype to take a regcache.
11527 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11528 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11529 to take a regcache. Adjust.
11530 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11532 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11533 take a regcache. Adjust.
11534 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11535 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11536 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11537 * linux-mips-low.c (mips_get_pc):
11538 (mips_set_pc): Change prototype to take a regcache. Adjust.
11539 (mips_reinsert_addr): Adjust.
11540 (mips_collect_register): Change prototype to take a regcache.
11542 (mips_supply_register):
11543 (mips_collect_register_32bit, mips_supply_register_32bit)
11544 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11545 (mips_store_fpregset): Ditto.
11546 * linux-ppc-low.c (ppc_supply_ptrace_register)
11547 (ppc_supply_ptrace_register): Ditto.
11548 (parse_spufs_run): Adjust.
11549 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11550 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11551 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11552 take a regcache. Adjust.
11553 * linux-s390-low.c (s390_collect_ptrace_register)
11554 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11555 (s390_set_pc): Change prototype to take a regcache. Adjust.
11556 (s390_arch_setup): Adjust.
11557 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11558 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11559 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11560 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11561 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11563 (sparc_breakpoint_at): Adjust.
11564 * linux-xtensa-low.c (xtensa_fill_gregset):
11565 (xtensa_store_gregset):
11566 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11567 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11568 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11569 prototype to take a regcache. Adjust.
11570 * win32-arm-low.c (arm_fetch_inferior_register)
11571 (arm_store_inferior_register): Change prototype to take a
11573 * win32-i386-low.c (i386_fetch_inferior_register)
11574 (i386_store_inferior_register): Change prototype to take a
11576 * win32-low.c (child_fetch_inferior_registers)
11577 (child_store_inferior_registers): Change prototype to take a
11579 (win32_wait): Adjust.
11580 (win32_fetch_inferior_registers): Change prototype to take a
11582 (win32_store_inferior_registers): Adjust.
11583 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11584 store_inferior_register>: Change prototype to take a regcache.
11586 2010-01-20 Doug Evans <dje@google.com>
11588 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11590 (linux_wait_for_event1, linux_init_signals): Ditto.
11591 (W_STOPCODE): Provide definition if missing.
11593 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11595 * linux-low.c (linux_core_of_thread): New.
11596 (compare_ints, show_process, list_threads): New.
11597 (linux_qxfer_osdata): Report threads and cores.
11598 (linux_target_op): Register linux_core_of_thread.
11599 * remote-utils.c (prepare_resume_reply): Report the core.
11600 (buffer_xml_printf): Support %d specifier.
11601 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11603 (handle_query): Handle qXfer:threads. Announce availability
11605 * target.h (struct target_ops): New field core_of_thread.
11607 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11609 * Makefile.in (clean): Remove new generated files.
11610 (reg-s390.o, reg-s390.c): Remove rules.
11611 (reg-s390x.o, reg-s390x.c): Likewise.
11612 (s390-linux32.o, s390-linux32.c): Add rules.
11613 (s390-linux64.o, s390-linux64.c): Likewise.
11614 (s390x-linux64.o, s390x-linux64.c): Likewise.
11615 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11616 * linux-s390-low.c: Include <elf.h>.
11617 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11618 (init_registers_s390): Remove prototype.
11619 (init_registers_s390x): Likewise.
11620 (init_registers_s390_linux32): Add prototype.
11621 (init_registers_s390_linux64): Likewise.
11622 (init_registers_s390x_linux64): Likewise.
11623 (s390_num_regs_3264): New define.
11624 (s390_regmap_3264): New global variable.
11625 (s390_cannot_fetch_register): Remove obsolete check.
11626 (s390_cannot_store_register): Likewise.
11627 (s390_collect_ptrace_register): Handle upper/lower register halves.
11628 (s390_supply_ptrace_register): Likewise.
11629 (s390_fill_gregset): Update to register number changes.
11630 (s390_get_hwcap): New routine.
11631 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11632 Install appropriate regmap and register set.
11634 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11636 * server.c (gdbserver_version): Update copyright year to 2010.
11637 * gdbreplay.c (gdbreplay_version): Likewise.
11639 2009-12-28 Doug Evans <dje@google.com>
11641 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11642 elf/external.h. Include <elf.h> instead but only if necessary.
11644 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11646 * linux-low.c (linux_remove_process): Remove `detaching'
11647 parameter. Don't release/detach from thread_db here.
11648 (linux_kill): Release/detach from thread_db here, ...
11649 (linux_detach): ... and here, before actually detaching.
11650 (linux_wait_1): ... and here, when a process exits.
11651 * thread-db.c (any_thread_of): New.
11652 (thread_db_free): Switch the current inferior to a thread of the
11655 2009-12-21 Doug Evans <dje@google.com>
11657 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11659 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11660 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11661 warning ifndef __NR_tkill. Move setting of errno there too.
11662 Delete unnecessary resetting of errno after syscall.
11663 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11665 * configure.ac: Check for dladdr.
11666 * config.in: Regenerate.
11667 * configure: Regenerate.
11668 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11669 (try_thread_db_load): Update.
11671 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11673 2009-12-18 Doug Evans <dje@google.com>
11675 * event-loop.c: Include unistd.h if it exists.
11677 * linux-low.c (my_waitpid): Move definition away from being in
11678 between linux_tracefork_child/linux_test_for_tracefork.
11680 * gdb_proc_service.h (psaddr_t): Fix type.
11681 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11682 signature to match glibc.
11684 2009-12-16 Doug Evans <dje@google.com>
11686 * linux-low.c (linux_read_memory): Fix argument to read.
11688 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11690 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11691 events, don't leave current_inferior pointing at null.
11693 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11695 * win32-low.c (LOG): Delete.
11696 (OUTMSG): Output to stderr.
11697 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11698 on compile time LOG macro.
11699 (win32_wait): Fix debug output.
11701 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11703 * win32-low.c (win32_add_one_solib): If the dll name is
11704 "ntdll.dll", prepend the system directory to the dll path.
11706 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11708 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11710 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11711 Vladimir Prus <vladimir@codesourcery.com>
11713 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11714 * configure.ac: Check for __mcoldfire__ and set
11715 gdb_cv_m68k_is_coldfire.
11716 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11717 reg-cf.o and reg-m68k.o.
11718 * configure: Regenerated.
11720 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11722 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11723 Pass it to thread_db_free.
11724 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11725 proper `detaching' argument to linux_remove_process.
11726 * linux-low.h (thread_db_free): Add `detaching' parameter.
11727 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11729 (thread_db_free): Add `detaching' parameter. Only
11730 call td_ta_clear_event if detaching from process.
11732 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11734 * thread-db.c (thread_db_free): Fix typo.
11736 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11739 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11741 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11743 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11744 with an i686 compiler.
11745 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11747 * configure: Rebuilt.
11749 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11753 * server.c (handle_search_memory_1): Correct read_addr initialization
11754 in loop for searching subsequent chunks.
11756 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11758 * configure.ac: New --with-libthread-db option.
11759 * thread-db.c: Allow direct dependence on libthread_db.
11760 (thread_db_free): Adjust.
11761 * config.in: Regenerate.
11762 * configure: Likewise.
11764 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11767 * thread-db.c (attach_thread): New function.
11768 (maybe_attach_thread): Return success/failure.
11769 (find_new_threads_callback): Adjust.
11770 (thread_db_find_new_threads): Loop until no new threads.
11772 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11774 * proc-service.c (ps_lgetregs): Formatting.
11776 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11778 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11779 * configure.ac: Adjust.
11780 * linux-low.h (struct process_info_private): Move members to struct
11782 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11783 * linux-low.c (linux_remove_process): Adjust.
11784 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11785 * server.c (handle_query): Move code ...
11786 (handle_monitor_command): ... here. New function.
11787 * target.h (struct target_ops): New member.
11788 * thread-db.c (struct thread_db): New.
11789 (libthread_db_search_path): New variable.
11790 (thread_db_create_event, thread_db_enable_reporting)
11791 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11792 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11793 (try_thread_db_load_1, dladdr_to_soname): New functions.
11794 (try_thread_db_load, thread_db_load_search): New functions.
11795 (thread_db_init): Search for libthread_db.
11796 (thread_db_free): New function.
11797 (thread_db_handle_monitor_command): Likewise.
11798 * config.in: Regenerate.
11799 * configure: Regenerate.
11801 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11803 * spu-low.c (spu_kill): Wait for inferior to terminate.
11804 Call clear_inferiors.
11805 (spu_detach): Call clear_inferiors.
11807 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11809 * aclocal.m4: Regenerate.
11810 * config.in: Likewise.
11811 * configure: Likewise.
11813 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11815 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11816 (parse_spufs_run): New function.
11817 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11818 (ppc_breakpoint_at): Handle SPU breakpoints.
11820 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11822 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11823 (SPUFS_MAGIC): Define.
11824 (spu_enumerate_spu_ids): New function.
11825 (linux_qxfer_spu): New function.
11826 (linux_target_ops): Install linux_qxfer_spu.
11828 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11830 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11831 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11832 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11833 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11834 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11835 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11836 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11837 (init_registers_powerpc_cell32l): Add prototype.
11838 (init_registers_powerpc_cell64l): Likewise.
11839 (ppc_arch_setup): Detect Cell/B.E. architecture.
11841 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11843 * Makefile.in (datarootdir): New variable.
11845 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11847 * linux-low.c (linux_write_memory): Update debugging output.
11848 * Makefile.in (clean): Add new descriptions.
11849 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11850 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11851 * configure.srv: Add new files for arm*-*-linux*.
11852 * linux-arm-low.c: Add new declarations.
11853 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11854 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11855 (HWCAP_VFPv3D16): New.
11856 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11857 instead of __IWMMXT__.
11858 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11859 (arm_arch_setup): New.
11860 (target_regsets): Remove #ifdef. Add VFP regset.
11861 (the_low_target): Use arm_arch_setup.
11863 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11865 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11866 the main thread again.
11868 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11870 Adding Neutrino gdbserver.
11871 * configure: Regenerated.
11872 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11873 * configure.srv (i[34567]86-*-nto*): New target.
11874 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11875 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11876 (nto_comctrl) [__QNX__]: New function.
11877 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11879 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11881 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11884 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11885 Pedro Alves <pedro@codesourcery.com>
11887 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11888 don't support CONTEXT_EXTENDED_REGISTERS.
11889 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11890 (the_low_target): Install them.
11891 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11892 failing with ERROR_PIPE_NOT_CONNECTED.
11894 2009-06-30 Doug Evans <dje@google.com>
11895 Pierre Muller <muller@ics.u-strasbg.fr>
11897 Add h/w watchpoint support to x86-linux, win32-i386.
11898 * Makefile.in (SFILES): Add i386-low.c
11899 (i386_low_h): Define.
11900 (i386-low.o): Add dependencies.
11901 (linux-x86-low.o): Add i386-low.h dependency.
11902 (win32-i386-low.o): Ditto.
11903 * i386-low.c: New file.
11904 * i386-low.h: New file.
11905 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11906 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11907 * linux-low.c (linux_add_process): Initialize arch_private.
11908 (linux_remove_process): Free arch_private.
11909 (add_lwp): Initialize arch_private.
11910 (delete_lwp): Free arch_private.
11911 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11913 * linux-low.h (process_info_private): New member arch_private.
11914 (lwp_info): New member arch_private.
11915 (linux_target_ops): New members new_process, new_thread,
11917 (ptid_of): New macro.
11918 * linux-x86-low.c: Include stddef.h, i386-low.h.
11919 (arch_process_info): New struct.
11920 (arch_lwp_info): New struct.
11921 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11922 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11923 (i386_dr_low_get_status): New function.
11924 (x86_insert_point, x86_remove_point): New functions.
11925 (x86_stopped_by_watchpoint): New function.
11926 (x86_stopped_data_address): New function.
11927 (x86_linux_new_process, x86_linux_new_thread): New functions.
11928 (x86_linux_prepare_to_resume): New function.
11929 (the_low_target): Add entries for insert_point, remove_point,
11930 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11932 * server.c (debug_hw_points): New global.
11933 (monitor_show_help): Document set debug-hw-points.
11934 (handle_query): Process "set debug-hw-points".
11935 * server.h (debug_hw_points): Declare.
11936 (paddress): Declare.
11937 * utils.c (NUMCELLS, CELLSIZE): New macros.
11938 (get_sell, xsnprintf, paddress): New functions.
11939 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11940 remove_point, stopped_by_watchpoint, stopped_data_address.
11941 * win32-i386-low.c: Include i386-low.h.
11942 (debug_reg_state): Replaces dr.
11943 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11944 (i386_dr_low_get_status): New function.
11945 (i386_insert_point, i386_remove_point): New functions.
11946 (i386_stopped_by_watchpoint): New function.
11947 (i386_stopped_data_address): New function.
11948 (i386_initial_stuff): Update.
11949 (get_thread_context,set_thread_context,i386_thread_added): Update.
11950 (the_low_target): Add entries for insert_point,
11951 remove_point, stopped_by_watchpoint, stopped_data_address.
11952 * win32-low.c (win32_insert_watchpoint): New function.
11953 (win32_remove_watchpoint): New function.
11954 (win32_stopped_by_watchpoint): New function.
11955 (win32_stopped_data_address): New function.
11956 (win32_target_ops): Add entries for insert_watchpoint,
11957 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11958 * win32-low.h (win32_target_ops): New members insert_point,
11959 remove_point, stopped_by_watchpoint, stopped_data_address.
11961 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11963 * server.c (process_serial_event): Re-return unsupported, not
11964 error, if the type isn't recognized. Re-allow supporting only
11965 insert or remove packets. Also call require_running for
11966 breakpoints. Add missing break statement to default case. Tidy.
11967 * target.h (struct target_ops): Rename insert_watchpoint to
11968 insert_point, and remove_watchpoint to remove_point.
11970 * linux-low.h (struct linux_target_ops): Likewise.
11971 * linux-low.c (linux_insert_watchpoint): Rename to ...
11972 (linux_insert_point): ... this. Adjust.
11973 (linux_remove_watchpoint): Rename to ...
11974 (linux_remove_point): ... this. Adjust.
11975 (linux_target_ops): Adjust.
11976 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11977 (cris_insert_point): ... this.
11978 (cris_remove_watchpoint): Rename to ...
11979 (cris_remove_point): ... this.
11980 (the_low_target): Adjust.
11982 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11984 * server.c (handle_v_kill): Pass signal_pid to
11985 kill_inferior if multi_process is zero.
11987 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11989 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11990 * target.h (target_ops): Comment for *_watchpoint to make it clear
11991 the functions can get types '0' and '1'.
11993 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11995 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11996 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11997 * regcache.c (get_regcache): Likewise.
11998 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11999 * win32-low.c (child_fetch_inferior_registers): Remove check for
12002 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12003 Pedro Alves <pedro@codesourcery.com>
12005 * target.h (struct target_ops) <supports_multi_process>: New
12007 (target_supports_multi_process): New.
12008 * server.c (handle_query): Even if GDB reports support, only
12009 enable multi-process if the target also supports it. Report
12010 multi-process support only if the target backend supports it.
12011 * linux-low.c (linux_supports_multi_process): New function.
12012 (linux_target_ops): Install it as target_supports_multi_process
12015 2009-05-24 Doug Evans <dje@google.com>
12017 Global renaming of find_thread_pid to find_thread_ptid.
12018 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12019 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12020 All callers updated.
12022 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12023 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12026 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12027 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12028 (linux_resume_one_lwp): Ditto.
12030 2009-05-23 Doug Evans <dje@google.com>
12032 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12033 from struct inferior_list_entry * to struct lwp_info *.
12034 All callers updated.
12036 2009-05-13 Doug Evans <dje@google.com>
12038 * linux-x86-low.c: Don't include assert.h.
12039 (x86_siginfo_fixup): Use fatal, not assert.
12040 (x86_arch_setup): Fix comment.
12042 2009-05-12 Doug Evans <dje@google.com>
12044 Biarch support for i386/amd64 gdbserver.
12045 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12046 Add linux-x86-low.c.
12047 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12048 (linux-x86-low.o): Add.
12049 * linux-x86-64-low.c: Delete.
12050 * linux-i386-low.c: Delete.
12051 * linux-x86-low.c: New file.
12052 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12054 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12056 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12057 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12058 (linux_child_pid_to_exec_file): New function.
12059 (elf_64_header_p, elf_64_file_p): New functions.
12060 (siginfo_fixup): New function.
12061 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12062 give target a chance to convert layout.
12063 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12064 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12066 2009-05-07 Doug Evans <dje@google.com>
12068 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12069 (regsets_store_inferior_registers): Ditto.
12071 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12075 * linux-low.c (must_set_ptrace_flags): Delete.
12076 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12078 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12079 `lwp->must_set_ptrace_flags' instead.
12080 (linux_wait_for_event_1): Set ptrace options here.
12081 (linux_wait_1): ... not here.
12083 2009-04-30 Doug Evans <dje@google.com>
12085 * inferiors.c (started_inferior_callback): New function.
12086 (attached_inferior_callback): New function.
12087 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12088 * server.c (print_started_pid, print_attached_pid): New functions.
12089 (detach_or_kill_for_exit): New function.
12090 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12091 * server.h (have_started_inferiors_p): Declare.
12092 (have_attached_inferiors_p): Declare.
12094 * inferiors.c (remove_process): Fix memory leak, free process.
12095 * linux-low.c (linux_remove_process): New function.
12096 (linux_kill): Call it instead of remove_process.
12097 (linux_detach, linux_wait_1): Ditto.
12099 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12101 * configure.srv: Add x86 Windows CE target.
12103 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12105 * inferiors.c (get_thread_process): Make global.
12106 * server.h (get_thread_process): Add prototype.
12107 * thread-db.c (find_one_thread): Use get_thread_process
12108 instead of current_process.
12109 (thread_db_get_tls_address): Do not crash if called when
12110 thread layer is not yet initialized.
12112 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12114 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12115 * spu-low.c (current_tid): Rename to ...
12116 (current_ptid): ... this.
12117 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12118 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12119 ptid_get_lwp (current_ptid) instead of current_tid.
12120 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12121 instead of current_tid. Use find_process_pid to verify pid
12122 argument is valid. Pass proper argument to remove_process.
12123 (spu_thread_alive): Compare current_ptid instead of current_tid.
12124 (spu_resume): Likewise.
12126 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12128 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12131 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12133 Implement the multiprocess extensions, and add linux multiprocess
12136 * server.h (ULONGEST): Declare.
12137 (struct ptid, ptid_t): New.
12138 (minus_one_ptid, null_ptid): Declare.
12139 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12140 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12141 (struct inferior_list_entry): Change `id' type from unsigned from
12143 (struct sym_cache, struct breakpoint, struct
12144 process_info_private): Forward declare.
12145 (struct process_info): Declare.
12146 (current_process): Declare.
12147 (all_processes): Declare.
12148 (initialize_inferiors): Declare.
12149 (add_thread): Adjust to use ptid_t.
12150 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12151 (add_process, remove_process, find_thread_pid): Declare.
12152 (find_inferior_id): Adjust to use ptid_t.
12153 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12154 (multi_process): Declare.
12155 (push_event): Adjust to use ptid_t.
12156 (read_ptid, write_ptid): Declare.
12157 (prepare_resume_reply): Adjust to use ptid_t.
12158 (clear_symbol_cache): Declare.
12159 * inferiors.c (all_processes): New.
12160 (null_ptid, minus_one_ptid): New.
12161 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12162 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12163 (add_thread): Change unsigned long to ptid. Remove gdb_id
12165 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12166 (gdb_id_to_thread): Rename to ...
12167 (find_thread_pid): ... this. Change unsigned long to ptid.
12168 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12169 (loaded_dll, pull_pid_from_list): Adjust.
12170 (add_process, remove_process, find_process_pid)
12171 (get_thread_process, current_process, initialize_inferiors): New.
12172 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12173 (struct target_waitstatus) <related_pid>: Ditto.
12174 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12175 return type to int.
12176 (struct target_ops) <join>: Add `pid' argument.
12177 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12178 (struct target_ops) <wait>: Add `ptid' field. Change return type
12180 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12181 (mywait): Add `ptid' argument. Change return type to ptid_t.
12182 (target_pid_to_str): Declare.
12183 * target.c (set_desired_inferior): Adjust to use ptids.
12184 (mywait): Add new `ptid' argument. Adjust.
12185 (target_pid_to_str): New.
12186 * mem-break.h (free_all_breakpoints): Declare.
12187 * mem-break.c (breakpoints): Delelete.
12188 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12189 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12190 to use per-process breakpoint list.
12191 (free_all_breakpoints): New.
12192 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12193 (symbol_cache, all_symbols_looked_up): Delete.
12195 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12197 (prepare_resume_reply): Change ptid argument's type from unsigned
12198 long to ptid_t. Adjust. Implement W;process and X;process.
12199 (free_sym_cache, clear_symbol_cache): New.
12200 (look_up_one_symbol): Adjust to per-process symbol cache. *
12201 * server.c (cont_thread, general_thread, step_thread): Change type
12203 (attached): Delete.
12204 (multi_process): New.
12205 (last_ptid): Change type to ptid_t.
12206 (struct vstop_notif) <ptid>: Change type to ptid_t.
12207 (queue_stop_reply, push_event): Change `ptid' argument's type to
12209 (discard_queued_stop_replies): Add `pid' argument.
12210 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12211 changes. Don't reference the `attached' global.
12212 (attach_inferior): Adjust to mywait interface changes.
12213 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12214 features. Handle and report "multiprocess+". Handle
12216 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12218 (handle_v_kill): New.
12219 (handle_v_stopped): Adjust to use target_pid_to_str.
12220 (handle_v_requests): Allow multiple attaches and runs when
12221 multiprocess extensions are in effect. Handle "vKill".
12222 (myresume): Adjust to use ptids.
12223 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12224 (handle_status): Adjust to discard_queued_stop_replies interface
12226 (first_thread_of, kill_inferior_callback)
12227 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12228 (main): Call initialize_inferiors. Adjust to use ptids, killing
12229 and detaching from all inferiors. Handle multiprocess packet
12231 * linux-low.h: Include gdb_proc_service.h.
12232 (struct process_info_private): New.
12233 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12234 <lwpid_of>: Use ptid_get_lwp.
12235 (get_lwp_thread): Adjust.
12236 (struct lwp_info): Add `dead' member.
12237 (find_lwp_pid): Declare.
12238 * linux-low.c (thread_db_active): Delete.
12239 (new_inferior): Adjust comment.
12240 (inferior_pid): Delete.
12241 (linux_add_process): New.
12242 (handle_extended_wait): Adjust.
12243 (add_lwp): Change unsigned long to ptid.
12244 (linux_create_inferior): Add process to processes table. Adjust
12245 to use ptids. Don't set new_inferior here.
12246 (linux_attach_lwp): Rename to ...
12247 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12248 it. Adjust to use ptids.
12249 (linux_attach_lwp): New.
12250 (linux_attach): Add process to processes table. Don't set
12252 (struct counter): New.
12253 (second_thread_of_pid_p, last_thread_of_process_p): New.
12254 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12255 multiple processes.
12256 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12257 processes. Remove process from process table.
12258 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12259 to multiple processes.
12260 (any_thread_of): New.
12261 (linux_detach): Add `pid' argument, and handle it. Remove process
12262 from processes table.
12263 (linux_join): Add `pid' argument. Handle it.
12264 (linux_thread_alive): Change unsighed long argument to ptid_t.
12265 Consider dead lwps as not being alive.
12266 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12267 threads we're not interested in.
12268 (same_lwp, find_lwp_pid): New.
12269 (linux_wait_for_lwp): Change `pid' argument's type from int to
12271 (linux_wait_for_event): Rename to ...
12272 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12273 from int to ptid_t. Adjust.
12274 (linux_wait_for_event): New.
12275 (linux_wait_1): Add `ptid' argument. Change return type to
12276 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12277 that exit from the process table.
12278 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12280 (mark_lwp_dead): New.
12281 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12282 stopping all threads, mark its main lwp as dead.
12283 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12285 (fetch_register, usr_store_inferior_registers)
12286 (regsets_fetch_inferior_registers)
12287 (regsets_store_inferior_registers, linux_read_memory)
12288 (linux_write_memory): Inline `inferior_pid'.
12289 (linux_look_up_symbols): Adjust to use per-process
12290 `thread_db_active'.
12291 (linux_request_interrupt): Adjust to use ptids.
12292 (linux_read_auxv): Inline `inferior_pid'.
12293 (initialize_low): Don't reference thread_db_active.
12294 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12295 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12296 (ps_getpid): Return the pid of the current inferior.
12297 * thread-db.c (proc_handle, thread_agent): Delete.
12298 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12300 (find_one_thread): Change argument type to ptid_t. Adjust to
12302 (maybe_attach_thread): Adjust to per-process data and ptids.
12303 (thread_db_find_new_threads): Ditto.
12304 (thread_db_init): Ditto.
12305 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12306 processes table. Adjust to use ptids.
12307 (spu_kill, spu_detach): Adjust interface. Remove process from
12309 (spu_join, spu_thread_alive): Adjust interface.
12310 (spu_wait): Adjust interface. Remove process from processes
12311 table. Adjust to use ptids.
12312 * win32-low.c (current_inferior_tid): Delete.
12313 (current_inferior_ptid): New.
12314 (debug_event_ptid): New.
12315 (thread_rec): Take a ptid. Adjust.
12316 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12317 (child_delete_thread): Ditto.
12318 (do_initial_child_stuff): Add `attached' argument. Add process to
12320 (child_fetch_inferior_registers, child_store_inferior_registers):
12322 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12323 (win32_attach): Pass 1 to do_initial_child_stuff.
12324 (win32_kill): Adjust interface. Remove process from processes
12326 (win32_detach): Ditto.
12327 (win32_join): Adjust interface.
12328 (win32_thread_alive): Take a ptid.
12329 (win32_resume): Adjust to use ptids.
12330 (get_child_debug_event): Ditto.
12331 (win32_wait): Adjust interface. Remove exiting process from
12334 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12336 Non-stop mode support.
12338 * server.h (non_stop): Declare.
12339 (gdb_client_data, handler_func): Declare.
12340 (delete_file_handler, add_file_handler, start_event_loop):
12342 (handle_serial_event, handle_target_event, push_event)
12343 (putpkt_notif): Declare.
12344 * target.h (enum resume_kind): New.
12345 (struct thread_resume): Replace `step' field by `kind' field.
12346 (TARGET_WNOHANG): Define.
12347 (struct target_ops) <wait>: Add `options' argument.
12348 <supports_non_stop, async, start_non_stop>: New fields.
12349 (target_supports_non_stop, target_async): New.
12350 (start_non_stop): Declare.
12351 (mywait): Add `options' argument.
12352 * target.c (mywait): Add `options' argument. Print child exit
12353 notifications here.
12354 (start_non_stop): New.
12355 * server.c (non_stop, own_buf, mem_buf): New globals.
12356 (struct vstop_notif): New.
12357 (notif_queue): New global.
12358 (queue_stop_reply, push_event, discard_queued_stop_replies)
12359 (send_next_stop_reply): New.
12360 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12362 (attach_inferior): In non-stop mode, don't wait for the target
12364 (handle_general_set): Handle QNonStop.
12365 (handle_query): When handling qC, return the current general
12366 thread, instead of the first thread of the list.
12367 (handle_query): If the backend supports non-stop mode, include
12368 QNonStop+ in the qSupported query response.
12369 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12371 (handle_v_attach, handle_v_run): Handle non-stop mode.
12372 (handle_v_stopped): New.
12373 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12374 (myresume): Adjust to use resume_kind. Handle non-stop.
12375 (queue_stop_reply_callback): New.
12376 (handle_status): Handle non-stop mode.
12377 (main): Clear non_stop flag on reconnection. Use the event-loop.
12378 Refactor serial protocol handling from here ...
12379 (process_serial_event): ... to this new function. When GDB
12380 selects any thread, select one here. In non-stop mode, wait until
12381 GDB acks all pending events before exiting.
12382 (handle_serial_event, handle_target_event): New.
12383 * remote-utils.c (remote_open): Install remote_desc in the event
12385 (remote_close): Remove remote_desc from the event loop.
12386 (putpkt_binary): Rename to...
12387 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12388 (putpkt_binary): New as wrapper around putpkt_binary_1.
12389 (putpkt_notif): New.
12390 (prepare_resume_reply): In non-stop mode, don't change the
12392 * event-loop.c: New.
12393 * Makefile.in (OBJ): Add event-loop.o.
12394 (event-loop.o): New rule.
12396 * linux-low.h (pid_of): Moved here.
12398 (get_lwp_thread): Use lwpid_of.
12399 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12400 * linux-low.c (pid_of): Delete.
12401 (inferior_pid): Use lwpid_of.
12402 (linux_event_pipe): New.
12403 (target_is_async_p): New.
12405 (handle_extended_wait): Use lwpid_of.
12406 (add_lwp): Don't set lwpid field.
12407 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12408 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12409 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12410 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12411 first. Adjust to linux_wait_for_event interface changes. Use
12413 (linux_detach): Don't delete the main lwp here.
12414 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12415 (status_pending_p): Don't consider explicitly suspended lwps.
12416 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12417 pointer. Add OPTIONS argument. Change return type to int. Use
12418 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12419 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12420 pointer. Add status pointer argument. Return a pid instead of a
12421 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12422 changes. In non-stop mode, don't switch to a random thread.
12423 (linux_wait): Rename to...
12424 (linux_wait_1): ... this. Add target_options argument, and handle
12425 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12426 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12427 clean exit and signal exit code. Don't stop all threads in
12428 non-stop mode. In all-stop mode, only stop all threads when
12429 reporting a stop to GDB. Handle explicit thread stop requests.
12430 (async_file_flush, async_file_mark): New.
12432 (send_sigstop): Use lwpid_of.
12433 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12434 interface changes. In non-stop mode, don't switch to a random
12436 (linux_resume_one_lwp): Use lwpid_of.
12437 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12438 (linux_resume_one_thread): ... this. Handle resume_stop. In
12439 non-stop mode, don't look for pending flag in all threads.
12440 (resume_status_pending_p): Don't consider explicitly suspended
12442 (my_waitpid): Reimplement. Emulate __WALL.
12443 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12445 (sigchld_handler, linux_supports_non_stop, linux_async)
12446 (linux_start_non_stop): New.
12447 (linux_target_ops): Register linux_supports_non_stop, linux_async
12448 and linux_start_non_stop.
12449 (initialize_low): Install SIGCHLD handler.
12450 * thread-db.c (thread_db_create_event, find_one_thread)
12451 (thread_db_get_tls_address): Use lwpid_of.
12452 * win32-low.c (win32_detach): Adjust to use resume_kind.
12453 (win32_wait): Add `options' argument.
12454 * spu-low.c (spu_resume): Adjust to use resume_kind.
12455 (spu_wait): Add `options' argument.
12457 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12459 Decouple target code from remote protocol.
12461 * target.h (enum target_waitkind): New.
12462 (struct target_waitstatus): New.
12463 (struct target_ops) <wait>: Return an unsigned long. Take a
12464 target_waitstatus pointer instead of a char pointer.
12465 (mywait): Likewise.
12466 * target.c (mywait): Change prototype to return an unsigned long.
12467 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12468 * server.h (thread_from_wait, old_thread_from_wait): Delete
12470 (prepare_resume_reply): Change prototype to take a
12472 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12473 (last_status, last_ptid): New.
12474 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12475 pid instead of a signal.
12476 (attach_inferior): Remove "status" and "signal" parameters.
12478 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12480 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12481 (handle_v_requests, myresume): Remove "status" and "signal"
12482 parameters. Adjust.
12483 (handle_status): New.
12484 (main): Delete local `status'. Adjust.
12485 * remote-utils.c: Include target.h.
12486 (prepare_resume_reply): Change prototype to take a
12487 target_waitstatus. Adjust.
12489 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12491 * spu-low.c (spu_wait): Adjust.
12492 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12494 (win32_wait): Adjust.
12496 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12498 * target.h (struct thread_resume): Delete leave_stopped member.
12499 (struct target_ops): Add a `n' argument to the `resume' callback.
12500 * server.c (start_inferior): Adjust.
12501 (handle_v_cont, myresume): Adjust.
12502 * linux-low.c (check_removed_breakpoint): Adjust to resume
12503 interface change, and to removed leave_stopped field.
12504 (resume_ptr): Delete.
12505 (struct thread_resume_array): New.
12506 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12507 resume interface change.
12508 (linux_continue_one_thread, linux_queue_one_thread)
12509 (resume_status_pending_p): Check if the resume field is NULL
12510 instead of checking the leave_stopped member.
12511 (linux_resume): Adjust to the target resume interface change.
12512 * spu-low.c (spu_resume): Adjust to the target resume interface
12514 * win32-low.c (win32_detach, win32_resume): Ditto.
12516 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12518 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12520 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12522 (linux_continue_one_thread): Only preserve the stepping flag if
12523 there's a pending breakpoint.
12525 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12527 * server.c (main): After the inferior having exited, call
12528 remote_close before exiting gdbserver.
12530 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12532 Fix size of FPSCR in Power 7 processors.
12533 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12534 (PPC_FEATURE_HAS_DFP): New #define.
12535 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12538 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12540 * server.c (handle_query) Whitespace and formatting.
12542 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12544 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12545 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12546 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12547 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12548 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12549 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12550 Makefile.in, configure.ac: Fix whitespace throughout.
12551 * configure: Regenerate.
12553 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12555 * inferiors.c (find_inferior): Make it safe for the callback
12556 function to delete the currently iterated inferior.
12558 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12560 * Makefile.in (linuw_low_h): Move higher.
12561 (thread-db.o): Depend on $(linux_low_h).
12563 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12565 Rename "process" to "lwp" throughout.
12567 * linux-low.c (all_processes): Rename to...
12568 (all_lwps): ... this.
12569 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12570 (add_process): Rename to ...
12571 (add_lwp): ... this. Adjust.
12572 (linux_create_inferior): Adjust.
12573 (linux_attach_lwp): Adjust.
12574 (linux_attach): Adjust.
12575 (linux_kill_one_process): Rename to ...
12576 (linux_kill_one_lwp): ... this. Adjust.
12577 (linux_kill): Adjust.
12578 (linux_detach_one_process): Rename to ...
12579 (linux_detach_one_lwp): ... this. Adjust.
12580 (linux_detach): Adjust.
12581 (check_removed_breakpoint): Adjust.
12582 (status_pending_p): Adjust.
12583 (linux_wait_for_process): Rename to ...
12584 (linux_wait_for_lwp): ... this. Adjust.
12585 (linux_wait_for_event): Adjust.
12586 (send_sigstop): Adjust.
12587 (wait_for_sigstop): Adjust.
12588 (stop_all_processes): Rename to ...
12589 (stop_all_lwps): ... this.
12590 (linux_resume_one_process): Rename to ...
12591 (linux_resume_one_lwp): ... this. Adjust.
12592 (linux_set_resume_request, linux_continue_one_thread)
12593 (linux_queue_one_thread, resume_status_pending_p)
12594 (usr_store_inferior_registers, regsets_store_inferior_registers)
12595 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12597 * linux-low.h (get_process): Rename to ...
12598 (get_lwp): ... this. Adjust.
12599 (get_thread_process): Rename to ...
12600 (get_thread_lwp): ... this. Adjust.
12601 (get_process_thread): Rename to ...
12602 (get_lwp_thread): ... this. Adjust.
12603 (struct process_info): Rename to ...
12604 (struct lwp_info): ... this.
12605 (all_processes): Rename to ...
12606 (all_lwps): ... this.
12607 * proc-service.c (ps_lgetregs): Adjust.
12608 * thread-db.c (thread_db_create_event, find_one_thread)
12609 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12611 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12613 * server.c (handle_query): Handle "qAttached".
12615 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12617 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12618 GPLv3, update license URL.
12620 2009-03-01 Doug Evans <dje@google.com>
12622 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12623 (server_h): Add gdb_signals.h.
12624 (signals.o): Update.
12625 * server.h (target_signal_from_host,target_signal_to_host_p)
12626 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12628 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12630 * remote-utils.c (getpkt): Also generate remote-debug
12631 information if noack_mode is set.
12633 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12635 * server.c (handle_query): Report qXfer:siginfo:read and
12636 qXfer:siginfo:write as supported and handle them.
12637 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12638 * linux-low.c (linux_xfer_siginfo): New.
12639 (linux_target_ops): Set it.
12641 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12643 * server.c (gdbserver_usage): Mention --remote-debug.
12644 (main): Accept '--remote-debug' switch.
12646 2009-01-18 Doug Evans <dje@google.com>
12648 * regcache.c (new_register_cache): No need to check result of xcalloc.
12649 * server.c (handle_search_memory): Back out calls to xmalloc,
12650 result is checked and error is returned to user upon failure.
12651 (handle_query): Ditto. Add more checks for result of malloc.
12652 (handle_v_cont): Check result of malloc, report error back to
12654 (handle_v_run): Ditto. Call freeargv.
12655 * server.h (freeargv): Declare.
12656 * utils.c (freeargv): New fn.
12658 2009-01-15 Doug Evans <dje@google.com>
12660 * gdbreplay.c (perror_with_name): Make arg const char *.
12661 * server.h (target_signal_to_name): Make return type const char *.
12662 * thread-db.c (thread_db_err_str): Make return type const char *.
12663 * utils.c (perror_with_name): Make arg const char *.
12665 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12667 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12668 when handling a EXIT_PROCESS_DEBUG_EVENT.
12670 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12672 * gdbreplay.c (gdbreplay_version): Update copyright year.
12673 * server.c (gdbserver_version): Likewise.
12675 2009-01-05 Doug Evans <dje@google.com>
12677 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12678 (handle_extended_wait): Improve comment.
12680 2008-12-13 Doug Evans <dje@google.com>
12682 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12683 * server.h (ATTR_MALLOC): New macro.
12684 (xmalloc,xcalloc,xstrdup): Declare.
12685 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12686 * inferiors.c: Ditto.
12687 * linux-low.c: Ditto.
12688 * mem-break.c: Ditto.
12689 * regcache.c: Ditto.
12690 * remote-utils.c: Ditto.
12693 * win32-low.c: Ditto.
12695 2008-12-12 Doug Evans <dje@google.com>
12697 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12698 in debugging printf.
12700 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12702 2008-12-09 Doug Evans <dje@google.com>
12704 * linux-low.h (struct process_info): Delete member tid, unused.
12705 * thread-db.c (find_one_thread): Update.
12706 (maybe_attach_thread): Update.
12708 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12710 * target.h (struct target_ops): Add qxfer_osdata member.
12711 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12713 (linux_qxfer_osdata): New functions.
12714 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12716 * server.c (handle_query): Handle "qXfer:osdata:read:".
12717 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12718 (buffer_xml_printf): New functions.
12719 * server.h (struct buffer): New.
12720 (buffer_grow_str, buffer_grow_str0): New macros.
12721 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12722 (buffer_xml_printf): Declare.
12724 2008-11-24 Doug Evans <dje@google.com>
12726 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12728 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12730 * server.c (handle_v_run): Always use the supplied argument list.
12732 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12734 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12735 (xtensa_regmap_table): Add entry for scompare1.
12737 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12739 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12740 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12741 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12742 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12743 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12744 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12745 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12746 XML target descriptions.
12747 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12748 when inferior is running on an ISA 2.05 or later processor. Add
12749 special case to return offset for full 64-bit slot of FPSCR when
12752 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12754 * Makefile.in (SFILES, clean): Added sparc64 files.
12755 (reg-sparc64.o, reg-sparc64.c): New.
12756 * configure.srv (sparc*-*-linux*): New configuration.
12757 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12758 syscall arguments for SPARC.
12759 (regsets_store_inferior_registers): Likewise.
12760 * linux-sparc-low.c: New file.
12762 2008-10-21 Doug Evans <dje@google.com>
12764 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12765 (READLINE_DIR,READLINE_DEP): Delete.
12766 (INTERNAL_CFLAGS): Update.
12767 (LINTFLAGS): Update.
12769 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12771 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12772 whole argv from the last run, not just argv[0].
12774 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12776 * regcache.c (new_register_cache): Return NULL if the register
12777 cache size isn't known yet.
12778 (free_register_cache): Avoid dereferencing a NULL regcache.
12780 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12782 * configure.srv: Merge MIPS and MIPS64.
12784 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12786 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12788 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12790 * Makefile.in: Add required vsx dependencies.
12792 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12793 Declare init_registers_powerpc_vsx32l.
12794 Declare init_registers_powerpc_vsx64l.
12795 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12796 (ppc_arch_setup): Check for VSX in hwcap.
12797 (ppc_fill_vsxregset): New function.
12798 (ppc_store_vsxregset): New function.
12799 Add new VSX entry in regset_info target_regsets.
12801 * configure.srv: Add new VSX dependencies.
12803 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12805 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12806 (remote_open): Set or clear transport_is_reliable.
12807 (putpkt_binary): Don't expect acks in noack mode.
12808 (getpkt): Don't send ack/nac in noack mode.
12809 * server.c (handle_general_set): Handle QStartNoAckMode.
12810 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12812 (main): Reset noack_mode on every connection.
12813 * server.h (noack_mode): Declare.
12815 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12817 * Makefile.in (GDBREPLAY_OBS): New variable.
12818 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12820 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12821 Daniel Jacobowitz <dan@codesourcery.com>
12823 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12824 (usr_store_inferior_registers): Likewise.
12825 (regsets_store_inferior_registers): Likewise.
12827 2008-07-31 Rolf Jansen <rj@surtec.com>
12828 Pedro Alves <pedro@codesourcery.com>
12830 * configure.ac: Check for memmem declaration.
12831 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12832 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12833 (disable_packet_qfThreadInfo): Unconditionally compile.
12834 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12835 * configure, config.in: Regenerate.
12837 2008-07-28 Doug Kwan <dougkwan@google.com>
12839 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12840 (linux_write_memory): Remove declaration of errno.
12842 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12844 * linux-low.c (handle_extended_wait): Do not use "status"
12845 variable uninitialized.
12847 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12849 * server.c (handle_v_attach): Inhibit reporting dll changes.
12851 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12853 * remote-utils.c (prepare_resume_reply): If requested, don't
12854 output "thread:TID" in the T stop reply.
12856 * server.c (disable_packet_vCont, disable_packet_Tthread)
12857 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12858 (handle_query): If requested, disable support for qC, qfThreadInfo
12860 (handle_v_requests): If requested, disable support for vCont.
12861 (gdbserver_show_disableable): New.
12862 (main): Handle --disable-packet and --disable-packet=LIST.
12864 * server.h (disable_packet_vCont, disable_packet_Tthread)
12865 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12867 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12869 * server.c (gdbserver_usage): Mention --version.
12871 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12873 * Makefile.in (gdbreplay.o): New rule.
12875 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12877 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12878 message, not gdbserver.
12880 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12881 Nathan Sidwell <nathan@codesourcery.com>
12882 Joseph Myers <joseph@codesourcery.com>
12884 * acinclude.m4: Include ../../config/acx.m4.
12885 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12886 * configure, config.in: Regenerate.
12887 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12888 * server.c (gdbserver_version): Print PKGVERSION.
12889 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12890 (main): Adjust gdbserver_usage calls.
12891 * gdbreplay.c (version, host_name): Add declarations.
12892 (gdbreplay_version, gdbreplay_usage): New.
12893 (main): Accept --version and --help options.
12895 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12897 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12898 (arm_breakpoint_at): Handle Thumb.
12899 (the_low_target): Add comment.
12901 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12903 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12905 2008-05-09 Doug Evans <dje@google.com>
12907 * server.h (decode_search_memory_packet): Declare.
12908 * remote-utils.c (decode_search_memory_packet): New fn.
12909 * server.c (handle_search_memory_1): New fn.
12910 (handle_search_memory): New fn.
12911 (handle_query): Process qSearch:memory packets.
12913 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12915 * regcache.c (registers_length): Remove.
12916 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12917 full register packet.
12918 * regcache.h (registers_length): Remove prototype.
12919 * server.h (PBUFSIZ): Define to 16384.
12921 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12923 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12924 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12925 powerpc-64l.o, and powerpc-altivec64l.o.
12926 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12927 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12928 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12929 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12930 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12933 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12934 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12935 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12936 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12937 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12938 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12939 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12940 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12941 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12942 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12945 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12946 (init_registers_powerpc_32l): ... this new prototype.
12947 (init_registers_powerpc_32): Remove, replace by ...
12948 (init_registers_powerpc_altivec32l): ... this new prototype.
12949 (init_registers_powerpc_e500): Remove, replace by ...
12950 (init_registers_powerpc_e500l): ... this new prototype.
12951 (init_registers_ppc64): Remove, replace by ...
12952 (init_registers_powerpc_64l): ... this new prototype.
12953 (init_registers_powerpc_64): Remove, replace by ...
12954 (init_registers_powerpc_altivec64l): ... this new prototype.
12955 (ppc_num_regs): Set to 73.
12956 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12957 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12958 (ppc_cannot_store_register): Handle orig_r3 and trap.
12959 (ppc_arch_setup): Update init_registers_... calls.
12960 (ppc_fill_gregset): Handle orig_r3 and trap.
12962 * inferiors.c (clear_inferiors): Reset current_inferior.
12964 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12966 * acinclude.m4: Add override.m4.
12967 * configure: Regenerate.
12969 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12971 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12972 initial call to init_register_ppc64.
12974 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12976 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12977 single powerpc*-*-linux* case.
12978 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12980 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12982 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12983 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12985 * linux-ppc-low.c: Include <elf.h>.
12986 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12987 (ppc_hwcap): New global variable.
12988 (ppc_regmap): Remove __SPE__ #ifdef sections.
12989 (ppc_regmap_e500): New global variable.
12990 (ppc_cannot_store_register): Update __SPE__ special case.
12991 (ppc_get_hwcap): New function.
12992 (ppc_arch_setup): Use it to determine whether inferior supports
12993 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12994 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12995 Do not access registers if target does not support AltiVec.
12996 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12997 Do not access registers if target does not support SPE.
12998 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13000 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13002 * linux-low.c (disabled_regsets, num_regsets): New.
13003 (use_regsets_p): Delete.
13004 (linux_wait_for_process): Clear disabled_regsets.
13005 (regsets_fetch_inferior_registers): Check and set it.
13006 (regsets_store_inferior_registers): Likewise.
13007 (linux_fetch_registers, linux_store_registers): Do not use
13009 (initialize_low): Allocate disabled_regsets.
13011 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13013 * Makefile.in (LIBOBJS): New.
13014 (OBS): Use LIBOBJS.
13015 (memmem.o): New rule.
13016 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13017 * configure: Regenerated.
13019 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13021 * server.c (handle_query): Never return "unsupported" for
13022 qXfer:features:read queries.
13024 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13026 * server.c (get_features_xml): Fix inverted condition.
13027 (handle_query): Always support qXfer:feature:read.
13029 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13031 * server.c (wrapper_argv): New.
13032 (start_inferior): Handle wrapper_argv. If set, expect an extra
13034 (gdbserver_usage): Document --wrapper.
13035 (main): Parse --wrapper.
13037 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13039 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13040 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13041 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13042 (ppc_set_pc): Likewise.
13043 (ppc_arch_setup): New function.
13044 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13045 of collect_register.
13046 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13048 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13050 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13051 instead of linux-ppc64-low.o.
13052 * linux-ppc64-low.c: Remove file.
13053 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13054 (linux-ppc64-low.o): Remove rule.
13056 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13057 (init_registers_powerpc_64): Likewise.
13058 (ppc_regmap): Conditionally define depending on __powerpc64__.
13059 (ppc_cannot_store_register): Do not special-case "fpscr" when
13060 compiled on __powerpc64__.
13061 (ppc_collect_ptrace_register): New function.
13062 (ppc_supply_ptrace_register): New function.
13063 (ppc_breakpoint): Change type to "unsigned int".
13064 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13065 (the_low_target): Conditionally provide initializers for the
13066 arch_setup member depending on __powerpc64__. Install
13067 collect_ptrace_register and supply_ptrace_register members.
13069 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13071 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13072 * server.c (gdbserver_xmltarget): Define.
13073 (get_features_xml): Use it to replace "target.xml" and arch_string.
13075 * configure.srv: Remove srv_xmltarget. Add XML files that were
13076 mentioned there to srv_xmlfiles instead. Remove conditional tests
13077 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13078 srv_xmlfiles and srv_regobj to include all possible choices.
13079 * configure.ac (srv_xmltarget): Remove.
13080 (srv_xmlfiles): Do not add "target.xml".
13081 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13082 checks for supplementary target information.
13083 * configure: Regenerate.
13084 * Makefile.in (XML_TARGET): Remove.
13085 (target.xml): Remove rule.
13086 (clean): Do not clean up target.xml.
13087 (.PRECIOUS): Do not mention target.xml.
13089 * target.h (struct target_ops): Remove arch_string member.
13090 * linux-low.c (linux_arch_string): Remove.
13091 (linux_target_ops): Remove arch_string initializer.
13092 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13093 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13094 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13095 * spu-low.c (spu_arch_string): Remove.
13096 (spu_target_ops): Remove arch_string initializer.
13097 * win32-low.c (win32_arch_string): Remove.
13098 (win32_target_ops): Remove arch_string initializer.
13099 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13100 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13101 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13103 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13105 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13106 by collect_ptrace_register and supply_ptrace_register hooks.
13107 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13108 instead of checking for the_low_target.left_pad_xfer.
13109 (usr_store_inferior_registers): Use collect_ptrace_register callback
13110 instead of checking for the_low_target.left_pad_xfer.
13112 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13113 (s390_supply_ptrace_register): Likewise.
13114 (s390_fill_gregset): Call s390_collect_ptrace_register.
13115 (the_low_target): Update.
13117 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13118 (ppc_supply_ptrace_register): Likewise.
13119 (the_low_target): Update.
13121 * linux-i386-low.c (the_low_target): Update.
13122 * linux-x86-64-low.c (the_low_target): Update.
13124 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13126 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13127 reg-s390.o and reg-s390x.o.
13129 * linux-low.c (new_inferior): New global variable.
13130 (linux_create_inferior, linux_attach): Set it.
13131 (linux_wait_for_process): Call the_low_target.arch_setup after the
13132 target has stopped for the first time.
13133 (initialize_low): Do not call the_low_target.arch_setup.
13135 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13136 (s390_set_pc): Likewise.
13137 (s390_arch_setup): New function.
13138 (the_low_target): Use s390_arch_setup as arch_setup routine.
13140 * regcache.c (realloc_register_cache): New function.
13141 (set_register_cache): Call it for each existing regcache.
13143 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13145 * server.h (init_registers): Remove prototype.
13147 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13148 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13149 instead of init_registers ().
13150 * linux-arm-low.c (init_registers_arm): Add prototype.
13151 (init_registers_arm_with_iwmmxt): Likewise.
13152 (the_low_target): Add initializer for arch_setup field.
13153 * linux-cris-low.c (init_registers_cris): Add prototype.
13154 (the_low_target): Add initializer for arch_setup field.
13155 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13156 (the_low_target): Add initializer for arch_setup field.
13157 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13158 (the_low_target): Add initializer for arch_setup field.
13159 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13160 (the_low_target): Add initializer for arch_setup field.
13161 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13162 (the_low_target): Add initializer for arch_setup field.
13163 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13164 (the_low_target): Add initializer for arch_setup field.
13165 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13166 (init_registers_mips64_linux): Likewise.
13167 (the_low_target): Add initializer for arch_setup field.
13168 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13169 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13170 (the_low_target): Add initializer for arch_setup field.
13171 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13172 (init_registers_powerpc_64): Likewise.
13173 (the_low_target): Add initializer for arch_setup field.
13174 * linux-s390-low.c (init_registers_s390): Add prototype.
13175 (init_registers_s390x): Likewise.
13176 (the_low_target): Add initializer for arch_setup field.
13177 * linux-sh-low.c (init_registers_sh): Add prototype.
13178 (the_low_target): Add initializer for arch_setup field.
13179 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13180 (the_low_target): Add initializer for arch_setup field.
13181 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13182 (the_low_target): Add initializer for arch_setup field.
13184 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13185 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13186 instead of init_registers ().
13187 * win32-arm-low.c (init_registers_arm): Add prototype.
13188 (the_low_target): Add initializer for arch_setup field.
13189 * win32-i386-low.c (init_registers_i386): Add prototype.
13190 (the_low_target): Add initializer for arch_setup field.
13192 * spu-low.c (init_registers_spu): Add prototype.
13193 (initialize_low): Call initialie_registers_spu () instead of
13194 initialize_registers ().
13196 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13198 * server.c (handle_v_requests): When handling the vRun and vAttach
13199 packets, if already debugging a process, don't kill it. Return an
13202 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13204 * server.c (handle_query): Correct length check.
13206 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13208 * win32-low.c (do_initial_child_stuff): Add process handle
13209 parameter. Set current_process_handle and current_process_id from the
13210 parameters. Clear globals.
13211 (win32_create_inferior): Don't set current_process_handle and
13212 current_process_id here. Instead pass them on the call to
13213 do_initial_child_stuff.
13214 (win32_attach): Likewise.
13215 (win32_clear_inferiors): New.
13216 (win32_kill): Don't close the current process handle or the
13217 current thread handle here. Instead call win32_clear_inferiors.
13218 (win32_detach): Don't open a new handle to the process. Call
13219 win32_clear_inferiors.
13220 (win32_join): Don't rely on current_process_handle; open a new
13221 handle using the process id.
13222 (win32_wait): Call win32_clear_inferiors when the inferior process
13225 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13227 * server.c (monitor_show_help): Add "exit".
13229 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13231 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13232 (clean): Add reg-xtensa.c.
13233 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13234 * configure.srv (xtensa*-*-linux*) New target.
13235 * linux-xtensa-low.c: New.
13236 * xtensa-xtregs.c: New.
13238 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13240 * hostio.c: Don't include errno.h.
13241 (errno_to_fileio_errno): Move to hostio-errno.
13242 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13243 error number outputting to the target->hostio_last_error callback.
13244 (hostio_packet_error): Use FILEIO_EINVAL directly.
13245 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13246 calls to hostio_error.
13247 * hostio-errno.c: New.
13248 * server.h (hostio_last_error_from_errno): Declare.
13249 * target.h (target_ops): Add hostio_last_error member.
13250 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13251 as hostio_last_error handler.
13252 * spu-low.c (spu_target_ops): Likewise.
13253 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13254 (wince_hostio_last_error): New functions.
13255 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13256 as hostio_last_error handler.
13257 (win32_target_ops) [!_WIN32_WCE]: Register
13258 hostio_last_error_from_errno as hostio_last_error handler.
13259 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13260 (hostio-errno.o): New rule.
13261 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13262 * configure.srv (srv_hostio_err_objs): New variable. Default to
13264 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13265 * configure: Regenerate.
13267 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13269 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13270 (linux_kill, linux_detach): Clean up the process list.
13271 * remote-utils.c (remote_open): Improve port number parsing.
13272 (putpkt_binary, input_interrupt): Only send interrupts if the target
13274 * server.c (extended_protocol): Make static.
13275 (attached): Define earlier.
13276 (exit_requested, response_needed, program_argv): New variables.
13277 (target_running): New.
13278 (start_inferior): Clear attached here.
13279 (attach_inferior): Set attached here.
13280 (require_running): Define.
13281 (handle_query): Use require_running and target_running. Implement
13283 (handle_v_attach, handle_v_run): New.
13284 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13285 (gdbserver_usage): Update.
13286 (main): Redo argument parsing. Handle --debug and --multi. Handle
13287 --attach along with other options or after the port. Save
13288 program_argv. Support no initial program. Resynchronize
13289 communication with GDB after an error. Handle "monitor exit".
13290 Use require_running and target_running. Always allow the extended
13291 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13292 restart in extended mode.
13293 * README: Refer to the GDB manual. Update --attach usage.
13295 2007-12-20 Andreas Schwab <schwab@suse.de>
13297 * linux-low.c (STACK_SIZE): Define.
13298 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13299 (linux_test_for_tracefork): Likewise.
13301 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13303 * linux-low.c (linux_wait_for_event): Update messages. Do not
13304 reinsert auto-delete breakpoints.
13305 * mem-break.c (struct breakpoint): Change return type of handler to
13307 (set_breakpoint_at): Update handler type.
13308 (reinsert_breakpoint_handler): Return 1 instead of calling
13310 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13312 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13313 * mem-break.h (set_breakpoint_at): Update handler type.
13314 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13315 * win32-low.c (auto_delete_breakpoint): New.
13316 (get_child_debug_event): Use it.
13318 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13320 * configure.ac: Check for pread and pwrite.
13321 * hostio.c (handle_pread): Fall back to lseek and read.
13322 (handle_pwrite): Fall back to lseek and write.
13323 * config.in, configure: Regenerated.
13325 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13327 * server.c (myresume): Add own_buf argument.
13328 (main): Update calls.
13330 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13332 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13333 * remote-utils.c (remote_open): Do not call disable_async_io.
13334 (block_async_io): Delete.
13335 (unblock_async_io): Make static.
13336 (initialize_async_io): New.
13337 * server.c (handle_v_cont): Handle async I/O here.
13338 (myresume): Likewise. Move other common resume tasks here...
13339 (main): ... from here. Call initialize_async_io. Disable async
13340 I/O before the main loop.
13341 * server.h (initialize_async_io): Declare.
13342 (block_async_io, unblock_async_io): Delete prototypes.
13343 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13345 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13347 * remote-utils.c (readchar): Allow binary data in received messages.
13349 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13351 * win32-low.c (attaching): New global.
13352 (win32_create_inferior): Clear the `attaching' global.
13353 (win32_attach): Set the `attaching' global.
13354 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13355 attaching. Only set a breakpoint at the entry point if not
13358 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13360 * server.c (main): Don't report dll events on the initial
13361 connection on attaches.
13363 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13365 * server.c (main): Relax numerical bases supported for the pid of
13366 the --attach command line argument.
13368 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13370 * win32-low.c (win32_attach): Call OpenProcess before
13371 DebugActiveProcess, not after. Add last error output to error
13374 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13376 * win32-low.c (win32_get_thread_context)
13377 (win32_set_thread_context): New functions.
13378 (thread_rec): Use win32_get_thread_context.
13379 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13380 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13383 2007-12-03 Leo Zayas
13384 Pedro Alves <pedro_alves@portugalmail.pt>
13386 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13388 (child_add_thread): Minor cleanup.
13389 (child_continue): Resume artificially suspended threads before
13390 calling ContinueDebugEvent.
13391 (suspend_one_thread): New.
13392 (fake_breakpoint_event): New.
13393 (get_child_debug_event): Change return type to int. Check here if
13394 gdb sent an interrupt request. If a soft interrupt was requested,
13395 fake a breakpoint event. Return 0 if there is no event to handle,
13397 (win32_wait): Don't check here if gdb sent an interrupt request.
13398 Ensure there is a valid event to handle.
13399 (win32_request_interrupt): Add soft interruption method as last
13402 2007-12-03 Leo Zayas
13403 Pedro Alves <pedro_alves@portugalmail.pt>
13405 * win32-low.h (win32_thread_info): Add descriptions to the
13406 structure members. Replace `suspend_count' counter by a
13408 * win32-low.c (thread_rec): Update condition of when to get the
13409 context from the inferior. Rely on ContextFlags being set if it
13410 has already been retrieved. Only suspend the inferior thread if
13411 we haven't already. Warn if that fails.
13412 (continue_one_thread): s/suspend_count/suspended/. Only call
13413 ResumeThread once. Warn if that fails.
13415 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13417 * win32-low.c (win32_wait): Don't read from the inferior when it
13418 has already exited.
13420 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13422 * Makefile.in (win32_low_h): New variable.
13423 (win32-low.o): Add dependency on $(win32_low_h).
13424 (win32-arm-low.o, win32-i386-low.o): New rules.
13426 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13428 * hostio.c: Correct copyright year.
13430 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13432 * Makefile.in (OBS): Add hostio.o.
13433 (hostio.o): New rule.
13434 * server.h (handle_vFile): Declare.
13435 * hostio.c: New file.
13436 * server.c (handle_v_requests): Take packet_len and new_packet_len
13437 for binary packets. Call handle_vFile.
13438 (main): Update call to handle_v_requests.
13440 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13442 * linux-low.c: Include <sched.h>.
13444 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13446 * linux-low.c (linux_tracefork_grandchild): New.
13447 (linux_tracefork_child): Use clone.
13448 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13450 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13452 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13454 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13456 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13458 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13460 * inferiors.c (change_inferior_id): Delete.
13461 (add_pid_to_list, pull_pid_from_list): New.
13462 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13463 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13464 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13465 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13466 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13467 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13468 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13469 (using_threads): Always set to 1.
13470 (handle_extended_wait): New.
13471 (add_process): Do not set TID.
13472 (linux_create_inferior): Set must_set_ptrace_flags.
13473 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13474 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13475 (linux_thread_alive): Rename TID argument to LWPID.
13476 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13477 (linux_wait_for_event): Do not use TID or check using_threads. Update
13478 call to dead_thread_notify. Call handle_extended_wait.
13479 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13480 (send_sigstop): Delete sigstop_sent.
13481 (wait_for_sigstop): Avoid TID.
13482 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13483 (linux_test_for_tracefork): New.
13484 (linux_lookup_signals): Use thread_db_active and
13485 linux_supports_tracefork_flag.
13486 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13487 * linux-low.h (get_process_thread): Avoid TID.
13488 (struct process_ifo): Move thread_known and tid to the end. Remove
13490 (linux_attach_lwp, thread_db_init): Update prototypes.
13491 * server.h (change_inferior_id): Delete prototype.
13492 (add_pid_to_list, pull_pid_from_list): New prototypes.
13493 * thread-db.c (thread_db_use_events): New.
13494 (find_first_thread): Rename to...
13495 (find_one_thread): ...this. Update callers and messages. Do not
13496 call fatal. Check thread_db_use_events. Do not call
13497 change_inferior_id or new_thread_notify.
13498 (maybe_attach_thread): Update. Do not call new_thread_notify.
13499 (thread_db_init): Set thread_db_use_events. Check use_events.
13500 * utils.c (fatal, warning): Correct message prefix.
13502 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13504 * Makefile.in (clean): Remove new files.
13505 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13506 (powerpc-64.o, powerpc-64.c): New rules.
13507 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13508 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13510 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13512 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13513 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13514 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13515 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13516 (target_regsets): Add AltiVec and SPE register sets.
13517 * configure.ac: Check for AltiVec and SPE.
13518 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13519 (ppc_fill_vrregset, ppc_store_vrregset): New.
13520 (target_regsets): Add AltiVec register set.
13521 * configure: Regenerated.
13523 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13525 * linux-low.c (O_LARGEFILE): Define.
13526 (linux_read_memory): Use /proc/PID/mem.
13527 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13528 * configure, config.in: Regenerated.
13530 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13532 * linux-low.c (linux_wait_for_event): Do not pass signals while
13535 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13537 * win32-low.c (create_process): New.
13538 (win32_create_inferior): Use create_process instead of
13539 CreateProcess. If create_process failed retry appending an ".exe"
13540 suffix. Store the GetLastError result immediatelly after
13541 create_process calls and use it on the call to error.
13543 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13545 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13547 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13549 * configure.ac: Switch license to GPLv3.
13551 2007-08-01 Michael Snyder <msnyder@access-company.com>
13553 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13555 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13557 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13559 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13560 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13561 CloseToolhelp32Snapshot.
13562 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13563 CloseToolhelp32Snapshot.
13565 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13567 * server.c (main): Check for inferior exit before main loop.
13569 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13571 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13572 instead of on tmp_desc.
13574 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13575 Daniel Jacobowitz <dan@codesourcery.com>
13577 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13578 (add_thread): Minor cleanups.
13579 (clear_inferiors): Move lower in the file. Clear the DLL
13581 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13582 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13583 (xml_escape_text): New.
13584 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13586 (handle_v_cont): Report errors.
13587 (gdbserver_version): Update.
13588 (main): Correct size of own_buf. Do not report initial DLL events.
13589 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13590 (unloaded_dll, xml_escape_text): New.
13591 * win32-low.c (enum target_waitkind): Update comments.
13592 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13593 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13594 (win32_EnumProcessModules, win32_GetModuleInformation)
13595 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13596 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13597 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13598 (win32_Module32First, win32_Module32Next, load_toolhelp)
13599 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13600 (get_child_debug_event): Handle DLL events.
13601 (win32_wait): Likewise.
13603 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13605 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13606 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13608 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13610 * win32-low.c (handle_output_debug_string): Ignore event if not
13613 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13615 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13617 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13619 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13621 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13623 * inferiors.c (change_inferior_id): Add comment.
13624 * linux-low.c (check_removed_breakpoint): Add an early
13625 prototype. Improve debug output.
13626 (linux_attach): Doc update.
13627 (linux_detach_one_process, linux_detach): Clean up before releasing
13629 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13630 * linux-low.h (struct process_info): Doc improvement.
13631 * mem-break.c (delete_all_breakpoints): New.
13632 * mem-break.h (delete_all_breakpoints): New prototype.
13633 * thread-db.c (find_first_thread): New.
13634 (thread_db_create_event): Call it instead of
13635 thread_db_find_new_threads. Clean up unused variables.
13636 (maybe_attach_thread): Remove first thread handling.
13637 (thread_db_find_new_threads): Use find_first_thread.
13638 (thread_db_get_tls_address): Likewise.
13640 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13642 * thread-db.c (thread_db_find_new_threads): Add prototype.
13643 (thread_db_create_event): Check for the main thread before adding
13645 (maybe_attach_thread): Only enable event reporting if TID == 0.
13646 (thread_db_get_tls_address): Check for new threads.
13648 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13650 * linux-low.c (linux_create_inferior): Try execv before execvp.
13651 * spu-low.c (spu_create_inferior): Likewise.
13653 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13655 * linux-low.c (linux_create_inferior): Change execv to execvp.
13656 * spu-low.c (spu_create_inferior): Likewies.
13658 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13660 * Makefile.in (clean): Clean new files instead of deleted ones.
13661 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13662 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13664 * configure.srv: Specify XML files and new regformats for MIPS and
13666 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13667 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13668 an entry for the restart register.
13669 (mips_cannot_fetch_register, mips_cannot_store_register)
13670 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13671 register names to match the XML descriptions.
13672 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13673 restart register instead of $0.
13675 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13676 Markus Deuling <deuling@de.ibm.com>
13678 * remote-utils.c (decode_xfer_write): New function.
13679 * server.h (decode_xfer_write): Add prototype.
13680 * server.c (handle_query): Add PACKET_LEN argument. Support
13681 qXfer:spu:read and qXfer:spu:write packets.
13682 (main): Pass packet_len to handle_query.
13683 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13684 * target.h (target_ops): Add qxfer_spu.
13686 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13688 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13689 accessing non-seekable spufs files.
13691 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13693 * server.c (handle_query): Add reply for qC packet.
13695 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13696 Leo Zayas <lerele@champenstudios@com>
13698 * server.h (check_remote_input_interrupt_request): New function.
13699 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13700 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13701 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13702 (check_remote_input_interrupt_request): New function.
13703 * server.h (check_remote_input_interrupt_request): Declare.
13704 * win32-low.c (winapi_DebugBreakProcess,
13705 winapi_GenerateConsoleCtrlEvent): New typedefs.
13706 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13708 (win32_wait): Check for remote interrupt request
13709 with check_remote_input_interrupt_request.
13710 (win32_request_interrupt): New function.
13711 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13713 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13715 * win32-low.c (debug_registers_changed,
13716 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13717 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13718 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13719 (thread_rec): Get context using the low target.
13720 (child_add_thread): Call thread_added on the low target,
13721 which does the same thing.
13723 (do_initial_child_stuff): Remove debug registers references.
13724 Set context using the low target. Resume threads after
13725 setting the contexts.
13726 (child_continue): Remove dead variable. Remove debug
13727 registers references.
13728 (child_fetch_inferior_registers): Go through the low target.
13729 (do_child_store_inferior_registers): Remove.
13730 (child_store_inferior_registers): Go through the low target.
13731 (win32_resume): Remove debug registers references.
13732 Set context using the low target.
13733 (handle_exception): Change return type to void. Don't record
13734 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13735 first chance exception.
13736 (get_child_debug_event): Change return type to void. Remove
13737 goto loop. Always return after waiting for debug event.
13738 (win32_wait): Convert to switch statement. Handle spurious
13741 * win32-i386-low.c (debug_registers_changed,
13742 debug_registers_used): New.
13743 (initial_stuff): Rename to ...
13744 (i386_initial_stuff): ... this. Clear debug registers
13746 (store_debug_registers): Delete.
13747 (i386_get_thread_context): New.
13748 (load_debug_registers): Delete.
13749 (i386_set_thread_context): New.
13750 (i386_thread_added): New.
13751 (single_step): Rename to ...
13752 (i386_single_step): ... this.
13753 (do_fetch_inferior_registers): Rename to ...
13754 (i386_fetch_inferior_register): ... this.
13755 (i386_store_inferior_register): New.
13756 (the_low_target): Adapt to new interface.
13758 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13759 (arm_get_thread_context): New.
13760 (arm_set_thread_context): New.
13762 (do_fetch_inferior_registers): Rename to ...
13763 (arm_fetch_inferior_register): ... this.
13764 (arm_store_inferior_register): New.
13765 (arm_wince_breakpoint): Reimplement as unsigned long.
13766 (arm_wince_breakpoint_len): Define.
13767 (the_low_target): Adapt to new interface.
13769 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13770 load_debug_registers. Add get_thread_context, set_thread_context,
13771 thread_added and store_inferior_register. Rename
13772 fetch_inferior_registers to fetch_inferior_register.
13773 (regptr): Remove declaration.
13775 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13777 * linux-low.c (linux_detach): Change return type to int. Return 0.
13778 * spu-low.c (spu_detach): Likewise.
13780 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13782 * target.h (target_ops): Change return type of detach to int.
13784 (join_inferior): New.
13785 * server.c (main): Don't skip detach support on mingw32.
13786 If the inferior doesn't support detaching return error.
13787 Call join_inferior instead of using waitpid.
13788 * linux-low.c (linux_join): New.
13789 (linux_target_op): Add linux_join.
13790 * spu-low.c (spu_join): New.
13791 (spu_target_ops): Add spu_join.
13792 * win32-low.c (win32_detach): Adapt to new interface.
13793 Reopen current_process_handle before detaching. Issue a child
13794 resume before detaching.
13796 (win32_target_op): Add win32_join.
13798 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13800 * win32-low.c (win32-attach): Fix return value.
13801 * target.h (target_ops): Describe ATTACH return values.
13803 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13805 * win32-low.c (GETPROCADDRESS): Define.
13806 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13807 (winapi_DebugSetProcessKillOnExit): Likewise.
13808 (win32_create_inferior): Force usage of ansi CreateProcessA.
13809 (win32_attach): Use GETPROCADDRESS.
13810 (win32_detach): Likewise.
13812 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13814 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13816 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13818 * win32-low.c: Commit leftover changes from 2007-03-29.
13820 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13822 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13823 fields short instead of int. Add explicit padding.
13824 (i387_cache_to_fsave): Remove unnecessary casts.
13825 (i387_fsave_to_cache): Doc fix.
13826 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13828 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13830 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13831 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13833 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13835 * configure.srv (arm*-*-mingw32ce*): Move near the other
13838 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13840 * configure.ac: Add errno checking.
13841 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13842 sys/file.h and malloc.h.
13843 (AC_CHECK_DECLS): Add perror.
13844 (srv_mingwce): Handle.
13845 * configure.srv (i[34567]86-*-cygwin*): Add
13846 win32-i386-low.o to srv_tgtobj.
13847 (i[34567]86-*-mingw*): Likewise.
13848 (arm*-*-mingw32ce*): Add case.
13849 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13850 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13851 [__MINGW32CE__] (strerror): New function.
13852 [__MINGW32CE__] (errno): Define to GetLastError.
13853 [__MINGW32CE__] (COUNTOF): New macro.
13854 (remote_open): Remove extra close call.
13855 * mem-break.c (delete_breakpoint_at): New function.
13856 * mem-break.h (delete_breakpoint_at): Declare.
13857 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13858 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13859 [USE_WIN32API] (read, write): Add char* casts.
13860 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13861 * server.h: Include wincecompat.h on Windows CE.
13862 [HAVE_ERRNO_H]: Check.
13863 (perror): Declare if not declared.
13864 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13865 (perror_with_name): Remove errno declaration.
13866 * wincecompat.h: New.
13867 * wincecompat.c: New.
13868 * win32-low.h: New.
13869 * win32-arm-low.c: New.
13870 * win32-i386-low.c: New.
13871 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13872 (OUTMSG2): Make it safe.
13874 (COUNTOF): New macro.
13875 (NUM_REGS): Get it from the low target.
13876 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13877 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13878 (thread_rec): Let low target handle debug registers.
13879 (child_add_thread): Likewise.
13880 (child_init_thread_list): Likewise.
13881 (continue_one_thread): Likewise.
13883 (do_child_fetch_inferior_registers): Move to ...
13884 * win32-i386-low.c: ... here, and rename to ...
13885 (do_fetch_inferior_registers): ... this.
13886 * win32-low.c (child_fetch_inferior_registers):
13887 Go through the low target.
13888 (do_child_store_inferior_registers): Use regptr.
13889 (strwinerror): New function.
13890 (win32_create_inferior): Handle Windows CE.
13891 Use strwinerror instead of strerror on Windows error
13892 codes. Add program to the error output.
13893 Don't close the main thread handle on Windows CE.
13894 (win32_attach): Use coredll.dll on Windows CE.
13895 (win32_kill): Close current process and current
13897 (win32_detach): Use coredll.dll on Windows CE.
13898 (win32_resume): Let low target handle debug registers, and
13900 (handle_exception): Add/Remove initial breakpoint. Avoid
13901 non-existant WSTOPSIG on Windows CE.
13902 (win32_read_inferior_memory): Cast to remove warning.
13903 (win32_arch_string): Go through the low target.
13904 (initialize_low): Call set_breakpoint_data with the low
13905 target's breakpoint.
13906 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13907 FOP_REGNUM, mappings): Move to ...
13908 * win32-i386-low.c: ... here.
13909 * win32-low.c (win32_thread_info): Move to ...
13910 * win32-low.h: ... here.
13911 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13912 win32-arm-low.c and wincecompat.c.
13913 (all:): Add $EXEEXT.
13914 (install-only:): Likewise.
13915 (gdbserver:): Likewise.
13916 (gdbreplay:): Likewise.
13917 * config.in: Regenerate.
13918 * configure: Regenerate.
13920 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13922 * win32-low.c: Rename typedef thread_info to
13923 win32_thread_info throughout.
13925 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13927 * win32-i386-low.c: Rename to ...
13928 * win32-low.c: ... this.
13929 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13930 * Makefile.in: Likewise.
13932 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13934 * remote-utils.c (monitor_output): Constify msg parameter.
13935 * server.h (monitor_output): Likewise.
13936 * win32-i386-low.c (handle_output_debug_string): New.
13937 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13938 handle_output_debug_string.
13939 (get_child_debug_event): Likewise.
13941 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13943 * server.c (main): Correct strtoul check.
13945 2007-03-27 Jon Ringle <jon@ringle.org>
13947 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13949 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13951 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13953 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13955 * terminal.h: Check HAVE_SGTTY_H.
13957 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13959 * remote-utils.c (remote_open): Print out the assigned port number.
13961 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13963 * remote-utils.c (monitor_output): New function.
13964 * server.c (debug_threads): Define here.
13965 (monitor_show_help): New function.
13966 (handle_query): Handle qRcmd.
13967 (main): Do not handle 'd' packet.
13968 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13969 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13972 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13974 * Makefile.in (EXEEXT): New.
13975 (clean): Use $(EXEEXT).
13977 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13979 * target.h (target_ops): Rename send_signal to request_interrupt,
13980 and remove enum target_signal parameter.
13981 * linux-low.c (linux_request_interrupt): Rename from
13982 linux_send_signal, and always send SIGINT.
13983 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13984 and always send SIGINT.
13985 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13987 (input_interrupt): Likewise.
13989 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13991 * server.c (get_features_xml): Check if target implemented
13993 * win32-i386-low.c (win32_arch_string): New.
13994 (win32_target_ops): Add win32_arch_string as arch_string member.
13996 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13998 * spu-low.c (spu_arch_string): New.
13999 (spu_target_ops): Add spu_arch_string.
14001 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14003 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14004 * configure.ac: Do not check for terminal.h.
14005 * configure, config.in: Regenerated.
14007 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14009 * Makefile.in (OBS): Add $(XML_BUILTIN).
14010 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14012 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14013 (arm-with-iwmmxt.c): New.
14014 * config.in, configure: Regenerate.
14015 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14016 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14017 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14018 (arm*-*-linux*): Add iWMMXt and regset support.
14019 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14020 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14021 (arm_store_wmmxregset, target_regsets): New.
14022 * server.c (get_features_xml): Take annex argument. Check builtin
14024 (handle_query): Handle multiple annexes.
14026 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14028 * remote-utils.c [USE_WIN32API] (read, write): Define.
14029 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14032 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14034 * linux-i386-low.c (the_low_target): Set arch_string.
14035 * linux-x86-64-low.c (the_low_target): Likewise.
14036 * linux-low.c (linux_arch_string): New.
14037 (linux_target_ops): Add it.
14038 * linux-low.h (struct linux_target_ops): Add arch_string.
14039 * server.c (write_qxfer_response): Use const void * for DATA.
14040 (get_features_xml): New.
14041 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14042 * target.h (struct target_ops): Add arch_string method.
14044 2007-01-03 Denis Pilat <denis.pilat@st.com>
14045 Daniel Jacobowitz <dan@codesourcery.com>
14047 * linux-low.c (linux_kill): Handle being called with no threads.
14048 * win32-i386-low.c (win32_kill): Likewise.
14049 (get_child_debug_event): Clear current_process_handle.
14051 2006-12-30 Denis PILAT <denis.pilat@st.com>
14052 Daniel Jacobowitz <dan@codesourcery.com>
14054 * remote-utils.c (remote_open): Check the type of specified
14055 serial port devices before opening them.
14056 * server.c (main): Kill the inferior if an error occurs during
14057 the first remote_open.
14059 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14061 * README: Update supported targets.
14063 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14065 * Makefile.in (clean): Remove reg-mips64.c.
14066 (reg-mips64.c, reg-mips64.o): New rules.
14067 * configure.srv: Handle mips64. Include regset support for mips.
14068 * linux-mips-low.c (union mips_register): New.
14069 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14070 (mips_breakpoint, mips_breakpoint_at): Use int.
14071 (mips_collect_register, mips_supply_register)
14072 (mips_collect_register_32bit, mips_supply_register_32bit)
14073 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14074 (mips_store_fpregset, target_regsets): New.
14075 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14077 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14079 * configure.srv: Add target "spu*-*-*".
14080 * Makefile.in (clean): Remove reg-spu.c.
14081 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14082 * spu-low.c: New file.
14084 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14086 * configure.ac: Correct td_thr_tls_get_addr test.
14087 * configure: Regenerated.
14089 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14091 * linux-low.c (linux_wait_for_event): Reformat. Use the
14092 pass_signals array.
14093 * remote-utils.c (decode_address_to_semicolon): New.
14094 * server.c (pass_signals, handle_general_set): New.
14095 (handle_query): Mention QPassSignals for qSupported.
14096 (main): Call handle_general_set.
14097 * server.h (pass_signals, decode_address_to_semicolon): New.
14099 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14101 * server.c (handle_query): Correct error handling for read_auxv.
14103 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14105 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14106 and srv_linux_thread_db to yes.
14107 * linux-s390-low.c (s390_fill_gregset): New function.
14108 (target_regsets): Define data structure.
14110 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14112 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14113 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14114 * config.in, configure: Regenerated.
14115 * inferiors.c (gdb_id_to_thread): New function.
14116 (gdb_id_to_thread_id): Use it.
14117 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14118 * linux-low.h (struct process_info): Add th member.
14119 (thread_db_get_tls_address): New prototype.
14120 * remote-utils.c (decode_address): Make non-static.
14121 * server.c (handle_query): Handle qGetTLSAddr.
14122 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14123 * target.h (struct target_ops): Add get_tls_address.
14124 * thread-db.c (maybe_attach_thread): Save the thread handle.
14125 (thread_db_get_tls_address): New.
14127 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14129 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14130 (linux_resume_one_process): Take a siginfo_t *. Update all
14131 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14132 (struct pending_signals): Add a siginfo_t.
14133 (linux_wait_for_process): Always set last_status.
14134 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14135 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14136 * linux-low.h (struct process_info): Add last_status.
14138 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14140 * remote-utils.c (try_rle): New function.
14141 (putpkt_binary): Use it.
14143 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14145 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14146 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14147 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14148 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14149 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14152 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14154 * server.c (terminal_fd): New variable.
14155 (old_foreground_pgrp): Likewise.
14156 (restore_old_foreground_pgrp): New function.
14157 (start_inferior): Record the terminal file descriptor in terminal_fd
14158 and its original foreground group in old_foreground_pgrp. Register
14159 restore_old_foreground_pgrp with atexit().
14161 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14163 * server.c (handle_query): Correct qPart to qXfer.
14165 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14167 * configure.ac: Check for more headers which are missing on
14168 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14169 * configure.srv: Add Cygwin and mingw32.
14170 * remote-utils.c: Don't include headers unconditionally which
14171 are missing on mingw32. Include <winsock.h> for mingw32.
14172 (remote_open): Adjust for mingw32 support. Flush
14173 standard error after writing to it.
14174 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14175 (unblock_async_io, enable_async_io, disable_async_io)
14176 (readchar, getpkt): Update for Winsock support.
14177 (prepare_resume_reply): Expect a protocol signal number.
14178 * server.c: Disable <sys/wait.h> on mingw32.
14179 (start_inferior): Adjust for mingw32 support. Flush
14180 standard error after writing to it.
14181 (attach_inferior): Likewise. Use protocol signal
14183 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14185 * win32-i386-low.c: New file.
14186 * Makefile.in (XM_CLIBS): Set.
14187 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14188 (win32-i386-low.o): New dependency rule.
14189 * linux-low.c (linux_wait): Use target signal numbers.
14190 * target.h (struct target_ops): Doc fix.
14191 * server.h (target_signal_to_name): New prototype.
14192 * gdbreplay.c: Don't include headers unconditionally which
14193 are missing on mingw32. Include <winsock.h> for mingw32.
14194 (remote_close, remote_open): Adjust for Winsock support.
14195 * configure, config.in: Regenerated.
14197 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14199 * server.c (decode_xfer_read, write_qxfer_response): New.
14200 (handle_query): Take a packet length argument. Handle
14201 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14202 the qSupported response.
14203 (main): Update call to handle_query.
14205 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14207 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14208 (putpkt_binary): Renamed from putpkt and adjusted for binary
14210 (putpkt): New wrapper for putpkt_binary.
14211 (readchar): Don't mask off the high bit.
14212 (decode_X_packet): New function.
14213 * server.c (main): Call putpkt_binary if a handler sets the packet
14214 length. Save the length of the incoming packet. Handle 'X'.
14215 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14217 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14219 * server.c (handle_query): Handle qSupported.
14221 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14223 * remote-utils.c (all_symbols_looked_up): New variable.
14224 (look_up_one_symbol): Check it.
14225 * server.h (look_up_one_symbol): New declaration.
14226 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14228 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14230 * Makefile.in (linux-arm-low.o): Update dependencies.
14231 * linux-arm-low.c: Include "gdb_proc_service.h".
14232 (PTRACE_GET_THREAD_AREA): Define.
14233 (ps_get_thread_area): New function.
14235 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14237 * configure.srv (m68k*-*-uclinux*): New target.
14238 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14239 (linux_resume_one_process): Remove extraneous cast.
14240 (linux_read_offsets): New.
14241 (linux_target_op): Add linux_read_offsets on mmuless systems.
14242 * server.c (handle_query): Add qOffsets logic.
14243 * target.h (struct target_ops): Add read_offsets.
14245 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14247 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14248 (PTRACE_GET_THREAD_AREA): Define.
14249 (ps_get_thread_area): New function.
14250 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14251 (linux-x86-64-low.o): Update.
14253 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14255 * configure.ac: Remove checks for prfpregset_t.
14256 * gdb_proc_service.h: New file.
14257 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14258 new "gdb_proc_service.h".
14259 * proc-service.c: Likewise.
14260 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14261 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14262 * Makefile.in (gdb_proc_service_h): Updated.
14263 * configure, config.in: Regenerated.
14265 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14267 * remote-utils.c (prepare_resume_reply): Move declaration
14268 of gdb_id_from_wait to the top of the block.
14270 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14272 * linux-low.c (regsets_store_inferior_registers): Read the regset
14273 from the target before filling it.
14275 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14277 * server.c (attach_inferior): Return SIGTRAP for a successful
14280 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14282 * Makefile.in (OBS): Add version.o.
14283 (STAGESTUFF): Delete.
14284 (version.o): Add dependencies.
14285 (version.c): Replace rule.
14286 (clean): Remove version.c.
14287 * server.c (gdbserver_version): New.
14288 (gdbserver_usage): Use printf.
14289 (main): Handle --version and --help.
14290 * server.h (version, host_name): Add declarations.
14292 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14304 * linux-x86-64-low.c:
14306 * linux-s390-low.c:
14307 * linux-ppc64-low.c:
14309 * linux-mips-low.c:
14310 * linux-m68k-low.c:
14311 * linux-m32r-low.c:
14314 * linux-ia64-low.c:
14315 * linux-i386-low.c:
14316 * linux-crisv32-low.c:
14328 * gdbserver.1: Add (C) after Copyright. Update the FSF
14331 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14333 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14334 (arm_breakpoint_at): Recognize both breakpoints.
14335 (the_low_target): Use the correct breakpoint instruction.
14337 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14339 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14340 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14341 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14342 (the_low_target): Update.
14344 2005-10-25 Andreas Schwab <schwab@suse.de>
14346 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14348 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14349 (ia64_num_regs): Reduce to 462.
14351 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14353 * acinclude.m4: Correct quoting.
14354 * aclocal.m4: Regenerated.
14356 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14357 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14358 (thread_db_init): Call thread_db_err_str.
14359 * configure.ac: Check for TD_VERSION.
14360 * config.in, configure: Regenerated.
14362 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14364 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14366 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14368 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14369 is not available. Define HAVE_PTRACE_GETREGS if it is.
14370 * config.in, configure: Regenerated.
14371 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14372 * linux-i386-low.c, linux-m68k-low.c: Update to use
14373 HAVE_PTRACE_GETREGS.
14374 * linux-low.c (regsets_fetch_inferior_registers)
14375 (regsets_store_inferior_registers): Only return 0 if we processed
14377 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14378 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14380 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14382 * inferiors.c (struct thread_info): Add gdb_id.
14383 (add_thread): Add gdb_id argument.
14384 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14385 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14386 calls to add_thread.
14387 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14388 * server.c (handle_query): Use thread_to_gdb_id.
14389 (handle_v_cont, main): Use gdb_id_to_thread_id.
14390 * server.h (add_thread): Update prototype.
14391 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14394 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14396 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14397 left-padded registers.
14398 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14399 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14401 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14403 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14404 * configure: Regenerate.
14405 * config.in: Regenerate.
14406 * server.h (NEED_DECLARATION_STRERROR):
14407 Replace with !HAVE_DECL_STRERROR.
14409 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14411 * linux-low.c (linux_wait, linux_send_signal): Don't test
14412 an unsigned long variable for > 0 if it could be MAX_ULONG.
14413 * server.c (myresume): Likewise.
14414 * target.c (set_desired_inferior): Likewise.
14416 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14418 * configure.ac: Simplify and improve check for socklen_t.
14419 * configure, config.in: Regenerate.
14421 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14423 * acconfig.h: Remove.
14424 * configure.ac: Add a test for socklen_t. Use three-argument
14425 AC_DEFINE throughout.
14426 * config.in: Regenerated using autoheader 2.59.
14427 * configure: Regenerated.
14429 * gdbreplay.c (socklen_t): Provide a default.
14430 (remote_open): Use socklen_t.
14431 * remote-utils.c (socklen_t): Provide a default.
14432 (remote_open): Use socklen_t.
14433 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14436 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14438 * linux-low.c (linux_read_memory, linux_write_memory)
14439 (linux_read_auxv): Likewise.
14440 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14441 (check_mem_write): Likewise.
14442 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14444 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14445 (registers_from_string, register_data): Likewise.
14446 * server.c (handle_query, main): Likewise.
14447 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14448 (decode_M_packet): Likewise.
14449 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14450 * target.h (struct target_ops): Update read_memory, write_memory,
14452 (read_inferior_memory, write_inferior_memory): Update.
14453 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14454 to unsigned char *.
14455 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14456 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14457 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14458 linux-s390-low.c, linux-sh-low.c: Update for changes in
14459 read_inferior_memory and the_low_target->breakpoint.
14461 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14463 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14464 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14465 * configure.srv: Add powerpc64-*-linux*.
14466 * linux-ppc64-low.c: New file.
14468 2005-05-23 Orjan Friberg <orjanf@axis.com>
14470 * linux-cris-low.c: New file with support for CRIS.
14471 * linux-crisv32-low.c: Ditto for CRISv32.
14472 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14473 (clean): Add reg-cris.c and reg-crisv32.c.
14474 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14475 reg-crisv32.o, and reg-crisv32.c to make rules.
14476 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14477 recognized targets.
14479 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14481 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14482 of sizeof (PTRACE_XFER_TYPE).
14483 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14485 2005-05-12 Orjan Friberg <orjanf@axis.com>
14487 * target.h (struct target_ops): Add insert_watchpoint,
14488 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14489 pointers for hardware watchpoint support.
14490 * linux-low.h (struct linux_target_ops): Ditto.
14491 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14492 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14493 to linux_target_ops.
14494 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14496 * server.c (main): Recognize 'Z' and 'z' packets.
14498 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14500 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14501 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14502 (the_low_target): Add new members.
14504 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14506 * proc-service.c (ps_lgetregs): Search all_processes instead of
14509 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14511 * server.c (start_inferior): Change return type to int.
14512 (attach_inferior): Change sigptr to int *.
14513 (handle_v_cont, handle_v_requests): Change signal to int *.
14514 (main): Change signal to int.
14516 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14518 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14519 * configure.srv: Add m32r*-*-linux*.
14520 * linux-m32r-low.c: New file.
14522 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14524 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14526 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14528 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14529 Take unsigned long arguments for PIDs.
14530 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14531 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14532 (wait_for_sigstop, linux_resume_one_process)
14533 (regsets_fetch_inferior_registers, linux_send_signal)
14534 (linux_read_auxv): Likewise. Update the types of variables holding
14535 PIDs. Update format string specifiers.
14536 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14537 * remote-utils.c (prepare_resume_reply): Likewise.
14538 * server.c (cont_thread, general_thread, step_thread)
14539 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14541 (handle_query): Update format specifiers.
14542 (handle_v_cont, main): Use strtoul for thread IDs.
14543 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14544 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14545 (general_thread, step_thread, thread_from_wait)
14546 (old_thread_from_wait): Update.
14547 * target.h (struct thread_resume): Use unsigned long for THREAD.
14548 (struct target_ops): Use unsigned long for arguments to attach and
14551 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14553 * acinclude.m4: Include bfd/bfd.m4 directly.
14554 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14555 <agriffis@toolchain.org>.
14556 * aclocal.m4, configure: Regenerated.
14558 2005-01-07 Andrew Cagney <cagney@gnu.org>
14560 * configure.ac: Rename configure.in, require autoconf 2.59.
14561 * configure: Re-generate.
14563 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14565 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14566 LIBS when finished.
14567 * aclocal.m4: Regenerated.
14568 * configure: Regenerated.
14570 2004-11-21 Andreas Schwab <schwab@suse.de>
14572 * linux-m68k-low.c (m68k_num_gregs): Define.
14573 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14574 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14575 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14576 (m68k_breakpoint_at): New. Add to the_low_target.
14578 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14579 srv_linux_thread_db to yes.
14581 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14583 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14584 (ARCH_SET_FS): Likewise.
14585 (ARCH_GET_FS): Likewise.
14586 (ARCH_GET_GS): Likewise.
14588 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14590 * linux-i386-low.c (ps_get_thread_area): New.
14591 * linux-x86-64-low.c (ps_get_thread_area): New.
14592 * linux-low.c: Include <sys/syscall.h>.
14593 (linux_kill_one_process): Don't kill the first thread here.
14594 (linux_kill): Kill the first thread here.
14595 (kill_lwp): New function.
14596 (send_sigstop, linux_send_signal): Use it.
14597 * proc-service.c: Clean up #ifdefs.
14598 (fpregset_info): Delete.
14599 (ps_lgetregs): Update and enable implementation.
14600 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14602 * remote-utils.c (struct sym_cache, symbol_cache): New.
14603 (input_interrupt): Print a clearer message.
14604 (async_io_enabled): New variable.
14605 (enable_async_io, disable_async_io): Use it. Update comments.
14606 (look_up_one_symbol): Use the symbol cache.
14607 * thread-db.c (thread_db_look_up_symbols): New function.
14608 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14610 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14612 * configure.in: Test for -rdynamic.
14613 * configure: Regenerated.
14614 * Makefile (INTERNAL_LDFLAGS): New.
14615 (gdbserver, gdbreplay): Use it.
14617 2004-09-02 Andrew Cagney <cagney@gnu.org>
14619 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14621 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14623 * linux-low.c (linux_wait): Clear all_processes list also.
14625 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14627 * linux-low.c: Include <errno.h>. Remove extern declaration of
14630 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14632 * gdbreplay.c, server.h, utils.c: Update copyright years.
14634 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14636 * server.c (main): Print child status or termination signal from
14637 variable 'signal', not 'sig'.
14639 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14641 * linux-low.c (linux_read_memory): Change return type to
14642 int. Check for and return error from ptrace().
14643 * target.c (read_inferior_memory): Change return type to int. Pass
14644 back return status from the_target->read_memory().
14645 * target.h (struct target_ops): Adapt *read_memory() prototype.
14647 (read_inferior_memory): Adapt prototype.
14648 * server.c (main): Return an error packet if
14649 read_inferior_memory() returns an error.
14651 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14653 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14654 Unify with other clean targets.
14656 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14658 * server.c (handle_v_cont): Call set_desired_inferior.
14660 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14662 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14664 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14666 * linux-low.c (linux_wait): Unblock async I/O.
14667 (linux_resume): Block and enable async I/O.
14668 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14669 * server.h (block_async_io, unblock_async_io): Add prototypes.
14671 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14673 * remote-utils.c (remote_open): Print a status notice after
14674 opening a TCP port.
14675 * server.c (attach_inferior): Print a status notice after
14678 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14680 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14682 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14684 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14686 * server.c, target.h: Update copyright years.
14688 2004-02-25 Roland McGrath <roland@redhat.com>
14690 * target.h (struct target_ops): New member `read_auxv'.
14691 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14692 * linux-low.c (linux_read_auxv): New function.
14693 (linux_target_ops): Initialize `read_auxv' member to that.
14695 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14697 Committed by Jim Blandy <jimb@redhat.com>.
14699 * linux-s390-low.c (s390_num_regs): Update.
14700 (s390_regmap): Remove control registers. Use __s390x__ predefine
14701 instead of GPR_SIZE to distiguish s390 and s390x targets.
14703 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14705 * linux-low.c: Update copyright year.
14706 (check_removed_breakpoint): Clear pending_is_breakpoint.
14707 (linux_set_resume_request, linux_queue_one_thread)
14708 (resume_status_pending_p): New functions.
14709 (linux_continue_one_thread): Use process->resume.
14710 (linux_resume): Only resume threads if there are no pending events.
14711 * linux-low.h (struct process_info): Add resume request
14714 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14716 * regcache.c (new_register_cache): Clear the allocated register
14717 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14719 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14721 * linux-low.c (linux_resume): Take a struct thread_resume *
14723 (linux_wait): Update call.
14724 (resume_ptr): New static variable.
14725 (linux_continue_one_thread): Renamed from
14726 linux_continue_one_process. Use resume_ptr.
14727 (linux_resume): Use linux_continue_one_thread.
14728 * server.c (handle_v_cont, handle_v_requests): New functions.
14729 (myresume): New function.
14730 (main): Handle 'v' case.
14731 * target.h (struct thread_resume): New type.
14732 (struct target_ops): Change argument of "resume" to struct
14734 (myresume): Delete macro.
14736 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14738 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14739 (uninstall): Support DESTDIR.
14741 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14743 * configure.srv: Add xscale*linux copy of arm*linux entry.
14745 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14747 * linux-arm-low.c (arm_reinsert_addr): New function.
14748 (the_low_target): Add arm_reinsert_addr.
14750 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14752 * mem-break.c: Remove whitespace at end of file.
14754 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14756 * configure.in: Check whether we need to prototype strerror.
14757 * server.h: Optionally prototype strerror.
14758 * gdbreplay.c (perror_with_name): Use strerror.
14759 * linux-low.c (linux_attach_lwp): Use strerror.
14760 * utils.c (perror_with_name): Use strerror.
14761 * config.in, configure: Regenerated.
14763 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14765 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14766 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14768 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14770 * Makefile.in (SFILES): Update.
14771 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14772 low-sun3.c: Remove files.
14774 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14776 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14777 (linux_detach_one_process, linux_detach): New functions.
14778 (linux_target_ops): Add linux_detach.
14779 * server.c (main): Handle 'D' packet.
14780 * target.h (struct target_ops): Add "detach" member.
14781 (detach_inferior): Define.
14783 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14785 From Kelley Cook <kelleycook@wideopenwest.com>:
14786 * configure.srv: Accept i[34567]86 variants.
14788 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14790 * linux-low.c (linux_wait_for_event): Correct comment typos.
14791 (linux_resume_one_process): Call check_removed_breakpoint.
14792 (linux_send_signal): New function.
14793 (linux_target_ops): Add linux_send_signal.
14794 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14796 * target.h (struct target_ops): Add send_signal.
14798 2003-05-29 Jim Blandy <jimb@redhat.com>
14800 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14801 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14802 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14803 away part of the register's value.
14805 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14807 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14808 (linux_wait_for_event, linux_init_signals): Likewise.
14810 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14812 * configure.in: Check for stdlib.h.
14813 * configure: Regenerated.
14814 * config.in: Regenerated.
14816 2003-01-04 Andreas Schwab <schwab@suse.de>
14818 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14820 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14822 * Makefile.in: Remove obsolete code.
14824 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14826 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14827 defined(PT_FPR0_HI).
14829 2002-11-17 Stuart Hughes <seh@zee2.com>
14831 * linux-arm-low.c (arm_num_regs): Increase.
14832 (arm_regmap): Include status register.
14834 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14836 * linux-low.c (register_addr): Remove incorrect -1 check.
14838 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14840 * linux-low.c (linux_create_inferior): Call setpgid. Return
14842 (unstopped_p, linux_signal_pid): Remove.
14843 (linux_target_ops): Remove linux_signal_pid.
14844 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14845 global instead of target method.
14846 * target.h (struct target_ops): Remove signal_pid. Update comment
14847 for create_inferior.
14848 * server.c (signal_pid): New variable.
14849 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14850 gdbserver. Set the child to be the foreground process group.
14851 (attach_inferior): Set signal_pid.
14853 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14855 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14857 2002-08-20 Jim Blandy <jimb@redhat.com>
14859 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14862 2002-08-01 Andrew Cagney <cagney@redhat.com>
14864 * Makefile.in: Make chill references obsolete.
14866 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14868 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14869 * configure: Regenerate.
14870 * config.in: Regenerate.
14872 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14874 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14875 (perror_with_name, remote_close, remote_open, expect, play): Static.
14877 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14879 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14880 byte offsets instead of an array of indexes.
14881 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14883 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14885 * regcache.c: Add comment.
14887 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14889 * thread-db.c: New file.
14890 * proc-service.c: New file.
14891 * acinclude.m4: New file.
14892 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14893 proc-service.o, and thread-db.o.
14894 (linux-low.o): Add USE_THREAD_DB.
14895 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14896 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14897 * aclocal.m4: Regenerated.
14898 * config.in: Regenerated.
14899 * configure: Regenerated.
14900 * configure.in: Check for proc_service.h, sys/procfs.h,
14901 thread_db.h, and linux/elf.h headrs.
14902 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14903 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14904 Check for -lthread_db and thread support.
14905 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14906 PowerPC, and SuperH.
14907 * i387-fp.c: Constify arguments.
14908 * i387-fp.h: Likewise.
14909 * inferiors.c: (struct thread_info): Renamed from
14910 `struct inferior_info'. Remove PID member. Use generic inferior
14911 list header. All uses updated.
14912 (inferiors, signal_pid): Removed.
14913 (all_threads): New variable.
14914 (get_thread): Define.
14915 (add_inferior_to_list): New function.
14916 (for_each_inferior): New function.
14917 (change_inferior_id): New function.
14918 (add_inferior): Removed.
14919 (remove_inferior): New function.
14920 (add_thread): New function.
14921 (free_one_thread): New function.
14922 (remove_thread): New function.
14923 (clear_inferiors): Use for_each_inferior and free_one_thread.
14924 (find_inferior): New function.
14925 (find_inferior_id): New function.
14926 (inferior_target_data): Update argument type.
14927 (set_inferior_target_data): Likewise.
14928 (inferior_regcache_data): Likewise.
14929 (set_inferior_regcache_data): Likewise.
14930 * linux-low.c (linux_bp_reinsert): Remove.
14931 (all_processes, stopping_threads, using_thrads)
14932 (struct pending_signals, debug_threads, pid_of): New.
14933 (inferior_pid): Replace with macro.
14934 (struct inferior_linux_data): Remove.
14935 (get_stop_pc, add_process): New functions.
14936 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14937 Use add_process and add_thread.
14938 (linux_attach_lwp): New function, based on old linux_attach. Use
14939 add_process and add_thread. Set stop_expected for new threads.
14940 (linux_attach): New function.
14941 (linux_kill_one_process): New function.
14942 (linux_kill): Kill all LWPs.
14943 (linux_thread_alive): Use find_inferior_id.
14944 (check_removed_breakpoints, status_pending_p): New functions.
14945 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14946 Update. Use WNOHANG. Wait for cloned processes also. Update process
14947 struct for the found process.
14948 (linux_wait_for_event): New function.
14949 (linux_wait): Use it. Support LWPs.
14950 (send_sigstop, wait_for_sigstop, stop_all_processes)
14951 (linux_resume_one_process, linux_continue_one_process): New functions.
14952 (linux_resume): Support LWPs.
14953 (REGISTER_RAW_SIZE): Remove.
14954 (fetch_register): Use register_size instead. Call supply_register.
14955 (usr_store_inferior_registers): Likewise. Call collect_register.
14956 Fix recursive case.
14957 (regsets_fetch_inferior_registers): Improve error message.
14958 (regsets_store_inferior_registers): Add debugging.
14959 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14960 (unstopped_p, linux_signal_pid): New functions.
14961 (linux_target_ops): Add linux_signal_pid.
14962 (linux_init_signals): New function.
14963 (initialize_low): Call it. Initialize using_threads.
14964 * regcache.c (inferior_regcache_data): Add valid
14966 (get_regcache): Fetch registers lazily. Add fetch argument
14967 and update all callers.
14968 (regcache_invalidate_one, regcache_invalidate): New
14970 (new_register_cache): Renamed from create_register_cache.
14971 Return the new regcache.
14972 (free_register_cache): Change argument to a void *.
14973 (registers_to_string, registers_from_string): Call get_regcache
14974 with fetch flag set.
14975 (register_data): Make static. Pass fetch flag to get_regcache.
14976 (supply_register): Call get_regcache with fetch flag clear.
14977 (collect_register): Call get_regcache with fetch flag set.
14978 (collect_register_as_string): New function.
14979 * regcache.h: Update.
14980 * remote-utils.c (putpkt): Flush after debug output and use
14982 Handle input interrupts while waiting for an ACK.
14983 (input_interrupt): Use signal_pid method.
14984 (getpkt): Flush after debug output and use stderr.
14985 (outreg): Use collect_register_as_string.
14986 (new_thread_notify, dead_thread_notify): New functions.
14987 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14988 and general_thread.
14989 (look_up_one_symbol): Flush after debug output.
14990 * server.c (step_thread, server_waiting): New variables.
14991 (start_inferior): Don't use signal_pid. Update call to mywait.
14992 (attach_inferior): Update call to mywait.
14993 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14994 (main): Don't fetch/store registers explicitly. Use
14995 set_desired_inferior. Support proposed ``Hs'' packet. Update
14997 * server.h: Update.
14998 (struct inferior_list, struct_inferior_list_entry): New.
14999 * target.c (set_desired_inferior): New.
15000 (write_inferior_memory): Constify.
15001 (mywait): New function.
15002 * target.h: Update.
15003 (struct target_ops): New signal_pid method.
15004 (mywait): Removed macro, added prototype.
15006 * linux-low.h (regset_func): Removed.
15007 (regset_fill_func, regset_store_func): New.
15008 (enum regset_type): New.
15009 (struct regset_info): Add type field. Use new operation types.
15010 (struct linux_target_ops): stop_pc renamed to get_pc.
15011 Add decr_pc_after_break and breakpoint_at.
15012 (get_process, get_thread_proess, get_process_thread)
15013 (strut process_info, all_processes, linux_attach_lwp)
15014 (thread_db_init): New.
15016 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15017 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15018 (the_low_target): Add new members.
15019 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15020 (i386_store_fpxregset): Constify.
15021 (target_regsets): Add new kind identifier.
15022 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15023 (i386_set_pc): Add debugging.
15024 (i386_breakpoint_at): New function.
15025 (the_low_target): Add new members.
15026 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15027 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15028 (mips_breakpoint_at): New.
15029 (the_low_target): Add new members.
15030 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15031 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15032 (the_low_target): Add new members.
15033 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15034 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15035 (the_low_target): Add new members.
15036 * linux-x86-64-low.c (target_regsets): Add new kind
15039 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15041 From Martin Pool <mbp@samba.org>:
15042 * server.c (gdbserver_usage): New function.
15045 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15047 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15048 stop_at -> stop_pc.
15050 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15052 * Makefile.in: Remove obsolete code.
15054 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15056 * linux-low.c (regsets_fetch_inferior_registers),
15057 (regsets_store_inferior_registers): Removed cast to int from
15059 * regcache.h: Added declaration of struct inferior_info.
15061 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15063 * inferiors.c (struct inferior_info): Add regcache_data.
15064 (add_inferior): Call create_register_cache.
15065 (clear_inferiors): Call free_register_cache.
15066 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15067 * regcache.c (struct inferior_regcache_data): New.
15068 (registers): Remove.
15069 (get_regcache): New function.
15070 (create_register_cache, free_register_cache): New functions.
15071 (set_register_cache): Don't initialize the register cache here.
15072 (registers_to_string, registers_from_string, register_data): Call
15074 * regcache.h: Add prototypes.
15075 * server.h: Likewise.
15077 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15079 * mem-break.c: New file.
15080 * mem-break.h: New file.
15081 * Makefile.in: Add mem-break.o rule; update server.h
15083 * inferiors.c (struct inferior_info): Add target_data
15085 (clear_inferiors): Free target_data member if set.
15086 (inferior_target_data, set_inferior_target_data): New functions.
15087 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15088 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15089 * linux-low.c (linux_bp_reinsert): New variable.
15090 (struct inferior_linux_data): New.
15091 (linux_create_inferior): Use set_inferior_target_data.
15092 (linux_attach): Likewise. Call add_inferior.
15093 (linux_wait_for_one_inferior): New function.
15094 (linux_wait): Call it.
15095 (linux_write_memory): Add const.
15096 (initialize_low): Call set_breakpoint_data.
15097 * linux-low.h (struct linux_target_ops): Add breakpoint
15099 * server.c (attach_inferior): Remove extra add_inferior
15101 * server.h: Include mem-break.h. Update inferior.c
15103 * target.c (read_inferior_memory)
15104 (write_inferior_memory): New functions.
15105 * target.h (read_inferior_memory)
15106 (write_inferior_memory): Change macros to prototypes.
15107 (struct target_ops): Update comments. Add const to write_memory
15110 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15112 * linux-low.c (usr_store_inferior_registers): Support
15113 registers which are allowed to fail to store.
15114 * linux-low.h (linux_target_ops): Likewise.
15115 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15116 (ppc_cannot_store_register): FPSCR may not be storable.
15118 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15120 * server.h: Include <string.h> if HAVE_STRING_H.
15121 * ChangeLog: Correct paths in last ChangeLog entry.
15123 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15125 * linux-low.h: Remove obsolete prototypes.
15126 (struct linux_target_ops): New.
15127 (extern the_low_target): New.
15128 * linux-low.c (num_regs, regmap): Remove declarations.
15129 (register_addr): Use the_low_target explicitly.
15130 (fetch_register): Likewise.
15131 (usr_fetch_inferior_registers): Likewise.
15132 (usr_store_inferior_registers): Likewise.
15133 * linux-arm-low.c (num_regs): Remove.
15134 (arm_num_regs): Define.
15135 (arm_regmap): Renamed from regmap, made static.
15136 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15138 (arm_cannot_store_register): Renamed from cannot_store_register,
15140 (the_low_target): New.
15141 * linux-i386-low.c (num_regs): Remove.
15142 (i386_num_regs): Define.
15143 (i386_regmap): Renamed from regmap, made static.
15144 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15146 (i386_cannot_store_register): Renamed from cannot_store_register,
15148 (the_low_target): New.
15149 * linux-ia64-low.c (num_regs): Remove.
15150 (ia64_num_regs): Define.
15151 (ia64_regmap): Renamed from regmap, made static.
15152 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15154 (ia64_cannot_store_register): Renamed from cannot_store_register,
15156 (the_low_target): New.
15157 * linux-m68k-low.c (num_regs): Remove.
15158 (m68k_num_regs): Define.
15159 (m68k_regmap): Renamed from regmap, made static.
15160 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15162 (m68k_cannot_store_register): Renamed from cannot_store_register,
15164 (the_low_target): New.
15165 * linux-mips-low.c (num_regs): Remove.
15166 (mips_num_regs): Define.
15167 (mips_regmap): Renamed from regmap, made static.
15168 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15170 (mips_cannot_store_register): Renamed from cannot_store_register,
15172 (the_low_target): New.
15173 * linux-ppc-low.c (num_regs): Remove.
15174 (ppc_num_regs): Define.
15175 (ppc_regmap): Renamed from regmap, made static.
15176 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15178 (ppc_cannot_store_register): Renamed from cannot_store_register,
15180 (the_low_target): New.
15181 * linux-s390-low.c (num_regs): Remove.
15182 (s390_num_regs): Define.
15183 (s390_regmap): Renamed from regmap, made static.
15184 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15186 (s390_cannot_store_register): Renamed from cannot_store_register,
15188 (the_low_target): New.
15189 * linux-sh-low.c (num_regs): Remove.
15190 (sh_num_regs): Define.
15191 (sh_regmap): Renamed from regmap, made static.
15192 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15194 (sh_cannot_store_register): Renamed from cannot_store_register,
15196 (the_low_target): New.
15197 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15198 (the_low_target): New.
15200 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15202 * Makefile.in: Add stamp-h target.
15203 * configure.in: Create stamp-h.
15204 * configure: Regenerated.
15206 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15208 * inferiors.c: New file.
15209 * target.c: New file.
15210 * target.h: New file.
15211 * Makefile.in: Add target.o and inferiors.o. Update
15213 * linux-low.c (inferior_pid): New static variable,
15214 moved from server.c.
15215 (linux_create_inferior): Renamed from create_inferior.
15216 Call add_inferior. Return 0 on success instead of a PID.
15217 (linux_attach): Renamed from myattach.
15218 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15219 (linux_thread_alive): Renamed from mythread_alive.
15220 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15222 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15223 (regsets_store_inferior_registers): Correct error message.
15224 Add missing ``return 0''.
15225 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15226 (linux_store_registers): Renamed from store_inferior_registers.
15227 (linux_read_memory): Renamed from read_inferior_memory.
15228 (linux_write_memory): Renamed from write_inferior_memory.
15229 (linux_target_ops): New structure.
15230 (initialize_low): Call set_target_ops ().
15231 * remote-utils.c (unhexify): New function.
15232 (hexify): New function.
15233 (input_interrupt): Send signals to ``signal_pid''.
15234 * server.c (inferior_pid): Remove.
15235 (start_inferior): Update create_inferior call.
15236 (attach_inferior): Call add_inferior.
15237 (handle_query): New function.
15238 (main): Call handle_query for `q' packets.
15239 * server.h: Include "target.h". Remove obsolete prototypes.
15240 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15242 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15244 * Makefile.in: Add WARN_CFLAGS. Update configury
15246 * configure.in: Check for <string.h>
15247 * configure: Regenerate.
15248 * config.in: Regenerate.
15249 * gdbreplay.c: Include needed system headers.
15250 (remote_open): Remove strchr prototype.
15251 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15252 * regcache.c (supply_register): Change buf argument to const void *.
15253 (supply_register_by_name): Likewise.
15254 (collect_register): Change buf argument to void *.
15255 (collect_register_by_name): Likewise.
15256 * regcache.h: Add missing prototypes.
15257 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15258 * server.c (handle_query): New function.
15259 (attached): New static variable, moved out of main.
15260 (main): Quiet longjmp clobber warnings.
15261 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15262 * utils.c (error): Remove NORETURN.