1 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3 * linux-low.c (linux_create_inferior): Adjust code to access the
4 environment information via 'gdb_environ' class.
5 * lynx-low.c (lynx_create_inferior): Likewise.
6 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7 (get_environ): Return a pointer to 'our_environ'.
8 (captured_main): Initialize 'our_environ'.
9 * server.h (get_environ): Adjust prototype.
10 * spu-low.c (spu_create_inferior): Adjust code to access the
11 environment information via 'gdb_environ' class.
13 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
15 * linux-low.c (linux_read_memory, linux_write_memory): Remove
16 usage of "register" keyword.
18 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
20 * configure: Re-generate.
22 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
24 * configure: Re-generate.
26 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
28 * Makefile.in (COMPILE.pre): Add "-x c++".
30 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
32 * fork-child.c: Conditionally include <signal.h>.
34 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
36 * server.c (handle_general_set): Handle new packet
38 (handle_query): Add "QStartupWithShell" to the list of supported
40 (gdbserver_usage): Add help text explaining the
41 new "--startup-with-shell" and "--no-startup-with-shell" CLI
43 (captured_main): Recognize and act upon the presence of the new
46 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
47 Pedro Alves <palves@redhat.com>
49 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
50 * configure: Regenerate.
51 * configure.srv (srv_linux_obj): Add "fork-child.o" and
53 (i[34567]86-*-lynxos*): Likewise.
55 * fork-child.c: New file.
56 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
58 (linux_ptrace_fun): New function.
59 (linux_create_inferior): Adjust function prototype to reflect
60 change on "target.h". Adjust function code to use
62 (linux_request_interrupt): Delete "signal_pid".
63 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
64 (lynx_ptrace_fun): New function.
65 (lynx_create_inferior): Adjust function prototype to reflect
66 change on "target.h". Adjust function code to use
68 * nto-low.c (nto_create_inferior): Adjust function prototype and
69 code to reflect change on "target.h". Update comments.
70 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
71 "common-terminal.h" and "environ.h".
72 (terminal_fd): Moved to fork-child.c.
73 (old_foreground_pgrp): Likewise.
74 (restore_old_foreground_pgrp): Likewise.
75 (last_status): Make it global.
76 (last_ptid): Likewise.
77 (our_environ): New variable.
78 (startup_with_shell): Likewise.
79 (program_name): Likewise.
80 (program_argv): Rename to...
81 (program_args): ...this.
82 (wrapper_argv): New variable.
83 (start_inferior): Delete function.
84 (get_exec_wrapper): New function.
85 (get_exec_file): Likewise.
86 (get_environ): Likewise.
87 (prefork_hook): Likewise.
88 (post_fork_inferior): Likewise.
89 (postfork_hook): Likewise.
90 (postfork_child_hook): Likewise.
91 (handle_v_run): Update code to deal with arguments coming from the
92 remote host. Update calls from "start_inferior" to
94 (captured_main): Likewise. Initialize environment variable. Call
96 * server.h (post_fork_inferior): New prototype.
97 (get_environ): Likewise.
98 (last_status): Declare.
99 (last_ptid): Likewise.
100 (signal_pid): Likewise.
101 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
102 (spu_ptrace_fun): New function.
103 (spu_create_inferior): Adjust function prototype to reflect change
104 on "target.h". Adjust function code to use "fork_inferior".
105 * target.c (target_terminal_init): New function.
106 (target_terminal_inferior): Likewise.
107 (target_terminal_ours): Likewise.
108 * target.h: Include <vector>.
109 (struct target_ops) <create_inferior>: Update prototype.
110 (create_inferior): Update macro.
111 * utils.c (gdb_flush_out_err): New function.
112 * win32-low.c (win32_create_inferior): Adjust function prototype
113 and code to reflect change on "target.h".
115 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
117 * inferiors.c (switch_to_thread): New function.
119 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
121 * Makefile.in (SFILE): Add "common/job-control.c".
122 (OBS): Add "job-control.o".
124 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
126 * Makefile: Remove "@host_makefile_frag@".
128 2017-05-05 Pedro Alves <palves@redhat.com>
130 * configure: Regenerate.
132 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
134 * configure: Regenerate.
136 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
138 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
139 software_single_step change of return type to
140 std::vector<CORE_ADDR>.
141 * linux-low.c (install_software_single_step_breakpoints):
143 * linux-low.h (install_software_single_step_breakpoints):
146 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
148 * remote-utils.c: Include "gdb_termios.h" instead of
150 * terminal.h: Delete file.
152 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
154 * server.c: Include <vector>.
155 <program_argv, wrapper_argv>: Convert to std::vector.
156 (start_inferior): Rewrite function to use C++.
157 (handle_v_run): Likewise. Update code that calculates the argv
158 based on the vRun packet; use C++.
159 (captured_main): Likewise.
161 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
163 * server.c (handle_v_cont): Initialize thread_resume::thread
166 2017-04-05 Pedro Alves <palves@redhat.com>
168 * configure: Regenerate.
170 2017-04-05 Pedro Alves <palves@redhat.com>
172 * gdbreplay.c (sync_error): Constify.
173 * linux-x86-low.c (push_opcode): Constify.
175 2017-04-05 Pedro Alves <palves@redhat.com>
177 * win32-low.c (get_child_debug_event)
178 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
179 Report TARGET_WAITKIND_SPURIOUS instead.
181 2017-04-05 Pedro Alves <palves@redhat.com>
183 * remote-utils.c (remote_prepare, remote_open): Constify.
184 * remote-utils.h (remote_prepare, remote_open): Constify.
185 * server.c (captured_main): Constify 'port' handling.
187 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
189 * Makefile.in (clean): Clear .deps.
191 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
193 * .gitignore: Remove generated files, replace with wildcard.
194 * (clean): Replace removal of generated files with wildcard.
195 (version.c): Replace with...
196 (version-generated.c): ...this.
197 (xml-builtin.c): Replace with...
198 (xml-builtin-generated.c): ...this.
199 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
200 (%.c: *regformats*): Replace with...
201 (%-generated.c: *regformats*): ...this.
203 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
205 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
206 (xtensa_fill_gregset): Call collect_register_by_name for
208 (xtensa_store_gregset): Call supply_register_by_name for
211 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
213 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
214 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
215 (xtensa_store_gregset): Call supply_register for all registers in
216 a0_regnum..a0_regnum + C0_NREGS range.
218 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
220 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
221 (ax-ipa.o: ax.c): Remove.
222 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
223 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
224 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
225 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
226 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
228 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
230 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
231 (print-utils-ipa.o: ../common/print-utils.c): Remove.
232 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
233 (errors-ipa.o: ../common/errors.c): Remove.
234 (format-ipa.o: ../common/format.c): Remove.
235 (common-utils-ipa.o: ../common/common-utils.c): Remove.
237 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
239 * Makefile.in (%-ipa.o: %.c): New rule.
240 (tracepoint-ipa.o: tracepoint.c): Remove.
241 (utils-ipa.o: utils.c): Remove.
242 (remote-utils-ipa.o: remote-utils.c): Remove.
243 (regcache-ipa.o: regcache.c): Remove.
244 (i386-linux-ipa.o: i386-linux.c): Remove.
245 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
246 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
247 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
248 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
249 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
250 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
251 (amd64-linux-ipa.o: amd64-linux.c): Remove.
252 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
253 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
254 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
255 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
256 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
257 (aarch64-ipa.o: aarch64.c): Remove.
258 (s390-linux32-ipa.o: s390-linux32.c): Remove.
259 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
260 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
261 (s390-linux64-ipa.o: s390-linux64.c): Remove.
262 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
263 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
264 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
265 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
266 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
267 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
268 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
269 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
270 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
271 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
272 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
273 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
274 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
275 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
276 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
277 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
278 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
279 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
280 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
281 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
282 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
283 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
284 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
285 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
286 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
287 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
288 (tdesc-ipa.o: tdesc.c): Remove.
289 (x32-linux-ipa.o: x32-linux.c): Remove.
290 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
291 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
293 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
295 * Makefile.in (%.o: ../arch/%.c): New rule.
296 (arm.o: ../arch/arm.c): Remove.
297 (arm-linux.o: ../arch/arm-linux.c): Remove.
298 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
299 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
301 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
303 * Makefile.in (%.o: ../nat/%.c): New rule.
304 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
305 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
306 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
307 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
308 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
309 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
310 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
311 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
312 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
313 (linux-personality.o: ../nat/linux-personality.c): Remove.
314 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
315 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
316 (x86-linux.o: ../nat/x86-linux.c): Remove.
317 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
318 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
320 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
322 * Makefile.in (%.o: ../common/%.c): New rule.
323 (signals.o: ../common/signals.c): Remove.
324 (print-utils.o: ../common/print-utils.c): Remove.
325 (rsp-low.o: ../common/rsp-low.c): Remove.
326 (common-utils.o: ../common/common-utils.c): Remove.
327 (posix-strerror.o: ../common/posix-strerror.c): Remove.
328 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
329 (vec.o: ../common/vec.c): Remove.
330 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
331 (xml-utils.o: ../common/xml-utils.c): Remove.
332 (ptid.o: ../common/ptid.c): Remove.
333 (buffer.o: ../common/buffer.c): Remove.
334 (format.o: ../common/format.c): Remove.
335 (filestuff.o: ../common/filestuff.c): Remove.
336 (agent.o: ../common/agent.c): Remove.
337 (errors.o: ../common/errors.c): Remove.
338 (environ.o: ../common/environ.c): Remove.
339 (common-debug.o: ../common/common-debug.c): Remove.
340 (cleanups.o: ../common/cleanups.c): Remove.
341 (common-exceptions.o: ../common/common-exceptions.c): Remove.
342 (fileio.o: ../common/fileio.c): Remove.
343 (common-regcache.o: ../common/common-regcache.c): Remove.
344 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
345 (new-op.o: ../common/new-op.c): Remove.
346 (btrace-common.o: ../common/btrace-common.c): Remove.
348 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
350 * Makefile.in (%.o: ../target/%.c): New rule.
351 (waitstatus.o: ../target/waitstatus.c): Remove.
353 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
356 (%.c: ../regformats/%.dat,
357 (%.c: ../regformats/arm/%.dat,
358 (%.c: ../regformats/i386/%.dat,
359 (%.c: ../regformats/rs6000/%.dat): New rules.
362 (arm-with-iwmmxt.c): Remove.
363 (arm-with-vfpv2.c): Remove.
364 (arm-with-vfpv3.c): Remove.
365 (arm-with-neon.c): Remove.
366 (reg-bfin.c): Remove.
367 (reg-cris.c): Remove.
368 (reg-crisv32.c): Remove.
370 (i386-linux.c): Remove.
371 (i386-avx.c): Remove.
372 (i386-avx-linux.c): Remove.
373 (i386-avx-avx512.c): Remove.
374 (i386-avx-avx512-linux.c): Remove.
375 (i386-mpx.c): Remove.
376 (i386-mpx-linux.c): Remove.
377 (i386-avx-mpx-avx512-pku.c): Remove.
378 (i386-avx-mpx-avx512-pku-linux.c): Remove.
379 (i386-avx-mpx.c): Remove.
380 (i386-avx-mpx-linux.c): Remove.
381 (i386-mmx.c): Remove.
382 (i386-mmx-linux.c): Remove.
383 (reg-ia64.c): Remove.
384 (reg-m32r.c): Remove.
385 (reg-m68k.c): Remove.
387 (mips-linux.c): Remove.
388 (mips-dsp-linux.c): Remove.
389 (mips64-linux.c): Remove.
390 (mips64-dsp-linux.c): Remove.
391 (nios2-linux.c): Remove.
392 (powerpc-32.c): Remove.
393 (powerpc-32l.c): Remove.
394 (powerpc-altivec32l.c): Remove.
395 (powerpc-cell32l.c): Remove.
396 (powerpc-vsx32l.c): Remove.
397 (powerpc-isa205-32l.c): Remove.
398 (powerpc-isa205-altivec32l.c): Remove.
399 (powerpc-isa205-vsx32l.c): Remove.
400 (powerpc-e500l.c): Remove.
401 (powerpc-64l.c): Remove.
402 (powerpc-altivec64l.c): Remove.
403 (powerpc-cell64l.c): Remove.
404 (powerpc-vsx64l.c): Remove.
405 (powerpc-isa205-64l.c): Remove.
406 (powerpc-isa205-altivec64l.c): Remove.
407 (powerpc-isa205-vsx64l.c): Remove.
408 (s390-linux32.c): Remove.
409 (s390-linux32v1.c): Remove.
410 (s390-linux32v2.c): Remove.
411 (s390-linux64.c): Remove.
412 (s390-linux64v1.c): Remove.
413 (s390-linux64v2.c): Remove.
414 (s390-te-linux64.c): Remove.
415 (s390-vx-linux64.c): Remove.
416 (s390-tevx-linux64.c): Remove.
417 (s390x-linux64.c): Remove.
418 (s390x-linux64v1.c): Remove.
419 (s390x-linux64v2.c): Remove.
420 (s390x-te-linux64.c): Remove.
421 (s390x-vx-linux64.c): Remove.
422 (s390x-tevx-linux64.c): Remove.
423 (tic6x-c64xp-linux.c): Remove.
424 (tic6x-c64x-linux.c): Remove.
425 (tic6x-c62x-linux.c): Remove.
427 (reg-sparc64.c): Remove.
430 (amd64-linux.c): Remove.
431 (amd64-avx.c): Remove.
432 (amd64-avx-linux.c): Remove.
433 (amd64-avx-avx512.c): Remove.
434 (amd64-avx-avx512-linux.c): Remove.
435 (amd64-mpx.c): Remove.
436 (amd64-mpx-linux.c): Remove.
437 (amd64-avx-mpx-avx512-pku.c): Remove.
438 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
439 (amd64-avx-mpx.c): Remove.
440 (amd64-avx-mpx-linux.c): Remove.
442 (x32-linux.c): Remove.
444 (x32-avx-linux.c): Remove.
445 (x32-avx-avx512.c): Remove.
446 (x32-avx-avx512-linux.c): Remove.
447 (reg-xtensa.c): Remove.
448 (reg-tilegx.c): Remove.
449 (reg-tilegx32.c): Remove.
451 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
453 * Makefile.in (SFILES): Add "common/environ.c".
454 (OBJS): Add "common/environ.h".
456 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
458 * configure.ac: Check if the fs_base and gs_base members of
459 `struct user_regs_struct' exist.
460 * config.in: Regenerated.
461 * configure: Likewise.
463 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
465 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
467 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
468 (get_next_pcs_syscall_next_pc): Likewise.
470 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
472 * win32-i386-low.c: Fix incorrect reference to a couple source files.
473 * nto-x86-low.c: Likewise.
475 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
477 * Makefile.in: Include disable-implicit-rules.mk.
479 2016-11-23 Pedro Alves <palves@redhat.com>
481 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
482 (debug_vprintf): Use std::chrono::steady_clock instead of
483 gettimeofday. Use '.' instead of ':'.
484 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
485 (get_timestamp): Use std::chrono::steady_clock instead of
488 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
490 * Makefile.in: Fix whitespace formatting.
492 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
494 * Makefile.in (SFILES, OBS): Flatten list and order
497 2016-11-23 Pedro Alves <palves@redhat.com>
499 * event-loop.c (handle_file_event): Use warning.
500 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
501 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
504 2016-11-23 Pedro Alves <palves@redhat.com>
506 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
508 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
509 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
510 debug_printf and debug_flush for debug output.
511 * server.c (handle_general_set): Likewise.
512 * thread-db.c (try_thread_db_load): Use debug_printf for debug
515 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
517 * Makefile.in (.c.o): Replace rule with ...
518 (%.o: %.c): ... this one.
520 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
522 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
523 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
525 * configure.ac: Remove checks for the make program.
526 * configure: Re-generate.
528 2016-10-28 Pedro Alves <palves@redhat.com>
530 * Makefile.in (CXX_DIALECT): Get from configure.
531 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
532 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
533 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
534 * config.in: Regenerate.
535 * configure: Regenerate.
537 2016-10-27 Yao Qi <yao.qi@linaro.org>
539 * linux-low.c (linux_supports_range_stepping): Return true if
540 can_software_single_step return true.
542 2016-10-27 Yao Qi <yao.qi@linaro.org>
544 * inferiors.c (find_inferior_in_random): New function.
545 * inferiors.h (find_inferior_in_random): Declare.
546 * linux-low.c (linux_wait_for_event_filtered): Call
547 find_inferior_in_random instead of find_inferior.
549 2016-10-27 Yao Qi <yao.qi@linaro.org>
551 * linux-low.c (linux_wait_1): If single-step breakpoints are
552 inserted, remove them.
554 2016-10-26 Pedro Alves <palves@redhat.com>
556 * linux-low.c (handle_extended_wait): Link parent/child fork
558 (linux_wait_1): Unlink them.
559 (linux_set_resume_request): Ignore resume requests for
560 already-resumed and unhandled fork child threads.
561 * linux-low.h (struct lwp_info) <fork_relative>: New field.
562 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
564 (handle_v_requests) <vCont>: Don't call require_running.
565 * server.h (in_queued_stop_replies): New declaration.
567 2016-10-24 Yao Qi <yao.qi@linaro.org>
570 * linux-aarch64-low.c (append_insns): Cast the return value to
573 2016-10-10 Yao Qi <yao.qi@linaro.org>
575 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
577 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
579 * target.c (target_supports_multi_process): New function, moved
581 * target.h (target_supports_multi_process): ... here. Remove
584 2016-10-05 Tom Tromey <tom@tromey.com>
587 * tracepoint.c (handle_tracepoint_bkpts): Check
588 ipa_error_tracepoint, not ipa_stopping_tracepoint.
590 2016-10-05 Yao Qi <yao.qi@linaro.org>
592 * configure.srv: Update the path of arm-*.xml files.
594 2016-10-05 Terry Guo <terry.guo@arm.com>
595 Yao Qi <yao.qi@linaro.org>
597 * Makefile.in: Adjust the path of rules.
598 * configure.srv: Update the path of xml files.
599 * regformats/arm-with-iwmmxt.dat: Regenerated.
600 * regformats/arm-with-neon.dat: Likewise.
601 * regformats/arm-with-vfpv2.dat: Likewise.
602 * regformats/arm-with-vfpv3.dat Likewise.
604 2016-09-30 Yao Qi <yao.qi@linaro.org>
607 * target.c (target_stop_and_wait): Don't call
608 target_continue_no_signal, use resume_stop instead.
610 2016-09-26 Yao Qi <yao.qi@linaro.org>
612 * linux-low.c (linux_wait_1): Call debug_exit.
614 2016-09-23 Pedro Alves <palves@redhat.com>
616 * Makefile.in (SFILES): Add common/new-op.c.
617 (OBS): Add common/new-op.o.
618 (new-op.o): New rule.
620 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
622 * .gitinore: Ignore more files.
624 2016-09-21 Yao Qi <yao.qi@linaro.org>
626 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
629 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
631 * server.c (start_inferior): Call target_mourn_inferior instead of
632 mourn_inferior; pass ptid_t argument to it.
634 (handle_target_event): Likewise.
635 * target.c (target_mourn_inferior): New function.
636 * target.h (mourn_inferior): Delete macro.
638 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
640 * linux-low.c (lwp_is_stepping): New function.
642 2016-09-06 Carl Love <cel@us.ibm.com>
644 * server.c (start_inferior): Fixed comment, requested comment change
645 didn't get updated correctly. Removed reference to ptrace () call as
646 it is only true on Linux systems.
648 2016-09-06 Carl Love <cel@us.ibm.com>
650 * server.c (start_inferior): Do not call
651 function target_post_create_inferior () if the
652 inferior process has already exited.
654 2016-09-05 Pedro Alves <palves@redhat.com>
656 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
657 (COMPILE.pre, CC_LD): Use CXX directly.
658 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
659 * acinclude.m4: Don't include build-with-cxx.m4.
660 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
661 * configure: Regenerate.
663 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
666 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
667 call writing data to own_buf.
669 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
671 * target.c (mywait): Call target_wait instead of
673 (target_wait): New function.
675 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
677 * server.c (start_inferior): New variable 'ptid'. Replace calls
678 to the_target->resume by target_continue{,_no_signal}, depending
680 * target.c (target_stop_and_wait): Call target_continue_no_signal
681 instead of the_target->resume.
682 (target_continue): New function.
684 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
686 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
688 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
691 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
693 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
694 * linux-arm-low.c (ps_get_thread_area): Likewise.
695 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
696 * linux-m68k-low.c (ps_get_thread_area): Likewise.
697 * linux-mips-low.c (ps_get_thread_area): Likewise.
698 * linux-nios2-low.c (ps_get_thread_area): Likewise.
699 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
700 * linux-x86-low.c (ps_get_thread_area): Likewise.
701 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
703 2016-08-19 Pedro Alves <palves@redhat.com>
705 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
707 2016-08-19 Pedro Alves <palves@redhat.com>
709 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
710 comment. Use memcpy instead of casting through unsigned long.
712 2016-08-19 Pedro Alves <palves@redhat.com>
714 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
715 allocating around 0x80000000.
717 2016-08-19 Pedro Alves <palves@redhat.com>
720 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
721 (x32-avx512-linux-ipa.o): New rules.
722 * configure.ac (x86_64-*-linux*): New x32 check.
723 * configure.srv (ipa_x32_linux_regobj): New.
724 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
725 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
727 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
729 * configure: Regenerate.
731 2016-08-09 Pedro Alves <palves@redhat.com>
734 * Makefile.in (OBS): Add signals-state-save-restore.o.
735 (signals-state-save-restore.o): New rule.
736 * config.in: Regenerate.
737 * configure: Regenerate.
738 * linux-low.c: Include "signals-state-save-restore.h".
739 (linux_create_inferior): Call
740 restore_original_signals_state.
741 * server.c: Include "dispositions-save-restore.h".
742 (captured_main): Call save_original_signals_state.
744 2016-08-05 Pedro Alves <palves@redhat.com>
746 * configure: Regenerate.
748 2016-08-04 Yao Qi <yao.qi@linaro.org>
750 * linux-low.c (regsets_fetch_inferior_registers): Check
751 errno is ESRCH or not.
753 2016-08-02 Yao Qi <yao.qi@linaro.org>
755 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
756 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
757 (thread_db_load_search): Update.
758 (try_thread_db_load_1): Don't look for td_ta_event_addr,
759 td_ta_set_event and td_ta_event_getmsg.
761 2016-07-26 Pedro Alves <palves@redhat.com>
764 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
765 of unsigned long for 64-bit registers and use uint32_t instead of
766 unsigned int for 32-bit registers.
768 2016-07-26 Pedro Alves <palves@redhat.com>
770 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
773 2016-07-21 Tom Tromey <tom@tromey.com>
775 * configure: Rebuild.
777 2016-07-21 Yao Qi <yao.qi@linaro.org>
779 * mem-break.c (find_gdb_breakpoint): Cast bp to
780 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
782 2016-07-21 Yao Qi <yao.qi@linaro.org>
784 * server.c (handle_v_requests): Support s and S actions
785 if target_supports_software_single_step return true.
787 2016-07-21 Yao Qi <yao.qi@linaro.org>
789 * linux-low.c (resume_stopped_resumed_lwps): If resume request
790 is resume_step, call maybe_hw_step.
791 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
793 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
795 (proceed_one_lwp): If resume request is resume_step, install
796 reinsert breakpoints and call maybe_hw_step.
798 2016-07-21 Yao Qi <yao.qi@linaro.org>
800 * linux-low.c (proceed_one_lwp): Declare.
801 (linux_resume_one_thread): Remove local variable 'step'.
802 Lift code enqueue signal. Call proceed_one_lwp instead of
803 linux_resume_one_lwp.
805 2016-07-21 Yao Qi <yao.qi@linaro.org>
807 * linux-low.c (linux_resume_one_thread): Call
808 enqueue_pending_signal.
810 2016-07-21 Yao Qi <yao.qi@linaro.org>
812 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
813 * inferiors.c (do_restore_current_thread_cleanup): New function.
814 (make_cleanup_restore_current_thread): Likewise.
815 * linux-low.c (install_software_single_step_breakpoints): Call
816 make_cleanup_restore_current_thread. Switch current_thread to
819 2016-07-21 Yao Qi <yao.qi@linaro.org>
821 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
822 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
823 (clone_one_breakpoint): Likewise.
824 (delete_reinsert_breakpoints): Change parameter to thread.
826 (has_reinsert_breakpoints): Likewise.
827 (uninsert_reinsert_breakpoints): Likewise.
828 (reinsert_reinsert_breakpoints): Likewise.
829 * mem-break.h (set_reinsert_breakpoint): Update declaration.
830 (delete_reinsert_breakpoints): Likewise.
831 (reinsert_reinsert_breakpoints): Likewise.
832 (uninsert_reinsert_breakpoints): Likewise.
833 (has_reinsert_breakpoints): Likewise.
835 2016-07-21 Yao Qi <yao.qi@linaro.org>
837 * inferiors.c (get_thread_process): Make parameter const.
838 * inferiors.h (get_thread_process): Update declaration.
839 * mem-break.c (clone_all_breakpoints): Remove all parameters.
840 Add new parameters child_thread and parent_thread. Callers
842 * mem-break.h (clone_all_breakpoints): Update declaration.
844 2016-07-21 Yao Qi <yao.qi@linaro.org>
846 * mem-break.c (struct breakpoint) <cond_list>: Remove.
847 <command_list, handler>: Remove.
848 (struct gdb_breakpoint): New.
849 (struct other_breakpoint): New.
850 (struct reinsert_breakpoint): New.
851 (is_gdb_breakpoint): New function.
852 (any_persistent_commands): Update command_list if
853 is_gdb_breakpoint returns true.
854 (set_breakpoint): Create breakpoints according to their types.
855 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
856 (set_gdb_breakpoint_1): Likewise.
857 (set_gdb_breakpoint): Likewise.
858 (clear_breakpoint_conditions): Change parameter type to
859 'struct gdb_breakpoint *'.
860 (clear_breakpoint_commands): Likewise.
861 (clear_breakpoint_conditions_and_commands): Likewise.
862 (add_condition_to_breakpoint): Likewise.
863 (add_breakpoint_condition): Likewise.
864 (add_commands_to_breakpoint): Likewise.
865 (check_breakpoints): Check other_breakpoint.
866 (clone_one_breakpoint): Clone breakpopint according to its type.
867 * mem-break.h (struct gdb_breakpoint): Declare.
868 (set_gdb_breakpoint): Update declaration.
869 (clear_breakpoint_conditions_and_commands): Likewise.
870 (add_breakpoint_condition): Likewise.
871 (add_breakpoint_commands): Likewise.
872 * server.c (process_point_options): Change parameter type to
873 'struct gdb_breakpoint *'.
875 2016-07-21 Yao Qi <yao.qi@linaro.org>
877 * mem-break.c (set_breakpoint_at): Rename it to ...
878 (set_breakpoint_type_at): ... it.
879 (set_breakpoint_at): Call set_breakpoint_type_at.
880 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
881 * mem-break.h (set_breakpoint_at): Update comments.
883 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
885 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
887 (nios2_store_gregset): Likewise.
889 2016-07-01 Pedro Alves <palves@redhat.com>
890 Antoine Tremblay <antoine.tremblay@ericsson.com>
892 * linux-low.c: Change interface to take the target lwp_info
893 pointer directly and return void. Handle detaching from a zombie
895 (linux_detach_lwp_callback): New function.
896 (linux_detach): Detach from the leader thread after detaching from
899 2016-06-28 Yao Qi <yao.qi@linaro.org>
901 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
902 for variable new_offset.
903 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
904 (aarch64_ftrace_insn_reloc_cb): Likewise.
905 (aarch64_ftrace_insn_reloc_tb): Likewise.
906 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
907 PRIx64 instead of PRIx32.
909 2016-06-28 Yao Qi <yao.qi@linaro.org>
911 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
912 (the_low_target): Install arm_get_syscall_trapinfo.
914 2016-06-28 Yao Qi <yao.qi@linaro.org>
916 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
918 (the_low_target): Install aarch64_get_syscall_trapinfo.
920 2016-06-28 Yao Qi <yao.qi@linaro.org>
922 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
924 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
925 Remove parameter sysno.
926 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
929 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
931 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
932 (s390_emit_ne_goto): Likewise.
933 (s390_emit_lt_goto): Likewise.
934 (s390_emit_le_goto): Likewise.
935 (s390_emit_gt_goto): Likewise.
936 (s390_emit_ge_goto): Likewise.
937 (s390x_emit_eq_goto): Likewise.
938 (s390x_emit_ne_goto): Likewise.
939 (s390x_emit_lt_goto): Likewise.
940 (s390x_emit_le_goto): Likewise.
941 (s390x_emit_gt_goto): Likewise.
942 (s390x_emit_ge_goto): Likewise.
943 (s390_emit_ops_impl): Mark variable static.
944 (s390x_emit_ops): Likewise.
946 2016-06-17 Yao Qi <yao.qi@linaro.org>
948 * linux-low.c (handle_extended_wait): Call
949 uninsert_reinsert_breakpoints for the parent process. Remove
950 reinsert breakpoints from the child process. Reinsert them to
951 the parent process when vfork is done.
952 * mem-break.c (uninsert_reinsert_breakpoints): New function.
953 (reinsert_reinsert_breakpoints): New function.
954 * mem-break.h (uninsert_reinsert_breakpoints): Declare
955 (reinsert_reinsert_breakpoints): Declare.
957 2016-06-17 Yao Qi <yao.qi@linaro.org>
959 * linux-low.c (handle_extended_wait): If the parent is doing
960 step-over, remove the reinsert breakpoints from the forked child.
962 2016-06-17 Yao Qi <yao.qi@linaro.org>
964 * linux-low.c (unsuspend_all_lwps): Declare.
965 (linux_low_filter_event): If thread exited, call finish_step_over.
966 If step-over is finished, unsuspend other threads.
968 2016-06-17 Yao Qi <yao.qi@linaro.org>
970 * linux-low.c (linux_resume_one_lwp_throw): Assert
971 has_reinsert_breakpoints returns false.
972 * mem-break.c (delete_disabled_breakpoints): Assert
973 bp type isn't reinsert_breakpoint.
975 2016-06-17 Yao Qi <yao.qi@linaro.org>
977 * linux-low.c (maybe_hw_step): New function.
978 (linux_resume_one_lwp_throw): Call maybe_hw_step.
979 (finish_step_over): Switch current_thread to lwp temporarily,
980 and assert has_reinsert_breakpoints returns true.
981 (proceed_one_lwp): Call maybe_hw_step.
982 * mem-break.c (has_reinsert_breakpoints): New function.
983 * mem-break.h (has_reinsert_breakpoints): Declare.
985 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
987 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
989 2016-05-17 Yao Qi <yao.qi@linaro.org>
991 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
992 instead of find_inferior.
994 2016-05-05 Yao Qi <yao.qi@linaro.org>
996 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
997 Initialize res to zero.
999 2016-05-05 Yao Qi <yao.qi@linaro.org>
1001 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1004 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1006 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1007 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1008 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1010 2016-04-28 Par Olsson <par.olsson@windriver.com>
1011 Simon Marchi <simon.marchi@ericsson.com>
1013 * tracepoint.c (write_inferior_int8): New function.
1014 (cmd_qtenable_disable): Write enable flag using
1015 write_inferior_int8.
1017 2016-04-25 Yao Qi <yao.qi@linaro.org>
1019 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1020 (need_step_over_p): Return zero if the LWP has pending signals
1021 can be delivered on software single step target.
1023 2016-04-25 Yao Qi <yao.qi@linaro.org>
1025 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1026 return instead of error.
1028 2016-04-22 Yao Qi <yao.qi@linaro.org>
1030 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1033 2016-04-22 Yao Qi <yao.qi@linaro.org>
1035 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1036 signal when stepping over breakpoint with software single
1039 2016-04-21 Pedro Alves <palves@redhat.com>
1041 * linux-s390-low.c (s390_collect_ptrace_register)
1042 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1044 (s390_check_regset): Use void * instead of gdb_byte *.
1046 2016-04-20 Pedro Alves <palves@redhat.com>
1048 * configure: Renegerate.
1050 2016-04-20 Yao Qi <yao.qi@linaro.org>
1052 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1053 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1055 (arm_store_gregset): Likewise.
1057 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1059 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1060 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1061 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1062 (amd64-avx-mpx-linux.c): New rules.
1063 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1064 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1065 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1066 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1067 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1068 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1069 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1070 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1071 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1072 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1073 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1074 * linux-x86-low.c (x86_linux_read_description): Add case for
1075 X86_XSTATE_AVX_MPX_MASK.
1076 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1077 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1078 init_registers_i386_avx_mpx_linux.
1079 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1080 (initialize_low_tracepoint): Call
1081 init_registers_i386_avx_mpx_linux.
1082 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1083 (initialize_low_tracepoint): Call
1084 init_registers_amd64_avx_mpx_linux.
1085 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1086 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1087 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1090 2016-04-18 Pedro Alves <palves@redhat.com>
1092 * configure: Regenerate.
1094 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1096 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1097 (aarch64_emit_sub): Likewise.
1099 2016-04-12 Pedro Alves <palves@redhat.com>
1101 * utils.c (prepare_to_throw_exception): Delete.
1103 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1105 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1107 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1109 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1111 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1113 * linux-aarch64-ipa.c: Add <elf.h> include.
1114 * linux-ppc-ipa.c: Add <elf.h> include.
1115 * linux-s390-ipa.c: Add <elf.h> include.
1117 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1119 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1120 (get_raw_reg_ptr): Likewise.
1121 (get_trace_state_variable_value_ptr): Likewise.
1122 (set_trace_state_variable_value_ptr): Likewise.
1123 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1126 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1127 Marcin Kościelnicki <koriakin@0x04.net>
1130 * linux-ppc-low.c (emit_insns): New function.
1131 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1132 (ppc_emit_prologue): New function.
1133 (ppc_emit_epilogue): New function.
1134 (ppc_emit_add): New function.
1135 (ppc_emit_sub): New function.
1136 (ppc_emit_mul): New function.
1137 (ppc_emit_lsh): New function.
1138 (ppc_emit_rsh_signed): New function.
1139 (ppc_emit_rsh_unsigned): New function.
1140 (ppc_emit_ext): New function.
1141 (ppc_emit_zero_ext): New function.
1142 (ppc_emit_log_not): New function.
1143 (ppc_emit_bit_and): New function.
1144 (ppc_emit_bit_or): New function.
1145 (ppc_emit_bit_xor): New function.
1146 (ppc_emit_bit_not): New function.
1147 (ppc_emit_equal): New function.
1148 (ppc_emit_less_signed): New function.
1149 (ppc_emit_less_unsigned): New function.
1150 (ppc_emit_ref): New function.
1151 (ppc_emit_const): New function.
1152 (ppc_emit_reg): New function.
1153 (ppc_emit_pop): New function.
1154 (ppc_emit_stack_flush): New function.
1155 (ppc_emit_swap): New function.
1156 (ppc_emit_stack_adjust): New function.
1157 (ppc_emit_call): New function.
1158 (ppc_emit_int_call_1): New function.
1159 (ppc_emit_void_call_2): New function.
1160 (ppc_emit_if_goto): New function.
1161 (ppc_emit_goto): New function.
1162 (ppc_emit_eq_goto): New function.
1163 (ppc_emit_ne_goto): New function.
1164 (ppc_emit_lt_goto): New function.
1165 (ppc_emit_le_goto): New function.
1166 (ppc_emit_gt_goto): New function.
1167 (ppc_emit_ge_goto): New function.
1168 (ppc_write_goto_address): New function.
1169 (ppc_emit_ops_impl): New static variable.
1170 (ppc64v1_emit_prologue): New function.
1171 (ppc64v2_emit_prologue): New function.
1172 (ppc64_emit_epilogue): New function.
1173 (ppc64_emit_add): New function.
1174 (ppc64_emit_sub): New function.
1175 (ppc64_emit_mul): New function.
1176 (ppc64_emit_lsh): New function.
1177 (ppc64_emit_rsh_signed): New function.
1178 (ppc64_emit_rsh_unsigned): New function.
1179 (ppc64_emit_ext): New function.
1180 (ppc64_emit_zero_ext): New function.
1181 (ppc64_emit_log_not): New function.
1182 (ppc64_emit_bit_and): New function.
1183 (ppc64_emit_bit_or): New function.
1184 (ppc64_emit_bit_xor): New function.
1185 (ppc64_emit_bit_not): New function.
1186 (ppc64_emit_equal): New function.
1187 (ppc64_emit_less_signed): New function.
1188 (ppc64_emit_less_unsigned): New function.
1189 (ppc64_emit_ref): New function.
1190 (ppc64_emit_const): New function.
1191 (ppc64v1_emit_reg): New function.
1192 (ppc64v2_emit_reg): New function.
1193 (ppc64_emit_pop): New function.
1194 (ppc64_emit_stack_flush): New function.
1195 (ppc64_emit_swap): New function.
1196 (ppc64v1_emit_call): New function.
1197 (ppc64v2_emit_call): New function.
1198 (ppc64v1_emit_int_call_1): New function.
1199 (ppc64v2_emit_int_call_1): New function.
1200 (ppc64v1_emit_void_call_2): New function.
1201 (ppc64v2_emit_void_call_2): New function.
1202 (ppc64_emit_if_goto): New function.
1203 (ppc64_emit_eq_goto): New function.
1204 (ppc64_emit_ne_goto): New function.
1205 (ppc64_emit_lt_goto): New function.
1206 (ppc64_emit_le_goto): New function.
1207 (ppc64_emit_gt_goto): New function.
1208 (ppc64_emit_ge_goto): New function.
1209 (ppc64v1_emit_ops_impl): New static variable.
1210 (ppc64v2_emit_ops_impl): New static variable.
1211 (ppc_emit_ops): New function.
1212 (linux_low_target): Wire in ppc_emit_ops.
1214 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1215 Marcin Kościelnicki <koriakin@0x04.net>
1218 * Makefile.in: Add powerpc-*-ipa.o
1219 * configure.srv: Add ipa_obj for powerpc*-linux.
1220 * linux-ppc-ipa.c: New file.
1221 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1223 (PPC_FIELD): New macro.
1224 (PPC_SEXT): New macro.
1225 (PPC_OP6): New macro.
1226 (PPC_BO): New macro.
1227 (PPC_LI): New macro.
1228 (PPC_BD): New macro.
1229 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1230 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1231 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1232 (ppc_get_thread_area): New function.
1233 (is_elfv2_inferior): New function.
1234 (gen_ds_form): New function.
1235 (GEN_STD): New macro.
1236 (GEN_STDU): New macro.
1237 (GEN_LD): New macro.
1238 (GEN_LDU): New macro.
1239 (gen_d_form): New function.
1240 (GEN_ADDI): New macro.
1241 (GEN_ADDIS): New macro.
1242 (GEN_LI): New macro.
1243 (GEN_LIS): New macro.
1244 (GEN_ORI): New macro.
1245 (GEN_ORIS): New macro.
1246 (GEN_LWZ): New macro.
1247 (GEN_STW): New macro.
1248 (GEN_STWU): New macro.
1249 (gen_xfx_form): New function.
1250 (GEN_MFSPR): New macro.
1251 (GEN_MTSPR): New macro.
1252 (GEN_MFCR): New macro.
1253 (GEN_MTCR): New macro.
1254 (GEN_SYNC): New macro.
1255 (GEN_LWSYNC): New macro.
1256 (gen_x_form): New function.
1257 (GEN_OR): New macro.
1258 (GEN_MR): New macro.
1259 (GEN_LWARX): New macro.
1260 (GEN_STWCX): New macro.
1261 (GEN_CMPW): New macro.
1262 (gen_md_form): New function.
1263 (GEN_RLDICL): New macro.
1264 (GEN_RLDICR): New macro.
1265 (gen_i_form): New function.
1267 (GEN_BL): New macro.
1268 (gen_b_form): New function.
1269 (GEN_BNE): New macro.
1270 (GEN_LOAD): New macro.
1271 (GEN_STORE): New macro.
1272 (gen_limm): New function.
1273 (gen_atomic_xchg): New function.
1274 (gen_call): New function.
1275 (ppc_relocate_instruction): New function.
1276 (ppc_install_fast_tracepoint_jump_pad): New function.
1277 (ppc_get_min_fast_tracepoint_insn_len): New function.
1278 (ppc_get_ipa_tdesc_idx): New function.
1279 (the_low_target): Wire in the new functions.
1280 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1282 * linux-ppc-tdesc.h: New file.
1284 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1286 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1287 (alloc_jump_pad_buffer): New function.
1288 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1289 (alloc_jump_pad_buffer): New function.
1290 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1291 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1292 (alloc_jump_pad_buffer): New function.
1293 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1294 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1295 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1296 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1298 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1300 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1301 * linux-amd64-ipa.c: Likewise.
1302 * linux-i386-ipa.c: Likewise.
1303 * linux-s390-ipa.c: Likewise.
1304 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1305 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1306 set_trace_state_variable_value_ptr.
1307 (struct ipa_sym_addresses): Likewise.
1308 (symbol_list): Likewise.
1309 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1310 accessing gdb_collect directly.
1311 (gdb_collect_ptr_type): New typedef.
1312 (get_raw_reg_ptr_type): New typedef.
1313 (get_trace_state_variable_value_ptr_type): New typedef.
1314 (set_trace_state_variable_value_ptr_type): New typedef.
1315 (gdb_collect_ptr): New global.
1316 (get_raw_reg_ptr): New global.
1317 (get_trace_state_variable_value_ptr): New global.
1318 (set_trace_state_variable_value_ptr): New global.
1319 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1320 accessing get_raw_reg directly.
1321 (get_get_tsv_func_addr): Likewise for
1322 get_trace_state_variable_value_ptr.
1323 (get_set_tsv_func_addr): Likewise for
1324 set_trace_state_variable_value_ptr.
1325 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1327 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1329 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1331 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1333 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1335 (relocate_instruction): Remove own_buf.
1336 * server.c (own_buf): Make global.
1337 (handle_v_requests): Make global.
1338 * server.h (own_buf): New declaration.
1339 (handle_v_requests): New prototype.
1341 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1344 * linux-s390-low.c (add_insns): New function.
1345 (s390_emit_prologue): New function.
1346 (s390_emit_epilogue): New function.
1347 (s390_emit_add): New function.
1348 (s390_emit_sub): New function.
1349 (s390_emit_mul): New function.
1350 (s390_emit_lsh): New function.
1351 (s390_emit_rsh_signed): New function.
1352 (s390_emit_rsh_unsigned): New function.
1353 (s390_emit_ext): New function.
1354 (s390_emit_log_not): New function.
1355 (s390_emit_bit_and): New function.
1356 (s390_emit_bit_or): New function.
1357 (s390_emit_bit_xor): New function.
1358 (s390_emit_bit_not): New function.
1359 (s390_emit_equal): New function.
1360 (s390_emit_less_signed): New function.
1361 (s390_emit_less_unsigned): New function.
1362 (s390_emit_ref): New function.
1363 (s390_emit_if_goto): New function.
1364 (s390_emit_goto): New function.
1365 (s390_write_goto_address): New function.
1366 (s390_emit_litpool): New function.
1367 (s390_emit_const): New function.
1368 (s390_emit_call): New function.
1369 (s390_emit_reg): New function.
1370 (s390_emit_pop): New function.
1371 (s390_emit_stack_flush): New function.
1372 (s390_emit_zero_ext): New function.
1373 (s390_emit_swap): New function.
1374 (s390_emit_stack_adjust): New function.
1375 (s390_emit_set_r2): New function.
1376 (s390_emit_int_call_1): New function.
1377 (s390_emit_void_call_2): New function.
1378 (s390_emit_eq_goto): New function.
1379 (s390_emit_ne_goto): New function.
1380 (s390_emit_lt_goto): New function.
1381 (s390_emit_le_goto): New function.
1382 (s390_emit_gt_goto): New function.
1383 (s390_emit_ge_goto): New function.
1384 (s390x_emit_prologue): New function.
1385 (s390x_emit_epilogue): New function.
1386 (s390x_emit_add): New function.
1387 (s390x_emit_sub): New function.
1388 (s390x_emit_mul): New function.
1389 (s390x_emit_lsh): New function.
1390 (s390x_emit_rsh_signed): New function.
1391 (s390x_emit_rsh_unsigned): New function.
1392 (s390x_emit_ext): New function.
1393 (s390x_emit_log_not): New function.
1394 (s390x_emit_bit_and): New function.
1395 (s390x_emit_bit_or): New function.
1396 (s390x_emit_bit_xor): New function.
1397 (s390x_emit_bit_not): New function.
1398 (s390x_emit_equal): New function.
1399 (s390x_emit_less_signed): New function.
1400 (s390x_emit_less_unsigned): New function.
1401 (s390x_emit_ref): New function.
1402 (s390x_emit_if_goto): New function.
1403 (s390x_emit_const): New function.
1404 (s390x_emit_call): New function.
1405 (s390x_emit_reg): New function.
1406 (s390x_emit_pop): New function.
1407 (s390x_emit_stack_flush): New function.
1408 (s390x_emit_zero_ext): New function.
1409 (s390x_emit_swap): New function.
1410 (s390x_emit_stack_adjust): New function.
1411 (s390x_emit_int_call_1): New function.
1412 (s390x_emit_void_call_2): New function.
1413 (s390x_emit_eq_goto): New function.
1414 (s390x_emit_ne_goto): New function.
1415 (s390x_emit_lt_goto): New function.
1416 (s390x_emit_le_goto): New function.
1417 (s390x_emit_gt_goto): New function.
1418 (s390x_emit_ge_goto): New function.
1419 (s390_emit_ops): New function.
1420 (struct linux_target_ops): Fill in emit_ops hook.
1422 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1425 * Makefile.in: Add s390 IPA files.
1426 * configure.srv: Build IPA for s390.
1427 * linux-s390-ipa.c: New file.
1428 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1429 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1430 (tdesc_s390_linux32): Likewise.
1431 (init_registers_s390_linux32v1): Likewise.
1432 (tdesc_s390_linux32v1): Likewise.
1433 (init_registers_s390_linux32v2): Likewise.
1434 (tdesc_s390_linux32v2): Likewise.
1435 (init_registers_s390_linux64): Likewise.
1436 (tdesc_s390_linux64): Likewise.
1437 (init_registers_s390_linux64v1): Likewise.
1438 (tdesc_s390_linux64v1): Likewise.
1439 (init_registers_s390_linux64v2): Likewise.
1440 (tdesc_s390_linux64v2): Likewise.
1441 (init_registers_s390_te_linux64): Likewise.
1442 (tdesc_s390_te_linux64): Likewise.
1443 (init_registers_s390_vx_linux64): Likewise.
1444 (tdesc_s390_vx_linux64): Likewise.
1445 (init_registers_s390_tevx_linux64): Likewise.
1446 (tdesc_s390_tevx_linux64): Likewise.
1447 (init_registers_s390x_linux64): Likewise.
1448 (tdesc_s390x_linux64): Likewise.
1449 (init_registers_s390x_linux64v1): Likewise.
1450 (tdesc_s390x_linux64v1): Likewise.
1451 (init_registers_s390x_linux64v2): Likewise.
1452 (tdesc_s390x_linux64v2): Likewise.
1453 (init_registers_s390x_te_linux64): Likewise.
1454 (tdesc_s390x_te_linux64): Likewise.
1455 (init_registers_s390x_vx_linux64): Likewise.
1456 (tdesc_s390x_vx_linux64): Likewise.
1457 (init_registers_s390x_tevx_linux64): Likewise.
1458 (tdesc_s390x_tevx_linux64): Likewise.
1459 (have_hwcap_s390_vx): New static variable.
1460 (s390_arch_setup): Fill have_hwcap_s390_vx.
1461 (s390_get_thread_area): New function.
1462 (s390_ft_entry_gpr_esa): New const.
1463 (s390_ft_entry_gpr_zarch): New const.
1464 (s390_ft_entry_misc): New const.
1465 (s390_ft_entry_fr): New const.
1466 (s390_ft_entry_vr): New const.
1467 (s390_ft_main_31): New const.
1468 (s390_ft_main_64): New const.
1469 (s390_ft_exit_fr): New const.
1470 (s390_ft_exit_vr): New const.
1471 (s390_ft_exit_misc): New const.
1472 (s390_ft_exit_gpr_esa): New const.
1473 (s390_ft_exit_gpr_zarch): New const.
1474 (append_insns): New function.
1475 (s390_relocate_instruction): New function.
1476 (s390_install_fast_tracepoint_jump_pad): New function.
1477 (s390_get_min_fast_tracepoint_insn_len): New function.
1478 (s390_get_ipa_tdesc_idx): New function.
1479 (struct linux_target_ops): Wire in the above functions.
1480 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1481 * linux-s390-tdesc.h: New file.
1483 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1485 * linux-s390-low.c (s390_supports_tracepoints): New function.
1486 (struct linux_target_ops): Fill supports_tracepoints hook.
1488 2016-03-18 Yao Qi <yao.qi@linaro.org>
1490 * linux-low.c (lwp_signal_can_be_delivered): New function.
1491 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1493 2016-03-18 Yao Qi <yao.qi@linaro.org>
1495 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1496 0 if signal is enqueued. Remove 'signal' from one debugging
1497 message. Move one debugging message to some lines below.
1498 Remove code setting 'signal' to 0.
1500 2016-03-18 Yao Qi <yao.qi@linaro.org>
1502 * linux-low.c (linux_low_filter_event): Remove redundant
1503 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1505 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1507 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1508 (struct linux_target_ops): Wire in the above.
1510 2016-03-03 Yao Qi <yao.qi@linaro.org>
1512 * linux-low.c: Update comments to start_step_over.
1514 2016-03-03 Yao Qi <yao.qi@linaro.org>
1517 * linux-low.c (handle_extended_wait): Set child suspended
1518 if event_lwp->bp_reinsert isn't zero.
1520 2016-03-02 Yao Qi <yao.qi@linaro.org>
1522 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1523 enqueue_pending_signal.
1525 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1527 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1530 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1532 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1533 (s390_regmap_3264) [!__s390x__]: New global.
1534 (s390_collect_ptrace_register): Skip map entries containing -1.
1535 (s390_supply_ptrace_register): Ditto.
1536 (s390_fill_gprs_high): New function.
1537 (s390_store_gprs_high): New function.
1538 (s390_regsets): Add NT_S390_HIGH_GPRS.
1539 (s390_get_hwcap): Enable on 31-bit.
1540 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1541 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1542 Detect NT_S390_HIGH_GPRS.
1543 (s390_usrregs_info_3264): Enable on 31-bit.
1544 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1545 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1547 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1550 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1551 * configure.srv: Ditto.
1552 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1553 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1554 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1555 (init_registers_amd64_linux): Remove prototype.
1556 (tdesc_amd64_linux): Remove declaration.
1557 (get_ipa_tdesc): New function.
1558 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1559 initialize remaining tdescs.
1560 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1561 (init_registers_i386_linux): Remove prototype.
1562 (tdesc_i386_linux): Remove declaration.
1563 (get_ipa_tdesc): New function.
1564 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1565 initialize remaining tdescs.
1566 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1567 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1568 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1569 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1570 (x86_get_ipa_tdesc_idx): New function.
1571 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1572 * linux-x86-tdesc.h: New file.
1573 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1574 (target_get_ipa_tdesc_idx): New macro.
1575 * tracepoint.c (ipa_tdesc_idx): New macro.
1576 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1577 (symbol_list): Add ipa_tdesc_idx.
1578 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1579 (ipa_tdesc): Remove.
1580 (ipa_tdesc_idx): New variable.
1581 (get_context_regcache): Use get_ipa_tdesc.
1582 (gdb_collect): Ditto.
1584 * tracepoint.h (get_ipa_tdesc): New prototype.
1585 (ipa_tdesc): Remove.
1587 2016-02-24 Pedro Alves <palves@redhat.com>
1589 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1590 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1591 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1592 Factor out common code between the USE_SIGTRAP_SIGINFO and
1593 !USE_SIGTRAP_SIGINFO blocks.
1594 (linux_low_filter_event): Call save_stop_reason instead of
1595 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1597 (linux_wait_1): Update comments.
1599 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1601 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1602 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1603 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1604 ppc_insert_point, ppc_remove_point.
1606 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1608 * linux-s390-low.c (s390_supports_z_point_type): New function.
1609 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1611 2016-02-16 Yao Qi <yao.qi@linaro.org>
1613 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1614 PC. Get pc from regcache_read_pc.
1616 2016-02-12 Yao Qi <yao.qi@linaro.org>
1618 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1619 or linux_get_pc_32bit.
1620 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1622 2016-02-12 Yao Qi <yao.qi@linaro.org>
1624 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1625 arm_linux_get_next_pcs_fixup.
1627 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1629 * tracepoint.c (x_tracepoint_action_download): Change
1630 write_inferior_data_ptr to write_inferior_data_pointer.
1631 (cmd_qtstart): Likewise.
1632 (write_inferior_data_ptr): Remove.
1633 (download_agent_expr): Change write_inferior_data_ptr to
1634 write_inferior_data_pointer.
1635 (download_tracepoint_1): Likewise.
1636 (download_tracepoint): Likewise.
1637 (download_trace_state_variables): Likewise.
1639 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1640 Marcin Kościelnicki <koriakin@0x04.net>
1642 * tracepoint.c (struct tracepoint_action_ops): Remove.
1643 (struct tracepoint_action): Remove ops.
1644 (m_tracepoint_action_download, r_tracepoint_action_download)
1645 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1646 size and offset accordingly.
1647 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1648 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1649 (tracepoint_action_send, tracepoint_action_download): New functions.
1650 Helpers for trace action handlers.
1651 (add_tracepoint_action): Remove setup actions ops.
1652 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1654 2016-02-10 Yao Qi <yao.qi@linaro.org>
1656 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1658 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1660 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1662 * configure: Regenerate.
1664 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1666 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1667 void * to gdb_byte *.
1668 * linux-low.c (siginfo_fixup): Likewise.
1669 (linux_xfer_siginfo): Likewise.
1670 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1672 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1674 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1676 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1678 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1680 * linux-x86-low.c [__x86_64__]: Include
1681 "nat/amd64-linux-siginfo.h".
1682 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1683 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1684 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1685 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1686 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1687 (cpt_si_fd, si_timerid, si_overrun): Move from
1688 nat/amd64-linux-siginfo.c.
1689 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1691 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1693 * server.c (skip_to_semicolon): Remove.
1694 (process_point_options): Use strchrnul instead of
1697 2016-01-26 Yao Qi <yao.qi@linaro.org>
1699 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1700 * linux-low.c (install_software_single_step_breakpoints): Don't
1701 call regcache_read_pc.
1702 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1705 2016-01-26 Yao Qi <yao.qi@linaro.org>
1707 * linux-low.c (install_software_single_step_breakpoints): Call
1708 regcache_read_pc instead of get_pc.
1710 2016-01-26 Yao Qi <yao.qi@linaro.org>
1712 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1713 (unblock_async_io): Rename to ...
1714 (block_unblock_async_io): ... it. New function.
1715 (enable_async_io): Don't install SIGIO handler. Unblock it
1717 (disable_async_io): Don't ignore SIGIO. Block it instead.
1718 (initialize_async_io): Install SIGIO handler. Don't call
1721 2016-01-26 Yao Qi <yao.qi@linaro.org>
1723 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1724 first character is '\003', call *the_target->request_interrupt.
1726 2016-01-25 Yao Qi <yao.qi@linaro.org>
1728 * remote-utils.c (new_thread_notify): Remove.
1729 (dead_thread_notify): Likewise.
1730 * remote-utils.h (new_thread_notify): Remove declaration.
1731 (dead_thread_notify): Likewise.
1733 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1735 * gdb.trace/pending.exp: Fix expected message on continue.
1737 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1739 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1740 it works properly on big-endian machines where sizeof (CORE_ADDR)
1743 2016-01-21 Pedro Alves <palves@redhat.com>
1745 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1746 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1747 * configure: Regenerate.
1749 2016-01-21 Yao Qi <yao.qi@linaro.org>
1751 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1752 is_thumb and set it according to CPSR saved on the stack.
1753 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1754 arm_sigreturn_next_pc.
1756 2016-01-18 Yao Qi <yao.qi@linaro.org>
1758 * linux-low.c (linux_set_pc_64bit): New function.
1759 (linux_get_pc_64bit): New function.
1760 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1762 * linux-sparc-low.c (debug_threads): Remove declaration.
1763 (sparc_get_pc): Remove.
1764 (the_low_target): Use linux_get_pc_64bit instead of
1766 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1767 (the_low_target): Use linux_get_pc_64bit and
1770 2016-01-18 Yao Qi <yao.qi@linaro.org>
1772 * linux-arm-low.c (debug_threads): Remove declaration.
1773 (arm_get_pc, arm_set_pc): Remove.
1774 (the_low_target): Use linux_get_pc_32bit and
1776 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1777 (the_low_target): Use linux_get_pc_32bit and
1779 * linux-cris-low.c (debug_threads): Remove declaration.
1780 (cris_get_pc, cris_set_pc,): Remove.
1781 (the_low_target): Use linux_get_pc_32bit and
1783 * linux-crisv32-low.c (debug_threads): Remove declaration.
1784 (cris_get_pc, cris_set_pc): Remove.
1785 (the_low_target): Use linux_get_pc_32bit and
1787 * linux-low.c: Include inttypes.h.
1788 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1789 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1790 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1791 (the_low_target): Use linux_get_pc_32bit and
1793 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1794 (the_low_target): Use linux_get_pc_32bit and
1796 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1797 (the_low_target): Use linux_get_pc_32bit and
1799 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1800 (the_low_target): Use linux_get_pc_32bit and
1802 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1803 (the_low_target): Use linux_get_pc_32bit and
1806 2016-01-18 Gary Benson <gbenson@redhat.com>
1808 * configure.ac (AC_FUNC_FORK): New check.
1809 * config.in: Regenerate.
1810 * configure: Likewise.
1812 2016-01-14 Yao Qi <yao.qi@linaro.org>
1814 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1815 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1816 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1817 arm_get_next_pcs_ctor.
1819 2016-01-12 Josh Stone <jistone@redhat.com>
1820 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1822 * inferiors.h: Include "gdb_vecs.h".
1823 (struct process_info): Add syscalls_to_catch.
1824 * inferiors.c (remove_process): Free syscalls_to_catch.
1825 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1826 syscall_return stops.
1827 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1828 * server.c (handle_general_set): Handle QCatchSyscalls.
1829 (handle_query): Report support for QCatchSyscalls.
1830 * target.h (struct target_ops): Add supports_catch_syscall.
1831 (target_supports_catch_syscall): New macro.
1832 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1833 (struct lwp_info): Add syscall_state.
1834 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1835 Maintain syscall_state and syscalls_to_catch across exec.
1836 (get_syscall_trapinfo): New function, proxy to the_low_target.
1837 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1838 (linux_low_filter_event): Toggle syscall_state entry/return for
1839 syscall traps, and set it ignored for all others.
1840 (gdb_catching_syscalls_p): New function.
1841 (gdb_catch_this_syscall_p): New function.
1842 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1843 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1844 (linux_supports_catch_syscall): New function.
1845 (linux_target_ops): Install it.
1846 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1847 (the_low_target): Install it.
1849 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1851 * acinclude.m4: Include new ../warning.m4 file.
1852 * configure: Regenerated.
1853 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1855 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1857 * ax.c (is_goto_target): Mark static.
1858 * linux-low.c (register_addr): Likewise.
1859 (linux_fetch_registers, linux_store_registers): Likewise.
1860 * mem-break.c (any_persistent_commands): Fix old prototype.
1861 (add_commands_to_breakpoint): Mark static.
1862 * regcache.c (find_register_by_name): Delete unused func.
1863 * remote-utils.c (hex_or_minus_one): Mark static.
1864 * server.c (monitor_show_help): Mark static.
1865 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1866 handle_v_requests): Likewise.
1868 2016-01-12 Pedro Alves <palves@redhat.com>
1870 Remove use of the registered trademark symbol throughout.
1872 2016-01-08 Yao Qi <yao.qi@linaro.org>
1874 * remote-utils.c (getpkt): If c is '\003', call target hook
1877 2016-01-06 Yao Qi <yao.qi@linaro.org>
1879 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1880 linux-aarch32-low.c.
1881 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1882 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1883 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1884 (thumb2_breakpoint): Declare.
1885 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1886 linux-aarch32-low.h.
1887 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1888 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1889 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1891 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1893 * gdbreplay.c (gdbreplay_version): Change copyright year in
1895 * server.c (gdbserver_version): Likewise.
1897 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1899 * server.c (crc32_table): Delete.
1900 (crc32): Use libiberty's xcrc32 function.
1902 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1904 * lynx-low.c (lynx_delete_thread_callback): New function.
1905 (lynx_mourn): Properly delete our process and all of its
1906 threads. Remove call to clear_inferiors.
1908 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1910 * target.c (thread_search_callback): Add check that
1911 the thread_stopped target callback is not NULL before
1914 2015-12-21 Yao Qi <yao.qi@linaro.org>
1916 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1919 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1921 * server.c (handle_query): Call target_supports_software_single_step.
1923 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1925 * linux-low.c (single_step): New function.
1926 (linux_resume_one_lwp_throw): Call single_step.
1927 (start_step_over): Likewise.
1929 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1931 * Makefile.in (SFILES): Append arch/arm-linux.c,
1932 arch/arm-get-next-pcs.c.
1933 (arm-linux.o): New rule.
1934 (arm-get-next-pcs.o): New rule.
1935 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1937 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1938 to linux-aarch32-low.c.
1939 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1940 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1941 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1942 (thumb2_breakpoint_len): Likewise.
1943 (arm_is_thumb_mode): Make non-static.
1944 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1945 from linux-aarch32-low.c.
1946 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1947 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1948 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1949 (thumb2_breakpoint_len): Likewise.
1950 (arm_is_thumb_mode): New declaration.
1951 * linux-arm-low.c: Include arch/arm-linux.h
1952 aarch/arm-get-next-pcs.h, sys/syscall.h.
1953 (get_next_pcs_ops): New struct.
1954 (get_next_pcs_addr_bits_remove): New function.
1955 (get_next_pcs_is_thumb): New function.
1956 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1957 (arm_sigreturn_next_pc): Likewise.
1958 (get_next_pcs_syscall_next_pc): Likewise.
1959 (arm_gdbserver_get_next_pcs): Likewise.
1960 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1962 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1963 * server.h: Include gdb_vecs.h.
1965 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1967 * Makefile.in (SFILES): Append common/common-regcache.c.
1968 (OBS): Append common-regcache.o.
1969 (common-regcache.o): New rule.
1970 * regcache.c (init_register_cache): Initialize cache to
1972 (regcache_raw_read_unsigned): New function.
1973 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1974 register_status enum.
1976 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1978 * linux-aarch64-low.c (the_low_targets): Rename
1979 breakpoint_reinsert_addr to get_next_pcs.
1980 * linux-arm-low.c (the_low_targets): Likewise.
1981 * linux-bfin-low.c (the_low_targets): Likewise.
1982 * linux-cris-low.c (the_low_targets): Likewise.
1983 * linux-crisv32-low.c (the_low_targets): Likewise.
1984 * linux-low.c (can_software_single_step): Likewise.
1985 (install_software_single_step_breakpoints): New function.
1986 (start_step_over): Use install_software_single_step_breakpoints.
1987 * linux-low.h: New CORE_ADDR vector.
1988 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1990 * linux-mips-low.c (the_low_targets): Likewise.
1991 * linux-nios2-low.c (the_low_targets): Likewise.
1992 * linux-sparc-low.c (the_low_targets): Likewise.
1994 2015-12-17 Pedro Alves <palves@redhat.com>
1996 * linux-low.c (linux_kill_one_lwp): Remove references to
1998 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2000 (linux_init_signals): Delete.
2001 (initialize_low): Adjust.
2002 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2004 2015-12-16 Pedro Alves <palves@redhat.com>
2006 * configure.ac (compiler warning flags): When testing a
2007 -Wno-foo option, check whether -Wfoo works instead.
2008 * configure: Regenerate.
2010 2015-12-11 Don Breazeal <donb@codesourcery.com>
2012 * server.c (process_serial_event): Don't exit from gdbserver
2013 in remote mode if there are still active inferiors.
2015 2015-12-11 Yao Qi <yao.qi@linaro.org>
2017 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2018 arm_breakpoint_at if the process is 32-bit.
2020 2015-12-11 Yao Qi <yao.qi@linaro.org>
2022 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2025 2015-12-07 Yao Qi <yao.qi@linaro.org>
2027 * configure.srv: Append arm.o to srv_tgtobj for
2028 aarch64*-*-linux* target.
2029 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2030 from linux-arm-low.c.
2031 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2032 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2033 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2034 (thumb2_breakpoint_len): Likewise.
2035 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2036 (arm_breakpoint_kinds): Likewise.
2037 (arm_breakpoint_kind_from_pc): Likewise.
2038 (arm_sw_breakpoint_from_kind): Likewise.
2039 (arm_breakpoint_kind_from_current_state): Likewise.
2040 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2041 (arm_sw_breakpoint_from_kind): Declare.
2042 (arm_breakpoint_kind_from_current_state): Declare.
2043 (arm_breakpoint_at): Declare.
2044 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2045 arm_sw_breakpoint_from_kind if process is 32-bit.
2046 (aarch64_breakpoint_kind_from_pc): New function.
2047 (aarch64_breakpoint_kind_from_current_state): New function.
2048 (the_low_target): Initialize fields breakpoint_kind_from_pc
2049 and breakpoint_kind_from_current_state.
2050 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2051 linux-aarch32-low.c.
2052 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2053 (arm_breakpoint, arm_breakpoint_len): Likewise.
2054 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2055 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2056 (arm_is_thumb_mode): Likewise.
2057 (arm_breakpoint_at): Likewise.
2058 (arm_breakpoint_kind_from_pc): Likewise.
2059 (arm_sw_breakpoint_from_kind): Likewise.
2060 (arm_breakpoint_kind_from_current_state): Likewise.
2063 2015-08-04 Yao Qi <yao.qi@linaro.org>
2065 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2066 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2067 * server.c (extended_protocol): Remove "static".
2068 * server.h (extended_protocol): Declare it.
2070 2015-12-04 Josh Stone <jistone@redhat.com>
2072 * target.h (struct target_ops) <arch_setup>: Rename to ...
2073 (struct target_ops) <post_create_inferior>: ... this.
2074 (target_arch_setup): Rename to ...
2075 (target_post_create_inferior): ... this, calling post_create_inferior.
2076 * server.c (start_inferior): Update target_arch_setup calls to
2077 target_post_create_inferior.
2078 * linux-low.c (linux_low_ptrace_options): Forward declare.
2079 (linux_arch_setup): Update its comment for general use.
2080 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2081 (struct linux_target_ops): Use linux_post_create_inferior.
2082 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2083 to post_create_inferior.
2084 * nto-low.c (struct nto_target_ops): Likewise.
2085 * spu-low.c (struct spu_target_ops): Likewise.
2086 * win32-low.c (struct win32_target_ops): Likewise.
2088 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2090 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2092 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2094 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2095 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2096 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2097 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2098 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2099 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2100 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2101 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2102 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2103 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2104 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2105 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2107 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2109 * linux-low.c (linux_look_up_symbols): Don't call
2110 linux_supports_traceclone.
2111 * linux-low.h (thread_db_init): Remove use_events argument.
2112 * thread-db.c (thread_db_use_event): Remove global variable.
2113 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2114 (struct thread_db) <td_create_bp>: Remove field.
2115 (thread_db_create_event): Remove function.
2116 (thread_db_enable_reporting): Likewise.
2117 (find_one_thread): Don't check for thread_db_use_events.
2118 (attach_thread): Likewise.
2119 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2120 (try_thread_db_load_1): Don't check for thread_db_use_events.
2121 (thread_db_init): Remove use_events argument and thread events
2123 (remove_thread_event_breakpoints): Remove function.
2124 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2126 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2128 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2130 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2131 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2132 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2133 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2134 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2136 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2138 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2139 * linux-low.c (can_hardware_single_step): Use
2140 supports_hardware_single_step.
2141 (can_software_single_step): New function.
2142 (start_step_over): Call can_software_single_step.
2143 (linux_supports_hardware_single_step): New function.
2144 (struct target_ops) <supports_software_single_step>: Initialize.
2145 * linux-low.h (struct linux_target_ops)
2146 <supports_hardware_single_step>: Initialize.
2147 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2148 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2149 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2150 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2151 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2153 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2154 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2155 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2156 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2158 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2159 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2161 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2163 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2165 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2166 * target.h (struct target_ops): <supports_software_single_step>:
2168 (target_supports_software_single_step): New macro.
2170 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2172 * linux-low.c (linux_wait_1): Fix pc advance condition.
2173 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2174 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2176 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2178 * linux-arm-low.c (arm_is_thumb_mode): New function.
2179 (arm_breakpoint_at): Use arm_is_thumb_mode.
2180 (arm_breakpoint_kind_from_current_state): New function.
2181 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2183 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2184 (linux_breakpoint_kind_from_current_state): New function.
2185 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2186 * linux-low.h (struct linux_target_ops)
2187 <breakpoint_kind_from_current_state>: New field.
2188 * target.h (struct target_ops): Likewise.
2189 (target_breakpoint_kind_from_current_state): New macro.
2191 2015-11-30 Pedro Alves <palves@redhat.com>
2193 * linux-low.c (linux_resume): Wake up the event loop before
2196 2015-11-30 Pedro Alves <palves@redhat.com>
2198 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2200 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2202 * target.c (struct thread_search): New structure.
2203 (thread_search_callback): New function.
2204 (prev_general_thread): New global.
2205 (prepare_to_access_memory, done_accessing_memory): New functions.
2206 * target.h (prepare_to_access_memory, done_accessing_memory):
2207 Replace macros with function declarations.
2209 2015-11-30 Pedro Alves <palves@redhat.com>
2212 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2213 report TARGET_WAITKIND_NO_RESUMED.
2214 * remote-utils.c (prepare_resume_reply): Handle
2215 TARGET_WAITKIND_NO_RESUMED.
2216 * server.c (report_no_resumed): New global.
2217 (handle_query) <qSupported>: Handle "no-resumed+". Report
2218 "no-resumed+" support.
2219 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2220 return error if the client doesn't support no-resumed events.
2221 (push_stop_notification): New function.
2222 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2223 events if the client supports them.
2225 2015-11-30 Pedro Alves <palves@redhat.com>
2227 * linux-low.c (thread_still_has_status_pending_p): Don't check
2229 (lwp_resumed): New function.
2230 (status_pending_p_callback): Return early if the LWP is not
2231 supposed to be resumed.
2233 2015-11-30 Pedro Alves <palves@redhat.com>
2235 * linux-low.c (handle_extended_wait): Assert that the LWP's
2236 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2237 thread create events, leave the new child's status pending.
2238 (linux_low_filter_event): If GDB wants to hear about thread exit
2239 events, leave the LWP marked dead and don't delete it.
2240 (linux_wait_for_event_filtered): Don't check for thread exit.
2241 (filter_exit_event): New function.
2242 (linux_wait_1): Use it, when returning an exit event.
2243 (linux_resume_one_lwp_throw): Assert that the LWP's
2244 waitstatus is TARGET_WAITKIND_IGNORE.
2245 * remote-utils.c (prepare_resume_reply): Handle
2246 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2247 * server.c (report_thread_events): New global.
2248 (handle_general_set): Handle QThreadEvents.
2249 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2250 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2251 TARGET_WAITKIND_THREAD_EXITED.
2252 * server.h (report_thread_events): Declare.
2254 2015-11-30 Pedro Alves <palves@redhat.com>
2256 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2257 the thread's last_resume_kind was resume_stop.
2259 2015-11-30 Pedro Alves <palves@redhat.com>
2261 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2264 2015-11-30 Pedro Alves <palves@redhat.com>
2266 * server.c (handle_v_requests): Handle vCtrlC.
2268 2015-11-30 Pedro Alves <palves@redhat.com>
2270 * gdbthread.h (find_any_thread_of_pid): Declare.
2271 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2273 * server.c (handle_query): If current_thread is NULL, look for
2274 another thread of the selected process.
2276 2015-11-26 Daniel Colascione <dancol@dancol.org>
2277 Simon Marchi <simon.marchi@ericsson.com>
2279 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2280 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2282 * target.h (struct target_ops) <thread_name>: New field.
2283 (target_thread_name): New macro.
2285 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2287 * regcache.h (regcache_invalidate_pid): Add declaration.
2288 * regcache.c (regcache_invalidate_pid): New function, extracted
2289 from regcache_invalidate.
2290 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2291 Add trivial documentation comment.
2292 * lynx-low.c: Use regcache_invalidate_pid instead of
2293 regcache_invalidate.
2295 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2297 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2298 and Elf64_auxv_t if the target is Android.
2300 2015-11-22 Doug Evans <xdje42@gmail.com>
2302 * target.h: #include <sys/types.h>.
2304 2015-11-19 Pedro Alves <palves@redhat.com>
2306 * linux-low.c (linux_process_qsupported): Change prototype.
2308 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2310 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2311 and adjust to loop over all features.
2312 * server.c (handle_query) <qSupported>: Adjust to call
2313 target_process_qsupported once, passing it a vector of unprocessed
2315 * target.h (struct target_ops) <process_qsupported>: Change
2317 (target_process_qsupported): Adjust.
2319 2015-11-19 Pedro Alves <palves@redhat.com>
2321 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2323 * configure: Regenerate.
2325 2015-11-19 Pedro Alves <palves@redhat.com>
2327 * configure: Regenerate.
2329 2015-11-19 Yao Qi <yao.qi@linaro.org>
2331 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2334 2015-11-19 Yao Qi <yao.qi@linaro.org>
2336 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2337 (struct aarch64_operand): Move enum out.
2339 2015-11-19 Yao Qi <yao.qi@linaro.org>
2341 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2342 struct user_fpsimd_state *.
2343 (aarch64_store_fpregset): Likewise.
2345 2015-11-19 Yao Qi <yao.qi@linaro.org>
2347 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2348 struct user_pt_regs *.
2349 (aarch64_store_gregset): Likewise.
2351 2015-11-18 Pedro Alves <palves@redhat.com>
2353 * Makefile.in (all_object_files): Add $IPA_OBJS.
2355 2015-11-17 Pedro Alves <palves@redhat.com>
2357 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2358 GDB_SIGNAL_0 and gdb_signal_to_string.
2360 2015-11-17 Pedro Alves <palves@redhat.com>
2362 * win32-low.c (handle_output_debug_string): Remove parameter.
2363 (win32_kill): Remove our_status local and adjust call to
2364 handle_output_debug_string.
2365 (get_child_debug_event): Adjust call to
2366 handle_output_debug_string.
2368 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2370 * linux-mips-low.c (mips_fill_gregset): Add cast.
2371 (mips_store_gregset): Likewise.
2372 (mips_fill_fpregset): Likewise.
2373 (mips_store_fpregset): Likewise.
2375 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2377 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2380 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2382 * linux-mips-low.c (mips_linux_new_thread): Change type of
2383 watch_type to enum target_hw_bp_type.
2385 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2387 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2388 Change return type to arm_hwbp_type.
2390 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2392 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2393 (arm_store_gregset): Likewise.
2394 * linux-arm-low.c (arm_get_hwcap): Likewise.
2395 (arm_read_description): Likewise.
2397 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2399 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2401 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2403 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2404 (ppc_fill_vsxregset): Likewise.
2405 (ppc_store_vsxregset): Likewise.
2406 (ppc_fill_vrregset): Likewise.
2407 (ppc_store_vrregset): Likewise.
2408 (ppc_fill_evrregset): Likewise.
2409 (ppc_store_evrregset): Likewise.
2411 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2413 * linux-ppc-low.c (ppc_usrregs_info): Remove
2414 forward-declaration.
2415 (ppc_arch_setup): Move lower in file.
2417 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2419 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2420 (ps_pdwrite): Likewise.
2422 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2424 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2425 to after assert checks.
2427 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2429 * proc-service.c (ps_pdread): Add/adjust casts.
2430 (ps_pdwrite): Add/adjust casts.
2432 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2434 * server.c (handle_search_memory_1): Cast return value of
2437 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2439 * server.c (write_qxfer_response): Change type of data to
2442 2015-10-29 Pedro Alves <palves@redhat.com>
2444 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2446 2015-10-29 Pedro Alves <palves@redhat.com>
2448 * tracepoint.c (clear_installed_tracepoints): Add casts.
2450 2015-10-29 Pedro Alves <palves@redhat.com>
2452 * server.c (handle_v_cont, process_serial_event): Add enum
2453 gdb_signal casts to signal parsing code.
2455 2015-10-29 Pedro Alves <palves@redhat.com>
2457 * linux-low.h (NULL_REGSET): Define.
2458 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2459 * linux-arm-low.c (arm_regsets): Likewise.
2460 * linux-crisv32-low.c (cris_regsets): Likewise.
2461 * linux-m68k-low.c (m68k_regsets): Likewise.
2462 * linux-mips-low.c (mips_regsets): Likewise.
2463 * linux-nios2-low.c (nios2_regsets): Likewise.
2464 * linux-ppc-low.c (ppc_regsets): Likewise.
2465 * linux-s390-low.c (s390_regsets): Likewise.
2466 * linux-sh-low.c (sh_regsets): Likewise.
2467 * linux-sparc-low.c (sparc_regsets): Likewise.
2468 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2469 * linux-tile-low.c (tile_regsets): Likewise.
2470 * linux-x86-low.c (x86_regsets): Likewise.
2471 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2473 2015-10-29 Pedro Alves <palves@redhat.com>
2475 * linux-low.h (NULL_REGSET): Define.
2476 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2477 * linux-arm-low.c (arm_regsets): Likewise.
2478 * linux-crisv32-low.c (cris_regsets): Likewise.
2479 * linux-m68k-low.c (m68k_regsets): Likewise.
2480 * linux-mips-low.c (mips_regsets): Likewise.
2481 * linux-nios2-low.c (nios2_regsets): Likewise.
2482 * linux-ppc-low.c (ppc_regsets): Likewise.
2483 * linux-s390-low.c (s390_regsets): Likewise.
2484 * linux-sh-low.c (sh_regsets): Likewise.
2485 * linux-sparc-low.c (sparc_regsets): Likewise.
2486 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2487 * linux-tile-low.c (tile_regsets): Likewise.
2488 * linux-x86-low.c (x86_regsets): Likewise.
2489 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2491 2015-10-26 Doug Evans <dje@google.com>
2493 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2495 2015-10-26 Doug Evans <dje@google.com>
2497 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2499 2015-10-26 Doug Evans <dje@google.com>
2501 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2503 (attach_thread, find_new_threads_callback): Ditto.
2505 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2507 * mem-break.h (set_breakpoint_data): Remove.
2509 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2511 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2512 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2513 (initialize_low): Remove set_breakpoint_data call.
2514 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2515 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2516 (initialize_low): Remove set_breakpoint_data call.
2517 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2518 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2519 (initialize_low): Remove set_breakpoint_data call.
2521 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2523 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2524 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2525 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2526 * target.h (target_breakpoint_kind_from_pc): New macro.
2528 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2530 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2531 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2532 the default breakpoint kind.
2534 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2536 * linux-arm-low.c (arm_supports_z_point_type): Add software
2539 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2541 * linux-arm-low.c: Refactor breakpoint definitions.
2542 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2543 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2545 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2547 * Makefile.in: Add arm.c/o.
2548 * configure.srv: Likewise.
2549 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2550 (arm_breakpoint_kind_from_pc): New function.
2551 (arm_sw_breakpoint_from_kind): Return proper kind.
2552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2554 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2556 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2558 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2559 (struct raw_breakpoint) <size>: Remove.
2560 (struct raw_breakpoint) <kind>: Add.
2561 (bp_size): New function.
2562 (bp_opcode): Likewise.
2563 (find_raw_breakpoint_at): Adjust for kind.
2564 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2565 (remove_memory_breakpoint): Adjust for kind call bp_size.
2566 (set_raw_breakpoint_at): Adjust for kind.
2567 (set_breakpoint): Likewise.
2568 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2569 (delete_raw_breakpoint): Adjust for kind.
2570 (delete_breakpoint): Likewise.
2571 (find_gdb_breakpoint): Likewise.
2572 (set_gdb_breakpoint_1): Likewise.
2573 (set_gdb_breakpoint): Likewise.
2574 (delete_gdb_breakpoint_1): Likewise.
2575 (delete_gdb_breakpoint): Likewise.
2576 (uninsert_raw_breakpoint): Likewise.
2577 (reinsert_raw_breakpoint): Likewise.
2578 (set_breakpoint_data): Remove.
2579 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2580 (check_mem_read): Adjust for kind call bp_size.
2581 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2582 (clone_one_breakpoint): Adjust for kind.
2583 * mem-break.h (set_gdb_breakpoint): Likewise.
2584 (delete_gdb_breakpoint): Likewise.
2585 * server.c (process_serial_event): Likewise.
2587 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2589 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2590 (struct linux_target_ops) <breakpoint>: Remove.
2591 (struct linux_target_ops) <breakpoint_len>: Remove.
2592 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2593 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2594 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2595 (arm_sw_breakpoint_from_kind): New function.
2596 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2597 (struct linux_target_ops) <breakpoint>: Remove.
2598 (struct linux_target_ops) <breakpoint_len>: Remove.
2599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2601 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2602 (struct linux_target_ops) <breakpoint>: Remove.
2603 (struct linux_target_ops) <breakpoint_len>: Remove.
2604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2606 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2607 (struct linux_target_ops) <breakpoint>: Remove.
2608 (struct linux_target_ops) <breakpoint_len>: Remove.
2609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2611 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2612 and sw_breakpoint_from_kind to increment the pc.
2613 (linux_breakpoint_kind_from_pc): New function.
2614 (linux_sw_breakpoint_from_kind): New function.
2615 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2616 (initialize_low): Call breakpoint_kind_from_pc and
2617 sw_breakpoint_from_kind to replace breakpoint_data/len.
2618 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2621 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2622 (struct linux_target_ops) <breakpoint>: Remove.
2623 (struct linux_target_ops) <breakpoint_len>: Remove.
2624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2626 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2627 (struct linux_target_ops) <breakpoint>: Remove.
2628 (struct linux_target_ops) <breakpoint_len>: Remove.
2629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2631 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2632 (struct linux_target_ops) <breakpoint>: Remove.
2633 (struct linux_target_ops) <breakpoint_len>: Remove.
2634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2636 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2637 (struct linux_target_ops) <breakpoint>: Remove.
2638 (struct linux_target_ops) <breakpoint_len>: Remove.
2639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2641 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2642 (struct linux_target_ops) <breakpoint>: Remove.
2643 (struct linux_target_ops) <breakpoint_len>: Remove.
2644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2646 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2647 (struct linux_target_ops) <breakpoint>: Remove.
2648 (struct linux_target_ops) <breakpoint_len>: Remove.
2649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2651 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2652 (struct linux_target_ops) <breakpoint>: Remove.
2653 (struct linux_target_ops) <breakpoint_len>: Remove.
2654 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2656 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2657 (struct linux_target_ops) <breakpoint>: Remove.
2658 (struct linux_target_ops) <breakpoint_len>: Remove.
2659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2661 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2662 (struct linux_target_ops) <breakpoint>: Remove.
2663 (struct linux_target_ops) <breakpoint_len>: Remove.
2664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2666 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2667 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2668 (struct linux_target_ops) <breakpoint>: Remove.
2669 (struct linux_target_ops) <breakpoint_len>: Remove.
2670 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2671 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2672 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2673 (struct linux_target_ops) <breakpoint>: Remove.
2674 (struct linux_target_ops) <breakpoint_len>: Remove.
2675 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2678 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2680 * linux-cris-low.c (cris_get_pc): Remove void arg.
2682 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2684 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2687 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2689 * inferiors.c (thread_pid_matches_callback): New function.
2690 (find_thread_process): New function.
2691 (remove_thread): Reset current_thread.
2692 (remove_process): Assert threads have been removed first.
2694 2015-10-15 Yao Qi <yao.qi@linaro.org>
2696 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2698 (aarch64_remove_point): Likewise.
2699 * regcache.c (regcache_register_size): New function.
2701 2015-10-12 Yao Qi <yao.qi@linaro.org>
2703 * linux-aarch64-low.c: Update all callers as emit_load_store
2704 is renamed to aarch64_emit_load_store.
2706 2015-10-12 Yao Qi <yao.qi@linaro.org>
2708 * linux-aarch64-low.c: Update all callers of function renaming
2709 from emit_insn to aarch64_emit_insn.
2711 2015-10-12 Yao Qi <yao.qi@linaro.org>
2713 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2714 arch/aarch64-insn.h.
2715 (struct aarch64_memory_operand): Likewise.
2717 (emit_insn): Move to arch/aarch64-insn.c.
2718 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2719 (emit_load_store): Move to arch/aarch64-insn.c.
2720 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2721 (can_encode_int32): Remove.
2723 2015-10-12 Yao Qi <yao.qi@linaro.org>
2725 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2726 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2727 (aarch64_relocate_instruction): Likewise.
2728 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2729 (struct aarch64_insn_visitor): Likewise.
2731 2015-10-12 Yao Qi <yao.qi@linaro.org>
2733 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2734 (struct aarch64_insn_visitor): New.
2735 (struct aarch64_insn_relocation_data): New.
2736 (aarch64_ftrace_insn_reloc_b): New function.
2737 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2738 (aarch64_ftrace_insn_reloc_cb): Likewise.
2739 (aarch64_ftrace_insn_reloc_tb): Likewise.
2740 (aarch64_ftrace_insn_reloc_adr): Likewise.
2741 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2742 (aarch64_ftrace_insn_reloc_others): Likewise.
2744 (aarch64_relocate_instruction): Use visitor.
2746 2015-10-12 Yao Qi <yao.qi@linaro.org>
2748 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2749 int. Add argument buf.
2750 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2751 aarch64_relocate_instruction.
2753 2015-10-12 Yao Qi <yao.qi@linaro.org>
2755 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2756 argument insn. Remove local variable insn. Don't call
2758 (aarch64_install_fast_tracepoint_jump_pad): Call
2761 2015-09-30 Yao Qi <yao.qi@linaro.org>
2763 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2764 (emit_load_store_pair): Likewise.
2766 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2768 * dll.c (match_dll): Add cast(s).
2769 (unloaded_dll): Likewise.
2770 * linux-low.c (second_thread_of_pid_p): Likewise.
2771 (delete_lwp_callback): Likewise.
2772 (count_events_callback): Likewise.
2773 (select_event_lwp_callback): Likewise.
2774 (linux_set_resume_request): Likewise.
2775 * server.c (accumulate_file_name_length): Likewise.
2776 (emit_dll_description): Likewise.
2777 (handle_qxfer_threads_worker): Likewise.
2778 (visit_actioned_threads): Likewise.
2779 * thread-db.c (any_thread_of): Likewise.
2780 * tracepoint.c (same_process_p): Likewise.
2781 (match_blocktype): Likewise.
2782 (build_traceframe_info_xml): Likewise.
2784 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2786 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2788 (gdb_unparse_agent_expr): Likewise.
2789 * hostio.c (require_data): Likewise.
2790 (handle_pread): Likewise.
2791 * linux-low.c (disable_regset): Likewise.
2792 (fetch_register): Likewise.
2793 (store_register): Likewise.
2794 (get_dynamic): Likewise.
2795 (linux_qxfer_libraries_svr4): Likewise.
2796 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2797 (set_fast_tracepoint_jump): Likewise.
2798 (uninsert_fast_tracepoint_jumps_at): Likewise.
2799 (reinsert_fast_tracepoint_jumps_at): Likewise.
2800 (validate_inserted_breakpoint): Likewise.
2801 (clone_agent_expr): Likewise.
2802 * regcache.c (init_register_cache): Likewise.
2803 * remote-utils.c (putpkt_binary_1): Likewise.
2804 (decode_M_packet): Likewise.
2805 (decode_X_packet): Likewise.
2806 (look_up_one_symbol): Likewise.
2807 (relocate_instruction): Likewise.
2808 (monitor_output): Likewise.
2809 * server.c (handle_search_memory): Likewise.
2810 (handle_qxfer_exec_file): Likewise.
2811 (handle_qxfer_libraries): Likewise.
2812 (handle_qxfer): Likewise.
2813 (handle_query): Likewise.
2814 (handle_v_cont): Likewise.
2815 (handle_v_run): Likewise.
2816 (captured_main): Likewise.
2817 * target.c (write_inferior_memory): Likewise.
2818 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2819 * tracepoint.c (init_trace_buffer): Likewise.
2820 (add_tracepoint_action): Likewise.
2821 (add_traceframe): Likewise.
2822 (add_traceframe_block): Likewise.
2823 (cmd_qtdpsrc): Likewise.
2824 (cmd_qtdv): Likewise.
2825 (cmd_qtstatus): Likewise.
2826 (response_source): Likewise.
2827 (response_tsv): Likewise.
2828 (cmd_qtnotes): Likewise.
2829 (gdb_collect): Likewise.
2830 (initialize_tracepoint): Likewise.
2832 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2834 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2835 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2836 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2838 (enum aarch64_condition_codes): New enum.
2839 (w0): New static global.
2842 (struct aarch64_memory_operand) <type>: New
2843 MEMORY_OPERAND_POSTINDEX type.
2844 (postindex_memory_operand): New helper function.
2845 (emit_ret): New function.
2846 (emit_load_store_pair): New function, factored out of emit_stp
2847 with support for MEMORY_OPERAND_POSTINDEX.
2848 (emit_stp): Rewrite using emit_load_store_pair.
2849 (emit_ldp): New function.
2850 (emit_load_store): Likewise.
2851 (emit_ldr): Mention post-index instruction in comment.
2852 (emit_ldrh): New function.
2853 (emit_ldrb): New function.
2854 (emit_ldrsw): Mention post-index instruction in comment.
2855 (emit_str): Likewise.
2856 (emit_subs): New function.
2857 (emit_cmp): Likewise.
2858 (emit_and): Likewise.
2859 (emit_orr): Likewise.
2860 (emit_orn): Likewise.
2861 (emit_eor): Likewise.
2862 (emit_mvn): Likewise.
2863 (emit_lslv): Likewise.
2864 (emit_lsrv): Likewise.
2865 (emit_asrv): Likewise.
2866 (emit_mul): Likewise.
2867 (emit_sbfm): Likewise.
2868 (emit_sbfx): Likewise.
2869 (emit_ubfm): Likewise.
2870 (emit_ubfx): Likewise.
2871 (emit_csinc): Likewise.
2872 (emit_cset): Likewise.
2873 (emit_nop): Likewise.
2874 (emit_ops_insns): New helper function.
2875 (emit_pop): Likewise.
2876 (emit_push): Likewise.
2877 (aarch64_emit_prologue): New function.
2878 (aarch64_emit_epilogue): Likewise.
2879 (aarch64_emit_add): Likewise.
2880 (aarch64_emit_sub): Likewise.
2881 (aarch64_emit_mul): Likewise.
2882 (aarch64_emit_lsh): Likewise.
2883 (aarch64_emit_rsh_signed): Likewise.
2884 (aarch64_emit_rsh_unsigned): Likewise.
2885 (aarch64_emit_ext): Likewise.
2886 (aarch64_emit_log_not): Likewise.
2887 (aarch64_emit_bit_and): Likewise.
2888 (aarch64_emit_bit_or): Likewise.
2889 (aarch64_emit_bit_xor): Likewise.
2890 (aarch64_emit_bit_not): Likewise.
2891 (aarch64_emit_equal): Likewise.
2892 (aarch64_emit_less_signed): Likewise.
2893 (aarch64_emit_less_unsigned): Likewise.
2894 (aarch64_emit_ref): Likewise.
2895 (aarch64_emit_if_goto): Likewise.
2896 (aarch64_emit_goto): Likewise.
2897 (aarch64_write_goto_address): Likewise.
2898 (aarch64_emit_const): Likewise.
2899 (aarch64_emit_call): Likewise.
2900 (aarch64_emit_reg): Likewise.
2901 (aarch64_emit_pop): Likewise.
2902 (aarch64_emit_stack_flush): Likewise.
2903 (aarch64_emit_zero_ext): Likewise.
2904 (aarch64_emit_swap): Likewise.
2905 (aarch64_emit_stack_adjust): Likewise.
2906 (aarch64_emit_int_call_1): Likewise.
2907 (aarch64_emit_void_call_2): Likewise.
2908 (aarch64_emit_eq_goto): Likewise.
2909 (aarch64_emit_ne_goto): Likewise.
2910 (aarch64_emit_lt_goto): Likewise.
2911 (aarch64_emit_le_goto): Likewise.
2912 (aarch64_emit_gt_goto): Likewise.
2913 (aarch64_emit_ge_got): Likewise.
2914 (aarch64_emit_ops_impl): New static global variable.
2915 (aarch64_emit_ops): New target function, return
2916 &aarch64_emit_ops_impl.
2917 (struct linux_target_ops): Install it.
2919 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2921 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2922 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2924 * linux-aarch64-ipa.c: New file.
2925 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2927 (aarch64_get_thread_area): New target method.
2928 (extract_signed_bitfield): New helper function.
2929 (aarch64_decode_ldr_literal): New function.
2930 (enum aarch64_opcodes): New enum.
2931 (struct aarch64_register): New struct.
2932 (struct aarch64_operand): New struct.
2933 (x0): New static global.
2942 (aarch64_register): New helper function.
2943 (register_operand): Likewise.
2944 (immediate_operand): Likewise.
2945 (struct aarch64_memory_operand): New struct.
2946 (offset_memory_operand): New helper function.
2947 (preindex_memory_operand): Likewise.
2948 (enum aarch64_system_control_registers): New enum.
2949 (ENCODE): New macro.
2950 (emit_insn): New helper function.
2951 (emit_b): New function.
2952 (emit_bcond): Likewise.
2953 (emit_cb): Likewise.
2954 (emit_tb): Likewise.
2955 (emit_blr): Likewise.
2956 (emit_stp): Likewise.
2957 (emit_ldp_q_offset): Likewise.
2958 (emit_stp_q_offset): Likewise.
2959 (emit_load_store): Likewise.
2960 (emit_ldr): Likewise.
2961 (emit_ldrsw): Likewise.
2962 (emit_str): Likewise.
2963 (emit_ldaxr): Likewise.
2964 (emit_stxr): Likewise.
2965 (emit_stlr): Likewise.
2966 (emit_data_processing_reg): Likewise.
2967 (emit_data_processing): Likewise.
2968 (emit_add): Likewise.
2969 (emit_sub): Likewise.
2970 (emit_mov): Likewise.
2971 (emit_movk): Likewise.
2972 (emit_mov_addr): Likewise.
2973 (emit_mrs): Likewise.
2974 (emit_msr): Likewise.
2975 (emit_sevl): Likewise.
2976 (emit_wfe): Likewise.
2977 (append_insns): Likewise.
2978 (can_encode_int32_in): New helper function.
2979 (aarch64_relocate_instruction): New function.
2980 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2981 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2982 (struct linux_target_ops): Install aarch64_get_thread_area,
2983 aarch64_install_fast_tracepoint_jump_pad and
2984 aarch64_get_min_fast_tracepoint_insn_len.
2986 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2988 * Makefile.in (aarch64-insn.o): New rule.
2989 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2991 2015-09-21 Yao Qi <yao.qi@linaro.org>
2993 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2995 2015-09-21 Yao Qi <yao.qi@linaro.org>
2997 * tracepoint.c (max_jump_pad_size): Remove.
2999 2015-09-18 Yao Qi <yao.qi@linaro.org>
3001 * linux-aarch64-low.c: Don't include sys/uio.h.
3002 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3004 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3006 * tracepoint.c (eval_result_type): Change prototype.
3007 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3009 2015-09-15 Pedro Alves <palves@redhat.com>
3011 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3012 Check whether to report exec events instead of checking whether
3013 multiprocess is enabled.
3015 2015-09-15 Pedro Alves <palves@redhat.com>
3018 * remote-utils.c (prepare_resume_reply): Merge
3019 TARGET_WAITKIND_VFORK_DONE switch case with the
3020 TARGET_WAITKIND_FORKED case.
3022 2015-09-15 Yao Qi <yao.qi@linaro.org>
3024 * server.c (handle_query): Check string comparison using
3025 "else if" instead of "if".
3027 2015-09-15 Yao Qi <yao.qi@linaro.org>
3029 * server.c (vCont_supported): New global variable.
3030 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3031 matches. Append ";vContSupported+" to own_buf.
3032 (handle_v_requests): Append ";s;S" to own_buf if target supports
3033 hardware single step or vCont_supported is false.
3034 (capture_main): Set vCont_supported to zero.
3036 2015-09-15 Yao Qi <yao.qi@linaro.org>
3038 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3040 (linux_supports_hardware_single_step): ... New function.
3041 (linux_target_ops): Update.
3042 * lynx-low.c (lynx_target_ops): Set field
3043 supports_hardware_single_step to target_can_do_hardware_single_step.
3044 * nto-low.c (nto_target_ops): Likewise.
3045 * spu-low.c (spu_target_ops): Likewise.
3046 * win32-low.c (win32_target_ops): Likewise.
3047 * target.c (target_can_do_hardware_single_step): New function.
3048 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3049 Remove. <supports_hardware_single_step>: New field.
3050 (target_supports_conditional_breakpoints): Remove.
3051 (target_supports_hardware_single_step): New macro.
3052 (target_can_do_hardware_single_step): Declare.
3053 * server.c (handle_query): Use target_supports_hardware_single_step
3054 instead of target_supports_conditional_breakpoints.
3056 2015-09-15 Yao Qi <yao.qi@linaro.org>
3058 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3060 (struct linux_target_ops the_low_target): Install
3061 aarch64_linux_siginfo_fixup.
3063 2015-09-11 Don Breazeal <donb@codesourcery.com>
3064 Luis Machado <lgustavo@codesourcery.com>
3066 * linux-low.c (linux_mourn): Static declaration.
3067 (linux_arch_setup): Move in front of
3068 handle_extended_wait.
3069 (linux_arch_setup_thread): New function.
3070 (handle_extended_wait): Handle exec events. Call
3071 linux_arch_setup_thread. Make event_lwp argument a
3072 pointer-to-a-pointer.
3073 (check_zombie_leaders): Do not check stopped threads.
3074 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3075 (linux_low_filter_event): Add lwp and thread for exec'ing
3076 non-leader thread if leader thread has been deleted.
3077 Refactor code into linux_arch_setup_thread and call it.
3078 Pass child lwp pointer by reference to handle_extended_wait.
3079 (linux_wait_for_event_filtered): Update comment.
3080 (linux_wait_1): Prevent clobbering exec event status.
3081 (linux_supports_exec_events): New function.
3082 (linux_target_ops) <supports_exec_events>: Initialize new member.
3083 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3085 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3086 * server.c (report_exec_events): New global variable.
3087 (handle_query): Handle qSupported query for exec-events feature.
3088 (captured_main): Initialize report_exec_events.
3089 * server.h (report_exec_events): Declare new global variable.
3090 * target.h (struct target_ops) <supports_exec_events>: New
3092 (target_supports_exec_events): New macro.
3093 * win32-low.c (win32_target_ops) <supports_exec_events>:
3094 Initialize new member.
3096 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3098 * linux-low.c (linux_low_enable_btrace): Remove.
3099 (linux_target_ops): Replace linux_low_enable_btrace with
3100 linux_enable_btrace.
3102 2015-09-03 Yao Qi <yao.qi@linaro.org>
3104 * linux-aarch64-low.c (aarch64_insert_point): Call
3105 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3108 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3110 * linux-low.c (check_stopped_by_breakpoint): Use
3111 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3113 2015-08-27 Pedro Alves <palves@redhat.com>
3115 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3117 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3119 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3120 the XNEW-family equivalent.
3121 (compile_bytecodes): Likewise.
3122 * dll.c (loaded_dll): Likewise.
3123 * event-loop.c (append_callback_event): Likewise.
3124 (create_file_handler): Likewise.
3125 (create_file_event): Likewise.
3126 * hostio.c (handle_open): Likewise.
3127 * inferiors.c (add_thread): Likewise.
3128 (add_process): Likewise.
3129 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3130 * linux-arm-low.c (arm_new_process): Likewise.
3131 (arm_new_thread): Likewise.
3132 * linux-low.c (add_to_pid_list): Likewise.
3133 (linux_add_process): Likewise.
3134 (handle_extended_wait): Likewise.
3135 (add_lwp): Likewise.
3136 (enqueue_one_deferred_signal): Likewise.
3137 (enqueue_pending_signal): Likewise.
3138 (linux_resume_one_lwp_throw): Likewise.
3139 (linux_resume_one_thread): Likewise.
3140 (linux_read_memory): Likewise.
3141 (linux_write_memory): Likewise.
3142 * linux-mips-low.c (mips_linux_new_process): Likewise.
3143 (mips_linux_new_thread): Likewise.
3144 (mips_add_watchpoint): Likewise.
3145 * linux-x86-low.c (initialize_low_arch): Likewise.
3146 * lynx-low.c (lynx_add_process): Likewise.
3147 * mem-break.c (set_raw_breakpoint_at): Likewise.
3148 (set_breakpoint): Likewise.
3149 (add_condition_to_breakpoint): Likewise.
3150 (add_commands_to_breakpoint): Likewise.
3151 (clone_agent_expr): Likewise.
3152 (clone_one_breakpoint): Likewise.
3153 * regcache.c (new_register_cache): Likewise.
3154 * remote-utils.c (look_up_one_symbol): Likewise.
3155 * server.c (queue_stop_reply): Likewise.
3156 (start_inferior): Likewise.
3157 (queue_stop_reply_callback): Likewise.
3158 (handle_target_event): Likewise.
3159 * spu-low.c (fetch_ppc_memory): Likewise.
3160 (store_ppc_memory): Likewise.
3161 * target.c (set_target_ops): Likewise.
3162 * thread-db.c (thread_db_load_search): Likewise.
3163 (try_thread_db_load_1): Likewise.
3164 * tracepoint.c (add_tracepoint): Likewise.
3165 (add_tracepoint_action): Likewise.
3166 (create_trace_state_variable): Likewise.
3167 (cmd_qtdpsrc): Likewise.
3168 (cmd_qtro): Likewise.
3169 (add_while_stepping_state): Likewise.
3170 * win32-low.c (child_add_thread): Likewise.
3171 (get_image_name): Likewise.
3173 2015-08-25 Yao Qi <yao.qi@linaro.org>
3175 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3177 2015-08-25 Yao Qi <yao.qi@linaro.org>
3179 * Makefile.in (aarch64-linux.o): New rule.
3180 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3182 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3183 (aarch64_init_debug_reg_state): Make it extern.
3184 (aarch64_linux_prepare_to_resume): Remove.
3186 2015-08-25 Yao Qi <yao.qi@linaro.org>
3188 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3189 lwp_arch_private_info and ptid_of_lwp.
3191 2015-08-25 Yao Qi <yao.qi@linaro.org>
3193 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3194 Find proc_info by find_process_pid. All callers updated.
3196 2015-08-25 Yao Qi <yao.qi@linaro.org>
3198 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3200 (debug_reg_change_callback): Remove.
3201 (aarch64_notify_debug_reg_change): Remove.
3203 2015-08-25 Yao Qi <yao.qi@linaro.org>
3205 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3206 Call current_lwp_ptid.
3208 2015-08-25 Yao Qi <yao.qi@linaro.org>
3210 * linux-aarch64-low.c (debug_reg_change_callback): Use
3213 2015-08-25 Yao Qi <yao.qi@linaro.org>
3215 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3217 2015-08-25 Yao Qi <yao.qi@linaro.org>
3219 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3221 2015-08-25 Yao Qi <yao.qi@linaro.org>
3223 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3226 2015-08-25 Yao Qi <yao.qi@linaro.org>
3228 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3230 (debug_reg_change_callback): Remove argument entry and add argument
3231 lwp. Remove local variable thread. Don't print thread id in the
3232 debugging output. Don't check whether pid of thread equals to pid.
3233 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3234 iterate_over_lwps instead find_inferior.
3236 2015-08-24 Pedro Alves <palves@redhat.com>
3238 * inferiors.c (get_first_process): New function.
3239 * inferiors.h (get_first_process): New declaration.
3240 * remote-utils.c (read_ptid): Default to the first process in the
3241 list, instead of to the current thread's process.
3243 2015-08-24 Pedro Alves <palves@redhat.com>
3245 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3246 * event-loop.c: Likewise.
3247 * remote-utils.c: Likewise.
3248 * tracepoint.c: Likewise.
3250 2015-08-24 Pedro Alves <palves@redhat.com>
3252 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3255 2015-08-21 Pedro Alves <palves@redhat.com>
3257 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3258 instead of literal 1.
3260 2015-08-21 Pedro Alves <palves@redhat.com>
3262 * tdesc.c (default_description): Explicitly zero-initialize.
3264 2015-08-21 Pedro Alves <palves@redhat.com>
3267 * inferiors.c (remove_thread): Discard any pending stop reply for
3269 * server.c (remove_all_on_match_pid): Rename to ...
3270 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3272 (discard_queued_stop_replies): Change parameter to a ptid. Now
3274 (handle_v_kill, kill_inferior_callback, captured_main)
3275 (process_serial_event): Adjust.
3276 * server.h (discard_queued_stop_replies): Declare.
3278 2015-08-21 Pedro Alves <palves@redhat.com>
3280 * linux-low.c (wait_for_sigstop): Always switch to no thread
3281 selected if the previously current thread dies.
3282 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3283 process instead of the current thread's.
3284 * remote-utils.c (input_interrupt): Don't check if there's no
3286 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3287 current thread to the general thread fails, error out.
3288 (handle_qxfer_auxv, handle_qxfer_libraries)
3289 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3290 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3291 (handle_query): Check if there's a thread selected instead of
3292 checking whether there's any thread in the thread list.
3293 (handle_qxfer_threads, handle_qxfer_btrace)
3294 (handle_qxfer_btrace_conf): Don't error out early if there's no
3295 thread in the thread list.
3296 (handle_v_cont, myresume): Don't set the current thread to the
3298 (process_serial_event) <Hg handling>: Also set thread_id if the
3299 previous general thread is still alive.
3300 (process_serial_event) <g/G handling>: If setting the current
3301 thread to the general thread fails, error out.
3302 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3303 thread's lwp instead of the current thread's.
3304 * target.c (set_desired_thread): If the desired thread was not
3305 found, leave the current thread pointing to NULL. Return an int
3306 (boolean) indicating success.
3307 * target.h (set_desired_thread): Change return type to int.
3309 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3311 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3312 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3314 (ps_get_thread_area): New function.
3316 2015-08-19 Gary Benson <gbenson@redhat.com>
3318 * hostio.c (handle_pread): Do not attempt to read more data
3319 than hostio_reply_with_data can fit in a packet.
3321 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3323 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3325 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3327 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3329 2015-08-06 Pedro Alves <palves@redhat.com>
3331 * tracepoint.c (expr_eval_result): Now an int.
3333 2015-08-06 Pedro Alves <palves@redhat.com>
3335 * gdbthread.h (struct regcache): Forward declare.
3336 (struct thread_info) <regcache_data>: Now a struct regcache
3338 * inferiors.c (inferior_regcache_data)
3339 (set_inferior_regcache_data): Now work with struct regcache
3341 * inferiors.h (struct regcache): Forward declare.
3342 (inferior_regcache_data, set_inferior_regcache_data): Now work
3343 with struct regcache pointers.
3344 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3345 (free_register_cache_thread): Remove struct regcache pointer
3348 2015-08-06 Pedro Alves <palves@redhat.com>
3350 * server.c (captured_main): On error, print the exception message
3351 to stderr, and if run_once is set, throw a quit.
3353 2015-08-06 Pedro Alves <palves@redhat.com>
3355 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3358 2015-08-06 Pedro Alves <palves@redhat.com>
3360 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3361 reading beyond the passed in buffer length.
3363 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3365 * tracepoint.c (symbol_list) <required>: Remove.
3367 2015-08-06 Pedro Alves <palves@redhat.com>
3369 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3370 count if stopping and suspending threads.
3371 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3372 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3373 (linux_detach): Complete an ongoing step-over.
3374 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3376 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3377 (linux_wait_1): If passing a signal to the inferior after
3378 finishing a step-over, unsuspend and re-resume all lwps. If we
3379 see a single-step event but the thread should be continuing, don't
3380 pass the trap to gdb.
3381 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3382 internal_error instead of gdb_assert.
3383 (enqueue_pending_signal): New function.
3384 (check_ptrace_stopped_lwp_gone): Add debug output.
3385 (start_step_over): Use internal_error instead of gdb_assert.
3386 (complete_ongoing_step_over): New function.
3387 (linux_resume_one_thread): Don't resume a suspended thread.
3388 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3391 2015-08-06 Pedro Alves <palves@redhat.com>
3393 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3394 (linux_thread_alive): Use lwp_is_marked_dead.
3395 (extended_event_reported): Delete.
3396 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3397 instead of extended_event_reported.
3398 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3400 (lwp_is_marked_dead): New function.
3401 (lwp_running): Use lwp_is_marked_dead.
3402 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3405 2015-08-06 Pedro Alves <palves@redhat.com>
3407 * linux-low.c (linux_wait_1): Move fork event output out of the
3408 !report_to_gdb check. Pass event_child->waitstatus to
3409 target_waitstatus_to_string instead of ourstatus.
3411 2015-08-04 Yao Qi <yao.qi@linaro.org>
3413 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3414 if current_thread is 32 bit.
3416 2015-08-04 Yao Qi <yao.qi@linaro.org>
3418 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3419 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3420 * server.c (extended_protocol): Remove "static".
3421 * server.h (extended_protocol): Declare it.
3423 2015-08-04 Yao Qi <yao.qi@linaro.org>
3425 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3426 both aarch64 and aarch32.
3427 (aarch64_set_pc): Likewise.
3429 2015-08-04 Yao Qi <yao.qi@linaro.org>
3431 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3432 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3433 arm-with-neon.xml to srv_xmlfiles.
3434 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3435 (is_64bit_tdesc): New function.
3436 (aarch64_linux_read_description): New function.
3437 (aarch64_arch_setup): Call aarch64_linux_read_description.
3438 (regs_info): Rename to regs_info_aarch64.
3439 (aarch64_regs_info): Return right regs_info.
3440 (initialize_low_arch): Call initialize_low_arch_aarch32.
3442 2015-08-04 Yao Qi <yao.qi@linaro.org>
3444 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3445 * linux-aarch32-low.c: New file.
3446 * linux-aarch32-low.h: New file.
3447 * linux-arm-low.c (arm_fill_gregset): Move it to
3448 linux-aarch32-low.c.
3449 (arm_store_gregset): Likewise.
3450 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3451 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3452 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3453 (regs_info): Rename to regs_info_arm.
3454 (arm_regs_info): Return regs_info_aarch32 if
3455 have_ptrace_getregset is 1 and target description is
3456 arm_with_neon or arm_with_vfpv3.
3457 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3458 Call initialize_low_arch_aarch32 instead.
3460 2015-08-04 Yao Qi <yao.qi@linaro.org>
3462 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3463 * linux-low.c: ... here.
3464 * linux-low.h (have_ptrace_getregset): Declare it.
3466 2015-08-04 Pedro Alves <palves@redhat.com>
3468 * thread-db.c (struct thread_db): Use new typedefs.
3469 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3471 (disable_thread_event_reporting): Cast result of dlsym to
3472 destination function pointer type.
3473 (thread_db_mourn): Use td_ta_delete_ftype.
3475 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3477 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3479 (CDX_BREAKPOINT): Define for R2.
3480 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3481 (the_low_target): Add comments.
3483 2015-07-30 Yao Qi <yao.qi@linaro.org>
3485 * linux-arm-low.c (arm_hwcap): Remove it.
3486 (arm_read_description): New local variable arm_hwcap. Don't
3487 set arm_hwcap to zero.
3489 2015-07-30 Yao Qi <yao.qi@linaro.org>
3491 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3492 Use regcache->tdesc instead.
3493 (arm_store_wmmxregset): Likewise.
3494 (arm_fill_vfpregset): Likewise.
3495 (arm_store_vfpregset): Likewise.
3497 2015-07-30 Yao Qi <yao.qi@linaro.org>
3499 * linux-arm-low.c: Include arch/arm.h.
3500 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3501 (arm_store_gregset): Likewise.
3503 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3505 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3506 ptrace's 4th parameter.
3508 2015-07-27 Yao Qi <yao.qi@linaro.org>
3510 * configure.srv (case aarch64*-*-linux*): Don't set
3513 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3515 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3517 * linux-arm-low.c: Likewise.
3518 * linux-cris-low.c: Likewise.
3519 * linux-crisv32-low.c: Likewise.
3520 * linux-low.c: Likewise.
3521 * linux-m68k-low.c: Likewise.
3522 * linux-mips-low.c: Likewise.
3523 * linux-nios2-low.c: Likewise.
3524 * linux-s390-low.c: Likewise.
3525 * linux-sparc-low.c: Likewise.
3526 * linux-tic6x-low.c: Likewise.
3527 * linux-tile-low.c: Likewise.
3528 * linux-x86-low.c: Likewise.
3530 2015-07-24 Pedro Alves <palves@redhat.com>
3532 * config.in: Regenerate.
3533 * configure: Regenerate.
3535 2015-07-24 Pedro Alves <palves@redhat.com>
3537 * acinclude.m4: Include ../ptrace.m4.
3538 * configure.ac: Call GDB_AC_PTRACE.
3539 * config.in, configure: Regenerate.
3541 2015-07-24 Yao Qi <yao.qi@linaro.org>
3543 * linux-low.c (linux_create_inferior): Remove setting to
3544 proc->priv->new_inferior.
3545 (linux_attach): Likewise.
3546 (linux_low_filter_event): Likewise.
3547 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3549 2015-07-24 Yao Qi <yao.qi@linaro.org>
3551 * linux-low.c (linux_arch_setup): New function.
3552 (linux_low_filter_event): If proc->tdesc is NULL and
3553 proc->attached is true, call the_low_target.arch_setup.
3554 Otherwise, keep status pending, and return.
3555 (linux_resume_one_lwp_throw): Don't call get_pc if
3556 thread->while_stepping isn't NULL. Don't call
3557 get_thread_regcache if proc->tdesc is NULL.
3558 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3559 (linux_target_ops): Install arch_setup.
3560 * server.c (start_inferior): Call the_target->arch_setup.
3561 * target.h (struct target_ops) <arch_setup>: New field.
3562 (target_arch_setup): New marco.
3563 * lynx-low.c (lynx_target_ops): Update.
3564 * nto-low.c (nto_target_ops): Update.
3565 * spu-low.c (spu_target_ops): Update.
3566 * win32-low.c (win32_target_ops): Update.
3568 2015-07-24 Yao Qi <yao.qi@linaro.org>
3570 * linux-low.c (linux_add_process): Don't set
3571 proc->priv->new_inferior.
3572 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3573 (linux_attach): Likewise.
3575 2015-07-24 Yao Qi <yao.qi@linaro.org>
3577 * server.c (start_inferior): Code refactor.
3579 2015-07-24 Yao Qi <yao.qi@linaro.org>
3581 * server.c (process_serial_event): Set general_thread.
3583 2015-07-21 Yao Qi <yao.qi@linaro.org>
3585 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3586 aarch64_linux_get_debug_reg_capacity.
3588 2015-07-17 Yao Qi <yao.qi@linaro.org>
3590 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3591 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3592 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3593 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3594 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3595 (AARCH64_HWP_ALIGNMENT): Likewise.
3596 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3597 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3598 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3599 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3600 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3601 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3602 (struct aarch64_debug_reg_state): Likewise.
3603 (struct arch_lwp_info): Likewise.
3604 (aarch64_align_watchpoint): Likewise.
3605 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3606 (aarch64_watchpoint_length): Likewise.
3607 (aarch64_point_encode_ctrl_reg): Likewise
3608 (aarch64_point_is_aligned): Likewise.
3609 (aarch64_align_watchpoint): Likewise.
3610 (aarch64_linux_set_debug_regs):
3611 (aarch64_dr_state_insert_one_point): Likewise.
3612 (aarch64_dr_state_remove_one_point): Likewise.
3613 (aarch64_handle_breakpoint): Likewise.
3614 (aarch64_handle_aligned_watchpoint): Likewise.
3615 (aarch64_handle_unaligned_watchpoint): Likewise.
3616 (aarch64_handle_watchpoint): Likewise.
3618 2015-07-17 Yao Qi <yao.qi@linaro.org>
3620 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3621 and don't aarch64_get_debug_reg_state. All callers update.
3622 (aarch64_handle_aligned_watchpoint): Likewise.
3623 (aarch64_handle_unaligned_watchpoint): Likewise.
3624 (aarch64_handle_watchpoint): Likewise.
3625 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3626 (aarch64_remove_point): Likewise.
3628 2015-07-17 Yao Qi <yao.qi@linaro.org>
3630 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3632 (aarch64_handle_unaligned_watchpoint): Likewise.
3634 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3636 Revert the previous 3 commits:
3637 Move gdb_regex* to common/
3638 Move linux_find_memory_regions_full & co.
3639 gdbserver build-id attribute generator
3641 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3642 Jan Kratochvil <jan.kratochvil@redhat.com>
3644 gdbserver build-id attribute generator.
3645 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3646 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3647 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3649 (get_dynamic): Use find_pdhr to traverse program headers.
3650 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3651 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3652 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3653 (get_hex_build_id): New.
3654 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3655 to reply XML document.
3657 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3658 Jan Kratochvil <jan.kratochvil@redhat.com>
3660 * target.c: Include target/target-utils.h and fcntl.h.
3661 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3662 (target_fileio_read_stralloc): New functions.
3664 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3666 * Makefile.in (OBS): Add gdb_regex.o.
3668 * config.in: Rebuilt.
3669 * configure: Rebuilt.
3671 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3672 Jan Kratochvil <jan.kratochvil@redhat.com>
3674 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3675 * Makefile.in (OBS): Add target-utils.o.
3676 (linux-maps.o, target-utils.o): New.
3677 * configure.srv (srv_linux_obj): Add linux-maps.o.
3679 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3681 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3683 (the_low_target): Install it.
3685 2015-07-14 Pedro Alves <palves@redhat.com>
3687 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3688 Instead, ignore ECHILD, and throw an error for other errnos.
3690 2015-07-10 Pedro Alves <palves@redhat.com>
3692 * event-loop.c (struct callback_event) <data>: Change type to
3693 gdb_client_data instance instead of gdb_client_data pointer.
3694 (append_callback_event): Adjust.
3696 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3698 * linux-aarch64-low.c: Add comments for each linux_target_ops
3699 method. Remove comments already covered in target_ops and
3700 linux_target_ops definitions.
3701 (the_low_target): Add comments for each unimplemented method.
3703 2015-07-09 Yao Qi <yao.qi@linaro.org>
3705 * linux-aarch64-low.c (aarch64_regmap): Remove.
3706 (aarch64_usrregs_info): Remove.
3707 (regs_info): Set field usrregs to NULL.
3709 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3711 * linux-low.c: Include "rsp-low.h"
3712 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3713 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3714 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3715 (handle_btrace_enable_pt): New.
3716 (handle_btrace_general_set): Support "pt".
3717 (handle_btrace_conf_general_set): Support "pt:size".
3719 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3721 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3724 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3726 * linux-aarch64-low.c: Remove comment about endianness.
3727 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3728 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3731 2015-06-24 Gary Benson <gbenson@redhat.com>
3733 * linux-i386-ipa.c (stdint.h): Do not include.
3734 * lynx-i386-low.c (stdint.h): Likewise.
3735 * lynx-ppc-low.c (stdint.h): Likewise.
3736 * mem-break.c (stdint.h): Likewise.
3737 * thread-db.c (stdint.h): Likewise.
3738 * tracepoint.c (stdint.h): Likewise.
3739 * win32-low.c (stdint.h): Likewise.
3741 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3743 * server.c (write_qxfer_response): Update call to
3744 remote_escape_output.
3746 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3747 Jan Kratochvil <jan.kratochvil@redhat.com>
3749 Merge multiple hex conversions.
3750 * gdbreplay.c (tohex): Rename to 'fromhex'.
3751 (logchar): Use fromhex.
3753 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3755 * server.c (handle_qxfer_libraries): Set `version' attribute for
3758 2015-06-10 Gary Benson <gbenson@redhat.com>
3760 * target.h (struct target_ops) <multifs_open>: New field.
3761 <multifs_unlink>: Likewise.
3762 <multifs_readlink>: Likewise.
3763 * linux-low.c (nat/linux-namespaces.h): New include.
3764 (linux_target_ops): Initialize the_target->multifs_open,
3765 the_target->multifs_unlink and the_target->multifs_readlink.
3766 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3767 * hostio.c (hostio_fs_pid): New static variable.
3768 (hostio_handle_new_gdb_connection): New function.
3769 (handle_setfs): Likewise.
3770 (handle_open): Use the_target->multifs_open as appropriate.
3771 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3772 (handle_readlink): Use the_target->multifs_readlink as
3774 (handle_vFile): Handle vFile:setfs packets.
3775 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3776 after target_handle_new_gdb_connection.
3778 2015-06-10 Gary Benson <gbenson@redhat.com>
3780 * configure.ac (AC_CHECK_FUNCS): Add setns.
3781 * config.in: Regenerate.
3782 * configure: Likewise.
3783 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3784 (linux-namespaces.o): New rule.
3785 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3787 2015-06-09 Gary Benson <gbenson@redhat.com>
3789 * hostio.c (handle_open): Process mode argument with
3790 fileio_to_host_mode.
3792 2015-06-01 Yao Qi <yao.qi@linaro.org>
3794 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3795 * linux-x86-low.c: Likewise.
3797 2015-05-28 Don Breazeal <donb@codesourcery.com>
3799 * linux-low.c (handle_extended_wait): Initialize
3800 thread_info.last_resume_kind for new fork children.
3802 2015-05-15 Pedro Alves <palves@redhat.com>
3804 * target.h (target_handle_new_gdb_connection): Rewrite using if
3805 wrapped in do/while.
3807 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3809 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3810 * configure, config.in: Regenerate.
3811 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3814 2015-05-12 Don Breazeal <donb@codesourcery.com>
3816 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3817 PTRACE_EVENT_VFORK_DONE.
3818 (linux_low_ptrace_options, extended_event_reported): Add vfork
3820 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3821 and "vforkdone" for RSP 'T' Stop Reply Packet.
3822 * server.h (report_vfork_events): Declare
3825 2015-05-12 Don Breazeal <donb@codesourcery.com>
3827 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3828 (the_low_target) <new_fork>: Initialize new member.
3829 * linux-arm-low.c (arm_new_fork): New function.
3830 (the_low_target) <new_fork>: Initialize new member.
3831 * linux-low.c (handle_extended_wait): Call new target function
3833 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3834 * linux-mips-low.c (mips_add_watchpoint): New function
3835 extracted from mips_insert_point.
3836 (the_low_target) <new_fork>: Initialize new member.
3837 (mips_linux_new_fork): New function.
3838 (mips_insert_point): Call mips_add_watchpoint.
3839 * linux-x86-low.c (x86_linux_new_fork): New function.
3840 (the_low_target) <new_fork>: Initialize new member.
3842 2015-05-12 Don Breazeal <donb@codesourcery.com>
3844 * linux-low.c (handle_extended_wait): Implement return value,
3845 rename argument 'event_child' to 'event_lwp', handle
3846 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3847 (linux_low_ptrace_options): New function.
3848 (linux_low_filter_event): Call linux_low_ptrace_options,
3849 use different argument fo linux_enable_event_reporting,
3850 use return value from handle_extended_wait.
3851 (extended_event_reported): New function.
3852 (linux_wait_1): Call extended_event_reported and set
3853 status to report fork events.
3854 (linux_write_memory): Add pid to debug message.
3855 (reset_lwp_ptrace_options_callback): New function.
3856 (linux_handle_new_gdb_connection): New function.
3857 (linux_target_ops): Initialize new structure member.
3858 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3859 * lynx-low.c: Initialize new structure member.
3860 * remote-utils.c (prepare_resume_reply): Implement stop reason
3861 "fork" for "T" stop message.
3862 * server.c (handle_query): Call handle_new_gdb_connection.
3863 * server.h (report_fork_events): Declare global flag.
3864 * target.h (struct target_ops) <handle_new_gdb_connection>:
3866 (target_handle_new_gdb_connection): New macro.
3867 * win32-low.c: Initialize new structure member.
3869 2015-05-12 Don Breazeal <donb@codesourcery.com>
3871 * mem-break.c (APPEND_TO_LIST): Define macro.
3872 (clone_agent_expr): New function.
3873 (clone_one_breakpoint): New function.
3874 (clone_all_breakpoints): New function.
3875 * mem-break.h: Declare new functions.
3877 2015-05-12 Don Breazeal <donb@codesourcery.com>
3879 * linux-low.c (linux_supports_fork_events): New function.
3880 (linux_supports_vfork_events): New function.
3881 (linux_target_ops): Initialize new structure members.
3882 (initialize_low): Call linux_check_ptrace_features.
3883 * lynx-low.c (lynx_target_ops): Initialize new structure
3885 * server.c (report_fork_events, report_vfork_events):
3887 (handle_query): Add new features to qSupported packet and
3889 (captured_main): Initialize new global variables.
3890 * target.h (struct target_ops) <supports_fork_events>:
3892 <supports_vfork_events>: New member.
3893 (target_supports_fork_events): New macro.
3894 (target_supports_vfork_events): New macro.
3895 * win32-low.c (win32_target_ops): Initialize new structure
3898 2015-05-12 Gary Benson <gbenson@redhat.com>
3900 * server.c (handle_qxfer_exec_file): Use current process
3903 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3905 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3906 Remove HAVE_PTRACE_GETREGS conditionals.
3907 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3908 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3910 2015-05-08 Yao Qi <yao.qi@linaro.org>
3912 * linux-low.c (linux_supports_conditional_breakpoints): New
3914 (linux_target_ops): Install new target method.
3915 * lynx-low.c (lynx_target_ops): Install NULL hook for
3916 supports_conditional_breakpoints.
3917 * nto-low.c (nto_target_ops): Likewise.
3918 * spu-low.c (spu_target_ops): Likewise.
3919 * win32-low.c (win32_target_ops): Likewise.
3920 * server.c (handle_query): Check
3921 target_supports_conditional_breakpoints.
3922 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3924 (target_supports_conditional_breakpoints): New macro.
3926 2015-05-06 Pedro Alves <palves@redhat.com>
3929 * server.c (start_inferior): If the process exits, mourn it.
3931 2015-04-21 Gary Benson <gbenson@redhat.com>
3933 * hostio.c (fileio_open_flags_to_host): Factored out to
3934 fileio_to_host_openflags in common/fileio.c. Single use
3937 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3939 * linux-xtensa-low.c (xtensa_fill_gregset)
3940 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3943 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3945 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3946 (regs_info): Replace usrregs pointer with NULL.
3948 2015-04-17 Gary Benson <gbenson@redhat.com>
3950 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3951 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3952 * server.c (handle_qxfer_exec_file): New function.
3953 (qxfer_packets): Add exec-file entry.
3954 (handle_query): Report qXfer:exec-file:read as supported packet.
3956 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3958 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3960 2015-04-09 Gary Benson <gbenson@redhat.com>
3962 * hostio-errno.c (errno_to_fileio_error): Remove function.
3963 Update caller to use remote_fileio_to_fio_error.
3965 2015-04-09 Yao Qi <yao.qi@linaro.org>
3967 * linux-low.c (linux_insert_point): Call
3968 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3969 (linux_remove_point): Call remove_memory_breakpoint if type is
3971 * linux-x86-low.c (x86_insert_point): Don't call
3972 insert_memory_breakpoint.
3973 (x86_remove_point): Don't call remove_memory_breakpoint.
3975 2015-04-01 Pedro Alves <palves@redhat.com>
3976 Cleber Rosa <crosa@redhat.com>
3978 * server.c (gdbserver_usage): Reorganize and extend the usage
3981 2015-03-24 Pedro Alves <palves@redhat.com>
3983 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3984 output. Also dump TRAP_TRACE.
3985 (linux_low_filter_event): In debug output, distinguish a
3986 resume_stop SIGSTOP from a delayed SIGSTOP.
3988 2015-03-24 Gary Benson <gbenson@redhat.com>
3990 * linux-x86-low.c (x86_linux_new_thread): Moved to
3992 (x86_linux_prepare_to_resume): Likewise.
3994 2015-03-24 Gary Benson <gbenson@redhat.com>
3996 * Makefile.in (x86-linux-dregs.o): New rule.
3997 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3998 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3999 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4000 (x86_linux_dr_get): Likewise.
4001 (x86_linux_dr_set): Likewise.
4002 (update_debug_registers_callback): Likewise.
4003 (x86_linux_dr_set_addr): Likewise.
4004 (x86_linux_dr_get_addr): Likewise.
4005 (x86_linux_dr_set_control): Likewise.
4006 (x86_linux_dr_get_control): Likewise.
4007 (x86_linux_dr_get_status): Likewise.
4008 (x86_linux_update_debug_registers): Likewise.
4010 2015-03-24 Gary Benson <gbenson@redhat.com>
4012 * linux-x86-low.c (x86_linux_update_debug_registers):
4013 New function, factored out from...
4014 (x86_linux_prepare_to_resume): ...this.
4016 2015-03-24 Gary Benson <gbenson@redhat.com>
4018 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4019 (x86_linux_dr_set): Likewise.
4020 (update_debug_registers_callback): Likewise.
4021 (x86_linux_dr_set_addr): Likewise.
4022 (x86_linux_dr_get_addr): Likewise.
4023 (x86_linux_dr_set_control): Likewise.
4024 (x86_linux_dr_get_control): Likewise.
4025 (x86_linux_dr_get_status): Likewise.
4026 (x86_linux_prepare_to_resume): Likewise.
4028 2015-03-24 Gary Benson <gbenson@redhat.com>
4030 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4031 Use perror_with_name. Pass string through gettext.
4032 (x86_linux_dr_set): Likewise.
4034 2015-03-24 Gary Benson <gbenson@redhat.com>
4036 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4037 (x86_linux_dr_set_addr): ...this.
4038 (x86_dr_low_get_addr): Rename to...
4039 (x86_linux_dr_get_addr): ...this.
4040 (x86_dr_low_set_control): Rename to...
4041 (x86_linux_dr_set_control): ...this.
4042 (x86_dr_low_get_control): Rename to...
4043 (x86_linux_dr_get_control): ...this.
4044 (x86_dr_low_get_status): Rename to...
4045 (x86_linux_dr_get_status): ...this.
4046 (x86_dr_low): Update with new function names.
4048 2015-03-24 Gary Benson <gbenson@redhat.com>
4050 * Makefile.in (x86-linux.o): New rule.
4051 * configure.srv: Add x86-linux.o to relevant targets.
4052 * linux-low.c (lwp_set_arch_private_info): New function.
4053 (lwp_arch_private_info): Likewise.
4054 * linux-x86-low.c: Include nat/x86-linux.h.
4055 (arch_lwp_info): Removed structure.
4056 (update_debug_registers_callback):
4057 Use lwp_set_debug_registers_changed.
4058 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4059 and lwp_set_debug_registers_changed.
4060 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4062 2015-03-24 Gary Benson <gbenson@redhat.com>
4064 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4065 * linux-arm-low.c (arm_new_thread): Likewise.
4066 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4067 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4068 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4069 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4071 2015-03-24 Gary Benson <gbenson@redhat.com>
4073 * linux-low.c (ptid_of_lwp): New function.
4074 (lwp_is_stopped): Likewise.
4075 (lwp_stop_reason): Likewise.
4076 * linux-x86-low.c (update_debug_registers_callback):
4078 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4081 2015-03-24 Gary Benson <gbenson@redhat.com>
4083 * linux-low.h (linux_stop_lwp): Remove declaration.
4085 2015-03-24 Gary Benson <gbenson@redhat.com>
4087 * linux-low.h: Include nat/linux-nat.h.
4088 * linux-low.c (iterate_over_lwps_args): New structure.
4089 (iterate_over_lwps_filter): New function.
4090 (iterate_over_lwps): Likewise.
4091 * linux-x86-low.c (update_debug_registers_callback):
4092 Update signature to what iterate_over_lwps expects.
4093 Remove PID check that iterate_over_lwps now performs.
4094 (x86_dr_low_set_addr): Use iterate_over_lwps.
4095 (x86_dr_low_set_control): Likewise.
4097 2015-03-24 Gary Benson <gbenson@redhat.com>
4099 * linux-x86-low.c (x86_debug_reg_state): New function.
4100 (x86_linux_prepare_to_resume): Use the above.
4102 2015-03-24 Gary Benson <gbenson@redhat.com>
4104 * linux-low.c (current_lwp_ptid): New function.
4105 * linux-x86-low.c: Include nat/linux-nat.h.
4106 (x86_dr_low_get_addr): Use current_lwp_ptid.
4107 (x86_dr_low_get_control): Likewise.
4108 (x86_dr_low_get_status): Likewise.
4110 2015-03-20 Pedro Alves <palves@redhat.com>
4112 * tracepoint.c (cmd_qtstatus): Make "str" const.
4114 2015-03-20 Pedro Alves <palves@redhat.com>
4116 * server.c (handle_general_set): Make "req_str" const.
4118 2015-03-19 Pedro Alves <palves@redhat.com>
4120 * linux-low.c (linux_resume_one_lwp): Rename to ...
4121 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4122 instead call perror_with_name.
4123 (check_ptrace_stopped_lwp_gone): New function.
4124 (linux_resume_one_lwp): Reimplement as wrapper around
4125 linux_resume_one_lwp_throw that swallows errors if the LWP is
4128 2015-03-19 Pedro Alves <palves@redhat.com>
4130 * linux-low.c (count_events_callback, select_event_lwp_callback):
4131 No longer check whether the thread has resume_stop as last resume
4134 2015-03-19 Pedro Alves <palves@redhat.com>
4136 * linux-low.c (count_events_callback, select_event_lwp_callback):
4137 Use the lwp's status_pending_p field, not the thread's.
4139 2015-03-19 Pedro Alves <palves@redhat.com>
4141 * linux-low.c (select_event_lwp_callback): Update comments to
4142 no longer mention SIGTRAP.
4144 2015-03-18 Gary Benson <gbenson@redhat.com>
4146 * server.c (handle_query): Do not report vFile:fstat as supported.
4148 2015-03-11 Gary Benson <gbenson@redhat.com>
4150 * hostio.c (sys/types.h): New include.
4151 (sys/stat.h): Likewise.
4152 (common-remote-fileio.h): Likewise.
4153 (handle_fstat): New function.
4154 (handle_vFile): Handle vFile:fstat packets.
4156 2015-03-11 Gary Benson <gbenson@redhat.com>
4158 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4159 struct stat.st_blocks and struct stat.st_blksize.
4160 * configure: Regenerate.
4161 * config.in: Likewise.
4162 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4163 (OBS): Add common-remote-fileio.o.
4164 (common-remote-fileio.o): New rule.
4166 2015-03-09 Pedro Alves <palves@redhat.com>
4168 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4169 'struct sockaddr' pointer in 'accept' call.
4171 2015-03-09 Pedro Alves <palves@redhat.com>
4174 2015-03-07 Pedro Alves <palves@redhat.com>
4175 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4176 or <winsock2.h> here. Instead include "gdb_socket.h".
4177 (remote_open): Use union gdb_sockaddr_u.
4178 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4179 or <winsock2.h> here. Instead include "gdb_socket.h".
4180 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4181 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4183 (init_named_socket, gdb_agent_helper_thread): Use union
4186 2015-03-07 Pedro Alves <palves@redhat.com>
4188 * configure.ac (build_warnings): Move
4189 -Wdeclaration-after-statement to the C-specific set.
4190 * configure: Regenerate.
4192 2015-03-07 Pedro Alves <palves@redhat.com>
4194 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4195 or <winsock2.h> here. Instead include "gdb_socket.h".
4196 (remote_open): Use union gdb_sockaddr_u.
4197 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4198 or <winsock2.h> here. Instead include "gdb_socket.h".
4199 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4200 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4202 (init_named_socket, gdb_agent_helper_thread): Use union
4205 2015-03-07 Pedro Alves <palves@redhat.com>
4207 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4210 2015-03-06 Yao Qi <yao.qi@linaro.org>
4212 * linux-aarch64-low.c (aarch64_insert_point): Use
4213 show_debug_regs as a boolean.
4214 (aarch64_remove_point): Likewise.
4216 2015-03-05 Pedro Alves <palves@redhat.com>
4218 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4219 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4220 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4221 * nto-low.c (nto_target_ops): Likewise.
4222 * spu-low.c (spu_target_ops): Likewise.
4223 * win32-low.c (win32_target_ops): Likewise.
4225 2015-03-04 Pedro Alves <palves@redhat.com>
4227 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4228 Decide whether a breakpoint triggered based on the SIGTRAP's
4230 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4231 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4232 (linux_low_filter_event): Check for breakpoints before checking
4234 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4236 (linux_stopped_by_sw_breakpoint)
4237 (linux_supports_stopped_by_sw_breakpoint)
4238 (linux_stopped_by_hw_breakpoint)
4239 (linux_supports_stopped_by_hw_breakpoint): New functions.
4240 (linux_target_ops): Install new target methods.
4242 2015-03-04 Pedro Alves <palves@redhat.com>
4244 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4245 * server.c (swbreak_feature, hwbreak_feature): New globals.
4246 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4247 (captured_main): Clear swbreak_feature and hwbreak_feature.
4248 * server.h (swbreak_feature, hwbreak_feature): Declare.
4249 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4250 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4251 supports_stopped_by_hw_breakpoint>: New fields.
4252 (target_supports_stopped_by_sw_breakpoint)
4253 (target_stopped_by_sw_breakpoint)
4254 (target_supports_stopped_by_hw_breakpoint)
4255 (target_stopped_by_hw_breakpoint): Declare.
4257 2015-03-04 Pedro Alves <palves@redhat.com>
4259 enum lwp_stop_reason -> enum target_stop_reason
4260 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4261 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4262 (linux_wait_1, stuck_in_jump_pad_callback)
4263 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4264 (linux_stopped_by_watchpoint):
4265 * linux-low.h (enum lwp_stop_reason): Delete.
4266 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4267 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4269 2015-03-04 Yao Qi <yao.qi@linaro.org>
4271 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4273 2015-03-03 Gary Benson <gbenson@redhat.com>
4275 * hostio.c (handle_vFile): Fix prefix lengths.
4277 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4279 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4282 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4284 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4285 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4286 (clean): Add "rm -f" for above C files.
4287 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4288 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4289 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4290 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4291 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4292 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4293 (init_registers_s390x_vx_linux64)
4294 (init_registers_s390x_tevx_linux64)
4295 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4296 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4298 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4299 (s390_store_vxrs_high): New functions.
4300 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4302 (s390_arch_setup): Add logic for selecting one of the new target
4303 descriptions. Activate the new vector regsets if applicable.
4304 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4305 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4306 and init_registers_s390x_tevx_linux64.
4308 2015-03-01 Pedro Alves <palves@redhat.com>
4310 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4313 2015-02-27 Pedro Alves <palves@redhat.com>
4315 * linux-x86-low.c (u_debugreg_offset): New function.
4316 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4318 2015-02-27 Pedro Alves <palves@redhat.com>
4320 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4321 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4322 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4323 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4324 (ps_lsetfpregs, ps_getpid)
4325 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4326 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4327 (ps_lsetxregs, ps_plog): Declare.
4329 2015-02-27 Pedro Alves <palves@redhat.com>
4331 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4332 IP_AGENT_EXPORT_FUNC.
4333 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4334 IP_AGENT_EXPORT_FUNC.
4335 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4336 (IP_AGENT_EXPORT): Delete.
4337 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4338 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4339 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4340 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4341 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4342 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4343 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4344 (traceframe_read_count, traceframe_write_count)
4345 (traceframes_created, trace_state_variables, get_raw_reg)
4346 (get_trace_state_variable_value, set_trace_state_variable_value)
4347 (ust_loaded, helper_thread_id, cmd_buf): Use
4348 IPA_SYM_EXPORTED_NAME.
4349 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4350 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4351 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4352 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4353 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4354 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4355 EXTERN_C_PUSH/EXTERN_C_POP.
4356 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4357 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4358 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4359 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4360 (traceframe_write_count, traceframe_read_count)
4361 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4362 (about_to_request_buffer_space, get_trace_state_variable_value)
4363 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4364 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4365 EXTERN_C_PUSH/EXTERN_C_POP.
4366 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4367 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4368 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4369 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4370 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4371 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4372 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4373 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4375 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4376 (IP_AGENT_EXPORT_VAR_DECL): Define.
4378 (gdb_agent_get_raw_reg): Declare.
4380 2015-02-27 Tom Tromey <tromey@redhat.com>
4381 Pedro Alves <palves@redhat.com>
4383 Rename symbols whose names are reserved C++ keywords throughout.
4385 2015-02-27 Pedro Alves <palves@redhat.com>
4387 * Makefile.in (COMPILER): New, get it from autoconf.
4388 (CXX): Get from autoconf instead.
4389 (COMPILE.pre): Use COMPILER.
4390 (CC-LD): Rename to ...
4391 (CC_LD): ... this. Use COMPILER.
4392 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4393 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4394 * acinclude.m4: Include build-with-cxx.m4.
4395 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4396 Disable -Werror by default if building in C++ mode.
4397 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4398 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4399 the C++ compiler. Save/restore CXXFLAGS too.
4400 * configure: Regenerate.
4402 2015-02-27 Pedro Alves <palves@redhat.com>
4404 * acinclude.m4: Include libiberty.m4.
4405 * configure.ac: Call libiberty_INIT.
4406 * config.in, configure: Regenerate.
4408 2015-02-26 Pedro Alves <palves@redhat.com>
4410 * linux-low.c (linux_wait_1): When incrementing the PC past a
4411 program breakpoint always use the_low_target.breakpoint_len as
4412 increment, rather than the maximum between that and
4413 the_low_target.decr_pc_after_break.
4415 2015-02-23 Pedro Alves <palves@redhat.com>
4417 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4418 thread was doing a step-over; always adjust the PC if
4419 we stepped over a permanent breakpoint.
4420 (linux_wait_1): If we stepped over breakpoint that was on top of a
4421 permanent breakpoint, manually advance the PC past it.
4423 2015-02-23 Pedro Alves <palves@redhat.com>
4425 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4427 (x86_fill_gregset, x86_store_gregset): Use it when handling
4430 2015-02-20 Pedro Alves <palves@redhat.com>
4432 * thread-db.c: Include "nat/linux-procfs.h".
4433 (thread_db_init): Skip listing new threads if the kernel supports
4434 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4436 2015-02-20 Pedro Alves <palves@redhat.com>
4438 * linux-low.c (status_pending_p_callback): Use ptid_match.
4440 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4442 PR breakpoints/16812
4443 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4444 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4445 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4447 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4449 PR breakpoints/15956
4450 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4452 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4454 * linux-low.c (linux_low_btrace_conf): Print size.
4455 * server.c (handle_btrace_conf_general_set): New.
4456 (hanle_general_set): Call handle_btrace_conf_general_set.
4457 (handle_query): Report Qbtrace-conf:bts:size as supported.
4459 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4461 * linux-low.c (linux_low_enable_btrace): Update parameters.
4462 (linux_low_btrace_conf): New.
4463 (linux_target_ops)<to_btrace_conf>: Initialize.
4464 * server.c (current_btrace_conf): New.
4465 (handle_btrace_enable): Rename to ...
4466 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4467 to target_enable_btrace. Update comment. Update users.
4468 (handle_qxfer_btrace_conf): New.
4469 (qxfer_packets): Add btrace-conf entry.
4470 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4471 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4472 (target_ops)<read_btrace_conf>: New.
4473 (target_enable_btrace): Update parameters.
4474 (target_read_btrace_conf): New.
4476 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4478 * server.c (handle_btrace_general_set): Remove call to
4479 target_supports_btrace.
4480 (supported_btrace_packets): New.
4481 (handle_query): Call supported_btrace_packets.
4482 * target.h: include btrace-common.h.
4483 (btrace_target_info): Removed.
4484 (supports_btrace, target_supports_btrace): Update parameters.
4486 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4488 * Makefile.in (SFILES): Add common/btrace-common.c.
4489 (OBS): Add common/btrace-common.o.
4490 (btrace-common.o): Add build rules.
4491 * linux-low: Include btrace-common.h.
4492 (linux_low_read_btrace): Use struct btrace_data. Call
4493 btrace_data_init and btrace_data_fini.
4495 2015-02-06 Pedro Alves <palves@redhat.com>
4497 * thread-db.c (find_new_threads_callback): Add debug output.
4499 2015-02-04 Pedro Alves <palves@redhat.com>
4501 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4502 (resume_stopped_resumed_lwps): New function.
4503 (linux_wait_for_event_filtered): Use it.
4505 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4507 * Makefile.in (SFILES): Add linux-personality.c.
4508 (linux-personality.o): New rule.
4509 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4510 list of objects to be built.
4511 * linux-low.c: Include nat/linux-personality.h.
4512 (linux_create_inferior): Remove code to disable address space
4513 randomization (moved to ../nat/linux-personality.c). Create
4514 cleanup to disable address space randomization.
4516 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4518 * Makefile.in (posix-strerror.o): New rule.
4519 (mingw-strerror.o): Likewise.
4520 * configure: Regenerated.
4521 * configure.ac: Source file ../common/common.host. Initialize new
4522 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4524 2015-01-14 Yao Qi <yao@codesourcery.com>
4526 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4527 (ppc-linux.o): New rule.
4528 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4529 * configure.ac: AC_CHECK_FUNCS(getauxval).
4530 * config.in: Re-generated.
4531 * configure: Re-generated.
4532 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4533 ppc64_64bit_inferior_p
4535 2015-01-14 Yao Qi <yao@codesourcery.com>
4537 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4538 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4539 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4540 (PT_ORIG_R3, PT_TRAP): Likewise.
4541 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4542 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4543 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4545 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4547 * i387-fp.c (i387_cache_to_xsave): In look over
4548 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4549 zmmh_low_space field by use of zmmh_high_space.
4551 2015-01-09 Pedro Alves <palves@redhat.com>
4553 * linux-low.c (step_over_bkpt): Move higher up in the file.
4554 (handle_extended_wait): Don't store the stop_pc here.
4555 (get_stop_pc): Adjust comments and rename to ...
4556 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4557 stopped for a software breakpoint or hardware breakpoint.
4558 (thread_still_has_status_pending_p): New function.
4559 (status_pending_p_callback): Use
4560 thread_still_has_status_pending_p. If the event is no longer
4561 interesting, resume the LWP.
4562 (handle_tracepoints): Add assert.
4563 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4564 (wstatus_maybe_breakpoint): New function.
4565 (cancel_breakpoint): Delete function.
4566 (check_stopped_by_watchpoint): New function, factored out from
4567 linux_low_filter_event.
4568 (lp_status_maybe_breakpoint): Delete function.
4569 (linux_low_filter_event): Remove filter_ptid argument.
4570 Leave thread group exits pending here. Store the LWP's stop PC.
4571 Always leave events pending.
4572 (linux_wait_for_event_filtered): Pull all events out of the
4573 kernel, and leave them all pending.
4574 (count_events_callback, select_event_lwp_callback): Consider all
4576 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4577 (select_event_lwp): Only give preference to the stepping LWP in
4578 all-stop mode. Adjust comments.
4579 (ignore_event): New function.
4580 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4581 references to cancel_breakpoints. Adjust to renames. Also give
4582 equal priority to all LWPs that have had events in non-stop mode.
4583 If reporting a software breakpoint event, unadjust the LWP's PC.
4584 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4585 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4587 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4588 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4589 (linux_stopped_by_watchpoint): Adjust.
4590 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4591 * linux-low.h (enum lwp_stop_reason): New.
4592 (struct lwp_info) <stop_pc>: Adjust comment.
4593 <stopped_by_watchpoint>: Delete field.
4594 <stop_reason>: New field.
4595 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4596 * mem-break.c (software_breakpoint_inserted_here)
4597 (hardware_breakpoint_inserted_here): New function.
4598 * mem-break.h (software_breakpoint_inserted_here)
4599 (hardware_breakpoint_inserted_here): Declare.
4600 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4601 (cancel_breakpoints): Delete.
4602 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4603 (upload_fast_traceframes): Remove references to
4606 2015-01-09 Pedro Alves <palves@redhat.com>
4608 * thread-db.c (find_new_threads_callback): Ignore thread if the
4609 kernel thread ID is -1.
4611 2015-01-09 Pedro Alves <palves@redhat.com>
4613 * linux-low.c (linux_attach_fail_reason_string): Move to
4614 nat/linux-ptrace.c, and rename.
4615 (linux_attach_lwp): Update comment.
4616 (attach_proc_task_lwp_callback): New function.
4617 (linux_attach): Adjust to rename and use
4618 linux_proc_attach_tgid_threads.
4619 (linux_attach_fail_reason_string): Delete declaration.
4621 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4623 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4624 * server.c (gdbserver_version): Likewise.
4626 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4628 * remote-utils.c: Include ctype.h.
4629 (input_interrupt): Explicitly handle the case when the char
4630 received is the NUL byte. Improve the printing of non-ASCII
4633 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4635 * linux-low.c (linux_low_filter_event): Update call to
4636 linux_enable_event_reporting following the addition of
4637 a new parameter to that function.
4639 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4642 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4643 (AARCH64_FPCR_REGNO): Likewise.
4644 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4645 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4646 (aarch64_store_fpregset): Likewise.
4648 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4650 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4651 Remove FIXME comment about assumption about N.
4653 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4655 * configure.ac: If large-file support is disabled in GDBserver,
4656 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4657 * configure: Regenerate.
4659 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4661 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4662 warning upon ENODATA from ptrace.
4663 * linux-s390-low.c (s390_store_tdb): New.
4664 (s390_regsets): Add regset for NT_S390_TDB.
4666 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4668 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4669 without a fill_function.
4670 * linux-s390-low.c (s390_fill_last_break): Remove.
4671 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4672 (s390_arch_setup): Use regset's size instead of fill_function for
4675 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4677 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4678 the regset's store function when ptrace returned an error.
4679 * regcache.c (get_thread_regcache): Invalidate register cache
4680 before fetching inferior's registers.
4682 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4684 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4685 while-loop as for-loop.
4686 (regsets_store_inferior_registers): Likewise.
4688 2014-11-28 Yao Qi <yao@codesourcery.com>
4690 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4691 * config.in, configure: Re-generate.
4692 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4695 2014-11-21 Yao Qi <yao@codesourcery.com>
4697 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4698 (AC_CHECK_HEADERS): Remove malloc.h.
4699 * configure: Re-generated.
4700 * config.in: Re-generated.
4701 * server.h: Don't include alloca.h and malloc.h.
4702 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4703 Don't include malloc.h.
4705 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4707 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4708 corresponding ERRNO check in same block.
4710 2014-11-12 Pedro Alves <palves@redhat.com>
4712 * server.c (cont_thread): Update comment.
4713 (start_inferior, attach_inferior): No longer clear cont_thread.
4714 (handle_v_cont): No longer set cont_thread.
4715 (captured_main): Clear cont_thread each time a GDB connects.
4717 2014-11-12 Pedro Alves <palves@redhat.com>
4719 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4720 thread, and don't resume all threads if the Hc thread has exited.
4722 2014-11-12 Pedro Alves <palves@redhat.com>
4724 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4725 the process group instead of to a specific LWP.
4727 2014-10-15 Pedro Alves <palves@redhat.com>
4730 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4732 (arm_set_thread_context): Delete.
4733 (the_low_target): Adjust.
4734 * win32-i386-low.c (debug_registers_changed)
4735 (debug_registers_used): Delete.
4736 (update_debug_registers_callback): New function.
4737 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4738 needing to update their debug registers.
4739 (win32_get_current_dr): New function.
4740 (x86_dr_low_get_addr, x86_dr_low_get_control)
4741 (x86_dr_low_get_status): Fetch the debug register from the thread
4743 (i386_initial_stuff): Adjust.
4744 (i386_get_thread_context): Remove current_event parameter. Don't
4745 clear debug_registers_changed nor copy DR values to
4747 (i386_set_thread_context): Delete.
4748 (i386_prepare_to_resume): New function.
4749 (i386_thread_added): Mark the thread as needing to update irs
4751 (the_low_target): Remove i386_set_thread_context and install
4752 i386_prepare_to_resume.
4753 * win32-low.c (win32_get_thread_context): Adjust.
4754 (win32_set_thread_context): Use SetThreadContext
4756 (win32_prepare_to_resume): New function.
4757 (win32_require_context): New function, factored out from ...
4758 (thread_rec): ... this.
4759 (continue_one_thread): Call win32_prepare_to_resume on each thread
4760 we're about to continue.
4761 (win32_resume): Call win32_prepare_to_resume on the event thread.
4762 * win32-low.h (struct win32_thread_info)
4763 <debug_registers_changed>: New field.
4764 (struct win32_target_ops): Change prototype of set_thread_context,
4765 delete set_thread_context and add prepare_to_resume.
4766 (win32_require_context): New declaration.
4768 2014-10-08 Gary Benson <gbenson@redhat.com>
4770 * server.h: Do not include common-exceptions.h.
4772 2014-10-08 Gary Benson <gbenson@redhat.com>
4774 * server.h: Do not include cleanups.h.
4776 2014-09-30 James Hogan <james.hogan@imgtec.com>
4778 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4781 2014-09-23 Yao Qi <yao@codesourcery.com>
4783 * linux-low.c (lp_status_maybe_breakpoint): New function.
4784 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4785 (count_events_callback): Likewise.
4786 (select_event_lwp_callback): Likewise.
4787 (cancel_breakpoints_callback): Likewise.
4789 2014-09-19 Don Breazeal <donb@codesourcery.com>
4791 * linux-low.c (handle_extended_wait): Call
4792 linux_ptrace_get_extended_event.
4793 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4794 linux_is_extended_waitstatus.
4796 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4798 * Makefile.in (CPPFLAGS): Define.
4799 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4800 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4802 2014-09-16 Gary Benson <gbenson@redhat.com>
4804 * inferiors.h (current_inferior): Renamed as...
4805 (current_thread): New variable. All uses updated.
4806 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4807 (maybe_move_out_of_jump_pad): Likewise.
4808 (cancel_breakpoint): Likewise.
4809 (linux_low_filter_event): Likewise.
4810 (wait_for_sigstop): Likewise.
4811 (linux_resume_one_lwp): Likewise.
4812 (need_step_over_p): Likewise.
4813 (start_step_over): Likewise.
4814 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4815 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4816 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4817 and save_inferior as saved_thread.
4818 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4820 (regcache_invalidate_thread): Likewise.
4821 * remote-utils.c (prepare_resume_reply): Likewise.
4822 * thread-db.c (thread_db_get_tls_address): Likewise.
4823 (disable_thread_event_reporting): Likewise.
4824 (remove_thread_event_breakpoints): Likewise.
4825 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4827 * target.h (set_desired_inferior): Renamed as...
4828 (set_desired_thread): New declaration. All uses updated.
4829 * server.c (myresume): Updated comment to reference thread instead
4831 (handle_serial_event): Likewise.
4832 (handle_target_event): Likewise.
4834 2014-09-12 Tom Tromey <tromey@redhat.com>
4835 Gary Benson <gbenson@redhat.com>
4837 * regcache.h: Include common-regcache.h.
4838 (regcache_read_pc): Don't declare.
4839 * regcache.c (get_thread_regcache_for_ptid): New function.
4841 2014-09-11 Tom Tromey <tromey@redhat.com>
4842 Gary Benson <gbenson@redhat.com>
4844 * symbol.c: New file.
4845 * Makefile.in (SFILES): Add symbol.c.
4846 (OBS): Add symbol.o.
4848 2014-09-11 Gary Benson <gbenson@redhat.com>
4850 * target.c (target_stop_ptid, target_continue_ptid): New
4853 2014-09-11 Tom Tromey <tromey@redhat.com>
4854 Gary Benson <gbenson@redhat.com>
4856 * target.h: Include target/target.h.
4857 * target.c (target_read_memory, target_read_uint32)
4858 (target_write_memory): New functions.
4860 2014-09-11 Gary Benson <gbenson@redhat.com>
4862 * server.h (debug_hw_points): Don't declare.
4863 * server.c (debug_hw_points): Don't define. Replace all uses
4864 with show_debug_regs.
4865 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4866 all uses with show_debug_regs.
4868 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4870 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4871 endianness into account.
4872 (ppc_supply_ptrace_register): Likewise.
4874 2014-09-03 James Hogan <james.hogan@imgtec.com>
4876 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4877 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4879 2014-09-03 Gary Benson <gbenson@redhat.com>
4881 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4882 ALL_DEBUG_ADDRESS_REGISTERS.
4884 2014-09-02 Gary Benson <gbenson@redhat.com>
4886 * i386-low.h: Renamed as...
4887 * x86-low.h: New file. All type, function and variable name
4888 prefixes changed from "i386_" to "x86_". All references updated.
4889 * i386-low.c: Renamed as...
4890 * x86-low.c: New file. All type, function and variable name
4891 prefixes changed from "i386_" to "x86_". All references updated.
4893 2014-09-02 Gary Benson <gbenson@redhat.com>
4895 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4896 (x86_linux_new_thread): Likewise.
4898 2014-08-29 Gary Benson <gbenson@redhat.com>
4900 * server.h (setjmp.h): Do not include.
4901 (toplevel): Do not declare.
4902 (common-exceptions.h): Include.
4903 (cleanups.h): Likewise.
4904 * server.c (toplevel): Do not define.
4905 (exit_code): New static global.
4906 (detach_or_kill_for_exit_cleanup): New function.
4907 (main): New function. Original main renamed to...
4908 (captured_main): New function.
4909 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4911 2014-08-29 Gary Benson <gbenson@redhat.com>
4913 * Makefile.in (SFILES): Add common/common-exceptions.c.
4914 (OBS): Add common-exceptions.o.
4915 (common-exceptions.o): New rule.
4916 * utils.c (prepare_to_throw_exception): New function.
4918 2014-08-29 Gary Benson <gbenson@redhat.com>
4920 * config.in: Regenerate.
4921 * configure: Likewise.
4923 2014-08-29 Gary Benson <gbenson@redhat.com>
4925 * Makefile.in (SFILES): Add common/cleanups.c.
4927 (cleanups.o): New rule.
4929 2014-08-29 Gary Benson <gbenson@redhat.com>
4931 * utils.c (internal_vwarning): New function.
4933 2014-08-28 Gary Benson <gbenson@redhat.com>
4935 * utils.h (fatal): Remove declaration.
4936 * utils.c (fatal): Remove function.
4938 2014-08-28 Gary Benson <gbenson@redhat.com>
4940 * tracepoint.c (gdb_agent_init): Replace fatal with
4942 (initialize_tracepoint): Likewise.
4944 2014-08-28 Gary Benson <gbenson@redhat.com>
4946 * remote-utils.c (remote_prepare): Replace fatal with error.
4948 2014-08-28 Gary Benson <gbenson@redhat.com>
4950 * linux-low.c (linux_async): Replace fatal with warning.
4952 (linux_start_non_stop): Return -1 if linux_async failed.
4954 2014-08-28 Gary Benson <gbenson@redhat.com>
4956 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4958 (i386_dr_low_get_addr): Remove vague comment.
4959 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4962 2014-08-28 Gary Benson <gbenson@redhat.com>
4964 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4965 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4967 (linux_resume_one_lwp): Likewise.
4968 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4970 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4971 with internal_error.
4972 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4973 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4974 (find_register_by_name): Replace fatal with internal_error.
4975 (find_regno): Likewise.
4976 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4977 * thread-db.c (thread_db_create_event): Likewise.
4978 (thread_db_load_search): Likewise.
4979 (try_thread_db_load_1): Likewise.
4980 * tracepoint.c (get_jump_space_head): Replace fatal with
4982 (claim_trampoline_space): Likewise.
4983 (have_fast_tracepoint_trampoline_buffer): Likewise.
4984 (cmd_qtstart): Likewise.
4985 (stop_tracing): Likewise.
4986 (fast_tracepoint_collecting): Likewise.
4987 (target_malloc): Likewise.
4988 (download_tracepoint): Likewise.
4989 (download_trace_state_variables): Replace check with gdb_assert.
4990 (upload_fast_traceframes): Replace fatal with internal_error.
4992 2014-08-19 Tom Tromey <tromey@redhat.com>
4993 Gary Benson <gbenson@redhat.com>
4995 * Makefile.in (SFILES): Add common/common-debug.c.
4996 (OBS): Add common-debug.o.
4997 (common-debug.o): New rule.
4998 * debug.h (debug_printf): Don't declare.
4999 * debug.c (debug_printf): Renamed and rewritten as...
5000 (debug_vprintf): New function.
5002 2014-08-19 Gary Benson <gbenson@redhat.com>
5004 * utils.h: Do not include print-utils.h.
5006 2014-08-19 Tom Tromey <tromey@redhat.com>
5007 Gary Benson <gbenson@redhat.com>
5009 * server.h: Add static assertion.
5010 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5012 2014-08-19 Tom Tromey <tromey@redhat.com>
5013 Gary Benson <gbenson@redhat.com>
5015 * Makefile.in (SFILES): Add common/errors.c.
5016 (OBS): Add errors.o.
5017 (IPA_OBS): Add errors-ipa.o.
5018 (errors.o): New rule.
5019 (errors-ipa.o): Likewise.
5020 * utils.h (perror_with_name, error, warning): Don't declare.
5021 * utils.c (warning): Renamed and rewritten as...
5022 (vwarning): New function.
5023 (error): Renamed and rewritten as...
5024 (verror): New function.
5025 (internal_error): Renamed and rewritten as...
5026 (internal_verror): New function.
5028 2014-08-07 Gary Benson <gbenson@redhat.com>
5030 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5031 * configure: Regenerate.
5032 * config.in: Likewise.
5033 * server.h: Do not include errno.h.
5034 * event-loop.c: Likewise.
5035 * hostio-errno.c: Likewise.
5036 * linux-low.c: Likewise.
5037 * remote-utils.c: Likewise.
5038 * spu-low.c: Likewise.
5039 * utils.c: Likewise.
5040 * gdbreplay.c: Unconditionally include errno.h.
5042 2014-08-07 Gary Benson <gbenson@redhat.com>
5044 * server.h: Do not include string.h.
5045 * event-loop.c: Likewise.
5046 * linux-low.c: Likewise.
5047 * regcache.c: Likewise.
5048 * remote-utils.c: Likewise.
5049 * spu-low.c: Likewise.
5050 * utils.c: Likewise.
5052 2014-08-07 Gary Benson <gbenson@redhat.com>
5054 * server.h: Do not include gdb_assert.h.
5056 2014-08-07 Gary Benson <gbenson@redhat.com>
5058 * server.h: Do not include common-utils.h.
5060 2014-08-07 Gary Benson <gbenson@redhat.com>
5062 * server.h: Do not include ptid.h.
5063 * notif.h: Likewise.
5065 2014-08-07 Gary Benson <gbenson@redhat.com>
5067 * server.h: Do not include gdb_locale.h.
5069 2014-08-07 Gary Benson <gbenson@redhat.com>
5071 * server.h: Do not include gdb/signals.h.
5072 * win32-low.c: Likewise.
5074 2014-08-07 Gary Benson <gbenson@redhat.com>
5076 * server.h: Do not include pathmax.h.
5078 2014-08-07 Gary Benson <gbenson@redhat.com>
5080 * server.h: Do not include libiberty.h.
5081 * linux-bfin-low.c: Likewise.
5083 2014-08-07 Gary Benson <gbenson@redhat.com>
5085 * server.h: Do not include ansidecl.h.
5087 2014-08-07 Gary Benson <gbenson@redhat.com>
5089 * linux-x86-low.c: Do not include stddef.h.
5090 * lynx-ppc-low.c: Likewise.
5091 * tracepoint.c: Likewise.
5093 2014-08-07 Gary Benson <gbenson@redhat.com>
5095 * server.h: Do not include stdarg.h.
5096 * nto-low.c: Likewise.
5098 2014-08-07 Gary Benson <gbenson@redhat.com>
5100 * server.h: Do not include stdlib.h.
5101 * inferiors.c: Likewise.
5102 * linux-low.c: Likewise.
5103 * regcache.c: Likewise.
5104 * spu-low.c: Likewise.
5105 * tracepoint.c: Likewise.
5106 * utils.c: Likewise.
5108 2014-08-07 Gary Benson <gbenson@redhat.com>
5110 * server.h: Do not include stdio.h.
5111 * linux-low.c: Likewise.
5112 * remote-utils.c: Likewise.
5113 * spu-low.c: Likewise.
5114 * utils.c: Likewise.
5115 * wincecompat.c: Likewise.
5117 2014-08-06 Gary Benson <gbenson@redhat.com>
5119 * regcache.c (init_register_cache): Move conditionals inside if.
5121 2014-08-06 Gary Benson <gbenson@redhat.com>
5123 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5125 2014-07-31 Gary Benson <gbenson@redhat.com>
5127 * ax.h: Do not include server.h.
5128 * gdbthread.h: Likewise.
5129 * lynx-low.h: Likewise.
5130 * notif.h: Likewise.
5132 2014-07-30 Gary Benson <gbenson@redhat.com>
5134 * server.h: Include common-defs.h.
5135 Do not include config.h or build-gnulib-gdbserver/config.h.
5137 2014-07-30 Gary Benson <gbenson@redhat.com>
5139 * hostio-errno.c: Move server.h to top of includes list.
5140 * inferiors.c: Likewise.
5141 * linux-x86-low.c: Likewise.
5142 * notif.c: Include server.h.
5144 2014-07-24 Tom Tromey <tromey@redhat.com>
5145 Gary Benson <gbenson@redhat.com>
5147 * server.h (CORE_ADDR): Now unsigned.
5149 2014-07-16 Pedro Alves <palves@redhat.com>
5151 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5153 2014-07-15 Pedro Alves <palves@redhat.com>
5155 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5158 2014-07-11 Pedro Alves <palves@redhat.com>
5160 * linux-low.c (kill_wait_lwp): New function, based on
5161 kill_one_lwp_callback, but use my_waitpid directly.
5162 (kill_one_lwp_callback, linux_kill): Use it.
5164 2014-06-23 Pedro Alves <palves@redhat.com>
5166 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5167 before setting DR0..DR3.
5169 2014-06-20 Gary Benson <gbenson@redhat.com>
5171 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5172 * configure: Regenerated.
5173 * config.in: Likewise.
5175 2014-06-20 Gary Benson <gbenson@redhat.com>
5177 * Makefile.in (SFILES): Update locations for files moved
5179 (object file files): Reordered.
5181 2014-06-20 Gary Benson <gbenson@redhat.com>
5183 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5184 (i386_dr_low_set_addr): Likewise.
5185 (i386_dr_low_get_addr): Likewise.
5186 (i386_dr_low_can_set_control): Likewise.
5187 (i386_dr_low_set_control): Likewise.
5188 (i386_dr_low_get_control): Likewise.
5189 (i386_dr_low_get_status): Likewise.
5190 (i386_get_debug_register_length): Likewise.
5191 * linux-x86-low.c (i386_dr_low_set_addr):
5192 Changed signature. Made static.
5193 (i386_dr_low_get_addr): Likewise.
5194 (i386_dr_low_set_control): Likewise.
5195 (i386_dr_low_get_control): Likewise.
5196 (i386_dr_low_get_status): Likewise.
5197 (i386_dr_low): New global variable.
5198 * win32-i386-low.c (i386_dr_low_set_addr):
5199 Changed signature. Made static.
5200 (i386_dr_low_get_addr): Likewise.
5201 (i386_dr_low_set_control): Likewise.
5202 (i386_dr_low_get_control): Likewise.
5203 (i386_dr_low_get_status): Likewise.
5204 (i386_dr_low): New global variable.
5206 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5208 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5209 * Makefile.in (AR, AR_FLAGS): Define.
5210 * configure: Regenerate.
5212 2014-06-19 Gary Benson <gbenson@redhat.com>
5214 * Makefile.in (i386-dregs.o): New rule.
5215 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5216 * i386-low.c (target.h): Remove include.
5217 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5218 (DR_CONTROL_SHIFT): Likewise.
5219 (DR_CONTROL_SIZE): Likewise.
5220 (DR_RW_EXECUTE): Likewise.
5221 (DR_RW_WRITE): Likewise.
5222 (DR_RW_READ): Likewise.
5223 (DR_RW_IORW): Likewise.
5224 (DR_LEN_1): Likewise.
5225 (DR_LEN_2): Likewise.
5226 (DR_LEN_4): Likewise.
5227 (DR_LEN_8): Likewise.
5228 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5229 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5230 (DR_ENABLE_SIZE): Likewise.
5231 (DR_LOCAL_SLOWDOWN): Likewise.
5232 (DR_GLOBAL_SLOWDOWN): Likewise.
5233 (DR_CONTROL_RESERVED): Likewise.
5234 (I386_DR_CONTROL_MASK): Likewise.
5235 (I386_DR_VACANT): Likewise.
5236 (I386_DR_LOCAL_ENABLE): Likewise.
5237 (I386_DR_GLOBAL_ENABLE): Likewise.
5238 (I386_DR_DISABLE): Likewise.
5239 (I386_DR_SET_RW_LEN): Likewise.
5240 (I386_DR_GET_RW_LEN): Likewise.
5241 (I386_DR_WATCH_HIT): Likewise.
5242 (i386_wp_op_t): Likewise.
5243 (i386_show_dr): Likewise.
5244 (i386_length_and_rw_bits): Likewise.
5245 (i386_insert_aligned_watchpoint): Likewise.
5246 (i386_remove_aligned_watchpoint): Likewise.
5247 (i386_handle_nonaligned_watchpoint): Likewise.
5248 i386_update_inferior_debug_regs(): Likewise.
5249 (i386_dr_insert_watchpoint): Likewise.
5250 (i386_dr_remove_watchpoint): Likewise.
5251 (i386_dr_region_ok_for_watchpoint): Likewise.
5252 (i386_dr_stopped_data_address): Likewise.
5253 (i386_dr_stopped_by_watchpoint): Likewise.
5255 2014-06-19 Gary Benson <gbenson@redhat.com>
5257 * i386-low.c (i386_dr_show): Renamed to
5258 i386_show_dr and made static. All uses updated.
5259 (i386_dr_length_and_rw_bits): Renamed to
5260 i386_length_and_rw_bits and made static.
5262 (i386_dr_insert_aligned_watchpoint): Renamed to
5263 i386_insert_aligned_watchpoint and made static.
5265 (i386_dr_remove_aligned_watchpoint): Renamed to
5266 i386_remove_aligned_watchpoint and made static.
5268 (i386_dr_update_inferior_debug_regs): Renamed to
5269 i386_update_inferior_debug_regs and made static.
5272 2014-06-18 Gary Benson <gbenson@redhat.com>
5274 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5275 (i386_dr_low_can_set_control): Likewise.
5276 (i386_get_debug_register_length): Likewise.
5277 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5278 (i386_dr_low_can_set_control): Likewise.
5279 (i386_get_debug_register_length): Likewise.
5281 2014-06-17 Gary Benson <gbenson@redhat.com>
5283 * i386-low.h (i386-dregs.h): New include.
5284 (DR_FIRSTADDR): Now in i386-dregs.h.
5285 (DR_LASTADDR): Likewise.
5286 (DR_NADDR): Likewise.
5287 (DR_STATUS): Likewise.
5288 (DR_CONTROL): Likewise.
5289 (i386_debug_reg_state): Likewise.
5290 (i386_dr_insert_watchpoint): Likewise.
5291 (i386_dr_remove_watchpoint): Likewise.
5292 (i386_dr_region_ok_for_watchpoint): Likewise.
5293 (i386_dr_stopped_data_address): Likewise.
5294 (i386_dr_stopped_by_watchpoint): Likewise.
5295 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5297 2014-06-18 Gary Benson <gbenson@redhat.com>
5299 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5300 i386_dr_insert_watchpoint.
5301 (i386_low_remove_watchpoint): Renamed to
5302 i386_dr_remove_watchpoint.
5303 (i386_low_region_ok_for_watchpoint): Renamed to
5304 i386_dr_region_ok_for_watchpoint.
5305 (i386_low_stopped_data_address): Renamed to
5306 i386_dr_stopped_data_address.
5307 (i386_low_stopped_by_watchpoint): Renamed to
5308 i386_dr_stopped_by_watchpoint.
5309 * i386-low.c (i386_show_dr): Renamed to
5310 i386_dr_show and made nonstatic. All uses updated.
5311 (i386_length_and_rw_bits): Renamed to
5312 i386_dr_length_and_rw_bits and made nonstatic.
5314 (i386_insert_aligned_watchpoint): Renamed to
5315 i386_dr_insert_aligned_watchpoint and made nonstatic.
5317 (i386_remove_aligned_watchpoint): Renamed to
5318 i386_dr_remove_aligned_watchpoint and made nonstatic.
5320 (i386_update_inferior_debug_regs): Renamed to
5321 i386_dr_update_inferior_debug_regs and made nonstatic.
5323 (i386_low_insert_watchpoint): Renamed to
5324 i386_dr_insert_watchpoint. All uses updated.
5325 (i386_low_remove_watchpoint): Renamed to
5326 i386_dr_remove_watchpoint. All uses updated.
5327 (i386_low_region_ok_for_watchpoint): Renamed to
5328 i386_dr_region_ok_for_watchpoint. All uses updated.
5329 (i386_low_stopped_data_address): Renamed to
5330 i386_dr_stopped_data_address. All uses updated.
5331 (i386_low_stopped_by_watchpoint): Renamed to
5332 i386_dr_stopped_by_watchpoint. All uses updated.
5334 2014-06-18 Gary Benson <gbenson@redhat.com>
5336 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5337 (i386_dr_low_can_set_control): Likewise.
5338 (i386_insert_aligned_watchpoint): New check.
5340 2014-06-18 Gary Benson <gbenson@redhat.com>
5342 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5345 2014-06-18 Gary Benson <gbenson@redhat.com>
5347 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5348 instead of fatal and error.
5349 (i386_handle_nonaligned_watchpoint): Likewise.
5351 2014-06-18 Gary Benson <gbenson@redhat.com>
5353 * i386-low.c (i386_get_debug_register_length): New macro.
5354 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5355 (i386_show_dr): Use debug_printf instead of fprintf. Use
5356 phex to format values.
5358 2014-06-18 Gary Benson <gbenson@redhat.com>
5360 * i386-low.h: Comment changes.
5361 * i386-low.c: Likewise.
5363 2014-06-18 Gary Benson <gbenson@redhat.com>
5365 * i386-low.c: Whitespace changes.
5367 2014-06-12 Tom Tromey <tromey@redhat.com>
5369 * utils.c (freeargv): Remove.
5371 2014-06-12 Tom Tromey <tromey@redhat.com>
5373 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5374 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5375 (parse_debug_format_options): Likewise.
5376 (gdbserver_usage): Likewise.
5377 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5378 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5379 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5381 ($(LIBGNU)): Depend on libiberty.
5382 (all-lib): Recurse into all subdirs.
5383 (install-only): Invoke "install" target in subdirs.
5384 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5386 * configure: Rebuild.
5387 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5388 for vasprintf, vsnprintf, or gettimeofday.
5389 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5392 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5394 * development.sh: Delete.
5395 * Makefile.in (config.status): Adjust dependency on development.sh.
5396 * configure.ac: Adjust development.sh source call.
5397 * configure: Regenerate.
5399 2014-06-02 Pedro Alves <palves@redhat.com>
5401 * ax.c (gdb_free_agent_expr): New function.
5402 * ax.h (gdb_free_agent_expr): New declaration.
5403 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5405 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5407 (clear_breakpoint_conditions_and_commands): New function.
5408 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5409 (clear_breakpoint_conditions_and_commands): New declaration.
5411 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5413 * linux-aarch64-low.c (asm/ptrace.h): Include.
5415 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5417 Fix TLS access for -static -pthread.
5418 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5419 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5420 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5422 2014-05-20 Pedro Alves <palves@redhat.com>
5424 * linux-aarch64-low.c (aarch64_insert_point)
5425 (aarch64_remove_point): No longer check whether the type is
5426 supported here. Adjust to new interface.
5427 (the_low_target): Install aarch64_supports_z_point_type as
5428 supports_z_point_type method.
5429 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5430 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5431 instead of a Z packet char. Adjust.
5432 (arm_supports_z_point_type): New function.
5433 (arm_insert_point, arm_remove_point): Adjust to new interface.
5434 (the_low_target): Install arm_supports_z_point_type.
5435 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5436 (cris_insert_point, cris_remove_point): Adjust to new interface.
5437 Don't check whether the type is supported here.
5438 (the_low_target): Install cris_supports_z_point_type.
5439 * linux-low.c (linux_supports_z_point_type): New function.
5440 (linux_insert_point, linux_remove_point): Adjust to new interface.
5441 * linux-low.h (struct linux_target_ops) <insert_point,
5442 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5443 raw_breakpoint pointer parameter.
5444 <supports_z_point_type>: New method.
5445 * linux-mips-low.c (mips_supports_z_point_type): New function.
5446 (mips_insert_point, mips_remove_point): Adjust to new interface.
5447 Use mips_supports_z_point_type.
5448 (the_low_target): Install mips_supports_z_point_type.
5449 * linux-ppc-low.c (the_low_target): Install NULL as
5450 supports_z_point_type method.
5451 * linux-s390-low.c (the_low_target): Install NULL as
5452 supports_z_point_type method.
5453 * linux-sparc-low.c (the_low_target): Install NULL as
5454 supports_z_point_type method.
5455 * linux-x86-low.c (x86_supports_z_point_type): New function.
5456 (x86_insert_point): Adjust to new insert_point interface. Use
5457 insert_memory_breakpoint. Adjust to new
5458 i386_low_insert_watchpoint interface.
5459 (x86_remove_point): Adjust to remove_point interface. Use
5460 remove_memory_breakpoint. Adjust to new
5461 i386_low_remove_watchpoint interface.
5462 (the_low_target): Install x86_supports_z_point_type.
5463 * lynx-low.c (lynx_target_ops): Install NULL as
5464 supports_z_point_type callback.
5465 * nto-low.c (nto_supports_z_point_type): New.
5466 (nto_insert_point, nto_remove_point): Adjust to new interface.
5467 (nto_target_ops): Install nto_supports_z_point_type.
5468 * mem-break.c: Adjust intro comment.
5469 (struct raw_breakpoint) <raw_type, size>: New fields.
5470 <inserted>: Update comment.
5471 <shlib_disabled>: Delete field.
5472 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5473 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5474 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5475 (raw_bkpt_type_to_target_hw_bp_type): New function.
5476 (find_enabled_raw_code_breakpoint_at): New function.
5477 (find_raw_breakpoint_at): New type and size parameters. Use them.
5478 (insert_memory_breakpoint): New function, based off
5479 set_raw_breakpoint_at.
5480 (remove_memory_breakpoint): New function.
5481 (set_raw_breakpoint_at): Reimplement.
5482 (set_breakpoint): New, based on set_breakpoint_at.
5483 (set_breakpoint_at): Reimplement.
5484 (delete_raw_breakpoint): Go through the_target->remove_point
5485 instead of assuming memory breakpoints.
5486 (find_gdb_breakpoint_at): Delete.
5487 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5488 (find_gdb_breakpoint): New function.
5489 (set_gdb_breakpoint_at): Delete.
5490 (z_type_supported): New function.
5491 (set_gdb_breakpoint_1): New function, loosely based off
5492 set_gdb_breakpoint_at.
5493 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5494 (delete_gdb_breakpoint_at): Delete.
5495 (delete_gdb_breakpoint_1): New function, loosely based off
5496 delete_gdb_breakpoint_at.
5497 (delete_gdb_breakpoint): New function.
5498 (clear_gdb_breakpoint_conditions): Rename to ...
5499 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5501 (add_condition_to_breakpoint): Make static.
5502 (add_breakpoint_condition): Take a struct breakpoint pointer
5503 instead of an address. Adjust.
5504 (gdb_condition_true_at_breakpoint): Rename to ...
5505 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5507 (gdb_condition_true_at_breakpoint): Reimplement.
5508 (add_breakpoint_commands): Take a struct breakpoint pointer
5509 instead of an address. Adjust.
5510 (gdb_no_commands_at_breakpoint): Rename to ...
5511 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5512 parameter. Return true if no breakpoint was found. Change debug
5514 (gdb_no_commands_at_breakpoint): Reimplement.
5515 (run_breakpoint_commands): Rename to ...
5516 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5517 and change return type to boolean.
5518 (run_breakpoint_commands): New function.
5519 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5520 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5521 breakpoint. Go through the_target->remove_point instead of
5522 assuming memory breakpoint.
5523 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5524 software and hardware breakpoints.
5525 (reinsert_raw_breakpoint): Go through the_target->insert_point
5526 instead of assuming memory breakpoint.
5527 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5528 software and hardware breakpoints.
5529 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5530 Check both software and hardware breakpoints.
5531 (validate_inserted_breakpoint): Assert the breakpoint is a
5532 software breakpoint. Set the inserted flag to -1 instead of
5533 setting shlib_disabled.
5534 (delete_disabled_breakpoints): Adjust.
5535 (validate_breakpoints): Only validate software breakpoints.
5536 Adjust to inserted flag change.
5537 (check_mem_read, check_mem_write): Skip breakpoint types other
5538 than software breakpoints. Adjust to inserted flag change.
5539 * mem-break.h (enum raw_bkpt_type): New enum.
5540 (raw_breakpoint, struct process_info): Forward declare.
5541 (Z_packet_to_target_hw_bp_type): Delete declaration.
5542 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5543 (set_gdb_breakpoint, delete_gdb_breakpoint)
5544 (clear_breakpoint_conditions): New declarations.
5545 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5546 (breakpoint_inserted_here): Update comment.
5547 (add_breakpoint_condition, add_breakpoint_commands): Replace
5548 address parameter with a breakpoint pointer parameter.
5549 (gdb_breakpoint_here): Update comment.
5550 (delete_gdb_breakpoint_at): Delete.
5551 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5552 * server.c (process_point_options): Take a struct breakpoint
5553 pointer instead of an address. Adjust.
5554 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5555 delete_gdb_breakpoint.
5556 * spu-low.c (spu_target_ops): Install NULL as
5557 supports_z_point_type method.
5558 * target.h: Include mem-break.h.
5559 (struct target_ops) <prepare_to_access_memory>: Update comment.
5560 <supports_z_point_type>: New field.
5561 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5562 instead of a char. Also take a raw breakpoint pointer.
5563 * win32-arm-low.c (the_low_target): Install NULL as
5564 supports_z_point_type.
5565 * win32-i386-low.c (i386_supports_z_point_type): New function.
5566 (i386_insert_point, i386_remove_point): Adjust to new interface.
5567 (the_low_target): Install i386_supports_z_point_type.
5568 * win32-low.c (win32_supports_z_point_type): New function.
5569 (win32_insert_point, win32_remove_point): Adjust to new interface.
5570 (win32_target_ops): Install win32_supports_z_point_type.
5571 * win32-low.h (struct win32_target_ops):
5572 <supports_z_point_type>: New method.
5573 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5574 instead of a char. Also take a raw breakpoint pointer.
5576 2014-05-20 Pedro Alves <palves@redhat.com>
5578 * mem-break.h: Include break-common.h.
5579 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5580 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5581 (Z_packet_to_target_hw_bp_type): New declaration.
5582 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5583 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5584 (Z_PACKET_ACCESS_WP): Delete macros.
5585 (Z_packet_to_hw_type): Delete function.
5586 * i386-low.h: Don't include break-common.h here.
5587 (Z_packet_to_hw_type): Delete declaration.
5588 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5589 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5590 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5591 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5592 * linux-aarch64-low.c: Don't include break-common.h here.
5593 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5594 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5595 (Z_packet_to_target_hw_bp_type): Delete function.
5596 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5598 (mips_insert_point, mips_remove_point): Use
5599 Z_packet_to_target_hw_bp_type.
5601 2014-05-20 Pedro Alves <palves@redhat.com>
5603 * linux-aarch64-low.c: Include break-common.h.
5604 (enum target_point_type): Delete.
5605 (Z_packet_to_point_type): Rename to ...
5606 (Z_packet_to_target_hw_bp_type): ... this, and return a
5607 target_hw_bp_type instead.
5608 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5609 instead of an enum target_point_type.
5610 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5612 (aarch64_dr_state_insert_one_point)
5613 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5614 (aarch64_handle_aligned_watchpoint)
5615 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5616 Take an enum target_hw_bp_type instead of an enum
5618 (aarch64_supports_z_point_type): New function.
5619 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5620 use Z_packet_to_target_hw_bp_type.
5622 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5624 * configure.ac: Only use -Werror by default when DEVELOPMENT
5626 * configure: Regenerate.
5628 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5630 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5631 * linux-x86-low.c (X86_64_USER_REGS): New.
5632 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5634 2014-04-28 Yao Qi <yao@codesourcery.com>
5636 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5639 2014-04-25 Pedro Alves <palves@redhat.com>
5642 * linux-low.c (linux_attach_fail_reason_string): New function.
5643 (linux_attach_lwp): Delete.
5644 (linux_attach_lwp_1): Rename to ...
5645 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5646 argument. Remove "initial" parameter. Return int instead of
5647 void. Don't error or warn here.
5648 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5649 failure to attach to the tgid. Call warning when failing to
5651 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5652 argument. Remove "initial" parameter. Return int instead of
5653 void. Don't error or warn here.
5654 (linux_attach_fail_reason_string): New declaration.
5655 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5656 interface change. Use linux_attach_fail_reason_string.
5658 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5659 Walfred Tedeschi <walfred.tedeschi@intel.com>
5661 * Makefile.in: Added rules to handle new files
5662 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5663 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5664 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5665 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5666 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5667 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5669 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5670 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5671 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5672 i386/x32-avx512.xml.
5673 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5674 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5675 i386/x32-avx512-linux.xml.
5676 * i387-fp.c (num_avx512_k_registers): New constant for number
5678 (num_avx512_zmmh_low_registers): New constant for number of
5679 lower ZMM registers (0-15).
5680 (num_avx512_zmmh_high_registers): New constant for number of
5681 higher ZMM registers (16-31).
5682 (num_avx512_ymmh_registers): New contant for number of higher
5683 YMM registers (ymm16-31 added by avx521 on x86_64).
5684 (num_avx512_xmm_registers): New constant for number of higher
5685 XMM registers (xmm16-31 added by AVX512 on x86_64).
5686 (struct i387_xsave): Add space for AVX512 registers.
5687 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5688 Add code to handle AVX512 registers.
5689 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5690 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5691 prototypei from generated file.
5692 (tdesc_amd64_avx512_linux): Likewise.
5693 (init_registers_x32_avx512_linux): Likewise.
5694 (tdesc_x32_avx512_linux): Likewise.
5695 (init_registers_i386_avx512_linux): Likewise.
5696 (tdesc_i386_avx512_linux): Likewise.
5697 (x86_64_regmap): Add AVX512 registers.
5698 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5700 (initialize_low_arch): Add code to initialize AVX512 registers.
5702 2014-04-23 Pedro Alves <palves@redhat.com>
5704 * mem-break.c (find_gdb_breakpoint_at): Make static.
5705 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5707 2014-04-23 Pedro Alves <palves@redhat.com>
5709 * i386-low.c: Don't include break-common.h here.
5710 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5711 prototype to take target_hw_bp_type as argument instead of a Z
5713 * i386-low.h: Include break-common.h here.
5714 (Z_packet_to_hw_type): Declare.
5715 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5717 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5718 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5719 (x86_remove_point): Convert the packet number to a
5720 target_hw_bp_type before calling i386_low_remove_watchpoint.
5721 * win32-i386-low.c (i386_insert_point): Convert the packet number
5722 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5723 (i386_remove_point): Convert the packet number to a
5724 target_hw_bp_type before calling i386_low_remove_watchpoint.
5726 2014-04-23 Pedro Alves <palves@redhat.com>
5728 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5730 2014-04-10 Pedro Alves <palves@redhat.com>
5732 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5733 Check if the condition or command is NULL before checking if the
5734 breakpoint is known. On success, return true.
5735 * mem-break.h (add_breakpoint_condition): Document return.
5736 (add_breakpoint_commands): Add describing comment.
5737 * server.c (skip_to_semicolon): New function.
5738 (process_point_options): Use it.
5740 2014-04-09 Pedro Alves <palves@redhat.com>
5742 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5745 2014-02-27 Pedro Alves <palves@redhat.com>
5748 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5750 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5752 (last_thread_of_process_p): Take a PID argument instead of a
5754 (linux_wait_for_lwp): Delete.
5755 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5757 (linux_low_filter_event): New function, party factored out from
5758 linux_wait_for_event.
5759 (linux_wait_for_event): Rename to ...
5760 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5761 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5762 sigsuspend. Check for zombie leaders.
5763 (linux_wait_for_event): Reimplement as wrapper around
5764 linux_wait_for_event_filtered.
5765 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5766 a normal or signal exit is seen, it's the whole process exiting.
5767 (wait_for_sigstop): No longer a for_each_inferior callback.
5768 Rewrite on top of linux_wait_for_event_filtered.
5769 (stop_all_lwps): Call wait_for_sigstop directly.
5770 * server.c (resume, handle_target_event): Handle
5771 TARGET_WAITKIND_NO_RESUMED.
5773 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5775 * win32-low.c (psapi_get_dll_name,
5776 * win32_CreateToolhelp32Snapshot): Delete.
5777 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5778 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5780 (handle_load_dll): Add function description.
5781 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5783 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5785 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5787 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5788 base address when calling win32_add_one_solib.
5789 (handle_load_dll): Delete local variable load_addr.
5790 Remove 0x1000 offset applied to DLL base address when calling
5791 win32_add_one_solib.
5792 (handle_unload_dll): Add comment.
5794 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5796 * win32-low.c (win32_add_all_dlls): Renames
5797 win32_ensure_ntdll_loaded. Rewrite function documentation.
5798 Adjust implementation to always load all DLLs.
5799 Add 0x1000 offset to DLL base address when calling
5800 win32_add_one_solib.
5801 (child_initialization_done): New static global.
5802 (do_initial_child_stuff): Set child_initialization_done to
5803 zero during child initialization, and 1 after. Replace call
5804 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5806 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5807 (handle_unload_dll): Add function documentation.
5808 (get_child_debug_event): Ignore load and unload DLL events
5809 during child initialization.
5811 2014-02-20 Doug Evans <dje@google.com>
5813 Remove global all_lwps.
5814 * inferiors.h (ptid_of): Move here from linux-low.h.
5815 (pid_of, lwpid_of): Ditto.
5816 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5817 parameter is a struct thread_info * now.
5818 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5819 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5820 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5822 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5823 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5824 * linux-arm-low.c (update_registers_callback): Update, "entry"
5825 parameter is a struct thread_info * now.
5826 Fetch lwpid from current_inferior directly.
5827 (arm_insert_point): Pass &all_threads to find_inferior instead of
5829 (arm_remove_point): Ditto.
5830 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5831 (arm_prepare_to_resume): Fetch pid from thread.
5832 (arm_read_description): Fetch lwpid from current_inferior directly.
5833 * linux-low.c (all_lwps): Delete.
5834 (delete_lwp): Delete call to remove_inferior.
5835 (handle_extended_wait): Fetch lwpid from thread.
5836 (add_lwp): Don't set lwp->entry.id. Remove call to
5837 add_inferior_to_list.
5838 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5839 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5840 (kill_one_lwp_callback): Ditto.
5841 (linux_kill): Don't dereference NULL pointer.
5842 Fetch ptid,lwpid from thread.
5843 (get_detach_signal): Fetch ptid from thread.
5844 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5845 Simplify call to regcache_invalidate_thread.
5846 (delete_lwp_callback): Update, "entry" parameter is a
5847 struct thread_info * now. Fetch pid from thread.
5848 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5849 (status_pending_p_callback): Update, "entry" parameter is a
5850 struct thread_info * now. Fetch ptid from thread.
5851 (find_lwp_pid): Update, "entry" parameter is a
5852 struct thread_info * now.
5853 (linux_wait_for_lwp): Fetch pid from thread.
5854 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5855 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5856 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5857 (dequeue_one_deferred_signal): Ditto.
5858 (cancel_breakpoint): Fetch ptid from current_inferior.
5859 (linux_wait_for_event): Pass &all_threads to find_inferior,
5860 not &all_lwps. Fetch ptid, lwpid from thread.
5861 (count_events_callback): Update, "entry" parameter is a
5862 struct thread_info * now.
5863 (select_singlestep_lwp_callback): Ditto.
5864 (select_event_lwp_callback): Ditto.
5865 (cancel_breakpoints_callback): Ditto.
5866 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5868 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5869 (unsuspend_one_lwp): Update, "entry" parameter is a
5870 struct thread_info * now.
5871 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5873 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5874 Fetch lwpid from thread, not lwp.
5875 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5876 Pass &all_threads to find_inferior, not &all_lwps.
5877 (send_sigstop): Fetch lwpid from thread, not lwp.
5878 (send_sigstop_callback): Update, "entry" parameter is a
5879 struct thread_info * now.
5880 (suspend_and_send_sigstop_callback): Ditto.
5881 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5882 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5883 struct thread_info * now.
5884 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5886 (lwp_running): Update, "entry" parameter is a
5887 struct thread_info * now.
5888 (stop_all_lwps): Fetch ptid from thread.
5889 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5890 (linux_resume_one_lwp): Fetch lwpid from thread.
5891 (linux_set_resume_request): Update, "entry" parameter is a
5892 struct thread_info * now. Fetch pid, lwpid from thread.
5893 (resume_status_pending_p): Update, "entry" parameter is a
5894 struct thread_info * now.
5895 (need_step_over_p): Ditto. Fetch lwpid from thread.
5896 (start_step_over): Fetch lwpid from thread.
5897 (linux_resume_one_thread): Update, "entry" parameter is a
5898 struct thread_info * now. Fetch lwpid from thread.
5899 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5900 (proceed_one_lwp): Update, "entry" parameter is a
5901 struct thread_info * now. Fetch lwpid from thread.
5902 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5903 struct thread_info * now.
5904 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5905 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5906 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5908 (regsets_store_inferior_registers): Ditto.
5909 (fetch_register, store_register): Ditto.
5910 (linux_read_memory, linux_write_memory): Ditto.
5911 (linux_request_interrupt): Ditto.
5912 (linux_read_auxv): Ditto.
5913 (linux_xfer_siginfo): Ditto.
5914 (linux_qxfer_spu): Ditto.
5915 (linux_qxfer_libraries_svr4): Ditto.
5916 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5917 moved to inferiors.h.
5919 (get_thread_lwp): Update.
5920 (struct lwp_info): Delete member "entry". Simplify comment for
5923 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5924 current_inferior directly.
5925 (update_watch_registers_callback): Update, "entry" parameter is a
5926 struct thread_info * now. Fetch pid from thread.
5927 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5928 (mips_insert_point): Fetch lwpid from current_inferior.
5929 Pass &all_threads to find_inferior, not &all_lwps.
5930 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5931 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5933 (mips_stopped_data_address): Ditto.
5934 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5936 * linux-tile-low.c (tile_arch_setup): Ditto.
5937 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5938 (update_debug_registers_callback): Update, "entry" parameter is a
5939 struct thread_info * now. Fetch pid from thread.
5940 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5941 Pass &all_threads to find_inferior, not &all_lwps.
5942 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5943 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5944 Pass &all_threads to find_inferior, not &all_lwps.
5945 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5946 (i386_dr_low_get_status): Ditto.
5947 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5948 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5949 (x86_linux_read_description): Ditto.
5950 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5952 2014-02-20 Doug Evans <dje@google.com>
5954 * inferiors.c (get_first_inferior): Fix buglet.
5956 2014-02-19 Doug Evans <dje@google.com>
5958 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5959 * inferiors.c (add_thread): Change result type to struct thread_info *.
5960 All callers updated.
5961 (add_lwp): Call add_thread here instead of in callers.
5962 All callers updated.
5963 * linux-low.h (get_lwp_thread): Rewrite.
5964 (struct lwp_info): New member "thread".
5966 2014-02-19 Doug Evans <dje@google.com>
5968 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5969 All callers updated.
5971 2014-02-19 Doug Evans <dje@google.com>
5973 * inferiors.c (add_thread): Fix whitespace.
5975 2014-02-19 Doug Evans <dje@google.com>
5977 * dll.c (clear_dlls): Replace accessing list implemention details
5979 * gdbthread.h (get_first_thread): Declare.
5980 * inferiors.c (for_each_inferior_with_data): New function.
5981 (get_first_thread): New function.
5982 (find_thread_ptid): Simplify.
5983 (get_first_inferior): New function.
5984 (clear_list): Delete.
5985 (one_inferior_p): New function.
5986 (clear_inferior_list): New function.
5987 (clear_inferiors): Update.
5988 * inferiors.h (for_each_inferior_with_data): Declare.
5989 (clear_inferior_list): Declare.
5990 (one_inferior_p): Declare.
5991 (get_first_inferior): Declare.
5992 * linux-low.c (linux_wait_for_event): Replace accessing list
5993 implemention details with API function.
5994 * server.c (target_running): Ditto.
5995 (accumulate_file_name_length): New function.
5996 (emit_dll_description): New function.
5997 (handle_qxfer_libraries): Replace accessing list implemention
5998 details with API function.
5999 (handle_qxfer_threads_worker): New function.
6000 (handle_qxfer_threads_proper): Replace accessing list implemention
6001 details with API function.
6002 (handle_query): Ditto.
6003 (visit_actioned_threads_callback_ftype): New typedef.
6004 (visit_actioned_threads_data): New struct.
6005 (visit_actioned_threads): Rewrite to be find_inferior callback.
6006 (resume): Call find_inferior.
6007 (handle_status): Replace accessing list implemention
6008 details with API function.
6009 (process_serial_event): Replace accessing list implemention details
6011 * target.c (set_desired_inferior): Replace accessing list implemention
6012 details with API function.
6013 * tracepoint.c (same_process_p): New function.
6014 (gdb_agent_about_to_close): Replace accessing list implemention
6015 details with API function.
6016 * win32-low.c (child_delete_thread): Replace accessing list
6017 implemention details with API function.
6018 (match_dll_by_basename): New function.
6019 (dll_is_loaded_by_basename): New function.
6020 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6021 details call to dll_is_loaded_by_basename.
6023 2014-02-19 Doug Evans <dje@google.com>
6025 * dll.h (struct dll_info): Add comment.
6026 * gdbthread.h (struct thread_info): Add comment.
6027 (current_ptid): Simplify.
6028 * inferiors.c (add_process): Update.
6029 (remove_process): Update.
6030 * inferiors.h (struct process_info): Rename member "head" to "entry".
6031 * linux-low.c (delete_lwp): Update.
6033 (last_thread_of_process_p): Update.
6034 (kill_one_lwp_callback, linux_kill): Update.
6035 (status_pending_p_callback): Update.
6036 (wait_for_sigstop): Update. Simplify read of ptid.
6037 (start_step_over): Update.
6038 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6039 (get_lwp_thread): Update.
6040 (struct lwp_info): Rename member "head" to "entry".
6041 * regcache.h (inferior_list_entry): Delete.
6042 * server.c (kill_inferior_callback): Update.
6043 (detach_or_kill_inferior_callback): Update.
6044 (print_started_pid): Update.
6045 (print_attached_pid): Update.
6046 (process_serial_event): Simplify read of ptid.
6047 * thread-db.c (thread_db_create_event): Update.
6048 (thread_db_get_tls_address): Update.
6049 * win32-low.c (current_inferior_ptid): Simplify.
6051 2014-02-19 Tom Tromey <tromey@redhat.com>
6053 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6055 (target_supports_btrace): Update.
6057 2014-02-14 Yao Qi <yao@codesourcery.com>
6059 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6060 (rsp-low-ipa.o): New target.
6062 2014-02-12 Tom Tromey <tromey@redhat.com>
6064 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6065 convert_ascii_to_int.
6066 * regcache.c (registers_to_string): Likewise.
6067 * remote-utils.c (decode_M_packet): Likewise.
6068 * server.c (process_serial_event): Likewise.
6070 2014-02-12 Tom Tromey <tromey@redhat.com>
6072 * server.c (handle_query, handle_v_run): Use hex2bin, not
6074 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6076 2014-02-12 Tom Tromey <tromey@redhat.com>
6078 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6079 convert_int_to_ascii.
6080 * regcache.c (registers_to_string, collect_register_as_string):
6082 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6084 * server.c (process_serial_event): Likewise.
6085 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6086 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6088 2014-02-12 Tom Tromey <tromey@redhat.com>
6090 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6091 bin2hex, not hexify.
6092 * tracepoint.c (cmd_qtstatus): Likewise.
6094 2014-02-12 Tom Tromey <tromey@redhat.com>
6096 * remote-utils.c (monitor_output): Pass explicit length to
6099 2014-02-12 Tom Tromey <tromey@redhat.com>
6101 * tracepoint.c: Include rsp-low.h.
6102 * server.c: Include rsp-low.h.
6103 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6104 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6106 * remote-utils.c: Include rsp-low.h.
6107 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6108 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6109 (convert_int_to_ascii, convert_ascii_to_int): Move to
6111 * regcache.c: Include rsp-low.h.
6112 * ax.c: Include rsp-low.h.
6113 * Makefile.in (SFILES): Add common/rsp-low.c.
6114 (OBS): Add rsp-low.o.
6115 (rsp-low.o): New target.
6117 2014-02-12 Tom Tromey <tromey@redhat.com>
6119 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6120 Include print-utils.h.
6121 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6122 (plongest, thirty_two, phex_nz): Remove.
6123 * Makefile.in (SFILES): Add common/print-utils.c.
6124 (OBS): Add print-utils.o.
6125 (print-utils-ipa.o): New target.
6126 (print-utils.o): New target.
6127 (IPA_OBJS): Add print-utils-ipa.o.
6129 2014-02-06 Tom Tromey <tromey@redhat.com>
6131 * Makefile.in (SFILES): Fix indentation.
6133 2014-02-05 Doug Evans <dje@google.com>
6135 * linux-low.c (linux_wait_for_event): Improve comment.
6136 (linux_wait_1): Keep current_inferior in sync with event_child.
6138 2014-01-22 Doug Evans <dje@google.com>
6140 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6142 2014-01-22 Doug Evans <dje@google.com>
6144 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6145 * configure: Regenerate.
6146 * config.in: Regenerate.
6147 * Makefile.in (SFILES): Add debug.c.
6149 * debug.c: New file.
6150 * debug.h: New file.
6151 * linux-aarch64-low.c (*): Update all debugging printfs to use
6152 debug_printf instead of fprintf.
6153 * linux-arm-low.c (*): Ditto.
6154 * linux-cris-low.c (*): Ditto.
6155 * linux-crisv32-low.c (*): Ditto.
6156 * linux-m32r-low.c (*): Ditto.
6157 * linux-sparc-low.c (*): Ditto.
6158 * linux-x86.c (*): Ditto.
6159 * linux-low.c (*): Ditto.
6160 (linux_wait_1): Add calls to debug_enter, debug_exit.
6161 (linux_wait): Remove redundant debugging printf.
6162 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6163 (linux_resume, unstop_all_lwps): Ditto.
6164 * mem-break.c (*): Update all debugging printfs to use
6165 debug_printf instead of fprintf.
6166 * remote-utils.c (*): Ditto.
6167 * thread-db.c (*): Ditto.
6168 * server.c #include <ctype.h>, "gdb_vecs.h".
6169 (debug_threads): Moved to debug.c.
6170 (*): Update all debugging printfs to use debug_printf instead of
6172 (start_inferior): Replace call to fflush with call to debug_flush.
6173 (monitor_show_help): Mention set debug-format.
6174 (parse_debug_format_options): New function.
6175 (handle_monitor_command): Handle "monitor set debug-format".
6176 (gdbserver_usage): Mention --debug-format.
6177 (main): Parse --debug-format.
6178 * server.h (debug_threads): Declaration moved to debug.h.
6180 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6181 trace_debug_1 that uses debug_printf.
6182 (tracepoint_look_up_symbols): Update all debugging printfs to use
6183 debug_printf instead of fprintf.
6185 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6187 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6190 2014-01-17 Pedro Alves <palves@redhat.com>
6193 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6194 defined after including gdb_proc_service.h.
6196 2014-01-16 Doug Evans <dje@google.com>
6198 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6199 (match_dll): Use it.
6201 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6203 * target.h (target_ops) <read_btrace>: Change parameters and
6204 return type to allow error reporting.
6205 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6206 trace reading errors on.
6207 * linux-low.c (linux_low_read_btrace): Pass trace reading
6209 (linux_low_disable_btrace): New.
6211 2014-01-15 Doug Evans <dje@google.com>
6213 * inferiors.c (thread_id_to_gdb_id): Delete.
6214 * inferiors.h (thread_id_to_gdb_id): Delete.
6216 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6218 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6219 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6222 2014-01-08 Pedro Alves <palves@redhat.com>
6224 * server.c (handle_status): Don't discard previous queued stop
6225 replies or thread's pending status here.
6226 (main) <disconnection>: Do it here instead.
6228 2014-01-08 Pedro Alves <palves@redhat.com>
6230 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6231 * server.c (visit_actioned_threads, handle_pending_status): New
6233 (handle_v_cont): Factor out parts to ...
6234 (resume): ... this new function. If in all-stop, and a thread
6235 being resumed has a pending status, report it without actually
6237 (myresume): Adjust to use the new 'resume' function.
6238 (clear_pending_status_callback, set_pending_status_callback)
6239 (find_status_pending_thread_callback): New functions.
6240 (handle_status): Handle the case of multiple threads having
6241 interesting statuses to report. Report threads' real last signal
6242 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6243 with an interesting thread to report the status for, instead of
6244 always reporting the status of the first thread.
6246 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6248 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6249 * gdbreplay.c (gdbreplay_version): Likewise.
6251 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6253 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6254 iov.iov_len with the real length in use.
6256 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6258 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6259 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6260 for all targets that use win32-low.c.
6261 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6262 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6264 2013-12-13 Pedro Alves <palves@redhat.com>
6266 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6267 if equal to TARGET_WAITKIND_LOADED.
6268 * win32-low.c (cached_status): New static global.
6269 (win32_wait): Add declaration.
6270 (do_initial_child_stuff): Flush all initial pending debug events
6271 up to the initial breakpoint.
6272 (win32_wait): If CACHED_STATUS was set, return that instead
6273 of doing a real wait. Remove the code resuming the execution
6274 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6275 during the initial phase. Also remove the code changing
6276 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6277 TARGET_WAITKIND_STOPPED.
6279 2013-12-11 Yao Qi <yao@codesourcery.com>
6281 * notif.c (handle_notif_ack): Return 0 if no notification
6284 2013-11-20 Doug Evans <dje@google.com>
6286 * linux-low.c (linux_set_resume_request): Fix comment.
6288 2013-11-20 Doug Evans <dje@google.com>
6290 * linux-low.c (resume_status_pending_p): Tweak comment.
6292 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6294 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6295 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6296 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6297 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6298 (srv_amd64_regobj): Add amd64-mpx.o.
6299 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6300 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6301 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6302 * i387-fp.c (num_pl_bnd_register) Added constant.
6303 (num_pl_bnd_cfg_registers) Added constant.
6304 (struct i387_xsave) Added reserved area and MPX fields.
6305 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6306 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6308 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6309 (init_registers_amd64_mpx_linux): Declare new function.
6310 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6311 (x86_64_regmap): Add MPX registers.
6312 (x86_linux_read_description): Add MPX case.
6313 (initialize_low_arch): Initialize MPX targets.
6315 2013-11-18 Tom Tromey <tromey@redhat.com>
6317 * configure: Rebuild.
6318 * configure.ac: Don't check for stdlib.h.
6319 * gdbreplay.c: Unconditionally include stdlib.h.
6321 2013-11-18 Tom Tromey <tromey@redhat.com>
6323 * config.in: Rebuild.
6324 * configure: Rebuild.
6325 * configure.ac: Don't use AC_HEADER_DIRENT.
6327 2013-11-18 Tom Tromey <tromey@redhat.com>
6329 * server.h: Don't check HAVE_STRING_H.
6330 * gdbreplay.c: Don't check HAVE_STRING_H.
6331 * configure: Rebuild.
6333 2013-11-18 Tom Tromey <tromey@redhat.com>
6335 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6338 2013-11-08 Tom Tromey <tromey@redhat.com>
6340 * configure, config.in: Rebuild.
6341 * configure.ac: Remove unused configury.
6343 2013-11-08 Tom Tromey <tromey@redhat.com>
6345 * acinclude.m4: Include common.m4, codeset.m4.
6346 * configure, config.in: Rebuild.
6347 * configure.ac: Use GDB_AC_COMMON.
6349 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6351 * linux-s390-low.c (HWCAP_S390_TE): New define.
6352 (s390_arch_setup): Consider the TE field in the HWCAP for
6353 determining 'have_regset_tdb'.
6355 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6358 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6361 2013-10-02 Pedro Alves <palves@redhat.com>
6363 * server.c (process_serial_event): Don't output "GDBserver
6364 exiting" if GDB is connected through stdio.
6365 * target.c (mywait): Likewise, be silent if GDB is connected
6368 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6370 * lynx-low.c (lynx_add_threads_after_attach): New function.
6371 (lynx_attach): Remove call to add_thread. Add call to
6372 lynx_add_threads_after_attach instead.
6374 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6376 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6377 * config.in, configure: Regenerated.
6379 2013-09-18 Yao Qi <yao@codesourcery.com>
6382 * server.c (start_inferior): Clear 'resume_info'.
6384 2013-09-16 Jiong Wang <jiwang@tilera.com>
6386 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6389 2013-09-16 Jiong Wang <jiwang@tilera.com>
6391 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6392 linux-tile-low.o to srv_tgtobj.
6394 2013-09-16 Will Newton <will.newton@linaro.org>
6396 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6399 2013-09-06 Pedro Alves <palves@redhat.com>
6401 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6402 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6403 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6404 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6405 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6406 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6408 2013-09-06 Pedro Alves <palves@redhat.com>
6410 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6411 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6413 2013-09-06 Pedro Alves <palves@redhat.com>
6415 * linux-amd64-ipa.c: Include tracepoint.h.
6416 * linux-i386-ipa.c: Include tracepoint.h.
6418 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6420 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6421 (ps_get_thread_area): New function.
6423 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6425 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6426 (initialize_low_arch): Call init_registers_crisv32 rather than
6427 init_register_crisv32.
6429 2013-09-05 Pedro Alves <palves@redhat.com>
6431 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6433 * hostio.h: ... this new file.
6434 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6435 win32-low.c: Include hostio.h.
6437 2013-09-05 Pedro Alves <palves@redhat.com>
6439 * server.h (gdb_client_data, handler_func, callback_handler_func)
6440 (delete_file_handler, add_file_handler, append_callback_event)
6441 (delete_callback_event, start_event_loop, initialize_event_loop):
6442 Move to event-loop.h and include it.
6443 * event-loop.h: New file.
6445 2013-09-05 Pedro Alves <palves@redhat.com>
6447 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6448 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6449 (loaded_dll, unloaded_dll): Move to ...
6450 * dll.h: ... this new file.
6451 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6453 2013-09-05 Pedro Alves <palves@redhat.com>
6455 * server.h (current_process, get_thread_process, all_processes)
6456 (add_inferior_to_list, for_each_inferior, current_inferior)
6457 (remove_inferior, add_process, remove_process, find_process_pid)
6458 (have_started_inferiors_p, have_attached_inferiors_p)
6459 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6460 (clear_inferiors, find_inferior, find_inferior_id)
6461 (inferior_target_data, set_inferior_target_data)
6462 (inferior_regcache_data, set_inferior_regcache_data): Move to
6463 inferiors.h, and include it.
6464 * inferiors.h: New file.
6466 2013-09-05 Pedro Alves <palves@redhat.com>
6468 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6472 2013-09-05 Pedro Alves <palves@redhat.com>
6474 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6476 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6477 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6478 (handle_tracepoint_general_set, handle_tracepoint_query)
6479 (tracepoint_finished_step, tracepoint_was_hit)
6480 (release_while_stepping_state_list, current_traceframe)
6481 (in_readonly_region, traceframe_read_mem)
6482 (fetch_traceframe_registers, traceframe_read_sdata)
6483 (traceframe_read_info, struct fast_tpoint_collect_status)
6484 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6485 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6486 (supply_fast_tracepoint_registers)
6487 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6488 (ipa_tdesc, claim_trampoline_space)
6489 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6490 (agent_mem_read, agent_get_trace_state_variable_value)
6491 (agent_set_trace_state_variable_value, agent_tsv_read)
6492 (agent_mem_read_string, get_raw_reg_func_addr)
6493 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6494 * tracepoint.h: ... this new file.
6496 2013-09-05 Pedro Alves <palves@redhat.com>
6498 * server.h (perror_with_name, error, fatal, warning, paddress)
6499 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6501 * utils.h: New file.
6503 2013-09-05 Pedro Alves <palves@redhat.com>
6505 * server.h (remote_debug, noack_mode, transport_is_reliable)
6506 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6507 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6508 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6509 (write_enn, initialize_async_io, enable_async_io)
6510 (disable_async_io, check_remote_input_interrupt_request)
6511 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6512 (dead_thread_notify, prepare_resume_reply)
6513 (decode_address_to_semicolon, decode_address, decode_m_packet)
6514 (decode_M_packet, decode_X_packet, decode_xfer_write)
6515 (decode_search_memory_packet, unhexify, hexify)
6516 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6517 (look_up_one_symbol, relocate_instruction)
6518 (monitor_output): Move to remote-utils.h, and include it.
6519 * remote-utils.h: New file.
6521 2013-09-05 Pedro Alves <palves@redhat.com>
6523 * server.h (_): Delete.
6525 2013-09-02 Pedro Alves <palves@redhat.com>
6527 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6528 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6530 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6532 2013-09-02 Pierre Muller <muller@sourceware.org>
6534 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6535 or WriteProcessMemory complete successfully and handle
6536 ERROR_PARTIAL_COPY error.
6538 2013-09-02 Pedro Alves <palves@redhat.com>
6540 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6541 error instead of EIO.
6543 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6546 * linux-low.c: Include filestuff.h.
6547 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6548 * lynx-low.c: Include filestuff.h.
6549 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6550 * server.c: Include filestuff.h.
6551 (main): Call notice_open_fds.
6552 * spu-low.c: Include filestuff.h.
6553 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6555 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6557 * Makefile.in: Explain why ../target and ../nat are not
6558 listed as include file search paths.
6559 (linux-waitpid.o): New object file rule.
6560 * configure.srv (srv_native_linux_obj): New variable.
6561 Replace all occurrences of linux native object files with
6562 $srv_native_linux_obj.
6563 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6564 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6565 (linux_enable_event_reporting): Remove declaration.
6566 (my_waitpid): Moved to common/linux-waitpid.c.
6567 (linux_wait_for_event): Pass ptid when calling
6568 linux_enable_event_reporting.
6569 (linux_supports_tracefork_flag): Remove.
6570 (linux_enable_event_reporting): Likewise.
6571 (linux_tracefork_grandchild): Remove.
6572 (STACK_SIZE): Moved to common/linux-ptrace.c.
6573 (linux_tracefork_child): Remove.
6574 (linux_test_for_tracefork): Remove.
6575 (linux_look_up_symbols): Call linux_supports_traceclone.
6576 (initialize_low): Remove call to linux_test_for_tracefork.
6577 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6578 common/linux-ptrace.h.
6579 (PTRACE_TYPE_ARG4): Likewise.
6580 Include linux-ptrace.h.
6582 2013-08-21 Pedro Alves <palves@redhat.com>
6584 * config.in: Renegerate.
6586 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6588 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6589 (SFILES): Remove $(srcdir)/common/target-common.c and
6590 add $(srcdir)/target/waitstatus.c.
6591 (OBS): Remove target-common.o and add waitstatus.o.
6592 (server_h): Remove $(srcdir)/../common/target-common.h and
6593 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6594 and $(srcdir)/../target/waitstatus.h.
6595 (target-common.o): Remove.
6596 (waitstatus.o): New target object file.
6597 * target.h: Do not include target-common.h and
6598 include target/resume.h, target/wait.h and
6599 target/waitstatus.h.
6601 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6603 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6604 to PTRACE_TYPE_ARG3.
6605 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6606 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6608 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6609 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6611 2013-07-27 Jie Zhang <jie@codesourcery.com>
6612 Daniel Jacobowitz <dan@codesourcery.com>
6613 Yao Qi <yao@codesourcery.com>
6615 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6616 (mips-linux-watch.o): New rule.
6617 (mips_linux_watch_h): New variable.
6618 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6620 * linux-mips-low.c: Include mips-linux-watch.h.
6621 (struct arch_process_info, struct arch_lwp_info): New.
6622 (update_watch_registers_callback): New function.
6623 (mips_linux_new_process, mips_linux_new_thread) New functions.
6624 (mips_linux_prepare_to_resume, mips_insert_point): New
6626 (mips_remove_point, mips_stopped_by_watchpoint): New
6628 (rsp_bp_type_to_target_hw_bp_type): New function.
6629 (mips_stopped_data_address): New function.
6630 (the_low_target): Add watchpoint support functions.
6632 2013-07-27 Yao Qi <yao@codesourcery.com>
6634 * i386-low.c: Include break-common.h.
6635 (enum target_hw_bp_type): Remove.
6637 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6639 * Makefile.in (SFILES): /common/target-common.c.
6640 (OBS): Add target-common.o.
6641 (server_h): Add $(srcdir)/../common/target-common.h.
6642 (target-common.o): New target.
6643 * server.c (queue_stop_reply_callback): Free
6644 status string after use.
6645 * target.c (target_waitstatus_to_string): Remove.
6646 * target.h: Include target-common.h.
6647 (resume_kind): Likewise.
6648 (target_waitkind): Likewise.
6649 (target_waitstatus): Likewise.
6650 (TARGET_WNOHANG): Likewise.
6652 2013-07-04 Yao Qi <yao@codesourcery.com>
6654 * Makefile.in (host_alias): Use @host_noncanonical@.
6655 (target_alias): Use @target_noncanonical@.
6656 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6657 ACX_NONCANONICAL_HOST.
6658 * configure: Regenerated.
6661 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6663 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6664 * configure: Rebuild.
6665 * Makefile.in (version_host, version_target): Get from configure.
6666 (version.c): Use $(version_host) and $(version_target).
6668 2013-07-03 Pedro Alves <palves@redhat.com>
6670 * Makefile.in (config.status): Depend on development.sh.
6671 * acinclude.m4: Include libmcheck.m4.
6672 * configure: Regenerate.
6674 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6676 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6677 attribute inside the parentheses.
6678 (winapi_DebugSetProcessKillOnExit): Ditto.
6679 (winapi_DebugBreakProcess): Ditto.
6680 (winapi_GenerateConsoleCtrlEvent): Ditto.
6682 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6684 * notif.h (notif_event): Add a dummy member to avoid compiler
6687 2013-07-01 Pedro Alves <palves@redhat.com>
6689 * hostio.c (HOSTIO_PATH_MAX): Define.
6690 (require_filename, handle_open, handle_unlink, handle_readlink):
6693 2013-07-01 Pedro Alves <palves@redhat.com>
6695 * server.h: Include "pathmax.h".
6696 * linux-low.c: Don't include sys/param.h.
6697 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6699 * win32-low.c: Don't include sys/param.h.
6700 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6702 2013-07-01 Pedro Alves <palves@redhat.com>
6704 * event-loop.c: Don't check HAVE_UNISTD_H before including
6706 * gdbreplay.c: Likewise.
6707 * remote-utils.c: Likewise.
6708 * server.c: Likewise.
6709 * configure.ac: Don't check for unistd.h.
6710 * configure: Regenerate.
6712 2013-06-28 Tom Tromey <tromey@redhat.com>
6714 * Makefile.in (version.c): Use version.in, not
6717 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6719 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6720 * configure: Rebuild.
6721 * Makefile.in (version_host, version_target): Get from configure.
6722 (version.c): Use $(version_host) and $(version_target).
6724 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6726 Fix trace-status to output user name without trailing colon.
6727 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6729 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6731 Fix trace-status to output proper start-time and stop-time.
6732 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6733 output start time and stop time in hex as gdb expects.
6735 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6737 * tracepoint.c (build_traceframe_info_xml): Output trace state
6738 variables present in the trace buffer.
6740 2013-06-24 Tom Tromey <tromey@redhat.com>
6742 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6744 (version.o): Remove.
6745 * gdbreplay.c: Include version.h.
6746 (version, host_name): Don't declare.
6747 * server.h: Include version.h.
6748 (version, host_name): Don't declare.
6750 2013-06-12 Pedro Alves <palves@redhat.com>
6752 * linux-x86-low.c (linux_is_elf64): Delete global.
6753 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6754 with local linux_pid_exe_is_elf_64_file use.
6756 2013-06-11 Pedro Alves <palves@redhat.com>
6758 * linux-low.c (regset_disabled, disable_regset): New functions.
6759 (regsets_fetch_inferior_registers)
6760 (regsets_store_inferior_registers): Use them.
6761 (initialize_regsets_info); Don't allocate the disabled_regsets
6763 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6766 2013-06-11 Pedro Alves <palves@redhat.com>
6768 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6771 2013-06-11 Pedro Alves <palves@redhat.com>
6773 * linux-x86-low.c (initialize_low_arch): Call
6774 init_registers_x32_avx_linux.
6776 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6778 Fix compatibility with Android Bionic.
6779 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6782 2013-06-07 Pedro Alves <palves@redhat.com>
6785 * Makefile.in (OBS): Add tdesc.o.
6786 (IPA_OBJS): Add tdesc-ipa.o.
6787 (tdesc-ipa.o): New rule.
6788 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6790 * linux-low.c (new_inferior): Delete.
6791 (disabled_regsets, num_regsets): Delete.
6792 (linux_add_process): Adjust to set the new per-process
6794 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6795 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6796 was a stop. When calling arch_setup, switch the current inferior
6797 to the thread that got an event.
6798 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6799 (regsets_fetch_inferior_registers)
6800 (regsets_store_inferior_registers): New regsets_info parameter.
6802 (linux_register_in_regsets): New regs_info parameter. Adjust to
6804 (register_addr, fetch_register, store_register): New usrregs_info
6805 parameter. Adjust to use it.
6806 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6807 parameter regs_info. Adjust to use it.
6808 (linux_fetch_registers): Get the current inferior's regs_info, and
6810 (linux_store_registers): Ditto.
6811 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6812 (initialize_low): Don't initialize the target_regsets here. Call
6813 initialize_low_arch.
6814 * linux-low.h (target_regsets): Delete declaration.
6815 (struct regsets_info): New.
6816 (struct usrregs_info): New.
6817 (struct regs_info): New.
6818 (struct process_info_private) <new_inferior>: New field.
6819 (struct linux_target_ops): Delete the num_regs, regmap, and
6820 regset_bitmap fields. New field regs_info.
6821 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6822 * i387-fp.c (num_xmm_registers): Delete.
6823 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6824 calls to new interface.
6825 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6826 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6827 Infer the number of xmm registers from the regcache's target
6829 * i387-fp.h (num_xmm_registers): Delete.
6830 * inferiors.c (add_thread): Don't install the thread's regcache
6832 * proc-service.c (gregset_info): Fetch the current inferior's
6833 regs_info. Adjust to use it.
6834 * regcache.c: Include tdesc.h.
6835 (register_bytes, reg_defs, num_registers)
6836 (gdbserver_expedite_regs): Delete.
6837 (get_thread_regcache): If the thread doesn't have a regcache yet,
6838 create one, instead of aborting gdbserver.
6839 (regcache_invalidate_one): Rename to ...
6840 (regcache_invalidate_thread): ... this.
6841 (regcache_invalidate_one): New.
6842 (regcache_invalidate): Only invalidate registers of the current
6844 (init_register_cache): Add target_desc parameter, and use it.
6845 (new_register_cache): Ditto. Assert the target description has a
6846 non zero registers_size.
6847 (regcache_cpy): Add assertions. Adjust.
6848 (realloc_register_cache, set_register_cache): Delete.
6849 (registers_to_string, registers_from_string): Adjust.
6850 (find_register_by_name, find_regno, find_register_by_number)
6851 (register_cache_size): Add target_desc parameter, and use it.
6852 (free_register_cache_thread, free_register_cache_thread_one)
6853 (regcache_release, register_cache_size): New.
6854 (register_size): Add target_desc parameter, and use it.
6855 (register_data, supply_register, supply_register_zeroed)
6856 (supply_regblock, supply_register_by_name, collect_register)
6857 (collect_register_as_string, collect_register_by_name): Adjust.
6858 * regcache.h (struct target_desc): Forward declare.
6859 (struct regcache) <tdesc>: New field.
6860 (init_register_cache, new_register_cache): Add target_desc
6862 (regcache_invalidate_thread): Declare.
6863 (regcache_invalidate_one): Delete declaration.
6864 (regcache_release): Declare.
6865 (find_register_by_number, register_cache_size, register_size)
6866 (find_regno): Add target_desc parameter.
6867 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6869 * remote-utils.c: Include tdesc.h.
6870 (outreg, prepare_resume_reply): Adjust.
6871 * server.c: Include tdesc.h.
6872 (gdbserver_xmltarget): Delete declaration.
6873 (get_features_xml, process_serial_event): Adjust.
6874 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6876 (struct process_info) <tdesc>: New field.
6877 (ipa_tdesc): Declare.
6878 * tdesc.c: New file.
6879 * tdesc.h: New file.
6880 * tracepoint.c: Include tdesc.h.
6881 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6882 (get_context_regcache): Adjust to pass ipa_tdesc down.
6883 (do_action_at_tracepoint): Adjust to get the register cache size
6884 from the context regcache's description.
6885 (traceframe_walk_blocks): Adjust to get the register cache size
6886 from the current trace frame's description.
6887 (traceframe_get_pc): Adjust to get current trace frame's
6888 description and pass it down.
6889 (gdb_collect): Adjust to get the register cache size from the
6891 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6892 (gdbserver_xmltarget): Delete.
6893 (initialize_low_tracepoint): Set the ipa's target description.
6894 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6895 (initialize_low_tracepoint): Set the ipa's target description.
6896 * linux-x86-low.c: Include tdesc.h.
6897 [__x86_64__] (is_64bit_tdesc): New.
6898 (ps_get_thread_area, x86_get_thread_area): Use it.
6899 (i386_cannot_store_register): Rename to ...
6900 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6901 (i386_cannot_fetch_register): Rename to ...
6902 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6903 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6905 (target_regsets): Rename to ...
6906 (x86_regsets): ... this.
6907 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6909 (x86_siginfo_fixup): Use is_64bit_tdesc.
6910 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6911 (tdesc_x32_avx_linux, tdesc_x32_linux)
6912 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6914 (x86_linux_update_xmltarget): Delete.
6915 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6916 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6917 (AMD64_LINUX_USER64_CS): New.
6918 (x86_linux_read_description): New, based on
6919 x86_linux_update_xmltarget.
6920 (same_process_callback): New.
6921 (x86_arch_setup_process_callback): New.
6922 (x86_linux_update_xmltarget): New.
6923 (x86_regsets_info): New.
6924 (amd64_linux_regs_info): New.
6925 (i386_linux_usrregs_info): New.
6926 (i386_linux_regs_info): New.
6927 (x86_linux_regs_info): New.
6928 (x86_arch_setup): Reimplement.
6929 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6930 (x86_emit_ops): Ditto.
6931 (the_low_target): Adjust. Install x86_linux_regs_info,
6932 x86_cannot_fetch_register, and x86_cannot_store_register.
6933 (initialize_low_arch): New.
6934 * linux-ia64-low.c (tdesc_ia64): Declare.
6935 (ia64_fetch_register): Adjust.
6936 (ia64_usrregs_info, regs_info): New globals.
6937 (ia64_regs_info): New function.
6938 (the_low_target): Adjust.
6939 (initialize_low_arch): New function.
6940 * linux-sparc-low.c (tdesc_sparc64): Declare.
6941 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6943 (sparc_arch_setup): New function.
6944 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6945 (the_low_target): Adjust.
6946 (initialize_low_arch): New function.
6947 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6948 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6949 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6950 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6951 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6952 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6953 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6954 (tdesc_powerpc_isa205_vsx64l): Declare.
6955 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6956 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6957 (ppc_set_pc, ppc_get_hwcap): Adjust.
6958 (ppc_usrregs_info): Forward declare.
6959 (!__powerpc64__) ppc_regmap_adjusted: New global.
6960 (ppc_arch_setup): Adjust to the current process'es target
6962 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6963 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6964 (ppc_store_evrregset): Adjust.
6965 (target_regsets): Rename to ...
6966 (ppc_regsets): ... this, and make static.
6967 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6968 (ppc_regs_info): New function.
6969 (the_low_target): Adjust.
6970 (initialize_low_arch): New function.
6971 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6972 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6973 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6974 (tdesc_s390x_linux64v2): Declare.
6975 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6976 (s390_fill_gregset, s390_store_last_break): Adjust.
6977 (target_regsets): Rename to ...
6978 (s390_regsets): ... this, and make static.
6979 (s390_get_pc, s390_set_pc): Adjust.
6980 (s390_get_hwcap): New target_desc parameter, and use it.
6981 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6982 (s390_arch_setup): Adjust to set the current process'es target
6983 description. Don't adjust the regmap.
6984 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6985 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6986 (regs_info_3264): New globals.
6987 (s390_regs_info): New function.
6988 (the_low_target): Adjust.
6989 (initialize_low_arch): New function.
6990 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6991 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6992 [__mips64] (init_registers_mips_linux)
6993 (init_registers_mips_dsp_linux): Delete defines.
6994 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6995 (have_dsp): New global.
6996 (mips_read_description): New, based on mips_arch_setup.
6997 (mips_arch_setup): Reimplement.
6998 (get_usrregs_info): New function.
6999 (mips_cannot_fetch_register, mips_cannot_store_register)
7000 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7001 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7002 (target_regsets): Rename to ...
7003 (mips_regsets): ... this, and make static.
7004 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7005 (dsp_regs_info, regs_info): New globals.
7006 (mips_regs_info): New function.
7007 (the_low_target): Adjust.
7008 (initialize_low_arch): New function.
7009 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7010 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7012 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7013 (arm_read_description): New, with bits factored from
7015 (arm_arch_setup): Reimplement.
7016 (target_regsets): Rename to ...
7017 (arm_regsets): ... this, and make static.
7018 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7019 (arm_regs_info): New function.
7020 (the_low_target): Adjust.
7021 (initialize_low_arch): New function.
7022 * linux-m68k-low.c (tdesc_m68k): Declare.
7023 (target_regsets): Rename to ...
7024 (m68k_regsets): ... this, and make static.
7025 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7026 (m68k_regs_info): New function.
7027 (m68k_arch_setup): New function.
7028 (the_low_target): Adjust.
7029 (initialize_low_arch): New function.
7030 * linux-sh-low.c (tdesc_sharch): Declare.
7031 (target_regsets): Rename to ...
7032 (sh_regsets): ... this, and make static.
7033 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7034 (sh_regs_info, sh_arch_setup): New functions.
7035 (the_low_target): Adjust.
7036 (initialize_low_arch): New function.
7037 * linux-bfin-low.c (tdesc_bfin): Declare.
7038 (bfin_arch_setup): New function.
7039 (bfin_usrregs_info, regs_info): New globals.
7040 (bfin_regs_info): New function.
7041 (the_low_target): Adjust.
7042 (initialize_low_arch): New function.
7043 * linux-cris-low.c (tdesc_cris): Declare.
7044 (cris_arch_setup): New function.
7045 (cris_usrregs_info, regs_info): New globals.
7046 (cris_regs_info): New function.
7047 (the_low_target): Adjust.
7048 (initialize_low_arch): New function.
7049 * linux-cris-low.c (tdesc_crisv32): Declare.
7050 (cris_arch_setup): New function.
7051 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7052 (cris_regs_info): New function.
7053 (the_low_target): Adjust.
7054 (initialize_low_arch): New function.
7055 * linux-m32r-low.c (tdesc_m32r): Declare.
7056 (m32r_arch_setup): New function.
7057 (m32r_usrregs_info, regs_info): New globals.
7058 (m32r_regs_info): Adjust.
7059 (initialize_low_arch): New function.
7060 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7061 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7062 (tic6x_usrregs_info): Forward declare.
7063 (tic6x_read_description): New function, based on ...
7064 (tic6x_arch_setup): ... this. Reimplement.
7065 (target_regsets): Rename to ...
7066 (tic6x_regsets): ... this, and make static.
7067 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7068 (tic6x_regs_info): New function.
7069 (the_low_target): Adjust.
7070 (initialize_low_arch): New function.
7071 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7072 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7073 (target_regsets): Rename to ...
7074 (xtensa_regsets): ... this, and make static.
7075 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7077 (xtensa_arch_setup, xtensa_regs_info): New functions.
7078 (the_low_target): Adjust.
7079 (initialize_low_arch): New function.
7080 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7081 (nios2_arch_setup): Set the current process'es tdesc.
7082 (target_regsets): Rename to ...
7083 (nios2_regsets): ... this.
7084 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7085 (nios2_regs_info): New function.
7086 (the_low_target): Adjust.
7087 (initialize_low_arch): New function.
7088 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7089 (aarch64_arch_setup): Set the current process'es tdesc.
7090 (target_regsets): Rename to ...
7091 (aarch64_regsets): ... this.
7092 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7093 (aarch64_regs_info): New function.
7094 (the_low_target): Adjust.
7095 (initialize_low_arch): New function.
7096 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7098 (target_regsets): Rename to ...
7099 (tile_regsets): ... this.
7100 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7101 (tile_regs_info): New function.
7102 (tile_arch_setup): Set the current process'es tdesc.
7103 (the_low_target): Adjust.
7104 (initialize_low_arch): New function.
7105 * spu-low.c (tdesc_spu): Declare.
7106 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7107 * win32-arm-low.c (tdesc_arm): Declare.
7108 (arm_arch_setup): New function.
7109 (the_low_target): Install arm_arch_setup instead of
7111 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7112 (init_windows_x86): Rename to ...
7113 (i386_arch_setup): ... this. Set `win32_tdesc'.
7114 (the_low_target): Adjust.
7115 * win32-low.c (win32_tdesc): New global.
7116 (child_add_thread): Don't create the thread cache here.
7117 (do_initial_child_stuff): Set the new process'es tdesc.
7118 * win32-low.h (struct target_desc): Forward declare.
7119 (win32_tdesc): Declare.
7120 * lynx-i386-low.c (tdesc_i386): Declare global.
7121 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7122 * lynx-low.c (lynx_tdesc): New global.
7123 (lynx_add_process): Set the new process'es tdesc.
7124 * lynx-low.h (struct target_desc): Forward declare.
7125 (lynx_tdesc): Declare global.
7126 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7127 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7128 * nto-low.c (nto_tdesc): New global.
7129 (do_attach): Set the new process'es tdesc.
7130 * nto-low.h (struct target_desc): Forward declare.
7131 (nto_tdesc): Declare.
7132 * nto-x86-low.c (tdesc_i386): Declare.
7133 (nto_x86_arch_setup): Set `nto_tdesc'.
7135 2013-06-04 Gary Benson <gbenson@redhat.com>
7137 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7138 to qSupported response when appropriate.
7139 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7140 with nonzero-length annex.
7141 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7142 arguments supplied in annex.
7144 2013-05-31 Doug Evans <dje@google.com>
7147 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7148 64 bits in 64-cross-32 environment.
7150 2013-05-28 Pedro Alves <palves@redhat.com>
7152 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7153 (aarch64-without-fpu.c): Delete rule.
7154 * configure.srv (aarch64*-*-linux*): Remove references to
7155 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7156 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7159 2013-05-24 Pedro Alves <palves@redhat.com>
7161 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7162 instead of strchr/decode_address. Error if the range isn't split
7163 with a ','. Don't assume there's be a ':' in the action.
7165 2013-05-23 Yao Qi <yao@codesourcery.com>
7166 Pedro Alves <palves@redhat.com>
7168 * linux-low.c (lwp_in_step_range): New function.
7169 (linux_wait_1): If the thread was range stepping and stopped
7170 outside the stepping range, report the stop to GDB. Otherwise,
7171 continue stepping. Add range stepping debug output.
7172 (linux_set_resume_request): Copy the step range from the resume
7174 (linux_supports_range_stepping): New.
7175 (linux_target_ops) <supports_range_stepping>: Set to
7176 linux_supports_range_stepping.
7177 * linux-low.h (struct linux_target_ops)
7178 <supports_range_stepping>: New field.
7179 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7180 * linux-x86-low.c (x86_supports_range_stepping): New.
7181 (the_low_target) <supports_range_stepping>: Set to
7182 x86_supports_range_stepping.
7183 * server.c (handle_v_cont): Handle 'r' action.
7184 (handle_v_requests): Append ";r" if the target supports range
7186 * target.h (struct thread_resume) <step_range_start,
7187 step_range_end>: New fields.
7188 (struct target_ops) <supports_range_stepping>:
7190 (target_supports_range_stepping): New macro.
7192 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7194 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7195 confusion in comment.
7197 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7199 * lynx-low.c (struct process_info_private): New type.
7200 (lynx_add_process): New function.
7201 (lynx_create_inferior, lynx_attach): Replace calls to
7202 add_process by calls to lynx_add_process.
7203 (lynx_resume): If PTID is null, then try using
7204 current_process()->private->last_wait_event_ptid.
7206 (lynx_clear_inferiors): Delete. The contents of that function
7207 has been inlined in lynx_mourn;
7208 (lynx_wait_1): Save the ptid in the process's private data.
7209 (lynx_mourn): Free the process' private data. Replace call
7210 to lynx_clear_inferiors by call to clear_inferiors.
7212 2013-05-17 Yao Qi <yao@codesourcery.com>
7214 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7217 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7219 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7220 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7221 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7222 PT_TEXT_END_ADDR guards. Update comments.
7223 (linux_target_op) <read_offsets>: Conditionally define to
7224 linux_read_offsets if the target is UCLIBC and if it defines
7225 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7227 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7228 Andrew Jenner <andrew@codesourcery.com>
7230 * Makefile.in (SFILES): Add linux-nios2-low.c.
7231 (clean): Add action to delete nios2-linux.c.
7232 (nios2-linux.c): New rule.
7233 * configure.srv: Add nios2*-*-linux*.
7234 * linux-nios2-low.c: New.
7236 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7238 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7240 2013-04-25 Hui Zhu <hui@codesourcery.com>
7243 * ax.c (ax_printf): Add fflush.
7245 2013-04-22 Tom Tromey <tromey@redhat.com>
7247 * Makefile.in (SFILES): Add filestuff.c.
7248 (OBS): Add filestuff.o.
7249 (filestuff.o): New target.
7250 * config.in, configure: Rebuild.
7251 * configure.ac: Check for fdwalk, pipe2.
7253 2013-04-17 Pedro Alves <palves@redhat.com>
7255 * configure.ac (USE_THREAD_DB): Delete variable.
7256 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7257 Don't AC_SUBST USE_THREAD_DB.
7258 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7259 * config.in, configure: Regenerate.
7261 2013-04-16 Pedro Alves <palves@redhat.com>
7263 * linux-low.h (struct lwp_info) <thread_known>: Move under
7264 the USE_THREAD_DB #ifdef.
7266 2013-04-16 Pedro Alves <palves@redhat.com>
7268 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7269 (linux-low.o): Delete rule.
7270 * linux-low.h: Always include "gdb_thread_db.h" instead of
7271 conditionally including thread_db.h.
7272 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7275 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7277 * Makefile.in (install-only): Fix make install regression.
7279 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7281 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7282 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7284 * gdbserver.1: Remove.
7286 2013-03-22 Pedro Alves <palves@redhat.com>
7288 * linux-low.c (handle_extended_wait): Don't call
7289 linux_enable_event_reporting.
7291 2013-03-15 Tony Theodore <tonyt@logyst.com>
7294 * Makefile.in (SHELL): Use @SHELL@.
7296 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7298 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7301 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7303 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7304 Remove extraneous NULL element.
7306 2013-03-13 Yao Qi <yao@codesourcery.com>
7308 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7309 'V' block in trace frame.
7311 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7313 * target.h (struct target_ops): Add btrace ops.
7314 (target_supports_btrace): New macro.
7315 (target_enable_btrace): New macro.
7316 (target_disable_btrace): New macro.
7317 (target_read_btrace): New macro.
7318 * gdbthread.h (struct thread_info): Add btrace field.
7319 * server.c: Include btrace-common.h.
7320 (handle_btrace_general_set): New function.
7321 (handle_btrace_enable): New function.
7322 (handle_btrace_disable): New function.
7323 (handle_general_set): Call handle_btrace_general_set.
7324 (handle_qxfer_btrace): New function.
7325 (struct qxfer qxfer_packets[]): Add btrace entry.
7326 * inferiors.c (remove_thread): Disable btrace.
7327 * linux-low: Include linux-btrace.h.
7328 (linux_low_enable_btrace): New function.
7329 (linux_low_read_btrace): New function.
7330 (linux_target_ops): Add btrace ops.
7331 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7332 Add srv_linux_btrace=yes.
7333 (x86_64-*-linux*): Add linux-btrace.o.
7334 Add srv_linux_btrace=yes.
7335 * configure.ac: Define HAVE_LINUX_BTRACE.
7336 * config.in: Regenerated.
7337 * configure: Regenerated.
7339 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7341 * server.c (handle_qxfer): Preserve error message if -3 is
7343 (qxfer): Document the -3 return value.
7345 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7347 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7348 (linux_btrace_h): New variable.
7349 (linux-btrace.o): New rule.
7351 2013-03-08 Stan Shebs <stan@codesourcery.com>
7352 Hafiz Abid Qadeer <abidh@codesourcery.com>
7354 * tracepoint.c (trace_buffer_size): New global.
7355 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7356 (init_trace_buffer): Change to one-argument function. Allocate
7357 trace buffer memory.
7358 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7359 handle QTBuffer:size packet.
7360 (cmd_bigqtbuffer_size): New function.
7361 (initialize_tracepoint): Call init_trace_buffer with
7362 DEFAULT_TRACE_BUFFER_SIZE.
7363 * server.c (handle_query): Add QTBuffer:size in the
7366 2013-03-07 Yao Qi <yao@codesourcery.com>
7368 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7369 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7371 (cmd_qtsp): Adjust condition. Do post increment.
7372 Set cur_action and cur_step_action back to 0.
7374 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7377 * linux-low.c (linux_write_memory): Return early success if LEN is
7380 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7382 * configure.srv: Add x86_64-*-cygwin* as target.
7384 2013-02-28 Tom Tromey <tromey@redhat.com>
7386 * configure.ac: Invoke AC_SYS_LARGEFILE.
7387 * configure, config.in: Rebuild.
7389 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7391 * win32-low.c: Throughout, fix format strings and casts of
7392 printf-like functions to avoid type related warnings on all
7394 (get_child_debug_event): Print dwDebugEventCode as hex since
7395 that's how it's usually documented.
7397 2013-02-28 Yao Qi <yao@codesourcery.com>
7399 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7402 2013-02-27 Jiong Wang <jiwang@tilera.com>
7404 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7405 (reg-tilegx32.c): New rule.
7406 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7407 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7408 different register info initializer according to elf class.
7409 (init_registers_tilgx32): New function. The tilegx32 register info
7411 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7412 (tile_store_gregset): Likewise.
7414 2013-02-27 Yao Qi <yao@codesourcery.com>
7416 * server.c (process_point_options): Print debug message when
7417 debug_threads is true.
7419 2013-02-26 Yao Qi <yao@codesourcery.com>
7421 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7423 2013-02-19 Pedro Alves <palves@redhat.com>
7424 Kai Tietz <ktietz@redhat.com>
7428 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7429 instead of strtoul to extract address from packet.
7430 (process_serial_event) <'z'>: Likewise.
7432 2013-02-18 Yao Qi <yao@codesourcery.com>
7434 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7436 2013-02-14 Pedro Alves <palves@redhat.com>
7440 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7441 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7443 2013-02-14 Pedro Alves <palves@redhat.com>
7445 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7447 2013-02-14 Pedro Alves <palves@redhat.com>
7449 * tracepoint.c (save_string): Delete.
7450 (add_tracepoint_action): Use savestring instead of save_string.
7452 2013-02-12 Pedro Alves <palves@redhat.com>
7454 * linux-xtensa-low.c: Ditto.
7455 * xtensa-xtregs.c: Ditto.
7457 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7459 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7462 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7464 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7465 aarch64_num_wp_regs and aarch64_num_bp_regs to
7466 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7468 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7470 * linux-aarch64-low.c (ps_get_thread_area): Replace
7471 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7473 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7474 Marcus Shawcroft <marcus.shawcroft@arm.com>
7475 Nigel Stephens <nigel.stephens@arm.com>
7476 Yufeng Zhang <yufeng.zhang@arm.com>
7478 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7479 (aarch64.c, aarch64-without-fpu.c): New targets.
7480 * configure.srv (aarch64*-*-linux*): New.
7481 * linux-aarch64-low.c: New file.
7483 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7485 * linux-low.c (handle_extended_wait, linux_create_inferior)
7486 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7487 (dequeue_one_deferred_signal, linux_resume_one_thread)
7488 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7489 (linux_tracefork_grandchild, linux_test_for_tracefork)
7490 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7491 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7492 where the argument is 0.
7494 2013-01-25 Yao Qi <yao@codesourcery.com>
7496 * event-loop.c: Include "queue.h".
7497 (gdb_event_p): New typedef.
7498 (struct gdb_event) <next_event>: Remove.
7499 (event_queue): Change to QUEUE(gdb_event_p).
7500 (async_queue_event): Remove.
7501 (gdb_event_xfree): New.
7502 (initialize_event_loop): New.
7503 (process_event): Use API from QUEUE.
7504 (wait_for_event): Likewise.
7505 * server.c (main): Call initialize_event_loop.
7506 * server.h (initialize_event_loop): Declare.
7508 2013-01-18 Yao Qi <yao@codesourcery.com>
7510 * ax.h (struct eval_agent_expr_context): New.
7511 (gdb_eval_agent_expr): Update declaration.
7512 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7513 TFRAME. Add new argument CTX.
7514 * server.h (struct eval_agent_expr_context): Declare.
7515 (agent_mem_read, agent_tsv_read): Update declaration.
7516 (agent_mem_read_string): Likewise.
7517 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7518 (add_traceframe_block): Add new argument TPOINT.
7519 Increase TPOINT->traceframe_usage.
7520 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7521 eval_tracepoint_agent_expr.
7522 (condition_true_at_tracepoint): Likewise.
7523 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7524 (agent_mem_read_string, agent_tsv_read): Likewise.
7526 2013-01-16 Yao Qi <yao@codesourcery.com>
7528 * linux-low.c (linux_resume_one_lwp): Don't check
7529 'lwp->bp_reinsert != 0'.
7531 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7532 Pedro Alves <palves@redhat.com>
7534 * lynx-low.c (ptrace_request_to_str): Define a temporary
7535 macro and use it to simplify this function's implementation.
7537 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7539 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7542 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7544 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7546 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7548 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7550 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7552 * lynx-low.c (lynx_resume): Use the resume_info parameter
7553 to determine the ptid for the lynx_ptrace call, unless
7554 it is equal to minus_one_ptid, in which case we use the
7555 ptid of the current_inferior.
7556 (lynx_wait_1): After having received a thread create/exit
7557 event, resume the inferior's execution using the signaling
7558 thread's ptid, rather than the old ptid.
7560 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7562 * lynx-low.c (lynx_resume): Delete variable ret.
7564 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7566 * gdbreplay.c (gdbreplay_version): Update copyright year.
7567 * server.c (gdbserver_version): Likewise.
7569 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7571 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7574 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7576 * lynx-low.c (ptrace_request_to_str): Add handling for
7579 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7581 * lynx-low.c (lynx_attach): Delete variable new_process.
7583 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7585 * lynx-low.c (lynx_create_inferior): Delete variable
7588 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7590 * lynx-low.c (ptrace_request_to_str): Do not handle
7591 PTRACE_GETTHREADLIST if this macro does not exist.
7593 2012-12-15 Yao Qi <yao@codesourcery.com>
7595 * Makefile.in (OBS): Add notif.o.
7596 * notif.c, notif.h: New.
7597 * server.c: Include "notif.h".
7598 (struct vstop_notif) <next>: Remove.
7600 (queue_stop_reply): Update.
7601 (push_event, send_next_stop_reply): Remove.
7602 (discard_queued_stop_replies): Update.
7603 (notif_stop): New variable.
7604 (handle_v_stopped): Remove.
7605 (handle_v_requests): Don't call handle_v_stopped. Call
7606 handle_ack_notif instead.
7607 (queue_stop_reply_callback): Call notif_event_enque instead
7608 of queue_stop_reply.
7609 (handle_status): Don't call send_next_stop_reply, call
7610 notif_write_event instead.
7611 (kill_inferior_callback): Likewise.
7612 (detach_or_kill_inferior_callback): Likewise.
7613 (main): Call initialize_notif.
7614 (process_serial_event): Call QUEUE_is_empty.
7615 (handle_target_event): Call notif_push instead of push event.
7616 * server.h (push_event): Remove declaration.
7618 2012-12-10 Tom Tromey <tromey@redhat.com>
7620 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7621 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7624 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7625 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7626 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7627 (amd64-linux-ipa.o, ax.o): Rewrite.
7628 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7629 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7630 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7631 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7632 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7633 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7634 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7635 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7636 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7637 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7638 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7639 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7640 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7641 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7642 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7643 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7644 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7645 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7646 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7647 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7648 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7649 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7650 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7651 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7652 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7653 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7654 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7655 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7656 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7657 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7658 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7659 (reg-tilegx.o): Remove.
7660 (all_object_files): New macro.
7661 Include .deps files.
7662 * aclocal.m4, configure: Rebuild.
7663 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7664 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7665 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7667 2012-12-05 Tom Tromey <tromey@redhat.com>
7670 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7672 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7674 * configure.ac: Check for linux/perf_event.h.
7675 * config.in: Regenerated.
7676 * configure: Regenerated.
7678 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7680 * hostio.c (handle_readlink): Decrease buffer size
7681 parameter passed to readlink by one byte.
7683 2012-11-26 Yao Qi <yao@codesourcery.com>
7685 * configure.ac (build_warnings): Append '-Wempty-body'.
7686 * configure: Regenerated.
7687 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7690 2012-11-15 Pierre Muller <muller@sourceware.org>
7692 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7693 * config.in: Regenerate.
7694 * configure: Regenerate.
7695 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7696 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7697 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7698 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7700 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7701 instead of <sys/wait.h> header.
7702 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7704 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7706 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7707 (various make rules): Remove -DGDBSERVER
7709 2012-11-09 Yao Qi <yao@codesourcery.com>
7711 * spu-low.c (current_ptid): Move it to ..
7712 * gdbthread.h: ... here. New.
7713 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7714 * server.c (myresume, process_serial_event): Likewise.
7715 * thread-db.c (thread_db_find_new_threads): Likewise.
7716 * tracepoint.c (run_inferior_command): Likewise.
7718 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7720 * server.c (handle_search_memory_1): Include access length in
7723 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7725 * linux-crisv32-low.c: Fix compile errors.
7727 2012-09-04 Yao Qi <yao@codesourcery.com>
7729 * tracepoint.c (cmd_qtsv): Adjust debug message.
7730 Don't check CUR_TPOINT.
7732 2012-08-28 Yao Qi <yao@codesourcery.com>
7734 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7735 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7736 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7737 Remove declarations of xmalloc, xreallloc, xstrdup and
7739 * Makefile.in (libiberty_h): New.
7740 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7741 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7743 2012-08-23 Yao Qi <yao@codesourcery.com>
7745 * server.h: Remove declaration of 'xsnprintf'.
7747 2012-08-22 Keith Seitz <keiths@redhat.com>
7749 * server.h: Include build-gnulib-gbserver/config.h.
7750 * gdbreplay.c: Likewise.
7752 2012-08-08 Doug Evans <dje@google.com>
7754 * Makefile.in (SFILES): Add gdb_vecs.c.
7755 (OBS): Add gdb_vecs.o.
7756 (gdb_vecs_h, host_defs_h): New variables.
7757 (thread-db.o): Add $(gdb_vecs_h) dependency.
7758 (gdb_vecs.o): New rule.
7759 * thread-db.c: #include "gdb_vecs.h".
7760 (thread_db_load_search): Use a vector to iterate over path elements.
7761 Handle text appearing after "$pdir".
7763 * configure.ac: Add check for strstr.
7764 * config.in: Regenerate.
7765 * configure: Regenerate.
7767 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7769 * hostio.c (handle_pread): If pread fails, fall back to attempting
7771 (handle_pwrite): Likewise for pwrite.
7773 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7775 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7776 between unsupported TYPE and unimplementable ADDR/LEN combination.
7777 (arm_insert_point): Act on new return value.
7779 2012-07-31 Pedro Alves <palves@redhat.com>
7781 * server.c (process_point_options): Only skip tokens if we find
7782 one that is unrecognized. Don't treat 'X' specially while
7783 skipping unrecognized tokens.
7785 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7787 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7788 to 4-byte-align HW breakpoint addresses for Thumb.
7790 2012-07-27 Yao Qi <yao@codesourcery.com>
7794 * server.h: Declare gdb_agent_about_to_close.
7795 * target.c (kill_inferior): Include "agent.h".
7796 New. Send command 'kill'.
7797 * target.h (kill_inferior): Removed macro.
7798 * tracepoint.c (gdb_agent_about_to_close): New.
7799 (gdb_agent_helper_thread): Handle command 'close'.
7800 Wait endlessly until the inferior stops.
7801 Install gdb_agent_remove_socket to atexit hook.
7802 (agent_socket_name): New static variable.
7803 (gdb_agent_socket_init): Replace local variable 'name' with
7804 'agent_socket_name'.
7805 (gdb_agent_remove_socket): New.
7807 2012-07-27 Yao Qi <yao@codesourcery.com>
7809 * server.c (process_point_options): Stop at 'X' when parsing.
7811 2012-07-19 Michael Eager <eager@eagercon.com>
7813 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7815 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7816 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7817 hardware breakpoint.
7819 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7821 * gdbserver/linux-low.c (initialize_low): Call
7822 linux_ptrace_init_warnings.
7824 2012-07-02 Doug Evans <dje@google.com>
7826 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7829 2012-07-02 Stan Shebs <stan@codesourcery.com>
7831 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7832 (ax.o): Add it to build rule.
7834 (OBS): Add format.o.
7835 (IPA_OBS): Add format.o.
7836 * server.c (handle_query): Claim support for breakpoint commands.
7837 (process_point_options): Add command case.
7838 (process_serial_event): Leave running if there are printfs in
7840 * mem-break.h (any_persistent_commands): Declare.
7841 (add_breakpoint_commands): Declare.
7842 (gdb_no_commands_at_breakpoint): Declare.
7843 (run_breakpoint_commands): Declare.
7844 * mem-break.c (struct point_command_list): New struct.
7845 (struct breakpoint): New field command_list.
7846 (any_persistent_commands): New function.
7847 (add_commands_to_breakpoint): New function.
7848 (add_breakpoint_commands): New function.
7849 (gdb_no_commands_at_breakpoint): New function.
7850 (run_breakpoint_commands): New function.
7851 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7853 * ax.c: Include format.h.
7854 (ax_printf): New function.
7855 (gdb_eval_agent_expr): Add printf opcode.
7857 2012-06-13 Yao Qi <yao@codesourcery.com>
7859 * server.c (start_inferior): Remove duplicated writes to fields
7860 'last_resume_kind' and 'last_status' of 'current_inferior'.
7862 2012-06-12 Yao Qi <yao@codesourcery.com>
7863 Pedro Alves <palves@redhat.com>
7865 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7867 * server.c (handle_v_cont): Extend comment.
7869 2012-06-11 Yao Qi <yao@codesourcery.com>
7871 * linux-low.c (linux_attach): Add 'static'.
7873 2012-06-06 Yao Qi <yao@codesourcery.com>
7875 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7877 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7879 Fix gcc -flto compilation warning.
7880 * server.c (main): Make variable multi_mode and attach volatile.
7882 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7884 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7885 if the platform doesn't know about it.
7887 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7889 * Makefile.in (SFILES): Add linux-tile-low.c.
7890 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7891 * configure.srv: Handle tilegx-*-linux*.
7892 * linux-tile-low.c: New file.
7894 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7896 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7898 2012-05-24 Pedro Alves <palves@redhat.com>
7902 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7904 2012-05-24 Pedro Alves <palves@redhat.com>
7908 Replace target_signal with gdb_signal throughout.
7910 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7912 * linux-low.c (linux_store_registers): Avoid the copying sequence
7913 when no data has been retrieved by ptrace.
7915 2012-05-22 Will Deacon <will.deacon@arm.com>
7917 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7918 Include asm/ptrace.h.
7919 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7922 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7924 * linux-low.c (linux_store_registers): Don't re-retrieve data
7925 with ptrace that has already been obtained from /proc. Always
7926 copy any data retrieved with ptrace to the buffer supplied.
7928 2012-05-11 Yao Qi <yao@codesourcery.com>
7929 Pedro Alves <palves@redhat.com>
7931 * linux-low.c (enum stopping_threads_kind): New.
7932 (stopping_threads): Change type to `enum stopping_threads_kind'.
7933 (handle_extended_wait): If stopping and suspending threads, leave
7934 the new_lwp suspended too.
7935 (linux_wait_for_event): Adjust.
7936 (stop_all_lwps): Set `stopping_threads' to
7937 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7938 whether we're suspending threads or just stopping them. Assert no
7941 2012-04-29 Yao Qi <yao@codesourcery.com>
7943 * server.h: Move some code to ...
7944 * gdbthread.h: ... here. New.
7945 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7946 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7947 (nto-low.o, win32-low.o): Likewise.
7948 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7949 * regcache.c, remote-utils.c, server.c: Likewise.
7950 * target.c, tracepoint.c, win32-low.c: Likewise.
7952 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7954 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7955 (PTRACE_ARG4_TYPE): Likewise.
7956 (PTRACE_XFER_TYPE): Likewise.
7957 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7958 ptrace to PTRACE_ARG3_TYPE.
7959 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7960 (PTRACE_ARG4_TYPE): Likewise.
7961 (PTRACE_XFER_TYPE): Likewise.
7962 (linux_detach_one_lwp): Cast fourth argument of
7963 ptrace to long then PTRACE_ARG4_TYPE.
7964 (regsets_fetch_inferior_registers): Cast third argument of
7965 ptrace to long then PTRACE_ARG3_TYPE.
7966 (regsets_store_inferior_registers): Likewise.
7968 2012-04-20 Pedro Alves <palves@redhat.com>
7970 * configure: Regenerate.
7972 2012-04-19 Pedro Alves <palves@redhat.com>
7974 * Makefile.in (GNULIB_BUILDDIR): New.
7975 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7976 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7977 (all, install-only, uninstall, clean-info, all-lib, clean): No
7978 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7979 (maintainer-clean realclean distclean): Use subdir_do.
7981 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7982 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7983 * acinclude.m4: Include acx_configure_dir.m4.
7984 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7985 calls. Call AC_PROG_RANLIB. Configure gnulib using
7988 (GNULIB_STDINT_H): Adjust.
7989 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7990 * gdbreplay.c: Include build-gnulib/config.h.
7991 * server.h: Likewise.
7992 * aclocal.m4: Regenerate.
7993 * config.in: Regenerate.
7994 * configure: Regenerate.
7996 2012-04-19 Pedro Alves <palves@redhat.com>
7998 * Makefile.in (LIBGNU, INCGNU): Adjust.
7999 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8000 (all, install-only, uninstall, clean-info, all-lib, clean)
8001 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8002 * configure.ac: Adjust AC_OUTPUT output.
8003 * aclocal.m4: Regenerate.
8004 * configure: Regenerate.
8006 2012-04-19 Pedro Alves <palves@redhat.com>
8008 * Makefile.in (generated_files): New.
8009 (server_h): Remove the explicit dependency on config.h, and depend
8010 on $generated_files.
8012 2012-04-19 Pedro Alves <palves@redhat.com>
8014 * Makefile.in (INCGNU): Add -Ignulib.
8016 2012-04-19 Pedro Alves <palves@redhat.com>
8018 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8019 (INCGNU): ... this, and spell out -I here.
8020 (GNULIB_LIB): Rename to ...
8022 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8024 2012-04-19 Pedro Alves <palves@redhat.com>
8026 * config.in: Regenerate.
8028 2012-04-19 Pedro Alves <palves@redhat.com>
8030 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8031 * server.h (memmem): Remove declaration.
8032 * config.in: Regenerate.
8033 * configure: Regenerate.
8035 2012-04-19 Yao Qi <yao@codesourcery.com>
8037 * Makefile.in (SFILES): Add common/vec.c.
8041 2012-04-19 Yao Qi <yao@codesourcery.com>
8043 * remote-utils.c (prepare_resume_reply): Replace with macro
8044 target_core_of_thread.
8045 * server.c (handle_qxfer_threads_proper): Likewise.
8046 * target.h (traget_core_of_thread): New macro.
8048 2012-04-18 Pedro Alves <palves@redhat.com>
8050 * aclocal.m4: Regenerate.
8051 * configure: Regenerate.
8053 2012-04-16 Yao Qi <yao@codesourcery.com>
8055 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8056 duplicated on address.
8058 2012-04-16 Yao Qi <yao@codesourcery.com>
8060 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8061 (struct tracepoint_action_ops) <send>: New field.
8062 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8063 (agent_expr_send, x_tracepoint_action_send): New.
8064 (l_tracepoint_action_send): New.
8065 (cmd_qtdp): Download and install tracepoint
8066 according to `use_agent'.
8067 (run_inferior_command): Add one more parameter `len'.
8069 (tracepoint_send_agent): New.
8070 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8072 2012-04-16 Yao Qi <yao@codesourcery.com>
8074 * tracepoint.c (download_tracepoints): Moved to ...
8075 (cmd_qtstart): ... here.
8077 2012-04-14 Yao Qi <yao@codesourcery.com>
8079 * tracepoint.c: Include inttypes.h.
8080 (struct collect_memory_action): Use sized types.
8081 (struct tracepoint): Likewise.
8082 (cmd_qtdp, stop_tracing): Update print specifiers.
8083 (cmd_qtp, response_tracepoint): Likewise.
8084 (collect_data_at_tracepoint): Likewise.
8085 (collect_data_at_step): Likewise.
8087 2012-04-14 Yao Qi <yao@codesourcery.com>
8089 Import gnulib module inttypes.
8090 * aclocal.m4, config.in, configure: Regenerated.
8092 2012-04-14 Yao Qi <yao@codesourcery.com>
8094 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8095 Makefile and config.status at last.
8097 2012-04-13 Yao Qi <yao@codesourcery.com>
8099 * tracepoint.c: Include stdint.h unconditionally.
8101 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8103 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8104 on BFD_HAVE_SYS_PROCFS_TYPE.
8105 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8106 * configure: Regenerate.
8107 * config.in: Likewise.
8109 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8111 * Makefile.in (clean): Also remove x32.c x32-linux.c
8112 x32-avx.c x32-avx-linux.c.
8113 (x32.o): New target.
8115 (x32-linux.o): Likewise.
8116 (x32-linux.c): Likewise.
8117 (x32-avx.o): Likewise.
8118 (x32-avx.c): Likewise.
8119 (x32-avx-linux.o): Likewise.
8120 (x32-avx-linux.c): Likewise.
8122 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8123 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8124 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8125 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8126 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8127 i386/x32-avx-linux.xml.
8129 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8130 (init_registers_x32_avx_linux): Likwise.
8131 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8132 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8134 2012-04-13 Pedro Alves <palves@redhat.com>
8136 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8137 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8138 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8139 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8142 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8144 * linux-x86-low.c (compat_x32_clock_t): New.
8145 (compat_x32_siginfo_t): Likewise.
8146 (compat_x32_siginfo_from_siginfo): Likewise.
8147 (siginfo_from_compat_x32_siginfo): Likewise.
8148 (linux_is_elf64): Likewise.
8149 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8150 and siginfo_from_compat_x32_siginfo for x32.
8151 (x86_arch_setup): Set linux_is_elf64.
8153 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8156 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8158 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8159 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8160 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8161 compatible with process.
8163 2012-04-12 Yao Qi <yao@codesourcery.com>
8165 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8166 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8167 (install-only, install-info, clean): Handle sub dir gnulib.
8168 (all-lib, am--refresh): New targets.
8169 (memmem.o): Remove target.
8170 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8171 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8172 (AC_REPLACE_FUNCS): Remove memmem.
8173 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8174 (AC_OUTPUT): Generate Makefile in gnulib/.
8175 * aclocal.m4, config.in, configure: Regenerated.
8177 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8179 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8181 2012-04-05 Pedro Alves <palves@redhat.com>
8183 -Werror=strict-aliasing
8185 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8188 2012-04-04 Pedro Alves <palves@redhat.com>
8190 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8191 (sparc_store_gregset_from_stack, sparc_store_gregset)
8192 (sparc_breakpoint_at): Fix formatting.
8194 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8196 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8198 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8199 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8200 * config.in: Regenerate.
8201 * configure: Likewise.
8203 2012-03-29 Pedro Alves <palves@redhat.com>
8205 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8206 Correct ptrace arguments.
8208 2012-03-28 Pedro Alves <palves@redhat.com>
8210 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8211 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8212 (IA64_FR1_REGNUM): New defines.
8213 (ia64_fetch_register): New.
8214 (the_low_target): Install it.
8215 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8217 * linux-low.c (linux_fetch_registers): Try the
8218 the_low_target.fetch_register hook first.
8220 * linux-arm-low.c (the_low_target): Adjust.
8221 * linux-bfin-low.c (the_low_target): Adjust.
8222 * linux-cris-low.c (the_low_target): Adjust.
8223 * linux-crisv32-low.c (the_low_target): Adjust.
8224 * linux-m32r-low.c (the_low_target): Adjust.
8225 * linux-m68k-low.c (the_low_target): Adjust.
8226 * linux-mips-low.c (the_low_target): Adjust.
8227 * linux-ppc-low.c (the_low_target): Adjust.
8228 * linux-s390-low.c (the_low_target): Adjust.
8229 * linux-sh-low.c (the_low_target): Adjust.
8230 * linux-sparc-low.c (the_low_target): Adjust.
8231 * linux-tic6x-low.c (the_low_target): Adjust.
8232 * linux-x86-low.c (the_low_target): Adjust.
8233 * linux-xtensa-low.c (the_low_target): Adjust.
8235 2012-03-26 Pedro Alves <palves@redhat.com>
8237 * server.c (handle_qxfer_libraries): Don't bail early if
8238 the_target->qxfer_libraries_svr4 is not NULL.
8240 2012-03-26 Pedro Alves <palves@redhat.com>
8242 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8244 2012-03-23 Pedro Alves <palves@redhat.com>
8246 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8247 "library-list-svr4" element's start tag when the the DSO list is
8250 2012-03-23 Pedro Alves <palves@redhat.com>
8252 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8253 a variable whose type size is the same as the inferior's pointer
8256 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8258 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8260 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8261 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8262 * linux-low.h: Include <signal.h>.
8263 (struct siginfo): Remove forward declaration.
8264 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8267 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8269 * .gitignore: Ignore more files.
8271 2012-03-19 Pedro Alves <palves@redhat.com>
8272 Jan Kratochvil <jan.kratochvil@redhat.com>
8274 * server.c (cont_thread, general_thread): Add describing comments.
8275 (start_inferior): Clear `cont_thread'.
8276 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8279 2012-03-15 Yao Qi <yao@codesourcery.com>
8281 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8283 (cmd_qtdp): ... here.
8285 2012-03-15 Yao Qi <yao@codesourcery.com>
8287 * tracepoint.c (struct tracepoint_action_ops): New.
8288 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8289 (m_tracepoint_action_download): New.
8290 (r_tracepoint_action_download): New.
8291 (x_tracepoint_action_download): New.
8292 (l_tracepoint_action_download): New.
8293 (add_tracepoint_action): Install `action->ops' according type.
8294 (download_tracepoint_1): Move code `download' function pointer
8295 of various tracepoint_action_ops.
8297 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8299 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8300 linux_ptrace_attach_warnings.
8302 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8304 * Makefile.in (linux-ptrace.o): New.
8305 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8306 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8307 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8308 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8309 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8311 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8313 2012-03-08 Yao Qi <yao@codesourcery.com>
8314 Pedro Alves <palves@redhat.com>
8316 Fix PR server/13392.
8317 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8319 * tracepoint.c (remove_tracepoint): New.
8320 (cmd_qtdp): Call remove_tracepoint when failed to install.
8322 2012-03-07 Pedro Alves <palves@redhat.com>
8324 * linux-low.c (get_detach_signal): New.
8325 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8326 Pass on pending signals to PTRACE_DETACH. Check the result of the
8328 * server.c (program_signals, program_signals_p): New.
8329 (handle_general_set): Handle QProgramSignals.
8330 * server.h (program_signals, program_signals_p): Declare.
8332 2012-03-05 Pedro Alves <palves@redhat.com>
8333 Jan Kratochvil <jan.kratochvil@redhat.com>
8335 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8338 2012-03-03 Yao Qi <yao@codesourcery.com>
8340 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8341 agent_look_up_symbols.
8343 2012-03-03 Yao Qi <yao@codesourcery.com>
8345 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8346 (linux-x86-low.o): Likewise.
8347 * server.h: Remove in_process_agent_loaded.
8348 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8352 2012-03-03 Yao Qi <yao@codesourcery.com>
8354 * tracepoint.c (gdb_agent_capability): New global.
8355 (in_process_agent_loaded_ust): Renamed to
8356 `in_process_agent_supports_ust'.
8358 (in_process_agent_supports_ust): Call agent_capability_check.
8359 (clear_installed_tracepoints): Assert that agent supports
8362 2012-03-03 Yao Qi <yao@codesourcery.com>
8364 * linux-low.c (linux_supports_agent): New.
8365 (linux_target_ops): Initialize field `supports_agent' with
8366 linux_supports_agent.
8367 * target.h (struct target_ops) <supports_agent>: New.
8368 (target_supports_agent): New macro.
8369 * server.c (handle_general_set): Handle packet 'QAgent'.
8370 (handle_query): Send `QAgent+'.
8371 * Makefile.in (server.o): Depends on agent.h.
8373 2012-03-03 Yao Qi <yao@codesourcery.com>
8375 * Makefile.in (OBS): Add agent.o.
8376 Add new rule for agent.o.
8377 Track dependence of tracepoint.c on agent.h.
8378 * tracepoint.c (run_inferior_command_1):
8379 (run_inferior_command): Call agent_run_command.
8380 (gdb_ust_connect_sync_socket): Deleted. Move it to
8382 (resume_thread, stop_thread): Likewise.
8383 (gdb_ust_socket_init): Renamed to ...
8384 (gdb_agent_socket_init): ... New.
8385 (gdb_ust_thread): Renamed to ...
8386 (gdb_agent_helper_thread): ... New.
8387 (gdb_ust_init): Move some code to ...
8388 (gdb_agent_init): ... here. New.
8389 [HAVE_UST]: Call gdb_ust_init.
8390 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8391 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8392 * config.in, configure: Regenerated.
8394 2012-03-02 Pedro Alves <palves@redhat.com>
8396 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8397 * linux-low.c (struct simple_pid_list): New.
8398 (stopped_pids): New a struct simple_pid_list pointer.
8399 (add_to_pid_list, pull_pid_from_list): New.
8400 (handle_extended_wait): Don't assume the first signal new children
8401 report is SIGSTOP. Adjust call to pull_pid_from_list.
8402 (linux_wait_for_lwp): Adjust.
8404 2012-03-02 Yao Qi <yao@codesourcery.com>
8406 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8409 2012-03-02 Yao Qi <yao@codesourcery.com>
8411 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8412 `stop_pc' and `tpoint'. Update caller.
8414 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8416 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8417 * linux-low.c (use_linux_regsets): New macro.
8418 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8419 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8420 (linux_register_in_regsets): New function.
8421 (usr_fetch_inferior_registers): Skip registers covered by
8423 (usr_store_inferior_registers): Likewise.
8424 (usr_fetch_inferior_registers): New macro.
8425 (usr_store_inferior_registers): Likewise.
8426 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8427 (linux_store_registers): Likewise.
8428 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8430 (init_registers_mips64_dsp_linux): Likewise.
8431 (init_registers_mips_linux): New macro.
8432 (init_registers_mips_dsp_linux): Likewise.
8433 (mips_dsp_num_regs): Likewise.
8434 (DSP_BASE, DSP_CONTROL): New fallback macros.
8435 (mips_base_regs): New macro.
8436 (mips_regmap): Use it. Fix the size.
8437 (mips_dsp_regmap): New variable.
8438 (mips_dsp_regset_bitmap): Likewise.
8439 (mips_arch_setup): New function.
8440 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8442 (mips_cannot_store_register): Likewise.
8443 (the_low_target): Update .arch_setup, .num_regs and .regmap
8444 initializers. Add .regset_bitmap initializer.
8445 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8447 * linux-bfin-low.c (the_low_target): Likewise.
8448 * linux-cris-low.c (the_low_target): Likewise.
8449 * linux-crisv32-low.c (the_low_target): Likewise.
8450 * linux-ia64-low.c (the_low_target): Likewise.
8451 * linux-m32r-low.c (the_low_target): Likewise.
8452 * linux-m68k-low.c (the_low_target): Likewise.
8453 * linux-ppc-low.c (the_low_target): Likewise.
8454 * linux-s390-low.c (the_low_target): Likewise.
8455 * linux-sh-low.c (the_low_target): Likewise.
8456 * linux-sparc-low.c (the_low_target): Likewise.
8457 * linux-tic6x-low.c (the_low_target): Likewise.
8458 * linux-x86-low.c (the_low_target): Likewise.
8459 * linux-xtensa-low.c (the_low_target): Likewise.
8460 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8461 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8462 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8464 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8465 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8467 2012-02-29 Yao Qi <yao@codesourcery.com>
8468 Pedro Alves <palves@redhat.com>
8470 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8471 `step_over_finished' is true.
8473 2012-02-27 Pedro Alves <palves@redhat.com>
8475 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8476 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8478 2012-02-27 Pedro Alves <palves@redhat.com>
8481 * linux-low.c (pid_is_stopped): New.
8482 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8484 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8486 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8489 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8491 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8493 2012-02-24 Luis Machado <lgustavo@codesourcery>
8495 * server.c (handle_query): Advertise support for target-side
8496 breakpoint condition evaluation.
8497 (process_point_options): New function.
8498 (process_serial_event): When inserting a breakpoint, check for
8499 a target-side condition that should be evaluated.
8501 * mem-break.c: Include regcache.h and ax.h.
8502 (point_cond_list_t): New data structure.
8503 (breakpoint) <cond_list>: New field.
8504 (find_gdb_breakpoint_at): Make non-static.
8505 (delete_gdb_breakpoint_at): Clear any target-side
8507 (clear_gdb_breakpoint_conditions): New function.
8508 (add_condition_to_breakpoint): Likewise.
8509 (add_breakpoint_condition): Likewise.
8510 (gdb_condition_true_at_breakpoint): Likewise.
8511 (gdb_breakpoint_here): Return result directly instead
8512 of going through a local variable.
8514 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8515 (clear_gdb_breakpoint_conditions): Likewise.
8516 (add_breakpoint_condition): Likewise.
8517 (gdb_condition_true_at_breakpoint): Likewise.
8519 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8520 (need_step_over_p): Take target-side breakpoint condition into
8523 2012-02-24 Luis Machado <lgustavo@codesourcery>
8525 * server.h: Include tracepoint.h.
8526 (agent_mem_read, agent_get_trace_state_variable_value,
8527 agent_set_trace_state_variable_value,
8528 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8529 get_set_tsv_func_addr): New prototypes.
8531 * ax.h: New include file.
8532 * ax.c: New source file.
8534 * tracepoint.c: Include ax.h.
8535 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8536 agent_expr, eval_result_type): Move to ax.h.
8537 (parse_agent_expr): Rename to ...
8538 (gdb_parse_agent_expr): ... this, make it non-static and move
8540 (unparse_agent_expr) Rename to ...
8541 (gdb_unparse_agent_expr): ... this, make it non-static and move
8543 (eval_agent_expr): Rename to ...
8544 (eval_tracepoint_agent_expr): ... this.
8545 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8546 forward declarations.
8547 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8548 (agent_get_trace_state_variable_value): New function.
8549 (agent_set_trace_state_variable_value): New function.
8550 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8551 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8552 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8553 (condition_true_at_tracepoint): Likewise.
8554 (parse_agent_expr): Rename to ...
8555 (gdb_parse_agent_expr): ... this and move to ax.c.
8556 (unparse_agent_expr): Rename to ...
8557 (gdb_unparse_agent_expr): ... this and move to ax.c.
8558 (gdb_agent_op_name): Move to ax.c.
8559 (eval_agent_expr): Rename to ...
8560 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8562 (eval_tracepoint_agent_expr): New function.
8563 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8565 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8567 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8568 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8569 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8570 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8571 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8572 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8573 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8574 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8575 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8576 (compile_bytecodes): Remove forward declaration.
8577 (is_goto_target): Move to ax.c.
8578 (compile_bytecodes): Move to ax.c and call
8579 agent_get_trace_state_variable_value (...) and
8580 agent_set_trace_state_variable_value (...).
8582 * Makefile.in: Update ax.c and IPA dependencies.
8584 2012-02-24 Pedro Alves <palves@redhat.com>
8586 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8587 (cmd_bigqtbuffer_circular): ... this. Only handle
8588 'QTBuffer:circular:'.
8589 (handle_tracepoint_general_set): Adjust.
8591 2012-02-16 Yao Qi <yao@codesourcery.com>
8593 * inferiors.c: Move code to ...
8594 * dll.c: .... here. New.
8595 * server.h: Declare clear_dlls.
8596 * Makefile.in (SFILES): Add dll.c.
8600 2012-02-11 Yao Qi <yao@codesourcery.com>
8602 * server.c: (handle_monitor_command): Add a new parameter
8604 (handle_query): Update caller.
8606 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8608 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8609 * configure, config.in: Regenerate.
8610 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8613 2012-02-02 Pedro Alves <palves@redhat.com>
8615 Try SIGKILL first, then PTRACE_KILL.
8616 * linux-low.c (linux_kill_one_lwp): New.
8617 (linux_kill_one_lwp): Rename to ...
8618 (kill_one_lwp_callback): ... this. Use the new
8621 2012-02-02 Pedro Alves <palves@redhat.com>
8623 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8626 2012-01-27 Pedro Alves <palves@redhat.com>
8628 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8629 (elf_64_file_p): Make static.
8630 (linux_pid_exe_is_elf_64_file): New.
8631 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8632 Delete declarations.
8633 (linux_pid_exe_is_elf_64_file): Declare.
8634 * linux-x86-low.c (x86_arch_setup): Use
8635 linux_pid_exe_is_elf_64_file.
8637 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8639 * linux-low.c (linux_wait_for_event_1): Rename to ...
8640 (linux_wait_for_event): ... here and merge it with former
8641 linux_wait_for_event - new variable wait_ptid, use it.
8642 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8644 2012-01-23 Pedro Alves <palves@redhat.com>
8646 * server.c (main): Avoid yet another case of infinite loop while
8647 detaching/killing after a longjmp.
8649 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8652 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8654 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8656 * hostio.c (handle_readlink): New function.
8657 (handle_vFile): Call it to handle "vFile:readlink" packets.
8659 2012-01-20 Pedro Alves <palves@redhat.com>
8660 Ulrich Weigand <ulrich.weigand@linaro.org>
8662 * server.c (handle_v_requests): Only support vAttach and vRun to
8663 start multiple processes when in extended protocol mode.
8665 2012-01-17 Pedro Alves <palves@redhat.com>
8667 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8668 memalign plus mprotect to allocate the scratch buffer.
8670 2012-01-13 Pedro Alves <palves@redhat.com>
8672 * server.c (attach_inferior): Clear `cont_thread'.
8674 2012-01-13 Pedro Alves <palves@redhat.com>
8676 * server.c (main): Avoid infinite loop while detaching/killing
8679 2012-01-09 Doug Evans <dje@google.com>
8681 * server.c (start_inferior): Set last_ptid in --wrapper case.
8683 2012-01-06 Yao Qi <yao@codesourcery.com>
8685 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8687 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8689 2012-01-04 Yao Qi <yao@codesourcery.com>
8691 * tracepoint.c (cmd_qtdp): Print debug message
8692 for static tracepoint.
8694 2012-01-04 Yao Qi <yao@codesourcery.com>
8696 * tracepoint.c (trace_vdebug): Differentiate debug message
8697 between gdbserver and IPA.
8699 2012-01-03 Yao Qi <yao@codesourcery.com>
8701 * tracepoint.c (tracepoint_was_hit): Don't collect for
8704 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8706 * terminal.h: Reformat copyright header.
8708 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8710 * server.c (gdbserver_version): Update copyright year.
8711 * gdbreplay.c (gdbreplay_version): Likewise.
8713 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8715 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8718 2011-12-18 Hui Zhu <teawater@gmail.com>
8719 * linux-low.c (linux_create_inferior): Save return value to ret.
8721 2011-12-18 Hui Zhu <teawater@gmail.com>
8723 * linux-low.c (linux_create_inferior): Save return value to ret.
8725 2011-12-16 Doug Evans <dje@google.com>
8727 * linux-low.c (linux_create_inferior): If stdio connection,
8728 redirect stdin from /dev/null, stdout to stderr.
8729 * remote-utils.c (remote_is_stdio): New static global.
8730 (remote_connection_is_stdio): New function.
8731 (remote_prepare): Handle stdio connection.
8732 (remote_open): Ditto.
8733 (remote_close): Don't close stdin for stdio connections.
8734 (read_prim,write_prim): New functions. Replace all calls to
8735 read/write to these.
8736 * server.c (main): Watch for "-" argument. Move call to
8737 remote_prepare before start_inferior.
8738 * server.h (STDIO_CONNECTION_NAME): New macro.
8739 (remote_connection_is_stdio): Declare.
8741 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8742 in debugging output.
8744 2011-12-15 Yao Qi <yao@codesourcery.com>
8746 * tracepoint.c: Include sys/syscall.h.
8747 (gdb_ust_thread): Remove preprocessor conditional.
8749 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8751 * linux-low.c (linux_detach_one_lwp): Call
8752 the_low_target.prepare_to_resume before detaching.
8754 2011-12-14 Yao Qi <yao@codesourcery.com>
8756 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8759 2011-12-14 Yao Qi <yao@codesourcery.com>
8761 * i386-low.c (i386_low_stopped_data_address): Initialize local
8764 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8768 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8769 DR_CONTROL unless necessary. Extend comments.
8770 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8771 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8773 2011-12-13 Yao Qi <yao@codesourcery.com>
8775 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8777 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8779 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8781 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8782 Print new debug message for such case.
8784 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8786 Fix overlapping memcpy.
8787 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8788 the read_inferior_memory transfer.
8789 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8790 write_inferior_memory transfer.
8791 (set_fast_tracepoint_jump): New variable buf. Use it for the
8792 read_inferior_memory and write_inferior_memory transfers.
8793 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8794 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8795 Use it for the write_inferior_memory transfer.
8796 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8799 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8801 * linux-low.c (fetch_register, store_register): Make code
8802 consistent, fix formatting.
8804 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8806 * linux-low.c (usr_store_inferior_registers): Factor out code
8807 to handle individual registers into...
8808 (store_register): ... this new function.
8810 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8812 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8813 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8814 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8815 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8816 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8817 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8818 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8819 (srv_xmlfiles): Add new XML files.
8821 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8823 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8824 (init_registers_s390_linux32v1): Add prototype.
8825 (init_registers_s390_linux32v2): Likewise.
8826 (init_registers_s390_linux64v1): Likewise.
8827 (init_registers_s390_linux64v2): Likewise.
8828 (init_registers_s390x_linux64v1): Likewise.
8829 (init_registers_s390x_linux64v2): Likewise.
8830 (s390_num_regs): Increment to 52.
8831 (s390_regmap): Add orig_r2 register.
8832 (s390_num_regs_3264): Increment to 68.
8833 (s390_regmap_3264): Add orig_r2 register.
8834 (s390_collect_ptrace_register): Handle orig_r2 register.
8835 (s390_supply_ptrace_register): Likewise.
8836 (s390_fill_last_break): New function.
8837 (s390_store_last_break): Likewise.
8838 (s390_fill_system_call): New function.
8839 (s390_store_system_call): Likewise.
8840 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8842 (s390_check_regset): New function.
8843 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8844 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8845 Update target_regsets for available register sets.
8847 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8848 Jan Kratochvil <jan.kratochvil@redhat.com>
8850 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8851 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8853 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8854 * linux-low.h (struct process_info_private): New member r_debug.
8855 * server.c (handle_qxfer_libraries): Call
8856 the_target->qxfer_libraries_svr4.
8857 (handle_qxfer_libraries_svr4): New function.
8858 (qxfer_packets): New entry "libraries-svr4".
8859 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8860 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8861 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8862 PACKET_qXfer_libraries_svr4.
8864 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8866 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8867 PSW address/mask between 8-byte and 16-byte formats.
8868 (s390_supply_ptrace_register): Likewise.
8869 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8870 basic addressing mode bit.
8872 2011-11-24 Stan Shebs <stan@codesourcery.com>
8874 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8876 2011-11-17 Stan Shebs <stan@codesourcery.com>
8878 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8879 (tracing_start_time): New global.
8880 (tracing_stop_time): New global.
8881 (tracing_user_name): New global.
8882 (tracing_notes): New global.
8883 (tracing_stop_note): New global.
8884 (cmd_qtstart): Set traceframe_usage, start_time.
8885 (stop_tracing): Set stop_time.
8886 (cmd_qtstatus): Report additional status.
8887 (cmd_qtp): New function.
8888 (handle_tracepoint_query): Call it.
8889 (cmd_qtnotes): New function.
8890 (handle_tracepoint_general_set): Call it.
8891 (get_timestamp): Rename from tsv_get_timestamp.
8893 2011-11-14 Stan Shebs <stan@codesourcery.com>
8894 Kwok Cheung Yeung <kcy@codesourcery.com>
8896 * linux-x86-low.c (small_jump_insn): New.
8897 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8898 trampoline and error message, build a trampoline and issue a small
8899 jump instruction to it.
8900 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8901 trampoline and error message.
8902 (x86_get_min_fast_tracepoint_insn_len): New.
8903 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8904 * linux-low.h (struct linux_target_ops): Add arguments to
8905 install_fast_tracepoint_jump_pad operation, add new operation.
8906 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8908 (linux_get_min_fast_tracepoint_insn_len): New function.
8909 (linux_target_op): Add new operation.
8910 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8911 (gdb_trampoline_buffer_end): Ditto.
8912 (gdb_trampoline_buffer_error): Ditto.
8913 (struct ipa_sym_addresses): Add fields for new IPA variables.
8914 (symbol_list): Add entries for new IPA variables.
8915 (struct tracepoint): Add fields to hold the address range of the
8916 trampoline used by the tracepoint.
8917 (trampoline_buffer_head): New static variable.
8918 (trampoline_buffer_tail): Ditto.
8919 (claim_trampoline_space): New function.
8920 (have_fast_tracepoint_trampoline_buffer): New function.
8921 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8923 (install_fast_tracepoint): Ditto, also add error buffer argument.
8924 (cmd_qtminftpilen): New function.
8925 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8926 (fast_tracepoint_from_trampoline_address): New function.
8927 (fast_tracepoint_collecting): Handle trampoline as part of jump
8929 (set_trampoline_buffer_space): New function.
8930 (initialize_tracepoint): Initialize new IPA variables.
8931 * target.h (struct target_ops): Add arguments to
8932 install_fast_tracepoint_jump_pad operation, add new
8933 get_min_fast_tracepoint_insn_len operation.
8934 (target_get_min_fast_tracepoint_insn_len): New.
8935 (install_fast_tracepoint_jump_pad): Add arguments.
8936 * server.h (IPA_BUFSIZ): Define.
8937 * linux-i386-ipa.c: Include extra header files.
8938 (initialize_fast_tracepoint_trampoline_buffer): New function.
8939 (initialize_low_tracepoint): Call it.
8940 * server.h (set_trampoline_buffer_space): Declare.
8941 (claim_trampoline_space): Ditto.
8942 (have_fast_tracepoint_trampoline_buffer): Ditto.
8944 2011-11-14 Yao Qi <yao@codesourcery.com>
8946 * server.c (handle_query): Handle InstallInTrace for qSupported.
8947 * tracepoint.c (add_tracepoint): Sort list.
8948 (install_tracepoint, download_tracepoint): New.
8949 (cmd_qtdp): Call them to install and download tracepoints.
8950 (sort_tracepoints): Removed.
8951 (cmd_qtstart): Update.
8953 2011-11-14 Yao Qi <yao@codesourcery.com>
8955 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8956 * mem-break.h: Declare.
8957 * tracepoint.c (cmd_qtstart): Move some code to ...
8958 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8960 (download_tracepoints): Move some code to ...
8961 (download_tracepoint_1): ... here. New.
8963 2011-11-08 Yao Qi <yao@codesourcery.com>
8965 * remote-utils.c (relocate_instruction): A comment fix.
8967 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8969 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8970 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8971 dr_status_mirror and dr_control_mirror from debug_reg_state.
8972 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8973 (i386_initial_stuff): Remove use of deleted globals.
8974 (i386_get_thread_context, i386_set_thread_context,
8975 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8976 from debug_reg_state.
8978 2011-11-05 Yao Qi <yao@codesourcery.com>
8980 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8981 address as TPOINT's.
8983 2011-11-02 Stan Shebs <stan@codesourcery.com>
8985 * tracepoint.c (agent_mem_read_string): New function.
8986 (eval_agent_expr): Call it for tracenz.
8987 * server.c (handle_query): Report support for tracenz.
8989 2011-11-02 Yao Qi <yao@codesourcery.com>
8991 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8993 2011-11-02 Yao Qi <yao@codesourcery.com>
8995 * target.h: Fix a typo in comment.
8997 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8999 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9000 clobber the breakpoints' shadows with fast tracepoint jumps.
9001 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9002 * target.c (write_inferior_memory): Also pass MYADDR down to
9005 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9007 * configure.ac: Check support for personality routine.
9008 * configure: Regenerate.
9009 * config.in: Likewise.
9010 * linux-low.c: Include <sys/personality.h>.
9011 Define ADDR_NO_RANDOMIZE if necessary.
9012 (linux_create_inferior): Disable address space randomization when
9013 forking inferior, if requested.
9014 (linux_supports_disable_randomization): New function.
9015 (linux_target_ops): Install it.
9016 * server.h (disable_randomization): Declare.
9017 * server.c (disable_randomization): New global variable.
9018 (handle_general_set): Handle QDisableRandomization.
9019 (handle_query): Likewise for qSupported.
9020 (main): Support --disable-randomization and --no-disable-randomization
9021 command line arguments.
9022 * target.h (struct target_ops): Add supports_disable_randomization.
9023 (target_supports_disable_randomization): New macro.
9025 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9027 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9029 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9030 [!PT_GETDSBT] (target_loadmap): New definition.
9031 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9032 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9033 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9034 and PT_GETDSBT to LINUX_LOADMAP.
9035 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9036 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9038 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9040 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9041 (arm_linux_hwbp_cap): New static variable.
9042 (arm_linux_get_hwbp_cap): Replace by ...
9043 (arm_linux_init_hwbp_cap): ... this new function.
9044 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9045 (arm_linux_get_hw_watchpoint_count): Likewise.
9046 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9047 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9048 (arm_prepare_to_resume): Use perror_with_name instead of error.
9050 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9052 * linux-arm-low.c: Include <signal.h>.
9053 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9054 (struct arm_linux_hwbp_cap): New data type.
9055 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9056 (struct arm_linux_hw_breakpoint): New data type.
9057 (MAX_BPTS, MAX_WPTS): Define.
9058 (struct arch_process_info, struct arch_lwp_info): New data types.
9059 (arm_linux_get_hwbp_cap): New function.
9060 (arm_linux_get_hw_breakpoint_count): Likewise.
9061 (arm_linux_get_hw_watchpoint_count): Likewise.
9062 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9063 (arm_hwbp_control_initialize): Likewise.
9064 (arm_hwbp_control_is_enabled): Likewise.
9065 (arm_hwbp_control_is_initialized): Likewise.
9066 (arm_hwbp_control_disable): Likewise.
9067 (arm_linux_hw_breakpoint_equal): Likewise.
9068 (arm_linux_hw_point_initialize): Likewise.
9069 (struct update_registers_data): New data structure.
9070 (update_registers_callback: New function.
9071 (arm_insert_point): Likewise.
9072 (arm_remove_point): Likewise.
9073 (arm_stopped_by_watchpoint): Likewise.
9074 (arm_stopped_data_address): Likewise.
9075 (arm_new_process): Likewise.
9076 (arm_new_thread): Likewise.
9077 (arm_prepare_to_resume): Likewise.
9078 (the_low_target): Register arm_insert_point, arm_remove_point,
9079 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9080 arm_new_thread, and arm_prepare_to_resume.
9082 2011-09-15 Stan Shebs <stan@codesourcery.com>
9084 * server.h (struct emit_ops): Add compare-goto fields.
9085 * tracepoint.c (gdb_agent_op_sizes): New table.
9086 (emit_eq_goto): New function.
9087 (emit_ne_goto): New function.
9088 (emit_lt_goto): New function.
9089 (emit_le_goto): New function.
9090 (emit_gt_goto): New function.
9091 (emit_ge_goto): New function.
9092 (is_goto_target): New function.
9093 (compile_bytecodes): Recognize special cases of compare-goto
9094 combinations and call specialized emitters for them.
9095 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9096 (amd64_emit_ne_goto): New function.
9097 (amd64_emit_lt_goto): New function.
9098 (amd64_emit_le_goto): New function.
9099 (amd64_emit_gt_goto): New function.
9100 (amd64_emit_ge_goto): New function.
9101 (amd64_emit_ops): Add the new functions.
9102 (i386_emit_eq_goto): New function.
9103 (i386_emit_ne_goto): New function.
9104 (i386_emit_lt_goto): New function.
9105 (i386_emit_le_goto): New function.
9106 (i386_emit_gt_goto): New function.
9107 (i386_emit_ge_goto): New function.
9108 (i386_emit_ops): Add the new functions.
9110 2011-09-08 Stan Shebs <stan@codesourcery.com>
9112 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9113 (i386_emit_epilogue): Restore %ebx.
9115 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9117 * server.c (step_thread): Remove definition.
9118 (process_serial_event): Don't handle Hs.
9119 * server.h (step_thread): Remove declaration.
9120 * target.c (set_desired_inferior): Remove use of step_thread.
9122 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9124 * linux-low.c: Include linux-procfs.h.
9125 (linux_attach_lwp_1): Update comments.
9126 (linux_attach): Scan for existing threads when attaching to a
9127 process that is the tgid.
9128 * Makefile.in: Update dependencies.
9130 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9132 * configure.srv: Add linux-procfs.o dependencies.
9134 2011-08-14 Yao Qi <yao@codesourcery.com>
9136 * target.h (struct target_ops): Fix indent.
9137 * win32-low.c (win32_target_ops): Fix comment.
9139 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9140 Yao Qi <yao@codesourcery.com>
9142 * Makefile.in (clean): Remove tic6x-*.c files.
9143 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9144 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9145 (tic6x-c64xp-linux.c): Likewise.
9146 * configure.srv: Add support for tic6x-*-uclinux.
9147 * linux-tic6x-low.c: New.
9148 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9150 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9151 Yao Qi <yao@codesourcery.com>
9153 * target.h (struct target_ops): Add read_loadmap.
9154 * linux-low.c (struct target_loadseg): New type.
9155 (struct target_loadmap): New type.
9156 (linux_read_loadmap): New function.
9157 (linux_target_ops): Add linux_read_loadmap.
9158 * server.c (handle_query): Support qXfer:fdpic:read packet.
9159 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9162 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9164 * win32-low.c: Include <stdint.h>.
9166 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9168 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9169 to the inferior here.
9170 (i386_remove_aligned_watchpoint): Ditto.
9171 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9172 fit part of the watchpoint in the debug registers.
9173 (i386_update_inferior_debug_regs): New.
9174 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9175 registers, and only update the inferior on success.
9176 (i386_low_remove_watchpoint): Ditto.
9178 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9180 * linux-low.c (compare_ints, unique, list_threads, show_process,
9181 linux_core_of_thread): Delete.
9182 (linux_target_ops): Change linux_core_of_thread to
9183 linux_common_core_of_thread.
9184 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9185 * utils.c (malloc_failure): Change type of argument.
9186 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9187 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9188 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9189 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9190 (IPA_OBJS): Add common-utils-ipa.o.
9191 (ptid_h, linux_osdata_h): New macros.
9192 (server_h): Add common/common-utils.h, common/xml-utils.h,
9193 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9195 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9196 ptid.o, buffer.o): New rules.
9197 (linux-low.o): Add common/linux-osdata.h as a dependency.
9198 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9199 * configure.ac: Add AC_HEADER_DIRENT check.
9200 * config.in: Regenerate.
9201 * configure: Regenerate.
9202 * remote-utils.c (xml_escape_text): Delete.
9203 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9204 buffer_xml_printf): Move to common/buffer.c.
9205 * server.c (main): Remove call to initialize_inferiors.
9206 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9207 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9208 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9209 internal_error, gdb_assert, gdb_assert_fail): Delete.
9210 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9211 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9213 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9214 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9215 initialize_inferiors): Delete.
9217 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9219 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9222 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9224 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9226 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9228 2011-05-26 Yao Qi <yao@codesourcery.com>
9230 * Makefile.in (thread-db.o): Track dependence to
9231 common/gdb_thread_db.h.
9232 * thread-db.c: include gdb_thread_db.h from right place.
9234 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9236 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9237 __FILE__ and __LINE__ to internal_error.
9239 2011-05-13 Doug Evans <dje@google.com>
9241 * thread-db.c (try_thread_db_load_from_sdir): New function.
9242 (try_thread_db_load_from_dir): New function.
9243 (thread_db_load_search): Handle $sdir, ignore $pdir.
9244 Remove trying of system directories if search of
9245 libthread-db-search-path fails, that is now done via $sdir.
9247 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9249 * server.c (handle_query): Add EnableDisableTracepoints to the list
9250 of supported features.
9251 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9253 (cmd_qtenable_disable): New.
9254 (cmd_qtstart): Install tracepoints even if disabled.
9255 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9256 receiving a QTEnable or QTDisable packet.
9257 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9258 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9260 (gdb_probe): Skip data collection if static tracepoint is disabled.
9262 2011-05-10 Doug Evans <dje@google.com>
9264 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9266 2011-05-04 Doug Evans <dje@google.com>
9268 * linux-low.c (linux_join): Skip process lookup.
9269 * spu-low.c (spu_join): Ditto.
9270 * server.c (join_inferiors_callback): Delete.
9271 (process_serial_event): For 'D' packet (detach) call join_inferior
9274 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9276 * README: Don't mention xscale*-*-linux*.
9277 * configure.srv (xscale*-*-linux*): Don't handle target.
9279 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9281 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9283 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9284 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9285 (i386_emit_void_call_2): Likewise.
9287 2011-04-26 Yao Qi <yao@codesourcery.com>
9289 * linux-low.c: Move common macros to linux-ptrace.h.
9290 Include linux-ptrace.h.
9291 * Makefile.in (linux_ptrace_h): New.
9292 (linux-low.o): Depends on linux-ptrace.h.
9294 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9296 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9297 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9298 (remote_prepare): New function with most of the TCP code from ...
9299 (remote_open): ... here. Detect PORT here unconditionally. Move also
9300 setting transport_is_reliable.
9301 * server.c (run_once): New variable.
9302 (gdbserver_usage): Document it.
9303 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9304 the first run if RUN_ONCE.
9305 * server.h (run_once, remote_prepare): New declarations.
9307 2011-04-19 Tom Tromey <tromey@redhat.com>
9309 * win32-low.c (handle_load_dll): Remove duplicate "the".
9311 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9313 Remove support for old Cygwin 1.5 versions.
9314 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9315 function to avoid warning.
9316 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9319 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9321 * gdbserver/server.h (Macro _): Define it if not available.
9323 2011-03-14 Michael Snyder <msnyder@vmware.com>
9325 * hostio.c (handle_close): Remove unnecessary null test.
9327 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9329 * Makefile.in (maintainer-clean realclean distclean): Remove
9330 "make ... subdir_do" command.
9332 2011-03-10 Michael Snyder <msnyder@vmware.com>
9334 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9336 * server.c (handle_v_run): Free alloced buffer on early return.
9338 2011-03-09 Yao Qi <yao@codesourcery.com>
9341 2011-03-04 Yao Qi <yao@codesourcery.com>
9343 * Makefile.in: Remove GNU make feature --directory.
9345 2011-03-05 Yao Qi <yao@codesourcery.com>
9347 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9348 (subdir_do): New make target. Copied from gdb/Makefile.
9349 (maintainer-clean, realclean, distclean, clean): Call corresponding
9350 make targets in common/Makefile.
9352 2011-02-11 Yao Qi <yao@codesourcery.com>
9354 * configure.ac: Call AC_PROG_RANLIB.
9355 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9356 * configure: Regenerate.
9358 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9360 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9362 2011-03-06 Yao Qi <yao@codesourcery.com>
9364 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9366 2011-03-05 Yao Qi <yao@codesourcery.com>
9368 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9369 (subdir_do): New make target. Copied from gdb/Makefile.
9370 (maintainer-clean, realclean, distclean, clean): Call corresponding
9371 make targets in common/Makefile.
9373 2011-03-04 Yao Qi <yao@codesourcery.com>
9375 * Makefile.in: Remove GNU make feature --directory.
9377 2011-03-04 Michael Snyder <msnyder@vmware.com>
9379 * server.c (queue_stop_reply): Call xmalloc not malloc.
9381 2011-03-02 Michael Snyder <msnyder@vmware.com>
9383 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9385 2011-02-28 Michael Snyder <msnyder@vmware.com>
9387 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9388 (cmd_qtframe): Ditto.
9389 (cmd_qtbuffer): Ditto.
9390 (cmd_bigqtbuffer): Ditto.
9392 * utils.c (decimal2str): Initialize 'width' to nine, then
9395 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9397 * hostio.c (require_data): Free *data, not data.
9399 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9401 * hostio.c (require_data): Use free, not xfree.
9403 2011-02-27 Michael Snyder <msnyder@vmware.com>
9405 * server.c (handle_query): Discard unused value.
9407 * hostio.c (require_data): Free malloc memory before returning
9410 2011-02-26 Michael Snyder <msnyder@vmware.com>
9412 * linux-low.c (list_threads): Call closedir for dirent.
9414 2011-02-27 Michael Snyder <msnyder@vmware.com>
9416 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9417 a case statement falls through.
9419 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9421 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9424 2011-02-26 Michael Snyder <msnyder@vmware.com>
9426 * utils.c (decimal2str): Eliminate dead code and dead param.
9427 (pulongest): Drop dead param from call to decimal2str.
9430 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9432 Revert the following patch (not approved yet):
9433 2011-02-21 Hui Zhu <teawater@gmail.com>
9434 * tracepoint.c (tp_printf): New function.
9435 (eval_agent_expr): Handle gdb_agent_op_printf.
9437 2011-02-21 Hui Zhu <teawater@gmail.com>
9439 * tracepoint.c (tp_printf): New function.
9440 (eval_agent_expr): Handle gdb_agent_op_printf.
9442 2011-02-18 Tom Tromey <tromey@redhat.com>
9444 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9445 (tracepoint.o): Likewise.
9446 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9447 (gdb_agent_op_names): Likewise.
9449 2011-02-18 Tom Tromey <tromey@redhat.com>
9451 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9452 gdb_agent_op_rot>: New constants.
9453 (gdb_agent_op_names): Add pick and roll.
9454 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9457 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9459 * aclocal.m4: Regenerated with aclocal-1.11.1.
9461 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9463 * server.c (handle_qxfer_traceframe_info): New.
9464 (qxfer_packets): Register "traceframe-info".
9465 (handle_query): Report support for qXfer:traceframe-info:read+.
9466 * tracepoint.c (match_blocktype): New.
9467 (traceframe_find_block_type): Rename to ...
9468 (traceframe_walk_blocks): ... this. Add callback filter argument,
9470 (traceframe_find_block_type): New, reimplemented on top of
9471 traceframe_walk_blocks.
9472 (build_traceframe_info_xml): New.
9473 (traceframe_read_info): New.
9474 * server.h (traceframe_read_info): Declare.
9476 2011-02-11 Yao Qi <yao@codesourcery.com>
9478 * configure.ac: Call AC_PROG_RANLIB.
9479 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9480 * configure: Regenerate.
9482 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9484 * server.c (gdb_read_memory): Change return semantics to allow
9486 (handle_search_memory_1): Adjust.
9487 (process_serial_event) <'m' packet>: Handle partial transfers.
9488 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9490 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9492 * regcache.c (init_register_cache): Initialize
9493 regcache->register_status.
9494 (free_register_cache): Release regcache->register_status.
9495 (regcache_cpy): Copy register_status.
9496 (registers_to_string): Print 'x's for unavailable registers.
9497 (supply_register): Mark the register's status valid or
9498 unavailable, depending on whether a buffer was passed in or not.
9499 (supply_register_zeroed): New.
9500 (supply_regblock): Mark the registers' status valid or
9501 unavailable, depending on whether a buffer was passed in or not.
9502 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9503 (struct regcache): New `register_status' field.
9504 (supply_register_zeroed): Declare.
9505 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9506 supply_register_zeroed, rather than passing a NULL buffer to
9508 * tracepoint.c (fetch_traceframe_registers): Update comment.
9510 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9512 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9515 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9517 * server.h (decode_xfer_write): Change prototype.
9518 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9519 and don't extract the annex here.
9520 * server.c (decode_xfer_read): Remove `annex' parameter,
9521 and don't extract the annex here.
9523 (struct qxfer): New.
9524 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9525 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9526 (handle_qxfer_statictrace): New functions, abstracted out from
9527 handle_query, and made to use the struct qxfer interface.
9528 (handle_threads_qxfer_proper): Rename to ...
9529 (handle_qxfer_threads_proper): ... this.
9530 (handle_threads_qxfer): Rename to ...
9531 (handle_qxfer_threads): ... this. Adjust.
9532 (qxfer_packets): New array.
9533 (handle_qxfer): New function.
9534 (handle_query): Use handle_qxfer.
9536 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9538 * gdbreplay.c: Shorten lines of >= 80 columns.
9539 * linux-low.c: Ditto.
9540 * linux-ppc-low.c: Ditto.
9541 * linux-s390-low.c: Ditto.
9542 * linux-sparc-low.c: Ditto.
9543 * linux-x86-low.c: Ditto.
9544 * linux-xtensa-low.c: Ditto.
9545 * mem-break.c: Ditto.
9547 * regcache.h: Ditto.
9548 * remote-utils.c: Ditto.
9551 * thread-db.c: Ditto.
9552 * tracepoint.c: Ditto.
9554 * win32-low.h: Ditto.
9556 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9558 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9561 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9563 * server.c (gdbserver_version): Update copyright year in version
9565 * gdbreplay.c (gdbreplay_version): Ditto.
9567 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9569 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9570 * linux-bfin-low.c: New file.
9571 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9572 PT_DATA_ADDR for BFIN targets.
9573 * Makefile.in (SFILES): Add linux-bfin-low.c.
9574 (clean): Remove reg-bfin.c.
9575 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9576 * README: Mention supported Blackfin targets.
9578 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9580 * .gitignore: New file.
9582 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9584 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9586 2010-10-22 Jie Zhang <jie@codesourcery.com>
9588 * Makefile.in: Add FLAGS_TO_PASS variable.
9589 (install): Remove dependency of install-only and recursively
9590 invoke make for install-only.
9592 2010-10-04 Doug Evans <dje@google.com>
9594 * Makefile.in (uninstall): Use $(DESTDIR).
9596 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9600 * linux-x86-low.c (compat_siginfo_from_siginfo)
9601 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9602 si_code is < 0. Check for si_code == SI_TIMER before checking for
9605 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9607 * lynx-i386-low.c: New file.
9608 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9610 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9612 * lynx-low.c (ptrace_request_to_str): Remove handling for
9613 request values that have been removed in LynxOS 5.x.
9615 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9617 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9620 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9622 * configure.ac: Add --enable-inprocess-agent option.
9623 * configure: Rebuilt.
9625 2010-09-06 Yao Qi <yao@codesourcery.com>
9627 * linux-low.c (linux_kill): Remove unused variable.
9628 (linux_stabilize_threads): Likewise.
9629 * server.c (start_inferior): Likewise.
9630 (queue_stop_reply_callback): Likewise.
9631 * tracepoint.c (do_action_at_tracepoint): Likewise.
9633 2010-09-06 Yao Qi <yao@codesourcery.com>
9635 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9638 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9640 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9642 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9644 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9647 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9649 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9650 gdbserver/lynx-ppc-low.c: New files.
9651 * Makefile.in (lynx_low_h): New variable.
9652 (lynx-low.o, lynx-ppc-low.o): New rules.
9653 * configure.ac: On LynxOS, link with -lnetinet.
9654 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9655 * configure: regenerate.
9657 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9659 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9660 * configure.ac: Add check for vasprintf and vsnprintf.
9661 * configure, config.in: Regenerate.
9662 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9664 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9666 * gdbreplay.c: Move include of alloca.h up, next to include of
9668 * server.h: Add include of malloc.h.
9669 * mem-break.c: Remove include of malloc.h.
9670 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9672 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9674 * Makefile.in (memmem.o): Build with -Wno-error.
9676 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9678 * utils.c (xsnprintf): Make non-static.
9679 * server.h: Add xsnprintf declaration.
9680 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9681 replace calls to snprintf by calls to xsnprintf throughout.
9683 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9685 * configure.ac: Add configure check for alloca.
9686 * configure, config.in: Regenerate.
9687 * server.h: Include alloca.h if it exists.
9688 * gdbreplay.c: Include alloca.h if it exists.
9690 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9692 * linux-low.c (__SIGRTMIN): Define if not already defined.
9693 (linux_create_inferior): Check for __ANDROID__ rather than
9695 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9696 are already deferred.
9697 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9698 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9699 stopped and already has a pending signal to report.
9700 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9701 a pending signal to report or is moving out of a jump pad.
9702 (linux_init_signals): Check for __ANDROID__ rather than
9705 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9707 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9708 debug_threads check. Avoid a linear search when not doing debug
9711 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9713 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9714 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9715 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9716 (process_event): Change local fd's type to gdb_fildes_t.
9717 (create_file_handler): Adjust prototype.
9718 (delete_file_handler): Adjust prototype.
9719 (handle_file_event): Adjust prototype. Use pfildes.
9720 (create_file_event): Adjsut prototype.
9721 * remote-utils.c (remote_desc, listen_desc): Change type to
9723 * server.h: New gdb_fildes_t typedef.
9724 [USE_WIN32API]: Include winsock2.h.
9725 (delete_file_handler, add_file_handler): Adjust prototypes.
9727 * utils.c (pfildes): New.
9729 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9731 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9732 * configure: Regenerate.
9734 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9736 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9737 (linux_done_accessing_memory): ... this.
9738 (linux_target_ops): Adjust.
9739 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9740 * nto-low.c (nto_target_ops): Adjust comment.
9741 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9742 * spu-low.c (spu_target_ops): Adjust comment.
9743 * target.h (target_ops): Rename unprepare_to_access_memory field
9744 to done_accessing_memory.
9745 (unprepare_to_access_memory): Rename to ...
9746 (done_accessing_memory): ... this.
9748 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9750 * linux-low.c (linux_prepare_to_access_memory): New.
9751 (linux_unprepare_to_access_memory): New.
9752 (linux_target_ops): Install them.
9753 * server.c (read_memory): Rename to ...
9754 (gdb_read_memory): ... this. Use
9755 prepare_to_access_memory/prepare_to_access_memory.
9756 (write_memory): Rename to ...
9757 (gdb_write_memory): ... this. Use
9758 prepare_to_access_memory/prepare_to_access_memory.
9759 (handle_search_memory_1): Adjust.
9760 (process_serial_event): Adjust.
9761 * target.h (struct target_ops): New fields
9762 prepare_to_access_memory and unprepare_to_access_memory.
9763 (prepare_to_access_memory, unprepare_to_access_memory): New.
9764 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9765 prepare_to_access_memory/prepare_to_access_memory.
9766 * nto-low.c (nto_target_ops): Adjust.
9767 * spu-low.c (spu_target_ops): Adjust.
9768 * win32-low.c (win32_target_ops): Adjust.
9770 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9772 * Makefile.in (WARN_CFLAGS): Get it from configure.
9773 (WERROR_CFLAGS): New.
9774 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9775 * configure.ac: Introduce --enable-werror, which adds -Werror to
9776 the compiler command line. Enabled by default. Disable with
9777 --disable-werror. Add -Wdeclaration-after-statement
9778 Wpointer-arith and -Wformat-nonliteral to warning flags.
9779 * configure: Regenerate.
9781 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9783 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9785 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9787 * gdbreplay.c (remote_error): New.
9789 (expect): Use gdbchar. Check for error reading from GDB.
9790 Clarify sync error output.
9791 (play): Check for errors writing to GDB.
9792 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9793 * remote-utils.c (getpkt): Check for errors writing to the remote
9796 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9798 * linux-low.c (linux_wait_1): Move non-debugging code out of
9799 `debug_threads' control.
9801 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9803 * linux-low.c (linux_wait_1): Don't set last_status here.
9804 * server.c (push_event, queue_stop_reply_callback): Assert we're
9805 not pushing a TARGET_WAITKIND_IGNORE event.
9806 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9807 (myresume, handle_target_event): Set the thread's last_resume_kind
9808 and last_status from the target returned status.
9810 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9814 * linux-x86-low.c (update_debug_registers_callback): New.
9815 (i386_dr_low_set_addr): Use it.
9816 (i386_dr_low_get_addr): New.
9817 (i386_dr_low_set_control): Use update_debug_registers_callback.
9818 (i386_dr_low_get_control): New.
9819 (i386_dr_low_get_status): Adjust.
9820 * linux-low.c (linux_stop_lwp): New.
9821 * linux-low.h (linux_stop_lwp): Declare.
9823 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9824 argument instead of a i386_debug_reg_state.
9825 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9826 a i386_debug_reg_state.
9827 (i386_insert_aligned_watchpoint): Adjust.
9828 (i386_remove_aligned_watchpoint): Adjust.
9829 (i386_low_stopped_data_address): Read the debug registers from the
9830 inferior instead of from the mirrors.
9831 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9832 (i386_dr_low_get_addr): Declare.
9833 (i386_dr_low_get_control): Declare.
9834 (i386_dr_low_get_status): Change prototype.
9836 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9837 (i386_dr_low_get_addr): New.
9838 (i386_dr_low_get_control): New.
9839 (i386_dr_low_get_status): Adjust prototype. Return
9841 (i386_initial_stuff): Clear dr_status_mirror and
9843 (i386_get_thread_context): Adjust.
9844 (i386_set_thread_context): Adjust.
9845 (i386_thread_added): Adjust.
9847 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9849 * linux-low.h (linux_thread_area): Delete declaration.
9851 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9853 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9854 after its termination.
9856 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9858 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9859 (gdb_wants_all_stopped): Delete.
9860 (linux_wait_1): Don't call them.
9861 * server.c (handle_v_cont): Tag all threads as want-stopped.
9862 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9863 stopped as "client-wants-stopped".
9865 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9867 * Makefile.in (signals_h): New.
9868 (server_h): Depend on it.
9869 (server.o): Don't depend on $(signals_def).
9870 (signals.o): Depend on $(signals_def).
9872 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9874 * Makefile.in (signals_def): New.
9875 (server_h): Append include/gdb/signals.h and signals_def.
9876 (server.o): Append signals_def.
9878 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9880 * server.c (handle_target_event): Use target_signal_to_host for
9881 resume_info.sig initialization.
9882 * target.h (struct thread_resume) <sig>: New comment.
9884 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9886 * server.c (handle_query): strcpy() the returned string from paddress()
9887 instead of sprintf().
9888 * utils.c (paddress): Return phex_nz().
9890 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9892 * server.c (handle_v_cont): Call mourn_inferior if process
9894 (myresume): Likewise.
9896 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9898 Static tracepoints, and integration with UST.
9900 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9901 * mem-break.c (uninsert_all_breakpoints)
9902 (reinsert_all_breakpoints): New.
9903 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9904 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9905 (gdb_agent_ust_loaded, helper_thread_id)
9906 (gdb_agent_helper_thread_id): New macros.
9907 (struct ipa_sym_addresses): Add addr_ust_loaded,
9908 addr_helper_thread_id, addr_cmd_buf.
9909 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9910 (in_process_agent_loaded_ust): New.
9911 (write_e_ust_not_loaded): New.
9912 (maybe_write_ipa_ust_not_loaded): New.
9913 (struct collect_static_trace_data_action): New.
9914 (enum tracepoint_type) <static_tracepoint>: New.
9915 (struct tracepoint) <handle>: Mention static tracepoints.
9916 (struct static_tracepoint_ctx): New.
9917 (CMD_BUF_SIZE): New.
9918 (add_tracepoint_action): Handle static tracepoint actions.
9919 (unprobe_marker_at): New.
9920 (clear_installed_tracepoints): Handle static tracepoints.
9921 (cmd_qtdp): Handle static tracepoints.
9922 (probe_marker_at): New.
9923 (cmd_qtstart): Handle static tracepoints.
9924 (response_tracepoint): Handle static tracepoints.
9925 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9926 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9927 (get_context_regcache): Handle static tracepoints.
9928 (do_action_at_tracepoint): Handle static tracepoint actions.
9929 (traceframe_find_block_type): Handle static trace data blocks.
9930 (traceframe_read_sdata): New.
9931 (download_tracepoints): Download static tracepoint actions.
9932 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9933 (GDB_PROBE_NAME): New.
9938 (ust_marker_to_static_tracepoint): New.
9940 (collect_ust_data_at_tracepoint): New.
9941 (gdb_ust_probe): New.
9942 (UNIX_PATH_MAX, SOCK_DIR): New.
9943 (gdb_ust_connect_sync_socket): New.
9944 (resume_thread, stop_thread): New.
9945 (run_inferior_command): New.
9946 (init_named_socket): New.
9947 (gdb_ust_socket_init): New.
9948 (cstr_to_hexstr): New.
9950 (first_marker, next_marker): New.
9951 (response_ust_marker): New.
9952 (cmd_qtfstm, cmd_qtsstm): New.
9953 (unprobe_marker_at, probe_marker_at): New.
9954 (cmd_qtstmat, gdb_ust_thread): New.
9955 (gdb_ust_init): New.
9956 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9957 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9959 (x86_64_st_collect_regmap): New.
9960 (X86_64_NUM_ST_COLLECT_GREGS): New.
9961 (AMD64_RIP_REGNUM): New.
9962 (supply_static_tracepoint_registers): New.
9963 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9965 (i386_st_collect_regmap): New.
9966 (i386_NUM_ST_COLLECT_GREGS): New.
9967 (supply_static_tracepoint_registers): New.
9968 * server.c (handle_query): Handle qXfer:statictrace:read.
9969 <qSupported>: Report support for StaticTracepoints, and
9970 qXfer:statictrace:read features.
9971 * server.h (traceframe_read_sdata)
9972 (supply_static_tracepoint_registers): Declare.
9973 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9974 (unpack_varlen_hex): Include in IPA build.
9975 * Makefile.in (ustlibs, ustinc): New.
9976 (IPA_OBJS): Add remote-utils-ipa.o.
9977 ($(IPA_LIB)): Link -ldl and -lpthread.
9979 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9980 * config.in, configure: Regenerate.
9982 2010-06-20 Ian Lance Taylor <iant@google.com>
9983 Pedro Alves <pedro@codesourcery.com>
9985 * linux-x86-low.c (always_true): Delete.
9986 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9987 trying to fool the compiler with always_true.
9989 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9991 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9992 conditions in gdbserver.
9994 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9996 * spu-low.c (spu_read_memory): Wrap around local store limit.
9997 (spu_write_memory): Likewise.
9999 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10001 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10002 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10004 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10006 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10007 uses with LONGEST uses.
10009 2010-06-14 Stan Shebs <stan@codesourcery.com>
10010 Pedro Alves <pedro@codesourcery.com>
10014 * linux-x86-low.c: Include limits.h.
10016 (always_true): New.
10019 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10020 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10021 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10022 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10023 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10024 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10025 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10026 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10027 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10028 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10029 (amd64_emit_void_call_2): New.
10030 (amd64_emit_ops): New.
10031 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10032 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10033 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10034 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10035 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10036 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10037 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10038 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10039 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10040 (i386_emit_stack_adjust, i386_emit_int_call_1)
10041 (i386_emit_void_call_2): New.
10042 (i386_emit_ops): New.
10043 (x86_emit_ops): New.
10044 (the_low_target): Install x86_emit_ops.
10045 * server.h (struct emit_ops): New.
10046 (get_raw_reg_func_addr): Declare.
10047 (current_insn_ptr, emit_error): Declare.
10048 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10049 (set_trace_state_variable_value): New defines.
10050 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10051 addr_get_trace_state_variable_value and
10052 addr_set_trace_state_variable_value.
10053 (symbol_list): New fields for get_raw_reg,
10054 get_trace_state_variable_value and set_trace_state_variable_value.
10055 (condfn): New typedef.
10056 (struct tracepoint): New field `compiled_cond'.
10057 (do_action_at_tracepoint): Clear compiled_cond.
10058 (get_trace_state_variable_value, set_trace_state_variable_value):
10060 (condition_true_at_tracepoint): If there's a compiled condition,
10062 (current_insn_ptr, emit_error): New globals.
10063 (struct bytecode_address): New.
10064 (get_raw_reg_func_addr): New.
10065 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10066 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10067 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10068 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10069 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10070 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10071 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10072 (compile_tracepoint_condition, compile_bytecodes): New.
10073 * target.h (emit_ops): Forward declare.
10074 (struct target_ops): New field emit_ops.
10075 (target_emit_ops): New.
10076 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10077 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10078 * linux-low.c (linux_emit_ops): New.
10079 (linux_target_ops): Install it.
10080 * linux-low.h (struct linux_target_ops): New field emit_ops.
10082 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10084 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10085 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10087 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10088 Stan Shebs <stan@codesourcery.com>
10090 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10091 (all): Depend on $(extra_libraries).
10092 (install-only): Install the IPA.
10093 (IPA_OBJS, IPA_LIB): New.
10094 (clean): Remove the IPA lib.
10095 (IPAGENT_CFLAGS): New.
10096 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10097 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10098 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10099 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10100 * configure.ac: Check for atomic builtins support in the compiler.
10101 (IPA_DEPFILES, extra_libraries): Define.
10102 * configure.srv (ipa_obj): Add description.
10103 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10104 (i[34567]86-*-linux*): Set ipa_obj.
10105 (x86_64-*-linux*): Set ipa_obj.
10106 * linux-low.c (stabilizing_threads): New.
10107 (supports_fast_tracepoints): New.
10108 (linux_detach): Stabilize threads before detaching.
10109 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10110 the lwp is either not stabilizing, or is moving out of a jump pad.
10111 (linux_fast_tracepoint_collecting): New.
10112 (maybe_move_out_of_jump_pad): New.
10113 (enqueue_one_deferred_signal): New.
10114 (dequeue_one_deferred_signal): New.
10115 (linux_wait_for_event_1): If moving out of a jump pad, defer
10116 pending signals to later.
10117 (linux_stabilize_threads): New.
10118 (linux_wait_1): Check if threads need moving out of jump pads, and
10120 (stuck_in_jump_pad_callback): New.
10121 (move_out_of_jump_pad_callback): New.
10122 (lwp_running): New.
10123 (linux_resume_one_lwp): Handle moving out of jump pads.
10124 (linux_set_resume_request): Dequeue deferred signals.
10125 (need_step_over_p): Also step over fast tracepoint jumps.
10126 (start_step_over): Also uninsert fast tracepoint jumps.
10127 (finish_step_over): Also reinsert fast tracepoint jumps.
10128 (linux_install_fast_tracepoint_jump): New.
10129 (linux_target_ops): Install linux_stabilize_threads and
10130 linux_install_fast_tracepoint_jump_pad.
10131 * linux-low.h (linux_target_ops) <get_thread_area,
10132 install_fast_tracepoint_jump_pad>: New fields.
10133 (struct lwp_info) <collecting_fast_tracepoint,
10134 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10135 (linux_get_thread_area): Declare.
10136 * linux-x86-low.c (jump_insn): New.
10137 (x86_get_thread_area): New.
10138 (append_insns): New.
10139 (push_opcode): New.
10140 (amd64_install_fast_tracepoint_jump_pad): New.
10141 (i386_install_fast_tracepoint_jump_pad): New.
10142 (x86_install_fast_tracepoint_jump_pad): New.
10143 (the_low_target): Install x86_get_thread_area and
10144 x86_install_fast_tracepoint_jump_pad.
10145 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10146 (struct fast_tracepoint_jump): New.
10147 (fast_tracepoint_jump_insn): New.
10148 (fast_tracepoint_jump_shadow): New.
10149 (find_fast_tracepoint_jump_at): New.
10150 (fast_tracepoint_jump_here): New.
10151 (delete_fast_tracepoint_jump): New.
10152 (set_fast_tracepoint_jump): New.
10153 (uninsert_fast_tracepoint_jumps_at): New.
10154 (reinsert_fast_tracepoint_jumps_at): New.
10155 (set_breakpoint_at): Use write_inferior_memory.
10156 (uninsert_raw_breakpoint): Use write_inferior_memory.
10157 (check_mem_read): Mask out fast tracepoint jumps.
10158 (check_mem_write): Mask out fast tracepoint jumps.
10159 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10160 (set_fast_tracepoint_jump): Declare.
10161 (delete_fast_tracepoint_jump)
10162 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10163 (reinsert_fast_tracepoint_jumps_at): Declare.
10164 * regcache.c: Don't compile many functions when building the
10165 in-process agent library.
10166 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10167 the register buffer in the heap.
10168 (free_register_cache): If the register buffer isn't owned by the
10169 regcache, don't free it.
10170 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10171 pre-existing register caches.
10172 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10174 (convert_ascii_to_int): : Constify `from' parameter type.
10175 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10176 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10177 the needed buffer in-place.
10178 (relocate_instruction): New.
10179 * server.c (handle_query) <qSymbols>: If the target supports
10180 tracepoints, give it a chance of looking up symbols. Report
10181 support for fast tracepoints.
10182 (handle_status): Stabilize threads.
10183 (process_serial_event): Adjust.
10184 * server.h (struct fast_tracepoint_jump): Forward declare.
10185 (struct process_info) <fast_tracepoint_jumps>: New field.
10186 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10187 (decode_X_packet, decode_M_packet): Adjust.
10188 (relocate_instruction): Declare.
10189 (in_process_agent_loaded): Declare.
10190 (tracepoint_look_up_symbols): Declare.
10191 (struct fast_tpoint_collect_status): Declare.
10192 (fast_tracepoint_collecting): Declare.
10193 (force_unlock_trace_buffer): Declare.
10194 (handle_tracepoint_bkpts): Declare.
10195 (initialize_low_tracepoint)
10196 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10197 * target.h (struct target_ops) <stabilize_threads,
10198 install_fast_tracepoint_jump_pad>: New fields.
10199 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10200 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10201 [HAVE_STDINT_H]: Include stdint.h.
10202 (trace_debug_1): Rename to ...
10203 (trace_vdebug): ... this.
10204 (trace_debug): Rename to ...
10205 (trace_debug_1): ... this. Add `level' parameter.
10206 (trace_debug): New.
10207 (ATTR_USED, ATTR_NOINLINE): New.
10208 (IP_AGENT_EXPORT): New.
10209 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10210 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10211 (about_to_request_buffer_space, trace_buffer_is_full)
10212 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10213 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10214 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10215 (traceframe_write_count, traceframes_created)
10216 (trace_state_variables)
10217 New renaming defines.
10218 (struct ipa_sym_addresses): New.
10219 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10220 (symbol_list): New.
10221 (ipa_sym_addrs): New.
10222 (all_tracepoint_symbols_looked_up): New.
10223 (in_process_agent_loaded): New.
10224 (write_e_ipa_not_loaded): New.
10225 (maybe_write_ipa_not_loaded): New.
10226 (tracepoint_look_up_symbols): New.
10227 (debug_threads) [IN_PROCESS_AGENT]: New.
10228 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10229 (UNKNOWN_SIDE_EFFECTS): New.
10230 (stop_tracing): New.
10231 (flush_trace_buffer): New.
10232 (stop_tracing_bkpt): New.
10233 (flush_trace_buffer_bkpt): New.
10234 (read_inferior_integer): New.
10235 (read_inferior_uinteger): New.
10236 (read_inferior_data_pointer): New.
10237 (write_inferior_data_pointer): New.
10238 (write_inferior_integer): New.
10239 (write_inferior_uinteger): New.
10240 (struct collect_static_trace_data_action): Delete.
10241 (enum tracepoint_type): New.
10242 (struct tracepoint) <type>: New field `type'.
10243 <actions_str, step_actions, step_actions_str>: Only include in
10245 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10246 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10247 (tracepoints): Use IP_AGENT_EXPORT.
10248 (last_tracepoint): Don't include in the IPA.
10249 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10250 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10251 (alloced_trace_state_variables): New.
10252 (trace_state_variables): Use IP_AGENT_EXPORT.
10253 (traceframe_t): Delete unused variable.
10254 (circular_trace_buffer): Don't include in the IPA.
10255 (trace_buffer_start): Delete.
10256 (struct trace_buffer_control): New.
10257 (trace_buffer_free): Delete.
10258 (struct ipa_trace_buffer_control): New.
10259 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10260 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10262 (trace_buffer_ctrl): New.
10263 (TRACE_BUFFER_CTRL_CURR): New.
10264 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10265 Reimplement as macros.
10266 (trace_buffer_wrap): Delete.
10267 (traceframe_write_count, traceframe_read_count)
10268 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10269 (struct tracepoint_hit_ctx) <type>: New field.
10270 (struct fast_tracepoint_ctx): New.
10271 (memory_barrier): New.
10273 (record_tracepoint_error): Update atomically in the IPA.
10274 (clear_inferior_trace_buffer): New.
10275 (about_to_request_buffer_space): New.
10276 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10277 updating the same buffer.
10278 (add_tracepoint): Default the tracepoint's type to trap
10279 tracepoint, and orig_size to -1.
10280 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10281 internal variables.
10282 (create_trace_state_variable): New parameter `gdb'. Handle it.
10283 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10284 (cmd_qtdp): Handle fast tracepoints.
10285 (cmd_qtdv): Adjust.
10286 (max_jump_pad_size): New.
10287 (gdb_jump_pad_head): New.
10288 (get_jump_space_head): New.
10289 (claim_jump_space): New.
10290 (sort_tracepoints): New.
10291 (MAX_JUMP_SIZE): New.
10292 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10294 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10295 support. Upload fast traceframes, and delete internal IPA
10297 (stop_tracing_handler): New.
10298 (flush_trace_buffer_handler): New.
10299 (cmd_qtstop): Upload fast tracepoints.
10300 (response_tracepoint): Handle fast tracepoints.
10301 (tracepoint_finished_step): Upload fast traceframes. Set the
10302 tracepoint hit context's tracepoint type.
10303 (handle_tracepoint_bkpts): New.
10304 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10305 type. Add comment about fast tracepoints.
10306 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10307 non-existing action_str field.
10308 (get_context_regcache): Handle fast tracepoints.
10309 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10311 (fast_tracepoint_from_jump_pad_address): New.
10312 (fast_tracepoint_from_ipa_tpoint_address): New.
10313 (collecting_t): New.
10314 (force_unlock_trace_buffer): New.
10315 (fast_tracepoint_collecting): New.
10317 (gdb_collect): New.
10318 (write_inferior_data_ptr): New.
10319 (target_tp_heap): New.
10320 (target_malloc): New.
10321 (download_agent_expr): New.
10323 (download_tracepoints): New.
10324 (download_trace_state_variables): New.
10325 (upload_fast_traceframes): New.
10326 (IPA_FIRST_TRACEFRAME): New.
10327 (IPA_NEXT_TRACEFRAME_1): New.
10328 (IPA_NEXT_TRACEFRAME): New.
10329 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10330 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10331 (gdb_jump_pad_buffer_end): New.
10332 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10333 (initialize_tracepoint): Adjust.
10334 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10335 buffer. Initialize the low module.
10336 * utils.c (PREFIX, TOOLNAME): New.
10337 (malloc_failure): Use PREFIX.
10338 (error): In the IPA, an error causes an exit.
10339 (fatal, warning): Use PREFIX.
10340 (internal_error): Use TOOLNAME.
10341 (NUMCELLS): Increase to 10.
10342 * configure, config.in: Regenerate.
10344 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10346 * server.c (handle_query) <qSupported>: Do two passes over the
10347 qSupported string to avoid nesting strtok.
10349 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10351 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10353 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10354 -Wl,--dynamic-list.
10355 * configure: Regenerate.
10356 * proc-service.list: New.
10358 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10360 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10363 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10365 * gdbreplay.c (remote_open): Check error return from socket() call by
10366 its equality to -1 not by it being negative.
10367 * remote-utils.c (remote_open): Likewise.
10369 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10371 * config.h: Regenerate.
10373 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10375 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10376 doesn't provide PTRACE_GET_THREAD_AREA.
10378 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10380 * linux-m68k-low.c: Include <asm/ptrace.h>
10381 (ps_get_thread_area): Implement.
10383 2010-05-03 Doug Evans <dje@google.com>
10385 * event-loop.c (struct callback_event): New struct.
10386 (callback_list): New global.
10387 (append_callback_event, delete_callback_event): New functions.
10388 (process_callback): New function.
10389 (start_event_loop): Call it.
10390 * remote-utils.c (NOT_SCHEDULED): Define.
10391 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10392 moved out of readchar.
10393 (readchar): Rewrite. Call reschedule before returning.
10394 (reset_readchar): New function.
10395 (remote_close): Call it.
10396 (process_remaining, reschedule): New functions.
10397 * server.h (callback_handler_func): New typedef.
10398 (append_callback_event, delete_callback_event): Declare.
10400 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10402 * proc-service.c (ps_pglobal_lookup): Use
10403 thread_db_look_up_one_symbol.
10404 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10405 parameter. Use it instead of all_symbols_looked_up.
10406 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10408 (all_symbols_looked_up): Don't declare.
10409 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10410 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10412 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10413 Set all_symbols_looked_up here.
10414 (thread_db_look_up_one_symbol): New.
10415 (thread_db_get_tls_address): Adjust.
10416 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10417 thread_db object on the heap, and tentatively set it in the
10419 (thread_db_init): Don't set all_symbols_looked_up here.
10420 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10422 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10424 * linux-low.c (linux_kill, linux_detach): Adjust.
10425 (status_pending_p_callback): Remove redundant statement. Check
10426 for !TARGET_WAITIKIND_IGNORE, instead of
10427 TARGET_WAITKIND_STOPPED.
10428 (handle_tracepoints): Make sure LWP is locked. Adjust.
10429 (linux_wait_for_event_1): Adjust.
10430 (linux_cancel_breakpoints): New.
10431 (unsuspend_one_lwp): New.
10432 (unsuspend_all_lwps): New.
10433 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10434 (send_sigstop_callback): Change return type to int, add new
10435 `except' parameter and handle it.
10436 (suspend_and_send_sigstop_callback): New.
10437 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10438 pass them down. If SUSPEND, also increment the lwp's suspend
10440 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10441 (need_step_over_p): Don't consider suspended LWPs.
10442 (start_step_over): Adjust.
10443 (proceed_one_lwp): Change return type to int, add new `except'
10444 parameter and handle it.
10445 (unsuspend_and_proceed_one_lwp): New.
10446 (proceed_all_lwps): Use find_inferior instead of
10448 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10449 also decrement the suspend count of LWPs. Pass `except' down,
10450 instead of hacking its suspend count.
10451 (linux_pause_all): Add `freeze' parameter. Adjust.
10452 (linux_unpause_all): New.
10453 (linux_target_ops): Install linux_unpause_all.
10454 * server.c (handle_status): Adjust.
10455 * target.h (struct target_ops): New fields `unpause_all' and
10456 `cancel_breakpoints'. Add new parameter to `pause_all'.
10457 (pause_all): Add new `freeze' parameter.
10458 (unpause_all): New.
10459 (cancel_breakpoints): New.
10460 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10461 cancel breakpoints.
10462 (cmd_qtstart): Pause threads.
10463 (stop_tracing): Pause threads, and cancel breakpoints.
10464 * win32-low.c (win32_target_ops): Adjust.
10466 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10468 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10469 the inferior right away from here...
10470 (linux_wait_1): ... to here, and adjust to check the thread's
10471 last_resume_kind instead of the lwp's step or stop_expected flags.
10473 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10475 * README: Use consistent `GDB' and `GDBserver' spellings.
10477 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10479 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10480 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10481 (linux_detach_one_lwp): Assume the lwp is stopped.
10482 (any_thread_of): Delete.
10483 (linux_detach): Stop all lwps here. Don't blindly delete all
10485 (delete_lwp_callback): New.
10486 (linux_mourn): Delete all lwps of the process that is gone.
10487 (linux_wait_1): Don't delete the last lwp of the process here.
10488 * mem-break.h (mark_breakpoints_out): Declare.
10489 * mem-break.c (mark_breakpoints_out): New.
10490 (free_all_breakpoints): Use it.
10491 * server.c (handle_target_event): If the process is gone, mark
10493 * thread-db.c (struct thread_db) <create_bp>: New field.
10494 (thread_db_enable_reporting): Fix prototype. Store a thread event
10495 breakpoint reference in the thread_db struct.
10496 (thread_db_load_search): Clear the thread_db object.
10497 (try_thread_db_load_1): Ditto.
10498 (switch_to_process): New.
10499 (disable_thread_event_reporting): Use it.
10500 (remove_thread_event_breakpoints): New.
10501 (thread_db_detach, thread_db_mourn): Use it.
10503 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10505 * linux-low.c (linux_enable_event_reporting): New.
10506 (linux_wait_for_event_1, handle_extended_wait): Use it.
10508 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10510 * linux-low.c (linux_kill_one_lwp, linux_kill)
10511 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10512 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10513 SIGSTOP even if the LWP is stopped.
10514 (send_sigstop_callback): New.
10515 (stop_all_lwps): Use send_sigstop_callback instead.
10516 (linux_resume_one_thread): Adjust.
10517 (proceed_one_lwp): Still proceed an LWP that the client has
10518 requested to stop, if we haven't reported it as stopped yet. Make
10519 sure that LWPs the client want stopped, have a pending SIGSTOP.
10521 2010-04-26 Doug Evans <dje@google.com>
10523 * server.c (handle_general_set): Make static.
10525 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10526 Print received char after testing for error/eof instead of before.
10527 (input_interrupt): Tweak comment.
10529 2010-04-23 Doug Evans <dje@google.com>
10531 * server.c (start_inferior): Print inferior argv if --debug.
10533 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10535 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10536 * nto-x86-low.c: Include server.h
10538 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10540 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10541 be consistent with other sources of this directory.
10542 (init_registers_amd64): Correct name of source file of this function
10545 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10547 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10548 64-bit executables.
10550 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10552 * win32-i386-low.c: Add 64-bit support.
10553 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10554 (init_registers_amd64): Declare.
10555 (mappings): Add 64-bit version of array.
10556 (init_windows_x86): New function.
10557 (the_low_target): Change init_arch field to init_windows_x86.
10559 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10561 * win32-low.c: Adapt to support also 64-bit architecture.
10562 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10563 (get_image_name): Use SIZE_T type for local variable `done'.
10564 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10565 (toolhelp_get_dll_name): Idem.
10566 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10567 Use uintptr_t typecast to avoid warning.
10568 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10569 (handle_exception): Use phex_nz to avoid warning.
10570 (win32_wait): Remove unused local variable `process'.
10572 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10574 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10577 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10579 * configure.ac: Use `ws2_32' library for srv_mingw.
10580 * configure: Regenerate.
10581 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10582 * remote-utils.c: Likewise.
10584 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10586 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10587 if __x86_64__ is defined.
10589 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10591 * configure: Regenerate.
10593 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10595 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10596 * target.h (target_ops): New get_tib_address field.
10597 * win32-low.h (win32_thread_info): Add thread_local_base field.
10598 * win32-low.c (child_add_thread): Add tlb argument.
10599 Set thread_local_base field to TLB.
10600 (get_child_debug_event): Adapt to child_add_thread change.
10601 (win32_get_tib_address): New function.
10602 (win32_target_ops): Set get_tib_address field to
10603 win32_get_tib_address.
10604 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10606 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10608 * linux-low.c (linux_mourn): Also remove the process.
10609 * server.c (handle_target_event): Don't remove the process here.
10610 * nto-low.c (nto_mourn): New.
10611 (nto_target_ops): Install it.
10612 * spu-low.c (spu_mourn): New.
10613 (spu_target_ops): Install it.
10614 * win32-low.c (win32_mourn): New.
10615 (win32_target_ops): Install it.
10617 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10619 * server.h (buffer_xml_printf): Remove redundant `;'.
10621 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10623 * regcache.c (set_register_cache): Invalidate regcaches before
10624 changing the register cache layout.
10625 (regcache_invalidate_one): Allow a NULL regcache.
10626 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10627 regcaches before changing the register cache layout or the target
10630 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10632 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10633 variable warning on Linux/x86-64.
10635 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10637 GDBserver disconnected tracing support.
10639 * linux-low.c (linux_remove_process): Delete.
10640 (add_lwp): Don't set last_resume_kind here.
10641 (linux_kill): Use `mourn'.
10642 (linux_detach): Use `thread_db_detach', and `mourn'.
10643 (linux_mourn): New.
10644 (linux_attach_lwp_1): Adjust comment.
10645 (linux_attach): last_resume_kind moved the thread_info; adjust.
10646 (status_pending_p_callback): Adjust.
10647 (linux_wait_for_event_1): Adjust.
10648 (count_events_callback, select_singlestep_lwp_callback)
10649 (select_event_lwp_callback, cancel_breakpoints_callback)
10650 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10651 (proceed_one_lwp): Adjust.
10652 (linux_async): Add debug output.
10653 (linux_thread_stopped): New.
10654 (linux_pause_all): New.
10655 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10657 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10658 (thread_db_free): Delete declaration.
10659 (thread_db_detach, thread_db_mourn): Declare.
10660 * thread-db.c (thread_db_init): Use thread_db_mourn.
10661 (thread_db_free): Delete, split in two.
10662 (disable_thread_event_reporting): New.
10663 (thread_db_detach): New.
10664 (thread_db_mourn): New.
10666 * server.h (struct thread_info) <last_resume_kind>: New field.
10667 <attached>: Add comment.
10668 <gdb_detached>: New field.
10669 (handler_func): Change return type to int.
10670 (handle_serial_event, handle_target_event): Ditto.
10671 (gdb_connected): Declare.
10673 (disconnected_tracing): Declare.
10674 (stop_tracing): Declare.
10676 * server.c (handle_query) <qSupported>: Report support for
10677 disconnected tracing.
10678 (queue_stop_reply_callback): Account for running threads.
10679 (gdb_wants_thread_stopped): New.
10680 (gdb_wants_all_threads_stopped): New.
10681 (gdb_reattached_process): New.
10682 (handle_status): Clear the `gdb_detached' flag of all processes.
10683 In all-stop, stop all threads.
10684 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10685 (process_serial_event): If the remote connection breaks, or if an
10686 exit was forced with "monitor exit", force an event loop exit.
10687 Handle disconnected tracing on detach.
10688 (handle_serial_event): Adjust.
10689 (handle_target_event): If GDB isn't connected, forward events back
10690 to the inferior, unless the last process exited, in which case,
10691 exit gdbserver. Adjust interface.
10693 * remote-utils.c (remote_open): Don't block in accept. Instead
10694 register an event loop source on the listen socket file
10695 descriptor. Refactor bits into ...
10696 (listen_desc): ... this new global.
10697 (gdb_connected): ... this new function.
10698 (enable_async_notification): ... this new function.
10699 (handle_accept_event): ... this new function.
10700 (remote_close): Clear remote_desc.
10702 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10704 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10706 (mourn_inferior): Define.
10707 (target_process_qsupported): Avoid the dangling else problem.
10708 (thread_stopped): Define.
10709 (pause_all): Define.
10710 (target_waitstatus_to_string): Declare.
10711 * target.c (target_waitstatus_to_string): New.
10713 * tracepoint.c (tracing): Make extern.
10714 (disconnected_tracing): New.
10715 (stop_tracing): Make extern. Handle tracing stops due to GDB
10717 (cmd_qtdisconnected): New.
10718 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10719 (handle_tracepoint_general_set): Handle QTDisconnected.
10721 * event-loop.c (event_handler_func): Change return type to int.
10722 (process_event): Bail out if the event handler wants the event
10724 (handle_file_event): Ditto.
10725 (start_event_loop): Bail out if the event handler wants the event
10728 * nto-low.c (nto_target_ops): Adjust.
10729 * spu-low.c (spu_wait): Don't remove the process here.
10730 (spu_target_ops): Adjust.
10731 * win32-low.c (win32_wait): Don't remove the process here.
10732 (win32_target_ops): Adjust.
10734 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10736 * regcache.c (realloc_register_cache): Invalidate inferior's
10737 regcache before recreating it.
10739 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10741 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10743 2010-04-09 Stan Shebs <stan@codesourcery.com>
10744 Pedro Alves <pedro@codesourcery.com>
10746 * server.h (LONGEST): New.
10747 (struct thread_info) <while_stepping>: New field.
10748 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10750 (initialize_tracepoint, handle_tracepoint_general_set)
10751 (handle_tracepoint_query, tracepoint_finished_step)
10752 (tracepoint_was_hit, release_while_stepping_state_list):
10753 (current_traceframe): Declare.
10754 * server.c (handle_general_set): Handle tracepoint packets.
10755 (read_memory): New.
10756 (write_memory): New.
10757 (handle_search_memory_1): Use read_memory.
10758 (handle_query): Report support for conditional tracepoints, trace
10759 state variables, and tracepoint sources. Handle tracepoint
10761 (main): Initialize the tracepoints module.
10762 (process_serial_event): Handle traceframe reads/writes.
10764 * linux-low.c (handle_tracepoints): New.
10765 (linux_wait_1): Call it.
10766 (linux_resume_one_lwp): Handle while-stepping.
10767 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10768 (linux_target_ops): Install them.
10769 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10771 * linux-x86-low.c (x86_supports_tracepoints): New.
10772 (the_low_target). Install it.
10774 * mem-break.h (delete_breakpoint): Declare.
10775 * mem-break.c (delete_breakpoint): Make external.
10777 * target.h (struct target_ops): Add `supports_tracepoints',
10778 `read_pc', and `write_pc' fields.
10779 (target_supports_tracepoints): Define.
10780 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10783 * regcache.h (struct regcache) <registers_owned>: New field.
10784 (init_register_cache, regcache_cpy): Declare.
10785 (regcache_read_pc, regcache_write_pc): Declare.
10786 (register_cache_size): Declare.
10787 (supply_regblock): Declare.
10788 * regcache.c (init_register_cache): New.
10789 (new_register_cache): Use it.
10790 (regcache_cpy): New.
10791 (register_cache_size): New.
10792 (supply_regblock): New.
10793 (regcache_read_pc, regcache_write_pc): New.
10795 * tracepoint.c: New.
10797 * Makefile.in (OBS): Add tracepoint.o.
10798 (tracepoint.o): New rule.
10800 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10802 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10804 (i386-mmx.c): Likewise.
10805 (i386-mmx-linux.o): Likewise.
10806 (i386-mmx-linux.c): Likewise.
10808 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10809 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10810 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10811 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10813 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10814 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10815 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10817 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10819 * Makefile.in (clean): Updated.
10821 (i386-avx.c): Likewise.
10822 (i386-avx-linux.o): Likewise.
10823 (i386-avx-linux.c): Likewise.
10824 (amd64-avx.o): Likewise.
10825 (amd64-avx.c): Likewise.
10826 (amd64-avx-linux.o): Likewise.
10827 (amd64-avx-linux.c): Likewise.
10829 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10830 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10831 (srv_amd64_regobj): Add amd64-avx.o.
10832 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10833 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10834 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10835 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10836 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10837 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10838 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10840 * i387-fp.c: Include "i386-xstate.h".
10842 (i387_cache_to_xsave): Likewise.
10843 (i387_xsave_to_cache): Likewise.
10844 (x86_xcr0): Likewise.
10846 * i387-fp.h (i387_cache_to_xsave): Likewise.
10847 (i387_xsave_to_cache): Likewise.
10848 (x86_xcr0): Likewise.
10850 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10851 * linux-crisv32-low.c (target_regsets): Likewise.
10852 * linux-m68k-low.c (target_regsets): Likewise.
10853 * linux-mips-low.c (target_regsets): Likewise.
10854 * linux-ppc-low.c (target_regsets): Likewise.
10855 * linux-s390-low.c (target_regsets): Likewise.
10856 * linux-sh-low.c (target_regsets): Likewise.
10857 * linux-sparc-low.c (target_regsets): Likewise.
10858 * linux-xtensa-low.c (target_regsets): Likewise.
10860 * linux-low.c: Include <sys/uio.h>.
10861 (regsets_fetch_inferior_registers): Support nt_type.
10862 (regsets_store_inferior_registers): Likewise.
10863 (linux_process_qsupported): New.
10864 (linux_target_ops): Add linux_process_qsupported.
10866 * linux-low.h (regset_info): Add nt_type.
10867 (linux_target_ops): Add process_qsupported.
10869 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10871 (init_registers_i386_avx_linux): New.
10872 (init_registers_amd64_avx_linux): Likewise.
10873 (xmltarget_i386_linux_no_xml): Likewise.
10874 (xmltarget_amd64_linux_no_xml): Likewise.
10875 (PTRACE_GETREGSET): Likewise.
10876 (PTRACE_SETREGSET): Likewise.
10877 (x86_fill_xstateregset): Likewise.
10878 (x86_store_xstateregset): Likewise.
10879 (use_xml): Likewise.
10880 (x86_linux_update_xmltarget): Likewise.
10881 (x86_linux_process_qsupported): Likewise.
10882 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10883 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10884 init_registers_i386_linux here. Call
10885 x86_linux_update_xmltarget.
10886 (the_low_target): Add x86_linux_process_qsupported.
10888 * server.c (handle_query): Call target_process_qsupported.
10890 * target.h (target_ops): Add process_qsupported.
10891 (target_process_qsupported): New.
10893 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10895 * inferiors.c (add_thread): Set last_status kind to
10896 TARGET_WAITKIND_IGNORE.
10897 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10898 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10899 (linux_wait_1): Move `thread' local definition to block that uses
10900 it. Don't NULL initialize `event_child'.
10901 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10902 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10903 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10905 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10907 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10908 an extended waitstatus, or by a watchpoint.
10909 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10910 thread was stepping or has been stopped by a watchpoint.
10912 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10914 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10915 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10916 of another, then delete the previous, and validate all
10918 (validate_inserted_breakpoint): New.
10919 (delete_disabled_breakpoints): New.
10920 (validate_breakpoints): New.
10921 (check_mem_read): Validate breakpoints before trusting their
10922 shadow. Delete disabled breakpoints.
10923 (check_mem_write): Validate breakpoints before trusting they
10924 should be inserted. Delete disabled breakpoints.
10925 * mem-break.h (validate_breakpoints):
10926 * server.c (handle_query): Validate breakpoints when we see a
10929 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10931 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10932 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10933 if we could tell there's a GDB breakpoint at stop_pc.
10934 (need_step_over_p): Don't do a step over if we find a GDB
10935 breakpoint at the resume PC.
10937 * mem-break.c (struct raw_breakpoint): New.
10938 (enum bkpt_type): New type `gdb_breakpoint'.
10939 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10940 fields. New field `raw'.
10941 (find_raw_breakpoint_at): New.
10942 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10943 breakpoint instead.
10944 (set_breakpoint_at): Adjust.
10945 (delete_raw_breakpoint): New.
10946 (release_breakpoint): New.
10947 (delete_breakpoint): Rename to...
10948 (delete_breakpoint_1): ... this. Add proc parameter. Use
10949 release_breakpoint. Return ENOENT.
10950 (delete_breakpoint): Reimplement.
10951 (find_breakpoint_at): Delete.
10952 (find_gdb_breakpoint_at): New.
10953 (delete_breakpoint_at): Delete.
10954 (set_gdb_breakpoint_at): New.
10955 (delete_gdb_breakpoint_at): New.
10956 (gdb_breakpoint_here): New.
10957 (set_reinsert_breakpoint): Use release_breakpoint.
10958 (uninsert_breakpoint): Rename to ...
10959 (uninsert_raw_breakpoint): ... this.
10960 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10961 (reinsert_raw_breakpoint): Change parameter type to
10963 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10965 (check_breakpoints): Adjust. Use release_breakpoint.
10966 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10967 (breakpoint_inserted_here): Ditto.
10968 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10969 Don't trust the breakpoint's shadow if it is not inserted.
10970 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10971 (delete_all_breakpoints): Adjust.
10972 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10973 use delete_breakpoint_1.
10975 * mem-break.h (breakpoints_supported): Delete declaration.
10976 (set_gdb_breakpoint_at): Declare.
10977 (gdb_breakpoint_here): Declare.
10978 (delete_breakpoint_at): Delete.
10979 (delete_gdb_breakpoint_at): Declare.
10981 * server.h (struct raw_breakpoint): Forward declare.
10982 (struct process_info): New field `raw_breakpoints'.
10984 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10987 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10989 * linux-low.c (status_pending_p_callback): Fix comment.
10990 (linux_wait_for_event_1): Move most of the internal breakpoint
10991 handling from here...
10992 (linux_wait_1): ... to here.
10993 (count_events_callback): New.
10994 (select_singlestep_lwp_callback): New.
10995 (select_event_lwp_callback): New.
10996 (cancel_breakpoints_callback): New.
10997 (select_event_lwp): New.
10998 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10999 priority to all LWPs that have had events that should be reported
11000 to the client. Cancel breakpoints when about to reporting the
11001 event to the client, not while stopping lwps. No longer cancel
11002 finished single-steps here.
11003 (cancel_finished_single_step): Delete.
11004 (cancel_finished_single_steps): Delete.
11006 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11008 * mem-break.c (enum bkpt_type): New.
11009 (struct breakpoint): New field `type'.
11010 (set_breakpoint_at): Change return type to struct breakpoint
11011 pointer. Set type to `other_breakpoint' by default.
11012 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11013 in the breakpoint list.
11014 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11015 (reinsert_breakpoint): Rename to ...
11016 (reinsert_raw_breakpoint): ... this.
11017 (reinsert_breakpoints_at): Adjust.
11018 * mem-break.h (struct breakpoint): Declare.
11019 (set_breakpoint_at): Change return type to struct breakpoint
11022 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11024 * server.c (handle_query): Assign, not compare.
11026 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11028 Teach linux gdbserver to step-over-breakpoints.
11030 * linux-low.c (can_hardware_single_step): New.
11031 (supports_breakpoints): New.
11032 (handle_extended_wait): If stopping threads, read the stop pc of
11033 the new cloned LWP.
11035 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11036 low target doesn't support retrieving the PC.
11037 (add_lwp): Set last_resume_kind to resume_continue.
11038 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11039 (linux_attach): Don't clear stop_expected. Set the lwp's
11040 last_resume_kind to resume_stop.
11041 (linux_detach_one_lwp): Don't check for removed breakpoints.
11042 (check_removed_breakpoint): Delete.
11043 (status_pending_p): Rename to ...
11044 (status_pending_p_callback): ... this. Don't check for removed
11045 breakpoints. Don't consider threads that are stopped from GDB's
11047 (linux_wait_for_lwp): Always read the stop_pc here.
11048 (cancel_breakpoint): New.
11049 (step_over_bkpt): New global.
11050 (linux_wait_for_event_1): Implement stepping over breakpoints.
11051 (gdb_wants_lwp_stopped): New.
11052 (gdb_wants_all_stopped): New.
11053 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11054 single-step traps here. Store the thread's last reported target
11056 (send_sigstop): Don't clear stop_expected. Always set it,
11058 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11059 (cancel_finished_single_step): New.
11060 (cancel_finished_single_steps): New.
11061 (wait_for_sigstop): Don't cancel finished single-step traps here.
11062 (linux_resume_one_lwp): Don't check for removed breakpoints.
11063 Don't set `step' on non-hardware step archs.
11064 (linux_set_resume_request): Ignore resume_stop requests if already
11065 stopping or stopped. Set the lwp's last_resume_kind.
11066 (resume_status_pending_p): Don't check for removed breakpoints.
11067 (need_step_over_p): New.
11068 (start_step_over): New.
11069 (finish_step_over): New.
11070 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11071 requests. Clear the thread's last reported target waitstatus.
11072 Don't use the `suspended' flag. Don't consider pending breakpoints.
11073 (linux_resume): Start a step-over if necessary.
11074 (proceed_one_lwp): New.
11075 (proceed_all_lwps): New.
11076 (unstop_all_lwps): New.
11077 * linux-low.h (struct lwp_info): Rewrite comment for the
11078 `suspended' flag. Add the `stop_pc' field. Delete the
11079 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11080 Add `'last_resume_kind' and `need_step_over' fields.
11081 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11082 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11083 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11084 (set_raw_breakpoint_at): New.
11085 (set_breakpoint_at): Rewrite to use it.
11086 (reinsert_breakpoint_handler): Delete.
11087 (set_reinsert_breakpoint): New.
11088 (reinsert_breakpoint_by_bp): Delete.
11089 (delete_reinsert_breakpoints): New.
11090 (uninsert_breakpoint): Rewrite.
11091 (uninsert_breakpoints_at): New.
11092 (reinsert_breakpoint): Rewrite.
11093 (reinsert_breakpoints_at): New.
11094 (check_breakpoints): Rewrite.
11095 (breakpoint_here): New.
11096 (breakpoint_inserted_here): New.
11097 (check_mem_read): Adjust.
11098 * mem-break.h (breakpoints_supported, breakpoint_here)
11099 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11100 (reinsert_breakpoint_by_bp): Delete declaration.
11101 (delete_reinsert_breakpoints): Declare.
11102 (reinsert_breakpoint): Delete declaration.
11103 (reinsert_breakpoints_at): Declare.
11104 (uninsert_breakpoint): Delete declaration.
11105 (uninsert_breakpoints_at): Declare.
11106 (check_breakpoints): Adjust prototype.
11107 * server.h: Adjust include order.
11108 (struct thread_info): Declare here. Add a `last_status' field.
11110 2010-03-23 Michael Snyder <msnyder@vmware.com>
11112 * server.c (crc32): New function.
11113 (handle_query): Add handling for 'qCRC:' request.
11115 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11117 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11118 lwp had been stopped by a watchpoint.
11120 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11122 * server.h (internal_error): Declare.
11123 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11124 * utils.c (internal_error): New function.
11126 2010-03-15 Andreas Schwab <schwab@redhat.com>
11128 * configure.srv: Fix typo setting srv_regobj.
11130 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11132 * linux-low.c (fetch_register): Avoid passing a non string literal
11134 (usr_store_inferior_registers): Ditto.
11136 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11138 * linux-low.c (linux_write_memory): Bail out early if peeking
11141 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11143 * linux-low.h (struct lwp_info): New fields
11144 `stopped_by_watchpoint' and `stopped_data_address'.
11145 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11146 here, and cache them in the lwp object.
11147 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11149 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11151 (linux_stopped_by_watchpoint): Rewrite.
11152 (linux_stopped_data_address): Rewrite.
11154 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11156 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11157 switching the current inferior, not before.
11159 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11161 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11162 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11163 i386-linux.c and amd64-linux.c.
11164 (reg-i386.o): Removed.
11165 (reg-i386.c): Likewise.
11166 (reg-i386-linux.o): Likewise.
11167 (reg-i386-linux.c): Likewise.
11168 (reg-x86-64.o): Likewise.
11169 (reg-x86-64.c): Likewise.
11170 (reg-x86-64-linux.o): Likewise.
11171 (reg-x86-64-linux.c): Likewise.
11173 (i386.c): Likewise.
11174 (i386-linux.o): Likewise.
11175 (i386-linux.c): Likewise.
11176 (amd64.o): Likewise.
11177 (amd64.c): Likewise.
11178 (amd64-linux.o): Likewise.
11179 (amd64-linux.c): Likewise.
11181 * configure.srv (srv_i386_regobj): New.
11182 (srv_i386_linux_regobj): Likewise.
11183 (srv_amd64_regobj): Likewise.
11184 (srv_amd64_linux_regobj): Likewise.
11185 (srv_i386_32bit_xmlfiles): Likewise.
11186 (srv_i386_64bit_xmlfiles): Likewise.
11187 (srv_i386_xmlfiles): Likewise.
11188 (srv_amd64_xmlfiles): Likewise.
11189 (srv_i386_linux_xmlfiles): Likewise.
11190 (srv_amd64_linux_xmlfiles): Likewise.
11191 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11192 srv_xmlfiles to $srv_i386_xmlfiles.
11193 (i[34567]86-*-mingw32ce*): Likewise.
11194 (i[34567]86-*-mingw*): Likewise.
11195 (i[34567]86-*-nto*): Likewise.
11196 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11197 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11198 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11199 (x86_64-*-linux*): Likewise.
11201 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11202 (init_registers_amd64_linux): New.
11203 (x86_arch_setup): Replace init_registers_x86_64_linux with
11204 init_registers_amd64_linux.
11206 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11208 * configure.ac: Check for libdl. If it is not available link against
11209 static libthread_db.
11210 * configure: Regenerate.
11212 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11216 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11217 handing a read watchpoint.
11218 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11220 2010-02-12 Doug Evans <dje@google.com>
11222 * linux-low.c (linux_supports_tracefork_flag): Document.
11223 (linux_look_up_symbols): Add comment.
11225 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11227 * regcache.c (supply_register): Clear regcache if buf is NULL.
11229 2010-02-02 Nicolas Roche <roche@sourceware.org>
11230 Joel Brobecker <brobecker@adacore.com>
11232 * inferiors.c (find_inferior): Add function documentation.
11233 (unloaded_dll): Handle the case where the unloaded dll has not
11234 been previously registered in the dll list.
11236 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11238 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11239 (thumb2_breakpoint): New.
11240 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11242 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11244 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11245 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11248 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11250 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11252 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11254 * linux-s390-low.c (s390_collect_ptrace_register)
11255 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11257 2010-01-21 Doug Evans <dje@google.com>
11259 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11260 (PTRACE_ARG4_TYPE): New macro.
11261 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11262 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11263 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11264 (usr_store_inferior_registers): Ditto.
11265 (linux_read_memory, linux_write_memory): Ditto.
11266 (linux_test_for_tracefork): Ditto.
11268 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11269 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11271 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11273 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11276 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11278 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11279 prototype to take a regcache. Adjust.
11281 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11283 * regcache.h (struct thread_info): Forward declare.
11284 (struct regcache): New.
11285 (new_register_cache): Adjust prototype.
11286 (get_thread_regcache): Declare.
11287 (free_register_cache): Adjust prototype.
11288 (registers_to_string, registers_from_string): Ditto.
11289 (supply_register, supply_register_by_name, collect_register)
11290 (collect_register_as_string, collect_register_by_name): Ditto.
11291 * regcache.c (struct inferior_regcache_data): Delete.
11292 (get_regcache): Rename to ...
11293 (get_thread_regcache): ... this. Adjust. Switch inferior before
11294 fetching registers.
11295 (regcache_invalidate_one): Adjust.
11296 (regcache_invalidate): Fix prototype.
11297 (new_register_cache): Return the new register cache.
11298 (free_register_cache): Change prototype.
11299 (realloc_register_cache): Adjust.
11300 (registers_to_string): Change prototype to take a regcache. Adjust.
11301 (registers_from_string): Ditto.
11302 (register_data): Ditto.
11303 (supply_register): Ditto.
11304 (supply_register_by_name): Ditto.
11305 (collect_register): Ditto.
11306 (collect_register_as_string): Ditto.
11307 (collect_register_by_name): Ditto.
11308 * server.c (process_serial_event): Adjust.
11309 * linux-low.h (regset_fill_func, regset_store_func): Change
11311 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11313 * linux-low.c (get_stop_pc): Adjust.
11314 (check_removed_breakpoint): Adjust.
11315 (linux_wait_for_event): Adjust.
11316 (linux_resume_one_lwp): Adjust.
11317 (fetch_register): Add regcache parameter. Adjust.
11318 (usr_store_inferior_registers): Ditto.
11319 (regsets_fetch_inferior_registers): Ditto.
11320 (regsets_store_inferior_registers): Ditto.
11321 (linux_fetch_registers, linux_store_registers): Ditto.
11322 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11324 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11326 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11327 prototype to take a regcache.
11328 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11329 * remote-utils.c (convert_ascii_to_int, outreg)
11330 (prepare_resume_reply): Change prototype to take a regcache.
11332 * target.h (struct target_ops) <fetch_registers, store_registers>:
11333 Change prototype to take a regcache.
11334 (fetch_inferior_registers, store_inferior_registers): Change
11335 prototype to take a regcache. Adjust.
11336 * proc-service.c (ps_lgetregs): Adjust.
11337 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11338 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11339 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11340 take a regcache. Adjust.
11341 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11342 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11343 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11344 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11345 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11346 (cris_cannot_fetch_register):
11347 (cris_breakpoint_at): Change prototype to take a regcache.
11349 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11350 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11351 to take a regcache. Adjust.
11352 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11354 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11355 take a regcache. Adjust.
11356 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11357 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11358 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11359 * linux-mips-low.c (mips_get_pc):
11360 (mips_set_pc): Change prototype to take a regcache. Adjust.
11361 (mips_reinsert_addr): Adjust.
11362 (mips_collect_register): Change prototype to take a regcache.
11364 (mips_supply_register):
11365 (mips_collect_register_32bit, mips_supply_register_32bit)
11366 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11367 (mips_store_fpregset): Ditto.
11368 * linux-ppc-low.c (ppc_supply_ptrace_register)
11369 (ppc_supply_ptrace_register): Ditto.
11370 (parse_spufs_run): Adjust.
11371 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11372 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11373 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11374 take a regcache. Adjust.
11375 * linux-s390-low.c (s390_collect_ptrace_register)
11376 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11377 (s390_set_pc): Change prototype to take a regcache. Adjust.
11378 (s390_arch_setup): Adjust.
11379 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11380 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11381 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11382 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11383 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11385 (sparc_breakpoint_at): Adjust.
11386 * linux-xtensa-low.c (xtensa_fill_gregset):
11387 (xtensa_store_gregset):
11388 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11389 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11390 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11391 prototype to take a regcache. Adjust.
11392 * win32-arm-low.c (arm_fetch_inferior_register)
11393 (arm_store_inferior_register): Change prototype to take a
11395 * win32-i386-low.c (i386_fetch_inferior_register)
11396 (i386_store_inferior_register): Change prototype to take a
11398 * win32-low.c (child_fetch_inferior_registers)
11399 (child_store_inferior_registers): Change prototype to take a
11401 (win32_wait): Adjust.
11402 (win32_fetch_inferior_registers): Change prototype to take a
11404 (win32_store_inferior_registers): Adjust.
11405 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11406 store_inferior_register>: Change prototype to take a regcache.
11408 2010-01-20 Doug Evans <dje@google.com>
11410 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11412 (linux_wait_for_event1, linux_init_signals): Ditto.
11413 (W_STOPCODE): Provide definition if missing.
11415 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11417 * linux-low.c (linux_core_of_thread): New.
11418 (compare_ints, show_process, list_threads): New.
11419 (linux_qxfer_osdata): Report threads and cores.
11420 (linux_target_op): Register linux_core_of_thread.
11421 * remote-utils.c (prepare_resume_reply): Report the core.
11422 (buffer_xml_printf): Support %d specifier.
11423 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11425 (handle_query): Handle qXfer:threads. Announce availability
11427 * target.h (struct target_ops): New field core_of_thread.
11429 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11431 * Makefile.in (clean): Remove new generated files.
11432 (reg-s390.o, reg-s390.c): Remove rules.
11433 (reg-s390x.o, reg-s390x.c): Likewise.
11434 (s390-linux32.o, s390-linux32.c): Add rules.
11435 (s390-linux64.o, s390-linux64.c): Likewise.
11436 (s390x-linux64.o, s390x-linux64.c): Likewise.
11437 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11438 * linux-s390-low.c: Include <elf.h>.
11439 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11440 (init_registers_s390): Remove prototype.
11441 (init_registers_s390x): Likewise.
11442 (init_registers_s390_linux32): Add prototype.
11443 (init_registers_s390_linux64): Likewise.
11444 (init_registers_s390x_linux64): Likewise.
11445 (s390_num_regs_3264): New define.
11446 (s390_regmap_3264): New global variable.
11447 (s390_cannot_fetch_register): Remove obsolete check.
11448 (s390_cannot_store_register): Likewise.
11449 (s390_collect_ptrace_register): Handle upper/lower register halves.
11450 (s390_supply_ptrace_register): Likewise.
11451 (s390_fill_gregset): Update to register number changes.
11452 (s390_get_hwcap): New routine.
11453 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11454 Install appropriate regmap and register set.
11456 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11458 * server.c (gdbserver_version): Update copyright year to 2010.
11459 * gdbreplay.c (gdbreplay_version): Likewise.
11461 2009-12-28 Doug Evans <dje@google.com>
11463 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11464 elf/external.h. Include <elf.h> instead but only if necessary.
11466 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11468 * linux-low.c (linux_remove_process): Remove `detaching'
11469 parameter. Don't release/detach from thread_db here.
11470 (linux_kill): Release/detach from thread_db here, ...
11471 (linux_detach): ... and here, before actually detaching.
11472 (linux_wait_1): ... and here, when a process exits.
11473 * thread-db.c (any_thread_of): New.
11474 (thread_db_free): Switch the current inferior to a thread of the
11477 2009-12-21 Doug Evans <dje@google.com>
11479 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11481 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11482 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11483 warning ifndef __NR_tkill. Move setting of errno there too.
11484 Delete unnecessary resetting of errno after syscall.
11485 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11487 * configure.ac: Check for dladdr.
11488 * config.in: Regenerate.
11489 * configure: Regenerate.
11490 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11491 (try_thread_db_load): Update.
11493 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11495 2009-12-18 Doug Evans <dje@google.com>
11497 * event-loop.c: Include unistd.h if it exists.
11499 * linux-low.c (my_waitpid): Move definition away from being in
11500 between linux_tracefork_child/linux_test_for_tracefork.
11502 * gdb_proc_service.h (psaddr_t): Fix type.
11503 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11504 signature to match glibc.
11506 2009-12-16 Doug Evans <dje@google.com>
11508 * linux-low.c (linux_read_memory): Fix argument to read.
11510 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11512 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11513 events, don't leave current_inferior pointing at null.
11515 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11517 * win32-low.c (LOG): Delete.
11518 (OUTMSG): Output to stderr.
11519 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11520 on compile time LOG macro.
11521 (win32_wait): Fix debug output.
11523 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11525 * win32-low.c (win32_add_one_solib): If the dll name is
11526 "ntdll.dll", prepend the system directory to the dll path.
11528 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11530 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11532 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11533 Vladimir Prus <vladimir@codesourcery.com>
11535 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11536 * configure.ac: Check for __mcoldfire__ and set
11537 gdb_cv_m68k_is_coldfire.
11538 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11539 reg-cf.o and reg-m68k.o.
11540 * configure: Regenerated.
11542 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11544 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11545 Pass it to thread_db_free.
11546 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11547 proper `detaching' argument to linux_remove_process.
11548 * linux-low.h (thread_db_free): Add `detaching' parameter.
11549 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11551 (thread_db_free): Add `detaching' parameter. Only
11552 call td_ta_clear_event if detaching from process.
11554 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11556 * thread-db.c (thread_db_free): Fix typo.
11558 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11561 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11563 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11565 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11566 with an i686 compiler.
11567 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11569 * configure: Rebuilt.
11571 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11575 * server.c (handle_search_memory_1): Correct read_addr initialization
11576 in loop for searching subsequent chunks.
11578 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11580 * configure.ac: New --with-libthread-db option.
11581 * thread-db.c: Allow direct dependence on libthread_db.
11582 (thread_db_free): Adjust.
11583 * config.in: Regenerate.
11584 * configure: Likewise.
11586 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11589 * thread-db.c (attach_thread): New function.
11590 (maybe_attach_thread): Return success/failure.
11591 (find_new_threads_callback): Adjust.
11592 (thread_db_find_new_threads): Loop until no new threads.
11594 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11596 * proc-service.c (ps_lgetregs): Formatting.
11598 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11600 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11601 * configure.ac: Adjust.
11602 * linux-low.h (struct process_info_private): Move members to struct
11604 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11605 * linux-low.c (linux_remove_process): Adjust.
11606 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11607 * server.c (handle_query): Move code ...
11608 (handle_monitor_command): ... here. New function.
11609 * target.h (struct target_ops): New member.
11610 * thread-db.c (struct thread_db): New.
11611 (libthread_db_search_path): New variable.
11612 (thread_db_create_event, thread_db_enable_reporting)
11613 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11614 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11615 (try_thread_db_load_1, dladdr_to_soname): New functions.
11616 (try_thread_db_load, thread_db_load_search): New functions.
11617 (thread_db_init): Search for libthread_db.
11618 (thread_db_free): New function.
11619 (thread_db_handle_monitor_command): Likewise.
11620 * config.in: Regenerate.
11621 * configure: Regenerate.
11623 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11625 * spu-low.c (spu_kill): Wait for inferior to terminate.
11626 Call clear_inferiors.
11627 (spu_detach): Call clear_inferiors.
11629 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11631 * aclocal.m4: Regenerate.
11632 * config.in: Likewise.
11633 * configure: Likewise.
11635 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11637 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11638 (parse_spufs_run): New function.
11639 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11640 (ppc_breakpoint_at): Handle SPU breakpoints.
11642 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11644 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11645 (SPUFS_MAGIC): Define.
11646 (spu_enumerate_spu_ids): New function.
11647 (linux_qxfer_spu): New function.
11648 (linux_target_ops): Install linux_qxfer_spu.
11650 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11652 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11653 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11654 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11655 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11656 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11657 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11658 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11659 (init_registers_powerpc_cell32l): Add prototype.
11660 (init_registers_powerpc_cell64l): Likewise.
11661 (ppc_arch_setup): Detect Cell/B.E. architecture.
11663 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11665 * Makefile.in (datarootdir): New variable.
11667 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11669 * linux-low.c (linux_write_memory): Update debugging output.
11670 * Makefile.in (clean): Add new descriptions.
11671 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11672 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11673 * configure.srv: Add new files for arm*-*-linux*.
11674 * linux-arm-low.c: Add new declarations.
11675 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11676 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11677 (HWCAP_VFPv3D16): New.
11678 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11679 instead of __IWMMXT__.
11680 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11681 (arm_arch_setup): New.
11682 (target_regsets): Remove #ifdef. Add VFP regset.
11683 (the_low_target): Use arm_arch_setup.
11685 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11687 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11688 the main thread again.
11690 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11692 Adding Neutrino gdbserver.
11693 * configure: Regenerated.
11694 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11695 * configure.srv (i[34567]86-*-nto*): New target.
11696 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11697 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11698 (nto_comctrl) [__QNX__]: New function.
11699 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11701 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11703 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11706 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11707 Pedro Alves <pedro@codesourcery.com>
11709 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11710 don't support CONTEXT_EXTENDED_REGISTERS.
11711 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11712 (the_low_target): Install them.
11713 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11714 failing with ERROR_PIPE_NOT_CONNECTED.
11716 2009-06-30 Doug Evans <dje@google.com>
11717 Pierre Muller <muller@ics.u-strasbg.fr>
11719 Add h/w watchpoint support to x86-linux, win32-i386.
11720 * Makefile.in (SFILES): Add i386-low.c
11721 (i386_low_h): Define.
11722 (i386-low.o): Add dependencies.
11723 (linux-x86-low.o): Add i386-low.h dependency.
11724 (win32-i386-low.o): Ditto.
11725 * i386-low.c: New file.
11726 * i386-low.h: New file.
11727 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11728 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11729 * linux-low.c (linux_add_process): Initialize arch_private.
11730 (linux_remove_process): Free arch_private.
11731 (add_lwp): Initialize arch_private.
11732 (delete_lwp): Free arch_private.
11733 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11735 * linux-low.h (process_info_private): New member arch_private.
11736 (lwp_info): New member arch_private.
11737 (linux_target_ops): New members new_process, new_thread,
11739 (ptid_of): New macro.
11740 * linux-x86-low.c: Include stddef.h, i386-low.h.
11741 (arch_process_info): New struct.
11742 (arch_lwp_info): New struct.
11743 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11744 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11745 (i386_dr_low_get_status): New function.
11746 (x86_insert_point, x86_remove_point): New functions.
11747 (x86_stopped_by_watchpoint): New function.
11748 (x86_stopped_data_address): New function.
11749 (x86_linux_new_process, x86_linux_new_thread): New functions.
11750 (x86_linux_prepare_to_resume): New function.
11751 (the_low_target): Add entries for insert_point, remove_point,
11752 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11754 * server.c (debug_hw_points): New global.
11755 (monitor_show_help): Document set debug-hw-points.
11756 (handle_query): Process "set debug-hw-points".
11757 * server.h (debug_hw_points): Declare.
11758 (paddress): Declare.
11759 * utils.c (NUMCELLS, CELLSIZE): New macros.
11760 (get_sell, xsnprintf, paddress): New functions.
11761 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11762 remove_point, stopped_by_watchpoint, stopped_data_address.
11763 * win32-i386-low.c: Include i386-low.h.
11764 (debug_reg_state): Replaces dr.
11765 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11766 (i386_dr_low_get_status): New function.
11767 (i386_insert_point, i386_remove_point): New functions.
11768 (i386_stopped_by_watchpoint): New function.
11769 (i386_stopped_data_address): New function.
11770 (i386_initial_stuff): Update.
11771 (get_thread_context,set_thread_context,i386_thread_added): Update.
11772 (the_low_target): Add entries for insert_point,
11773 remove_point, stopped_by_watchpoint, stopped_data_address.
11774 * win32-low.c (win32_insert_watchpoint): New function.
11775 (win32_remove_watchpoint): New function.
11776 (win32_stopped_by_watchpoint): New function.
11777 (win32_stopped_data_address): New function.
11778 (win32_target_ops): Add entries for insert_watchpoint,
11779 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11780 * win32-low.h (win32_target_ops): New members insert_point,
11781 remove_point, stopped_by_watchpoint, stopped_data_address.
11783 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11785 * server.c (process_serial_event): Re-return unsupported, not
11786 error, if the type isn't recognized. Re-allow supporting only
11787 insert or remove packets. Also call require_running for
11788 breakpoints. Add missing break statement to default case. Tidy.
11789 * target.h (struct target_ops): Rename insert_watchpoint to
11790 insert_point, and remove_watchpoint to remove_point.
11792 * linux-low.h (struct linux_target_ops): Likewise.
11793 * linux-low.c (linux_insert_watchpoint): Rename to ...
11794 (linux_insert_point): ... this. Adjust.
11795 (linux_remove_watchpoint): Rename to ...
11796 (linux_remove_point): ... this. Adjust.
11797 (linux_target_ops): Adjust.
11798 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11799 (cris_insert_point): ... this.
11800 (cris_remove_watchpoint): Rename to ...
11801 (cris_remove_point): ... this.
11802 (the_low_target): Adjust.
11804 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11806 * server.c (handle_v_kill): Pass signal_pid to
11807 kill_inferior if multi_process is zero.
11809 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11811 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11812 * target.h (target_ops): Comment for *_watchpoint to make it clear
11813 the functions can get types '0' and '1'.
11815 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11817 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11818 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11819 * regcache.c (get_regcache): Likewise.
11820 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11821 * win32-low.c (child_fetch_inferior_registers): Remove check for
11824 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11825 Pedro Alves <pedro@codesourcery.com>
11827 * target.h (struct target_ops) <supports_multi_process>: New
11829 (target_supports_multi_process): New.
11830 * server.c (handle_query): Even if GDB reports support, only
11831 enable multi-process if the target also supports it. Report
11832 multi-process support only if the target backend supports it.
11833 * linux-low.c (linux_supports_multi_process): New function.
11834 (linux_target_ops): Install it as target_supports_multi_process
11837 2009-05-24 Doug Evans <dje@google.com>
11839 Global renaming of find_thread_pid to find_thread_ptid.
11840 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11841 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11842 All callers updated.
11844 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11845 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11848 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11849 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11850 (linux_resume_one_lwp): Ditto.
11852 2009-05-23 Doug Evans <dje@google.com>
11854 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11855 from struct inferior_list_entry * to struct lwp_info *.
11856 All callers updated.
11858 2009-05-13 Doug Evans <dje@google.com>
11860 * linux-x86-low.c: Don't include assert.h.
11861 (x86_siginfo_fixup): Use fatal, not assert.
11862 (x86_arch_setup): Fix comment.
11864 2009-05-12 Doug Evans <dje@google.com>
11866 Biarch support for i386/amd64 gdbserver.
11867 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11868 Add linux-x86-low.c.
11869 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11870 (linux-x86-low.o): Add.
11871 * linux-x86-64-low.c: Delete.
11872 * linux-i386-low.c: Delete.
11873 * linux-x86-low.c: New file.
11874 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11876 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11878 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11879 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11880 (linux_child_pid_to_exec_file): New function.
11881 (elf_64_header_p, elf_64_file_p): New functions.
11882 (siginfo_fixup): New function.
11883 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11884 give target a chance to convert layout.
11885 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11886 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11888 2009-05-07 Doug Evans <dje@google.com>
11890 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11891 (regsets_store_inferior_registers): Ditto.
11893 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11897 * linux-low.c (must_set_ptrace_flags): Delete.
11898 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11900 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11901 `lwp->must_set_ptrace_flags' instead.
11902 (linux_wait_for_event_1): Set ptrace options here.
11903 (linux_wait_1): ... not here.
11905 2009-04-30 Doug Evans <dje@google.com>
11907 * inferiors.c (started_inferior_callback): New function.
11908 (attached_inferior_callback): New function.
11909 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11910 * server.c (print_started_pid, print_attached_pid): New functions.
11911 (detach_or_kill_for_exit): New function.
11912 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11913 * server.h (have_started_inferiors_p): Declare.
11914 (have_attached_inferiors_p): Declare.
11916 * inferiors.c (remove_process): Fix memory leak, free process.
11917 * linux-low.c (linux_remove_process): New function.
11918 (linux_kill): Call it instead of remove_process.
11919 (linux_detach, linux_wait_1): Ditto.
11921 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11923 * configure.srv: Add x86 Windows CE target.
11925 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11927 * inferiors.c (get_thread_process): Make global.
11928 * server.h (get_thread_process): Add prototype.
11929 * thread-db.c (find_one_thread): Use get_thread_process
11930 instead of current_process.
11931 (thread_db_get_tls_address): Do not crash if called when
11932 thread layer is not yet initialized.
11934 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11936 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11937 * spu-low.c (current_tid): Rename to ...
11938 (current_ptid): ... this.
11939 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11940 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11941 ptid_get_lwp (current_ptid) instead of current_tid.
11942 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11943 instead of current_tid. Use find_process_pid to verify pid
11944 argument is valid. Pass proper argument to remove_process.
11945 (spu_thread_alive): Compare current_ptid instead of current_tid.
11946 (spu_resume): Likewise.
11948 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11950 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11953 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11955 Implement the multiprocess extensions, and add linux multiprocess
11958 * server.h (ULONGEST): Declare.
11959 (struct ptid, ptid_t): New.
11960 (minus_one_ptid, null_ptid): Declare.
11961 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11962 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11963 (struct inferior_list_entry): Change `id' type from unsigned from
11965 (struct sym_cache, struct breakpoint, struct
11966 process_info_private): Forward declare.
11967 (struct process_info): Declare.
11968 (current_process): Declare.
11969 (all_processes): Declare.
11970 (initialize_inferiors): Declare.
11971 (add_thread): Adjust to use ptid_t.
11972 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11973 (add_process, remove_process, find_thread_pid): Declare.
11974 (find_inferior_id): Adjust to use ptid_t.
11975 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11976 (multi_process): Declare.
11977 (push_event): Adjust to use ptid_t.
11978 (read_ptid, write_ptid): Declare.
11979 (prepare_resume_reply): Adjust to use ptid_t.
11980 (clear_symbol_cache): Declare.
11981 * inferiors.c (all_processes): New.
11982 (null_ptid, minus_one_ptid): New.
11983 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11984 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11985 (add_thread): Change unsigned long to ptid. Remove gdb_id
11987 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11988 (gdb_id_to_thread): Rename to ...
11989 (find_thread_pid): ... this. Change unsigned long to ptid.
11990 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11991 (loaded_dll, pull_pid_from_list): Adjust.
11992 (add_process, remove_process, find_process_pid)
11993 (get_thread_process, current_process, initialize_inferiors): New.
11994 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11995 (struct target_waitstatus) <related_pid>: Ditto.
11996 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11997 return type to int.
11998 (struct target_ops) <join>: Add `pid' argument.
11999 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12000 (struct target_ops) <wait>: Add `ptid' field. Change return type
12002 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12003 (mywait): Add `ptid' argument. Change return type to ptid_t.
12004 (target_pid_to_str): Declare.
12005 * target.c (set_desired_inferior): Adjust to use ptids.
12006 (mywait): Add new `ptid' argument. Adjust.
12007 (target_pid_to_str): New.
12008 * mem-break.h (free_all_breakpoints): Declare.
12009 * mem-break.c (breakpoints): Delelete.
12010 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12011 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12012 to use per-process breakpoint list.
12013 (free_all_breakpoints): New.
12014 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12015 (symbol_cache, all_symbols_looked_up): Delete.
12017 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12019 (prepare_resume_reply): Change ptid argument's type from unsigned
12020 long to ptid_t. Adjust. Implement W;process and X;process.
12021 (free_sym_cache, clear_symbol_cache): New.
12022 (look_up_one_symbol): Adjust to per-process symbol cache. *
12023 * server.c (cont_thread, general_thread, step_thread): Change type
12025 (attached): Delete.
12026 (multi_process): New.
12027 (last_ptid): Change type to ptid_t.
12028 (struct vstop_notif) <ptid>: Change type to ptid_t.
12029 (queue_stop_reply, push_event): Change `ptid' argument's type to
12031 (discard_queued_stop_replies): Add `pid' argument.
12032 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12033 changes. Don't reference the `attached' global.
12034 (attach_inferior): Adjust to mywait interface changes.
12035 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12036 features. Handle and report "multiprocess+". Handle
12038 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12040 (handle_v_kill): New.
12041 (handle_v_stopped): Adjust to use target_pid_to_str.
12042 (handle_v_requests): Allow multiple attaches and runs when
12043 multiprocess extensions are in effect. Handle "vKill".
12044 (myresume): Adjust to use ptids.
12045 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12046 (handle_status): Adjust to discard_queued_stop_replies interface
12048 (first_thread_of, kill_inferior_callback)
12049 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12050 (main): Call initialize_inferiors. Adjust to use ptids, killing
12051 and detaching from all inferiors. Handle multiprocess packet
12053 * linux-low.h: Include gdb_proc_service.h.
12054 (struct process_info_private): New.
12055 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12056 <lwpid_of>: Use ptid_get_lwp.
12057 (get_lwp_thread): Adjust.
12058 (struct lwp_info): Add `dead' member.
12059 (find_lwp_pid): Declare.
12060 * linux-low.c (thread_db_active): Delete.
12061 (new_inferior): Adjust comment.
12062 (inferior_pid): Delete.
12063 (linux_add_process): New.
12064 (handle_extended_wait): Adjust.
12065 (add_lwp): Change unsigned long to ptid.
12066 (linux_create_inferior): Add process to processes table. Adjust
12067 to use ptids. Don't set new_inferior here.
12068 (linux_attach_lwp): Rename to ...
12069 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12070 it. Adjust to use ptids.
12071 (linux_attach_lwp): New.
12072 (linux_attach): Add process to processes table. Don't set
12074 (struct counter): New.
12075 (second_thread_of_pid_p, last_thread_of_process_p): New.
12076 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12077 multiple processes.
12078 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12079 processes. Remove process from process table.
12080 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12081 to multiple processes.
12082 (any_thread_of): New.
12083 (linux_detach): Add `pid' argument, and handle it. Remove process
12084 from processes table.
12085 (linux_join): Add `pid' argument. Handle it.
12086 (linux_thread_alive): Change unsighed long argument to ptid_t.
12087 Consider dead lwps as not being alive.
12088 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12089 threads we're not interested in.
12090 (same_lwp, find_lwp_pid): New.
12091 (linux_wait_for_lwp): Change `pid' argument's type from int to
12093 (linux_wait_for_event): Rename to ...
12094 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12095 from int to ptid_t. Adjust.
12096 (linux_wait_for_event): New.
12097 (linux_wait_1): Add `ptid' argument. Change return type to
12098 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12099 that exit from the process table.
12100 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12102 (mark_lwp_dead): New.
12103 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12104 stopping all threads, mark its main lwp as dead.
12105 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12107 (fetch_register, usr_store_inferior_registers)
12108 (regsets_fetch_inferior_registers)
12109 (regsets_store_inferior_registers, linux_read_memory)
12110 (linux_write_memory): Inline `inferior_pid'.
12111 (linux_look_up_symbols): Adjust to use per-process
12112 `thread_db_active'.
12113 (linux_request_interrupt): Adjust to use ptids.
12114 (linux_read_auxv): Inline `inferior_pid'.
12115 (initialize_low): Don't reference thread_db_active.
12116 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12117 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12118 (ps_getpid): Return the pid of the current inferior.
12119 * thread-db.c (proc_handle, thread_agent): Delete.
12120 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12122 (find_one_thread): Change argument type to ptid_t. Adjust to
12124 (maybe_attach_thread): Adjust to per-process data and ptids.
12125 (thread_db_find_new_threads): Ditto.
12126 (thread_db_init): Ditto.
12127 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12128 processes table. Adjust to use ptids.
12129 (spu_kill, spu_detach): Adjust interface. Remove process from
12131 (spu_join, spu_thread_alive): Adjust interface.
12132 (spu_wait): Adjust interface. Remove process from processes
12133 table. Adjust to use ptids.
12134 * win32-low.c (current_inferior_tid): Delete.
12135 (current_inferior_ptid): New.
12136 (debug_event_ptid): New.
12137 (thread_rec): Take a ptid. Adjust.
12138 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12139 (child_delete_thread): Ditto.
12140 (do_initial_child_stuff): Add `attached' argument. Add process to
12142 (child_fetch_inferior_registers, child_store_inferior_registers):
12144 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12145 (win32_attach): Pass 1 to do_initial_child_stuff.
12146 (win32_kill): Adjust interface. Remove process from processes
12148 (win32_detach): Ditto.
12149 (win32_join): Adjust interface.
12150 (win32_thread_alive): Take a ptid.
12151 (win32_resume): Adjust to use ptids.
12152 (get_child_debug_event): Ditto.
12153 (win32_wait): Adjust interface. Remove exiting process from
12156 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12158 Non-stop mode support.
12160 * server.h (non_stop): Declare.
12161 (gdb_client_data, handler_func): Declare.
12162 (delete_file_handler, add_file_handler, start_event_loop):
12164 (handle_serial_event, handle_target_event, push_event)
12165 (putpkt_notif): Declare.
12166 * target.h (enum resume_kind): New.
12167 (struct thread_resume): Replace `step' field by `kind' field.
12168 (TARGET_WNOHANG): Define.
12169 (struct target_ops) <wait>: Add `options' argument.
12170 <supports_non_stop, async, start_non_stop>: New fields.
12171 (target_supports_non_stop, target_async): New.
12172 (start_non_stop): Declare.
12173 (mywait): Add `options' argument.
12174 * target.c (mywait): Add `options' argument. Print child exit
12175 notifications here.
12176 (start_non_stop): New.
12177 * server.c (non_stop, own_buf, mem_buf): New globals.
12178 (struct vstop_notif): New.
12179 (notif_queue): New global.
12180 (queue_stop_reply, push_event, discard_queued_stop_replies)
12181 (send_next_stop_reply): New.
12182 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12184 (attach_inferior): In non-stop mode, don't wait for the target
12186 (handle_general_set): Handle QNonStop.
12187 (handle_query): When handling qC, return the current general
12188 thread, instead of the first thread of the list.
12189 (handle_query): If the backend supports non-stop mode, include
12190 QNonStop+ in the qSupported query response.
12191 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12193 (handle_v_attach, handle_v_run): Handle non-stop mode.
12194 (handle_v_stopped): New.
12195 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12196 (myresume): Adjust to use resume_kind. Handle non-stop.
12197 (queue_stop_reply_callback): New.
12198 (handle_status): Handle non-stop mode.
12199 (main): Clear non_stop flag on reconnection. Use the event-loop.
12200 Refactor serial protocol handling from here ...
12201 (process_serial_event): ... to this new function. When GDB
12202 selects any thread, select one here. In non-stop mode, wait until
12203 GDB acks all pending events before exiting.
12204 (handle_serial_event, handle_target_event): New.
12205 * remote-utils.c (remote_open): Install remote_desc in the event
12207 (remote_close): Remove remote_desc from the event loop.
12208 (putpkt_binary): Rename to...
12209 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12210 (putpkt_binary): New as wrapper around putpkt_binary_1.
12211 (putpkt_notif): New.
12212 (prepare_resume_reply): In non-stop mode, don't change the
12214 * event-loop.c: New.
12215 * Makefile.in (OBJ): Add event-loop.o.
12216 (event-loop.o): New rule.
12218 * linux-low.h (pid_of): Moved here.
12220 (get_lwp_thread): Use lwpid_of.
12221 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12222 * linux-low.c (pid_of): Delete.
12223 (inferior_pid): Use lwpid_of.
12224 (linux_event_pipe): New.
12225 (target_is_async_p): New.
12227 (handle_extended_wait): Use lwpid_of.
12228 (add_lwp): Don't set lwpid field.
12229 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12230 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12231 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12232 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12233 first. Adjust to linux_wait_for_event interface changes. Use
12235 (linux_detach): Don't delete the main lwp here.
12236 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12237 (status_pending_p): Don't consider explicitly suspended lwps.
12238 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12239 pointer. Add OPTIONS argument. Change return type to int. Use
12240 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12241 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12242 pointer. Add status pointer argument. Return a pid instead of a
12243 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12244 changes. In non-stop mode, don't switch to a random thread.
12245 (linux_wait): Rename to...
12246 (linux_wait_1): ... this. Add target_options argument, and handle
12247 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12248 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12249 clean exit and signal exit code. Don't stop all threads in
12250 non-stop mode. In all-stop mode, only stop all threads when
12251 reporting a stop to GDB. Handle explicit thread stop requests.
12252 (async_file_flush, async_file_mark): New.
12254 (send_sigstop): Use lwpid_of.
12255 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12256 interface changes. In non-stop mode, don't switch to a random
12258 (linux_resume_one_lwp): Use lwpid_of.
12259 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12260 (linux_resume_one_thread): ... this. Handle resume_stop. In
12261 non-stop mode, don't look for pending flag in all threads.
12262 (resume_status_pending_p): Don't consider explicitly suspended
12264 (my_waitpid): Reimplement. Emulate __WALL.
12265 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12267 (sigchld_handler, linux_supports_non_stop, linux_async)
12268 (linux_start_non_stop): New.
12269 (linux_target_ops): Register linux_supports_non_stop, linux_async
12270 and linux_start_non_stop.
12271 (initialize_low): Install SIGCHLD handler.
12272 * thread-db.c (thread_db_create_event, find_one_thread)
12273 (thread_db_get_tls_address): Use lwpid_of.
12274 * win32-low.c (win32_detach): Adjust to use resume_kind.
12275 (win32_wait): Add `options' argument.
12276 * spu-low.c (spu_resume): Adjust to use resume_kind.
12277 (spu_wait): Add `options' argument.
12279 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12281 Decouple target code from remote protocol.
12283 * target.h (enum target_waitkind): New.
12284 (struct target_waitstatus): New.
12285 (struct target_ops) <wait>: Return an unsigned long. Take a
12286 target_waitstatus pointer instead of a char pointer.
12287 (mywait): Likewise.
12288 * target.c (mywait): Change prototype to return an unsigned long.
12289 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12290 * server.h (thread_from_wait, old_thread_from_wait): Delete
12292 (prepare_resume_reply): Change prototype to take a
12294 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12295 (last_status, last_ptid): New.
12296 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12297 pid instead of a signal.
12298 (attach_inferior): Remove "status" and "signal" parameters.
12300 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12302 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12303 (handle_v_requests, myresume): Remove "status" and "signal"
12304 parameters. Adjust.
12305 (handle_status): New.
12306 (main): Delete local `status'. Adjust.
12307 * remote-utils.c: Include target.h.
12308 (prepare_resume_reply): Change prototype to take a
12309 target_waitstatus. Adjust.
12311 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12313 * spu-low.c (spu_wait): Adjust.
12314 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12316 (win32_wait): Adjust.
12318 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12320 * target.h (struct thread_resume): Delete leave_stopped member.
12321 (struct target_ops): Add a `n' argument to the `resume' callback.
12322 * server.c (start_inferior): Adjust.
12323 (handle_v_cont, myresume): Adjust.
12324 * linux-low.c (check_removed_breakpoint): Adjust to resume
12325 interface change, and to removed leave_stopped field.
12326 (resume_ptr): Delete.
12327 (struct thread_resume_array): New.
12328 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12329 resume interface change.
12330 (linux_continue_one_thread, linux_queue_one_thread)
12331 (resume_status_pending_p): Check if the resume field is NULL
12332 instead of checking the leave_stopped member.
12333 (linux_resume): Adjust to the target resume interface change.
12334 * spu-low.c (spu_resume): Adjust to the target resume interface
12336 * win32-low.c (win32_detach, win32_resume): Ditto.
12338 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12340 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12342 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12344 (linux_continue_one_thread): Only preserve the stepping flag if
12345 there's a pending breakpoint.
12347 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12349 * server.c (main): After the inferior having exited, call
12350 remote_close before exiting gdbserver.
12352 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12354 Fix size of FPSCR in Power 7 processors.
12355 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12356 (PPC_FEATURE_HAS_DFP): New #define.
12357 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12360 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12362 * server.c (handle_query) Whitespace and formatting.
12364 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12366 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12367 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12368 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12369 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12370 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12371 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12372 Makefile.in, configure.ac: Fix whitespace throughout.
12373 * configure: Regenerate.
12375 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12377 * inferiors.c (find_inferior): Make it safe for the callback
12378 function to delete the currently iterated inferior.
12380 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12382 * Makefile.in (linuw_low_h): Move higher.
12383 (thread-db.o): Depend on $(linux_low_h).
12385 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12387 Rename "process" to "lwp" throughout.
12389 * linux-low.c (all_processes): Rename to...
12390 (all_lwps): ... this.
12391 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12392 (add_process): Rename to ...
12393 (add_lwp): ... this. Adjust.
12394 (linux_create_inferior): Adjust.
12395 (linux_attach_lwp): Adjust.
12396 (linux_attach): Adjust.
12397 (linux_kill_one_process): Rename to ...
12398 (linux_kill_one_lwp): ... this. Adjust.
12399 (linux_kill): Adjust.
12400 (linux_detach_one_process): Rename to ...
12401 (linux_detach_one_lwp): ... this. Adjust.
12402 (linux_detach): Adjust.
12403 (check_removed_breakpoint): Adjust.
12404 (status_pending_p): Adjust.
12405 (linux_wait_for_process): Rename to ...
12406 (linux_wait_for_lwp): ... this. Adjust.
12407 (linux_wait_for_event): Adjust.
12408 (send_sigstop): Adjust.
12409 (wait_for_sigstop): Adjust.
12410 (stop_all_processes): Rename to ...
12411 (stop_all_lwps): ... this.
12412 (linux_resume_one_process): Rename to ...
12413 (linux_resume_one_lwp): ... this. Adjust.
12414 (linux_set_resume_request, linux_continue_one_thread)
12415 (linux_queue_one_thread, resume_status_pending_p)
12416 (usr_store_inferior_registers, regsets_store_inferior_registers)
12417 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12419 * linux-low.h (get_process): Rename to ...
12420 (get_lwp): ... this. Adjust.
12421 (get_thread_process): Rename to ...
12422 (get_thread_lwp): ... this. Adjust.
12423 (get_process_thread): Rename to ...
12424 (get_lwp_thread): ... this. Adjust.
12425 (struct process_info): Rename to ...
12426 (struct lwp_info): ... this.
12427 (all_processes): Rename to ...
12428 (all_lwps): ... this.
12429 * proc-service.c (ps_lgetregs): Adjust.
12430 * thread-db.c (thread_db_create_event, find_one_thread)
12431 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12433 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12435 * server.c (handle_query): Handle "qAttached".
12437 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12439 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12440 GPLv3, update license URL.
12442 2009-03-01 Doug Evans <dje@google.com>
12444 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12445 (server_h): Add gdb_signals.h.
12446 (signals.o): Update.
12447 * server.h (target_signal_from_host,target_signal_to_host_p)
12448 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12450 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12452 * remote-utils.c (getpkt): Also generate remote-debug
12453 information if noack_mode is set.
12455 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12457 * server.c (handle_query): Report qXfer:siginfo:read and
12458 qXfer:siginfo:write as supported and handle them.
12459 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12460 * linux-low.c (linux_xfer_siginfo): New.
12461 (linux_target_ops): Set it.
12463 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12465 * server.c (gdbserver_usage): Mention --remote-debug.
12466 (main): Accept '--remote-debug' switch.
12468 2009-01-18 Doug Evans <dje@google.com>
12470 * regcache.c (new_register_cache): No need to check result of xcalloc.
12471 * server.c (handle_search_memory): Back out calls to xmalloc,
12472 result is checked and error is returned to user upon failure.
12473 (handle_query): Ditto. Add more checks for result of malloc.
12474 (handle_v_cont): Check result of malloc, report error back to
12476 (handle_v_run): Ditto. Call freeargv.
12477 * server.h (freeargv): Declare.
12478 * utils.c (freeargv): New fn.
12480 2009-01-15 Doug Evans <dje@google.com>
12482 * gdbreplay.c (perror_with_name): Make arg const char *.
12483 * server.h (target_signal_to_name): Make return type const char *.
12484 * thread-db.c (thread_db_err_str): Make return type const char *.
12485 * utils.c (perror_with_name): Make arg const char *.
12487 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12489 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12490 when handling a EXIT_PROCESS_DEBUG_EVENT.
12492 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12494 * gdbreplay.c (gdbreplay_version): Update copyright year.
12495 * server.c (gdbserver_version): Likewise.
12497 2009-01-05 Doug Evans <dje@google.com>
12499 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12500 (handle_extended_wait): Improve comment.
12502 2008-12-13 Doug Evans <dje@google.com>
12504 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12505 * server.h (ATTR_MALLOC): New macro.
12506 (xmalloc,xcalloc,xstrdup): Declare.
12507 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12508 * inferiors.c: Ditto.
12509 * linux-low.c: Ditto.
12510 * mem-break.c: Ditto.
12511 * regcache.c: Ditto.
12512 * remote-utils.c: Ditto.
12515 * win32-low.c: Ditto.
12517 2008-12-12 Doug Evans <dje@google.com>
12519 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12520 in debugging printf.
12522 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12524 2008-12-09 Doug Evans <dje@google.com>
12526 * linux-low.h (struct process_info): Delete member tid, unused.
12527 * thread-db.c (find_one_thread): Update.
12528 (maybe_attach_thread): Update.
12530 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12532 * target.h (struct target_ops): Add qxfer_osdata member.
12533 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12535 (linux_qxfer_osdata): New functions.
12536 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12538 * server.c (handle_query): Handle "qXfer:osdata:read:".
12539 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12540 (buffer_xml_printf): New functions.
12541 * server.h (struct buffer): New.
12542 (buffer_grow_str, buffer_grow_str0): New macros.
12543 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12544 (buffer_xml_printf): Declare.
12546 2008-11-24 Doug Evans <dje@google.com>
12548 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12550 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12552 * server.c (handle_v_run): Always use the supplied argument list.
12554 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12556 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12557 (xtensa_regmap_table): Add entry for scompare1.
12559 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12561 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12562 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12563 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12564 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12565 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12566 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12567 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12568 XML target descriptions.
12569 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12570 when inferior is running on an ISA 2.05 or later processor. Add
12571 special case to return offset for full 64-bit slot of FPSCR when
12574 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12576 * Makefile.in (SFILES, clean): Added sparc64 files.
12577 (reg-sparc64.o, reg-sparc64.c): New.
12578 * configure.srv (sparc*-*-linux*): New configuration.
12579 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12580 syscall arguments for SPARC.
12581 (regsets_store_inferior_registers): Likewise.
12582 * linux-sparc-low.c: New file.
12584 2008-10-21 Doug Evans <dje@google.com>
12586 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12587 (READLINE_DIR,READLINE_DEP): Delete.
12588 (INTERNAL_CFLAGS): Update.
12589 (LINTFLAGS): Update.
12591 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12593 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12594 whole argv from the last run, not just argv[0].
12596 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12598 * regcache.c (new_register_cache): Return NULL if the register
12599 cache size isn't known yet.
12600 (free_register_cache): Avoid dereferencing a NULL regcache.
12602 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12604 * configure.srv: Merge MIPS and MIPS64.
12606 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12608 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12610 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12612 * Makefile.in: Add required vsx dependencies.
12614 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12615 Declare init_registers_powerpc_vsx32l.
12616 Declare init_registers_powerpc_vsx64l.
12617 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12618 (ppc_arch_setup): Check for VSX in hwcap.
12619 (ppc_fill_vsxregset): New function.
12620 (ppc_store_vsxregset): New function.
12621 Add new VSX entry in regset_info target_regsets.
12623 * configure.srv: Add new VSX dependencies.
12625 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12627 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12628 (remote_open): Set or clear transport_is_reliable.
12629 (putpkt_binary): Don't expect acks in noack mode.
12630 (getpkt): Don't send ack/nac in noack mode.
12631 * server.c (handle_general_set): Handle QStartNoAckMode.
12632 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12634 (main): Reset noack_mode on every connection.
12635 * server.h (noack_mode): Declare.
12637 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12639 * Makefile.in (GDBREPLAY_OBS): New variable.
12640 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12642 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12643 Daniel Jacobowitz <dan@codesourcery.com>
12645 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12646 (usr_store_inferior_registers): Likewise.
12647 (regsets_store_inferior_registers): Likewise.
12649 2008-07-31 Rolf Jansen <rj@surtec.com>
12650 Pedro Alves <pedro@codesourcery.com>
12652 * configure.ac: Check for memmem declaration.
12653 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12654 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12655 (disable_packet_qfThreadInfo): Unconditionally compile.
12656 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12657 * configure, config.in: Regenerate.
12659 2008-07-28 Doug Kwan <dougkwan@google.com>
12661 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12662 (linux_write_memory): Remove declaration of errno.
12664 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12666 * linux-low.c (handle_extended_wait): Do not use "status"
12667 variable uninitialized.
12669 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12671 * server.c (handle_v_attach): Inhibit reporting dll changes.
12673 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12675 * remote-utils.c (prepare_resume_reply): If requested, don't
12676 output "thread:TID" in the T stop reply.
12678 * server.c (disable_packet_vCont, disable_packet_Tthread)
12679 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12680 (handle_query): If requested, disable support for qC, qfThreadInfo
12682 (handle_v_requests): If requested, disable support for vCont.
12683 (gdbserver_show_disableable): New.
12684 (main): Handle --disable-packet and --disable-packet=LIST.
12686 * server.h (disable_packet_vCont, disable_packet_Tthread)
12687 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12689 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12691 * server.c (gdbserver_usage): Mention --version.
12693 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12695 * Makefile.in (gdbreplay.o): New rule.
12697 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12699 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12700 message, not gdbserver.
12702 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12703 Nathan Sidwell <nathan@codesourcery.com>
12704 Joseph Myers <joseph@codesourcery.com>
12706 * acinclude.m4: Include ../../config/acx.m4.
12707 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12708 * configure, config.in: Regenerate.
12709 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12710 * server.c (gdbserver_version): Print PKGVERSION.
12711 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12712 (main): Adjust gdbserver_usage calls.
12713 * gdbreplay.c (version, host_name): Add declarations.
12714 (gdbreplay_version, gdbreplay_usage): New.
12715 (main): Accept --version and --help options.
12717 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12719 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12720 (arm_breakpoint_at): Handle Thumb.
12721 (the_low_target): Add comment.
12723 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12725 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12727 2008-05-09 Doug Evans <dje@google.com>
12729 * server.h (decode_search_memory_packet): Declare.
12730 * remote-utils.c (decode_search_memory_packet): New fn.
12731 * server.c (handle_search_memory_1): New fn.
12732 (handle_search_memory): New fn.
12733 (handle_query): Process qSearch:memory packets.
12735 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12737 * regcache.c (registers_length): Remove.
12738 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12739 full register packet.
12740 * regcache.h (registers_length): Remove prototype.
12741 * server.h (PBUFSIZ): Define to 16384.
12743 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12745 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12746 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12747 powerpc-64l.o, and powerpc-altivec64l.o.
12748 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12749 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12750 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12751 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12752 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12755 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12756 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12757 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12758 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12759 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12760 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12761 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12762 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12763 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12764 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12767 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12768 (init_registers_powerpc_32l): ... this new prototype.
12769 (init_registers_powerpc_32): Remove, replace by ...
12770 (init_registers_powerpc_altivec32l): ... this new prototype.
12771 (init_registers_powerpc_e500): Remove, replace by ...
12772 (init_registers_powerpc_e500l): ... this new prototype.
12773 (init_registers_ppc64): Remove, replace by ...
12774 (init_registers_powerpc_64l): ... this new prototype.
12775 (init_registers_powerpc_64): Remove, replace by ...
12776 (init_registers_powerpc_altivec64l): ... this new prototype.
12777 (ppc_num_regs): Set to 73.
12778 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12779 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12780 (ppc_cannot_store_register): Handle orig_r3 and trap.
12781 (ppc_arch_setup): Update init_registers_... calls.
12782 (ppc_fill_gregset): Handle orig_r3 and trap.
12784 * inferiors.c (clear_inferiors): Reset current_inferior.
12786 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12788 * acinclude.m4: Add override.m4.
12789 * configure: Regenerate.
12791 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12793 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12794 initial call to init_register_ppc64.
12796 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12798 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12799 single powerpc*-*-linux* case.
12800 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12802 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12804 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12805 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12807 * linux-ppc-low.c: Include <elf.h>.
12808 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12809 (ppc_hwcap): New global variable.
12810 (ppc_regmap): Remove __SPE__ #ifdef sections.
12811 (ppc_regmap_e500): New global variable.
12812 (ppc_cannot_store_register): Update __SPE__ special case.
12813 (ppc_get_hwcap): New function.
12814 (ppc_arch_setup): Use it to determine whether inferior supports
12815 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12816 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12817 Do not access registers if target does not support AltiVec.
12818 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12819 Do not access registers if target does not support SPE.
12820 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12822 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12824 * linux-low.c (disabled_regsets, num_regsets): New.
12825 (use_regsets_p): Delete.
12826 (linux_wait_for_process): Clear disabled_regsets.
12827 (regsets_fetch_inferior_registers): Check and set it.
12828 (regsets_store_inferior_registers): Likewise.
12829 (linux_fetch_registers, linux_store_registers): Do not use
12831 (initialize_low): Allocate disabled_regsets.
12833 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12835 * Makefile.in (LIBOBJS): New.
12836 (OBS): Use LIBOBJS.
12837 (memmem.o): New rule.
12838 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12839 * configure: Regenerated.
12841 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12843 * server.c (handle_query): Never return "unsupported" for
12844 qXfer:features:read queries.
12846 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12848 * server.c (get_features_xml): Fix inverted condition.
12849 (handle_query): Always support qXfer:feature:read.
12851 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12853 * server.c (wrapper_argv): New.
12854 (start_inferior): Handle wrapper_argv. If set, expect an extra
12856 (gdbserver_usage): Document --wrapper.
12857 (main): Parse --wrapper.
12859 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12861 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12862 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12863 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12864 (ppc_set_pc): Likewise.
12865 (ppc_arch_setup): New function.
12866 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12867 of collect_register.
12868 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12870 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12872 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12873 instead of linux-ppc64-low.o.
12874 * linux-ppc64-low.c: Remove file.
12875 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12876 (linux-ppc64-low.o): Remove rule.
12878 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12879 (init_registers_powerpc_64): Likewise.
12880 (ppc_regmap): Conditionally define depending on __powerpc64__.
12881 (ppc_cannot_store_register): Do not special-case "fpscr" when
12882 compiled on __powerpc64__.
12883 (ppc_collect_ptrace_register): New function.
12884 (ppc_supply_ptrace_register): New function.
12885 (ppc_breakpoint): Change type to "unsigned int".
12886 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12887 (the_low_target): Conditionally provide initializers for the
12888 arch_setup member depending on __powerpc64__. Install
12889 collect_ptrace_register and supply_ptrace_register members.
12891 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12893 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12894 * server.c (gdbserver_xmltarget): Define.
12895 (get_features_xml): Use it to replace "target.xml" and arch_string.
12897 * configure.srv: Remove srv_xmltarget. Add XML files that were
12898 mentioned there to srv_xmlfiles instead. Remove conditional tests
12899 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12900 srv_xmlfiles and srv_regobj to include all possible choices.
12901 * configure.ac (srv_xmltarget): Remove.
12902 (srv_xmlfiles): Do not add "target.xml".
12903 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12904 checks for supplementary target information.
12905 * configure: Regenerate.
12906 * Makefile.in (XML_TARGET): Remove.
12907 (target.xml): Remove rule.
12908 (clean): Do not clean up target.xml.
12909 (.PRECIOUS): Do not mention target.xml.
12911 * target.h (struct target_ops): Remove arch_string member.
12912 * linux-low.c (linux_arch_string): Remove.
12913 (linux_target_ops): Remove arch_string initializer.
12914 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12915 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12916 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12917 * spu-low.c (spu_arch_string): Remove.
12918 (spu_target_ops): Remove arch_string initializer.
12919 * win32-low.c (win32_arch_string): Remove.
12920 (win32_target_ops): Remove arch_string initializer.
12921 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12922 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12923 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12925 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12927 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12928 by collect_ptrace_register and supply_ptrace_register hooks.
12929 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12930 instead of checking for the_low_target.left_pad_xfer.
12931 (usr_store_inferior_registers): Use collect_ptrace_register callback
12932 instead of checking for the_low_target.left_pad_xfer.
12934 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12935 (s390_supply_ptrace_register): Likewise.
12936 (s390_fill_gregset): Call s390_collect_ptrace_register.
12937 (the_low_target): Update.
12939 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12940 (ppc_supply_ptrace_register): Likewise.
12941 (the_low_target): Update.
12943 * linux-i386-low.c (the_low_target): Update.
12944 * linux-x86-64-low.c (the_low_target): Update.
12946 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12948 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12949 reg-s390.o and reg-s390x.o.
12951 * linux-low.c (new_inferior): New global variable.
12952 (linux_create_inferior, linux_attach): Set it.
12953 (linux_wait_for_process): Call the_low_target.arch_setup after the
12954 target has stopped for the first time.
12955 (initialize_low): Do not call the_low_target.arch_setup.
12957 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12958 (s390_set_pc): Likewise.
12959 (s390_arch_setup): New function.
12960 (the_low_target): Use s390_arch_setup as arch_setup routine.
12962 * regcache.c (realloc_register_cache): New function.
12963 (set_register_cache): Call it for each existing regcache.
12965 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12967 * server.h (init_registers): Remove prototype.
12969 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12970 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12971 instead of init_registers ().
12972 * linux-arm-low.c (init_registers_arm): Add prototype.
12973 (init_registers_arm_with_iwmmxt): Likewise.
12974 (the_low_target): Add initializer for arch_setup field.
12975 * linux-cris-low.c (init_registers_cris): Add prototype.
12976 (the_low_target): Add initializer for arch_setup field.
12977 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12978 (the_low_target): Add initializer for arch_setup field.
12979 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12980 (the_low_target): Add initializer for arch_setup field.
12981 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12982 (the_low_target): Add initializer for arch_setup field.
12983 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12984 (the_low_target): Add initializer for arch_setup field.
12985 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12986 (the_low_target): Add initializer for arch_setup field.
12987 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12988 (init_registers_mips64_linux): Likewise.
12989 (the_low_target): Add initializer for arch_setup field.
12990 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12991 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12992 (the_low_target): Add initializer for arch_setup field.
12993 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12994 (init_registers_powerpc_64): Likewise.
12995 (the_low_target): Add initializer for arch_setup field.
12996 * linux-s390-low.c (init_registers_s390): Add prototype.
12997 (init_registers_s390x): Likewise.
12998 (the_low_target): Add initializer for arch_setup field.
12999 * linux-sh-low.c (init_registers_sh): Add prototype.
13000 (the_low_target): Add initializer for arch_setup field.
13001 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13002 (the_low_target): Add initializer for arch_setup field.
13003 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13004 (the_low_target): Add initializer for arch_setup field.
13006 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13007 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13008 instead of init_registers ().
13009 * win32-arm-low.c (init_registers_arm): Add prototype.
13010 (the_low_target): Add initializer for arch_setup field.
13011 * win32-i386-low.c (init_registers_i386): Add prototype.
13012 (the_low_target): Add initializer for arch_setup field.
13014 * spu-low.c (init_registers_spu): Add prototype.
13015 (initialize_low): Call initialie_registers_spu () instead of
13016 initialize_registers ().
13018 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13020 * server.c (handle_v_requests): When handling the vRun and vAttach
13021 packets, if already debugging a process, don't kill it. Return an
13024 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13026 * server.c (handle_query): Correct length check.
13028 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13030 * win32-low.c (do_initial_child_stuff): Add process handle
13031 parameter. Set current_process_handle and current_process_id from the
13032 parameters. Clear globals.
13033 (win32_create_inferior): Don't set current_process_handle and
13034 current_process_id here. Instead pass them on the call to
13035 do_initial_child_stuff.
13036 (win32_attach): Likewise.
13037 (win32_clear_inferiors): New.
13038 (win32_kill): Don't close the current process handle or the
13039 current thread handle here. Instead call win32_clear_inferiors.
13040 (win32_detach): Don't open a new handle to the process. Call
13041 win32_clear_inferiors.
13042 (win32_join): Don't rely on current_process_handle; open a new
13043 handle using the process id.
13044 (win32_wait): Call win32_clear_inferiors when the inferior process
13047 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13049 * server.c (monitor_show_help): Add "exit".
13051 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13053 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13054 (clean): Add reg-xtensa.c.
13055 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13056 * configure.srv (xtensa*-*-linux*) New target.
13057 * linux-xtensa-low.c: New.
13058 * xtensa-xtregs.c: New.
13060 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13062 * hostio.c: Don't include errno.h.
13063 (errno_to_fileio_errno): Move to hostio-errno.
13064 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13065 error number outputting to the target->hostio_last_error callback.
13066 (hostio_packet_error): Use FILEIO_EINVAL directly.
13067 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13068 calls to hostio_error.
13069 * hostio-errno.c: New.
13070 * server.h (hostio_last_error_from_errno): Declare.
13071 * target.h (target_ops): Add hostio_last_error member.
13072 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13073 as hostio_last_error handler.
13074 * spu-low.c (spu_target_ops): Likewise.
13075 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13076 (wince_hostio_last_error): New functions.
13077 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13078 as hostio_last_error handler.
13079 (win32_target_ops) [!_WIN32_WCE]: Register
13080 hostio_last_error_from_errno as hostio_last_error handler.
13081 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13082 (hostio-errno.o): New rule.
13083 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13084 * configure.srv (srv_hostio_err_objs): New variable. Default to
13086 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13087 * configure: Regenerate.
13089 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13091 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13092 (linux_kill, linux_detach): Clean up the process list.
13093 * remote-utils.c (remote_open): Improve port number parsing.
13094 (putpkt_binary, input_interrupt): Only send interrupts if the target
13096 * server.c (extended_protocol): Make static.
13097 (attached): Define earlier.
13098 (exit_requested, response_needed, program_argv): New variables.
13099 (target_running): New.
13100 (start_inferior): Clear attached here.
13101 (attach_inferior): Set attached here.
13102 (require_running): Define.
13103 (handle_query): Use require_running and target_running. Implement
13105 (handle_v_attach, handle_v_run): New.
13106 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13107 (gdbserver_usage): Update.
13108 (main): Redo argument parsing. Handle --debug and --multi. Handle
13109 --attach along with other options or after the port. Save
13110 program_argv. Support no initial program. Resynchronize
13111 communication with GDB after an error. Handle "monitor exit".
13112 Use require_running and target_running. Always allow the extended
13113 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13114 restart in extended mode.
13115 * README: Refer to the GDB manual. Update --attach usage.
13117 2007-12-20 Andreas Schwab <schwab@suse.de>
13119 * linux-low.c (STACK_SIZE): Define.
13120 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13121 (linux_test_for_tracefork): Likewise.
13123 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13125 * linux-low.c (linux_wait_for_event): Update messages. Do not
13126 reinsert auto-delete breakpoints.
13127 * mem-break.c (struct breakpoint): Change return type of handler to
13129 (set_breakpoint_at): Update handler type.
13130 (reinsert_breakpoint_handler): Return 1 instead of calling
13132 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13134 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13135 * mem-break.h (set_breakpoint_at): Update handler type.
13136 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13137 * win32-low.c (auto_delete_breakpoint): New.
13138 (get_child_debug_event): Use it.
13140 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13142 * configure.ac: Check for pread and pwrite.
13143 * hostio.c (handle_pread): Fall back to lseek and read.
13144 (handle_pwrite): Fall back to lseek and write.
13145 * config.in, configure: Regenerated.
13147 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13149 * server.c (myresume): Add own_buf argument.
13150 (main): Update calls.
13152 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13154 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13155 * remote-utils.c (remote_open): Do not call disable_async_io.
13156 (block_async_io): Delete.
13157 (unblock_async_io): Make static.
13158 (initialize_async_io): New.
13159 * server.c (handle_v_cont): Handle async I/O here.
13160 (myresume): Likewise. Move other common resume tasks here...
13161 (main): ... from here. Call initialize_async_io. Disable async
13162 I/O before the main loop.
13163 * server.h (initialize_async_io): Declare.
13164 (block_async_io, unblock_async_io): Delete prototypes.
13165 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13167 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13169 * remote-utils.c (readchar): Allow binary data in received messages.
13171 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13173 * win32-low.c (attaching): New global.
13174 (win32_create_inferior): Clear the `attaching' global.
13175 (win32_attach): Set the `attaching' global.
13176 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13177 attaching. Only set a breakpoint at the entry point if not
13180 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13182 * server.c (main): Don't report dll events on the initial
13183 connection on attaches.
13185 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13187 * server.c (main): Relax numerical bases supported for the pid of
13188 the --attach command line argument.
13190 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13192 * win32-low.c (win32_attach): Call OpenProcess before
13193 DebugActiveProcess, not after. Add last error output to error
13196 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13198 * win32-low.c (win32_get_thread_context)
13199 (win32_set_thread_context): New functions.
13200 (thread_rec): Use win32_get_thread_context.
13201 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13202 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13205 2007-12-03 Leo Zayas
13206 Pedro Alves <pedro_alves@portugalmail.pt>
13208 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13210 (child_add_thread): Minor cleanup.
13211 (child_continue): Resume artificially suspended threads before
13212 calling ContinueDebugEvent.
13213 (suspend_one_thread): New.
13214 (fake_breakpoint_event): New.
13215 (get_child_debug_event): Change return type to int. Check here if
13216 gdb sent an interrupt request. If a soft interrupt was requested,
13217 fake a breakpoint event. Return 0 if there is no event to handle,
13219 (win32_wait): Don't check here if gdb sent an interrupt request.
13220 Ensure there is a valid event to handle.
13221 (win32_request_interrupt): Add soft interruption method as last
13224 2007-12-03 Leo Zayas
13225 Pedro Alves <pedro_alves@portugalmail.pt>
13227 * win32-low.h (win32_thread_info): Add descriptions to the
13228 structure members. Replace `suspend_count' counter by a
13230 * win32-low.c (thread_rec): Update condition of when to get the
13231 context from the inferior. Rely on ContextFlags being set if it
13232 has already been retrieved. Only suspend the inferior thread if
13233 we haven't already. Warn if that fails.
13234 (continue_one_thread): s/suspend_count/suspended/. Only call
13235 ResumeThread once. Warn if that fails.
13237 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13239 * win32-low.c (win32_wait): Don't read from the inferior when it
13240 has already exited.
13242 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13244 * Makefile.in (win32_low_h): New variable.
13245 (win32-low.o): Add dependency on $(win32_low_h).
13246 (win32-arm-low.o, win32-i386-low.o): New rules.
13248 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13250 * hostio.c: Correct copyright year.
13252 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13254 * Makefile.in (OBS): Add hostio.o.
13255 (hostio.o): New rule.
13256 * server.h (handle_vFile): Declare.
13257 * hostio.c: New file.
13258 * server.c (handle_v_requests): Take packet_len and new_packet_len
13259 for binary packets. Call handle_vFile.
13260 (main): Update call to handle_v_requests.
13262 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13264 * linux-low.c: Include <sched.h>.
13266 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13268 * linux-low.c (linux_tracefork_grandchild): New.
13269 (linux_tracefork_child): Use clone.
13270 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13272 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13274 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13276 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13278 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13280 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13282 * inferiors.c (change_inferior_id): Delete.
13283 (add_pid_to_list, pull_pid_from_list): New.
13284 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13285 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13286 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13287 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13288 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13289 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13290 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13291 (using_threads): Always set to 1.
13292 (handle_extended_wait): New.
13293 (add_process): Do not set TID.
13294 (linux_create_inferior): Set must_set_ptrace_flags.
13295 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13296 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13297 (linux_thread_alive): Rename TID argument to LWPID.
13298 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13299 (linux_wait_for_event): Do not use TID or check using_threads. Update
13300 call to dead_thread_notify. Call handle_extended_wait.
13301 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13302 (send_sigstop): Delete sigstop_sent.
13303 (wait_for_sigstop): Avoid TID.
13304 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13305 (linux_test_for_tracefork): New.
13306 (linux_lookup_signals): Use thread_db_active and
13307 linux_supports_tracefork_flag.
13308 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13309 * linux-low.h (get_process_thread): Avoid TID.
13310 (struct process_ifo): Move thread_known and tid to the end. Remove
13312 (linux_attach_lwp, thread_db_init): Update prototypes.
13313 * server.h (change_inferior_id): Delete prototype.
13314 (add_pid_to_list, pull_pid_from_list): New prototypes.
13315 * thread-db.c (thread_db_use_events): New.
13316 (find_first_thread): Rename to...
13317 (find_one_thread): ...this. Update callers and messages. Do not
13318 call fatal. Check thread_db_use_events. Do not call
13319 change_inferior_id or new_thread_notify.
13320 (maybe_attach_thread): Update. Do not call new_thread_notify.
13321 (thread_db_init): Set thread_db_use_events. Check use_events.
13322 * utils.c (fatal, warning): Correct message prefix.
13324 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13326 * Makefile.in (clean): Remove new files.
13327 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13328 (powerpc-64.o, powerpc-64.c): New rules.
13329 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13330 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13332 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13334 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13335 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13336 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13337 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13338 (target_regsets): Add AltiVec and SPE register sets.
13339 * configure.ac: Check for AltiVec and SPE.
13340 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13341 (ppc_fill_vrregset, ppc_store_vrregset): New.
13342 (target_regsets): Add AltiVec register set.
13343 * configure: Regenerated.
13345 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13347 * linux-low.c (O_LARGEFILE): Define.
13348 (linux_read_memory): Use /proc/PID/mem.
13349 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13350 * configure, config.in: Regenerated.
13352 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13354 * linux-low.c (linux_wait_for_event): Do not pass signals while
13357 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13359 * win32-low.c (create_process): New.
13360 (win32_create_inferior): Use create_process instead of
13361 CreateProcess. If create_process failed retry appending an ".exe"
13362 suffix. Store the GetLastError result immediatelly after
13363 create_process calls and use it on the call to error.
13365 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13367 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13369 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13371 * configure.ac: Switch license to GPLv3.
13373 2007-08-01 Michael Snyder <msnyder@access-company.com>
13375 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13377 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13379 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13381 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13382 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13383 CloseToolhelp32Snapshot.
13384 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13385 CloseToolhelp32Snapshot.
13387 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13389 * server.c (main): Check for inferior exit before main loop.
13391 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13393 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13394 instead of on tmp_desc.
13396 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13397 Daniel Jacobowitz <dan@codesourcery.com>
13399 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13400 (add_thread): Minor cleanups.
13401 (clear_inferiors): Move lower in the file. Clear the DLL
13403 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13404 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13405 (xml_escape_text): New.
13406 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13408 (handle_v_cont): Report errors.
13409 (gdbserver_version): Update.
13410 (main): Correct size of own_buf. Do not report initial DLL events.
13411 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13412 (unloaded_dll, xml_escape_text): New.
13413 * win32-low.c (enum target_waitkind): Update comments.
13414 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13415 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13416 (win32_EnumProcessModules, win32_GetModuleInformation)
13417 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13418 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13419 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13420 (win32_Module32First, win32_Module32Next, load_toolhelp)
13421 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13422 (get_child_debug_event): Handle DLL events.
13423 (win32_wait): Likewise.
13425 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13427 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13428 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13430 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13432 * win32-low.c (handle_output_debug_string): Ignore event if not
13435 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13437 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13439 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13441 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13443 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13445 * inferiors.c (change_inferior_id): Add comment.
13446 * linux-low.c (check_removed_breakpoint): Add an early
13447 prototype. Improve debug output.
13448 (linux_attach): Doc update.
13449 (linux_detach_one_process, linux_detach): Clean up before releasing
13451 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13452 * linux-low.h (struct process_info): Doc improvement.
13453 * mem-break.c (delete_all_breakpoints): New.
13454 * mem-break.h (delete_all_breakpoints): New prototype.
13455 * thread-db.c (find_first_thread): New.
13456 (thread_db_create_event): Call it instead of
13457 thread_db_find_new_threads. Clean up unused variables.
13458 (maybe_attach_thread): Remove first thread handling.
13459 (thread_db_find_new_threads): Use find_first_thread.
13460 (thread_db_get_tls_address): Likewise.
13462 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13464 * thread-db.c (thread_db_find_new_threads): Add prototype.
13465 (thread_db_create_event): Check for the main thread before adding
13467 (maybe_attach_thread): Only enable event reporting if TID == 0.
13468 (thread_db_get_tls_address): Check for new threads.
13470 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13472 * linux-low.c (linux_create_inferior): Try execv before execvp.
13473 * spu-low.c (spu_create_inferior): Likewise.
13475 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13477 * linux-low.c (linux_create_inferior): Change execv to execvp.
13478 * spu-low.c (spu_create_inferior): Likewies.
13480 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13482 * Makefile.in (clean): Clean new files instead of deleted ones.
13483 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13484 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13486 * configure.srv: Specify XML files and new regformats for MIPS and
13488 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13489 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13490 an entry for the restart register.
13491 (mips_cannot_fetch_register, mips_cannot_store_register)
13492 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13493 register names to match the XML descriptions.
13494 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13495 restart register instead of $0.
13497 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13498 Markus Deuling <deuling@de.ibm.com>
13500 * remote-utils.c (decode_xfer_write): New function.
13501 * server.h (decode_xfer_write): Add prototype.
13502 * server.c (handle_query): Add PACKET_LEN argument. Support
13503 qXfer:spu:read and qXfer:spu:write packets.
13504 (main): Pass packet_len to handle_query.
13505 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13506 * target.h (target_ops): Add qxfer_spu.
13508 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13510 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13511 accessing non-seekable spufs files.
13513 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13515 * server.c (handle_query): Add reply for qC packet.
13517 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13518 Leo Zayas <lerele@champenstudios@com>
13520 * server.h (check_remote_input_interrupt_request): New function.
13521 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13522 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13523 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13524 (check_remote_input_interrupt_request): New function.
13525 * server.h (check_remote_input_interrupt_request): Declare.
13526 * win32-low.c (winapi_DebugBreakProcess,
13527 winapi_GenerateConsoleCtrlEvent): New typedefs.
13528 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13530 (win32_wait): Check for remote interrupt request
13531 with check_remote_input_interrupt_request.
13532 (win32_request_interrupt): New function.
13533 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13535 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13537 * win32-low.c (debug_registers_changed,
13538 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13539 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13540 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13541 (thread_rec): Get context using the low target.
13542 (child_add_thread): Call thread_added on the low target,
13543 which does the same thing.
13545 (do_initial_child_stuff): Remove debug registers references.
13546 Set context using the low target. Resume threads after
13547 setting the contexts.
13548 (child_continue): Remove dead variable. Remove debug
13549 registers references.
13550 (child_fetch_inferior_registers): Go through the low target.
13551 (do_child_store_inferior_registers): Remove.
13552 (child_store_inferior_registers): Go through the low target.
13553 (win32_resume): Remove debug registers references.
13554 Set context using the low target.
13555 (handle_exception): Change return type to void. Don't record
13556 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13557 first chance exception.
13558 (get_child_debug_event): Change return type to void. Remove
13559 goto loop. Always return after waiting for debug event.
13560 (win32_wait): Convert to switch statement. Handle spurious
13563 * win32-i386-low.c (debug_registers_changed,
13564 debug_registers_used): New.
13565 (initial_stuff): Rename to ...
13566 (i386_initial_stuff): ... this. Clear debug registers
13568 (store_debug_registers): Delete.
13569 (i386_get_thread_context): New.
13570 (load_debug_registers): Delete.
13571 (i386_set_thread_context): New.
13572 (i386_thread_added): New.
13573 (single_step): Rename to ...
13574 (i386_single_step): ... this.
13575 (do_fetch_inferior_registers): Rename to ...
13576 (i386_fetch_inferior_register): ... this.
13577 (i386_store_inferior_register): New.
13578 (the_low_target): Adapt to new interface.
13580 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13581 (arm_get_thread_context): New.
13582 (arm_set_thread_context): New.
13584 (do_fetch_inferior_registers): Rename to ...
13585 (arm_fetch_inferior_register): ... this.
13586 (arm_store_inferior_register): New.
13587 (arm_wince_breakpoint): Reimplement as unsigned long.
13588 (arm_wince_breakpoint_len): Define.
13589 (the_low_target): Adapt to new interface.
13591 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13592 load_debug_registers. Add get_thread_context, set_thread_context,
13593 thread_added and store_inferior_register. Rename
13594 fetch_inferior_registers to fetch_inferior_register.
13595 (regptr): Remove declaration.
13597 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13599 * linux-low.c (linux_detach): Change return type to int. Return 0.
13600 * spu-low.c (spu_detach): Likewise.
13602 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13604 * target.h (target_ops): Change return type of detach to int.
13606 (join_inferior): New.
13607 * server.c (main): Don't skip detach support on mingw32.
13608 If the inferior doesn't support detaching return error.
13609 Call join_inferior instead of using waitpid.
13610 * linux-low.c (linux_join): New.
13611 (linux_target_op): Add linux_join.
13612 * spu-low.c (spu_join): New.
13613 (spu_target_ops): Add spu_join.
13614 * win32-low.c (win32_detach): Adapt to new interface.
13615 Reopen current_process_handle before detaching. Issue a child
13616 resume before detaching.
13618 (win32_target_op): Add win32_join.
13620 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13622 * win32-low.c (win32-attach): Fix return value.
13623 * target.h (target_ops): Describe ATTACH return values.
13625 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13627 * win32-low.c (GETPROCADDRESS): Define.
13628 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13629 (winapi_DebugSetProcessKillOnExit): Likewise.
13630 (win32_create_inferior): Force usage of ansi CreateProcessA.
13631 (win32_attach): Use GETPROCADDRESS.
13632 (win32_detach): Likewise.
13634 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13636 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13638 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13640 * win32-low.c: Commit leftover changes from 2007-03-29.
13642 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13644 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13645 fields short instead of int. Add explicit padding.
13646 (i387_cache_to_fsave): Remove unnecessary casts.
13647 (i387_fsave_to_cache): Doc fix.
13648 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13650 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13652 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13653 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13655 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13657 * configure.srv (arm*-*-mingw32ce*): Move near the other
13660 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13662 * configure.ac: Add errno checking.
13663 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13664 sys/file.h and malloc.h.
13665 (AC_CHECK_DECLS): Add perror.
13666 (srv_mingwce): Handle.
13667 * configure.srv (i[34567]86-*-cygwin*): Add
13668 win32-i386-low.o to srv_tgtobj.
13669 (i[34567]86-*-mingw*): Likewise.
13670 (arm*-*-mingw32ce*): Add case.
13671 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13672 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13673 [__MINGW32CE__] (strerror): New function.
13674 [__MINGW32CE__] (errno): Define to GetLastError.
13675 [__MINGW32CE__] (COUNTOF): New macro.
13676 (remote_open): Remove extra close call.
13677 * mem-break.c (delete_breakpoint_at): New function.
13678 * mem-break.h (delete_breakpoint_at): Declare.
13679 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13680 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13681 [USE_WIN32API] (read, write): Add char* casts.
13682 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13683 * server.h: Include wincecompat.h on Windows CE.
13684 [HAVE_ERRNO_H]: Check.
13685 (perror): Declare if not declared.
13686 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13687 (perror_with_name): Remove errno declaration.
13688 * wincecompat.h: New.
13689 * wincecompat.c: New.
13690 * win32-low.h: New.
13691 * win32-arm-low.c: New.
13692 * win32-i386-low.c: New.
13693 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13694 (OUTMSG2): Make it safe.
13696 (COUNTOF): New macro.
13697 (NUM_REGS): Get it from the low target.
13698 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13699 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13700 (thread_rec): Let low target handle debug registers.
13701 (child_add_thread): Likewise.
13702 (child_init_thread_list): Likewise.
13703 (continue_one_thread): Likewise.
13705 (do_child_fetch_inferior_registers): Move to ...
13706 * win32-i386-low.c: ... here, and rename to ...
13707 (do_fetch_inferior_registers): ... this.
13708 * win32-low.c (child_fetch_inferior_registers):
13709 Go through the low target.
13710 (do_child_store_inferior_registers): Use regptr.
13711 (strwinerror): New function.
13712 (win32_create_inferior): Handle Windows CE.
13713 Use strwinerror instead of strerror on Windows error
13714 codes. Add program to the error output.
13715 Don't close the main thread handle on Windows CE.
13716 (win32_attach): Use coredll.dll on Windows CE.
13717 (win32_kill): Close current process and current
13719 (win32_detach): Use coredll.dll on Windows CE.
13720 (win32_resume): Let low target handle debug registers, and
13722 (handle_exception): Add/Remove initial breakpoint. Avoid
13723 non-existant WSTOPSIG on Windows CE.
13724 (win32_read_inferior_memory): Cast to remove warning.
13725 (win32_arch_string): Go through the low target.
13726 (initialize_low): Call set_breakpoint_data with the low
13727 target's breakpoint.
13728 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13729 FOP_REGNUM, mappings): Move to ...
13730 * win32-i386-low.c: ... here.
13731 * win32-low.c (win32_thread_info): Move to ...
13732 * win32-low.h: ... here.
13733 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13734 win32-arm-low.c and wincecompat.c.
13735 (all:): Add $EXEEXT.
13736 (install-only:): Likewise.
13737 (gdbserver:): Likewise.
13738 (gdbreplay:): Likewise.
13739 * config.in: Regenerate.
13740 * configure: Regenerate.
13742 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13744 * win32-low.c: Rename typedef thread_info to
13745 win32_thread_info throughout.
13747 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13749 * win32-i386-low.c: Rename to ...
13750 * win32-low.c: ... this.
13751 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13752 * Makefile.in: Likewise.
13754 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13756 * remote-utils.c (monitor_output): Constify msg parameter.
13757 * server.h (monitor_output): Likewise.
13758 * win32-i386-low.c (handle_output_debug_string): New.
13759 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13760 handle_output_debug_string.
13761 (get_child_debug_event): Likewise.
13763 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13765 * server.c (main): Correct strtoul check.
13767 2007-03-27 Jon Ringle <jon@ringle.org>
13769 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13771 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13773 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13775 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13777 * terminal.h: Check HAVE_SGTTY_H.
13779 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13781 * remote-utils.c (remote_open): Print out the assigned port number.
13783 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13785 * remote-utils.c (monitor_output): New function.
13786 * server.c (debug_threads): Define here.
13787 (monitor_show_help): New function.
13788 (handle_query): Handle qRcmd.
13789 (main): Do not handle 'd' packet.
13790 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13791 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13794 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13796 * Makefile.in (EXEEXT): New.
13797 (clean): Use $(EXEEXT).
13799 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13801 * target.h (target_ops): Rename send_signal to request_interrupt,
13802 and remove enum target_signal parameter.
13803 * linux-low.c (linux_request_interrupt): Rename from
13804 linux_send_signal, and always send SIGINT.
13805 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13806 and always send SIGINT.
13807 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13809 (input_interrupt): Likewise.
13811 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13813 * server.c (get_features_xml): Check if target implemented
13815 * win32-i386-low.c (win32_arch_string): New.
13816 (win32_target_ops): Add win32_arch_string as arch_string member.
13818 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13820 * spu-low.c (spu_arch_string): New.
13821 (spu_target_ops): Add spu_arch_string.
13823 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13825 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13826 * configure.ac: Do not check for terminal.h.
13827 * configure, config.in: Regenerated.
13829 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13831 * Makefile.in (OBS): Add $(XML_BUILTIN).
13832 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13834 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13835 (arm-with-iwmmxt.c): New.
13836 * config.in, configure: Regenerate.
13837 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13838 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13839 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13840 (arm*-*-linux*): Add iWMMXt and regset support.
13841 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13842 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13843 (arm_store_wmmxregset, target_regsets): New.
13844 * server.c (get_features_xml): Take annex argument. Check builtin
13846 (handle_query): Handle multiple annexes.
13848 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13850 * remote-utils.c [USE_WIN32API] (read, write): Define.
13851 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13854 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13856 * linux-i386-low.c (the_low_target): Set arch_string.
13857 * linux-x86-64-low.c (the_low_target): Likewise.
13858 * linux-low.c (linux_arch_string): New.
13859 (linux_target_ops): Add it.
13860 * linux-low.h (struct linux_target_ops): Add arch_string.
13861 * server.c (write_qxfer_response): Use const void * for DATA.
13862 (get_features_xml): New.
13863 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13864 * target.h (struct target_ops): Add arch_string method.
13866 2007-01-03 Denis Pilat <denis.pilat@st.com>
13867 Daniel Jacobowitz <dan@codesourcery.com>
13869 * linux-low.c (linux_kill): Handle being called with no threads.
13870 * win32-i386-low.c (win32_kill): Likewise.
13871 (get_child_debug_event): Clear current_process_handle.
13873 2006-12-30 Denis PILAT <denis.pilat@st.com>
13874 Daniel Jacobowitz <dan@codesourcery.com>
13876 * remote-utils.c (remote_open): Check the type of specified
13877 serial port devices before opening them.
13878 * server.c (main): Kill the inferior if an error occurs during
13879 the first remote_open.
13881 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13883 * README: Update supported targets.
13885 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13887 * Makefile.in (clean): Remove reg-mips64.c.
13888 (reg-mips64.c, reg-mips64.o): New rules.
13889 * configure.srv: Handle mips64. Include regset support for mips.
13890 * linux-mips-low.c (union mips_register): New.
13891 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13892 (mips_breakpoint, mips_breakpoint_at): Use int.
13893 (mips_collect_register, mips_supply_register)
13894 (mips_collect_register_32bit, mips_supply_register_32bit)
13895 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13896 (mips_store_fpregset, target_regsets): New.
13897 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13899 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13901 * configure.srv: Add target "spu*-*-*".
13902 * Makefile.in (clean): Remove reg-spu.c.
13903 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13904 * spu-low.c: New file.
13906 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13908 * configure.ac: Correct td_thr_tls_get_addr test.
13909 * configure: Regenerated.
13911 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13913 * linux-low.c (linux_wait_for_event): Reformat. Use the
13914 pass_signals array.
13915 * remote-utils.c (decode_address_to_semicolon): New.
13916 * server.c (pass_signals, handle_general_set): New.
13917 (handle_query): Mention QPassSignals for qSupported.
13918 (main): Call handle_general_set.
13919 * server.h (pass_signals, decode_address_to_semicolon): New.
13921 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13923 * server.c (handle_query): Correct error handling for read_auxv.
13925 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13927 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13928 and srv_linux_thread_db to yes.
13929 * linux-s390-low.c (s390_fill_gregset): New function.
13930 (target_regsets): Define data structure.
13932 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13934 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13935 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13936 * config.in, configure: Regenerated.
13937 * inferiors.c (gdb_id_to_thread): New function.
13938 (gdb_id_to_thread_id): Use it.
13939 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13940 * linux-low.h (struct process_info): Add th member.
13941 (thread_db_get_tls_address): New prototype.
13942 * remote-utils.c (decode_address): Make non-static.
13943 * server.c (handle_query): Handle qGetTLSAddr.
13944 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13945 * target.h (struct target_ops): Add get_tls_address.
13946 * thread-db.c (maybe_attach_thread): Save the thread handle.
13947 (thread_db_get_tls_address): New.
13949 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13951 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13952 (linux_resume_one_process): Take a siginfo_t *. Update all
13953 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13954 (struct pending_signals): Add a siginfo_t.
13955 (linux_wait_for_process): Always set last_status.
13956 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13957 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13958 * linux-low.h (struct process_info): Add last_status.
13960 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13962 * remote-utils.c (try_rle): New function.
13963 (putpkt_binary): Use it.
13965 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13967 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13968 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13969 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13970 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13971 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13974 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13976 * server.c (terminal_fd): New variable.
13977 (old_foreground_pgrp): Likewise.
13978 (restore_old_foreground_pgrp): New function.
13979 (start_inferior): Record the terminal file descriptor in terminal_fd
13980 and its original foreground group in old_foreground_pgrp. Register
13981 restore_old_foreground_pgrp with atexit().
13983 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13985 * server.c (handle_query): Correct qPart to qXfer.
13987 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13989 * configure.ac: Check for more headers which are missing on
13990 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13991 * configure.srv: Add Cygwin and mingw32.
13992 * remote-utils.c: Don't include headers unconditionally which
13993 are missing on mingw32. Include <winsock.h> for mingw32.
13994 (remote_open): Adjust for mingw32 support. Flush
13995 standard error after writing to it.
13996 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13997 (unblock_async_io, enable_async_io, disable_async_io)
13998 (readchar, getpkt): Update for Winsock support.
13999 (prepare_resume_reply): Expect a protocol signal number.
14000 * server.c: Disable <sys/wait.h> on mingw32.
14001 (start_inferior): Adjust for mingw32 support. Flush
14002 standard error after writing to it.
14003 (attach_inferior): Likewise. Use protocol signal
14005 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14007 * win32-i386-low.c: New file.
14008 * Makefile.in (XM_CLIBS): Set.
14009 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14010 (win32-i386-low.o): New dependency rule.
14011 * linux-low.c (linux_wait): Use target signal numbers.
14012 * target.h (struct target_ops): Doc fix.
14013 * server.h (target_signal_to_name): New prototype.
14014 * gdbreplay.c: Don't include headers unconditionally which
14015 are missing on mingw32. Include <winsock.h> for mingw32.
14016 (remote_close, remote_open): Adjust for Winsock support.
14017 * configure, config.in: Regenerated.
14019 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14021 * server.c (decode_xfer_read, write_qxfer_response): New.
14022 (handle_query): Take a packet length argument. Handle
14023 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14024 the qSupported response.
14025 (main): Update call to handle_query.
14027 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14029 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14030 (putpkt_binary): Renamed from putpkt and adjusted for binary
14032 (putpkt): New wrapper for putpkt_binary.
14033 (readchar): Don't mask off the high bit.
14034 (decode_X_packet): New function.
14035 * server.c (main): Call putpkt_binary if a handler sets the packet
14036 length. Save the length of the incoming packet. Handle 'X'.
14037 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14039 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14041 * server.c (handle_query): Handle qSupported.
14043 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14045 * remote-utils.c (all_symbols_looked_up): New variable.
14046 (look_up_one_symbol): Check it.
14047 * server.h (look_up_one_symbol): New declaration.
14048 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14050 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14052 * Makefile.in (linux-arm-low.o): Update dependencies.
14053 * linux-arm-low.c: Include "gdb_proc_service.h".
14054 (PTRACE_GET_THREAD_AREA): Define.
14055 (ps_get_thread_area): New function.
14057 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14059 * configure.srv (m68k*-*-uclinux*): New target.
14060 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14061 (linux_resume_one_process): Remove extraneous cast.
14062 (linux_read_offsets): New.
14063 (linux_target_op): Add linux_read_offsets on mmuless systems.
14064 * server.c (handle_query): Add qOffsets logic.
14065 * target.h (struct target_ops): Add read_offsets.
14067 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14069 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14070 (PTRACE_GET_THREAD_AREA): Define.
14071 (ps_get_thread_area): New function.
14072 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14073 (linux-x86-64-low.o): Update.
14075 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14077 * configure.ac: Remove checks for prfpregset_t.
14078 * gdb_proc_service.h: New file.
14079 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14080 new "gdb_proc_service.h".
14081 * proc-service.c: Likewise.
14082 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14083 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14084 * Makefile.in (gdb_proc_service_h): Updated.
14085 * configure, config.in: Regenerated.
14087 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14089 * remote-utils.c (prepare_resume_reply): Move declaration
14090 of gdb_id_from_wait to the top of the block.
14092 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14094 * linux-low.c (regsets_store_inferior_registers): Read the regset
14095 from the target before filling it.
14097 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14099 * server.c (attach_inferior): Return SIGTRAP for a successful
14102 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14104 * Makefile.in (OBS): Add version.o.
14105 (STAGESTUFF): Delete.
14106 (version.o): Add dependencies.
14107 (version.c): Replace rule.
14108 (clean): Remove version.c.
14109 * server.c (gdbserver_version): New.
14110 (gdbserver_usage): Use printf.
14111 (main): Handle --version and --help.
14112 * server.h (version, host_name): Add declarations.
14114 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14126 * linux-x86-64-low.c:
14128 * linux-s390-low.c:
14129 * linux-ppc64-low.c:
14131 * linux-mips-low.c:
14132 * linux-m68k-low.c:
14133 * linux-m32r-low.c:
14136 * linux-ia64-low.c:
14137 * linux-i386-low.c:
14138 * linux-crisv32-low.c:
14150 * gdbserver.1: Add (C) after Copyright. Update the FSF
14153 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14155 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14156 (arm_breakpoint_at): Recognize both breakpoints.
14157 (the_low_target): Use the correct breakpoint instruction.
14159 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14161 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14162 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14163 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14164 (the_low_target): Update.
14166 2005-10-25 Andreas Schwab <schwab@suse.de>
14168 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14170 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14171 (ia64_num_regs): Reduce to 462.
14173 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14175 * acinclude.m4: Correct quoting.
14176 * aclocal.m4: Regenerated.
14178 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14179 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14180 (thread_db_init): Call thread_db_err_str.
14181 * configure.ac: Check for TD_VERSION.
14182 * config.in, configure: Regenerated.
14184 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14186 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14188 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14190 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14191 is not available. Define HAVE_PTRACE_GETREGS if it is.
14192 * config.in, configure: Regenerated.
14193 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14194 * linux-i386-low.c, linux-m68k-low.c: Update to use
14195 HAVE_PTRACE_GETREGS.
14196 * linux-low.c (regsets_fetch_inferior_registers)
14197 (regsets_store_inferior_registers): Only return 0 if we processed
14199 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14200 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14202 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14204 * inferiors.c (struct thread_info): Add gdb_id.
14205 (add_thread): Add gdb_id argument.
14206 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14207 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14208 calls to add_thread.
14209 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14210 * server.c (handle_query): Use thread_to_gdb_id.
14211 (handle_v_cont, main): Use gdb_id_to_thread_id.
14212 * server.h (add_thread): Update prototype.
14213 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14216 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14218 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14219 left-padded registers.
14220 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14221 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14223 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14225 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14226 * configure: Regenerate.
14227 * config.in: Regenerate.
14228 * server.h (NEED_DECLARATION_STRERROR):
14229 Replace with !HAVE_DECL_STRERROR.
14231 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14233 * linux-low.c (linux_wait, linux_send_signal): Don't test
14234 an unsigned long variable for > 0 if it could be MAX_ULONG.
14235 * server.c (myresume): Likewise.
14236 * target.c (set_desired_inferior): Likewise.
14238 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14240 * configure.ac: Simplify and improve check for socklen_t.
14241 * configure, config.in: Regenerate.
14243 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14245 * acconfig.h: Remove.
14246 * configure.ac: Add a test for socklen_t. Use three-argument
14247 AC_DEFINE throughout.
14248 * config.in: Regenerated using autoheader 2.59.
14249 * configure: Regenerated.
14251 * gdbreplay.c (socklen_t): Provide a default.
14252 (remote_open): Use socklen_t.
14253 * remote-utils.c (socklen_t): Provide a default.
14254 (remote_open): Use socklen_t.
14255 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14258 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14260 * linux-low.c (linux_read_memory, linux_write_memory)
14261 (linux_read_auxv): Likewise.
14262 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14263 (check_mem_write): Likewise.
14264 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14266 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14267 (registers_from_string, register_data): Likewise.
14268 * server.c (handle_query, main): Likewise.
14269 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14270 (decode_M_packet): Likewise.
14271 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14272 * target.h (struct target_ops): Update read_memory, write_memory,
14274 (read_inferior_memory, write_inferior_memory): Update.
14275 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14276 to unsigned char *.
14277 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14278 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14279 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14280 linux-s390-low.c, linux-sh-low.c: Update for changes in
14281 read_inferior_memory and the_low_target->breakpoint.
14283 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14285 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14286 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14287 * configure.srv: Add powerpc64-*-linux*.
14288 * linux-ppc64-low.c: New file.
14290 2005-05-23 Orjan Friberg <orjanf@axis.com>
14292 * linux-cris-low.c: New file with support for CRIS.
14293 * linux-crisv32-low.c: Ditto for CRISv32.
14294 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14295 (clean): Add reg-cris.c and reg-crisv32.c.
14296 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14297 reg-crisv32.o, and reg-crisv32.c to make rules.
14298 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14299 recognized targets.
14301 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14303 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14304 of sizeof (PTRACE_XFER_TYPE).
14305 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14307 2005-05-12 Orjan Friberg <orjanf@axis.com>
14309 * target.h (struct target_ops): Add insert_watchpoint,
14310 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14311 pointers for hardware watchpoint support.
14312 * linux-low.h (struct linux_target_ops): Ditto.
14313 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14314 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14315 to linux_target_ops.
14316 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14318 * server.c (main): Recognize 'Z' and 'z' packets.
14320 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14322 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14323 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14324 (the_low_target): Add new members.
14326 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14328 * proc-service.c (ps_lgetregs): Search all_processes instead of
14331 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14333 * server.c (start_inferior): Change return type to int.
14334 (attach_inferior): Change sigptr to int *.
14335 (handle_v_cont, handle_v_requests): Change signal to int *.
14336 (main): Change signal to int.
14338 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14340 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14341 * configure.srv: Add m32r*-*-linux*.
14342 * linux-m32r-low.c: New file.
14344 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14346 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14348 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14350 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14351 Take unsigned long arguments for PIDs.
14352 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14353 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14354 (wait_for_sigstop, linux_resume_one_process)
14355 (regsets_fetch_inferior_registers, linux_send_signal)
14356 (linux_read_auxv): Likewise. Update the types of variables holding
14357 PIDs. Update format string specifiers.
14358 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14359 * remote-utils.c (prepare_resume_reply): Likewise.
14360 * server.c (cont_thread, general_thread, step_thread)
14361 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14363 (handle_query): Update format specifiers.
14364 (handle_v_cont, main): Use strtoul for thread IDs.
14365 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14366 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14367 (general_thread, step_thread, thread_from_wait)
14368 (old_thread_from_wait): Update.
14369 * target.h (struct thread_resume): Use unsigned long for THREAD.
14370 (struct target_ops): Use unsigned long for arguments to attach and
14373 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14375 * acinclude.m4: Include bfd/bfd.m4 directly.
14376 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14377 <agriffis@toolchain.org>.
14378 * aclocal.m4, configure: Regenerated.
14380 2005-01-07 Andrew Cagney <cagney@gnu.org>
14382 * configure.ac: Rename configure.in, require autoconf 2.59.
14383 * configure: Re-generate.
14385 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14387 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14388 LIBS when finished.
14389 * aclocal.m4: Regenerated.
14390 * configure: Regenerated.
14392 2004-11-21 Andreas Schwab <schwab@suse.de>
14394 * linux-m68k-low.c (m68k_num_gregs): Define.
14395 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14396 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14397 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14398 (m68k_breakpoint_at): New. Add to the_low_target.
14400 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14401 srv_linux_thread_db to yes.
14403 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14405 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14406 (ARCH_SET_FS): Likewise.
14407 (ARCH_GET_FS): Likewise.
14408 (ARCH_GET_GS): Likewise.
14410 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14412 * linux-i386-low.c (ps_get_thread_area): New.
14413 * linux-x86-64-low.c (ps_get_thread_area): New.
14414 * linux-low.c: Include <sys/syscall.h>.
14415 (linux_kill_one_process): Don't kill the first thread here.
14416 (linux_kill): Kill the first thread here.
14417 (kill_lwp): New function.
14418 (send_sigstop, linux_send_signal): Use it.
14419 * proc-service.c: Clean up #ifdefs.
14420 (fpregset_info): Delete.
14421 (ps_lgetregs): Update and enable implementation.
14422 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14424 * remote-utils.c (struct sym_cache, symbol_cache): New.
14425 (input_interrupt): Print a clearer message.
14426 (async_io_enabled): New variable.
14427 (enable_async_io, disable_async_io): Use it. Update comments.
14428 (look_up_one_symbol): Use the symbol cache.
14429 * thread-db.c (thread_db_look_up_symbols): New function.
14430 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14432 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14434 * configure.in: Test for -rdynamic.
14435 * configure: Regenerated.
14436 * Makefile (INTERNAL_LDFLAGS): New.
14437 (gdbserver, gdbreplay): Use it.
14439 2004-09-02 Andrew Cagney <cagney@gnu.org>
14441 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14443 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14445 * linux-low.c (linux_wait): Clear all_processes list also.
14447 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14449 * linux-low.c: Include <errno.h>. Remove extern declaration of
14452 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14454 * gdbreplay.c, server.h, utils.c: Update copyright years.
14456 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14458 * server.c (main): Print child status or termination signal from
14459 variable 'signal', not 'sig'.
14461 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14463 * linux-low.c (linux_read_memory): Change return type to
14464 int. Check for and return error from ptrace().
14465 * target.c (read_inferior_memory): Change return type to int. Pass
14466 back return status from the_target->read_memory().
14467 * target.h (struct target_ops): Adapt *read_memory() prototype.
14469 (read_inferior_memory): Adapt prototype.
14470 * server.c (main): Return an error packet if
14471 read_inferior_memory() returns an error.
14473 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14475 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14476 Unify with other clean targets.
14478 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14480 * server.c (handle_v_cont): Call set_desired_inferior.
14482 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14484 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14486 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14488 * linux-low.c (linux_wait): Unblock async I/O.
14489 (linux_resume): Block and enable async I/O.
14490 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14491 * server.h (block_async_io, unblock_async_io): Add prototypes.
14493 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14495 * remote-utils.c (remote_open): Print a status notice after
14496 opening a TCP port.
14497 * server.c (attach_inferior): Print a status notice after
14500 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14502 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14504 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14506 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14508 * server.c, target.h: Update copyright years.
14510 2004-02-25 Roland McGrath <roland@redhat.com>
14512 * target.h (struct target_ops): New member `read_auxv'.
14513 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14514 * linux-low.c (linux_read_auxv): New function.
14515 (linux_target_ops): Initialize `read_auxv' member to that.
14517 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14519 Committed by Jim Blandy <jimb@redhat.com>.
14521 * linux-s390-low.c (s390_num_regs): Update.
14522 (s390_regmap): Remove control registers. Use __s390x__ predefine
14523 instead of GPR_SIZE to distiguish s390 and s390x targets.
14525 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14527 * linux-low.c: Update copyright year.
14528 (check_removed_breakpoint): Clear pending_is_breakpoint.
14529 (linux_set_resume_request, linux_queue_one_thread)
14530 (resume_status_pending_p): New functions.
14531 (linux_continue_one_thread): Use process->resume.
14532 (linux_resume): Only resume threads if there are no pending events.
14533 * linux-low.h (struct process_info): Add resume request
14536 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14538 * regcache.c (new_register_cache): Clear the allocated register
14539 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14541 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14543 * linux-low.c (linux_resume): Take a struct thread_resume *
14545 (linux_wait): Update call.
14546 (resume_ptr): New static variable.
14547 (linux_continue_one_thread): Renamed from
14548 linux_continue_one_process. Use resume_ptr.
14549 (linux_resume): Use linux_continue_one_thread.
14550 * server.c (handle_v_cont, handle_v_requests): New functions.
14551 (myresume): New function.
14552 (main): Handle 'v' case.
14553 * target.h (struct thread_resume): New type.
14554 (struct target_ops): Change argument of "resume" to struct
14556 (myresume): Delete macro.
14558 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14560 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14561 (uninstall): Support DESTDIR.
14563 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14565 * configure.srv: Add xscale*linux copy of arm*linux entry.
14567 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14569 * linux-arm-low.c (arm_reinsert_addr): New function.
14570 (the_low_target): Add arm_reinsert_addr.
14572 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14574 * mem-break.c: Remove whitespace at end of file.
14576 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14578 * configure.in: Check whether we need to prototype strerror.
14579 * server.h: Optionally prototype strerror.
14580 * gdbreplay.c (perror_with_name): Use strerror.
14581 * linux-low.c (linux_attach_lwp): Use strerror.
14582 * utils.c (perror_with_name): Use strerror.
14583 * config.in, configure: Regenerated.
14585 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14587 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14588 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14590 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14592 * Makefile.in (SFILES): Update.
14593 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14594 low-sun3.c: Remove files.
14596 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14598 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14599 (linux_detach_one_process, linux_detach): New functions.
14600 (linux_target_ops): Add linux_detach.
14601 * server.c (main): Handle 'D' packet.
14602 * target.h (struct target_ops): Add "detach" member.
14603 (detach_inferior): Define.
14605 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14607 From Kelley Cook <kelleycook@wideopenwest.com>:
14608 * configure.srv: Accept i[34567]86 variants.
14610 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14612 * linux-low.c (linux_wait_for_event): Correct comment typos.
14613 (linux_resume_one_process): Call check_removed_breakpoint.
14614 (linux_send_signal): New function.
14615 (linux_target_ops): Add linux_send_signal.
14616 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14618 * target.h (struct target_ops): Add send_signal.
14620 2003-05-29 Jim Blandy <jimb@redhat.com>
14622 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14623 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14624 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14625 away part of the register's value.
14627 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14629 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14630 (linux_wait_for_event, linux_init_signals): Likewise.
14632 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14634 * configure.in: Check for stdlib.h.
14635 * configure: Regenerated.
14636 * config.in: Regenerated.
14638 2003-01-04 Andreas Schwab <schwab@suse.de>
14640 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14642 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14644 * Makefile.in: Remove obsolete code.
14646 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14648 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14649 defined(PT_FPR0_HI).
14651 2002-11-17 Stuart Hughes <seh@zee2.com>
14653 * linux-arm-low.c (arm_num_regs): Increase.
14654 (arm_regmap): Include status register.
14656 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14658 * linux-low.c (register_addr): Remove incorrect -1 check.
14660 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14662 * linux-low.c (linux_create_inferior): Call setpgid. Return
14664 (unstopped_p, linux_signal_pid): Remove.
14665 (linux_target_ops): Remove linux_signal_pid.
14666 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14667 global instead of target method.
14668 * target.h (struct target_ops): Remove signal_pid. Update comment
14669 for create_inferior.
14670 * server.c (signal_pid): New variable.
14671 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14672 gdbserver. Set the child to be the foreground process group.
14673 (attach_inferior): Set signal_pid.
14675 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14677 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14679 2002-08-20 Jim Blandy <jimb@redhat.com>
14681 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14684 2002-08-01 Andrew Cagney <cagney@redhat.com>
14686 * Makefile.in: Make chill references obsolete.
14688 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14690 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14691 * configure: Regenerate.
14692 * config.in: Regenerate.
14694 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14696 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14697 (perror_with_name, remote_close, remote_open, expect, play): Static.
14699 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14701 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14702 byte offsets instead of an array of indexes.
14703 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14705 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14707 * regcache.c: Add comment.
14709 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14711 * thread-db.c: New file.
14712 * proc-service.c: New file.
14713 * acinclude.m4: New file.
14714 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14715 proc-service.o, and thread-db.o.
14716 (linux-low.o): Add USE_THREAD_DB.
14717 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14718 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14719 * aclocal.m4: Regenerated.
14720 * config.in: Regenerated.
14721 * configure: Regenerated.
14722 * configure.in: Check for proc_service.h, sys/procfs.h,
14723 thread_db.h, and linux/elf.h headrs.
14724 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14725 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14726 Check for -lthread_db and thread support.
14727 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14728 PowerPC, and SuperH.
14729 * i387-fp.c: Constify arguments.
14730 * i387-fp.h: Likewise.
14731 * inferiors.c: (struct thread_info): Renamed from
14732 `struct inferior_info'. Remove PID member. Use generic inferior
14733 list header. All uses updated.
14734 (inferiors, signal_pid): Removed.
14735 (all_threads): New variable.
14736 (get_thread): Define.
14737 (add_inferior_to_list): New function.
14738 (for_each_inferior): New function.
14739 (change_inferior_id): New function.
14740 (add_inferior): Removed.
14741 (remove_inferior): New function.
14742 (add_thread): New function.
14743 (free_one_thread): New function.
14744 (remove_thread): New function.
14745 (clear_inferiors): Use for_each_inferior and free_one_thread.
14746 (find_inferior): New function.
14747 (find_inferior_id): New function.
14748 (inferior_target_data): Update argument type.
14749 (set_inferior_target_data): Likewise.
14750 (inferior_regcache_data): Likewise.
14751 (set_inferior_regcache_data): Likewise.
14752 * linux-low.c (linux_bp_reinsert): Remove.
14753 (all_processes, stopping_threads, using_thrads)
14754 (struct pending_signals, debug_threads, pid_of): New.
14755 (inferior_pid): Replace with macro.
14756 (struct inferior_linux_data): Remove.
14757 (get_stop_pc, add_process): New functions.
14758 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14759 Use add_process and add_thread.
14760 (linux_attach_lwp): New function, based on old linux_attach. Use
14761 add_process and add_thread. Set stop_expected for new threads.
14762 (linux_attach): New function.
14763 (linux_kill_one_process): New function.
14764 (linux_kill): Kill all LWPs.
14765 (linux_thread_alive): Use find_inferior_id.
14766 (check_removed_breakpoints, status_pending_p): New functions.
14767 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14768 Update. Use WNOHANG. Wait for cloned processes also. Update process
14769 struct for the found process.
14770 (linux_wait_for_event): New function.
14771 (linux_wait): Use it. Support LWPs.
14772 (send_sigstop, wait_for_sigstop, stop_all_processes)
14773 (linux_resume_one_process, linux_continue_one_process): New functions.
14774 (linux_resume): Support LWPs.
14775 (REGISTER_RAW_SIZE): Remove.
14776 (fetch_register): Use register_size instead. Call supply_register.
14777 (usr_store_inferior_registers): Likewise. Call collect_register.
14778 Fix recursive case.
14779 (regsets_fetch_inferior_registers): Improve error message.
14780 (regsets_store_inferior_registers): Add debugging.
14781 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14782 (unstopped_p, linux_signal_pid): New functions.
14783 (linux_target_ops): Add linux_signal_pid.
14784 (linux_init_signals): New function.
14785 (initialize_low): Call it. Initialize using_threads.
14786 * regcache.c (inferior_regcache_data): Add valid
14788 (get_regcache): Fetch registers lazily. Add fetch argument
14789 and update all callers.
14790 (regcache_invalidate_one, regcache_invalidate): New
14792 (new_register_cache): Renamed from create_register_cache.
14793 Return the new regcache.
14794 (free_register_cache): Change argument to a void *.
14795 (registers_to_string, registers_from_string): Call get_regcache
14796 with fetch flag set.
14797 (register_data): Make static. Pass fetch flag to get_regcache.
14798 (supply_register): Call get_regcache with fetch flag clear.
14799 (collect_register): Call get_regcache with fetch flag set.
14800 (collect_register_as_string): New function.
14801 * regcache.h: Update.
14802 * remote-utils.c (putpkt): Flush after debug output and use
14804 Handle input interrupts while waiting for an ACK.
14805 (input_interrupt): Use signal_pid method.
14806 (getpkt): Flush after debug output and use stderr.
14807 (outreg): Use collect_register_as_string.
14808 (new_thread_notify, dead_thread_notify): New functions.
14809 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14810 and general_thread.
14811 (look_up_one_symbol): Flush after debug output.
14812 * server.c (step_thread, server_waiting): New variables.
14813 (start_inferior): Don't use signal_pid. Update call to mywait.
14814 (attach_inferior): Update call to mywait.
14815 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14816 (main): Don't fetch/store registers explicitly. Use
14817 set_desired_inferior. Support proposed ``Hs'' packet. Update
14819 * server.h: Update.
14820 (struct inferior_list, struct_inferior_list_entry): New.
14821 * target.c (set_desired_inferior): New.
14822 (write_inferior_memory): Constify.
14823 (mywait): New function.
14824 * target.h: Update.
14825 (struct target_ops): New signal_pid method.
14826 (mywait): Removed macro, added prototype.
14828 * linux-low.h (regset_func): Removed.
14829 (regset_fill_func, regset_store_func): New.
14830 (enum regset_type): New.
14831 (struct regset_info): Add type field. Use new operation types.
14832 (struct linux_target_ops): stop_pc renamed to get_pc.
14833 Add decr_pc_after_break and breakpoint_at.
14834 (get_process, get_thread_proess, get_process_thread)
14835 (strut process_info, all_processes, linux_attach_lwp)
14836 (thread_db_init): New.
14838 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14839 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14840 (the_low_target): Add new members.
14841 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14842 (i386_store_fpxregset): Constify.
14843 (target_regsets): Add new kind identifier.
14844 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14845 (i386_set_pc): Add debugging.
14846 (i386_breakpoint_at): New function.
14847 (the_low_target): Add new members.
14848 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14849 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14850 (mips_breakpoint_at): New.
14851 (the_low_target): Add new members.
14852 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14853 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14854 (the_low_target): Add new members.
14855 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14856 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14857 (the_low_target): Add new members.
14858 * linux-x86-64-low.c (target_regsets): Add new kind
14861 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14863 From Martin Pool <mbp@samba.org>:
14864 * server.c (gdbserver_usage): New function.
14867 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14869 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14870 stop_at -> stop_pc.
14872 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14874 * Makefile.in: Remove obsolete code.
14876 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14878 * linux-low.c (regsets_fetch_inferior_registers),
14879 (regsets_store_inferior_registers): Removed cast to int from
14881 * regcache.h: Added declaration of struct inferior_info.
14883 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14885 * inferiors.c (struct inferior_info): Add regcache_data.
14886 (add_inferior): Call create_register_cache.
14887 (clear_inferiors): Call free_register_cache.
14888 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14889 * regcache.c (struct inferior_regcache_data): New.
14890 (registers): Remove.
14891 (get_regcache): New function.
14892 (create_register_cache, free_register_cache): New functions.
14893 (set_register_cache): Don't initialize the register cache here.
14894 (registers_to_string, registers_from_string, register_data): Call
14896 * regcache.h: Add prototypes.
14897 * server.h: Likewise.
14899 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14901 * mem-break.c: New file.
14902 * mem-break.h: New file.
14903 * Makefile.in: Add mem-break.o rule; update server.h
14905 * inferiors.c (struct inferior_info): Add target_data
14907 (clear_inferiors): Free target_data member if set.
14908 (inferior_target_data, set_inferior_target_data): New functions.
14909 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14910 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14911 * linux-low.c (linux_bp_reinsert): New variable.
14912 (struct inferior_linux_data): New.
14913 (linux_create_inferior): Use set_inferior_target_data.
14914 (linux_attach): Likewise. Call add_inferior.
14915 (linux_wait_for_one_inferior): New function.
14916 (linux_wait): Call it.
14917 (linux_write_memory): Add const.
14918 (initialize_low): Call set_breakpoint_data.
14919 * linux-low.h (struct linux_target_ops): Add breakpoint
14921 * server.c (attach_inferior): Remove extra add_inferior
14923 * server.h: Include mem-break.h. Update inferior.c
14925 * target.c (read_inferior_memory)
14926 (write_inferior_memory): New functions.
14927 * target.h (read_inferior_memory)
14928 (write_inferior_memory): Change macros to prototypes.
14929 (struct target_ops): Update comments. Add const to write_memory
14932 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14934 * linux-low.c (usr_store_inferior_registers): Support
14935 registers which are allowed to fail to store.
14936 * linux-low.h (linux_target_ops): Likewise.
14937 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14938 (ppc_cannot_store_register): FPSCR may not be storable.
14940 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14942 * server.h: Include <string.h> if HAVE_STRING_H.
14943 * ChangeLog: Correct paths in last ChangeLog entry.
14945 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14947 * linux-low.h: Remove obsolete prototypes.
14948 (struct linux_target_ops): New.
14949 (extern the_low_target): New.
14950 * linux-low.c (num_regs, regmap): Remove declarations.
14951 (register_addr): Use the_low_target explicitly.
14952 (fetch_register): Likewise.
14953 (usr_fetch_inferior_registers): Likewise.
14954 (usr_store_inferior_registers): Likewise.
14955 * linux-arm-low.c (num_regs): Remove.
14956 (arm_num_regs): Define.
14957 (arm_regmap): Renamed from regmap, made static.
14958 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14960 (arm_cannot_store_register): Renamed from cannot_store_register,
14962 (the_low_target): New.
14963 * linux-i386-low.c (num_regs): Remove.
14964 (i386_num_regs): Define.
14965 (i386_regmap): Renamed from regmap, made static.
14966 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14968 (i386_cannot_store_register): Renamed from cannot_store_register,
14970 (the_low_target): New.
14971 * linux-ia64-low.c (num_regs): Remove.
14972 (ia64_num_regs): Define.
14973 (ia64_regmap): Renamed from regmap, made static.
14974 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14976 (ia64_cannot_store_register): Renamed from cannot_store_register,
14978 (the_low_target): New.
14979 * linux-m68k-low.c (num_regs): Remove.
14980 (m68k_num_regs): Define.
14981 (m68k_regmap): Renamed from regmap, made static.
14982 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14984 (m68k_cannot_store_register): Renamed from cannot_store_register,
14986 (the_low_target): New.
14987 * linux-mips-low.c (num_regs): Remove.
14988 (mips_num_regs): Define.
14989 (mips_regmap): Renamed from regmap, made static.
14990 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14992 (mips_cannot_store_register): Renamed from cannot_store_register,
14994 (the_low_target): New.
14995 * linux-ppc-low.c (num_regs): Remove.
14996 (ppc_num_regs): Define.
14997 (ppc_regmap): Renamed from regmap, made static.
14998 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15000 (ppc_cannot_store_register): Renamed from cannot_store_register,
15002 (the_low_target): New.
15003 * linux-s390-low.c (num_regs): Remove.
15004 (s390_num_regs): Define.
15005 (s390_regmap): Renamed from regmap, made static.
15006 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15008 (s390_cannot_store_register): Renamed from cannot_store_register,
15010 (the_low_target): New.
15011 * linux-sh-low.c (num_regs): Remove.
15012 (sh_num_regs): Define.
15013 (sh_regmap): Renamed from regmap, made static.
15014 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15016 (sh_cannot_store_register): Renamed from cannot_store_register,
15018 (the_low_target): New.
15019 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15020 (the_low_target): New.
15022 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15024 * Makefile.in: Add stamp-h target.
15025 * configure.in: Create stamp-h.
15026 * configure: Regenerated.
15028 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15030 * inferiors.c: New file.
15031 * target.c: New file.
15032 * target.h: New file.
15033 * Makefile.in: Add target.o and inferiors.o. Update
15035 * linux-low.c (inferior_pid): New static variable,
15036 moved from server.c.
15037 (linux_create_inferior): Renamed from create_inferior.
15038 Call add_inferior. Return 0 on success instead of a PID.
15039 (linux_attach): Renamed from myattach.
15040 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15041 (linux_thread_alive): Renamed from mythread_alive.
15042 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15044 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15045 (regsets_store_inferior_registers): Correct error message.
15046 Add missing ``return 0''.
15047 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15048 (linux_store_registers): Renamed from store_inferior_registers.
15049 (linux_read_memory): Renamed from read_inferior_memory.
15050 (linux_write_memory): Renamed from write_inferior_memory.
15051 (linux_target_ops): New structure.
15052 (initialize_low): Call set_target_ops ().
15053 * remote-utils.c (unhexify): New function.
15054 (hexify): New function.
15055 (input_interrupt): Send signals to ``signal_pid''.
15056 * server.c (inferior_pid): Remove.
15057 (start_inferior): Update create_inferior call.
15058 (attach_inferior): Call add_inferior.
15059 (handle_query): New function.
15060 (main): Call handle_query for `q' packets.
15061 * server.h: Include "target.h". Remove obsolete prototypes.
15062 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15064 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15066 * Makefile.in: Add WARN_CFLAGS. Update configury
15068 * configure.in: Check for <string.h>
15069 * configure: Regenerate.
15070 * config.in: Regenerate.
15071 * gdbreplay.c: Include needed system headers.
15072 (remote_open): Remove strchr prototype.
15073 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15074 * regcache.c (supply_register): Change buf argument to const void *.
15075 (supply_register_by_name): Likewise.
15076 (collect_register): Change buf argument to void *.
15077 (collect_register_by_name): Likewise.
15078 * regcache.h: Add missing prototypes.
15079 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15080 * server.c (handle_query): New function.
15081 (attached): New static variable, moved out of main.
15082 (main): Quiet longjmp clobber warnings.
15083 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15084 * utils.c (error): Remove NORETURN.