1 2017-08-09 Yao Qi <yao.qi@linaro.org>
3 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
5 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6 i386/x32-avx-avx512.xml.
8 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
10 * tracepoint.h (enum class fast_tpoint_collect_result): New
12 (fast_tracepoint_collecting): Change return type to
13 fast_tpoint_collect_result.
14 * tracepoint.c (fast_tracepoint_collecting): Likewise.
15 * linux-low.h: Include tracepoint.h.
16 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
17 fast_tpoint_collect_result.
18 * linux-low.c (handle_tracepoints): Adjust.
19 (linux_fast_tracepoint_collecting): Change return type to
20 fast_tpoint_collect_result.
21 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
22 linux_wait_1, stuck_in_jump_pad_callback,
23 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
24 proceed_one_lwp): Adjust to type change.
26 2017-07-10 Yao Qi <yao.qi@linaro.org>
28 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
30 2017-06-29 Yao Qi <yao.qi@linaro.org>
32 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
34 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
36 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
38 * Makefile.in (IPA_OBJS): Sort and format one item per line.
40 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
42 * linux-low.c (linux_create_inferior): Adjust code to access the
43 environment information via 'gdb_environ' class.
44 * lynx-low.c (lynx_create_inferior): Likewise.
45 * server.c (our_environ): Make it an instance of 'gdb_environ'.
46 (get_environ): Return a pointer to 'our_environ'.
47 (captured_main): Initialize 'our_environ'.
48 * server.h (get_environ): Adjust prototype.
49 * spu-low.c (spu_create_inferior): Adjust code to access the
50 environment information via 'gdb_environ' class.
52 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
54 * linux-low.c (linux_read_memory, linux_write_memory): Remove
55 usage of "register" keyword.
57 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
59 * configure: Re-generate.
61 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
63 * configure: Re-generate.
65 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
67 * Makefile.in (COMPILE.pre): Add "-x c++".
69 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
71 * fork-child.c: Conditionally include <signal.h>.
73 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
75 * server.c (handle_general_set): Handle new packet
77 (handle_query): Add "QStartupWithShell" to the list of supported
79 (gdbserver_usage): Add help text explaining the
80 new "--startup-with-shell" and "--no-startup-with-shell" CLI
82 (captured_main): Recognize and act upon the presence of the new
85 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
86 Pedro Alves <palves@redhat.com>
88 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
89 * configure: Regenerate.
90 * configure.srv (srv_linux_obj): Add "fork-child.o" and
92 (i[34567]86-*-lynxos*): Likewise.
94 * fork-child.c: New file.
95 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
97 (linux_ptrace_fun): New function.
98 (linux_create_inferior): Adjust function prototype to reflect
99 change on "target.h". Adjust function code to use
101 (linux_request_interrupt): Delete "signal_pid".
102 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
103 (lynx_ptrace_fun): New function.
104 (lynx_create_inferior): Adjust function prototype to reflect
105 change on "target.h". Adjust function code to use
107 * nto-low.c (nto_create_inferior): Adjust function prototype and
108 code to reflect change on "target.h". Update comments.
109 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
110 "common-terminal.h" and "environ.h".
111 (terminal_fd): Moved to fork-child.c.
112 (old_foreground_pgrp): Likewise.
113 (restore_old_foreground_pgrp): Likewise.
114 (last_status): Make it global.
115 (last_ptid): Likewise.
116 (our_environ): New variable.
117 (startup_with_shell): Likewise.
118 (program_name): Likewise.
119 (program_argv): Rename to...
120 (program_args): ...this.
121 (wrapper_argv): New variable.
122 (start_inferior): Delete function.
123 (get_exec_wrapper): New function.
124 (get_exec_file): Likewise.
125 (get_environ): Likewise.
126 (prefork_hook): Likewise.
127 (post_fork_inferior): Likewise.
128 (postfork_hook): Likewise.
129 (postfork_child_hook): Likewise.
130 (handle_v_run): Update code to deal with arguments coming from the
131 remote host. Update calls from "start_inferior" to
133 (captured_main): Likewise. Initialize environment variable. Call
135 * server.h (post_fork_inferior): New prototype.
136 (get_environ): Likewise.
137 (last_status): Declare.
138 (last_ptid): Likewise.
139 (signal_pid): Likewise.
140 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
141 (spu_ptrace_fun): New function.
142 (spu_create_inferior): Adjust function prototype to reflect change
143 on "target.h". Adjust function code to use "fork_inferior".
144 * target.c (target_terminal_init): New function.
145 (target_terminal_inferior): Likewise.
146 (target_terminal_ours): Likewise.
147 * target.h: Include <vector>.
148 (struct target_ops) <create_inferior>: Update prototype.
149 (create_inferior): Update macro.
150 * utils.c (gdb_flush_out_err): New function.
151 * win32-low.c (win32_create_inferior): Adjust function prototype
152 and code to reflect change on "target.h".
154 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
156 * inferiors.c (switch_to_thread): New function.
158 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
160 * Makefile.in (SFILE): Add "common/job-control.c".
161 (OBS): Add "job-control.o".
163 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
165 * Makefile: Remove "@host_makefile_frag@".
167 2017-05-05 Pedro Alves <palves@redhat.com>
169 * configure: Regenerate.
171 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
173 * configure: Regenerate.
175 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
177 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
178 software_single_step change of return type to
179 std::vector<CORE_ADDR>.
180 * linux-low.c (install_software_single_step_breakpoints):
182 * linux-low.h (install_software_single_step_breakpoints):
185 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
187 * remote-utils.c: Include "gdb_termios.h" instead of
189 * terminal.h: Delete file.
191 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
193 * server.c: Include <vector>.
194 <program_argv, wrapper_argv>: Convert to std::vector.
195 (start_inferior): Rewrite function to use C++.
196 (handle_v_run): Likewise. Update code that calculates the argv
197 based on the vRun packet; use C++.
198 (captured_main): Likewise.
200 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
202 * server.c (handle_v_cont): Initialize thread_resume::thread
205 2017-04-05 Pedro Alves <palves@redhat.com>
207 * configure: Regenerate.
209 2017-04-05 Pedro Alves <palves@redhat.com>
211 * gdbreplay.c (sync_error): Constify.
212 * linux-x86-low.c (push_opcode): Constify.
214 2017-04-05 Pedro Alves <palves@redhat.com>
216 * win32-low.c (get_child_debug_event)
217 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
218 Report TARGET_WAITKIND_SPURIOUS instead.
220 2017-04-05 Pedro Alves <palves@redhat.com>
222 * remote-utils.c (remote_prepare, remote_open): Constify.
223 * remote-utils.h (remote_prepare, remote_open): Constify.
224 * server.c (captured_main): Constify 'port' handling.
226 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
228 * Makefile.in (clean): Clear .deps.
230 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
232 * .gitignore: Remove generated files, replace with wildcard.
233 * (clean): Replace removal of generated files with wildcard.
234 (version.c): Replace with...
235 (version-generated.c): ...this.
236 (xml-builtin.c): Replace with...
237 (xml-builtin-generated.c): ...this.
238 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
239 (%.c: *regformats*): Replace with...
240 (%-generated.c: *regformats*): ...this.
242 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
244 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
245 (xtensa_fill_gregset): Call collect_register_by_name for
247 (xtensa_store_gregset): Call supply_register_by_name for
250 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
252 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
253 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
254 (xtensa_store_gregset): Call supply_register for all registers in
255 a0_regnum..a0_regnum + C0_NREGS range.
257 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
259 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
260 (ax-ipa.o: ax.c): Remove.
261 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
262 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
263 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
264 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
265 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
267 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
269 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
270 (print-utils-ipa.o: ../common/print-utils.c): Remove.
271 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
272 (errors-ipa.o: ../common/errors.c): Remove.
273 (format-ipa.o: ../common/format.c): Remove.
274 (common-utils-ipa.o: ../common/common-utils.c): Remove.
276 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
278 * Makefile.in (%-ipa.o: %.c): New rule.
279 (tracepoint-ipa.o: tracepoint.c): Remove.
280 (utils-ipa.o: utils.c): Remove.
281 (remote-utils-ipa.o: remote-utils.c): Remove.
282 (regcache-ipa.o: regcache.c): Remove.
283 (i386-linux-ipa.o: i386-linux.c): Remove.
284 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
285 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
286 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
287 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
288 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
289 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
290 (amd64-linux-ipa.o: amd64-linux.c): Remove.
291 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
292 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
293 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
294 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
295 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
296 (aarch64-ipa.o: aarch64.c): Remove.
297 (s390-linux32-ipa.o: s390-linux32.c): Remove.
298 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
299 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
300 (s390-linux64-ipa.o: s390-linux64.c): Remove.
301 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
302 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
303 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
304 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
305 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
306 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
307 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
308 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
309 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
310 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
311 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
312 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
313 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
314 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
315 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
316 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
317 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
318 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
319 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
320 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
321 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
322 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
323 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
324 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
325 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
326 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
327 (tdesc-ipa.o: tdesc.c): Remove.
328 (x32-linux-ipa.o: x32-linux.c): Remove.
329 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
330 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
332 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
334 * Makefile.in (%.o: ../arch/%.c): New rule.
335 (arm.o: ../arch/arm.c): Remove.
336 (arm-linux.o: ../arch/arm-linux.c): Remove.
337 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
338 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
340 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
342 * Makefile.in (%.o: ../nat/%.c): New rule.
343 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
344 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
345 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
346 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
347 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
348 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
349 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
350 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
351 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
352 (linux-personality.o: ../nat/linux-personality.c): Remove.
353 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
354 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
355 (x86-linux.o: ../nat/x86-linux.c): Remove.
356 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
357 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
359 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
361 * Makefile.in (%.o: ../common/%.c): New rule.
362 (signals.o: ../common/signals.c): Remove.
363 (print-utils.o: ../common/print-utils.c): Remove.
364 (rsp-low.o: ../common/rsp-low.c): Remove.
365 (common-utils.o: ../common/common-utils.c): Remove.
366 (posix-strerror.o: ../common/posix-strerror.c): Remove.
367 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
368 (vec.o: ../common/vec.c): Remove.
369 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
370 (xml-utils.o: ../common/xml-utils.c): Remove.
371 (ptid.o: ../common/ptid.c): Remove.
372 (buffer.o: ../common/buffer.c): Remove.
373 (format.o: ../common/format.c): Remove.
374 (filestuff.o: ../common/filestuff.c): Remove.
375 (agent.o: ../common/agent.c): Remove.
376 (errors.o: ../common/errors.c): Remove.
377 (environ.o: ../common/environ.c): Remove.
378 (common-debug.o: ../common/common-debug.c): Remove.
379 (cleanups.o: ../common/cleanups.c): Remove.
380 (common-exceptions.o: ../common/common-exceptions.c): Remove.
381 (fileio.o: ../common/fileio.c): Remove.
382 (common-regcache.o: ../common/common-regcache.c): Remove.
383 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
384 (new-op.o: ../common/new-op.c): Remove.
385 (btrace-common.o: ../common/btrace-common.c): Remove.
387 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
389 * Makefile.in (%.o: ../target/%.c): New rule.
390 (waitstatus.o: ../target/waitstatus.c): Remove.
392 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
395 (%.c: ../regformats/%.dat,
396 (%.c: ../regformats/arm/%.dat,
397 (%.c: ../regformats/i386/%.dat,
398 (%.c: ../regformats/rs6000/%.dat): New rules.
401 (arm-with-iwmmxt.c): Remove.
402 (arm-with-vfpv2.c): Remove.
403 (arm-with-vfpv3.c): Remove.
404 (arm-with-neon.c): Remove.
405 (reg-bfin.c): Remove.
406 (reg-cris.c): Remove.
407 (reg-crisv32.c): Remove.
409 (i386-linux.c): Remove.
410 (i386-avx.c): Remove.
411 (i386-avx-linux.c): Remove.
412 (i386-avx-avx512.c): Remove.
413 (i386-avx-avx512-linux.c): Remove.
414 (i386-mpx.c): Remove.
415 (i386-mpx-linux.c): Remove.
416 (i386-avx-mpx-avx512-pku.c): Remove.
417 (i386-avx-mpx-avx512-pku-linux.c): Remove.
418 (i386-avx-mpx.c): Remove.
419 (i386-avx-mpx-linux.c): Remove.
420 (i386-mmx.c): Remove.
421 (i386-mmx-linux.c): Remove.
422 (reg-ia64.c): Remove.
423 (reg-m32r.c): Remove.
424 (reg-m68k.c): Remove.
426 (mips-linux.c): Remove.
427 (mips-dsp-linux.c): Remove.
428 (mips64-linux.c): Remove.
429 (mips64-dsp-linux.c): Remove.
430 (nios2-linux.c): Remove.
431 (powerpc-32.c): Remove.
432 (powerpc-32l.c): Remove.
433 (powerpc-altivec32l.c): Remove.
434 (powerpc-cell32l.c): Remove.
435 (powerpc-vsx32l.c): Remove.
436 (powerpc-isa205-32l.c): Remove.
437 (powerpc-isa205-altivec32l.c): Remove.
438 (powerpc-isa205-vsx32l.c): Remove.
439 (powerpc-e500l.c): Remove.
440 (powerpc-64l.c): Remove.
441 (powerpc-altivec64l.c): Remove.
442 (powerpc-cell64l.c): Remove.
443 (powerpc-vsx64l.c): Remove.
444 (powerpc-isa205-64l.c): Remove.
445 (powerpc-isa205-altivec64l.c): Remove.
446 (powerpc-isa205-vsx64l.c): Remove.
447 (s390-linux32.c): Remove.
448 (s390-linux32v1.c): Remove.
449 (s390-linux32v2.c): Remove.
450 (s390-linux64.c): Remove.
451 (s390-linux64v1.c): Remove.
452 (s390-linux64v2.c): Remove.
453 (s390-te-linux64.c): Remove.
454 (s390-vx-linux64.c): Remove.
455 (s390-tevx-linux64.c): Remove.
456 (s390x-linux64.c): Remove.
457 (s390x-linux64v1.c): Remove.
458 (s390x-linux64v2.c): Remove.
459 (s390x-te-linux64.c): Remove.
460 (s390x-vx-linux64.c): Remove.
461 (s390x-tevx-linux64.c): Remove.
462 (tic6x-c64xp-linux.c): Remove.
463 (tic6x-c64x-linux.c): Remove.
464 (tic6x-c62x-linux.c): Remove.
466 (reg-sparc64.c): Remove.
469 (amd64-linux.c): Remove.
470 (amd64-avx.c): Remove.
471 (amd64-avx-linux.c): Remove.
472 (amd64-avx-avx512.c): Remove.
473 (amd64-avx-avx512-linux.c): Remove.
474 (amd64-mpx.c): Remove.
475 (amd64-mpx-linux.c): Remove.
476 (amd64-avx-mpx-avx512-pku.c): Remove.
477 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
478 (amd64-avx-mpx.c): Remove.
479 (amd64-avx-mpx-linux.c): Remove.
481 (x32-linux.c): Remove.
483 (x32-avx-linux.c): Remove.
484 (x32-avx-avx512.c): Remove.
485 (x32-avx-avx512-linux.c): Remove.
486 (reg-xtensa.c): Remove.
487 (reg-tilegx.c): Remove.
488 (reg-tilegx32.c): Remove.
490 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
492 * Makefile.in (SFILES): Add "common/environ.c".
493 (OBJS): Add "common/environ.h".
495 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
497 * configure.ac: Check if the fs_base and gs_base members of
498 `struct user_regs_struct' exist.
499 * config.in: Regenerated.
500 * configure: Likewise.
502 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
504 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
506 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
507 (get_next_pcs_syscall_next_pc): Likewise.
509 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
511 * win32-i386-low.c: Fix incorrect reference to a couple source files.
512 * nto-x86-low.c: Likewise.
514 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
516 * Makefile.in: Include disable-implicit-rules.mk.
518 2016-11-23 Pedro Alves <palves@redhat.com>
520 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
521 (debug_vprintf): Use std::chrono::steady_clock instead of
522 gettimeofday. Use '.' instead of ':'.
523 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
524 (get_timestamp): Use std::chrono::steady_clock instead of
527 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
529 * Makefile.in: Fix whitespace formatting.
531 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
533 * Makefile.in (SFILES, OBS): Flatten list and order
536 2016-11-23 Pedro Alves <palves@redhat.com>
538 * event-loop.c (handle_file_event): Use warning.
539 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
540 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
543 2016-11-23 Pedro Alves <palves@redhat.com>
545 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
547 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
548 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
549 debug_printf and debug_flush for debug output.
550 * server.c (handle_general_set): Likewise.
551 * thread-db.c (try_thread_db_load): Use debug_printf for debug
554 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
556 * Makefile.in (.c.o): Replace rule with ...
557 (%.o: %.c): ... this one.
559 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
561 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
562 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
564 * configure.ac: Remove checks for the make program.
565 * configure: Re-generate.
567 2016-10-28 Pedro Alves <palves@redhat.com>
569 * Makefile.in (CXX_DIALECT): Get from configure.
570 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
571 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
572 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
573 * config.in: Regenerate.
574 * configure: Regenerate.
576 2016-10-27 Yao Qi <yao.qi@linaro.org>
578 * linux-low.c (linux_supports_range_stepping): Return true if
579 can_software_single_step return true.
581 2016-10-27 Yao Qi <yao.qi@linaro.org>
583 * inferiors.c (find_inferior_in_random): New function.
584 * inferiors.h (find_inferior_in_random): Declare.
585 * linux-low.c (linux_wait_for_event_filtered): Call
586 find_inferior_in_random instead of find_inferior.
588 2016-10-27 Yao Qi <yao.qi@linaro.org>
590 * linux-low.c (linux_wait_1): If single-step breakpoints are
591 inserted, remove them.
593 2016-10-26 Pedro Alves <palves@redhat.com>
595 * linux-low.c (handle_extended_wait): Link parent/child fork
597 (linux_wait_1): Unlink them.
598 (linux_set_resume_request): Ignore resume requests for
599 already-resumed and unhandled fork child threads.
600 * linux-low.h (struct lwp_info) <fork_relative>: New field.
601 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
603 (handle_v_requests) <vCont>: Don't call require_running.
604 * server.h (in_queued_stop_replies): New declaration.
606 2016-10-24 Yao Qi <yao.qi@linaro.org>
609 * linux-aarch64-low.c (append_insns): Cast the return value to
612 2016-10-10 Yao Qi <yao.qi@linaro.org>
614 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
616 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
618 * target.c (target_supports_multi_process): New function, moved
620 * target.h (target_supports_multi_process): ... here. Remove
623 2016-10-05 Tom Tromey <tom@tromey.com>
626 * tracepoint.c (handle_tracepoint_bkpts): Check
627 ipa_error_tracepoint, not ipa_stopping_tracepoint.
629 2016-10-05 Yao Qi <yao.qi@linaro.org>
631 * configure.srv: Update the path of arm-*.xml files.
633 2016-10-05 Terry Guo <terry.guo@arm.com>
634 Yao Qi <yao.qi@linaro.org>
636 * Makefile.in: Adjust the path of rules.
637 * configure.srv: Update the path of xml files.
638 * regformats/arm-with-iwmmxt.dat: Regenerated.
639 * regformats/arm-with-neon.dat: Likewise.
640 * regformats/arm-with-vfpv2.dat: Likewise.
641 * regformats/arm-with-vfpv3.dat Likewise.
643 2016-09-30 Yao Qi <yao.qi@linaro.org>
646 * target.c (target_stop_and_wait): Don't call
647 target_continue_no_signal, use resume_stop instead.
649 2016-09-26 Yao Qi <yao.qi@linaro.org>
651 * linux-low.c (linux_wait_1): Call debug_exit.
653 2016-09-23 Pedro Alves <palves@redhat.com>
655 * Makefile.in (SFILES): Add common/new-op.c.
656 (OBS): Add common/new-op.o.
657 (new-op.o): New rule.
659 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
661 * .gitinore: Ignore more files.
663 2016-09-21 Yao Qi <yao.qi@linaro.org>
665 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
668 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
670 * server.c (start_inferior): Call target_mourn_inferior instead of
671 mourn_inferior; pass ptid_t argument to it.
673 (handle_target_event): Likewise.
674 * target.c (target_mourn_inferior): New function.
675 * target.h (mourn_inferior): Delete macro.
677 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
679 * linux-low.c (lwp_is_stepping): New function.
681 2016-09-06 Carl Love <cel@us.ibm.com>
683 * server.c (start_inferior): Fixed comment, requested comment change
684 didn't get updated correctly. Removed reference to ptrace () call as
685 it is only true on Linux systems.
687 2016-09-06 Carl Love <cel@us.ibm.com>
689 * server.c (start_inferior): Do not call
690 function target_post_create_inferior () if the
691 inferior process has already exited.
693 2016-09-05 Pedro Alves <palves@redhat.com>
695 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
696 (COMPILE.pre, CC_LD): Use CXX directly.
697 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
698 * acinclude.m4: Don't include build-with-cxx.m4.
699 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
700 * configure: Regenerate.
702 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
705 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
706 call writing data to own_buf.
708 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
710 * target.c (mywait): Call target_wait instead of
712 (target_wait): New function.
714 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
716 * server.c (start_inferior): New variable 'ptid'. Replace calls
717 to the_target->resume by target_continue{,_no_signal}, depending
719 * target.c (target_stop_and_wait): Call target_continue_no_signal
720 instead of the_target->resume.
721 (target_continue): New function.
723 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
725 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
727 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
730 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
732 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
733 * linux-arm-low.c (ps_get_thread_area): Likewise.
734 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
735 * linux-m68k-low.c (ps_get_thread_area): Likewise.
736 * linux-mips-low.c (ps_get_thread_area): Likewise.
737 * linux-nios2-low.c (ps_get_thread_area): Likewise.
738 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
739 * linux-x86-low.c (ps_get_thread_area): Likewise.
740 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
742 2016-08-19 Pedro Alves <palves@redhat.com>
744 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
746 2016-08-19 Pedro Alves <palves@redhat.com>
748 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
749 comment. Use memcpy instead of casting through unsigned long.
751 2016-08-19 Pedro Alves <palves@redhat.com>
753 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
754 allocating around 0x80000000.
756 2016-08-19 Pedro Alves <palves@redhat.com>
759 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
760 (x32-avx512-linux-ipa.o): New rules.
761 * configure.ac (x86_64-*-linux*): New x32 check.
762 * configure.srv (ipa_x32_linux_regobj): New.
763 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
764 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
766 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
768 * configure: Regenerate.
770 2016-08-09 Pedro Alves <palves@redhat.com>
773 * Makefile.in (OBS): Add signals-state-save-restore.o.
774 (signals-state-save-restore.o): New rule.
775 * config.in: Regenerate.
776 * configure: Regenerate.
777 * linux-low.c: Include "signals-state-save-restore.h".
778 (linux_create_inferior): Call
779 restore_original_signals_state.
780 * server.c: Include "dispositions-save-restore.h".
781 (captured_main): Call save_original_signals_state.
783 2016-08-05 Pedro Alves <palves@redhat.com>
785 * configure: Regenerate.
787 2016-08-04 Yao Qi <yao.qi@linaro.org>
789 * linux-low.c (regsets_fetch_inferior_registers): Check
790 errno is ESRCH or not.
792 2016-08-02 Yao Qi <yao.qi@linaro.org>
794 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
795 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
796 (thread_db_load_search): Update.
797 (try_thread_db_load_1): Don't look for td_ta_event_addr,
798 td_ta_set_event and td_ta_event_getmsg.
800 2016-07-26 Pedro Alves <palves@redhat.com>
803 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
804 of unsigned long for 64-bit registers and use uint32_t instead of
805 unsigned int for 32-bit registers.
807 2016-07-26 Pedro Alves <palves@redhat.com>
809 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
812 2016-07-21 Tom Tromey <tom@tromey.com>
814 * configure: Rebuild.
816 2016-07-21 Yao Qi <yao.qi@linaro.org>
818 * mem-break.c (find_gdb_breakpoint): Cast bp to
819 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
821 2016-07-21 Yao Qi <yao.qi@linaro.org>
823 * server.c (handle_v_requests): Support s and S actions
824 if target_supports_software_single_step return true.
826 2016-07-21 Yao Qi <yao.qi@linaro.org>
828 * linux-low.c (resume_stopped_resumed_lwps): If resume request
829 is resume_step, call maybe_hw_step.
830 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
832 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
834 (proceed_one_lwp): If resume request is resume_step, install
835 reinsert breakpoints and call maybe_hw_step.
837 2016-07-21 Yao Qi <yao.qi@linaro.org>
839 * linux-low.c (proceed_one_lwp): Declare.
840 (linux_resume_one_thread): Remove local variable 'step'.
841 Lift code enqueue signal. Call proceed_one_lwp instead of
842 linux_resume_one_lwp.
844 2016-07-21 Yao Qi <yao.qi@linaro.org>
846 * linux-low.c (linux_resume_one_thread): Call
847 enqueue_pending_signal.
849 2016-07-21 Yao Qi <yao.qi@linaro.org>
851 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
852 * inferiors.c (do_restore_current_thread_cleanup): New function.
853 (make_cleanup_restore_current_thread): Likewise.
854 * linux-low.c (install_software_single_step_breakpoints): Call
855 make_cleanup_restore_current_thread. Switch current_thread to
858 2016-07-21 Yao Qi <yao.qi@linaro.org>
860 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
861 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
862 (clone_one_breakpoint): Likewise.
863 (delete_reinsert_breakpoints): Change parameter to thread.
865 (has_reinsert_breakpoints): Likewise.
866 (uninsert_reinsert_breakpoints): Likewise.
867 (reinsert_reinsert_breakpoints): Likewise.
868 * mem-break.h (set_reinsert_breakpoint): Update declaration.
869 (delete_reinsert_breakpoints): Likewise.
870 (reinsert_reinsert_breakpoints): Likewise.
871 (uninsert_reinsert_breakpoints): Likewise.
872 (has_reinsert_breakpoints): Likewise.
874 2016-07-21 Yao Qi <yao.qi@linaro.org>
876 * inferiors.c (get_thread_process): Make parameter const.
877 * inferiors.h (get_thread_process): Update declaration.
878 * mem-break.c (clone_all_breakpoints): Remove all parameters.
879 Add new parameters child_thread and parent_thread. Callers
881 * mem-break.h (clone_all_breakpoints): Update declaration.
883 2016-07-21 Yao Qi <yao.qi@linaro.org>
885 * mem-break.c (struct breakpoint) <cond_list>: Remove.
886 <command_list, handler>: Remove.
887 (struct gdb_breakpoint): New.
888 (struct other_breakpoint): New.
889 (struct reinsert_breakpoint): New.
890 (is_gdb_breakpoint): New function.
891 (any_persistent_commands): Update command_list if
892 is_gdb_breakpoint returns true.
893 (set_breakpoint): Create breakpoints according to their types.
894 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
895 (set_gdb_breakpoint_1): Likewise.
896 (set_gdb_breakpoint): Likewise.
897 (clear_breakpoint_conditions): Change parameter type to
898 'struct gdb_breakpoint *'.
899 (clear_breakpoint_commands): Likewise.
900 (clear_breakpoint_conditions_and_commands): Likewise.
901 (add_condition_to_breakpoint): Likewise.
902 (add_breakpoint_condition): Likewise.
903 (add_commands_to_breakpoint): Likewise.
904 (check_breakpoints): Check other_breakpoint.
905 (clone_one_breakpoint): Clone breakpopint according to its type.
906 * mem-break.h (struct gdb_breakpoint): Declare.
907 (set_gdb_breakpoint): Update declaration.
908 (clear_breakpoint_conditions_and_commands): Likewise.
909 (add_breakpoint_condition): Likewise.
910 (add_breakpoint_commands): Likewise.
911 * server.c (process_point_options): Change parameter type to
912 'struct gdb_breakpoint *'.
914 2016-07-21 Yao Qi <yao.qi@linaro.org>
916 * mem-break.c (set_breakpoint_at): Rename it to ...
917 (set_breakpoint_type_at): ... it.
918 (set_breakpoint_at): Call set_breakpoint_type_at.
919 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
920 * mem-break.h (set_breakpoint_at): Update comments.
922 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
924 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
926 (nios2_store_gregset): Likewise.
928 2016-07-01 Pedro Alves <palves@redhat.com>
929 Antoine Tremblay <antoine.tremblay@ericsson.com>
931 * linux-low.c: Change interface to take the target lwp_info
932 pointer directly and return void. Handle detaching from a zombie
934 (linux_detach_lwp_callback): New function.
935 (linux_detach): Detach from the leader thread after detaching from
938 2016-06-28 Yao Qi <yao.qi@linaro.org>
940 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
941 for variable new_offset.
942 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
943 (aarch64_ftrace_insn_reloc_cb): Likewise.
944 (aarch64_ftrace_insn_reloc_tb): Likewise.
945 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
946 PRIx64 instead of PRIx32.
948 2016-06-28 Yao Qi <yao.qi@linaro.org>
950 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
951 (the_low_target): Install arm_get_syscall_trapinfo.
953 2016-06-28 Yao Qi <yao.qi@linaro.org>
955 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
957 (the_low_target): Install aarch64_get_syscall_trapinfo.
959 2016-06-28 Yao Qi <yao.qi@linaro.org>
961 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
963 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
964 Remove parameter sysno.
965 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
968 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
970 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
971 (s390_emit_ne_goto): Likewise.
972 (s390_emit_lt_goto): Likewise.
973 (s390_emit_le_goto): Likewise.
974 (s390_emit_gt_goto): Likewise.
975 (s390_emit_ge_goto): Likewise.
976 (s390x_emit_eq_goto): Likewise.
977 (s390x_emit_ne_goto): Likewise.
978 (s390x_emit_lt_goto): Likewise.
979 (s390x_emit_le_goto): Likewise.
980 (s390x_emit_gt_goto): Likewise.
981 (s390x_emit_ge_goto): Likewise.
982 (s390_emit_ops_impl): Mark variable static.
983 (s390x_emit_ops): Likewise.
985 2016-06-17 Yao Qi <yao.qi@linaro.org>
987 * linux-low.c (handle_extended_wait): Call
988 uninsert_reinsert_breakpoints for the parent process. Remove
989 reinsert breakpoints from the child process. Reinsert them to
990 the parent process when vfork is done.
991 * mem-break.c (uninsert_reinsert_breakpoints): New function.
992 (reinsert_reinsert_breakpoints): New function.
993 * mem-break.h (uninsert_reinsert_breakpoints): Declare
994 (reinsert_reinsert_breakpoints): Declare.
996 2016-06-17 Yao Qi <yao.qi@linaro.org>
998 * linux-low.c (handle_extended_wait): If the parent is doing
999 step-over, remove the reinsert breakpoints from the forked child.
1001 2016-06-17 Yao Qi <yao.qi@linaro.org>
1003 * linux-low.c (unsuspend_all_lwps): Declare.
1004 (linux_low_filter_event): If thread exited, call finish_step_over.
1005 If step-over is finished, unsuspend other threads.
1007 2016-06-17 Yao Qi <yao.qi@linaro.org>
1009 * linux-low.c (linux_resume_one_lwp_throw): Assert
1010 has_reinsert_breakpoints returns false.
1011 * mem-break.c (delete_disabled_breakpoints): Assert
1012 bp type isn't reinsert_breakpoint.
1014 2016-06-17 Yao Qi <yao.qi@linaro.org>
1016 * linux-low.c (maybe_hw_step): New function.
1017 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1018 (finish_step_over): Switch current_thread to lwp temporarily,
1019 and assert has_reinsert_breakpoints returns true.
1020 (proceed_one_lwp): Call maybe_hw_step.
1021 * mem-break.c (has_reinsert_breakpoints): New function.
1022 * mem-break.h (has_reinsert_breakpoints): Declare.
1024 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1026 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1028 2016-05-17 Yao Qi <yao.qi@linaro.org>
1030 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1031 instead of find_inferior.
1033 2016-05-05 Yao Qi <yao.qi@linaro.org>
1035 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1036 Initialize res to zero.
1038 2016-05-05 Yao Qi <yao.qi@linaro.org>
1040 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1043 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1045 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1046 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1047 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1049 2016-04-28 Par Olsson <par.olsson@windriver.com>
1050 Simon Marchi <simon.marchi@ericsson.com>
1052 * tracepoint.c (write_inferior_int8): New function.
1053 (cmd_qtenable_disable): Write enable flag using
1054 write_inferior_int8.
1056 2016-04-25 Yao Qi <yao.qi@linaro.org>
1058 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1059 (need_step_over_p): Return zero if the LWP has pending signals
1060 can be delivered on software single step target.
1062 2016-04-25 Yao Qi <yao.qi@linaro.org>
1064 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1065 return instead of error.
1067 2016-04-22 Yao Qi <yao.qi@linaro.org>
1069 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1072 2016-04-22 Yao Qi <yao.qi@linaro.org>
1074 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1075 signal when stepping over breakpoint with software single
1078 2016-04-21 Pedro Alves <palves@redhat.com>
1080 * linux-s390-low.c (s390_collect_ptrace_register)
1081 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1083 (s390_check_regset): Use void * instead of gdb_byte *.
1085 2016-04-20 Pedro Alves <palves@redhat.com>
1087 * configure: Renegerate.
1089 2016-04-20 Yao Qi <yao.qi@linaro.org>
1091 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1092 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1094 (arm_store_gregset): Likewise.
1096 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1098 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1099 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1100 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1101 (amd64-avx-mpx-linux.c): New rules.
1102 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1103 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1104 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1105 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1106 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1107 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1108 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1109 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1110 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1111 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1112 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1113 * linux-x86-low.c (x86_linux_read_description): Add case for
1114 X86_XSTATE_AVX_MPX_MASK.
1115 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1116 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1117 init_registers_i386_avx_mpx_linux.
1118 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1119 (initialize_low_tracepoint): Call
1120 init_registers_i386_avx_mpx_linux.
1121 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1122 (initialize_low_tracepoint): Call
1123 init_registers_amd64_avx_mpx_linux.
1124 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1125 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1126 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1129 2016-04-18 Pedro Alves <palves@redhat.com>
1131 * configure: Regenerate.
1133 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1135 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1136 (aarch64_emit_sub): Likewise.
1138 2016-04-12 Pedro Alves <palves@redhat.com>
1140 * utils.c (prepare_to_throw_exception): Delete.
1142 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1144 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1146 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1148 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1150 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1152 * linux-aarch64-ipa.c: Add <elf.h> include.
1153 * linux-ppc-ipa.c: Add <elf.h> include.
1154 * linux-s390-ipa.c: Add <elf.h> include.
1156 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1158 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1159 (get_raw_reg_ptr): Likewise.
1160 (get_trace_state_variable_value_ptr): Likewise.
1161 (set_trace_state_variable_value_ptr): Likewise.
1162 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1165 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1166 Marcin Kościelnicki <koriakin@0x04.net>
1169 * linux-ppc-low.c (emit_insns): New function.
1170 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1171 (ppc_emit_prologue): New function.
1172 (ppc_emit_epilogue): New function.
1173 (ppc_emit_add): New function.
1174 (ppc_emit_sub): New function.
1175 (ppc_emit_mul): New function.
1176 (ppc_emit_lsh): New function.
1177 (ppc_emit_rsh_signed): New function.
1178 (ppc_emit_rsh_unsigned): New function.
1179 (ppc_emit_ext): New function.
1180 (ppc_emit_zero_ext): New function.
1181 (ppc_emit_log_not): New function.
1182 (ppc_emit_bit_and): New function.
1183 (ppc_emit_bit_or): New function.
1184 (ppc_emit_bit_xor): New function.
1185 (ppc_emit_bit_not): New function.
1186 (ppc_emit_equal): New function.
1187 (ppc_emit_less_signed): New function.
1188 (ppc_emit_less_unsigned): New function.
1189 (ppc_emit_ref): New function.
1190 (ppc_emit_const): New function.
1191 (ppc_emit_reg): New function.
1192 (ppc_emit_pop): New function.
1193 (ppc_emit_stack_flush): New function.
1194 (ppc_emit_swap): New function.
1195 (ppc_emit_stack_adjust): New function.
1196 (ppc_emit_call): New function.
1197 (ppc_emit_int_call_1): New function.
1198 (ppc_emit_void_call_2): New function.
1199 (ppc_emit_if_goto): New function.
1200 (ppc_emit_goto): New function.
1201 (ppc_emit_eq_goto): New function.
1202 (ppc_emit_ne_goto): New function.
1203 (ppc_emit_lt_goto): New function.
1204 (ppc_emit_le_goto): New function.
1205 (ppc_emit_gt_goto): New function.
1206 (ppc_emit_ge_goto): New function.
1207 (ppc_write_goto_address): New function.
1208 (ppc_emit_ops_impl): New static variable.
1209 (ppc64v1_emit_prologue): New function.
1210 (ppc64v2_emit_prologue): New function.
1211 (ppc64_emit_epilogue): New function.
1212 (ppc64_emit_add): New function.
1213 (ppc64_emit_sub): New function.
1214 (ppc64_emit_mul): New function.
1215 (ppc64_emit_lsh): New function.
1216 (ppc64_emit_rsh_signed): New function.
1217 (ppc64_emit_rsh_unsigned): New function.
1218 (ppc64_emit_ext): New function.
1219 (ppc64_emit_zero_ext): New function.
1220 (ppc64_emit_log_not): New function.
1221 (ppc64_emit_bit_and): New function.
1222 (ppc64_emit_bit_or): New function.
1223 (ppc64_emit_bit_xor): New function.
1224 (ppc64_emit_bit_not): New function.
1225 (ppc64_emit_equal): New function.
1226 (ppc64_emit_less_signed): New function.
1227 (ppc64_emit_less_unsigned): New function.
1228 (ppc64_emit_ref): New function.
1229 (ppc64_emit_const): New function.
1230 (ppc64v1_emit_reg): New function.
1231 (ppc64v2_emit_reg): New function.
1232 (ppc64_emit_pop): New function.
1233 (ppc64_emit_stack_flush): New function.
1234 (ppc64_emit_swap): New function.
1235 (ppc64v1_emit_call): New function.
1236 (ppc64v2_emit_call): New function.
1237 (ppc64v1_emit_int_call_1): New function.
1238 (ppc64v2_emit_int_call_1): New function.
1239 (ppc64v1_emit_void_call_2): New function.
1240 (ppc64v2_emit_void_call_2): New function.
1241 (ppc64_emit_if_goto): New function.
1242 (ppc64_emit_eq_goto): New function.
1243 (ppc64_emit_ne_goto): New function.
1244 (ppc64_emit_lt_goto): New function.
1245 (ppc64_emit_le_goto): New function.
1246 (ppc64_emit_gt_goto): New function.
1247 (ppc64_emit_ge_goto): New function.
1248 (ppc64v1_emit_ops_impl): New static variable.
1249 (ppc64v2_emit_ops_impl): New static variable.
1250 (ppc_emit_ops): New function.
1251 (linux_low_target): Wire in ppc_emit_ops.
1253 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1254 Marcin Kościelnicki <koriakin@0x04.net>
1257 * Makefile.in: Add powerpc-*-ipa.o
1258 * configure.srv: Add ipa_obj for powerpc*-linux.
1259 * linux-ppc-ipa.c: New file.
1260 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1262 (PPC_FIELD): New macro.
1263 (PPC_SEXT): New macro.
1264 (PPC_OP6): New macro.
1265 (PPC_BO): New macro.
1266 (PPC_LI): New macro.
1267 (PPC_BD): New macro.
1268 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1269 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1270 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1271 (ppc_get_thread_area): New function.
1272 (is_elfv2_inferior): New function.
1273 (gen_ds_form): New function.
1274 (GEN_STD): New macro.
1275 (GEN_STDU): New macro.
1276 (GEN_LD): New macro.
1277 (GEN_LDU): New macro.
1278 (gen_d_form): New function.
1279 (GEN_ADDI): New macro.
1280 (GEN_ADDIS): New macro.
1281 (GEN_LI): New macro.
1282 (GEN_LIS): New macro.
1283 (GEN_ORI): New macro.
1284 (GEN_ORIS): New macro.
1285 (GEN_LWZ): New macro.
1286 (GEN_STW): New macro.
1287 (GEN_STWU): New macro.
1288 (gen_xfx_form): New function.
1289 (GEN_MFSPR): New macro.
1290 (GEN_MTSPR): New macro.
1291 (GEN_MFCR): New macro.
1292 (GEN_MTCR): New macro.
1293 (GEN_SYNC): New macro.
1294 (GEN_LWSYNC): New macro.
1295 (gen_x_form): New function.
1296 (GEN_OR): New macro.
1297 (GEN_MR): New macro.
1298 (GEN_LWARX): New macro.
1299 (GEN_STWCX): New macro.
1300 (GEN_CMPW): New macro.
1301 (gen_md_form): New function.
1302 (GEN_RLDICL): New macro.
1303 (GEN_RLDICR): New macro.
1304 (gen_i_form): New function.
1306 (GEN_BL): New macro.
1307 (gen_b_form): New function.
1308 (GEN_BNE): New macro.
1309 (GEN_LOAD): New macro.
1310 (GEN_STORE): New macro.
1311 (gen_limm): New function.
1312 (gen_atomic_xchg): New function.
1313 (gen_call): New function.
1314 (ppc_relocate_instruction): New function.
1315 (ppc_install_fast_tracepoint_jump_pad): New function.
1316 (ppc_get_min_fast_tracepoint_insn_len): New function.
1317 (ppc_get_ipa_tdesc_idx): New function.
1318 (the_low_target): Wire in the new functions.
1319 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1321 * linux-ppc-tdesc.h: New file.
1323 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1325 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1326 (alloc_jump_pad_buffer): New function.
1327 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1328 (alloc_jump_pad_buffer): New function.
1329 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1330 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1331 (alloc_jump_pad_buffer): New function.
1332 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1333 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1334 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1335 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1337 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1339 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1340 * linux-amd64-ipa.c: Likewise.
1341 * linux-i386-ipa.c: Likewise.
1342 * linux-s390-ipa.c: Likewise.
1343 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1344 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1345 set_trace_state_variable_value_ptr.
1346 (struct ipa_sym_addresses): Likewise.
1347 (symbol_list): Likewise.
1348 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1349 accessing gdb_collect directly.
1350 (gdb_collect_ptr_type): New typedef.
1351 (get_raw_reg_ptr_type): New typedef.
1352 (get_trace_state_variable_value_ptr_type): New typedef.
1353 (set_trace_state_variable_value_ptr_type): New typedef.
1354 (gdb_collect_ptr): New global.
1355 (get_raw_reg_ptr): New global.
1356 (get_trace_state_variable_value_ptr): New global.
1357 (set_trace_state_variable_value_ptr): New global.
1358 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1359 accessing get_raw_reg directly.
1360 (get_get_tsv_func_addr): Likewise for
1361 get_trace_state_variable_value_ptr.
1362 (get_set_tsv_func_addr): Likewise for
1363 set_trace_state_variable_value_ptr.
1364 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1366 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1368 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1370 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1372 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1374 (relocate_instruction): Remove own_buf.
1375 * server.c (own_buf): Make global.
1376 (handle_v_requests): Make global.
1377 * server.h (own_buf): New declaration.
1378 (handle_v_requests): New prototype.
1380 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1383 * linux-s390-low.c (add_insns): New function.
1384 (s390_emit_prologue): New function.
1385 (s390_emit_epilogue): New function.
1386 (s390_emit_add): New function.
1387 (s390_emit_sub): New function.
1388 (s390_emit_mul): New function.
1389 (s390_emit_lsh): New function.
1390 (s390_emit_rsh_signed): New function.
1391 (s390_emit_rsh_unsigned): New function.
1392 (s390_emit_ext): New function.
1393 (s390_emit_log_not): New function.
1394 (s390_emit_bit_and): New function.
1395 (s390_emit_bit_or): New function.
1396 (s390_emit_bit_xor): New function.
1397 (s390_emit_bit_not): New function.
1398 (s390_emit_equal): New function.
1399 (s390_emit_less_signed): New function.
1400 (s390_emit_less_unsigned): New function.
1401 (s390_emit_ref): New function.
1402 (s390_emit_if_goto): New function.
1403 (s390_emit_goto): New function.
1404 (s390_write_goto_address): New function.
1405 (s390_emit_litpool): New function.
1406 (s390_emit_const): New function.
1407 (s390_emit_call): New function.
1408 (s390_emit_reg): New function.
1409 (s390_emit_pop): New function.
1410 (s390_emit_stack_flush): New function.
1411 (s390_emit_zero_ext): New function.
1412 (s390_emit_swap): New function.
1413 (s390_emit_stack_adjust): New function.
1414 (s390_emit_set_r2): New function.
1415 (s390_emit_int_call_1): New function.
1416 (s390_emit_void_call_2): New function.
1417 (s390_emit_eq_goto): New function.
1418 (s390_emit_ne_goto): New function.
1419 (s390_emit_lt_goto): New function.
1420 (s390_emit_le_goto): New function.
1421 (s390_emit_gt_goto): New function.
1422 (s390_emit_ge_goto): New function.
1423 (s390x_emit_prologue): New function.
1424 (s390x_emit_epilogue): New function.
1425 (s390x_emit_add): New function.
1426 (s390x_emit_sub): New function.
1427 (s390x_emit_mul): New function.
1428 (s390x_emit_lsh): New function.
1429 (s390x_emit_rsh_signed): New function.
1430 (s390x_emit_rsh_unsigned): New function.
1431 (s390x_emit_ext): New function.
1432 (s390x_emit_log_not): New function.
1433 (s390x_emit_bit_and): New function.
1434 (s390x_emit_bit_or): New function.
1435 (s390x_emit_bit_xor): New function.
1436 (s390x_emit_bit_not): New function.
1437 (s390x_emit_equal): New function.
1438 (s390x_emit_less_signed): New function.
1439 (s390x_emit_less_unsigned): New function.
1440 (s390x_emit_ref): New function.
1441 (s390x_emit_if_goto): New function.
1442 (s390x_emit_const): New function.
1443 (s390x_emit_call): New function.
1444 (s390x_emit_reg): New function.
1445 (s390x_emit_pop): New function.
1446 (s390x_emit_stack_flush): New function.
1447 (s390x_emit_zero_ext): New function.
1448 (s390x_emit_swap): New function.
1449 (s390x_emit_stack_adjust): New function.
1450 (s390x_emit_int_call_1): New function.
1451 (s390x_emit_void_call_2): New function.
1452 (s390x_emit_eq_goto): New function.
1453 (s390x_emit_ne_goto): New function.
1454 (s390x_emit_lt_goto): New function.
1455 (s390x_emit_le_goto): New function.
1456 (s390x_emit_gt_goto): New function.
1457 (s390x_emit_ge_goto): New function.
1458 (s390_emit_ops): New function.
1459 (struct linux_target_ops): Fill in emit_ops hook.
1461 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1464 * Makefile.in: Add s390 IPA files.
1465 * configure.srv: Build IPA for s390.
1466 * linux-s390-ipa.c: New file.
1467 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1468 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1469 (tdesc_s390_linux32): Likewise.
1470 (init_registers_s390_linux32v1): Likewise.
1471 (tdesc_s390_linux32v1): Likewise.
1472 (init_registers_s390_linux32v2): Likewise.
1473 (tdesc_s390_linux32v2): Likewise.
1474 (init_registers_s390_linux64): Likewise.
1475 (tdesc_s390_linux64): Likewise.
1476 (init_registers_s390_linux64v1): Likewise.
1477 (tdesc_s390_linux64v1): Likewise.
1478 (init_registers_s390_linux64v2): Likewise.
1479 (tdesc_s390_linux64v2): Likewise.
1480 (init_registers_s390_te_linux64): Likewise.
1481 (tdesc_s390_te_linux64): Likewise.
1482 (init_registers_s390_vx_linux64): Likewise.
1483 (tdesc_s390_vx_linux64): Likewise.
1484 (init_registers_s390_tevx_linux64): Likewise.
1485 (tdesc_s390_tevx_linux64): Likewise.
1486 (init_registers_s390x_linux64): Likewise.
1487 (tdesc_s390x_linux64): Likewise.
1488 (init_registers_s390x_linux64v1): Likewise.
1489 (tdesc_s390x_linux64v1): Likewise.
1490 (init_registers_s390x_linux64v2): Likewise.
1491 (tdesc_s390x_linux64v2): Likewise.
1492 (init_registers_s390x_te_linux64): Likewise.
1493 (tdesc_s390x_te_linux64): Likewise.
1494 (init_registers_s390x_vx_linux64): Likewise.
1495 (tdesc_s390x_vx_linux64): Likewise.
1496 (init_registers_s390x_tevx_linux64): Likewise.
1497 (tdesc_s390x_tevx_linux64): Likewise.
1498 (have_hwcap_s390_vx): New static variable.
1499 (s390_arch_setup): Fill have_hwcap_s390_vx.
1500 (s390_get_thread_area): New function.
1501 (s390_ft_entry_gpr_esa): New const.
1502 (s390_ft_entry_gpr_zarch): New const.
1503 (s390_ft_entry_misc): New const.
1504 (s390_ft_entry_fr): New const.
1505 (s390_ft_entry_vr): New const.
1506 (s390_ft_main_31): New const.
1507 (s390_ft_main_64): New const.
1508 (s390_ft_exit_fr): New const.
1509 (s390_ft_exit_vr): New const.
1510 (s390_ft_exit_misc): New const.
1511 (s390_ft_exit_gpr_esa): New const.
1512 (s390_ft_exit_gpr_zarch): New const.
1513 (append_insns): New function.
1514 (s390_relocate_instruction): New function.
1515 (s390_install_fast_tracepoint_jump_pad): New function.
1516 (s390_get_min_fast_tracepoint_insn_len): New function.
1517 (s390_get_ipa_tdesc_idx): New function.
1518 (struct linux_target_ops): Wire in the above functions.
1519 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1520 * linux-s390-tdesc.h: New file.
1522 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1524 * linux-s390-low.c (s390_supports_tracepoints): New function.
1525 (struct linux_target_ops): Fill supports_tracepoints hook.
1527 2016-03-18 Yao Qi <yao.qi@linaro.org>
1529 * linux-low.c (lwp_signal_can_be_delivered): New function.
1530 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1532 2016-03-18 Yao Qi <yao.qi@linaro.org>
1534 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1535 0 if signal is enqueued. Remove 'signal' from one debugging
1536 message. Move one debugging message to some lines below.
1537 Remove code setting 'signal' to 0.
1539 2016-03-18 Yao Qi <yao.qi@linaro.org>
1541 * linux-low.c (linux_low_filter_event): Remove redundant
1542 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1544 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1546 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1547 (struct linux_target_ops): Wire in the above.
1549 2016-03-03 Yao Qi <yao.qi@linaro.org>
1551 * linux-low.c: Update comments to start_step_over.
1553 2016-03-03 Yao Qi <yao.qi@linaro.org>
1556 * linux-low.c (handle_extended_wait): Set child suspended
1557 if event_lwp->bp_reinsert isn't zero.
1559 2016-03-02 Yao Qi <yao.qi@linaro.org>
1561 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1562 enqueue_pending_signal.
1564 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1566 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1569 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1571 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1572 (s390_regmap_3264) [!__s390x__]: New global.
1573 (s390_collect_ptrace_register): Skip map entries containing -1.
1574 (s390_supply_ptrace_register): Ditto.
1575 (s390_fill_gprs_high): New function.
1576 (s390_store_gprs_high): New function.
1577 (s390_regsets): Add NT_S390_HIGH_GPRS.
1578 (s390_get_hwcap): Enable on 31-bit.
1579 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1580 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1581 Detect NT_S390_HIGH_GPRS.
1582 (s390_usrregs_info_3264): Enable on 31-bit.
1583 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1584 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1586 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1589 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1590 * configure.srv: Ditto.
1591 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1592 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1593 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1594 (init_registers_amd64_linux): Remove prototype.
1595 (tdesc_amd64_linux): Remove declaration.
1596 (get_ipa_tdesc): New function.
1597 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1598 initialize remaining tdescs.
1599 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1600 (init_registers_i386_linux): Remove prototype.
1601 (tdesc_i386_linux): Remove declaration.
1602 (get_ipa_tdesc): New function.
1603 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1604 initialize remaining tdescs.
1605 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1606 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1607 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1608 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1609 (x86_get_ipa_tdesc_idx): New function.
1610 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1611 * linux-x86-tdesc.h: New file.
1612 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1613 (target_get_ipa_tdesc_idx): New macro.
1614 * tracepoint.c (ipa_tdesc_idx): New macro.
1615 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1616 (symbol_list): Add ipa_tdesc_idx.
1617 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1618 (ipa_tdesc): Remove.
1619 (ipa_tdesc_idx): New variable.
1620 (get_context_regcache): Use get_ipa_tdesc.
1621 (gdb_collect): Ditto.
1623 * tracepoint.h (get_ipa_tdesc): New prototype.
1624 (ipa_tdesc): Remove.
1626 2016-02-24 Pedro Alves <palves@redhat.com>
1628 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1629 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1630 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1631 Factor out common code between the USE_SIGTRAP_SIGINFO and
1632 !USE_SIGTRAP_SIGINFO blocks.
1633 (linux_low_filter_event): Call save_stop_reason instead of
1634 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1636 (linux_wait_1): Update comments.
1638 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1640 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1641 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1642 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1643 ppc_insert_point, ppc_remove_point.
1645 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1647 * linux-s390-low.c (s390_supports_z_point_type): New function.
1648 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1650 2016-02-16 Yao Qi <yao.qi@linaro.org>
1652 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1653 PC. Get pc from regcache_read_pc.
1655 2016-02-12 Yao Qi <yao.qi@linaro.org>
1657 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1658 or linux_get_pc_32bit.
1659 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1661 2016-02-12 Yao Qi <yao.qi@linaro.org>
1663 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1664 arm_linux_get_next_pcs_fixup.
1666 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1668 * tracepoint.c (x_tracepoint_action_download): Change
1669 write_inferior_data_ptr to write_inferior_data_pointer.
1670 (cmd_qtstart): Likewise.
1671 (write_inferior_data_ptr): Remove.
1672 (download_agent_expr): Change write_inferior_data_ptr to
1673 write_inferior_data_pointer.
1674 (download_tracepoint_1): Likewise.
1675 (download_tracepoint): Likewise.
1676 (download_trace_state_variables): Likewise.
1678 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1679 Marcin Kościelnicki <koriakin@0x04.net>
1681 * tracepoint.c (struct tracepoint_action_ops): Remove.
1682 (struct tracepoint_action): Remove ops.
1683 (m_tracepoint_action_download, r_tracepoint_action_download)
1684 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1685 size and offset accordingly.
1686 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1687 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1688 (tracepoint_action_send, tracepoint_action_download): New functions.
1689 Helpers for trace action handlers.
1690 (add_tracepoint_action): Remove setup actions ops.
1691 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1693 2016-02-10 Yao Qi <yao.qi@linaro.org>
1695 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1697 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1699 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1701 * configure: Regenerate.
1703 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1705 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1706 void * to gdb_byte *.
1707 * linux-low.c (siginfo_fixup): Likewise.
1708 (linux_xfer_siginfo): Likewise.
1709 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1711 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1713 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1715 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1717 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1719 * linux-x86-low.c [__x86_64__]: Include
1720 "nat/amd64-linux-siginfo.h".
1721 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1722 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1723 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1724 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1725 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1726 (cpt_si_fd, si_timerid, si_overrun): Move from
1727 nat/amd64-linux-siginfo.c.
1728 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1730 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1732 * server.c (skip_to_semicolon): Remove.
1733 (process_point_options): Use strchrnul instead of
1736 2016-01-26 Yao Qi <yao.qi@linaro.org>
1738 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1739 * linux-low.c (install_software_single_step_breakpoints): Don't
1740 call regcache_read_pc.
1741 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1744 2016-01-26 Yao Qi <yao.qi@linaro.org>
1746 * linux-low.c (install_software_single_step_breakpoints): Call
1747 regcache_read_pc instead of get_pc.
1749 2016-01-26 Yao Qi <yao.qi@linaro.org>
1751 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1752 (unblock_async_io): Rename to ...
1753 (block_unblock_async_io): ... it. New function.
1754 (enable_async_io): Don't install SIGIO handler. Unblock it
1756 (disable_async_io): Don't ignore SIGIO. Block it instead.
1757 (initialize_async_io): Install SIGIO handler. Don't call
1760 2016-01-26 Yao Qi <yao.qi@linaro.org>
1762 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1763 first character is '\003', call *the_target->request_interrupt.
1765 2016-01-25 Yao Qi <yao.qi@linaro.org>
1767 * remote-utils.c (new_thread_notify): Remove.
1768 (dead_thread_notify): Likewise.
1769 * remote-utils.h (new_thread_notify): Remove declaration.
1770 (dead_thread_notify): Likewise.
1772 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1774 * gdb.trace/pending.exp: Fix expected message on continue.
1776 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1778 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1779 it works properly on big-endian machines where sizeof (CORE_ADDR)
1782 2016-01-21 Pedro Alves <palves@redhat.com>
1784 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1785 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1786 * configure: Regenerate.
1788 2016-01-21 Yao Qi <yao.qi@linaro.org>
1790 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1791 is_thumb and set it according to CPSR saved on the stack.
1792 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1793 arm_sigreturn_next_pc.
1795 2016-01-18 Yao Qi <yao.qi@linaro.org>
1797 * linux-low.c (linux_set_pc_64bit): New function.
1798 (linux_get_pc_64bit): New function.
1799 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1801 * linux-sparc-low.c (debug_threads): Remove declaration.
1802 (sparc_get_pc): Remove.
1803 (the_low_target): Use linux_get_pc_64bit instead of
1805 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1806 (the_low_target): Use linux_get_pc_64bit and
1809 2016-01-18 Yao Qi <yao.qi@linaro.org>
1811 * linux-arm-low.c (debug_threads): Remove declaration.
1812 (arm_get_pc, arm_set_pc): Remove.
1813 (the_low_target): Use linux_get_pc_32bit and
1815 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1816 (the_low_target): Use linux_get_pc_32bit and
1818 * linux-cris-low.c (debug_threads): Remove declaration.
1819 (cris_get_pc, cris_set_pc,): Remove.
1820 (the_low_target): Use linux_get_pc_32bit and
1822 * linux-crisv32-low.c (debug_threads): Remove declaration.
1823 (cris_get_pc, cris_set_pc): Remove.
1824 (the_low_target): Use linux_get_pc_32bit and
1826 * linux-low.c: Include inttypes.h.
1827 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1828 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1829 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1830 (the_low_target): Use linux_get_pc_32bit and
1832 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1833 (the_low_target): Use linux_get_pc_32bit and
1835 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1836 (the_low_target): Use linux_get_pc_32bit and
1838 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1839 (the_low_target): Use linux_get_pc_32bit and
1841 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1842 (the_low_target): Use linux_get_pc_32bit and
1845 2016-01-18 Gary Benson <gbenson@redhat.com>
1847 * configure.ac (AC_FUNC_FORK): New check.
1848 * config.in: Regenerate.
1849 * configure: Likewise.
1851 2016-01-14 Yao Qi <yao.qi@linaro.org>
1853 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1854 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1855 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1856 arm_get_next_pcs_ctor.
1858 2016-01-12 Josh Stone <jistone@redhat.com>
1859 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1861 * inferiors.h: Include "gdb_vecs.h".
1862 (struct process_info): Add syscalls_to_catch.
1863 * inferiors.c (remove_process): Free syscalls_to_catch.
1864 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1865 syscall_return stops.
1866 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1867 * server.c (handle_general_set): Handle QCatchSyscalls.
1868 (handle_query): Report support for QCatchSyscalls.
1869 * target.h (struct target_ops): Add supports_catch_syscall.
1870 (target_supports_catch_syscall): New macro.
1871 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1872 (struct lwp_info): Add syscall_state.
1873 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1874 Maintain syscall_state and syscalls_to_catch across exec.
1875 (get_syscall_trapinfo): New function, proxy to the_low_target.
1876 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1877 (linux_low_filter_event): Toggle syscall_state entry/return for
1878 syscall traps, and set it ignored for all others.
1879 (gdb_catching_syscalls_p): New function.
1880 (gdb_catch_this_syscall_p): New function.
1881 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1882 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1883 (linux_supports_catch_syscall): New function.
1884 (linux_target_ops): Install it.
1885 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1886 (the_low_target): Install it.
1888 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1890 * acinclude.m4: Include new ../warning.m4 file.
1891 * configure: Regenerated.
1892 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1894 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1896 * ax.c (is_goto_target): Mark static.
1897 * linux-low.c (register_addr): Likewise.
1898 (linux_fetch_registers, linux_store_registers): Likewise.
1899 * mem-break.c (any_persistent_commands): Fix old prototype.
1900 (add_commands_to_breakpoint): Mark static.
1901 * regcache.c (find_register_by_name): Delete unused func.
1902 * remote-utils.c (hex_or_minus_one): Mark static.
1903 * server.c (monitor_show_help): Mark static.
1904 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1905 handle_v_requests): Likewise.
1907 2016-01-12 Pedro Alves <palves@redhat.com>
1909 Remove use of the registered trademark symbol throughout.
1911 2016-01-08 Yao Qi <yao.qi@linaro.org>
1913 * remote-utils.c (getpkt): If c is '\003', call target hook
1916 2016-01-06 Yao Qi <yao.qi@linaro.org>
1918 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1919 linux-aarch32-low.c.
1920 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1921 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1922 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1923 (thumb2_breakpoint): Declare.
1924 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1925 linux-aarch32-low.h.
1926 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1927 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1928 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1930 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1932 * gdbreplay.c (gdbreplay_version): Change copyright year in
1934 * server.c (gdbserver_version): Likewise.
1936 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1938 * server.c (crc32_table): Delete.
1939 (crc32): Use libiberty's xcrc32 function.
1941 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1943 * lynx-low.c (lynx_delete_thread_callback): New function.
1944 (lynx_mourn): Properly delete our process and all of its
1945 threads. Remove call to clear_inferiors.
1947 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1949 * target.c (thread_search_callback): Add check that
1950 the thread_stopped target callback is not NULL before
1953 2015-12-21 Yao Qi <yao.qi@linaro.org>
1955 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1958 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1960 * server.c (handle_query): Call target_supports_software_single_step.
1962 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1964 * linux-low.c (single_step): New function.
1965 (linux_resume_one_lwp_throw): Call single_step.
1966 (start_step_over): Likewise.
1968 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1970 * Makefile.in (SFILES): Append arch/arm-linux.c,
1971 arch/arm-get-next-pcs.c.
1972 (arm-linux.o): New rule.
1973 (arm-get-next-pcs.o): New rule.
1974 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1976 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1977 to linux-aarch32-low.c.
1978 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1979 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1980 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1981 (thumb2_breakpoint_len): Likewise.
1982 (arm_is_thumb_mode): Make non-static.
1983 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1984 from linux-aarch32-low.c.
1985 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1986 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1987 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1988 (thumb2_breakpoint_len): Likewise.
1989 (arm_is_thumb_mode): New declaration.
1990 * linux-arm-low.c: Include arch/arm-linux.h
1991 aarch/arm-get-next-pcs.h, sys/syscall.h.
1992 (get_next_pcs_ops): New struct.
1993 (get_next_pcs_addr_bits_remove): New function.
1994 (get_next_pcs_is_thumb): New function.
1995 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1996 (arm_sigreturn_next_pc): Likewise.
1997 (get_next_pcs_syscall_next_pc): Likewise.
1998 (arm_gdbserver_get_next_pcs): Likewise.
1999 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2001 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2002 * server.h: Include gdb_vecs.h.
2004 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2006 * Makefile.in (SFILES): Append common/common-regcache.c.
2007 (OBS): Append common-regcache.o.
2008 (common-regcache.o): New rule.
2009 * regcache.c (init_register_cache): Initialize cache to
2011 (regcache_raw_read_unsigned): New function.
2012 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2013 register_status enum.
2015 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2017 * linux-aarch64-low.c (the_low_targets): Rename
2018 breakpoint_reinsert_addr to get_next_pcs.
2019 * linux-arm-low.c (the_low_targets): Likewise.
2020 * linux-bfin-low.c (the_low_targets): Likewise.
2021 * linux-cris-low.c (the_low_targets): Likewise.
2022 * linux-crisv32-low.c (the_low_targets): Likewise.
2023 * linux-low.c (can_software_single_step): Likewise.
2024 (install_software_single_step_breakpoints): New function.
2025 (start_step_over): Use install_software_single_step_breakpoints.
2026 * linux-low.h: New CORE_ADDR vector.
2027 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2029 * linux-mips-low.c (the_low_targets): Likewise.
2030 * linux-nios2-low.c (the_low_targets): Likewise.
2031 * linux-sparc-low.c (the_low_targets): Likewise.
2033 2015-12-17 Pedro Alves <palves@redhat.com>
2035 * linux-low.c (linux_kill_one_lwp): Remove references to
2037 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2039 (linux_init_signals): Delete.
2040 (initialize_low): Adjust.
2041 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2043 2015-12-16 Pedro Alves <palves@redhat.com>
2045 * configure.ac (compiler warning flags): When testing a
2046 -Wno-foo option, check whether -Wfoo works instead.
2047 * configure: Regenerate.
2049 2015-12-11 Don Breazeal <donb@codesourcery.com>
2051 * server.c (process_serial_event): Don't exit from gdbserver
2052 in remote mode if there are still active inferiors.
2054 2015-12-11 Yao Qi <yao.qi@linaro.org>
2056 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2057 arm_breakpoint_at if the process is 32-bit.
2059 2015-12-11 Yao Qi <yao.qi@linaro.org>
2061 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2064 2015-12-07 Yao Qi <yao.qi@linaro.org>
2066 * configure.srv: Append arm.o to srv_tgtobj for
2067 aarch64*-*-linux* target.
2068 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2069 from linux-arm-low.c.
2070 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2071 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2072 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2073 (thumb2_breakpoint_len): Likewise.
2074 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2075 (arm_breakpoint_kinds): Likewise.
2076 (arm_breakpoint_kind_from_pc): Likewise.
2077 (arm_sw_breakpoint_from_kind): Likewise.
2078 (arm_breakpoint_kind_from_current_state): Likewise.
2079 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2080 (arm_sw_breakpoint_from_kind): Declare.
2081 (arm_breakpoint_kind_from_current_state): Declare.
2082 (arm_breakpoint_at): Declare.
2083 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2084 arm_sw_breakpoint_from_kind if process is 32-bit.
2085 (aarch64_breakpoint_kind_from_pc): New function.
2086 (aarch64_breakpoint_kind_from_current_state): New function.
2087 (the_low_target): Initialize fields breakpoint_kind_from_pc
2088 and breakpoint_kind_from_current_state.
2089 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2090 linux-aarch32-low.c.
2091 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2092 (arm_breakpoint, arm_breakpoint_len): Likewise.
2093 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2094 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2095 (arm_is_thumb_mode): Likewise.
2096 (arm_breakpoint_at): Likewise.
2097 (arm_breakpoint_kind_from_pc): Likewise.
2098 (arm_sw_breakpoint_from_kind): Likewise.
2099 (arm_breakpoint_kind_from_current_state): Likewise.
2102 2015-08-04 Yao Qi <yao.qi@linaro.org>
2104 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2105 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2106 * server.c (extended_protocol): Remove "static".
2107 * server.h (extended_protocol): Declare it.
2109 2015-12-04 Josh Stone <jistone@redhat.com>
2111 * target.h (struct target_ops) <arch_setup>: Rename to ...
2112 (struct target_ops) <post_create_inferior>: ... this.
2113 (target_arch_setup): Rename to ...
2114 (target_post_create_inferior): ... this, calling post_create_inferior.
2115 * server.c (start_inferior): Update target_arch_setup calls to
2116 target_post_create_inferior.
2117 * linux-low.c (linux_low_ptrace_options): Forward declare.
2118 (linux_arch_setup): Update its comment for general use.
2119 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2120 (struct linux_target_ops): Use linux_post_create_inferior.
2121 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2122 to post_create_inferior.
2123 * nto-low.c (struct nto_target_ops): Likewise.
2124 * spu-low.c (struct spu_target_ops): Likewise.
2125 * win32-low.c (struct win32_target_ops): Likewise.
2127 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2129 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2131 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2133 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2134 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2135 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2136 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2137 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2138 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2139 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2140 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2141 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2142 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2143 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2144 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2146 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2148 * linux-low.c (linux_look_up_symbols): Don't call
2149 linux_supports_traceclone.
2150 * linux-low.h (thread_db_init): Remove use_events argument.
2151 * thread-db.c (thread_db_use_event): Remove global variable.
2152 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2153 (struct thread_db) <td_create_bp>: Remove field.
2154 (thread_db_create_event): Remove function.
2155 (thread_db_enable_reporting): Likewise.
2156 (find_one_thread): Don't check for thread_db_use_events.
2157 (attach_thread): Likewise.
2158 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2159 (try_thread_db_load_1): Don't check for thread_db_use_events.
2160 (thread_db_init): Remove use_events argument and thread events
2162 (remove_thread_event_breakpoints): Remove function.
2163 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2165 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2167 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2169 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2170 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2171 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2172 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2173 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2175 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2177 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2178 * linux-low.c (can_hardware_single_step): Use
2179 supports_hardware_single_step.
2180 (can_software_single_step): New function.
2181 (start_step_over): Call can_software_single_step.
2182 (linux_supports_hardware_single_step): New function.
2183 (struct target_ops) <supports_software_single_step>: Initialize.
2184 * linux-low.h (struct linux_target_ops)
2185 <supports_hardware_single_step>: Initialize.
2186 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2187 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2188 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2189 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2190 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2191 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2192 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2193 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2194 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2195 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2197 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2198 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2200 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2201 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2202 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2204 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2205 * target.h (struct target_ops): <supports_software_single_step>:
2207 (target_supports_software_single_step): New macro.
2209 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2211 * linux-low.c (linux_wait_1): Fix pc advance condition.
2212 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2213 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2215 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2217 * linux-arm-low.c (arm_is_thumb_mode): New function.
2218 (arm_breakpoint_at): Use arm_is_thumb_mode.
2219 (arm_breakpoint_kind_from_current_state): New function.
2220 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2222 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2223 (linux_breakpoint_kind_from_current_state): New function.
2224 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2225 * linux-low.h (struct linux_target_ops)
2226 <breakpoint_kind_from_current_state>: New field.
2227 * target.h (struct target_ops): Likewise.
2228 (target_breakpoint_kind_from_current_state): New macro.
2230 2015-11-30 Pedro Alves <palves@redhat.com>
2232 * linux-low.c (linux_resume): Wake up the event loop before
2235 2015-11-30 Pedro Alves <palves@redhat.com>
2237 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2239 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2241 * target.c (struct thread_search): New structure.
2242 (thread_search_callback): New function.
2243 (prev_general_thread): New global.
2244 (prepare_to_access_memory, done_accessing_memory): New functions.
2245 * target.h (prepare_to_access_memory, done_accessing_memory):
2246 Replace macros with function declarations.
2248 2015-11-30 Pedro Alves <palves@redhat.com>
2251 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2252 report TARGET_WAITKIND_NO_RESUMED.
2253 * remote-utils.c (prepare_resume_reply): Handle
2254 TARGET_WAITKIND_NO_RESUMED.
2255 * server.c (report_no_resumed): New global.
2256 (handle_query) <qSupported>: Handle "no-resumed+". Report
2257 "no-resumed+" support.
2258 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2259 return error if the client doesn't support no-resumed events.
2260 (push_stop_notification): New function.
2261 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2262 events if the client supports them.
2264 2015-11-30 Pedro Alves <palves@redhat.com>
2266 * linux-low.c (thread_still_has_status_pending_p): Don't check
2268 (lwp_resumed): New function.
2269 (status_pending_p_callback): Return early if the LWP is not
2270 supposed to be resumed.
2272 2015-11-30 Pedro Alves <palves@redhat.com>
2274 * linux-low.c (handle_extended_wait): Assert that the LWP's
2275 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2276 thread create events, leave the new child's status pending.
2277 (linux_low_filter_event): If GDB wants to hear about thread exit
2278 events, leave the LWP marked dead and don't delete it.
2279 (linux_wait_for_event_filtered): Don't check for thread exit.
2280 (filter_exit_event): New function.
2281 (linux_wait_1): Use it, when returning an exit event.
2282 (linux_resume_one_lwp_throw): Assert that the LWP's
2283 waitstatus is TARGET_WAITKIND_IGNORE.
2284 * remote-utils.c (prepare_resume_reply): Handle
2285 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2286 * server.c (report_thread_events): New global.
2287 (handle_general_set): Handle QThreadEvents.
2288 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2289 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2290 TARGET_WAITKIND_THREAD_EXITED.
2291 * server.h (report_thread_events): Declare.
2293 2015-11-30 Pedro Alves <palves@redhat.com>
2295 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2296 the thread's last_resume_kind was resume_stop.
2298 2015-11-30 Pedro Alves <palves@redhat.com>
2300 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2303 2015-11-30 Pedro Alves <palves@redhat.com>
2305 * server.c (handle_v_requests): Handle vCtrlC.
2307 2015-11-30 Pedro Alves <palves@redhat.com>
2309 * gdbthread.h (find_any_thread_of_pid): Declare.
2310 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2312 * server.c (handle_query): If current_thread is NULL, look for
2313 another thread of the selected process.
2315 2015-11-26 Daniel Colascione <dancol@dancol.org>
2316 Simon Marchi <simon.marchi@ericsson.com>
2318 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2319 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2321 * target.h (struct target_ops) <thread_name>: New field.
2322 (target_thread_name): New macro.
2324 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2326 * regcache.h (regcache_invalidate_pid): Add declaration.
2327 * regcache.c (regcache_invalidate_pid): New function, extracted
2328 from regcache_invalidate.
2329 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2330 Add trivial documentation comment.
2331 * lynx-low.c: Use regcache_invalidate_pid instead of
2332 regcache_invalidate.
2334 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2336 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2337 and Elf64_auxv_t if the target is Android.
2339 2015-11-22 Doug Evans <xdje42@gmail.com>
2341 * target.h: #include <sys/types.h>.
2343 2015-11-19 Pedro Alves <palves@redhat.com>
2345 * linux-low.c (linux_process_qsupported): Change prototype.
2347 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2349 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2350 and adjust to loop over all features.
2351 * server.c (handle_query) <qSupported>: Adjust to call
2352 target_process_qsupported once, passing it a vector of unprocessed
2354 * target.h (struct target_ops) <process_qsupported>: Change
2356 (target_process_qsupported): Adjust.
2358 2015-11-19 Pedro Alves <palves@redhat.com>
2360 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2362 * configure: Regenerate.
2364 2015-11-19 Pedro Alves <palves@redhat.com>
2366 * configure: Regenerate.
2368 2015-11-19 Yao Qi <yao.qi@linaro.org>
2370 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2373 2015-11-19 Yao Qi <yao.qi@linaro.org>
2375 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2376 (struct aarch64_operand): Move enum out.
2378 2015-11-19 Yao Qi <yao.qi@linaro.org>
2380 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2381 struct user_fpsimd_state *.
2382 (aarch64_store_fpregset): Likewise.
2384 2015-11-19 Yao Qi <yao.qi@linaro.org>
2386 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2387 struct user_pt_regs *.
2388 (aarch64_store_gregset): Likewise.
2390 2015-11-18 Pedro Alves <palves@redhat.com>
2392 * Makefile.in (all_object_files): Add $IPA_OBJS.
2394 2015-11-17 Pedro Alves <palves@redhat.com>
2396 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2397 GDB_SIGNAL_0 and gdb_signal_to_string.
2399 2015-11-17 Pedro Alves <palves@redhat.com>
2401 * win32-low.c (handle_output_debug_string): Remove parameter.
2402 (win32_kill): Remove our_status local and adjust call to
2403 handle_output_debug_string.
2404 (get_child_debug_event): Adjust call to
2405 handle_output_debug_string.
2407 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2409 * linux-mips-low.c (mips_fill_gregset): Add cast.
2410 (mips_store_gregset): Likewise.
2411 (mips_fill_fpregset): Likewise.
2412 (mips_store_fpregset): Likewise.
2414 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2416 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2419 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2421 * linux-mips-low.c (mips_linux_new_thread): Change type of
2422 watch_type to enum target_hw_bp_type.
2424 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2426 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2427 Change return type to arm_hwbp_type.
2429 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2431 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2432 (arm_store_gregset): Likewise.
2433 * linux-arm-low.c (arm_get_hwcap): Likewise.
2434 (arm_read_description): Likewise.
2436 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2438 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2440 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2442 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2443 (ppc_fill_vsxregset): Likewise.
2444 (ppc_store_vsxregset): Likewise.
2445 (ppc_fill_vrregset): Likewise.
2446 (ppc_store_vrregset): Likewise.
2447 (ppc_fill_evrregset): Likewise.
2448 (ppc_store_evrregset): Likewise.
2450 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2452 * linux-ppc-low.c (ppc_usrregs_info): Remove
2453 forward-declaration.
2454 (ppc_arch_setup): Move lower in file.
2456 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2458 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2459 (ps_pdwrite): Likewise.
2461 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2463 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2464 to after assert checks.
2466 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2468 * proc-service.c (ps_pdread): Add/adjust casts.
2469 (ps_pdwrite): Add/adjust casts.
2471 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2473 * server.c (handle_search_memory_1): Cast return value of
2476 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2478 * server.c (write_qxfer_response): Change type of data to
2481 2015-10-29 Pedro Alves <palves@redhat.com>
2483 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2485 2015-10-29 Pedro Alves <palves@redhat.com>
2487 * tracepoint.c (clear_installed_tracepoints): Add casts.
2489 2015-10-29 Pedro Alves <palves@redhat.com>
2491 * server.c (handle_v_cont, process_serial_event): Add enum
2492 gdb_signal casts to signal parsing code.
2494 2015-10-29 Pedro Alves <palves@redhat.com>
2496 * linux-low.h (NULL_REGSET): Define.
2497 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2498 * linux-arm-low.c (arm_regsets): Likewise.
2499 * linux-crisv32-low.c (cris_regsets): Likewise.
2500 * linux-m68k-low.c (m68k_regsets): Likewise.
2501 * linux-mips-low.c (mips_regsets): Likewise.
2502 * linux-nios2-low.c (nios2_regsets): Likewise.
2503 * linux-ppc-low.c (ppc_regsets): Likewise.
2504 * linux-s390-low.c (s390_regsets): Likewise.
2505 * linux-sh-low.c (sh_regsets): Likewise.
2506 * linux-sparc-low.c (sparc_regsets): Likewise.
2507 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2508 * linux-tile-low.c (tile_regsets): Likewise.
2509 * linux-x86-low.c (x86_regsets): Likewise.
2510 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2512 2015-10-29 Pedro Alves <palves@redhat.com>
2514 * linux-low.h (NULL_REGSET): Define.
2515 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2516 * linux-arm-low.c (arm_regsets): Likewise.
2517 * linux-crisv32-low.c (cris_regsets): Likewise.
2518 * linux-m68k-low.c (m68k_regsets): Likewise.
2519 * linux-mips-low.c (mips_regsets): Likewise.
2520 * linux-nios2-low.c (nios2_regsets): Likewise.
2521 * linux-ppc-low.c (ppc_regsets): Likewise.
2522 * linux-s390-low.c (s390_regsets): Likewise.
2523 * linux-sh-low.c (sh_regsets): Likewise.
2524 * linux-sparc-low.c (sparc_regsets): Likewise.
2525 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2526 * linux-tile-low.c (tile_regsets): Likewise.
2527 * linux-x86-low.c (x86_regsets): Likewise.
2528 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2530 2015-10-26 Doug Evans <dje@google.com>
2532 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2534 2015-10-26 Doug Evans <dje@google.com>
2536 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2538 2015-10-26 Doug Evans <dje@google.com>
2540 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2542 (attach_thread, find_new_threads_callback): Ditto.
2544 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2546 * mem-break.h (set_breakpoint_data): Remove.
2548 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2550 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2551 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2552 (initialize_low): Remove set_breakpoint_data call.
2553 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2554 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2555 (initialize_low): Remove set_breakpoint_data call.
2556 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2557 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2558 (initialize_low): Remove set_breakpoint_data call.
2560 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2562 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2563 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2564 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2565 * target.h (target_breakpoint_kind_from_pc): New macro.
2567 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2569 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2570 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2571 the default breakpoint kind.
2573 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2575 * linux-arm-low.c (arm_supports_z_point_type): Add software
2578 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2580 * linux-arm-low.c: Refactor breakpoint definitions.
2581 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2582 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2584 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2586 * Makefile.in: Add arm.c/o.
2587 * configure.srv: Likewise.
2588 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2589 (arm_breakpoint_kind_from_pc): New function.
2590 (arm_sw_breakpoint_from_kind): Return proper kind.
2591 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2593 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2595 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2597 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2598 (struct raw_breakpoint) <size>: Remove.
2599 (struct raw_breakpoint) <kind>: Add.
2600 (bp_size): New function.
2601 (bp_opcode): Likewise.
2602 (find_raw_breakpoint_at): Adjust for kind.
2603 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2604 (remove_memory_breakpoint): Adjust for kind call bp_size.
2605 (set_raw_breakpoint_at): Adjust for kind.
2606 (set_breakpoint): Likewise.
2607 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2608 (delete_raw_breakpoint): Adjust for kind.
2609 (delete_breakpoint): Likewise.
2610 (find_gdb_breakpoint): Likewise.
2611 (set_gdb_breakpoint_1): Likewise.
2612 (set_gdb_breakpoint): Likewise.
2613 (delete_gdb_breakpoint_1): Likewise.
2614 (delete_gdb_breakpoint): Likewise.
2615 (uninsert_raw_breakpoint): Likewise.
2616 (reinsert_raw_breakpoint): Likewise.
2617 (set_breakpoint_data): Remove.
2618 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2619 (check_mem_read): Adjust for kind call bp_size.
2620 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2621 (clone_one_breakpoint): Adjust for kind.
2622 * mem-break.h (set_gdb_breakpoint): Likewise.
2623 (delete_gdb_breakpoint): Likewise.
2624 * server.c (process_serial_event): Likewise.
2626 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2628 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2629 (struct linux_target_ops) <breakpoint>: Remove.
2630 (struct linux_target_ops) <breakpoint_len>: Remove.
2631 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2633 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2634 (arm_sw_breakpoint_from_kind): New function.
2635 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2636 (struct linux_target_ops) <breakpoint>: Remove.
2637 (struct linux_target_ops) <breakpoint_len>: Remove.
2638 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2639 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2640 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2641 (struct linux_target_ops) <breakpoint>: Remove.
2642 (struct linux_target_ops) <breakpoint_len>: Remove.
2643 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2644 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2645 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2646 (struct linux_target_ops) <breakpoint>: Remove.
2647 (struct linux_target_ops) <breakpoint_len>: Remove.
2648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2650 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2651 and sw_breakpoint_from_kind to increment the pc.
2652 (linux_breakpoint_kind_from_pc): New function.
2653 (linux_sw_breakpoint_from_kind): New function.
2654 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2655 (initialize_low): Call breakpoint_kind_from_pc and
2656 sw_breakpoint_from_kind to replace breakpoint_data/len.
2657 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2659 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2660 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2661 (struct linux_target_ops) <breakpoint>: Remove.
2662 (struct linux_target_ops) <breakpoint_len>: Remove.
2663 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2664 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2665 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2666 (struct linux_target_ops) <breakpoint>: Remove.
2667 (struct linux_target_ops) <breakpoint_len>: Remove.
2668 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2669 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2670 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2671 (struct linux_target_ops) <breakpoint>: Remove.
2672 (struct linux_target_ops) <breakpoint_len>: Remove.
2673 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2674 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2675 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2676 (struct linux_target_ops) <breakpoint>: Remove.
2677 (struct linux_target_ops) <breakpoint_len>: Remove.
2678 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2679 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2680 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2681 (struct linux_target_ops) <breakpoint>: Remove.
2682 (struct linux_target_ops) <breakpoint_len>: Remove.
2683 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2684 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2685 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2686 (struct linux_target_ops) <breakpoint>: Remove.
2687 (struct linux_target_ops) <breakpoint_len>: Remove.
2688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2690 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2691 (struct linux_target_ops) <breakpoint>: Remove.
2692 (struct linux_target_ops) <breakpoint_len>: Remove.
2693 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2694 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2695 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2696 (struct linux_target_ops) <breakpoint>: Remove.
2697 (struct linux_target_ops) <breakpoint_len>: Remove.
2698 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2699 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2700 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2701 (struct linux_target_ops) <breakpoint>: Remove.
2702 (struct linux_target_ops) <breakpoint_len>: Remove.
2703 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2704 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2705 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2706 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2707 (struct linux_target_ops) <breakpoint>: Remove.
2708 (struct linux_target_ops) <breakpoint_len>: Remove.
2709 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2710 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2711 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2712 (struct linux_target_ops) <breakpoint>: Remove.
2713 (struct linux_target_ops) <breakpoint_len>: Remove.
2714 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2715 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2717 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2719 * linux-cris-low.c (cris_get_pc): Remove void arg.
2721 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2723 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2726 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2728 * inferiors.c (thread_pid_matches_callback): New function.
2729 (find_thread_process): New function.
2730 (remove_thread): Reset current_thread.
2731 (remove_process): Assert threads have been removed first.
2733 2015-10-15 Yao Qi <yao.qi@linaro.org>
2735 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2737 (aarch64_remove_point): Likewise.
2738 * regcache.c (regcache_register_size): New function.
2740 2015-10-12 Yao Qi <yao.qi@linaro.org>
2742 * linux-aarch64-low.c: Update all callers as emit_load_store
2743 is renamed to aarch64_emit_load_store.
2745 2015-10-12 Yao Qi <yao.qi@linaro.org>
2747 * linux-aarch64-low.c: Update all callers of function renaming
2748 from emit_insn to aarch64_emit_insn.
2750 2015-10-12 Yao Qi <yao.qi@linaro.org>
2752 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2753 arch/aarch64-insn.h.
2754 (struct aarch64_memory_operand): Likewise.
2756 (emit_insn): Move to arch/aarch64-insn.c.
2757 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2758 (emit_load_store): Move to arch/aarch64-insn.c.
2759 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2760 (can_encode_int32): Remove.
2762 2015-10-12 Yao Qi <yao.qi@linaro.org>
2764 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2765 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2766 (aarch64_relocate_instruction): Likewise.
2767 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2768 (struct aarch64_insn_visitor): Likewise.
2770 2015-10-12 Yao Qi <yao.qi@linaro.org>
2772 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2773 (struct aarch64_insn_visitor): New.
2774 (struct aarch64_insn_relocation_data): New.
2775 (aarch64_ftrace_insn_reloc_b): New function.
2776 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2777 (aarch64_ftrace_insn_reloc_cb): Likewise.
2778 (aarch64_ftrace_insn_reloc_tb): Likewise.
2779 (aarch64_ftrace_insn_reloc_adr): Likewise.
2780 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2781 (aarch64_ftrace_insn_reloc_others): Likewise.
2783 (aarch64_relocate_instruction): Use visitor.
2785 2015-10-12 Yao Qi <yao.qi@linaro.org>
2787 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2788 int. Add argument buf.
2789 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2790 aarch64_relocate_instruction.
2792 2015-10-12 Yao Qi <yao.qi@linaro.org>
2794 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2795 argument insn. Remove local variable insn. Don't call
2797 (aarch64_install_fast_tracepoint_jump_pad): Call
2800 2015-09-30 Yao Qi <yao.qi@linaro.org>
2802 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2803 (emit_load_store_pair): Likewise.
2805 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2807 * dll.c (match_dll): Add cast(s).
2808 (unloaded_dll): Likewise.
2809 * linux-low.c (second_thread_of_pid_p): Likewise.
2810 (delete_lwp_callback): Likewise.
2811 (count_events_callback): Likewise.
2812 (select_event_lwp_callback): Likewise.
2813 (linux_set_resume_request): Likewise.
2814 * server.c (accumulate_file_name_length): Likewise.
2815 (emit_dll_description): Likewise.
2816 (handle_qxfer_threads_worker): Likewise.
2817 (visit_actioned_threads): Likewise.
2818 * thread-db.c (any_thread_of): Likewise.
2819 * tracepoint.c (same_process_p): Likewise.
2820 (match_blocktype): Likewise.
2821 (build_traceframe_info_xml): Likewise.
2823 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2825 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2827 (gdb_unparse_agent_expr): Likewise.
2828 * hostio.c (require_data): Likewise.
2829 (handle_pread): Likewise.
2830 * linux-low.c (disable_regset): Likewise.
2831 (fetch_register): Likewise.
2832 (store_register): Likewise.
2833 (get_dynamic): Likewise.
2834 (linux_qxfer_libraries_svr4): Likewise.
2835 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2836 (set_fast_tracepoint_jump): Likewise.
2837 (uninsert_fast_tracepoint_jumps_at): Likewise.
2838 (reinsert_fast_tracepoint_jumps_at): Likewise.
2839 (validate_inserted_breakpoint): Likewise.
2840 (clone_agent_expr): Likewise.
2841 * regcache.c (init_register_cache): Likewise.
2842 * remote-utils.c (putpkt_binary_1): Likewise.
2843 (decode_M_packet): Likewise.
2844 (decode_X_packet): Likewise.
2845 (look_up_one_symbol): Likewise.
2846 (relocate_instruction): Likewise.
2847 (monitor_output): Likewise.
2848 * server.c (handle_search_memory): Likewise.
2849 (handle_qxfer_exec_file): Likewise.
2850 (handle_qxfer_libraries): Likewise.
2851 (handle_qxfer): Likewise.
2852 (handle_query): Likewise.
2853 (handle_v_cont): Likewise.
2854 (handle_v_run): Likewise.
2855 (captured_main): Likewise.
2856 * target.c (write_inferior_memory): Likewise.
2857 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2858 * tracepoint.c (init_trace_buffer): Likewise.
2859 (add_tracepoint_action): Likewise.
2860 (add_traceframe): Likewise.
2861 (add_traceframe_block): Likewise.
2862 (cmd_qtdpsrc): Likewise.
2863 (cmd_qtdv): Likewise.
2864 (cmd_qtstatus): Likewise.
2865 (response_source): Likewise.
2866 (response_tsv): Likewise.
2867 (cmd_qtnotes): Likewise.
2868 (gdb_collect): Likewise.
2869 (initialize_tracepoint): Likewise.
2871 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2873 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2874 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2875 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2877 (enum aarch64_condition_codes): New enum.
2878 (w0): New static global.
2881 (struct aarch64_memory_operand) <type>: New
2882 MEMORY_OPERAND_POSTINDEX type.
2883 (postindex_memory_operand): New helper function.
2884 (emit_ret): New function.
2885 (emit_load_store_pair): New function, factored out of emit_stp
2886 with support for MEMORY_OPERAND_POSTINDEX.
2887 (emit_stp): Rewrite using emit_load_store_pair.
2888 (emit_ldp): New function.
2889 (emit_load_store): Likewise.
2890 (emit_ldr): Mention post-index instruction in comment.
2891 (emit_ldrh): New function.
2892 (emit_ldrb): New function.
2893 (emit_ldrsw): Mention post-index instruction in comment.
2894 (emit_str): Likewise.
2895 (emit_subs): New function.
2896 (emit_cmp): Likewise.
2897 (emit_and): Likewise.
2898 (emit_orr): Likewise.
2899 (emit_orn): Likewise.
2900 (emit_eor): Likewise.
2901 (emit_mvn): Likewise.
2902 (emit_lslv): Likewise.
2903 (emit_lsrv): Likewise.
2904 (emit_asrv): Likewise.
2905 (emit_mul): Likewise.
2906 (emit_sbfm): Likewise.
2907 (emit_sbfx): Likewise.
2908 (emit_ubfm): Likewise.
2909 (emit_ubfx): Likewise.
2910 (emit_csinc): Likewise.
2911 (emit_cset): Likewise.
2912 (emit_nop): Likewise.
2913 (emit_ops_insns): New helper function.
2914 (emit_pop): Likewise.
2915 (emit_push): Likewise.
2916 (aarch64_emit_prologue): New function.
2917 (aarch64_emit_epilogue): Likewise.
2918 (aarch64_emit_add): Likewise.
2919 (aarch64_emit_sub): Likewise.
2920 (aarch64_emit_mul): Likewise.
2921 (aarch64_emit_lsh): Likewise.
2922 (aarch64_emit_rsh_signed): Likewise.
2923 (aarch64_emit_rsh_unsigned): Likewise.
2924 (aarch64_emit_ext): Likewise.
2925 (aarch64_emit_log_not): Likewise.
2926 (aarch64_emit_bit_and): Likewise.
2927 (aarch64_emit_bit_or): Likewise.
2928 (aarch64_emit_bit_xor): Likewise.
2929 (aarch64_emit_bit_not): Likewise.
2930 (aarch64_emit_equal): Likewise.
2931 (aarch64_emit_less_signed): Likewise.
2932 (aarch64_emit_less_unsigned): Likewise.
2933 (aarch64_emit_ref): Likewise.
2934 (aarch64_emit_if_goto): Likewise.
2935 (aarch64_emit_goto): Likewise.
2936 (aarch64_write_goto_address): Likewise.
2937 (aarch64_emit_const): Likewise.
2938 (aarch64_emit_call): Likewise.
2939 (aarch64_emit_reg): Likewise.
2940 (aarch64_emit_pop): Likewise.
2941 (aarch64_emit_stack_flush): Likewise.
2942 (aarch64_emit_zero_ext): Likewise.
2943 (aarch64_emit_swap): Likewise.
2944 (aarch64_emit_stack_adjust): Likewise.
2945 (aarch64_emit_int_call_1): Likewise.
2946 (aarch64_emit_void_call_2): Likewise.
2947 (aarch64_emit_eq_goto): Likewise.
2948 (aarch64_emit_ne_goto): Likewise.
2949 (aarch64_emit_lt_goto): Likewise.
2950 (aarch64_emit_le_goto): Likewise.
2951 (aarch64_emit_gt_goto): Likewise.
2952 (aarch64_emit_ge_got): Likewise.
2953 (aarch64_emit_ops_impl): New static global variable.
2954 (aarch64_emit_ops): New target function, return
2955 &aarch64_emit_ops_impl.
2956 (struct linux_target_ops): Install it.
2958 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2960 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2961 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2963 * linux-aarch64-ipa.c: New file.
2964 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2966 (aarch64_get_thread_area): New target method.
2967 (extract_signed_bitfield): New helper function.
2968 (aarch64_decode_ldr_literal): New function.
2969 (enum aarch64_opcodes): New enum.
2970 (struct aarch64_register): New struct.
2971 (struct aarch64_operand): New struct.
2972 (x0): New static global.
2981 (aarch64_register): New helper function.
2982 (register_operand): Likewise.
2983 (immediate_operand): Likewise.
2984 (struct aarch64_memory_operand): New struct.
2985 (offset_memory_operand): New helper function.
2986 (preindex_memory_operand): Likewise.
2987 (enum aarch64_system_control_registers): New enum.
2988 (ENCODE): New macro.
2989 (emit_insn): New helper function.
2990 (emit_b): New function.
2991 (emit_bcond): Likewise.
2992 (emit_cb): Likewise.
2993 (emit_tb): Likewise.
2994 (emit_blr): Likewise.
2995 (emit_stp): Likewise.
2996 (emit_ldp_q_offset): Likewise.
2997 (emit_stp_q_offset): Likewise.
2998 (emit_load_store): Likewise.
2999 (emit_ldr): Likewise.
3000 (emit_ldrsw): Likewise.
3001 (emit_str): Likewise.
3002 (emit_ldaxr): Likewise.
3003 (emit_stxr): Likewise.
3004 (emit_stlr): Likewise.
3005 (emit_data_processing_reg): Likewise.
3006 (emit_data_processing): Likewise.
3007 (emit_add): Likewise.
3008 (emit_sub): Likewise.
3009 (emit_mov): Likewise.
3010 (emit_movk): Likewise.
3011 (emit_mov_addr): Likewise.
3012 (emit_mrs): Likewise.
3013 (emit_msr): Likewise.
3014 (emit_sevl): Likewise.
3015 (emit_wfe): Likewise.
3016 (append_insns): Likewise.
3017 (can_encode_int32_in): New helper function.
3018 (aarch64_relocate_instruction): New function.
3019 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3020 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3021 (struct linux_target_ops): Install aarch64_get_thread_area,
3022 aarch64_install_fast_tracepoint_jump_pad and
3023 aarch64_get_min_fast_tracepoint_insn_len.
3025 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3027 * Makefile.in (aarch64-insn.o): New rule.
3028 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3030 2015-09-21 Yao Qi <yao.qi@linaro.org>
3032 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3034 2015-09-21 Yao Qi <yao.qi@linaro.org>
3036 * tracepoint.c (max_jump_pad_size): Remove.
3038 2015-09-18 Yao Qi <yao.qi@linaro.org>
3040 * linux-aarch64-low.c: Don't include sys/uio.h.
3041 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3043 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3045 * tracepoint.c (eval_result_type): Change prototype.
3046 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3048 2015-09-15 Pedro Alves <palves@redhat.com>
3050 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3051 Check whether to report exec events instead of checking whether
3052 multiprocess is enabled.
3054 2015-09-15 Pedro Alves <palves@redhat.com>
3057 * remote-utils.c (prepare_resume_reply): Merge
3058 TARGET_WAITKIND_VFORK_DONE switch case with the
3059 TARGET_WAITKIND_FORKED case.
3061 2015-09-15 Yao Qi <yao.qi@linaro.org>
3063 * server.c (handle_query): Check string comparison using
3064 "else if" instead of "if".
3066 2015-09-15 Yao Qi <yao.qi@linaro.org>
3068 * server.c (vCont_supported): New global variable.
3069 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3070 matches. Append ";vContSupported+" to own_buf.
3071 (handle_v_requests): Append ";s;S" to own_buf if target supports
3072 hardware single step or vCont_supported is false.
3073 (capture_main): Set vCont_supported to zero.
3075 2015-09-15 Yao Qi <yao.qi@linaro.org>
3077 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3079 (linux_supports_hardware_single_step): ... New function.
3080 (linux_target_ops): Update.
3081 * lynx-low.c (lynx_target_ops): Set field
3082 supports_hardware_single_step to target_can_do_hardware_single_step.
3083 * nto-low.c (nto_target_ops): Likewise.
3084 * spu-low.c (spu_target_ops): Likewise.
3085 * win32-low.c (win32_target_ops): Likewise.
3086 * target.c (target_can_do_hardware_single_step): New function.
3087 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3088 Remove. <supports_hardware_single_step>: New field.
3089 (target_supports_conditional_breakpoints): Remove.
3090 (target_supports_hardware_single_step): New macro.
3091 (target_can_do_hardware_single_step): Declare.
3092 * server.c (handle_query): Use target_supports_hardware_single_step
3093 instead of target_supports_conditional_breakpoints.
3095 2015-09-15 Yao Qi <yao.qi@linaro.org>
3097 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3099 (struct linux_target_ops the_low_target): Install
3100 aarch64_linux_siginfo_fixup.
3102 2015-09-11 Don Breazeal <donb@codesourcery.com>
3103 Luis Machado <lgustavo@codesourcery.com>
3105 * linux-low.c (linux_mourn): Static declaration.
3106 (linux_arch_setup): Move in front of
3107 handle_extended_wait.
3108 (linux_arch_setup_thread): New function.
3109 (handle_extended_wait): Handle exec events. Call
3110 linux_arch_setup_thread. Make event_lwp argument a
3111 pointer-to-a-pointer.
3112 (check_zombie_leaders): Do not check stopped threads.
3113 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3114 (linux_low_filter_event): Add lwp and thread for exec'ing
3115 non-leader thread if leader thread has been deleted.
3116 Refactor code into linux_arch_setup_thread and call it.
3117 Pass child lwp pointer by reference to handle_extended_wait.
3118 (linux_wait_for_event_filtered): Update comment.
3119 (linux_wait_1): Prevent clobbering exec event status.
3120 (linux_supports_exec_events): New function.
3121 (linux_target_ops) <supports_exec_events>: Initialize new member.
3122 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3124 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3125 * server.c (report_exec_events): New global variable.
3126 (handle_query): Handle qSupported query for exec-events feature.
3127 (captured_main): Initialize report_exec_events.
3128 * server.h (report_exec_events): Declare new global variable.
3129 * target.h (struct target_ops) <supports_exec_events>: New
3131 (target_supports_exec_events): New macro.
3132 * win32-low.c (win32_target_ops) <supports_exec_events>:
3133 Initialize new member.
3135 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3137 * linux-low.c (linux_low_enable_btrace): Remove.
3138 (linux_target_ops): Replace linux_low_enable_btrace with
3139 linux_enable_btrace.
3141 2015-09-03 Yao Qi <yao.qi@linaro.org>
3143 * linux-aarch64-low.c (aarch64_insert_point): Call
3144 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3147 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3149 * linux-low.c (check_stopped_by_breakpoint): Use
3150 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3152 2015-08-27 Pedro Alves <palves@redhat.com>
3154 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3156 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3158 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3159 the XNEW-family equivalent.
3160 (compile_bytecodes): Likewise.
3161 * dll.c (loaded_dll): Likewise.
3162 * event-loop.c (append_callback_event): Likewise.
3163 (create_file_handler): Likewise.
3164 (create_file_event): Likewise.
3165 * hostio.c (handle_open): Likewise.
3166 * inferiors.c (add_thread): Likewise.
3167 (add_process): Likewise.
3168 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3169 * linux-arm-low.c (arm_new_process): Likewise.
3170 (arm_new_thread): Likewise.
3171 * linux-low.c (add_to_pid_list): Likewise.
3172 (linux_add_process): Likewise.
3173 (handle_extended_wait): Likewise.
3174 (add_lwp): Likewise.
3175 (enqueue_one_deferred_signal): Likewise.
3176 (enqueue_pending_signal): Likewise.
3177 (linux_resume_one_lwp_throw): Likewise.
3178 (linux_resume_one_thread): Likewise.
3179 (linux_read_memory): Likewise.
3180 (linux_write_memory): Likewise.
3181 * linux-mips-low.c (mips_linux_new_process): Likewise.
3182 (mips_linux_new_thread): Likewise.
3183 (mips_add_watchpoint): Likewise.
3184 * linux-x86-low.c (initialize_low_arch): Likewise.
3185 * lynx-low.c (lynx_add_process): Likewise.
3186 * mem-break.c (set_raw_breakpoint_at): Likewise.
3187 (set_breakpoint): Likewise.
3188 (add_condition_to_breakpoint): Likewise.
3189 (add_commands_to_breakpoint): Likewise.
3190 (clone_agent_expr): Likewise.
3191 (clone_one_breakpoint): Likewise.
3192 * regcache.c (new_register_cache): Likewise.
3193 * remote-utils.c (look_up_one_symbol): Likewise.
3194 * server.c (queue_stop_reply): Likewise.
3195 (start_inferior): Likewise.
3196 (queue_stop_reply_callback): Likewise.
3197 (handle_target_event): Likewise.
3198 * spu-low.c (fetch_ppc_memory): Likewise.
3199 (store_ppc_memory): Likewise.
3200 * target.c (set_target_ops): Likewise.
3201 * thread-db.c (thread_db_load_search): Likewise.
3202 (try_thread_db_load_1): Likewise.
3203 * tracepoint.c (add_tracepoint): Likewise.
3204 (add_tracepoint_action): Likewise.
3205 (create_trace_state_variable): Likewise.
3206 (cmd_qtdpsrc): Likewise.
3207 (cmd_qtro): Likewise.
3208 (add_while_stepping_state): Likewise.
3209 * win32-low.c (child_add_thread): Likewise.
3210 (get_image_name): Likewise.
3212 2015-08-25 Yao Qi <yao.qi@linaro.org>
3214 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3216 2015-08-25 Yao Qi <yao.qi@linaro.org>
3218 * Makefile.in (aarch64-linux.o): New rule.
3219 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3221 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3222 (aarch64_init_debug_reg_state): Make it extern.
3223 (aarch64_linux_prepare_to_resume): Remove.
3225 2015-08-25 Yao Qi <yao.qi@linaro.org>
3227 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3228 lwp_arch_private_info and ptid_of_lwp.
3230 2015-08-25 Yao Qi <yao.qi@linaro.org>
3232 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3233 Find proc_info by find_process_pid. All callers updated.
3235 2015-08-25 Yao Qi <yao.qi@linaro.org>
3237 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3239 (debug_reg_change_callback): Remove.
3240 (aarch64_notify_debug_reg_change): Remove.
3242 2015-08-25 Yao Qi <yao.qi@linaro.org>
3244 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3245 Call current_lwp_ptid.
3247 2015-08-25 Yao Qi <yao.qi@linaro.org>
3249 * linux-aarch64-low.c (debug_reg_change_callback): Use
3252 2015-08-25 Yao Qi <yao.qi@linaro.org>
3254 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3256 2015-08-25 Yao Qi <yao.qi@linaro.org>
3258 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3260 2015-08-25 Yao Qi <yao.qi@linaro.org>
3262 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3265 2015-08-25 Yao Qi <yao.qi@linaro.org>
3267 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3269 (debug_reg_change_callback): Remove argument entry and add argument
3270 lwp. Remove local variable thread. Don't print thread id in the
3271 debugging output. Don't check whether pid of thread equals to pid.
3272 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3273 iterate_over_lwps instead find_inferior.
3275 2015-08-24 Pedro Alves <palves@redhat.com>
3277 * inferiors.c (get_first_process): New function.
3278 * inferiors.h (get_first_process): New declaration.
3279 * remote-utils.c (read_ptid): Default to the first process in the
3280 list, instead of to the current thread's process.
3282 2015-08-24 Pedro Alves <palves@redhat.com>
3284 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3285 * event-loop.c: Likewise.
3286 * remote-utils.c: Likewise.
3287 * tracepoint.c: Likewise.
3289 2015-08-24 Pedro Alves <palves@redhat.com>
3291 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3294 2015-08-21 Pedro Alves <palves@redhat.com>
3296 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3297 instead of literal 1.
3299 2015-08-21 Pedro Alves <palves@redhat.com>
3301 * tdesc.c (default_description): Explicitly zero-initialize.
3303 2015-08-21 Pedro Alves <palves@redhat.com>
3306 * inferiors.c (remove_thread): Discard any pending stop reply for
3308 * server.c (remove_all_on_match_pid): Rename to ...
3309 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3311 (discard_queued_stop_replies): Change parameter to a ptid. Now
3313 (handle_v_kill, kill_inferior_callback, captured_main)
3314 (process_serial_event): Adjust.
3315 * server.h (discard_queued_stop_replies): Declare.
3317 2015-08-21 Pedro Alves <palves@redhat.com>
3319 * linux-low.c (wait_for_sigstop): Always switch to no thread
3320 selected if the previously current thread dies.
3321 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3322 process instead of the current thread's.
3323 * remote-utils.c (input_interrupt): Don't check if there's no
3325 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3326 current thread to the general thread fails, error out.
3327 (handle_qxfer_auxv, handle_qxfer_libraries)
3328 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3329 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3330 (handle_query): Check if there's a thread selected instead of
3331 checking whether there's any thread in the thread list.
3332 (handle_qxfer_threads, handle_qxfer_btrace)
3333 (handle_qxfer_btrace_conf): Don't error out early if there's no
3334 thread in the thread list.
3335 (handle_v_cont, myresume): Don't set the current thread to the
3337 (process_serial_event) <Hg handling>: Also set thread_id if the
3338 previous general thread is still alive.
3339 (process_serial_event) <g/G handling>: If setting the current
3340 thread to the general thread fails, error out.
3341 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3342 thread's lwp instead of the current thread's.
3343 * target.c (set_desired_thread): If the desired thread was not
3344 found, leave the current thread pointing to NULL. Return an int
3345 (boolean) indicating success.
3346 * target.h (set_desired_thread): Change return type to int.
3348 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3350 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3351 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3353 (ps_get_thread_area): New function.
3355 2015-08-19 Gary Benson <gbenson@redhat.com>
3357 * hostio.c (handle_pread): Do not attempt to read more data
3358 than hostio_reply_with_data can fit in a packet.
3360 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3362 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3364 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3366 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3368 2015-08-06 Pedro Alves <palves@redhat.com>
3370 * tracepoint.c (expr_eval_result): Now an int.
3372 2015-08-06 Pedro Alves <palves@redhat.com>
3374 * gdbthread.h (struct regcache): Forward declare.
3375 (struct thread_info) <regcache_data>: Now a struct regcache
3377 * inferiors.c (inferior_regcache_data)
3378 (set_inferior_regcache_data): Now work with struct regcache
3380 * inferiors.h (struct regcache): Forward declare.
3381 (inferior_regcache_data, set_inferior_regcache_data): Now work
3382 with struct regcache pointers.
3383 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3384 (free_register_cache_thread): Remove struct regcache pointer
3387 2015-08-06 Pedro Alves <palves@redhat.com>
3389 * server.c (captured_main): On error, print the exception message
3390 to stderr, and if run_once is set, throw a quit.
3392 2015-08-06 Pedro Alves <palves@redhat.com>
3394 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3397 2015-08-06 Pedro Alves <palves@redhat.com>
3399 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3400 reading beyond the passed in buffer length.
3402 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3404 * tracepoint.c (symbol_list) <required>: Remove.
3406 2015-08-06 Pedro Alves <palves@redhat.com>
3408 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3409 count if stopping and suspending threads.
3410 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3411 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3412 (linux_detach): Complete an ongoing step-over.
3413 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3415 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3416 (linux_wait_1): If passing a signal to the inferior after
3417 finishing a step-over, unsuspend and re-resume all lwps. If we
3418 see a single-step event but the thread should be continuing, don't
3419 pass the trap to gdb.
3420 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3421 internal_error instead of gdb_assert.
3422 (enqueue_pending_signal): New function.
3423 (check_ptrace_stopped_lwp_gone): Add debug output.
3424 (start_step_over): Use internal_error instead of gdb_assert.
3425 (complete_ongoing_step_over): New function.
3426 (linux_resume_one_thread): Don't resume a suspended thread.
3427 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3430 2015-08-06 Pedro Alves <palves@redhat.com>
3432 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3433 (linux_thread_alive): Use lwp_is_marked_dead.
3434 (extended_event_reported): Delete.
3435 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3436 instead of extended_event_reported.
3437 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3439 (lwp_is_marked_dead): New function.
3440 (lwp_running): Use lwp_is_marked_dead.
3441 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3444 2015-08-06 Pedro Alves <palves@redhat.com>
3446 * linux-low.c (linux_wait_1): Move fork event output out of the
3447 !report_to_gdb check. Pass event_child->waitstatus to
3448 target_waitstatus_to_string instead of ourstatus.
3450 2015-08-04 Yao Qi <yao.qi@linaro.org>
3452 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3453 if current_thread is 32 bit.
3455 2015-08-04 Yao Qi <yao.qi@linaro.org>
3457 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3458 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3459 * server.c (extended_protocol): Remove "static".
3460 * server.h (extended_protocol): Declare it.
3462 2015-08-04 Yao Qi <yao.qi@linaro.org>
3464 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3465 both aarch64 and aarch32.
3466 (aarch64_set_pc): Likewise.
3468 2015-08-04 Yao Qi <yao.qi@linaro.org>
3470 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3471 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3472 arm-with-neon.xml to srv_xmlfiles.
3473 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3474 (is_64bit_tdesc): New function.
3475 (aarch64_linux_read_description): New function.
3476 (aarch64_arch_setup): Call aarch64_linux_read_description.
3477 (regs_info): Rename to regs_info_aarch64.
3478 (aarch64_regs_info): Return right regs_info.
3479 (initialize_low_arch): Call initialize_low_arch_aarch32.
3481 2015-08-04 Yao Qi <yao.qi@linaro.org>
3483 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3484 * linux-aarch32-low.c: New file.
3485 * linux-aarch32-low.h: New file.
3486 * linux-arm-low.c (arm_fill_gregset): Move it to
3487 linux-aarch32-low.c.
3488 (arm_store_gregset): Likewise.
3489 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3490 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3491 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3492 (regs_info): Rename to regs_info_arm.
3493 (arm_regs_info): Return regs_info_aarch32 if
3494 have_ptrace_getregset is 1 and target description is
3495 arm_with_neon or arm_with_vfpv3.
3496 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3497 Call initialize_low_arch_aarch32 instead.
3499 2015-08-04 Yao Qi <yao.qi@linaro.org>
3501 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3502 * linux-low.c: ... here.
3503 * linux-low.h (have_ptrace_getregset): Declare it.
3505 2015-08-04 Pedro Alves <palves@redhat.com>
3507 * thread-db.c (struct thread_db): Use new typedefs.
3508 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3510 (disable_thread_event_reporting): Cast result of dlsym to
3511 destination function pointer type.
3512 (thread_db_mourn): Use td_ta_delete_ftype.
3514 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3516 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3518 (CDX_BREAKPOINT): Define for R2.
3519 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3520 (the_low_target): Add comments.
3522 2015-07-30 Yao Qi <yao.qi@linaro.org>
3524 * linux-arm-low.c (arm_hwcap): Remove it.
3525 (arm_read_description): New local variable arm_hwcap. Don't
3526 set arm_hwcap to zero.
3528 2015-07-30 Yao Qi <yao.qi@linaro.org>
3530 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3531 Use regcache->tdesc instead.
3532 (arm_store_wmmxregset): Likewise.
3533 (arm_fill_vfpregset): Likewise.
3534 (arm_store_vfpregset): Likewise.
3536 2015-07-30 Yao Qi <yao.qi@linaro.org>
3538 * linux-arm-low.c: Include arch/arm.h.
3539 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3540 (arm_store_gregset): Likewise.
3542 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3544 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3545 ptrace's 4th parameter.
3547 2015-07-27 Yao Qi <yao.qi@linaro.org>
3549 * configure.srv (case aarch64*-*-linux*): Don't set
3552 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3554 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3556 * linux-arm-low.c: Likewise.
3557 * linux-cris-low.c: Likewise.
3558 * linux-crisv32-low.c: Likewise.
3559 * linux-low.c: Likewise.
3560 * linux-m68k-low.c: Likewise.
3561 * linux-mips-low.c: Likewise.
3562 * linux-nios2-low.c: Likewise.
3563 * linux-s390-low.c: Likewise.
3564 * linux-sparc-low.c: Likewise.
3565 * linux-tic6x-low.c: Likewise.
3566 * linux-tile-low.c: Likewise.
3567 * linux-x86-low.c: Likewise.
3569 2015-07-24 Pedro Alves <palves@redhat.com>
3571 * config.in: Regenerate.
3572 * configure: Regenerate.
3574 2015-07-24 Pedro Alves <palves@redhat.com>
3576 * acinclude.m4: Include ../ptrace.m4.
3577 * configure.ac: Call GDB_AC_PTRACE.
3578 * config.in, configure: Regenerate.
3580 2015-07-24 Yao Qi <yao.qi@linaro.org>
3582 * linux-low.c (linux_create_inferior): Remove setting to
3583 proc->priv->new_inferior.
3584 (linux_attach): Likewise.
3585 (linux_low_filter_event): Likewise.
3586 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3588 2015-07-24 Yao Qi <yao.qi@linaro.org>
3590 * linux-low.c (linux_arch_setup): New function.
3591 (linux_low_filter_event): If proc->tdesc is NULL and
3592 proc->attached is true, call the_low_target.arch_setup.
3593 Otherwise, keep status pending, and return.
3594 (linux_resume_one_lwp_throw): Don't call get_pc if
3595 thread->while_stepping isn't NULL. Don't call
3596 get_thread_regcache if proc->tdesc is NULL.
3597 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3598 (linux_target_ops): Install arch_setup.
3599 * server.c (start_inferior): Call the_target->arch_setup.
3600 * target.h (struct target_ops) <arch_setup>: New field.
3601 (target_arch_setup): New marco.
3602 * lynx-low.c (lynx_target_ops): Update.
3603 * nto-low.c (nto_target_ops): Update.
3604 * spu-low.c (spu_target_ops): Update.
3605 * win32-low.c (win32_target_ops): Update.
3607 2015-07-24 Yao Qi <yao.qi@linaro.org>
3609 * linux-low.c (linux_add_process): Don't set
3610 proc->priv->new_inferior.
3611 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3612 (linux_attach): Likewise.
3614 2015-07-24 Yao Qi <yao.qi@linaro.org>
3616 * server.c (start_inferior): Code refactor.
3618 2015-07-24 Yao Qi <yao.qi@linaro.org>
3620 * server.c (process_serial_event): Set general_thread.
3622 2015-07-21 Yao Qi <yao.qi@linaro.org>
3624 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3625 aarch64_linux_get_debug_reg_capacity.
3627 2015-07-17 Yao Qi <yao.qi@linaro.org>
3629 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3630 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3631 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3632 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3633 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3634 (AARCH64_HWP_ALIGNMENT): Likewise.
3635 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3636 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3637 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3638 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3639 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3640 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3641 (struct aarch64_debug_reg_state): Likewise.
3642 (struct arch_lwp_info): Likewise.
3643 (aarch64_align_watchpoint): Likewise.
3644 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3645 (aarch64_watchpoint_length): Likewise.
3646 (aarch64_point_encode_ctrl_reg): Likewise
3647 (aarch64_point_is_aligned): Likewise.
3648 (aarch64_align_watchpoint): Likewise.
3649 (aarch64_linux_set_debug_regs):
3650 (aarch64_dr_state_insert_one_point): Likewise.
3651 (aarch64_dr_state_remove_one_point): Likewise.
3652 (aarch64_handle_breakpoint): Likewise.
3653 (aarch64_handle_aligned_watchpoint): Likewise.
3654 (aarch64_handle_unaligned_watchpoint): Likewise.
3655 (aarch64_handle_watchpoint): Likewise.
3657 2015-07-17 Yao Qi <yao.qi@linaro.org>
3659 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3660 and don't aarch64_get_debug_reg_state. All callers update.
3661 (aarch64_handle_aligned_watchpoint): Likewise.
3662 (aarch64_handle_unaligned_watchpoint): Likewise.
3663 (aarch64_handle_watchpoint): Likewise.
3664 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3665 (aarch64_remove_point): Likewise.
3667 2015-07-17 Yao Qi <yao.qi@linaro.org>
3669 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3671 (aarch64_handle_unaligned_watchpoint): Likewise.
3673 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3675 Revert the previous 3 commits:
3676 Move gdb_regex* to common/
3677 Move linux_find_memory_regions_full & co.
3678 gdbserver build-id attribute generator
3680 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3681 Jan Kratochvil <jan.kratochvil@redhat.com>
3683 gdbserver build-id attribute generator.
3684 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3685 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3686 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3688 (get_dynamic): Use find_pdhr to traverse program headers.
3689 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3690 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3691 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3692 (get_hex_build_id): New.
3693 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3694 to reply XML document.
3696 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3697 Jan Kratochvil <jan.kratochvil@redhat.com>
3699 * target.c: Include target/target-utils.h and fcntl.h.
3700 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3701 (target_fileio_read_stralloc): New functions.
3703 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3705 * Makefile.in (OBS): Add gdb_regex.o.
3707 * config.in: Rebuilt.
3708 * configure: Rebuilt.
3710 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3711 Jan Kratochvil <jan.kratochvil@redhat.com>
3713 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3714 * Makefile.in (OBS): Add target-utils.o.
3715 (linux-maps.o, target-utils.o): New.
3716 * configure.srv (srv_linux_obj): Add linux-maps.o.
3718 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3720 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3722 (the_low_target): Install it.
3724 2015-07-14 Pedro Alves <palves@redhat.com>
3726 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3727 Instead, ignore ECHILD, and throw an error for other errnos.
3729 2015-07-10 Pedro Alves <palves@redhat.com>
3731 * event-loop.c (struct callback_event) <data>: Change type to
3732 gdb_client_data instance instead of gdb_client_data pointer.
3733 (append_callback_event): Adjust.
3735 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3737 * linux-aarch64-low.c: Add comments for each linux_target_ops
3738 method. Remove comments already covered in target_ops and
3739 linux_target_ops definitions.
3740 (the_low_target): Add comments for each unimplemented method.
3742 2015-07-09 Yao Qi <yao.qi@linaro.org>
3744 * linux-aarch64-low.c (aarch64_regmap): Remove.
3745 (aarch64_usrregs_info): Remove.
3746 (regs_info): Set field usrregs to NULL.
3748 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3750 * linux-low.c: Include "rsp-low.h"
3751 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3752 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3753 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3754 (handle_btrace_enable_pt): New.
3755 (handle_btrace_general_set): Support "pt".
3756 (handle_btrace_conf_general_set): Support "pt:size".
3758 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3760 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3763 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3765 * linux-aarch64-low.c: Remove comment about endianness.
3766 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3767 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3770 2015-06-24 Gary Benson <gbenson@redhat.com>
3772 * linux-i386-ipa.c (stdint.h): Do not include.
3773 * lynx-i386-low.c (stdint.h): Likewise.
3774 * lynx-ppc-low.c (stdint.h): Likewise.
3775 * mem-break.c (stdint.h): Likewise.
3776 * thread-db.c (stdint.h): Likewise.
3777 * tracepoint.c (stdint.h): Likewise.
3778 * win32-low.c (stdint.h): Likewise.
3780 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3782 * server.c (write_qxfer_response): Update call to
3783 remote_escape_output.
3785 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3786 Jan Kratochvil <jan.kratochvil@redhat.com>
3788 Merge multiple hex conversions.
3789 * gdbreplay.c (tohex): Rename to 'fromhex'.
3790 (logchar): Use fromhex.
3792 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3794 * server.c (handle_qxfer_libraries): Set `version' attribute for
3797 2015-06-10 Gary Benson <gbenson@redhat.com>
3799 * target.h (struct target_ops) <multifs_open>: New field.
3800 <multifs_unlink>: Likewise.
3801 <multifs_readlink>: Likewise.
3802 * linux-low.c (nat/linux-namespaces.h): New include.
3803 (linux_target_ops): Initialize the_target->multifs_open,
3804 the_target->multifs_unlink and the_target->multifs_readlink.
3805 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3806 * hostio.c (hostio_fs_pid): New static variable.
3807 (hostio_handle_new_gdb_connection): New function.
3808 (handle_setfs): Likewise.
3809 (handle_open): Use the_target->multifs_open as appropriate.
3810 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3811 (handle_readlink): Use the_target->multifs_readlink as
3813 (handle_vFile): Handle vFile:setfs packets.
3814 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3815 after target_handle_new_gdb_connection.
3817 2015-06-10 Gary Benson <gbenson@redhat.com>
3819 * configure.ac (AC_CHECK_FUNCS): Add setns.
3820 * config.in: Regenerate.
3821 * configure: Likewise.
3822 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3823 (linux-namespaces.o): New rule.
3824 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3826 2015-06-09 Gary Benson <gbenson@redhat.com>
3828 * hostio.c (handle_open): Process mode argument with
3829 fileio_to_host_mode.
3831 2015-06-01 Yao Qi <yao.qi@linaro.org>
3833 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3834 * linux-x86-low.c: Likewise.
3836 2015-05-28 Don Breazeal <donb@codesourcery.com>
3838 * linux-low.c (handle_extended_wait): Initialize
3839 thread_info.last_resume_kind for new fork children.
3841 2015-05-15 Pedro Alves <palves@redhat.com>
3843 * target.h (target_handle_new_gdb_connection): Rewrite using if
3844 wrapped in do/while.
3846 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3848 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3849 * configure, config.in: Regenerate.
3850 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3853 2015-05-12 Don Breazeal <donb@codesourcery.com>
3855 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3856 PTRACE_EVENT_VFORK_DONE.
3857 (linux_low_ptrace_options, extended_event_reported): Add vfork
3859 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3860 and "vforkdone" for RSP 'T' Stop Reply Packet.
3861 * server.h (report_vfork_events): Declare
3864 2015-05-12 Don Breazeal <donb@codesourcery.com>
3866 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3867 (the_low_target) <new_fork>: Initialize new member.
3868 * linux-arm-low.c (arm_new_fork): New function.
3869 (the_low_target) <new_fork>: Initialize new member.
3870 * linux-low.c (handle_extended_wait): Call new target function
3872 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3873 * linux-mips-low.c (mips_add_watchpoint): New function
3874 extracted from mips_insert_point.
3875 (the_low_target) <new_fork>: Initialize new member.
3876 (mips_linux_new_fork): New function.
3877 (mips_insert_point): Call mips_add_watchpoint.
3878 * linux-x86-low.c (x86_linux_new_fork): New function.
3879 (the_low_target) <new_fork>: Initialize new member.
3881 2015-05-12 Don Breazeal <donb@codesourcery.com>
3883 * linux-low.c (handle_extended_wait): Implement return value,
3884 rename argument 'event_child' to 'event_lwp', handle
3885 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3886 (linux_low_ptrace_options): New function.
3887 (linux_low_filter_event): Call linux_low_ptrace_options,
3888 use different argument fo linux_enable_event_reporting,
3889 use return value from handle_extended_wait.
3890 (extended_event_reported): New function.
3891 (linux_wait_1): Call extended_event_reported and set
3892 status to report fork events.
3893 (linux_write_memory): Add pid to debug message.
3894 (reset_lwp_ptrace_options_callback): New function.
3895 (linux_handle_new_gdb_connection): New function.
3896 (linux_target_ops): Initialize new structure member.
3897 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3898 * lynx-low.c: Initialize new structure member.
3899 * remote-utils.c (prepare_resume_reply): Implement stop reason
3900 "fork" for "T" stop message.
3901 * server.c (handle_query): Call handle_new_gdb_connection.
3902 * server.h (report_fork_events): Declare global flag.
3903 * target.h (struct target_ops) <handle_new_gdb_connection>:
3905 (target_handle_new_gdb_connection): New macro.
3906 * win32-low.c: Initialize new structure member.
3908 2015-05-12 Don Breazeal <donb@codesourcery.com>
3910 * mem-break.c (APPEND_TO_LIST): Define macro.
3911 (clone_agent_expr): New function.
3912 (clone_one_breakpoint): New function.
3913 (clone_all_breakpoints): New function.
3914 * mem-break.h: Declare new functions.
3916 2015-05-12 Don Breazeal <donb@codesourcery.com>
3918 * linux-low.c (linux_supports_fork_events): New function.
3919 (linux_supports_vfork_events): New function.
3920 (linux_target_ops): Initialize new structure members.
3921 (initialize_low): Call linux_check_ptrace_features.
3922 * lynx-low.c (lynx_target_ops): Initialize new structure
3924 * server.c (report_fork_events, report_vfork_events):
3926 (handle_query): Add new features to qSupported packet and
3928 (captured_main): Initialize new global variables.
3929 * target.h (struct target_ops) <supports_fork_events>:
3931 <supports_vfork_events>: New member.
3932 (target_supports_fork_events): New macro.
3933 (target_supports_vfork_events): New macro.
3934 * win32-low.c (win32_target_ops): Initialize new structure
3937 2015-05-12 Gary Benson <gbenson@redhat.com>
3939 * server.c (handle_qxfer_exec_file): Use current process
3942 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3944 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3945 Remove HAVE_PTRACE_GETREGS conditionals.
3946 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3947 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3949 2015-05-08 Yao Qi <yao.qi@linaro.org>
3951 * linux-low.c (linux_supports_conditional_breakpoints): New
3953 (linux_target_ops): Install new target method.
3954 * lynx-low.c (lynx_target_ops): Install NULL hook for
3955 supports_conditional_breakpoints.
3956 * nto-low.c (nto_target_ops): Likewise.
3957 * spu-low.c (spu_target_ops): Likewise.
3958 * win32-low.c (win32_target_ops): Likewise.
3959 * server.c (handle_query): Check
3960 target_supports_conditional_breakpoints.
3961 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3963 (target_supports_conditional_breakpoints): New macro.
3965 2015-05-06 Pedro Alves <palves@redhat.com>
3968 * server.c (start_inferior): If the process exits, mourn it.
3970 2015-04-21 Gary Benson <gbenson@redhat.com>
3972 * hostio.c (fileio_open_flags_to_host): Factored out to
3973 fileio_to_host_openflags in common/fileio.c. Single use
3976 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3978 * linux-xtensa-low.c (xtensa_fill_gregset)
3979 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3982 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3984 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3985 (regs_info): Replace usrregs pointer with NULL.
3987 2015-04-17 Gary Benson <gbenson@redhat.com>
3989 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3990 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3991 * server.c (handle_qxfer_exec_file): New function.
3992 (qxfer_packets): Add exec-file entry.
3993 (handle_query): Report qXfer:exec-file:read as supported packet.
3995 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3997 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3999 2015-04-09 Gary Benson <gbenson@redhat.com>
4001 * hostio-errno.c (errno_to_fileio_error): Remove function.
4002 Update caller to use remote_fileio_to_fio_error.
4004 2015-04-09 Yao Qi <yao.qi@linaro.org>
4006 * linux-low.c (linux_insert_point): Call
4007 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4008 (linux_remove_point): Call remove_memory_breakpoint if type is
4010 * linux-x86-low.c (x86_insert_point): Don't call
4011 insert_memory_breakpoint.
4012 (x86_remove_point): Don't call remove_memory_breakpoint.
4014 2015-04-01 Pedro Alves <palves@redhat.com>
4015 Cleber Rosa <crosa@redhat.com>
4017 * server.c (gdbserver_usage): Reorganize and extend the usage
4020 2015-03-24 Pedro Alves <palves@redhat.com>
4022 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4023 output. Also dump TRAP_TRACE.
4024 (linux_low_filter_event): In debug output, distinguish a
4025 resume_stop SIGSTOP from a delayed SIGSTOP.
4027 2015-03-24 Gary Benson <gbenson@redhat.com>
4029 * linux-x86-low.c (x86_linux_new_thread): Moved to
4031 (x86_linux_prepare_to_resume): Likewise.
4033 2015-03-24 Gary Benson <gbenson@redhat.com>
4035 * Makefile.in (x86-linux-dregs.o): New rule.
4036 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4037 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4038 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4039 (x86_linux_dr_get): Likewise.
4040 (x86_linux_dr_set): Likewise.
4041 (update_debug_registers_callback): Likewise.
4042 (x86_linux_dr_set_addr): Likewise.
4043 (x86_linux_dr_get_addr): Likewise.
4044 (x86_linux_dr_set_control): Likewise.
4045 (x86_linux_dr_get_control): Likewise.
4046 (x86_linux_dr_get_status): Likewise.
4047 (x86_linux_update_debug_registers): Likewise.
4049 2015-03-24 Gary Benson <gbenson@redhat.com>
4051 * linux-x86-low.c (x86_linux_update_debug_registers):
4052 New function, factored out from...
4053 (x86_linux_prepare_to_resume): ...this.
4055 2015-03-24 Gary Benson <gbenson@redhat.com>
4057 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4058 (x86_linux_dr_set): Likewise.
4059 (update_debug_registers_callback): Likewise.
4060 (x86_linux_dr_set_addr): Likewise.
4061 (x86_linux_dr_get_addr): Likewise.
4062 (x86_linux_dr_set_control): Likewise.
4063 (x86_linux_dr_get_control): Likewise.
4064 (x86_linux_dr_get_status): Likewise.
4065 (x86_linux_prepare_to_resume): Likewise.
4067 2015-03-24 Gary Benson <gbenson@redhat.com>
4069 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4070 Use perror_with_name. Pass string through gettext.
4071 (x86_linux_dr_set): Likewise.
4073 2015-03-24 Gary Benson <gbenson@redhat.com>
4075 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4076 (x86_linux_dr_set_addr): ...this.
4077 (x86_dr_low_get_addr): Rename to...
4078 (x86_linux_dr_get_addr): ...this.
4079 (x86_dr_low_set_control): Rename to...
4080 (x86_linux_dr_set_control): ...this.
4081 (x86_dr_low_get_control): Rename to...
4082 (x86_linux_dr_get_control): ...this.
4083 (x86_dr_low_get_status): Rename to...
4084 (x86_linux_dr_get_status): ...this.
4085 (x86_dr_low): Update with new function names.
4087 2015-03-24 Gary Benson <gbenson@redhat.com>
4089 * Makefile.in (x86-linux.o): New rule.
4090 * configure.srv: Add x86-linux.o to relevant targets.
4091 * linux-low.c (lwp_set_arch_private_info): New function.
4092 (lwp_arch_private_info): Likewise.
4093 * linux-x86-low.c: Include nat/x86-linux.h.
4094 (arch_lwp_info): Removed structure.
4095 (update_debug_registers_callback):
4096 Use lwp_set_debug_registers_changed.
4097 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4098 and lwp_set_debug_registers_changed.
4099 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4101 2015-03-24 Gary Benson <gbenson@redhat.com>
4103 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4104 * linux-arm-low.c (arm_new_thread): Likewise.
4105 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4106 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4107 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4108 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4110 2015-03-24 Gary Benson <gbenson@redhat.com>
4112 * linux-low.c (ptid_of_lwp): New function.
4113 (lwp_is_stopped): Likewise.
4114 (lwp_stop_reason): Likewise.
4115 * linux-x86-low.c (update_debug_registers_callback):
4117 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4120 2015-03-24 Gary Benson <gbenson@redhat.com>
4122 * linux-low.h (linux_stop_lwp): Remove declaration.
4124 2015-03-24 Gary Benson <gbenson@redhat.com>
4126 * linux-low.h: Include nat/linux-nat.h.
4127 * linux-low.c (iterate_over_lwps_args): New structure.
4128 (iterate_over_lwps_filter): New function.
4129 (iterate_over_lwps): Likewise.
4130 * linux-x86-low.c (update_debug_registers_callback):
4131 Update signature to what iterate_over_lwps expects.
4132 Remove PID check that iterate_over_lwps now performs.
4133 (x86_dr_low_set_addr): Use iterate_over_lwps.
4134 (x86_dr_low_set_control): Likewise.
4136 2015-03-24 Gary Benson <gbenson@redhat.com>
4138 * linux-x86-low.c (x86_debug_reg_state): New function.
4139 (x86_linux_prepare_to_resume): Use the above.
4141 2015-03-24 Gary Benson <gbenson@redhat.com>
4143 * linux-low.c (current_lwp_ptid): New function.
4144 * linux-x86-low.c: Include nat/linux-nat.h.
4145 (x86_dr_low_get_addr): Use current_lwp_ptid.
4146 (x86_dr_low_get_control): Likewise.
4147 (x86_dr_low_get_status): Likewise.
4149 2015-03-20 Pedro Alves <palves@redhat.com>
4151 * tracepoint.c (cmd_qtstatus): Make "str" const.
4153 2015-03-20 Pedro Alves <palves@redhat.com>
4155 * server.c (handle_general_set): Make "req_str" const.
4157 2015-03-19 Pedro Alves <palves@redhat.com>
4159 * linux-low.c (linux_resume_one_lwp): Rename to ...
4160 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4161 instead call perror_with_name.
4162 (check_ptrace_stopped_lwp_gone): New function.
4163 (linux_resume_one_lwp): Reimplement as wrapper around
4164 linux_resume_one_lwp_throw that swallows errors if the LWP is
4167 2015-03-19 Pedro Alves <palves@redhat.com>
4169 * linux-low.c (count_events_callback, select_event_lwp_callback):
4170 No longer check whether the thread has resume_stop as last resume
4173 2015-03-19 Pedro Alves <palves@redhat.com>
4175 * linux-low.c (count_events_callback, select_event_lwp_callback):
4176 Use the lwp's status_pending_p field, not the thread's.
4178 2015-03-19 Pedro Alves <palves@redhat.com>
4180 * linux-low.c (select_event_lwp_callback): Update comments to
4181 no longer mention SIGTRAP.
4183 2015-03-18 Gary Benson <gbenson@redhat.com>
4185 * server.c (handle_query): Do not report vFile:fstat as supported.
4187 2015-03-11 Gary Benson <gbenson@redhat.com>
4189 * hostio.c (sys/types.h): New include.
4190 (sys/stat.h): Likewise.
4191 (common-remote-fileio.h): Likewise.
4192 (handle_fstat): New function.
4193 (handle_vFile): Handle vFile:fstat packets.
4195 2015-03-11 Gary Benson <gbenson@redhat.com>
4197 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4198 struct stat.st_blocks and struct stat.st_blksize.
4199 * configure: Regenerate.
4200 * config.in: Likewise.
4201 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4202 (OBS): Add common-remote-fileio.o.
4203 (common-remote-fileio.o): New rule.
4205 2015-03-09 Pedro Alves <palves@redhat.com>
4207 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4208 'struct sockaddr' pointer in 'accept' call.
4210 2015-03-09 Pedro Alves <palves@redhat.com>
4213 2015-03-07 Pedro Alves <palves@redhat.com>
4214 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4215 or <winsock2.h> here. Instead include "gdb_socket.h".
4216 (remote_open): Use union gdb_sockaddr_u.
4217 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4218 or <winsock2.h> here. Instead include "gdb_socket.h".
4219 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4220 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4222 (init_named_socket, gdb_agent_helper_thread): Use union
4225 2015-03-07 Pedro Alves <palves@redhat.com>
4227 * configure.ac (build_warnings): Move
4228 -Wdeclaration-after-statement to the C-specific set.
4229 * configure: Regenerate.
4231 2015-03-07 Pedro Alves <palves@redhat.com>
4233 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4234 or <winsock2.h> here. Instead include "gdb_socket.h".
4235 (remote_open): Use union gdb_sockaddr_u.
4236 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4237 or <winsock2.h> here. Instead include "gdb_socket.h".
4238 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4239 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4241 (init_named_socket, gdb_agent_helper_thread): Use union
4244 2015-03-07 Pedro Alves <palves@redhat.com>
4246 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4249 2015-03-06 Yao Qi <yao.qi@linaro.org>
4251 * linux-aarch64-low.c (aarch64_insert_point): Use
4252 show_debug_regs as a boolean.
4253 (aarch64_remove_point): Likewise.
4255 2015-03-05 Pedro Alves <palves@redhat.com>
4257 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4258 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4259 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4260 * nto-low.c (nto_target_ops): Likewise.
4261 * spu-low.c (spu_target_ops): Likewise.
4262 * win32-low.c (win32_target_ops): Likewise.
4264 2015-03-04 Pedro Alves <palves@redhat.com>
4266 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4267 Decide whether a breakpoint triggered based on the SIGTRAP's
4269 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4270 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4271 (linux_low_filter_event): Check for breakpoints before checking
4273 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4275 (linux_stopped_by_sw_breakpoint)
4276 (linux_supports_stopped_by_sw_breakpoint)
4277 (linux_stopped_by_hw_breakpoint)
4278 (linux_supports_stopped_by_hw_breakpoint): New functions.
4279 (linux_target_ops): Install new target methods.
4281 2015-03-04 Pedro Alves <palves@redhat.com>
4283 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4284 * server.c (swbreak_feature, hwbreak_feature): New globals.
4285 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4286 (captured_main): Clear swbreak_feature and hwbreak_feature.
4287 * server.h (swbreak_feature, hwbreak_feature): Declare.
4288 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4289 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4290 supports_stopped_by_hw_breakpoint>: New fields.
4291 (target_supports_stopped_by_sw_breakpoint)
4292 (target_stopped_by_sw_breakpoint)
4293 (target_supports_stopped_by_hw_breakpoint)
4294 (target_stopped_by_hw_breakpoint): Declare.
4296 2015-03-04 Pedro Alves <palves@redhat.com>
4298 enum lwp_stop_reason -> enum target_stop_reason
4299 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4300 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4301 (linux_wait_1, stuck_in_jump_pad_callback)
4302 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4303 (linux_stopped_by_watchpoint):
4304 * linux-low.h (enum lwp_stop_reason): Delete.
4305 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4306 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4308 2015-03-04 Yao Qi <yao.qi@linaro.org>
4310 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4312 2015-03-03 Gary Benson <gbenson@redhat.com>
4314 * hostio.c (handle_vFile): Fix prefix lengths.
4316 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4318 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4321 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4323 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4324 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4325 (clean): Add "rm -f" for above C files.
4326 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4327 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4328 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4329 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4330 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4331 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4332 (init_registers_s390x_vx_linux64)
4333 (init_registers_s390x_tevx_linux64)
4334 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4335 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4337 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4338 (s390_store_vxrs_high): New functions.
4339 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4341 (s390_arch_setup): Add logic for selecting one of the new target
4342 descriptions. Activate the new vector regsets if applicable.
4343 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4344 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4345 and init_registers_s390x_tevx_linux64.
4347 2015-03-01 Pedro Alves <palves@redhat.com>
4349 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4352 2015-02-27 Pedro Alves <palves@redhat.com>
4354 * linux-x86-low.c (u_debugreg_offset): New function.
4355 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4357 2015-02-27 Pedro Alves <palves@redhat.com>
4359 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4360 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4361 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4362 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4363 (ps_lsetfpregs, ps_getpid)
4364 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4365 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4366 (ps_lsetxregs, ps_plog): Declare.
4368 2015-02-27 Pedro Alves <palves@redhat.com>
4370 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4371 IP_AGENT_EXPORT_FUNC.
4372 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4373 IP_AGENT_EXPORT_FUNC.
4374 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4375 (IP_AGENT_EXPORT): Delete.
4376 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4377 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4378 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4379 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4380 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4381 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4382 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4383 (traceframe_read_count, traceframe_write_count)
4384 (traceframes_created, trace_state_variables, get_raw_reg)
4385 (get_trace_state_variable_value, set_trace_state_variable_value)
4386 (ust_loaded, helper_thread_id, cmd_buf): Use
4387 IPA_SYM_EXPORTED_NAME.
4388 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4389 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4390 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4391 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4392 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4393 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4394 EXTERN_C_PUSH/EXTERN_C_POP.
4395 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4396 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4397 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4398 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4399 (traceframe_write_count, traceframe_read_count)
4400 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4401 (about_to_request_buffer_space, get_trace_state_variable_value)
4402 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4403 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4404 EXTERN_C_PUSH/EXTERN_C_POP.
4405 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4406 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4407 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4408 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4409 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4410 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4411 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4412 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4414 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4415 (IP_AGENT_EXPORT_VAR_DECL): Define.
4417 (gdb_agent_get_raw_reg): Declare.
4419 2015-02-27 Tom Tromey <tromey@redhat.com>
4420 Pedro Alves <palves@redhat.com>
4422 Rename symbols whose names are reserved C++ keywords throughout.
4424 2015-02-27 Pedro Alves <palves@redhat.com>
4426 * Makefile.in (COMPILER): New, get it from autoconf.
4427 (CXX): Get from autoconf instead.
4428 (COMPILE.pre): Use COMPILER.
4429 (CC-LD): Rename to ...
4430 (CC_LD): ... this. Use COMPILER.
4431 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4432 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4433 * acinclude.m4: Include build-with-cxx.m4.
4434 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4435 Disable -Werror by default if building in C++ mode.
4436 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4437 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4438 the C++ compiler. Save/restore CXXFLAGS too.
4439 * configure: Regenerate.
4441 2015-02-27 Pedro Alves <palves@redhat.com>
4443 * acinclude.m4: Include libiberty.m4.
4444 * configure.ac: Call libiberty_INIT.
4445 * config.in, configure: Regenerate.
4447 2015-02-26 Pedro Alves <palves@redhat.com>
4449 * linux-low.c (linux_wait_1): When incrementing the PC past a
4450 program breakpoint always use the_low_target.breakpoint_len as
4451 increment, rather than the maximum between that and
4452 the_low_target.decr_pc_after_break.
4454 2015-02-23 Pedro Alves <palves@redhat.com>
4456 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4457 thread was doing a step-over; always adjust the PC if
4458 we stepped over a permanent breakpoint.
4459 (linux_wait_1): If we stepped over breakpoint that was on top of a
4460 permanent breakpoint, manually advance the PC past it.
4462 2015-02-23 Pedro Alves <palves@redhat.com>
4464 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4466 (x86_fill_gregset, x86_store_gregset): Use it when handling
4469 2015-02-20 Pedro Alves <palves@redhat.com>
4471 * thread-db.c: Include "nat/linux-procfs.h".
4472 (thread_db_init): Skip listing new threads if the kernel supports
4473 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4475 2015-02-20 Pedro Alves <palves@redhat.com>
4477 * linux-low.c (status_pending_p_callback): Use ptid_match.
4479 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4481 PR breakpoints/16812
4482 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4483 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4484 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4486 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4488 PR breakpoints/15956
4489 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4491 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4493 * linux-low.c (linux_low_btrace_conf): Print size.
4494 * server.c (handle_btrace_conf_general_set): New.
4495 (hanle_general_set): Call handle_btrace_conf_general_set.
4496 (handle_query): Report Qbtrace-conf:bts:size as supported.
4498 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4500 * linux-low.c (linux_low_enable_btrace): Update parameters.
4501 (linux_low_btrace_conf): New.
4502 (linux_target_ops)<to_btrace_conf>: Initialize.
4503 * server.c (current_btrace_conf): New.
4504 (handle_btrace_enable): Rename to ...
4505 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4506 to target_enable_btrace. Update comment. Update users.
4507 (handle_qxfer_btrace_conf): New.
4508 (qxfer_packets): Add btrace-conf entry.
4509 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4510 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4511 (target_ops)<read_btrace_conf>: New.
4512 (target_enable_btrace): Update parameters.
4513 (target_read_btrace_conf): New.
4515 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4517 * server.c (handle_btrace_general_set): Remove call to
4518 target_supports_btrace.
4519 (supported_btrace_packets): New.
4520 (handle_query): Call supported_btrace_packets.
4521 * target.h: include btrace-common.h.
4522 (btrace_target_info): Removed.
4523 (supports_btrace, target_supports_btrace): Update parameters.
4525 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4527 * Makefile.in (SFILES): Add common/btrace-common.c.
4528 (OBS): Add common/btrace-common.o.
4529 (btrace-common.o): Add build rules.
4530 * linux-low: Include btrace-common.h.
4531 (linux_low_read_btrace): Use struct btrace_data. Call
4532 btrace_data_init and btrace_data_fini.
4534 2015-02-06 Pedro Alves <palves@redhat.com>
4536 * thread-db.c (find_new_threads_callback): Add debug output.
4538 2015-02-04 Pedro Alves <palves@redhat.com>
4540 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4541 (resume_stopped_resumed_lwps): New function.
4542 (linux_wait_for_event_filtered): Use it.
4544 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4546 * Makefile.in (SFILES): Add linux-personality.c.
4547 (linux-personality.o): New rule.
4548 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4549 list of objects to be built.
4550 * linux-low.c: Include nat/linux-personality.h.
4551 (linux_create_inferior): Remove code to disable address space
4552 randomization (moved to ../nat/linux-personality.c). Create
4553 cleanup to disable address space randomization.
4555 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4557 * Makefile.in (posix-strerror.o): New rule.
4558 (mingw-strerror.o): Likewise.
4559 * configure: Regenerated.
4560 * configure.ac: Source file ../common/common.host. Initialize new
4561 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4563 2015-01-14 Yao Qi <yao@codesourcery.com>
4565 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4566 (ppc-linux.o): New rule.
4567 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4568 * configure.ac: AC_CHECK_FUNCS(getauxval).
4569 * config.in: Re-generated.
4570 * configure: Re-generated.
4571 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4572 ppc64_64bit_inferior_p
4574 2015-01-14 Yao Qi <yao@codesourcery.com>
4576 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4577 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4578 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4579 (PT_ORIG_R3, PT_TRAP): Likewise.
4580 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4581 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4582 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4584 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4586 * i387-fp.c (i387_cache_to_xsave): In look over
4587 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4588 zmmh_low_space field by use of zmmh_high_space.
4590 2015-01-09 Pedro Alves <palves@redhat.com>
4592 * linux-low.c (step_over_bkpt): Move higher up in the file.
4593 (handle_extended_wait): Don't store the stop_pc here.
4594 (get_stop_pc): Adjust comments and rename to ...
4595 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4596 stopped for a software breakpoint or hardware breakpoint.
4597 (thread_still_has_status_pending_p): New function.
4598 (status_pending_p_callback): Use
4599 thread_still_has_status_pending_p. If the event is no longer
4600 interesting, resume the LWP.
4601 (handle_tracepoints): Add assert.
4602 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4603 (wstatus_maybe_breakpoint): New function.
4604 (cancel_breakpoint): Delete function.
4605 (check_stopped_by_watchpoint): New function, factored out from
4606 linux_low_filter_event.
4607 (lp_status_maybe_breakpoint): Delete function.
4608 (linux_low_filter_event): Remove filter_ptid argument.
4609 Leave thread group exits pending here. Store the LWP's stop PC.
4610 Always leave events pending.
4611 (linux_wait_for_event_filtered): Pull all events out of the
4612 kernel, and leave them all pending.
4613 (count_events_callback, select_event_lwp_callback): Consider all
4615 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4616 (select_event_lwp): Only give preference to the stepping LWP in
4617 all-stop mode. Adjust comments.
4618 (ignore_event): New function.
4619 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4620 references to cancel_breakpoints. Adjust to renames. Also give
4621 equal priority to all LWPs that have had events in non-stop mode.
4622 If reporting a software breakpoint event, unadjust the LWP's PC.
4623 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4624 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4626 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4627 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4628 (linux_stopped_by_watchpoint): Adjust.
4629 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4630 * linux-low.h (enum lwp_stop_reason): New.
4631 (struct lwp_info) <stop_pc>: Adjust comment.
4632 <stopped_by_watchpoint>: Delete field.
4633 <stop_reason>: New field.
4634 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4635 * mem-break.c (software_breakpoint_inserted_here)
4636 (hardware_breakpoint_inserted_here): New function.
4637 * mem-break.h (software_breakpoint_inserted_here)
4638 (hardware_breakpoint_inserted_here): Declare.
4639 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4640 (cancel_breakpoints): Delete.
4641 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4642 (upload_fast_traceframes): Remove references to
4645 2015-01-09 Pedro Alves <palves@redhat.com>
4647 * thread-db.c (find_new_threads_callback): Ignore thread if the
4648 kernel thread ID is -1.
4650 2015-01-09 Pedro Alves <palves@redhat.com>
4652 * linux-low.c (linux_attach_fail_reason_string): Move to
4653 nat/linux-ptrace.c, and rename.
4654 (linux_attach_lwp): Update comment.
4655 (attach_proc_task_lwp_callback): New function.
4656 (linux_attach): Adjust to rename and use
4657 linux_proc_attach_tgid_threads.
4658 (linux_attach_fail_reason_string): Delete declaration.
4660 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4662 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4663 * server.c (gdbserver_version): Likewise.
4665 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4667 * remote-utils.c: Include ctype.h.
4668 (input_interrupt): Explicitly handle the case when the char
4669 received is the NUL byte. Improve the printing of non-ASCII
4672 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4674 * linux-low.c (linux_low_filter_event): Update call to
4675 linux_enable_event_reporting following the addition of
4676 a new parameter to that function.
4678 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4681 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4682 (AARCH64_FPCR_REGNO): Likewise.
4683 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4684 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4685 (aarch64_store_fpregset): Likewise.
4687 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4689 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4690 Remove FIXME comment about assumption about N.
4692 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4694 * configure.ac: If large-file support is disabled in GDBserver,
4695 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4696 * configure: Regenerate.
4698 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4700 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4701 warning upon ENODATA from ptrace.
4702 * linux-s390-low.c (s390_store_tdb): New.
4703 (s390_regsets): Add regset for NT_S390_TDB.
4705 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4707 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4708 without a fill_function.
4709 * linux-s390-low.c (s390_fill_last_break): Remove.
4710 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4711 (s390_arch_setup): Use regset's size instead of fill_function for
4714 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4716 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4717 the regset's store function when ptrace returned an error.
4718 * regcache.c (get_thread_regcache): Invalidate register cache
4719 before fetching inferior's registers.
4721 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4723 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4724 while-loop as for-loop.
4725 (regsets_store_inferior_registers): Likewise.
4727 2014-11-28 Yao Qi <yao@codesourcery.com>
4729 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4730 * config.in, configure: Re-generate.
4731 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4734 2014-11-21 Yao Qi <yao@codesourcery.com>
4736 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4737 (AC_CHECK_HEADERS): Remove malloc.h.
4738 * configure: Re-generated.
4739 * config.in: Re-generated.
4740 * server.h: Don't include alloca.h and malloc.h.
4741 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4742 Don't include malloc.h.
4744 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4746 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4747 corresponding ERRNO check in same block.
4749 2014-11-12 Pedro Alves <palves@redhat.com>
4751 * server.c (cont_thread): Update comment.
4752 (start_inferior, attach_inferior): No longer clear cont_thread.
4753 (handle_v_cont): No longer set cont_thread.
4754 (captured_main): Clear cont_thread each time a GDB connects.
4756 2014-11-12 Pedro Alves <palves@redhat.com>
4758 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4759 thread, and don't resume all threads if the Hc thread has exited.
4761 2014-11-12 Pedro Alves <palves@redhat.com>
4763 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4764 the process group instead of to a specific LWP.
4766 2014-10-15 Pedro Alves <palves@redhat.com>
4769 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4771 (arm_set_thread_context): Delete.
4772 (the_low_target): Adjust.
4773 * win32-i386-low.c (debug_registers_changed)
4774 (debug_registers_used): Delete.
4775 (update_debug_registers_callback): New function.
4776 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4777 needing to update their debug registers.
4778 (win32_get_current_dr): New function.
4779 (x86_dr_low_get_addr, x86_dr_low_get_control)
4780 (x86_dr_low_get_status): Fetch the debug register from the thread
4782 (i386_initial_stuff): Adjust.
4783 (i386_get_thread_context): Remove current_event parameter. Don't
4784 clear debug_registers_changed nor copy DR values to
4786 (i386_set_thread_context): Delete.
4787 (i386_prepare_to_resume): New function.
4788 (i386_thread_added): Mark the thread as needing to update irs
4790 (the_low_target): Remove i386_set_thread_context and install
4791 i386_prepare_to_resume.
4792 * win32-low.c (win32_get_thread_context): Adjust.
4793 (win32_set_thread_context): Use SetThreadContext
4795 (win32_prepare_to_resume): New function.
4796 (win32_require_context): New function, factored out from ...
4797 (thread_rec): ... this.
4798 (continue_one_thread): Call win32_prepare_to_resume on each thread
4799 we're about to continue.
4800 (win32_resume): Call win32_prepare_to_resume on the event thread.
4801 * win32-low.h (struct win32_thread_info)
4802 <debug_registers_changed>: New field.
4803 (struct win32_target_ops): Change prototype of set_thread_context,
4804 delete set_thread_context and add prepare_to_resume.
4805 (win32_require_context): New declaration.
4807 2014-10-08 Gary Benson <gbenson@redhat.com>
4809 * server.h: Do not include common-exceptions.h.
4811 2014-10-08 Gary Benson <gbenson@redhat.com>
4813 * server.h: Do not include cleanups.h.
4815 2014-09-30 James Hogan <james.hogan@imgtec.com>
4817 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4820 2014-09-23 Yao Qi <yao@codesourcery.com>
4822 * linux-low.c (lp_status_maybe_breakpoint): New function.
4823 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4824 (count_events_callback): Likewise.
4825 (select_event_lwp_callback): Likewise.
4826 (cancel_breakpoints_callback): Likewise.
4828 2014-09-19 Don Breazeal <donb@codesourcery.com>
4830 * linux-low.c (handle_extended_wait): Call
4831 linux_ptrace_get_extended_event.
4832 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4833 linux_is_extended_waitstatus.
4835 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4837 * Makefile.in (CPPFLAGS): Define.
4838 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4839 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4841 2014-09-16 Gary Benson <gbenson@redhat.com>
4843 * inferiors.h (current_inferior): Renamed as...
4844 (current_thread): New variable. All uses updated.
4845 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4846 (maybe_move_out_of_jump_pad): Likewise.
4847 (cancel_breakpoint): Likewise.
4848 (linux_low_filter_event): Likewise.
4849 (wait_for_sigstop): Likewise.
4850 (linux_resume_one_lwp): Likewise.
4851 (need_step_over_p): Likewise.
4852 (start_step_over): Likewise.
4853 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4854 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4855 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4856 and save_inferior as saved_thread.
4857 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4859 (regcache_invalidate_thread): Likewise.
4860 * remote-utils.c (prepare_resume_reply): Likewise.
4861 * thread-db.c (thread_db_get_tls_address): Likewise.
4862 (disable_thread_event_reporting): Likewise.
4863 (remove_thread_event_breakpoints): Likewise.
4864 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4866 * target.h (set_desired_inferior): Renamed as...
4867 (set_desired_thread): New declaration. All uses updated.
4868 * server.c (myresume): Updated comment to reference thread instead
4870 (handle_serial_event): Likewise.
4871 (handle_target_event): Likewise.
4873 2014-09-12 Tom Tromey <tromey@redhat.com>
4874 Gary Benson <gbenson@redhat.com>
4876 * regcache.h: Include common-regcache.h.
4877 (regcache_read_pc): Don't declare.
4878 * regcache.c (get_thread_regcache_for_ptid): New function.
4880 2014-09-11 Tom Tromey <tromey@redhat.com>
4881 Gary Benson <gbenson@redhat.com>
4883 * symbol.c: New file.
4884 * Makefile.in (SFILES): Add symbol.c.
4885 (OBS): Add symbol.o.
4887 2014-09-11 Gary Benson <gbenson@redhat.com>
4889 * target.c (target_stop_ptid, target_continue_ptid): New
4892 2014-09-11 Tom Tromey <tromey@redhat.com>
4893 Gary Benson <gbenson@redhat.com>
4895 * target.h: Include target/target.h.
4896 * target.c (target_read_memory, target_read_uint32)
4897 (target_write_memory): New functions.
4899 2014-09-11 Gary Benson <gbenson@redhat.com>
4901 * server.h (debug_hw_points): Don't declare.
4902 * server.c (debug_hw_points): Don't define. Replace all uses
4903 with show_debug_regs.
4904 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4905 all uses with show_debug_regs.
4907 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4909 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4910 endianness into account.
4911 (ppc_supply_ptrace_register): Likewise.
4913 2014-09-03 James Hogan <james.hogan@imgtec.com>
4915 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4916 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4918 2014-09-03 Gary Benson <gbenson@redhat.com>
4920 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4921 ALL_DEBUG_ADDRESS_REGISTERS.
4923 2014-09-02 Gary Benson <gbenson@redhat.com>
4925 * i386-low.h: Renamed as...
4926 * x86-low.h: New file. All type, function and variable name
4927 prefixes changed from "i386_" to "x86_". All references updated.
4928 * i386-low.c: Renamed as...
4929 * x86-low.c: New file. All type, function and variable name
4930 prefixes changed from "i386_" to "x86_". All references updated.
4932 2014-09-02 Gary Benson <gbenson@redhat.com>
4934 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4935 (x86_linux_new_thread): Likewise.
4937 2014-08-29 Gary Benson <gbenson@redhat.com>
4939 * server.h (setjmp.h): Do not include.
4940 (toplevel): Do not declare.
4941 (common-exceptions.h): Include.
4942 (cleanups.h): Likewise.
4943 * server.c (toplevel): Do not define.
4944 (exit_code): New static global.
4945 (detach_or_kill_for_exit_cleanup): New function.
4946 (main): New function. Original main renamed to...
4947 (captured_main): New function.
4948 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4950 2014-08-29 Gary Benson <gbenson@redhat.com>
4952 * Makefile.in (SFILES): Add common/common-exceptions.c.
4953 (OBS): Add common-exceptions.o.
4954 (common-exceptions.o): New rule.
4955 * utils.c (prepare_to_throw_exception): New function.
4957 2014-08-29 Gary Benson <gbenson@redhat.com>
4959 * config.in: Regenerate.
4960 * configure: Likewise.
4962 2014-08-29 Gary Benson <gbenson@redhat.com>
4964 * Makefile.in (SFILES): Add common/cleanups.c.
4966 (cleanups.o): New rule.
4968 2014-08-29 Gary Benson <gbenson@redhat.com>
4970 * utils.c (internal_vwarning): New function.
4972 2014-08-28 Gary Benson <gbenson@redhat.com>
4974 * utils.h (fatal): Remove declaration.
4975 * utils.c (fatal): Remove function.
4977 2014-08-28 Gary Benson <gbenson@redhat.com>
4979 * tracepoint.c (gdb_agent_init): Replace fatal with
4981 (initialize_tracepoint): Likewise.
4983 2014-08-28 Gary Benson <gbenson@redhat.com>
4985 * remote-utils.c (remote_prepare): Replace fatal with error.
4987 2014-08-28 Gary Benson <gbenson@redhat.com>
4989 * linux-low.c (linux_async): Replace fatal with warning.
4991 (linux_start_non_stop): Return -1 if linux_async failed.
4993 2014-08-28 Gary Benson <gbenson@redhat.com>
4995 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4997 (i386_dr_low_get_addr): Remove vague comment.
4998 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5001 2014-08-28 Gary Benson <gbenson@redhat.com>
5003 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5004 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5006 (linux_resume_one_lwp): Likewise.
5007 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5009 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5010 with internal_error.
5011 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5012 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5013 (find_register_by_name): Replace fatal with internal_error.
5014 (find_regno): Likewise.
5015 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5016 * thread-db.c (thread_db_create_event): Likewise.
5017 (thread_db_load_search): Likewise.
5018 (try_thread_db_load_1): Likewise.
5019 * tracepoint.c (get_jump_space_head): Replace fatal with
5021 (claim_trampoline_space): Likewise.
5022 (have_fast_tracepoint_trampoline_buffer): Likewise.
5023 (cmd_qtstart): Likewise.
5024 (stop_tracing): Likewise.
5025 (fast_tracepoint_collecting): Likewise.
5026 (target_malloc): Likewise.
5027 (download_tracepoint): Likewise.
5028 (download_trace_state_variables): Replace check with gdb_assert.
5029 (upload_fast_traceframes): Replace fatal with internal_error.
5031 2014-08-19 Tom Tromey <tromey@redhat.com>
5032 Gary Benson <gbenson@redhat.com>
5034 * Makefile.in (SFILES): Add common/common-debug.c.
5035 (OBS): Add common-debug.o.
5036 (common-debug.o): New rule.
5037 * debug.h (debug_printf): Don't declare.
5038 * debug.c (debug_printf): Renamed and rewritten as...
5039 (debug_vprintf): New function.
5041 2014-08-19 Gary Benson <gbenson@redhat.com>
5043 * utils.h: Do not include print-utils.h.
5045 2014-08-19 Tom Tromey <tromey@redhat.com>
5046 Gary Benson <gbenson@redhat.com>
5048 * server.h: Add static assertion.
5049 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5051 2014-08-19 Tom Tromey <tromey@redhat.com>
5052 Gary Benson <gbenson@redhat.com>
5054 * Makefile.in (SFILES): Add common/errors.c.
5055 (OBS): Add errors.o.
5056 (IPA_OBS): Add errors-ipa.o.
5057 (errors.o): New rule.
5058 (errors-ipa.o): Likewise.
5059 * utils.h (perror_with_name, error, warning): Don't declare.
5060 * utils.c (warning): Renamed and rewritten as...
5061 (vwarning): New function.
5062 (error): Renamed and rewritten as...
5063 (verror): New function.
5064 (internal_error): Renamed and rewritten as...
5065 (internal_verror): New function.
5067 2014-08-07 Gary Benson <gbenson@redhat.com>
5069 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5070 * configure: Regenerate.
5071 * config.in: Likewise.
5072 * server.h: Do not include errno.h.
5073 * event-loop.c: Likewise.
5074 * hostio-errno.c: Likewise.
5075 * linux-low.c: Likewise.
5076 * remote-utils.c: Likewise.
5077 * spu-low.c: Likewise.
5078 * utils.c: Likewise.
5079 * gdbreplay.c: Unconditionally include errno.h.
5081 2014-08-07 Gary Benson <gbenson@redhat.com>
5083 * server.h: Do not include string.h.
5084 * event-loop.c: Likewise.
5085 * linux-low.c: Likewise.
5086 * regcache.c: Likewise.
5087 * remote-utils.c: Likewise.
5088 * spu-low.c: Likewise.
5089 * utils.c: Likewise.
5091 2014-08-07 Gary Benson <gbenson@redhat.com>
5093 * server.h: Do not include gdb_assert.h.
5095 2014-08-07 Gary Benson <gbenson@redhat.com>
5097 * server.h: Do not include common-utils.h.
5099 2014-08-07 Gary Benson <gbenson@redhat.com>
5101 * server.h: Do not include ptid.h.
5102 * notif.h: Likewise.
5104 2014-08-07 Gary Benson <gbenson@redhat.com>
5106 * server.h: Do not include gdb_locale.h.
5108 2014-08-07 Gary Benson <gbenson@redhat.com>
5110 * server.h: Do not include gdb/signals.h.
5111 * win32-low.c: Likewise.
5113 2014-08-07 Gary Benson <gbenson@redhat.com>
5115 * server.h: Do not include pathmax.h.
5117 2014-08-07 Gary Benson <gbenson@redhat.com>
5119 * server.h: Do not include libiberty.h.
5120 * linux-bfin-low.c: Likewise.
5122 2014-08-07 Gary Benson <gbenson@redhat.com>
5124 * server.h: Do not include ansidecl.h.
5126 2014-08-07 Gary Benson <gbenson@redhat.com>
5128 * linux-x86-low.c: Do not include stddef.h.
5129 * lynx-ppc-low.c: Likewise.
5130 * tracepoint.c: Likewise.
5132 2014-08-07 Gary Benson <gbenson@redhat.com>
5134 * server.h: Do not include stdarg.h.
5135 * nto-low.c: Likewise.
5137 2014-08-07 Gary Benson <gbenson@redhat.com>
5139 * server.h: Do not include stdlib.h.
5140 * inferiors.c: Likewise.
5141 * linux-low.c: Likewise.
5142 * regcache.c: Likewise.
5143 * spu-low.c: Likewise.
5144 * tracepoint.c: Likewise.
5145 * utils.c: Likewise.
5147 2014-08-07 Gary Benson <gbenson@redhat.com>
5149 * server.h: Do not include stdio.h.
5150 * linux-low.c: Likewise.
5151 * remote-utils.c: Likewise.
5152 * spu-low.c: Likewise.
5153 * utils.c: Likewise.
5154 * wincecompat.c: Likewise.
5156 2014-08-06 Gary Benson <gbenson@redhat.com>
5158 * regcache.c (init_register_cache): Move conditionals inside if.
5160 2014-08-06 Gary Benson <gbenson@redhat.com>
5162 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5164 2014-07-31 Gary Benson <gbenson@redhat.com>
5166 * ax.h: Do not include server.h.
5167 * gdbthread.h: Likewise.
5168 * lynx-low.h: Likewise.
5169 * notif.h: Likewise.
5171 2014-07-30 Gary Benson <gbenson@redhat.com>
5173 * server.h: Include common-defs.h.
5174 Do not include config.h or build-gnulib-gdbserver/config.h.
5176 2014-07-30 Gary Benson <gbenson@redhat.com>
5178 * hostio-errno.c: Move server.h to top of includes list.
5179 * inferiors.c: Likewise.
5180 * linux-x86-low.c: Likewise.
5181 * notif.c: Include server.h.
5183 2014-07-24 Tom Tromey <tromey@redhat.com>
5184 Gary Benson <gbenson@redhat.com>
5186 * server.h (CORE_ADDR): Now unsigned.
5188 2014-07-16 Pedro Alves <palves@redhat.com>
5190 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5192 2014-07-15 Pedro Alves <palves@redhat.com>
5194 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5197 2014-07-11 Pedro Alves <palves@redhat.com>
5199 * linux-low.c (kill_wait_lwp): New function, based on
5200 kill_one_lwp_callback, but use my_waitpid directly.
5201 (kill_one_lwp_callback, linux_kill): Use it.
5203 2014-06-23 Pedro Alves <palves@redhat.com>
5205 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5206 before setting DR0..DR3.
5208 2014-06-20 Gary Benson <gbenson@redhat.com>
5210 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5211 * configure: Regenerated.
5212 * config.in: Likewise.
5214 2014-06-20 Gary Benson <gbenson@redhat.com>
5216 * Makefile.in (SFILES): Update locations for files moved
5218 (object file files): Reordered.
5220 2014-06-20 Gary Benson <gbenson@redhat.com>
5222 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5223 (i386_dr_low_set_addr): Likewise.
5224 (i386_dr_low_get_addr): Likewise.
5225 (i386_dr_low_can_set_control): Likewise.
5226 (i386_dr_low_set_control): Likewise.
5227 (i386_dr_low_get_control): Likewise.
5228 (i386_dr_low_get_status): Likewise.
5229 (i386_get_debug_register_length): Likewise.
5230 * linux-x86-low.c (i386_dr_low_set_addr):
5231 Changed signature. Made static.
5232 (i386_dr_low_get_addr): Likewise.
5233 (i386_dr_low_set_control): Likewise.
5234 (i386_dr_low_get_control): Likewise.
5235 (i386_dr_low_get_status): Likewise.
5236 (i386_dr_low): New global variable.
5237 * win32-i386-low.c (i386_dr_low_set_addr):
5238 Changed signature. Made static.
5239 (i386_dr_low_get_addr): Likewise.
5240 (i386_dr_low_set_control): Likewise.
5241 (i386_dr_low_get_control): Likewise.
5242 (i386_dr_low_get_status): Likewise.
5243 (i386_dr_low): New global variable.
5245 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5247 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5248 * Makefile.in (AR, AR_FLAGS): Define.
5249 * configure: Regenerate.
5251 2014-06-19 Gary Benson <gbenson@redhat.com>
5253 * Makefile.in (i386-dregs.o): New rule.
5254 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5255 * i386-low.c (target.h): Remove include.
5256 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5257 (DR_CONTROL_SHIFT): Likewise.
5258 (DR_CONTROL_SIZE): Likewise.
5259 (DR_RW_EXECUTE): Likewise.
5260 (DR_RW_WRITE): Likewise.
5261 (DR_RW_READ): Likewise.
5262 (DR_RW_IORW): Likewise.
5263 (DR_LEN_1): Likewise.
5264 (DR_LEN_2): Likewise.
5265 (DR_LEN_4): Likewise.
5266 (DR_LEN_8): Likewise.
5267 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5268 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5269 (DR_ENABLE_SIZE): Likewise.
5270 (DR_LOCAL_SLOWDOWN): Likewise.
5271 (DR_GLOBAL_SLOWDOWN): Likewise.
5272 (DR_CONTROL_RESERVED): Likewise.
5273 (I386_DR_CONTROL_MASK): Likewise.
5274 (I386_DR_VACANT): Likewise.
5275 (I386_DR_LOCAL_ENABLE): Likewise.
5276 (I386_DR_GLOBAL_ENABLE): Likewise.
5277 (I386_DR_DISABLE): Likewise.
5278 (I386_DR_SET_RW_LEN): Likewise.
5279 (I386_DR_GET_RW_LEN): Likewise.
5280 (I386_DR_WATCH_HIT): Likewise.
5281 (i386_wp_op_t): Likewise.
5282 (i386_show_dr): Likewise.
5283 (i386_length_and_rw_bits): Likewise.
5284 (i386_insert_aligned_watchpoint): Likewise.
5285 (i386_remove_aligned_watchpoint): Likewise.
5286 (i386_handle_nonaligned_watchpoint): Likewise.
5287 i386_update_inferior_debug_regs(): Likewise.
5288 (i386_dr_insert_watchpoint): Likewise.
5289 (i386_dr_remove_watchpoint): Likewise.
5290 (i386_dr_region_ok_for_watchpoint): Likewise.
5291 (i386_dr_stopped_data_address): Likewise.
5292 (i386_dr_stopped_by_watchpoint): Likewise.
5294 2014-06-19 Gary Benson <gbenson@redhat.com>
5296 * i386-low.c (i386_dr_show): Renamed to
5297 i386_show_dr and made static. All uses updated.
5298 (i386_dr_length_and_rw_bits): Renamed to
5299 i386_length_and_rw_bits and made static.
5301 (i386_dr_insert_aligned_watchpoint): Renamed to
5302 i386_insert_aligned_watchpoint and made static.
5304 (i386_dr_remove_aligned_watchpoint): Renamed to
5305 i386_remove_aligned_watchpoint and made static.
5307 (i386_dr_update_inferior_debug_regs): Renamed to
5308 i386_update_inferior_debug_regs and made static.
5311 2014-06-18 Gary Benson <gbenson@redhat.com>
5313 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5314 (i386_dr_low_can_set_control): Likewise.
5315 (i386_get_debug_register_length): Likewise.
5316 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5317 (i386_dr_low_can_set_control): Likewise.
5318 (i386_get_debug_register_length): Likewise.
5320 2014-06-17 Gary Benson <gbenson@redhat.com>
5322 * i386-low.h (i386-dregs.h): New include.
5323 (DR_FIRSTADDR): Now in i386-dregs.h.
5324 (DR_LASTADDR): Likewise.
5325 (DR_NADDR): Likewise.
5326 (DR_STATUS): Likewise.
5327 (DR_CONTROL): Likewise.
5328 (i386_debug_reg_state): Likewise.
5329 (i386_dr_insert_watchpoint): Likewise.
5330 (i386_dr_remove_watchpoint): Likewise.
5331 (i386_dr_region_ok_for_watchpoint): Likewise.
5332 (i386_dr_stopped_data_address): Likewise.
5333 (i386_dr_stopped_by_watchpoint): Likewise.
5334 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5336 2014-06-18 Gary Benson <gbenson@redhat.com>
5338 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5339 i386_dr_insert_watchpoint.
5340 (i386_low_remove_watchpoint): Renamed to
5341 i386_dr_remove_watchpoint.
5342 (i386_low_region_ok_for_watchpoint): Renamed to
5343 i386_dr_region_ok_for_watchpoint.
5344 (i386_low_stopped_data_address): Renamed to
5345 i386_dr_stopped_data_address.
5346 (i386_low_stopped_by_watchpoint): Renamed to
5347 i386_dr_stopped_by_watchpoint.
5348 * i386-low.c (i386_show_dr): Renamed to
5349 i386_dr_show and made nonstatic. All uses updated.
5350 (i386_length_and_rw_bits): Renamed to
5351 i386_dr_length_and_rw_bits and made nonstatic.
5353 (i386_insert_aligned_watchpoint): Renamed to
5354 i386_dr_insert_aligned_watchpoint and made nonstatic.
5356 (i386_remove_aligned_watchpoint): Renamed to
5357 i386_dr_remove_aligned_watchpoint and made nonstatic.
5359 (i386_update_inferior_debug_regs): Renamed to
5360 i386_dr_update_inferior_debug_regs and made nonstatic.
5362 (i386_low_insert_watchpoint): Renamed to
5363 i386_dr_insert_watchpoint. All uses updated.
5364 (i386_low_remove_watchpoint): Renamed to
5365 i386_dr_remove_watchpoint. All uses updated.
5366 (i386_low_region_ok_for_watchpoint): Renamed to
5367 i386_dr_region_ok_for_watchpoint. All uses updated.
5368 (i386_low_stopped_data_address): Renamed to
5369 i386_dr_stopped_data_address. All uses updated.
5370 (i386_low_stopped_by_watchpoint): Renamed to
5371 i386_dr_stopped_by_watchpoint. All uses updated.
5373 2014-06-18 Gary Benson <gbenson@redhat.com>
5375 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5376 (i386_dr_low_can_set_control): Likewise.
5377 (i386_insert_aligned_watchpoint): New check.
5379 2014-06-18 Gary Benson <gbenson@redhat.com>
5381 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5384 2014-06-18 Gary Benson <gbenson@redhat.com>
5386 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5387 instead of fatal and error.
5388 (i386_handle_nonaligned_watchpoint): Likewise.
5390 2014-06-18 Gary Benson <gbenson@redhat.com>
5392 * i386-low.c (i386_get_debug_register_length): New macro.
5393 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5394 (i386_show_dr): Use debug_printf instead of fprintf. Use
5395 phex to format values.
5397 2014-06-18 Gary Benson <gbenson@redhat.com>
5399 * i386-low.h: Comment changes.
5400 * i386-low.c: Likewise.
5402 2014-06-18 Gary Benson <gbenson@redhat.com>
5404 * i386-low.c: Whitespace changes.
5406 2014-06-12 Tom Tromey <tromey@redhat.com>
5408 * utils.c (freeargv): Remove.
5410 2014-06-12 Tom Tromey <tromey@redhat.com>
5412 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5413 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5414 (parse_debug_format_options): Likewise.
5415 (gdbserver_usage): Likewise.
5416 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5417 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5418 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5420 ($(LIBGNU)): Depend on libiberty.
5421 (all-lib): Recurse into all subdirs.
5422 (install-only): Invoke "install" target in subdirs.
5423 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5425 * configure: Rebuild.
5426 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5427 for vasprintf, vsnprintf, or gettimeofday.
5428 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5431 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5433 * development.sh: Delete.
5434 * Makefile.in (config.status): Adjust dependency on development.sh.
5435 * configure.ac: Adjust development.sh source call.
5436 * configure: Regenerate.
5438 2014-06-02 Pedro Alves <palves@redhat.com>
5440 * ax.c (gdb_free_agent_expr): New function.
5441 * ax.h (gdb_free_agent_expr): New declaration.
5442 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5444 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5446 (clear_breakpoint_conditions_and_commands): New function.
5447 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5448 (clear_breakpoint_conditions_and_commands): New declaration.
5450 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5452 * linux-aarch64-low.c (asm/ptrace.h): Include.
5454 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5456 Fix TLS access for -static -pthread.
5457 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5458 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5459 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5461 2014-05-20 Pedro Alves <palves@redhat.com>
5463 * linux-aarch64-low.c (aarch64_insert_point)
5464 (aarch64_remove_point): No longer check whether the type is
5465 supported here. Adjust to new interface.
5466 (the_low_target): Install aarch64_supports_z_point_type as
5467 supports_z_point_type method.
5468 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5469 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5470 instead of a Z packet char. Adjust.
5471 (arm_supports_z_point_type): New function.
5472 (arm_insert_point, arm_remove_point): Adjust to new interface.
5473 (the_low_target): Install arm_supports_z_point_type.
5474 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5475 (cris_insert_point, cris_remove_point): Adjust to new interface.
5476 Don't check whether the type is supported here.
5477 (the_low_target): Install cris_supports_z_point_type.
5478 * linux-low.c (linux_supports_z_point_type): New function.
5479 (linux_insert_point, linux_remove_point): Adjust to new interface.
5480 * linux-low.h (struct linux_target_ops) <insert_point,
5481 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5482 raw_breakpoint pointer parameter.
5483 <supports_z_point_type>: New method.
5484 * linux-mips-low.c (mips_supports_z_point_type): New function.
5485 (mips_insert_point, mips_remove_point): Adjust to new interface.
5486 Use mips_supports_z_point_type.
5487 (the_low_target): Install mips_supports_z_point_type.
5488 * linux-ppc-low.c (the_low_target): Install NULL as
5489 supports_z_point_type method.
5490 * linux-s390-low.c (the_low_target): Install NULL as
5491 supports_z_point_type method.
5492 * linux-sparc-low.c (the_low_target): Install NULL as
5493 supports_z_point_type method.
5494 * linux-x86-low.c (x86_supports_z_point_type): New function.
5495 (x86_insert_point): Adjust to new insert_point interface. Use
5496 insert_memory_breakpoint. Adjust to new
5497 i386_low_insert_watchpoint interface.
5498 (x86_remove_point): Adjust to remove_point interface. Use
5499 remove_memory_breakpoint. Adjust to new
5500 i386_low_remove_watchpoint interface.
5501 (the_low_target): Install x86_supports_z_point_type.
5502 * lynx-low.c (lynx_target_ops): Install NULL as
5503 supports_z_point_type callback.
5504 * nto-low.c (nto_supports_z_point_type): New.
5505 (nto_insert_point, nto_remove_point): Adjust to new interface.
5506 (nto_target_ops): Install nto_supports_z_point_type.
5507 * mem-break.c: Adjust intro comment.
5508 (struct raw_breakpoint) <raw_type, size>: New fields.
5509 <inserted>: Update comment.
5510 <shlib_disabled>: Delete field.
5511 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5512 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5513 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5514 (raw_bkpt_type_to_target_hw_bp_type): New function.
5515 (find_enabled_raw_code_breakpoint_at): New function.
5516 (find_raw_breakpoint_at): New type and size parameters. Use them.
5517 (insert_memory_breakpoint): New function, based off
5518 set_raw_breakpoint_at.
5519 (remove_memory_breakpoint): New function.
5520 (set_raw_breakpoint_at): Reimplement.
5521 (set_breakpoint): New, based on set_breakpoint_at.
5522 (set_breakpoint_at): Reimplement.
5523 (delete_raw_breakpoint): Go through the_target->remove_point
5524 instead of assuming memory breakpoints.
5525 (find_gdb_breakpoint_at): Delete.
5526 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5527 (find_gdb_breakpoint): New function.
5528 (set_gdb_breakpoint_at): Delete.
5529 (z_type_supported): New function.
5530 (set_gdb_breakpoint_1): New function, loosely based off
5531 set_gdb_breakpoint_at.
5532 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5533 (delete_gdb_breakpoint_at): Delete.
5534 (delete_gdb_breakpoint_1): New function, loosely based off
5535 delete_gdb_breakpoint_at.
5536 (delete_gdb_breakpoint): New function.
5537 (clear_gdb_breakpoint_conditions): Rename to ...
5538 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5540 (add_condition_to_breakpoint): Make static.
5541 (add_breakpoint_condition): Take a struct breakpoint pointer
5542 instead of an address. Adjust.
5543 (gdb_condition_true_at_breakpoint): Rename to ...
5544 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5546 (gdb_condition_true_at_breakpoint): Reimplement.
5547 (add_breakpoint_commands): Take a struct breakpoint pointer
5548 instead of an address. Adjust.
5549 (gdb_no_commands_at_breakpoint): Rename to ...
5550 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5551 parameter. Return true if no breakpoint was found. Change debug
5553 (gdb_no_commands_at_breakpoint): Reimplement.
5554 (run_breakpoint_commands): Rename to ...
5555 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5556 and change return type to boolean.
5557 (run_breakpoint_commands): New function.
5558 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5559 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5560 breakpoint. Go through the_target->remove_point instead of
5561 assuming memory breakpoint.
5562 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5563 software and hardware breakpoints.
5564 (reinsert_raw_breakpoint): Go through the_target->insert_point
5565 instead of assuming memory breakpoint.
5566 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5567 software and hardware breakpoints.
5568 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5569 Check both software and hardware breakpoints.
5570 (validate_inserted_breakpoint): Assert the breakpoint is a
5571 software breakpoint. Set the inserted flag to -1 instead of
5572 setting shlib_disabled.
5573 (delete_disabled_breakpoints): Adjust.
5574 (validate_breakpoints): Only validate software breakpoints.
5575 Adjust to inserted flag change.
5576 (check_mem_read, check_mem_write): Skip breakpoint types other
5577 than software breakpoints. Adjust to inserted flag change.
5578 * mem-break.h (enum raw_bkpt_type): New enum.
5579 (raw_breakpoint, struct process_info): Forward declare.
5580 (Z_packet_to_target_hw_bp_type): Delete declaration.
5581 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5582 (set_gdb_breakpoint, delete_gdb_breakpoint)
5583 (clear_breakpoint_conditions): New declarations.
5584 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5585 (breakpoint_inserted_here): Update comment.
5586 (add_breakpoint_condition, add_breakpoint_commands): Replace
5587 address parameter with a breakpoint pointer parameter.
5588 (gdb_breakpoint_here): Update comment.
5589 (delete_gdb_breakpoint_at): Delete.
5590 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5591 * server.c (process_point_options): Take a struct breakpoint
5592 pointer instead of an address. Adjust.
5593 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5594 delete_gdb_breakpoint.
5595 * spu-low.c (spu_target_ops): Install NULL as
5596 supports_z_point_type method.
5597 * target.h: Include mem-break.h.
5598 (struct target_ops) <prepare_to_access_memory>: Update comment.
5599 <supports_z_point_type>: New field.
5600 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5601 instead of a char. Also take a raw breakpoint pointer.
5602 * win32-arm-low.c (the_low_target): Install NULL as
5603 supports_z_point_type.
5604 * win32-i386-low.c (i386_supports_z_point_type): New function.
5605 (i386_insert_point, i386_remove_point): Adjust to new interface.
5606 (the_low_target): Install i386_supports_z_point_type.
5607 * win32-low.c (win32_supports_z_point_type): New function.
5608 (win32_insert_point, win32_remove_point): Adjust to new interface.
5609 (win32_target_ops): Install win32_supports_z_point_type.
5610 * win32-low.h (struct win32_target_ops):
5611 <supports_z_point_type>: New method.
5612 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5613 instead of a char. Also take a raw breakpoint pointer.
5615 2014-05-20 Pedro Alves <palves@redhat.com>
5617 * mem-break.h: Include break-common.h.
5618 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5619 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5620 (Z_packet_to_target_hw_bp_type): New declaration.
5621 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5622 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5623 (Z_PACKET_ACCESS_WP): Delete macros.
5624 (Z_packet_to_hw_type): Delete function.
5625 * i386-low.h: Don't include break-common.h here.
5626 (Z_packet_to_hw_type): Delete declaration.
5627 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5628 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5629 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5630 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5631 * linux-aarch64-low.c: Don't include break-common.h here.
5632 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5633 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5634 (Z_packet_to_target_hw_bp_type): Delete function.
5635 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5637 (mips_insert_point, mips_remove_point): Use
5638 Z_packet_to_target_hw_bp_type.
5640 2014-05-20 Pedro Alves <palves@redhat.com>
5642 * linux-aarch64-low.c: Include break-common.h.
5643 (enum target_point_type): Delete.
5644 (Z_packet_to_point_type): Rename to ...
5645 (Z_packet_to_target_hw_bp_type): ... this, and return a
5646 target_hw_bp_type instead.
5647 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5648 instead of an enum target_point_type.
5649 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5651 (aarch64_dr_state_insert_one_point)
5652 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5653 (aarch64_handle_aligned_watchpoint)
5654 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5655 Take an enum target_hw_bp_type instead of an enum
5657 (aarch64_supports_z_point_type): New function.
5658 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5659 use Z_packet_to_target_hw_bp_type.
5661 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5663 * configure.ac: Only use -Werror by default when DEVELOPMENT
5665 * configure: Regenerate.
5667 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5669 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5670 * linux-x86-low.c (X86_64_USER_REGS): New.
5671 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5673 2014-04-28 Yao Qi <yao@codesourcery.com>
5675 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5678 2014-04-25 Pedro Alves <palves@redhat.com>
5681 * linux-low.c (linux_attach_fail_reason_string): New function.
5682 (linux_attach_lwp): Delete.
5683 (linux_attach_lwp_1): Rename to ...
5684 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5685 argument. Remove "initial" parameter. Return int instead of
5686 void. Don't error or warn here.
5687 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5688 failure to attach to the tgid. Call warning when failing to
5690 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5691 argument. Remove "initial" parameter. Return int instead of
5692 void. Don't error or warn here.
5693 (linux_attach_fail_reason_string): New declaration.
5694 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5695 interface change. Use linux_attach_fail_reason_string.
5697 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5698 Walfred Tedeschi <walfred.tedeschi@intel.com>
5700 * Makefile.in: Added rules to handle new files
5701 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5702 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5703 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5704 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5705 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5706 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5708 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5709 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5710 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5711 i386/x32-avx512.xml.
5712 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5713 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5714 i386/x32-avx512-linux.xml.
5715 * i387-fp.c (num_avx512_k_registers): New constant for number
5717 (num_avx512_zmmh_low_registers): New constant for number of
5718 lower ZMM registers (0-15).
5719 (num_avx512_zmmh_high_registers): New constant for number of
5720 higher ZMM registers (16-31).
5721 (num_avx512_ymmh_registers): New contant for number of higher
5722 YMM registers (ymm16-31 added by avx521 on x86_64).
5723 (num_avx512_xmm_registers): New constant for number of higher
5724 XMM registers (xmm16-31 added by AVX512 on x86_64).
5725 (struct i387_xsave): Add space for AVX512 registers.
5726 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5727 Add code to handle AVX512 registers.
5728 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5729 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5730 prototypei from generated file.
5731 (tdesc_amd64_avx512_linux): Likewise.
5732 (init_registers_x32_avx512_linux): Likewise.
5733 (tdesc_x32_avx512_linux): Likewise.
5734 (init_registers_i386_avx512_linux): Likewise.
5735 (tdesc_i386_avx512_linux): Likewise.
5736 (x86_64_regmap): Add AVX512 registers.
5737 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5739 (initialize_low_arch): Add code to initialize AVX512 registers.
5741 2014-04-23 Pedro Alves <palves@redhat.com>
5743 * mem-break.c (find_gdb_breakpoint_at): Make static.
5744 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5746 2014-04-23 Pedro Alves <palves@redhat.com>
5748 * i386-low.c: Don't include break-common.h here.
5749 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5750 prototype to take target_hw_bp_type as argument instead of a Z
5752 * i386-low.h: Include break-common.h here.
5753 (Z_packet_to_hw_type): Declare.
5754 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5756 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5757 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5758 (x86_remove_point): Convert the packet number to a
5759 target_hw_bp_type before calling i386_low_remove_watchpoint.
5760 * win32-i386-low.c (i386_insert_point): Convert the packet number
5761 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5762 (i386_remove_point): Convert the packet number to a
5763 target_hw_bp_type before calling i386_low_remove_watchpoint.
5765 2014-04-23 Pedro Alves <palves@redhat.com>
5767 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5769 2014-04-10 Pedro Alves <palves@redhat.com>
5771 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5772 Check if the condition or command is NULL before checking if the
5773 breakpoint is known. On success, return true.
5774 * mem-break.h (add_breakpoint_condition): Document return.
5775 (add_breakpoint_commands): Add describing comment.
5776 * server.c (skip_to_semicolon): New function.
5777 (process_point_options): Use it.
5779 2014-04-09 Pedro Alves <palves@redhat.com>
5781 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5784 2014-02-27 Pedro Alves <palves@redhat.com>
5787 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5789 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5791 (last_thread_of_process_p): Take a PID argument instead of a
5793 (linux_wait_for_lwp): Delete.
5794 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5796 (linux_low_filter_event): New function, party factored out from
5797 linux_wait_for_event.
5798 (linux_wait_for_event): Rename to ...
5799 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5800 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5801 sigsuspend. Check for zombie leaders.
5802 (linux_wait_for_event): Reimplement as wrapper around
5803 linux_wait_for_event_filtered.
5804 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5805 a normal or signal exit is seen, it's the whole process exiting.
5806 (wait_for_sigstop): No longer a for_each_inferior callback.
5807 Rewrite on top of linux_wait_for_event_filtered.
5808 (stop_all_lwps): Call wait_for_sigstop directly.
5809 * server.c (resume, handle_target_event): Handle
5810 TARGET_WAITKIND_NO_RESUMED.
5812 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5814 * win32-low.c (psapi_get_dll_name,
5815 * win32_CreateToolhelp32Snapshot): Delete.
5816 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5817 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5819 (handle_load_dll): Add function description.
5820 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5822 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5824 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5826 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5827 base address when calling win32_add_one_solib.
5828 (handle_load_dll): Delete local variable load_addr.
5829 Remove 0x1000 offset applied to DLL base address when calling
5830 win32_add_one_solib.
5831 (handle_unload_dll): Add comment.
5833 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5835 * win32-low.c (win32_add_all_dlls): Renames
5836 win32_ensure_ntdll_loaded. Rewrite function documentation.
5837 Adjust implementation to always load all DLLs.
5838 Add 0x1000 offset to DLL base address when calling
5839 win32_add_one_solib.
5840 (child_initialization_done): New static global.
5841 (do_initial_child_stuff): Set child_initialization_done to
5842 zero during child initialization, and 1 after. Replace call
5843 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5845 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5846 (handle_unload_dll): Add function documentation.
5847 (get_child_debug_event): Ignore load and unload DLL events
5848 during child initialization.
5850 2014-02-20 Doug Evans <dje@google.com>
5852 Remove global all_lwps.
5853 * inferiors.h (ptid_of): Move here from linux-low.h.
5854 (pid_of, lwpid_of): Ditto.
5855 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5856 parameter is a struct thread_info * now.
5857 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5858 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5859 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5861 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5862 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5863 * linux-arm-low.c (update_registers_callback): Update, "entry"
5864 parameter is a struct thread_info * now.
5865 Fetch lwpid from current_inferior directly.
5866 (arm_insert_point): Pass &all_threads to find_inferior instead of
5868 (arm_remove_point): Ditto.
5869 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5870 (arm_prepare_to_resume): Fetch pid from thread.
5871 (arm_read_description): Fetch lwpid from current_inferior directly.
5872 * linux-low.c (all_lwps): Delete.
5873 (delete_lwp): Delete call to remove_inferior.
5874 (handle_extended_wait): Fetch lwpid from thread.
5875 (add_lwp): Don't set lwp->entry.id. Remove call to
5876 add_inferior_to_list.
5877 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5878 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5879 (kill_one_lwp_callback): Ditto.
5880 (linux_kill): Don't dereference NULL pointer.
5881 Fetch ptid,lwpid from thread.
5882 (get_detach_signal): Fetch ptid from thread.
5883 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5884 Simplify call to regcache_invalidate_thread.
5885 (delete_lwp_callback): Update, "entry" parameter is a
5886 struct thread_info * now. Fetch pid from thread.
5887 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5888 (status_pending_p_callback): Update, "entry" parameter is a
5889 struct thread_info * now. Fetch ptid from thread.
5890 (find_lwp_pid): Update, "entry" parameter is a
5891 struct thread_info * now.
5892 (linux_wait_for_lwp): Fetch pid from thread.
5893 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5894 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5895 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5896 (dequeue_one_deferred_signal): Ditto.
5897 (cancel_breakpoint): Fetch ptid from current_inferior.
5898 (linux_wait_for_event): Pass &all_threads to find_inferior,
5899 not &all_lwps. Fetch ptid, lwpid from thread.
5900 (count_events_callback): Update, "entry" parameter is a
5901 struct thread_info * now.
5902 (select_singlestep_lwp_callback): Ditto.
5903 (select_event_lwp_callback): Ditto.
5904 (cancel_breakpoints_callback): Ditto.
5905 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5907 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5908 (unsuspend_one_lwp): Update, "entry" parameter is a
5909 struct thread_info * now.
5910 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5912 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5913 Fetch lwpid from thread, not lwp.
5914 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5915 Pass &all_threads to find_inferior, not &all_lwps.
5916 (send_sigstop): Fetch lwpid from thread, not lwp.
5917 (send_sigstop_callback): Update, "entry" parameter is a
5918 struct thread_info * now.
5919 (suspend_and_send_sigstop_callback): Ditto.
5920 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5921 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5922 struct thread_info * now.
5923 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5925 (lwp_running): Update, "entry" parameter is a
5926 struct thread_info * now.
5927 (stop_all_lwps): Fetch ptid from thread.
5928 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5929 (linux_resume_one_lwp): Fetch lwpid from thread.
5930 (linux_set_resume_request): Update, "entry" parameter is a
5931 struct thread_info * now. Fetch pid, lwpid from thread.
5932 (resume_status_pending_p): Update, "entry" parameter is a
5933 struct thread_info * now.
5934 (need_step_over_p): Ditto. Fetch lwpid from thread.
5935 (start_step_over): Fetch lwpid from thread.
5936 (linux_resume_one_thread): Update, "entry" parameter is a
5937 struct thread_info * now. Fetch lwpid from thread.
5938 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5939 (proceed_one_lwp): Update, "entry" parameter is a
5940 struct thread_info * now. Fetch lwpid from thread.
5941 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5942 struct thread_info * now.
5943 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5944 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5945 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5947 (regsets_store_inferior_registers): Ditto.
5948 (fetch_register, store_register): Ditto.
5949 (linux_read_memory, linux_write_memory): Ditto.
5950 (linux_request_interrupt): Ditto.
5951 (linux_read_auxv): Ditto.
5952 (linux_xfer_siginfo): Ditto.
5953 (linux_qxfer_spu): Ditto.
5954 (linux_qxfer_libraries_svr4): Ditto.
5955 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5956 moved to inferiors.h.
5958 (get_thread_lwp): Update.
5959 (struct lwp_info): Delete member "entry". Simplify comment for
5962 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5963 current_inferior directly.
5964 (update_watch_registers_callback): Update, "entry" parameter is a
5965 struct thread_info * now. Fetch pid from thread.
5966 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5967 (mips_insert_point): Fetch lwpid from current_inferior.
5968 Pass &all_threads to find_inferior, not &all_lwps.
5969 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5970 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5972 (mips_stopped_data_address): Ditto.
5973 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5975 * linux-tile-low.c (tile_arch_setup): Ditto.
5976 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5977 (update_debug_registers_callback): Update, "entry" parameter is a
5978 struct thread_info * now. Fetch pid from thread.
5979 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5980 Pass &all_threads to find_inferior, not &all_lwps.
5981 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5982 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5983 Pass &all_threads to find_inferior, not &all_lwps.
5984 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5985 (i386_dr_low_get_status): Ditto.
5986 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5987 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5988 (x86_linux_read_description): Ditto.
5989 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5991 2014-02-20 Doug Evans <dje@google.com>
5993 * inferiors.c (get_first_inferior): Fix buglet.
5995 2014-02-19 Doug Evans <dje@google.com>
5997 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5998 * inferiors.c (add_thread): Change result type to struct thread_info *.
5999 All callers updated.
6000 (add_lwp): Call add_thread here instead of in callers.
6001 All callers updated.
6002 * linux-low.h (get_lwp_thread): Rewrite.
6003 (struct lwp_info): New member "thread".
6005 2014-02-19 Doug Evans <dje@google.com>
6007 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6008 All callers updated.
6010 2014-02-19 Doug Evans <dje@google.com>
6012 * inferiors.c (add_thread): Fix whitespace.
6014 2014-02-19 Doug Evans <dje@google.com>
6016 * dll.c (clear_dlls): Replace accessing list implemention details
6018 * gdbthread.h (get_first_thread): Declare.
6019 * inferiors.c (for_each_inferior_with_data): New function.
6020 (get_first_thread): New function.
6021 (find_thread_ptid): Simplify.
6022 (get_first_inferior): New function.
6023 (clear_list): Delete.
6024 (one_inferior_p): New function.
6025 (clear_inferior_list): New function.
6026 (clear_inferiors): Update.
6027 * inferiors.h (for_each_inferior_with_data): Declare.
6028 (clear_inferior_list): Declare.
6029 (one_inferior_p): Declare.
6030 (get_first_inferior): Declare.
6031 * linux-low.c (linux_wait_for_event): Replace accessing list
6032 implemention details with API function.
6033 * server.c (target_running): Ditto.
6034 (accumulate_file_name_length): New function.
6035 (emit_dll_description): New function.
6036 (handle_qxfer_libraries): Replace accessing list implemention
6037 details with API function.
6038 (handle_qxfer_threads_worker): New function.
6039 (handle_qxfer_threads_proper): Replace accessing list implemention
6040 details with API function.
6041 (handle_query): Ditto.
6042 (visit_actioned_threads_callback_ftype): New typedef.
6043 (visit_actioned_threads_data): New struct.
6044 (visit_actioned_threads): Rewrite to be find_inferior callback.
6045 (resume): Call find_inferior.
6046 (handle_status): Replace accessing list implemention
6047 details with API function.
6048 (process_serial_event): Replace accessing list implemention details
6050 * target.c (set_desired_inferior): Replace accessing list implemention
6051 details with API function.
6052 * tracepoint.c (same_process_p): New function.
6053 (gdb_agent_about_to_close): Replace accessing list implemention
6054 details with API function.
6055 * win32-low.c (child_delete_thread): Replace accessing list
6056 implemention details with API function.
6057 (match_dll_by_basename): New function.
6058 (dll_is_loaded_by_basename): New function.
6059 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6060 details call to dll_is_loaded_by_basename.
6062 2014-02-19 Doug Evans <dje@google.com>
6064 * dll.h (struct dll_info): Add comment.
6065 * gdbthread.h (struct thread_info): Add comment.
6066 (current_ptid): Simplify.
6067 * inferiors.c (add_process): Update.
6068 (remove_process): Update.
6069 * inferiors.h (struct process_info): Rename member "head" to "entry".
6070 * linux-low.c (delete_lwp): Update.
6072 (last_thread_of_process_p): Update.
6073 (kill_one_lwp_callback, linux_kill): Update.
6074 (status_pending_p_callback): Update.
6075 (wait_for_sigstop): Update. Simplify read of ptid.
6076 (start_step_over): Update.
6077 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6078 (get_lwp_thread): Update.
6079 (struct lwp_info): Rename member "head" to "entry".
6080 * regcache.h (inferior_list_entry): Delete.
6081 * server.c (kill_inferior_callback): Update.
6082 (detach_or_kill_inferior_callback): Update.
6083 (print_started_pid): Update.
6084 (print_attached_pid): Update.
6085 (process_serial_event): Simplify read of ptid.
6086 * thread-db.c (thread_db_create_event): Update.
6087 (thread_db_get_tls_address): Update.
6088 * win32-low.c (current_inferior_ptid): Simplify.
6090 2014-02-19 Tom Tromey <tromey@redhat.com>
6092 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6094 (target_supports_btrace): Update.
6096 2014-02-14 Yao Qi <yao@codesourcery.com>
6098 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6099 (rsp-low-ipa.o): New target.
6101 2014-02-12 Tom Tromey <tromey@redhat.com>
6103 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6104 convert_ascii_to_int.
6105 * regcache.c (registers_to_string): Likewise.
6106 * remote-utils.c (decode_M_packet): Likewise.
6107 * server.c (process_serial_event): Likewise.
6109 2014-02-12 Tom Tromey <tromey@redhat.com>
6111 * server.c (handle_query, handle_v_run): Use hex2bin, not
6113 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6115 2014-02-12 Tom Tromey <tromey@redhat.com>
6117 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6118 convert_int_to_ascii.
6119 * regcache.c (registers_to_string, collect_register_as_string):
6121 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6123 * server.c (process_serial_event): Likewise.
6124 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6125 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6127 2014-02-12 Tom Tromey <tromey@redhat.com>
6129 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6130 bin2hex, not hexify.
6131 * tracepoint.c (cmd_qtstatus): Likewise.
6133 2014-02-12 Tom Tromey <tromey@redhat.com>
6135 * remote-utils.c (monitor_output): Pass explicit length to
6138 2014-02-12 Tom Tromey <tromey@redhat.com>
6140 * tracepoint.c: Include rsp-low.h.
6141 * server.c: Include rsp-low.h.
6142 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6143 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6145 * remote-utils.c: Include rsp-low.h.
6146 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6147 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6148 (convert_int_to_ascii, convert_ascii_to_int): Move to
6150 * regcache.c: Include rsp-low.h.
6151 * ax.c: Include rsp-low.h.
6152 * Makefile.in (SFILES): Add common/rsp-low.c.
6153 (OBS): Add rsp-low.o.
6154 (rsp-low.o): New target.
6156 2014-02-12 Tom Tromey <tromey@redhat.com>
6158 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6159 Include print-utils.h.
6160 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6161 (plongest, thirty_two, phex_nz): Remove.
6162 * Makefile.in (SFILES): Add common/print-utils.c.
6163 (OBS): Add print-utils.o.
6164 (print-utils-ipa.o): New target.
6165 (print-utils.o): New target.
6166 (IPA_OBJS): Add print-utils-ipa.o.
6168 2014-02-06 Tom Tromey <tromey@redhat.com>
6170 * Makefile.in (SFILES): Fix indentation.
6172 2014-02-05 Doug Evans <dje@google.com>
6174 * linux-low.c (linux_wait_for_event): Improve comment.
6175 (linux_wait_1): Keep current_inferior in sync with event_child.
6177 2014-01-22 Doug Evans <dje@google.com>
6179 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6181 2014-01-22 Doug Evans <dje@google.com>
6183 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6184 * configure: Regenerate.
6185 * config.in: Regenerate.
6186 * Makefile.in (SFILES): Add debug.c.
6188 * debug.c: New file.
6189 * debug.h: New file.
6190 * linux-aarch64-low.c (*): Update all debugging printfs to use
6191 debug_printf instead of fprintf.
6192 * linux-arm-low.c (*): Ditto.
6193 * linux-cris-low.c (*): Ditto.
6194 * linux-crisv32-low.c (*): Ditto.
6195 * linux-m32r-low.c (*): Ditto.
6196 * linux-sparc-low.c (*): Ditto.
6197 * linux-x86.c (*): Ditto.
6198 * linux-low.c (*): Ditto.
6199 (linux_wait_1): Add calls to debug_enter, debug_exit.
6200 (linux_wait): Remove redundant debugging printf.
6201 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6202 (linux_resume, unstop_all_lwps): Ditto.
6203 * mem-break.c (*): Update all debugging printfs to use
6204 debug_printf instead of fprintf.
6205 * remote-utils.c (*): Ditto.
6206 * thread-db.c (*): Ditto.
6207 * server.c #include <ctype.h>, "gdb_vecs.h".
6208 (debug_threads): Moved to debug.c.
6209 (*): Update all debugging printfs to use debug_printf instead of
6211 (start_inferior): Replace call to fflush with call to debug_flush.
6212 (monitor_show_help): Mention set debug-format.
6213 (parse_debug_format_options): New function.
6214 (handle_monitor_command): Handle "monitor set debug-format".
6215 (gdbserver_usage): Mention --debug-format.
6216 (main): Parse --debug-format.
6217 * server.h (debug_threads): Declaration moved to debug.h.
6219 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6220 trace_debug_1 that uses debug_printf.
6221 (tracepoint_look_up_symbols): Update all debugging printfs to use
6222 debug_printf instead of fprintf.
6224 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6226 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6229 2014-01-17 Pedro Alves <palves@redhat.com>
6232 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6233 defined after including gdb_proc_service.h.
6235 2014-01-16 Doug Evans <dje@google.com>
6237 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6238 (match_dll): Use it.
6240 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6242 * target.h (target_ops) <read_btrace>: Change parameters and
6243 return type to allow error reporting.
6244 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6245 trace reading errors on.
6246 * linux-low.c (linux_low_read_btrace): Pass trace reading
6248 (linux_low_disable_btrace): New.
6250 2014-01-15 Doug Evans <dje@google.com>
6252 * inferiors.c (thread_id_to_gdb_id): Delete.
6253 * inferiors.h (thread_id_to_gdb_id): Delete.
6255 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6257 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6258 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6261 2014-01-08 Pedro Alves <palves@redhat.com>
6263 * server.c (handle_status): Don't discard previous queued stop
6264 replies or thread's pending status here.
6265 (main) <disconnection>: Do it here instead.
6267 2014-01-08 Pedro Alves <palves@redhat.com>
6269 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6270 * server.c (visit_actioned_threads, handle_pending_status): New
6272 (handle_v_cont): Factor out parts to ...
6273 (resume): ... this new function. If in all-stop, and a thread
6274 being resumed has a pending status, report it without actually
6276 (myresume): Adjust to use the new 'resume' function.
6277 (clear_pending_status_callback, set_pending_status_callback)
6278 (find_status_pending_thread_callback): New functions.
6279 (handle_status): Handle the case of multiple threads having
6280 interesting statuses to report. Report threads' real last signal
6281 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6282 with an interesting thread to report the status for, instead of
6283 always reporting the status of the first thread.
6285 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6287 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6288 * gdbreplay.c (gdbreplay_version): Likewise.
6290 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6292 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6293 iov.iov_len with the real length in use.
6295 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6297 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6298 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6299 for all targets that use win32-low.c.
6300 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6301 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6303 2013-12-13 Pedro Alves <palves@redhat.com>
6305 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6306 if equal to TARGET_WAITKIND_LOADED.
6307 * win32-low.c (cached_status): New static global.
6308 (win32_wait): Add declaration.
6309 (do_initial_child_stuff): Flush all initial pending debug events
6310 up to the initial breakpoint.
6311 (win32_wait): If CACHED_STATUS was set, return that instead
6312 of doing a real wait. Remove the code resuming the execution
6313 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6314 during the initial phase. Also remove the code changing
6315 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6316 TARGET_WAITKIND_STOPPED.
6318 2013-12-11 Yao Qi <yao@codesourcery.com>
6320 * notif.c (handle_notif_ack): Return 0 if no notification
6323 2013-11-20 Doug Evans <dje@google.com>
6325 * linux-low.c (linux_set_resume_request): Fix comment.
6327 2013-11-20 Doug Evans <dje@google.com>
6329 * linux-low.c (resume_status_pending_p): Tweak comment.
6331 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6333 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6334 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6335 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6336 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6337 (srv_amd64_regobj): Add amd64-mpx.o.
6338 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6339 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6340 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6341 * i387-fp.c (num_pl_bnd_register) Added constant.
6342 (num_pl_bnd_cfg_registers) Added constant.
6343 (struct i387_xsave) Added reserved area and MPX fields.
6344 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6345 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6347 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6348 (init_registers_amd64_mpx_linux): Declare new function.
6349 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6350 (x86_64_regmap): Add MPX registers.
6351 (x86_linux_read_description): Add MPX case.
6352 (initialize_low_arch): Initialize MPX targets.
6354 2013-11-18 Tom Tromey <tromey@redhat.com>
6356 * configure: Rebuild.
6357 * configure.ac: Don't check for stdlib.h.
6358 * gdbreplay.c: Unconditionally include stdlib.h.
6360 2013-11-18 Tom Tromey <tromey@redhat.com>
6362 * config.in: Rebuild.
6363 * configure: Rebuild.
6364 * configure.ac: Don't use AC_HEADER_DIRENT.
6366 2013-11-18 Tom Tromey <tromey@redhat.com>
6368 * server.h: Don't check HAVE_STRING_H.
6369 * gdbreplay.c: Don't check HAVE_STRING_H.
6370 * configure: Rebuild.
6372 2013-11-18 Tom Tromey <tromey@redhat.com>
6374 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6377 2013-11-08 Tom Tromey <tromey@redhat.com>
6379 * configure, config.in: Rebuild.
6380 * configure.ac: Remove unused configury.
6382 2013-11-08 Tom Tromey <tromey@redhat.com>
6384 * acinclude.m4: Include common.m4, codeset.m4.
6385 * configure, config.in: Rebuild.
6386 * configure.ac: Use GDB_AC_COMMON.
6388 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6390 * linux-s390-low.c (HWCAP_S390_TE): New define.
6391 (s390_arch_setup): Consider the TE field in the HWCAP for
6392 determining 'have_regset_tdb'.
6394 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6397 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6400 2013-10-02 Pedro Alves <palves@redhat.com>
6402 * server.c (process_serial_event): Don't output "GDBserver
6403 exiting" if GDB is connected through stdio.
6404 * target.c (mywait): Likewise, be silent if GDB is connected
6407 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6409 * lynx-low.c (lynx_add_threads_after_attach): New function.
6410 (lynx_attach): Remove call to add_thread. Add call to
6411 lynx_add_threads_after_attach instead.
6413 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6415 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6416 * config.in, configure: Regenerated.
6418 2013-09-18 Yao Qi <yao@codesourcery.com>
6421 * server.c (start_inferior): Clear 'resume_info'.
6423 2013-09-16 Jiong Wang <jiwang@tilera.com>
6425 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6428 2013-09-16 Jiong Wang <jiwang@tilera.com>
6430 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6431 linux-tile-low.o to srv_tgtobj.
6433 2013-09-16 Will Newton <will.newton@linaro.org>
6435 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6438 2013-09-06 Pedro Alves <palves@redhat.com>
6440 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6441 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6442 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6443 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6444 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6445 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6447 2013-09-06 Pedro Alves <palves@redhat.com>
6449 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6450 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6452 2013-09-06 Pedro Alves <palves@redhat.com>
6454 * linux-amd64-ipa.c: Include tracepoint.h.
6455 * linux-i386-ipa.c: Include tracepoint.h.
6457 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6459 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6460 (ps_get_thread_area): New function.
6462 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6464 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6465 (initialize_low_arch): Call init_registers_crisv32 rather than
6466 init_register_crisv32.
6468 2013-09-05 Pedro Alves <palves@redhat.com>
6470 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6472 * hostio.h: ... this new file.
6473 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6474 win32-low.c: Include hostio.h.
6476 2013-09-05 Pedro Alves <palves@redhat.com>
6478 * server.h (gdb_client_data, handler_func, callback_handler_func)
6479 (delete_file_handler, add_file_handler, append_callback_event)
6480 (delete_callback_event, start_event_loop, initialize_event_loop):
6481 Move to event-loop.h and include it.
6482 * event-loop.h: New file.
6484 2013-09-05 Pedro Alves <palves@redhat.com>
6486 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6487 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6488 (loaded_dll, unloaded_dll): Move to ...
6489 * dll.h: ... this new file.
6490 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6492 2013-09-05 Pedro Alves <palves@redhat.com>
6494 * server.h (current_process, get_thread_process, all_processes)
6495 (add_inferior_to_list, for_each_inferior, current_inferior)
6496 (remove_inferior, add_process, remove_process, find_process_pid)
6497 (have_started_inferiors_p, have_attached_inferiors_p)
6498 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6499 (clear_inferiors, find_inferior, find_inferior_id)
6500 (inferior_target_data, set_inferior_target_data)
6501 (inferior_regcache_data, set_inferior_regcache_data): Move to
6502 inferiors.h, and include it.
6503 * inferiors.h: New file.
6505 2013-09-05 Pedro Alves <palves@redhat.com>
6507 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6511 2013-09-05 Pedro Alves <palves@redhat.com>
6513 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6515 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6516 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6517 (handle_tracepoint_general_set, handle_tracepoint_query)
6518 (tracepoint_finished_step, tracepoint_was_hit)
6519 (release_while_stepping_state_list, current_traceframe)
6520 (in_readonly_region, traceframe_read_mem)
6521 (fetch_traceframe_registers, traceframe_read_sdata)
6522 (traceframe_read_info, struct fast_tpoint_collect_status)
6523 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6524 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6525 (supply_fast_tracepoint_registers)
6526 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6527 (ipa_tdesc, claim_trampoline_space)
6528 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6529 (agent_mem_read, agent_get_trace_state_variable_value)
6530 (agent_set_trace_state_variable_value, agent_tsv_read)
6531 (agent_mem_read_string, get_raw_reg_func_addr)
6532 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6533 * tracepoint.h: ... this new file.
6535 2013-09-05 Pedro Alves <palves@redhat.com>
6537 * server.h (perror_with_name, error, fatal, warning, paddress)
6538 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6540 * utils.h: New file.
6542 2013-09-05 Pedro Alves <palves@redhat.com>
6544 * server.h (remote_debug, noack_mode, transport_is_reliable)
6545 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6546 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6547 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6548 (write_enn, initialize_async_io, enable_async_io)
6549 (disable_async_io, check_remote_input_interrupt_request)
6550 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6551 (dead_thread_notify, prepare_resume_reply)
6552 (decode_address_to_semicolon, decode_address, decode_m_packet)
6553 (decode_M_packet, decode_X_packet, decode_xfer_write)
6554 (decode_search_memory_packet, unhexify, hexify)
6555 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6556 (look_up_one_symbol, relocate_instruction)
6557 (monitor_output): Move to remote-utils.h, and include it.
6558 * remote-utils.h: New file.
6560 2013-09-05 Pedro Alves <palves@redhat.com>
6562 * server.h (_): Delete.
6564 2013-09-02 Pedro Alves <palves@redhat.com>
6566 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6567 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6569 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6571 2013-09-02 Pierre Muller <muller@sourceware.org>
6573 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6574 or WriteProcessMemory complete successfully and handle
6575 ERROR_PARTIAL_COPY error.
6577 2013-09-02 Pedro Alves <palves@redhat.com>
6579 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6580 error instead of EIO.
6582 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6585 * linux-low.c: Include filestuff.h.
6586 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6587 * lynx-low.c: Include filestuff.h.
6588 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6589 * server.c: Include filestuff.h.
6590 (main): Call notice_open_fds.
6591 * spu-low.c: Include filestuff.h.
6592 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6594 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6596 * Makefile.in: Explain why ../target and ../nat are not
6597 listed as include file search paths.
6598 (linux-waitpid.o): New object file rule.
6599 * configure.srv (srv_native_linux_obj): New variable.
6600 Replace all occurrences of linux native object files with
6601 $srv_native_linux_obj.
6602 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6603 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6604 (linux_enable_event_reporting): Remove declaration.
6605 (my_waitpid): Moved to common/linux-waitpid.c.
6606 (linux_wait_for_event): Pass ptid when calling
6607 linux_enable_event_reporting.
6608 (linux_supports_tracefork_flag): Remove.
6609 (linux_enable_event_reporting): Likewise.
6610 (linux_tracefork_grandchild): Remove.
6611 (STACK_SIZE): Moved to common/linux-ptrace.c.
6612 (linux_tracefork_child): Remove.
6613 (linux_test_for_tracefork): Remove.
6614 (linux_look_up_symbols): Call linux_supports_traceclone.
6615 (initialize_low): Remove call to linux_test_for_tracefork.
6616 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6617 common/linux-ptrace.h.
6618 (PTRACE_TYPE_ARG4): Likewise.
6619 Include linux-ptrace.h.
6621 2013-08-21 Pedro Alves <palves@redhat.com>
6623 * config.in: Renegerate.
6625 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6627 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6628 (SFILES): Remove $(srcdir)/common/target-common.c and
6629 add $(srcdir)/target/waitstatus.c.
6630 (OBS): Remove target-common.o and add waitstatus.o.
6631 (server_h): Remove $(srcdir)/../common/target-common.h and
6632 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6633 and $(srcdir)/../target/waitstatus.h.
6634 (target-common.o): Remove.
6635 (waitstatus.o): New target object file.
6636 * target.h: Do not include target-common.h and
6637 include target/resume.h, target/wait.h and
6638 target/waitstatus.h.
6640 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6642 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6643 to PTRACE_TYPE_ARG3.
6644 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6645 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6647 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6648 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6650 2013-07-27 Jie Zhang <jie@codesourcery.com>
6651 Daniel Jacobowitz <dan@codesourcery.com>
6652 Yao Qi <yao@codesourcery.com>
6654 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6655 (mips-linux-watch.o): New rule.
6656 (mips_linux_watch_h): New variable.
6657 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6659 * linux-mips-low.c: Include mips-linux-watch.h.
6660 (struct arch_process_info, struct arch_lwp_info): New.
6661 (update_watch_registers_callback): New function.
6662 (mips_linux_new_process, mips_linux_new_thread) New functions.
6663 (mips_linux_prepare_to_resume, mips_insert_point): New
6665 (mips_remove_point, mips_stopped_by_watchpoint): New
6667 (rsp_bp_type_to_target_hw_bp_type): New function.
6668 (mips_stopped_data_address): New function.
6669 (the_low_target): Add watchpoint support functions.
6671 2013-07-27 Yao Qi <yao@codesourcery.com>
6673 * i386-low.c: Include break-common.h.
6674 (enum target_hw_bp_type): Remove.
6676 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6678 * Makefile.in (SFILES): /common/target-common.c.
6679 (OBS): Add target-common.o.
6680 (server_h): Add $(srcdir)/../common/target-common.h.
6681 (target-common.o): New target.
6682 * server.c (queue_stop_reply_callback): Free
6683 status string after use.
6684 * target.c (target_waitstatus_to_string): Remove.
6685 * target.h: Include target-common.h.
6686 (resume_kind): Likewise.
6687 (target_waitkind): Likewise.
6688 (target_waitstatus): Likewise.
6689 (TARGET_WNOHANG): Likewise.
6691 2013-07-04 Yao Qi <yao@codesourcery.com>
6693 * Makefile.in (host_alias): Use @host_noncanonical@.
6694 (target_alias): Use @target_noncanonical@.
6695 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6696 ACX_NONCANONICAL_HOST.
6697 * configure: Regenerated.
6700 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6702 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6703 * configure: Rebuild.
6704 * Makefile.in (version_host, version_target): Get from configure.
6705 (version.c): Use $(version_host) and $(version_target).
6707 2013-07-03 Pedro Alves <palves@redhat.com>
6709 * Makefile.in (config.status): Depend on development.sh.
6710 * acinclude.m4: Include libmcheck.m4.
6711 * configure: Regenerate.
6713 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6715 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6716 attribute inside the parentheses.
6717 (winapi_DebugSetProcessKillOnExit): Ditto.
6718 (winapi_DebugBreakProcess): Ditto.
6719 (winapi_GenerateConsoleCtrlEvent): Ditto.
6721 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6723 * notif.h (notif_event): Add a dummy member to avoid compiler
6726 2013-07-01 Pedro Alves <palves@redhat.com>
6728 * hostio.c (HOSTIO_PATH_MAX): Define.
6729 (require_filename, handle_open, handle_unlink, handle_readlink):
6732 2013-07-01 Pedro Alves <palves@redhat.com>
6734 * server.h: Include "pathmax.h".
6735 * linux-low.c: Don't include sys/param.h.
6736 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6738 * win32-low.c: Don't include sys/param.h.
6739 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6741 2013-07-01 Pedro Alves <palves@redhat.com>
6743 * event-loop.c: Don't check HAVE_UNISTD_H before including
6745 * gdbreplay.c: Likewise.
6746 * remote-utils.c: Likewise.
6747 * server.c: Likewise.
6748 * configure.ac: Don't check for unistd.h.
6749 * configure: Regenerate.
6751 2013-06-28 Tom Tromey <tromey@redhat.com>
6753 * Makefile.in (version.c): Use version.in, not
6756 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6758 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6759 * configure: Rebuild.
6760 * Makefile.in (version_host, version_target): Get from configure.
6761 (version.c): Use $(version_host) and $(version_target).
6763 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6765 Fix trace-status to output user name without trailing colon.
6766 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6768 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6770 Fix trace-status to output proper start-time and stop-time.
6771 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6772 output start time and stop time in hex as gdb expects.
6774 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6776 * tracepoint.c (build_traceframe_info_xml): Output trace state
6777 variables present in the trace buffer.
6779 2013-06-24 Tom Tromey <tromey@redhat.com>
6781 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6783 (version.o): Remove.
6784 * gdbreplay.c: Include version.h.
6785 (version, host_name): Don't declare.
6786 * server.h: Include version.h.
6787 (version, host_name): Don't declare.
6789 2013-06-12 Pedro Alves <palves@redhat.com>
6791 * linux-x86-low.c (linux_is_elf64): Delete global.
6792 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6793 with local linux_pid_exe_is_elf_64_file use.
6795 2013-06-11 Pedro Alves <palves@redhat.com>
6797 * linux-low.c (regset_disabled, disable_regset): New functions.
6798 (regsets_fetch_inferior_registers)
6799 (regsets_store_inferior_registers): Use them.
6800 (initialize_regsets_info); Don't allocate the disabled_regsets
6802 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6805 2013-06-11 Pedro Alves <palves@redhat.com>
6807 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6810 2013-06-11 Pedro Alves <palves@redhat.com>
6812 * linux-x86-low.c (initialize_low_arch): Call
6813 init_registers_x32_avx_linux.
6815 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6817 Fix compatibility with Android Bionic.
6818 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6821 2013-06-07 Pedro Alves <palves@redhat.com>
6824 * Makefile.in (OBS): Add tdesc.o.
6825 (IPA_OBJS): Add tdesc-ipa.o.
6826 (tdesc-ipa.o): New rule.
6827 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6829 * linux-low.c (new_inferior): Delete.
6830 (disabled_regsets, num_regsets): Delete.
6831 (linux_add_process): Adjust to set the new per-process
6833 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6834 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6835 was a stop. When calling arch_setup, switch the current inferior
6836 to the thread that got an event.
6837 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6838 (regsets_fetch_inferior_registers)
6839 (regsets_store_inferior_registers): New regsets_info parameter.
6841 (linux_register_in_regsets): New regs_info parameter. Adjust to
6843 (register_addr, fetch_register, store_register): New usrregs_info
6844 parameter. Adjust to use it.
6845 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6846 parameter regs_info. Adjust to use it.
6847 (linux_fetch_registers): Get the current inferior's regs_info, and
6849 (linux_store_registers): Ditto.
6850 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6851 (initialize_low): Don't initialize the target_regsets here. Call
6852 initialize_low_arch.
6853 * linux-low.h (target_regsets): Delete declaration.
6854 (struct regsets_info): New.
6855 (struct usrregs_info): New.
6856 (struct regs_info): New.
6857 (struct process_info_private) <new_inferior>: New field.
6858 (struct linux_target_ops): Delete the num_regs, regmap, and
6859 regset_bitmap fields. New field regs_info.
6860 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6861 * i387-fp.c (num_xmm_registers): Delete.
6862 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6863 calls to new interface.
6864 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6865 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6866 Infer the number of xmm registers from the regcache's target
6868 * i387-fp.h (num_xmm_registers): Delete.
6869 * inferiors.c (add_thread): Don't install the thread's regcache
6871 * proc-service.c (gregset_info): Fetch the current inferior's
6872 regs_info. Adjust to use it.
6873 * regcache.c: Include tdesc.h.
6874 (register_bytes, reg_defs, num_registers)
6875 (gdbserver_expedite_regs): Delete.
6876 (get_thread_regcache): If the thread doesn't have a regcache yet,
6877 create one, instead of aborting gdbserver.
6878 (regcache_invalidate_one): Rename to ...
6879 (regcache_invalidate_thread): ... this.
6880 (regcache_invalidate_one): New.
6881 (regcache_invalidate): Only invalidate registers of the current
6883 (init_register_cache): Add target_desc parameter, and use it.
6884 (new_register_cache): Ditto. Assert the target description has a
6885 non zero registers_size.
6886 (regcache_cpy): Add assertions. Adjust.
6887 (realloc_register_cache, set_register_cache): Delete.
6888 (registers_to_string, registers_from_string): Adjust.
6889 (find_register_by_name, find_regno, find_register_by_number)
6890 (register_cache_size): Add target_desc parameter, and use it.
6891 (free_register_cache_thread, free_register_cache_thread_one)
6892 (regcache_release, register_cache_size): New.
6893 (register_size): Add target_desc parameter, and use it.
6894 (register_data, supply_register, supply_register_zeroed)
6895 (supply_regblock, supply_register_by_name, collect_register)
6896 (collect_register_as_string, collect_register_by_name): Adjust.
6897 * regcache.h (struct target_desc): Forward declare.
6898 (struct regcache) <tdesc>: New field.
6899 (init_register_cache, new_register_cache): Add target_desc
6901 (regcache_invalidate_thread): Declare.
6902 (regcache_invalidate_one): Delete declaration.
6903 (regcache_release): Declare.
6904 (find_register_by_number, register_cache_size, register_size)
6905 (find_regno): Add target_desc parameter.
6906 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6908 * remote-utils.c: Include tdesc.h.
6909 (outreg, prepare_resume_reply): Adjust.
6910 * server.c: Include tdesc.h.
6911 (gdbserver_xmltarget): Delete declaration.
6912 (get_features_xml, process_serial_event): Adjust.
6913 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6915 (struct process_info) <tdesc>: New field.
6916 (ipa_tdesc): Declare.
6917 * tdesc.c: New file.
6918 * tdesc.h: New file.
6919 * tracepoint.c: Include tdesc.h.
6920 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6921 (get_context_regcache): Adjust to pass ipa_tdesc down.
6922 (do_action_at_tracepoint): Adjust to get the register cache size
6923 from the context regcache's description.
6924 (traceframe_walk_blocks): Adjust to get the register cache size
6925 from the current trace frame's description.
6926 (traceframe_get_pc): Adjust to get current trace frame's
6927 description and pass it down.
6928 (gdb_collect): Adjust to get the register cache size from the
6930 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6931 (gdbserver_xmltarget): Delete.
6932 (initialize_low_tracepoint): Set the ipa's target description.
6933 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6934 (initialize_low_tracepoint): Set the ipa's target description.
6935 * linux-x86-low.c: Include tdesc.h.
6936 [__x86_64__] (is_64bit_tdesc): New.
6937 (ps_get_thread_area, x86_get_thread_area): Use it.
6938 (i386_cannot_store_register): Rename to ...
6939 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6940 (i386_cannot_fetch_register): Rename to ...
6941 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6942 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6944 (target_regsets): Rename to ...
6945 (x86_regsets): ... this.
6946 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6948 (x86_siginfo_fixup): Use is_64bit_tdesc.
6949 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6950 (tdesc_x32_avx_linux, tdesc_x32_linux)
6951 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6953 (x86_linux_update_xmltarget): Delete.
6954 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6955 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6956 (AMD64_LINUX_USER64_CS): New.
6957 (x86_linux_read_description): New, based on
6958 x86_linux_update_xmltarget.
6959 (same_process_callback): New.
6960 (x86_arch_setup_process_callback): New.
6961 (x86_linux_update_xmltarget): New.
6962 (x86_regsets_info): New.
6963 (amd64_linux_regs_info): New.
6964 (i386_linux_usrregs_info): New.
6965 (i386_linux_regs_info): New.
6966 (x86_linux_regs_info): New.
6967 (x86_arch_setup): Reimplement.
6968 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6969 (x86_emit_ops): Ditto.
6970 (the_low_target): Adjust. Install x86_linux_regs_info,
6971 x86_cannot_fetch_register, and x86_cannot_store_register.
6972 (initialize_low_arch): New.
6973 * linux-ia64-low.c (tdesc_ia64): Declare.
6974 (ia64_fetch_register): Adjust.
6975 (ia64_usrregs_info, regs_info): New globals.
6976 (ia64_regs_info): New function.
6977 (the_low_target): Adjust.
6978 (initialize_low_arch): New function.
6979 * linux-sparc-low.c (tdesc_sparc64): Declare.
6980 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6982 (sparc_arch_setup): New function.
6983 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6984 (the_low_target): Adjust.
6985 (initialize_low_arch): New function.
6986 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6987 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6988 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6989 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6990 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6991 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6992 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6993 (tdesc_powerpc_isa205_vsx64l): Declare.
6994 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6995 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6996 (ppc_set_pc, ppc_get_hwcap): Adjust.
6997 (ppc_usrregs_info): Forward declare.
6998 (!__powerpc64__) ppc_regmap_adjusted: New global.
6999 (ppc_arch_setup): Adjust to the current process'es target
7001 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7002 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7003 (ppc_store_evrregset): Adjust.
7004 (target_regsets): Rename to ...
7005 (ppc_regsets): ... this, and make static.
7006 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7007 (ppc_regs_info): New function.
7008 (the_low_target): Adjust.
7009 (initialize_low_arch): New function.
7010 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7011 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7012 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7013 (tdesc_s390x_linux64v2): Declare.
7014 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7015 (s390_fill_gregset, s390_store_last_break): Adjust.
7016 (target_regsets): Rename to ...
7017 (s390_regsets): ... this, and make static.
7018 (s390_get_pc, s390_set_pc): Adjust.
7019 (s390_get_hwcap): New target_desc parameter, and use it.
7020 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7021 (s390_arch_setup): Adjust to set the current process'es target
7022 description. Don't adjust the regmap.
7023 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7024 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7025 (regs_info_3264): New globals.
7026 (s390_regs_info): New function.
7027 (the_low_target): Adjust.
7028 (initialize_low_arch): New function.
7029 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7030 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7031 [__mips64] (init_registers_mips_linux)
7032 (init_registers_mips_dsp_linux): Delete defines.
7033 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7034 (have_dsp): New global.
7035 (mips_read_description): New, based on mips_arch_setup.
7036 (mips_arch_setup): Reimplement.
7037 (get_usrregs_info): New function.
7038 (mips_cannot_fetch_register, mips_cannot_store_register)
7039 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7040 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7041 (target_regsets): Rename to ...
7042 (mips_regsets): ... this, and make static.
7043 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7044 (dsp_regs_info, regs_info): New globals.
7045 (mips_regs_info): New function.
7046 (the_low_target): Adjust.
7047 (initialize_low_arch): New function.
7048 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7049 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7051 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7052 (arm_read_description): New, with bits factored from
7054 (arm_arch_setup): Reimplement.
7055 (target_regsets): Rename to ...
7056 (arm_regsets): ... this, and make static.
7057 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7058 (arm_regs_info): New function.
7059 (the_low_target): Adjust.
7060 (initialize_low_arch): New function.
7061 * linux-m68k-low.c (tdesc_m68k): Declare.
7062 (target_regsets): Rename to ...
7063 (m68k_regsets): ... this, and make static.
7064 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7065 (m68k_regs_info): New function.
7066 (m68k_arch_setup): New function.
7067 (the_low_target): Adjust.
7068 (initialize_low_arch): New function.
7069 * linux-sh-low.c (tdesc_sharch): Declare.
7070 (target_regsets): Rename to ...
7071 (sh_regsets): ... this, and make static.
7072 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7073 (sh_regs_info, sh_arch_setup): New functions.
7074 (the_low_target): Adjust.
7075 (initialize_low_arch): New function.
7076 * linux-bfin-low.c (tdesc_bfin): Declare.
7077 (bfin_arch_setup): New function.
7078 (bfin_usrregs_info, regs_info): New globals.
7079 (bfin_regs_info): New function.
7080 (the_low_target): Adjust.
7081 (initialize_low_arch): New function.
7082 * linux-cris-low.c (tdesc_cris): Declare.
7083 (cris_arch_setup): New function.
7084 (cris_usrregs_info, regs_info): New globals.
7085 (cris_regs_info): New function.
7086 (the_low_target): Adjust.
7087 (initialize_low_arch): New function.
7088 * linux-cris-low.c (tdesc_crisv32): Declare.
7089 (cris_arch_setup): New function.
7090 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7091 (cris_regs_info): New function.
7092 (the_low_target): Adjust.
7093 (initialize_low_arch): New function.
7094 * linux-m32r-low.c (tdesc_m32r): Declare.
7095 (m32r_arch_setup): New function.
7096 (m32r_usrregs_info, regs_info): New globals.
7097 (m32r_regs_info): Adjust.
7098 (initialize_low_arch): New function.
7099 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7100 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7101 (tic6x_usrregs_info): Forward declare.
7102 (tic6x_read_description): New function, based on ...
7103 (tic6x_arch_setup): ... this. Reimplement.
7104 (target_regsets): Rename to ...
7105 (tic6x_regsets): ... this, and make static.
7106 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7107 (tic6x_regs_info): New function.
7108 (the_low_target): Adjust.
7109 (initialize_low_arch): New function.
7110 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7111 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7112 (target_regsets): Rename to ...
7113 (xtensa_regsets): ... this, and make static.
7114 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7116 (xtensa_arch_setup, xtensa_regs_info): New functions.
7117 (the_low_target): Adjust.
7118 (initialize_low_arch): New function.
7119 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7120 (nios2_arch_setup): Set the current process'es tdesc.
7121 (target_regsets): Rename to ...
7122 (nios2_regsets): ... this.
7123 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7124 (nios2_regs_info): New function.
7125 (the_low_target): Adjust.
7126 (initialize_low_arch): New function.
7127 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7128 (aarch64_arch_setup): Set the current process'es tdesc.
7129 (target_regsets): Rename to ...
7130 (aarch64_regsets): ... this.
7131 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7132 (aarch64_regs_info): New function.
7133 (the_low_target): Adjust.
7134 (initialize_low_arch): New function.
7135 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7137 (target_regsets): Rename to ...
7138 (tile_regsets): ... this.
7139 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7140 (tile_regs_info): New function.
7141 (tile_arch_setup): Set the current process'es tdesc.
7142 (the_low_target): Adjust.
7143 (initialize_low_arch): New function.
7144 * spu-low.c (tdesc_spu): Declare.
7145 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7146 * win32-arm-low.c (tdesc_arm): Declare.
7147 (arm_arch_setup): New function.
7148 (the_low_target): Install arm_arch_setup instead of
7150 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7151 (init_windows_x86): Rename to ...
7152 (i386_arch_setup): ... this. Set `win32_tdesc'.
7153 (the_low_target): Adjust.
7154 * win32-low.c (win32_tdesc): New global.
7155 (child_add_thread): Don't create the thread cache here.
7156 (do_initial_child_stuff): Set the new process'es tdesc.
7157 * win32-low.h (struct target_desc): Forward declare.
7158 (win32_tdesc): Declare.
7159 * lynx-i386-low.c (tdesc_i386): Declare global.
7160 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7161 * lynx-low.c (lynx_tdesc): New global.
7162 (lynx_add_process): Set the new process'es tdesc.
7163 * lynx-low.h (struct target_desc): Forward declare.
7164 (lynx_tdesc): Declare global.
7165 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7166 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7167 * nto-low.c (nto_tdesc): New global.
7168 (do_attach): Set the new process'es tdesc.
7169 * nto-low.h (struct target_desc): Forward declare.
7170 (nto_tdesc): Declare.
7171 * nto-x86-low.c (tdesc_i386): Declare.
7172 (nto_x86_arch_setup): Set `nto_tdesc'.
7174 2013-06-04 Gary Benson <gbenson@redhat.com>
7176 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7177 to qSupported response when appropriate.
7178 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7179 with nonzero-length annex.
7180 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7181 arguments supplied in annex.
7183 2013-05-31 Doug Evans <dje@google.com>
7186 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7187 64 bits in 64-cross-32 environment.
7189 2013-05-28 Pedro Alves <palves@redhat.com>
7191 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7192 (aarch64-without-fpu.c): Delete rule.
7193 * configure.srv (aarch64*-*-linux*): Remove references to
7194 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7195 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7198 2013-05-24 Pedro Alves <palves@redhat.com>
7200 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7201 instead of strchr/decode_address. Error if the range isn't split
7202 with a ','. Don't assume there's be a ':' in the action.
7204 2013-05-23 Yao Qi <yao@codesourcery.com>
7205 Pedro Alves <palves@redhat.com>
7207 * linux-low.c (lwp_in_step_range): New function.
7208 (linux_wait_1): If the thread was range stepping and stopped
7209 outside the stepping range, report the stop to GDB. Otherwise,
7210 continue stepping. Add range stepping debug output.
7211 (linux_set_resume_request): Copy the step range from the resume
7213 (linux_supports_range_stepping): New.
7214 (linux_target_ops) <supports_range_stepping>: Set to
7215 linux_supports_range_stepping.
7216 * linux-low.h (struct linux_target_ops)
7217 <supports_range_stepping>: New field.
7218 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7219 * linux-x86-low.c (x86_supports_range_stepping): New.
7220 (the_low_target) <supports_range_stepping>: Set to
7221 x86_supports_range_stepping.
7222 * server.c (handle_v_cont): Handle 'r' action.
7223 (handle_v_requests): Append ";r" if the target supports range
7225 * target.h (struct thread_resume) <step_range_start,
7226 step_range_end>: New fields.
7227 (struct target_ops) <supports_range_stepping>:
7229 (target_supports_range_stepping): New macro.
7231 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7233 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7234 confusion in comment.
7236 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7238 * lynx-low.c (struct process_info_private): New type.
7239 (lynx_add_process): New function.
7240 (lynx_create_inferior, lynx_attach): Replace calls to
7241 add_process by calls to lynx_add_process.
7242 (lynx_resume): If PTID is null, then try using
7243 current_process()->private->last_wait_event_ptid.
7245 (lynx_clear_inferiors): Delete. The contents of that function
7246 has been inlined in lynx_mourn;
7247 (lynx_wait_1): Save the ptid in the process's private data.
7248 (lynx_mourn): Free the process' private data. Replace call
7249 to lynx_clear_inferiors by call to clear_inferiors.
7251 2013-05-17 Yao Qi <yao@codesourcery.com>
7253 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7256 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7258 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7259 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7260 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7261 PT_TEXT_END_ADDR guards. Update comments.
7262 (linux_target_op) <read_offsets>: Conditionally define to
7263 linux_read_offsets if the target is UCLIBC and if it defines
7264 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7266 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7267 Andrew Jenner <andrew@codesourcery.com>
7269 * Makefile.in (SFILES): Add linux-nios2-low.c.
7270 (clean): Add action to delete nios2-linux.c.
7271 (nios2-linux.c): New rule.
7272 * configure.srv: Add nios2*-*-linux*.
7273 * linux-nios2-low.c: New.
7275 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7277 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7279 2013-04-25 Hui Zhu <hui@codesourcery.com>
7282 * ax.c (ax_printf): Add fflush.
7284 2013-04-22 Tom Tromey <tromey@redhat.com>
7286 * Makefile.in (SFILES): Add filestuff.c.
7287 (OBS): Add filestuff.o.
7288 (filestuff.o): New target.
7289 * config.in, configure: Rebuild.
7290 * configure.ac: Check for fdwalk, pipe2.
7292 2013-04-17 Pedro Alves <palves@redhat.com>
7294 * configure.ac (USE_THREAD_DB): Delete variable.
7295 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7296 Don't AC_SUBST USE_THREAD_DB.
7297 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7298 * config.in, configure: Regenerate.
7300 2013-04-16 Pedro Alves <palves@redhat.com>
7302 * linux-low.h (struct lwp_info) <thread_known>: Move under
7303 the USE_THREAD_DB #ifdef.
7305 2013-04-16 Pedro Alves <palves@redhat.com>
7307 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7308 (linux-low.o): Delete rule.
7309 * linux-low.h: Always include "gdb_thread_db.h" instead of
7310 conditionally including thread_db.h.
7311 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7314 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7316 * Makefile.in (install-only): Fix make install regression.
7318 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7320 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7321 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7323 * gdbserver.1: Remove.
7325 2013-03-22 Pedro Alves <palves@redhat.com>
7327 * linux-low.c (handle_extended_wait): Don't call
7328 linux_enable_event_reporting.
7330 2013-03-15 Tony Theodore <tonyt@logyst.com>
7333 * Makefile.in (SHELL): Use @SHELL@.
7335 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7337 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7340 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7342 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7343 Remove extraneous NULL element.
7345 2013-03-13 Yao Qi <yao@codesourcery.com>
7347 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7348 'V' block in trace frame.
7350 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7352 * target.h (struct target_ops): Add btrace ops.
7353 (target_supports_btrace): New macro.
7354 (target_enable_btrace): New macro.
7355 (target_disable_btrace): New macro.
7356 (target_read_btrace): New macro.
7357 * gdbthread.h (struct thread_info): Add btrace field.
7358 * server.c: Include btrace-common.h.
7359 (handle_btrace_general_set): New function.
7360 (handle_btrace_enable): New function.
7361 (handle_btrace_disable): New function.
7362 (handle_general_set): Call handle_btrace_general_set.
7363 (handle_qxfer_btrace): New function.
7364 (struct qxfer qxfer_packets[]): Add btrace entry.
7365 * inferiors.c (remove_thread): Disable btrace.
7366 * linux-low: Include linux-btrace.h.
7367 (linux_low_enable_btrace): New function.
7368 (linux_low_read_btrace): New function.
7369 (linux_target_ops): Add btrace ops.
7370 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7371 Add srv_linux_btrace=yes.
7372 (x86_64-*-linux*): Add linux-btrace.o.
7373 Add srv_linux_btrace=yes.
7374 * configure.ac: Define HAVE_LINUX_BTRACE.
7375 * config.in: Regenerated.
7376 * configure: Regenerated.
7378 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7380 * server.c (handle_qxfer): Preserve error message if -3 is
7382 (qxfer): Document the -3 return value.
7384 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7386 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7387 (linux_btrace_h): New variable.
7388 (linux-btrace.o): New rule.
7390 2013-03-08 Stan Shebs <stan@codesourcery.com>
7391 Hafiz Abid Qadeer <abidh@codesourcery.com>
7393 * tracepoint.c (trace_buffer_size): New global.
7394 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7395 (init_trace_buffer): Change to one-argument function. Allocate
7396 trace buffer memory.
7397 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7398 handle QTBuffer:size packet.
7399 (cmd_bigqtbuffer_size): New function.
7400 (initialize_tracepoint): Call init_trace_buffer with
7401 DEFAULT_TRACE_BUFFER_SIZE.
7402 * server.c (handle_query): Add QTBuffer:size in the
7405 2013-03-07 Yao Qi <yao@codesourcery.com>
7407 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7408 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7410 (cmd_qtsp): Adjust condition. Do post increment.
7411 Set cur_action and cur_step_action back to 0.
7413 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7416 * linux-low.c (linux_write_memory): Return early success if LEN is
7419 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7421 * configure.srv: Add x86_64-*-cygwin* as target.
7423 2013-02-28 Tom Tromey <tromey@redhat.com>
7425 * configure.ac: Invoke AC_SYS_LARGEFILE.
7426 * configure, config.in: Rebuild.
7428 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7430 * win32-low.c: Throughout, fix format strings and casts of
7431 printf-like functions to avoid type related warnings on all
7433 (get_child_debug_event): Print dwDebugEventCode as hex since
7434 that's how it's usually documented.
7436 2013-02-28 Yao Qi <yao@codesourcery.com>
7438 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7441 2013-02-27 Jiong Wang <jiwang@tilera.com>
7443 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7444 (reg-tilegx32.c): New rule.
7445 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7446 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7447 different register info initializer according to elf class.
7448 (init_registers_tilgx32): New function. The tilegx32 register info
7450 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7451 (tile_store_gregset): Likewise.
7453 2013-02-27 Yao Qi <yao@codesourcery.com>
7455 * server.c (process_point_options): Print debug message when
7456 debug_threads is true.
7458 2013-02-26 Yao Qi <yao@codesourcery.com>
7460 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7462 2013-02-19 Pedro Alves <palves@redhat.com>
7463 Kai Tietz <ktietz@redhat.com>
7467 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7468 instead of strtoul to extract address from packet.
7469 (process_serial_event) <'z'>: Likewise.
7471 2013-02-18 Yao Qi <yao@codesourcery.com>
7473 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7475 2013-02-14 Pedro Alves <palves@redhat.com>
7479 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7480 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7482 2013-02-14 Pedro Alves <palves@redhat.com>
7484 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7486 2013-02-14 Pedro Alves <palves@redhat.com>
7488 * tracepoint.c (save_string): Delete.
7489 (add_tracepoint_action): Use savestring instead of save_string.
7491 2013-02-12 Pedro Alves <palves@redhat.com>
7493 * linux-xtensa-low.c: Ditto.
7494 * xtensa-xtregs.c: Ditto.
7496 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7498 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7501 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7503 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7504 aarch64_num_wp_regs and aarch64_num_bp_regs to
7505 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7507 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7509 * linux-aarch64-low.c (ps_get_thread_area): Replace
7510 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7512 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7513 Marcus Shawcroft <marcus.shawcroft@arm.com>
7514 Nigel Stephens <nigel.stephens@arm.com>
7515 Yufeng Zhang <yufeng.zhang@arm.com>
7517 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7518 (aarch64.c, aarch64-without-fpu.c): New targets.
7519 * configure.srv (aarch64*-*-linux*): New.
7520 * linux-aarch64-low.c: New file.
7522 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7524 * linux-low.c (handle_extended_wait, linux_create_inferior)
7525 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7526 (dequeue_one_deferred_signal, linux_resume_one_thread)
7527 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7528 (linux_tracefork_grandchild, linux_test_for_tracefork)
7529 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7530 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7531 where the argument is 0.
7533 2013-01-25 Yao Qi <yao@codesourcery.com>
7535 * event-loop.c: Include "queue.h".
7536 (gdb_event_p): New typedef.
7537 (struct gdb_event) <next_event>: Remove.
7538 (event_queue): Change to QUEUE(gdb_event_p).
7539 (async_queue_event): Remove.
7540 (gdb_event_xfree): New.
7541 (initialize_event_loop): New.
7542 (process_event): Use API from QUEUE.
7543 (wait_for_event): Likewise.
7544 * server.c (main): Call initialize_event_loop.
7545 * server.h (initialize_event_loop): Declare.
7547 2013-01-18 Yao Qi <yao@codesourcery.com>
7549 * ax.h (struct eval_agent_expr_context): New.
7550 (gdb_eval_agent_expr): Update declaration.
7551 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7552 TFRAME. Add new argument CTX.
7553 * server.h (struct eval_agent_expr_context): Declare.
7554 (agent_mem_read, agent_tsv_read): Update declaration.
7555 (agent_mem_read_string): Likewise.
7556 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7557 (add_traceframe_block): Add new argument TPOINT.
7558 Increase TPOINT->traceframe_usage.
7559 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7560 eval_tracepoint_agent_expr.
7561 (condition_true_at_tracepoint): Likewise.
7562 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7563 (agent_mem_read_string, agent_tsv_read): Likewise.
7565 2013-01-16 Yao Qi <yao@codesourcery.com>
7567 * linux-low.c (linux_resume_one_lwp): Don't check
7568 'lwp->bp_reinsert != 0'.
7570 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7571 Pedro Alves <palves@redhat.com>
7573 * lynx-low.c (ptrace_request_to_str): Define a temporary
7574 macro and use it to simplify this function's implementation.
7576 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7578 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7581 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7583 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7585 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7587 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7589 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7591 * lynx-low.c (lynx_resume): Use the resume_info parameter
7592 to determine the ptid for the lynx_ptrace call, unless
7593 it is equal to minus_one_ptid, in which case we use the
7594 ptid of the current_inferior.
7595 (lynx_wait_1): After having received a thread create/exit
7596 event, resume the inferior's execution using the signaling
7597 thread's ptid, rather than the old ptid.
7599 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7601 * lynx-low.c (lynx_resume): Delete variable ret.
7603 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7605 * gdbreplay.c (gdbreplay_version): Update copyright year.
7606 * server.c (gdbserver_version): Likewise.
7608 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7610 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7613 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7615 * lynx-low.c (ptrace_request_to_str): Add handling for
7618 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7620 * lynx-low.c (lynx_attach): Delete variable new_process.
7622 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7624 * lynx-low.c (lynx_create_inferior): Delete variable
7627 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7629 * lynx-low.c (ptrace_request_to_str): Do not handle
7630 PTRACE_GETTHREADLIST if this macro does not exist.
7632 2012-12-15 Yao Qi <yao@codesourcery.com>
7634 * Makefile.in (OBS): Add notif.o.
7635 * notif.c, notif.h: New.
7636 * server.c: Include "notif.h".
7637 (struct vstop_notif) <next>: Remove.
7639 (queue_stop_reply): Update.
7640 (push_event, send_next_stop_reply): Remove.
7641 (discard_queued_stop_replies): Update.
7642 (notif_stop): New variable.
7643 (handle_v_stopped): Remove.
7644 (handle_v_requests): Don't call handle_v_stopped. Call
7645 handle_ack_notif instead.
7646 (queue_stop_reply_callback): Call notif_event_enque instead
7647 of queue_stop_reply.
7648 (handle_status): Don't call send_next_stop_reply, call
7649 notif_write_event instead.
7650 (kill_inferior_callback): Likewise.
7651 (detach_or_kill_inferior_callback): Likewise.
7652 (main): Call initialize_notif.
7653 (process_serial_event): Call QUEUE_is_empty.
7654 (handle_target_event): Call notif_push instead of push event.
7655 * server.h (push_event): Remove declaration.
7657 2012-12-10 Tom Tromey <tromey@redhat.com>
7659 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7660 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7663 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7664 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7665 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7666 (amd64-linux-ipa.o, ax.o): Rewrite.
7667 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7668 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7669 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7670 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7671 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7672 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7673 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7674 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7675 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7676 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7677 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7678 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7679 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7680 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7681 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7682 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7683 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7684 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7685 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7686 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7687 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7688 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7689 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7690 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7691 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7692 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7693 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7694 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7695 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7696 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7697 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7698 (reg-tilegx.o): Remove.
7699 (all_object_files): New macro.
7700 Include .deps files.
7701 * aclocal.m4, configure: Rebuild.
7702 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7703 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7704 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7706 2012-12-05 Tom Tromey <tromey@redhat.com>
7709 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7711 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7713 * configure.ac: Check for linux/perf_event.h.
7714 * config.in: Regenerated.
7715 * configure: Regenerated.
7717 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7719 * hostio.c (handle_readlink): Decrease buffer size
7720 parameter passed to readlink by one byte.
7722 2012-11-26 Yao Qi <yao@codesourcery.com>
7724 * configure.ac (build_warnings): Append '-Wempty-body'.
7725 * configure: Regenerated.
7726 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7729 2012-11-15 Pierre Muller <muller@sourceware.org>
7731 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7732 * config.in: Regenerate.
7733 * configure: Regenerate.
7734 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7735 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7736 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7737 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7739 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7740 instead of <sys/wait.h> header.
7741 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7743 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7745 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7746 (various make rules): Remove -DGDBSERVER
7748 2012-11-09 Yao Qi <yao@codesourcery.com>
7750 * spu-low.c (current_ptid): Move it to ..
7751 * gdbthread.h: ... here. New.
7752 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7753 * server.c (myresume, process_serial_event): Likewise.
7754 * thread-db.c (thread_db_find_new_threads): Likewise.
7755 * tracepoint.c (run_inferior_command): Likewise.
7757 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7759 * server.c (handle_search_memory_1): Include access length in
7762 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7764 * linux-crisv32-low.c: Fix compile errors.
7766 2012-09-04 Yao Qi <yao@codesourcery.com>
7768 * tracepoint.c (cmd_qtsv): Adjust debug message.
7769 Don't check CUR_TPOINT.
7771 2012-08-28 Yao Qi <yao@codesourcery.com>
7773 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7774 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7775 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7776 Remove declarations of xmalloc, xreallloc, xstrdup and
7778 * Makefile.in (libiberty_h): New.
7779 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7780 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7782 2012-08-23 Yao Qi <yao@codesourcery.com>
7784 * server.h: Remove declaration of 'xsnprintf'.
7786 2012-08-22 Keith Seitz <keiths@redhat.com>
7788 * server.h: Include build-gnulib-gbserver/config.h.
7789 * gdbreplay.c: Likewise.
7791 2012-08-08 Doug Evans <dje@google.com>
7793 * Makefile.in (SFILES): Add gdb_vecs.c.
7794 (OBS): Add gdb_vecs.o.
7795 (gdb_vecs_h, host_defs_h): New variables.
7796 (thread-db.o): Add $(gdb_vecs_h) dependency.
7797 (gdb_vecs.o): New rule.
7798 * thread-db.c: #include "gdb_vecs.h".
7799 (thread_db_load_search): Use a vector to iterate over path elements.
7800 Handle text appearing after "$pdir".
7802 * configure.ac: Add check for strstr.
7803 * config.in: Regenerate.
7804 * configure: Regenerate.
7806 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7808 * hostio.c (handle_pread): If pread fails, fall back to attempting
7810 (handle_pwrite): Likewise for pwrite.
7812 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7814 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7815 between unsupported TYPE and unimplementable ADDR/LEN combination.
7816 (arm_insert_point): Act on new return value.
7818 2012-07-31 Pedro Alves <palves@redhat.com>
7820 * server.c (process_point_options): Only skip tokens if we find
7821 one that is unrecognized. Don't treat 'X' specially while
7822 skipping unrecognized tokens.
7824 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7826 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7827 to 4-byte-align HW breakpoint addresses for Thumb.
7829 2012-07-27 Yao Qi <yao@codesourcery.com>
7833 * server.h: Declare gdb_agent_about_to_close.
7834 * target.c (kill_inferior): Include "agent.h".
7835 New. Send command 'kill'.
7836 * target.h (kill_inferior): Removed macro.
7837 * tracepoint.c (gdb_agent_about_to_close): New.
7838 (gdb_agent_helper_thread): Handle command 'close'.
7839 Wait endlessly until the inferior stops.
7840 Install gdb_agent_remove_socket to atexit hook.
7841 (agent_socket_name): New static variable.
7842 (gdb_agent_socket_init): Replace local variable 'name' with
7843 'agent_socket_name'.
7844 (gdb_agent_remove_socket): New.
7846 2012-07-27 Yao Qi <yao@codesourcery.com>
7848 * server.c (process_point_options): Stop at 'X' when parsing.
7850 2012-07-19 Michael Eager <eager@eagercon.com>
7852 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7854 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7855 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7856 hardware breakpoint.
7858 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7860 * gdbserver/linux-low.c (initialize_low): Call
7861 linux_ptrace_init_warnings.
7863 2012-07-02 Doug Evans <dje@google.com>
7865 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7868 2012-07-02 Stan Shebs <stan@codesourcery.com>
7870 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7871 (ax.o): Add it to build rule.
7873 (OBS): Add format.o.
7874 (IPA_OBS): Add format.o.
7875 * server.c (handle_query): Claim support for breakpoint commands.
7876 (process_point_options): Add command case.
7877 (process_serial_event): Leave running if there are printfs in
7879 * mem-break.h (any_persistent_commands): Declare.
7880 (add_breakpoint_commands): Declare.
7881 (gdb_no_commands_at_breakpoint): Declare.
7882 (run_breakpoint_commands): Declare.
7883 * mem-break.c (struct point_command_list): New struct.
7884 (struct breakpoint): New field command_list.
7885 (any_persistent_commands): New function.
7886 (add_commands_to_breakpoint): New function.
7887 (add_breakpoint_commands): New function.
7888 (gdb_no_commands_at_breakpoint): New function.
7889 (run_breakpoint_commands): New function.
7890 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7892 * ax.c: Include format.h.
7893 (ax_printf): New function.
7894 (gdb_eval_agent_expr): Add printf opcode.
7896 2012-06-13 Yao Qi <yao@codesourcery.com>
7898 * server.c (start_inferior): Remove duplicated writes to fields
7899 'last_resume_kind' and 'last_status' of 'current_inferior'.
7901 2012-06-12 Yao Qi <yao@codesourcery.com>
7902 Pedro Alves <palves@redhat.com>
7904 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7906 * server.c (handle_v_cont): Extend comment.
7908 2012-06-11 Yao Qi <yao@codesourcery.com>
7910 * linux-low.c (linux_attach): Add 'static'.
7912 2012-06-06 Yao Qi <yao@codesourcery.com>
7914 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7916 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7918 Fix gcc -flto compilation warning.
7919 * server.c (main): Make variable multi_mode and attach volatile.
7921 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7923 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7924 if the platform doesn't know about it.
7926 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7928 * Makefile.in (SFILES): Add linux-tile-low.c.
7929 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7930 * configure.srv: Handle tilegx-*-linux*.
7931 * linux-tile-low.c: New file.
7933 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7935 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7937 2012-05-24 Pedro Alves <palves@redhat.com>
7941 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7943 2012-05-24 Pedro Alves <palves@redhat.com>
7947 Replace target_signal with gdb_signal throughout.
7949 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7951 * linux-low.c (linux_store_registers): Avoid the copying sequence
7952 when no data has been retrieved by ptrace.
7954 2012-05-22 Will Deacon <will.deacon@arm.com>
7956 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7957 Include asm/ptrace.h.
7958 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7961 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7963 * linux-low.c (linux_store_registers): Don't re-retrieve data
7964 with ptrace that has already been obtained from /proc. Always
7965 copy any data retrieved with ptrace to the buffer supplied.
7967 2012-05-11 Yao Qi <yao@codesourcery.com>
7968 Pedro Alves <palves@redhat.com>
7970 * linux-low.c (enum stopping_threads_kind): New.
7971 (stopping_threads): Change type to `enum stopping_threads_kind'.
7972 (handle_extended_wait): If stopping and suspending threads, leave
7973 the new_lwp suspended too.
7974 (linux_wait_for_event): Adjust.
7975 (stop_all_lwps): Set `stopping_threads' to
7976 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7977 whether we're suspending threads or just stopping them. Assert no
7980 2012-04-29 Yao Qi <yao@codesourcery.com>
7982 * server.h: Move some code to ...
7983 * gdbthread.h: ... here. New.
7984 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7985 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7986 (nto-low.o, win32-low.o): Likewise.
7987 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7988 * regcache.c, remote-utils.c, server.c: Likewise.
7989 * target.c, tracepoint.c, win32-low.c: Likewise.
7991 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7993 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7994 (PTRACE_ARG4_TYPE): Likewise.
7995 (PTRACE_XFER_TYPE): Likewise.
7996 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7997 ptrace to PTRACE_ARG3_TYPE.
7998 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7999 (PTRACE_ARG4_TYPE): Likewise.
8000 (PTRACE_XFER_TYPE): Likewise.
8001 (linux_detach_one_lwp): Cast fourth argument of
8002 ptrace to long then PTRACE_ARG4_TYPE.
8003 (regsets_fetch_inferior_registers): Cast third argument of
8004 ptrace to long then PTRACE_ARG3_TYPE.
8005 (regsets_store_inferior_registers): Likewise.
8007 2012-04-20 Pedro Alves <palves@redhat.com>
8009 * configure: Regenerate.
8011 2012-04-19 Pedro Alves <palves@redhat.com>
8013 * Makefile.in (GNULIB_BUILDDIR): New.
8014 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8015 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8016 (all, install-only, uninstall, clean-info, all-lib, clean): No
8017 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8018 (maintainer-clean realclean distclean): Use subdir_do.
8020 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8021 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8022 * acinclude.m4: Include acx_configure_dir.m4.
8023 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8024 calls. Call AC_PROG_RANLIB. Configure gnulib using
8027 (GNULIB_STDINT_H): Adjust.
8028 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8029 * gdbreplay.c: Include build-gnulib/config.h.
8030 * server.h: Likewise.
8031 * aclocal.m4: Regenerate.
8032 * config.in: Regenerate.
8033 * configure: Regenerate.
8035 2012-04-19 Pedro Alves <palves@redhat.com>
8037 * Makefile.in (LIBGNU, INCGNU): Adjust.
8038 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8039 (all, install-only, uninstall, clean-info, all-lib, clean)
8040 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8041 * configure.ac: Adjust AC_OUTPUT output.
8042 * aclocal.m4: Regenerate.
8043 * configure: Regenerate.
8045 2012-04-19 Pedro Alves <palves@redhat.com>
8047 * Makefile.in (generated_files): New.
8048 (server_h): Remove the explicit dependency on config.h, and depend
8049 on $generated_files.
8051 2012-04-19 Pedro Alves <palves@redhat.com>
8053 * Makefile.in (INCGNU): Add -Ignulib.
8055 2012-04-19 Pedro Alves <palves@redhat.com>
8057 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8058 (INCGNU): ... this, and spell out -I here.
8059 (GNULIB_LIB): Rename to ...
8061 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8063 2012-04-19 Pedro Alves <palves@redhat.com>
8065 * config.in: Regenerate.
8067 2012-04-19 Pedro Alves <palves@redhat.com>
8069 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8070 * server.h (memmem): Remove declaration.
8071 * config.in: Regenerate.
8072 * configure: Regenerate.
8074 2012-04-19 Yao Qi <yao@codesourcery.com>
8076 * Makefile.in (SFILES): Add common/vec.c.
8080 2012-04-19 Yao Qi <yao@codesourcery.com>
8082 * remote-utils.c (prepare_resume_reply): Replace with macro
8083 target_core_of_thread.
8084 * server.c (handle_qxfer_threads_proper): Likewise.
8085 * target.h (traget_core_of_thread): New macro.
8087 2012-04-18 Pedro Alves <palves@redhat.com>
8089 * aclocal.m4: Regenerate.
8090 * configure: Regenerate.
8092 2012-04-16 Yao Qi <yao@codesourcery.com>
8094 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8095 duplicated on address.
8097 2012-04-16 Yao Qi <yao@codesourcery.com>
8099 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8100 (struct tracepoint_action_ops) <send>: New field.
8101 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8102 (agent_expr_send, x_tracepoint_action_send): New.
8103 (l_tracepoint_action_send): New.
8104 (cmd_qtdp): Download and install tracepoint
8105 according to `use_agent'.
8106 (run_inferior_command): Add one more parameter `len'.
8108 (tracepoint_send_agent): New.
8109 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8111 2012-04-16 Yao Qi <yao@codesourcery.com>
8113 * tracepoint.c (download_tracepoints): Moved to ...
8114 (cmd_qtstart): ... here.
8116 2012-04-14 Yao Qi <yao@codesourcery.com>
8118 * tracepoint.c: Include inttypes.h.
8119 (struct collect_memory_action): Use sized types.
8120 (struct tracepoint): Likewise.
8121 (cmd_qtdp, stop_tracing): Update print specifiers.
8122 (cmd_qtp, response_tracepoint): Likewise.
8123 (collect_data_at_tracepoint): Likewise.
8124 (collect_data_at_step): Likewise.
8126 2012-04-14 Yao Qi <yao@codesourcery.com>
8128 Import gnulib module inttypes.
8129 * aclocal.m4, config.in, configure: Regenerated.
8131 2012-04-14 Yao Qi <yao@codesourcery.com>
8133 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8134 Makefile and config.status at last.
8136 2012-04-13 Yao Qi <yao@codesourcery.com>
8138 * tracepoint.c: Include stdint.h unconditionally.
8140 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8142 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8143 on BFD_HAVE_SYS_PROCFS_TYPE.
8144 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8145 * configure: Regenerate.
8146 * config.in: Likewise.
8148 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8150 * Makefile.in (clean): Also remove x32.c x32-linux.c
8151 x32-avx.c x32-avx-linux.c.
8152 (x32.o): New target.
8154 (x32-linux.o): Likewise.
8155 (x32-linux.c): Likewise.
8156 (x32-avx.o): Likewise.
8157 (x32-avx.c): Likewise.
8158 (x32-avx-linux.o): Likewise.
8159 (x32-avx-linux.c): Likewise.
8161 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8162 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8163 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8164 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8165 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8166 i386/x32-avx-linux.xml.
8168 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8169 (init_registers_x32_avx_linux): Likwise.
8170 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8171 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8173 2012-04-13 Pedro Alves <palves@redhat.com>
8175 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8176 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8177 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8178 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8181 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8183 * linux-x86-low.c (compat_x32_clock_t): New.
8184 (compat_x32_siginfo_t): Likewise.
8185 (compat_x32_siginfo_from_siginfo): Likewise.
8186 (siginfo_from_compat_x32_siginfo): Likewise.
8187 (linux_is_elf64): Likewise.
8188 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8189 and siginfo_from_compat_x32_siginfo for x32.
8190 (x86_arch_setup): Set linux_is_elf64.
8192 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8195 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8197 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8198 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8199 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8200 compatible with process.
8202 2012-04-12 Yao Qi <yao@codesourcery.com>
8204 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8205 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8206 (install-only, install-info, clean): Handle sub dir gnulib.
8207 (all-lib, am--refresh): New targets.
8208 (memmem.o): Remove target.
8209 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8210 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8211 (AC_REPLACE_FUNCS): Remove memmem.
8212 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8213 (AC_OUTPUT): Generate Makefile in gnulib/.
8214 * aclocal.m4, config.in, configure: Regenerated.
8216 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8218 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8220 2012-04-05 Pedro Alves <palves@redhat.com>
8222 -Werror=strict-aliasing
8224 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8227 2012-04-04 Pedro Alves <palves@redhat.com>
8229 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8230 (sparc_store_gregset_from_stack, sparc_store_gregset)
8231 (sparc_breakpoint_at): Fix formatting.
8233 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8235 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8237 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8238 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8239 * config.in: Regenerate.
8240 * configure: Likewise.
8242 2012-03-29 Pedro Alves <palves@redhat.com>
8244 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8245 Correct ptrace arguments.
8247 2012-03-28 Pedro Alves <palves@redhat.com>
8249 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8250 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8251 (IA64_FR1_REGNUM): New defines.
8252 (ia64_fetch_register): New.
8253 (the_low_target): Install it.
8254 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8256 * linux-low.c (linux_fetch_registers): Try the
8257 the_low_target.fetch_register hook first.
8259 * linux-arm-low.c (the_low_target): Adjust.
8260 * linux-bfin-low.c (the_low_target): Adjust.
8261 * linux-cris-low.c (the_low_target): Adjust.
8262 * linux-crisv32-low.c (the_low_target): Adjust.
8263 * linux-m32r-low.c (the_low_target): Adjust.
8264 * linux-m68k-low.c (the_low_target): Adjust.
8265 * linux-mips-low.c (the_low_target): Adjust.
8266 * linux-ppc-low.c (the_low_target): Adjust.
8267 * linux-s390-low.c (the_low_target): Adjust.
8268 * linux-sh-low.c (the_low_target): Adjust.
8269 * linux-sparc-low.c (the_low_target): Adjust.
8270 * linux-tic6x-low.c (the_low_target): Adjust.
8271 * linux-x86-low.c (the_low_target): Adjust.
8272 * linux-xtensa-low.c (the_low_target): Adjust.
8274 2012-03-26 Pedro Alves <palves@redhat.com>
8276 * server.c (handle_qxfer_libraries): Don't bail early if
8277 the_target->qxfer_libraries_svr4 is not NULL.
8279 2012-03-26 Pedro Alves <palves@redhat.com>
8281 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8283 2012-03-23 Pedro Alves <palves@redhat.com>
8285 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8286 "library-list-svr4" element's start tag when the the DSO list is
8289 2012-03-23 Pedro Alves <palves@redhat.com>
8291 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8292 a variable whose type size is the same as the inferior's pointer
8295 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8297 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8299 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8300 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8301 * linux-low.h: Include <signal.h>.
8302 (struct siginfo): Remove forward declaration.
8303 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8306 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8308 * .gitignore: Ignore more files.
8310 2012-03-19 Pedro Alves <palves@redhat.com>
8311 Jan Kratochvil <jan.kratochvil@redhat.com>
8313 * server.c (cont_thread, general_thread): Add describing comments.
8314 (start_inferior): Clear `cont_thread'.
8315 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8318 2012-03-15 Yao Qi <yao@codesourcery.com>
8320 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8322 (cmd_qtdp): ... here.
8324 2012-03-15 Yao Qi <yao@codesourcery.com>
8326 * tracepoint.c (struct tracepoint_action_ops): New.
8327 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8328 (m_tracepoint_action_download): New.
8329 (r_tracepoint_action_download): New.
8330 (x_tracepoint_action_download): New.
8331 (l_tracepoint_action_download): New.
8332 (add_tracepoint_action): Install `action->ops' according type.
8333 (download_tracepoint_1): Move code `download' function pointer
8334 of various tracepoint_action_ops.
8336 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8338 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8339 linux_ptrace_attach_warnings.
8341 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8343 * Makefile.in (linux-ptrace.o): New.
8344 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8345 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8346 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8347 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8348 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8350 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8352 2012-03-08 Yao Qi <yao@codesourcery.com>
8353 Pedro Alves <palves@redhat.com>
8355 Fix PR server/13392.
8356 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8358 * tracepoint.c (remove_tracepoint): New.
8359 (cmd_qtdp): Call remove_tracepoint when failed to install.
8361 2012-03-07 Pedro Alves <palves@redhat.com>
8363 * linux-low.c (get_detach_signal): New.
8364 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8365 Pass on pending signals to PTRACE_DETACH. Check the result of the
8367 * server.c (program_signals, program_signals_p): New.
8368 (handle_general_set): Handle QProgramSignals.
8369 * server.h (program_signals, program_signals_p): Declare.
8371 2012-03-05 Pedro Alves <palves@redhat.com>
8372 Jan Kratochvil <jan.kratochvil@redhat.com>
8374 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8377 2012-03-03 Yao Qi <yao@codesourcery.com>
8379 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8380 agent_look_up_symbols.
8382 2012-03-03 Yao Qi <yao@codesourcery.com>
8384 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8385 (linux-x86-low.o): Likewise.
8386 * server.h: Remove in_process_agent_loaded.
8387 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8391 2012-03-03 Yao Qi <yao@codesourcery.com>
8393 * tracepoint.c (gdb_agent_capability): New global.
8394 (in_process_agent_loaded_ust): Renamed to
8395 `in_process_agent_supports_ust'.
8397 (in_process_agent_supports_ust): Call agent_capability_check.
8398 (clear_installed_tracepoints): Assert that agent supports
8401 2012-03-03 Yao Qi <yao@codesourcery.com>
8403 * linux-low.c (linux_supports_agent): New.
8404 (linux_target_ops): Initialize field `supports_agent' with
8405 linux_supports_agent.
8406 * target.h (struct target_ops) <supports_agent>: New.
8407 (target_supports_agent): New macro.
8408 * server.c (handle_general_set): Handle packet 'QAgent'.
8409 (handle_query): Send `QAgent+'.
8410 * Makefile.in (server.o): Depends on agent.h.
8412 2012-03-03 Yao Qi <yao@codesourcery.com>
8414 * Makefile.in (OBS): Add agent.o.
8415 Add new rule for agent.o.
8416 Track dependence of tracepoint.c on agent.h.
8417 * tracepoint.c (run_inferior_command_1):
8418 (run_inferior_command): Call agent_run_command.
8419 (gdb_ust_connect_sync_socket): Deleted. Move it to
8421 (resume_thread, stop_thread): Likewise.
8422 (gdb_ust_socket_init): Renamed to ...
8423 (gdb_agent_socket_init): ... New.
8424 (gdb_ust_thread): Renamed to ...
8425 (gdb_agent_helper_thread): ... New.
8426 (gdb_ust_init): Move some code to ...
8427 (gdb_agent_init): ... here. New.
8428 [HAVE_UST]: Call gdb_ust_init.
8429 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8430 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8431 * config.in, configure: Regenerated.
8433 2012-03-02 Pedro Alves <palves@redhat.com>
8435 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8436 * linux-low.c (struct simple_pid_list): New.
8437 (stopped_pids): New a struct simple_pid_list pointer.
8438 (add_to_pid_list, pull_pid_from_list): New.
8439 (handle_extended_wait): Don't assume the first signal new children
8440 report is SIGSTOP. Adjust call to pull_pid_from_list.
8441 (linux_wait_for_lwp): Adjust.
8443 2012-03-02 Yao Qi <yao@codesourcery.com>
8445 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8448 2012-03-02 Yao Qi <yao@codesourcery.com>
8450 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8451 `stop_pc' and `tpoint'. Update caller.
8453 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8455 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8456 * linux-low.c (use_linux_regsets): New macro.
8457 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8458 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8459 (linux_register_in_regsets): New function.
8460 (usr_fetch_inferior_registers): Skip registers covered by
8462 (usr_store_inferior_registers): Likewise.
8463 (usr_fetch_inferior_registers): New macro.
8464 (usr_store_inferior_registers): Likewise.
8465 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8466 (linux_store_registers): Likewise.
8467 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8469 (init_registers_mips64_dsp_linux): Likewise.
8470 (init_registers_mips_linux): New macro.
8471 (init_registers_mips_dsp_linux): Likewise.
8472 (mips_dsp_num_regs): Likewise.
8473 (DSP_BASE, DSP_CONTROL): New fallback macros.
8474 (mips_base_regs): New macro.
8475 (mips_regmap): Use it. Fix the size.
8476 (mips_dsp_regmap): New variable.
8477 (mips_dsp_regset_bitmap): Likewise.
8478 (mips_arch_setup): New function.
8479 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8481 (mips_cannot_store_register): Likewise.
8482 (the_low_target): Update .arch_setup, .num_regs and .regmap
8483 initializers. Add .regset_bitmap initializer.
8484 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8486 * linux-bfin-low.c (the_low_target): Likewise.
8487 * linux-cris-low.c (the_low_target): Likewise.
8488 * linux-crisv32-low.c (the_low_target): Likewise.
8489 * linux-ia64-low.c (the_low_target): Likewise.
8490 * linux-m32r-low.c (the_low_target): Likewise.
8491 * linux-m68k-low.c (the_low_target): Likewise.
8492 * linux-ppc-low.c (the_low_target): Likewise.
8493 * linux-s390-low.c (the_low_target): Likewise.
8494 * linux-sh-low.c (the_low_target): Likewise.
8495 * linux-sparc-low.c (the_low_target): Likewise.
8496 * linux-tic6x-low.c (the_low_target): Likewise.
8497 * linux-x86-low.c (the_low_target): Likewise.
8498 * linux-xtensa-low.c (the_low_target): Likewise.
8499 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8500 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8501 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8503 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8504 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8506 2012-02-29 Yao Qi <yao@codesourcery.com>
8507 Pedro Alves <palves@redhat.com>
8509 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8510 `step_over_finished' is true.
8512 2012-02-27 Pedro Alves <palves@redhat.com>
8514 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8515 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8517 2012-02-27 Pedro Alves <palves@redhat.com>
8520 * linux-low.c (pid_is_stopped): New.
8521 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8523 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8525 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8528 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8530 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8532 2012-02-24 Luis Machado <lgustavo@codesourcery>
8534 * server.c (handle_query): Advertise support for target-side
8535 breakpoint condition evaluation.
8536 (process_point_options): New function.
8537 (process_serial_event): When inserting a breakpoint, check for
8538 a target-side condition that should be evaluated.
8540 * mem-break.c: Include regcache.h and ax.h.
8541 (point_cond_list_t): New data structure.
8542 (breakpoint) <cond_list>: New field.
8543 (find_gdb_breakpoint_at): Make non-static.
8544 (delete_gdb_breakpoint_at): Clear any target-side
8546 (clear_gdb_breakpoint_conditions): New function.
8547 (add_condition_to_breakpoint): Likewise.
8548 (add_breakpoint_condition): Likewise.
8549 (gdb_condition_true_at_breakpoint): Likewise.
8550 (gdb_breakpoint_here): Return result directly instead
8551 of going through a local variable.
8553 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8554 (clear_gdb_breakpoint_conditions): Likewise.
8555 (add_breakpoint_condition): Likewise.
8556 (gdb_condition_true_at_breakpoint): Likewise.
8558 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8559 (need_step_over_p): Take target-side breakpoint condition into
8562 2012-02-24 Luis Machado <lgustavo@codesourcery>
8564 * server.h: Include tracepoint.h.
8565 (agent_mem_read, agent_get_trace_state_variable_value,
8566 agent_set_trace_state_variable_value,
8567 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8568 get_set_tsv_func_addr): New prototypes.
8570 * ax.h: New include file.
8571 * ax.c: New source file.
8573 * tracepoint.c: Include ax.h.
8574 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8575 agent_expr, eval_result_type): Move to ax.h.
8576 (parse_agent_expr): Rename to ...
8577 (gdb_parse_agent_expr): ... this, make it non-static and move
8579 (unparse_agent_expr) Rename to ...
8580 (gdb_unparse_agent_expr): ... this, make it non-static and move
8582 (eval_agent_expr): Rename to ...
8583 (eval_tracepoint_agent_expr): ... this.
8584 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8585 forward declarations.
8586 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8587 (agent_get_trace_state_variable_value): New function.
8588 (agent_set_trace_state_variable_value): New function.
8589 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8590 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8591 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8592 (condition_true_at_tracepoint): Likewise.
8593 (parse_agent_expr): Rename to ...
8594 (gdb_parse_agent_expr): ... this and move to ax.c.
8595 (unparse_agent_expr): Rename to ...
8596 (gdb_unparse_agent_expr): ... this and move to ax.c.
8597 (gdb_agent_op_name): Move to ax.c.
8598 (eval_agent_expr): Rename to ...
8599 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8601 (eval_tracepoint_agent_expr): New function.
8602 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8604 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8606 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8607 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8608 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8609 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8610 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8611 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8612 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8613 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8614 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8615 (compile_bytecodes): Remove forward declaration.
8616 (is_goto_target): Move to ax.c.
8617 (compile_bytecodes): Move to ax.c and call
8618 agent_get_trace_state_variable_value (...) and
8619 agent_set_trace_state_variable_value (...).
8621 * Makefile.in: Update ax.c and IPA dependencies.
8623 2012-02-24 Pedro Alves <palves@redhat.com>
8625 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8626 (cmd_bigqtbuffer_circular): ... this. Only handle
8627 'QTBuffer:circular:'.
8628 (handle_tracepoint_general_set): Adjust.
8630 2012-02-16 Yao Qi <yao@codesourcery.com>
8632 * inferiors.c: Move code to ...
8633 * dll.c: .... here. New.
8634 * server.h: Declare clear_dlls.
8635 * Makefile.in (SFILES): Add dll.c.
8639 2012-02-11 Yao Qi <yao@codesourcery.com>
8641 * server.c: (handle_monitor_command): Add a new parameter
8643 (handle_query): Update caller.
8645 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8647 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8648 * configure, config.in: Regenerate.
8649 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8652 2012-02-02 Pedro Alves <palves@redhat.com>
8654 Try SIGKILL first, then PTRACE_KILL.
8655 * linux-low.c (linux_kill_one_lwp): New.
8656 (linux_kill_one_lwp): Rename to ...
8657 (kill_one_lwp_callback): ... this. Use the new
8660 2012-02-02 Pedro Alves <palves@redhat.com>
8662 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8665 2012-01-27 Pedro Alves <palves@redhat.com>
8667 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8668 (elf_64_file_p): Make static.
8669 (linux_pid_exe_is_elf_64_file): New.
8670 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8671 Delete declarations.
8672 (linux_pid_exe_is_elf_64_file): Declare.
8673 * linux-x86-low.c (x86_arch_setup): Use
8674 linux_pid_exe_is_elf_64_file.
8676 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8678 * linux-low.c (linux_wait_for_event_1): Rename to ...
8679 (linux_wait_for_event): ... here and merge it with former
8680 linux_wait_for_event - new variable wait_ptid, use it.
8681 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8683 2012-01-23 Pedro Alves <palves@redhat.com>
8685 * server.c (main): Avoid yet another case of infinite loop while
8686 detaching/killing after a longjmp.
8688 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8691 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8693 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8695 * hostio.c (handle_readlink): New function.
8696 (handle_vFile): Call it to handle "vFile:readlink" packets.
8698 2012-01-20 Pedro Alves <palves@redhat.com>
8699 Ulrich Weigand <ulrich.weigand@linaro.org>
8701 * server.c (handle_v_requests): Only support vAttach and vRun to
8702 start multiple processes when in extended protocol mode.
8704 2012-01-17 Pedro Alves <palves@redhat.com>
8706 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8707 memalign plus mprotect to allocate the scratch buffer.
8709 2012-01-13 Pedro Alves <palves@redhat.com>
8711 * server.c (attach_inferior): Clear `cont_thread'.
8713 2012-01-13 Pedro Alves <palves@redhat.com>
8715 * server.c (main): Avoid infinite loop while detaching/killing
8718 2012-01-09 Doug Evans <dje@google.com>
8720 * server.c (start_inferior): Set last_ptid in --wrapper case.
8722 2012-01-06 Yao Qi <yao@codesourcery.com>
8724 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8726 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8728 2012-01-04 Yao Qi <yao@codesourcery.com>
8730 * tracepoint.c (cmd_qtdp): Print debug message
8731 for static tracepoint.
8733 2012-01-04 Yao Qi <yao@codesourcery.com>
8735 * tracepoint.c (trace_vdebug): Differentiate debug message
8736 between gdbserver and IPA.
8738 2012-01-03 Yao Qi <yao@codesourcery.com>
8740 * tracepoint.c (tracepoint_was_hit): Don't collect for
8743 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8745 * terminal.h: Reformat copyright header.
8747 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8749 * server.c (gdbserver_version): Update copyright year.
8750 * gdbreplay.c (gdbreplay_version): Likewise.
8752 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8754 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8757 2011-12-18 Hui Zhu <teawater@gmail.com>
8758 * linux-low.c (linux_create_inferior): Save return value to ret.
8760 2011-12-18 Hui Zhu <teawater@gmail.com>
8762 * linux-low.c (linux_create_inferior): Save return value to ret.
8764 2011-12-16 Doug Evans <dje@google.com>
8766 * linux-low.c (linux_create_inferior): If stdio connection,
8767 redirect stdin from /dev/null, stdout to stderr.
8768 * remote-utils.c (remote_is_stdio): New static global.
8769 (remote_connection_is_stdio): New function.
8770 (remote_prepare): Handle stdio connection.
8771 (remote_open): Ditto.
8772 (remote_close): Don't close stdin for stdio connections.
8773 (read_prim,write_prim): New functions. Replace all calls to
8774 read/write to these.
8775 * server.c (main): Watch for "-" argument. Move call to
8776 remote_prepare before start_inferior.
8777 * server.h (STDIO_CONNECTION_NAME): New macro.
8778 (remote_connection_is_stdio): Declare.
8780 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8781 in debugging output.
8783 2011-12-15 Yao Qi <yao@codesourcery.com>
8785 * tracepoint.c: Include sys/syscall.h.
8786 (gdb_ust_thread): Remove preprocessor conditional.
8788 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8790 * linux-low.c (linux_detach_one_lwp): Call
8791 the_low_target.prepare_to_resume before detaching.
8793 2011-12-14 Yao Qi <yao@codesourcery.com>
8795 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8798 2011-12-14 Yao Qi <yao@codesourcery.com>
8800 * i386-low.c (i386_low_stopped_data_address): Initialize local
8803 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8807 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8808 DR_CONTROL unless necessary. Extend comments.
8809 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8810 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8812 2011-12-13 Yao Qi <yao@codesourcery.com>
8814 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8816 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8818 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8820 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8821 Print new debug message for such case.
8823 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8825 Fix overlapping memcpy.
8826 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8827 the read_inferior_memory transfer.
8828 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8829 write_inferior_memory transfer.
8830 (set_fast_tracepoint_jump): New variable buf. Use it for the
8831 read_inferior_memory and write_inferior_memory transfers.
8832 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8833 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8834 Use it for the write_inferior_memory transfer.
8835 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8838 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8840 * linux-low.c (fetch_register, store_register): Make code
8841 consistent, fix formatting.
8843 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8845 * linux-low.c (usr_store_inferior_registers): Factor out code
8846 to handle individual registers into...
8847 (store_register): ... this new function.
8849 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8851 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8852 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8853 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8854 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8855 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8856 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8857 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8858 (srv_xmlfiles): Add new XML files.
8860 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8862 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8863 (init_registers_s390_linux32v1): Add prototype.
8864 (init_registers_s390_linux32v2): Likewise.
8865 (init_registers_s390_linux64v1): Likewise.
8866 (init_registers_s390_linux64v2): Likewise.
8867 (init_registers_s390x_linux64v1): Likewise.
8868 (init_registers_s390x_linux64v2): Likewise.
8869 (s390_num_regs): Increment to 52.
8870 (s390_regmap): Add orig_r2 register.
8871 (s390_num_regs_3264): Increment to 68.
8872 (s390_regmap_3264): Add orig_r2 register.
8873 (s390_collect_ptrace_register): Handle orig_r2 register.
8874 (s390_supply_ptrace_register): Likewise.
8875 (s390_fill_last_break): New function.
8876 (s390_store_last_break): Likewise.
8877 (s390_fill_system_call): New function.
8878 (s390_store_system_call): Likewise.
8879 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8881 (s390_check_regset): New function.
8882 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8883 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8884 Update target_regsets for available register sets.
8886 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8887 Jan Kratochvil <jan.kratochvil@redhat.com>
8889 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8890 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8892 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8893 * linux-low.h (struct process_info_private): New member r_debug.
8894 * server.c (handle_qxfer_libraries): Call
8895 the_target->qxfer_libraries_svr4.
8896 (handle_qxfer_libraries_svr4): New function.
8897 (qxfer_packets): New entry "libraries-svr4".
8898 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8899 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8900 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8901 PACKET_qXfer_libraries_svr4.
8903 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8905 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8906 PSW address/mask between 8-byte and 16-byte formats.
8907 (s390_supply_ptrace_register): Likewise.
8908 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8909 basic addressing mode bit.
8911 2011-11-24 Stan Shebs <stan@codesourcery.com>
8913 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8915 2011-11-17 Stan Shebs <stan@codesourcery.com>
8917 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8918 (tracing_start_time): New global.
8919 (tracing_stop_time): New global.
8920 (tracing_user_name): New global.
8921 (tracing_notes): New global.
8922 (tracing_stop_note): New global.
8923 (cmd_qtstart): Set traceframe_usage, start_time.
8924 (stop_tracing): Set stop_time.
8925 (cmd_qtstatus): Report additional status.
8926 (cmd_qtp): New function.
8927 (handle_tracepoint_query): Call it.
8928 (cmd_qtnotes): New function.
8929 (handle_tracepoint_general_set): Call it.
8930 (get_timestamp): Rename from tsv_get_timestamp.
8932 2011-11-14 Stan Shebs <stan@codesourcery.com>
8933 Kwok Cheung Yeung <kcy@codesourcery.com>
8935 * linux-x86-low.c (small_jump_insn): New.
8936 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8937 trampoline and error message, build a trampoline and issue a small
8938 jump instruction to it.
8939 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8940 trampoline and error message.
8941 (x86_get_min_fast_tracepoint_insn_len): New.
8942 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8943 * linux-low.h (struct linux_target_ops): Add arguments to
8944 install_fast_tracepoint_jump_pad operation, add new operation.
8945 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8947 (linux_get_min_fast_tracepoint_insn_len): New function.
8948 (linux_target_op): Add new operation.
8949 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8950 (gdb_trampoline_buffer_end): Ditto.
8951 (gdb_trampoline_buffer_error): Ditto.
8952 (struct ipa_sym_addresses): Add fields for new IPA variables.
8953 (symbol_list): Add entries for new IPA variables.
8954 (struct tracepoint): Add fields to hold the address range of the
8955 trampoline used by the tracepoint.
8956 (trampoline_buffer_head): New static variable.
8957 (trampoline_buffer_tail): Ditto.
8958 (claim_trampoline_space): New function.
8959 (have_fast_tracepoint_trampoline_buffer): New function.
8960 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8962 (install_fast_tracepoint): Ditto, also add error buffer argument.
8963 (cmd_qtminftpilen): New function.
8964 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8965 (fast_tracepoint_from_trampoline_address): New function.
8966 (fast_tracepoint_collecting): Handle trampoline as part of jump
8968 (set_trampoline_buffer_space): New function.
8969 (initialize_tracepoint): Initialize new IPA variables.
8970 * target.h (struct target_ops): Add arguments to
8971 install_fast_tracepoint_jump_pad operation, add new
8972 get_min_fast_tracepoint_insn_len operation.
8973 (target_get_min_fast_tracepoint_insn_len): New.
8974 (install_fast_tracepoint_jump_pad): Add arguments.
8975 * server.h (IPA_BUFSIZ): Define.
8976 * linux-i386-ipa.c: Include extra header files.
8977 (initialize_fast_tracepoint_trampoline_buffer): New function.
8978 (initialize_low_tracepoint): Call it.
8979 * server.h (set_trampoline_buffer_space): Declare.
8980 (claim_trampoline_space): Ditto.
8981 (have_fast_tracepoint_trampoline_buffer): Ditto.
8983 2011-11-14 Yao Qi <yao@codesourcery.com>
8985 * server.c (handle_query): Handle InstallInTrace for qSupported.
8986 * tracepoint.c (add_tracepoint): Sort list.
8987 (install_tracepoint, download_tracepoint): New.
8988 (cmd_qtdp): Call them to install and download tracepoints.
8989 (sort_tracepoints): Removed.
8990 (cmd_qtstart): Update.
8992 2011-11-14 Yao Qi <yao@codesourcery.com>
8994 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8995 * mem-break.h: Declare.
8996 * tracepoint.c (cmd_qtstart): Move some code to ...
8997 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8999 (download_tracepoints): Move some code to ...
9000 (download_tracepoint_1): ... here. New.
9002 2011-11-08 Yao Qi <yao@codesourcery.com>
9004 * remote-utils.c (relocate_instruction): A comment fix.
9006 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9008 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9009 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9010 dr_status_mirror and dr_control_mirror from debug_reg_state.
9011 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9012 (i386_initial_stuff): Remove use of deleted globals.
9013 (i386_get_thread_context, i386_set_thread_context,
9014 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9015 from debug_reg_state.
9017 2011-11-05 Yao Qi <yao@codesourcery.com>
9019 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9020 address as TPOINT's.
9022 2011-11-02 Stan Shebs <stan@codesourcery.com>
9024 * tracepoint.c (agent_mem_read_string): New function.
9025 (eval_agent_expr): Call it for tracenz.
9026 * server.c (handle_query): Report support for tracenz.
9028 2011-11-02 Yao Qi <yao@codesourcery.com>
9030 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9032 2011-11-02 Yao Qi <yao@codesourcery.com>
9034 * target.h: Fix a typo in comment.
9036 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9038 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9039 clobber the breakpoints' shadows with fast tracepoint jumps.
9040 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9041 * target.c (write_inferior_memory): Also pass MYADDR down to
9044 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9046 * configure.ac: Check support for personality routine.
9047 * configure: Regenerate.
9048 * config.in: Likewise.
9049 * linux-low.c: Include <sys/personality.h>.
9050 Define ADDR_NO_RANDOMIZE if necessary.
9051 (linux_create_inferior): Disable address space randomization when
9052 forking inferior, if requested.
9053 (linux_supports_disable_randomization): New function.
9054 (linux_target_ops): Install it.
9055 * server.h (disable_randomization): Declare.
9056 * server.c (disable_randomization): New global variable.
9057 (handle_general_set): Handle QDisableRandomization.
9058 (handle_query): Likewise for qSupported.
9059 (main): Support --disable-randomization and --no-disable-randomization
9060 command line arguments.
9061 * target.h (struct target_ops): Add supports_disable_randomization.
9062 (target_supports_disable_randomization): New macro.
9064 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9066 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9068 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9069 [!PT_GETDSBT] (target_loadmap): New definition.
9070 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9071 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9072 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9073 and PT_GETDSBT to LINUX_LOADMAP.
9074 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9075 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9077 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9079 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9080 (arm_linux_hwbp_cap): New static variable.
9081 (arm_linux_get_hwbp_cap): Replace by ...
9082 (arm_linux_init_hwbp_cap): ... this new function.
9083 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9084 (arm_linux_get_hw_watchpoint_count): Likewise.
9085 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9086 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9087 (arm_prepare_to_resume): Use perror_with_name instead of error.
9089 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9091 * linux-arm-low.c: Include <signal.h>.
9092 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9093 (struct arm_linux_hwbp_cap): New data type.
9094 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9095 (struct arm_linux_hw_breakpoint): New data type.
9096 (MAX_BPTS, MAX_WPTS): Define.
9097 (struct arch_process_info, struct arch_lwp_info): New data types.
9098 (arm_linux_get_hwbp_cap): New function.
9099 (arm_linux_get_hw_breakpoint_count): Likewise.
9100 (arm_linux_get_hw_watchpoint_count): Likewise.
9101 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9102 (arm_hwbp_control_initialize): Likewise.
9103 (arm_hwbp_control_is_enabled): Likewise.
9104 (arm_hwbp_control_is_initialized): Likewise.
9105 (arm_hwbp_control_disable): Likewise.
9106 (arm_linux_hw_breakpoint_equal): Likewise.
9107 (arm_linux_hw_point_initialize): Likewise.
9108 (struct update_registers_data): New data structure.
9109 (update_registers_callback: New function.
9110 (arm_insert_point): Likewise.
9111 (arm_remove_point): Likewise.
9112 (arm_stopped_by_watchpoint): Likewise.
9113 (arm_stopped_data_address): Likewise.
9114 (arm_new_process): Likewise.
9115 (arm_new_thread): Likewise.
9116 (arm_prepare_to_resume): Likewise.
9117 (the_low_target): Register arm_insert_point, arm_remove_point,
9118 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9119 arm_new_thread, and arm_prepare_to_resume.
9121 2011-09-15 Stan Shebs <stan@codesourcery.com>
9123 * server.h (struct emit_ops): Add compare-goto fields.
9124 * tracepoint.c (gdb_agent_op_sizes): New table.
9125 (emit_eq_goto): New function.
9126 (emit_ne_goto): New function.
9127 (emit_lt_goto): New function.
9128 (emit_le_goto): New function.
9129 (emit_gt_goto): New function.
9130 (emit_ge_goto): New function.
9131 (is_goto_target): New function.
9132 (compile_bytecodes): Recognize special cases of compare-goto
9133 combinations and call specialized emitters for them.
9134 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9135 (amd64_emit_ne_goto): New function.
9136 (amd64_emit_lt_goto): New function.
9137 (amd64_emit_le_goto): New function.
9138 (amd64_emit_gt_goto): New function.
9139 (amd64_emit_ge_goto): New function.
9140 (amd64_emit_ops): Add the new functions.
9141 (i386_emit_eq_goto): New function.
9142 (i386_emit_ne_goto): New function.
9143 (i386_emit_lt_goto): New function.
9144 (i386_emit_le_goto): New function.
9145 (i386_emit_gt_goto): New function.
9146 (i386_emit_ge_goto): New function.
9147 (i386_emit_ops): Add the new functions.
9149 2011-09-08 Stan Shebs <stan@codesourcery.com>
9151 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9152 (i386_emit_epilogue): Restore %ebx.
9154 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9156 * server.c (step_thread): Remove definition.
9157 (process_serial_event): Don't handle Hs.
9158 * server.h (step_thread): Remove declaration.
9159 * target.c (set_desired_inferior): Remove use of step_thread.
9161 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9163 * linux-low.c: Include linux-procfs.h.
9164 (linux_attach_lwp_1): Update comments.
9165 (linux_attach): Scan for existing threads when attaching to a
9166 process that is the tgid.
9167 * Makefile.in: Update dependencies.
9169 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9171 * configure.srv: Add linux-procfs.o dependencies.
9173 2011-08-14 Yao Qi <yao@codesourcery.com>
9175 * target.h (struct target_ops): Fix indent.
9176 * win32-low.c (win32_target_ops): Fix comment.
9178 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9179 Yao Qi <yao@codesourcery.com>
9181 * Makefile.in (clean): Remove tic6x-*.c files.
9182 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9183 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9184 (tic6x-c64xp-linux.c): Likewise.
9185 * configure.srv: Add support for tic6x-*-uclinux.
9186 * linux-tic6x-low.c: New.
9187 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9189 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9190 Yao Qi <yao@codesourcery.com>
9192 * target.h (struct target_ops): Add read_loadmap.
9193 * linux-low.c (struct target_loadseg): New type.
9194 (struct target_loadmap): New type.
9195 (linux_read_loadmap): New function.
9196 (linux_target_ops): Add linux_read_loadmap.
9197 * server.c (handle_query): Support qXfer:fdpic:read packet.
9198 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9201 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9203 * win32-low.c: Include <stdint.h>.
9205 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9207 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9208 to the inferior here.
9209 (i386_remove_aligned_watchpoint): Ditto.
9210 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9211 fit part of the watchpoint in the debug registers.
9212 (i386_update_inferior_debug_regs): New.
9213 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9214 registers, and only update the inferior on success.
9215 (i386_low_remove_watchpoint): Ditto.
9217 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9219 * linux-low.c (compare_ints, unique, list_threads, show_process,
9220 linux_core_of_thread): Delete.
9221 (linux_target_ops): Change linux_core_of_thread to
9222 linux_common_core_of_thread.
9223 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9224 * utils.c (malloc_failure): Change type of argument.
9225 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9226 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9227 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9228 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9229 (IPA_OBJS): Add common-utils-ipa.o.
9230 (ptid_h, linux_osdata_h): New macros.
9231 (server_h): Add common/common-utils.h, common/xml-utils.h,
9232 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9234 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9235 ptid.o, buffer.o): New rules.
9236 (linux-low.o): Add common/linux-osdata.h as a dependency.
9237 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9238 * configure.ac: Add AC_HEADER_DIRENT check.
9239 * config.in: Regenerate.
9240 * configure: Regenerate.
9241 * remote-utils.c (xml_escape_text): Delete.
9242 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9243 buffer_xml_printf): Move to common/buffer.c.
9244 * server.c (main): Remove call to initialize_inferiors.
9245 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9246 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9247 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9248 internal_error, gdb_assert, gdb_assert_fail): Delete.
9249 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9250 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9252 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9253 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9254 initialize_inferiors): Delete.
9256 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9258 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9261 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9263 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9265 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9267 2011-05-26 Yao Qi <yao@codesourcery.com>
9269 * Makefile.in (thread-db.o): Track dependence to
9270 common/gdb_thread_db.h.
9271 * thread-db.c: include gdb_thread_db.h from right place.
9273 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9275 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9276 __FILE__ and __LINE__ to internal_error.
9278 2011-05-13 Doug Evans <dje@google.com>
9280 * thread-db.c (try_thread_db_load_from_sdir): New function.
9281 (try_thread_db_load_from_dir): New function.
9282 (thread_db_load_search): Handle $sdir, ignore $pdir.
9283 Remove trying of system directories if search of
9284 libthread-db-search-path fails, that is now done via $sdir.
9286 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9288 * server.c (handle_query): Add EnableDisableTracepoints to the list
9289 of supported features.
9290 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9292 (cmd_qtenable_disable): New.
9293 (cmd_qtstart): Install tracepoints even if disabled.
9294 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9295 receiving a QTEnable or QTDisable packet.
9296 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9297 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9299 (gdb_probe): Skip data collection if static tracepoint is disabled.
9301 2011-05-10 Doug Evans <dje@google.com>
9303 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9305 2011-05-04 Doug Evans <dje@google.com>
9307 * linux-low.c (linux_join): Skip process lookup.
9308 * spu-low.c (spu_join): Ditto.
9309 * server.c (join_inferiors_callback): Delete.
9310 (process_serial_event): For 'D' packet (detach) call join_inferior
9313 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9315 * README: Don't mention xscale*-*-linux*.
9316 * configure.srv (xscale*-*-linux*): Don't handle target.
9318 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9320 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9322 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9323 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9324 (i386_emit_void_call_2): Likewise.
9326 2011-04-26 Yao Qi <yao@codesourcery.com>
9328 * linux-low.c: Move common macros to linux-ptrace.h.
9329 Include linux-ptrace.h.
9330 * Makefile.in (linux_ptrace_h): New.
9331 (linux-low.o): Depends on linux-ptrace.h.
9333 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9335 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9336 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9337 (remote_prepare): New function with most of the TCP code from ...
9338 (remote_open): ... here. Detect PORT here unconditionally. Move also
9339 setting transport_is_reliable.
9340 * server.c (run_once): New variable.
9341 (gdbserver_usage): Document it.
9342 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9343 the first run if RUN_ONCE.
9344 * server.h (run_once, remote_prepare): New declarations.
9346 2011-04-19 Tom Tromey <tromey@redhat.com>
9348 * win32-low.c (handle_load_dll): Remove duplicate "the".
9350 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9352 Remove support for old Cygwin 1.5 versions.
9353 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9354 function to avoid warning.
9355 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9358 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9360 * gdbserver/server.h (Macro _): Define it if not available.
9362 2011-03-14 Michael Snyder <msnyder@vmware.com>
9364 * hostio.c (handle_close): Remove unnecessary null test.
9366 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9368 * Makefile.in (maintainer-clean realclean distclean): Remove
9369 "make ... subdir_do" command.
9371 2011-03-10 Michael Snyder <msnyder@vmware.com>
9373 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9375 * server.c (handle_v_run): Free alloced buffer on early return.
9377 2011-03-09 Yao Qi <yao@codesourcery.com>
9380 2011-03-04 Yao Qi <yao@codesourcery.com>
9382 * Makefile.in: Remove GNU make feature --directory.
9384 2011-03-05 Yao Qi <yao@codesourcery.com>
9386 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9387 (subdir_do): New make target. Copied from gdb/Makefile.
9388 (maintainer-clean, realclean, distclean, clean): Call corresponding
9389 make targets in common/Makefile.
9391 2011-02-11 Yao Qi <yao@codesourcery.com>
9393 * configure.ac: Call AC_PROG_RANLIB.
9394 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9395 * configure: Regenerate.
9397 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9399 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9401 2011-03-06 Yao Qi <yao@codesourcery.com>
9403 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9405 2011-03-05 Yao Qi <yao@codesourcery.com>
9407 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9408 (subdir_do): New make target. Copied from gdb/Makefile.
9409 (maintainer-clean, realclean, distclean, clean): Call corresponding
9410 make targets in common/Makefile.
9412 2011-03-04 Yao Qi <yao@codesourcery.com>
9414 * Makefile.in: Remove GNU make feature --directory.
9416 2011-03-04 Michael Snyder <msnyder@vmware.com>
9418 * server.c (queue_stop_reply): Call xmalloc not malloc.
9420 2011-03-02 Michael Snyder <msnyder@vmware.com>
9422 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9424 2011-02-28 Michael Snyder <msnyder@vmware.com>
9426 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9427 (cmd_qtframe): Ditto.
9428 (cmd_qtbuffer): Ditto.
9429 (cmd_bigqtbuffer): Ditto.
9431 * utils.c (decimal2str): Initialize 'width' to nine, then
9434 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9436 * hostio.c (require_data): Free *data, not data.
9438 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9440 * hostio.c (require_data): Use free, not xfree.
9442 2011-02-27 Michael Snyder <msnyder@vmware.com>
9444 * server.c (handle_query): Discard unused value.
9446 * hostio.c (require_data): Free malloc memory before returning
9449 2011-02-26 Michael Snyder <msnyder@vmware.com>
9451 * linux-low.c (list_threads): Call closedir for dirent.
9453 2011-02-27 Michael Snyder <msnyder@vmware.com>
9455 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9456 a case statement falls through.
9458 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9460 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9463 2011-02-26 Michael Snyder <msnyder@vmware.com>
9465 * utils.c (decimal2str): Eliminate dead code and dead param.
9466 (pulongest): Drop dead param from call to decimal2str.
9469 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9471 Revert the following patch (not approved yet):
9472 2011-02-21 Hui Zhu <teawater@gmail.com>
9473 * tracepoint.c (tp_printf): New function.
9474 (eval_agent_expr): Handle gdb_agent_op_printf.
9476 2011-02-21 Hui Zhu <teawater@gmail.com>
9478 * tracepoint.c (tp_printf): New function.
9479 (eval_agent_expr): Handle gdb_agent_op_printf.
9481 2011-02-18 Tom Tromey <tromey@redhat.com>
9483 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9484 (tracepoint.o): Likewise.
9485 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9486 (gdb_agent_op_names): Likewise.
9488 2011-02-18 Tom Tromey <tromey@redhat.com>
9490 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9491 gdb_agent_op_rot>: New constants.
9492 (gdb_agent_op_names): Add pick and roll.
9493 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9496 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9498 * aclocal.m4: Regenerated with aclocal-1.11.1.
9500 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9502 * server.c (handle_qxfer_traceframe_info): New.
9503 (qxfer_packets): Register "traceframe-info".
9504 (handle_query): Report support for qXfer:traceframe-info:read+.
9505 * tracepoint.c (match_blocktype): New.
9506 (traceframe_find_block_type): Rename to ...
9507 (traceframe_walk_blocks): ... this. Add callback filter argument,
9509 (traceframe_find_block_type): New, reimplemented on top of
9510 traceframe_walk_blocks.
9511 (build_traceframe_info_xml): New.
9512 (traceframe_read_info): New.
9513 * server.h (traceframe_read_info): Declare.
9515 2011-02-11 Yao Qi <yao@codesourcery.com>
9517 * configure.ac: Call AC_PROG_RANLIB.
9518 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9519 * configure: Regenerate.
9521 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9523 * server.c (gdb_read_memory): Change return semantics to allow
9525 (handle_search_memory_1): Adjust.
9526 (process_serial_event) <'m' packet>: Handle partial transfers.
9527 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9529 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9531 * regcache.c (init_register_cache): Initialize
9532 regcache->register_status.
9533 (free_register_cache): Release regcache->register_status.
9534 (regcache_cpy): Copy register_status.
9535 (registers_to_string): Print 'x's for unavailable registers.
9536 (supply_register): Mark the register's status valid or
9537 unavailable, depending on whether a buffer was passed in or not.
9538 (supply_register_zeroed): New.
9539 (supply_regblock): Mark the registers' status valid or
9540 unavailable, depending on whether a buffer was passed in or not.
9541 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9542 (struct regcache): New `register_status' field.
9543 (supply_register_zeroed): Declare.
9544 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9545 supply_register_zeroed, rather than passing a NULL buffer to
9547 * tracepoint.c (fetch_traceframe_registers): Update comment.
9549 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9551 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9554 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9556 * server.h (decode_xfer_write): Change prototype.
9557 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9558 and don't extract the annex here.
9559 * server.c (decode_xfer_read): Remove `annex' parameter,
9560 and don't extract the annex here.
9562 (struct qxfer): New.
9563 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9564 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9565 (handle_qxfer_statictrace): New functions, abstracted out from
9566 handle_query, and made to use the struct qxfer interface.
9567 (handle_threads_qxfer_proper): Rename to ...
9568 (handle_qxfer_threads_proper): ... this.
9569 (handle_threads_qxfer): Rename to ...
9570 (handle_qxfer_threads): ... this. Adjust.
9571 (qxfer_packets): New array.
9572 (handle_qxfer): New function.
9573 (handle_query): Use handle_qxfer.
9575 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9577 * gdbreplay.c: Shorten lines of >= 80 columns.
9578 * linux-low.c: Ditto.
9579 * linux-ppc-low.c: Ditto.
9580 * linux-s390-low.c: Ditto.
9581 * linux-sparc-low.c: Ditto.
9582 * linux-x86-low.c: Ditto.
9583 * linux-xtensa-low.c: Ditto.
9584 * mem-break.c: Ditto.
9586 * regcache.h: Ditto.
9587 * remote-utils.c: Ditto.
9590 * thread-db.c: Ditto.
9591 * tracepoint.c: Ditto.
9593 * win32-low.h: Ditto.
9595 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9597 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9600 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9602 * server.c (gdbserver_version): Update copyright year in version
9604 * gdbreplay.c (gdbreplay_version): Ditto.
9606 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9608 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9609 * linux-bfin-low.c: New file.
9610 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9611 PT_DATA_ADDR for BFIN targets.
9612 * Makefile.in (SFILES): Add linux-bfin-low.c.
9613 (clean): Remove reg-bfin.c.
9614 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9615 * README: Mention supported Blackfin targets.
9617 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9619 * .gitignore: New file.
9621 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9623 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9625 2010-10-22 Jie Zhang <jie@codesourcery.com>
9627 * Makefile.in: Add FLAGS_TO_PASS variable.
9628 (install): Remove dependency of install-only and recursively
9629 invoke make for install-only.
9631 2010-10-04 Doug Evans <dje@google.com>
9633 * Makefile.in (uninstall): Use $(DESTDIR).
9635 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9639 * linux-x86-low.c (compat_siginfo_from_siginfo)
9640 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9641 si_code is < 0. Check for si_code == SI_TIMER before checking for
9644 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9646 * lynx-i386-low.c: New file.
9647 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9649 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9651 * lynx-low.c (ptrace_request_to_str): Remove handling for
9652 request values that have been removed in LynxOS 5.x.
9654 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9656 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9659 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9661 * configure.ac: Add --enable-inprocess-agent option.
9662 * configure: Rebuilt.
9664 2010-09-06 Yao Qi <yao@codesourcery.com>
9666 * linux-low.c (linux_kill): Remove unused variable.
9667 (linux_stabilize_threads): Likewise.
9668 * server.c (start_inferior): Likewise.
9669 (queue_stop_reply_callback): Likewise.
9670 * tracepoint.c (do_action_at_tracepoint): Likewise.
9672 2010-09-06 Yao Qi <yao@codesourcery.com>
9674 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9677 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9679 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9681 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9683 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9686 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9688 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9689 gdbserver/lynx-ppc-low.c: New files.
9690 * Makefile.in (lynx_low_h): New variable.
9691 (lynx-low.o, lynx-ppc-low.o): New rules.
9692 * configure.ac: On LynxOS, link with -lnetinet.
9693 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9694 * configure: regenerate.
9696 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9698 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9699 * configure.ac: Add check for vasprintf and vsnprintf.
9700 * configure, config.in: Regenerate.
9701 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9703 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9705 * gdbreplay.c: Move include of alloca.h up, next to include of
9707 * server.h: Add include of malloc.h.
9708 * mem-break.c: Remove include of malloc.h.
9709 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9711 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9713 * Makefile.in (memmem.o): Build with -Wno-error.
9715 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9717 * utils.c (xsnprintf): Make non-static.
9718 * server.h: Add xsnprintf declaration.
9719 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9720 replace calls to snprintf by calls to xsnprintf throughout.
9722 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9724 * configure.ac: Add configure check for alloca.
9725 * configure, config.in: Regenerate.
9726 * server.h: Include alloca.h if it exists.
9727 * gdbreplay.c: Include alloca.h if it exists.
9729 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9731 * linux-low.c (__SIGRTMIN): Define if not already defined.
9732 (linux_create_inferior): Check for __ANDROID__ rather than
9734 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9735 are already deferred.
9736 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9737 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9738 stopped and already has a pending signal to report.
9739 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9740 a pending signal to report or is moving out of a jump pad.
9741 (linux_init_signals): Check for __ANDROID__ rather than
9744 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9746 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9747 debug_threads check. Avoid a linear search when not doing debug
9750 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9752 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9753 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9754 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9755 (process_event): Change local fd's type to gdb_fildes_t.
9756 (create_file_handler): Adjust prototype.
9757 (delete_file_handler): Adjust prototype.
9758 (handle_file_event): Adjust prototype. Use pfildes.
9759 (create_file_event): Adjsut prototype.
9760 * remote-utils.c (remote_desc, listen_desc): Change type to
9762 * server.h: New gdb_fildes_t typedef.
9763 [USE_WIN32API]: Include winsock2.h.
9764 (delete_file_handler, add_file_handler): Adjust prototypes.
9766 * utils.c (pfildes): New.
9768 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9770 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9771 * configure: Regenerate.
9773 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9775 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9776 (linux_done_accessing_memory): ... this.
9777 (linux_target_ops): Adjust.
9778 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9779 * nto-low.c (nto_target_ops): Adjust comment.
9780 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9781 * spu-low.c (spu_target_ops): Adjust comment.
9782 * target.h (target_ops): Rename unprepare_to_access_memory field
9783 to done_accessing_memory.
9784 (unprepare_to_access_memory): Rename to ...
9785 (done_accessing_memory): ... this.
9787 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9789 * linux-low.c (linux_prepare_to_access_memory): New.
9790 (linux_unprepare_to_access_memory): New.
9791 (linux_target_ops): Install them.
9792 * server.c (read_memory): Rename to ...
9793 (gdb_read_memory): ... this. Use
9794 prepare_to_access_memory/prepare_to_access_memory.
9795 (write_memory): Rename to ...
9796 (gdb_write_memory): ... this. Use
9797 prepare_to_access_memory/prepare_to_access_memory.
9798 (handle_search_memory_1): Adjust.
9799 (process_serial_event): Adjust.
9800 * target.h (struct target_ops): New fields
9801 prepare_to_access_memory and unprepare_to_access_memory.
9802 (prepare_to_access_memory, unprepare_to_access_memory): New.
9803 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9804 prepare_to_access_memory/prepare_to_access_memory.
9805 * nto-low.c (nto_target_ops): Adjust.
9806 * spu-low.c (spu_target_ops): Adjust.
9807 * win32-low.c (win32_target_ops): Adjust.
9809 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9811 * Makefile.in (WARN_CFLAGS): Get it from configure.
9812 (WERROR_CFLAGS): New.
9813 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9814 * configure.ac: Introduce --enable-werror, which adds -Werror to
9815 the compiler command line. Enabled by default. Disable with
9816 --disable-werror. Add -Wdeclaration-after-statement
9817 Wpointer-arith and -Wformat-nonliteral to warning flags.
9818 * configure: Regenerate.
9820 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9822 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9824 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9826 * gdbreplay.c (remote_error): New.
9828 (expect): Use gdbchar. Check for error reading from GDB.
9829 Clarify sync error output.
9830 (play): Check for errors writing to GDB.
9831 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9832 * remote-utils.c (getpkt): Check for errors writing to the remote
9835 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9837 * linux-low.c (linux_wait_1): Move non-debugging code out of
9838 `debug_threads' control.
9840 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9842 * linux-low.c (linux_wait_1): Don't set last_status here.
9843 * server.c (push_event, queue_stop_reply_callback): Assert we're
9844 not pushing a TARGET_WAITKIND_IGNORE event.
9845 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9846 (myresume, handle_target_event): Set the thread's last_resume_kind
9847 and last_status from the target returned status.
9849 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9853 * linux-x86-low.c (update_debug_registers_callback): New.
9854 (i386_dr_low_set_addr): Use it.
9855 (i386_dr_low_get_addr): New.
9856 (i386_dr_low_set_control): Use update_debug_registers_callback.
9857 (i386_dr_low_get_control): New.
9858 (i386_dr_low_get_status): Adjust.
9859 * linux-low.c (linux_stop_lwp): New.
9860 * linux-low.h (linux_stop_lwp): Declare.
9862 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9863 argument instead of a i386_debug_reg_state.
9864 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9865 a i386_debug_reg_state.
9866 (i386_insert_aligned_watchpoint): Adjust.
9867 (i386_remove_aligned_watchpoint): Adjust.
9868 (i386_low_stopped_data_address): Read the debug registers from the
9869 inferior instead of from the mirrors.
9870 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9871 (i386_dr_low_get_addr): Declare.
9872 (i386_dr_low_get_control): Declare.
9873 (i386_dr_low_get_status): Change prototype.
9875 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9876 (i386_dr_low_get_addr): New.
9877 (i386_dr_low_get_control): New.
9878 (i386_dr_low_get_status): Adjust prototype. Return
9880 (i386_initial_stuff): Clear dr_status_mirror and
9882 (i386_get_thread_context): Adjust.
9883 (i386_set_thread_context): Adjust.
9884 (i386_thread_added): Adjust.
9886 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9888 * linux-low.h (linux_thread_area): Delete declaration.
9890 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9892 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9893 after its termination.
9895 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9897 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9898 (gdb_wants_all_stopped): Delete.
9899 (linux_wait_1): Don't call them.
9900 * server.c (handle_v_cont): Tag all threads as want-stopped.
9901 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9902 stopped as "client-wants-stopped".
9904 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9906 * Makefile.in (signals_h): New.
9907 (server_h): Depend on it.
9908 (server.o): Don't depend on $(signals_def).
9909 (signals.o): Depend on $(signals_def).
9911 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9913 * Makefile.in (signals_def): New.
9914 (server_h): Append include/gdb/signals.h and signals_def.
9915 (server.o): Append signals_def.
9917 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9919 * server.c (handle_target_event): Use target_signal_to_host for
9920 resume_info.sig initialization.
9921 * target.h (struct thread_resume) <sig>: New comment.
9923 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9925 * server.c (handle_query): strcpy() the returned string from paddress()
9926 instead of sprintf().
9927 * utils.c (paddress): Return phex_nz().
9929 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9931 * server.c (handle_v_cont): Call mourn_inferior if process
9933 (myresume): Likewise.
9935 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9937 Static tracepoints, and integration with UST.
9939 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9940 * mem-break.c (uninsert_all_breakpoints)
9941 (reinsert_all_breakpoints): New.
9942 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9943 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9944 (gdb_agent_ust_loaded, helper_thread_id)
9945 (gdb_agent_helper_thread_id): New macros.
9946 (struct ipa_sym_addresses): Add addr_ust_loaded,
9947 addr_helper_thread_id, addr_cmd_buf.
9948 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9949 (in_process_agent_loaded_ust): New.
9950 (write_e_ust_not_loaded): New.
9951 (maybe_write_ipa_ust_not_loaded): New.
9952 (struct collect_static_trace_data_action): New.
9953 (enum tracepoint_type) <static_tracepoint>: New.
9954 (struct tracepoint) <handle>: Mention static tracepoints.
9955 (struct static_tracepoint_ctx): New.
9956 (CMD_BUF_SIZE): New.
9957 (add_tracepoint_action): Handle static tracepoint actions.
9958 (unprobe_marker_at): New.
9959 (clear_installed_tracepoints): Handle static tracepoints.
9960 (cmd_qtdp): Handle static tracepoints.
9961 (probe_marker_at): New.
9962 (cmd_qtstart): Handle static tracepoints.
9963 (response_tracepoint): Handle static tracepoints.
9964 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9965 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9966 (get_context_regcache): Handle static tracepoints.
9967 (do_action_at_tracepoint): Handle static tracepoint actions.
9968 (traceframe_find_block_type): Handle static trace data blocks.
9969 (traceframe_read_sdata): New.
9970 (download_tracepoints): Download static tracepoint actions.
9971 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9972 (GDB_PROBE_NAME): New.
9977 (ust_marker_to_static_tracepoint): New.
9979 (collect_ust_data_at_tracepoint): New.
9980 (gdb_ust_probe): New.
9981 (UNIX_PATH_MAX, SOCK_DIR): New.
9982 (gdb_ust_connect_sync_socket): New.
9983 (resume_thread, stop_thread): New.
9984 (run_inferior_command): New.
9985 (init_named_socket): New.
9986 (gdb_ust_socket_init): New.
9987 (cstr_to_hexstr): New.
9989 (first_marker, next_marker): New.
9990 (response_ust_marker): New.
9991 (cmd_qtfstm, cmd_qtsstm): New.
9992 (unprobe_marker_at, probe_marker_at): New.
9993 (cmd_qtstmat, gdb_ust_thread): New.
9994 (gdb_ust_init): New.
9995 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9996 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9998 (x86_64_st_collect_regmap): New.
9999 (X86_64_NUM_ST_COLLECT_GREGS): New.
10000 (AMD64_RIP_REGNUM): New.
10001 (supply_static_tracepoint_registers): New.
10002 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10003 (ST_REGENTRY): New.
10004 (i386_st_collect_regmap): New.
10005 (i386_NUM_ST_COLLECT_GREGS): New.
10006 (supply_static_tracepoint_registers): New.
10007 * server.c (handle_query): Handle qXfer:statictrace:read.
10008 <qSupported>: Report support for StaticTracepoints, and
10009 qXfer:statictrace:read features.
10010 * server.h (traceframe_read_sdata)
10011 (supply_static_tracepoint_registers): Declare.
10012 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10013 (unpack_varlen_hex): Include in IPA build.
10014 * Makefile.in (ustlibs, ustinc): New.
10015 (IPA_OBJS): Add remote-utils-ipa.o.
10016 ($(IPA_LIB)): Link -ldl and -lpthread.
10018 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10019 * config.in, configure: Regenerate.
10021 2010-06-20 Ian Lance Taylor <iant@google.com>
10022 Pedro Alves <pedro@codesourcery.com>
10024 * linux-x86-low.c (always_true): Delete.
10025 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10026 trying to fool the compiler with always_true.
10028 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10030 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10031 conditions in gdbserver.
10033 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10035 * spu-low.c (spu_read_memory): Wrap around local store limit.
10036 (spu_write_memory): Likewise.
10038 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10040 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10041 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10043 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10045 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10046 uses with LONGEST uses.
10048 2010-06-14 Stan Shebs <stan@codesourcery.com>
10049 Pedro Alves <pedro@codesourcery.com>
10053 * linux-x86-low.c: Include limits.h.
10055 (always_true): New.
10058 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10059 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10060 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10061 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10062 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10063 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10064 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10065 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10066 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10067 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10068 (amd64_emit_void_call_2): New.
10069 (amd64_emit_ops): New.
10070 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10071 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10072 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10073 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10074 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10075 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10076 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10077 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10078 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10079 (i386_emit_stack_adjust, i386_emit_int_call_1)
10080 (i386_emit_void_call_2): New.
10081 (i386_emit_ops): New.
10082 (x86_emit_ops): New.
10083 (the_low_target): Install x86_emit_ops.
10084 * server.h (struct emit_ops): New.
10085 (get_raw_reg_func_addr): Declare.
10086 (current_insn_ptr, emit_error): Declare.
10087 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10088 (set_trace_state_variable_value): New defines.
10089 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10090 addr_get_trace_state_variable_value and
10091 addr_set_trace_state_variable_value.
10092 (symbol_list): New fields for get_raw_reg,
10093 get_trace_state_variable_value and set_trace_state_variable_value.
10094 (condfn): New typedef.
10095 (struct tracepoint): New field `compiled_cond'.
10096 (do_action_at_tracepoint): Clear compiled_cond.
10097 (get_trace_state_variable_value, set_trace_state_variable_value):
10099 (condition_true_at_tracepoint): If there's a compiled condition,
10101 (current_insn_ptr, emit_error): New globals.
10102 (struct bytecode_address): New.
10103 (get_raw_reg_func_addr): New.
10104 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10105 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10106 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10107 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10108 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10109 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10110 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10111 (compile_tracepoint_condition, compile_bytecodes): New.
10112 * target.h (emit_ops): Forward declare.
10113 (struct target_ops): New field emit_ops.
10114 (target_emit_ops): New.
10115 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10116 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10117 * linux-low.c (linux_emit_ops): New.
10118 (linux_target_ops): Install it.
10119 * linux-low.h (struct linux_target_ops): New field emit_ops.
10121 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10123 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10124 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10126 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10127 Stan Shebs <stan@codesourcery.com>
10129 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10130 (all): Depend on $(extra_libraries).
10131 (install-only): Install the IPA.
10132 (IPA_OBJS, IPA_LIB): New.
10133 (clean): Remove the IPA lib.
10134 (IPAGENT_CFLAGS): New.
10135 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10136 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10137 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10138 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10139 * configure.ac: Check for atomic builtins support in the compiler.
10140 (IPA_DEPFILES, extra_libraries): Define.
10141 * configure.srv (ipa_obj): Add description.
10142 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10143 (i[34567]86-*-linux*): Set ipa_obj.
10144 (x86_64-*-linux*): Set ipa_obj.
10145 * linux-low.c (stabilizing_threads): New.
10146 (supports_fast_tracepoints): New.
10147 (linux_detach): Stabilize threads before detaching.
10148 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10149 the lwp is either not stabilizing, or is moving out of a jump pad.
10150 (linux_fast_tracepoint_collecting): New.
10151 (maybe_move_out_of_jump_pad): New.
10152 (enqueue_one_deferred_signal): New.
10153 (dequeue_one_deferred_signal): New.
10154 (linux_wait_for_event_1): If moving out of a jump pad, defer
10155 pending signals to later.
10156 (linux_stabilize_threads): New.
10157 (linux_wait_1): Check if threads need moving out of jump pads, and
10159 (stuck_in_jump_pad_callback): New.
10160 (move_out_of_jump_pad_callback): New.
10161 (lwp_running): New.
10162 (linux_resume_one_lwp): Handle moving out of jump pads.
10163 (linux_set_resume_request): Dequeue deferred signals.
10164 (need_step_over_p): Also step over fast tracepoint jumps.
10165 (start_step_over): Also uninsert fast tracepoint jumps.
10166 (finish_step_over): Also reinsert fast tracepoint jumps.
10167 (linux_install_fast_tracepoint_jump): New.
10168 (linux_target_ops): Install linux_stabilize_threads and
10169 linux_install_fast_tracepoint_jump_pad.
10170 * linux-low.h (linux_target_ops) <get_thread_area,
10171 install_fast_tracepoint_jump_pad>: New fields.
10172 (struct lwp_info) <collecting_fast_tracepoint,
10173 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10174 (linux_get_thread_area): Declare.
10175 * linux-x86-low.c (jump_insn): New.
10176 (x86_get_thread_area): New.
10177 (append_insns): New.
10178 (push_opcode): New.
10179 (amd64_install_fast_tracepoint_jump_pad): New.
10180 (i386_install_fast_tracepoint_jump_pad): New.
10181 (x86_install_fast_tracepoint_jump_pad): New.
10182 (the_low_target): Install x86_get_thread_area and
10183 x86_install_fast_tracepoint_jump_pad.
10184 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10185 (struct fast_tracepoint_jump): New.
10186 (fast_tracepoint_jump_insn): New.
10187 (fast_tracepoint_jump_shadow): New.
10188 (find_fast_tracepoint_jump_at): New.
10189 (fast_tracepoint_jump_here): New.
10190 (delete_fast_tracepoint_jump): New.
10191 (set_fast_tracepoint_jump): New.
10192 (uninsert_fast_tracepoint_jumps_at): New.
10193 (reinsert_fast_tracepoint_jumps_at): New.
10194 (set_breakpoint_at): Use write_inferior_memory.
10195 (uninsert_raw_breakpoint): Use write_inferior_memory.
10196 (check_mem_read): Mask out fast tracepoint jumps.
10197 (check_mem_write): Mask out fast tracepoint jumps.
10198 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10199 (set_fast_tracepoint_jump): Declare.
10200 (delete_fast_tracepoint_jump)
10201 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10202 (reinsert_fast_tracepoint_jumps_at): Declare.
10203 * regcache.c: Don't compile many functions when building the
10204 in-process agent library.
10205 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10206 the register buffer in the heap.
10207 (free_register_cache): If the register buffer isn't owned by the
10208 regcache, don't free it.
10209 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10210 pre-existing register caches.
10211 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10213 (convert_ascii_to_int): : Constify `from' parameter type.
10214 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10215 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10216 the needed buffer in-place.
10217 (relocate_instruction): New.
10218 * server.c (handle_query) <qSymbols>: If the target supports
10219 tracepoints, give it a chance of looking up symbols. Report
10220 support for fast tracepoints.
10221 (handle_status): Stabilize threads.
10222 (process_serial_event): Adjust.
10223 * server.h (struct fast_tracepoint_jump): Forward declare.
10224 (struct process_info) <fast_tracepoint_jumps>: New field.
10225 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10226 (decode_X_packet, decode_M_packet): Adjust.
10227 (relocate_instruction): Declare.
10228 (in_process_agent_loaded): Declare.
10229 (tracepoint_look_up_symbols): Declare.
10230 (struct fast_tpoint_collect_status): Declare.
10231 (fast_tracepoint_collecting): Declare.
10232 (force_unlock_trace_buffer): Declare.
10233 (handle_tracepoint_bkpts): Declare.
10234 (initialize_low_tracepoint)
10235 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10236 * target.h (struct target_ops) <stabilize_threads,
10237 install_fast_tracepoint_jump_pad>: New fields.
10238 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10239 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10240 [HAVE_STDINT_H]: Include stdint.h.
10241 (trace_debug_1): Rename to ...
10242 (trace_vdebug): ... this.
10243 (trace_debug): Rename to ...
10244 (trace_debug_1): ... this. Add `level' parameter.
10245 (trace_debug): New.
10246 (ATTR_USED, ATTR_NOINLINE): New.
10247 (IP_AGENT_EXPORT): New.
10248 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10249 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10250 (about_to_request_buffer_space, trace_buffer_is_full)
10251 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10252 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10253 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10254 (traceframe_write_count, traceframes_created)
10255 (trace_state_variables)
10256 New renaming defines.
10257 (struct ipa_sym_addresses): New.
10258 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10259 (symbol_list): New.
10260 (ipa_sym_addrs): New.
10261 (all_tracepoint_symbols_looked_up): New.
10262 (in_process_agent_loaded): New.
10263 (write_e_ipa_not_loaded): New.
10264 (maybe_write_ipa_not_loaded): New.
10265 (tracepoint_look_up_symbols): New.
10266 (debug_threads) [IN_PROCESS_AGENT]: New.
10267 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10268 (UNKNOWN_SIDE_EFFECTS): New.
10269 (stop_tracing): New.
10270 (flush_trace_buffer): New.
10271 (stop_tracing_bkpt): New.
10272 (flush_trace_buffer_bkpt): New.
10273 (read_inferior_integer): New.
10274 (read_inferior_uinteger): New.
10275 (read_inferior_data_pointer): New.
10276 (write_inferior_data_pointer): New.
10277 (write_inferior_integer): New.
10278 (write_inferior_uinteger): New.
10279 (struct collect_static_trace_data_action): Delete.
10280 (enum tracepoint_type): New.
10281 (struct tracepoint) <type>: New field `type'.
10282 <actions_str, step_actions, step_actions_str>: Only include in
10284 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10285 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10286 (tracepoints): Use IP_AGENT_EXPORT.
10287 (last_tracepoint): Don't include in the IPA.
10288 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10289 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10290 (alloced_trace_state_variables): New.
10291 (trace_state_variables): Use IP_AGENT_EXPORT.
10292 (traceframe_t): Delete unused variable.
10293 (circular_trace_buffer): Don't include in the IPA.
10294 (trace_buffer_start): Delete.
10295 (struct trace_buffer_control): New.
10296 (trace_buffer_free): Delete.
10297 (struct ipa_trace_buffer_control): New.
10298 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10299 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10301 (trace_buffer_ctrl): New.
10302 (TRACE_BUFFER_CTRL_CURR): New.
10303 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10304 Reimplement as macros.
10305 (trace_buffer_wrap): Delete.
10306 (traceframe_write_count, traceframe_read_count)
10307 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10308 (struct tracepoint_hit_ctx) <type>: New field.
10309 (struct fast_tracepoint_ctx): New.
10310 (memory_barrier): New.
10312 (record_tracepoint_error): Update atomically in the IPA.
10313 (clear_inferior_trace_buffer): New.
10314 (about_to_request_buffer_space): New.
10315 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10316 updating the same buffer.
10317 (add_tracepoint): Default the tracepoint's type to trap
10318 tracepoint, and orig_size to -1.
10319 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10320 internal variables.
10321 (create_trace_state_variable): New parameter `gdb'. Handle it.
10322 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10323 (cmd_qtdp): Handle fast tracepoints.
10324 (cmd_qtdv): Adjust.
10325 (max_jump_pad_size): New.
10326 (gdb_jump_pad_head): New.
10327 (get_jump_space_head): New.
10328 (claim_jump_space): New.
10329 (sort_tracepoints): New.
10330 (MAX_JUMP_SIZE): New.
10331 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10333 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10334 support. Upload fast traceframes, and delete internal IPA
10336 (stop_tracing_handler): New.
10337 (flush_trace_buffer_handler): New.
10338 (cmd_qtstop): Upload fast tracepoints.
10339 (response_tracepoint): Handle fast tracepoints.
10340 (tracepoint_finished_step): Upload fast traceframes. Set the
10341 tracepoint hit context's tracepoint type.
10342 (handle_tracepoint_bkpts): New.
10343 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10344 type. Add comment about fast tracepoints.
10345 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10346 non-existing action_str field.
10347 (get_context_regcache): Handle fast tracepoints.
10348 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10350 (fast_tracepoint_from_jump_pad_address): New.
10351 (fast_tracepoint_from_ipa_tpoint_address): New.
10352 (collecting_t): New.
10353 (force_unlock_trace_buffer): New.
10354 (fast_tracepoint_collecting): New.
10356 (gdb_collect): New.
10357 (write_inferior_data_ptr): New.
10358 (target_tp_heap): New.
10359 (target_malloc): New.
10360 (download_agent_expr): New.
10362 (download_tracepoints): New.
10363 (download_trace_state_variables): New.
10364 (upload_fast_traceframes): New.
10365 (IPA_FIRST_TRACEFRAME): New.
10366 (IPA_NEXT_TRACEFRAME_1): New.
10367 (IPA_NEXT_TRACEFRAME): New.
10368 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10369 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10370 (gdb_jump_pad_buffer_end): New.
10371 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10372 (initialize_tracepoint): Adjust.
10373 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10374 buffer. Initialize the low module.
10375 * utils.c (PREFIX, TOOLNAME): New.
10376 (malloc_failure): Use PREFIX.
10377 (error): In the IPA, an error causes an exit.
10378 (fatal, warning): Use PREFIX.
10379 (internal_error): Use TOOLNAME.
10380 (NUMCELLS): Increase to 10.
10381 * configure, config.in: Regenerate.
10383 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10385 * server.c (handle_query) <qSupported>: Do two passes over the
10386 qSupported string to avoid nesting strtok.
10388 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10390 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10392 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10393 -Wl,--dynamic-list.
10394 * configure: Regenerate.
10395 * proc-service.list: New.
10397 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10399 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10402 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10404 * gdbreplay.c (remote_open): Check error return from socket() call by
10405 its equality to -1 not by it being negative.
10406 * remote-utils.c (remote_open): Likewise.
10408 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10410 * config.h: Regenerate.
10412 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10414 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10415 doesn't provide PTRACE_GET_THREAD_AREA.
10417 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10419 * linux-m68k-low.c: Include <asm/ptrace.h>
10420 (ps_get_thread_area): Implement.
10422 2010-05-03 Doug Evans <dje@google.com>
10424 * event-loop.c (struct callback_event): New struct.
10425 (callback_list): New global.
10426 (append_callback_event, delete_callback_event): New functions.
10427 (process_callback): New function.
10428 (start_event_loop): Call it.
10429 * remote-utils.c (NOT_SCHEDULED): Define.
10430 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10431 moved out of readchar.
10432 (readchar): Rewrite. Call reschedule before returning.
10433 (reset_readchar): New function.
10434 (remote_close): Call it.
10435 (process_remaining, reschedule): New functions.
10436 * server.h (callback_handler_func): New typedef.
10437 (append_callback_event, delete_callback_event): Declare.
10439 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10441 * proc-service.c (ps_pglobal_lookup): Use
10442 thread_db_look_up_one_symbol.
10443 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10444 parameter. Use it instead of all_symbols_looked_up.
10445 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10447 (all_symbols_looked_up): Don't declare.
10448 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10449 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10451 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10452 Set all_symbols_looked_up here.
10453 (thread_db_look_up_one_symbol): New.
10454 (thread_db_get_tls_address): Adjust.
10455 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10456 thread_db object on the heap, and tentatively set it in the
10458 (thread_db_init): Don't set all_symbols_looked_up here.
10459 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10461 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10463 * linux-low.c (linux_kill, linux_detach): Adjust.
10464 (status_pending_p_callback): Remove redundant statement. Check
10465 for !TARGET_WAITIKIND_IGNORE, instead of
10466 TARGET_WAITKIND_STOPPED.
10467 (handle_tracepoints): Make sure LWP is locked. Adjust.
10468 (linux_wait_for_event_1): Adjust.
10469 (linux_cancel_breakpoints): New.
10470 (unsuspend_one_lwp): New.
10471 (unsuspend_all_lwps): New.
10472 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10473 (send_sigstop_callback): Change return type to int, add new
10474 `except' parameter and handle it.
10475 (suspend_and_send_sigstop_callback): New.
10476 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10477 pass them down. If SUSPEND, also increment the lwp's suspend
10479 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10480 (need_step_over_p): Don't consider suspended LWPs.
10481 (start_step_over): Adjust.
10482 (proceed_one_lwp): Change return type to int, add new `except'
10483 parameter and handle it.
10484 (unsuspend_and_proceed_one_lwp): New.
10485 (proceed_all_lwps): Use find_inferior instead of
10487 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10488 also decrement the suspend count of LWPs. Pass `except' down,
10489 instead of hacking its suspend count.
10490 (linux_pause_all): Add `freeze' parameter. Adjust.
10491 (linux_unpause_all): New.
10492 (linux_target_ops): Install linux_unpause_all.
10493 * server.c (handle_status): Adjust.
10494 * target.h (struct target_ops): New fields `unpause_all' and
10495 `cancel_breakpoints'. Add new parameter to `pause_all'.
10496 (pause_all): Add new `freeze' parameter.
10497 (unpause_all): New.
10498 (cancel_breakpoints): New.
10499 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10500 cancel breakpoints.
10501 (cmd_qtstart): Pause threads.
10502 (stop_tracing): Pause threads, and cancel breakpoints.
10503 * win32-low.c (win32_target_ops): Adjust.
10505 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10507 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10508 the inferior right away from here...
10509 (linux_wait_1): ... to here, and adjust to check the thread's
10510 last_resume_kind instead of the lwp's step or stop_expected flags.
10512 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10514 * README: Use consistent `GDB' and `GDBserver' spellings.
10516 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10518 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10519 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10520 (linux_detach_one_lwp): Assume the lwp is stopped.
10521 (any_thread_of): Delete.
10522 (linux_detach): Stop all lwps here. Don't blindly delete all
10524 (delete_lwp_callback): New.
10525 (linux_mourn): Delete all lwps of the process that is gone.
10526 (linux_wait_1): Don't delete the last lwp of the process here.
10527 * mem-break.h (mark_breakpoints_out): Declare.
10528 * mem-break.c (mark_breakpoints_out): New.
10529 (free_all_breakpoints): Use it.
10530 * server.c (handle_target_event): If the process is gone, mark
10532 * thread-db.c (struct thread_db) <create_bp>: New field.
10533 (thread_db_enable_reporting): Fix prototype. Store a thread event
10534 breakpoint reference in the thread_db struct.
10535 (thread_db_load_search): Clear the thread_db object.
10536 (try_thread_db_load_1): Ditto.
10537 (switch_to_process): New.
10538 (disable_thread_event_reporting): Use it.
10539 (remove_thread_event_breakpoints): New.
10540 (thread_db_detach, thread_db_mourn): Use it.
10542 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10544 * linux-low.c (linux_enable_event_reporting): New.
10545 (linux_wait_for_event_1, handle_extended_wait): Use it.
10547 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10549 * linux-low.c (linux_kill_one_lwp, linux_kill)
10550 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10551 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10552 SIGSTOP even if the LWP is stopped.
10553 (send_sigstop_callback): New.
10554 (stop_all_lwps): Use send_sigstop_callback instead.
10555 (linux_resume_one_thread): Adjust.
10556 (proceed_one_lwp): Still proceed an LWP that the client has
10557 requested to stop, if we haven't reported it as stopped yet. Make
10558 sure that LWPs the client want stopped, have a pending SIGSTOP.
10560 2010-04-26 Doug Evans <dje@google.com>
10562 * server.c (handle_general_set): Make static.
10564 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10565 Print received char after testing for error/eof instead of before.
10566 (input_interrupt): Tweak comment.
10568 2010-04-23 Doug Evans <dje@google.com>
10570 * server.c (start_inferior): Print inferior argv if --debug.
10572 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10574 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10575 * nto-x86-low.c: Include server.h
10577 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10579 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10580 be consistent with other sources of this directory.
10581 (init_registers_amd64): Correct name of source file of this function
10584 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10586 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10587 64-bit executables.
10589 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10591 * win32-i386-low.c: Add 64-bit support.
10592 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10593 (init_registers_amd64): Declare.
10594 (mappings): Add 64-bit version of array.
10595 (init_windows_x86): New function.
10596 (the_low_target): Change init_arch field to init_windows_x86.
10598 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10600 * win32-low.c: Adapt to support also 64-bit architecture.
10601 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10602 (get_image_name): Use SIZE_T type for local variable `done'.
10603 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10604 (toolhelp_get_dll_name): Idem.
10605 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10606 Use uintptr_t typecast to avoid warning.
10607 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10608 (handle_exception): Use phex_nz to avoid warning.
10609 (win32_wait): Remove unused local variable `process'.
10611 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10613 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10616 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10618 * configure.ac: Use `ws2_32' library for srv_mingw.
10619 * configure: Regenerate.
10620 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10621 * remote-utils.c: Likewise.
10623 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10625 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10626 if __x86_64__ is defined.
10628 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10630 * configure: Regenerate.
10632 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10634 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10635 * target.h (target_ops): New get_tib_address field.
10636 * win32-low.h (win32_thread_info): Add thread_local_base field.
10637 * win32-low.c (child_add_thread): Add tlb argument.
10638 Set thread_local_base field to TLB.
10639 (get_child_debug_event): Adapt to child_add_thread change.
10640 (win32_get_tib_address): New function.
10641 (win32_target_ops): Set get_tib_address field to
10642 win32_get_tib_address.
10643 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10645 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10647 * linux-low.c (linux_mourn): Also remove the process.
10648 * server.c (handle_target_event): Don't remove the process here.
10649 * nto-low.c (nto_mourn): New.
10650 (nto_target_ops): Install it.
10651 * spu-low.c (spu_mourn): New.
10652 (spu_target_ops): Install it.
10653 * win32-low.c (win32_mourn): New.
10654 (win32_target_ops): Install it.
10656 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10658 * server.h (buffer_xml_printf): Remove redundant `;'.
10660 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10662 * regcache.c (set_register_cache): Invalidate regcaches before
10663 changing the register cache layout.
10664 (regcache_invalidate_one): Allow a NULL regcache.
10665 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10666 regcaches before changing the register cache layout or the target
10669 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10671 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10672 variable warning on Linux/x86-64.
10674 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10676 GDBserver disconnected tracing support.
10678 * linux-low.c (linux_remove_process): Delete.
10679 (add_lwp): Don't set last_resume_kind here.
10680 (linux_kill): Use `mourn'.
10681 (linux_detach): Use `thread_db_detach', and `mourn'.
10682 (linux_mourn): New.
10683 (linux_attach_lwp_1): Adjust comment.
10684 (linux_attach): last_resume_kind moved the thread_info; adjust.
10685 (status_pending_p_callback): Adjust.
10686 (linux_wait_for_event_1): Adjust.
10687 (count_events_callback, select_singlestep_lwp_callback)
10688 (select_event_lwp_callback, cancel_breakpoints_callback)
10689 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10690 (proceed_one_lwp): Adjust.
10691 (linux_async): Add debug output.
10692 (linux_thread_stopped): New.
10693 (linux_pause_all): New.
10694 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10696 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10697 (thread_db_free): Delete declaration.
10698 (thread_db_detach, thread_db_mourn): Declare.
10699 * thread-db.c (thread_db_init): Use thread_db_mourn.
10700 (thread_db_free): Delete, split in two.
10701 (disable_thread_event_reporting): New.
10702 (thread_db_detach): New.
10703 (thread_db_mourn): New.
10705 * server.h (struct thread_info) <last_resume_kind>: New field.
10706 <attached>: Add comment.
10707 <gdb_detached>: New field.
10708 (handler_func): Change return type to int.
10709 (handle_serial_event, handle_target_event): Ditto.
10710 (gdb_connected): Declare.
10712 (disconnected_tracing): Declare.
10713 (stop_tracing): Declare.
10715 * server.c (handle_query) <qSupported>: Report support for
10716 disconnected tracing.
10717 (queue_stop_reply_callback): Account for running threads.
10718 (gdb_wants_thread_stopped): New.
10719 (gdb_wants_all_threads_stopped): New.
10720 (gdb_reattached_process): New.
10721 (handle_status): Clear the `gdb_detached' flag of all processes.
10722 In all-stop, stop all threads.
10723 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10724 (process_serial_event): If the remote connection breaks, or if an
10725 exit was forced with "monitor exit", force an event loop exit.
10726 Handle disconnected tracing on detach.
10727 (handle_serial_event): Adjust.
10728 (handle_target_event): If GDB isn't connected, forward events back
10729 to the inferior, unless the last process exited, in which case,
10730 exit gdbserver. Adjust interface.
10732 * remote-utils.c (remote_open): Don't block in accept. Instead
10733 register an event loop source on the listen socket file
10734 descriptor. Refactor bits into ...
10735 (listen_desc): ... this new global.
10736 (gdb_connected): ... this new function.
10737 (enable_async_notification): ... this new function.
10738 (handle_accept_event): ... this new function.
10739 (remote_close): Clear remote_desc.
10741 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10743 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10745 (mourn_inferior): Define.
10746 (target_process_qsupported): Avoid the dangling else problem.
10747 (thread_stopped): Define.
10748 (pause_all): Define.
10749 (target_waitstatus_to_string): Declare.
10750 * target.c (target_waitstatus_to_string): New.
10752 * tracepoint.c (tracing): Make extern.
10753 (disconnected_tracing): New.
10754 (stop_tracing): Make extern. Handle tracing stops due to GDB
10756 (cmd_qtdisconnected): New.
10757 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10758 (handle_tracepoint_general_set): Handle QTDisconnected.
10760 * event-loop.c (event_handler_func): Change return type to int.
10761 (process_event): Bail out if the event handler wants the event
10763 (handle_file_event): Ditto.
10764 (start_event_loop): Bail out if the event handler wants the event
10767 * nto-low.c (nto_target_ops): Adjust.
10768 * spu-low.c (spu_wait): Don't remove the process here.
10769 (spu_target_ops): Adjust.
10770 * win32-low.c (win32_wait): Don't remove the process here.
10771 (win32_target_ops): Adjust.
10773 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10775 * regcache.c (realloc_register_cache): Invalidate inferior's
10776 regcache before recreating it.
10778 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10780 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10782 2010-04-09 Stan Shebs <stan@codesourcery.com>
10783 Pedro Alves <pedro@codesourcery.com>
10785 * server.h (LONGEST): New.
10786 (struct thread_info) <while_stepping>: New field.
10787 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10789 (initialize_tracepoint, handle_tracepoint_general_set)
10790 (handle_tracepoint_query, tracepoint_finished_step)
10791 (tracepoint_was_hit, release_while_stepping_state_list):
10792 (current_traceframe): Declare.
10793 * server.c (handle_general_set): Handle tracepoint packets.
10794 (read_memory): New.
10795 (write_memory): New.
10796 (handle_search_memory_1): Use read_memory.
10797 (handle_query): Report support for conditional tracepoints, trace
10798 state variables, and tracepoint sources. Handle tracepoint
10800 (main): Initialize the tracepoints module.
10801 (process_serial_event): Handle traceframe reads/writes.
10803 * linux-low.c (handle_tracepoints): New.
10804 (linux_wait_1): Call it.
10805 (linux_resume_one_lwp): Handle while-stepping.
10806 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10807 (linux_target_ops): Install them.
10808 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10810 * linux-x86-low.c (x86_supports_tracepoints): New.
10811 (the_low_target). Install it.
10813 * mem-break.h (delete_breakpoint): Declare.
10814 * mem-break.c (delete_breakpoint): Make external.
10816 * target.h (struct target_ops): Add `supports_tracepoints',
10817 `read_pc', and `write_pc' fields.
10818 (target_supports_tracepoints): Define.
10819 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10822 * regcache.h (struct regcache) <registers_owned>: New field.
10823 (init_register_cache, regcache_cpy): Declare.
10824 (regcache_read_pc, regcache_write_pc): Declare.
10825 (register_cache_size): Declare.
10826 (supply_regblock): Declare.
10827 * regcache.c (init_register_cache): New.
10828 (new_register_cache): Use it.
10829 (regcache_cpy): New.
10830 (register_cache_size): New.
10831 (supply_regblock): New.
10832 (regcache_read_pc, regcache_write_pc): New.
10834 * tracepoint.c: New.
10836 * Makefile.in (OBS): Add tracepoint.o.
10837 (tracepoint.o): New rule.
10839 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10841 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10843 (i386-mmx.c): Likewise.
10844 (i386-mmx-linux.o): Likewise.
10845 (i386-mmx-linux.c): Likewise.
10847 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10848 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10849 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10850 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10852 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10853 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10854 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10856 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10858 * Makefile.in (clean): Updated.
10860 (i386-avx.c): Likewise.
10861 (i386-avx-linux.o): Likewise.
10862 (i386-avx-linux.c): Likewise.
10863 (amd64-avx.o): Likewise.
10864 (amd64-avx.c): Likewise.
10865 (amd64-avx-linux.o): Likewise.
10866 (amd64-avx-linux.c): Likewise.
10868 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10869 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10870 (srv_amd64_regobj): Add amd64-avx.o.
10871 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10872 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10873 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10874 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10875 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10876 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10877 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10879 * i387-fp.c: Include "i386-xstate.h".
10881 (i387_cache_to_xsave): Likewise.
10882 (i387_xsave_to_cache): Likewise.
10883 (x86_xcr0): Likewise.
10885 * i387-fp.h (i387_cache_to_xsave): Likewise.
10886 (i387_xsave_to_cache): Likewise.
10887 (x86_xcr0): Likewise.
10889 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10890 * linux-crisv32-low.c (target_regsets): Likewise.
10891 * linux-m68k-low.c (target_regsets): Likewise.
10892 * linux-mips-low.c (target_regsets): Likewise.
10893 * linux-ppc-low.c (target_regsets): Likewise.
10894 * linux-s390-low.c (target_regsets): Likewise.
10895 * linux-sh-low.c (target_regsets): Likewise.
10896 * linux-sparc-low.c (target_regsets): Likewise.
10897 * linux-xtensa-low.c (target_regsets): Likewise.
10899 * linux-low.c: Include <sys/uio.h>.
10900 (regsets_fetch_inferior_registers): Support nt_type.
10901 (regsets_store_inferior_registers): Likewise.
10902 (linux_process_qsupported): New.
10903 (linux_target_ops): Add linux_process_qsupported.
10905 * linux-low.h (regset_info): Add nt_type.
10906 (linux_target_ops): Add process_qsupported.
10908 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10910 (init_registers_i386_avx_linux): New.
10911 (init_registers_amd64_avx_linux): Likewise.
10912 (xmltarget_i386_linux_no_xml): Likewise.
10913 (xmltarget_amd64_linux_no_xml): Likewise.
10914 (PTRACE_GETREGSET): Likewise.
10915 (PTRACE_SETREGSET): Likewise.
10916 (x86_fill_xstateregset): Likewise.
10917 (x86_store_xstateregset): Likewise.
10918 (use_xml): Likewise.
10919 (x86_linux_update_xmltarget): Likewise.
10920 (x86_linux_process_qsupported): Likewise.
10921 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10922 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10923 init_registers_i386_linux here. Call
10924 x86_linux_update_xmltarget.
10925 (the_low_target): Add x86_linux_process_qsupported.
10927 * server.c (handle_query): Call target_process_qsupported.
10929 * target.h (target_ops): Add process_qsupported.
10930 (target_process_qsupported): New.
10932 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10934 * inferiors.c (add_thread): Set last_status kind to
10935 TARGET_WAITKIND_IGNORE.
10936 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10937 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10938 (linux_wait_1): Move `thread' local definition to block that uses
10939 it. Don't NULL initialize `event_child'.
10940 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10941 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10942 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10944 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10946 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10947 an extended waitstatus, or by a watchpoint.
10948 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10949 thread was stepping or has been stopped by a watchpoint.
10951 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10953 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10954 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10955 of another, then delete the previous, and validate all
10957 (validate_inserted_breakpoint): New.
10958 (delete_disabled_breakpoints): New.
10959 (validate_breakpoints): New.
10960 (check_mem_read): Validate breakpoints before trusting their
10961 shadow. Delete disabled breakpoints.
10962 (check_mem_write): Validate breakpoints before trusting they
10963 should be inserted. Delete disabled breakpoints.
10964 * mem-break.h (validate_breakpoints):
10965 * server.c (handle_query): Validate breakpoints when we see a
10968 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10970 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10971 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10972 if we could tell there's a GDB breakpoint at stop_pc.
10973 (need_step_over_p): Don't do a step over if we find a GDB
10974 breakpoint at the resume PC.
10976 * mem-break.c (struct raw_breakpoint): New.
10977 (enum bkpt_type): New type `gdb_breakpoint'.
10978 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10979 fields. New field `raw'.
10980 (find_raw_breakpoint_at): New.
10981 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10982 breakpoint instead.
10983 (set_breakpoint_at): Adjust.
10984 (delete_raw_breakpoint): New.
10985 (release_breakpoint): New.
10986 (delete_breakpoint): Rename to...
10987 (delete_breakpoint_1): ... this. Add proc parameter. Use
10988 release_breakpoint. Return ENOENT.
10989 (delete_breakpoint): Reimplement.
10990 (find_breakpoint_at): Delete.
10991 (find_gdb_breakpoint_at): New.
10992 (delete_breakpoint_at): Delete.
10993 (set_gdb_breakpoint_at): New.
10994 (delete_gdb_breakpoint_at): New.
10995 (gdb_breakpoint_here): New.
10996 (set_reinsert_breakpoint): Use release_breakpoint.
10997 (uninsert_breakpoint): Rename to ...
10998 (uninsert_raw_breakpoint): ... this.
10999 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11000 (reinsert_raw_breakpoint): Change parameter type to
11002 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11004 (check_breakpoints): Adjust. Use release_breakpoint.
11005 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11006 (breakpoint_inserted_here): Ditto.
11007 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11008 Don't trust the breakpoint's shadow if it is not inserted.
11009 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11010 (delete_all_breakpoints): Adjust.
11011 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11012 use delete_breakpoint_1.
11014 * mem-break.h (breakpoints_supported): Delete declaration.
11015 (set_gdb_breakpoint_at): Declare.
11016 (gdb_breakpoint_here): Declare.
11017 (delete_breakpoint_at): Delete.
11018 (delete_gdb_breakpoint_at): Declare.
11020 * server.h (struct raw_breakpoint): Forward declare.
11021 (struct process_info): New field `raw_breakpoints'.
11023 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11026 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11028 * linux-low.c (status_pending_p_callback): Fix comment.
11029 (linux_wait_for_event_1): Move most of the internal breakpoint
11030 handling from here...
11031 (linux_wait_1): ... to here.
11032 (count_events_callback): New.
11033 (select_singlestep_lwp_callback): New.
11034 (select_event_lwp_callback): New.
11035 (cancel_breakpoints_callback): New.
11036 (select_event_lwp): New.
11037 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11038 priority to all LWPs that have had events that should be reported
11039 to the client. Cancel breakpoints when about to reporting the
11040 event to the client, not while stopping lwps. No longer cancel
11041 finished single-steps here.
11042 (cancel_finished_single_step): Delete.
11043 (cancel_finished_single_steps): Delete.
11045 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11047 * mem-break.c (enum bkpt_type): New.
11048 (struct breakpoint): New field `type'.
11049 (set_breakpoint_at): Change return type to struct breakpoint
11050 pointer. Set type to `other_breakpoint' by default.
11051 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11052 in the breakpoint list.
11053 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11054 (reinsert_breakpoint): Rename to ...
11055 (reinsert_raw_breakpoint): ... this.
11056 (reinsert_breakpoints_at): Adjust.
11057 * mem-break.h (struct breakpoint): Declare.
11058 (set_breakpoint_at): Change return type to struct breakpoint
11061 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11063 * server.c (handle_query): Assign, not compare.
11065 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11067 Teach linux gdbserver to step-over-breakpoints.
11069 * linux-low.c (can_hardware_single_step): New.
11070 (supports_breakpoints): New.
11071 (handle_extended_wait): If stopping threads, read the stop pc of
11072 the new cloned LWP.
11074 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11075 low target doesn't support retrieving the PC.
11076 (add_lwp): Set last_resume_kind to resume_continue.
11077 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11078 (linux_attach): Don't clear stop_expected. Set the lwp's
11079 last_resume_kind to resume_stop.
11080 (linux_detach_one_lwp): Don't check for removed breakpoints.
11081 (check_removed_breakpoint): Delete.
11082 (status_pending_p): Rename to ...
11083 (status_pending_p_callback): ... this. Don't check for removed
11084 breakpoints. Don't consider threads that are stopped from GDB's
11086 (linux_wait_for_lwp): Always read the stop_pc here.
11087 (cancel_breakpoint): New.
11088 (step_over_bkpt): New global.
11089 (linux_wait_for_event_1): Implement stepping over breakpoints.
11090 (gdb_wants_lwp_stopped): New.
11091 (gdb_wants_all_stopped): New.
11092 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11093 single-step traps here. Store the thread's last reported target
11095 (send_sigstop): Don't clear stop_expected. Always set it,
11097 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11098 (cancel_finished_single_step): New.
11099 (cancel_finished_single_steps): New.
11100 (wait_for_sigstop): Don't cancel finished single-step traps here.
11101 (linux_resume_one_lwp): Don't check for removed breakpoints.
11102 Don't set `step' on non-hardware step archs.
11103 (linux_set_resume_request): Ignore resume_stop requests if already
11104 stopping or stopped. Set the lwp's last_resume_kind.
11105 (resume_status_pending_p): Don't check for removed breakpoints.
11106 (need_step_over_p): New.
11107 (start_step_over): New.
11108 (finish_step_over): New.
11109 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11110 requests. Clear the thread's last reported target waitstatus.
11111 Don't use the `suspended' flag. Don't consider pending breakpoints.
11112 (linux_resume): Start a step-over if necessary.
11113 (proceed_one_lwp): New.
11114 (proceed_all_lwps): New.
11115 (unstop_all_lwps): New.
11116 * linux-low.h (struct lwp_info): Rewrite comment for the
11117 `suspended' flag. Add the `stop_pc' field. Delete the
11118 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11119 Add `'last_resume_kind' and `need_step_over' fields.
11120 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11121 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11122 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11123 (set_raw_breakpoint_at): New.
11124 (set_breakpoint_at): Rewrite to use it.
11125 (reinsert_breakpoint_handler): Delete.
11126 (set_reinsert_breakpoint): New.
11127 (reinsert_breakpoint_by_bp): Delete.
11128 (delete_reinsert_breakpoints): New.
11129 (uninsert_breakpoint): Rewrite.
11130 (uninsert_breakpoints_at): New.
11131 (reinsert_breakpoint): Rewrite.
11132 (reinsert_breakpoints_at): New.
11133 (check_breakpoints): Rewrite.
11134 (breakpoint_here): New.
11135 (breakpoint_inserted_here): New.
11136 (check_mem_read): Adjust.
11137 * mem-break.h (breakpoints_supported, breakpoint_here)
11138 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11139 (reinsert_breakpoint_by_bp): Delete declaration.
11140 (delete_reinsert_breakpoints): Declare.
11141 (reinsert_breakpoint): Delete declaration.
11142 (reinsert_breakpoints_at): Declare.
11143 (uninsert_breakpoint): Delete declaration.
11144 (uninsert_breakpoints_at): Declare.
11145 (check_breakpoints): Adjust prototype.
11146 * server.h: Adjust include order.
11147 (struct thread_info): Declare here. Add a `last_status' field.
11149 2010-03-23 Michael Snyder <msnyder@vmware.com>
11151 * server.c (crc32): New function.
11152 (handle_query): Add handling for 'qCRC:' request.
11154 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11156 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11157 lwp had been stopped by a watchpoint.
11159 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11161 * server.h (internal_error): Declare.
11162 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11163 * utils.c (internal_error): New function.
11165 2010-03-15 Andreas Schwab <schwab@redhat.com>
11167 * configure.srv: Fix typo setting srv_regobj.
11169 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11171 * linux-low.c (fetch_register): Avoid passing a non string literal
11173 (usr_store_inferior_registers): Ditto.
11175 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11177 * linux-low.c (linux_write_memory): Bail out early if peeking
11180 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11182 * linux-low.h (struct lwp_info): New fields
11183 `stopped_by_watchpoint' and `stopped_data_address'.
11184 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11185 here, and cache them in the lwp object.
11186 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11188 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11190 (linux_stopped_by_watchpoint): Rewrite.
11191 (linux_stopped_data_address): Rewrite.
11193 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11195 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11196 switching the current inferior, not before.
11198 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11200 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11201 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11202 i386-linux.c and amd64-linux.c.
11203 (reg-i386.o): Removed.
11204 (reg-i386.c): Likewise.
11205 (reg-i386-linux.o): Likewise.
11206 (reg-i386-linux.c): Likewise.
11207 (reg-x86-64.o): Likewise.
11208 (reg-x86-64.c): Likewise.
11209 (reg-x86-64-linux.o): Likewise.
11210 (reg-x86-64-linux.c): Likewise.
11212 (i386.c): Likewise.
11213 (i386-linux.o): Likewise.
11214 (i386-linux.c): Likewise.
11215 (amd64.o): Likewise.
11216 (amd64.c): Likewise.
11217 (amd64-linux.o): Likewise.
11218 (amd64-linux.c): Likewise.
11220 * configure.srv (srv_i386_regobj): New.
11221 (srv_i386_linux_regobj): Likewise.
11222 (srv_amd64_regobj): Likewise.
11223 (srv_amd64_linux_regobj): Likewise.
11224 (srv_i386_32bit_xmlfiles): Likewise.
11225 (srv_i386_64bit_xmlfiles): Likewise.
11226 (srv_i386_xmlfiles): Likewise.
11227 (srv_amd64_xmlfiles): Likewise.
11228 (srv_i386_linux_xmlfiles): Likewise.
11229 (srv_amd64_linux_xmlfiles): Likewise.
11230 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11231 srv_xmlfiles to $srv_i386_xmlfiles.
11232 (i[34567]86-*-mingw32ce*): Likewise.
11233 (i[34567]86-*-mingw*): Likewise.
11234 (i[34567]86-*-nto*): Likewise.
11235 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11236 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11237 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11238 (x86_64-*-linux*): Likewise.
11240 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11241 (init_registers_amd64_linux): New.
11242 (x86_arch_setup): Replace init_registers_x86_64_linux with
11243 init_registers_amd64_linux.
11245 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11247 * configure.ac: Check for libdl. If it is not available link against
11248 static libthread_db.
11249 * configure: Regenerate.
11251 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11255 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11256 handing a read watchpoint.
11257 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11259 2010-02-12 Doug Evans <dje@google.com>
11261 * linux-low.c (linux_supports_tracefork_flag): Document.
11262 (linux_look_up_symbols): Add comment.
11264 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11266 * regcache.c (supply_register): Clear regcache if buf is NULL.
11268 2010-02-02 Nicolas Roche <roche@sourceware.org>
11269 Joel Brobecker <brobecker@adacore.com>
11271 * inferiors.c (find_inferior): Add function documentation.
11272 (unloaded_dll): Handle the case where the unloaded dll has not
11273 been previously registered in the dll list.
11275 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11277 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11278 (thumb2_breakpoint): New.
11279 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11281 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11283 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11284 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11287 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11289 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11291 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11293 * linux-s390-low.c (s390_collect_ptrace_register)
11294 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11296 2010-01-21 Doug Evans <dje@google.com>
11298 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11299 (PTRACE_ARG4_TYPE): New macro.
11300 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11301 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11302 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11303 (usr_store_inferior_registers): Ditto.
11304 (linux_read_memory, linux_write_memory): Ditto.
11305 (linux_test_for_tracefork): Ditto.
11307 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11308 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11310 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11312 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11315 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11317 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11318 prototype to take a regcache. Adjust.
11320 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11322 * regcache.h (struct thread_info): Forward declare.
11323 (struct regcache): New.
11324 (new_register_cache): Adjust prototype.
11325 (get_thread_regcache): Declare.
11326 (free_register_cache): Adjust prototype.
11327 (registers_to_string, registers_from_string): Ditto.
11328 (supply_register, supply_register_by_name, collect_register)
11329 (collect_register_as_string, collect_register_by_name): Ditto.
11330 * regcache.c (struct inferior_regcache_data): Delete.
11331 (get_regcache): Rename to ...
11332 (get_thread_regcache): ... this. Adjust. Switch inferior before
11333 fetching registers.
11334 (regcache_invalidate_one): Adjust.
11335 (regcache_invalidate): Fix prototype.
11336 (new_register_cache): Return the new register cache.
11337 (free_register_cache): Change prototype.
11338 (realloc_register_cache): Adjust.
11339 (registers_to_string): Change prototype to take a regcache. Adjust.
11340 (registers_from_string): Ditto.
11341 (register_data): Ditto.
11342 (supply_register): Ditto.
11343 (supply_register_by_name): Ditto.
11344 (collect_register): Ditto.
11345 (collect_register_as_string): Ditto.
11346 (collect_register_by_name): Ditto.
11347 * server.c (process_serial_event): Adjust.
11348 * linux-low.h (regset_fill_func, regset_store_func): Change
11350 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11352 * linux-low.c (get_stop_pc): Adjust.
11353 (check_removed_breakpoint): Adjust.
11354 (linux_wait_for_event): Adjust.
11355 (linux_resume_one_lwp): Adjust.
11356 (fetch_register): Add regcache parameter. Adjust.
11357 (usr_store_inferior_registers): Ditto.
11358 (regsets_fetch_inferior_registers): Ditto.
11359 (regsets_store_inferior_registers): Ditto.
11360 (linux_fetch_registers, linux_store_registers): Ditto.
11361 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11363 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11365 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11366 prototype to take a regcache.
11367 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11368 * remote-utils.c (convert_ascii_to_int, outreg)
11369 (prepare_resume_reply): Change prototype to take a regcache.
11371 * target.h (struct target_ops) <fetch_registers, store_registers>:
11372 Change prototype to take a regcache.
11373 (fetch_inferior_registers, store_inferior_registers): Change
11374 prototype to take a regcache. Adjust.
11375 * proc-service.c (ps_lgetregs): Adjust.
11376 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11377 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11378 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11379 take a regcache. Adjust.
11380 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11381 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11382 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11383 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11384 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11385 (cris_cannot_fetch_register):
11386 (cris_breakpoint_at): Change prototype to take a regcache.
11388 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11389 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11390 to take a regcache. Adjust.
11391 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11393 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11394 take a regcache. Adjust.
11395 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11396 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11397 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11398 * linux-mips-low.c (mips_get_pc):
11399 (mips_set_pc): Change prototype to take a regcache. Adjust.
11400 (mips_reinsert_addr): Adjust.
11401 (mips_collect_register): Change prototype to take a regcache.
11403 (mips_supply_register):
11404 (mips_collect_register_32bit, mips_supply_register_32bit)
11405 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11406 (mips_store_fpregset): Ditto.
11407 * linux-ppc-low.c (ppc_supply_ptrace_register)
11408 (ppc_supply_ptrace_register): Ditto.
11409 (parse_spufs_run): Adjust.
11410 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11411 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11412 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11413 take a regcache. Adjust.
11414 * linux-s390-low.c (s390_collect_ptrace_register)
11415 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11416 (s390_set_pc): Change prototype to take a regcache. Adjust.
11417 (s390_arch_setup): Adjust.
11418 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11419 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11420 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11421 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11422 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11424 (sparc_breakpoint_at): Adjust.
11425 * linux-xtensa-low.c (xtensa_fill_gregset):
11426 (xtensa_store_gregset):
11427 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11428 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11429 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11430 prototype to take a regcache. Adjust.
11431 * win32-arm-low.c (arm_fetch_inferior_register)
11432 (arm_store_inferior_register): Change prototype to take a
11434 * win32-i386-low.c (i386_fetch_inferior_register)
11435 (i386_store_inferior_register): Change prototype to take a
11437 * win32-low.c (child_fetch_inferior_registers)
11438 (child_store_inferior_registers): Change prototype to take a
11440 (win32_wait): Adjust.
11441 (win32_fetch_inferior_registers): Change prototype to take a
11443 (win32_store_inferior_registers): Adjust.
11444 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11445 store_inferior_register>: Change prototype to take a regcache.
11447 2010-01-20 Doug Evans <dje@google.com>
11449 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11451 (linux_wait_for_event1, linux_init_signals): Ditto.
11452 (W_STOPCODE): Provide definition if missing.
11454 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11456 * linux-low.c (linux_core_of_thread): New.
11457 (compare_ints, show_process, list_threads): New.
11458 (linux_qxfer_osdata): Report threads and cores.
11459 (linux_target_op): Register linux_core_of_thread.
11460 * remote-utils.c (prepare_resume_reply): Report the core.
11461 (buffer_xml_printf): Support %d specifier.
11462 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11464 (handle_query): Handle qXfer:threads. Announce availability
11466 * target.h (struct target_ops): New field core_of_thread.
11468 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11470 * Makefile.in (clean): Remove new generated files.
11471 (reg-s390.o, reg-s390.c): Remove rules.
11472 (reg-s390x.o, reg-s390x.c): Likewise.
11473 (s390-linux32.o, s390-linux32.c): Add rules.
11474 (s390-linux64.o, s390-linux64.c): Likewise.
11475 (s390x-linux64.o, s390x-linux64.c): Likewise.
11476 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11477 * linux-s390-low.c: Include <elf.h>.
11478 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11479 (init_registers_s390): Remove prototype.
11480 (init_registers_s390x): Likewise.
11481 (init_registers_s390_linux32): Add prototype.
11482 (init_registers_s390_linux64): Likewise.
11483 (init_registers_s390x_linux64): Likewise.
11484 (s390_num_regs_3264): New define.
11485 (s390_regmap_3264): New global variable.
11486 (s390_cannot_fetch_register): Remove obsolete check.
11487 (s390_cannot_store_register): Likewise.
11488 (s390_collect_ptrace_register): Handle upper/lower register halves.
11489 (s390_supply_ptrace_register): Likewise.
11490 (s390_fill_gregset): Update to register number changes.
11491 (s390_get_hwcap): New routine.
11492 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11493 Install appropriate regmap and register set.
11495 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11497 * server.c (gdbserver_version): Update copyright year to 2010.
11498 * gdbreplay.c (gdbreplay_version): Likewise.
11500 2009-12-28 Doug Evans <dje@google.com>
11502 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11503 elf/external.h. Include <elf.h> instead but only if necessary.
11505 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11507 * linux-low.c (linux_remove_process): Remove `detaching'
11508 parameter. Don't release/detach from thread_db here.
11509 (linux_kill): Release/detach from thread_db here, ...
11510 (linux_detach): ... and here, before actually detaching.
11511 (linux_wait_1): ... and here, when a process exits.
11512 * thread-db.c (any_thread_of): New.
11513 (thread_db_free): Switch the current inferior to a thread of the
11516 2009-12-21 Doug Evans <dje@google.com>
11518 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11520 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11521 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11522 warning ifndef __NR_tkill. Move setting of errno there too.
11523 Delete unnecessary resetting of errno after syscall.
11524 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11526 * configure.ac: Check for dladdr.
11527 * config.in: Regenerate.
11528 * configure: Regenerate.
11529 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11530 (try_thread_db_load): Update.
11532 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11534 2009-12-18 Doug Evans <dje@google.com>
11536 * event-loop.c: Include unistd.h if it exists.
11538 * linux-low.c (my_waitpid): Move definition away from being in
11539 between linux_tracefork_child/linux_test_for_tracefork.
11541 * gdb_proc_service.h (psaddr_t): Fix type.
11542 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11543 signature to match glibc.
11545 2009-12-16 Doug Evans <dje@google.com>
11547 * linux-low.c (linux_read_memory): Fix argument to read.
11549 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11551 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11552 events, don't leave current_inferior pointing at null.
11554 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11556 * win32-low.c (LOG): Delete.
11557 (OUTMSG): Output to stderr.
11558 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11559 on compile time LOG macro.
11560 (win32_wait): Fix debug output.
11562 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11564 * win32-low.c (win32_add_one_solib): If the dll name is
11565 "ntdll.dll", prepend the system directory to the dll path.
11567 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11569 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11571 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11572 Vladimir Prus <vladimir@codesourcery.com>
11574 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11575 * configure.ac: Check for __mcoldfire__ and set
11576 gdb_cv_m68k_is_coldfire.
11577 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11578 reg-cf.o and reg-m68k.o.
11579 * configure: Regenerated.
11581 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11583 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11584 Pass it to thread_db_free.
11585 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11586 proper `detaching' argument to linux_remove_process.
11587 * linux-low.h (thread_db_free): Add `detaching' parameter.
11588 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11590 (thread_db_free): Add `detaching' parameter. Only
11591 call td_ta_clear_event if detaching from process.
11593 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11595 * thread-db.c (thread_db_free): Fix typo.
11597 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11600 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11602 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11604 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11605 with an i686 compiler.
11606 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11608 * configure: Rebuilt.
11610 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11614 * server.c (handle_search_memory_1): Correct read_addr initialization
11615 in loop for searching subsequent chunks.
11617 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11619 * configure.ac: New --with-libthread-db option.
11620 * thread-db.c: Allow direct dependence on libthread_db.
11621 (thread_db_free): Adjust.
11622 * config.in: Regenerate.
11623 * configure: Likewise.
11625 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11628 * thread-db.c (attach_thread): New function.
11629 (maybe_attach_thread): Return success/failure.
11630 (find_new_threads_callback): Adjust.
11631 (thread_db_find_new_threads): Loop until no new threads.
11633 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11635 * proc-service.c (ps_lgetregs): Formatting.
11637 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11639 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11640 * configure.ac: Adjust.
11641 * linux-low.h (struct process_info_private): Move members to struct
11643 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11644 * linux-low.c (linux_remove_process): Adjust.
11645 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11646 * server.c (handle_query): Move code ...
11647 (handle_monitor_command): ... here. New function.
11648 * target.h (struct target_ops): New member.
11649 * thread-db.c (struct thread_db): New.
11650 (libthread_db_search_path): New variable.
11651 (thread_db_create_event, thread_db_enable_reporting)
11652 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11653 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11654 (try_thread_db_load_1, dladdr_to_soname): New functions.
11655 (try_thread_db_load, thread_db_load_search): New functions.
11656 (thread_db_init): Search for libthread_db.
11657 (thread_db_free): New function.
11658 (thread_db_handle_monitor_command): Likewise.
11659 * config.in: Regenerate.
11660 * configure: Regenerate.
11662 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11664 * spu-low.c (spu_kill): Wait for inferior to terminate.
11665 Call clear_inferiors.
11666 (spu_detach): Call clear_inferiors.
11668 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11670 * aclocal.m4: Regenerate.
11671 * config.in: Likewise.
11672 * configure: Likewise.
11674 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11676 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11677 (parse_spufs_run): New function.
11678 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11679 (ppc_breakpoint_at): Handle SPU breakpoints.
11681 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11683 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11684 (SPUFS_MAGIC): Define.
11685 (spu_enumerate_spu_ids): New function.
11686 (linux_qxfer_spu): New function.
11687 (linux_target_ops): Install linux_qxfer_spu.
11689 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11691 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11692 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11693 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11694 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11695 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11696 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11697 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11698 (init_registers_powerpc_cell32l): Add prototype.
11699 (init_registers_powerpc_cell64l): Likewise.
11700 (ppc_arch_setup): Detect Cell/B.E. architecture.
11702 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11704 * Makefile.in (datarootdir): New variable.
11706 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11708 * linux-low.c (linux_write_memory): Update debugging output.
11709 * Makefile.in (clean): Add new descriptions.
11710 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11711 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11712 * configure.srv: Add new files for arm*-*-linux*.
11713 * linux-arm-low.c: Add new declarations.
11714 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11715 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11716 (HWCAP_VFPv3D16): New.
11717 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11718 instead of __IWMMXT__.
11719 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11720 (arm_arch_setup): New.
11721 (target_regsets): Remove #ifdef. Add VFP regset.
11722 (the_low_target): Use arm_arch_setup.
11724 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11726 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11727 the main thread again.
11729 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11731 Adding Neutrino gdbserver.
11732 * configure: Regenerated.
11733 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11734 * configure.srv (i[34567]86-*-nto*): New target.
11735 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11736 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11737 (nto_comctrl) [__QNX__]: New function.
11738 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11740 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11742 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11745 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11746 Pedro Alves <pedro@codesourcery.com>
11748 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11749 don't support CONTEXT_EXTENDED_REGISTERS.
11750 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11751 (the_low_target): Install them.
11752 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11753 failing with ERROR_PIPE_NOT_CONNECTED.
11755 2009-06-30 Doug Evans <dje@google.com>
11756 Pierre Muller <muller@ics.u-strasbg.fr>
11758 Add h/w watchpoint support to x86-linux, win32-i386.
11759 * Makefile.in (SFILES): Add i386-low.c
11760 (i386_low_h): Define.
11761 (i386-low.o): Add dependencies.
11762 (linux-x86-low.o): Add i386-low.h dependency.
11763 (win32-i386-low.o): Ditto.
11764 * i386-low.c: New file.
11765 * i386-low.h: New file.
11766 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11767 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11768 * linux-low.c (linux_add_process): Initialize arch_private.
11769 (linux_remove_process): Free arch_private.
11770 (add_lwp): Initialize arch_private.
11771 (delete_lwp): Free arch_private.
11772 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11774 * linux-low.h (process_info_private): New member arch_private.
11775 (lwp_info): New member arch_private.
11776 (linux_target_ops): New members new_process, new_thread,
11778 (ptid_of): New macro.
11779 * linux-x86-low.c: Include stddef.h, i386-low.h.
11780 (arch_process_info): New struct.
11781 (arch_lwp_info): New struct.
11782 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11783 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11784 (i386_dr_low_get_status): New function.
11785 (x86_insert_point, x86_remove_point): New functions.
11786 (x86_stopped_by_watchpoint): New function.
11787 (x86_stopped_data_address): New function.
11788 (x86_linux_new_process, x86_linux_new_thread): New functions.
11789 (x86_linux_prepare_to_resume): New function.
11790 (the_low_target): Add entries for insert_point, remove_point,
11791 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11793 * server.c (debug_hw_points): New global.
11794 (monitor_show_help): Document set debug-hw-points.
11795 (handle_query): Process "set debug-hw-points".
11796 * server.h (debug_hw_points): Declare.
11797 (paddress): Declare.
11798 * utils.c (NUMCELLS, CELLSIZE): New macros.
11799 (get_sell, xsnprintf, paddress): New functions.
11800 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11801 remove_point, stopped_by_watchpoint, stopped_data_address.
11802 * win32-i386-low.c: Include i386-low.h.
11803 (debug_reg_state): Replaces dr.
11804 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11805 (i386_dr_low_get_status): New function.
11806 (i386_insert_point, i386_remove_point): New functions.
11807 (i386_stopped_by_watchpoint): New function.
11808 (i386_stopped_data_address): New function.
11809 (i386_initial_stuff): Update.
11810 (get_thread_context,set_thread_context,i386_thread_added): Update.
11811 (the_low_target): Add entries for insert_point,
11812 remove_point, stopped_by_watchpoint, stopped_data_address.
11813 * win32-low.c (win32_insert_watchpoint): New function.
11814 (win32_remove_watchpoint): New function.
11815 (win32_stopped_by_watchpoint): New function.
11816 (win32_stopped_data_address): New function.
11817 (win32_target_ops): Add entries for insert_watchpoint,
11818 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11819 * win32-low.h (win32_target_ops): New members insert_point,
11820 remove_point, stopped_by_watchpoint, stopped_data_address.
11822 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11824 * server.c (process_serial_event): Re-return unsupported, not
11825 error, if the type isn't recognized. Re-allow supporting only
11826 insert or remove packets. Also call require_running for
11827 breakpoints. Add missing break statement to default case. Tidy.
11828 * target.h (struct target_ops): Rename insert_watchpoint to
11829 insert_point, and remove_watchpoint to remove_point.
11831 * linux-low.h (struct linux_target_ops): Likewise.
11832 * linux-low.c (linux_insert_watchpoint): Rename to ...
11833 (linux_insert_point): ... this. Adjust.
11834 (linux_remove_watchpoint): Rename to ...
11835 (linux_remove_point): ... this. Adjust.
11836 (linux_target_ops): Adjust.
11837 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11838 (cris_insert_point): ... this.
11839 (cris_remove_watchpoint): Rename to ...
11840 (cris_remove_point): ... this.
11841 (the_low_target): Adjust.
11843 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11845 * server.c (handle_v_kill): Pass signal_pid to
11846 kill_inferior if multi_process is zero.
11848 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11850 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11851 * target.h (target_ops): Comment for *_watchpoint to make it clear
11852 the functions can get types '0' and '1'.
11854 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11856 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11857 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11858 * regcache.c (get_regcache): Likewise.
11859 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11860 * win32-low.c (child_fetch_inferior_registers): Remove check for
11863 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11864 Pedro Alves <pedro@codesourcery.com>
11866 * target.h (struct target_ops) <supports_multi_process>: New
11868 (target_supports_multi_process): New.
11869 * server.c (handle_query): Even if GDB reports support, only
11870 enable multi-process if the target also supports it. Report
11871 multi-process support only if the target backend supports it.
11872 * linux-low.c (linux_supports_multi_process): New function.
11873 (linux_target_ops): Install it as target_supports_multi_process
11876 2009-05-24 Doug Evans <dje@google.com>
11878 Global renaming of find_thread_pid to find_thread_ptid.
11879 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11880 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11881 All callers updated.
11883 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11884 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11887 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11888 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11889 (linux_resume_one_lwp): Ditto.
11891 2009-05-23 Doug Evans <dje@google.com>
11893 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11894 from struct inferior_list_entry * to struct lwp_info *.
11895 All callers updated.
11897 2009-05-13 Doug Evans <dje@google.com>
11899 * linux-x86-low.c: Don't include assert.h.
11900 (x86_siginfo_fixup): Use fatal, not assert.
11901 (x86_arch_setup): Fix comment.
11903 2009-05-12 Doug Evans <dje@google.com>
11905 Biarch support for i386/amd64 gdbserver.
11906 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11907 Add linux-x86-low.c.
11908 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11909 (linux-x86-low.o): Add.
11910 * linux-x86-64-low.c: Delete.
11911 * linux-i386-low.c: Delete.
11912 * linux-x86-low.c: New file.
11913 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11915 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11917 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11918 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11919 (linux_child_pid_to_exec_file): New function.
11920 (elf_64_header_p, elf_64_file_p): New functions.
11921 (siginfo_fixup): New function.
11922 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11923 give target a chance to convert layout.
11924 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11925 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11927 2009-05-07 Doug Evans <dje@google.com>
11929 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11930 (regsets_store_inferior_registers): Ditto.
11932 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11936 * linux-low.c (must_set_ptrace_flags): Delete.
11937 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11939 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11940 `lwp->must_set_ptrace_flags' instead.
11941 (linux_wait_for_event_1): Set ptrace options here.
11942 (linux_wait_1): ... not here.
11944 2009-04-30 Doug Evans <dje@google.com>
11946 * inferiors.c (started_inferior_callback): New function.
11947 (attached_inferior_callback): New function.
11948 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11949 * server.c (print_started_pid, print_attached_pid): New functions.
11950 (detach_or_kill_for_exit): New function.
11951 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11952 * server.h (have_started_inferiors_p): Declare.
11953 (have_attached_inferiors_p): Declare.
11955 * inferiors.c (remove_process): Fix memory leak, free process.
11956 * linux-low.c (linux_remove_process): New function.
11957 (linux_kill): Call it instead of remove_process.
11958 (linux_detach, linux_wait_1): Ditto.
11960 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11962 * configure.srv: Add x86 Windows CE target.
11964 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11966 * inferiors.c (get_thread_process): Make global.
11967 * server.h (get_thread_process): Add prototype.
11968 * thread-db.c (find_one_thread): Use get_thread_process
11969 instead of current_process.
11970 (thread_db_get_tls_address): Do not crash if called when
11971 thread layer is not yet initialized.
11973 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11975 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11976 * spu-low.c (current_tid): Rename to ...
11977 (current_ptid): ... this.
11978 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11979 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11980 ptid_get_lwp (current_ptid) instead of current_tid.
11981 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11982 instead of current_tid. Use find_process_pid to verify pid
11983 argument is valid. Pass proper argument to remove_process.
11984 (spu_thread_alive): Compare current_ptid instead of current_tid.
11985 (spu_resume): Likewise.
11987 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11989 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11992 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11994 Implement the multiprocess extensions, and add linux multiprocess
11997 * server.h (ULONGEST): Declare.
11998 (struct ptid, ptid_t): New.
11999 (minus_one_ptid, null_ptid): Declare.
12000 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12001 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12002 (struct inferior_list_entry): Change `id' type from unsigned from
12004 (struct sym_cache, struct breakpoint, struct
12005 process_info_private): Forward declare.
12006 (struct process_info): Declare.
12007 (current_process): Declare.
12008 (all_processes): Declare.
12009 (initialize_inferiors): Declare.
12010 (add_thread): Adjust to use ptid_t.
12011 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12012 (add_process, remove_process, find_thread_pid): Declare.
12013 (find_inferior_id): Adjust to use ptid_t.
12014 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12015 (multi_process): Declare.
12016 (push_event): Adjust to use ptid_t.
12017 (read_ptid, write_ptid): Declare.
12018 (prepare_resume_reply): Adjust to use ptid_t.
12019 (clear_symbol_cache): Declare.
12020 * inferiors.c (all_processes): New.
12021 (null_ptid, minus_one_ptid): New.
12022 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12023 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12024 (add_thread): Change unsigned long to ptid. Remove gdb_id
12026 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12027 (gdb_id_to_thread): Rename to ...
12028 (find_thread_pid): ... this. Change unsigned long to ptid.
12029 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12030 (loaded_dll, pull_pid_from_list): Adjust.
12031 (add_process, remove_process, find_process_pid)
12032 (get_thread_process, current_process, initialize_inferiors): New.
12033 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12034 (struct target_waitstatus) <related_pid>: Ditto.
12035 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12036 return type to int.
12037 (struct target_ops) <join>: Add `pid' argument.
12038 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12039 (struct target_ops) <wait>: Add `ptid' field. Change return type
12041 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12042 (mywait): Add `ptid' argument. Change return type to ptid_t.
12043 (target_pid_to_str): Declare.
12044 * target.c (set_desired_inferior): Adjust to use ptids.
12045 (mywait): Add new `ptid' argument. Adjust.
12046 (target_pid_to_str): New.
12047 * mem-break.h (free_all_breakpoints): Declare.
12048 * mem-break.c (breakpoints): Delelete.
12049 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12050 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12051 to use per-process breakpoint list.
12052 (free_all_breakpoints): New.
12053 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12054 (symbol_cache, all_symbols_looked_up): Delete.
12056 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12058 (prepare_resume_reply): Change ptid argument's type from unsigned
12059 long to ptid_t. Adjust. Implement W;process and X;process.
12060 (free_sym_cache, clear_symbol_cache): New.
12061 (look_up_one_symbol): Adjust to per-process symbol cache. *
12062 * server.c (cont_thread, general_thread, step_thread): Change type
12064 (attached): Delete.
12065 (multi_process): New.
12066 (last_ptid): Change type to ptid_t.
12067 (struct vstop_notif) <ptid>: Change type to ptid_t.
12068 (queue_stop_reply, push_event): Change `ptid' argument's type to
12070 (discard_queued_stop_replies): Add `pid' argument.
12071 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12072 changes. Don't reference the `attached' global.
12073 (attach_inferior): Adjust to mywait interface changes.
12074 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12075 features. Handle and report "multiprocess+". Handle
12077 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12079 (handle_v_kill): New.
12080 (handle_v_stopped): Adjust to use target_pid_to_str.
12081 (handle_v_requests): Allow multiple attaches and runs when
12082 multiprocess extensions are in effect. Handle "vKill".
12083 (myresume): Adjust to use ptids.
12084 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12085 (handle_status): Adjust to discard_queued_stop_replies interface
12087 (first_thread_of, kill_inferior_callback)
12088 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12089 (main): Call initialize_inferiors. Adjust to use ptids, killing
12090 and detaching from all inferiors. Handle multiprocess packet
12092 * linux-low.h: Include gdb_proc_service.h.
12093 (struct process_info_private): New.
12094 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12095 <lwpid_of>: Use ptid_get_lwp.
12096 (get_lwp_thread): Adjust.
12097 (struct lwp_info): Add `dead' member.
12098 (find_lwp_pid): Declare.
12099 * linux-low.c (thread_db_active): Delete.
12100 (new_inferior): Adjust comment.
12101 (inferior_pid): Delete.
12102 (linux_add_process): New.
12103 (handle_extended_wait): Adjust.
12104 (add_lwp): Change unsigned long to ptid.
12105 (linux_create_inferior): Add process to processes table. Adjust
12106 to use ptids. Don't set new_inferior here.
12107 (linux_attach_lwp): Rename to ...
12108 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12109 it. Adjust to use ptids.
12110 (linux_attach_lwp): New.
12111 (linux_attach): Add process to processes table. Don't set
12113 (struct counter): New.
12114 (second_thread_of_pid_p, last_thread_of_process_p): New.
12115 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12116 multiple processes.
12117 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12118 processes. Remove process from process table.
12119 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12120 to multiple processes.
12121 (any_thread_of): New.
12122 (linux_detach): Add `pid' argument, and handle it. Remove process
12123 from processes table.
12124 (linux_join): Add `pid' argument. Handle it.
12125 (linux_thread_alive): Change unsighed long argument to ptid_t.
12126 Consider dead lwps as not being alive.
12127 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12128 threads we're not interested in.
12129 (same_lwp, find_lwp_pid): New.
12130 (linux_wait_for_lwp): Change `pid' argument's type from int to
12132 (linux_wait_for_event): Rename to ...
12133 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12134 from int to ptid_t. Adjust.
12135 (linux_wait_for_event): New.
12136 (linux_wait_1): Add `ptid' argument. Change return type to
12137 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12138 that exit from the process table.
12139 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12141 (mark_lwp_dead): New.
12142 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12143 stopping all threads, mark its main lwp as dead.
12144 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12146 (fetch_register, usr_store_inferior_registers)
12147 (regsets_fetch_inferior_registers)
12148 (regsets_store_inferior_registers, linux_read_memory)
12149 (linux_write_memory): Inline `inferior_pid'.
12150 (linux_look_up_symbols): Adjust to use per-process
12151 `thread_db_active'.
12152 (linux_request_interrupt): Adjust to use ptids.
12153 (linux_read_auxv): Inline `inferior_pid'.
12154 (initialize_low): Don't reference thread_db_active.
12155 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12156 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12157 (ps_getpid): Return the pid of the current inferior.
12158 * thread-db.c (proc_handle, thread_agent): Delete.
12159 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12161 (find_one_thread): Change argument type to ptid_t. Adjust to
12163 (maybe_attach_thread): Adjust to per-process data and ptids.
12164 (thread_db_find_new_threads): Ditto.
12165 (thread_db_init): Ditto.
12166 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12167 processes table. Adjust to use ptids.
12168 (spu_kill, spu_detach): Adjust interface. Remove process from
12170 (spu_join, spu_thread_alive): Adjust interface.
12171 (spu_wait): Adjust interface. Remove process from processes
12172 table. Adjust to use ptids.
12173 * win32-low.c (current_inferior_tid): Delete.
12174 (current_inferior_ptid): New.
12175 (debug_event_ptid): New.
12176 (thread_rec): Take a ptid. Adjust.
12177 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12178 (child_delete_thread): Ditto.
12179 (do_initial_child_stuff): Add `attached' argument. Add process to
12181 (child_fetch_inferior_registers, child_store_inferior_registers):
12183 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12184 (win32_attach): Pass 1 to do_initial_child_stuff.
12185 (win32_kill): Adjust interface. Remove process from processes
12187 (win32_detach): Ditto.
12188 (win32_join): Adjust interface.
12189 (win32_thread_alive): Take a ptid.
12190 (win32_resume): Adjust to use ptids.
12191 (get_child_debug_event): Ditto.
12192 (win32_wait): Adjust interface. Remove exiting process from
12195 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12197 Non-stop mode support.
12199 * server.h (non_stop): Declare.
12200 (gdb_client_data, handler_func): Declare.
12201 (delete_file_handler, add_file_handler, start_event_loop):
12203 (handle_serial_event, handle_target_event, push_event)
12204 (putpkt_notif): Declare.
12205 * target.h (enum resume_kind): New.
12206 (struct thread_resume): Replace `step' field by `kind' field.
12207 (TARGET_WNOHANG): Define.
12208 (struct target_ops) <wait>: Add `options' argument.
12209 <supports_non_stop, async, start_non_stop>: New fields.
12210 (target_supports_non_stop, target_async): New.
12211 (start_non_stop): Declare.
12212 (mywait): Add `options' argument.
12213 * target.c (mywait): Add `options' argument. Print child exit
12214 notifications here.
12215 (start_non_stop): New.
12216 * server.c (non_stop, own_buf, mem_buf): New globals.
12217 (struct vstop_notif): New.
12218 (notif_queue): New global.
12219 (queue_stop_reply, push_event, discard_queued_stop_replies)
12220 (send_next_stop_reply): New.
12221 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12223 (attach_inferior): In non-stop mode, don't wait for the target
12225 (handle_general_set): Handle QNonStop.
12226 (handle_query): When handling qC, return the current general
12227 thread, instead of the first thread of the list.
12228 (handle_query): If the backend supports non-stop mode, include
12229 QNonStop+ in the qSupported query response.
12230 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12232 (handle_v_attach, handle_v_run): Handle non-stop mode.
12233 (handle_v_stopped): New.
12234 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12235 (myresume): Adjust to use resume_kind. Handle non-stop.
12236 (queue_stop_reply_callback): New.
12237 (handle_status): Handle non-stop mode.
12238 (main): Clear non_stop flag on reconnection. Use the event-loop.
12239 Refactor serial protocol handling from here ...
12240 (process_serial_event): ... to this new function. When GDB
12241 selects any thread, select one here. In non-stop mode, wait until
12242 GDB acks all pending events before exiting.
12243 (handle_serial_event, handle_target_event): New.
12244 * remote-utils.c (remote_open): Install remote_desc in the event
12246 (remote_close): Remove remote_desc from the event loop.
12247 (putpkt_binary): Rename to...
12248 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12249 (putpkt_binary): New as wrapper around putpkt_binary_1.
12250 (putpkt_notif): New.
12251 (prepare_resume_reply): In non-stop mode, don't change the
12253 * event-loop.c: New.
12254 * Makefile.in (OBJ): Add event-loop.o.
12255 (event-loop.o): New rule.
12257 * linux-low.h (pid_of): Moved here.
12259 (get_lwp_thread): Use lwpid_of.
12260 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12261 * linux-low.c (pid_of): Delete.
12262 (inferior_pid): Use lwpid_of.
12263 (linux_event_pipe): New.
12264 (target_is_async_p): New.
12266 (handle_extended_wait): Use lwpid_of.
12267 (add_lwp): Don't set lwpid field.
12268 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12269 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12270 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12271 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12272 first. Adjust to linux_wait_for_event interface changes. Use
12274 (linux_detach): Don't delete the main lwp here.
12275 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12276 (status_pending_p): Don't consider explicitly suspended lwps.
12277 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12278 pointer. Add OPTIONS argument. Change return type to int. Use
12279 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12280 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12281 pointer. Add status pointer argument. Return a pid instead of a
12282 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12283 changes. In non-stop mode, don't switch to a random thread.
12284 (linux_wait): Rename to...
12285 (linux_wait_1): ... this. Add target_options argument, and handle
12286 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12287 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12288 clean exit and signal exit code. Don't stop all threads in
12289 non-stop mode. In all-stop mode, only stop all threads when
12290 reporting a stop to GDB. Handle explicit thread stop requests.
12291 (async_file_flush, async_file_mark): New.
12293 (send_sigstop): Use lwpid_of.
12294 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12295 interface changes. In non-stop mode, don't switch to a random
12297 (linux_resume_one_lwp): Use lwpid_of.
12298 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12299 (linux_resume_one_thread): ... this. Handle resume_stop. In
12300 non-stop mode, don't look for pending flag in all threads.
12301 (resume_status_pending_p): Don't consider explicitly suspended
12303 (my_waitpid): Reimplement. Emulate __WALL.
12304 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12306 (sigchld_handler, linux_supports_non_stop, linux_async)
12307 (linux_start_non_stop): New.
12308 (linux_target_ops): Register linux_supports_non_stop, linux_async
12309 and linux_start_non_stop.
12310 (initialize_low): Install SIGCHLD handler.
12311 * thread-db.c (thread_db_create_event, find_one_thread)
12312 (thread_db_get_tls_address): Use lwpid_of.
12313 * win32-low.c (win32_detach): Adjust to use resume_kind.
12314 (win32_wait): Add `options' argument.
12315 * spu-low.c (spu_resume): Adjust to use resume_kind.
12316 (spu_wait): Add `options' argument.
12318 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12320 Decouple target code from remote protocol.
12322 * target.h (enum target_waitkind): New.
12323 (struct target_waitstatus): New.
12324 (struct target_ops) <wait>: Return an unsigned long. Take a
12325 target_waitstatus pointer instead of a char pointer.
12326 (mywait): Likewise.
12327 * target.c (mywait): Change prototype to return an unsigned long.
12328 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12329 * server.h (thread_from_wait, old_thread_from_wait): Delete
12331 (prepare_resume_reply): Change prototype to take a
12333 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12334 (last_status, last_ptid): New.
12335 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12336 pid instead of a signal.
12337 (attach_inferior): Remove "status" and "signal" parameters.
12339 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12341 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12342 (handle_v_requests, myresume): Remove "status" and "signal"
12343 parameters. Adjust.
12344 (handle_status): New.
12345 (main): Delete local `status'. Adjust.
12346 * remote-utils.c: Include target.h.
12347 (prepare_resume_reply): Change prototype to take a
12348 target_waitstatus. Adjust.
12350 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12352 * spu-low.c (spu_wait): Adjust.
12353 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12355 (win32_wait): Adjust.
12357 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12359 * target.h (struct thread_resume): Delete leave_stopped member.
12360 (struct target_ops): Add a `n' argument to the `resume' callback.
12361 * server.c (start_inferior): Adjust.
12362 (handle_v_cont, myresume): Adjust.
12363 * linux-low.c (check_removed_breakpoint): Adjust to resume
12364 interface change, and to removed leave_stopped field.
12365 (resume_ptr): Delete.
12366 (struct thread_resume_array): New.
12367 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12368 resume interface change.
12369 (linux_continue_one_thread, linux_queue_one_thread)
12370 (resume_status_pending_p): Check if the resume field is NULL
12371 instead of checking the leave_stopped member.
12372 (linux_resume): Adjust to the target resume interface change.
12373 * spu-low.c (spu_resume): Adjust to the target resume interface
12375 * win32-low.c (win32_detach, win32_resume): Ditto.
12377 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12379 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12381 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12383 (linux_continue_one_thread): Only preserve the stepping flag if
12384 there's a pending breakpoint.
12386 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12388 * server.c (main): After the inferior having exited, call
12389 remote_close before exiting gdbserver.
12391 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12393 Fix size of FPSCR in Power 7 processors.
12394 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12395 (PPC_FEATURE_HAS_DFP): New #define.
12396 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12399 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12401 * server.c (handle_query) Whitespace and formatting.
12403 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12405 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12406 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12407 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12408 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12409 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12410 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12411 Makefile.in, configure.ac: Fix whitespace throughout.
12412 * configure: Regenerate.
12414 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12416 * inferiors.c (find_inferior): Make it safe for the callback
12417 function to delete the currently iterated inferior.
12419 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12421 * Makefile.in (linuw_low_h): Move higher.
12422 (thread-db.o): Depend on $(linux_low_h).
12424 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12426 Rename "process" to "lwp" throughout.
12428 * linux-low.c (all_processes): Rename to...
12429 (all_lwps): ... this.
12430 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12431 (add_process): Rename to ...
12432 (add_lwp): ... this. Adjust.
12433 (linux_create_inferior): Adjust.
12434 (linux_attach_lwp): Adjust.
12435 (linux_attach): Adjust.
12436 (linux_kill_one_process): Rename to ...
12437 (linux_kill_one_lwp): ... this. Adjust.
12438 (linux_kill): Adjust.
12439 (linux_detach_one_process): Rename to ...
12440 (linux_detach_one_lwp): ... this. Adjust.
12441 (linux_detach): Adjust.
12442 (check_removed_breakpoint): Adjust.
12443 (status_pending_p): Adjust.
12444 (linux_wait_for_process): Rename to ...
12445 (linux_wait_for_lwp): ... this. Adjust.
12446 (linux_wait_for_event): Adjust.
12447 (send_sigstop): Adjust.
12448 (wait_for_sigstop): Adjust.
12449 (stop_all_processes): Rename to ...
12450 (stop_all_lwps): ... this.
12451 (linux_resume_one_process): Rename to ...
12452 (linux_resume_one_lwp): ... this. Adjust.
12453 (linux_set_resume_request, linux_continue_one_thread)
12454 (linux_queue_one_thread, resume_status_pending_p)
12455 (usr_store_inferior_registers, regsets_store_inferior_registers)
12456 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12458 * linux-low.h (get_process): Rename to ...
12459 (get_lwp): ... this. Adjust.
12460 (get_thread_process): Rename to ...
12461 (get_thread_lwp): ... this. Adjust.
12462 (get_process_thread): Rename to ...
12463 (get_lwp_thread): ... this. Adjust.
12464 (struct process_info): Rename to ...
12465 (struct lwp_info): ... this.
12466 (all_processes): Rename to ...
12467 (all_lwps): ... this.
12468 * proc-service.c (ps_lgetregs): Adjust.
12469 * thread-db.c (thread_db_create_event, find_one_thread)
12470 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12472 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12474 * server.c (handle_query): Handle "qAttached".
12476 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12478 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12479 GPLv3, update license URL.
12481 2009-03-01 Doug Evans <dje@google.com>
12483 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12484 (server_h): Add gdb_signals.h.
12485 (signals.o): Update.
12486 * server.h (target_signal_from_host,target_signal_to_host_p)
12487 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12489 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12491 * remote-utils.c (getpkt): Also generate remote-debug
12492 information if noack_mode is set.
12494 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12496 * server.c (handle_query): Report qXfer:siginfo:read and
12497 qXfer:siginfo:write as supported and handle them.
12498 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12499 * linux-low.c (linux_xfer_siginfo): New.
12500 (linux_target_ops): Set it.
12502 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12504 * server.c (gdbserver_usage): Mention --remote-debug.
12505 (main): Accept '--remote-debug' switch.
12507 2009-01-18 Doug Evans <dje@google.com>
12509 * regcache.c (new_register_cache): No need to check result of xcalloc.
12510 * server.c (handle_search_memory): Back out calls to xmalloc,
12511 result is checked and error is returned to user upon failure.
12512 (handle_query): Ditto. Add more checks for result of malloc.
12513 (handle_v_cont): Check result of malloc, report error back to
12515 (handle_v_run): Ditto. Call freeargv.
12516 * server.h (freeargv): Declare.
12517 * utils.c (freeargv): New fn.
12519 2009-01-15 Doug Evans <dje@google.com>
12521 * gdbreplay.c (perror_with_name): Make arg const char *.
12522 * server.h (target_signal_to_name): Make return type const char *.
12523 * thread-db.c (thread_db_err_str): Make return type const char *.
12524 * utils.c (perror_with_name): Make arg const char *.
12526 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12528 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12529 when handling a EXIT_PROCESS_DEBUG_EVENT.
12531 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12533 * gdbreplay.c (gdbreplay_version): Update copyright year.
12534 * server.c (gdbserver_version): Likewise.
12536 2009-01-05 Doug Evans <dje@google.com>
12538 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12539 (handle_extended_wait): Improve comment.
12541 2008-12-13 Doug Evans <dje@google.com>
12543 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12544 * server.h (ATTR_MALLOC): New macro.
12545 (xmalloc,xcalloc,xstrdup): Declare.
12546 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12547 * inferiors.c: Ditto.
12548 * linux-low.c: Ditto.
12549 * mem-break.c: Ditto.
12550 * regcache.c: Ditto.
12551 * remote-utils.c: Ditto.
12554 * win32-low.c: Ditto.
12556 2008-12-12 Doug Evans <dje@google.com>
12558 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12559 in debugging printf.
12561 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12563 2008-12-09 Doug Evans <dje@google.com>
12565 * linux-low.h (struct process_info): Delete member tid, unused.
12566 * thread-db.c (find_one_thread): Update.
12567 (maybe_attach_thread): Update.
12569 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12571 * target.h (struct target_ops): Add qxfer_osdata member.
12572 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12574 (linux_qxfer_osdata): New functions.
12575 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12577 * server.c (handle_query): Handle "qXfer:osdata:read:".
12578 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12579 (buffer_xml_printf): New functions.
12580 * server.h (struct buffer): New.
12581 (buffer_grow_str, buffer_grow_str0): New macros.
12582 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12583 (buffer_xml_printf): Declare.
12585 2008-11-24 Doug Evans <dje@google.com>
12587 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12589 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12591 * server.c (handle_v_run): Always use the supplied argument list.
12593 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12595 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12596 (xtensa_regmap_table): Add entry for scompare1.
12598 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12600 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12601 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12602 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12603 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12604 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12605 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12606 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12607 XML target descriptions.
12608 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12609 when inferior is running on an ISA 2.05 or later processor. Add
12610 special case to return offset for full 64-bit slot of FPSCR when
12613 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12615 * Makefile.in (SFILES, clean): Added sparc64 files.
12616 (reg-sparc64.o, reg-sparc64.c): New.
12617 * configure.srv (sparc*-*-linux*): New configuration.
12618 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12619 syscall arguments for SPARC.
12620 (regsets_store_inferior_registers): Likewise.
12621 * linux-sparc-low.c: New file.
12623 2008-10-21 Doug Evans <dje@google.com>
12625 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12626 (READLINE_DIR,READLINE_DEP): Delete.
12627 (INTERNAL_CFLAGS): Update.
12628 (LINTFLAGS): Update.
12630 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12632 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12633 whole argv from the last run, not just argv[0].
12635 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12637 * regcache.c (new_register_cache): Return NULL if the register
12638 cache size isn't known yet.
12639 (free_register_cache): Avoid dereferencing a NULL regcache.
12641 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12643 * configure.srv: Merge MIPS and MIPS64.
12645 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12647 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12649 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12651 * Makefile.in: Add required vsx dependencies.
12653 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12654 Declare init_registers_powerpc_vsx32l.
12655 Declare init_registers_powerpc_vsx64l.
12656 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12657 (ppc_arch_setup): Check for VSX in hwcap.
12658 (ppc_fill_vsxregset): New function.
12659 (ppc_store_vsxregset): New function.
12660 Add new VSX entry in regset_info target_regsets.
12662 * configure.srv: Add new VSX dependencies.
12664 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12666 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12667 (remote_open): Set or clear transport_is_reliable.
12668 (putpkt_binary): Don't expect acks in noack mode.
12669 (getpkt): Don't send ack/nac in noack mode.
12670 * server.c (handle_general_set): Handle QStartNoAckMode.
12671 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12673 (main): Reset noack_mode on every connection.
12674 * server.h (noack_mode): Declare.
12676 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12678 * Makefile.in (GDBREPLAY_OBS): New variable.
12679 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12681 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12682 Daniel Jacobowitz <dan@codesourcery.com>
12684 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12685 (usr_store_inferior_registers): Likewise.
12686 (regsets_store_inferior_registers): Likewise.
12688 2008-07-31 Rolf Jansen <rj@surtec.com>
12689 Pedro Alves <pedro@codesourcery.com>
12691 * configure.ac: Check for memmem declaration.
12692 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12693 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12694 (disable_packet_qfThreadInfo): Unconditionally compile.
12695 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12696 * configure, config.in: Regenerate.
12698 2008-07-28 Doug Kwan <dougkwan@google.com>
12700 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12701 (linux_write_memory): Remove declaration of errno.
12703 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12705 * linux-low.c (handle_extended_wait): Do not use "status"
12706 variable uninitialized.
12708 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12710 * server.c (handle_v_attach): Inhibit reporting dll changes.
12712 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12714 * remote-utils.c (prepare_resume_reply): If requested, don't
12715 output "thread:TID" in the T stop reply.
12717 * server.c (disable_packet_vCont, disable_packet_Tthread)
12718 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12719 (handle_query): If requested, disable support for qC, qfThreadInfo
12721 (handle_v_requests): If requested, disable support for vCont.
12722 (gdbserver_show_disableable): New.
12723 (main): Handle --disable-packet and --disable-packet=LIST.
12725 * server.h (disable_packet_vCont, disable_packet_Tthread)
12726 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12728 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12730 * server.c (gdbserver_usage): Mention --version.
12732 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12734 * Makefile.in (gdbreplay.o): New rule.
12736 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12738 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12739 message, not gdbserver.
12741 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12742 Nathan Sidwell <nathan@codesourcery.com>
12743 Joseph Myers <joseph@codesourcery.com>
12745 * acinclude.m4: Include ../../config/acx.m4.
12746 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12747 * configure, config.in: Regenerate.
12748 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12749 * server.c (gdbserver_version): Print PKGVERSION.
12750 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12751 (main): Adjust gdbserver_usage calls.
12752 * gdbreplay.c (version, host_name): Add declarations.
12753 (gdbreplay_version, gdbreplay_usage): New.
12754 (main): Accept --version and --help options.
12756 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12758 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12759 (arm_breakpoint_at): Handle Thumb.
12760 (the_low_target): Add comment.
12762 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12764 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12766 2008-05-09 Doug Evans <dje@google.com>
12768 * server.h (decode_search_memory_packet): Declare.
12769 * remote-utils.c (decode_search_memory_packet): New fn.
12770 * server.c (handle_search_memory_1): New fn.
12771 (handle_search_memory): New fn.
12772 (handle_query): Process qSearch:memory packets.
12774 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12776 * regcache.c (registers_length): Remove.
12777 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12778 full register packet.
12779 * regcache.h (registers_length): Remove prototype.
12780 * server.h (PBUFSIZ): Define to 16384.
12782 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12784 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12785 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12786 powerpc-64l.o, and powerpc-altivec64l.o.
12787 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12788 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12789 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12790 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12791 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12794 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12795 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12796 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12797 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12798 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12799 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12800 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12801 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12802 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12803 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12806 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12807 (init_registers_powerpc_32l): ... this new prototype.
12808 (init_registers_powerpc_32): Remove, replace by ...
12809 (init_registers_powerpc_altivec32l): ... this new prototype.
12810 (init_registers_powerpc_e500): Remove, replace by ...
12811 (init_registers_powerpc_e500l): ... this new prototype.
12812 (init_registers_ppc64): Remove, replace by ...
12813 (init_registers_powerpc_64l): ... this new prototype.
12814 (init_registers_powerpc_64): Remove, replace by ...
12815 (init_registers_powerpc_altivec64l): ... this new prototype.
12816 (ppc_num_regs): Set to 73.
12817 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12818 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12819 (ppc_cannot_store_register): Handle orig_r3 and trap.
12820 (ppc_arch_setup): Update init_registers_... calls.
12821 (ppc_fill_gregset): Handle orig_r3 and trap.
12823 * inferiors.c (clear_inferiors): Reset current_inferior.
12825 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12827 * acinclude.m4: Add override.m4.
12828 * configure: Regenerate.
12830 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12832 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12833 initial call to init_register_ppc64.
12835 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12837 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12838 single powerpc*-*-linux* case.
12839 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12841 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12843 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12844 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12846 * linux-ppc-low.c: Include <elf.h>.
12847 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12848 (ppc_hwcap): New global variable.
12849 (ppc_regmap): Remove __SPE__ #ifdef sections.
12850 (ppc_regmap_e500): New global variable.
12851 (ppc_cannot_store_register): Update __SPE__ special case.
12852 (ppc_get_hwcap): New function.
12853 (ppc_arch_setup): Use it to determine whether inferior supports
12854 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12855 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12856 Do not access registers if target does not support AltiVec.
12857 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12858 Do not access registers if target does not support SPE.
12859 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12861 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12863 * linux-low.c (disabled_regsets, num_regsets): New.
12864 (use_regsets_p): Delete.
12865 (linux_wait_for_process): Clear disabled_regsets.
12866 (regsets_fetch_inferior_registers): Check and set it.
12867 (regsets_store_inferior_registers): Likewise.
12868 (linux_fetch_registers, linux_store_registers): Do not use
12870 (initialize_low): Allocate disabled_regsets.
12872 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12874 * Makefile.in (LIBOBJS): New.
12875 (OBS): Use LIBOBJS.
12876 (memmem.o): New rule.
12877 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12878 * configure: Regenerated.
12880 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12882 * server.c (handle_query): Never return "unsupported" for
12883 qXfer:features:read queries.
12885 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12887 * server.c (get_features_xml): Fix inverted condition.
12888 (handle_query): Always support qXfer:feature:read.
12890 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12892 * server.c (wrapper_argv): New.
12893 (start_inferior): Handle wrapper_argv. If set, expect an extra
12895 (gdbserver_usage): Document --wrapper.
12896 (main): Parse --wrapper.
12898 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12900 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12901 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12902 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12903 (ppc_set_pc): Likewise.
12904 (ppc_arch_setup): New function.
12905 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12906 of collect_register.
12907 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12909 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12911 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12912 instead of linux-ppc64-low.o.
12913 * linux-ppc64-low.c: Remove file.
12914 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12915 (linux-ppc64-low.o): Remove rule.
12917 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12918 (init_registers_powerpc_64): Likewise.
12919 (ppc_regmap): Conditionally define depending on __powerpc64__.
12920 (ppc_cannot_store_register): Do not special-case "fpscr" when
12921 compiled on __powerpc64__.
12922 (ppc_collect_ptrace_register): New function.
12923 (ppc_supply_ptrace_register): New function.
12924 (ppc_breakpoint): Change type to "unsigned int".
12925 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12926 (the_low_target): Conditionally provide initializers for the
12927 arch_setup member depending on __powerpc64__. Install
12928 collect_ptrace_register and supply_ptrace_register members.
12930 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12932 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12933 * server.c (gdbserver_xmltarget): Define.
12934 (get_features_xml): Use it to replace "target.xml" and arch_string.
12936 * configure.srv: Remove srv_xmltarget. Add XML files that were
12937 mentioned there to srv_xmlfiles instead. Remove conditional tests
12938 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12939 srv_xmlfiles and srv_regobj to include all possible choices.
12940 * configure.ac (srv_xmltarget): Remove.
12941 (srv_xmlfiles): Do not add "target.xml".
12942 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12943 checks for supplementary target information.
12944 * configure: Regenerate.
12945 * Makefile.in (XML_TARGET): Remove.
12946 (target.xml): Remove rule.
12947 (clean): Do not clean up target.xml.
12948 (.PRECIOUS): Do not mention target.xml.
12950 * target.h (struct target_ops): Remove arch_string member.
12951 * linux-low.c (linux_arch_string): Remove.
12952 (linux_target_ops): Remove arch_string initializer.
12953 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12954 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12955 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12956 * spu-low.c (spu_arch_string): Remove.
12957 (spu_target_ops): Remove arch_string initializer.
12958 * win32-low.c (win32_arch_string): Remove.
12959 (win32_target_ops): Remove arch_string initializer.
12960 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12961 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12962 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12964 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12966 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12967 by collect_ptrace_register and supply_ptrace_register hooks.
12968 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12969 instead of checking for the_low_target.left_pad_xfer.
12970 (usr_store_inferior_registers): Use collect_ptrace_register callback
12971 instead of checking for the_low_target.left_pad_xfer.
12973 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12974 (s390_supply_ptrace_register): Likewise.
12975 (s390_fill_gregset): Call s390_collect_ptrace_register.
12976 (the_low_target): Update.
12978 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12979 (ppc_supply_ptrace_register): Likewise.
12980 (the_low_target): Update.
12982 * linux-i386-low.c (the_low_target): Update.
12983 * linux-x86-64-low.c (the_low_target): Update.
12985 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12987 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12988 reg-s390.o and reg-s390x.o.
12990 * linux-low.c (new_inferior): New global variable.
12991 (linux_create_inferior, linux_attach): Set it.
12992 (linux_wait_for_process): Call the_low_target.arch_setup after the
12993 target has stopped for the first time.
12994 (initialize_low): Do not call the_low_target.arch_setup.
12996 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12997 (s390_set_pc): Likewise.
12998 (s390_arch_setup): New function.
12999 (the_low_target): Use s390_arch_setup as arch_setup routine.
13001 * regcache.c (realloc_register_cache): New function.
13002 (set_register_cache): Call it for each existing regcache.
13004 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13006 * server.h (init_registers): Remove prototype.
13008 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13009 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13010 instead of init_registers ().
13011 * linux-arm-low.c (init_registers_arm): Add prototype.
13012 (init_registers_arm_with_iwmmxt): Likewise.
13013 (the_low_target): Add initializer for arch_setup field.
13014 * linux-cris-low.c (init_registers_cris): Add prototype.
13015 (the_low_target): Add initializer for arch_setup field.
13016 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13017 (the_low_target): Add initializer for arch_setup field.
13018 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13019 (the_low_target): Add initializer for arch_setup field.
13020 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13021 (the_low_target): Add initializer for arch_setup field.
13022 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13023 (the_low_target): Add initializer for arch_setup field.
13024 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13025 (the_low_target): Add initializer for arch_setup field.
13026 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13027 (init_registers_mips64_linux): Likewise.
13028 (the_low_target): Add initializer for arch_setup field.
13029 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13030 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13031 (the_low_target): Add initializer for arch_setup field.
13032 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13033 (init_registers_powerpc_64): Likewise.
13034 (the_low_target): Add initializer for arch_setup field.
13035 * linux-s390-low.c (init_registers_s390): Add prototype.
13036 (init_registers_s390x): Likewise.
13037 (the_low_target): Add initializer for arch_setup field.
13038 * linux-sh-low.c (init_registers_sh): Add prototype.
13039 (the_low_target): Add initializer for arch_setup field.
13040 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13041 (the_low_target): Add initializer for arch_setup field.
13042 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13043 (the_low_target): Add initializer for arch_setup field.
13045 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13046 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13047 instead of init_registers ().
13048 * win32-arm-low.c (init_registers_arm): Add prototype.
13049 (the_low_target): Add initializer for arch_setup field.
13050 * win32-i386-low.c (init_registers_i386): Add prototype.
13051 (the_low_target): Add initializer for arch_setup field.
13053 * spu-low.c (init_registers_spu): Add prototype.
13054 (initialize_low): Call initialie_registers_spu () instead of
13055 initialize_registers ().
13057 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13059 * server.c (handle_v_requests): When handling the vRun and vAttach
13060 packets, if already debugging a process, don't kill it. Return an
13063 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13065 * server.c (handle_query): Correct length check.
13067 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13069 * win32-low.c (do_initial_child_stuff): Add process handle
13070 parameter. Set current_process_handle and current_process_id from the
13071 parameters. Clear globals.
13072 (win32_create_inferior): Don't set current_process_handle and
13073 current_process_id here. Instead pass them on the call to
13074 do_initial_child_stuff.
13075 (win32_attach): Likewise.
13076 (win32_clear_inferiors): New.
13077 (win32_kill): Don't close the current process handle or the
13078 current thread handle here. Instead call win32_clear_inferiors.
13079 (win32_detach): Don't open a new handle to the process. Call
13080 win32_clear_inferiors.
13081 (win32_join): Don't rely on current_process_handle; open a new
13082 handle using the process id.
13083 (win32_wait): Call win32_clear_inferiors when the inferior process
13086 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13088 * server.c (monitor_show_help): Add "exit".
13090 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13092 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13093 (clean): Add reg-xtensa.c.
13094 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13095 * configure.srv (xtensa*-*-linux*) New target.
13096 * linux-xtensa-low.c: New.
13097 * xtensa-xtregs.c: New.
13099 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13101 * hostio.c: Don't include errno.h.
13102 (errno_to_fileio_errno): Move to hostio-errno.
13103 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13104 error number outputting to the target->hostio_last_error callback.
13105 (hostio_packet_error): Use FILEIO_EINVAL directly.
13106 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13107 calls to hostio_error.
13108 * hostio-errno.c: New.
13109 * server.h (hostio_last_error_from_errno): Declare.
13110 * target.h (target_ops): Add hostio_last_error member.
13111 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13112 as hostio_last_error handler.
13113 * spu-low.c (spu_target_ops): Likewise.
13114 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13115 (wince_hostio_last_error): New functions.
13116 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13117 as hostio_last_error handler.
13118 (win32_target_ops) [!_WIN32_WCE]: Register
13119 hostio_last_error_from_errno as hostio_last_error handler.
13120 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13121 (hostio-errno.o): New rule.
13122 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13123 * configure.srv (srv_hostio_err_objs): New variable. Default to
13125 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13126 * configure: Regenerate.
13128 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13130 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13131 (linux_kill, linux_detach): Clean up the process list.
13132 * remote-utils.c (remote_open): Improve port number parsing.
13133 (putpkt_binary, input_interrupt): Only send interrupts if the target
13135 * server.c (extended_protocol): Make static.
13136 (attached): Define earlier.
13137 (exit_requested, response_needed, program_argv): New variables.
13138 (target_running): New.
13139 (start_inferior): Clear attached here.
13140 (attach_inferior): Set attached here.
13141 (require_running): Define.
13142 (handle_query): Use require_running and target_running. Implement
13144 (handle_v_attach, handle_v_run): New.
13145 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13146 (gdbserver_usage): Update.
13147 (main): Redo argument parsing. Handle --debug and --multi. Handle
13148 --attach along with other options or after the port. Save
13149 program_argv. Support no initial program. Resynchronize
13150 communication with GDB after an error. Handle "monitor exit".
13151 Use require_running and target_running. Always allow the extended
13152 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13153 restart in extended mode.
13154 * README: Refer to the GDB manual. Update --attach usage.
13156 2007-12-20 Andreas Schwab <schwab@suse.de>
13158 * linux-low.c (STACK_SIZE): Define.
13159 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13160 (linux_test_for_tracefork): Likewise.
13162 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13164 * linux-low.c (linux_wait_for_event): Update messages. Do not
13165 reinsert auto-delete breakpoints.
13166 * mem-break.c (struct breakpoint): Change return type of handler to
13168 (set_breakpoint_at): Update handler type.
13169 (reinsert_breakpoint_handler): Return 1 instead of calling
13171 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13173 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13174 * mem-break.h (set_breakpoint_at): Update handler type.
13175 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13176 * win32-low.c (auto_delete_breakpoint): New.
13177 (get_child_debug_event): Use it.
13179 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13181 * configure.ac: Check for pread and pwrite.
13182 * hostio.c (handle_pread): Fall back to lseek and read.
13183 (handle_pwrite): Fall back to lseek and write.
13184 * config.in, configure: Regenerated.
13186 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13188 * server.c (myresume): Add own_buf argument.
13189 (main): Update calls.
13191 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13193 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13194 * remote-utils.c (remote_open): Do not call disable_async_io.
13195 (block_async_io): Delete.
13196 (unblock_async_io): Make static.
13197 (initialize_async_io): New.
13198 * server.c (handle_v_cont): Handle async I/O here.
13199 (myresume): Likewise. Move other common resume tasks here...
13200 (main): ... from here. Call initialize_async_io. Disable async
13201 I/O before the main loop.
13202 * server.h (initialize_async_io): Declare.
13203 (block_async_io, unblock_async_io): Delete prototypes.
13204 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13206 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13208 * remote-utils.c (readchar): Allow binary data in received messages.
13210 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13212 * win32-low.c (attaching): New global.
13213 (win32_create_inferior): Clear the `attaching' global.
13214 (win32_attach): Set the `attaching' global.
13215 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13216 attaching. Only set a breakpoint at the entry point if not
13219 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13221 * server.c (main): Don't report dll events on the initial
13222 connection on attaches.
13224 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13226 * server.c (main): Relax numerical bases supported for the pid of
13227 the --attach command line argument.
13229 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13231 * win32-low.c (win32_attach): Call OpenProcess before
13232 DebugActiveProcess, not after. Add last error output to error
13235 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13237 * win32-low.c (win32_get_thread_context)
13238 (win32_set_thread_context): New functions.
13239 (thread_rec): Use win32_get_thread_context.
13240 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13241 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13244 2007-12-03 Leo Zayas
13245 Pedro Alves <pedro_alves@portugalmail.pt>
13247 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13249 (child_add_thread): Minor cleanup.
13250 (child_continue): Resume artificially suspended threads before
13251 calling ContinueDebugEvent.
13252 (suspend_one_thread): New.
13253 (fake_breakpoint_event): New.
13254 (get_child_debug_event): Change return type to int. Check here if
13255 gdb sent an interrupt request. If a soft interrupt was requested,
13256 fake a breakpoint event. Return 0 if there is no event to handle,
13258 (win32_wait): Don't check here if gdb sent an interrupt request.
13259 Ensure there is a valid event to handle.
13260 (win32_request_interrupt): Add soft interruption method as last
13263 2007-12-03 Leo Zayas
13264 Pedro Alves <pedro_alves@portugalmail.pt>
13266 * win32-low.h (win32_thread_info): Add descriptions to the
13267 structure members. Replace `suspend_count' counter by a
13269 * win32-low.c (thread_rec): Update condition of when to get the
13270 context from the inferior. Rely on ContextFlags being set if it
13271 has already been retrieved. Only suspend the inferior thread if
13272 we haven't already. Warn if that fails.
13273 (continue_one_thread): s/suspend_count/suspended/. Only call
13274 ResumeThread once. Warn if that fails.
13276 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13278 * win32-low.c (win32_wait): Don't read from the inferior when it
13279 has already exited.
13281 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13283 * Makefile.in (win32_low_h): New variable.
13284 (win32-low.o): Add dependency on $(win32_low_h).
13285 (win32-arm-low.o, win32-i386-low.o): New rules.
13287 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13289 * hostio.c: Correct copyright year.
13291 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13293 * Makefile.in (OBS): Add hostio.o.
13294 (hostio.o): New rule.
13295 * server.h (handle_vFile): Declare.
13296 * hostio.c: New file.
13297 * server.c (handle_v_requests): Take packet_len and new_packet_len
13298 for binary packets. Call handle_vFile.
13299 (main): Update call to handle_v_requests.
13301 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13303 * linux-low.c: Include <sched.h>.
13305 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13307 * linux-low.c (linux_tracefork_grandchild): New.
13308 (linux_tracefork_child): Use clone.
13309 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13311 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13313 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13315 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13317 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13319 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13321 * inferiors.c (change_inferior_id): Delete.
13322 (add_pid_to_list, pull_pid_from_list): New.
13323 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13324 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13325 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13326 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13327 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13328 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13329 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13330 (using_threads): Always set to 1.
13331 (handle_extended_wait): New.
13332 (add_process): Do not set TID.
13333 (linux_create_inferior): Set must_set_ptrace_flags.
13334 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13335 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13336 (linux_thread_alive): Rename TID argument to LWPID.
13337 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13338 (linux_wait_for_event): Do not use TID or check using_threads. Update
13339 call to dead_thread_notify. Call handle_extended_wait.
13340 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13341 (send_sigstop): Delete sigstop_sent.
13342 (wait_for_sigstop): Avoid TID.
13343 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13344 (linux_test_for_tracefork): New.
13345 (linux_lookup_signals): Use thread_db_active and
13346 linux_supports_tracefork_flag.
13347 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13348 * linux-low.h (get_process_thread): Avoid TID.
13349 (struct process_ifo): Move thread_known and tid to the end. Remove
13351 (linux_attach_lwp, thread_db_init): Update prototypes.
13352 * server.h (change_inferior_id): Delete prototype.
13353 (add_pid_to_list, pull_pid_from_list): New prototypes.
13354 * thread-db.c (thread_db_use_events): New.
13355 (find_first_thread): Rename to...
13356 (find_one_thread): ...this. Update callers and messages. Do not
13357 call fatal. Check thread_db_use_events. Do not call
13358 change_inferior_id or new_thread_notify.
13359 (maybe_attach_thread): Update. Do not call new_thread_notify.
13360 (thread_db_init): Set thread_db_use_events. Check use_events.
13361 * utils.c (fatal, warning): Correct message prefix.
13363 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13365 * Makefile.in (clean): Remove new files.
13366 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13367 (powerpc-64.o, powerpc-64.c): New rules.
13368 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13369 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13371 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13373 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13374 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13375 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13376 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13377 (target_regsets): Add AltiVec and SPE register sets.
13378 * configure.ac: Check for AltiVec and SPE.
13379 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13380 (ppc_fill_vrregset, ppc_store_vrregset): New.
13381 (target_regsets): Add AltiVec register set.
13382 * configure: Regenerated.
13384 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13386 * linux-low.c (O_LARGEFILE): Define.
13387 (linux_read_memory): Use /proc/PID/mem.
13388 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13389 * configure, config.in: Regenerated.
13391 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13393 * linux-low.c (linux_wait_for_event): Do not pass signals while
13396 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13398 * win32-low.c (create_process): New.
13399 (win32_create_inferior): Use create_process instead of
13400 CreateProcess. If create_process failed retry appending an ".exe"
13401 suffix. Store the GetLastError result immediatelly after
13402 create_process calls and use it on the call to error.
13404 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13406 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13408 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13410 * configure.ac: Switch license to GPLv3.
13412 2007-08-01 Michael Snyder <msnyder@access-company.com>
13414 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13416 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13418 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13420 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13421 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13422 CloseToolhelp32Snapshot.
13423 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13424 CloseToolhelp32Snapshot.
13426 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13428 * server.c (main): Check for inferior exit before main loop.
13430 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13432 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13433 instead of on tmp_desc.
13435 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13436 Daniel Jacobowitz <dan@codesourcery.com>
13438 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13439 (add_thread): Minor cleanups.
13440 (clear_inferiors): Move lower in the file. Clear the DLL
13442 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13443 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13444 (xml_escape_text): New.
13445 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13447 (handle_v_cont): Report errors.
13448 (gdbserver_version): Update.
13449 (main): Correct size of own_buf. Do not report initial DLL events.
13450 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13451 (unloaded_dll, xml_escape_text): New.
13452 * win32-low.c (enum target_waitkind): Update comments.
13453 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13454 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13455 (win32_EnumProcessModules, win32_GetModuleInformation)
13456 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13457 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13458 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13459 (win32_Module32First, win32_Module32Next, load_toolhelp)
13460 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13461 (get_child_debug_event): Handle DLL events.
13462 (win32_wait): Likewise.
13464 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13466 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13467 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13469 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13471 * win32-low.c (handle_output_debug_string): Ignore event if not
13474 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13476 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13478 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13480 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13482 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13484 * inferiors.c (change_inferior_id): Add comment.
13485 * linux-low.c (check_removed_breakpoint): Add an early
13486 prototype. Improve debug output.
13487 (linux_attach): Doc update.
13488 (linux_detach_one_process, linux_detach): Clean up before releasing
13490 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13491 * linux-low.h (struct process_info): Doc improvement.
13492 * mem-break.c (delete_all_breakpoints): New.
13493 * mem-break.h (delete_all_breakpoints): New prototype.
13494 * thread-db.c (find_first_thread): New.
13495 (thread_db_create_event): Call it instead of
13496 thread_db_find_new_threads. Clean up unused variables.
13497 (maybe_attach_thread): Remove first thread handling.
13498 (thread_db_find_new_threads): Use find_first_thread.
13499 (thread_db_get_tls_address): Likewise.
13501 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13503 * thread-db.c (thread_db_find_new_threads): Add prototype.
13504 (thread_db_create_event): Check for the main thread before adding
13506 (maybe_attach_thread): Only enable event reporting if TID == 0.
13507 (thread_db_get_tls_address): Check for new threads.
13509 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13511 * linux-low.c (linux_create_inferior): Try execv before execvp.
13512 * spu-low.c (spu_create_inferior): Likewise.
13514 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13516 * linux-low.c (linux_create_inferior): Change execv to execvp.
13517 * spu-low.c (spu_create_inferior): Likewies.
13519 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13521 * Makefile.in (clean): Clean new files instead of deleted ones.
13522 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13523 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13525 * configure.srv: Specify XML files and new regformats for MIPS and
13527 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13528 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13529 an entry for the restart register.
13530 (mips_cannot_fetch_register, mips_cannot_store_register)
13531 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13532 register names to match the XML descriptions.
13533 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13534 restart register instead of $0.
13536 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13537 Markus Deuling <deuling@de.ibm.com>
13539 * remote-utils.c (decode_xfer_write): New function.
13540 * server.h (decode_xfer_write): Add prototype.
13541 * server.c (handle_query): Add PACKET_LEN argument. Support
13542 qXfer:spu:read and qXfer:spu:write packets.
13543 (main): Pass packet_len to handle_query.
13544 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13545 * target.h (target_ops): Add qxfer_spu.
13547 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13549 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13550 accessing non-seekable spufs files.
13552 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13554 * server.c (handle_query): Add reply for qC packet.
13556 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13557 Leo Zayas <lerele@champenstudios@com>
13559 * server.h (check_remote_input_interrupt_request): New function.
13560 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13561 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13562 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13563 (check_remote_input_interrupt_request): New function.
13564 * server.h (check_remote_input_interrupt_request): Declare.
13565 * win32-low.c (winapi_DebugBreakProcess,
13566 winapi_GenerateConsoleCtrlEvent): New typedefs.
13567 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13569 (win32_wait): Check for remote interrupt request
13570 with check_remote_input_interrupt_request.
13571 (win32_request_interrupt): New function.
13572 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13574 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13576 * win32-low.c (debug_registers_changed,
13577 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13578 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13579 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13580 (thread_rec): Get context using the low target.
13581 (child_add_thread): Call thread_added on the low target,
13582 which does the same thing.
13584 (do_initial_child_stuff): Remove debug registers references.
13585 Set context using the low target. Resume threads after
13586 setting the contexts.
13587 (child_continue): Remove dead variable. Remove debug
13588 registers references.
13589 (child_fetch_inferior_registers): Go through the low target.
13590 (do_child_store_inferior_registers): Remove.
13591 (child_store_inferior_registers): Go through the low target.
13592 (win32_resume): Remove debug registers references.
13593 Set context using the low target.
13594 (handle_exception): Change return type to void. Don't record
13595 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13596 first chance exception.
13597 (get_child_debug_event): Change return type to void. Remove
13598 goto loop. Always return after waiting for debug event.
13599 (win32_wait): Convert to switch statement. Handle spurious
13602 * win32-i386-low.c (debug_registers_changed,
13603 debug_registers_used): New.
13604 (initial_stuff): Rename to ...
13605 (i386_initial_stuff): ... this. Clear debug registers
13607 (store_debug_registers): Delete.
13608 (i386_get_thread_context): New.
13609 (load_debug_registers): Delete.
13610 (i386_set_thread_context): New.
13611 (i386_thread_added): New.
13612 (single_step): Rename to ...
13613 (i386_single_step): ... this.
13614 (do_fetch_inferior_registers): Rename to ...
13615 (i386_fetch_inferior_register): ... this.
13616 (i386_store_inferior_register): New.
13617 (the_low_target): Adapt to new interface.
13619 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13620 (arm_get_thread_context): New.
13621 (arm_set_thread_context): New.
13623 (do_fetch_inferior_registers): Rename to ...
13624 (arm_fetch_inferior_register): ... this.
13625 (arm_store_inferior_register): New.
13626 (arm_wince_breakpoint): Reimplement as unsigned long.
13627 (arm_wince_breakpoint_len): Define.
13628 (the_low_target): Adapt to new interface.
13630 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13631 load_debug_registers. Add get_thread_context, set_thread_context,
13632 thread_added and store_inferior_register. Rename
13633 fetch_inferior_registers to fetch_inferior_register.
13634 (regptr): Remove declaration.
13636 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13638 * linux-low.c (linux_detach): Change return type to int. Return 0.
13639 * spu-low.c (spu_detach): Likewise.
13641 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13643 * target.h (target_ops): Change return type of detach to int.
13645 (join_inferior): New.
13646 * server.c (main): Don't skip detach support on mingw32.
13647 If the inferior doesn't support detaching return error.
13648 Call join_inferior instead of using waitpid.
13649 * linux-low.c (linux_join): New.
13650 (linux_target_op): Add linux_join.
13651 * spu-low.c (spu_join): New.
13652 (spu_target_ops): Add spu_join.
13653 * win32-low.c (win32_detach): Adapt to new interface.
13654 Reopen current_process_handle before detaching. Issue a child
13655 resume before detaching.
13657 (win32_target_op): Add win32_join.
13659 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13661 * win32-low.c (win32-attach): Fix return value.
13662 * target.h (target_ops): Describe ATTACH return values.
13664 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13666 * win32-low.c (GETPROCADDRESS): Define.
13667 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13668 (winapi_DebugSetProcessKillOnExit): Likewise.
13669 (win32_create_inferior): Force usage of ansi CreateProcessA.
13670 (win32_attach): Use GETPROCADDRESS.
13671 (win32_detach): Likewise.
13673 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13675 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13677 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13679 * win32-low.c: Commit leftover changes from 2007-03-29.
13681 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13683 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13684 fields short instead of int. Add explicit padding.
13685 (i387_cache_to_fsave): Remove unnecessary casts.
13686 (i387_fsave_to_cache): Doc fix.
13687 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13689 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13691 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13692 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13694 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13696 * configure.srv (arm*-*-mingw32ce*): Move near the other
13699 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13701 * configure.ac: Add errno checking.
13702 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13703 sys/file.h and malloc.h.
13704 (AC_CHECK_DECLS): Add perror.
13705 (srv_mingwce): Handle.
13706 * configure.srv (i[34567]86-*-cygwin*): Add
13707 win32-i386-low.o to srv_tgtobj.
13708 (i[34567]86-*-mingw*): Likewise.
13709 (arm*-*-mingw32ce*): Add case.
13710 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13711 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13712 [__MINGW32CE__] (strerror): New function.
13713 [__MINGW32CE__] (errno): Define to GetLastError.
13714 [__MINGW32CE__] (COUNTOF): New macro.
13715 (remote_open): Remove extra close call.
13716 * mem-break.c (delete_breakpoint_at): New function.
13717 * mem-break.h (delete_breakpoint_at): Declare.
13718 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13719 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13720 [USE_WIN32API] (read, write): Add char* casts.
13721 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13722 * server.h: Include wincecompat.h on Windows CE.
13723 [HAVE_ERRNO_H]: Check.
13724 (perror): Declare if not declared.
13725 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13726 (perror_with_name): Remove errno declaration.
13727 * wincecompat.h: New.
13728 * wincecompat.c: New.
13729 * win32-low.h: New.
13730 * win32-arm-low.c: New.
13731 * win32-i386-low.c: New.
13732 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13733 (OUTMSG2): Make it safe.
13735 (COUNTOF): New macro.
13736 (NUM_REGS): Get it from the low target.
13737 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13738 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13739 (thread_rec): Let low target handle debug registers.
13740 (child_add_thread): Likewise.
13741 (child_init_thread_list): Likewise.
13742 (continue_one_thread): Likewise.
13744 (do_child_fetch_inferior_registers): Move to ...
13745 * win32-i386-low.c: ... here, and rename to ...
13746 (do_fetch_inferior_registers): ... this.
13747 * win32-low.c (child_fetch_inferior_registers):
13748 Go through the low target.
13749 (do_child_store_inferior_registers): Use regptr.
13750 (strwinerror): New function.
13751 (win32_create_inferior): Handle Windows CE.
13752 Use strwinerror instead of strerror on Windows error
13753 codes. Add program to the error output.
13754 Don't close the main thread handle on Windows CE.
13755 (win32_attach): Use coredll.dll on Windows CE.
13756 (win32_kill): Close current process and current
13758 (win32_detach): Use coredll.dll on Windows CE.
13759 (win32_resume): Let low target handle debug registers, and
13761 (handle_exception): Add/Remove initial breakpoint. Avoid
13762 non-existant WSTOPSIG on Windows CE.
13763 (win32_read_inferior_memory): Cast to remove warning.
13764 (win32_arch_string): Go through the low target.
13765 (initialize_low): Call set_breakpoint_data with the low
13766 target's breakpoint.
13767 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13768 FOP_REGNUM, mappings): Move to ...
13769 * win32-i386-low.c: ... here.
13770 * win32-low.c (win32_thread_info): Move to ...
13771 * win32-low.h: ... here.
13772 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13773 win32-arm-low.c and wincecompat.c.
13774 (all:): Add $EXEEXT.
13775 (install-only:): Likewise.
13776 (gdbserver:): Likewise.
13777 (gdbreplay:): Likewise.
13778 * config.in: Regenerate.
13779 * configure: Regenerate.
13781 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13783 * win32-low.c: Rename typedef thread_info to
13784 win32_thread_info throughout.
13786 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13788 * win32-i386-low.c: Rename to ...
13789 * win32-low.c: ... this.
13790 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13791 * Makefile.in: Likewise.
13793 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13795 * remote-utils.c (monitor_output): Constify msg parameter.
13796 * server.h (monitor_output): Likewise.
13797 * win32-i386-low.c (handle_output_debug_string): New.
13798 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13799 handle_output_debug_string.
13800 (get_child_debug_event): Likewise.
13802 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13804 * server.c (main): Correct strtoul check.
13806 2007-03-27 Jon Ringle <jon@ringle.org>
13808 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13810 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13812 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13814 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13816 * terminal.h: Check HAVE_SGTTY_H.
13818 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13820 * remote-utils.c (remote_open): Print out the assigned port number.
13822 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13824 * remote-utils.c (monitor_output): New function.
13825 * server.c (debug_threads): Define here.
13826 (monitor_show_help): New function.
13827 (handle_query): Handle qRcmd.
13828 (main): Do not handle 'd' packet.
13829 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13830 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13833 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13835 * Makefile.in (EXEEXT): New.
13836 (clean): Use $(EXEEXT).
13838 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13840 * target.h (target_ops): Rename send_signal to request_interrupt,
13841 and remove enum target_signal parameter.
13842 * linux-low.c (linux_request_interrupt): Rename from
13843 linux_send_signal, and always send SIGINT.
13844 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13845 and always send SIGINT.
13846 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13848 (input_interrupt): Likewise.
13850 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13852 * server.c (get_features_xml): Check if target implemented
13854 * win32-i386-low.c (win32_arch_string): New.
13855 (win32_target_ops): Add win32_arch_string as arch_string member.
13857 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13859 * spu-low.c (spu_arch_string): New.
13860 (spu_target_ops): Add spu_arch_string.
13862 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13864 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13865 * configure.ac: Do not check for terminal.h.
13866 * configure, config.in: Regenerated.
13868 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13870 * Makefile.in (OBS): Add $(XML_BUILTIN).
13871 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13873 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13874 (arm-with-iwmmxt.c): New.
13875 * config.in, configure: Regenerate.
13876 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13877 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13878 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13879 (arm*-*-linux*): Add iWMMXt and regset support.
13880 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13881 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13882 (arm_store_wmmxregset, target_regsets): New.
13883 * server.c (get_features_xml): Take annex argument. Check builtin
13885 (handle_query): Handle multiple annexes.
13887 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13889 * remote-utils.c [USE_WIN32API] (read, write): Define.
13890 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13893 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13895 * linux-i386-low.c (the_low_target): Set arch_string.
13896 * linux-x86-64-low.c (the_low_target): Likewise.
13897 * linux-low.c (linux_arch_string): New.
13898 (linux_target_ops): Add it.
13899 * linux-low.h (struct linux_target_ops): Add arch_string.
13900 * server.c (write_qxfer_response): Use const void * for DATA.
13901 (get_features_xml): New.
13902 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13903 * target.h (struct target_ops): Add arch_string method.
13905 2007-01-03 Denis Pilat <denis.pilat@st.com>
13906 Daniel Jacobowitz <dan@codesourcery.com>
13908 * linux-low.c (linux_kill): Handle being called with no threads.
13909 * win32-i386-low.c (win32_kill): Likewise.
13910 (get_child_debug_event): Clear current_process_handle.
13912 2006-12-30 Denis PILAT <denis.pilat@st.com>
13913 Daniel Jacobowitz <dan@codesourcery.com>
13915 * remote-utils.c (remote_open): Check the type of specified
13916 serial port devices before opening them.
13917 * server.c (main): Kill the inferior if an error occurs during
13918 the first remote_open.
13920 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13922 * README: Update supported targets.
13924 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13926 * Makefile.in (clean): Remove reg-mips64.c.
13927 (reg-mips64.c, reg-mips64.o): New rules.
13928 * configure.srv: Handle mips64. Include regset support for mips.
13929 * linux-mips-low.c (union mips_register): New.
13930 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13931 (mips_breakpoint, mips_breakpoint_at): Use int.
13932 (mips_collect_register, mips_supply_register)
13933 (mips_collect_register_32bit, mips_supply_register_32bit)
13934 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13935 (mips_store_fpregset, target_regsets): New.
13936 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13938 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13940 * configure.srv: Add target "spu*-*-*".
13941 * Makefile.in (clean): Remove reg-spu.c.
13942 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13943 * spu-low.c: New file.
13945 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13947 * configure.ac: Correct td_thr_tls_get_addr test.
13948 * configure: Regenerated.
13950 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13952 * linux-low.c (linux_wait_for_event): Reformat. Use the
13953 pass_signals array.
13954 * remote-utils.c (decode_address_to_semicolon): New.
13955 * server.c (pass_signals, handle_general_set): New.
13956 (handle_query): Mention QPassSignals for qSupported.
13957 (main): Call handle_general_set.
13958 * server.h (pass_signals, decode_address_to_semicolon): New.
13960 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13962 * server.c (handle_query): Correct error handling for read_auxv.
13964 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13966 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13967 and srv_linux_thread_db to yes.
13968 * linux-s390-low.c (s390_fill_gregset): New function.
13969 (target_regsets): Define data structure.
13971 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13973 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13974 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13975 * config.in, configure: Regenerated.
13976 * inferiors.c (gdb_id_to_thread): New function.
13977 (gdb_id_to_thread_id): Use it.
13978 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13979 * linux-low.h (struct process_info): Add th member.
13980 (thread_db_get_tls_address): New prototype.
13981 * remote-utils.c (decode_address): Make non-static.
13982 * server.c (handle_query): Handle qGetTLSAddr.
13983 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13984 * target.h (struct target_ops): Add get_tls_address.
13985 * thread-db.c (maybe_attach_thread): Save the thread handle.
13986 (thread_db_get_tls_address): New.
13988 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13990 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13991 (linux_resume_one_process): Take a siginfo_t *. Update all
13992 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13993 (struct pending_signals): Add a siginfo_t.
13994 (linux_wait_for_process): Always set last_status.
13995 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13996 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13997 * linux-low.h (struct process_info): Add last_status.
13999 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14001 * remote-utils.c (try_rle): New function.
14002 (putpkt_binary): Use it.
14004 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14006 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14007 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14008 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14009 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14010 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14013 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14015 * server.c (terminal_fd): New variable.
14016 (old_foreground_pgrp): Likewise.
14017 (restore_old_foreground_pgrp): New function.
14018 (start_inferior): Record the terminal file descriptor in terminal_fd
14019 and its original foreground group in old_foreground_pgrp. Register
14020 restore_old_foreground_pgrp with atexit().
14022 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14024 * server.c (handle_query): Correct qPart to qXfer.
14026 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14028 * configure.ac: Check for more headers which are missing on
14029 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14030 * configure.srv: Add Cygwin and mingw32.
14031 * remote-utils.c: Don't include headers unconditionally which
14032 are missing on mingw32. Include <winsock.h> for mingw32.
14033 (remote_open): Adjust for mingw32 support. Flush
14034 standard error after writing to it.
14035 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14036 (unblock_async_io, enable_async_io, disable_async_io)
14037 (readchar, getpkt): Update for Winsock support.
14038 (prepare_resume_reply): Expect a protocol signal number.
14039 * server.c: Disable <sys/wait.h> on mingw32.
14040 (start_inferior): Adjust for mingw32 support. Flush
14041 standard error after writing to it.
14042 (attach_inferior): Likewise. Use protocol signal
14044 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14046 * win32-i386-low.c: New file.
14047 * Makefile.in (XM_CLIBS): Set.
14048 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14049 (win32-i386-low.o): New dependency rule.
14050 * linux-low.c (linux_wait): Use target signal numbers.
14051 * target.h (struct target_ops): Doc fix.
14052 * server.h (target_signal_to_name): New prototype.
14053 * gdbreplay.c: Don't include headers unconditionally which
14054 are missing on mingw32. Include <winsock.h> for mingw32.
14055 (remote_close, remote_open): Adjust for Winsock support.
14056 * configure, config.in: Regenerated.
14058 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14060 * server.c (decode_xfer_read, write_qxfer_response): New.
14061 (handle_query): Take a packet length argument. Handle
14062 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14063 the qSupported response.
14064 (main): Update call to handle_query.
14066 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14068 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14069 (putpkt_binary): Renamed from putpkt and adjusted for binary
14071 (putpkt): New wrapper for putpkt_binary.
14072 (readchar): Don't mask off the high bit.
14073 (decode_X_packet): New function.
14074 * server.c (main): Call putpkt_binary if a handler sets the packet
14075 length. Save the length of the incoming packet. Handle 'X'.
14076 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14078 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14080 * server.c (handle_query): Handle qSupported.
14082 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14084 * remote-utils.c (all_symbols_looked_up): New variable.
14085 (look_up_one_symbol): Check it.
14086 * server.h (look_up_one_symbol): New declaration.
14087 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14089 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14091 * Makefile.in (linux-arm-low.o): Update dependencies.
14092 * linux-arm-low.c: Include "gdb_proc_service.h".
14093 (PTRACE_GET_THREAD_AREA): Define.
14094 (ps_get_thread_area): New function.
14096 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14098 * configure.srv (m68k*-*-uclinux*): New target.
14099 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14100 (linux_resume_one_process): Remove extraneous cast.
14101 (linux_read_offsets): New.
14102 (linux_target_op): Add linux_read_offsets on mmuless systems.
14103 * server.c (handle_query): Add qOffsets logic.
14104 * target.h (struct target_ops): Add read_offsets.
14106 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14108 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14109 (PTRACE_GET_THREAD_AREA): Define.
14110 (ps_get_thread_area): New function.
14111 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14112 (linux-x86-64-low.o): Update.
14114 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14116 * configure.ac: Remove checks for prfpregset_t.
14117 * gdb_proc_service.h: New file.
14118 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14119 new "gdb_proc_service.h".
14120 * proc-service.c: Likewise.
14121 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14122 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14123 * Makefile.in (gdb_proc_service_h): Updated.
14124 * configure, config.in: Regenerated.
14126 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14128 * remote-utils.c (prepare_resume_reply): Move declaration
14129 of gdb_id_from_wait to the top of the block.
14131 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14133 * linux-low.c (regsets_store_inferior_registers): Read the regset
14134 from the target before filling it.
14136 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14138 * server.c (attach_inferior): Return SIGTRAP for a successful
14141 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14143 * Makefile.in (OBS): Add version.o.
14144 (STAGESTUFF): Delete.
14145 (version.o): Add dependencies.
14146 (version.c): Replace rule.
14147 (clean): Remove version.c.
14148 * server.c (gdbserver_version): New.
14149 (gdbserver_usage): Use printf.
14150 (main): Handle --version and --help.
14151 * server.h (version, host_name): Add declarations.
14153 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14165 * linux-x86-64-low.c:
14167 * linux-s390-low.c:
14168 * linux-ppc64-low.c:
14170 * linux-mips-low.c:
14171 * linux-m68k-low.c:
14172 * linux-m32r-low.c:
14175 * linux-ia64-low.c:
14176 * linux-i386-low.c:
14177 * linux-crisv32-low.c:
14189 * gdbserver.1: Add (C) after Copyright. Update the FSF
14192 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14194 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14195 (arm_breakpoint_at): Recognize both breakpoints.
14196 (the_low_target): Use the correct breakpoint instruction.
14198 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14200 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14201 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14202 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14203 (the_low_target): Update.
14205 2005-10-25 Andreas Schwab <schwab@suse.de>
14207 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14209 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14210 (ia64_num_regs): Reduce to 462.
14212 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14214 * acinclude.m4: Correct quoting.
14215 * aclocal.m4: Regenerated.
14217 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14218 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14219 (thread_db_init): Call thread_db_err_str.
14220 * configure.ac: Check for TD_VERSION.
14221 * config.in, configure: Regenerated.
14223 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14225 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14227 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14229 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14230 is not available. Define HAVE_PTRACE_GETREGS if it is.
14231 * config.in, configure: Regenerated.
14232 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14233 * linux-i386-low.c, linux-m68k-low.c: Update to use
14234 HAVE_PTRACE_GETREGS.
14235 * linux-low.c (regsets_fetch_inferior_registers)
14236 (regsets_store_inferior_registers): Only return 0 if we processed
14238 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14239 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14241 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14243 * inferiors.c (struct thread_info): Add gdb_id.
14244 (add_thread): Add gdb_id argument.
14245 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14246 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14247 calls to add_thread.
14248 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14249 * server.c (handle_query): Use thread_to_gdb_id.
14250 (handle_v_cont, main): Use gdb_id_to_thread_id.
14251 * server.h (add_thread): Update prototype.
14252 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14255 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14257 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14258 left-padded registers.
14259 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14260 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14262 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14264 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14265 * configure: Regenerate.
14266 * config.in: Regenerate.
14267 * server.h (NEED_DECLARATION_STRERROR):
14268 Replace with !HAVE_DECL_STRERROR.
14270 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14272 * linux-low.c (linux_wait, linux_send_signal): Don't test
14273 an unsigned long variable for > 0 if it could be MAX_ULONG.
14274 * server.c (myresume): Likewise.
14275 * target.c (set_desired_inferior): Likewise.
14277 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14279 * configure.ac: Simplify and improve check for socklen_t.
14280 * configure, config.in: Regenerate.
14282 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14284 * acconfig.h: Remove.
14285 * configure.ac: Add a test for socklen_t. Use three-argument
14286 AC_DEFINE throughout.
14287 * config.in: Regenerated using autoheader 2.59.
14288 * configure: Regenerated.
14290 * gdbreplay.c (socklen_t): Provide a default.
14291 (remote_open): Use socklen_t.
14292 * remote-utils.c (socklen_t): Provide a default.
14293 (remote_open): Use socklen_t.
14294 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14297 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14299 * linux-low.c (linux_read_memory, linux_write_memory)
14300 (linux_read_auxv): Likewise.
14301 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14302 (check_mem_write): Likewise.
14303 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14305 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14306 (registers_from_string, register_data): Likewise.
14307 * server.c (handle_query, main): Likewise.
14308 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14309 (decode_M_packet): Likewise.
14310 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14311 * target.h (struct target_ops): Update read_memory, write_memory,
14313 (read_inferior_memory, write_inferior_memory): Update.
14314 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14315 to unsigned char *.
14316 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14317 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14318 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14319 linux-s390-low.c, linux-sh-low.c: Update for changes in
14320 read_inferior_memory and the_low_target->breakpoint.
14322 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14324 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14325 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14326 * configure.srv: Add powerpc64-*-linux*.
14327 * linux-ppc64-low.c: New file.
14329 2005-05-23 Orjan Friberg <orjanf@axis.com>
14331 * linux-cris-low.c: New file with support for CRIS.
14332 * linux-crisv32-low.c: Ditto for CRISv32.
14333 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14334 (clean): Add reg-cris.c and reg-crisv32.c.
14335 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14336 reg-crisv32.o, and reg-crisv32.c to make rules.
14337 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14338 recognized targets.
14340 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14342 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14343 of sizeof (PTRACE_XFER_TYPE).
14344 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14346 2005-05-12 Orjan Friberg <orjanf@axis.com>
14348 * target.h (struct target_ops): Add insert_watchpoint,
14349 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14350 pointers for hardware watchpoint support.
14351 * linux-low.h (struct linux_target_ops): Ditto.
14352 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14353 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14354 to linux_target_ops.
14355 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14357 * server.c (main): Recognize 'Z' and 'z' packets.
14359 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14361 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14362 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14363 (the_low_target): Add new members.
14365 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14367 * proc-service.c (ps_lgetregs): Search all_processes instead of
14370 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14372 * server.c (start_inferior): Change return type to int.
14373 (attach_inferior): Change sigptr to int *.
14374 (handle_v_cont, handle_v_requests): Change signal to int *.
14375 (main): Change signal to int.
14377 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14379 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14380 * configure.srv: Add m32r*-*-linux*.
14381 * linux-m32r-low.c: New file.
14383 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14385 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14387 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14389 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14390 Take unsigned long arguments for PIDs.
14391 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14392 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14393 (wait_for_sigstop, linux_resume_one_process)
14394 (regsets_fetch_inferior_registers, linux_send_signal)
14395 (linux_read_auxv): Likewise. Update the types of variables holding
14396 PIDs. Update format string specifiers.
14397 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14398 * remote-utils.c (prepare_resume_reply): Likewise.
14399 * server.c (cont_thread, general_thread, step_thread)
14400 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14402 (handle_query): Update format specifiers.
14403 (handle_v_cont, main): Use strtoul for thread IDs.
14404 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14405 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14406 (general_thread, step_thread, thread_from_wait)
14407 (old_thread_from_wait): Update.
14408 * target.h (struct thread_resume): Use unsigned long for THREAD.
14409 (struct target_ops): Use unsigned long for arguments to attach and
14412 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14414 * acinclude.m4: Include bfd/bfd.m4 directly.
14415 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14416 <agriffis@toolchain.org>.
14417 * aclocal.m4, configure: Regenerated.
14419 2005-01-07 Andrew Cagney <cagney@gnu.org>
14421 * configure.ac: Rename configure.in, require autoconf 2.59.
14422 * configure: Re-generate.
14424 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14426 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14427 LIBS when finished.
14428 * aclocal.m4: Regenerated.
14429 * configure: Regenerated.
14431 2004-11-21 Andreas Schwab <schwab@suse.de>
14433 * linux-m68k-low.c (m68k_num_gregs): Define.
14434 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14435 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14436 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14437 (m68k_breakpoint_at): New. Add to the_low_target.
14439 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14440 srv_linux_thread_db to yes.
14442 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14444 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14445 (ARCH_SET_FS): Likewise.
14446 (ARCH_GET_FS): Likewise.
14447 (ARCH_GET_GS): Likewise.
14449 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14451 * linux-i386-low.c (ps_get_thread_area): New.
14452 * linux-x86-64-low.c (ps_get_thread_area): New.
14453 * linux-low.c: Include <sys/syscall.h>.
14454 (linux_kill_one_process): Don't kill the first thread here.
14455 (linux_kill): Kill the first thread here.
14456 (kill_lwp): New function.
14457 (send_sigstop, linux_send_signal): Use it.
14458 * proc-service.c: Clean up #ifdefs.
14459 (fpregset_info): Delete.
14460 (ps_lgetregs): Update and enable implementation.
14461 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14463 * remote-utils.c (struct sym_cache, symbol_cache): New.
14464 (input_interrupt): Print a clearer message.
14465 (async_io_enabled): New variable.
14466 (enable_async_io, disable_async_io): Use it. Update comments.
14467 (look_up_one_symbol): Use the symbol cache.
14468 * thread-db.c (thread_db_look_up_symbols): New function.
14469 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14471 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14473 * configure.in: Test for -rdynamic.
14474 * configure: Regenerated.
14475 * Makefile (INTERNAL_LDFLAGS): New.
14476 (gdbserver, gdbreplay): Use it.
14478 2004-09-02 Andrew Cagney <cagney@gnu.org>
14480 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14482 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14484 * linux-low.c (linux_wait): Clear all_processes list also.
14486 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14488 * linux-low.c: Include <errno.h>. Remove extern declaration of
14491 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14493 * gdbreplay.c, server.h, utils.c: Update copyright years.
14495 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14497 * server.c (main): Print child status or termination signal from
14498 variable 'signal', not 'sig'.
14500 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14502 * linux-low.c (linux_read_memory): Change return type to
14503 int. Check for and return error from ptrace().
14504 * target.c (read_inferior_memory): Change return type to int. Pass
14505 back return status from the_target->read_memory().
14506 * target.h (struct target_ops): Adapt *read_memory() prototype.
14508 (read_inferior_memory): Adapt prototype.
14509 * server.c (main): Return an error packet if
14510 read_inferior_memory() returns an error.
14512 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14514 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14515 Unify with other clean targets.
14517 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14519 * server.c (handle_v_cont): Call set_desired_inferior.
14521 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14523 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14525 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14527 * linux-low.c (linux_wait): Unblock async I/O.
14528 (linux_resume): Block and enable async I/O.
14529 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14530 * server.h (block_async_io, unblock_async_io): Add prototypes.
14532 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14534 * remote-utils.c (remote_open): Print a status notice after
14535 opening a TCP port.
14536 * server.c (attach_inferior): Print a status notice after
14539 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14541 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14543 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14545 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14547 * server.c, target.h: Update copyright years.
14549 2004-02-25 Roland McGrath <roland@redhat.com>
14551 * target.h (struct target_ops): New member `read_auxv'.
14552 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14553 * linux-low.c (linux_read_auxv): New function.
14554 (linux_target_ops): Initialize `read_auxv' member to that.
14556 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14558 Committed by Jim Blandy <jimb@redhat.com>.
14560 * linux-s390-low.c (s390_num_regs): Update.
14561 (s390_regmap): Remove control registers. Use __s390x__ predefine
14562 instead of GPR_SIZE to distiguish s390 and s390x targets.
14564 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14566 * linux-low.c: Update copyright year.
14567 (check_removed_breakpoint): Clear pending_is_breakpoint.
14568 (linux_set_resume_request, linux_queue_one_thread)
14569 (resume_status_pending_p): New functions.
14570 (linux_continue_one_thread): Use process->resume.
14571 (linux_resume): Only resume threads if there are no pending events.
14572 * linux-low.h (struct process_info): Add resume request
14575 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14577 * regcache.c (new_register_cache): Clear the allocated register
14578 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14580 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14582 * linux-low.c (linux_resume): Take a struct thread_resume *
14584 (linux_wait): Update call.
14585 (resume_ptr): New static variable.
14586 (linux_continue_one_thread): Renamed from
14587 linux_continue_one_process. Use resume_ptr.
14588 (linux_resume): Use linux_continue_one_thread.
14589 * server.c (handle_v_cont, handle_v_requests): New functions.
14590 (myresume): New function.
14591 (main): Handle 'v' case.
14592 * target.h (struct thread_resume): New type.
14593 (struct target_ops): Change argument of "resume" to struct
14595 (myresume): Delete macro.
14597 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14599 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14600 (uninstall): Support DESTDIR.
14602 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14604 * configure.srv: Add xscale*linux copy of arm*linux entry.
14606 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14608 * linux-arm-low.c (arm_reinsert_addr): New function.
14609 (the_low_target): Add arm_reinsert_addr.
14611 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14613 * mem-break.c: Remove whitespace at end of file.
14615 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14617 * configure.in: Check whether we need to prototype strerror.
14618 * server.h: Optionally prototype strerror.
14619 * gdbreplay.c (perror_with_name): Use strerror.
14620 * linux-low.c (linux_attach_lwp): Use strerror.
14621 * utils.c (perror_with_name): Use strerror.
14622 * config.in, configure: Regenerated.
14624 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14626 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14627 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14629 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14631 * Makefile.in (SFILES): Update.
14632 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14633 low-sun3.c: Remove files.
14635 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14637 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14638 (linux_detach_one_process, linux_detach): New functions.
14639 (linux_target_ops): Add linux_detach.
14640 * server.c (main): Handle 'D' packet.
14641 * target.h (struct target_ops): Add "detach" member.
14642 (detach_inferior): Define.
14644 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14646 From Kelley Cook <kelleycook@wideopenwest.com>:
14647 * configure.srv: Accept i[34567]86 variants.
14649 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14651 * linux-low.c (linux_wait_for_event): Correct comment typos.
14652 (linux_resume_one_process): Call check_removed_breakpoint.
14653 (linux_send_signal): New function.
14654 (linux_target_ops): Add linux_send_signal.
14655 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14657 * target.h (struct target_ops): Add send_signal.
14659 2003-05-29 Jim Blandy <jimb@redhat.com>
14661 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14662 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14663 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14664 away part of the register's value.
14666 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14668 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14669 (linux_wait_for_event, linux_init_signals): Likewise.
14671 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14673 * configure.in: Check for stdlib.h.
14674 * configure: Regenerated.
14675 * config.in: Regenerated.
14677 2003-01-04 Andreas Schwab <schwab@suse.de>
14679 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14681 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14683 * Makefile.in: Remove obsolete code.
14685 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14687 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14688 defined(PT_FPR0_HI).
14690 2002-11-17 Stuart Hughes <seh@zee2.com>
14692 * linux-arm-low.c (arm_num_regs): Increase.
14693 (arm_regmap): Include status register.
14695 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14697 * linux-low.c (register_addr): Remove incorrect -1 check.
14699 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14701 * linux-low.c (linux_create_inferior): Call setpgid. Return
14703 (unstopped_p, linux_signal_pid): Remove.
14704 (linux_target_ops): Remove linux_signal_pid.
14705 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14706 global instead of target method.
14707 * target.h (struct target_ops): Remove signal_pid. Update comment
14708 for create_inferior.
14709 * server.c (signal_pid): New variable.
14710 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14711 gdbserver. Set the child to be the foreground process group.
14712 (attach_inferior): Set signal_pid.
14714 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14716 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14718 2002-08-20 Jim Blandy <jimb@redhat.com>
14720 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14723 2002-08-01 Andrew Cagney <cagney@redhat.com>
14725 * Makefile.in: Make chill references obsolete.
14727 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14729 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14730 * configure: Regenerate.
14731 * config.in: Regenerate.
14733 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14735 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14736 (perror_with_name, remote_close, remote_open, expect, play): Static.
14738 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14740 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14741 byte offsets instead of an array of indexes.
14742 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14744 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14746 * regcache.c: Add comment.
14748 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14750 * thread-db.c: New file.
14751 * proc-service.c: New file.
14752 * acinclude.m4: New file.
14753 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14754 proc-service.o, and thread-db.o.
14755 (linux-low.o): Add USE_THREAD_DB.
14756 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14757 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14758 * aclocal.m4: Regenerated.
14759 * config.in: Regenerated.
14760 * configure: Regenerated.
14761 * configure.in: Check for proc_service.h, sys/procfs.h,
14762 thread_db.h, and linux/elf.h headrs.
14763 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14764 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14765 Check for -lthread_db and thread support.
14766 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14767 PowerPC, and SuperH.
14768 * i387-fp.c: Constify arguments.
14769 * i387-fp.h: Likewise.
14770 * inferiors.c: (struct thread_info): Renamed from
14771 `struct inferior_info'. Remove PID member. Use generic inferior
14772 list header. All uses updated.
14773 (inferiors, signal_pid): Removed.
14774 (all_threads): New variable.
14775 (get_thread): Define.
14776 (add_inferior_to_list): New function.
14777 (for_each_inferior): New function.
14778 (change_inferior_id): New function.
14779 (add_inferior): Removed.
14780 (remove_inferior): New function.
14781 (add_thread): New function.
14782 (free_one_thread): New function.
14783 (remove_thread): New function.
14784 (clear_inferiors): Use for_each_inferior and free_one_thread.
14785 (find_inferior): New function.
14786 (find_inferior_id): New function.
14787 (inferior_target_data): Update argument type.
14788 (set_inferior_target_data): Likewise.
14789 (inferior_regcache_data): Likewise.
14790 (set_inferior_regcache_data): Likewise.
14791 * linux-low.c (linux_bp_reinsert): Remove.
14792 (all_processes, stopping_threads, using_thrads)
14793 (struct pending_signals, debug_threads, pid_of): New.
14794 (inferior_pid): Replace with macro.
14795 (struct inferior_linux_data): Remove.
14796 (get_stop_pc, add_process): New functions.
14797 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14798 Use add_process and add_thread.
14799 (linux_attach_lwp): New function, based on old linux_attach. Use
14800 add_process and add_thread. Set stop_expected for new threads.
14801 (linux_attach): New function.
14802 (linux_kill_one_process): New function.
14803 (linux_kill): Kill all LWPs.
14804 (linux_thread_alive): Use find_inferior_id.
14805 (check_removed_breakpoints, status_pending_p): New functions.
14806 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14807 Update. Use WNOHANG. Wait for cloned processes also. Update process
14808 struct for the found process.
14809 (linux_wait_for_event): New function.
14810 (linux_wait): Use it. Support LWPs.
14811 (send_sigstop, wait_for_sigstop, stop_all_processes)
14812 (linux_resume_one_process, linux_continue_one_process): New functions.
14813 (linux_resume): Support LWPs.
14814 (REGISTER_RAW_SIZE): Remove.
14815 (fetch_register): Use register_size instead. Call supply_register.
14816 (usr_store_inferior_registers): Likewise. Call collect_register.
14817 Fix recursive case.
14818 (regsets_fetch_inferior_registers): Improve error message.
14819 (regsets_store_inferior_registers): Add debugging.
14820 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14821 (unstopped_p, linux_signal_pid): New functions.
14822 (linux_target_ops): Add linux_signal_pid.
14823 (linux_init_signals): New function.
14824 (initialize_low): Call it. Initialize using_threads.
14825 * regcache.c (inferior_regcache_data): Add valid
14827 (get_regcache): Fetch registers lazily. Add fetch argument
14828 and update all callers.
14829 (regcache_invalidate_one, regcache_invalidate): New
14831 (new_register_cache): Renamed from create_register_cache.
14832 Return the new regcache.
14833 (free_register_cache): Change argument to a void *.
14834 (registers_to_string, registers_from_string): Call get_regcache
14835 with fetch flag set.
14836 (register_data): Make static. Pass fetch flag to get_regcache.
14837 (supply_register): Call get_regcache with fetch flag clear.
14838 (collect_register): Call get_regcache with fetch flag set.
14839 (collect_register_as_string): New function.
14840 * regcache.h: Update.
14841 * remote-utils.c (putpkt): Flush after debug output and use
14843 Handle input interrupts while waiting for an ACK.
14844 (input_interrupt): Use signal_pid method.
14845 (getpkt): Flush after debug output and use stderr.
14846 (outreg): Use collect_register_as_string.
14847 (new_thread_notify, dead_thread_notify): New functions.
14848 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14849 and general_thread.
14850 (look_up_one_symbol): Flush after debug output.
14851 * server.c (step_thread, server_waiting): New variables.
14852 (start_inferior): Don't use signal_pid. Update call to mywait.
14853 (attach_inferior): Update call to mywait.
14854 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14855 (main): Don't fetch/store registers explicitly. Use
14856 set_desired_inferior. Support proposed ``Hs'' packet. Update
14858 * server.h: Update.
14859 (struct inferior_list, struct_inferior_list_entry): New.
14860 * target.c (set_desired_inferior): New.
14861 (write_inferior_memory): Constify.
14862 (mywait): New function.
14863 * target.h: Update.
14864 (struct target_ops): New signal_pid method.
14865 (mywait): Removed macro, added prototype.
14867 * linux-low.h (regset_func): Removed.
14868 (regset_fill_func, regset_store_func): New.
14869 (enum regset_type): New.
14870 (struct regset_info): Add type field. Use new operation types.
14871 (struct linux_target_ops): stop_pc renamed to get_pc.
14872 Add decr_pc_after_break and breakpoint_at.
14873 (get_process, get_thread_proess, get_process_thread)
14874 (strut process_info, all_processes, linux_attach_lwp)
14875 (thread_db_init): New.
14877 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14878 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14879 (the_low_target): Add new members.
14880 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14881 (i386_store_fpxregset): Constify.
14882 (target_regsets): Add new kind identifier.
14883 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14884 (i386_set_pc): Add debugging.
14885 (i386_breakpoint_at): New function.
14886 (the_low_target): Add new members.
14887 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14888 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14889 (mips_breakpoint_at): New.
14890 (the_low_target): Add new members.
14891 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14892 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14893 (the_low_target): Add new members.
14894 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14895 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14896 (the_low_target): Add new members.
14897 * linux-x86-64-low.c (target_regsets): Add new kind
14900 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14902 From Martin Pool <mbp@samba.org>:
14903 * server.c (gdbserver_usage): New function.
14906 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14908 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14909 stop_at -> stop_pc.
14911 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14913 * Makefile.in: Remove obsolete code.
14915 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14917 * linux-low.c (regsets_fetch_inferior_registers),
14918 (regsets_store_inferior_registers): Removed cast to int from
14920 * regcache.h: Added declaration of struct inferior_info.
14922 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14924 * inferiors.c (struct inferior_info): Add regcache_data.
14925 (add_inferior): Call create_register_cache.
14926 (clear_inferiors): Call free_register_cache.
14927 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14928 * regcache.c (struct inferior_regcache_data): New.
14929 (registers): Remove.
14930 (get_regcache): New function.
14931 (create_register_cache, free_register_cache): New functions.
14932 (set_register_cache): Don't initialize the register cache here.
14933 (registers_to_string, registers_from_string, register_data): Call
14935 * regcache.h: Add prototypes.
14936 * server.h: Likewise.
14938 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14940 * mem-break.c: New file.
14941 * mem-break.h: New file.
14942 * Makefile.in: Add mem-break.o rule; update server.h
14944 * inferiors.c (struct inferior_info): Add target_data
14946 (clear_inferiors): Free target_data member if set.
14947 (inferior_target_data, set_inferior_target_data): New functions.
14948 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14949 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14950 * linux-low.c (linux_bp_reinsert): New variable.
14951 (struct inferior_linux_data): New.
14952 (linux_create_inferior): Use set_inferior_target_data.
14953 (linux_attach): Likewise. Call add_inferior.
14954 (linux_wait_for_one_inferior): New function.
14955 (linux_wait): Call it.
14956 (linux_write_memory): Add const.
14957 (initialize_low): Call set_breakpoint_data.
14958 * linux-low.h (struct linux_target_ops): Add breakpoint
14960 * server.c (attach_inferior): Remove extra add_inferior
14962 * server.h: Include mem-break.h. Update inferior.c
14964 * target.c (read_inferior_memory)
14965 (write_inferior_memory): New functions.
14966 * target.h (read_inferior_memory)
14967 (write_inferior_memory): Change macros to prototypes.
14968 (struct target_ops): Update comments. Add const to write_memory
14971 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14973 * linux-low.c (usr_store_inferior_registers): Support
14974 registers which are allowed to fail to store.
14975 * linux-low.h (linux_target_ops): Likewise.
14976 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14977 (ppc_cannot_store_register): FPSCR may not be storable.
14979 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14981 * server.h: Include <string.h> if HAVE_STRING_H.
14982 * ChangeLog: Correct paths in last ChangeLog entry.
14984 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14986 * linux-low.h: Remove obsolete prototypes.
14987 (struct linux_target_ops): New.
14988 (extern the_low_target): New.
14989 * linux-low.c (num_regs, regmap): Remove declarations.
14990 (register_addr): Use the_low_target explicitly.
14991 (fetch_register): Likewise.
14992 (usr_fetch_inferior_registers): Likewise.
14993 (usr_store_inferior_registers): Likewise.
14994 * linux-arm-low.c (num_regs): Remove.
14995 (arm_num_regs): Define.
14996 (arm_regmap): Renamed from regmap, made static.
14997 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14999 (arm_cannot_store_register): Renamed from cannot_store_register,
15001 (the_low_target): New.
15002 * linux-i386-low.c (num_regs): Remove.
15003 (i386_num_regs): Define.
15004 (i386_regmap): Renamed from regmap, made static.
15005 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15007 (i386_cannot_store_register): Renamed from cannot_store_register,
15009 (the_low_target): New.
15010 * linux-ia64-low.c (num_regs): Remove.
15011 (ia64_num_regs): Define.
15012 (ia64_regmap): Renamed from regmap, made static.
15013 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15015 (ia64_cannot_store_register): Renamed from cannot_store_register,
15017 (the_low_target): New.
15018 * linux-m68k-low.c (num_regs): Remove.
15019 (m68k_num_regs): Define.
15020 (m68k_regmap): Renamed from regmap, made static.
15021 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15023 (m68k_cannot_store_register): Renamed from cannot_store_register,
15025 (the_low_target): New.
15026 * linux-mips-low.c (num_regs): Remove.
15027 (mips_num_regs): Define.
15028 (mips_regmap): Renamed from regmap, made static.
15029 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15031 (mips_cannot_store_register): Renamed from cannot_store_register,
15033 (the_low_target): New.
15034 * linux-ppc-low.c (num_regs): Remove.
15035 (ppc_num_regs): Define.
15036 (ppc_regmap): Renamed from regmap, made static.
15037 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15039 (ppc_cannot_store_register): Renamed from cannot_store_register,
15041 (the_low_target): New.
15042 * linux-s390-low.c (num_regs): Remove.
15043 (s390_num_regs): Define.
15044 (s390_regmap): Renamed from regmap, made static.
15045 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15047 (s390_cannot_store_register): Renamed from cannot_store_register,
15049 (the_low_target): New.
15050 * linux-sh-low.c (num_regs): Remove.
15051 (sh_num_regs): Define.
15052 (sh_regmap): Renamed from regmap, made static.
15053 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15055 (sh_cannot_store_register): Renamed from cannot_store_register,
15057 (the_low_target): New.
15058 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15059 (the_low_target): New.
15061 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15063 * Makefile.in: Add stamp-h target.
15064 * configure.in: Create stamp-h.
15065 * configure: Regenerated.
15067 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15069 * inferiors.c: New file.
15070 * target.c: New file.
15071 * target.h: New file.
15072 * Makefile.in: Add target.o and inferiors.o. Update
15074 * linux-low.c (inferior_pid): New static variable,
15075 moved from server.c.
15076 (linux_create_inferior): Renamed from create_inferior.
15077 Call add_inferior. Return 0 on success instead of a PID.
15078 (linux_attach): Renamed from myattach.
15079 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15080 (linux_thread_alive): Renamed from mythread_alive.
15081 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15083 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15084 (regsets_store_inferior_registers): Correct error message.
15085 Add missing ``return 0''.
15086 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15087 (linux_store_registers): Renamed from store_inferior_registers.
15088 (linux_read_memory): Renamed from read_inferior_memory.
15089 (linux_write_memory): Renamed from write_inferior_memory.
15090 (linux_target_ops): New structure.
15091 (initialize_low): Call set_target_ops ().
15092 * remote-utils.c (unhexify): New function.
15093 (hexify): New function.
15094 (input_interrupt): Send signals to ``signal_pid''.
15095 * server.c (inferior_pid): Remove.
15096 (start_inferior): Update create_inferior call.
15097 (attach_inferior): Call add_inferior.
15098 (handle_query): New function.
15099 (main): Call handle_query for `q' packets.
15100 * server.h: Include "target.h". Remove obsolete prototypes.
15101 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15103 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15105 * Makefile.in: Add WARN_CFLAGS. Update configury
15107 * configure.in: Check for <string.h>
15108 * configure: Regenerate.
15109 * config.in: Regenerate.
15110 * gdbreplay.c: Include needed system headers.
15111 (remote_open): Remove strchr prototype.
15112 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15113 * regcache.c (supply_register): Change buf argument to const void *.
15114 (supply_register_by_name): Likewise.
15115 (collect_register): Change buf argument to void *.
15116 (collect_register_by_name): Likewise.
15117 * regcache.h: Add missing prototypes.
15118 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15119 * server.c (handle_query): New function.
15120 (attached): New static variable, moved out of main.
15121 (main): Quiet longjmp clobber warnings.
15122 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15123 * utils.c (error): Remove NORETURN.