1 2017-07-10 Yao Qi <yao.qi@linaro.org>
3 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
5 2017-06-29 Yao Qi <yao.qi@linaro.org>
7 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
9 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
11 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
13 * Makefile.in (IPA_OBJS): Sort and format one item per line.
15 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
17 * linux-low.c (linux_create_inferior): Adjust code to access the
18 environment information via 'gdb_environ' class.
19 * lynx-low.c (lynx_create_inferior): Likewise.
20 * server.c (our_environ): Make it an instance of 'gdb_environ'.
21 (get_environ): Return a pointer to 'our_environ'.
22 (captured_main): Initialize 'our_environ'.
23 * server.h (get_environ): Adjust prototype.
24 * spu-low.c (spu_create_inferior): Adjust code to access the
25 environment information via 'gdb_environ' class.
27 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
29 * linux-low.c (linux_read_memory, linux_write_memory): Remove
30 usage of "register" keyword.
32 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
34 * configure: Re-generate.
36 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
38 * configure: Re-generate.
40 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
42 * Makefile.in (COMPILE.pre): Add "-x c++".
44 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
46 * fork-child.c: Conditionally include <signal.h>.
48 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
50 * server.c (handle_general_set): Handle new packet
52 (handle_query): Add "QStartupWithShell" to the list of supported
54 (gdbserver_usage): Add help text explaining the
55 new "--startup-with-shell" and "--no-startup-with-shell" CLI
57 (captured_main): Recognize and act upon the presence of the new
60 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
61 Pedro Alves <palves@redhat.com>
63 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
64 * configure: Regenerate.
65 * configure.srv (srv_linux_obj): Add "fork-child.o" and
67 (i[34567]86-*-lynxos*): Likewise.
69 * fork-child.c: New file.
70 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
72 (linux_ptrace_fun): New function.
73 (linux_create_inferior): Adjust function prototype to reflect
74 change on "target.h". Adjust function code to use
76 (linux_request_interrupt): Delete "signal_pid".
77 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
78 (lynx_ptrace_fun): New function.
79 (lynx_create_inferior): Adjust function prototype to reflect
80 change on "target.h". Adjust function code to use
82 * nto-low.c (nto_create_inferior): Adjust function prototype and
83 code to reflect change on "target.h". Update comments.
84 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
85 "common-terminal.h" and "environ.h".
86 (terminal_fd): Moved to fork-child.c.
87 (old_foreground_pgrp): Likewise.
88 (restore_old_foreground_pgrp): Likewise.
89 (last_status): Make it global.
90 (last_ptid): Likewise.
91 (our_environ): New variable.
92 (startup_with_shell): Likewise.
93 (program_name): Likewise.
94 (program_argv): Rename to...
95 (program_args): ...this.
96 (wrapper_argv): New variable.
97 (start_inferior): Delete function.
98 (get_exec_wrapper): New function.
99 (get_exec_file): Likewise.
100 (get_environ): Likewise.
101 (prefork_hook): Likewise.
102 (post_fork_inferior): Likewise.
103 (postfork_hook): Likewise.
104 (postfork_child_hook): Likewise.
105 (handle_v_run): Update code to deal with arguments coming from the
106 remote host. Update calls from "start_inferior" to
108 (captured_main): Likewise. Initialize environment variable. Call
110 * server.h (post_fork_inferior): New prototype.
111 (get_environ): Likewise.
112 (last_status): Declare.
113 (last_ptid): Likewise.
114 (signal_pid): Likewise.
115 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
116 (spu_ptrace_fun): New function.
117 (spu_create_inferior): Adjust function prototype to reflect change
118 on "target.h". Adjust function code to use "fork_inferior".
119 * target.c (target_terminal_init): New function.
120 (target_terminal_inferior): Likewise.
121 (target_terminal_ours): Likewise.
122 * target.h: Include <vector>.
123 (struct target_ops) <create_inferior>: Update prototype.
124 (create_inferior): Update macro.
125 * utils.c (gdb_flush_out_err): New function.
126 * win32-low.c (win32_create_inferior): Adjust function prototype
127 and code to reflect change on "target.h".
129 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
131 * inferiors.c (switch_to_thread): New function.
133 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
135 * Makefile.in (SFILE): Add "common/job-control.c".
136 (OBS): Add "job-control.o".
138 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
140 * Makefile: Remove "@host_makefile_frag@".
142 2017-05-05 Pedro Alves <palves@redhat.com>
144 * configure: Regenerate.
146 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
148 * configure: Regenerate.
150 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
152 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
153 software_single_step change of return type to
154 std::vector<CORE_ADDR>.
155 * linux-low.c (install_software_single_step_breakpoints):
157 * linux-low.h (install_software_single_step_breakpoints):
160 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
162 * remote-utils.c: Include "gdb_termios.h" instead of
164 * terminal.h: Delete file.
166 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
168 * server.c: Include <vector>.
169 <program_argv, wrapper_argv>: Convert to std::vector.
170 (start_inferior): Rewrite function to use C++.
171 (handle_v_run): Likewise. Update code that calculates the argv
172 based on the vRun packet; use C++.
173 (captured_main): Likewise.
175 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
177 * server.c (handle_v_cont): Initialize thread_resume::thread
180 2017-04-05 Pedro Alves <palves@redhat.com>
182 * configure: Regenerate.
184 2017-04-05 Pedro Alves <palves@redhat.com>
186 * gdbreplay.c (sync_error): Constify.
187 * linux-x86-low.c (push_opcode): Constify.
189 2017-04-05 Pedro Alves <palves@redhat.com>
191 * win32-low.c (get_child_debug_event)
192 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
193 Report TARGET_WAITKIND_SPURIOUS instead.
195 2017-04-05 Pedro Alves <palves@redhat.com>
197 * remote-utils.c (remote_prepare, remote_open): Constify.
198 * remote-utils.h (remote_prepare, remote_open): Constify.
199 * server.c (captured_main): Constify 'port' handling.
201 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
203 * Makefile.in (clean): Clear .deps.
205 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
207 * .gitignore: Remove generated files, replace with wildcard.
208 * (clean): Replace removal of generated files with wildcard.
209 (version.c): Replace with...
210 (version-generated.c): ...this.
211 (xml-builtin.c): Replace with...
212 (xml-builtin-generated.c): ...this.
213 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
214 (%.c: *regformats*): Replace with...
215 (%-generated.c: *regformats*): ...this.
217 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
219 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
220 (xtensa_fill_gregset): Call collect_register_by_name for
222 (xtensa_store_gregset): Call supply_register_by_name for
225 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
227 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
228 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
229 (xtensa_store_gregset): Call supply_register for all registers in
230 a0_regnum..a0_regnum + C0_NREGS range.
232 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
234 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
235 (ax-ipa.o: ax.c): Remove.
236 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
237 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
238 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
239 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
240 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
242 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
244 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
245 (print-utils-ipa.o: ../common/print-utils.c): Remove.
246 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
247 (errors-ipa.o: ../common/errors.c): Remove.
248 (format-ipa.o: ../common/format.c): Remove.
249 (common-utils-ipa.o: ../common/common-utils.c): Remove.
251 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
253 * Makefile.in (%-ipa.o: %.c): New rule.
254 (tracepoint-ipa.o: tracepoint.c): Remove.
255 (utils-ipa.o: utils.c): Remove.
256 (remote-utils-ipa.o: remote-utils.c): Remove.
257 (regcache-ipa.o: regcache.c): Remove.
258 (i386-linux-ipa.o: i386-linux.c): Remove.
259 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
260 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
261 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
262 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
263 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
264 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
265 (amd64-linux-ipa.o: amd64-linux.c): Remove.
266 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
267 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
268 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
269 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
270 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
271 (aarch64-ipa.o: aarch64.c): Remove.
272 (s390-linux32-ipa.o: s390-linux32.c): Remove.
273 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
274 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
275 (s390-linux64-ipa.o: s390-linux64.c): Remove.
276 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
277 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
278 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
279 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
280 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
281 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
282 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
283 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
284 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
285 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
286 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
287 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
288 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
289 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
290 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
291 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
292 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
293 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
294 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
295 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
296 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
297 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
298 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
299 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
300 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
301 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
302 (tdesc-ipa.o: tdesc.c): Remove.
303 (x32-linux-ipa.o: x32-linux.c): Remove.
304 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
305 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
307 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
309 * Makefile.in (%.o: ../arch/%.c): New rule.
310 (arm.o: ../arch/arm.c): Remove.
311 (arm-linux.o: ../arch/arm-linux.c): Remove.
312 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
313 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
315 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
317 * Makefile.in (%.o: ../nat/%.c): New rule.
318 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
319 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
320 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
321 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
322 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
323 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
324 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
325 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
326 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
327 (linux-personality.o: ../nat/linux-personality.c): Remove.
328 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
329 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
330 (x86-linux.o: ../nat/x86-linux.c): Remove.
331 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
332 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
334 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
336 * Makefile.in (%.o: ../common/%.c): New rule.
337 (signals.o: ../common/signals.c): Remove.
338 (print-utils.o: ../common/print-utils.c): Remove.
339 (rsp-low.o: ../common/rsp-low.c): Remove.
340 (common-utils.o: ../common/common-utils.c): Remove.
341 (posix-strerror.o: ../common/posix-strerror.c): Remove.
342 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
343 (vec.o: ../common/vec.c): Remove.
344 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
345 (xml-utils.o: ../common/xml-utils.c): Remove.
346 (ptid.o: ../common/ptid.c): Remove.
347 (buffer.o: ../common/buffer.c): Remove.
348 (format.o: ../common/format.c): Remove.
349 (filestuff.o: ../common/filestuff.c): Remove.
350 (agent.o: ../common/agent.c): Remove.
351 (errors.o: ../common/errors.c): Remove.
352 (environ.o: ../common/environ.c): Remove.
353 (common-debug.o: ../common/common-debug.c): Remove.
354 (cleanups.o: ../common/cleanups.c): Remove.
355 (common-exceptions.o: ../common/common-exceptions.c): Remove.
356 (fileio.o: ../common/fileio.c): Remove.
357 (common-regcache.o: ../common/common-regcache.c): Remove.
358 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
359 (new-op.o: ../common/new-op.c): Remove.
360 (btrace-common.o: ../common/btrace-common.c): Remove.
362 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
364 * Makefile.in (%.o: ../target/%.c): New rule.
365 (waitstatus.o: ../target/waitstatus.c): Remove.
367 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
370 (%.c: ../regformats/%.dat,
371 (%.c: ../regformats/arm/%.dat,
372 (%.c: ../regformats/i386/%.dat,
373 (%.c: ../regformats/rs6000/%.dat): New rules.
376 (arm-with-iwmmxt.c): Remove.
377 (arm-with-vfpv2.c): Remove.
378 (arm-with-vfpv3.c): Remove.
379 (arm-with-neon.c): Remove.
380 (reg-bfin.c): Remove.
381 (reg-cris.c): Remove.
382 (reg-crisv32.c): Remove.
384 (i386-linux.c): Remove.
385 (i386-avx.c): Remove.
386 (i386-avx-linux.c): Remove.
387 (i386-avx-avx512.c): Remove.
388 (i386-avx-avx512-linux.c): Remove.
389 (i386-mpx.c): Remove.
390 (i386-mpx-linux.c): Remove.
391 (i386-avx-mpx-avx512-pku.c): Remove.
392 (i386-avx-mpx-avx512-pku-linux.c): Remove.
393 (i386-avx-mpx.c): Remove.
394 (i386-avx-mpx-linux.c): Remove.
395 (i386-mmx.c): Remove.
396 (i386-mmx-linux.c): Remove.
397 (reg-ia64.c): Remove.
398 (reg-m32r.c): Remove.
399 (reg-m68k.c): Remove.
401 (mips-linux.c): Remove.
402 (mips-dsp-linux.c): Remove.
403 (mips64-linux.c): Remove.
404 (mips64-dsp-linux.c): Remove.
405 (nios2-linux.c): Remove.
406 (powerpc-32.c): Remove.
407 (powerpc-32l.c): Remove.
408 (powerpc-altivec32l.c): Remove.
409 (powerpc-cell32l.c): Remove.
410 (powerpc-vsx32l.c): Remove.
411 (powerpc-isa205-32l.c): Remove.
412 (powerpc-isa205-altivec32l.c): Remove.
413 (powerpc-isa205-vsx32l.c): Remove.
414 (powerpc-e500l.c): Remove.
415 (powerpc-64l.c): Remove.
416 (powerpc-altivec64l.c): Remove.
417 (powerpc-cell64l.c): Remove.
418 (powerpc-vsx64l.c): Remove.
419 (powerpc-isa205-64l.c): Remove.
420 (powerpc-isa205-altivec64l.c): Remove.
421 (powerpc-isa205-vsx64l.c): Remove.
422 (s390-linux32.c): Remove.
423 (s390-linux32v1.c): Remove.
424 (s390-linux32v2.c): Remove.
425 (s390-linux64.c): Remove.
426 (s390-linux64v1.c): Remove.
427 (s390-linux64v2.c): Remove.
428 (s390-te-linux64.c): Remove.
429 (s390-vx-linux64.c): Remove.
430 (s390-tevx-linux64.c): Remove.
431 (s390x-linux64.c): Remove.
432 (s390x-linux64v1.c): Remove.
433 (s390x-linux64v2.c): Remove.
434 (s390x-te-linux64.c): Remove.
435 (s390x-vx-linux64.c): Remove.
436 (s390x-tevx-linux64.c): Remove.
437 (tic6x-c64xp-linux.c): Remove.
438 (tic6x-c64x-linux.c): Remove.
439 (tic6x-c62x-linux.c): Remove.
441 (reg-sparc64.c): Remove.
444 (amd64-linux.c): Remove.
445 (amd64-avx.c): Remove.
446 (amd64-avx-linux.c): Remove.
447 (amd64-avx-avx512.c): Remove.
448 (amd64-avx-avx512-linux.c): Remove.
449 (amd64-mpx.c): Remove.
450 (amd64-mpx-linux.c): Remove.
451 (amd64-avx-mpx-avx512-pku.c): Remove.
452 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
453 (amd64-avx-mpx.c): Remove.
454 (amd64-avx-mpx-linux.c): Remove.
456 (x32-linux.c): Remove.
458 (x32-avx-linux.c): Remove.
459 (x32-avx-avx512.c): Remove.
460 (x32-avx-avx512-linux.c): Remove.
461 (reg-xtensa.c): Remove.
462 (reg-tilegx.c): Remove.
463 (reg-tilegx32.c): Remove.
465 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
467 * Makefile.in (SFILES): Add "common/environ.c".
468 (OBJS): Add "common/environ.h".
470 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
472 * configure.ac: Check if the fs_base and gs_base members of
473 `struct user_regs_struct' exist.
474 * config.in: Regenerated.
475 * configure: Likewise.
477 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
479 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
481 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
482 (get_next_pcs_syscall_next_pc): Likewise.
484 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
486 * win32-i386-low.c: Fix incorrect reference to a couple source files.
487 * nto-x86-low.c: Likewise.
489 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
491 * Makefile.in: Include disable-implicit-rules.mk.
493 2016-11-23 Pedro Alves <palves@redhat.com>
495 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
496 (debug_vprintf): Use std::chrono::steady_clock instead of
497 gettimeofday. Use '.' instead of ':'.
498 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
499 (get_timestamp): Use std::chrono::steady_clock instead of
502 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
504 * Makefile.in: Fix whitespace formatting.
506 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
508 * Makefile.in (SFILES, OBS): Flatten list and order
511 2016-11-23 Pedro Alves <palves@redhat.com>
513 * event-loop.c (handle_file_event): Use warning.
514 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
515 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
518 2016-11-23 Pedro Alves <palves@redhat.com>
520 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
522 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
523 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
524 debug_printf and debug_flush for debug output.
525 * server.c (handle_general_set): Likewise.
526 * thread-db.c (try_thread_db_load): Use debug_printf for debug
529 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
531 * Makefile.in (.c.o): Replace rule with ...
532 (%.o: %.c): ... this one.
534 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
536 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
537 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
539 * configure.ac: Remove checks for the make program.
540 * configure: Re-generate.
542 2016-10-28 Pedro Alves <palves@redhat.com>
544 * Makefile.in (CXX_DIALECT): Get from configure.
545 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
546 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
547 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
548 * config.in: Regenerate.
549 * configure: Regenerate.
551 2016-10-27 Yao Qi <yao.qi@linaro.org>
553 * linux-low.c (linux_supports_range_stepping): Return true if
554 can_software_single_step return true.
556 2016-10-27 Yao Qi <yao.qi@linaro.org>
558 * inferiors.c (find_inferior_in_random): New function.
559 * inferiors.h (find_inferior_in_random): Declare.
560 * linux-low.c (linux_wait_for_event_filtered): Call
561 find_inferior_in_random instead of find_inferior.
563 2016-10-27 Yao Qi <yao.qi@linaro.org>
565 * linux-low.c (linux_wait_1): If single-step breakpoints are
566 inserted, remove them.
568 2016-10-26 Pedro Alves <palves@redhat.com>
570 * linux-low.c (handle_extended_wait): Link parent/child fork
572 (linux_wait_1): Unlink them.
573 (linux_set_resume_request): Ignore resume requests for
574 already-resumed and unhandled fork child threads.
575 * linux-low.h (struct lwp_info) <fork_relative>: New field.
576 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
578 (handle_v_requests) <vCont>: Don't call require_running.
579 * server.h (in_queued_stop_replies): New declaration.
581 2016-10-24 Yao Qi <yao.qi@linaro.org>
584 * linux-aarch64-low.c (append_insns): Cast the return value to
587 2016-10-10 Yao Qi <yao.qi@linaro.org>
589 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
591 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
593 * target.c (target_supports_multi_process): New function, moved
595 * target.h (target_supports_multi_process): ... here. Remove
598 2016-10-05 Tom Tromey <tom@tromey.com>
601 * tracepoint.c (handle_tracepoint_bkpts): Check
602 ipa_error_tracepoint, not ipa_stopping_tracepoint.
604 2016-10-05 Yao Qi <yao.qi@linaro.org>
606 * configure.srv: Update the path of arm-*.xml files.
608 2016-10-05 Terry Guo <terry.guo@arm.com>
609 Yao Qi <yao.qi@linaro.org>
611 * Makefile.in: Adjust the path of rules.
612 * configure.srv: Update the path of xml files.
613 * regformats/arm-with-iwmmxt.dat: Regenerated.
614 * regformats/arm-with-neon.dat: Likewise.
615 * regformats/arm-with-vfpv2.dat: Likewise.
616 * regformats/arm-with-vfpv3.dat Likewise.
618 2016-09-30 Yao Qi <yao.qi@linaro.org>
621 * target.c (target_stop_and_wait): Don't call
622 target_continue_no_signal, use resume_stop instead.
624 2016-09-26 Yao Qi <yao.qi@linaro.org>
626 * linux-low.c (linux_wait_1): Call debug_exit.
628 2016-09-23 Pedro Alves <palves@redhat.com>
630 * Makefile.in (SFILES): Add common/new-op.c.
631 (OBS): Add common/new-op.o.
632 (new-op.o): New rule.
634 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
636 * .gitinore: Ignore more files.
638 2016-09-21 Yao Qi <yao.qi@linaro.org>
640 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
643 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
645 * server.c (start_inferior): Call target_mourn_inferior instead of
646 mourn_inferior; pass ptid_t argument to it.
648 (handle_target_event): Likewise.
649 * target.c (target_mourn_inferior): New function.
650 * target.h (mourn_inferior): Delete macro.
652 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
654 * linux-low.c (lwp_is_stepping): New function.
656 2016-09-06 Carl Love <cel@us.ibm.com>
658 * server.c (start_inferior): Fixed comment, requested comment change
659 didn't get updated correctly. Removed reference to ptrace () call as
660 it is only true on Linux systems.
662 2016-09-06 Carl Love <cel@us.ibm.com>
664 * server.c (start_inferior): Do not call
665 function target_post_create_inferior () if the
666 inferior process has already exited.
668 2016-09-05 Pedro Alves <palves@redhat.com>
670 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
671 (COMPILE.pre, CC_LD): Use CXX directly.
672 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
673 * acinclude.m4: Don't include build-with-cxx.m4.
674 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
675 * configure: Regenerate.
677 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
680 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
681 call writing data to own_buf.
683 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
685 * target.c (mywait): Call target_wait instead of
687 (target_wait): New function.
689 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
691 * server.c (start_inferior): New variable 'ptid'. Replace calls
692 to the_target->resume by target_continue{,_no_signal}, depending
694 * target.c (target_stop_and_wait): Call target_continue_no_signal
695 instead of the_target->resume.
696 (target_continue): New function.
698 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
700 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
702 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
705 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
707 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
708 * linux-arm-low.c (ps_get_thread_area): Likewise.
709 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
710 * linux-m68k-low.c (ps_get_thread_area): Likewise.
711 * linux-mips-low.c (ps_get_thread_area): Likewise.
712 * linux-nios2-low.c (ps_get_thread_area): Likewise.
713 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
714 * linux-x86-low.c (ps_get_thread_area): Likewise.
715 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
717 2016-08-19 Pedro Alves <palves@redhat.com>
719 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
721 2016-08-19 Pedro Alves <palves@redhat.com>
723 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
724 comment. Use memcpy instead of casting through unsigned long.
726 2016-08-19 Pedro Alves <palves@redhat.com>
728 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
729 allocating around 0x80000000.
731 2016-08-19 Pedro Alves <palves@redhat.com>
734 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
735 (x32-avx512-linux-ipa.o): New rules.
736 * configure.ac (x86_64-*-linux*): New x32 check.
737 * configure.srv (ipa_x32_linux_regobj): New.
738 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
739 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
741 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
743 * configure: Regenerate.
745 2016-08-09 Pedro Alves <palves@redhat.com>
748 * Makefile.in (OBS): Add signals-state-save-restore.o.
749 (signals-state-save-restore.o): New rule.
750 * config.in: Regenerate.
751 * configure: Regenerate.
752 * linux-low.c: Include "signals-state-save-restore.h".
753 (linux_create_inferior): Call
754 restore_original_signals_state.
755 * server.c: Include "dispositions-save-restore.h".
756 (captured_main): Call save_original_signals_state.
758 2016-08-05 Pedro Alves <palves@redhat.com>
760 * configure: Regenerate.
762 2016-08-04 Yao Qi <yao.qi@linaro.org>
764 * linux-low.c (regsets_fetch_inferior_registers): Check
765 errno is ESRCH or not.
767 2016-08-02 Yao Qi <yao.qi@linaro.org>
769 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
770 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
771 (thread_db_load_search): Update.
772 (try_thread_db_load_1): Don't look for td_ta_event_addr,
773 td_ta_set_event and td_ta_event_getmsg.
775 2016-07-26 Pedro Alves <palves@redhat.com>
778 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
779 of unsigned long for 64-bit registers and use uint32_t instead of
780 unsigned int for 32-bit registers.
782 2016-07-26 Pedro Alves <palves@redhat.com>
784 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
787 2016-07-21 Tom Tromey <tom@tromey.com>
789 * configure: Rebuild.
791 2016-07-21 Yao Qi <yao.qi@linaro.org>
793 * mem-break.c (find_gdb_breakpoint): Cast bp to
794 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
796 2016-07-21 Yao Qi <yao.qi@linaro.org>
798 * server.c (handle_v_requests): Support s and S actions
799 if target_supports_software_single_step return true.
801 2016-07-21 Yao Qi <yao.qi@linaro.org>
803 * linux-low.c (resume_stopped_resumed_lwps): If resume request
804 is resume_step, call maybe_hw_step.
805 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
807 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
809 (proceed_one_lwp): If resume request is resume_step, install
810 reinsert breakpoints and call maybe_hw_step.
812 2016-07-21 Yao Qi <yao.qi@linaro.org>
814 * linux-low.c (proceed_one_lwp): Declare.
815 (linux_resume_one_thread): Remove local variable 'step'.
816 Lift code enqueue signal. Call proceed_one_lwp instead of
817 linux_resume_one_lwp.
819 2016-07-21 Yao Qi <yao.qi@linaro.org>
821 * linux-low.c (linux_resume_one_thread): Call
822 enqueue_pending_signal.
824 2016-07-21 Yao Qi <yao.qi@linaro.org>
826 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
827 * inferiors.c (do_restore_current_thread_cleanup): New function.
828 (make_cleanup_restore_current_thread): Likewise.
829 * linux-low.c (install_software_single_step_breakpoints): Call
830 make_cleanup_restore_current_thread. Switch current_thread to
833 2016-07-21 Yao Qi <yao.qi@linaro.org>
835 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
836 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
837 (clone_one_breakpoint): Likewise.
838 (delete_reinsert_breakpoints): Change parameter to thread.
840 (has_reinsert_breakpoints): Likewise.
841 (uninsert_reinsert_breakpoints): Likewise.
842 (reinsert_reinsert_breakpoints): Likewise.
843 * mem-break.h (set_reinsert_breakpoint): Update declaration.
844 (delete_reinsert_breakpoints): Likewise.
845 (reinsert_reinsert_breakpoints): Likewise.
846 (uninsert_reinsert_breakpoints): Likewise.
847 (has_reinsert_breakpoints): Likewise.
849 2016-07-21 Yao Qi <yao.qi@linaro.org>
851 * inferiors.c (get_thread_process): Make parameter const.
852 * inferiors.h (get_thread_process): Update declaration.
853 * mem-break.c (clone_all_breakpoints): Remove all parameters.
854 Add new parameters child_thread and parent_thread. Callers
856 * mem-break.h (clone_all_breakpoints): Update declaration.
858 2016-07-21 Yao Qi <yao.qi@linaro.org>
860 * mem-break.c (struct breakpoint) <cond_list>: Remove.
861 <command_list, handler>: Remove.
862 (struct gdb_breakpoint): New.
863 (struct other_breakpoint): New.
864 (struct reinsert_breakpoint): New.
865 (is_gdb_breakpoint): New function.
866 (any_persistent_commands): Update command_list if
867 is_gdb_breakpoint returns true.
868 (set_breakpoint): Create breakpoints according to their types.
869 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
870 (set_gdb_breakpoint_1): Likewise.
871 (set_gdb_breakpoint): Likewise.
872 (clear_breakpoint_conditions): Change parameter type to
873 'struct gdb_breakpoint *'.
874 (clear_breakpoint_commands): Likewise.
875 (clear_breakpoint_conditions_and_commands): Likewise.
876 (add_condition_to_breakpoint): Likewise.
877 (add_breakpoint_condition): Likewise.
878 (add_commands_to_breakpoint): Likewise.
879 (check_breakpoints): Check other_breakpoint.
880 (clone_one_breakpoint): Clone breakpopint according to its type.
881 * mem-break.h (struct gdb_breakpoint): Declare.
882 (set_gdb_breakpoint): Update declaration.
883 (clear_breakpoint_conditions_and_commands): Likewise.
884 (add_breakpoint_condition): Likewise.
885 (add_breakpoint_commands): Likewise.
886 * server.c (process_point_options): Change parameter type to
887 'struct gdb_breakpoint *'.
889 2016-07-21 Yao Qi <yao.qi@linaro.org>
891 * mem-break.c (set_breakpoint_at): Rename it to ...
892 (set_breakpoint_type_at): ... it.
893 (set_breakpoint_at): Call set_breakpoint_type_at.
894 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
895 * mem-break.h (set_breakpoint_at): Update comments.
897 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
899 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
901 (nios2_store_gregset): Likewise.
903 2016-07-01 Pedro Alves <palves@redhat.com>
904 Antoine Tremblay <antoine.tremblay@ericsson.com>
906 * linux-low.c: Change interface to take the target lwp_info
907 pointer directly and return void. Handle detaching from a zombie
909 (linux_detach_lwp_callback): New function.
910 (linux_detach): Detach from the leader thread after detaching from
913 2016-06-28 Yao Qi <yao.qi@linaro.org>
915 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
916 for variable new_offset.
917 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
918 (aarch64_ftrace_insn_reloc_cb): Likewise.
919 (aarch64_ftrace_insn_reloc_tb): Likewise.
920 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
921 PRIx64 instead of PRIx32.
923 2016-06-28 Yao Qi <yao.qi@linaro.org>
925 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
926 (the_low_target): Install arm_get_syscall_trapinfo.
928 2016-06-28 Yao Qi <yao.qi@linaro.org>
930 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
932 (the_low_target): Install aarch64_get_syscall_trapinfo.
934 2016-06-28 Yao Qi <yao.qi@linaro.org>
936 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
938 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
939 Remove parameter sysno.
940 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
943 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
945 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
946 (s390_emit_ne_goto): Likewise.
947 (s390_emit_lt_goto): Likewise.
948 (s390_emit_le_goto): Likewise.
949 (s390_emit_gt_goto): Likewise.
950 (s390_emit_ge_goto): Likewise.
951 (s390x_emit_eq_goto): Likewise.
952 (s390x_emit_ne_goto): Likewise.
953 (s390x_emit_lt_goto): Likewise.
954 (s390x_emit_le_goto): Likewise.
955 (s390x_emit_gt_goto): Likewise.
956 (s390x_emit_ge_goto): Likewise.
957 (s390_emit_ops_impl): Mark variable static.
958 (s390x_emit_ops): Likewise.
960 2016-06-17 Yao Qi <yao.qi@linaro.org>
962 * linux-low.c (handle_extended_wait): Call
963 uninsert_reinsert_breakpoints for the parent process. Remove
964 reinsert breakpoints from the child process. Reinsert them to
965 the parent process when vfork is done.
966 * mem-break.c (uninsert_reinsert_breakpoints): New function.
967 (reinsert_reinsert_breakpoints): New function.
968 * mem-break.h (uninsert_reinsert_breakpoints): Declare
969 (reinsert_reinsert_breakpoints): Declare.
971 2016-06-17 Yao Qi <yao.qi@linaro.org>
973 * linux-low.c (handle_extended_wait): If the parent is doing
974 step-over, remove the reinsert breakpoints from the forked child.
976 2016-06-17 Yao Qi <yao.qi@linaro.org>
978 * linux-low.c (unsuspend_all_lwps): Declare.
979 (linux_low_filter_event): If thread exited, call finish_step_over.
980 If step-over is finished, unsuspend other threads.
982 2016-06-17 Yao Qi <yao.qi@linaro.org>
984 * linux-low.c (linux_resume_one_lwp_throw): Assert
985 has_reinsert_breakpoints returns false.
986 * mem-break.c (delete_disabled_breakpoints): Assert
987 bp type isn't reinsert_breakpoint.
989 2016-06-17 Yao Qi <yao.qi@linaro.org>
991 * linux-low.c (maybe_hw_step): New function.
992 (linux_resume_one_lwp_throw): Call maybe_hw_step.
993 (finish_step_over): Switch current_thread to lwp temporarily,
994 and assert has_reinsert_breakpoints returns true.
995 (proceed_one_lwp): Call maybe_hw_step.
996 * mem-break.c (has_reinsert_breakpoints): New function.
997 * mem-break.h (has_reinsert_breakpoints): Declare.
999 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1001 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1003 2016-05-17 Yao Qi <yao.qi@linaro.org>
1005 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1006 instead of find_inferior.
1008 2016-05-05 Yao Qi <yao.qi@linaro.org>
1010 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1011 Initialize res to zero.
1013 2016-05-05 Yao Qi <yao.qi@linaro.org>
1015 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1018 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1020 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1021 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1022 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1024 2016-04-28 Par Olsson <par.olsson@windriver.com>
1025 Simon Marchi <simon.marchi@ericsson.com>
1027 * tracepoint.c (write_inferior_int8): New function.
1028 (cmd_qtenable_disable): Write enable flag using
1029 write_inferior_int8.
1031 2016-04-25 Yao Qi <yao.qi@linaro.org>
1033 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1034 (need_step_over_p): Return zero if the LWP has pending signals
1035 can be delivered on software single step target.
1037 2016-04-25 Yao Qi <yao.qi@linaro.org>
1039 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1040 return instead of error.
1042 2016-04-22 Yao Qi <yao.qi@linaro.org>
1044 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1047 2016-04-22 Yao Qi <yao.qi@linaro.org>
1049 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1050 signal when stepping over breakpoint with software single
1053 2016-04-21 Pedro Alves <palves@redhat.com>
1055 * linux-s390-low.c (s390_collect_ptrace_register)
1056 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1058 (s390_check_regset): Use void * instead of gdb_byte *.
1060 2016-04-20 Pedro Alves <palves@redhat.com>
1062 * configure: Renegerate.
1064 2016-04-20 Yao Qi <yao.qi@linaro.org>
1066 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1067 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1069 (arm_store_gregset): Likewise.
1071 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1073 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1074 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1075 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1076 (amd64-avx-mpx-linux.c): New rules.
1077 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1078 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1079 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1080 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1081 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1082 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1083 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1084 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1085 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1086 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1087 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1088 * linux-x86-low.c (x86_linux_read_description): Add case for
1089 X86_XSTATE_AVX_MPX_MASK.
1090 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1091 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1092 init_registers_i386_avx_mpx_linux.
1093 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1094 (initialize_low_tracepoint): Call
1095 init_registers_i386_avx_mpx_linux.
1096 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1097 (initialize_low_tracepoint): Call
1098 init_registers_amd64_avx_mpx_linux.
1099 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1100 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1101 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1104 2016-04-18 Pedro Alves <palves@redhat.com>
1106 * configure: Regenerate.
1108 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1110 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1111 (aarch64_emit_sub): Likewise.
1113 2016-04-12 Pedro Alves <palves@redhat.com>
1115 * utils.c (prepare_to_throw_exception): Delete.
1117 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1119 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1121 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1123 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1125 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1127 * linux-aarch64-ipa.c: Add <elf.h> include.
1128 * linux-ppc-ipa.c: Add <elf.h> include.
1129 * linux-s390-ipa.c: Add <elf.h> include.
1131 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1133 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1134 (get_raw_reg_ptr): Likewise.
1135 (get_trace_state_variable_value_ptr): Likewise.
1136 (set_trace_state_variable_value_ptr): Likewise.
1137 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1140 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1141 Marcin Kościelnicki <koriakin@0x04.net>
1144 * linux-ppc-low.c (emit_insns): New function.
1145 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1146 (ppc_emit_prologue): New function.
1147 (ppc_emit_epilogue): New function.
1148 (ppc_emit_add): New function.
1149 (ppc_emit_sub): New function.
1150 (ppc_emit_mul): New function.
1151 (ppc_emit_lsh): New function.
1152 (ppc_emit_rsh_signed): New function.
1153 (ppc_emit_rsh_unsigned): New function.
1154 (ppc_emit_ext): New function.
1155 (ppc_emit_zero_ext): New function.
1156 (ppc_emit_log_not): New function.
1157 (ppc_emit_bit_and): New function.
1158 (ppc_emit_bit_or): New function.
1159 (ppc_emit_bit_xor): New function.
1160 (ppc_emit_bit_not): New function.
1161 (ppc_emit_equal): New function.
1162 (ppc_emit_less_signed): New function.
1163 (ppc_emit_less_unsigned): New function.
1164 (ppc_emit_ref): New function.
1165 (ppc_emit_const): New function.
1166 (ppc_emit_reg): New function.
1167 (ppc_emit_pop): New function.
1168 (ppc_emit_stack_flush): New function.
1169 (ppc_emit_swap): New function.
1170 (ppc_emit_stack_adjust): New function.
1171 (ppc_emit_call): New function.
1172 (ppc_emit_int_call_1): New function.
1173 (ppc_emit_void_call_2): New function.
1174 (ppc_emit_if_goto): New function.
1175 (ppc_emit_goto): New function.
1176 (ppc_emit_eq_goto): New function.
1177 (ppc_emit_ne_goto): New function.
1178 (ppc_emit_lt_goto): New function.
1179 (ppc_emit_le_goto): New function.
1180 (ppc_emit_gt_goto): New function.
1181 (ppc_emit_ge_goto): New function.
1182 (ppc_write_goto_address): New function.
1183 (ppc_emit_ops_impl): New static variable.
1184 (ppc64v1_emit_prologue): New function.
1185 (ppc64v2_emit_prologue): New function.
1186 (ppc64_emit_epilogue): New function.
1187 (ppc64_emit_add): New function.
1188 (ppc64_emit_sub): New function.
1189 (ppc64_emit_mul): New function.
1190 (ppc64_emit_lsh): New function.
1191 (ppc64_emit_rsh_signed): New function.
1192 (ppc64_emit_rsh_unsigned): New function.
1193 (ppc64_emit_ext): New function.
1194 (ppc64_emit_zero_ext): New function.
1195 (ppc64_emit_log_not): New function.
1196 (ppc64_emit_bit_and): New function.
1197 (ppc64_emit_bit_or): New function.
1198 (ppc64_emit_bit_xor): New function.
1199 (ppc64_emit_bit_not): New function.
1200 (ppc64_emit_equal): New function.
1201 (ppc64_emit_less_signed): New function.
1202 (ppc64_emit_less_unsigned): New function.
1203 (ppc64_emit_ref): New function.
1204 (ppc64_emit_const): New function.
1205 (ppc64v1_emit_reg): New function.
1206 (ppc64v2_emit_reg): New function.
1207 (ppc64_emit_pop): New function.
1208 (ppc64_emit_stack_flush): New function.
1209 (ppc64_emit_swap): New function.
1210 (ppc64v1_emit_call): New function.
1211 (ppc64v2_emit_call): New function.
1212 (ppc64v1_emit_int_call_1): New function.
1213 (ppc64v2_emit_int_call_1): New function.
1214 (ppc64v1_emit_void_call_2): New function.
1215 (ppc64v2_emit_void_call_2): New function.
1216 (ppc64_emit_if_goto): New function.
1217 (ppc64_emit_eq_goto): New function.
1218 (ppc64_emit_ne_goto): New function.
1219 (ppc64_emit_lt_goto): New function.
1220 (ppc64_emit_le_goto): New function.
1221 (ppc64_emit_gt_goto): New function.
1222 (ppc64_emit_ge_goto): New function.
1223 (ppc64v1_emit_ops_impl): New static variable.
1224 (ppc64v2_emit_ops_impl): New static variable.
1225 (ppc_emit_ops): New function.
1226 (linux_low_target): Wire in ppc_emit_ops.
1228 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1229 Marcin Kościelnicki <koriakin@0x04.net>
1232 * Makefile.in: Add powerpc-*-ipa.o
1233 * configure.srv: Add ipa_obj for powerpc*-linux.
1234 * linux-ppc-ipa.c: New file.
1235 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1237 (PPC_FIELD): New macro.
1238 (PPC_SEXT): New macro.
1239 (PPC_OP6): New macro.
1240 (PPC_BO): New macro.
1241 (PPC_LI): New macro.
1242 (PPC_BD): New macro.
1243 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1244 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1245 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1246 (ppc_get_thread_area): New function.
1247 (is_elfv2_inferior): New function.
1248 (gen_ds_form): New function.
1249 (GEN_STD): New macro.
1250 (GEN_STDU): New macro.
1251 (GEN_LD): New macro.
1252 (GEN_LDU): New macro.
1253 (gen_d_form): New function.
1254 (GEN_ADDI): New macro.
1255 (GEN_ADDIS): New macro.
1256 (GEN_LI): New macro.
1257 (GEN_LIS): New macro.
1258 (GEN_ORI): New macro.
1259 (GEN_ORIS): New macro.
1260 (GEN_LWZ): New macro.
1261 (GEN_STW): New macro.
1262 (GEN_STWU): New macro.
1263 (gen_xfx_form): New function.
1264 (GEN_MFSPR): New macro.
1265 (GEN_MTSPR): New macro.
1266 (GEN_MFCR): New macro.
1267 (GEN_MTCR): New macro.
1268 (GEN_SYNC): New macro.
1269 (GEN_LWSYNC): New macro.
1270 (gen_x_form): New function.
1271 (GEN_OR): New macro.
1272 (GEN_MR): New macro.
1273 (GEN_LWARX): New macro.
1274 (GEN_STWCX): New macro.
1275 (GEN_CMPW): New macro.
1276 (gen_md_form): New function.
1277 (GEN_RLDICL): New macro.
1278 (GEN_RLDICR): New macro.
1279 (gen_i_form): New function.
1281 (GEN_BL): New macro.
1282 (gen_b_form): New function.
1283 (GEN_BNE): New macro.
1284 (GEN_LOAD): New macro.
1285 (GEN_STORE): New macro.
1286 (gen_limm): New function.
1287 (gen_atomic_xchg): New function.
1288 (gen_call): New function.
1289 (ppc_relocate_instruction): New function.
1290 (ppc_install_fast_tracepoint_jump_pad): New function.
1291 (ppc_get_min_fast_tracepoint_insn_len): New function.
1292 (ppc_get_ipa_tdesc_idx): New function.
1293 (the_low_target): Wire in the new functions.
1294 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1296 * linux-ppc-tdesc.h: New file.
1298 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1300 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1301 (alloc_jump_pad_buffer): New function.
1302 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1303 (alloc_jump_pad_buffer): New function.
1304 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1305 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1306 (alloc_jump_pad_buffer): New function.
1307 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1308 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1309 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1310 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1312 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1314 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1315 * linux-amd64-ipa.c: Likewise.
1316 * linux-i386-ipa.c: Likewise.
1317 * linux-s390-ipa.c: Likewise.
1318 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1319 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1320 set_trace_state_variable_value_ptr.
1321 (struct ipa_sym_addresses): Likewise.
1322 (symbol_list): Likewise.
1323 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1324 accessing gdb_collect directly.
1325 (gdb_collect_ptr_type): New typedef.
1326 (get_raw_reg_ptr_type): New typedef.
1327 (get_trace_state_variable_value_ptr_type): New typedef.
1328 (set_trace_state_variable_value_ptr_type): New typedef.
1329 (gdb_collect_ptr): New global.
1330 (get_raw_reg_ptr): New global.
1331 (get_trace_state_variable_value_ptr): New global.
1332 (set_trace_state_variable_value_ptr): New global.
1333 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1334 accessing get_raw_reg directly.
1335 (get_get_tsv_func_addr): Likewise for
1336 get_trace_state_variable_value_ptr.
1337 (get_set_tsv_func_addr): Likewise for
1338 set_trace_state_variable_value_ptr.
1339 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1341 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1343 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1345 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1347 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1349 (relocate_instruction): Remove own_buf.
1350 * server.c (own_buf): Make global.
1351 (handle_v_requests): Make global.
1352 * server.h (own_buf): New declaration.
1353 (handle_v_requests): New prototype.
1355 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1358 * linux-s390-low.c (add_insns): New function.
1359 (s390_emit_prologue): New function.
1360 (s390_emit_epilogue): New function.
1361 (s390_emit_add): New function.
1362 (s390_emit_sub): New function.
1363 (s390_emit_mul): New function.
1364 (s390_emit_lsh): New function.
1365 (s390_emit_rsh_signed): New function.
1366 (s390_emit_rsh_unsigned): New function.
1367 (s390_emit_ext): New function.
1368 (s390_emit_log_not): New function.
1369 (s390_emit_bit_and): New function.
1370 (s390_emit_bit_or): New function.
1371 (s390_emit_bit_xor): New function.
1372 (s390_emit_bit_not): New function.
1373 (s390_emit_equal): New function.
1374 (s390_emit_less_signed): New function.
1375 (s390_emit_less_unsigned): New function.
1376 (s390_emit_ref): New function.
1377 (s390_emit_if_goto): New function.
1378 (s390_emit_goto): New function.
1379 (s390_write_goto_address): New function.
1380 (s390_emit_litpool): New function.
1381 (s390_emit_const): New function.
1382 (s390_emit_call): New function.
1383 (s390_emit_reg): New function.
1384 (s390_emit_pop): New function.
1385 (s390_emit_stack_flush): New function.
1386 (s390_emit_zero_ext): New function.
1387 (s390_emit_swap): New function.
1388 (s390_emit_stack_adjust): New function.
1389 (s390_emit_set_r2): New function.
1390 (s390_emit_int_call_1): New function.
1391 (s390_emit_void_call_2): New function.
1392 (s390_emit_eq_goto): New function.
1393 (s390_emit_ne_goto): New function.
1394 (s390_emit_lt_goto): New function.
1395 (s390_emit_le_goto): New function.
1396 (s390_emit_gt_goto): New function.
1397 (s390_emit_ge_goto): New function.
1398 (s390x_emit_prologue): New function.
1399 (s390x_emit_epilogue): New function.
1400 (s390x_emit_add): New function.
1401 (s390x_emit_sub): New function.
1402 (s390x_emit_mul): New function.
1403 (s390x_emit_lsh): New function.
1404 (s390x_emit_rsh_signed): New function.
1405 (s390x_emit_rsh_unsigned): New function.
1406 (s390x_emit_ext): New function.
1407 (s390x_emit_log_not): New function.
1408 (s390x_emit_bit_and): New function.
1409 (s390x_emit_bit_or): New function.
1410 (s390x_emit_bit_xor): New function.
1411 (s390x_emit_bit_not): New function.
1412 (s390x_emit_equal): New function.
1413 (s390x_emit_less_signed): New function.
1414 (s390x_emit_less_unsigned): New function.
1415 (s390x_emit_ref): New function.
1416 (s390x_emit_if_goto): New function.
1417 (s390x_emit_const): New function.
1418 (s390x_emit_call): New function.
1419 (s390x_emit_reg): New function.
1420 (s390x_emit_pop): New function.
1421 (s390x_emit_stack_flush): New function.
1422 (s390x_emit_zero_ext): New function.
1423 (s390x_emit_swap): New function.
1424 (s390x_emit_stack_adjust): New function.
1425 (s390x_emit_int_call_1): New function.
1426 (s390x_emit_void_call_2): New function.
1427 (s390x_emit_eq_goto): New function.
1428 (s390x_emit_ne_goto): New function.
1429 (s390x_emit_lt_goto): New function.
1430 (s390x_emit_le_goto): New function.
1431 (s390x_emit_gt_goto): New function.
1432 (s390x_emit_ge_goto): New function.
1433 (s390_emit_ops): New function.
1434 (struct linux_target_ops): Fill in emit_ops hook.
1436 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1439 * Makefile.in: Add s390 IPA files.
1440 * configure.srv: Build IPA for s390.
1441 * linux-s390-ipa.c: New file.
1442 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1443 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1444 (tdesc_s390_linux32): Likewise.
1445 (init_registers_s390_linux32v1): Likewise.
1446 (tdesc_s390_linux32v1): Likewise.
1447 (init_registers_s390_linux32v2): Likewise.
1448 (tdesc_s390_linux32v2): Likewise.
1449 (init_registers_s390_linux64): Likewise.
1450 (tdesc_s390_linux64): Likewise.
1451 (init_registers_s390_linux64v1): Likewise.
1452 (tdesc_s390_linux64v1): Likewise.
1453 (init_registers_s390_linux64v2): Likewise.
1454 (tdesc_s390_linux64v2): Likewise.
1455 (init_registers_s390_te_linux64): Likewise.
1456 (tdesc_s390_te_linux64): Likewise.
1457 (init_registers_s390_vx_linux64): Likewise.
1458 (tdesc_s390_vx_linux64): Likewise.
1459 (init_registers_s390_tevx_linux64): Likewise.
1460 (tdesc_s390_tevx_linux64): Likewise.
1461 (init_registers_s390x_linux64): Likewise.
1462 (tdesc_s390x_linux64): Likewise.
1463 (init_registers_s390x_linux64v1): Likewise.
1464 (tdesc_s390x_linux64v1): Likewise.
1465 (init_registers_s390x_linux64v2): Likewise.
1466 (tdesc_s390x_linux64v2): Likewise.
1467 (init_registers_s390x_te_linux64): Likewise.
1468 (tdesc_s390x_te_linux64): Likewise.
1469 (init_registers_s390x_vx_linux64): Likewise.
1470 (tdesc_s390x_vx_linux64): Likewise.
1471 (init_registers_s390x_tevx_linux64): Likewise.
1472 (tdesc_s390x_tevx_linux64): Likewise.
1473 (have_hwcap_s390_vx): New static variable.
1474 (s390_arch_setup): Fill have_hwcap_s390_vx.
1475 (s390_get_thread_area): New function.
1476 (s390_ft_entry_gpr_esa): New const.
1477 (s390_ft_entry_gpr_zarch): New const.
1478 (s390_ft_entry_misc): New const.
1479 (s390_ft_entry_fr): New const.
1480 (s390_ft_entry_vr): New const.
1481 (s390_ft_main_31): New const.
1482 (s390_ft_main_64): New const.
1483 (s390_ft_exit_fr): New const.
1484 (s390_ft_exit_vr): New const.
1485 (s390_ft_exit_misc): New const.
1486 (s390_ft_exit_gpr_esa): New const.
1487 (s390_ft_exit_gpr_zarch): New const.
1488 (append_insns): New function.
1489 (s390_relocate_instruction): New function.
1490 (s390_install_fast_tracepoint_jump_pad): New function.
1491 (s390_get_min_fast_tracepoint_insn_len): New function.
1492 (s390_get_ipa_tdesc_idx): New function.
1493 (struct linux_target_ops): Wire in the above functions.
1494 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1495 * linux-s390-tdesc.h: New file.
1497 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1499 * linux-s390-low.c (s390_supports_tracepoints): New function.
1500 (struct linux_target_ops): Fill supports_tracepoints hook.
1502 2016-03-18 Yao Qi <yao.qi@linaro.org>
1504 * linux-low.c (lwp_signal_can_be_delivered): New function.
1505 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1507 2016-03-18 Yao Qi <yao.qi@linaro.org>
1509 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1510 0 if signal is enqueued. Remove 'signal' from one debugging
1511 message. Move one debugging message to some lines below.
1512 Remove code setting 'signal' to 0.
1514 2016-03-18 Yao Qi <yao.qi@linaro.org>
1516 * linux-low.c (linux_low_filter_event): Remove redundant
1517 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1519 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1521 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1522 (struct linux_target_ops): Wire in the above.
1524 2016-03-03 Yao Qi <yao.qi@linaro.org>
1526 * linux-low.c: Update comments to start_step_over.
1528 2016-03-03 Yao Qi <yao.qi@linaro.org>
1531 * linux-low.c (handle_extended_wait): Set child suspended
1532 if event_lwp->bp_reinsert isn't zero.
1534 2016-03-02 Yao Qi <yao.qi@linaro.org>
1536 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1537 enqueue_pending_signal.
1539 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1541 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1544 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1546 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1547 (s390_regmap_3264) [!__s390x__]: New global.
1548 (s390_collect_ptrace_register): Skip map entries containing -1.
1549 (s390_supply_ptrace_register): Ditto.
1550 (s390_fill_gprs_high): New function.
1551 (s390_store_gprs_high): New function.
1552 (s390_regsets): Add NT_S390_HIGH_GPRS.
1553 (s390_get_hwcap): Enable on 31-bit.
1554 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1555 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1556 Detect NT_S390_HIGH_GPRS.
1557 (s390_usrregs_info_3264): Enable on 31-bit.
1558 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1559 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1561 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1564 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1565 * configure.srv: Ditto.
1566 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1567 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1568 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1569 (init_registers_amd64_linux): Remove prototype.
1570 (tdesc_amd64_linux): Remove declaration.
1571 (get_ipa_tdesc): New function.
1572 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1573 initialize remaining tdescs.
1574 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1575 (init_registers_i386_linux): Remove prototype.
1576 (tdesc_i386_linux): Remove declaration.
1577 (get_ipa_tdesc): New function.
1578 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1579 initialize remaining tdescs.
1580 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1581 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1582 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1583 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1584 (x86_get_ipa_tdesc_idx): New function.
1585 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1586 * linux-x86-tdesc.h: New file.
1587 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1588 (target_get_ipa_tdesc_idx): New macro.
1589 * tracepoint.c (ipa_tdesc_idx): New macro.
1590 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1591 (symbol_list): Add ipa_tdesc_idx.
1592 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1593 (ipa_tdesc): Remove.
1594 (ipa_tdesc_idx): New variable.
1595 (get_context_regcache): Use get_ipa_tdesc.
1596 (gdb_collect): Ditto.
1598 * tracepoint.h (get_ipa_tdesc): New prototype.
1599 (ipa_tdesc): Remove.
1601 2016-02-24 Pedro Alves <palves@redhat.com>
1603 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1604 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1605 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1606 Factor out common code between the USE_SIGTRAP_SIGINFO and
1607 !USE_SIGTRAP_SIGINFO blocks.
1608 (linux_low_filter_event): Call save_stop_reason instead of
1609 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1611 (linux_wait_1): Update comments.
1613 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1615 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1616 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1617 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1618 ppc_insert_point, ppc_remove_point.
1620 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1622 * linux-s390-low.c (s390_supports_z_point_type): New function.
1623 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1625 2016-02-16 Yao Qi <yao.qi@linaro.org>
1627 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1628 PC. Get pc from regcache_read_pc.
1630 2016-02-12 Yao Qi <yao.qi@linaro.org>
1632 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1633 or linux_get_pc_32bit.
1634 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1636 2016-02-12 Yao Qi <yao.qi@linaro.org>
1638 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1639 arm_linux_get_next_pcs_fixup.
1641 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1643 * tracepoint.c (x_tracepoint_action_download): Change
1644 write_inferior_data_ptr to write_inferior_data_pointer.
1645 (cmd_qtstart): Likewise.
1646 (write_inferior_data_ptr): Remove.
1647 (download_agent_expr): Change write_inferior_data_ptr to
1648 write_inferior_data_pointer.
1649 (download_tracepoint_1): Likewise.
1650 (download_tracepoint): Likewise.
1651 (download_trace_state_variables): Likewise.
1653 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1654 Marcin Kościelnicki <koriakin@0x04.net>
1656 * tracepoint.c (struct tracepoint_action_ops): Remove.
1657 (struct tracepoint_action): Remove ops.
1658 (m_tracepoint_action_download, r_tracepoint_action_download)
1659 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1660 size and offset accordingly.
1661 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1662 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1663 (tracepoint_action_send, tracepoint_action_download): New functions.
1664 Helpers for trace action handlers.
1665 (add_tracepoint_action): Remove setup actions ops.
1666 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1668 2016-02-10 Yao Qi <yao.qi@linaro.org>
1670 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1672 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1674 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1676 * configure: Regenerate.
1678 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1680 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1681 void * to gdb_byte *.
1682 * linux-low.c (siginfo_fixup): Likewise.
1683 (linux_xfer_siginfo): Likewise.
1684 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1686 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1688 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1690 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1692 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1694 * linux-x86-low.c [__x86_64__]: Include
1695 "nat/amd64-linux-siginfo.h".
1696 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1697 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1698 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1699 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1700 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1701 (cpt_si_fd, si_timerid, si_overrun): Move from
1702 nat/amd64-linux-siginfo.c.
1703 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1705 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1707 * server.c (skip_to_semicolon): Remove.
1708 (process_point_options): Use strchrnul instead of
1711 2016-01-26 Yao Qi <yao.qi@linaro.org>
1713 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1714 * linux-low.c (install_software_single_step_breakpoints): Don't
1715 call regcache_read_pc.
1716 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1719 2016-01-26 Yao Qi <yao.qi@linaro.org>
1721 * linux-low.c (install_software_single_step_breakpoints): Call
1722 regcache_read_pc instead of get_pc.
1724 2016-01-26 Yao Qi <yao.qi@linaro.org>
1726 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1727 (unblock_async_io): Rename to ...
1728 (block_unblock_async_io): ... it. New function.
1729 (enable_async_io): Don't install SIGIO handler. Unblock it
1731 (disable_async_io): Don't ignore SIGIO. Block it instead.
1732 (initialize_async_io): Install SIGIO handler. Don't call
1735 2016-01-26 Yao Qi <yao.qi@linaro.org>
1737 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1738 first character is '\003', call *the_target->request_interrupt.
1740 2016-01-25 Yao Qi <yao.qi@linaro.org>
1742 * remote-utils.c (new_thread_notify): Remove.
1743 (dead_thread_notify): Likewise.
1744 * remote-utils.h (new_thread_notify): Remove declaration.
1745 (dead_thread_notify): Likewise.
1747 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1749 * gdb.trace/pending.exp: Fix expected message on continue.
1751 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1753 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1754 it works properly on big-endian machines where sizeof (CORE_ADDR)
1757 2016-01-21 Pedro Alves <palves@redhat.com>
1759 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1760 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1761 * configure: Regenerate.
1763 2016-01-21 Yao Qi <yao.qi@linaro.org>
1765 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1766 is_thumb and set it according to CPSR saved on the stack.
1767 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1768 arm_sigreturn_next_pc.
1770 2016-01-18 Yao Qi <yao.qi@linaro.org>
1772 * linux-low.c (linux_set_pc_64bit): New function.
1773 (linux_get_pc_64bit): New function.
1774 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1776 * linux-sparc-low.c (debug_threads): Remove declaration.
1777 (sparc_get_pc): Remove.
1778 (the_low_target): Use linux_get_pc_64bit instead of
1780 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1781 (the_low_target): Use linux_get_pc_64bit and
1784 2016-01-18 Yao Qi <yao.qi@linaro.org>
1786 * linux-arm-low.c (debug_threads): Remove declaration.
1787 (arm_get_pc, arm_set_pc): Remove.
1788 (the_low_target): Use linux_get_pc_32bit and
1790 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1791 (the_low_target): Use linux_get_pc_32bit and
1793 * linux-cris-low.c (debug_threads): Remove declaration.
1794 (cris_get_pc, cris_set_pc,): Remove.
1795 (the_low_target): Use linux_get_pc_32bit and
1797 * linux-crisv32-low.c (debug_threads): Remove declaration.
1798 (cris_get_pc, cris_set_pc): Remove.
1799 (the_low_target): Use linux_get_pc_32bit and
1801 * linux-low.c: Include inttypes.h.
1802 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1803 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1804 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1805 (the_low_target): Use linux_get_pc_32bit and
1807 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1808 (the_low_target): Use linux_get_pc_32bit and
1810 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1811 (the_low_target): Use linux_get_pc_32bit and
1813 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1814 (the_low_target): Use linux_get_pc_32bit and
1816 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1817 (the_low_target): Use linux_get_pc_32bit and
1820 2016-01-18 Gary Benson <gbenson@redhat.com>
1822 * configure.ac (AC_FUNC_FORK): New check.
1823 * config.in: Regenerate.
1824 * configure: Likewise.
1826 2016-01-14 Yao Qi <yao.qi@linaro.org>
1828 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1829 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1830 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1831 arm_get_next_pcs_ctor.
1833 2016-01-12 Josh Stone <jistone@redhat.com>
1834 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1836 * inferiors.h: Include "gdb_vecs.h".
1837 (struct process_info): Add syscalls_to_catch.
1838 * inferiors.c (remove_process): Free syscalls_to_catch.
1839 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1840 syscall_return stops.
1841 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1842 * server.c (handle_general_set): Handle QCatchSyscalls.
1843 (handle_query): Report support for QCatchSyscalls.
1844 * target.h (struct target_ops): Add supports_catch_syscall.
1845 (target_supports_catch_syscall): New macro.
1846 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1847 (struct lwp_info): Add syscall_state.
1848 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1849 Maintain syscall_state and syscalls_to_catch across exec.
1850 (get_syscall_trapinfo): New function, proxy to the_low_target.
1851 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1852 (linux_low_filter_event): Toggle syscall_state entry/return for
1853 syscall traps, and set it ignored for all others.
1854 (gdb_catching_syscalls_p): New function.
1855 (gdb_catch_this_syscall_p): New function.
1856 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1857 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1858 (linux_supports_catch_syscall): New function.
1859 (linux_target_ops): Install it.
1860 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1861 (the_low_target): Install it.
1863 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1865 * acinclude.m4: Include new ../warning.m4 file.
1866 * configure: Regenerated.
1867 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1869 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1871 * ax.c (is_goto_target): Mark static.
1872 * linux-low.c (register_addr): Likewise.
1873 (linux_fetch_registers, linux_store_registers): Likewise.
1874 * mem-break.c (any_persistent_commands): Fix old prototype.
1875 (add_commands_to_breakpoint): Mark static.
1876 * regcache.c (find_register_by_name): Delete unused func.
1877 * remote-utils.c (hex_or_minus_one): Mark static.
1878 * server.c (monitor_show_help): Mark static.
1879 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1880 handle_v_requests): Likewise.
1882 2016-01-12 Pedro Alves <palves@redhat.com>
1884 Remove use of the registered trademark symbol throughout.
1886 2016-01-08 Yao Qi <yao.qi@linaro.org>
1888 * remote-utils.c (getpkt): If c is '\003', call target hook
1891 2016-01-06 Yao Qi <yao.qi@linaro.org>
1893 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1894 linux-aarch32-low.c.
1895 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1896 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1897 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1898 (thumb2_breakpoint): Declare.
1899 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1900 linux-aarch32-low.h.
1901 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1902 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1903 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1905 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1907 * gdbreplay.c (gdbreplay_version): Change copyright year in
1909 * server.c (gdbserver_version): Likewise.
1911 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1913 * server.c (crc32_table): Delete.
1914 (crc32): Use libiberty's xcrc32 function.
1916 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1918 * lynx-low.c (lynx_delete_thread_callback): New function.
1919 (lynx_mourn): Properly delete our process and all of its
1920 threads. Remove call to clear_inferiors.
1922 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1924 * target.c (thread_search_callback): Add check that
1925 the thread_stopped target callback is not NULL before
1928 2015-12-21 Yao Qi <yao.qi@linaro.org>
1930 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1933 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1935 * server.c (handle_query): Call target_supports_software_single_step.
1937 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1939 * linux-low.c (single_step): New function.
1940 (linux_resume_one_lwp_throw): Call single_step.
1941 (start_step_over): Likewise.
1943 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1945 * Makefile.in (SFILES): Append arch/arm-linux.c,
1946 arch/arm-get-next-pcs.c.
1947 (arm-linux.o): New rule.
1948 (arm-get-next-pcs.o): New rule.
1949 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1951 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1952 to linux-aarch32-low.c.
1953 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1954 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1955 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1956 (thumb2_breakpoint_len): Likewise.
1957 (arm_is_thumb_mode): Make non-static.
1958 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1959 from linux-aarch32-low.c.
1960 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1961 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1962 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1963 (thumb2_breakpoint_len): Likewise.
1964 (arm_is_thumb_mode): New declaration.
1965 * linux-arm-low.c: Include arch/arm-linux.h
1966 aarch/arm-get-next-pcs.h, sys/syscall.h.
1967 (get_next_pcs_ops): New struct.
1968 (get_next_pcs_addr_bits_remove): New function.
1969 (get_next_pcs_is_thumb): New function.
1970 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1971 (arm_sigreturn_next_pc): Likewise.
1972 (get_next_pcs_syscall_next_pc): Likewise.
1973 (arm_gdbserver_get_next_pcs): Likewise.
1974 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1976 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1977 * server.h: Include gdb_vecs.h.
1979 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1981 * Makefile.in (SFILES): Append common/common-regcache.c.
1982 (OBS): Append common-regcache.o.
1983 (common-regcache.o): New rule.
1984 * regcache.c (init_register_cache): Initialize cache to
1986 (regcache_raw_read_unsigned): New function.
1987 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1988 register_status enum.
1990 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1992 * linux-aarch64-low.c (the_low_targets): Rename
1993 breakpoint_reinsert_addr to get_next_pcs.
1994 * linux-arm-low.c (the_low_targets): Likewise.
1995 * linux-bfin-low.c (the_low_targets): Likewise.
1996 * linux-cris-low.c (the_low_targets): Likewise.
1997 * linux-crisv32-low.c (the_low_targets): Likewise.
1998 * linux-low.c (can_software_single_step): Likewise.
1999 (install_software_single_step_breakpoints): New function.
2000 (start_step_over): Use install_software_single_step_breakpoints.
2001 * linux-low.h: New CORE_ADDR vector.
2002 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2004 * linux-mips-low.c (the_low_targets): Likewise.
2005 * linux-nios2-low.c (the_low_targets): Likewise.
2006 * linux-sparc-low.c (the_low_targets): Likewise.
2008 2015-12-17 Pedro Alves <palves@redhat.com>
2010 * linux-low.c (linux_kill_one_lwp): Remove references to
2012 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2014 (linux_init_signals): Delete.
2015 (initialize_low): Adjust.
2016 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2018 2015-12-16 Pedro Alves <palves@redhat.com>
2020 * configure.ac (compiler warning flags): When testing a
2021 -Wno-foo option, check whether -Wfoo works instead.
2022 * configure: Regenerate.
2024 2015-12-11 Don Breazeal <donb@codesourcery.com>
2026 * server.c (process_serial_event): Don't exit from gdbserver
2027 in remote mode if there are still active inferiors.
2029 2015-12-11 Yao Qi <yao.qi@linaro.org>
2031 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2032 arm_breakpoint_at if the process is 32-bit.
2034 2015-12-11 Yao Qi <yao.qi@linaro.org>
2036 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2039 2015-12-07 Yao Qi <yao.qi@linaro.org>
2041 * configure.srv: Append arm.o to srv_tgtobj for
2042 aarch64*-*-linux* target.
2043 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2044 from linux-arm-low.c.
2045 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2046 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2047 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2048 (thumb2_breakpoint_len): Likewise.
2049 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2050 (arm_breakpoint_kinds): Likewise.
2051 (arm_breakpoint_kind_from_pc): Likewise.
2052 (arm_sw_breakpoint_from_kind): Likewise.
2053 (arm_breakpoint_kind_from_current_state): Likewise.
2054 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2055 (arm_sw_breakpoint_from_kind): Declare.
2056 (arm_breakpoint_kind_from_current_state): Declare.
2057 (arm_breakpoint_at): Declare.
2058 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2059 arm_sw_breakpoint_from_kind if process is 32-bit.
2060 (aarch64_breakpoint_kind_from_pc): New function.
2061 (aarch64_breakpoint_kind_from_current_state): New function.
2062 (the_low_target): Initialize fields breakpoint_kind_from_pc
2063 and breakpoint_kind_from_current_state.
2064 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2065 linux-aarch32-low.c.
2066 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2067 (arm_breakpoint, arm_breakpoint_len): Likewise.
2068 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2069 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2070 (arm_is_thumb_mode): Likewise.
2071 (arm_breakpoint_at): Likewise.
2072 (arm_breakpoint_kind_from_pc): Likewise.
2073 (arm_sw_breakpoint_from_kind): Likewise.
2074 (arm_breakpoint_kind_from_current_state): Likewise.
2077 2015-08-04 Yao Qi <yao.qi@linaro.org>
2079 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2080 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2081 * server.c (extended_protocol): Remove "static".
2082 * server.h (extended_protocol): Declare it.
2084 2015-12-04 Josh Stone <jistone@redhat.com>
2086 * target.h (struct target_ops) <arch_setup>: Rename to ...
2087 (struct target_ops) <post_create_inferior>: ... this.
2088 (target_arch_setup): Rename to ...
2089 (target_post_create_inferior): ... this, calling post_create_inferior.
2090 * server.c (start_inferior): Update target_arch_setup calls to
2091 target_post_create_inferior.
2092 * linux-low.c (linux_low_ptrace_options): Forward declare.
2093 (linux_arch_setup): Update its comment for general use.
2094 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2095 (struct linux_target_ops): Use linux_post_create_inferior.
2096 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2097 to post_create_inferior.
2098 * nto-low.c (struct nto_target_ops): Likewise.
2099 * spu-low.c (struct spu_target_ops): Likewise.
2100 * win32-low.c (struct win32_target_ops): Likewise.
2102 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2104 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2106 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2108 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2109 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2110 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2111 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2112 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2113 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2114 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2115 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2116 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2117 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2118 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2119 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2121 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2123 * linux-low.c (linux_look_up_symbols): Don't call
2124 linux_supports_traceclone.
2125 * linux-low.h (thread_db_init): Remove use_events argument.
2126 * thread-db.c (thread_db_use_event): Remove global variable.
2127 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2128 (struct thread_db) <td_create_bp>: Remove field.
2129 (thread_db_create_event): Remove function.
2130 (thread_db_enable_reporting): Likewise.
2131 (find_one_thread): Don't check for thread_db_use_events.
2132 (attach_thread): Likewise.
2133 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2134 (try_thread_db_load_1): Don't check for thread_db_use_events.
2135 (thread_db_init): Remove use_events argument and thread events
2137 (remove_thread_event_breakpoints): Remove function.
2138 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2140 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2142 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2144 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2145 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2146 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2147 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2148 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2150 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2153 * linux-low.c (can_hardware_single_step): Use
2154 supports_hardware_single_step.
2155 (can_software_single_step): New function.
2156 (start_step_over): Call can_software_single_step.
2157 (linux_supports_hardware_single_step): New function.
2158 (struct target_ops) <supports_software_single_step>: Initialize.
2159 * linux-low.h (struct linux_target_ops)
2160 <supports_hardware_single_step>: Initialize.
2161 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2163 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2164 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2165 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2167 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2168 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2169 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2170 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2172 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2173 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2175 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2176 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2177 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2179 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2180 * target.h (struct target_ops): <supports_software_single_step>:
2182 (target_supports_software_single_step): New macro.
2184 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2186 * linux-low.c (linux_wait_1): Fix pc advance condition.
2187 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2188 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2190 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2192 * linux-arm-low.c (arm_is_thumb_mode): New function.
2193 (arm_breakpoint_at): Use arm_is_thumb_mode.
2194 (arm_breakpoint_kind_from_current_state): New function.
2195 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2197 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2198 (linux_breakpoint_kind_from_current_state): New function.
2199 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2200 * linux-low.h (struct linux_target_ops)
2201 <breakpoint_kind_from_current_state>: New field.
2202 * target.h (struct target_ops): Likewise.
2203 (target_breakpoint_kind_from_current_state): New macro.
2205 2015-11-30 Pedro Alves <palves@redhat.com>
2207 * linux-low.c (linux_resume): Wake up the event loop before
2210 2015-11-30 Pedro Alves <palves@redhat.com>
2212 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2214 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2216 * target.c (struct thread_search): New structure.
2217 (thread_search_callback): New function.
2218 (prev_general_thread): New global.
2219 (prepare_to_access_memory, done_accessing_memory): New functions.
2220 * target.h (prepare_to_access_memory, done_accessing_memory):
2221 Replace macros with function declarations.
2223 2015-11-30 Pedro Alves <palves@redhat.com>
2226 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2227 report TARGET_WAITKIND_NO_RESUMED.
2228 * remote-utils.c (prepare_resume_reply): Handle
2229 TARGET_WAITKIND_NO_RESUMED.
2230 * server.c (report_no_resumed): New global.
2231 (handle_query) <qSupported>: Handle "no-resumed+". Report
2232 "no-resumed+" support.
2233 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2234 return error if the client doesn't support no-resumed events.
2235 (push_stop_notification): New function.
2236 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2237 events if the client supports them.
2239 2015-11-30 Pedro Alves <palves@redhat.com>
2241 * linux-low.c (thread_still_has_status_pending_p): Don't check
2243 (lwp_resumed): New function.
2244 (status_pending_p_callback): Return early if the LWP is not
2245 supposed to be resumed.
2247 2015-11-30 Pedro Alves <palves@redhat.com>
2249 * linux-low.c (handle_extended_wait): Assert that the LWP's
2250 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2251 thread create events, leave the new child's status pending.
2252 (linux_low_filter_event): If GDB wants to hear about thread exit
2253 events, leave the LWP marked dead and don't delete it.
2254 (linux_wait_for_event_filtered): Don't check for thread exit.
2255 (filter_exit_event): New function.
2256 (linux_wait_1): Use it, when returning an exit event.
2257 (linux_resume_one_lwp_throw): Assert that the LWP's
2258 waitstatus is TARGET_WAITKIND_IGNORE.
2259 * remote-utils.c (prepare_resume_reply): Handle
2260 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2261 * server.c (report_thread_events): New global.
2262 (handle_general_set): Handle QThreadEvents.
2263 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2264 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2265 TARGET_WAITKIND_THREAD_EXITED.
2266 * server.h (report_thread_events): Declare.
2268 2015-11-30 Pedro Alves <palves@redhat.com>
2270 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2271 the thread's last_resume_kind was resume_stop.
2273 2015-11-30 Pedro Alves <palves@redhat.com>
2275 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2278 2015-11-30 Pedro Alves <palves@redhat.com>
2280 * server.c (handle_v_requests): Handle vCtrlC.
2282 2015-11-30 Pedro Alves <palves@redhat.com>
2284 * gdbthread.h (find_any_thread_of_pid): Declare.
2285 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2287 * server.c (handle_query): If current_thread is NULL, look for
2288 another thread of the selected process.
2290 2015-11-26 Daniel Colascione <dancol@dancol.org>
2291 Simon Marchi <simon.marchi@ericsson.com>
2293 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2294 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2296 * target.h (struct target_ops) <thread_name>: New field.
2297 (target_thread_name): New macro.
2299 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2301 * regcache.h (regcache_invalidate_pid): Add declaration.
2302 * regcache.c (regcache_invalidate_pid): New function, extracted
2303 from regcache_invalidate.
2304 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2305 Add trivial documentation comment.
2306 * lynx-low.c: Use regcache_invalidate_pid instead of
2307 regcache_invalidate.
2309 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2311 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2312 and Elf64_auxv_t if the target is Android.
2314 2015-11-22 Doug Evans <xdje42@gmail.com>
2316 * target.h: #include <sys/types.h>.
2318 2015-11-19 Pedro Alves <palves@redhat.com>
2320 * linux-low.c (linux_process_qsupported): Change prototype.
2322 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2324 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2325 and adjust to loop over all features.
2326 * server.c (handle_query) <qSupported>: Adjust to call
2327 target_process_qsupported once, passing it a vector of unprocessed
2329 * target.h (struct target_ops) <process_qsupported>: Change
2331 (target_process_qsupported): Adjust.
2333 2015-11-19 Pedro Alves <palves@redhat.com>
2335 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2337 * configure: Regenerate.
2339 2015-11-19 Pedro Alves <palves@redhat.com>
2341 * configure: Regenerate.
2343 2015-11-19 Yao Qi <yao.qi@linaro.org>
2345 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2348 2015-11-19 Yao Qi <yao.qi@linaro.org>
2350 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2351 (struct aarch64_operand): Move enum out.
2353 2015-11-19 Yao Qi <yao.qi@linaro.org>
2355 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2356 struct user_fpsimd_state *.
2357 (aarch64_store_fpregset): Likewise.
2359 2015-11-19 Yao Qi <yao.qi@linaro.org>
2361 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2362 struct user_pt_regs *.
2363 (aarch64_store_gregset): Likewise.
2365 2015-11-18 Pedro Alves <palves@redhat.com>
2367 * Makefile.in (all_object_files): Add $IPA_OBJS.
2369 2015-11-17 Pedro Alves <palves@redhat.com>
2371 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2372 GDB_SIGNAL_0 and gdb_signal_to_string.
2374 2015-11-17 Pedro Alves <palves@redhat.com>
2376 * win32-low.c (handle_output_debug_string): Remove parameter.
2377 (win32_kill): Remove our_status local and adjust call to
2378 handle_output_debug_string.
2379 (get_child_debug_event): Adjust call to
2380 handle_output_debug_string.
2382 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2384 * linux-mips-low.c (mips_fill_gregset): Add cast.
2385 (mips_store_gregset): Likewise.
2386 (mips_fill_fpregset): Likewise.
2387 (mips_store_fpregset): Likewise.
2389 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2391 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2394 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2396 * linux-mips-low.c (mips_linux_new_thread): Change type of
2397 watch_type to enum target_hw_bp_type.
2399 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2401 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2402 Change return type to arm_hwbp_type.
2404 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2406 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2407 (arm_store_gregset): Likewise.
2408 * linux-arm-low.c (arm_get_hwcap): Likewise.
2409 (arm_read_description): Likewise.
2411 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2413 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2415 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2417 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2418 (ppc_fill_vsxregset): Likewise.
2419 (ppc_store_vsxregset): Likewise.
2420 (ppc_fill_vrregset): Likewise.
2421 (ppc_store_vrregset): Likewise.
2422 (ppc_fill_evrregset): Likewise.
2423 (ppc_store_evrregset): Likewise.
2425 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2427 * linux-ppc-low.c (ppc_usrregs_info): Remove
2428 forward-declaration.
2429 (ppc_arch_setup): Move lower in file.
2431 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2433 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2434 (ps_pdwrite): Likewise.
2436 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2438 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2439 to after assert checks.
2441 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2443 * proc-service.c (ps_pdread): Add/adjust casts.
2444 (ps_pdwrite): Add/adjust casts.
2446 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2448 * server.c (handle_search_memory_1): Cast return value of
2451 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2453 * server.c (write_qxfer_response): Change type of data to
2456 2015-10-29 Pedro Alves <palves@redhat.com>
2458 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2460 2015-10-29 Pedro Alves <palves@redhat.com>
2462 * tracepoint.c (clear_installed_tracepoints): Add casts.
2464 2015-10-29 Pedro Alves <palves@redhat.com>
2466 * server.c (handle_v_cont, process_serial_event): Add enum
2467 gdb_signal casts to signal parsing code.
2469 2015-10-29 Pedro Alves <palves@redhat.com>
2471 * linux-low.h (NULL_REGSET): Define.
2472 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2473 * linux-arm-low.c (arm_regsets): Likewise.
2474 * linux-crisv32-low.c (cris_regsets): Likewise.
2475 * linux-m68k-low.c (m68k_regsets): Likewise.
2476 * linux-mips-low.c (mips_regsets): Likewise.
2477 * linux-nios2-low.c (nios2_regsets): Likewise.
2478 * linux-ppc-low.c (ppc_regsets): Likewise.
2479 * linux-s390-low.c (s390_regsets): Likewise.
2480 * linux-sh-low.c (sh_regsets): Likewise.
2481 * linux-sparc-low.c (sparc_regsets): Likewise.
2482 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2483 * linux-tile-low.c (tile_regsets): Likewise.
2484 * linux-x86-low.c (x86_regsets): Likewise.
2485 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2487 2015-10-29 Pedro Alves <palves@redhat.com>
2489 * linux-low.h (NULL_REGSET): Define.
2490 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2491 * linux-arm-low.c (arm_regsets): Likewise.
2492 * linux-crisv32-low.c (cris_regsets): Likewise.
2493 * linux-m68k-low.c (m68k_regsets): Likewise.
2494 * linux-mips-low.c (mips_regsets): Likewise.
2495 * linux-nios2-low.c (nios2_regsets): Likewise.
2496 * linux-ppc-low.c (ppc_regsets): Likewise.
2497 * linux-s390-low.c (s390_regsets): Likewise.
2498 * linux-sh-low.c (sh_regsets): Likewise.
2499 * linux-sparc-low.c (sparc_regsets): Likewise.
2500 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2501 * linux-tile-low.c (tile_regsets): Likewise.
2502 * linux-x86-low.c (x86_regsets): Likewise.
2503 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2505 2015-10-26 Doug Evans <dje@google.com>
2507 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2509 2015-10-26 Doug Evans <dje@google.com>
2511 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2513 2015-10-26 Doug Evans <dje@google.com>
2515 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2517 (attach_thread, find_new_threads_callback): Ditto.
2519 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2521 * mem-break.h (set_breakpoint_data): Remove.
2523 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2525 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2526 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2527 (initialize_low): Remove set_breakpoint_data call.
2528 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2529 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2530 (initialize_low): Remove set_breakpoint_data call.
2531 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2532 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2533 (initialize_low): Remove set_breakpoint_data call.
2535 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2537 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2538 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2539 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2540 * target.h (target_breakpoint_kind_from_pc): New macro.
2542 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2544 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2545 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2546 the default breakpoint kind.
2548 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2550 * linux-arm-low.c (arm_supports_z_point_type): Add software
2553 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2555 * linux-arm-low.c: Refactor breakpoint definitions.
2556 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2557 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2559 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2561 * Makefile.in: Add arm.c/o.
2562 * configure.srv: Likewise.
2563 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2564 (arm_breakpoint_kind_from_pc): New function.
2565 (arm_sw_breakpoint_from_kind): Return proper kind.
2566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2568 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2570 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2572 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2573 (struct raw_breakpoint) <size>: Remove.
2574 (struct raw_breakpoint) <kind>: Add.
2575 (bp_size): New function.
2576 (bp_opcode): Likewise.
2577 (find_raw_breakpoint_at): Adjust for kind.
2578 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2579 (remove_memory_breakpoint): Adjust for kind call bp_size.
2580 (set_raw_breakpoint_at): Adjust for kind.
2581 (set_breakpoint): Likewise.
2582 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2583 (delete_raw_breakpoint): Adjust for kind.
2584 (delete_breakpoint): Likewise.
2585 (find_gdb_breakpoint): Likewise.
2586 (set_gdb_breakpoint_1): Likewise.
2587 (set_gdb_breakpoint): Likewise.
2588 (delete_gdb_breakpoint_1): Likewise.
2589 (delete_gdb_breakpoint): Likewise.
2590 (uninsert_raw_breakpoint): Likewise.
2591 (reinsert_raw_breakpoint): Likewise.
2592 (set_breakpoint_data): Remove.
2593 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2594 (check_mem_read): Adjust for kind call bp_size.
2595 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2596 (clone_one_breakpoint): Adjust for kind.
2597 * mem-break.h (set_gdb_breakpoint): Likewise.
2598 (delete_gdb_breakpoint): Likewise.
2599 * server.c (process_serial_event): Likewise.
2601 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2603 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2604 (struct linux_target_ops) <breakpoint>: Remove.
2605 (struct linux_target_ops) <breakpoint_len>: Remove.
2606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2608 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2609 (arm_sw_breakpoint_from_kind): New function.
2610 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2611 (struct linux_target_ops) <breakpoint>: Remove.
2612 (struct linux_target_ops) <breakpoint_len>: Remove.
2613 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2614 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2615 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2616 (struct linux_target_ops) <breakpoint>: Remove.
2617 (struct linux_target_ops) <breakpoint_len>: Remove.
2618 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2619 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2620 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2621 (struct linux_target_ops) <breakpoint>: Remove.
2622 (struct linux_target_ops) <breakpoint_len>: Remove.
2623 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2624 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2625 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2626 and sw_breakpoint_from_kind to increment the pc.
2627 (linux_breakpoint_kind_from_pc): New function.
2628 (linux_sw_breakpoint_from_kind): New function.
2629 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2630 (initialize_low): Call breakpoint_kind_from_pc and
2631 sw_breakpoint_from_kind to replace breakpoint_data/len.
2632 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2635 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2636 (struct linux_target_ops) <breakpoint>: Remove.
2637 (struct linux_target_ops) <breakpoint_len>: Remove.
2638 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2639 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2640 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2641 (struct linux_target_ops) <breakpoint>: Remove.
2642 (struct linux_target_ops) <breakpoint_len>: Remove.
2643 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2644 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2645 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2646 (struct linux_target_ops) <breakpoint>: Remove.
2647 (struct linux_target_ops) <breakpoint_len>: Remove.
2648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2650 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2651 (struct linux_target_ops) <breakpoint>: Remove.
2652 (struct linux_target_ops) <breakpoint_len>: Remove.
2653 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2654 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2655 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2656 (struct linux_target_ops) <breakpoint>: Remove.
2657 (struct linux_target_ops) <breakpoint_len>: Remove.
2658 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2659 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2660 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2661 (struct linux_target_ops) <breakpoint>: Remove.
2662 (struct linux_target_ops) <breakpoint_len>: Remove.
2663 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2664 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2665 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2666 (struct linux_target_ops) <breakpoint>: Remove.
2667 (struct linux_target_ops) <breakpoint_len>: Remove.
2668 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2669 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2670 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2671 (struct linux_target_ops) <breakpoint>: Remove.
2672 (struct linux_target_ops) <breakpoint_len>: Remove.
2673 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2674 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2675 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2676 (struct linux_target_ops) <breakpoint>: Remove.
2677 (struct linux_target_ops) <breakpoint_len>: Remove.
2678 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2679 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2680 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2681 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2682 (struct linux_target_ops) <breakpoint>: Remove.
2683 (struct linux_target_ops) <breakpoint_len>: Remove.
2684 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2685 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2686 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2687 (struct linux_target_ops) <breakpoint>: Remove.
2688 (struct linux_target_ops) <breakpoint_len>: Remove.
2689 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2690 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2692 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2694 * linux-cris-low.c (cris_get_pc): Remove void arg.
2696 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2698 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2701 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2703 * inferiors.c (thread_pid_matches_callback): New function.
2704 (find_thread_process): New function.
2705 (remove_thread): Reset current_thread.
2706 (remove_process): Assert threads have been removed first.
2708 2015-10-15 Yao Qi <yao.qi@linaro.org>
2710 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2712 (aarch64_remove_point): Likewise.
2713 * regcache.c (regcache_register_size): New function.
2715 2015-10-12 Yao Qi <yao.qi@linaro.org>
2717 * linux-aarch64-low.c: Update all callers as emit_load_store
2718 is renamed to aarch64_emit_load_store.
2720 2015-10-12 Yao Qi <yao.qi@linaro.org>
2722 * linux-aarch64-low.c: Update all callers of function renaming
2723 from emit_insn to aarch64_emit_insn.
2725 2015-10-12 Yao Qi <yao.qi@linaro.org>
2727 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2728 arch/aarch64-insn.h.
2729 (struct aarch64_memory_operand): Likewise.
2731 (emit_insn): Move to arch/aarch64-insn.c.
2732 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2733 (emit_load_store): Move to arch/aarch64-insn.c.
2734 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2735 (can_encode_int32): Remove.
2737 2015-10-12 Yao Qi <yao.qi@linaro.org>
2739 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2740 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2741 (aarch64_relocate_instruction): Likewise.
2742 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2743 (struct aarch64_insn_visitor): Likewise.
2745 2015-10-12 Yao Qi <yao.qi@linaro.org>
2747 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2748 (struct aarch64_insn_visitor): New.
2749 (struct aarch64_insn_relocation_data): New.
2750 (aarch64_ftrace_insn_reloc_b): New function.
2751 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2752 (aarch64_ftrace_insn_reloc_cb): Likewise.
2753 (aarch64_ftrace_insn_reloc_tb): Likewise.
2754 (aarch64_ftrace_insn_reloc_adr): Likewise.
2755 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2756 (aarch64_ftrace_insn_reloc_others): Likewise.
2758 (aarch64_relocate_instruction): Use visitor.
2760 2015-10-12 Yao Qi <yao.qi@linaro.org>
2762 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2763 int. Add argument buf.
2764 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2765 aarch64_relocate_instruction.
2767 2015-10-12 Yao Qi <yao.qi@linaro.org>
2769 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2770 argument insn. Remove local variable insn. Don't call
2772 (aarch64_install_fast_tracepoint_jump_pad): Call
2775 2015-09-30 Yao Qi <yao.qi@linaro.org>
2777 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2778 (emit_load_store_pair): Likewise.
2780 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2782 * dll.c (match_dll): Add cast(s).
2783 (unloaded_dll): Likewise.
2784 * linux-low.c (second_thread_of_pid_p): Likewise.
2785 (delete_lwp_callback): Likewise.
2786 (count_events_callback): Likewise.
2787 (select_event_lwp_callback): Likewise.
2788 (linux_set_resume_request): Likewise.
2789 * server.c (accumulate_file_name_length): Likewise.
2790 (emit_dll_description): Likewise.
2791 (handle_qxfer_threads_worker): Likewise.
2792 (visit_actioned_threads): Likewise.
2793 * thread-db.c (any_thread_of): Likewise.
2794 * tracepoint.c (same_process_p): Likewise.
2795 (match_blocktype): Likewise.
2796 (build_traceframe_info_xml): Likewise.
2798 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2800 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2802 (gdb_unparse_agent_expr): Likewise.
2803 * hostio.c (require_data): Likewise.
2804 (handle_pread): Likewise.
2805 * linux-low.c (disable_regset): Likewise.
2806 (fetch_register): Likewise.
2807 (store_register): Likewise.
2808 (get_dynamic): Likewise.
2809 (linux_qxfer_libraries_svr4): Likewise.
2810 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2811 (set_fast_tracepoint_jump): Likewise.
2812 (uninsert_fast_tracepoint_jumps_at): Likewise.
2813 (reinsert_fast_tracepoint_jumps_at): Likewise.
2814 (validate_inserted_breakpoint): Likewise.
2815 (clone_agent_expr): Likewise.
2816 * regcache.c (init_register_cache): Likewise.
2817 * remote-utils.c (putpkt_binary_1): Likewise.
2818 (decode_M_packet): Likewise.
2819 (decode_X_packet): Likewise.
2820 (look_up_one_symbol): Likewise.
2821 (relocate_instruction): Likewise.
2822 (monitor_output): Likewise.
2823 * server.c (handle_search_memory): Likewise.
2824 (handle_qxfer_exec_file): Likewise.
2825 (handle_qxfer_libraries): Likewise.
2826 (handle_qxfer): Likewise.
2827 (handle_query): Likewise.
2828 (handle_v_cont): Likewise.
2829 (handle_v_run): Likewise.
2830 (captured_main): Likewise.
2831 * target.c (write_inferior_memory): Likewise.
2832 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2833 * tracepoint.c (init_trace_buffer): Likewise.
2834 (add_tracepoint_action): Likewise.
2835 (add_traceframe): Likewise.
2836 (add_traceframe_block): Likewise.
2837 (cmd_qtdpsrc): Likewise.
2838 (cmd_qtdv): Likewise.
2839 (cmd_qtstatus): Likewise.
2840 (response_source): Likewise.
2841 (response_tsv): Likewise.
2842 (cmd_qtnotes): Likewise.
2843 (gdb_collect): Likewise.
2844 (initialize_tracepoint): Likewise.
2846 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2848 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2849 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2850 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2852 (enum aarch64_condition_codes): New enum.
2853 (w0): New static global.
2856 (struct aarch64_memory_operand) <type>: New
2857 MEMORY_OPERAND_POSTINDEX type.
2858 (postindex_memory_operand): New helper function.
2859 (emit_ret): New function.
2860 (emit_load_store_pair): New function, factored out of emit_stp
2861 with support for MEMORY_OPERAND_POSTINDEX.
2862 (emit_stp): Rewrite using emit_load_store_pair.
2863 (emit_ldp): New function.
2864 (emit_load_store): Likewise.
2865 (emit_ldr): Mention post-index instruction in comment.
2866 (emit_ldrh): New function.
2867 (emit_ldrb): New function.
2868 (emit_ldrsw): Mention post-index instruction in comment.
2869 (emit_str): Likewise.
2870 (emit_subs): New function.
2871 (emit_cmp): Likewise.
2872 (emit_and): Likewise.
2873 (emit_orr): Likewise.
2874 (emit_orn): Likewise.
2875 (emit_eor): Likewise.
2876 (emit_mvn): Likewise.
2877 (emit_lslv): Likewise.
2878 (emit_lsrv): Likewise.
2879 (emit_asrv): Likewise.
2880 (emit_mul): Likewise.
2881 (emit_sbfm): Likewise.
2882 (emit_sbfx): Likewise.
2883 (emit_ubfm): Likewise.
2884 (emit_ubfx): Likewise.
2885 (emit_csinc): Likewise.
2886 (emit_cset): Likewise.
2887 (emit_nop): Likewise.
2888 (emit_ops_insns): New helper function.
2889 (emit_pop): Likewise.
2890 (emit_push): Likewise.
2891 (aarch64_emit_prologue): New function.
2892 (aarch64_emit_epilogue): Likewise.
2893 (aarch64_emit_add): Likewise.
2894 (aarch64_emit_sub): Likewise.
2895 (aarch64_emit_mul): Likewise.
2896 (aarch64_emit_lsh): Likewise.
2897 (aarch64_emit_rsh_signed): Likewise.
2898 (aarch64_emit_rsh_unsigned): Likewise.
2899 (aarch64_emit_ext): Likewise.
2900 (aarch64_emit_log_not): Likewise.
2901 (aarch64_emit_bit_and): Likewise.
2902 (aarch64_emit_bit_or): Likewise.
2903 (aarch64_emit_bit_xor): Likewise.
2904 (aarch64_emit_bit_not): Likewise.
2905 (aarch64_emit_equal): Likewise.
2906 (aarch64_emit_less_signed): Likewise.
2907 (aarch64_emit_less_unsigned): Likewise.
2908 (aarch64_emit_ref): Likewise.
2909 (aarch64_emit_if_goto): Likewise.
2910 (aarch64_emit_goto): Likewise.
2911 (aarch64_write_goto_address): Likewise.
2912 (aarch64_emit_const): Likewise.
2913 (aarch64_emit_call): Likewise.
2914 (aarch64_emit_reg): Likewise.
2915 (aarch64_emit_pop): Likewise.
2916 (aarch64_emit_stack_flush): Likewise.
2917 (aarch64_emit_zero_ext): Likewise.
2918 (aarch64_emit_swap): Likewise.
2919 (aarch64_emit_stack_adjust): Likewise.
2920 (aarch64_emit_int_call_1): Likewise.
2921 (aarch64_emit_void_call_2): Likewise.
2922 (aarch64_emit_eq_goto): Likewise.
2923 (aarch64_emit_ne_goto): Likewise.
2924 (aarch64_emit_lt_goto): Likewise.
2925 (aarch64_emit_le_goto): Likewise.
2926 (aarch64_emit_gt_goto): Likewise.
2927 (aarch64_emit_ge_got): Likewise.
2928 (aarch64_emit_ops_impl): New static global variable.
2929 (aarch64_emit_ops): New target function, return
2930 &aarch64_emit_ops_impl.
2931 (struct linux_target_ops): Install it.
2933 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2935 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2936 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2938 * linux-aarch64-ipa.c: New file.
2939 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2941 (aarch64_get_thread_area): New target method.
2942 (extract_signed_bitfield): New helper function.
2943 (aarch64_decode_ldr_literal): New function.
2944 (enum aarch64_opcodes): New enum.
2945 (struct aarch64_register): New struct.
2946 (struct aarch64_operand): New struct.
2947 (x0): New static global.
2956 (aarch64_register): New helper function.
2957 (register_operand): Likewise.
2958 (immediate_operand): Likewise.
2959 (struct aarch64_memory_operand): New struct.
2960 (offset_memory_operand): New helper function.
2961 (preindex_memory_operand): Likewise.
2962 (enum aarch64_system_control_registers): New enum.
2963 (ENCODE): New macro.
2964 (emit_insn): New helper function.
2965 (emit_b): New function.
2966 (emit_bcond): Likewise.
2967 (emit_cb): Likewise.
2968 (emit_tb): Likewise.
2969 (emit_blr): Likewise.
2970 (emit_stp): Likewise.
2971 (emit_ldp_q_offset): Likewise.
2972 (emit_stp_q_offset): Likewise.
2973 (emit_load_store): Likewise.
2974 (emit_ldr): Likewise.
2975 (emit_ldrsw): Likewise.
2976 (emit_str): Likewise.
2977 (emit_ldaxr): Likewise.
2978 (emit_stxr): Likewise.
2979 (emit_stlr): Likewise.
2980 (emit_data_processing_reg): Likewise.
2981 (emit_data_processing): Likewise.
2982 (emit_add): Likewise.
2983 (emit_sub): Likewise.
2984 (emit_mov): Likewise.
2985 (emit_movk): Likewise.
2986 (emit_mov_addr): Likewise.
2987 (emit_mrs): Likewise.
2988 (emit_msr): Likewise.
2989 (emit_sevl): Likewise.
2990 (emit_wfe): Likewise.
2991 (append_insns): Likewise.
2992 (can_encode_int32_in): New helper function.
2993 (aarch64_relocate_instruction): New function.
2994 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2995 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2996 (struct linux_target_ops): Install aarch64_get_thread_area,
2997 aarch64_install_fast_tracepoint_jump_pad and
2998 aarch64_get_min_fast_tracepoint_insn_len.
3000 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3002 * Makefile.in (aarch64-insn.o): New rule.
3003 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3005 2015-09-21 Yao Qi <yao.qi@linaro.org>
3007 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3009 2015-09-21 Yao Qi <yao.qi@linaro.org>
3011 * tracepoint.c (max_jump_pad_size): Remove.
3013 2015-09-18 Yao Qi <yao.qi@linaro.org>
3015 * linux-aarch64-low.c: Don't include sys/uio.h.
3016 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3018 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3020 * tracepoint.c (eval_result_type): Change prototype.
3021 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3023 2015-09-15 Pedro Alves <palves@redhat.com>
3025 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3026 Check whether to report exec events instead of checking whether
3027 multiprocess is enabled.
3029 2015-09-15 Pedro Alves <palves@redhat.com>
3032 * remote-utils.c (prepare_resume_reply): Merge
3033 TARGET_WAITKIND_VFORK_DONE switch case with the
3034 TARGET_WAITKIND_FORKED case.
3036 2015-09-15 Yao Qi <yao.qi@linaro.org>
3038 * server.c (handle_query): Check string comparison using
3039 "else if" instead of "if".
3041 2015-09-15 Yao Qi <yao.qi@linaro.org>
3043 * server.c (vCont_supported): New global variable.
3044 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3045 matches. Append ";vContSupported+" to own_buf.
3046 (handle_v_requests): Append ";s;S" to own_buf if target supports
3047 hardware single step or vCont_supported is false.
3048 (capture_main): Set vCont_supported to zero.
3050 2015-09-15 Yao Qi <yao.qi@linaro.org>
3052 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3054 (linux_supports_hardware_single_step): ... New function.
3055 (linux_target_ops): Update.
3056 * lynx-low.c (lynx_target_ops): Set field
3057 supports_hardware_single_step to target_can_do_hardware_single_step.
3058 * nto-low.c (nto_target_ops): Likewise.
3059 * spu-low.c (spu_target_ops): Likewise.
3060 * win32-low.c (win32_target_ops): Likewise.
3061 * target.c (target_can_do_hardware_single_step): New function.
3062 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3063 Remove. <supports_hardware_single_step>: New field.
3064 (target_supports_conditional_breakpoints): Remove.
3065 (target_supports_hardware_single_step): New macro.
3066 (target_can_do_hardware_single_step): Declare.
3067 * server.c (handle_query): Use target_supports_hardware_single_step
3068 instead of target_supports_conditional_breakpoints.
3070 2015-09-15 Yao Qi <yao.qi@linaro.org>
3072 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3074 (struct linux_target_ops the_low_target): Install
3075 aarch64_linux_siginfo_fixup.
3077 2015-09-11 Don Breazeal <donb@codesourcery.com>
3078 Luis Machado <lgustavo@codesourcery.com>
3080 * linux-low.c (linux_mourn): Static declaration.
3081 (linux_arch_setup): Move in front of
3082 handle_extended_wait.
3083 (linux_arch_setup_thread): New function.
3084 (handle_extended_wait): Handle exec events. Call
3085 linux_arch_setup_thread. Make event_lwp argument a
3086 pointer-to-a-pointer.
3087 (check_zombie_leaders): Do not check stopped threads.
3088 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3089 (linux_low_filter_event): Add lwp and thread for exec'ing
3090 non-leader thread if leader thread has been deleted.
3091 Refactor code into linux_arch_setup_thread and call it.
3092 Pass child lwp pointer by reference to handle_extended_wait.
3093 (linux_wait_for_event_filtered): Update comment.
3094 (linux_wait_1): Prevent clobbering exec event status.
3095 (linux_supports_exec_events): New function.
3096 (linux_target_ops) <supports_exec_events>: Initialize new member.
3097 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3099 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3100 * server.c (report_exec_events): New global variable.
3101 (handle_query): Handle qSupported query for exec-events feature.
3102 (captured_main): Initialize report_exec_events.
3103 * server.h (report_exec_events): Declare new global variable.
3104 * target.h (struct target_ops) <supports_exec_events>: New
3106 (target_supports_exec_events): New macro.
3107 * win32-low.c (win32_target_ops) <supports_exec_events>:
3108 Initialize new member.
3110 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3112 * linux-low.c (linux_low_enable_btrace): Remove.
3113 (linux_target_ops): Replace linux_low_enable_btrace with
3114 linux_enable_btrace.
3116 2015-09-03 Yao Qi <yao.qi@linaro.org>
3118 * linux-aarch64-low.c (aarch64_insert_point): Call
3119 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3122 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3124 * linux-low.c (check_stopped_by_breakpoint): Use
3125 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3127 2015-08-27 Pedro Alves <palves@redhat.com>
3129 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3131 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3133 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3134 the XNEW-family equivalent.
3135 (compile_bytecodes): Likewise.
3136 * dll.c (loaded_dll): Likewise.
3137 * event-loop.c (append_callback_event): Likewise.
3138 (create_file_handler): Likewise.
3139 (create_file_event): Likewise.
3140 * hostio.c (handle_open): Likewise.
3141 * inferiors.c (add_thread): Likewise.
3142 (add_process): Likewise.
3143 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3144 * linux-arm-low.c (arm_new_process): Likewise.
3145 (arm_new_thread): Likewise.
3146 * linux-low.c (add_to_pid_list): Likewise.
3147 (linux_add_process): Likewise.
3148 (handle_extended_wait): Likewise.
3149 (add_lwp): Likewise.
3150 (enqueue_one_deferred_signal): Likewise.
3151 (enqueue_pending_signal): Likewise.
3152 (linux_resume_one_lwp_throw): Likewise.
3153 (linux_resume_one_thread): Likewise.
3154 (linux_read_memory): Likewise.
3155 (linux_write_memory): Likewise.
3156 * linux-mips-low.c (mips_linux_new_process): Likewise.
3157 (mips_linux_new_thread): Likewise.
3158 (mips_add_watchpoint): Likewise.
3159 * linux-x86-low.c (initialize_low_arch): Likewise.
3160 * lynx-low.c (lynx_add_process): Likewise.
3161 * mem-break.c (set_raw_breakpoint_at): Likewise.
3162 (set_breakpoint): Likewise.
3163 (add_condition_to_breakpoint): Likewise.
3164 (add_commands_to_breakpoint): Likewise.
3165 (clone_agent_expr): Likewise.
3166 (clone_one_breakpoint): Likewise.
3167 * regcache.c (new_register_cache): Likewise.
3168 * remote-utils.c (look_up_one_symbol): Likewise.
3169 * server.c (queue_stop_reply): Likewise.
3170 (start_inferior): Likewise.
3171 (queue_stop_reply_callback): Likewise.
3172 (handle_target_event): Likewise.
3173 * spu-low.c (fetch_ppc_memory): Likewise.
3174 (store_ppc_memory): Likewise.
3175 * target.c (set_target_ops): Likewise.
3176 * thread-db.c (thread_db_load_search): Likewise.
3177 (try_thread_db_load_1): Likewise.
3178 * tracepoint.c (add_tracepoint): Likewise.
3179 (add_tracepoint_action): Likewise.
3180 (create_trace_state_variable): Likewise.
3181 (cmd_qtdpsrc): Likewise.
3182 (cmd_qtro): Likewise.
3183 (add_while_stepping_state): Likewise.
3184 * win32-low.c (child_add_thread): Likewise.
3185 (get_image_name): Likewise.
3187 2015-08-25 Yao Qi <yao.qi@linaro.org>
3189 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3191 2015-08-25 Yao Qi <yao.qi@linaro.org>
3193 * Makefile.in (aarch64-linux.o): New rule.
3194 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3196 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3197 (aarch64_init_debug_reg_state): Make it extern.
3198 (aarch64_linux_prepare_to_resume): Remove.
3200 2015-08-25 Yao Qi <yao.qi@linaro.org>
3202 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3203 lwp_arch_private_info and ptid_of_lwp.
3205 2015-08-25 Yao Qi <yao.qi@linaro.org>
3207 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3208 Find proc_info by find_process_pid. All callers updated.
3210 2015-08-25 Yao Qi <yao.qi@linaro.org>
3212 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3214 (debug_reg_change_callback): Remove.
3215 (aarch64_notify_debug_reg_change): Remove.
3217 2015-08-25 Yao Qi <yao.qi@linaro.org>
3219 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3220 Call current_lwp_ptid.
3222 2015-08-25 Yao Qi <yao.qi@linaro.org>
3224 * linux-aarch64-low.c (debug_reg_change_callback): Use
3227 2015-08-25 Yao Qi <yao.qi@linaro.org>
3229 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3231 2015-08-25 Yao Qi <yao.qi@linaro.org>
3233 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3235 2015-08-25 Yao Qi <yao.qi@linaro.org>
3237 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3240 2015-08-25 Yao Qi <yao.qi@linaro.org>
3242 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3244 (debug_reg_change_callback): Remove argument entry and add argument
3245 lwp. Remove local variable thread. Don't print thread id in the
3246 debugging output. Don't check whether pid of thread equals to pid.
3247 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3248 iterate_over_lwps instead find_inferior.
3250 2015-08-24 Pedro Alves <palves@redhat.com>
3252 * inferiors.c (get_first_process): New function.
3253 * inferiors.h (get_first_process): New declaration.
3254 * remote-utils.c (read_ptid): Default to the first process in the
3255 list, instead of to the current thread's process.
3257 2015-08-24 Pedro Alves <palves@redhat.com>
3259 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3260 * event-loop.c: Likewise.
3261 * remote-utils.c: Likewise.
3262 * tracepoint.c: Likewise.
3264 2015-08-24 Pedro Alves <palves@redhat.com>
3266 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3269 2015-08-21 Pedro Alves <palves@redhat.com>
3271 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3272 instead of literal 1.
3274 2015-08-21 Pedro Alves <palves@redhat.com>
3276 * tdesc.c (default_description): Explicitly zero-initialize.
3278 2015-08-21 Pedro Alves <palves@redhat.com>
3281 * inferiors.c (remove_thread): Discard any pending stop reply for
3283 * server.c (remove_all_on_match_pid): Rename to ...
3284 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3286 (discard_queued_stop_replies): Change parameter to a ptid. Now
3288 (handle_v_kill, kill_inferior_callback, captured_main)
3289 (process_serial_event): Adjust.
3290 * server.h (discard_queued_stop_replies): Declare.
3292 2015-08-21 Pedro Alves <palves@redhat.com>
3294 * linux-low.c (wait_for_sigstop): Always switch to no thread
3295 selected if the previously current thread dies.
3296 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3297 process instead of the current thread's.
3298 * remote-utils.c (input_interrupt): Don't check if there's no
3300 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3301 current thread to the general thread fails, error out.
3302 (handle_qxfer_auxv, handle_qxfer_libraries)
3303 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3304 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3305 (handle_query): Check if there's a thread selected instead of
3306 checking whether there's any thread in the thread list.
3307 (handle_qxfer_threads, handle_qxfer_btrace)
3308 (handle_qxfer_btrace_conf): Don't error out early if there's no
3309 thread in the thread list.
3310 (handle_v_cont, myresume): Don't set the current thread to the
3312 (process_serial_event) <Hg handling>: Also set thread_id if the
3313 previous general thread is still alive.
3314 (process_serial_event) <g/G handling>: If setting the current
3315 thread to the general thread fails, error out.
3316 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3317 thread's lwp instead of the current thread's.
3318 * target.c (set_desired_thread): If the desired thread was not
3319 found, leave the current thread pointing to NULL. Return an int
3320 (boolean) indicating success.
3321 * target.h (set_desired_thread): Change return type to int.
3323 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3325 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3326 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3328 (ps_get_thread_area): New function.
3330 2015-08-19 Gary Benson <gbenson@redhat.com>
3332 * hostio.c (handle_pread): Do not attempt to read more data
3333 than hostio_reply_with_data can fit in a packet.
3335 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3337 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3339 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3341 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3343 2015-08-06 Pedro Alves <palves@redhat.com>
3345 * tracepoint.c (expr_eval_result): Now an int.
3347 2015-08-06 Pedro Alves <palves@redhat.com>
3349 * gdbthread.h (struct regcache): Forward declare.
3350 (struct thread_info) <regcache_data>: Now a struct regcache
3352 * inferiors.c (inferior_regcache_data)
3353 (set_inferior_regcache_data): Now work with struct regcache
3355 * inferiors.h (struct regcache): Forward declare.
3356 (inferior_regcache_data, set_inferior_regcache_data): Now work
3357 with struct regcache pointers.
3358 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3359 (free_register_cache_thread): Remove struct regcache pointer
3362 2015-08-06 Pedro Alves <palves@redhat.com>
3364 * server.c (captured_main): On error, print the exception message
3365 to stderr, and if run_once is set, throw a quit.
3367 2015-08-06 Pedro Alves <palves@redhat.com>
3369 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3372 2015-08-06 Pedro Alves <palves@redhat.com>
3374 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3375 reading beyond the passed in buffer length.
3377 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3379 * tracepoint.c (symbol_list) <required>: Remove.
3381 2015-08-06 Pedro Alves <palves@redhat.com>
3383 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3384 count if stopping and suspending threads.
3385 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3386 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3387 (linux_detach): Complete an ongoing step-over.
3388 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3390 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3391 (linux_wait_1): If passing a signal to the inferior after
3392 finishing a step-over, unsuspend and re-resume all lwps. If we
3393 see a single-step event but the thread should be continuing, don't
3394 pass the trap to gdb.
3395 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3396 internal_error instead of gdb_assert.
3397 (enqueue_pending_signal): New function.
3398 (check_ptrace_stopped_lwp_gone): Add debug output.
3399 (start_step_over): Use internal_error instead of gdb_assert.
3400 (complete_ongoing_step_over): New function.
3401 (linux_resume_one_thread): Don't resume a suspended thread.
3402 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3405 2015-08-06 Pedro Alves <palves@redhat.com>
3407 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3408 (linux_thread_alive): Use lwp_is_marked_dead.
3409 (extended_event_reported): Delete.
3410 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3411 instead of extended_event_reported.
3412 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3414 (lwp_is_marked_dead): New function.
3415 (lwp_running): Use lwp_is_marked_dead.
3416 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3419 2015-08-06 Pedro Alves <palves@redhat.com>
3421 * linux-low.c (linux_wait_1): Move fork event output out of the
3422 !report_to_gdb check. Pass event_child->waitstatus to
3423 target_waitstatus_to_string instead of ourstatus.
3425 2015-08-04 Yao Qi <yao.qi@linaro.org>
3427 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3428 if current_thread is 32 bit.
3430 2015-08-04 Yao Qi <yao.qi@linaro.org>
3432 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3433 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3434 * server.c (extended_protocol): Remove "static".
3435 * server.h (extended_protocol): Declare it.
3437 2015-08-04 Yao Qi <yao.qi@linaro.org>
3439 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3440 both aarch64 and aarch32.
3441 (aarch64_set_pc): Likewise.
3443 2015-08-04 Yao Qi <yao.qi@linaro.org>
3445 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3446 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3447 arm-with-neon.xml to srv_xmlfiles.
3448 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3449 (is_64bit_tdesc): New function.
3450 (aarch64_linux_read_description): New function.
3451 (aarch64_arch_setup): Call aarch64_linux_read_description.
3452 (regs_info): Rename to regs_info_aarch64.
3453 (aarch64_regs_info): Return right regs_info.
3454 (initialize_low_arch): Call initialize_low_arch_aarch32.
3456 2015-08-04 Yao Qi <yao.qi@linaro.org>
3458 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3459 * linux-aarch32-low.c: New file.
3460 * linux-aarch32-low.h: New file.
3461 * linux-arm-low.c (arm_fill_gregset): Move it to
3462 linux-aarch32-low.c.
3463 (arm_store_gregset): Likewise.
3464 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3465 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3466 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3467 (regs_info): Rename to regs_info_arm.
3468 (arm_regs_info): Return regs_info_aarch32 if
3469 have_ptrace_getregset is 1 and target description is
3470 arm_with_neon or arm_with_vfpv3.
3471 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3472 Call initialize_low_arch_aarch32 instead.
3474 2015-08-04 Yao Qi <yao.qi@linaro.org>
3476 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3477 * linux-low.c: ... here.
3478 * linux-low.h (have_ptrace_getregset): Declare it.
3480 2015-08-04 Pedro Alves <palves@redhat.com>
3482 * thread-db.c (struct thread_db): Use new typedefs.
3483 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3485 (disable_thread_event_reporting): Cast result of dlsym to
3486 destination function pointer type.
3487 (thread_db_mourn): Use td_ta_delete_ftype.
3489 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3491 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3493 (CDX_BREAKPOINT): Define for R2.
3494 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3495 (the_low_target): Add comments.
3497 2015-07-30 Yao Qi <yao.qi@linaro.org>
3499 * linux-arm-low.c (arm_hwcap): Remove it.
3500 (arm_read_description): New local variable arm_hwcap. Don't
3501 set arm_hwcap to zero.
3503 2015-07-30 Yao Qi <yao.qi@linaro.org>
3505 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3506 Use regcache->tdesc instead.
3507 (arm_store_wmmxregset): Likewise.
3508 (arm_fill_vfpregset): Likewise.
3509 (arm_store_vfpregset): Likewise.
3511 2015-07-30 Yao Qi <yao.qi@linaro.org>
3513 * linux-arm-low.c: Include arch/arm.h.
3514 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3515 (arm_store_gregset): Likewise.
3517 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3519 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3520 ptrace's 4th parameter.
3522 2015-07-27 Yao Qi <yao.qi@linaro.org>
3524 * configure.srv (case aarch64*-*-linux*): Don't set
3527 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3529 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3531 * linux-arm-low.c: Likewise.
3532 * linux-cris-low.c: Likewise.
3533 * linux-crisv32-low.c: Likewise.
3534 * linux-low.c: Likewise.
3535 * linux-m68k-low.c: Likewise.
3536 * linux-mips-low.c: Likewise.
3537 * linux-nios2-low.c: Likewise.
3538 * linux-s390-low.c: Likewise.
3539 * linux-sparc-low.c: Likewise.
3540 * linux-tic6x-low.c: Likewise.
3541 * linux-tile-low.c: Likewise.
3542 * linux-x86-low.c: Likewise.
3544 2015-07-24 Pedro Alves <palves@redhat.com>
3546 * config.in: Regenerate.
3547 * configure: Regenerate.
3549 2015-07-24 Pedro Alves <palves@redhat.com>
3551 * acinclude.m4: Include ../ptrace.m4.
3552 * configure.ac: Call GDB_AC_PTRACE.
3553 * config.in, configure: Regenerate.
3555 2015-07-24 Yao Qi <yao.qi@linaro.org>
3557 * linux-low.c (linux_create_inferior): Remove setting to
3558 proc->priv->new_inferior.
3559 (linux_attach): Likewise.
3560 (linux_low_filter_event): Likewise.
3561 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3563 2015-07-24 Yao Qi <yao.qi@linaro.org>
3565 * linux-low.c (linux_arch_setup): New function.
3566 (linux_low_filter_event): If proc->tdesc is NULL and
3567 proc->attached is true, call the_low_target.arch_setup.
3568 Otherwise, keep status pending, and return.
3569 (linux_resume_one_lwp_throw): Don't call get_pc if
3570 thread->while_stepping isn't NULL. Don't call
3571 get_thread_regcache if proc->tdesc is NULL.
3572 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3573 (linux_target_ops): Install arch_setup.
3574 * server.c (start_inferior): Call the_target->arch_setup.
3575 * target.h (struct target_ops) <arch_setup>: New field.
3576 (target_arch_setup): New marco.
3577 * lynx-low.c (lynx_target_ops): Update.
3578 * nto-low.c (nto_target_ops): Update.
3579 * spu-low.c (spu_target_ops): Update.
3580 * win32-low.c (win32_target_ops): Update.
3582 2015-07-24 Yao Qi <yao.qi@linaro.org>
3584 * linux-low.c (linux_add_process): Don't set
3585 proc->priv->new_inferior.
3586 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3587 (linux_attach): Likewise.
3589 2015-07-24 Yao Qi <yao.qi@linaro.org>
3591 * server.c (start_inferior): Code refactor.
3593 2015-07-24 Yao Qi <yao.qi@linaro.org>
3595 * server.c (process_serial_event): Set general_thread.
3597 2015-07-21 Yao Qi <yao.qi@linaro.org>
3599 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3600 aarch64_linux_get_debug_reg_capacity.
3602 2015-07-17 Yao Qi <yao.qi@linaro.org>
3604 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3605 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3606 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3607 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3608 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3609 (AARCH64_HWP_ALIGNMENT): Likewise.
3610 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3611 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3612 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3613 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3614 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3615 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3616 (struct aarch64_debug_reg_state): Likewise.
3617 (struct arch_lwp_info): Likewise.
3618 (aarch64_align_watchpoint): Likewise.
3619 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3620 (aarch64_watchpoint_length): Likewise.
3621 (aarch64_point_encode_ctrl_reg): Likewise
3622 (aarch64_point_is_aligned): Likewise.
3623 (aarch64_align_watchpoint): Likewise.
3624 (aarch64_linux_set_debug_regs):
3625 (aarch64_dr_state_insert_one_point): Likewise.
3626 (aarch64_dr_state_remove_one_point): Likewise.
3627 (aarch64_handle_breakpoint): Likewise.
3628 (aarch64_handle_aligned_watchpoint): Likewise.
3629 (aarch64_handle_unaligned_watchpoint): Likewise.
3630 (aarch64_handle_watchpoint): Likewise.
3632 2015-07-17 Yao Qi <yao.qi@linaro.org>
3634 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3635 and don't aarch64_get_debug_reg_state. All callers update.
3636 (aarch64_handle_aligned_watchpoint): Likewise.
3637 (aarch64_handle_unaligned_watchpoint): Likewise.
3638 (aarch64_handle_watchpoint): Likewise.
3639 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3640 (aarch64_remove_point): Likewise.
3642 2015-07-17 Yao Qi <yao.qi@linaro.org>
3644 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3646 (aarch64_handle_unaligned_watchpoint): Likewise.
3648 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3650 Revert the previous 3 commits:
3651 Move gdb_regex* to common/
3652 Move linux_find_memory_regions_full & co.
3653 gdbserver build-id attribute generator
3655 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3656 Jan Kratochvil <jan.kratochvil@redhat.com>
3658 gdbserver build-id attribute generator.
3659 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3660 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3661 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3663 (get_dynamic): Use find_pdhr to traverse program headers.
3664 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3665 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3666 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3667 (get_hex_build_id): New.
3668 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3669 to reply XML document.
3671 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3672 Jan Kratochvil <jan.kratochvil@redhat.com>
3674 * target.c: Include target/target-utils.h and fcntl.h.
3675 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3676 (target_fileio_read_stralloc): New functions.
3678 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3680 * Makefile.in (OBS): Add gdb_regex.o.
3682 * config.in: Rebuilt.
3683 * configure: Rebuilt.
3685 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3686 Jan Kratochvil <jan.kratochvil@redhat.com>
3688 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3689 * Makefile.in (OBS): Add target-utils.o.
3690 (linux-maps.o, target-utils.o): New.
3691 * configure.srv (srv_linux_obj): Add linux-maps.o.
3693 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3695 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3697 (the_low_target): Install it.
3699 2015-07-14 Pedro Alves <palves@redhat.com>
3701 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3702 Instead, ignore ECHILD, and throw an error for other errnos.
3704 2015-07-10 Pedro Alves <palves@redhat.com>
3706 * event-loop.c (struct callback_event) <data>: Change type to
3707 gdb_client_data instance instead of gdb_client_data pointer.
3708 (append_callback_event): Adjust.
3710 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3712 * linux-aarch64-low.c: Add comments for each linux_target_ops
3713 method. Remove comments already covered in target_ops and
3714 linux_target_ops definitions.
3715 (the_low_target): Add comments for each unimplemented method.
3717 2015-07-09 Yao Qi <yao.qi@linaro.org>
3719 * linux-aarch64-low.c (aarch64_regmap): Remove.
3720 (aarch64_usrregs_info): Remove.
3721 (regs_info): Set field usrregs to NULL.
3723 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3725 * linux-low.c: Include "rsp-low.h"
3726 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3727 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3728 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3729 (handle_btrace_enable_pt): New.
3730 (handle_btrace_general_set): Support "pt".
3731 (handle_btrace_conf_general_set): Support "pt:size".
3733 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3735 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3738 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3740 * linux-aarch64-low.c: Remove comment about endianness.
3741 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3742 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3745 2015-06-24 Gary Benson <gbenson@redhat.com>
3747 * linux-i386-ipa.c (stdint.h): Do not include.
3748 * lynx-i386-low.c (stdint.h): Likewise.
3749 * lynx-ppc-low.c (stdint.h): Likewise.
3750 * mem-break.c (stdint.h): Likewise.
3751 * thread-db.c (stdint.h): Likewise.
3752 * tracepoint.c (stdint.h): Likewise.
3753 * win32-low.c (stdint.h): Likewise.
3755 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3757 * server.c (write_qxfer_response): Update call to
3758 remote_escape_output.
3760 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3761 Jan Kratochvil <jan.kratochvil@redhat.com>
3763 Merge multiple hex conversions.
3764 * gdbreplay.c (tohex): Rename to 'fromhex'.
3765 (logchar): Use fromhex.
3767 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3769 * server.c (handle_qxfer_libraries): Set `version' attribute for
3772 2015-06-10 Gary Benson <gbenson@redhat.com>
3774 * target.h (struct target_ops) <multifs_open>: New field.
3775 <multifs_unlink>: Likewise.
3776 <multifs_readlink>: Likewise.
3777 * linux-low.c (nat/linux-namespaces.h): New include.
3778 (linux_target_ops): Initialize the_target->multifs_open,
3779 the_target->multifs_unlink and the_target->multifs_readlink.
3780 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3781 * hostio.c (hostio_fs_pid): New static variable.
3782 (hostio_handle_new_gdb_connection): New function.
3783 (handle_setfs): Likewise.
3784 (handle_open): Use the_target->multifs_open as appropriate.
3785 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3786 (handle_readlink): Use the_target->multifs_readlink as
3788 (handle_vFile): Handle vFile:setfs packets.
3789 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3790 after target_handle_new_gdb_connection.
3792 2015-06-10 Gary Benson <gbenson@redhat.com>
3794 * configure.ac (AC_CHECK_FUNCS): Add setns.
3795 * config.in: Regenerate.
3796 * configure: Likewise.
3797 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3798 (linux-namespaces.o): New rule.
3799 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3801 2015-06-09 Gary Benson <gbenson@redhat.com>
3803 * hostio.c (handle_open): Process mode argument with
3804 fileio_to_host_mode.
3806 2015-06-01 Yao Qi <yao.qi@linaro.org>
3808 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3809 * linux-x86-low.c: Likewise.
3811 2015-05-28 Don Breazeal <donb@codesourcery.com>
3813 * linux-low.c (handle_extended_wait): Initialize
3814 thread_info.last_resume_kind for new fork children.
3816 2015-05-15 Pedro Alves <palves@redhat.com>
3818 * target.h (target_handle_new_gdb_connection): Rewrite using if
3819 wrapped in do/while.
3821 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3823 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3824 * configure, config.in: Regenerate.
3825 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3828 2015-05-12 Don Breazeal <donb@codesourcery.com>
3830 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3831 PTRACE_EVENT_VFORK_DONE.
3832 (linux_low_ptrace_options, extended_event_reported): Add vfork
3834 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3835 and "vforkdone" for RSP 'T' Stop Reply Packet.
3836 * server.h (report_vfork_events): Declare
3839 2015-05-12 Don Breazeal <donb@codesourcery.com>
3841 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3842 (the_low_target) <new_fork>: Initialize new member.
3843 * linux-arm-low.c (arm_new_fork): New function.
3844 (the_low_target) <new_fork>: Initialize new member.
3845 * linux-low.c (handle_extended_wait): Call new target function
3847 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3848 * linux-mips-low.c (mips_add_watchpoint): New function
3849 extracted from mips_insert_point.
3850 (the_low_target) <new_fork>: Initialize new member.
3851 (mips_linux_new_fork): New function.
3852 (mips_insert_point): Call mips_add_watchpoint.
3853 * linux-x86-low.c (x86_linux_new_fork): New function.
3854 (the_low_target) <new_fork>: Initialize new member.
3856 2015-05-12 Don Breazeal <donb@codesourcery.com>
3858 * linux-low.c (handle_extended_wait): Implement return value,
3859 rename argument 'event_child' to 'event_lwp', handle
3860 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3861 (linux_low_ptrace_options): New function.
3862 (linux_low_filter_event): Call linux_low_ptrace_options,
3863 use different argument fo linux_enable_event_reporting,
3864 use return value from handle_extended_wait.
3865 (extended_event_reported): New function.
3866 (linux_wait_1): Call extended_event_reported and set
3867 status to report fork events.
3868 (linux_write_memory): Add pid to debug message.
3869 (reset_lwp_ptrace_options_callback): New function.
3870 (linux_handle_new_gdb_connection): New function.
3871 (linux_target_ops): Initialize new structure member.
3872 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3873 * lynx-low.c: Initialize new structure member.
3874 * remote-utils.c (prepare_resume_reply): Implement stop reason
3875 "fork" for "T" stop message.
3876 * server.c (handle_query): Call handle_new_gdb_connection.
3877 * server.h (report_fork_events): Declare global flag.
3878 * target.h (struct target_ops) <handle_new_gdb_connection>:
3880 (target_handle_new_gdb_connection): New macro.
3881 * win32-low.c: Initialize new structure member.
3883 2015-05-12 Don Breazeal <donb@codesourcery.com>
3885 * mem-break.c (APPEND_TO_LIST): Define macro.
3886 (clone_agent_expr): New function.
3887 (clone_one_breakpoint): New function.
3888 (clone_all_breakpoints): New function.
3889 * mem-break.h: Declare new functions.
3891 2015-05-12 Don Breazeal <donb@codesourcery.com>
3893 * linux-low.c (linux_supports_fork_events): New function.
3894 (linux_supports_vfork_events): New function.
3895 (linux_target_ops): Initialize new structure members.
3896 (initialize_low): Call linux_check_ptrace_features.
3897 * lynx-low.c (lynx_target_ops): Initialize new structure
3899 * server.c (report_fork_events, report_vfork_events):
3901 (handle_query): Add new features to qSupported packet and
3903 (captured_main): Initialize new global variables.
3904 * target.h (struct target_ops) <supports_fork_events>:
3906 <supports_vfork_events>: New member.
3907 (target_supports_fork_events): New macro.
3908 (target_supports_vfork_events): New macro.
3909 * win32-low.c (win32_target_ops): Initialize new structure
3912 2015-05-12 Gary Benson <gbenson@redhat.com>
3914 * server.c (handle_qxfer_exec_file): Use current process
3917 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3919 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3920 Remove HAVE_PTRACE_GETREGS conditionals.
3921 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3922 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3924 2015-05-08 Yao Qi <yao.qi@linaro.org>
3926 * linux-low.c (linux_supports_conditional_breakpoints): New
3928 (linux_target_ops): Install new target method.
3929 * lynx-low.c (lynx_target_ops): Install NULL hook for
3930 supports_conditional_breakpoints.
3931 * nto-low.c (nto_target_ops): Likewise.
3932 * spu-low.c (spu_target_ops): Likewise.
3933 * win32-low.c (win32_target_ops): Likewise.
3934 * server.c (handle_query): Check
3935 target_supports_conditional_breakpoints.
3936 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3938 (target_supports_conditional_breakpoints): New macro.
3940 2015-05-06 Pedro Alves <palves@redhat.com>
3943 * server.c (start_inferior): If the process exits, mourn it.
3945 2015-04-21 Gary Benson <gbenson@redhat.com>
3947 * hostio.c (fileio_open_flags_to_host): Factored out to
3948 fileio_to_host_openflags in common/fileio.c. Single use
3951 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3953 * linux-xtensa-low.c (xtensa_fill_gregset)
3954 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3957 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3959 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3960 (regs_info): Replace usrregs pointer with NULL.
3962 2015-04-17 Gary Benson <gbenson@redhat.com>
3964 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3965 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3966 * server.c (handle_qxfer_exec_file): New function.
3967 (qxfer_packets): Add exec-file entry.
3968 (handle_query): Report qXfer:exec-file:read as supported packet.
3970 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3972 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3974 2015-04-09 Gary Benson <gbenson@redhat.com>
3976 * hostio-errno.c (errno_to_fileio_error): Remove function.
3977 Update caller to use remote_fileio_to_fio_error.
3979 2015-04-09 Yao Qi <yao.qi@linaro.org>
3981 * linux-low.c (linux_insert_point): Call
3982 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3983 (linux_remove_point): Call remove_memory_breakpoint if type is
3985 * linux-x86-low.c (x86_insert_point): Don't call
3986 insert_memory_breakpoint.
3987 (x86_remove_point): Don't call remove_memory_breakpoint.
3989 2015-04-01 Pedro Alves <palves@redhat.com>
3990 Cleber Rosa <crosa@redhat.com>
3992 * server.c (gdbserver_usage): Reorganize and extend the usage
3995 2015-03-24 Pedro Alves <palves@redhat.com>
3997 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3998 output. Also dump TRAP_TRACE.
3999 (linux_low_filter_event): In debug output, distinguish a
4000 resume_stop SIGSTOP from a delayed SIGSTOP.
4002 2015-03-24 Gary Benson <gbenson@redhat.com>
4004 * linux-x86-low.c (x86_linux_new_thread): Moved to
4006 (x86_linux_prepare_to_resume): Likewise.
4008 2015-03-24 Gary Benson <gbenson@redhat.com>
4010 * Makefile.in (x86-linux-dregs.o): New rule.
4011 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4012 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4013 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4014 (x86_linux_dr_get): Likewise.
4015 (x86_linux_dr_set): Likewise.
4016 (update_debug_registers_callback): Likewise.
4017 (x86_linux_dr_set_addr): Likewise.
4018 (x86_linux_dr_get_addr): Likewise.
4019 (x86_linux_dr_set_control): Likewise.
4020 (x86_linux_dr_get_control): Likewise.
4021 (x86_linux_dr_get_status): Likewise.
4022 (x86_linux_update_debug_registers): Likewise.
4024 2015-03-24 Gary Benson <gbenson@redhat.com>
4026 * linux-x86-low.c (x86_linux_update_debug_registers):
4027 New function, factored out from...
4028 (x86_linux_prepare_to_resume): ...this.
4030 2015-03-24 Gary Benson <gbenson@redhat.com>
4032 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4033 (x86_linux_dr_set): Likewise.
4034 (update_debug_registers_callback): Likewise.
4035 (x86_linux_dr_set_addr): Likewise.
4036 (x86_linux_dr_get_addr): Likewise.
4037 (x86_linux_dr_set_control): Likewise.
4038 (x86_linux_dr_get_control): Likewise.
4039 (x86_linux_dr_get_status): Likewise.
4040 (x86_linux_prepare_to_resume): Likewise.
4042 2015-03-24 Gary Benson <gbenson@redhat.com>
4044 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4045 Use perror_with_name. Pass string through gettext.
4046 (x86_linux_dr_set): Likewise.
4048 2015-03-24 Gary Benson <gbenson@redhat.com>
4050 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4051 (x86_linux_dr_set_addr): ...this.
4052 (x86_dr_low_get_addr): Rename to...
4053 (x86_linux_dr_get_addr): ...this.
4054 (x86_dr_low_set_control): Rename to...
4055 (x86_linux_dr_set_control): ...this.
4056 (x86_dr_low_get_control): Rename to...
4057 (x86_linux_dr_get_control): ...this.
4058 (x86_dr_low_get_status): Rename to...
4059 (x86_linux_dr_get_status): ...this.
4060 (x86_dr_low): Update with new function names.
4062 2015-03-24 Gary Benson <gbenson@redhat.com>
4064 * Makefile.in (x86-linux.o): New rule.
4065 * configure.srv: Add x86-linux.o to relevant targets.
4066 * linux-low.c (lwp_set_arch_private_info): New function.
4067 (lwp_arch_private_info): Likewise.
4068 * linux-x86-low.c: Include nat/x86-linux.h.
4069 (arch_lwp_info): Removed structure.
4070 (update_debug_registers_callback):
4071 Use lwp_set_debug_registers_changed.
4072 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4073 and lwp_set_debug_registers_changed.
4074 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4076 2015-03-24 Gary Benson <gbenson@redhat.com>
4078 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4079 * linux-arm-low.c (arm_new_thread): Likewise.
4080 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4081 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4082 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4083 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4085 2015-03-24 Gary Benson <gbenson@redhat.com>
4087 * linux-low.c (ptid_of_lwp): New function.
4088 (lwp_is_stopped): Likewise.
4089 (lwp_stop_reason): Likewise.
4090 * linux-x86-low.c (update_debug_registers_callback):
4092 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4095 2015-03-24 Gary Benson <gbenson@redhat.com>
4097 * linux-low.h (linux_stop_lwp): Remove declaration.
4099 2015-03-24 Gary Benson <gbenson@redhat.com>
4101 * linux-low.h: Include nat/linux-nat.h.
4102 * linux-low.c (iterate_over_lwps_args): New structure.
4103 (iterate_over_lwps_filter): New function.
4104 (iterate_over_lwps): Likewise.
4105 * linux-x86-low.c (update_debug_registers_callback):
4106 Update signature to what iterate_over_lwps expects.
4107 Remove PID check that iterate_over_lwps now performs.
4108 (x86_dr_low_set_addr): Use iterate_over_lwps.
4109 (x86_dr_low_set_control): Likewise.
4111 2015-03-24 Gary Benson <gbenson@redhat.com>
4113 * linux-x86-low.c (x86_debug_reg_state): New function.
4114 (x86_linux_prepare_to_resume): Use the above.
4116 2015-03-24 Gary Benson <gbenson@redhat.com>
4118 * linux-low.c (current_lwp_ptid): New function.
4119 * linux-x86-low.c: Include nat/linux-nat.h.
4120 (x86_dr_low_get_addr): Use current_lwp_ptid.
4121 (x86_dr_low_get_control): Likewise.
4122 (x86_dr_low_get_status): Likewise.
4124 2015-03-20 Pedro Alves <palves@redhat.com>
4126 * tracepoint.c (cmd_qtstatus): Make "str" const.
4128 2015-03-20 Pedro Alves <palves@redhat.com>
4130 * server.c (handle_general_set): Make "req_str" const.
4132 2015-03-19 Pedro Alves <palves@redhat.com>
4134 * linux-low.c (linux_resume_one_lwp): Rename to ...
4135 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4136 instead call perror_with_name.
4137 (check_ptrace_stopped_lwp_gone): New function.
4138 (linux_resume_one_lwp): Reimplement as wrapper around
4139 linux_resume_one_lwp_throw that swallows errors if the LWP is
4142 2015-03-19 Pedro Alves <palves@redhat.com>
4144 * linux-low.c (count_events_callback, select_event_lwp_callback):
4145 No longer check whether the thread has resume_stop as last resume
4148 2015-03-19 Pedro Alves <palves@redhat.com>
4150 * linux-low.c (count_events_callback, select_event_lwp_callback):
4151 Use the lwp's status_pending_p field, not the thread's.
4153 2015-03-19 Pedro Alves <palves@redhat.com>
4155 * linux-low.c (select_event_lwp_callback): Update comments to
4156 no longer mention SIGTRAP.
4158 2015-03-18 Gary Benson <gbenson@redhat.com>
4160 * server.c (handle_query): Do not report vFile:fstat as supported.
4162 2015-03-11 Gary Benson <gbenson@redhat.com>
4164 * hostio.c (sys/types.h): New include.
4165 (sys/stat.h): Likewise.
4166 (common-remote-fileio.h): Likewise.
4167 (handle_fstat): New function.
4168 (handle_vFile): Handle vFile:fstat packets.
4170 2015-03-11 Gary Benson <gbenson@redhat.com>
4172 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4173 struct stat.st_blocks and struct stat.st_blksize.
4174 * configure: Regenerate.
4175 * config.in: Likewise.
4176 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4177 (OBS): Add common-remote-fileio.o.
4178 (common-remote-fileio.o): New rule.
4180 2015-03-09 Pedro Alves <palves@redhat.com>
4182 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4183 'struct sockaddr' pointer in 'accept' call.
4185 2015-03-09 Pedro Alves <palves@redhat.com>
4188 2015-03-07 Pedro Alves <palves@redhat.com>
4189 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4190 or <winsock2.h> here. Instead include "gdb_socket.h".
4191 (remote_open): Use union gdb_sockaddr_u.
4192 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4193 or <winsock2.h> here. Instead include "gdb_socket.h".
4194 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4195 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4197 (init_named_socket, gdb_agent_helper_thread): Use union
4200 2015-03-07 Pedro Alves <palves@redhat.com>
4202 * configure.ac (build_warnings): Move
4203 -Wdeclaration-after-statement to the C-specific set.
4204 * configure: Regenerate.
4206 2015-03-07 Pedro Alves <palves@redhat.com>
4208 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4209 or <winsock2.h> here. Instead include "gdb_socket.h".
4210 (remote_open): Use union gdb_sockaddr_u.
4211 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4212 or <winsock2.h> here. Instead include "gdb_socket.h".
4213 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4214 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4216 (init_named_socket, gdb_agent_helper_thread): Use union
4219 2015-03-07 Pedro Alves <palves@redhat.com>
4221 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4224 2015-03-06 Yao Qi <yao.qi@linaro.org>
4226 * linux-aarch64-low.c (aarch64_insert_point): Use
4227 show_debug_regs as a boolean.
4228 (aarch64_remove_point): Likewise.
4230 2015-03-05 Pedro Alves <palves@redhat.com>
4232 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4233 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4234 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4235 * nto-low.c (nto_target_ops): Likewise.
4236 * spu-low.c (spu_target_ops): Likewise.
4237 * win32-low.c (win32_target_ops): Likewise.
4239 2015-03-04 Pedro Alves <palves@redhat.com>
4241 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4242 Decide whether a breakpoint triggered based on the SIGTRAP's
4244 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4245 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4246 (linux_low_filter_event): Check for breakpoints before checking
4248 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4250 (linux_stopped_by_sw_breakpoint)
4251 (linux_supports_stopped_by_sw_breakpoint)
4252 (linux_stopped_by_hw_breakpoint)
4253 (linux_supports_stopped_by_hw_breakpoint): New functions.
4254 (linux_target_ops): Install new target methods.
4256 2015-03-04 Pedro Alves <palves@redhat.com>
4258 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4259 * server.c (swbreak_feature, hwbreak_feature): New globals.
4260 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4261 (captured_main): Clear swbreak_feature and hwbreak_feature.
4262 * server.h (swbreak_feature, hwbreak_feature): Declare.
4263 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4264 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4265 supports_stopped_by_hw_breakpoint>: New fields.
4266 (target_supports_stopped_by_sw_breakpoint)
4267 (target_stopped_by_sw_breakpoint)
4268 (target_supports_stopped_by_hw_breakpoint)
4269 (target_stopped_by_hw_breakpoint): Declare.
4271 2015-03-04 Pedro Alves <palves@redhat.com>
4273 enum lwp_stop_reason -> enum target_stop_reason
4274 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4275 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4276 (linux_wait_1, stuck_in_jump_pad_callback)
4277 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4278 (linux_stopped_by_watchpoint):
4279 * linux-low.h (enum lwp_stop_reason): Delete.
4280 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4281 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4283 2015-03-04 Yao Qi <yao.qi@linaro.org>
4285 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4287 2015-03-03 Gary Benson <gbenson@redhat.com>
4289 * hostio.c (handle_vFile): Fix prefix lengths.
4291 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4293 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4296 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4298 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4299 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4300 (clean): Add "rm -f" for above C files.
4301 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4302 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4303 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4304 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4305 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4306 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4307 (init_registers_s390x_vx_linux64)
4308 (init_registers_s390x_tevx_linux64)
4309 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4310 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4312 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4313 (s390_store_vxrs_high): New functions.
4314 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4316 (s390_arch_setup): Add logic for selecting one of the new target
4317 descriptions. Activate the new vector regsets if applicable.
4318 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4319 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4320 and init_registers_s390x_tevx_linux64.
4322 2015-03-01 Pedro Alves <palves@redhat.com>
4324 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4327 2015-02-27 Pedro Alves <palves@redhat.com>
4329 * linux-x86-low.c (u_debugreg_offset): New function.
4330 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4332 2015-02-27 Pedro Alves <palves@redhat.com>
4334 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4335 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4336 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4337 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4338 (ps_lsetfpregs, ps_getpid)
4339 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4340 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4341 (ps_lsetxregs, ps_plog): Declare.
4343 2015-02-27 Pedro Alves <palves@redhat.com>
4345 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4346 IP_AGENT_EXPORT_FUNC.
4347 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4348 IP_AGENT_EXPORT_FUNC.
4349 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4350 (IP_AGENT_EXPORT): Delete.
4351 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4352 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4353 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4354 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4355 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4356 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4357 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4358 (traceframe_read_count, traceframe_write_count)
4359 (traceframes_created, trace_state_variables, get_raw_reg)
4360 (get_trace_state_variable_value, set_trace_state_variable_value)
4361 (ust_loaded, helper_thread_id, cmd_buf): Use
4362 IPA_SYM_EXPORTED_NAME.
4363 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4364 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4365 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4366 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4367 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4368 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4369 EXTERN_C_PUSH/EXTERN_C_POP.
4370 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4371 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4372 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4373 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4374 (traceframe_write_count, traceframe_read_count)
4375 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4376 (about_to_request_buffer_space, get_trace_state_variable_value)
4377 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4378 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4379 EXTERN_C_PUSH/EXTERN_C_POP.
4380 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4381 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4382 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4383 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4384 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4385 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4386 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4387 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4389 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4390 (IP_AGENT_EXPORT_VAR_DECL): Define.
4392 (gdb_agent_get_raw_reg): Declare.
4394 2015-02-27 Tom Tromey <tromey@redhat.com>
4395 Pedro Alves <palves@redhat.com>
4397 Rename symbols whose names are reserved C++ keywords throughout.
4399 2015-02-27 Pedro Alves <palves@redhat.com>
4401 * Makefile.in (COMPILER): New, get it from autoconf.
4402 (CXX): Get from autoconf instead.
4403 (COMPILE.pre): Use COMPILER.
4404 (CC-LD): Rename to ...
4405 (CC_LD): ... this. Use COMPILER.
4406 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4407 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4408 * acinclude.m4: Include build-with-cxx.m4.
4409 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4410 Disable -Werror by default if building in C++ mode.
4411 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4412 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4413 the C++ compiler. Save/restore CXXFLAGS too.
4414 * configure: Regenerate.
4416 2015-02-27 Pedro Alves <palves@redhat.com>
4418 * acinclude.m4: Include libiberty.m4.
4419 * configure.ac: Call libiberty_INIT.
4420 * config.in, configure: Regenerate.
4422 2015-02-26 Pedro Alves <palves@redhat.com>
4424 * linux-low.c (linux_wait_1): When incrementing the PC past a
4425 program breakpoint always use the_low_target.breakpoint_len as
4426 increment, rather than the maximum between that and
4427 the_low_target.decr_pc_after_break.
4429 2015-02-23 Pedro Alves <palves@redhat.com>
4431 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4432 thread was doing a step-over; always adjust the PC if
4433 we stepped over a permanent breakpoint.
4434 (linux_wait_1): If we stepped over breakpoint that was on top of a
4435 permanent breakpoint, manually advance the PC past it.
4437 2015-02-23 Pedro Alves <palves@redhat.com>
4439 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4441 (x86_fill_gregset, x86_store_gregset): Use it when handling
4444 2015-02-20 Pedro Alves <palves@redhat.com>
4446 * thread-db.c: Include "nat/linux-procfs.h".
4447 (thread_db_init): Skip listing new threads if the kernel supports
4448 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4450 2015-02-20 Pedro Alves <palves@redhat.com>
4452 * linux-low.c (status_pending_p_callback): Use ptid_match.
4454 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4456 PR breakpoints/16812
4457 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4458 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4459 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4461 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4463 PR breakpoints/15956
4464 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4466 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4468 * linux-low.c (linux_low_btrace_conf): Print size.
4469 * server.c (handle_btrace_conf_general_set): New.
4470 (hanle_general_set): Call handle_btrace_conf_general_set.
4471 (handle_query): Report Qbtrace-conf:bts:size as supported.
4473 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4475 * linux-low.c (linux_low_enable_btrace): Update parameters.
4476 (linux_low_btrace_conf): New.
4477 (linux_target_ops)<to_btrace_conf>: Initialize.
4478 * server.c (current_btrace_conf): New.
4479 (handle_btrace_enable): Rename to ...
4480 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4481 to target_enable_btrace. Update comment. Update users.
4482 (handle_qxfer_btrace_conf): New.
4483 (qxfer_packets): Add btrace-conf entry.
4484 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4485 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4486 (target_ops)<read_btrace_conf>: New.
4487 (target_enable_btrace): Update parameters.
4488 (target_read_btrace_conf): New.
4490 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4492 * server.c (handle_btrace_general_set): Remove call to
4493 target_supports_btrace.
4494 (supported_btrace_packets): New.
4495 (handle_query): Call supported_btrace_packets.
4496 * target.h: include btrace-common.h.
4497 (btrace_target_info): Removed.
4498 (supports_btrace, target_supports_btrace): Update parameters.
4500 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4502 * Makefile.in (SFILES): Add common/btrace-common.c.
4503 (OBS): Add common/btrace-common.o.
4504 (btrace-common.o): Add build rules.
4505 * linux-low: Include btrace-common.h.
4506 (linux_low_read_btrace): Use struct btrace_data. Call
4507 btrace_data_init and btrace_data_fini.
4509 2015-02-06 Pedro Alves <palves@redhat.com>
4511 * thread-db.c (find_new_threads_callback): Add debug output.
4513 2015-02-04 Pedro Alves <palves@redhat.com>
4515 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4516 (resume_stopped_resumed_lwps): New function.
4517 (linux_wait_for_event_filtered): Use it.
4519 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4521 * Makefile.in (SFILES): Add linux-personality.c.
4522 (linux-personality.o): New rule.
4523 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4524 list of objects to be built.
4525 * linux-low.c: Include nat/linux-personality.h.
4526 (linux_create_inferior): Remove code to disable address space
4527 randomization (moved to ../nat/linux-personality.c). Create
4528 cleanup to disable address space randomization.
4530 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4532 * Makefile.in (posix-strerror.o): New rule.
4533 (mingw-strerror.o): Likewise.
4534 * configure: Regenerated.
4535 * configure.ac: Source file ../common/common.host. Initialize new
4536 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4538 2015-01-14 Yao Qi <yao@codesourcery.com>
4540 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4541 (ppc-linux.o): New rule.
4542 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4543 * configure.ac: AC_CHECK_FUNCS(getauxval).
4544 * config.in: Re-generated.
4545 * configure: Re-generated.
4546 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4547 ppc64_64bit_inferior_p
4549 2015-01-14 Yao Qi <yao@codesourcery.com>
4551 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4552 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4553 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4554 (PT_ORIG_R3, PT_TRAP): Likewise.
4555 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4556 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4557 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4559 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4561 * i387-fp.c (i387_cache_to_xsave): In look over
4562 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4563 zmmh_low_space field by use of zmmh_high_space.
4565 2015-01-09 Pedro Alves <palves@redhat.com>
4567 * linux-low.c (step_over_bkpt): Move higher up in the file.
4568 (handle_extended_wait): Don't store the stop_pc here.
4569 (get_stop_pc): Adjust comments and rename to ...
4570 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4571 stopped for a software breakpoint or hardware breakpoint.
4572 (thread_still_has_status_pending_p): New function.
4573 (status_pending_p_callback): Use
4574 thread_still_has_status_pending_p. If the event is no longer
4575 interesting, resume the LWP.
4576 (handle_tracepoints): Add assert.
4577 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4578 (wstatus_maybe_breakpoint): New function.
4579 (cancel_breakpoint): Delete function.
4580 (check_stopped_by_watchpoint): New function, factored out from
4581 linux_low_filter_event.
4582 (lp_status_maybe_breakpoint): Delete function.
4583 (linux_low_filter_event): Remove filter_ptid argument.
4584 Leave thread group exits pending here. Store the LWP's stop PC.
4585 Always leave events pending.
4586 (linux_wait_for_event_filtered): Pull all events out of the
4587 kernel, and leave them all pending.
4588 (count_events_callback, select_event_lwp_callback): Consider all
4590 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4591 (select_event_lwp): Only give preference to the stepping LWP in
4592 all-stop mode. Adjust comments.
4593 (ignore_event): New function.
4594 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4595 references to cancel_breakpoints. Adjust to renames. Also give
4596 equal priority to all LWPs that have had events in non-stop mode.
4597 If reporting a software breakpoint event, unadjust the LWP's PC.
4598 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4599 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4601 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4602 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4603 (linux_stopped_by_watchpoint): Adjust.
4604 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4605 * linux-low.h (enum lwp_stop_reason): New.
4606 (struct lwp_info) <stop_pc>: Adjust comment.
4607 <stopped_by_watchpoint>: Delete field.
4608 <stop_reason>: New field.
4609 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4610 * mem-break.c (software_breakpoint_inserted_here)
4611 (hardware_breakpoint_inserted_here): New function.
4612 * mem-break.h (software_breakpoint_inserted_here)
4613 (hardware_breakpoint_inserted_here): Declare.
4614 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4615 (cancel_breakpoints): Delete.
4616 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4617 (upload_fast_traceframes): Remove references to
4620 2015-01-09 Pedro Alves <palves@redhat.com>
4622 * thread-db.c (find_new_threads_callback): Ignore thread if the
4623 kernel thread ID is -1.
4625 2015-01-09 Pedro Alves <palves@redhat.com>
4627 * linux-low.c (linux_attach_fail_reason_string): Move to
4628 nat/linux-ptrace.c, and rename.
4629 (linux_attach_lwp): Update comment.
4630 (attach_proc_task_lwp_callback): New function.
4631 (linux_attach): Adjust to rename and use
4632 linux_proc_attach_tgid_threads.
4633 (linux_attach_fail_reason_string): Delete declaration.
4635 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4637 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4638 * server.c (gdbserver_version): Likewise.
4640 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4642 * remote-utils.c: Include ctype.h.
4643 (input_interrupt): Explicitly handle the case when the char
4644 received is the NUL byte. Improve the printing of non-ASCII
4647 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4649 * linux-low.c (linux_low_filter_event): Update call to
4650 linux_enable_event_reporting following the addition of
4651 a new parameter to that function.
4653 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4656 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4657 (AARCH64_FPCR_REGNO): Likewise.
4658 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4659 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4660 (aarch64_store_fpregset): Likewise.
4662 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4664 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4665 Remove FIXME comment about assumption about N.
4667 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4669 * configure.ac: If large-file support is disabled in GDBserver,
4670 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4671 * configure: Regenerate.
4673 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4675 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4676 warning upon ENODATA from ptrace.
4677 * linux-s390-low.c (s390_store_tdb): New.
4678 (s390_regsets): Add regset for NT_S390_TDB.
4680 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4682 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4683 without a fill_function.
4684 * linux-s390-low.c (s390_fill_last_break): Remove.
4685 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4686 (s390_arch_setup): Use regset's size instead of fill_function for
4689 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4691 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4692 the regset's store function when ptrace returned an error.
4693 * regcache.c (get_thread_regcache): Invalidate register cache
4694 before fetching inferior's registers.
4696 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4698 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4699 while-loop as for-loop.
4700 (regsets_store_inferior_registers): Likewise.
4702 2014-11-28 Yao Qi <yao@codesourcery.com>
4704 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4705 * config.in, configure: Re-generate.
4706 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4709 2014-11-21 Yao Qi <yao@codesourcery.com>
4711 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4712 (AC_CHECK_HEADERS): Remove malloc.h.
4713 * configure: Re-generated.
4714 * config.in: Re-generated.
4715 * server.h: Don't include alloca.h and malloc.h.
4716 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4717 Don't include malloc.h.
4719 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4721 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4722 corresponding ERRNO check in same block.
4724 2014-11-12 Pedro Alves <palves@redhat.com>
4726 * server.c (cont_thread): Update comment.
4727 (start_inferior, attach_inferior): No longer clear cont_thread.
4728 (handle_v_cont): No longer set cont_thread.
4729 (captured_main): Clear cont_thread each time a GDB connects.
4731 2014-11-12 Pedro Alves <palves@redhat.com>
4733 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4734 thread, and don't resume all threads if the Hc thread has exited.
4736 2014-11-12 Pedro Alves <palves@redhat.com>
4738 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4739 the process group instead of to a specific LWP.
4741 2014-10-15 Pedro Alves <palves@redhat.com>
4744 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4746 (arm_set_thread_context): Delete.
4747 (the_low_target): Adjust.
4748 * win32-i386-low.c (debug_registers_changed)
4749 (debug_registers_used): Delete.
4750 (update_debug_registers_callback): New function.
4751 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4752 needing to update their debug registers.
4753 (win32_get_current_dr): New function.
4754 (x86_dr_low_get_addr, x86_dr_low_get_control)
4755 (x86_dr_low_get_status): Fetch the debug register from the thread
4757 (i386_initial_stuff): Adjust.
4758 (i386_get_thread_context): Remove current_event parameter. Don't
4759 clear debug_registers_changed nor copy DR values to
4761 (i386_set_thread_context): Delete.
4762 (i386_prepare_to_resume): New function.
4763 (i386_thread_added): Mark the thread as needing to update irs
4765 (the_low_target): Remove i386_set_thread_context and install
4766 i386_prepare_to_resume.
4767 * win32-low.c (win32_get_thread_context): Adjust.
4768 (win32_set_thread_context): Use SetThreadContext
4770 (win32_prepare_to_resume): New function.
4771 (win32_require_context): New function, factored out from ...
4772 (thread_rec): ... this.
4773 (continue_one_thread): Call win32_prepare_to_resume on each thread
4774 we're about to continue.
4775 (win32_resume): Call win32_prepare_to_resume on the event thread.
4776 * win32-low.h (struct win32_thread_info)
4777 <debug_registers_changed>: New field.
4778 (struct win32_target_ops): Change prototype of set_thread_context,
4779 delete set_thread_context and add prepare_to_resume.
4780 (win32_require_context): New declaration.
4782 2014-10-08 Gary Benson <gbenson@redhat.com>
4784 * server.h: Do not include common-exceptions.h.
4786 2014-10-08 Gary Benson <gbenson@redhat.com>
4788 * server.h: Do not include cleanups.h.
4790 2014-09-30 James Hogan <james.hogan@imgtec.com>
4792 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4795 2014-09-23 Yao Qi <yao@codesourcery.com>
4797 * linux-low.c (lp_status_maybe_breakpoint): New function.
4798 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4799 (count_events_callback): Likewise.
4800 (select_event_lwp_callback): Likewise.
4801 (cancel_breakpoints_callback): Likewise.
4803 2014-09-19 Don Breazeal <donb@codesourcery.com>
4805 * linux-low.c (handle_extended_wait): Call
4806 linux_ptrace_get_extended_event.
4807 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4808 linux_is_extended_waitstatus.
4810 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4812 * Makefile.in (CPPFLAGS): Define.
4813 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4814 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4816 2014-09-16 Gary Benson <gbenson@redhat.com>
4818 * inferiors.h (current_inferior): Renamed as...
4819 (current_thread): New variable. All uses updated.
4820 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4821 (maybe_move_out_of_jump_pad): Likewise.
4822 (cancel_breakpoint): Likewise.
4823 (linux_low_filter_event): Likewise.
4824 (wait_for_sigstop): Likewise.
4825 (linux_resume_one_lwp): Likewise.
4826 (need_step_over_p): Likewise.
4827 (start_step_over): Likewise.
4828 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4829 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4830 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4831 and save_inferior as saved_thread.
4832 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4834 (regcache_invalidate_thread): Likewise.
4835 * remote-utils.c (prepare_resume_reply): Likewise.
4836 * thread-db.c (thread_db_get_tls_address): Likewise.
4837 (disable_thread_event_reporting): Likewise.
4838 (remove_thread_event_breakpoints): Likewise.
4839 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4841 * target.h (set_desired_inferior): Renamed as...
4842 (set_desired_thread): New declaration. All uses updated.
4843 * server.c (myresume): Updated comment to reference thread instead
4845 (handle_serial_event): Likewise.
4846 (handle_target_event): Likewise.
4848 2014-09-12 Tom Tromey <tromey@redhat.com>
4849 Gary Benson <gbenson@redhat.com>
4851 * regcache.h: Include common-regcache.h.
4852 (regcache_read_pc): Don't declare.
4853 * regcache.c (get_thread_regcache_for_ptid): New function.
4855 2014-09-11 Tom Tromey <tromey@redhat.com>
4856 Gary Benson <gbenson@redhat.com>
4858 * symbol.c: New file.
4859 * Makefile.in (SFILES): Add symbol.c.
4860 (OBS): Add symbol.o.
4862 2014-09-11 Gary Benson <gbenson@redhat.com>
4864 * target.c (target_stop_ptid, target_continue_ptid): New
4867 2014-09-11 Tom Tromey <tromey@redhat.com>
4868 Gary Benson <gbenson@redhat.com>
4870 * target.h: Include target/target.h.
4871 * target.c (target_read_memory, target_read_uint32)
4872 (target_write_memory): New functions.
4874 2014-09-11 Gary Benson <gbenson@redhat.com>
4876 * server.h (debug_hw_points): Don't declare.
4877 * server.c (debug_hw_points): Don't define. Replace all uses
4878 with show_debug_regs.
4879 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4880 all uses with show_debug_regs.
4882 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4884 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4885 endianness into account.
4886 (ppc_supply_ptrace_register): Likewise.
4888 2014-09-03 James Hogan <james.hogan@imgtec.com>
4890 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4891 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4893 2014-09-03 Gary Benson <gbenson@redhat.com>
4895 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4896 ALL_DEBUG_ADDRESS_REGISTERS.
4898 2014-09-02 Gary Benson <gbenson@redhat.com>
4900 * i386-low.h: Renamed as...
4901 * x86-low.h: New file. All type, function and variable name
4902 prefixes changed from "i386_" to "x86_". All references updated.
4903 * i386-low.c: Renamed as...
4904 * x86-low.c: New file. All type, function and variable name
4905 prefixes changed from "i386_" to "x86_". All references updated.
4907 2014-09-02 Gary Benson <gbenson@redhat.com>
4909 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4910 (x86_linux_new_thread): Likewise.
4912 2014-08-29 Gary Benson <gbenson@redhat.com>
4914 * server.h (setjmp.h): Do not include.
4915 (toplevel): Do not declare.
4916 (common-exceptions.h): Include.
4917 (cleanups.h): Likewise.
4918 * server.c (toplevel): Do not define.
4919 (exit_code): New static global.
4920 (detach_or_kill_for_exit_cleanup): New function.
4921 (main): New function. Original main renamed to...
4922 (captured_main): New function.
4923 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4925 2014-08-29 Gary Benson <gbenson@redhat.com>
4927 * Makefile.in (SFILES): Add common/common-exceptions.c.
4928 (OBS): Add common-exceptions.o.
4929 (common-exceptions.o): New rule.
4930 * utils.c (prepare_to_throw_exception): New function.
4932 2014-08-29 Gary Benson <gbenson@redhat.com>
4934 * config.in: Regenerate.
4935 * configure: Likewise.
4937 2014-08-29 Gary Benson <gbenson@redhat.com>
4939 * Makefile.in (SFILES): Add common/cleanups.c.
4941 (cleanups.o): New rule.
4943 2014-08-29 Gary Benson <gbenson@redhat.com>
4945 * utils.c (internal_vwarning): New function.
4947 2014-08-28 Gary Benson <gbenson@redhat.com>
4949 * utils.h (fatal): Remove declaration.
4950 * utils.c (fatal): Remove function.
4952 2014-08-28 Gary Benson <gbenson@redhat.com>
4954 * tracepoint.c (gdb_agent_init): Replace fatal with
4956 (initialize_tracepoint): Likewise.
4958 2014-08-28 Gary Benson <gbenson@redhat.com>
4960 * remote-utils.c (remote_prepare): Replace fatal with error.
4962 2014-08-28 Gary Benson <gbenson@redhat.com>
4964 * linux-low.c (linux_async): Replace fatal with warning.
4966 (linux_start_non_stop): Return -1 if linux_async failed.
4968 2014-08-28 Gary Benson <gbenson@redhat.com>
4970 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4972 (i386_dr_low_get_addr): Remove vague comment.
4973 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4976 2014-08-28 Gary Benson <gbenson@redhat.com>
4978 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4979 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4981 (linux_resume_one_lwp): Likewise.
4982 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4984 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4985 with internal_error.
4986 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4987 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4988 (find_register_by_name): Replace fatal with internal_error.
4989 (find_regno): Likewise.
4990 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4991 * thread-db.c (thread_db_create_event): Likewise.
4992 (thread_db_load_search): Likewise.
4993 (try_thread_db_load_1): Likewise.
4994 * tracepoint.c (get_jump_space_head): Replace fatal with
4996 (claim_trampoline_space): Likewise.
4997 (have_fast_tracepoint_trampoline_buffer): Likewise.
4998 (cmd_qtstart): Likewise.
4999 (stop_tracing): Likewise.
5000 (fast_tracepoint_collecting): Likewise.
5001 (target_malloc): Likewise.
5002 (download_tracepoint): Likewise.
5003 (download_trace_state_variables): Replace check with gdb_assert.
5004 (upload_fast_traceframes): Replace fatal with internal_error.
5006 2014-08-19 Tom Tromey <tromey@redhat.com>
5007 Gary Benson <gbenson@redhat.com>
5009 * Makefile.in (SFILES): Add common/common-debug.c.
5010 (OBS): Add common-debug.o.
5011 (common-debug.o): New rule.
5012 * debug.h (debug_printf): Don't declare.
5013 * debug.c (debug_printf): Renamed and rewritten as...
5014 (debug_vprintf): New function.
5016 2014-08-19 Gary Benson <gbenson@redhat.com>
5018 * utils.h: Do not include print-utils.h.
5020 2014-08-19 Tom Tromey <tromey@redhat.com>
5021 Gary Benson <gbenson@redhat.com>
5023 * server.h: Add static assertion.
5024 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5026 2014-08-19 Tom Tromey <tromey@redhat.com>
5027 Gary Benson <gbenson@redhat.com>
5029 * Makefile.in (SFILES): Add common/errors.c.
5030 (OBS): Add errors.o.
5031 (IPA_OBS): Add errors-ipa.o.
5032 (errors.o): New rule.
5033 (errors-ipa.o): Likewise.
5034 * utils.h (perror_with_name, error, warning): Don't declare.
5035 * utils.c (warning): Renamed and rewritten as...
5036 (vwarning): New function.
5037 (error): Renamed and rewritten as...
5038 (verror): New function.
5039 (internal_error): Renamed and rewritten as...
5040 (internal_verror): New function.
5042 2014-08-07 Gary Benson <gbenson@redhat.com>
5044 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5045 * configure: Regenerate.
5046 * config.in: Likewise.
5047 * server.h: Do not include errno.h.
5048 * event-loop.c: Likewise.
5049 * hostio-errno.c: Likewise.
5050 * linux-low.c: Likewise.
5051 * remote-utils.c: Likewise.
5052 * spu-low.c: Likewise.
5053 * utils.c: Likewise.
5054 * gdbreplay.c: Unconditionally include errno.h.
5056 2014-08-07 Gary Benson <gbenson@redhat.com>
5058 * server.h: Do not include string.h.
5059 * event-loop.c: Likewise.
5060 * linux-low.c: Likewise.
5061 * regcache.c: Likewise.
5062 * remote-utils.c: Likewise.
5063 * spu-low.c: Likewise.
5064 * utils.c: Likewise.
5066 2014-08-07 Gary Benson <gbenson@redhat.com>
5068 * server.h: Do not include gdb_assert.h.
5070 2014-08-07 Gary Benson <gbenson@redhat.com>
5072 * server.h: Do not include common-utils.h.
5074 2014-08-07 Gary Benson <gbenson@redhat.com>
5076 * server.h: Do not include ptid.h.
5077 * notif.h: Likewise.
5079 2014-08-07 Gary Benson <gbenson@redhat.com>
5081 * server.h: Do not include gdb_locale.h.
5083 2014-08-07 Gary Benson <gbenson@redhat.com>
5085 * server.h: Do not include gdb/signals.h.
5086 * win32-low.c: Likewise.
5088 2014-08-07 Gary Benson <gbenson@redhat.com>
5090 * server.h: Do not include pathmax.h.
5092 2014-08-07 Gary Benson <gbenson@redhat.com>
5094 * server.h: Do not include libiberty.h.
5095 * linux-bfin-low.c: Likewise.
5097 2014-08-07 Gary Benson <gbenson@redhat.com>
5099 * server.h: Do not include ansidecl.h.
5101 2014-08-07 Gary Benson <gbenson@redhat.com>
5103 * linux-x86-low.c: Do not include stddef.h.
5104 * lynx-ppc-low.c: Likewise.
5105 * tracepoint.c: Likewise.
5107 2014-08-07 Gary Benson <gbenson@redhat.com>
5109 * server.h: Do not include stdarg.h.
5110 * nto-low.c: Likewise.
5112 2014-08-07 Gary Benson <gbenson@redhat.com>
5114 * server.h: Do not include stdlib.h.
5115 * inferiors.c: Likewise.
5116 * linux-low.c: Likewise.
5117 * regcache.c: Likewise.
5118 * spu-low.c: Likewise.
5119 * tracepoint.c: Likewise.
5120 * utils.c: Likewise.
5122 2014-08-07 Gary Benson <gbenson@redhat.com>
5124 * server.h: Do not include stdio.h.
5125 * linux-low.c: Likewise.
5126 * remote-utils.c: Likewise.
5127 * spu-low.c: Likewise.
5128 * utils.c: Likewise.
5129 * wincecompat.c: Likewise.
5131 2014-08-06 Gary Benson <gbenson@redhat.com>
5133 * regcache.c (init_register_cache): Move conditionals inside if.
5135 2014-08-06 Gary Benson <gbenson@redhat.com>
5137 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5139 2014-07-31 Gary Benson <gbenson@redhat.com>
5141 * ax.h: Do not include server.h.
5142 * gdbthread.h: Likewise.
5143 * lynx-low.h: Likewise.
5144 * notif.h: Likewise.
5146 2014-07-30 Gary Benson <gbenson@redhat.com>
5148 * server.h: Include common-defs.h.
5149 Do not include config.h or build-gnulib-gdbserver/config.h.
5151 2014-07-30 Gary Benson <gbenson@redhat.com>
5153 * hostio-errno.c: Move server.h to top of includes list.
5154 * inferiors.c: Likewise.
5155 * linux-x86-low.c: Likewise.
5156 * notif.c: Include server.h.
5158 2014-07-24 Tom Tromey <tromey@redhat.com>
5159 Gary Benson <gbenson@redhat.com>
5161 * server.h (CORE_ADDR): Now unsigned.
5163 2014-07-16 Pedro Alves <palves@redhat.com>
5165 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5167 2014-07-15 Pedro Alves <palves@redhat.com>
5169 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5172 2014-07-11 Pedro Alves <palves@redhat.com>
5174 * linux-low.c (kill_wait_lwp): New function, based on
5175 kill_one_lwp_callback, but use my_waitpid directly.
5176 (kill_one_lwp_callback, linux_kill): Use it.
5178 2014-06-23 Pedro Alves <palves@redhat.com>
5180 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5181 before setting DR0..DR3.
5183 2014-06-20 Gary Benson <gbenson@redhat.com>
5185 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5186 * configure: Regenerated.
5187 * config.in: Likewise.
5189 2014-06-20 Gary Benson <gbenson@redhat.com>
5191 * Makefile.in (SFILES): Update locations for files moved
5193 (object file files): Reordered.
5195 2014-06-20 Gary Benson <gbenson@redhat.com>
5197 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5198 (i386_dr_low_set_addr): Likewise.
5199 (i386_dr_low_get_addr): Likewise.
5200 (i386_dr_low_can_set_control): Likewise.
5201 (i386_dr_low_set_control): Likewise.
5202 (i386_dr_low_get_control): Likewise.
5203 (i386_dr_low_get_status): Likewise.
5204 (i386_get_debug_register_length): Likewise.
5205 * linux-x86-low.c (i386_dr_low_set_addr):
5206 Changed signature. Made static.
5207 (i386_dr_low_get_addr): Likewise.
5208 (i386_dr_low_set_control): Likewise.
5209 (i386_dr_low_get_control): Likewise.
5210 (i386_dr_low_get_status): Likewise.
5211 (i386_dr_low): New global variable.
5212 * win32-i386-low.c (i386_dr_low_set_addr):
5213 Changed signature. Made static.
5214 (i386_dr_low_get_addr): Likewise.
5215 (i386_dr_low_set_control): Likewise.
5216 (i386_dr_low_get_control): Likewise.
5217 (i386_dr_low_get_status): Likewise.
5218 (i386_dr_low): New global variable.
5220 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5222 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5223 * Makefile.in (AR, AR_FLAGS): Define.
5224 * configure: Regenerate.
5226 2014-06-19 Gary Benson <gbenson@redhat.com>
5228 * Makefile.in (i386-dregs.o): New rule.
5229 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5230 * i386-low.c (target.h): Remove include.
5231 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5232 (DR_CONTROL_SHIFT): Likewise.
5233 (DR_CONTROL_SIZE): Likewise.
5234 (DR_RW_EXECUTE): Likewise.
5235 (DR_RW_WRITE): Likewise.
5236 (DR_RW_READ): Likewise.
5237 (DR_RW_IORW): Likewise.
5238 (DR_LEN_1): Likewise.
5239 (DR_LEN_2): Likewise.
5240 (DR_LEN_4): Likewise.
5241 (DR_LEN_8): Likewise.
5242 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5243 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5244 (DR_ENABLE_SIZE): Likewise.
5245 (DR_LOCAL_SLOWDOWN): Likewise.
5246 (DR_GLOBAL_SLOWDOWN): Likewise.
5247 (DR_CONTROL_RESERVED): Likewise.
5248 (I386_DR_CONTROL_MASK): Likewise.
5249 (I386_DR_VACANT): Likewise.
5250 (I386_DR_LOCAL_ENABLE): Likewise.
5251 (I386_DR_GLOBAL_ENABLE): Likewise.
5252 (I386_DR_DISABLE): Likewise.
5253 (I386_DR_SET_RW_LEN): Likewise.
5254 (I386_DR_GET_RW_LEN): Likewise.
5255 (I386_DR_WATCH_HIT): Likewise.
5256 (i386_wp_op_t): Likewise.
5257 (i386_show_dr): Likewise.
5258 (i386_length_and_rw_bits): Likewise.
5259 (i386_insert_aligned_watchpoint): Likewise.
5260 (i386_remove_aligned_watchpoint): Likewise.
5261 (i386_handle_nonaligned_watchpoint): Likewise.
5262 i386_update_inferior_debug_regs(): Likewise.
5263 (i386_dr_insert_watchpoint): Likewise.
5264 (i386_dr_remove_watchpoint): Likewise.
5265 (i386_dr_region_ok_for_watchpoint): Likewise.
5266 (i386_dr_stopped_data_address): Likewise.
5267 (i386_dr_stopped_by_watchpoint): Likewise.
5269 2014-06-19 Gary Benson <gbenson@redhat.com>
5271 * i386-low.c (i386_dr_show): Renamed to
5272 i386_show_dr and made static. All uses updated.
5273 (i386_dr_length_and_rw_bits): Renamed to
5274 i386_length_and_rw_bits and made static.
5276 (i386_dr_insert_aligned_watchpoint): Renamed to
5277 i386_insert_aligned_watchpoint and made static.
5279 (i386_dr_remove_aligned_watchpoint): Renamed to
5280 i386_remove_aligned_watchpoint and made static.
5282 (i386_dr_update_inferior_debug_regs): Renamed to
5283 i386_update_inferior_debug_regs and made static.
5286 2014-06-18 Gary Benson <gbenson@redhat.com>
5288 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5289 (i386_dr_low_can_set_control): Likewise.
5290 (i386_get_debug_register_length): Likewise.
5291 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5292 (i386_dr_low_can_set_control): Likewise.
5293 (i386_get_debug_register_length): Likewise.
5295 2014-06-17 Gary Benson <gbenson@redhat.com>
5297 * i386-low.h (i386-dregs.h): New include.
5298 (DR_FIRSTADDR): Now in i386-dregs.h.
5299 (DR_LASTADDR): Likewise.
5300 (DR_NADDR): Likewise.
5301 (DR_STATUS): Likewise.
5302 (DR_CONTROL): Likewise.
5303 (i386_debug_reg_state): Likewise.
5304 (i386_dr_insert_watchpoint): Likewise.
5305 (i386_dr_remove_watchpoint): Likewise.
5306 (i386_dr_region_ok_for_watchpoint): Likewise.
5307 (i386_dr_stopped_data_address): Likewise.
5308 (i386_dr_stopped_by_watchpoint): Likewise.
5309 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5311 2014-06-18 Gary Benson <gbenson@redhat.com>
5313 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5314 i386_dr_insert_watchpoint.
5315 (i386_low_remove_watchpoint): Renamed to
5316 i386_dr_remove_watchpoint.
5317 (i386_low_region_ok_for_watchpoint): Renamed to
5318 i386_dr_region_ok_for_watchpoint.
5319 (i386_low_stopped_data_address): Renamed to
5320 i386_dr_stopped_data_address.
5321 (i386_low_stopped_by_watchpoint): Renamed to
5322 i386_dr_stopped_by_watchpoint.
5323 * i386-low.c (i386_show_dr): Renamed to
5324 i386_dr_show and made nonstatic. All uses updated.
5325 (i386_length_and_rw_bits): Renamed to
5326 i386_dr_length_and_rw_bits and made nonstatic.
5328 (i386_insert_aligned_watchpoint): Renamed to
5329 i386_dr_insert_aligned_watchpoint and made nonstatic.
5331 (i386_remove_aligned_watchpoint): Renamed to
5332 i386_dr_remove_aligned_watchpoint and made nonstatic.
5334 (i386_update_inferior_debug_regs): Renamed to
5335 i386_dr_update_inferior_debug_regs and made nonstatic.
5337 (i386_low_insert_watchpoint): Renamed to
5338 i386_dr_insert_watchpoint. All uses updated.
5339 (i386_low_remove_watchpoint): Renamed to
5340 i386_dr_remove_watchpoint. All uses updated.
5341 (i386_low_region_ok_for_watchpoint): Renamed to
5342 i386_dr_region_ok_for_watchpoint. All uses updated.
5343 (i386_low_stopped_data_address): Renamed to
5344 i386_dr_stopped_data_address. All uses updated.
5345 (i386_low_stopped_by_watchpoint): Renamed to
5346 i386_dr_stopped_by_watchpoint. All uses updated.
5348 2014-06-18 Gary Benson <gbenson@redhat.com>
5350 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5351 (i386_dr_low_can_set_control): Likewise.
5352 (i386_insert_aligned_watchpoint): New check.
5354 2014-06-18 Gary Benson <gbenson@redhat.com>
5356 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5359 2014-06-18 Gary Benson <gbenson@redhat.com>
5361 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5362 instead of fatal and error.
5363 (i386_handle_nonaligned_watchpoint): Likewise.
5365 2014-06-18 Gary Benson <gbenson@redhat.com>
5367 * i386-low.c (i386_get_debug_register_length): New macro.
5368 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5369 (i386_show_dr): Use debug_printf instead of fprintf. Use
5370 phex to format values.
5372 2014-06-18 Gary Benson <gbenson@redhat.com>
5374 * i386-low.h: Comment changes.
5375 * i386-low.c: Likewise.
5377 2014-06-18 Gary Benson <gbenson@redhat.com>
5379 * i386-low.c: Whitespace changes.
5381 2014-06-12 Tom Tromey <tromey@redhat.com>
5383 * utils.c (freeargv): Remove.
5385 2014-06-12 Tom Tromey <tromey@redhat.com>
5387 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5388 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5389 (parse_debug_format_options): Likewise.
5390 (gdbserver_usage): Likewise.
5391 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5392 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5393 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5395 ($(LIBGNU)): Depend on libiberty.
5396 (all-lib): Recurse into all subdirs.
5397 (install-only): Invoke "install" target in subdirs.
5398 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5400 * configure: Rebuild.
5401 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5402 for vasprintf, vsnprintf, or gettimeofday.
5403 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5406 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5408 * development.sh: Delete.
5409 * Makefile.in (config.status): Adjust dependency on development.sh.
5410 * configure.ac: Adjust development.sh source call.
5411 * configure: Regenerate.
5413 2014-06-02 Pedro Alves <palves@redhat.com>
5415 * ax.c (gdb_free_agent_expr): New function.
5416 * ax.h (gdb_free_agent_expr): New declaration.
5417 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5419 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5421 (clear_breakpoint_conditions_and_commands): New function.
5422 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5423 (clear_breakpoint_conditions_and_commands): New declaration.
5425 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5427 * linux-aarch64-low.c (asm/ptrace.h): Include.
5429 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5431 Fix TLS access for -static -pthread.
5432 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5433 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5434 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5436 2014-05-20 Pedro Alves <palves@redhat.com>
5438 * linux-aarch64-low.c (aarch64_insert_point)
5439 (aarch64_remove_point): No longer check whether the type is
5440 supported here. Adjust to new interface.
5441 (the_low_target): Install aarch64_supports_z_point_type as
5442 supports_z_point_type method.
5443 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5444 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5445 instead of a Z packet char. Adjust.
5446 (arm_supports_z_point_type): New function.
5447 (arm_insert_point, arm_remove_point): Adjust to new interface.
5448 (the_low_target): Install arm_supports_z_point_type.
5449 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5450 (cris_insert_point, cris_remove_point): Adjust to new interface.
5451 Don't check whether the type is supported here.
5452 (the_low_target): Install cris_supports_z_point_type.
5453 * linux-low.c (linux_supports_z_point_type): New function.
5454 (linux_insert_point, linux_remove_point): Adjust to new interface.
5455 * linux-low.h (struct linux_target_ops) <insert_point,
5456 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5457 raw_breakpoint pointer parameter.
5458 <supports_z_point_type>: New method.
5459 * linux-mips-low.c (mips_supports_z_point_type): New function.
5460 (mips_insert_point, mips_remove_point): Adjust to new interface.
5461 Use mips_supports_z_point_type.
5462 (the_low_target): Install mips_supports_z_point_type.
5463 * linux-ppc-low.c (the_low_target): Install NULL as
5464 supports_z_point_type method.
5465 * linux-s390-low.c (the_low_target): Install NULL as
5466 supports_z_point_type method.
5467 * linux-sparc-low.c (the_low_target): Install NULL as
5468 supports_z_point_type method.
5469 * linux-x86-low.c (x86_supports_z_point_type): New function.
5470 (x86_insert_point): Adjust to new insert_point interface. Use
5471 insert_memory_breakpoint. Adjust to new
5472 i386_low_insert_watchpoint interface.
5473 (x86_remove_point): Adjust to remove_point interface. Use
5474 remove_memory_breakpoint. Adjust to new
5475 i386_low_remove_watchpoint interface.
5476 (the_low_target): Install x86_supports_z_point_type.
5477 * lynx-low.c (lynx_target_ops): Install NULL as
5478 supports_z_point_type callback.
5479 * nto-low.c (nto_supports_z_point_type): New.
5480 (nto_insert_point, nto_remove_point): Adjust to new interface.
5481 (nto_target_ops): Install nto_supports_z_point_type.
5482 * mem-break.c: Adjust intro comment.
5483 (struct raw_breakpoint) <raw_type, size>: New fields.
5484 <inserted>: Update comment.
5485 <shlib_disabled>: Delete field.
5486 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5487 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5488 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5489 (raw_bkpt_type_to_target_hw_bp_type): New function.
5490 (find_enabled_raw_code_breakpoint_at): New function.
5491 (find_raw_breakpoint_at): New type and size parameters. Use them.
5492 (insert_memory_breakpoint): New function, based off
5493 set_raw_breakpoint_at.
5494 (remove_memory_breakpoint): New function.
5495 (set_raw_breakpoint_at): Reimplement.
5496 (set_breakpoint): New, based on set_breakpoint_at.
5497 (set_breakpoint_at): Reimplement.
5498 (delete_raw_breakpoint): Go through the_target->remove_point
5499 instead of assuming memory breakpoints.
5500 (find_gdb_breakpoint_at): Delete.
5501 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5502 (find_gdb_breakpoint): New function.
5503 (set_gdb_breakpoint_at): Delete.
5504 (z_type_supported): New function.
5505 (set_gdb_breakpoint_1): New function, loosely based off
5506 set_gdb_breakpoint_at.
5507 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5508 (delete_gdb_breakpoint_at): Delete.
5509 (delete_gdb_breakpoint_1): New function, loosely based off
5510 delete_gdb_breakpoint_at.
5511 (delete_gdb_breakpoint): New function.
5512 (clear_gdb_breakpoint_conditions): Rename to ...
5513 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5515 (add_condition_to_breakpoint): Make static.
5516 (add_breakpoint_condition): Take a struct breakpoint pointer
5517 instead of an address. Adjust.
5518 (gdb_condition_true_at_breakpoint): Rename to ...
5519 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5521 (gdb_condition_true_at_breakpoint): Reimplement.
5522 (add_breakpoint_commands): Take a struct breakpoint pointer
5523 instead of an address. Adjust.
5524 (gdb_no_commands_at_breakpoint): Rename to ...
5525 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5526 parameter. Return true if no breakpoint was found. Change debug
5528 (gdb_no_commands_at_breakpoint): Reimplement.
5529 (run_breakpoint_commands): Rename to ...
5530 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5531 and change return type to boolean.
5532 (run_breakpoint_commands): New function.
5533 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5534 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5535 breakpoint. Go through the_target->remove_point instead of
5536 assuming memory breakpoint.
5537 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5538 software and hardware breakpoints.
5539 (reinsert_raw_breakpoint): Go through the_target->insert_point
5540 instead of assuming memory breakpoint.
5541 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5542 software and hardware breakpoints.
5543 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5544 Check both software and hardware breakpoints.
5545 (validate_inserted_breakpoint): Assert the breakpoint is a
5546 software breakpoint. Set the inserted flag to -1 instead of
5547 setting shlib_disabled.
5548 (delete_disabled_breakpoints): Adjust.
5549 (validate_breakpoints): Only validate software breakpoints.
5550 Adjust to inserted flag change.
5551 (check_mem_read, check_mem_write): Skip breakpoint types other
5552 than software breakpoints. Adjust to inserted flag change.
5553 * mem-break.h (enum raw_bkpt_type): New enum.
5554 (raw_breakpoint, struct process_info): Forward declare.
5555 (Z_packet_to_target_hw_bp_type): Delete declaration.
5556 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5557 (set_gdb_breakpoint, delete_gdb_breakpoint)
5558 (clear_breakpoint_conditions): New declarations.
5559 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5560 (breakpoint_inserted_here): Update comment.
5561 (add_breakpoint_condition, add_breakpoint_commands): Replace
5562 address parameter with a breakpoint pointer parameter.
5563 (gdb_breakpoint_here): Update comment.
5564 (delete_gdb_breakpoint_at): Delete.
5565 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5566 * server.c (process_point_options): Take a struct breakpoint
5567 pointer instead of an address. Adjust.
5568 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5569 delete_gdb_breakpoint.
5570 * spu-low.c (spu_target_ops): Install NULL as
5571 supports_z_point_type method.
5572 * target.h: Include mem-break.h.
5573 (struct target_ops) <prepare_to_access_memory>: Update comment.
5574 <supports_z_point_type>: New field.
5575 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5576 instead of a char. Also take a raw breakpoint pointer.
5577 * win32-arm-low.c (the_low_target): Install NULL as
5578 supports_z_point_type.
5579 * win32-i386-low.c (i386_supports_z_point_type): New function.
5580 (i386_insert_point, i386_remove_point): Adjust to new interface.
5581 (the_low_target): Install i386_supports_z_point_type.
5582 * win32-low.c (win32_supports_z_point_type): New function.
5583 (win32_insert_point, win32_remove_point): Adjust to new interface.
5584 (win32_target_ops): Install win32_supports_z_point_type.
5585 * win32-low.h (struct win32_target_ops):
5586 <supports_z_point_type>: New method.
5587 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5588 instead of a char. Also take a raw breakpoint pointer.
5590 2014-05-20 Pedro Alves <palves@redhat.com>
5592 * mem-break.h: Include break-common.h.
5593 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5594 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5595 (Z_packet_to_target_hw_bp_type): New declaration.
5596 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5597 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5598 (Z_PACKET_ACCESS_WP): Delete macros.
5599 (Z_packet_to_hw_type): Delete function.
5600 * i386-low.h: Don't include break-common.h here.
5601 (Z_packet_to_hw_type): Delete declaration.
5602 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5603 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5604 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5605 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5606 * linux-aarch64-low.c: Don't include break-common.h here.
5607 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5608 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5609 (Z_packet_to_target_hw_bp_type): Delete function.
5610 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5612 (mips_insert_point, mips_remove_point): Use
5613 Z_packet_to_target_hw_bp_type.
5615 2014-05-20 Pedro Alves <palves@redhat.com>
5617 * linux-aarch64-low.c: Include break-common.h.
5618 (enum target_point_type): Delete.
5619 (Z_packet_to_point_type): Rename to ...
5620 (Z_packet_to_target_hw_bp_type): ... this, and return a
5621 target_hw_bp_type instead.
5622 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5623 instead of an enum target_point_type.
5624 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5626 (aarch64_dr_state_insert_one_point)
5627 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5628 (aarch64_handle_aligned_watchpoint)
5629 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5630 Take an enum target_hw_bp_type instead of an enum
5632 (aarch64_supports_z_point_type): New function.
5633 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5634 use Z_packet_to_target_hw_bp_type.
5636 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5638 * configure.ac: Only use -Werror by default when DEVELOPMENT
5640 * configure: Regenerate.
5642 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5644 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5645 * linux-x86-low.c (X86_64_USER_REGS): New.
5646 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5648 2014-04-28 Yao Qi <yao@codesourcery.com>
5650 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5653 2014-04-25 Pedro Alves <palves@redhat.com>
5656 * linux-low.c (linux_attach_fail_reason_string): New function.
5657 (linux_attach_lwp): Delete.
5658 (linux_attach_lwp_1): Rename to ...
5659 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5660 argument. Remove "initial" parameter. Return int instead of
5661 void. Don't error or warn here.
5662 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5663 failure to attach to the tgid. Call warning when failing to
5665 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5666 argument. Remove "initial" parameter. Return int instead of
5667 void. Don't error or warn here.
5668 (linux_attach_fail_reason_string): New declaration.
5669 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5670 interface change. Use linux_attach_fail_reason_string.
5672 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5673 Walfred Tedeschi <walfred.tedeschi@intel.com>
5675 * Makefile.in: Added rules to handle new files
5676 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5677 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5678 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5679 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5680 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5681 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5683 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5684 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5685 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5686 i386/x32-avx512.xml.
5687 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5688 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5689 i386/x32-avx512-linux.xml.
5690 * i387-fp.c (num_avx512_k_registers): New constant for number
5692 (num_avx512_zmmh_low_registers): New constant for number of
5693 lower ZMM registers (0-15).
5694 (num_avx512_zmmh_high_registers): New constant for number of
5695 higher ZMM registers (16-31).
5696 (num_avx512_ymmh_registers): New contant for number of higher
5697 YMM registers (ymm16-31 added by avx521 on x86_64).
5698 (num_avx512_xmm_registers): New constant for number of higher
5699 XMM registers (xmm16-31 added by AVX512 on x86_64).
5700 (struct i387_xsave): Add space for AVX512 registers.
5701 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5702 Add code to handle AVX512 registers.
5703 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5704 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5705 prototypei from generated file.
5706 (tdesc_amd64_avx512_linux): Likewise.
5707 (init_registers_x32_avx512_linux): Likewise.
5708 (tdesc_x32_avx512_linux): Likewise.
5709 (init_registers_i386_avx512_linux): Likewise.
5710 (tdesc_i386_avx512_linux): Likewise.
5711 (x86_64_regmap): Add AVX512 registers.
5712 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5714 (initialize_low_arch): Add code to initialize AVX512 registers.
5716 2014-04-23 Pedro Alves <palves@redhat.com>
5718 * mem-break.c (find_gdb_breakpoint_at): Make static.
5719 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5721 2014-04-23 Pedro Alves <palves@redhat.com>
5723 * i386-low.c: Don't include break-common.h here.
5724 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5725 prototype to take target_hw_bp_type as argument instead of a Z
5727 * i386-low.h: Include break-common.h here.
5728 (Z_packet_to_hw_type): Declare.
5729 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5731 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5732 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5733 (x86_remove_point): Convert the packet number to a
5734 target_hw_bp_type before calling i386_low_remove_watchpoint.
5735 * win32-i386-low.c (i386_insert_point): Convert the packet number
5736 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5737 (i386_remove_point): Convert the packet number to a
5738 target_hw_bp_type before calling i386_low_remove_watchpoint.
5740 2014-04-23 Pedro Alves <palves@redhat.com>
5742 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5744 2014-04-10 Pedro Alves <palves@redhat.com>
5746 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5747 Check if the condition or command is NULL before checking if the
5748 breakpoint is known. On success, return true.
5749 * mem-break.h (add_breakpoint_condition): Document return.
5750 (add_breakpoint_commands): Add describing comment.
5751 * server.c (skip_to_semicolon): New function.
5752 (process_point_options): Use it.
5754 2014-04-09 Pedro Alves <palves@redhat.com>
5756 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5759 2014-02-27 Pedro Alves <palves@redhat.com>
5762 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5764 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5766 (last_thread_of_process_p): Take a PID argument instead of a
5768 (linux_wait_for_lwp): Delete.
5769 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5771 (linux_low_filter_event): New function, party factored out from
5772 linux_wait_for_event.
5773 (linux_wait_for_event): Rename to ...
5774 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5775 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5776 sigsuspend. Check for zombie leaders.
5777 (linux_wait_for_event): Reimplement as wrapper around
5778 linux_wait_for_event_filtered.
5779 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5780 a normal or signal exit is seen, it's the whole process exiting.
5781 (wait_for_sigstop): No longer a for_each_inferior callback.
5782 Rewrite on top of linux_wait_for_event_filtered.
5783 (stop_all_lwps): Call wait_for_sigstop directly.
5784 * server.c (resume, handle_target_event): Handle
5785 TARGET_WAITKIND_NO_RESUMED.
5787 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5789 * win32-low.c (psapi_get_dll_name,
5790 * win32_CreateToolhelp32Snapshot): Delete.
5791 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5792 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5794 (handle_load_dll): Add function description.
5795 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5797 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5799 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5801 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5802 base address when calling win32_add_one_solib.
5803 (handle_load_dll): Delete local variable load_addr.
5804 Remove 0x1000 offset applied to DLL base address when calling
5805 win32_add_one_solib.
5806 (handle_unload_dll): Add comment.
5808 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5810 * win32-low.c (win32_add_all_dlls): Renames
5811 win32_ensure_ntdll_loaded. Rewrite function documentation.
5812 Adjust implementation to always load all DLLs.
5813 Add 0x1000 offset to DLL base address when calling
5814 win32_add_one_solib.
5815 (child_initialization_done): New static global.
5816 (do_initial_child_stuff): Set child_initialization_done to
5817 zero during child initialization, and 1 after. Replace call
5818 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5820 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5821 (handle_unload_dll): Add function documentation.
5822 (get_child_debug_event): Ignore load and unload DLL events
5823 during child initialization.
5825 2014-02-20 Doug Evans <dje@google.com>
5827 Remove global all_lwps.
5828 * inferiors.h (ptid_of): Move here from linux-low.h.
5829 (pid_of, lwpid_of): Ditto.
5830 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5831 parameter is a struct thread_info * now.
5832 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5833 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5834 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5836 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5837 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5838 * linux-arm-low.c (update_registers_callback): Update, "entry"
5839 parameter is a struct thread_info * now.
5840 Fetch lwpid from current_inferior directly.
5841 (arm_insert_point): Pass &all_threads to find_inferior instead of
5843 (arm_remove_point): Ditto.
5844 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5845 (arm_prepare_to_resume): Fetch pid from thread.
5846 (arm_read_description): Fetch lwpid from current_inferior directly.
5847 * linux-low.c (all_lwps): Delete.
5848 (delete_lwp): Delete call to remove_inferior.
5849 (handle_extended_wait): Fetch lwpid from thread.
5850 (add_lwp): Don't set lwp->entry.id. Remove call to
5851 add_inferior_to_list.
5852 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5853 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5854 (kill_one_lwp_callback): Ditto.
5855 (linux_kill): Don't dereference NULL pointer.
5856 Fetch ptid,lwpid from thread.
5857 (get_detach_signal): Fetch ptid from thread.
5858 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5859 Simplify call to regcache_invalidate_thread.
5860 (delete_lwp_callback): Update, "entry" parameter is a
5861 struct thread_info * now. Fetch pid from thread.
5862 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5863 (status_pending_p_callback): Update, "entry" parameter is a
5864 struct thread_info * now. Fetch ptid from thread.
5865 (find_lwp_pid): Update, "entry" parameter is a
5866 struct thread_info * now.
5867 (linux_wait_for_lwp): Fetch pid from thread.
5868 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5869 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5870 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5871 (dequeue_one_deferred_signal): Ditto.
5872 (cancel_breakpoint): Fetch ptid from current_inferior.
5873 (linux_wait_for_event): Pass &all_threads to find_inferior,
5874 not &all_lwps. Fetch ptid, lwpid from thread.
5875 (count_events_callback): Update, "entry" parameter is a
5876 struct thread_info * now.
5877 (select_singlestep_lwp_callback): Ditto.
5878 (select_event_lwp_callback): Ditto.
5879 (cancel_breakpoints_callback): Ditto.
5880 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5882 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5883 (unsuspend_one_lwp): Update, "entry" parameter is a
5884 struct thread_info * now.
5885 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5887 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5888 Fetch lwpid from thread, not lwp.
5889 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5890 Pass &all_threads to find_inferior, not &all_lwps.
5891 (send_sigstop): Fetch lwpid from thread, not lwp.
5892 (send_sigstop_callback): Update, "entry" parameter is a
5893 struct thread_info * now.
5894 (suspend_and_send_sigstop_callback): Ditto.
5895 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5896 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5897 struct thread_info * now.
5898 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5900 (lwp_running): Update, "entry" parameter is a
5901 struct thread_info * now.
5902 (stop_all_lwps): Fetch ptid from thread.
5903 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5904 (linux_resume_one_lwp): Fetch lwpid from thread.
5905 (linux_set_resume_request): Update, "entry" parameter is a
5906 struct thread_info * now. Fetch pid, lwpid from thread.
5907 (resume_status_pending_p): Update, "entry" parameter is a
5908 struct thread_info * now.
5909 (need_step_over_p): Ditto. Fetch lwpid from thread.
5910 (start_step_over): Fetch lwpid from thread.
5911 (linux_resume_one_thread): Update, "entry" parameter is a
5912 struct thread_info * now. Fetch lwpid from thread.
5913 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5914 (proceed_one_lwp): Update, "entry" parameter is a
5915 struct thread_info * now. Fetch lwpid from thread.
5916 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5917 struct thread_info * now.
5918 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5919 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5920 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5922 (regsets_store_inferior_registers): Ditto.
5923 (fetch_register, store_register): Ditto.
5924 (linux_read_memory, linux_write_memory): Ditto.
5925 (linux_request_interrupt): Ditto.
5926 (linux_read_auxv): Ditto.
5927 (linux_xfer_siginfo): Ditto.
5928 (linux_qxfer_spu): Ditto.
5929 (linux_qxfer_libraries_svr4): Ditto.
5930 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5931 moved to inferiors.h.
5933 (get_thread_lwp): Update.
5934 (struct lwp_info): Delete member "entry". Simplify comment for
5937 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5938 current_inferior directly.
5939 (update_watch_registers_callback): Update, "entry" parameter is a
5940 struct thread_info * now. Fetch pid from thread.
5941 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5942 (mips_insert_point): Fetch lwpid from current_inferior.
5943 Pass &all_threads to find_inferior, not &all_lwps.
5944 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5945 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5947 (mips_stopped_data_address): Ditto.
5948 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5950 * linux-tile-low.c (tile_arch_setup): Ditto.
5951 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5952 (update_debug_registers_callback): Update, "entry" parameter is a
5953 struct thread_info * now. Fetch pid from thread.
5954 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5955 Pass &all_threads to find_inferior, not &all_lwps.
5956 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5957 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5958 Pass &all_threads to find_inferior, not &all_lwps.
5959 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5960 (i386_dr_low_get_status): Ditto.
5961 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5962 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5963 (x86_linux_read_description): Ditto.
5964 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5966 2014-02-20 Doug Evans <dje@google.com>
5968 * inferiors.c (get_first_inferior): Fix buglet.
5970 2014-02-19 Doug Evans <dje@google.com>
5972 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5973 * inferiors.c (add_thread): Change result type to struct thread_info *.
5974 All callers updated.
5975 (add_lwp): Call add_thread here instead of in callers.
5976 All callers updated.
5977 * linux-low.h (get_lwp_thread): Rewrite.
5978 (struct lwp_info): New member "thread".
5980 2014-02-19 Doug Evans <dje@google.com>
5982 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5983 All callers updated.
5985 2014-02-19 Doug Evans <dje@google.com>
5987 * inferiors.c (add_thread): Fix whitespace.
5989 2014-02-19 Doug Evans <dje@google.com>
5991 * dll.c (clear_dlls): Replace accessing list implemention details
5993 * gdbthread.h (get_first_thread): Declare.
5994 * inferiors.c (for_each_inferior_with_data): New function.
5995 (get_first_thread): New function.
5996 (find_thread_ptid): Simplify.
5997 (get_first_inferior): New function.
5998 (clear_list): Delete.
5999 (one_inferior_p): New function.
6000 (clear_inferior_list): New function.
6001 (clear_inferiors): Update.
6002 * inferiors.h (for_each_inferior_with_data): Declare.
6003 (clear_inferior_list): Declare.
6004 (one_inferior_p): Declare.
6005 (get_first_inferior): Declare.
6006 * linux-low.c (linux_wait_for_event): Replace accessing list
6007 implemention details with API function.
6008 * server.c (target_running): Ditto.
6009 (accumulate_file_name_length): New function.
6010 (emit_dll_description): New function.
6011 (handle_qxfer_libraries): Replace accessing list implemention
6012 details with API function.
6013 (handle_qxfer_threads_worker): New function.
6014 (handle_qxfer_threads_proper): Replace accessing list implemention
6015 details with API function.
6016 (handle_query): Ditto.
6017 (visit_actioned_threads_callback_ftype): New typedef.
6018 (visit_actioned_threads_data): New struct.
6019 (visit_actioned_threads): Rewrite to be find_inferior callback.
6020 (resume): Call find_inferior.
6021 (handle_status): Replace accessing list implemention
6022 details with API function.
6023 (process_serial_event): Replace accessing list implemention details
6025 * target.c (set_desired_inferior): Replace accessing list implemention
6026 details with API function.
6027 * tracepoint.c (same_process_p): New function.
6028 (gdb_agent_about_to_close): Replace accessing list implemention
6029 details with API function.
6030 * win32-low.c (child_delete_thread): Replace accessing list
6031 implemention details with API function.
6032 (match_dll_by_basename): New function.
6033 (dll_is_loaded_by_basename): New function.
6034 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6035 details call to dll_is_loaded_by_basename.
6037 2014-02-19 Doug Evans <dje@google.com>
6039 * dll.h (struct dll_info): Add comment.
6040 * gdbthread.h (struct thread_info): Add comment.
6041 (current_ptid): Simplify.
6042 * inferiors.c (add_process): Update.
6043 (remove_process): Update.
6044 * inferiors.h (struct process_info): Rename member "head" to "entry".
6045 * linux-low.c (delete_lwp): Update.
6047 (last_thread_of_process_p): Update.
6048 (kill_one_lwp_callback, linux_kill): Update.
6049 (status_pending_p_callback): Update.
6050 (wait_for_sigstop): Update. Simplify read of ptid.
6051 (start_step_over): Update.
6052 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6053 (get_lwp_thread): Update.
6054 (struct lwp_info): Rename member "head" to "entry".
6055 * regcache.h (inferior_list_entry): Delete.
6056 * server.c (kill_inferior_callback): Update.
6057 (detach_or_kill_inferior_callback): Update.
6058 (print_started_pid): Update.
6059 (print_attached_pid): Update.
6060 (process_serial_event): Simplify read of ptid.
6061 * thread-db.c (thread_db_create_event): Update.
6062 (thread_db_get_tls_address): Update.
6063 * win32-low.c (current_inferior_ptid): Simplify.
6065 2014-02-19 Tom Tromey <tromey@redhat.com>
6067 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6069 (target_supports_btrace): Update.
6071 2014-02-14 Yao Qi <yao@codesourcery.com>
6073 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6074 (rsp-low-ipa.o): New target.
6076 2014-02-12 Tom Tromey <tromey@redhat.com>
6078 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6079 convert_ascii_to_int.
6080 * regcache.c (registers_to_string): Likewise.
6081 * remote-utils.c (decode_M_packet): Likewise.
6082 * server.c (process_serial_event): Likewise.
6084 2014-02-12 Tom Tromey <tromey@redhat.com>
6086 * server.c (handle_query, handle_v_run): Use hex2bin, not
6088 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6090 2014-02-12 Tom Tromey <tromey@redhat.com>
6092 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6093 convert_int_to_ascii.
6094 * regcache.c (registers_to_string, collect_register_as_string):
6096 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6098 * server.c (process_serial_event): Likewise.
6099 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6100 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6102 2014-02-12 Tom Tromey <tromey@redhat.com>
6104 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6105 bin2hex, not hexify.
6106 * tracepoint.c (cmd_qtstatus): Likewise.
6108 2014-02-12 Tom Tromey <tromey@redhat.com>
6110 * remote-utils.c (monitor_output): Pass explicit length to
6113 2014-02-12 Tom Tromey <tromey@redhat.com>
6115 * tracepoint.c: Include rsp-low.h.
6116 * server.c: Include rsp-low.h.
6117 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6118 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6120 * remote-utils.c: Include rsp-low.h.
6121 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6122 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6123 (convert_int_to_ascii, convert_ascii_to_int): Move to
6125 * regcache.c: Include rsp-low.h.
6126 * ax.c: Include rsp-low.h.
6127 * Makefile.in (SFILES): Add common/rsp-low.c.
6128 (OBS): Add rsp-low.o.
6129 (rsp-low.o): New target.
6131 2014-02-12 Tom Tromey <tromey@redhat.com>
6133 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6134 Include print-utils.h.
6135 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6136 (plongest, thirty_two, phex_nz): Remove.
6137 * Makefile.in (SFILES): Add common/print-utils.c.
6138 (OBS): Add print-utils.o.
6139 (print-utils-ipa.o): New target.
6140 (print-utils.o): New target.
6141 (IPA_OBJS): Add print-utils-ipa.o.
6143 2014-02-06 Tom Tromey <tromey@redhat.com>
6145 * Makefile.in (SFILES): Fix indentation.
6147 2014-02-05 Doug Evans <dje@google.com>
6149 * linux-low.c (linux_wait_for_event): Improve comment.
6150 (linux_wait_1): Keep current_inferior in sync with event_child.
6152 2014-01-22 Doug Evans <dje@google.com>
6154 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6156 2014-01-22 Doug Evans <dje@google.com>
6158 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6159 * configure: Regenerate.
6160 * config.in: Regenerate.
6161 * Makefile.in (SFILES): Add debug.c.
6163 * debug.c: New file.
6164 * debug.h: New file.
6165 * linux-aarch64-low.c (*): Update all debugging printfs to use
6166 debug_printf instead of fprintf.
6167 * linux-arm-low.c (*): Ditto.
6168 * linux-cris-low.c (*): Ditto.
6169 * linux-crisv32-low.c (*): Ditto.
6170 * linux-m32r-low.c (*): Ditto.
6171 * linux-sparc-low.c (*): Ditto.
6172 * linux-x86.c (*): Ditto.
6173 * linux-low.c (*): Ditto.
6174 (linux_wait_1): Add calls to debug_enter, debug_exit.
6175 (linux_wait): Remove redundant debugging printf.
6176 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6177 (linux_resume, unstop_all_lwps): Ditto.
6178 * mem-break.c (*): Update all debugging printfs to use
6179 debug_printf instead of fprintf.
6180 * remote-utils.c (*): Ditto.
6181 * thread-db.c (*): Ditto.
6182 * server.c #include <ctype.h>, "gdb_vecs.h".
6183 (debug_threads): Moved to debug.c.
6184 (*): Update all debugging printfs to use debug_printf instead of
6186 (start_inferior): Replace call to fflush with call to debug_flush.
6187 (monitor_show_help): Mention set debug-format.
6188 (parse_debug_format_options): New function.
6189 (handle_monitor_command): Handle "monitor set debug-format".
6190 (gdbserver_usage): Mention --debug-format.
6191 (main): Parse --debug-format.
6192 * server.h (debug_threads): Declaration moved to debug.h.
6194 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6195 trace_debug_1 that uses debug_printf.
6196 (tracepoint_look_up_symbols): Update all debugging printfs to use
6197 debug_printf instead of fprintf.
6199 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6201 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6204 2014-01-17 Pedro Alves <palves@redhat.com>
6207 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6208 defined after including gdb_proc_service.h.
6210 2014-01-16 Doug Evans <dje@google.com>
6212 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6213 (match_dll): Use it.
6215 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6217 * target.h (target_ops) <read_btrace>: Change parameters and
6218 return type to allow error reporting.
6219 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6220 trace reading errors on.
6221 * linux-low.c (linux_low_read_btrace): Pass trace reading
6223 (linux_low_disable_btrace): New.
6225 2014-01-15 Doug Evans <dje@google.com>
6227 * inferiors.c (thread_id_to_gdb_id): Delete.
6228 * inferiors.h (thread_id_to_gdb_id): Delete.
6230 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6232 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6233 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6236 2014-01-08 Pedro Alves <palves@redhat.com>
6238 * server.c (handle_status): Don't discard previous queued stop
6239 replies or thread's pending status here.
6240 (main) <disconnection>: Do it here instead.
6242 2014-01-08 Pedro Alves <palves@redhat.com>
6244 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6245 * server.c (visit_actioned_threads, handle_pending_status): New
6247 (handle_v_cont): Factor out parts to ...
6248 (resume): ... this new function. If in all-stop, and a thread
6249 being resumed has a pending status, report it without actually
6251 (myresume): Adjust to use the new 'resume' function.
6252 (clear_pending_status_callback, set_pending_status_callback)
6253 (find_status_pending_thread_callback): New functions.
6254 (handle_status): Handle the case of multiple threads having
6255 interesting statuses to report. Report threads' real last signal
6256 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6257 with an interesting thread to report the status for, instead of
6258 always reporting the status of the first thread.
6260 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6262 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6263 * gdbreplay.c (gdbreplay_version): Likewise.
6265 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6267 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6268 iov.iov_len with the real length in use.
6270 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6272 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6273 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6274 for all targets that use win32-low.c.
6275 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6276 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6278 2013-12-13 Pedro Alves <palves@redhat.com>
6280 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6281 if equal to TARGET_WAITKIND_LOADED.
6282 * win32-low.c (cached_status): New static global.
6283 (win32_wait): Add declaration.
6284 (do_initial_child_stuff): Flush all initial pending debug events
6285 up to the initial breakpoint.
6286 (win32_wait): If CACHED_STATUS was set, return that instead
6287 of doing a real wait. Remove the code resuming the execution
6288 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6289 during the initial phase. Also remove the code changing
6290 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6291 TARGET_WAITKIND_STOPPED.
6293 2013-12-11 Yao Qi <yao@codesourcery.com>
6295 * notif.c (handle_notif_ack): Return 0 if no notification
6298 2013-11-20 Doug Evans <dje@google.com>
6300 * linux-low.c (linux_set_resume_request): Fix comment.
6302 2013-11-20 Doug Evans <dje@google.com>
6304 * linux-low.c (resume_status_pending_p): Tweak comment.
6306 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6308 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6309 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6310 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6311 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6312 (srv_amd64_regobj): Add amd64-mpx.o.
6313 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6314 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6315 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6316 * i387-fp.c (num_pl_bnd_register) Added constant.
6317 (num_pl_bnd_cfg_registers) Added constant.
6318 (struct i387_xsave) Added reserved area and MPX fields.
6319 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6320 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6322 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6323 (init_registers_amd64_mpx_linux): Declare new function.
6324 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6325 (x86_64_regmap): Add MPX registers.
6326 (x86_linux_read_description): Add MPX case.
6327 (initialize_low_arch): Initialize MPX targets.
6329 2013-11-18 Tom Tromey <tromey@redhat.com>
6331 * configure: Rebuild.
6332 * configure.ac: Don't check for stdlib.h.
6333 * gdbreplay.c: Unconditionally include stdlib.h.
6335 2013-11-18 Tom Tromey <tromey@redhat.com>
6337 * config.in: Rebuild.
6338 * configure: Rebuild.
6339 * configure.ac: Don't use AC_HEADER_DIRENT.
6341 2013-11-18 Tom Tromey <tromey@redhat.com>
6343 * server.h: Don't check HAVE_STRING_H.
6344 * gdbreplay.c: Don't check HAVE_STRING_H.
6345 * configure: Rebuild.
6347 2013-11-18 Tom Tromey <tromey@redhat.com>
6349 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6352 2013-11-08 Tom Tromey <tromey@redhat.com>
6354 * configure, config.in: Rebuild.
6355 * configure.ac: Remove unused configury.
6357 2013-11-08 Tom Tromey <tromey@redhat.com>
6359 * acinclude.m4: Include common.m4, codeset.m4.
6360 * configure, config.in: Rebuild.
6361 * configure.ac: Use GDB_AC_COMMON.
6363 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6365 * linux-s390-low.c (HWCAP_S390_TE): New define.
6366 (s390_arch_setup): Consider the TE field in the HWCAP for
6367 determining 'have_regset_tdb'.
6369 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6372 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6375 2013-10-02 Pedro Alves <palves@redhat.com>
6377 * server.c (process_serial_event): Don't output "GDBserver
6378 exiting" if GDB is connected through stdio.
6379 * target.c (mywait): Likewise, be silent if GDB is connected
6382 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6384 * lynx-low.c (lynx_add_threads_after_attach): New function.
6385 (lynx_attach): Remove call to add_thread. Add call to
6386 lynx_add_threads_after_attach instead.
6388 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6390 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6391 * config.in, configure: Regenerated.
6393 2013-09-18 Yao Qi <yao@codesourcery.com>
6396 * server.c (start_inferior): Clear 'resume_info'.
6398 2013-09-16 Jiong Wang <jiwang@tilera.com>
6400 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6403 2013-09-16 Jiong Wang <jiwang@tilera.com>
6405 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6406 linux-tile-low.o to srv_tgtobj.
6408 2013-09-16 Will Newton <will.newton@linaro.org>
6410 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6413 2013-09-06 Pedro Alves <palves@redhat.com>
6415 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6416 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6417 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6418 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6419 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6420 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6422 2013-09-06 Pedro Alves <palves@redhat.com>
6424 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6425 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6427 2013-09-06 Pedro Alves <palves@redhat.com>
6429 * linux-amd64-ipa.c: Include tracepoint.h.
6430 * linux-i386-ipa.c: Include tracepoint.h.
6432 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6434 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6435 (ps_get_thread_area): New function.
6437 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6439 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6440 (initialize_low_arch): Call init_registers_crisv32 rather than
6441 init_register_crisv32.
6443 2013-09-05 Pedro Alves <palves@redhat.com>
6445 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6447 * hostio.h: ... this new file.
6448 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6449 win32-low.c: Include hostio.h.
6451 2013-09-05 Pedro Alves <palves@redhat.com>
6453 * server.h (gdb_client_data, handler_func, callback_handler_func)
6454 (delete_file_handler, add_file_handler, append_callback_event)
6455 (delete_callback_event, start_event_loop, initialize_event_loop):
6456 Move to event-loop.h and include it.
6457 * event-loop.h: New file.
6459 2013-09-05 Pedro Alves <palves@redhat.com>
6461 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6462 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6463 (loaded_dll, unloaded_dll): Move to ...
6464 * dll.h: ... this new file.
6465 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6467 2013-09-05 Pedro Alves <palves@redhat.com>
6469 * server.h (current_process, get_thread_process, all_processes)
6470 (add_inferior_to_list, for_each_inferior, current_inferior)
6471 (remove_inferior, add_process, remove_process, find_process_pid)
6472 (have_started_inferiors_p, have_attached_inferiors_p)
6473 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6474 (clear_inferiors, find_inferior, find_inferior_id)
6475 (inferior_target_data, set_inferior_target_data)
6476 (inferior_regcache_data, set_inferior_regcache_data): Move to
6477 inferiors.h, and include it.
6478 * inferiors.h: New file.
6480 2013-09-05 Pedro Alves <palves@redhat.com>
6482 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6486 2013-09-05 Pedro Alves <palves@redhat.com>
6488 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6490 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6491 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6492 (handle_tracepoint_general_set, handle_tracepoint_query)
6493 (tracepoint_finished_step, tracepoint_was_hit)
6494 (release_while_stepping_state_list, current_traceframe)
6495 (in_readonly_region, traceframe_read_mem)
6496 (fetch_traceframe_registers, traceframe_read_sdata)
6497 (traceframe_read_info, struct fast_tpoint_collect_status)
6498 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6499 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6500 (supply_fast_tracepoint_registers)
6501 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6502 (ipa_tdesc, claim_trampoline_space)
6503 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6504 (agent_mem_read, agent_get_trace_state_variable_value)
6505 (agent_set_trace_state_variable_value, agent_tsv_read)
6506 (agent_mem_read_string, get_raw_reg_func_addr)
6507 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6508 * tracepoint.h: ... this new file.
6510 2013-09-05 Pedro Alves <palves@redhat.com>
6512 * server.h (perror_with_name, error, fatal, warning, paddress)
6513 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6515 * utils.h: New file.
6517 2013-09-05 Pedro Alves <palves@redhat.com>
6519 * server.h (remote_debug, noack_mode, transport_is_reliable)
6520 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6521 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6522 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6523 (write_enn, initialize_async_io, enable_async_io)
6524 (disable_async_io, check_remote_input_interrupt_request)
6525 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6526 (dead_thread_notify, prepare_resume_reply)
6527 (decode_address_to_semicolon, decode_address, decode_m_packet)
6528 (decode_M_packet, decode_X_packet, decode_xfer_write)
6529 (decode_search_memory_packet, unhexify, hexify)
6530 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6531 (look_up_one_symbol, relocate_instruction)
6532 (monitor_output): Move to remote-utils.h, and include it.
6533 * remote-utils.h: New file.
6535 2013-09-05 Pedro Alves <palves@redhat.com>
6537 * server.h (_): Delete.
6539 2013-09-02 Pedro Alves <palves@redhat.com>
6541 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6542 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6544 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6546 2013-09-02 Pierre Muller <muller@sourceware.org>
6548 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6549 or WriteProcessMemory complete successfully and handle
6550 ERROR_PARTIAL_COPY error.
6552 2013-09-02 Pedro Alves <palves@redhat.com>
6554 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6555 error instead of EIO.
6557 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6560 * linux-low.c: Include filestuff.h.
6561 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6562 * lynx-low.c: Include filestuff.h.
6563 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6564 * server.c: Include filestuff.h.
6565 (main): Call notice_open_fds.
6566 * spu-low.c: Include filestuff.h.
6567 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6569 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6571 * Makefile.in: Explain why ../target and ../nat are not
6572 listed as include file search paths.
6573 (linux-waitpid.o): New object file rule.
6574 * configure.srv (srv_native_linux_obj): New variable.
6575 Replace all occurrences of linux native object files with
6576 $srv_native_linux_obj.
6577 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6578 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6579 (linux_enable_event_reporting): Remove declaration.
6580 (my_waitpid): Moved to common/linux-waitpid.c.
6581 (linux_wait_for_event): Pass ptid when calling
6582 linux_enable_event_reporting.
6583 (linux_supports_tracefork_flag): Remove.
6584 (linux_enable_event_reporting): Likewise.
6585 (linux_tracefork_grandchild): Remove.
6586 (STACK_SIZE): Moved to common/linux-ptrace.c.
6587 (linux_tracefork_child): Remove.
6588 (linux_test_for_tracefork): Remove.
6589 (linux_look_up_symbols): Call linux_supports_traceclone.
6590 (initialize_low): Remove call to linux_test_for_tracefork.
6591 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6592 common/linux-ptrace.h.
6593 (PTRACE_TYPE_ARG4): Likewise.
6594 Include linux-ptrace.h.
6596 2013-08-21 Pedro Alves <palves@redhat.com>
6598 * config.in: Renegerate.
6600 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6602 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6603 (SFILES): Remove $(srcdir)/common/target-common.c and
6604 add $(srcdir)/target/waitstatus.c.
6605 (OBS): Remove target-common.o and add waitstatus.o.
6606 (server_h): Remove $(srcdir)/../common/target-common.h and
6607 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6608 and $(srcdir)/../target/waitstatus.h.
6609 (target-common.o): Remove.
6610 (waitstatus.o): New target object file.
6611 * target.h: Do not include target-common.h and
6612 include target/resume.h, target/wait.h and
6613 target/waitstatus.h.
6615 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6617 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6618 to PTRACE_TYPE_ARG3.
6619 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6620 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6622 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6623 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6625 2013-07-27 Jie Zhang <jie@codesourcery.com>
6626 Daniel Jacobowitz <dan@codesourcery.com>
6627 Yao Qi <yao@codesourcery.com>
6629 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6630 (mips-linux-watch.o): New rule.
6631 (mips_linux_watch_h): New variable.
6632 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6634 * linux-mips-low.c: Include mips-linux-watch.h.
6635 (struct arch_process_info, struct arch_lwp_info): New.
6636 (update_watch_registers_callback): New function.
6637 (mips_linux_new_process, mips_linux_new_thread) New functions.
6638 (mips_linux_prepare_to_resume, mips_insert_point): New
6640 (mips_remove_point, mips_stopped_by_watchpoint): New
6642 (rsp_bp_type_to_target_hw_bp_type): New function.
6643 (mips_stopped_data_address): New function.
6644 (the_low_target): Add watchpoint support functions.
6646 2013-07-27 Yao Qi <yao@codesourcery.com>
6648 * i386-low.c: Include break-common.h.
6649 (enum target_hw_bp_type): Remove.
6651 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6653 * Makefile.in (SFILES): /common/target-common.c.
6654 (OBS): Add target-common.o.
6655 (server_h): Add $(srcdir)/../common/target-common.h.
6656 (target-common.o): New target.
6657 * server.c (queue_stop_reply_callback): Free
6658 status string after use.
6659 * target.c (target_waitstatus_to_string): Remove.
6660 * target.h: Include target-common.h.
6661 (resume_kind): Likewise.
6662 (target_waitkind): Likewise.
6663 (target_waitstatus): Likewise.
6664 (TARGET_WNOHANG): Likewise.
6666 2013-07-04 Yao Qi <yao@codesourcery.com>
6668 * Makefile.in (host_alias): Use @host_noncanonical@.
6669 (target_alias): Use @target_noncanonical@.
6670 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6671 ACX_NONCANONICAL_HOST.
6672 * configure: Regenerated.
6675 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6677 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6678 * configure: Rebuild.
6679 * Makefile.in (version_host, version_target): Get from configure.
6680 (version.c): Use $(version_host) and $(version_target).
6682 2013-07-03 Pedro Alves <palves@redhat.com>
6684 * Makefile.in (config.status): Depend on development.sh.
6685 * acinclude.m4: Include libmcheck.m4.
6686 * configure: Regenerate.
6688 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6690 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6691 attribute inside the parentheses.
6692 (winapi_DebugSetProcessKillOnExit): Ditto.
6693 (winapi_DebugBreakProcess): Ditto.
6694 (winapi_GenerateConsoleCtrlEvent): Ditto.
6696 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6698 * notif.h (notif_event): Add a dummy member to avoid compiler
6701 2013-07-01 Pedro Alves <palves@redhat.com>
6703 * hostio.c (HOSTIO_PATH_MAX): Define.
6704 (require_filename, handle_open, handle_unlink, handle_readlink):
6707 2013-07-01 Pedro Alves <palves@redhat.com>
6709 * server.h: Include "pathmax.h".
6710 * linux-low.c: Don't include sys/param.h.
6711 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6713 * win32-low.c: Don't include sys/param.h.
6714 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6716 2013-07-01 Pedro Alves <palves@redhat.com>
6718 * event-loop.c: Don't check HAVE_UNISTD_H before including
6720 * gdbreplay.c: Likewise.
6721 * remote-utils.c: Likewise.
6722 * server.c: Likewise.
6723 * configure.ac: Don't check for unistd.h.
6724 * configure: Regenerate.
6726 2013-06-28 Tom Tromey <tromey@redhat.com>
6728 * Makefile.in (version.c): Use version.in, not
6731 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6733 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6734 * configure: Rebuild.
6735 * Makefile.in (version_host, version_target): Get from configure.
6736 (version.c): Use $(version_host) and $(version_target).
6738 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6740 Fix trace-status to output user name without trailing colon.
6741 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6743 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6745 Fix trace-status to output proper start-time and stop-time.
6746 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6747 output start time and stop time in hex as gdb expects.
6749 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6751 * tracepoint.c (build_traceframe_info_xml): Output trace state
6752 variables present in the trace buffer.
6754 2013-06-24 Tom Tromey <tromey@redhat.com>
6756 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6758 (version.o): Remove.
6759 * gdbreplay.c: Include version.h.
6760 (version, host_name): Don't declare.
6761 * server.h: Include version.h.
6762 (version, host_name): Don't declare.
6764 2013-06-12 Pedro Alves <palves@redhat.com>
6766 * linux-x86-low.c (linux_is_elf64): Delete global.
6767 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6768 with local linux_pid_exe_is_elf_64_file use.
6770 2013-06-11 Pedro Alves <palves@redhat.com>
6772 * linux-low.c (regset_disabled, disable_regset): New functions.
6773 (regsets_fetch_inferior_registers)
6774 (regsets_store_inferior_registers): Use them.
6775 (initialize_regsets_info); Don't allocate the disabled_regsets
6777 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6780 2013-06-11 Pedro Alves <palves@redhat.com>
6782 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6785 2013-06-11 Pedro Alves <palves@redhat.com>
6787 * linux-x86-low.c (initialize_low_arch): Call
6788 init_registers_x32_avx_linux.
6790 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6792 Fix compatibility with Android Bionic.
6793 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6796 2013-06-07 Pedro Alves <palves@redhat.com>
6799 * Makefile.in (OBS): Add tdesc.o.
6800 (IPA_OBJS): Add tdesc-ipa.o.
6801 (tdesc-ipa.o): New rule.
6802 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6804 * linux-low.c (new_inferior): Delete.
6805 (disabled_regsets, num_regsets): Delete.
6806 (linux_add_process): Adjust to set the new per-process
6808 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6809 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6810 was a stop. When calling arch_setup, switch the current inferior
6811 to the thread that got an event.
6812 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6813 (regsets_fetch_inferior_registers)
6814 (regsets_store_inferior_registers): New regsets_info parameter.
6816 (linux_register_in_regsets): New regs_info parameter. Adjust to
6818 (register_addr, fetch_register, store_register): New usrregs_info
6819 parameter. Adjust to use it.
6820 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6821 parameter regs_info. Adjust to use it.
6822 (linux_fetch_registers): Get the current inferior's regs_info, and
6824 (linux_store_registers): Ditto.
6825 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6826 (initialize_low): Don't initialize the target_regsets here. Call
6827 initialize_low_arch.
6828 * linux-low.h (target_regsets): Delete declaration.
6829 (struct regsets_info): New.
6830 (struct usrregs_info): New.
6831 (struct regs_info): New.
6832 (struct process_info_private) <new_inferior>: New field.
6833 (struct linux_target_ops): Delete the num_regs, regmap, and
6834 regset_bitmap fields. New field regs_info.
6835 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6836 * i387-fp.c (num_xmm_registers): Delete.
6837 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6838 calls to new interface.
6839 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6840 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6841 Infer the number of xmm registers from the regcache's target
6843 * i387-fp.h (num_xmm_registers): Delete.
6844 * inferiors.c (add_thread): Don't install the thread's regcache
6846 * proc-service.c (gregset_info): Fetch the current inferior's
6847 regs_info. Adjust to use it.
6848 * regcache.c: Include tdesc.h.
6849 (register_bytes, reg_defs, num_registers)
6850 (gdbserver_expedite_regs): Delete.
6851 (get_thread_regcache): If the thread doesn't have a regcache yet,
6852 create one, instead of aborting gdbserver.
6853 (regcache_invalidate_one): Rename to ...
6854 (regcache_invalidate_thread): ... this.
6855 (regcache_invalidate_one): New.
6856 (regcache_invalidate): Only invalidate registers of the current
6858 (init_register_cache): Add target_desc parameter, and use it.
6859 (new_register_cache): Ditto. Assert the target description has a
6860 non zero registers_size.
6861 (regcache_cpy): Add assertions. Adjust.
6862 (realloc_register_cache, set_register_cache): Delete.
6863 (registers_to_string, registers_from_string): Adjust.
6864 (find_register_by_name, find_regno, find_register_by_number)
6865 (register_cache_size): Add target_desc parameter, and use it.
6866 (free_register_cache_thread, free_register_cache_thread_one)
6867 (regcache_release, register_cache_size): New.
6868 (register_size): Add target_desc parameter, and use it.
6869 (register_data, supply_register, supply_register_zeroed)
6870 (supply_regblock, supply_register_by_name, collect_register)
6871 (collect_register_as_string, collect_register_by_name): Adjust.
6872 * regcache.h (struct target_desc): Forward declare.
6873 (struct regcache) <tdesc>: New field.
6874 (init_register_cache, new_register_cache): Add target_desc
6876 (regcache_invalidate_thread): Declare.
6877 (regcache_invalidate_one): Delete declaration.
6878 (regcache_release): Declare.
6879 (find_register_by_number, register_cache_size, register_size)
6880 (find_regno): Add target_desc parameter.
6881 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6883 * remote-utils.c: Include tdesc.h.
6884 (outreg, prepare_resume_reply): Adjust.
6885 * server.c: Include tdesc.h.
6886 (gdbserver_xmltarget): Delete declaration.
6887 (get_features_xml, process_serial_event): Adjust.
6888 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6890 (struct process_info) <tdesc>: New field.
6891 (ipa_tdesc): Declare.
6892 * tdesc.c: New file.
6893 * tdesc.h: New file.
6894 * tracepoint.c: Include tdesc.h.
6895 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6896 (get_context_regcache): Adjust to pass ipa_tdesc down.
6897 (do_action_at_tracepoint): Adjust to get the register cache size
6898 from the context regcache's description.
6899 (traceframe_walk_blocks): Adjust to get the register cache size
6900 from the current trace frame's description.
6901 (traceframe_get_pc): Adjust to get current trace frame's
6902 description and pass it down.
6903 (gdb_collect): Adjust to get the register cache size from the
6905 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6906 (gdbserver_xmltarget): Delete.
6907 (initialize_low_tracepoint): Set the ipa's target description.
6908 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6909 (initialize_low_tracepoint): Set the ipa's target description.
6910 * linux-x86-low.c: Include tdesc.h.
6911 [__x86_64__] (is_64bit_tdesc): New.
6912 (ps_get_thread_area, x86_get_thread_area): Use it.
6913 (i386_cannot_store_register): Rename to ...
6914 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6915 (i386_cannot_fetch_register): Rename to ...
6916 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6917 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6919 (target_regsets): Rename to ...
6920 (x86_regsets): ... this.
6921 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6923 (x86_siginfo_fixup): Use is_64bit_tdesc.
6924 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6925 (tdesc_x32_avx_linux, tdesc_x32_linux)
6926 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6928 (x86_linux_update_xmltarget): Delete.
6929 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6930 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6931 (AMD64_LINUX_USER64_CS): New.
6932 (x86_linux_read_description): New, based on
6933 x86_linux_update_xmltarget.
6934 (same_process_callback): New.
6935 (x86_arch_setup_process_callback): New.
6936 (x86_linux_update_xmltarget): New.
6937 (x86_regsets_info): New.
6938 (amd64_linux_regs_info): New.
6939 (i386_linux_usrregs_info): New.
6940 (i386_linux_regs_info): New.
6941 (x86_linux_regs_info): New.
6942 (x86_arch_setup): Reimplement.
6943 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6944 (x86_emit_ops): Ditto.
6945 (the_low_target): Adjust. Install x86_linux_regs_info,
6946 x86_cannot_fetch_register, and x86_cannot_store_register.
6947 (initialize_low_arch): New.
6948 * linux-ia64-low.c (tdesc_ia64): Declare.
6949 (ia64_fetch_register): Adjust.
6950 (ia64_usrregs_info, regs_info): New globals.
6951 (ia64_regs_info): New function.
6952 (the_low_target): Adjust.
6953 (initialize_low_arch): New function.
6954 * linux-sparc-low.c (tdesc_sparc64): Declare.
6955 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6957 (sparc_arch_setup): New function.
6958 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6959 (the_low_target): Adjust.
6960 (initialize_low_arch): New function.
6961 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6962 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6963 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6964 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6965 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6966 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6967 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6968 (tdesc_powerpc_isa205_vsx64l): Declare.
6969 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6970 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6971 (ppc_set_pc, ppc_get_hwcap): Adjust.
6972 (ppc_usrregs_info): Forward declare.
6973 (!__powerpc64__) ppc_regmap_adjusted: New global.
6974 (ppc_arch_setup): Adjust to the current process'es target
6976 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6977 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6978 (ppc_store_evrregset): Adjust.
6979 (target_regsets): Rename to ...
6980 (ppc_regsets): ... this, and make static.
6981 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6982 (ppc_regs_info): New function.
6983 (the_low_target): Adjust.
6984 (initialize_low_arch): New function.
6985 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6986 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6987 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6988 (tdesc_s390x_linux64v2): Declare.
6989 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6990 (s390_fill_gregset, s390_store_last_break): Adjust.
6991 (target_regsets): Rename to ...
6992 (s390_regsets): ... this, and make static.
6993 (s390_get_pc, s390_set_pc): Adjust.
6994 (s390_get_hwcap): New target_desc parameter, and use it.
6995 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6996 (s390_arch_setup): Adjust to set the current process'es target
6997 description. Don't adjust the regmap.
6998 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6999 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7000 (regs_info_3264): New globals.
7001 (s390_regs_info): New function.
7002 (the_low_target): Adjust.
7003 (initialize_low_arch): New function.
7004 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7005 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7006 [__mips64] (init_registers_mips_linux)
7007 (init_registers_mips_dsp_linux): Delete defines.
7008 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7009 (have_dsp): New global.
7010 (mips_read_description): New, based on mips_arch_setup.
7011 (mips_arch_setup): Reimplement.
7012 (get_usrregs_info): New function.
7013 (mips_cannot_fetch_register, mips_cannot_store_register)
7014 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7015 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7016 (target_regsets): Rename to ...
7017 (mips_regsets): ... this, and make static.
7018 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7019 (dsp_regs_info, regs_info): New globals.
7020 (mips_regs_info): New function.
7021 (the_low_target): Adjust.
7022 (initialize_low_arch): New function.
7023 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7024 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7026 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7027 (arm_read_description): New, with bits factored from
7029 (arm_arch_setup): Reimplement.
7030 (target_regsets): Rename to ...
7031 (arm_regsets): ... this, and make static.
7032 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7033 (arm_regs_info): New function.
7034 (the_low_target): Adjust.
7035 (initialize_low_arch): New function.
7036 * linux-m68k-low.c (tdesc_m68k): Declare.
7037 (target_regsets): Rename to ...
7038 (m68k_regsets): ... this, and make static.
7039 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7040 (m68k_regs_info): New function.
7041 (m68k_arch_setup): New function.
7042 (the_low_target): Adjust.
7043 (initialize_low_arch): New function.
7044 * linux-sh-low.c (tdesc_sharch): Declare.
7045 (target_regsets): Rename to ...
7046 (sh_regsets): ... this, and make static.
7047 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7048 (sh_regs_info, sh_arch_setup): New functions.
7049 (the_low_target): Adjust.
7050 (initialize_low_arch): New function.
7051 * linux-bfin-low.c (tdesc_bfin): Declare.
7052 (bfin_arch_setup): New function.
7053 (bfin_usrregs_info, regs_info): New globals.
7054 (bfin_regs_info): New function.
7055 (the_low_target): Adjust.
7056 (initialize_low_arch): New function.
7057 * linux-cris-low.c (tdesc_cris): Declare.
7058 (cris_arch_setup): New function.
7059 (cris_usrregs_info, regs_info): New globals.
7060 (cris_regs_info): New function.
7061 (the_low_target): Adjust.
7062 (initialize_low_arch): New function.
7063 * linux-cris-low.c (tdesc_crisv32): Declare.
7064 (cris_arch_setup): New function.
7065 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7066 (cris_regs_info): New function.
7067 (the_low_target): Adjust.
7068 (initialize_low_arch): New function.
7069 * linux-m32r-low.c (tdesc_m32r): Declare.
7070 (m32r_arch_setup): New function.
7071 (m32r_usrregs_info, regs_info): New globals.
7072 (m32r_regs_info): Adjust.
7073 (initialize_low_arch): New function.
7074 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7075 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7076 (tic6x_usrregs_info): Forward declare.
7077 (tic6x_read_description): New function, based on ...
7078 (tic6x_arch_setup): ... this. Reimplement.
7079 (target_regsets): Rename to ...
7080 (tic6x_regsets): ... this, and make static.
7081 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7082 (tic6x_regs_info): New function.
7083 (the_low_target): Adjust.
7084 (initialize_low_arch): New function.
7085 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7086 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7087 (target_regsets): Rename to ...
7088 (xtensa_regsets): ... this, and make static.
7089 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7091 (xtensa_arch_setup, xtensa_regs_info): New functions.
7092 (the_low_target): Adjust.
7093 (initialize_low_arch): New function.
7094 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7095 (nios2_arch_setup): Set the current process'es tdesc.
7096 (target_regsets): Rename to ...
7097 (nios2_regsets): ... this.
7098 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7099 (nios2_regs_info): New function.
7100 (the_low_target): Adjust.
7101 (initialize_low_arch): New function.
7102 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7103 (aarch64_arch_setup): Set the current process'es tdesc.
7104 (target_regsets): Rename to ...
7105 (aarch64_regsets): ... this.
7106 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7107 (aarch64_regs_info): New function.
7108 (the_low_target): Adjust.
7109 (initialize_low_arch): New function.
7110 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7112 (target_regsets): Rename to ...
7113 (tile_regsets): ... this.
7114 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7115 (tile_regs_info): New function.
7116 (tile_arch_setup): Set the current process'es tdesc.
7117 (the_low_target): Adjust.
7118 (initialize_low_arch): New function.
7119 * spu-low.c (tdesc_spu): Declare.
7120 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7121 * win32-arm-low.c (tdesc_arm): Declare.
7122 (arm_arch_setup): New function.
7123 (the_low_target): Install arm_arch_setup instead of
7125 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7126 (init_windows_x86): Rename to ...
7127 (i386_arch_setup): ... this. Set `win32_tdesc'.
7128 (the_low_target): Adjust.
7129 * win32-low.c (win32_tdesc): New global.
7130 (child_add_thread): Don't create the thread cache here.
7131 (do_initial_child_stuff): Set the new process'es tdesc.
7132 * win32-low.h (struct target_desc): Forward declare.
7133 (win32_tdesc): Declare.
7134 * lynx-i386-low.c (tdesc_i386): Declare global.
7135 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7136 * lynx-low.c (lynx_tdesc): New global.
7137 (lynx_add_process): Set the new process'es tdesc.
7138 * lynx-low.h (struct target_desc): Forward declare.
7139 (lynx_tdesc): Declare global.
7140 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7141 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7142 * nto-low.c (nto_tdesc): New global.
7143 (do_attach): Set the new process'es tdesc.
7144 * nto-low.h (struct target_desc): Forward declare.
7145 (nto_tdesc): Declare.
7146 * nto-x86-low.c (tdesc_i386): Declare.
7147 (nto_x86_arch_setup): Set `nto_tdesc'.
7149 2013-06-04 Gary Benson <gbenson@redhat.com>
7151 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7152 to qSupported response when appropriate.
7153 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7154 with nonzero-length annex.
7155 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7156 arguments supplied in annex.
7158 2013-05-31 Doug Evans <dje@google.com>
7161 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7162 64 bits in 64-cross-32 environment.
7164 2013-05-28 Pedro Alves <palves@redhat.com>
7166 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7167 (aarch64-without-fpu.c): Delete rule.
7168 * configure.srv (aarch64*-*-linux*): Remove references to
7169 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7170 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7173 2013-05-24 Pedro Alves <palves@redhat.com>
7175 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7176 instead of strchr/decode_address. Error if the range isn't split
7177 with a ','. Don't assume there's be a ':' in the action.
7179 2013-05-23 Yao Qi <yao@codesourcery.com>
7180 Pedro Alves <palves@redhat.com>
7182 * linux-low.c (lwp_in_step_range): New function.
7183 (linux_wait_1): If the thread was range stepping and stopped
7184 outside the stepping range, report the stop to GDB. Otherwise,
7185 continue stepping. Add range stepping debug output.
7186 (linux_set_resume_request): Copy the step range from the resume
7188 (linux_supports_range_stepping): New.
7189 (linux_target_ops) <supports_range_stepping>: Set to
7190 linux_supports_range_stepping.
7191 * linux-low.h (struct linux_target_ops)
7192 <supports_range_stepping>: New field.
7193 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7194 * linux-x86-low.c (x86_supports_range_stepping): New.
7195 (the_low_target) <supports_range_stepping>: Set to
7196 x86_supports_range_stepping.
7197 * server.c (handle_v_cont): Handle 'r' action.
7198 (handle_v_requests): Append ";r" if the target supports range
7200 * target.h (struct thread_resume) <step_range_start,
7201 step_range_end>: New fields.
7202 (struct target_ops) <supports_range_stepping>:
7204 (target_supports_range_stepping): New macro.
7206 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7208 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7209 confusion in comment.
7211 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7213 * lynx-low.c (struct process_info_private): New type.
7214 (lynx_add_process): New function.
7215 (lynx_create_inferior, lynx_attach): Replace calls to
7216 add_process by calls to lynx_add_process.
7217 (lynx_resume): If PTID is null, then try using
7218 current_process()->private->last_wait_event_ptid.
7220 (lynx_clear_inferiors): Delete. The contents of that function
7221 has been inlined in lynx_mourn;
7222 (lynx_wait_1): Save the ptid in the process's private data.
7223 (lynx_mourn): Free the process' private data. Replace call
7224 to lynx_clear_inferiors by call to clear_inferiors.
7226 2013-05-17 Yao Qi <yao@codesourcery.com>
7228 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7231 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7233 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7234 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7235 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7236 PT_TEXT_END_ADDR guards. Update comments.
7237 (linux_target_op) <read_offsets>: Conditionally define to
7238 linux_read_offsets if the target is UCLIBC and if it defines
7239 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7241 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7242 Andrew Jenner <andrew@codesourcery.com>
7244 * Makefile.in (SFILES): Add linux-nios2-low.c.
7245 (clean): Add action to delete nios2-linux.c.
7246 (nios2-linux.c): New rule.
7247 * configure.srv: Add nios2*-*-linux*.
7248 * linux-nios2-low.c: New.
7250 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7252 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7254 2013-04-25 Hui Zhu <hui@codesourcery.com>
7257 * ax.c (ax_printf): Add fflush.
7259 2013-04-22 Tom Tromey <tromey@redhat.com>
7261 * Makefile.in (SFILES): Add filestuff.c.
7262 (OBS): Add filestuff.o.
7263 (filestuff.o): New target.
7264 * config.in, configure: Rebuild.
7265 * configure.ac: Check for fdwalk, pipe2.
7267 2013-04-17 Pedro Alves <palves@redhat.com>
7269 * configure.ac (USE_THREAD_DB): Delete variable.
7270 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7271 Don't AC_SUBST USE_THREAD_DB.
7272 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7273 * config.in, configure: Regenerate.
7275 2013-04-16 Pedro Alves <palves@redhat.com>
7277 * linux-low.h (struct lwp_info) <thread_known>: Move under
7278 the USE_THREAD_DB #ifdef.
7280 2013-04-16 Pedro Alves <palves@redhat.com>
7282 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7283 (linux-low.o): Delete rule.
7284 * linux-low.h: Always include "gdb_thread_db.h" instead of
7285 conditionally including thread_db.h.
7286 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7289 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7291 * Makefile.in (install-only): Fix make install regression.
7293 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7295 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7296 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7298 * gdbserver.1: Remove.
7300 2013-03-22 Pedro Alves <palves@redhat.com>
7302 * linux-low.c (handle_extended_wait): Don't call
7303 linux_enable_event_reporting.
7305 2013-03-15 Tony Theodore <tonyt@logyst.com>
7308 * Makefile.in (SHELL): Use @SHELL@.
7310 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7312 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7315 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7317 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7318 Remove extraneous NULL element.
7320 2013-03-13 Yao Qi <yao@codesourcery.com>
7322 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7323 'V' block in trace frame.
7325 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7327 * target.h (struct target_ops): Add btrace ops.
7328 (target_supports_btrace): New macro.
7329 (target_enable_btrace): New macro.
7330 (target_disable_btrace): New macro.
7331 (target_read_btrace): New macro.
7332 * gdbthread.h (struct thread_info): Add btrace field.
7333 * server.c: Include btrace-common.h.
7334 (handle_btrace_general_set): New function.
7335 (handle_btrace_enable): New function.
7336 (handle_btrace_disable): New function.
7337 (handle_general_set): Call handle_btrace_general_set.
7338 (handle_qxfer_btrace): New function.
7339 (struct qxfer qxfer_packets[]): Add btrace entry.
7340 * inferiors.c (remove_thread): Disable btrace.
7341 * linux-low: Include linux-btrace.h.
7342 (linux_low_enable_btrace): New function.
7343 (linux_low_read_btrace): New function.
7344 (linux_target_ops): Add btrace ops.
7345 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7346 Add srv_linux_btrace=yes.
7347 (x86_64-*-linux*): Add linux-btrace.o.
7348 Add srv_linux_btrace=yes.
7349 * configure.ac: Define HAVE_LINUX_BTRACE.
7350 * config.in: Regenerated.
7351 * configure: Regenerated.
7353 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7355 * server.c (handle_qxfer): Preserve error message if -3 is
7357 (qxfer): Document the -3 return value.
7359 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7361 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7362 (linux_btrace_h): New variable.
7363 (linux-btrace.o): New rule.
7365 2013-03-08 Stan Shebs <stan@codesourcery.com>
7366 Hafiz Abid Qadeer <abidh@codesourcery.com>
7368 * tracepoint.c (trace_buffer_size): New global.
7369 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7370 (init_trace_buffer): Change to one-argument function. Allocate
7371 trace buffer memory.
7372 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7373 handle QTBuffer:size packet.
7374 (cmd_bigqtbuffer_size): New function.
7375 (initialize_tracepoint): Call init_trace_buffer with
7376 DEFAULT_TRACE_BUFFER_SIZE.
7377 * server.c (handle_query): Add QTBuffer:size in the
7380 2013-03-07 Yao Qi <yao@codesourcery.com>
7382 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7383 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7385 (cmd_qtsp): Adjust condition. Do post increment.
7386 Set cur_action and cur_step_action back to 0.
7388 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7391 * linux-low.c (linux_write_memory): Return early success if LEN is
7394 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7396 * configure.srv: Add x86_64-*-cygwin* as target.
7398 2013-02-28 Tom Tromey <tromey@redhat.com>
7400 * configure.ac: Invoke AC_SYS_LARGEFILE.
7401 * configure, config.in: Rebuild.
7403 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7405 * win32-low.c: Throughout, fix format strings and casts of
7406 printf-like functions to avoid type related warnings on all
7408 (get_child_debug_event): Print dwDebugEventCode as hex since
7409 that's how it's usually documented.
7411 2013-02-28 Yao Qi <yao@codesourcery.com>
7413 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7416 2013-02-27 Jiong Wang <jiwang@tilera.com>
7418 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7419 (reg-tilegx32.c): New rule.
7420 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7421 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7422 different register info initializer according to elf class.
7423 (init_registers_tilgx32): New function. The tilegx32 register info
7425 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7426 (tile_store_gregset): Likewise.
7428 2013-02-27 Yao Qi <yao@codesourcery.com>
7430 * server.c (process_point_options): Print debug message when
7431 debug_threads is true.
7433 2013-02-26 Yao Qi <yao@codesourcery.com>
7435 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7437 2013-02-19 Pedro Alves <palves@redhat.com>
7438 Kai Tietz <ktietz@redhat.com>
7442 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7443 instead of strtoul to extract address from packet.
7444 (process_serial_event) <'z'>: Likewise.
7446 2013-02-18 Yao Qi <yao@codesourcery.com>
7448 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7450 2013-02-14 Pedro Alves <palves@redhat.com>
7454 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7455 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7457 2013-02-14 Pedro Alves <palves@redhat.com>
7459 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7461 2013-02-14 Pedro Alves <palves@redhat.com>
7463 * tracepoint.c (save_string): Delete.
7464 (add_tracepoint_action): Use savestring instead of save_string.
7466 2013-02-12 Pedro Alves <palves@redhat.com>
7468 * linux-xtensa-low.c: Ditto.
7469 * xtensa-xtregs.c: Ditto.
7471 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7473 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7476 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7478 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7479 aarch64_num_wp_regs and aarch64_num_bp_regs to
7480 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7482 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7484 * linux-aarch64-low.c (ps_get_thread_area): Replace
7485 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7487 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7488 Marcus Shawcroft <marcus.shawcroft@arm.com>
7489 Nigel Stephens <nigel.stephens@arm.com>
7490 Yufeng Zhang <yufeng.zhang@arm.com>
7492 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7493 (aarch64.c, aarch64-without-fpu.c): New targets.
7494 * configure.srv (aarch64*-*-linux*): New.
7495 * linux-aarch64-low.c: New file.
7497 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7499 * linux-low.c (handle_extended_wait, linux_create_inferior)
7500 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7501 (dequeue_one_deferred_signal, linux_resume_one_thread)
7502 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7503 (linux_tracefork_grandchild, linux_test_for_tracefork)
7504 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7505 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7506 where the argument is 0.
7508 2013-01-25 Yao Qi <yao@codesourcery.com>
7510 * event-loop.c: Include "queue.h".
7511 (gdb_event_p): New typedef.
7512 (struct gdb_event) <next_event>: Remove.
7513 (event_queue): Change to QUEUE(gdb_event_p).
7514 (async_queue_event): Remove.
7515 (gdb_event_xfree): New.
7516 (initialize_event_loop): New.
7517 (process_event): Use API from QUEUE.
7518 (wait_for_event): Likewise.
7519 * server.c (main): Call initialize_event_loop.
7520 * server.h (initialize_event_loop): Declare.
7522 2013-01-18 Yao Qi <yao@codesourcery.com>
7524 * ax.h (struct eval_agent_expr_context): New.
7525 (gdb_eval_agent_expr): Update declaration.
7526 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7527 TFRAME. Add new argument CTX.
7528 * server.h (struct eval_agent_expr_context): Declare.
7529 (agent_mem_read, agent_tsv_read): Update declaration.
7530 (agent_mem_read_string): Likewise.
7531 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7532 (add_traceframe_block): Add new argument TPOINT.
7533 Increase TPOINT->traceframe_usage.
7534 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7535 eval_tracepoint_agent_expr.
7536 (condition_true_at_tracepoint): Likewise.
7537 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7538 (agent_mem_read_string, agent_tsv_read): Likewise.
7540 2013-01-16 Yao Qi <yao@codesourcery.com>
7542 * linux-low.c (linux_resume_one_lwp): Don't check
7543 'lwp->bp_reinsert != 0'.
7545 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7546 Pedro Alves <palves@redhat.com>
7548 * lynx-low.c (ptrace_request_to_str): Define a temporary
7549 macro and use it to simplify this function's implementation.
7551 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7553 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7556 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7558 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7560 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7562 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7564 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7566 * lynx-low.c (lynx_resume): Use the resume_info parameter
7567 to determine the ptid for the lynx_ptrace call, unless
7568 it is equal to minus_one_ptid, in which case we use the
7569 ptid of the current_inferior.
7570 (lynx_wait_1): After having received a thread create/exit
7571 event, resume the inferior's execution using the signaling
7572 thread's ptid, rather than the old ptid.
7574 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7576 * lynx-low.c (lynx_resume): Delete variable ret.
7578 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7580 * gdbreplay.c (gdbreplay_version): Update copyright year.
7581 * server.c (gdbserver_version): Likewise.
7583 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7585 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7588 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7590 * lynx-low.c (ptrace_request_to_str): Add handling for
7593 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7595 * lynx-low.c (lynx_attach): Delete variable new_process.
7597 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7599 * lynx-low.c (lynx_create_inferior): Delete variable
7602 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7604 * lynx-low.c (ptrace_request_to_str): Do not handle
7605 PTRACE_GETTHREADLIST if this macro does not exist.
7607 2012-12-15 Yao Qi <yao@codesourcery.com>
7609 * Makefile.in (OBS): Add notif.o.
7610 * notif.c, notif.h: New.
7611 * server.c: Include "notif.h".
7612 (struct vstop_notif) <next>: Remove.
7614 (queue_stop_reply): Update.
7615 (push_event, send_next_stop_reply): Remove.
7616 (discard_queued_stop_replies): Update.
7617 (notif_stop): New variable.
7618 (handle_v_stopped): Remove.
7619 (handle_v_requests): Don't call handle_v_stopped. Call
7620 handle_ack_notif instead.
7621 (queue_stop_reply_callback): Call notif_event_enque instead
7622 of queue_stop_reply.
7623 (handle_status): Don't call send_next_stop_reply, call
7624 notif_write_event instead.
7625 (kill_inferior_callback): Likewise.
7626 (detach_or_kill_inferior_callback): Likewise.
7627 (main): Call initialize_notif.
7628 (process_serial_event): Call QUEUE_is_empty.
7629 (handle_target_event): Call notif_push instead of push event.
7630 * server.h (push_event): Remove declaration.
7632 2012-12-10 Tom Tromey <tromey@redhat.com>
7634 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7635 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7638 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7639 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7640 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7641 (amd64-linux-ipa.o, ax.o): Rewrite.
7642 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7643 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7644 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7645 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7646 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7647 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7648 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7649 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7650 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7651 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7652 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7653 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7654 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7655 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7656 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7657 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7658 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7659 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7660 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7661 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7662 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7663 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7664 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7665 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7666 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7667 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7668 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7669 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7670 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7671 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7672 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7673 (reg-tilegx.o): Remove.
7674 (all_object_files): New macro.
7675 Include .deps files.
7676 * aclocal.m4, configure: Rebuild.
7677 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7678 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7679 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7681 2012-12-05 Tom Tromey <tromey@redhat.com>
7684 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7686 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7688 * configure.ac: Check for linux/perf_event.h.
7689 * config.in: Regenerated.
7690 * configure: Regenerated.
7692 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7694 * hostio.c (handle_readlink): Decrease buffer size
7695 parameter passed to readlink by one byte.
7697 2012-11-26 Yao Qi <yao@codesourcery.com>
7699 * configure.ac (build_warnings): Append '-Wempty-body'.
7700 * configure: Regenerated.
7701 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7704 2012-11-15 Pierre Muller <muller@sourceware.org>
7706 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7707 * config.in: Regenerate.
7708 * configure: Regenerate.
7709 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7710 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7711 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7712 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7714 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7715 instead of <sys/wait.h> header.
7716 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7718 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7720 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7721 (various make rules): Remove -DGDBSERVER
7723 2012-11-09 Yao Qi <yao@codesourcery.com>
7725 * spu-low.c (current_ptid): Move it to ..
7726 * gdbthread.h: ... here. New.
7727 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7728 * server.c (myresume, process_serial_event): Likewise.
7729 * thread-db.c (thread_db_find_new_threads): Likewise.
7730 * tracepoint.c (run_inferior_command): Likewise.
7732 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7734 * server.c (handle_search_memory_1): Include access length in
7737 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7739 * linux-crisv32-low.c: Fix compile errors.
7741 2012-09-04 Yao Qi <yao@codesourcery.com>
7743 * tracepoint.c (cmd_qtsv): Adjust debug message.
7744 Don't check CUR_TPOINT.
7746 2012-08-28 Yao Qi <yao@codesourcery.com>
7748 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7749 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7750 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7751 Remove declarations of xmalloc, xreallloc, xstrdup and
7753 * Makefile.in (libiberty_h): New.
7754 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7755 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7757 2012-08-23 Yao Qi <yao@codesourcery.com>
7759 * server.h: Remove declaration of 'xsnprintf'.
7761 2012-08-22 Keith Seitz <keiths@redhat.com>
7763 * server.h: Include build-gnulib-gbserver/config.h.
7764 * gdbreplay.c: Likewise.
7766 2012-08-08 Doug Evans <dje@google.com>
7768 * Makefile.in (SFILES): Add gdb_vecs.c.
7769 (OBS): Add gdb_vecs.o.
7770 (gdb_vecs_h, host_defs_h): New variables.
7771 (thread-db.o): Add $(gdb_vecs_h) dependency.
7772 (gdb_vecs.o): New rule.
7773 * thread-db.c: #include "gdb_vecs.h".
7774 (thread_db_load_search): Use a vector to iterate over path elements.
7775 Handle text appearing after "$pdir".
7777 * configure.ac: Add check for strstr.
7778 * config.in: Regenerate.
7779 * configure: Regenerate.
7781 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7783 * hostio.c (handle_pread): If pread fails, fall back to attempting
7785 (handle_pwrite): Likewise for pwrite.
7787 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7789 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7790 between unsupported TYPE and unimplementable ADDR/LEN combination.
7791 (arm_insert_point): Act on new return value.
7793 2012-07-31 Pedro Alves <palves@redhat.com>
7795 * server.c (process_point_options): Only skip tokens if we find
7796 one that is unrecognized. Don't treat 'X' specially while
7797 skipping unrecognized tokens.
7799 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7801 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7802 to 4-byte-align HW breakpoint addresses for Thumb.
7804 2012-07-27 Yao Qi <yao@codesourcery.com>
7808 * server.h: Declare gdb_agent_about_to_close.
7809 * target.c (kill_inferior): Include "agent.h".
7810 New. Send command 'kill'.
7811 * target.h (kill_inferior): Removed macro.
7812 * tracepoint.c (gdb_agent_about_to_close): New.
7813 (gdb_agent_helper_thread): Handle command 'close'.
7814 Wait endlessly until the inferior stops.
7815 Install gdb_agent_remove_socket to atexit hook.
7816 (agent_socket_name): New static variable.
7817 (gdb_agent_socket_init): Replace local variable 'name' with
7818 'agent_socket_name'.
7819 (gdb_agent_remove_socket): New.
7821 2012-07-27 Yao Qi <yao@codesourcery.com>
7823 * server.c (process_point_options): Stop at 'X' when parsing.
7825 2012-07-19 Michael Eager <eager@eagercon.com>
7827 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7829 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7830 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7831 hardware breakpoint.
7833 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7835 * gdbserver/linux-low.c (initialize_low): Call
7836 linux_ptrace_init_warnings.
7838 2012-07-02 Doug Evans <dje@google.com>
7840 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7843 2012-07-02 Stan Shebs <stan@codesourcery.com>
7845 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7846 (ax.o): Add it to build rule.
7848 (OBS): Add format.o.
7849 (IPA_OBS): Add format.o.
7850 * server.c (handle_query): Claim support for breakpoint commands.
7851 (process_point_options): Add command case.
7852 (process_serial_event): Leave running if there are printfs in
7854 * mem-break.h (any_persistent_commands): Declare.
7855 (add_breakpoint_commands): Declare.
7856 (gdb_no_commands_at_breakpoint): Declare.
7857 (run_breakpoint_commands): Declare.
7858 * mem-break.c (struct point_command_list): New struct.
7859 (struct breakpoint): New field command_list.
7860 (any_persistent_commands): New function.
7861 (add_commands_to_breakpoint): New function.
7862 (add_breakpoint_commands): New function.
7863 (gdb_no_commands_at_breakpoint): New function.
7864 (run_breakpoint_commands): New function.
7865 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7867 * ax.c: Include format.h.
7868 (ax_printf): New function.
7869 (gdb_eval_agent_expr): Add printf opcode.
7871 2012-06-13 Yao Qi <yao@codesourcery.com>
7873 * server.c (start_inferior): Remove duplicated writes to fields
7874 'last_resume_kind' and 'last_status' of 'current_inferior'.
7876 2012-06-12 Yao Qi <yao@codesourcery.com>
7877 Pedro Alves <palves@redhat.com>
7879 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7881 * server.c (handle_v_cont): Extend comment.
7883 2012-06-11 Yao Qi <yao@codesourcery.com>
7885 * linux-low.c (linux_attach): Add 'static'.
7887 2012-06-06 Yao Qi <yao@codesourcery.com>
7889 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7891 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7893 Fix gcc -flto compilation warning.
7894 * server.c (main): Make variable multi_mode and attach volatile.
7896 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7898 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7899 if the platform doesn't know about it.
7901 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7903 * Makefile.in (SFILES): Add linux-tile-low.c.
7904 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7905 * configure.srv: Handle tilegx-*-linux*.
7906 * linux-tile-low.c: New file.
7908 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7910 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7912 2012-05-24 Pedro Alves <palves@redhat.com>
7916 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7918 2012-05-24 Pedro Alves <palves@redhat.com>
7922 Replace target_signal with gdb_signal throughout.
7924 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7926 * linux-low.c (linux_store_registers): Avoid the copying sequence
7927 when no data has been retrieved by ptrace.
7929 2012-05-22 Will Deacon <will.deacon@arm.com>
7931 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7932 Include asm/ptrace.h.
7933 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7936 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7938 * linux-low.c (linux_store_registers): Don't re-retrieve data
7939 with ptrace that has already been obtained from /proc. Always
7940 copy any data retrieved with ptrace to the buffer supplied.
7942 2012-05-11 Yao Qi <yao@codesourcery.com>
7943 Pedro Alves <palves@redhat.com>
7945 * linux-low.c (enum stopping_threads_kind): New.
7946 (stopping_threads): Change type to `enum stopping_threads_kind'.
7947 (handle_extended_wait): If stopping and suspending threads, leave
7948 the new_lwp suspended too.
7949 (linux_wait_for_event): Adjust.
7950 (stop_all_lwps): Set `stopping_threads' to
7951 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7952 whether we're suspending threads or just stopping them. Assert no
7955 2012-04-29 Yao Qi <yao@codesourcery.com>
7957 * server.h: Move some code to ...
7958 * gdbthread.h: ... here. New.
7959 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7960 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7961 (nto-low.o, win32-low.o): Likewise.
7962 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7963 * regcache.c, remote-utils.c, server.c: Likewise.
7964 * target.c, tracepoint.c, win32-low.c: Likewise.
7966 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7968 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7969 (PTRACE_ARG4_TYPE): Likewise.
7970 (PTRACE_XFER_TYPE): Likewise.
7971 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7972 ptrace to PTRACE_ARG3_TYPE.
7973 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7974 (PTRACE_ARG4_TYPE): Likewise.
7975 (PTRACE_XFER_TYPE): Likewise.
7976 (linux_detach_one_lwp): Cast fourth argument of
7977 ptrace to long then PTRACE_ARG4_TYPE.
7978 (regsets_fetch_inferior_registers): Cast third argument of
7979 ptrace to long then PTRACE_ARG3_TYPE.
7980 (regsets_store_inferior_registers): Likewise.
7982 2012-04-20 Pedro Alves <palves@redhat.com>
7984 * configure: Regenerate.
7986 2012-04-19 Pedro Alves <palves@redhat.com>
7988 * Makefile.in (GNULIB_BUILDDIR): New.
7989 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7990 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7991 (all, install-only, uninstall, clean-info, all-lib, clean): No
7992 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7993 (maintainer-clean realclean distclean): Use subdir_do.
7995 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7996 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7997 * acinclude.m4: Include acx_configure_dir.m4.
7998 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7999 calls. Call AC_PROG_RANLIB. Configure gnulib using
8002 (GNULIB_STDINT_H): Adjust.
8003 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8004 * gdbreplay.c: Include build-gnulib/config.h.
8005 * server.h: Likewise.
8006 * aclocal.m4: Regenerate.
8007 * config.in: Regenerate.
8008 * configure: Regenerate.
8010 2012-04-19 Pedro Alves <palves@redhat.com>
8012 * Makefile.in (LIBGNU, INCGNU): Adjust.
8013 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8014 (all, install-only, uninstall, clean-info, all-lib, clean)
8015 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8016 * configure.ac: Adjust AC_OUTPUT output.
8017 * aclocal.m4: Regenerate.
8018 * configure: Regenerate.
8020 2012-04-19 Pedro Alves <palves@redhat.com>
8022 * Makefile.in (generated_files): New.
8023 (server_h): Remove the explicit dependency on config.h, and depend
8024 on $generated_files.
8026 2012-04-19 Pedro Alves <palves@redhat.com>
8028 * Makefile.in (INCGNU): Add -Ignulib.
8030 2012-04-19 Pedro Alves <palves@redhat.com>
8032 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8033 (INCGNU): ... this, and spell out -I here.
8034 (GNULIB_LIB): Rename to ...
8036 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8038 2012-04-19 Pedro Alves <palves@redhat.com>
8040 * config.in: Regenerate.
8042 2012-04-19 Pedro Alves <palves@redhat.com>
8044 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8045 * server.h (memmem): Remove declaration.
8046 * config.in: Regenerate.
8047 * configure: Regenerate.
8049 2012-04-19 Yao Qi <yao@codesourcery.com>
8051 * Makefile.in (SFILES): Add common/vec.c.
8055 2012-04-19 Yao Qi <yao@codesourcery.com>
8057 * remote-utils.c (prepare_resume_reply): Replace with macro
8058 target_core_of_thread.
8059 * server.c (handle_qxfer_threads_proper): Likewise.
8060 * target.h (traget_core_of_thread): New macro.
8062 2012-04-18 Pedro Alves <palves@redhat.com>
8064 * aclocal.m4: Regenerate.
8065 * configure: Regenerate.
8067 2012-04-16 Yao Qi <yao@codesourcery.com>
8069 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8070 duplicated on address.
8072 2012-04-16 Yao Qi <yao@codesourcery.com>
8074 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8075 (struct tracepoint_action_ops) <send>: New field.
8076 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8077 (agent_expr_send, x_tracepoint_action_send): New.
8078 (l_tracepoint_action_send): New.
8079 (cmd_qtdp): Download and install tracepoint
8080 according to `use_agent'.
8081 (run_inferior_command): Add one more parameter `len'.
8083 (tracepoint_send_agent): New.
8084 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8086 2012-04-16 Yao Qi <yao@codesourcery.com>
8088 * tracepoint.c (download_tracepoints): Moved to ...
8089 (cmd_qtstart): ... here.
8091 2012-04-14 Yao Qi <yao@codesourcery.com>
8093 * tracepoint.c: Include inttypes.h.
8094 (struct collect_memory_action): Use sized types.
8095 (struct tracepoint): Likewise.
8096 (cmd_qtdp, stop_tracing): Update print specifiers.
8097 (cmd_qtp, response_tracepoint): Likewise.
8098 (collect_data_at_tracepoint): Likewise.
8099 (collect_data_at_step): Likewise.
8101 2012-04-14 Yao Qi <yao@codesourcery.com>
8103 Import gnulib module inttypes.
8104 * aclocal.m4, config.in, configure: Regenerated.
8106 2012-04-14 Yao Qi <yao@codesourcery.com>
8108 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8109 Makefile and config.status at last.
8111 2012-04-13 Yao Qi <yao@codesourcery.com>
8113 * tracepoint.c: Include stdint.h unconditionally.
8115 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8117 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8118 on BFD_HAVE_SYS_PROCFS_TYPE.
8119 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8120 * configure: Regenerate.
8121 * config.in: Likewise.
8123 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8125 * Makefile.in (clean): Also remove x32.c x32-linux.c
8126 x32-avx.c x32-avx-linux.c.
8127 (x32.o): New target.
8129 (x32-linux.o): Likewise.
8130 (x32-linux.c): Likewise.
8131 (x32-avx.o): Likewise.
8132 (x32-avx.c): Likewise.
8133 (x32-avx-linux.o): Likewise.
8134 (x32-avx-linux.c): Likewise.
8136 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8137 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8138 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8139 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8140 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8141 i386/x32-avx-linux.xml.
8143 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8144 (init_registers_x32_avx_linux): Likwise.
8145 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8146 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8148 2012-04-13 Pedro Alves <palves@redhat.com>
8150 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8151 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8152 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8153 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8156 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8158 * linux-x86-low.c (compat_x32_clock_t): New.
8159 (compat_x32_siginfo_t): Likewise.
8160 (compat_x32_siginfo_from_siginfo): Likewise.
8161 (siginfo_from_compat_x32_siginfo): Likewise.
8162 (linux_is_elf64): Likewise.
8163 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8164 and siginfo_from_compat_x32_siginfo for x32.
8165 (x86_arch_setup): Set linux_is_elf64.
8167 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8170 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8172 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8173 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8174 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8175 compatible with process.
8177 2012-04-12 Yao Qi <yao@codesourcery.com>
8179 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8180 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8181 (install-only, install-info, clean): Handle sub dir gnulib.
8182 (all-lib, am--refresh): New targets.
8183 (memmem.o): Remove target.
8184 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8185 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8186 (AC_REPLACE_FUNCS): Remove memmem.
8187 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8188 (AC_OUTPUT): Generate Makefile in gnulib/.
8189 * aclocal.m4, config.in, configure: Regenerated.
8191 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8193 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8195 2012-04-05 Pedro Alves <palves@redhat.com>
8197 -Werror=strict-aliasing
8199 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8202 2012-04-04 Pedro Alves <palves@redhat.com>
8204 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8205 (sparc_store_gregset_from_stack, sparc_store_gregset)
8206 (sparc_breakpoint_at): Fix formatting.
8208 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8210 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8212 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8213 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8214 * config.in: Regenerate.
8215 * configure: Likewise.
8217 2012-03-29 Pedro Alves <palves@redhat.com>
8219 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8220 Correct ptrace arguments.
8222 2012-03-28 Pedro Alves <palves@redhat.com>
8224 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8225 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8226 (IA64_FR1_REGNUM): New defines.
8227 (ia64_fetch_register): New.
8228 (the_low_target): Install it.
8229 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8231 * linux-low.c (linux_fetch_registers): Try the
8232 the_low_target.fetch_register hook first.
8234 * linux-arm-low.c (the_low_target): Adjust.
8235 * linux-bfin-low.c (the_low_target): Adjust.
8236 * linux-cris-low.c (the_low_target): Adjust.
8237 * linux-crisv32-low.c (the_low_target): Adjust.
8238 * linux-m32r-low.c (the_low_target): Adjust.
8239 * linux-m68k-low.c (the_low_target): Adjust.
8240 * linux-mips-low.c (the_low_target): Adjust.
8241 * linux-ppc-low.c (the_low_target): Adjust.
8242 * linux-s390-low.c (the_low_target): Adjust.
8243 * linux-sh-low.c (the_low_target): Adjust.
8244 * linux-sparc-low.c (the_low_target): Adjust.
8245 * linux-tic6x-low.c (the_low_target): Adjust.
8246 * linux-x86-low.c (the_low_target): Adjust.
8247 * linux-xtensa-low.c (the_low_target): Adjust.
8249 2012-03-26 Pedro Alves <palves@redhat.com>
8251 * server.c (handle_qxfer_libraries): Don't bail early if
8252 the_target->qxfer_libraries_svr4 is not NULL.
8254 2012-03-26 Pedro Alves <palves@redhat.com>
8256 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8258 2012-03-23 Pedro Alves <palves@redhat.com>
8260 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8261 "library-list-svr4" element's start tag when the the DSO list is
8264 2012-03-23 Pedro Alves <palves@redhat.com>
8266 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8267 a variable whose type size is the same as the inferior's pointer
8270 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8272 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8274 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8275 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8276 * linux-low.h: Include <signal.h>.
8277 (struct siginfo): Remove forward declaration.
8278 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8281 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8283 * .gitignore: Ignore more files.
8285 2012-03-19 Pedro Alves <palves@redhat.com>
8286 Jan Kratochvil <jan.kratochvil@redhat.com>
8288 * server.c (cont_thread, general_thread): Add describing comments.
8289 (start_inferior): Clear `cont_thread'.
8290 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8293 2012-03-15 Yao Qi <yao@codesourcery.com>
8295 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8297 (cmd_qtdp): ... here.
8299 2012-03-15 Yao Qi <yao@codesourcery.com>
8301 * tracepoint.c (struct tracepoint_action_ops): New.
8302 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8303 (m_tracepoint_action_download): New.
8304 (r_tracepoint_action_download): New.
8305 (x_tracepoint_action_download): New.
8306 (l_tracepoint_action_download): New.
8307 (add_tracepoint_action): Install `action->ops' according type.
8308 (download_tracepoint_1): Move code `download' function pointer
8309 of various tracepoint_action_ops.
8311 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8313 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8314 linux_ptrace_attach_warnings.
8316 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8318 * Makefile.in (linux-ptrace.o): New.
8319 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8320 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8321 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8322 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8323 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8325 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8327 2012-03-08 Yao Qi <yao@codesourcery.com>
8328 Pedro Alves <palves@redhat.com>
8330 Fix PR server/13392.
8331 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8333 * tracepoint.c (remove_tracepoint): New.
8334 (cmd_qtdp): Call remove_tracepoint when failed to install.
8336 2012-03-07 Pedro Alves <palves@redhat.com>
8338 * linux-low.c (get_detach_signal): New.
8339 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8340 Pass on pending signals to PTRACE_DETACH. Check the result of the
8342 * server.c (program_signals, program_signals_p): New.
8343 (handle_general_set): Handle QProgramSignals.
8344 * server.h (program_signals, program_signals_p): Declare.
8346 2012-03-05 Pedro Alves <palves@redhat.com>
8347 Jan Kratochvil <jan.kratochvil@redhat.com>
8349 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8352 2012-03-03 Yao Qi <yao@codesourcery.com>
8354 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8355 agent_look_up_symbols.
8357 2012-03-03 Yao Qi <yao@codesourcery.com>
8359 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8360 (linux-x86-low.o): Likewise.
8361 * server.h: Remove in_process_agent_loaded.
8362 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8366 2012-03-03 Yao Qi <yao@codesourcery.com>
8368 * tracepoint.c (gdb_agent_capability): New global.
8369 (in_process_agent_loaded_ust): Renamed to
8370 `in_process_agent_supports_ust'.
8372 (in_process_agent_supports_ust): Call agent_capability_check.
8373 (clear_installed_tracepoints): Assert that agent supports
8376 2012-03-03 Yao Qi <yao@codesourcery.com>
8378 * linux-low.c (linux_supports_agent): New.
8379 (linux_target_ops): Initialize field `supports_agent' with
8380 linux_supports_agent.
8381 * target.h (struct target_ops) <supports_agent>: New.
8382 (target_supports_agent): New macro.
8383 * server.c (handle_general_set): Handle packet 'QAgent'.
8384 (handle_query): Send `QAgent+'.
8385 * Makefile.in (server.o): Depends on agent.h.
8387 2012-03-03 Yao Qi <yao@codesourcery.com>
8389 * Makefile.in (OBS): Add agent.o.
8390 Add new rule for agent.o.
8391 Track dependence of tracepoint.c on agent.h.
8392 * tracepoint.c (run_inferior_command_1):
8393 (run_inferior_command): Call agent_run_command.
8394 (gdb_ust_connect_sync_socket): Deleted. Move it to
8396 (resume_thread, stop_thread): Likewise.
8397 (gdb_ust_socket_init): Renamed to ...
8398 (gdb_agent_socket_init): ... New.
8399 (gdb_ust_thread): Renamed to ...
8400 (gdb_agent_helper_thread): ... New.
8401 (gdb_ust_init): Move some code to ...
8402 (gdb_agent_init): ... here. New.
8403 [HAVE_UST]: Call gdb_ust_init.
8404 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8405 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8406 * config.in, configure: Regenerated.
8408 2012-03-02 Pedro Alves <palves@redhat.com>
8410 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8411 * linux-low.c (struct simple_pid_list): New.
8412 (stopped_pids): New a struct simple_pid_list pointer.
8413 (add_to_pid_list, pull_pid_from_list): New.
8414 (handle_extended_wait): Don't assume the first signal new children
8415 report is SIGSTOP. Adjust call to pull_pid_from_list.
8416 (linux_wait_for_lwp): Adjust.
8418 2012-03-02 Yao Qi <yao@codesourcery.com>
8420 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8423 2012-03-02 Yao Qi <yao@codesourcery.com>
8425 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8426 `stop_pc' and `tpoint'. Update caller.
8428 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8430 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8431 * linux-low.c (use_linux_regsets): New macro.
8432 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8433 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8434 (linux_register_in_regsets): New function.
8435 (usr_fetch_inferior_registers): Skip registers covered by
8437 (usr_store_inferior_registers): Likewise.
8438 (usr_fetch_inferior_registers): New macro.
8439 (usr_store_inferior_registers): Likewise.
8440 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8441 (linux_store_registers): Likewise.
8442 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8444 (init_registers_mips64_dsp_linux): Likewise.
8445 (init_registers_mips_linux): New macro.
8446 (init_registers_mips_dsp_linux): Likewise.
8447 (mips_dsp_num_regs): Likewise.
8448 (DSP_BASE, DSP_CONTROL): New fallback macros.
8449 (mips_base_regs): New macro.
8450 (mips_regmap): Use it. Fix the size.
8451 (mips_dsp_regmap): New variable.
8452 (mips_dsp_regset_bitmap): Likewise.
8453 (mips_arch_setup): New function.
8454 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8456 (mips_cannot_store_register): Likewise.
8457 (the_low_target): Update .arch_setup, .num_regs and .regmap
8458 initializers. Add .regset_bitmap initializer.
8459 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8461 * linux-bfin-low.c (the_low_target): Likewise.
8462 * linux-cris-low.c (the_low_target): Likewise.
8463 * linux-crisv32-low.c (the_low_target): Likewise.
8464 * linux-ia64-low.c (the_low_target): Likewise.
8465 * linux-m32r-low.c (the_low_target): Likewise.
8466 * linux-m68k-low.c (the_low_target): Likewise.
8467 * linux-ppc-low.c (the_low_target): Likewise.
8468 * linux-s390-low.c (the_low_target): Likewise.
8469 * linux-sh-low.c (the_low_target): Likewise.
8470 * linux-sparc-low.c (the_low_target): Likewise.
8471 * linux-tic6x-low.c (the_low_target): Likewise.
8472 * linux-x86-low.c (the_low_target): Likewise.
8473 * linux-xtensa-low.c (the_low_target): Likewise.
8474 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8475 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8476 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8478 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8479 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8481 2012-02-29 Yao Qi <yao@codesourcery.com>
8482 Pedro Alves <palves@redhat.com>
8484 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8485 `step_over_finished' is true.
8487 2012-02-27 Pedro Alves <palves@redhat.com>
8489 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8490 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8492 2012-02-27 Pedro Alves <palves@redhat.com>
8495 * linux-low.c (pid_is_stopped): New.
8496 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8498 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8500 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8503 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8505 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8507 2012-02-24 Luis Machado <lgustavo@codesourcery>
8509 * server.c (handle_query): Advertise support for target-side
8510 breakpoint condition evaluation.
8511 (process_point_options): New function.
8512 (process_serial_event): When inserting a breakpoint, check for
8513 a target-side condition that should be evaluated.
8515 * mem-break.c: Include regcache.h and ax.h.
8516 (point_cond_list_t): New data structure.
8517 (breakpoint) <cond_list>: New field.
8518 (find_gdb_breakpoint_at): Make non-static.
8519 (delete_gdb_breakpoint_at): Clear any target-side
8521 (clear_gdb_breakpoint_conditions): New function.
8522 (add_condition_to_breakpoint): Likewise.
8523 (add_breakpoint_condition): Likewise.
8524 (gdb_condition_true_at_breakpoint): Likewise.
8525 (gdb_breakpoint_here): Return result directly instead
8526 of going through a local variable.
8528 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8529 (clear_gdb_breakpoint_conditions): Likewise.
8530 (add_breakpoint_condition): Likewise.
8531 (gdb_condition_true_at_breakpoint): Likewise.
8533 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8534 (need_step_over_p): Take target-side breakpoint condition into
8537 2012-02-24 Luis Machado <lgustavo@codesourcery>
8539 * server.h: Include tracepoint.h.
8540 (agent_mem_read, agent_get_trace_state_variable_value,
8541 agent_set_trace_state_variable_value,
8542 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8543 get_set_tsv_func_addr): New prototypes.
8545 * ax.h: New include file.
8546 * ax.c: New source file.
8548 * tracepoint.c: Include ax.h.
8549 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8550 agent_expr, eval_result_type): Move to ax.h.
8551 (parse_agent_expr): Rename to ...
8552 (gdb_parse_agent_expr): ... this, make it non-static and move
8554 (unparse_agent_expr) Rename to ...
8555 (gdb_unparse_agent_expr): ... this, make it non-static and move
8557 (eval_agent_expr): Rename to ...
8558 (eval_tracepoint_agent_expr): ... this.
8559 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8560 forward declarations.
8561 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8562 (agent_get_trace_state_variable_value): New function.
8563 (agent_set_trace_state_variable_value): New function.
8564 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8565 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8566 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8567 (condition_true_at_tracepoint): Likewise.
8568 (parse_agent_expr): Rename to ...
8569 (gdb_parse_agent_expr): ... this and move to ax.c.
8570 (unparse_agent_expr): Rename to ...
8571 (gdb_unparse_agent_expr): ... this and move to ax.c.
8572 (gdb_agent_op_name): Move to ax.c.
8573 (eval_agent_expr): Rename to ...
8574 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8576 (eval_tracepoint_agent_expr): New function.
8577 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8579 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8581 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8582 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8583 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8584 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8585 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8586 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8587 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8588 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8589 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8590 (compile_bytecodes): Remove forward declaration.
8591 (is_goto_target): Move to ax.c.
8592 (compile_bytecodes): Move to ax.c and call
8593 agent_get_trace_state_variable_value (...) and
8594 agent_set_trace_state_variable_value (...).
8596 * Makefile.in: Update ax.c and IPA dependencies.
8598 2012-02-24 Pedro Alves <palves@redhat.com>
8600 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8601 (cmd_bigqtbuffer_circular): ... this. Only handle
8602 'QTBuffer:circular:'.
8603 (handle_tracepoint_general_set): Adjust.
8605 2012-02-16 Yao Qi <yao@codesourcery.com>
8607 * inferiors.c: Move code to ...
8608 * dll.c: .... here. New.
8609 * server.h: Declare clear_dlls.
8610 * Makefile.in (SFILES): Add dll.c.
8614 2012-02-11 Yao Qi <yao@codesourcery.com>
8616 * server.c: (handle_monitor_command): Add a new parameter
8618 (handle_query): Update caller.
8620 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8622 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8623 * configure, config.in: Regenerate.
8624 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8627 2012-02-02 Pedro Alves <palves@redhat.com>
8629 Try SIGKILL first, then PTRACE_KILL.
8630 * linux-low.c (linux_kill_one_lwp): New.
8631 (linux_kill_one_lwp): Rename to ...
8632 (kill_one_lwp_callback): ... this. Use the new
8635 2012-02-02 Pedro Alves <palves@redhat.com>
8637 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8640 2012-01-27 Pedro Alves <palves@redhat.com>
8642 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8643 (elf_64_file_p): Make static.
8644 (linux_pid_exe_is_elf_64_file): New.
8645 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8646 Delete declarations.
8647 (linux_pid_exe_is_elf_64_file): Declare.
8648 * linux-x86-low.c (x86_arch_setup): Use
8649 linux_pid_exe_is_elf_64_file.
8651 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8653 * linux-low.c (linux_wait_for_event_1): Rename to ...
8654 (linux_wait_for_event): ... here and merge it with former
8655 linux_wait_for_event - new variable wait_ptid, use it.
8656 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8658 2012-01-23 Pedro Alves <palves@redhat.com>
8660 * server.c (main): Avoid yet another case of infinite loop while
8661 detaching/killing after a longjmp.
8663 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8666 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8668 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8670 * hostio.c (handle_readlink): New function.
8671 (handle_vFile): Call it to handle "vFile:readlink" packets.
8673 2012-01-20 Pedro Alves <palves@redhat.com>
8674 Ulrich Weigand <ulrich.weigand@linaro.org>
8676 * server.c (handle_v_requests): Only support vAttach and vRun to
8677 start multiple processes when in extended protocol mode.
8679 2012-01-17 Pedro Alves <palves@redhat.com>
8681 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8682 memalign plus mprotect to allocate the scratch buffer.
8684 2012-01-13 Pedro Alves <palves@redhat.com>
8686 * server.c (attach_inferior): Clear `cont_thread'.
8688 2012-01-13 Pedro Alves <palves@redhat.com>
8690 * server.c (main): Avoid infinite loop while detaching/killing
8693 2012-01-09 Doug Evans <dje@google.com>
8695 * server.c (start_inferior): Set last_ptid in --wrapper case.
8697 2012-01-06 Yao Qi <yao@codesourcery.com>
8699 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8701 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8703 2012-01-04 Yao Qi <yao@codesourcery.com>
8705 * tracepoint.c (cmd_qtdp): Print debug message
8706 for static tracepoint.
8708 2012-01-04 Yao Qi <yao@codesourcery.com>
8710 * tracepoint.c (trace_vdebug): Differentiate debug message
8711 between gdbserver and IPA.
8713 2012-01-03 Yao Qi <yao@codesourcery.com>
8715 * tracepoint.c (tracepoint_was_hit): Don't collect for
8718 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8720 * terminal.h: Reformat copyright header.
8722 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8724 * server.c (gdbserver_version): Update copyright year.
8725 * gdbreplay.c (gdbreplay_version): Likewise.
8727 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8729 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8732 2011-12-18 Hui Zhu <teawater@gmail.com>
8733 * linux-low.c (linux_create_inferior): Save return value to ret.
8735 2011-12-18 Hui Zhu <teawater@gmail.com>
8737 * linux-low.c (linux_create_inferior): Save return value to ret.
8739 2011-12-16 Doug Evans <dje@google.com>
8741 * linux-low.c (linux_create_inferior): If stdio connection,
8742 redirect stdin from /dev/null, stdout to stderr.
8743 * remote-utils.c (remote_is_stdio): New static global.
8744 (remote_connection_is_stdio): New function.
8745 (remote_prepare): Handle stdio connection.
8746 (remote_open): Ditto.
8747 (remote_close): Don't close stdin for stdio connections.
8748 (read_prim,write_prim): New functions. Replace all calls to
8749 read/write to these.
8750 * server.c (main): Watch for "-" argument. Move call to
8751 remote_prepare before start_inferior.
8752 * server.h (STDIO_CONNECTION_NAME): New macro.
8753 (remote_connection_is_stdio): Declare.
8755 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8756 in debugging output.
8758 2011-12-15 Yao Qi <yao@codesourcery.com>
8760 * tracepoint.c: Include sys/syscall.h.
8761 (gdb_ust_thread): Remove preprocessor conditional.
8763 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8765 * linux-low.c (linux_detach_one_lwp): Call
8766 the_low_target.prepare_to_resume before detaching.
8768 2011-12-14 Yao Qi <yao@codesourcery.com>
8770 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8773 2011-12-14 Yao Qi <yao@codesourcery.com>
8775 * i386-low.c (i386_low_stopped_data_address): Initialize local
8778 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8782 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8783 DR_CONTROL unless necessary. Extend comments.
8784 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8785 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8787 2011-12-13 Yao Qi <yao@codesourcery.com>
8789 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8791 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8793 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8795 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8796 Print new debug message for such case.
8798 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8800 Fix overlapping memcpy.
8801 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8802 the read_inferior_memory transfer.
8803 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8804 write_inferior_memory transfer.
8805 (set_fast_tracepoint_jump): New variable buf. Use it for the
8806 read_inferior_memory and write_inferior_memory transfers.
8807 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8808 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8809 Use it for the write_inferior_memory transfer.
8810 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8813 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8815 * linux-low.c (fetch_register, store_register): Make code
8816 consistent, fix formatting.
8818 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8820 * linux-low.c (usr_store_inferior_registers): Factor out code
8821 to handle individual registers into...
8822 (store_register): ... this new function.
8824 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8826 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8827 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8828 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8829 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8830 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8831 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8832 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8833 (srv_xmlfiles): Add new XML files.
8835 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8837 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8838 (init_registers_s390_linux32v1): Add prototype.
8839 (init_registers_s390_linux32v2): Likewise.
8840 (init_registers_s390_linux64v1): Likewise.
8841 (init_registers_s390_linux64v2): Likewise.
8842 (init_registers_s390x_linux64v1): Likewise.
8843 (init_registers_s390x_linux64v2): Likewise.
8844 (s390_num_regs): Increment to 52.
8845 (s390_regmap): Add orig_r2 register.
8846 (s390_num_regs_3264): Increment to 68.
8847 (s390_regmap_3264): Add orig_r2 register.
8848 (s390_collect_ptrace_register): Handle orig_r2 register.
8849 (s390_supply_ptrace_register): Likewise.
8850 (s390_fill_last_break): New function.
8851 (s390_store_last_break): Likewise.
8852 (s390_fill_system_call): New function.
8853 (s390_store_system_call): Likewise.
8854 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8856 (s390_check_regset): New function.
8857 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8858 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8859 Update target_regsets for available register sets.
8861 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8862 Jan Kratochvil <jan.kratochvil@redhat.com>
8864 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8865 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8867 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8868 * linux-low.h (struct process_info_private): New member r_debug.
8869 * server.c (handle_qxfer_libraries): Call
8870 the_target->qxfer_libraries_svr4.
8871 (handle_qxfer_libraries_svr4): New function.
8872 (qxfer_packets): New entry "libraries-svr4".
8873 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8874 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8875 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8876 PACKET_qXfer_libraries_svr4.
8878 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8880 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8881 PSW address/mask between 8-byte and 16-byte formats.
8882 (s390_supply_ptrace_register): Likewise.
8883 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8884 basic addressing mode bit.
8886 2011-11-24 Stan Shebs <stan@codesourcery.com>
8888 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8890 2011-11-17 Stan Shebs <stan@codesourcery.com>
8892 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8893 (tracing_start_time): New global.
8894 (tracing_stop_time): New global.
8895 (tracing_user_name): New global.
8896 (tracing_notes): New global.
8897 (tracing_stop_note): New global.
8898 (cmd_qtstart): Set traceframe_usage, start_time.
8899 (stop_tracing): Set stop_time.
8900 (cmd_qtstatus): Report additional status.
8901 (cmd_qtp): New function.
8902 (handle_tracepoint_query): Call it.
8903 (cmd_qtnotes): New function.
8904 (handle_tracepoint_general_set): Call it.
8905 (get_timestamp): Rename from tsv_get_timestamp.
8907 2011-11-14 Stan Shebs <stan@codesourcery.com>
8908 Kwok Cheung Yeung <kcy@codesourcery.com>
8910 * linux-x86-low.c (small_jump_insn): New.
8911 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8912 trampoline and error message, build a trampoline and issue a small
8913 jump instruction to it.
8914 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8915 trampoline and error message.
8916 (x86_get_min_fast_tracepoint_insn_len): New.
8917 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8918 * linux-low.h (struct linux_target_ops): Add arguments to
8919 install_fast_tracepoint_jump_pad operation, add new operation.
8920 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8922 (linux_get_min_fast_tracepoint_insn_len): New function.
8923 (linux_target_op): Add new operation.
8924 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8925 (gdb_trampoline_buffer_end): Ditto.
8926 (gdb_trampoline_buffer_error): Ditto.
8927 (struct ipa_sym_addresses): Add fields for new IPA variables.
8928 (symbol_list): Add entries for new IPA variables.
8929 (struct tracepoint): Add fields to hold the address range of the
8930 trampoline used by the tracepoint.
8931 (trampoline_buffer_head): New static variable.
8932 (trampoline_buffer_tail): Ditto.
8933 (claim_trampoline_space): New function.
8934 (have_fast_tracepoint_trampoline_buffer): New function.
8935 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8937 (install_fast_tracepoint): Ditto, also add error buffer argument.
8938 (cmd_qtminftpilen): New function.
8939 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8940 (fast_tracepoint_from_trampoline_address): New function.
8941 (fast_tracepoint_collecting): Handle trampoline as part of jump
8943 (set_trampoline_buffer_space): New function.
8944 (initialize_tracepoint): Initialize new IPA variables.
8945 * target.h (struct target_ops): Add arguments to
8946 install_fast_tracepoint_jump_pad operation, add new
8947 get_min_fast_tracepoint_insn_len operation.
8948 (target_get_min_fast_tracepoint_insn_len): New.
8949 (install_fast_tracepoint_jump_pad): Add arguments.
8950 * server.h (IPA_BUFSIZ): Define.
8951 * linux-i386-ipa.c: Include extra header files.
8952 (initialize_fast_tracepoint_trampoline_buffer): New function.
8953 (initialize_low_tracepoint): Call it.
8954 * server.h (set_trampoline_buffer_space): Declare.
8955 (claim_trampoline_space): Ditto.
8956 (have_fast_tracepoint_trampoline_buffer): Ditto.
8958 2011-11-14 Yao Qi <yao@codesourcery.com>
8960 * server.c (handle_query): Handle InstallInTrace for qSupported.
8961 * tracepoint.c (add_tracepoint): Sort list.
8962 (install_tracepoint, download_tracepoint): New.
8963 (cmd_qtdp): Call them to install and download tracepoints.
8964 (sort_tracepoints): Removed.
8965 (cmd_qtstart): Update.
8967 2011-11-14 Yao Qi <yao@codesourcery.com>
8969 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8970 * mem-break.h: Declare.
8971 * tracepoint.c (cmd_qtstart): Move some code to ...
8972 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8974 (download_tracepoints): Move some code to ...
8975 (download_tracepoint_1): ... here. New.
8977 2011-11-08 Yao Qi <yao@codesourcery.com>
8979 * remote-utils.c (relocate_instruction): A comment fix.
8981 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8983 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8984 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8985 dr_status_mirror and dr_control_mirror from debug_reg_state.
8986 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8987 (i386_initial_stuff): Remove use of deleted globals.
8988 (i386_get_thread_context, i386_set_thread_context,
8989 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8990 from debug_reg_state.
8992 2011-11-05 Yao Qi <yao@codesourcery.com>
8994 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8995 address as TPOINT's.
8997 2011-11-02 Stan Shebs <stan@codesourcery.com>
8999 * tracepoint.c (agent_mem_read_string): New function.
9000 (eval_agent_expr): Call it for tracenz.
9001 * server.c (handle_query): Report support for tracenz.
9003 2011-11-02 Yao Qi <yao@codesourcery.com>
9005 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9007 2011-11-02 Yao Qi <yao@codesourcery.com>
9009 * target.h: Fix a typo in comment.
9011 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9013 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9014 clobber the breakpoints' shadows with fast tracepoint jumps.
9015 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9016 * target.c (write_inferior_memory): Also pass MYADDR down to
9019 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9021 * configure.ac: Check support for personality routine.
9022 * configure: Regenerate.
9023 * config.in: Likewise.
9024 * linux-low.c: Include <sys/personality.h>.
9025 Define ADDR_NO_RANDOMIZE if necessary.
9026 (linux_create_inferior): Disable address space randomization when
9027 forking inferior, if requested.
9028 (linux_supports_disable_randomization): New function.
9029 (linux_target_ops): Install it.
9030 * server.h (disable_randomization): Declare.
9031 * server.c (disable_randomization): New global variable.
9032 (handle_general_set): Handle QDisableRandomization.
9033 (handle_query): Likewise for qSupported.
9034 (main): Support --disable-randomization and --no-disable-randomization
9035 command line arguments.
9036 * target.h (struct target_ops): Add supports_disable_randomization.
9037 (target_supports_disable_randomization): New macro.
9039 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9041 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9043 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9044 [!PT_GETDSBT] (target_loadmap): New definition.
9045 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9046 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9047 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9048 and PT_GETDSBT to LINUX_LOADMAP.
9049 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9050 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9052 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9054 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9055 (arm_linux_hwbp_cap): New static variable.
9056 (arm_linux_get_hwbp_cap): Replace by ...
9057 (arm_linux_init_hwbp_cap): ... this new function.
9058 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9059 (arm_linux_get_hw_watchpoint_count): Likewise.
9060 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9061 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9062 (arm_prepare_to_resume): Use perror_with_name instead of error.
9064 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9066 * linux-arm-low.c: Include <signal.h>.
9067 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9068 (struct arm_linux_hwbp_cap): New data type.
9069 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9070 (struct arm_linux_hw_breakpoint): New data type.
9071 (MAX_BPTS, MAX_WPTS): Define.
9072 (struct arch_process_info, struct arch_lwp_info): New data types.
9073 (arm_linux_get_hwbp_cap): New function.
9074 (arm_linux_get_hw_breakpoint_count): Likewise.
9075 (arm_linux_get_hw_watchpoint_count): Likewise.
9076 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9077 (arm_hwbp_control_initialize): Likewise.
9078 (arm_hwbp_control_is_enabled): Likewise.
9079 (arm_hwbp_control_is_initialized): Likewise.
9080 (arm_hwbp_control_disable): Likewise.
9081 (arm_linux_hw_breakpoint_equal): Likewise.
9082 (arm_linux_hw_point_initialize): Likewise.
9083 (struct update_registers_data): New data structure.
9084 (update_registers_callback: New function.
9085 (arm_insert_point): Likewise.
9086 (arm_remove_point): Likewise.
9087 (arm_stopped_by_watchpoint): Likewise.
9088 (arm_stopped_data_address): Likewise.
9089 (arm_new_process): Likewise.
9090 (arm_new_thread): Likewise.
9091 (arm_prepare_to_resume): Likewise.
9092 (the_low_target): Register arm_insert_point, arm_remove_point,
9093 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9094 arm_new_thread, and arm_prepare_to_resume.
9096 2011-09-15 Stan Shebs <stan@codesourcery.com>
9098 * server.h (struct emit_ops): Add compare-goto fields.
9099 * tracepoint.c (gdb_agent_op_sizes): New table.
9100 (emit_eq_goto): New function.
9101 (emit_ne_goto): New function.
9102 (emit_lt_goto): New function.
9103 (emit_le_goto): New function.
9104 (emit_gt_goto): New function.
9105 (emit_ge_goto): New function.
9106 (is_goto_target): New function.
9107 (compile_bytecodes): Recognize special cases of compare-goto
9108 combinations and call specialized emitters for them.
9109 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9110 (amd64_emit_ne_goto): New function.
9111 (amd64_emit_lt_goto): New function.
9112 (amd64_emit_le_goto): New function.
9113 (amd64_emit_gt_goto): New function.
9114 (amd64_emit_ge_goto): New function.
9115 (amd64_emit_ops): Add the new functions.
9116 (i386_emit_eq_goto): New function.
9117 (i386_emit_ne_goto): New function.
9118 (i386_emit_lt_goto): New function.
9119 (i386_emit_le_goto): New function.
9120 (i386_emit_gt_goto): New function.
9121 (i386_emit_ge_goto): New function.
9122 (i386_emit_ops): Add the new functions.
9124 2011-09-08 Stan Shebs <stan@codesourcery.com>
9126 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9127 (i386_emit_epilogue): Restore %ebx.
9129 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9131 * server.c (step_thread): Remove definition.
9132 (process_serial_event): Don't handle Hs.
9133 * server.h (step_thread): Remove declaration.
9134 * target.c (set_desired_inferior): Remove use of step_thread.
9136 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9138 * linux-low.c: Include linux-procfs.h.
9139 (linux_attach_lwp_1): Update comments.
9140 (linux_attach): Scan for existing threads when attaching to a
9141 process that is the tgid.
9142 * Makefile.in: Update dependencies.
9144 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9146 * configure.srv: Add linux-procfs.o dependencies.
9148 2011-08-14 Yao Qi <yao@codesourcery.com>
9150 * target.h (struct target_ops): Fix indent.
9151 * win32-low.c (win32_target_ops): Fix comment.
9153 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9154 Yao Qi <yao@codesourcery.com>
9156 * Makefile.in (clean): Remove tic6x-*.c files.
9157 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9158 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9159 (tic6x-c64xp-linux.c): Likewise.
9160 * configure.srv: Add support for tic6x-*-uclinux.
9161 * linux-tic6x-low.c: New.
9162 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9164 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9165 Yao Qi <yao@codesourcery.com>
9167 * target.h (struct target_ops): Add read_loadmap.
9168 * linux-low.c (struct target_loadseg): New type.
9169 (struct target_loadmap): New type.
9170 (linux_read_loadmap): New function.
9171 (linux_target_ops): Add linux_read_loadmap.
9172 * server.c (handle_query): Support qXfer:fdpic:read packet.
9173 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9176 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9178 * win32-low.c: Include <stdint.h>.
9180 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9182 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9183 to the inferior here.
9184 (i386_remove_aligned_watchpoint): Ditto.
9185 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9186 fit part of the watchpoint in the debug registers.
9187 (i386_update_inferior_debug_regs): New.
9188 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9189 registers, and only update the inferior on success.
9190 (i386_low_remove_watchpoint): Ditto.
9192 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9194 * linux-low.c (compare_ints, unique, list_threads, show_process,
9195 linux_core_of_thread): Delete.
9196 (linux_target_ops): Change linux_core_of_thread to
9197 linux_common_core_of_thread.
9198 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9199 * utils.c (malloc_failure): Change type of argument.
9200 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9201 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9202 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9203 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9204 (IPA_OBJS): Add common-utils-ipa.o.
9205 (ptid_h, linux_osdata_h): New macros.
9206 (server_h): Add common/common-utils.h, common/xml-utils.h,
9207 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9209 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9210 ptid.o, buffer.o): New rules.
9211 (linux-low.o): Add common/linux-osdata.h as a dependency.
9212 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9213 * configure.ac: Add AC_HEADER_DIRENT check.
9214 * config.in: Regenerate.
9215 * configure: Regenerate.
9216 * remote-utils.c (xml_escape_text): Delete.
9217 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9218 buffer_xml_printf): Move to common/buffer.c.
9219 * server.c (main): Remove call to initialize_inferiors.
9220 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9221 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9222 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9223 internal_error, gdb_assert, gdb_assert_fail): Delete.
9224 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9225 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9227 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9228 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9229 initialize_inferiors): Delete.
9231 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9233 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9236 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9238 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9240 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9242 2011-05-26 Yao Qi <yao@codesourcery.com>
9244 * Makefile.in (thread-db.o): Track dependence to
9245 common/gdb_thread_db.h.
9246 * thread-db.c: include gdb_thread_db.h from right place.
9248 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9250 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9251 __FILE__ and __LINE__ to internal_error.
9253 2011-05-13 Doug Evans <dje@google.com>
9255 * thread-db.c (try_thread_db_load_from_sdir): New function.
9256 (try_thread_db_load_from_dir): New function.
9257 (thread_db_load_search): Handle $sdir, ignore $pdir.
9258 Remove trying of system directories if search of
9259 libthread-db-search-path fails, that is now done via $sdir.
9261 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9263 * server.c (handle_query): Add EnableDisableTracepoints to the list
9264 of supported features.
9265 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9267 (cmd_qtenable_disable): New.
9268 (cmd_qtstart): Install tracepoints even if disabled.
9269 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9270 receiving a QTEnable or QTDisable packet.
9271 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9272 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9274 (gdb_probe): Skip data collection if static tracepoint is disabled.
9276 2011-05-10 Doug Evans <dje@google.com>
9278 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9280 2011-05-04 Doug Evans <dje@google.com>
9282 * linux-low.c (linux_join): Skip process lookup.
9283 * spu-low.c (spu_join): Ditto.
9284 * server.c (join_inferiors_callback): Delete.
9285 (process_serial_event): For 'D' packet (detach) call join_inferior
9288 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9290 * README: Don't mention xscale*-*-linux*.
9291 * configure.srv (xscale*-*-linux*): Don't handle target.
9293 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9295 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9297 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9298 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9299 (i386_emit_void_call_2): Likewise.
9301 2011-04-26 Yao Qi <yao@codesourcery.com>
9303 * linux-low.c: Move common macros to linux-ptrace.h.
9304 Include linux-ptrace.h.
9305 * Makefile.in (linux_ptrace_h): New.
9306 (linux-low.o): Depends on linux-ptrace.h.
9308 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9310 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9311 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9312 (remote_prepare): New function with most of the TCP code from ...
9313 (remote_open): ... here. Detect PORT here unconditionally. Move also
9314 setting transport_is_reliable.
9315 * server.c (run_once): New variable.
9316 (gdbserver_usage): Document it.
9317 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9318 the first run if RUN_ONCE.
9319 * server.h (run_once, remote_prepare): New declarations.
9321 2011-04-19 Tom Tromey <tromey@redhat.com>
9323 * win32-low.c (handle_load_dll): Remove duplicate "the".
9325 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9327 Remove support for old Cygwin 1.5 versions.
9328 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9329 function to avoid warning.
9330 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9333 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9335 * gdbserver/server.h (Macro _): Define it if not available.
9337 2011-03-14 Michael Snyder <msnyder@vmware.com>
9339 * hostio.c (handle_close): Remove unnecessary null test.
9341 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9343 * Makefile.in (maintainer-clean realclean distclean): Remove
9344 "make ... subdir_do" command.
9346 2011-03-10 Michael Snyder <msnyder@vmware.com>
9348 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9350 * server.c (handle_v_run): Free alloced buffer on early return.
9352 2011-03-09 Yao Qi <yao@codesourcery.com>
9355 2011-03-04 Yao Qi <yao@codesourcery.com>
9357 * Makefile.in: Remove GNU make feature --directory.
9359 2011-03-05 Yao Qi <yao@codesourcery.com>
9361 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9362 (subdir_do): New make target. Copied from gdb/Makefile.
9363 (maintainer-clean, realclean, distclean, clean): Call corresponding
9364 make targets in common/Makefile.
9366 2011-02-11 Yao Qi <yao@codesourcery.com>
9368 * configure.ac: Call AC_PROG_RANLIB.
9369 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9370 * configure: Regenerate.
9372 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9374 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9376 2011-03-06 Yao Qi <yao@codesourcery.com>
9378 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9380 2011-03-05 Yao Qi <yao@codesourcery.com>
9382 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9383 (subdir_do): New make target. Copied from gdb/Makefile.
9384 (maintainer-clean, realclean, distclean, clean): Call corresponding
9385 make targets in common/Makefile.
9387 2011-03-04 Yao Qi <yao@codesourcery.com>
9389 * Makefile.in: Remove GNU make feature --directory.
9391 2011-03-04 Michael Snyder <msnyder@vmware.com>
9393 * server.c (queue_stop_reply): Call xmalloc not malloc.
9395 2011-03-02 Michael Snyder <msnyder@vmware.com>
9397 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9399 2011-02-28 Michael Snyder <msnyder@vmware.com>
9401 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9402 (cmd_qtframe): Ditto.
9403 (cmd_qtbuffer): Ditto.
9404 (cmd_bigqtbuffer): Ditto.
9406 * utils.c (decimal2str): Initialize 'width' to nine, then
9409 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9411 * hostio.c (require_data): Free *data, not data.
9413 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9415 * hostio.c (require_data): Use free, not xfree.
9417 2011-02-27 Michael Snyder <msnyder@vmware.com>
9419 * server.c (handle_query): Discard unused value.
9421 * hostio.c (require_data): Free malloc memory before returning
9424 2011-02-26 Michael Snyder <msnyder@vmware.com>
9426 * linux-low.c (list_threads): Call closedir for dirent.
9428 2011-02-27 Michael Snyder <msnyder@vmware.com>
9430 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9431 a case statement falls through.
9433 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9435 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9438 2011-02-26 Michael Snyder <msnyder@vmware.com>
9440 * utils.c (decimal2str): Eliminate dead code and dead param.
9441 (pulongest): Drop dead param from call to decimal2str.
9444 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9446 Revert the following patch (not approved yet):
9447 2011-02-21 Hui Zhu <teawater@gmail.com>
9448 * tracepoint.c (tp_printf): New function.
9449 (eval_agent_expr): Handle gdb_agent_op_printf.
9451 2011-02-21 Hui Zhu <teawater@gmail.com>
9453 * tracepoint.c (tp_printf): New function.
9454 (eval_agent_expr): Handle gdb_agent_op_printf.
9456 2011-02-18 Tom Tromey <tromey@redhat.com>
9458 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9459 (tracepoint.o): Likewise.
9460 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9461 (gdb_agent_op_names): Likewise.
9463 2011-02-18 Tom Tromey <tromey@redhat.com>
9465 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9466 gdb_agent_op_rot>: New constants.
9467 (gdb_agent_op_names): Add pick and roll.
9468 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9471 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9473 * aclocal.m4: Regenerated with aclocal-1.11.1.
9475 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9477 * server.c (handle_qxfer_traceframe_info): New.
9478 (qxfer_packets): Register "traceframe-info".
9479 (handle_query): Report support for qXfer:traceframe-info:read+.
9480 * tracepoint.c (match_blocktype): New.
9481 (traceframe_find_block_type): Rename to ...
9482 (traceframe_walk_blocks): ... this. Add callback filter argument,
9484 (traceframe_find_block_type): New, reimplemented on top of
9485 traceframe_walk_blocks.
9486 (build_traceframe_info_xml): New.
9487 (traceframe_read_info): New.
9488 * server.h (traceframe_read_info): Declare.
9490 2011-02-11 Yao Qi <yao@codesourcery.com>
9492 * configure.ac: Call AC_PROG_RANLIB.
9493 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9494 * configure: Regenerate.
9496 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9498 * server.c (gdb_read_memory): Change return semantics to allow
9500 (handle_search_memory_1): Adjust.
9501 (process_serial_event) <'m' packet>: Handle partial transfers.
9502 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9504 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9506 * regcache.c (init_register_cache): Initialize
9507 regcache->register_status.
9508 (free_register_cache): Release regcache->register_status.
9509 (regcache_cpy): Copy register_status.
9510 (registers_to_string): Print 'x's for unavailable registers.
9511 (supply_register): Mark the register's status valid or
9512 unavailable, depending on whether a buffer was passed in or not.
9513 (supply_register_zeroed): New.
9514 (supply_regblock): Mark the registers' status valid or
9515 unavailable, depending on whether a buffer was passed in or not.
9516 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9517 (struct regcache): New `register_status' field.
9518 (supply_register_zeroed): Declare.
9519 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9520 supply_register_zeroed, rather than passing a NULL buffer to
9522 * tracepoint.c (fetch_traceframe_registers): Update comment.
9524 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9526 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9529 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9531 * server.h (decode_xfer_write): Change prototype.
9532 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9533 and don't extract the annex here.
9534 * server.c (decode_xfer_read): Remove `annex' parameter,
9535 and don't extract the annex here.
9537 (struct qxfer): New.
9538 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9539 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9540 (handle_qxfer_statictrace): New functions, abstracted out from
9541 handle_query, and made to use the struct qxfer interface.
9542 (handle_threads_qxfer_proper): Rename to ...
9543 (handle_qxfer_threads_proper): ... this.
9544 (handle_threads_qxfer): Rename to ...
9545 (handle_qxfer_threads): ... this. Adjust.
9546 (qxfer_packets): New array.
9547 (handle_qxfer): New function.
9548 (handle_query): Use handle_qxfer.
9550 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9552 * gdbreplay.c: Shorten lines of >= 80 columns.
9553 * linux-low.c: Ditto.
9554 * linux-ppc-low.c: Ditto.
9555 * linux-s390-low.c: Ditto.
9556 * linux-sparc-low.c: Ditto.
9557 * linux-x86-low.c: Ditto.
9558 * linux-xtensa-low.c: Ditto.
9559 * mem-break.c: Ditto.
9561 * regcache.h: Ditto.
9562 * remote-utils.c: Ditto.
9565 * thread-db.c: Ditto.
9566 * tracepoint.c: Ditto.
9568 * win32-low.h: Ditto.
9570 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9572 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9575 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9577 * server.c (gdbserver_version): Update copyright year in version
9579 * gdbreplay.c (gdbreplay_version): Ditto.
9581 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9583 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9584 * linux-bfin-low.c: New file.
9585 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9586 PT_DATA_ADDR for BFIN targets.
9587 * Makefile.in (SFILES): Add linux-bfin-low.c.
9588 (clean): Remove reg-bfin.c.
9589 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9590 * README: Mention supported Blackfin targets.
9592 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9594 * .gitignore: New file.
9596 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9598 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9600 2010-10-22 Jie Zhang <jie@codesourcery.com>
9602 * Makefile.in: Add FLAGS_TO_PASS variable.
9603 (install): Remove dependency of install-only and recursively
9604 invoke make for install-only.
9606 2010-10-04 Doug Evans <dje@google.com>
9608 * Makefile.in (uninstall): Use $(DESTDIR).
9610 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9614 * linux-x86-low.c (compat_siginfo_from_siginfo)
9615 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9616 si_code is < 0. Check for si_code == SI_TIMER before checking for
9619 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9621 * lynx-i386-low.c: New file.
9622 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9624 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9626 * lynx-low.c (ptrace_request_to_str): Remove handling for
9627 request values that have been removed in LynxOS 5.x.
9629 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9631 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9634 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9636 * configure.ac: Add --enable-inprocess-agent option.
9637 * configure: Rebuilt.
9639 2010-09-06 Yao Qi <yao@codesourcery.com>
9641 * linux-low.c (linux_kill): Remove unused variable.
9642 (linux_stabilize_threads): Likewise.
9643 * server.c (start_inferior): Likewise.
9644 (queue_stop_reply_callback): Likewise.
9645 * tracepoint.c (do_action_at_tracepoint): Likewise.
9647 2010-09-06 Yao Qi <yao@codesourcery.com>
9649 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9652 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9654 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9656 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9658 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9663 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9664 gdbserver/lynx-ppc-low.c: New files.
9665 * Makefile.in (lynx_low_h): New variable.
9666 (lynx-low.o, lynx-ppc-low.o): New rules.
9667 * configure.ac: On LynxOS, link with -lnetinet.
9668 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9669 * configure: regenerate.
9671 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9673 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9674 * configure.ac: Add check for vasprintf and vsnprintf.
9675 * configure, config.in: Regenerate.
9676 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9678 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9680 * gdbreplay.c: Move include of alloca.h up, next to include of
9682 * server.h: Add include of malloc.h.
9683 * mem-break.c: Remove include of malloc.h.
9684 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9686 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9688 * Makefile.in (memmem.o): Build with -Wno-error.
9690 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9692 * utils.c (xsnprintf): Make non-static.
9693 * server.h: Add xsnprintf declaration.
9694 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9695 replace calls to snprintf by calls to xsnprintf throughout.
9697 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9699 * configure.ac: Add configure check for alloca.
9700 * configure, config.in: Regenerate.
9701 * server.h: Include alloca.h if it exists.
9702 * gdbreplay.c: Include alloca.h if it exists.
9704 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9706 * linux-low.c (__SIGRTMIN): Define if not already defined.
9707 (linux_create_inferior): Check for __ANDROID__ rather than
9709 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9710 are already deferred.
9711 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9712 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9713 stopped and already has a pending signal to report.
9714 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9715 a pending signal to report or is moving out of a jump pad.
9716 (linux_init_signals): Check for __ANDROID__ rather than
9719 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9721 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9722 debug_threads check. Avoid a linear search when not doing debug
9725 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9727 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9728 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9729 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9730 (process_event): Change local fd's type to gdb_fildes_t.
9731 (create_file_handler): Adjust prototype.
9732 (delete_file_handler): Adjust prototype.
9733 (handle_file_event): Adjust prototype. Use pfildes.
9734 (create_file_event): Adjsut prototype.
9735 * remote-utils.c (remote_desc, listen_desc): Change type to
9737 * server.h: New gdb_fildes_t typedef.
9738 [USE_WIN32API]: Include winsock2.h.
9739 (delete_file_handler, add_file_handler): Adjust prototypes.
9741 * utils.c (pfildes): New.
9743 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9745 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9746 * configure: Regenerate.
9748 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9750 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9751 (linux_done_accessing_memory): ... this.
9752 (linux_target_ops): Adjust.
9753 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9754 * nto-low.c (nto_target_ops): Adjust comment.
9755 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9756 * spu-low.c (spu_target_ops): Adjust comment.
9757 * target.h (target_ops): Rename unprepare_to_access_memory field
9758 to done_accessing_memory.
9759 (unprepare_to_access_memory): Rename to ...
9760 (done_accessing_memory): ... this.
9762 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9764 * linux-low.c (linux_prepare_to_access_memory): New.
9765 (linux_unprepare_to_access_memory): New.
9766 (linux_target_ops): Install them.
9767 * server.c (read_memory): Rename to ...
9768 (gdb_read_memory): ... this. Use
9769 prepare_to_access_memory/prepare_to_access_memory.
9770 (write_memory): Rename to ...
9771 (gdb_write_memory): ... this. Use
9772 prepare_to_access_memory/prepare_to_access_memory.
9773 (handle_search_memory_1): Adjust.
9774 (process_serial_event): Adjust.
9775 * target.h (struct target_ops): New fields
9776 prepare_to_access_memory and unprepare_to_access_memory.
9777 (prepare_to_access_memory, unprepare_to_access_memory): New.
9778 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9779 prepare_to_access_memory/prepare_to_access_memory.
9780 * nto-low.c (nto_target_ops): Adjust.
9781 * spu-low.c (spu_target_ops): Adjust.
9782 * win32-low.c (win32_target_ops): Adjust.
9784 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9786 * Makefile.in (WARN_CFLAGS): Get it from configure.
9787 (WERROR_CFLAGS): New.
9788 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9789 * configure.ac: Introduce --enable-werror, which adds -Werror to
9790 the compiler command line. Enabled by default. Disable with
9791 --disable-werror. Add -Wdeclaration-after-statement
9792 Wpointer-arith and -Wformat-nonliteral to warning flags.
9793 * configure: Regenerate.
9795 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9797 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9799 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9801 * gdbreplay.c (remote_error): New.
9803 (expect): Use gdbchar. Check for error reading from GDB.
9804 Clarify sync error output.
9805 (play): Check for errors writing to GDB.
9806 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9807 * remote-utils.c (getpkt): Check for errors writing to the remote
9810 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9812 * linux-low.c (linux_wait_1): Move non-debugging code out of
9813 `debug_threads' control.
9815 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9817 * linux-low.c (linux_wait_1): Don't set last_status here.
9818 * server.c (push_event, queue_stop_reply_callback): Assert we're
9819 not pushing a TARGET_WAITKIND_IGNORE event.
9820 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9821 (myresume, handle_target_event): Set the thread's last_resume_kind
9822 and last_status from the target returned status.
9824 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9828 * linux-x86-low.c (update_debug_registers_callback): New.
9829 (i386_dr_low_set_addr): Use it.
9830 (i386_dr_low_get_addr): New.
9831 (i386_dr_low_set_control): Use update_debug_registers_callback.
9832 (i386_dr_low_get_control): New.
9833 (i386_dr_low_get_status): Adjust.
9834 * linux-low.c (linux_stop_lwp): New.
9835 * linux-low.h (linux_stop_lwp): Declare.
9837 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9838 argument instead of a i386_debug_reg_state.
9839 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9840 a i386_debug_reg_state.
9841 (i386_insert_aligned_watchpoint): Adjust.
9842 (i386_remove_aligned_watchpoint): Adjust.
9843 (i386_low_stopped_data_address): Read the debug registers from the
9844 inferior instead of from the mirrors.
9845 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9846 (i386_dr_low_get_addr): Declare.
9847 (i386_dr_low_get_control): Declare.
9848 (i386_dr_low_get_status): Change prototype.
9850 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9851 (i386_dr_low_get_addr): New.
9852 (i386_dr_low_get_control): New.
9853 (i386_dr_low_get_status): Adjust prototype. Return
9855 (i386_initial_stuff): Clear dr_status_mirror and
9857 (i386_get_thread_context): Adjust.
9858 (i386_set_thread_context): Adjust.
9859 (i386_thread_added): Adjust.
9861 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9863 * linux-low.h (linux_thread_area): Delete declaration.
9865 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9867 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9868 after its termination.
9870 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9872 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9873 (gdb_wants_all_stopped): Delete.
9874 (linux_wait_1): Don't call them.
9875 * server.c (handle_v_cont): Tag all threads as want-stopped.
9876 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9877 stopped as "client-wants-stopped".
9879 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9881 * Makefile.in (signals_h): New.
9882 (server_h): Depend on it.
9883 (server.o): Don't depend on $(signals_def).
9884 (signals.o): Depend on $(signals_def).
9886 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9888 * Makefile.in (signals_def): New.
9889 (server_h): Append include/gdb/signals.h and signals_def.
9890 (server.o): Append signals_def.
9892 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9894 * server.c (handle_target_event): Use target_signal_to_host for
9895 resume_info.sig initialization.
9896 * target.h (struct thread_resume) <sig>: New comment.
9898 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9900 * server.c (handle_query): strcpy() the returned string from paddress()
9901 instead of sprintf().
9902 * utils.c (paddress): Return phex_nz().
9904 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9906 * server.c (handle_v_cont): Call mourn_inferior if process
9908 (myresume): Likewise.
9910 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9912 Static tracepoints, and integration with UST.
9914 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9915 * mem-break.c (uninsert_all_breakpoints)
9916 (reinsert_all_breakpoints): New.
9917 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9918 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9919 (gdb_agent_ust_loaded, helper_thread_id)
9920 (gdb_agent_helper_thread_id): New macros.
9921 (struct ipa_sym_addresses): Add addr_ust_loaded,
9922 addr_helper_thread_id, addr_cmd_buf.
9923 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9924 (in_process_agent_loaded_ust): New.
9925 (write_e_ust_not_loaded): New.
9926 (maybe_write_ipa_ust_not_loaded): New.
9927 (struct collect_static_trace_data_action): New.
9928 (enum tracepoint_type) <static_tracepoint>: New.
9929 (struct tracepoint) <handle>: Mention static tracepoints.
9930 (struct static_tracepoint_ctx): New.
9931 (CMD_BUF_SIZE): New.
9932 (add_tracepoint_action): Handle static tracepoint actions.
9933 (unprobe_marker_at): New.
9934 (clear_installed_tracepoints): Handle static tracepoints.
9935 (cmd_qtdp): Handle static tracepoints.
9936 (probe_marker_at): New.
9937 (cmd_qtstart): Handle static tracepoints.
9938 (response_tracepoint): Handle static tracepoints.
9939 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9940 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9941 (get_context_regcache): Handle static tracepoints.
9942 (do_action_at_tracepoint): Handle static tracepoint actions.
9943 (traceframe_find_block_type): Handle static trace data blocks.
9944 (traceframe_read_sdata): New.
9945 (download_tracepoints): Download static tracepoint actions.
9946 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9947 (GDB_PROBE_NAME): New.
9952 (ust_marker_to_static_tracepoint): New.
9954 (collect_ust_data_at_tracepoint): New.
9955 (gdb_ust_probe): New.
9956 (UNIX_PATH_MAX, SOCK_DIR): New.
9957 (gdb_ust_connect_sync_socket): New.
9958 (resume_thread, stop_thread): New.
9959 (run_inferior_command): New.
9960 (init_named_socket): New.
9961 (gdb_ust_socket_init): New.
9962 (cstr_to_hexstr): New.
9964 (first_marker, next_marker): New.
9965 (response_ust_marker): New.
9966 (cmd_qtfstm, cmd_qtsstm): New.
9967 (unprobe_marker_at, probe_marker_at): New.
9968 (cmd_qtstmat, gdb_ust_thread): New.
9969 (gdb_ust_init): New.
9970 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9971 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9973 (x86_64_st_collect_regmap): New.
9974 (X86_64_NUM_ST_COLLECT_GREGS): New.
9975 (AMD64_RIP_REGNUM): New.
9976 (supply_static_tracepoint_registers): New.
9977 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9979 (i386_st_collect_regmap): New.
9980 (i386_NUM_ST_COLLECT_GREGS): New.
9981 (supply_static_tracepoint_registers): New.
9982 * server.c (handle_query): Handle qXfer:statictrace:read.
9983 <qSupported>: Report support for StaticTracepoints, and
9984 qXfer:statictrace:read features.
9985 * server.h (traceframe_read_sdata)
9986 (supply_static_tracepoint_registers): Declare.
9987 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9988 (unpack_varlen_hex): Include in IPA build.
9989 * Makefile.in (ustlibs, ustinc): New.
9990 (IPA_OBJS): Add remote-utils-ipa.o.
9991 ($(IPA_LIB)): Link -ldl and -lpthread.
9993 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9994 * config.in, configure: Regenerate.
9996 2010-06-20 Ian Lance Taylor <iant@google.com>
9997 Pedro Alves <pedro@codesourcery.com>
9999 * linux-x86-low.c (always_true): Delete.
10000 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10001 trying to fool the compiler with always_true.
10003 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10005 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10006 conditions in gdbserver.
10008 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10010 * spu-low.c (spu_read_memory): Wrap around local store limit.
10011 (spu_write_memory): Likewise.
10013 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10015 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10016 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10018 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10020 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10021 uses with LONGEST uses.
10023 2010-06-14 Stan Shebs <stan@codesourcery.com>
10024 Pedro Alves <pedro@codesourcery.com>
10028 * linux-x86-low.c: Include limits.h.
10030 (always_true): New.
10033 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10034 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10035 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10036 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10037 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10038 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10039 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10040 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10041 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10042 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10043 (amd64_emit_void_call_2): New.
10044 (amd64_emit_ops): New.
10045 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10046 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10047 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10048 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10049 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10050 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10051 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10052 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10053 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10054 (i386_emit_stack_adjust, i386_emit_int_call_1)
10055 (i386_emit_void_call_2): New.
10056 (i386_emit_ops): New.
10057 (x86_emit_ops): New.
10058 (the_low_target): Install x86_emit_ops.
10059 * server.h (struct emit_ops): New.
10060 (get_raw_reg_func_addr): Declare.
10061 (current_insn_ptr, emit_error): Declare.
10062 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10063 (set_trace_state_variable_value): New defines.
10064 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10065 addr_get_trace_state_variable_value and
10066 addr_set_trace_state_variable_value.
10067 (symbol_list): New fields for get_raw_reg,
10068 get_trace_state_variable_value and set_trace_state_variable_value.
10069 (condfn): New typedef.
10070 (struct tracepoint): New field `compiled_cond'.
10071 (do_action_at_tracepoint): Clear compiled_cond.
10072 (get_trace_state_variable_value, set_trace_state_variable_value):
10074 (condition_true_at_tracepoint): If there's a compiled condition,
10076 (current_insn_ptr, emit_error): New globals.
10077 (struct bytecode_address): New.
10078 (get_raw_reg_func_addr): New.
10079 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10080 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10081 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10082 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10083 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10084 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10085 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10086 (compile_tracepoint_condition, compile_bytecodes): New.
10087 * target.h (emit_ops): Forward declare.
10088 (struct target_ops): New field emit_ops.
10089 (target_emit_ops): New.
10090 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10092 * linux-low.c (linux_emit_ops): New.
10093 (linux_target_ops): Install it.
10094 * linux-low.h (struct linux_target_ops): New field emit_ops.
10096 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10098 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10099 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10101 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10102 Stan Shebs <stan@codesourcery.com>
10104 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10105 (all): Depend on $(extra_libraries).
10106 (install-only): Install the IPA.
10107 (IPA_OBJS, IPA_LIB): New.
10108 (clean): Remove the IPA lib.
10109 (IPAGENT_CFLAGS): New.
10110 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10111 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10112 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10113 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10114 * configure.ac: Check for atomic builtins support in the compiler.
10115 (IPA_DEPFILES, extra_libraries): Define.
10116 * configure.srv (ipa_obj): Add description.
10117 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10118 (i[34567]86-*-linux*): Set ipa_obj.
10119 (x86_64-*-linux*): Set ipa_obj.
10120 * linux-low.c (stabilizing_threads): New.
10121 (supports_fast_tracepoints): New.
10122 (linux_detach): Stabilize threads before detaching.
10123 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10124 the lwp is either not stabilizing, or is moving out of a jump pad.
10125 (linux_fast_tracepoint_collecting): New.
10126 (maybe_move_out_of_jump_pad): New.
10127 (enqueue_one_deferred_signal): New.
10128 (dequeue_one_deferred_signal): New.
10129 (linux_wait_for_event_1): If moving out of a jump pad, defer
10130 pending signals to later.
10131 (linux_stabilize_threads): New.
10132 (linux_wait_1): Check if threads need moving out of jump pads, and
10134 (stuck_in_jump_pad_callback): New.
10135 (move_out_of_jump_pad_callback): New.
10136 (lwp_running): New.
10137 (linux_resume_one_lwp): Handle moving out of jump pads.
10138 (linux_set_resume_request): Dequeue deferred signals.
10139 (need_step_over_p): Also step over fast tracepoint jumps.
10140 (start_step_over): Also uninsert fast tracepoint jumps.
10141 (finish_step_over): Also reinsert fast tracepoint jumps.
10142 (linux_install_fast_tracepoint_jump): New.
10143 (linux_target_ops): Install linux_stabilize_threads and
10144 linux_install_fast_tracepoint_jump_pad.
10145 * linux-low.h (linux_target_ops) <get_thread_area,
10146 install_fast_tracepoint_jump_pad>: New fields.
10147 (struct lwp_info) <collecting_fast_tracepoint,
10148 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10149 (linux_get_thread_area): Declare.
10150 * linux-x86-low.c (jump_insn): New.
10151 (x86_get_thread_area): New.
10152 (append_insns): New.
10153 (push_opcode): New.
10154 (amd64_install_fast_tracepoint_jump_pad): New.
10155 (i386_install_fast_tracepoint_jump_pad): New.
10156 (x86_install_fast_tracepoint_jump_pad): New.
10157 (the_low_target): Install x86_get_thread_area and
10158 x86_install_fast_tracepoint_jump_pad.
10159 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10160 (struct fast_tracepoint_jump): New.
10161 (fast_tracepoint_jump_insn): New.
10162 (fast_tracepoint_jump_shadow): New.
10163 (find_fast_tracepoint_jump_at): New.
10164 (fast_tracepoint_jump_here): New.
10165 (delete_fast_tracepoint_jump): New.
10166 (set_fast_tracepoint_jump): New.
10167 (uninsert_fast_tracepoint_jumps_at): New.
10168 (reinsert_fast_tracepoint_jumps_at): New.
10169 (set_breakpoint_at): Use write_inferior_memory.
10170 (uninsert_raw_breakpoint): Use write_inferior_memory.
10171 (check_mem_read): Mask out fast tracepoint jumps.
10172 (check_mem_write): Mask out fast tracepoint jumps.
10173 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10174 (set_fast_tracepoint_jump): Declare.
10175 (delete_fast_tracepoint_jump)
10176 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10177 (reinsert_fast_tracepoint_jumps_at): Declare.
10178 * regcache.c: Don't compile many functions when building the
10179 in-process agent library.
10180 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10181 the register buffer in the heap.
10182 (free_register_cache): If the register buffer isn't owned by the
10183 regcache, don't free it.
10184 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10185 pre-existing register caches.
10186 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10188 (convert_ascii_to_int): : Constify `from' parameter type.
10189 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10190 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10191 the needed buffer in-place.
10192 (relocate_instruction): New.
10193 * server.c (handle_query) <qSymbols>: If the target supports
10194 tracepoints, give it a chance of looking up symbols. Report
10195 support for fast tracepoints.
10196 (handle_status): Stabilize threads.
10197 (process_serial_event): Adjust.
10198 * server.h (struct fast_tracepoint_jump): Forward declare.
10199 (struct process_info) <fast_tracepoint_jumps>: New field.
10200 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10201 (decode_X_packet, decode_M_packet): Adjust.
10202 (relocate_instruction): Declare.
10203 (in_process_agent_loaded): Declare.
10204 (tracepoint_look_up_symbols): Declare.
10205 (struct fast_tpoint_collect_status): Declare.
10206 (fast_tracepoint_collecting): Declare.
10207 (force_unlock_trace_buffer): Declare.
10208 (handle_tracepoint_bkpts): Declare.
10209 (initialize_low_tracepoint)
10210 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10211 * target.h (struct target_ops) <stabilize_threads,
10212 install_fast_tracepoint_jump_pad>: New fields.
10213 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10214 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10215 [HAVE_STDINT_H]: Include stdint.h.
10216 (trace_debug_1): Rename to ...
10217 (trace_vdebug): ... this.
10218 (trace_debug): Rename to ...
10219 (trace_debug_1): ... this. Add `level' parameter.
10220 (trace_debug): New.
10221 (ATTR_USED, ATTR_NOINLINE): New.
10222 (IP_AGENT_EXPORT): New.
10223 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10224 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10225 (about_to_request_buffer_space, trace_buffer_is_full)
10226 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10227 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10228 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10229 (traceframe_write_count, traceframes_created)
10230 (trace_state_variables)
10231 New renaming defines.
10232 (struct ipa_sym_addresses): New.
10233 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10234 (symbol_list): New.
10235 (ipa_sym_addrs): New.
10236 (all_tracepoint_symbols_looked_up): New.
10237 (in_process_agent_loaded): New.
10238 (write_e_ipa_not_loaded): New.
10239 (maybe_write_ipa_not_loaded): New.
10240 (tracepoint_look_up_symbols): New.
10241 (debug_threads) [IN_PROCESS_AGENT]: New.
10242 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10243 (UNKNOWN_SIDE_EFFECTS): New.
10244 (stop_tracing): New.
10245 (flush_trace_buffer): New.
10246 (stop_tracing_bkpt): New.
10247 (flush_trace_buffer_bkpt): New.
10248 (read_inferior_integer): New.
10249 (read_inferior_uinteger): New.
10250 (read_inferior_data_pointer): New.
10251 (write_inferior_data_pointer): New.
10252 (write_inferior_integer): New.
10253 (write_inferior_uinteger): New.
10254 (struct collect_static_trace_data_action): Delete.
10255 (enum tracepoint_type): New.
10256 (struct tracepoint) <type>: New field `type'.
10257 <actions_str, step_actions, step_actions_str>: Only include in
10259 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10260 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10261 (tracepoints): Use IP_AGENT_EXPORT.
10262 (last_tracepoint): Don't include in the IPA.
10263 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10264 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10265 (alloced_trace_state_variables): New.
10266 (trace_state_variables): Use IP_AGENT_EXPORT.
10267 (traceframe_t): Delete unused variable.
10268 (circular_trace_buffer): Don't include in the IPA.
10269 (trace_buffer_start): Delete.
10270 (struct trace_buffer_control): New.
10271 (trace_buffer_free): Delete.
10272 (struct ipa_trace_buffer_control): New.
10273 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10274 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10276 (trace_buffer_ctrl): New.
10277 (TRACE_BUFFER_CTRL_CURR): New.
10278 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10279 Reimplement as macros.
10280 (trace_buffer_wrap): Delete.
10281 (traceframe_write_count, traceframe_read_count)
10282 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10283 (struct tracepoint_hit_ctx) <type>: New field.
10284 (struct fast_tracepoint_ctx): New.
10285 (memory_barrier): New.
10287 (record_tracepoint_error): Update atomically in the IPA.
10288 (clear_inferior_trace_buffer): New.
10289 (about_to_request_buffer_space): New.
10290 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10291 updating the same buffer.
10292 (add_tracepoint): Default the tracepoint's type to trap
10293 tracepoint, and orig_size to -1.
10294 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10295 internal variables.
10296 (create_trace_state_variable): New parameter `gdb'. Handle it.
10297 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10298 (cmd_qtdp): Handle fast tracepoints.
10299 (cmd_qtdv): Adjust.
10300 (max_jump_pad_size): New.
10301 (gdb_jump_pad_head): New.
10302 (get_jump_space_head): New.
10303 (claim_jump_space): New.
10304 (sort_tracepoints): New.
10305 (MAX_JUMP_SIZE): New.
10306 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10308 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10309 support. Upload fast traceframes, and delete internal IPA
10311 (stop_tracing_handler): New.
10312 (flush_trace_buffer_handler): New.
10313 (cmd_qtstop): Upload fast tracepoints.
10314 (response_tracepoint): Handle fast tracepoints.
10315 (tracepoint_finished_step): Upload fast traceframes. Set the
10316 tracepoint hit context's tracepoint type.
10317 (handle_tracepoint_bkpts): New.
10318 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10319 type. Add comment about fast tracepoints.
10320 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10321 non-existing action_str field.
10322 (get_context_regcache): Handle fast tracepoints.
10323 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10325 (fast_tracepoint_from_jump_pad_address): New.
10326 (fast_tracepoint_from_ipa_tpoint_address): New.
10327 (collecting_t): New.
10328 (force_unlock_trace_buffer): New.
10329 (fast_tracepoint_collecting): New.
10331 (gdb_collect): New.
10332 (write_inferior_data_ptr): New.
10333 (target_tp_heap): New.
10334 (target_malloc): New.
10335 (download_agent_expr): New.
10337 (download_tracepoints): New.
10338 (download_trace_state_variables): New.
10339 (upload_fast_traceframes): New.
10340 (IPA_FIRST_TRACEFRAME): New.
10341 (IPA_NEXT_TRACEFRAME_1): New.
10342 (IPA_NEXT_TRACEFRAME): New.
10343 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10344 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10345 (gdb_jump_pad_buffer_end): New.
10346 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10347 (initialize_tracepoint): Adjust.
10348 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10349 buffer. Initialize the low module.
10350 * utils.c (PREFIX, TOOLNAME): New.
10351 (malloc_failure): Use PREFIX.
10352 (error): In the IPA, an error causes an exit.
10353 (fatal, warning): Use PREFIX.
10354 (internal_error): Use TOOLNAME.
10355 (NUMCELLS): Increase to 10.
10356 * configure, config.in: Regenerate.
10358 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10360 * server.c (handle_query) <qSupported>: Do two passes over the
10361 qSupported string to avoid nesting strtok.
10363 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10365 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10367 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10368 -Wl,--dynamic-list.
10369 * configure: Regenerate.
10370 * proc-service.list: New.
10372 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10374 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10377 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10379 * gdbreplay.c (remote_open): Check error return from socket() call by
10380 its equality to -1 not by it being negative.
10381 * remote-utils.c (remote_open): Likewise.
10383 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10385 * config.h: Regenerate.
10387 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10389 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10390 doesn't provide PTRACE_GET_THREAD_AREA.
10392 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10394 * linux-m68k-low.c: Include <asm/ptrace.h>
10395 (ps_get_thread_area): Implement.
10397 2010-05-03 Doug Evans <dje@google.com>
10399 * event-loop.c (struct callback_event): New struct.
10400 (callback_list): New global.
10401 (append_callback_event, delete_callback_event): New functions.
10402 (process_callback): New function.
10403 (start_event_loop): Call it.
10404 * remote-utils.c (NOT_SCHEDULED): Define.
10405 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10406 moved out of readchar.
10407 (readchar): Rewrite. Call reschedule before returning.
10408 (reset_readchar): New function.
10409 (remote_close): Call it.
10410 (process_remaining, reschedule): New functions.
10411 * server.h (callback_handler_func): New typedef.
10412 (append_callback_event, delete_callback_event): Declare.
10414 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10416 * proc-service.c (ps_pglobal_lookup): Use
10417 thread_db_look_up_one_symbol.
10418 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10419 parameter. Use it instead of all_symbols_looked_up.
10420 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10422 (all_symbols_looked_up): Don't declare.
10423 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10424 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10426 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10427 Set all_symbols_looked_up here.
10428 (thread_db_look_up_one_symbol): New.
10429 (thread_db_get_tls_address): Adjust.
10430 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10431 thread_db object on the heap, and tentatively set it in the
10433 (thread_db_init): Don't set all_symbols_looked_up here.
10434 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10436 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10438 * linux-low.c (linux_kill, linux_detach): Adjust.
10439 (status_pending_p_callback): Remove redundant statement. Check
10440 for !TARGET_WAITIKIND_IGNORE, instead of
10441 TARGET_WAITKIND_STOPPED.
10442 (handle_tracepoints): Make sure LWP is locked. Adjust.
10443 (linux_wait_for_event_1): Adjust.
10444 (linux_cancel_breakpoints): New.
10445 (unsuspend_one_lwp): New.
10446 (unsuspend_all_lwps): New.
10447 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10448 (send_sigstop_callback): Change return type to int, add new
10449 `except' parameter and handle it.
10450 (suspend_and_send_sigstop_callback): New.
10451 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10452 pass them down. If SUSPEND, also increment the lwp's suspend
10454 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10455 (need_step_over_p): Don't consider suspended LWPs.
10456 (start_step_over): Adjust.
10457 (proceed_one_lwp): Change return type to int, add new `except'
10458 parameter and handle it.
10459 (unsuspend_and_proceed_one_lwp): New.
10460 (proceed_all_lwps): Use find_inferior instead of
10462 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10463 also decrement the suspend count of LWPs. Pass `except' down,
10464 instead of hacking its suspend count.
10465 (linux_pause_all): Add `freeze' parameter. Adjust.
10466 (linux_unpause_all): New.
10467 (linux_target_ops): Install linux_unpause_all.
10468 * server.c (handle_status): Adjust.
10469 * target.h (struct target_ops): New fields `unpause_all' and
10470 `cancel_breakpoints'. Add new parameter to `pause_all'.
10471 (pause_all): Add new `freeze' parameter.
10472 (unpause_all): New.
10473 (cancel_breakpoints): New.
10474 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10475 cancel breakpoints.
10476 (cmd_qtstart): Pause threads.
10477 (stop_tracing): Pause threads, and cancel breakpoints.
10478 * win32-low.c (win32_target_ops): Adjust.
10480 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10482 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10483 the inferior right away from here...
10484 (linux_wait_1): ... to here, and adjust to check the thread's
10485 last_resume_kind instead of the lwp's step or stop_expected flags.
10487 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10489 * README: Use consistent `GDB' and `GDBserver' spellings.
10491 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10493 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10494 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10495 (linux_detach_one_lwp): Assume the lwp is stopped.
10496 (any_thread_of): Delete.
10497 (linux_detach): Stop all lwps here. Don't blindly delete all
10499 (delete_lwp_callback): New.
10500 (linux_mourn): Delete all lwps of the process that is gone.
10501 (linux_wait_1): Don't delete the last lwp of the process here.
10502 * mem-break.h (mark_breakpoints_out): Declare.
10503 * mem-break.c (mark_breakpoints_out): New.
10504 (free_all_breakpoints): Use it.
10505 * server.c (handle_target_event): If the process is gone, mark
10507 * thread-db.c (struct thread_db) <create_bp>: New field.
10508 (thread_db_enable_reporting): Fix prototype. Store a thread event
10509 breakpoint reference in the thread_db struct.
10510 (thread_db_load_search): Clear the thread_db object.
10511 (try_thread_db_load_1): Ditto.
10512 (switch_to_process): New.
10513 (disable_thread_event_reporting): Use it.
10514 (remove_thread_event_breakpoints): New.
10515 (thread_db_detach, thread_db_mourn): Use it.
10517 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10519 * linux-low.c (linux_enable_event_reporting): New.
10520 (linux_wait_for_event_1, handle_extended_wait): Use it.
10522 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10524 * linux-low.c (linux_kill_one_lwp, linux_kill)
10525 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10526 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10527 SIGSTOP even if the LWP is stopped.
10528 (send_sigstop_callback): New.
10529 (stop_all_lwps): Use send_sigstop_callback instead.
10530 (linux_resume_one_thread): Adjust.
10531 (proceed_one_lwp): Still proceed an LWP that the client has
10532 requested to stop, if we haven't reported it as stopped yet. Make
10533 sure that LWPs the client want stopped, have a pending SIGSTOP.
10535 2010-04-26 Doug Evans <dje@google.com>
10537 * server.c (handle_general_set): Make static.
10539 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10540 Print received char after testing for error/eof instead of before.
10541 (input_interrupt): Tweak comment.
10543 2010-04-23 Doug Evans <dje@google.com>
10545 * server.c (start_inferior): Print inferior argv if --debug.
10547 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10549 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10550 * nto-x86-low.c: Include server.h
10552 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10554 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10555 be consistent with other sources of this directory.
10556 (init_registers_amd64): Correct name of source file of this function
10559 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10561 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10562 64-bit executables.
10564 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10566 * win32-i386-low.c: Add 64-bit support.
10567 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10568 (init_registers_amd64): Declare.
10569 (mappings): Add 64-bit version of array.
10570 (init_windows_x86): New function.
10571 (the_low_target): Change init_arch field to init_windows_x86.
10573 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10575 * win32-low.c: Adapt to support also 64-bit architecture.
10576 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10577 (get_image_name): Use SIZE_T type for local variable `done'.
10578 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10579 (toolhelp_get_dll_name): Idem.
10580 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10581 Use uintptr_t typecast to avoid warning.
10582 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10583 (handle_exception): Use phex_nz to avoid warning.
10584 (win32_wait): Remove unused local variable `process'.
10586 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10588 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10591 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10593 * configure.ac: Use `ws2_32' library for srv_mingw.
10594 * configure: Regenerate.
10595 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10596 * remote-utils.c: Likewise.
10598 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10600 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10601 if __x86_64__ is defined.
10603 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10605 * configure: Regenerate.
10607 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10609 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10610 * target.h (target_ops): New get_tib_address field.
10611 * win32-low.h (win32_thread_info): Add thread_local_base field.
10612 * win32-low.c (child_add_thread): Add tlb argument.
10613 Set thread_local_base field to TLB.
10614 (get_child_debug_event): Adapt to child_add_thread change.
10615 (win32_get_tib_address): New function.
10616 (win32_target_ops): Set get_tib_address field to
10617 win32_get_tib_address.
10618 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10620 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10622 * linux-low.c (linux_mourn): Also remove the process.
10623 * server.c (handle_target_event): Don't remove the process here.
10624 * nto-low.c (nto_mourn): New.
10625 (nto_target_ops): Install it.
10626 * spu-low.c (spu_mourn): New.
10627 (spu_target_ops): Install it.
10628 * win32-low.c (win32_mourn): New.
10629 (win32_target_ops): Install it.
10631 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10633 * server.h (buffer_xml_printf): Remove redundant `;'.
10635 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10637 * regcache.c (set_register_cache): Invalidate regcaches before
10638 changing the register cache layout.
10639 (regcache_invalidate_one): Allow a NULL regcache.
10640 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10641 regcaches before changing the register cache layout or the target
10644 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10646 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10647 variable warning on Linux/x86-64.
10649 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10651 GDBserver disconnected tracing support.
10653 * linux-low.c (linux_remove_process): Delete.
10654 (add_lwp): Don't set last_resume_kind here.
10655 (linux_kill): Use `mourn'.
10656 (linux_detach): Use `thread_db_detach', and `mourn'.
10657 (linux_mourn): New.
10658 (linux_attach_lwp_1): Adjust comment.
10659 (linux_attach): last_resume_kind moved the thread_info; adjust.
10660 (status_pending_p_callback): Adjust.
10661 (linux_wait_for_event_1): Adjust.
10662 (count_events_callback, select_singlestep_lwp_callback)
10663 (select_event_lwp_callback, cancel_breakpoints_callback)
10664 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10665 (proceed_one_lwp): Adjust.
10666 (linux_async): Add debug output.
10667 (linux_thread_stopped): New.
10668 (linux_pause_all): New.
10669 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10671 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10672 (thread_db_free): Delete declaration.
10673 (thread_db_detach, thread_db_mourn): Declare.
10674 * thread-db.c (thread_db_init): Use thread_db_mourn.
10675 (thread_db_free): Delete, split in two.
10676 (disable_thread_event_reporting): New.
10677 (thread_db_detach): New.
10678 (thread_db_mourn): New.
10680 * server.h (struct thread_info) <last_resume_kind>: New field.
10681 <attached>: Add comment.
10682 <gdb_detached>: New field.
10683 (handler_func): Change return type to int.
10684 (handle_serial_event, handle_target_event): Ditto.
10685 (gdb_connected): Declare.
10687 (disconnected_tracing): Declare.
10688 (stop_tracing): Declare.
10690 * server.c (handle_query) <qSupported>: Report support for
10691 disconnected tracing.
10692 (queue_stop_reply_callback): Account for running threads.
10693 (gdb_wants_thread_stopped): New.
10694 (gdb_wants_all_threads_stopped): New.
10695 (gdb_reattached_process): New.
10696 (handle_status): Clear the `gdb_detached' flag of all processes.
10697 In all-stop, stop all threads.
10698 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10699 (process_serial_event): If the remote connection breaks, or if an
10700 exit was forced with "monitor exit", force an event loop exit.
10701 Handle disconnected tracing on detach.
10702 (handle_serial_event): Adjust.
10703 (handle_target_event): If GDB isn't connected, forward events back
10704 to the inferior, unless the last process exited, in which case,
10705 exit gdbserver. Adjust interface.
10707 * remote-utils.c (remote_open): Don't block in accept. Instead
10708 register an event loop source on the listen socket file
10709 descriptor. Refactor bits into ...
10710 (listen_desc): ... this new global.
10711 (gdb_connected): ... this new function.
10712 (enable_async_notification): ... this new function.
10713 (handle_accept_event): ... this new function.
10714 (remote_close): Clear remote_desc.
10716 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10718 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10720 (mourn_inferior): Define.
10721 (target_process_qsupported): Avoid the dangling else problem.
10722 (thread_stopped): Define.
10723 (pause_all): Define.
10724 (target_waitstatus_to_string): Declare.
10725 * target.c (target_waitstatus_to_string): New.
10727 * tracepoint.c (tracing): Make extern.
10728 (disconnected_tracing): New.
10729 (stop_tracing): Make extern. Handle tracing stops due to GDB
10731 (cmd_qtdisconnected): New.
10732 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10733 (handle_tracepoint_general_set): Handle QTDisconnected.
10735 * event-loop.c (event_handler_func): Change return type to int.
10736 (process_event): Bail out if the event handler wants the event
10738 (handle_file_event): Ditto.
10739 (start_event_loop): Bail out if the event handler wants the event
10742 * nto-low.c (nto_target_ops): Adjust.
10743 * spu-low.c (spu_wait): Don't remove the process here.
10744 (spu_target_ops): Adjust.
10745 * win32-low.c (win32_wait): Don't remove the process here.
10746 (win32_target_ops): Adjust.
10748 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10750 * regcache.c (realloc_register_cache): Invalidate inferior's
10751 regcache before recreating it.
10753 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10755 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10757 2010-04-09 Stan Shebs <stan@codesourcery.com>
10758 Pedro Alves <pedro@codesourcery.com>
10760 * server.h (LONGEST): New.
10761 (struct thread_info) <while_stepping>: New field.
10762 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10764 (initialize_tracepoint, handle_tracepoint_general_set)
10765 (handle_tracepoint_query, tracepoint_finished_step)
10766 (tracepoint_was_hit, release_while_stepping_state_list):
10767 (current_traceframe): Declare.
10768 * server.c (handle_general_set): Handle tracepoint packets.
10769 (read_memory): New.
10770 (write_memory): New.
10771 (handle_search_memory_1): Use read_memory.
10772 (handle_query): Report support for conditional tracepoints, trace
10773 state variables, and tracepoint sources. Handle tracepoint
10775 (main): Initialize the tracepoints module.
10776 (process_serial_event): Handle traceframe reads/writes.
10778 * linux-low.c (handle_tracepoints): New.
10779 (linux_wait_1): Call it.
10780 (linux_resume_one_lwp): Handle while-stepping.
10781 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10782 (linux_target_ops): Install them.
10783 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10785 * linux-x86-low.c (x86_supports_tracepoints): New.
10786 (the_low_target). Install it.
10788 * mem-break.h (delete_breakpoint): Declare.
10789 * mem-break.c (delete_breakpoint): Make external.
10791 * target.h (struct target_ops): Add `supports_tracepoints',
10792 `read_pc', and `write_pc' fields.
10793 (target_supports_tracepoints): Define.
10794 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10797 * regcache.h (struct regcache) <registers_owned>: New field.
10798 (init_register_cache, regcache_cpy): Declare.
10799 (regcache_read_pc, regcache_write_pc): Declare.
10800 (register_cache_size): Declare.
10801 (supply_regblock): Declare.
10802 * regcache.c (init_register_cache): New.
10803 (new_register_cache): Use it.
10804 (regcache_cpy): New.
10805 (register_cache_size): New.
10806 (supply_regblock): New.
10807 (regcache_read_pc, regcache_write_pc): New.
10809 * tracepoint.c: New.
10811 * Makefile.in (OBS): Add tracepoint.o.
10812 (tracepoint.o): New rule.
10814 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10816 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10818 (i386-mmx.c): Likewise.
10819 (i386-mmx-linux.o): Likewise.
10820 (i386-mmx-linux.c): Likewise.
10822 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10823 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10824 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10825 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10827 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10828 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10829 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10831 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10833 * Makefile.in (clean): Updated.
10835 (i386-avx.c): Likewise.
10836 (i386-avx-linux.o): Likewise.
10837 (i386-avx-linux.c): Likewise.
10838 (amd64-avx.o): Likewise.
10839 (amd64-avx.c): Likewise.
10840 (amd64-avx-linux.o): Likewise.
10841 (amd64-avx-linux.c): Likewise.
10843 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10844 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10845 (srv_amd64_regobj): Add amd64-avx.o.
10846 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10847 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10848 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10849 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10850 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10854 * i387-fp.c: Include "i386-xstate.h".
10856 (i387_cache_to_xsave): Likewise.
10857 (i387_xsave_to_cache): Likewise.
10858 (x86_xcr0): Likewise.
10860 * i387-fp.h (i387_cache_to_xsave): Likewise.
10861 (i387_xsave_to_cache): Likewise.
10862 (x86_xcr0): Likewise.
10864 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10865 * linux-crisv32-low.c (target_regsets): Likewise.
10866 * linux-m68k-low.c (target_regsets): Likewise.
10867 * linux-mips-low.c (target_regsets): Likewise.
10868 * linux-ppc-low.c (target_regsets): Likewise.
10869 * linux-s390-low.c (target_regsets): Likewise.
10870 * linux-sh-low.c (target_regsets): Likewise.
10871 * linux-sparc-low.c (target_regsets): Likewise.
10872 * linux-xtensa-low.c (target_regsets): Likewise.
10874 * linux-low.c: Include <sys/uio.h>.
10875 (regsets_fetch_inferior_registers): Support nt_type.
10876 (regsets_store_inferior_registers): Likewise.
10877 (linux_process_qsupported): New.
10878 (linux_target_ops): Add linux_process_qsupported.
10880 * linux-low.h (regset_info): Add nt_type.
10881 (linux_target_ops): Add process_qsupported.
10883 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10885 (init_registers_i386_avx_linux): New.
10886 (init_registers_amd64_avx_linux): Likewise.
10887 (xmltarget_i386_linux_no_xml): Likewise.
10888 (xmltarget_amd64_linux_no_xml): Likewise.
10889 (PTRACE_GETREGSET): Likewise.
10890 (PTRACE_SETREGSET): Likewise.
10891 (x86_fill_xstateregset): Likewise.
10892 (x86_store_xstateregset): Likewise.
10893 (use_xml): Likewise.
10894 (x86_linux_update_xmltarget): Likewise.
10895 (x86_linux_process_qsupported): Likewise.
10896 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10897 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10898 init_registers_i386_linux here. Call
10899 x86_linux_update_xmltarget.
10900 (the_low_target): Add x86_linux_process_qsupported.
10902 * server.c (handle_query): Call target_process_qsupported.
10904 * target.h (target_ops): Add process_qsupported.
10905 (target_process_qsupported): New.
10907 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10909 * inferiors.c (add_thread): Set last_status kind to
10910 TARGET_WAITKIND_IGNORE.
10911 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10912 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10913 (linux_wait_1): Move `thread' local definition to block that uses
10914 it. Don't NULL initialize `event_child'.
10915 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10916 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10917 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10919 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10921 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10922 an extended waitstatus, or by a watchpoint.
10923 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10924 thread was stepping or has been stopped by a watchpoint.
10926 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10928 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10929 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10930 of another, then delete the previous, and validate all
10932 (validate_inserted_breakpoint): New.
10933 (delete_disabled_breakpoints): New.
10934 (validate_breakpoints): New.
10935 (check_mem_read): Validate breakpoints before trusting their
10936 shadow. Delete disabled breakpoints.
10937 (check_mem_write): Validate breakpoints before trusting they
10938 should be inserted. Delete disabled breakpoints.
10939 * mem-break.h (validate_breakpoints):
10940 * server.c (handle_query): Validate breakpoints when we see a
10943 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10945 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10946 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10947 if we could tell there's a GDB breakpoint at stop_pc.
10948 (need_step_over_p): Don't do a step over if we find a GDB
10949 breakpoint at the resume PC.
10951 * mem-break.c (struct raw_breakpoint): New.
10952 (enum bkpt_type): New type `gdb_breakpoint'.
10953 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10954 fields. New field `raw'.
10955 (find_raw_breakpoint_at): New.
10956 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10957 breakpoint instead.
10958 (set_breakpoint_at): Adjust.
10959 (delete_raw_breakpoint): New.
10960 (release_breakpoint): New.
10961 (delete_breakpoint): Rename to...
10962 (delete_breakpoint_1): ... this. Add proc parameter. Use
10963 release_breakpoint. Return ENOENT.
10964 (delete_breakpoint): Reimplement.
10965 (find_breakpoint_at): Delete.
10966 (find_gdb_breakpoint_at): New.
10967 (delete_breakpoint_at): Delete.
10968 (set_gdb_breakpoint_at): New.
10969 (delete_gdb_breakpoint_at): New.
10970 (gdb_breakpoint_here): New.
10971 (set_reinsert_breakpoint): Use release_breakpoint.
10972 (uninsert_breakpoint): Rename to ...
10973 (uninsert_raw_breakpoint): ... this.
10974 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10975 (reinsert_raw_breakpoint): Change parameter type to
10977 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10979 (check_breakpoints): Adjust. Use release_breakpoint.
10980 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10981 (breakpoint_inserted_here): Ditto.
10982 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10983 Don't trust the breakpoint's shadow if it is not inserted.
10984 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10985 (delete_all_breakpoints): Adjust.
10986 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10987 use delete_breakpoint_1.
10989 * mem-break.h (breakpoints_supported): Delete declaration.
10990 (set_gdb_breakpoint_at): Declare.
10991 (gdb_breakpoint_here): Declare.
10992 (delete_breakpoint_at): Delete.
10993 (delete_gdb_breakpoint_at): Declare.
10995 * server.h (struct raw_breakpoint): Forward declare.
10996 (struct process_info): New field `raw_breakpoints'.
10998 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11001 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11003 * linux-low.c (status_pending_p_callback): Fix comment.
11004 (linux_wait_for_event_1): Move most of the internal breakpoint
11005 handling from here...
11006 (linux_wait_1): ... to here.
11007 (count_events_callback): New.
11008 (select_singlestep_lwp_callback): New.
11009 (select_event_lwp_callback): New.
11010 (cancel_breakpoints_callback): New.
11011 (select_event_lwp): New.
11012 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11013 priority to all LWPs that have had events that should be reported
11014 to the client. Cancel breakpoints when about to reporting the
11015 event to the client, not while stopping lwps. No longer cancel
11016 finished single-steps here.
11017 (cancel_finished_single_step): Delete.
11018 (cancel_finished_single_steps): Delete.
11020 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11022 * mem-break.c (enum bkpt_type): New.
11023 (struct breakpoint): New field `type'.
11024 (set_breakpoint_at): Change return type to struct breakpoint
11025 pointer. Set type to `other_breakpoint' by default.
11026 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11027 in the breakpoint list.
11028 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11029 (reinsert_breakpoint): Rename to ...
11030 (reinsert_raw_breakpoint): ... this.
11031 (reinsert_breakpoints_at): Adjust.
11032 * mem-break.h (struct breakpoint): Declare.
11033 (set_breakpoint_at): Change return type to struct breakpoint
11036 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11038 * server.c (handle_query): Assign, not compare.
11040 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11042 Teach linux gdbserver to step-over-breakpoints.
11044 * linux-low.c (can_hardware_single_step): New.
11045 (supports_breakpoints): New.
11046 (handle_extended_wait): If stopping threads, read the stop pc of
11047 the new cloned LWP.
11049 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11050 low target doesn't support retrieving the PC.
11051 (add_lwp): Set last_resume_kind to resume_continue.
11052 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11053 (linux_attach): Don't clear stop_expected. Set the lwp's
11054 last_resume_kind to resume_stop.
11055 (linux_detach_one_lwp): Don't check for removed breakpoints.
11056 (check_removed_breakpoint): Delete.
11057 (status_pending_p): Rename to ...
11058 (status_pending_p_callback): ... this. Don't check for removed
11059 breakpoints. Don't consider threads that are stopped from GDB's
11061 (linux_wait_for_lwp): Always read the stop_pc here.
11062 (cancel_breakpoint): New.
11063 (step_over_bkpt): New global.
11064 (linux_wait_for_event_1): Implement stepping over breakpoints.
11065 (gdb_wants_lwp_stopped): New.
11066 (gdb_wants_all_stopped): New.
11067 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11068 single-step traps here. Store the thread's last reported target
11070 (send_sigstop): Don't clear stop_expected. Always set it,
11072 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11073 (cancel_finished_single_step): New.
11074 (cancel_finished_single_steps): New.
11075 (wait_for_sigstop): Don't cancel finished single-step traps here.
11076 (linux_resume_one_lwp): Don't check for removed breakpoints.
11077 Don't set `step' on non-hardware step archs.
11078 (linux_set_resume_request): Ignore resume_stop requests if already
11079 stopping or stopped. Set the lwp's last_resume_kind.
11080 (resume_status_pending_p): Don't check for removed breakpoints.
11081 (need_step_over_p): New.
11082 (start_step_over): New.
11083 (finish_step_over): New.
11084 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11085 requests. Clear the thread's last reported target waitstatus.
11086 Don't use the `suspended' flag. Don't consider pending breakpoints.
11087 (linux_resume): Start a step-over if necessary.
11088 (proceed_one_lwp): New.
11089 (proceed_all_lwps): New.
11090 (unstop_all_lwps): New.
11091 * linux-low.h (struct lwp_info): Rewrite comment for the
11092 `suspended' flag. Add the `stop_pc' field. Delete the
11093 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11094 Add `'last_resume_kind' and `need_step_over' fields.
11095 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11096 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11097 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11098 (set_raw_breakpoint_at): New.
11099 (set_breakpoint_at): Rewrite to use it.
11100 (reinsert_breakpoint_handler): Delete.
11101 (set_reinsert_breakpoint): New.
11102 (reinsert_breakpoint_by_bp): Delete.
11103 (delete_reinsert_breakpoints): New.
11104 (uninsert_breakpoint): Rewrite.
11105 (uninsert_breakpoints_at): New.
11106 (reinsert_breakpoint): Rewrite.
11107 (reinsert_breakpoints_at): New.
11108 (check_breakpoints): Rewrite.
11109 (breakpoint_here): New.
11110 (breakpoint_inserted_here): New.
11111 (check_mem_read): Adjust.
11112 * mem-break.h (breakpoints_supported, breakpoint_here)
11113 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11114 (reinsert_breakpoint_by_bp): Delete declaration.
11115 (delete_reinsert_breakpoints): Declare.
11116 (reinsert_breakpoint): Delete declaration.
11117 (reinsert_breakpoints_at): Declare.
11118 (uninsert_breakpoint): Delete declaration.
11119 (uninsert_breakpoints_at): Declare.
11120 (check_breakpoints): Adjust prototype.
11121 * server.h: Adjust include order.
11122 (struct thread_info): Declare here. Add a `last_status' field.
11124 2010-03-23 Michael Snyder <msnyder@vmware.com>
11126 * server.c (crc32): New function.
11127 (handle_query): Add handling for 'qCRC:' request.
11129 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11131 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11132 lwp had been stopped by a watchpoint.
11134 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11136 * server.h (internal_error): Declare.
11137 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11138 * utils.c (internal_error): New function.
11140 2010-03-15 Andreas Schwab <schwab@redhat.com>
11142 * configure.srv: Fix typo setting srv_regobj.
11144 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11146 * linux-low.c (fetch_register): Avoid passing a non string literal
11148 (usr_store_inferior_registers): Ditto.
11150 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11152 * linux-low.c (linux_write_memory): Bail out early if peeking
11155 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11157 * linux-low.h (struct lwp_info): New fields
11158 `stopped_by_watchpoint' and `stopped_data_address'.
11159 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11160 here, and cache them in the lwp object.
11161 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11163 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11165 (linux_stopped_by_watchpoint): Rewrite.
11166 (linux_stopped_data_address): Rewrite.
11168 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11170 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11171 switching the current inferior, not before.
11173 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11175 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11176 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11177 i386-linux.c and amd64-linux.c.
11178 (reg-i386.o): Removed.
11179 (reg-i386.c): Likewise.
11180 (reg-i386-linux.o): Likewise.
11181 (reg-i386-linux.c): Likewise.
11182 (reg-x86-64.o): Likewise.
11183 (reg-x86-64.c): Likewise.
11184 (reg-x86-64-linux.o): Likewise.
11185 (reg-x86-64-linux.c): Likewise.
11187 (i386.c): Likewise.
11188 (i386-linux.o): Likewise.
11189 (i386-linux.c): Likewise.
11190 (amd64.o): Likewise.
11191 (amd64.c): Likewise.
11192 (amd64-linux.o): Likewise.
11193 (amd64-linux.c): Likewise.
11195 * configure.srv (srv_i386_regobj): New.
11196 (srv_i386_linux_regobj): Likewise.
11197 (srv_amd64_regobj): Likewise.
11198 (srv_amd64_linux_regobj): Likewise.
11199 (srv_i386_32bit_xmlfiles): Likewise.
11200 (srv_i386_64bit_xmlfiles): Likewise.
11201 (srv_i386_xmlfiles): Likewise.
11202 (srv_amd64_xmlfiles): Likewise.
11203 (srv_i386_linux_xmlfiles): Likewise.
11204 (srv_amd64_linux_xmlfiles): Likewise.
11205 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11206 srv_xmlfiles to $srv_i386_xmlfiles.
11207 (i[34567]86-*-mingw32ce*): Likewise.
11208 (i[34567]86-*-mingw*): Likewise.
11209 (i[34567]86-*-nto*): Likewise.
11210 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11211 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11212 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11213 (x86_64-*-linux*): Likewise.
11215 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11216 (init_registers_amd64_linux): New.
11217 (x86_arch_setup): Replace init_registers_x86_64_linux with
11218 init_registers_amd64_linux.
11220 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11222 * configure.ac: Check for libdl. If it is not available link against
11223 static libthread_db.
11224 * configure: Regenerate.
11226 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11230 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11231 handing a read watchpoint.
11232 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11234 2010-02-12 Doug Evans <dje@google.com>
11236 * linux-low.c (linux_supports_tracefork_flag): Document.
11237 (linux_look_up_symbols): Add comment.
11239 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11241 * regcache.c (supply_register): Clear regcache if buf is NULL.
11243 2010-02-02 Nicolas Roche <roche@sourceware.org>
11244 Joel Brobecker <brobecker@adacore.com>
11246 * inferiors.c (find_inferior): Add function documentation.
11247 (unloaded_dll): Handle the case where the unloaded dll has not
11248 been previously registered in the dll list.
11250 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11252 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11253 (thumb2_breakpoint): New.
11254 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11256 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11258 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11259 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11262 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11264 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11266 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11268 * linux-s390-low.c (s390_collect_ptrace_register)
11269 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11271 2010-01-21 Doug Evans <dje@google.com>
11273 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11274 (PTRACE_ARG4_TYPE): New macro.
11275 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11276 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11277 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11278 (usr_store_inferior_registers): Ditto.
11279 (linux_read_memory, linux_write_memory): Ditto.
11280 (linux_test_for_tracefork): Ditto.
11282 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11283 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11285 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11287 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11290 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11292 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11293 prototype to take a regcache. Adjust.
11295 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11297 * regcache.h (struct thread_info): Forward declare.
11298 (struct regcache): New.
11299 (new_register_cache): Adjust prototype.
11300 (get_thread_regcache): Declare.
11301 (free_register_cache): Adjust prototype.
11302 (registers_to_string, registers_from_string): Ditto.
11303 (supply_register, supply_register_by_name, collect_register)
11304 (collect_register_as_string, collect_register_by_name): Ditto.
11305 * regcache.c (struct inferior_regcache_data): Delete.
11306 (get_regcache): Rename to ...
11307 (get_thread_regcache): ... this. Adjust. Switch inferior before
11308 fetching registers.
11309 (regcache_invalidate_one): Adjust.
11310 (regcache_invalidate): Fix prototype.
11311 (new_register_cache): Return the new register cache.
11312 (free_register_cache): Change prototype.
11313 (realloc_register_cache): Adjust.
11314 (registers_to_string): Change prototype to take a regcache. Adjust.
11315 (registers_from_string): Ditto.
11316 (register_data): Ditto.
11317 (supply_register): Ditto.
11318 (supply_register_by_name): Ditto.
11319 (collect_register): Ditto.
11320 (collect_register_as_string): Ditto.
11321 (collect_register_by_name): Ditto.
11322 * server.c (process_serial_event): Adjust.
11323 * linux-low.h (regset_fill_func, regset_store_func): Change
11325 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11327 * linux-low.c (get_stop_pc): Adjust.
11328 (check_removed_breakpoint): Adjust.
11329 (linux_wait_for_event): Adjust.
11330 (linux_resume_one_lwp): Adjust.
11331 (fetch_register): Add regcache parameter. Adjust.
11332 (usr_store_inferior_registers): Ditto.
11333 (regsets_fetch_inferior_registers): Ditto.
11334 (regsets_store_inferior_registers): Ditto.
11335 (linux_fetch_registers, linux_store_registers): Ditto.
11336 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11338 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11340 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11341 prototype to take a regcache.
11342 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11343 * remote-utils.c (convert_ascii_to_int, outreg)
11344 (prepare_resume_reply): Change prototype to take a regcache.
11346 * target.h (struct target_ops) <fetch_registers, store_registers>:
11347 Change prototype to take a regcache.
11348 (fetch_inferior_registers, store_inferior_registers): Change
11349 prototype to take a regcache. Adjust.
11350 * proc-service.c (ps_lgetregs): Adjust.
11351 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11352 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11353 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11354 take a regcache. Adjust.
11355 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11356 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11357 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11358 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11359 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11360 (cris_cannot_fetch_register):
11361 (cris_breakpoint_at): Change prototype to take a regcache.
11363 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11364 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11365 to take a regcache. Adjust.
11366 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11368 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11369 take a regcache. Adjust.
11370 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11371 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11372 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11373 * linux-mips-low.c (mips_get_pc):
11374 (mips_set_pc): Change prototype to take a regcache. Adjust.
11375 (mips_reinsert_addr): Adjust.
11376 (mips_collect_register): Change prototype to take a regcache.
11378 (mips_supply_register):
11379 (mips_collect_register_32bit, mips_supply_register_32bit)
11380 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11381 (mips_store_fpregset): Ditto.
11382 * linux-ppc-low.c (ppc_supply_ptrace_register)
11383 (ppc_supply_ptrace_register): Ditto.
11384 (parse_spufs_run): Adjust.
11385 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11386 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11387 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11388 take a regcache. Adjust.
11389 * linux-s390-low.c (s390_collect_ptrace_register)
11390 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11391 (s390_set_pc): Change prototype to take a regcache. Adjust.
11392 (s390_arch_setup): Adjust.
11393 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11394 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11395 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11396 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11397 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11399 (sparc_breakpoint_at): Adjust.
11400 * linux-xtensa-low.c (xtensa_fill_gregset):
11401 (xtensa_store_gregset):
11402 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11403 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11404 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11405 prototype to take a regcache. Adjust.
11406 * win32-arm-low.c (arm_fetch_inferior_register)
11407 (arm_store_inferior_register): Change prototype to take a
11409 * win32-i386-low.c (i386_fetch_inferior_register)
11410 (i386_store_inferior_register): Change prototype to take a
11412 * win32-low.c (child_fetch_inferior_registers)
11413 (child_store_inferior_registers): Change prototype to take a
11415 (win32_wait): Adjust.
11416 (win32_fetch_inferior_registers): Change prototype to take a
11418 (win32_store_inferior_registers): Adjust.
11419 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11420 store_inferior_register>: Change prototype to take a regcache.
11422 2010-01-20 Doug Evans <dje@google.com>
11424 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11426 (linux_wait_for_event1, linux_init_signals): Ditto.
11427 (W_STOPCODE): Provide definition if missing.
11429 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11431 * linux-low.c (linux_core_of_thread): New.
11432 (compare_ints, show_process, list_threads): New.
11433 (linux_qxfer_osdata): Report threads and cores.
11434 (linux_target_op): Register linux_core_of_thread.
11435 * remote-utils.c (prepare_resume_reply): Report the core.
11436 (buffer_xml_printf): Support %d specifier.
11437 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11439 (handle_query): Handle qXfer:threads. Announce availability
11441 * target.h (struct target_ops): New field core_of_thread.
11443 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11445 * Makefile.in (clean): Remove new generated files.
11446 (reg-s390.o, reg-s390.c): Remove rules.
11447 (reg-s390x.o, reg-s390x.c): Likewise.
11448 (s390-linux32.o, s390-linux32.c): Add rules.
11449 (s390-linux64.o, s390-linux64.c): Likewise.
11450 (s390x-linux64.o, s390x-linux64.c): Likewise.
11451 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11452 * linux-s390-low.c: Include <elf.h>.
11453 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11454 (init_registers_s390): Remove prototype.
11455 (init_registers_s390x): Likewise.
11456 (init_registers_s390_linux32): Add prototype.
11457 (init_registers_s390_linux64): Likewise.
11458 (init_registers_s390x_linux64): Likewise.
11459 (s390_num_regs_3264): New define.
11460 (s390_regmap_3264): New global variable.
11461 (s390_cannot_fetch_register): Remove obsolete check.
11462 (s390_cannot_store_register): Likewise.
11463 (s390_collect_ptrace_register): Handle upper/lower register halves.
11464 (s390_supply_ptrace_register): Likewise.
11465 (s390_fill_gregset): Update to register number changes.
11466 (s390_get_hwcap): New routine.
11467 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11468 Install appropriate regmap and register set.
11470 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11472 * server.c (gdbserver_version): Update copyright year to 2010.
11473 * gdbreplay.c (gdbreplay_version): Likewise.
11475 2009-12-28 Doug Evans <dje@google.com>
11477 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11478 elf/external.h. Include <elf.h> instead but only if necessary.
11480 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11482 * linux-low.c (linux_remove_process): Remove `detaching'
11483 parameter. Don't release/detach from thread_db here.
11484 (linux_kill): Release/detach from thread_db here, ...
11485 (linux_detach): ... and here, before actually detaching.
11486 (linux_wait_1): ... and here, when a process exits.
11487 * thread-db.c (any_thread_of): New.
11488 (thread_db_free): Switch the current inferior to a thread of the
11491 2009-12-21 Doug Evans <dje@google.com>
11493 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11495 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11496 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11497 warning ifndef __NR_tkill. Move setting of errno there too.
11498 Delete unnecessary resetting of errno after syscall.
11499 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11501 * configure.ac: Check for dladdr.
11502 * config.in: Regenerate.
11503 * configure: Regenerate.
11504 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11505 (try_thread_db_load): Update.
11507 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11509 2009-12-18 Doug Evans <dje@google.com>
11511 * event-loop.c: Include unistd.h if it exists.
11513 * linux-low.c (my_waitpid): Move definition away from being in
11514 between linux_tracefork_child/linux_test_for_tracefork.
11516 * gdb_proc_service.h (psaddr_t): Fix type.
11517 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11518 signature to match glibc.
11520 2009-12-16 Doug Evans <dje@google.com>
11522 * linux-low.c (linux_read_memory): Fix argument to read.
11524 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11526 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11527 events, don't leave current_inferior pointing at null.
11529 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11531 * win32-low.c (LOG): Delete.
11532 (OUTMSG): Output to stderr.
11533 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11534 on compile time LOG macro.
11535 (win32_wait): Fix debug output.
11537 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11539 * win32-low.c (win32_add_one_solib): If the dll name is
11540 "ntdll.dll", prepend the system directory to the dll path.
11542 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11544 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11546 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11547 Vladimir Prus <vladimir@codesourcery.com>
11549 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11550 * configure.ac: Check for __mcoldfire__ and set
11551 gdb_cv_m68k_is_coldfire.
11552 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11553 reg-cf.o and reg-m68k.o.
11554 * configure: Regenerated.
11556 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11558 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11559 Pass it to thread_db_free.
11560 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11561 proper `detaching' argument to linux_remove_process.
11562 * linux-low.h (thread_db_free): Add `detaching' parameter.
11563 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11565 (thread_db_free): Add `detaching' parameter. Only
11566 call td_ta_clear_event if detaching from process.
11568 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11570 * thread-db.c (thread_db_free): Fix typo.
11572 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11575 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11577 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11579 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11580 with an i686 compiler.
11581 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11583 * configure: Rebuilt.
11585 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11589 * server.c (handle_search_memory_1): Correct read_addr initialization
11590 in loop for searching subsequent chunks.
11592 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11594 * configure.ac: New --with-libthread-db option.
11595 * thread-db.c: Allow direct dependence on libthread_db.
11596 (thread_db_free): Adjust.
11597 * config.in: Regenerate.
11598 * configure: Likewise.
11600 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11603 * thread-db.c (attach_thread): New function.
11604 (maybe_attach_thread): Return success/failure.
11605 (find_new_threads_callback): Adjust.
11606 (thread_db_find_new_threads): Loop until no new threads.
11608 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11610 * proc-service.c (ps_lgetregs): Formatting.
11612 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11614 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11615 * configure.ac: Adjust.
11616 * linux-low.h (struct process_info_private): Move members to struct
11618 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11619 * linux-low.c (linux_remove_process): Adjust.
11620 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11621 * server.c (handle_query): Move code ...
11622 (handle_monitor_command): ... here. New function.
11623 * target.h (struct target_ops): New member.
11624 * thread-db.c (struct thread_db): New.
11625 (libthread_db_search_path): New variable.
11626 (thread_db_create_event, thread_db_enable_reporting)
11627 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11628 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11629 (try_thread_db_load_1, dladdr_to_soname): New functions.
11630 (try_thread_db_load, thread_db_load_search): New functions.
11631 (thread_db_init): Search for libthread_db.
11632 (thread_db_free): New function.
11633 (thread_db_handle_monitor_command): Likewise.
11634 * config.in: Regenerate.
11635 * configure: Regenerate.
11637 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11639 * spu-low.c (spu_kill): Wait for inferior to terminate.
11640 Call clear_inferiors.
11641 (spu_detach): Call clear_inferiors.
11643 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11645 * aclocal.m4: Regenerate.
11646 * config.in: Likewise.
11647 * configure: Likewise.
11649 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11651 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11652 (parse_spufs_run): New function.
11653 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11654 (ppc_breakpoint_at): Handle SPU breakpoints.
11656 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11658 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11659 (SPUFS_MAGIC): Define.
11660 (spu_enumerate_spu_ids): New function.
11661 (linux_qxfer_spu): New function.
11662 (linux_target_ops): Install linux_qxfer_spu.
11664 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11666 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11667 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11668 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11669 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11670 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11671 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11672 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11673 (init_registers_powerpc_cell32l): Add prototype.
11674 (init_registers_powerpc_cell64l): Likewise.
11675 (ppc_arch_setup): Detect Cell/B.E. architecture.
11677 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11679 * Makefile.in (datarootdir): New variable.
11681 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11683 * linux-low.c (linux_write_memory): Update debugging output.
11684 * Makefile.in (clean): Add new descriptions.
11685 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11686 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11687 * configure.srv: Add new files for arm*-*-linux*.
11688 * linux-arm-low.c: Add new declarations.
11689 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11690 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11691 (HWCAP_VFPv3D16): New.
11692 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11693 instead of __IWMMXT__.
11694 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11695 (arm_arch_setup): New.
11696 (target_regsets): Remove #ifdef. Add VFP regset.
11697 (the_low_target): Use arm_arch_setup.
11699 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11701 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11702 the main thread again.
11704 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11706 Adding Neutrino gdbserver.
11707 * configure: Regenerated.
11708 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11709 * configure.srv (i[34567]86-*-nto*): New target.
11710 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11711 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11712 (nto_comctrl) [__QNX__]: New function.
11713 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11715 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11717 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11720 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11721 Pedro Alves <pedro@codesourcery.com>
11723 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11724 don't support CONTEXT_EXTENDED_REGISTERS.
11725 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11726 (the_low_target): Install them.
11727 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11728 failing with ERROR_PIPE_NOT_CONNECTED.
11730 2009-06-30 Doug Evans <dje@google.com>
11731 Pierre Muller <muller@ics.u-strasbg.fr>
11733 Add h/w watchpoint support to x86-linux, win32-i386.
11734 * Makefile.in (SFILES): Add i386-low.c
11735 (i386_low_h): Define.
11736 (i386-low.o): Add dependencies.
11737 (linux-x86-low.o): Add i386-low.h dependency.
11738 (win32-i386-low.o): Ditto.
11739 * i386-low.c: New file.
11740 * i386-low.h: New file.
11741 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11742 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11743 * linux-low.c (linux_add_process): Initialize arch_private.
11744 (linux_remove_process): Free arch_private.
11745 (add_lwp): Initialize arch_private.
11746 (delete_lwp): Free arch_private.
11747 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11749 * linux-low.h (process_info_private): New member arch_private.
11750 (lwp_info): New member arch_private.
11751 (linux_target_ops): New members new_process, new_thread,
11753 (ptid_of): New macro.
11754 * linux-x86-low.c: Include stddef.h, i386-low.h.
11755 (arch_process_info): New struct.
11756 (arch_lwp_info): New struct.
11757 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11758 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11759 (i386_dr_low_get_status): New function.
11760 (x86_insert_point, x86_remove_point): New functions.
11761 (x86_stopped_by_watchpoint): New function.
11762 (x86_stopped_data_address): New function.
11763 (x86_linux_new_process, x86_linux_new_thread): New functions.
11764 (x86_linux_prepare_to_resume): New function.
11765 (the_low_target): Add entries for insert_point, remove_point,
11766 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11768 * server.c (debug_hw_points): New global.
11769 (monitor_show_help): Document set debug-hw-points.
11770 (handle_query): Process "set debug-hw-points".
11771 * server.h (debug_hw_points): Declare.
11772 (paddress): Declare.
11773 * utils.c (NUMCELLS, CELLSIZE): New macros.
11774 (get_sell, xsnprintf, paddress): New functions.
11775 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11776 remove_point, stopped_by_watchpoint, stopped_data_address.
11777 * win32-i386-low.c: Include i386-low.h.
11778 (debug_reg_state): Replaces dr.
11779 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11780 (i386_dr_low_get_status): New function.
11781 (i386_insert_point, i386_remove_point): New functions.
11782 (i386_stopped_by_watchpoint): New function.
11783 (i386_stopped_data_address): New function.
11784 (i386_initial_stuff): Update.
11785 (get_thread_context,set_thread_context,i386_thread_added): Update.
11786 (the_low_target): Add entries for insert_point,
11787 remove_point, stopped_by_watchpoint, stopped_data_address.
11788 * win32-low.c (win32_insert_watchpoint): New function.
11789 (win32_remove_watchpoint): New function.
11790 (win32_stopped_by_watchpoint): New function.
11791 (win32_stopped_data_address): New function.
11792 (win32_target_ops): Add entries for insert_watchpoint,
11793 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11794 * win32-low.h (win32_target_ops): New members insert_point,
11795 remove_point, stopped_by_watchpoint, stopped_data_address.
11797 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11799 * server.c (process_serial_event): Re-return unsupported, not
11800 error, if the type isn't recognized. Re-allow supporting only
11801 insert or remove packets. Also call require_running for
11802 breakpoints. Add missing break statement to default case. Tidy.
11803 * target.h (struct target_ops): Rename insert_watchpoint to
11804 insert_point, and remove_watchpoint to remove_point.
11806 * linux-low.h (struct linux_target_ops): Likewise.
11807 * linux-low.c (linux_insert_watchpoint): Rename to ...
11808 (linux_insert_point): ... this. Adjust.
11809 (linux_remove_watchpoint): Rename to ...
11810 (linux_remove_point): ... this. Adjust.
11811 (linux_target_ops): Adjust.
11812 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11813 (cris_insert_point): ... this.
11814 (cris_remove_watchpoint): Rename to ...
11815 (cris_remove_point): ... this.
11816 (the_low_target): Adjust.
11818 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11820 * server.c (handle_v_kill): Pass signal_pid to
11821 kill_inferior if multi_process is zero.
11823 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11825 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11826 * target.h (target_ops): Comment for *_watchpoint to make it clear
11827 the functions can get types '0' and '1'.
11829 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11831 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11832 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11833 * regcache.c (get_regcache): Likewise.
11834 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11835 * win32-low.c (child_fetch_inferior_registers): Remove check for
11838 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11839 Pedro Alves <pedro@codesourcery.com>
11841 * target.h (struct target_ops) <supports_multi_process>: New
11843 (target_supports_multi_process): New.
11844 * server.c (handle_query): Even if GDB reports support, only
11845 enable multi-process if the target also supports it. Report
11846 multi-process support only if the target backend supports it.
11847 * linux-low.c (linux_supports_multi_process): New function.
11848 (linux_target_ops): Install it as target_supports_multi_process
11851 2009-05-24 Doug Evans <dje@google.com>
11853 Global renaming of find_thread_pid to find_thread_ptid.
11854 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11855 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11856 All callers updated.
11858 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11859 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11862 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11863 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11864 (linux_resume_one_lwp): Ditto.
11866 2009-05-23 Doug Evans <dje@google.com>
11868 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11869 from struct inferior_list_entry * to struct lwp_info *.
11870 All callers updated.
11872 2009-05-13 Doug Evans <dje@google.com>
11874 * linux-x86-low.c: Don't include assert.h.
11875 (x86_siginfo_fixup): Use fatal, not assert.
11876 (x86_arch_setup): Fix comment.
11878 2009-05-12 Doug Evans <dje@google.com>
11880 Biarch support for i386/amd64 gdbserver.
11881 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11882 Add linux-x86-low.c.
11883 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11884 (linux-x86-low.o): Add.
11885 * linux-x86-64-low.c: Delete.
11886 * linux-i386-low.c: Delete.
11887 * linux-x86-low.c: New file.
11888 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11890 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11892 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11893 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11894 (linux_child_pid_to_exec_file): New function.
11895 (elf_64_header_p, elf_64_file_p): New functions.
11896 (siginfo_fixup): New function.
11897 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11898 give target a chance to convert layout.
11899 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11900 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11902 2009-05-07 Doug Evans <dje@google.com>
11904 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11905 (regsets_store_inferior_registers): Ditto.
11907 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11911 * linux-low.c (must_set_ptrace_flags): Delete.
11912 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11914 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11915 `lwp->must_set_ptrace_flags' instead.
11916 (linux_wait_for_event_1): Set ptrace options here.
11917 (linux_wait_1): ... not here.
11919 2009-04-30 Doug Evans <dje@google.com>
11921 * inferiors.c (started_inferior_callback): New function.
11922 (attached_inferior_callback): New function.
11923 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11924 * server.c (print_started_pid, print_attached_pid): New functions.
11925 (detach_or_kill_for_exit): New function.
11926 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11927 * server.h (have_started_inferiors_p): Declare.
11928 (have_attached_inferiors_p): Declare.
11930 * inferiors.c (remove_process): Fix memory leak, free process.
11931 * linux-low.c (linux_remove_process): New function.
11932 (linux_kill): Call it instead of remove_process.
11933 (linux_detach, linux_wait_1): Ditto.
11935 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11937 * configure.srv: Add x86 Windows CE target.
11939 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11941 * inferiors.c (get_thread_process): Make global.
11942 * server.h (get_thread_process): Add prototype.
11943 * thread-db.c (find_one_thread): Use get_thread_process
11944 instead of current_process.
11945 (thread_db_get_tls_address): Do not crash if called when
11946 thread layer is not yet initialized.
11948 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11950 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11951 * spu-low.c (current_tid): Rename to ...
11952 (current_ptid): ... this.
11953 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11954 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11955 ptid_get_lwp (current_ptid) instead of current_tid.
11956 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11957 instead of current_tid. Use find_process_pid to verify pid
11958 argument is valid. Pass proper argument to remove_process.
11959 (spu_thread_alive): Compare current_ptid instead of current_tid.
11960 (spu_resume): Likewise.
11962 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11964 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11967 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11969 Implement the multiprocess extensions, and add linux multiprocess
11972 * server.h (ULONGEST): Declare.
11973 (struct ptid, ptid_t): New.
11974 (minus_one_ptid, null_ptid): Declare.
11975 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11976 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11977 (struct inferior_list_entry): Change `id' type from unsigned from
11979 (struct sym_cache, struct breakpoint, struct
11980 process_info_private): Forward declare.
11981 (struct process_info): Declare.
11982 (current_process): Declare.
11983 (all_processes): Declare.
11984 (initialize_inferiors): Declare.
11985 (add_thread): Adjust to use ptid_t.
11986 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11987 (add_process, remove_process, find_thread_pid): Declare.
11988 (find_inferior_id): Adjust to use ptid_t.
11989 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11990 (multi_process): Declare.
11991 (push_event): Adjust to use ptid_t.
11992 (read_ptid, write_ptid): Declare.
11993 (prepare_resume_reply): Adjust to use ptid_t.
11994 (clear_symbol_cache): Declare.
11995 * inferiors.c (all_processes): New.
11996 (null_ptid, minus_one_ptid): New.
11997 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11998 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11999 (add_thread): Change unsigned long to ptid. Remove gdb_id
12001 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12002 (gdb_id_to_thread): Rename to ...
12003 (find_thread_pid): ... this. Change unsigned long to ptid.
12004 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12005 (loaded_dll, pull_pid_from_list): Adjust.
12006 (add_process, remove_process, find_process_pid)
12007 (get_thread_process, current_process, initialize_inferiors): New.
12008 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12009 (struct target_waitstatus) <related_pid>: Ditto.
12010 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12011 return type to int.
12012 (struct target_ops) <join>: Add `pid' argument.
12013 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12014 (struct target_ops) <wait>: Add `ptid' field. Change return type
12016 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12017 (mywait): Add `ptid' argument. Change return type to ptid_t.
12018 (target_pid_to_str): Declare.
12019 * target.c (set_desired_inferior): Adjust to use ptids.
12020 (mywait): Add new `ptid' argument. Adjust.
12021 (target_pid_to_str): New.
12022 * mem-break.h (free_all_breakpoints): Declare.
12023 * mem-break.c (breakpoints): Delelete.
12024 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12025 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12026 to use per-process breakpoint list.
12027 (free_all_breakpoints): New.
12028 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12029 (symbol_cache, all_symbols_looked_up): Delete.
12031 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12033 (prepare_resume_reply): Change ptid argument's type from unsigned
12034 long to ptid_t. Adjust. Implement W;process and X;process.
12035 (free_sym_cache, clear_symbol_cache): New.
12036 (look_up_one_symbol): Adjust to per-process symbol cache. *
12037 * server.c (cont_thread, general_thread, step_thread): Change type
12039 (attached): Delete.
12040 (multi_process): New.
12041 (last_ptid): Change type to ptid_t.
12042 (struct vstop_notif) <ptid>: Change type to ptid_t.
12043 (queue_stop_reply, push_event): Change `ptid' argument's type to
12045 (discard_queued_stop_replies): Add `pid' argument.
12046 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12047 changes. Don't reference the `attached' global.
12048 (attach_inferior): Adjust to mywait interface changes.
12049 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12050 features. Handle and report "multiprocess+". Handle
12052 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12054 (handle_v_kill): New.
12055 (handle_v_stopped): Adjust to use target_pid_to_str.
12056 (handle_v_requests): Allow multiple attaches and runs when
12057 multiprocess extensions are in effect. Handle "vKill".
12058 (myresume): Adjust to use ptids.
12059 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12060 (handle_status): Adjust to discard_queued_stop_replies interface
12062 (first_thread_of, kill_inferior_callback)
12063 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12064 (main): Call initialize_inferiors. Adjust to use ptids, killing
12065 and detaching from all inferiors. Handle multiprocess packet
12067 * linux-low.h: Include gdb_proc_service.h.
12068 (struct process_info_private): New.
12069 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12070 <lwpid_of>: Use ptid_get_lwp.
12071 (get_lwp_thread): Adjust.
12072 (struct lwp_info): Add `dead' member.
12073 (find_lwp_pid): Declare.
12074 * linux-low.c (thread_db_active): Delete.
12075 (new_inferior): Adjust comment.
12076 (inferior_pid): Delete.
12077 (linux_add_process): New.
12078 (handle_extended_wait): Adjust.
12079 (add_lwp): Change unsigned long to ptid.
12080 (linux_create_inferior): Add process to processes table. Adjust
12081 to use ptids. Don't set new_inferior here.
12082 (linux_attach_lwp): Rename to ...
12083 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12084 it. Adjust to use ptids.
12085 (linux_attach_lwp): New.
12086 (linux_attach): Add process to processes table. Don't set
12088 (struct counter): New.
12089 (second_thread_of_pid_p, last_thread_of_process_p): New.
12090 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12091 multiple processes.
12092 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12093 processes. Remove process from process table.
12094 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12095 to multiple processes.
12096 (any_thread_of): New.
12097 (linux_detach): Add `pid' argument, and handle it. Remove process
12098 from processes table.
12099 (linux_join): Add `pid' argument. Handle it.
12100 (linux_thread_alive): Change unsighed long argument to ptid_t.
12101 Consider dead lwps as not being alive.
12102 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12103 threads we're not interested in.
12104 (same_lwp, find_lwp_pid): New.
12105 (linux_wait_for_lwp): Change `pid' argument's type from int to
12107 (linux_wait_for_event): Rename to ...
12108 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12109 from int to ptid_t. Adjust.
12110 (linux_wait_for_event): New.
12111 (linux_wait_1): Add `ptid' argument. Change return type to
12112 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12113 that exit from the process table.
12114 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12116 (mark_lwp_dead): New.
12117 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12118 stopping all threads, mark its main lwp as dead.
12119 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12121 (fetch_register, usr_store_inferior_registers)
12122 (regsets_fetch_inferior_registers)
12123 (regsets_store_inferior_registers, linux_read_memory)
12124 (linux_write_memory): Inline `inferior_pid'.
12125 (linux_look_up_symbols): Adjust to use per-process
12126 `thread_db_active'.
12127 (linux_request_interrupt): Adjust to use ptids.
12128 (linux_read_auxv): Inline `inferior_pid'.
12129 (initialize_low): Don't reference thread_db_active.
12130 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12131 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12132 (ps_getpid): Return the pid of the current inferior.
12133 * thread-db.c (proc_handle, thread_agent): Delete.
12134 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12136 (find_one_thread): Change argument type to ptid_t. Adjust to
12138 (maybe_attach_thread): Adjust to per-process data and ptids.
12139 (thread_db_find_new_threads): Ditto.
12140 (thread_db_init): Ditto.
12141 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12142 processes table. Adjust to use ptids.
12143 (spu_kill, spu_detach): Adjust interface. Remove process from
12145 (spu_join, spu_thread_alive): Adjust interface.
12146 (spu_wait): Adjust interface. Remove process from processes
12147 table. Adjust to use ptids.
12148 * win32-low.c (current_inferior_tid): Delete.
12149 (current_inferior_ptid): New.
12150 (debug_event_ptid): New.
12151 (thread_rec): Take a ptid. Adjust.
12152 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12153 (child_delete_thread): Ditto.
12154 (do_initial_child_stuff): Add `attached' argument. Add process to
12156 (child_fetch_inferior_registers, child_store_inferior_registers):
12158 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12159 (win32_attach): Pass 1 to do_initial_child_stuff.
12160 (win32_kill): Adjust interface. Remove process from processes
12162 (win32_detach): Ditto.
12163 (win32_join): Adjust interface.
12164 (win32_thread_alive): Take a ptid.
12165 (win32_resume): Adjust to use ptids.
12166 (get_child_debug_event): Ditto.
12167 (win32_wait): Adjust interface. Remove exiting process from
12170 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12172 Non-stop mode support.
12174 * server.h (non_stop): Declare.
12175 (gdb_client_data, handler_func): Declare.
12176 (delete_file_handler, add_file_handler, start_event_loop):
12178 (handle_serial_event, handle_target_event, push_event)
12179 (putpkt_notif): Declare.
12180 * target.h (enum resume_kind): New.
12181 (struct thread_resume): Replace `step' field by `kind' field.
12182 (TARGET_WNOHANG): Define.
12183 (struct target_ops) <wait>: Add `options' argument.
12184 <supports_non_stop, async, start_non_stop>: New fields.
12185 (target_supports_non_stop, target_async): New.
12186 (start_non_stop): Declare.
12187 (mywait): Add `options' argument.
12188 * target.c (mywait): Add `options' argument. Print child exit
12189 notifications here.
12190 (start_non_stop): New.
12191 * server.c (non_stop, own_buf, mem_buf): New globals.
12192 (struct vstop_notif): New.
12193 (notif_queue): New global.
12194 (queue_stop_reply, push_event, discard_queued_stop_replies)
12195 (send_next_stop_reply): New.
12196 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12198 (attach_inferior): In non-stop mode, don't wait for the target
12200 (handle_general_set): Handle QNonStop.
12201 (handle_query): When handling qC, return the current general
12202 thread, instead of the first thread of the list.
12203 (handle_query): If the backend supports non-stop mode, include
12204 QNonStop+ in the qSupported query response.
12205 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12207 (handle_v_attach, handle_v_run): Handle non-stop mode.
12208 (handle_v_stopped): New.
12209 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12210 (myresume): Adjust to use resume_kind. Handle non-stop.
12211 (queue_stop_reply_callback): New.
12212 (handle_status): Handle non-stop mode.
12213 (main): Clear non_stop flag on reconnection. Use the event-loop.
12214 Refactor serial protocol handling from here ...
12215 (process_serial_event): ... to this new function. When GDB
12216 selects any thread, select one here. In non-stop mode, wait until
12217 GDB acks all pending events before exiting.
12218 (handle_serial_event, handle_target_event): New.
12219 * remote-utils.c (remote_open): Install remote_desc in the event
12221 (remote_close): Remove remote_desc from the event loop.
12222 (putpkt_binary): Rename to...
12223 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12224 (putpkt_binary): New as wrapper around putpkt_binary_1.
12225 (putpkt_notif): New.
12226 (prepare_resume_reply): In non-stop mode, don't change the
12228 * event-loop.c: New.
12229 * Makefile.in (OBJ): Add event-loop.o.
12230 (event-loop.o): New rule.
12232 * linux-low.h (pid_of): Moved here.
12234 (get_lwp_thread): Use lwpid_of.
12235 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12236 * linux-low.c (pid_of): Delete.
12237 (inferior_pid): Use lwpid_of.
12238 (linux_event_pipe): New.
12239 (target_is_async_p): New.
12241 (handle_extended_wait): Use lwpid_of.
12242 (add_lwp): Don't set lwpid field.
12243 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12244 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12245 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12246 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12247 first. Adjust to linux_wait_for_event interface changes. Use
12249 (linux_detach): Don't delete the main lwp here.
12250 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12251 (status_pending_p): Don't consider explicitly suspended lwps.
12252 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12253 pointer. Add OPTIONS argument. Change return type to int. Use
12254 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12255 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12256 pointer. Add status pointer argument. Return a pid instead of a
12257 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12258 changes. In non-stop mode, don't switch to a random thread.
12259 (linux_wait): Rename to...
12260 (linux_wait_1): ... this. Add target_options argument, and handle
12261 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12262 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12263 clean exit and signal exit code. Don't stop all threads in
12264 non-stop mode. In all-stop mode, only stop all threads when
12265 reporting a stop to GDB. Handle explicit thread stop requests.
12266 (async_file_flush, async_file_mark): New.
12268 (send_sigstop): Use lwpid_of.
12269 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12270 interface changes. In non-stop mode, don't switch to a random
12272 (linux_resume_one_lwp): Use lwpid_of.
12273 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12274 (linux_resume_one_thread): ... this. Handle resume_stop. In
12275 non-stop mode, don't look for pending flag in all threads.
12276 (resume_status_pending_p): Don't consider explicitly suspended
12278 (my_waitpid): Reimplement. Emulate __WALL.
12279 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12281 (sigchld_handler, linux_supports_non_stop, linux_async)
12282 (linux_start_non_stop): New.
12283 (linux_target_ops): Register linux_supports_non_stop, linux_async
12284 and linux_start_non_stop.
12285 (initialize_low): Install SIGCHLD handler.
12286 * thread-db.c (thread_db_create_event, find_one_thread)
12287 (thread_db_get_tls_address): Use lwpid_of.
12288 * win32-low.c (win32_detach): Adjust to use resume_kind.
12289 (win32_wait): Add `options' argument.
12290 * spu-low.c (spu_resume): Adjust to use resume_kind.
12291 (spu_wait): Add `options' argument.
12293 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12295 Decouple target code from remote protocol.
12297 * target.h (enum target_waitkind): New.
12298 (struct target_waitstatus): New.
12299 (struct target_ops) <wait>: Return an unsigned long. Take a
12300 target_waitstatus pointer instead of a char pointer.
12301 (mywait): Likewise.
12302 * target.c (mywait): Change prototype to return an unsigned long.
12303 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12304 * server.h (thread_from_wait, old_thread_from_wait): Delete
12306 (prepare_resume_reply): Change prototype to take a
12308 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12309 (last_status, last_ptid): New.
12310 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12311 pid instead of a signal.
12312 (attach_inferior): Remove "status" and "signal" parameters.
12314 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12316 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12317 (handle_v_requests, myresume): Remove "status" and "signal"
12318 parameters. Adjust.
12319 (handle_status): New.
12320 (main): Delete local `status'. Adjust.
12321 * remote-utils.c: Include target.h.
12322 (prepare_resume_reply): Change prototype to take a
12323 target_waitstatus. Adjust.
12325 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12327 * spu-low.c (spu_wait): Adjust.
12328 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12330 (win32_wait): Adjust.
12332 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12334 * target.h (struct thread_resume): Delete leave_stopped member.
12335 (struct target_ops): Add a `n' argument to the `resume' callback.
12336 * server.c (start_inferior): Adjust.
12337 (handle_v_cont, myresume): Adjust.
12338 * linux-low.c (check_removed_breakpoint): Adjust to resume
12339 interface change, and to removed leave_stopped field.
12340 (resume_ptr): Delete.
12341 (struct thread_resume_array): New.
12342 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12343 resume interface change.
12344 (linux_continue_one_thread, linux_queue_one_thread)
12345 (resume_status_pending_p): Check if the resume field is NULL
12346 instead of checking the leave_stopped member.
12347 (linux_resume): Adjust to the target resume interface change.
12348 * spu-low.c (spu_resume): Adjust to the target resume interface
12350 * win32-low.c (win32_detach, win32_resume): Ditto.
12352 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12354 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12356 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12358 (linux_continue_one_thread): Only preserve the stepping flag if
12359 there's a pending breakpoint.
12361 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12363 * server.c (main): After the inferior having exited, call
12364 remote_close before exiting gdbserver.
12366 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12368 Fix size of FPSCR in Power 7 processors.
12369 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12370 (PPC_FEATURE_HAS_DFP): New #define.
12371 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12374 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12376 * server.c (handle_query) Whitespace and formatting.
12378 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12380 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12381 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12382 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12383 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12384 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12385 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12386 Makefile.in, configure.ac: Fix whitespace throughout.
12387 * configure: Regenerate.
12389 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12391 * inferiors.c (find_inferior): Make it safe for the callback
12392 function to delete the currently iterated inferior.
12394 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12396 * Makefile.in (linuw_low_h): Move higher.
12397 (thread-db.o): Depend on $(linux_low_h).
12399 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12401 Rename "process" to "lwp" throughout.
12403 * linux-low.c (all_processes): Rename to...
12404 (all_lwps): ... this.
12405 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12406 (add_process): Rename to ...
12407 (add_lwp): ... this. Adjust.
12408 (linux_create_inferior): Adjust.
12409 (linux_attach_lwp): Adjust.
12410 (linux_attach): Adjust.
12411 (linux_kill_one_process): Rename to ...
12412 (linux_kill_one_lwp): ... this. Adjust.
12413 (linux_kill): Adjust.
12414 (linux_detach_one_process): Rename to ...
12415 (linux_detach_one_lwp): ... this. Adjust.
12416 (linux_detach): Adjust.
12417 (check_removed_breakpoint): Adjust.
12418 (status_pending_p): Adjust.
12419 (linux_wait_for_process): Rename to ...
12420 (linux_wait_for_lwp): ... this. Adjust.
12421 (linux_wait_for_event): Adjust.
12422 (send_sigstop): Adjust.
12423 (wait_for_sigstop): Adjust.
12424 (stop_all_processes): Rename to ...
12425 (stop_all_lwps): ... this.
12426 (linux_resume_one_process): Rename to ...
12427 (linux_resume_one_lwp): ... this. Adjust.
12428 (linux_set_resume_request, linux_continue_one_thread)
12429 (linux_queue_one_thread, resume_status_pending_p)
12430 (usr_store_inferior_registers, regsets_store_inferior_registers)
12431 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12433 * linux-low.h (get_process): Rename to ...
12434 (get_lwp): ... this. Adjust.
12435 (get_thread_process): Rename to ...
12436 (get_thread_lwp): ... this. Adjust.
12437 (get_process_thread): Rename to ...
12438 (get_lwp_thread): ... this. Adjust.
12439 (struct process_info): Rename to ...
12440 (struct lwp_info): ... this.
12441 (all_processes): Rename to ...
12442 (all_lwps): ... this.
12443 * proc-service.c (ps_lgetregs): Adjust.
12444 * thread-db.c (thread_db_create_event, find_one_thread)
12445 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12447 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12449 * server.c (handle_query): Handle "qAttached".
12451 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12453 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12454 GPLv3, update license URL.
12456 2009-03-01 Doug Evans <dje@google.com>
12458 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12459 (server_h): Add gdb_signals.h.
12460 (signals.o): Update.
12461 * server.h (target_signal_from_host,target_signal_to_host_p)
12462 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12464 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12466 * remote-utils.c (getpkt): Also generate remote-debug
12467 information if noack_mode is set.
12469 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12471 * server.c (handle_query): Report qXfer:siginfo:read and
12472 qXfer:siginfo:write as supported and handle them.
12473 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12474 * linux-low.c (linux_xfer_siginfo): New.
12475 (linux_target_ops): Set it.
12477 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12479 * server.c (gdbserver_usage): Mention --remote-debug.
12480 (main): Accept '--remote-debug' switch.
12482 2009-01-18 Doug Evans <dje@google.com>
12484 * regcache.c (new_register_cache): No need to check result of xcalloc.
12485 * server.c (handle_search_memory): Back out calls to xmalloc,
12486 result is checked and error is returned to user upon failure.
12487 (handle_query): Ditto. Add more checks for result of malloc.
12488 (handle_v_cont): Check result of malloc, report error back to
12490 (handle_v_run): Ditto. Call freeargv.
12491 * server.h (freeargv): Declare.
12492 * utils.c (freeargv): New fn.
12494 2009-01-15 Doug Evans <dje@google.com>
12496 * gdbreplay.c (perror_with_name): Make arg const char *.
12497 * server.h (target_signal_to_name): Make return type const char *.
12498 * thread-db.c (thread_db_err_str): Make return type const char *.
12499 * utils.c (perror_with_name): Make arg const char *.
12501 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12503 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12504 when handling a EXIT_PROCESS_DEBUG_EVENT.
12506 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12508 * gdbreplay.c (gdbreplay_version): Update copyright year.
12509 * server.c (gdbserver_version): Likewise.
12511 2009-01-05 Doug Evans <dje@google.com>
12513 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12514 (handle_extended_wait): Improve comment.
12516 2008-12-13 Doug Evans <dje@google.com>
12518 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12519 * server.h (ATTR_MALLOC): New macro.
12520 (xmalloc,xcalloc,xstrdup): Declare.
12521 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12522 * inferiors.c: Ditto.
12523 * linux-low.c: Ditto.
12524 * mem-break.c: Ditto.
12525 * regcache.c: Ditto.
12526 * remote-utils.c: Ditto.
12529 * win32-low.c: Ditto.
12531 2008-12-12 Doug Evans <dje@google.com>
12533 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12534 in debugging printf.
12536 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12538 2008-12-09 Doug Evans <dje@google.com>
12540 * linux-low.h (struct process_info): Delete member tid, unused.
12541 * thread-db.c (find_one_thread): Update.
12542 (maybe_attach_thread): Update.
12544 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12546 * target.h (struct target_ops): Add qxfer_osdata member.
12547 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12549 (linux_qxfer_osdata): New functions.
12550 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12552 * server.c (handle_query): Handle "qXfer:osdata:read:".
12553 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12554 (buffer_xml_printf): New functions.
12555 * server.h (struct buffer): New.
12556 (buffer_grow_str, buffer_grow_str0): New macros.
12557 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12558 (buffer_xml_printf): Declare.
12560 2008-11-24 Doug Evans <dje@google.com>
12562 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12564 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12566 * server.c (handle_v_run): Always use the supplied argument list.
12568 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12570 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12571 (xtensa_regmap_table): Add entry for scompare1.
12573 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12575 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12576 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12577 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12578 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12579 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12580 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12581 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12582 XML target descriptions.
12583 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12584 when inferior is running on an ISA 2.05 or later processor. Add
12585 special case to return offset for full 64-bit slot of FPSCR when
12588 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12590 * Makefile.in (SFILES, clean): Added sparc64 files.
12591 (reg-sparc64.o, reg-sparc64.c): New.
12592 * configure.srv (sparc*-*-linux*): New configuration.
12593 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12594 syscall arguments for SPARC.
12595 (regsets_store_inferior_registers): Likewise.
12596 * linux-sparc-low.c: New file.
12598 2008-10-21 Doug Evans <dje@google.com>
12600 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12601 (READLINE_DIR,READLINE_DEP): Delete.
12602 (INTERNAL_CFLAGS): Update.
12603 (LINTFLAGS): Update.
12605 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12607 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12608 whole argv from the last run, not just argv[0].
12610 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12612 * regcache.c (new_register_cache): Return NULL if the register
12613 cache size isn't known yet.
12614 (free_register_cache): Avoid dereferencing a NULL regcache.
12616 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12618 * configure.srv: Merge MIPS and MIPS64.
12620 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12622 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12624 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12626 * Makefile.in: Add required vsx dependencies.
12628 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12629 Declare init_registers_powerpc_vsx32l.
12630 Declare init_registers_powerpc_vsx64l.
12631 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12632 (ppc_arch_setup): Check for VSX in hwcap.
12633 (ppc_fill_vsxregset): New function.
12634 (ppc_store_vsxregset): New function.
12635 Add new VSX entry in regset_info target_regsets.
12637 * configure.srv: Add new VSX dependencies.
12639 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12641 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12642 (remote_open): Set or clear transport_is_reliable.
12643 (putpkt_binary): Don't expect acks in noack mode.
12644 (getpkt): Don't send ack/nac in noack mode.
12645 * server.c (handle_general_set): Handle QStartNoAckMode.
12646 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12648 (main): Reset noack_mode on every connection.
12649 * server.h (noack_mode): Declare.
12651 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12653 * Makefile.in (GDBREPLAY_OBS): New variable.
12654 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12656 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12657 Daniel Jacobowitz <dan@codesourcery.com>
12659 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12660 (usr_store_inferior_registers): Likewise.
12661 (regsets_store_inferior_registers): Likewise.
12663 2008-07-31 Rolf Jansen <rj@surtec.com>
12664 Pedro Alves <pedro@codesourcery.com>
12666 * configure.ac: Check for memmem declaration.
12667 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12668 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12669 (disable_packet_qfThreadInfo): Unconditionally compile.
12670 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12671 * configure, config.in: Regenerate.
12673 2008-07-28 Doug Kwan <dougkwan@google.com>
12675 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12676 (linux_write_memory): Remove declaration of errno.
12678 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12680 * linux-low.c (handle_extended_wait): Do not use "status"
12681 variable uninitialized.
12683 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12685 * server.c (handle_v_attach): Inhibit reporting dll changes.
12687 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12689 * remote-utils.c (prepare_resume_reply): If requested, don't
12690 output "thread:TID" in the T stop reply.
12692 * server.c (disable_packet_vCont, disable_packet_Tthread)
12693 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12694 (handle_query): If requested, disable support for qC, qfThreadInfo
12696 (handle_v_requests): If requested, disable support for vCont.
12697 (gdbserver_show_disableable): New.
12698 (main): Handle --disable-packet and --disable-packet=LIST.
12700 * server.h (disable_packet_vCont, disable_packet_Tthread)
12701 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12703 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12705 * server.c (gdbserver_usage): Mention --version.
12707 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12709 * Makefile.in (gdbreplay.o): New rule.
12711 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12713 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12714 message, not gdbserver.
12716 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12717 Nathan Sidwell <nathan@codesourcery.com>
12718 Joseph Myers <joseph@codesourcery.com>
12720 * acinclude.m4: Include ../../config/acx.m4.
12721 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12722 * configure, config.in: Regenerate.
12723 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12724 * server.c (gdbserver_version): Print PKGVERSION.
12725 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12726 (main): Adjust gdbserver_usage calls.
12727 * gdbreplay.c (version, host_name): Add declarations.
12728 (gdbreplay_version, gdbreplay_usage): New.
12729 (main): Accept --version and --help options.
12731 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12733 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12734 (arm_breakpoint_at): Handle Thumb.
12735 (the_low_target): Add comment.
12737 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12739 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12741 2008-05-09 Doug Evans <dje@google.com>
12743 * server.h (decode_search_memory_packet): Declare.
12744 * remote-utils.c (decode_search_memory_packet): New fn.
12745 * server.c (handle_search_memory_1): New fn.
12746 (handle_search_memory): New fn.
12747 (handle_query): Process qSearch:memory packets.
12749 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12751 * regcache.c (registers_length): Remove.
12752 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12753 full register packet.
12754 * regcache.h (registers_length): Remove prototype.
12755 * server.h (PBUFSIZ): Define to 16384.
12757 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12759 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12760 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12761 powerpc-64l.o, and powerpc-altivec64l.o.
12762 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12763 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12764 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12765 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12766 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12769 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12770 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12771 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12772 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12773 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12774 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12775 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12776 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12777 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12778 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12781 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12782 (init_registers_powerpc_32l): ... this new prototype.
12783 (init_registers_powerpc_32): Remove, replace by ...
12784 (init_registers_powerpc_altivec32l): ... this new prototype.
12785 (init_registers_powerpc_e500): Remove, replace by ...
12786 (init_registers_powerpc_e500l): ... this new prototype.
12787 (init_registers_ppc64): Remove, replace by ...
12788 (init_registers_powerpc_64l): ... this new prototype.
12789 (init_registers_powerpc_64): Remove, replace by ...
12790 (init_registers_powerpc_altivec64l): ... this new prototype.
12791 (ppc_num_regs): Set to 73.
12792 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12793 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12794 (ppc_cannot_store_register): Handle orig_r3 and trap.
12795 (ppc_arch_setup): Update init_registers_... calls.
12796 (ppc_fill_gregset): Handle orig_r3 and trap.
12798 * inferiors.c (clear_inferiors): Reset current_inferior.
12800 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12802 * acinclude.m4: Add override.m4.
12803 * configure: Regenerate.
12805 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12807 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12808 initial call to init_register_ppc64.
12810 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12812 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12813 single powerpc*-*-linux* case.
12814 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12816 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12818 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12819 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12821 * linux-ppc-low.c: Include <elf.h>.
12822 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12823 (ppc_hwcap): New global variable.
12824 (ppc_regmap): Remove __SPE__ #ifdef sections.
12825 (ppc_regmap_e500): New global variable.
12826 (ppc_cannot_store_register): Update __SPE__ special case.
12827 (ppc_get_hwcap): New function.
12828 (ppc_arch_setup): Use it to determine whether inferior supports
12829 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12830 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12831 Do not access registers if target does not support AltiVec.
12832 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12833 Do not access registers if target does not support SPE.
12834 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12836 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12838 * linux-low.c (disabled_regsets, num_regsets): New.
12839 (use_regsets_p): Delete.
12840 (linux_wait_for_process): Clear disabled_regsets.
12841 (regsets_fetch_inferior_registers): Check and set it.
12842 (regsets_store_inferior_registers): Likewise.
12843 (linux_fetch_registers, linux_store_registers): Do not use
12845 (initialize_low): Allocate disabled_regsets.
12847 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12849 * Makefile.in (LIBOBJS): New.
12850 (OBS): Use LIBOBJS.
12851 (memmem.o): New rule.
12852 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12853 * configure: Regenerated.
12855 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12857 * server.c (handle_query): Never return "unsupported" for
12858 qXfer:features:read queries.
12860 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12862 * server.c (get_features_xml): Fix inverted condition.
12863 (handle_query): Always support qXfer:feature:read.
12865 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12867 * server.c (wrapper_argv): New.
12868 (start_inferior): Handle wrapper_argv. If set, expect an extra
12870 (gdbserver_usage): Document --wrapper.
12871 (main): Parse --wrapper.
12873 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12875 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12876 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12877 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12878 (ppc_set_pc): Likewise.
12879 (ppc_arch_setup): New function.
12880 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12881 of collect_register.
12882 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12884 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12886 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12887 instead of linux-ppc64-low.o.
12888 * linux-ppc64-low.c: Remove file.
12889 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12890 (linux-ppc64-low.o): Remove rule.
12892 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12893 (init_registers_powerpc_64): Likewise.
12894 (ppc_regmap): Conditionally define depending on __powerpc64__.
12895 (ppc_cannot_store_register): Do not special-case "fpscr" when
12896 compiled on __powerpc64__.
12897 (ppc_collect_ptrace_register): New function.
12898 (ppc_supply_ptrace_register): New function.
12899 (ppc_breakpoint): Change type to "unsigned int".
12900 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12901 (the_low_target): Conditionally provide initializers for the
12902 arch_setup member depending on __powerpc64__. Install
12903 collect_ptrace_register and supply_ptrace_register members.
12905 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12907 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12908 * server.c (gdbserver_xmltarget): Define.
12909 (get_features_xml): Use it to replace "target.xml" and arch_string.
12911 * configure.srv: Remove srv_xmltarget. Add XML files that were
12912 mentioned there to srv_xmlfiles instead. Remove conditional tests
12913 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12914 srv_xmlfiles and srv_regobj to include all possible choices.
12915 * configure.ac (srv_xmltarget): Remove.
12916 (srv_xmlfiles): Do not add "target.xml".
12917 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12918 checks for supplementary target information.
12919 * configure: Regenerate.
12920 * Makefile.in (XML_TARGET): Remove.
12921 (target.xml): Remove rule.
12922 (clean): Do not clean up target.xml.
12923 (.PRECIOUS): Do not mention target.xml.
12925 * target.h (struct target_ops): Remove arch_string member.
12926 * linux-low.c (linux_arch_string): Remove.
12927 (linux_target_ops): Remove arch_string initializer.
12928 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12929 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12930 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12931 * spu-low.c (spu_arch_string): Remove.
12932 (spu_target_ops): Remove arch_string initializer.
12933 * win32-low.c (win32_arch_string): Remove.
12934 (win32_target_ops): Remove arch_string initializer.
12935 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12936 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12937 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12939 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12941 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12942 by collect_ptrace_register and supply_ptrace_register hooks.
12943 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12944 instead of checking for the_low_target.left_pad_xfer.
12945 (usr_store_inferior_registers): Use collect_ptrace_register callback
12946 instead of checking for the_low_target.left_pad_xfer.
12948 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12949 (s390_supply_ptrace_register): Likewise.
12950 (s390_fill_gregset): Call s390_collect_ptrace_register.
12951 (the_low_target): Update.
12953 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12954 (ppc_supply_ptrace_register): Likewise.
12955 (the_low_target): Update.
12957 * linux-i386-low.c (the_low_target): Update.
12958 * linux-x86-64-low.c (the_low_target): Update.
12960 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12962 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12963 reg-s390.o and reg-s390x.o.
12965 * linux-low.c (new_inferior): New global variable.
12966 (linux_create_inferior, linux_attach): Set it.
12967 (linux_wait_for_process): Call the_low_target.arch_setup after the
12968 target has stopped for the first time.
12969 (initialize_low): Do not call the_low_target.arch_setup.
12971 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12972 (s390_set_pc): Likewise.
12973 (s390_arch_setup): New function.
12974 (the_low_target): Use s390_arch_setup as arch_setup routine.
12976 * regcache.c (realloc_register_cache): New function.
12977 (set_register_cache): Call it for each existing regcache.
12979 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12981 * server.h (init_registers): Remove prototype.
12983 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12984 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12985 instead of init_registers ().
12986 * linux-arm-low.c (init_registers_arm): Add prototype.
12987 (init_registers_arm_with_iwmmxt): Likewise.
12988 (the_low_target): Add initializer for arch_setup field.
12989 * linux-cris-low.c (init_registers_cris): Add prototype.
12990 (the_low_target): Add initializer for arch_setup field.
12991 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12992 (the_low_target): Add initializer for arch_setup field.
12993 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12994 (the_low_target): Add initializer for arch_setup field.
12995 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12996 (the_low_target): Add initializer for arch_setup field.
12997 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12998 (the_low_target): Add initializer for arch_setup field.
12999 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13000 (the_low_target): Add initializer for arch_setup field.
13001 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13002 (init_registers_mips64_linux): Likewise.
13003 (the_low_target): Add initializer for arch_setup field.
13004 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13005 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13006 (the_low_target): Add initializer for arch_setup field.
13007 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13008 (init_registers_powerpc_64): Likewise.
13009 (the_low_target): Add initializer for arch_setup field.
13010 * linux-s390-low.c (init_registers_s390): Add prototype.
13011 (init_registers_s390x): Likewise.
13012 (the_low_target): Add initializer for arch_setup field.
13013 * linux-sh-low.c (init_registers_sh): Add prototype.
13014 (the_low_target): Add initializer for arch_setup field.
13015 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13016 (the_low_target): Add initializer for arch_setup field.
13017 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13018 (the_low_target): Add initializer for arch_setup field.
13020 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13021 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13022 instead of init_registers ().
13023 * win32-arm-low.c (init_registers_arm): Add prototype.
13024 (the_low_target): Add initializer for arch_setup field.
13025 * win32-i386-low.c (init_registers_i386): Add prototype.
13026 (the_low_target): Add initializer for arch_setup field.
13028 * spu-low.c (init_registers_spu): Add prototype.
13029 (initialize_low): Call initialie_registers_spu () instead of
13030 initialize_registers ().
13032 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13034 * server.c (handle_v_requests): When handling the vRun and vAttach
13035 packets, if already debugging a process, don't kill it. Return an
13038 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13040 * server.c (handle_query): Correct length check.
13042 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13044 * win32-low.c (do_initial_child_stuff): Add process handle
13045 parameter. Set current_process_handle and current_process_id from the
13046 parameters. Clear globals.
13047 (win32_create_inferior): Don't set current_process_handle and
13048 current_process_id here. Instead pass them on the call to
13049 do_initial_child_stuff.
13050 (win32_attach): Likewise.
13051 (win32_clear_inferiors): New.
13052 (win32_kill): Don't close the current process handle or the
13053 current thread handle here. Instead call win32_clear_inferiors.
13054 (win32_detach): Don't open a new handle to the process. Call
13055 win32_clear_inferiors.
13056 (win32_join): Don't rely on current_process_handle; open a new
13057 handle using the process id.
13058 (win32_wait): Call win32_clear_inferiors when the inferior process
13061 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13063 * server.c (monitor_show_help): Add "exit".
13065 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13067 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13068 (clean): Add reg-xtensa.c.
13069 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13070 * configure.srv (xtensa*-*-linux*) New target.
13071 * linux-xtensa-low.c: New.
13072 * xtensa-xtregs.c: New.
13074 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13076 * hostio.c: Don't include errno.h.
13077 (errno_to_fileio_errno): Move to hostio-errno.
13078 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13079 error number outputting to the target->hostio_last_error callback.
13080 (hostio_packet_error): Use FILEIO_EINVAL directly.
13081 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13082 calls to hostio_error.
13083 * hostio-errno.c: New.
13084 * server.h (hostio_last_error_from_errno): Declare.
13085 * target.h (target_ops): Add hostio_last_error member.
13086 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13087 as hostio_last_error handler.
13088 * spu-low.c (spu_target_ops): Likewise.
13089 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13090 (wince_hostio_last_error): New functions.
13091 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13092 as hostio_last_error handler.
13093 (win32_target_ops) [!_WIN32_WCE]: Register
13094 hostio_last_error_from_errno as hostio_last_error handler.
13095 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13096 (hostio-errno.o): New rule.
13097 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13098 * configure.srv (srv_hostio_err_objs): New variable. Default to
13100 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13101 * configure: Regenerate.
13103 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13105 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13106 (linux_kill, linux_detach): Clean up the process list.
13107 * remote-utils.c (remote_open): Improve port number parsing.
13108 (putpkt_binary, input_interrupt): Only send interrupts if the target
13110 * server.c (extended_protocol): Make static.
13111 (attached): Define earlier.
13112 (exit_requested, response_needed, program_argv): New variables.
13113 (target_running): New.
13114 (start_inferior): Clear attached here.
13115 (attach_inferior): Set attached here.
13116 (require_running): Define.
13117 (handle_query): Use require_running and target_running. Implement
13119 (handle_v_attach, handle_v_run): New.
13120 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13121 (gdbserver_usage): Update.
13122 (main): Redo argument parsing. Handle --debug and --multi. Handle
13123 --attach along with other options or after the port. Save
13124 program_argv. Support no initial program. Resynchronize
13125 communication with GDB after an error. Handle "monitor exit".
13126 Use require_running and target_running. Always allow the extended
13127 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13128 restart in extended mode.
13129 * README: Refer to the GDB manual. Update --attach usage.
13131 2007-12-20 Andreas Schwab <schwab@suse.de>
13133 * linux-low.c (STACK_SIZE): Define.
13134 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13135 (linux_test_for_tracefork): Likewise.
13137 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13139 * linux-low.c (linux_wait_for_event): Update messages. Do not
13140 reinsert auto-delete breakpoints.
13141 * mem-break.c (struct breakpoint): Change return type of handler to
13143 (set_breakpoint_at): Update handler type.
13144 (reinsert_breakpoint_handler): Return 1 instead of calling
13146 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13148 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13149 * mem-break.h (set_breakpoint_at): Update handler type.
13150 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13151 * win32-low.c (auto_delete_breakpoint): New.
13152 (get_child_debug_event): Use it.
13154 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13156 * configure.ac: Check for pread and pwrite.
13157 * hostio.c (handle_pread): Fall back to lseek and read.
13158 (handle_pwrite): Fall back to lseek and write.
13159 * config.in, configure: Regenerated.
13161 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13163 * server.c (myresume): Add own_buf argument.
13164 (main): Update calls.
13166 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13168 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13169 * remote-utils.c (remote_open): Do not call disable_async_io.
13170 (block_async_io): Delete.
13171 (unblock_async_io): Make static.
13172 (initialize_async_io): New.
13173 * server.c (handle_v_cont): Handle async I/O here.
13174 (myresume): Likewise. Move other common resume tasks here...
13175 (main): ... from here. Call initialize_async_io. Disable async
13176 I/O before the main loop.
13177 * server.h (initialize_async_io): Declare.
13178 (block_async_io, unblock_async_io): Delete prototypes.
13179 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13181 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13183 * remote-utils.c (readchar): Allow binary data in received messages.
13185 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13187 * win32-low.c (attaching): New global.
13188 (win32_create_inferior): Clear the `attaching' global.
13189 (win32_attach): Set the `attaching' global.
13190 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13191 attaching. Only set a breakpoint at the entry point if not
13194 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13196 * server.c (main): Don't report dll events on the initial
13197 connection on attaches.
13199 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13201 * server.c (main): Relax numerical bases supported for the pid of
13202 the --attach command line argument.
13204 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13206 * win32-low.c (win32_attach): Call OpenProcess before
13207 DebugActiveProcess, not after. Add last error output to error
13210 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13212 * win32-low.c (win32_get_thread_context)
13213 (win32_set_thread_context): New functions.
13214 (thread_rec): Use win32_get_thread_context.
13215 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13216 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13219 2007-12-03 Leo Zayas
13220 Pedro Alves <pedro_alves@portugalmail.pt>
13222 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13224 (child_add_thread): Minor cleanup.
13225 (child_continue): Resume artificially suspended threads before
13226 calling ContinueDebugEvent.
13227 (suspend_one_thread): New.
13228 (fake_breakpoint_event): New.
13229 (get_child_debug_event): Change return type to int. Check here if
13230 gdb sent an interrupt request. If a soft interrupt was requested,
13231 fake a breakpoint event. Return 0 if there is no event to handle,
13233 (win32_wait): Don't check here if gdb sent an interrupt request.
13234 Ensure there is a valid event to handle.
13235 (win32_request_interrupt): Add soft interruption method as last
13238 2007-12-03 Leo Zayas
13239 Pedro Alves <pedro_alves@portugalmail.pt>
13241 * win32-low.h (win32_thread_info): Add descriptions to the
13242 structure members. Replace `suspend_count' counter by a
13244 * win32-low.c (thread_rec): Update condition of when to get the
13245 context from the inferior. Rely on ContextFlags being set if it
13246 has already been retrieved. Only suspend the inferior thread if
13247 we haven't already. Warn if that fails.
13248 (continue_one_thread): s/suspend_count/suspended/. Only call
13249 ResumeThread once. Warn if that fails.
13251 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13253 * win32-low.c (win32_wait): Don't read from the inferior when it
13254 has already exited.
13256 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13258 * Makefile.in (win32_low_h): New variable.
13259 (win32-low.o): Add dependency on $(win32_low_h).
13260 (win32-arm-low.o, win32-i386-low.o): New rules.
13262 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13264 * hostio.c: Correct copyright year.
13266 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13268 * Makefile.in (OBS): Add hostio.o.
13269 (hostio.o): New rule.
13270 * server.h (handle_vFile): Declare.
13271 * hostio.c: New file.
13272 * server.c (handle_v_requests): Take packet_len and new_packet_len
13273 for binary packets. Call handle_vFile.
13274 (main): Update call to handle_v_requests.
13276 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13278 * linux-low.c: Include <sched.h>.
13280 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13282 * linux-low.c (linux_tracefork_grandchild): New.
13283 (linux_tracefork_child): Use clone.
13284 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13286 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13288 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13290 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13292 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13294 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13296 * inferiors.c (change_inferior_id): Delete.
13297 (add_pid_to_list, pull_pid_from_list): New.
13298 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13299 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13300 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13301 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13302 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13303 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13304 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13305 (using_threads): Always set to 1.
13306 (handle_extended_wait): New.
13307 (add_process): Do not set TID.
13308 (linux_create_inferior): Set must_set_ptrace_flags.
13309 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13310 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13311 (linux_thread_alive): Rename TID argument to LWPID.
13312 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13313 (linux_wait_for_event): Do not use TID or check using_threads. Update
13314 call to dead_thread_notify. Call handle_extended_wait.
13315 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13316 (send_sigstop): Delete sigstop_sent.
13317 (wait_for_sigstop): Avoid TID.
13318 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13319 (linux_test_for_tracefork): New.
13320 (linux_lookup_signals): Use thread_db_active and
13321 linux_supports_tracefork_flag.
13322 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13323 * linux-low.h (get_process_thread): Avoid TID.
13324 (struct process_ifo): Move thread_known and tid to the end. Remove
13326 (linux_attach_lwp, thread_db_init): Update prototypes.
13327 * server.h (change_inferior_id): Delete prototype.
13328 (add_pid_to_list, pull_pid_from_list): New prototypes.
13329 * thread-db.c (thread_db_use_events): New.
13330 (find_first_thread): Rename to...
13331 (find_one_thread): ...this. Update callers and messages. Do not
13332 call fatal. Check thread_db_use_events. Do not call
13333 change_inferior_id or new_thread_notify.
13334 (maybe_attach_thread): Update. Do not call new_thread_notify.
13335 (thread_db_init): Set thread_db_use_events. Check use_events.
13336 * utils.c (fatal, warning): Correct message prefix.
13338 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13340 * Makefile.in (clean): Remove new files.
13341 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13342 (powerpc-64.o, powerpc-64.c): New rules.
13343 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13344 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13346 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13348 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13349 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13350 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13351 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13352 (target_regsets): Add AltiVec and SPE register sets.
13353 * configure.ac: Check for AltiVec and SPE.
13354 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13355 (ppc_fill_vrregset, ppc_store_vrregset): New.
13356 (target_regsets): Add AltiVec register set.
13357 * configure: Regenerated.
13359 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13361 * linux-low.c (O_LARGEFILE): Define.
13362 (linux_read_memory): Use /proc/PID/mem.
13363 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13364 * configure, config.in: Regenerated.
13366 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13368 * linux-low.c (linux_wait_for_event): Do not pass signals while
13371 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13373 * win32-low.c (create_process): New.
13374 (win32_create_inferior): Use create_process instead of
13375 CreateProcess. If create_process failed retry appending an ".exe"
13376 suffix. Store the GetLastError result immediatelly after
13377 create_process calls and use it on the call to error.
13379 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13381 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13383 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13385 * configure.ac: Switch license to GPLv3.
13387 2007-08-01 Michael Snyder <msnyder@access-company.com>
13389 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13391 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13393 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13395 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13396 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13397 CloseToolhelp32Snapshot.
13398 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13399 CloseToolhelp32Snapshot.
13401 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13403 * server.c (main): Check for inferior exit before main loop.
13405 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13407 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13408 instead of on tmp_desc.
13410 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13411 Daniel Jacobowitz <dan@codesourcery.com>
13413 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13414 (add_thread): Minor cleanups.
13415 (clear_inferiors): Move lower in the file. Clear the DLL
13417 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13418 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13419 (xml_escape_text): New.
13420 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13422 (handle_v_cont): Report errors.
13423 (gdbserver_version): Update.
13424 (main): Correct size of own_buf. Do not report initial DLL events.
13425 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13426 (unloaded_dll, xml_escape_text): New.
13427 * win32-low.c (enum target_waitkind): Update comments.
13428 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13429 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13430 (win32_EnumProcessModules, win32_GetModuleInformation)
13431 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13432 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13433 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13434 (win32_Module32First, win32_Module32Next, load_toolhelp)
13435 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13436 (get_child_debug_event): Handle DLL events.
13437 (win32_wait): Likewise.
13439 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13441 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13442 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13444 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13446 * win32-low.c (handle_output_debug_string): Ignore event if not
13449 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13451 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13453 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13455 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13457 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13459 * inferiors.c (change_inferior_id): Add comment.
13460 * linux-low.c (check_removed_breakpoint): Add an early
13461 prototype. Improve debug output.
13462 (linux_attach): Doc update.
13463 (linux_detach_one_process, linux_detach): Clean up before releasing
13465 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13466 * linux-low.h (struct process_info): Doc improvement.
13467 * mem-break.c (delete_all_breakpoints): New.
13468 * mem-break.h (delete_all_breakpoints): New prototype.
13469 * thread-db.c (find_first_thread): New.
13470 (thread_db_create_event): Call it instead of
13471 thread_db_find_new_threads. Clean up unused variables.
13472 (maybe_attach_thread): Remove first thread handling.
13473 (thread_db_find_new_threads): Use find_first_thread.
13474 (thread_db_get_tls_address): Likewise.
13476 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13478 * thread-db.c (thread_db_find_new_threads): Add prototype.
13479 (thread_db_create_event): Check for the main thread before adding
13481 (maybe_attach_thread): Only enable event reporting if TID == 0.
13482 (thread_db_get_tls_address): Check for new threads.
13484 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13486 * linux-low.c (linux_create_inferior): Try execv before execvp.
13487 * spu-low.c (spu_create_inferior): Likewise.
13489 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13491 * linux-low.c (linux_create_inferior): Change execv to execvp.
13492 * spu-low.c (spu_create_inferior): Likewies.
13494 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13496 * Makefile.in (clean): Clean new files instead of deleted ones.
13497 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13498 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13500 * configure.srv: Specify XML files and new regformats for MIPS and
13502 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13503 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13504 an entry for the restart register.
13505 (mips_cannot_fetch_register, mips_cannot_store_register)
13506 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13507 register names to match the XML descriptions.
13508 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13509 restart register instead of $0.
13511 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13512 Markus Deuling <deuling@de.ibm.com>
13514 * remote-utils.c (decode_xfer_write): New function.
13515 * server.h (decode_xfer_write): Add prototype.
13516 * server.c (handle_query): Add PACKET_LEN argument. Support
13517 qXfer:spu:read and qXfer:spu:write packets.
13518 (main): Pass packet_len to handle_query.
13519 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13520 * target.h (target_ops): Add qxfer_spu.
13522 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13524 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13525 accessing non-seekable spufs files.
13527 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13529 * server.c (handle_query): Add reply for qC packet.
13531 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13532 Leo Zayas <lerele@champenstudios@com>
13534 * server.h (check_remote_input_interrupt_request): New function.
13535 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13536 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13537 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13538 (check_remote_input_interrupt_request): New function.
13539 * server.h (check_remote_input_interrupt_request): Declare.
13540 * win32-low.c (winapi_DebugBreakProcess,
13541 winapi_GenerateConsoleCtrlEvent): New typedefs.
13542 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13544 (win32_wait): Check for remote interrupt request
13545 with check_remote_input_interrupt_request.
13546 (win32_request_interrupt): New function.
13547 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13549 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13551 * win32-low.c (debug_registers_changed,
13552 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13553 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13554 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13555 (thread_rec): Get context using the low target.
13556 (child_add_thread): Call thread_added on the low target,
13557 which does the same thing.
13559 (do_initial_child_stuff): Remove debug registers references.
13560 Set context using the low target. Resume threads after
13561 setting the contexts.
13562 (child_continue): Remove dead variable. Remove debug
13563 registers references.
13564 (child_fetch_inferior_registers): Go through the low target.
13565 (do_child_store_inferior_registers): Remove.
13566 (child_store_inferior_registers): Go through the low target.
13567 (win32_resume): Remove debug registers references.
13568 Set context using the low target.
13569 (handle_exception): Change return type to void. Don't record
13570 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13571 first chance exception.
13572 (get_child_debug_event): Change return type to void. Remove
13573 goto loop. Always return after waiting for debug event.
13574 (win32_wait): Convert to switch statement. Handle spurious
13577 * win32-i386-low.c (debug_registers_changed,
13578 debug_registers_used): New.
13579 (initial_stuff): Rename to ...
13580 (i386_initial_stuff): ... this. Clear debug registers
13582 (store_debug_registers): Delete.
13583 (i386_get_thread_context): New.
13584 (load_debug_registers): Delete.
13585 (i386_set_thread_context): New.
13586 (i386_thread_added): New.
13587 (single_step): Rename to ...
13588 (i386_single_step): ... this.
13589 (do_fetch_inferior_registers): Rename to ...
13590 (i386_fetch_inferior_register): ... this.
13591 (i386_store_inferior_register): New.
13592 (the_low_target): Adapt to new interface.
13594 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13595 (arm_get_thread_context): New.
13596 (arm_set_thread_context): New.
13598 (do_fetch_inferior_registers): Rename to ...
13599 (arm_fetch_inferior_register): ... this.
13600 (arm_store_inferior_register): New.
13601 (arm_wince_breakpoint): Reimplement as unsigned long.
13602 (arm_wince_breakpoint_len): Define.
13603 (the_low_target): Adapt to new interface.
13605 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13606 load_debug_registers. Add get_thread_context, set_thread_context,
13607 thread_added and store_inferior_register. Rename
13608 fetch_inferior_registers to fetch_inferior_register.
13609 (regptr): Remove declaration.
13611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13613 * linux-low.c (linux_detach): Change return type to int. Return 0.
13614 * spu-low.c (spu_detach): Likewise.
13616 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13618 * target.h (target_ops): Change return type of detach to int.
13620 (join_inferior): New.
13621 * server.c (main): Don't skip detach support on mingw32.
13622 If the inferior doesn't support detaching return error.
13623 Call join_inferior instead of using waitpid.
13624 * linux-low.c (linux_join): New.
13625 (linux_target_op): Add linux_join.
13626 * spu-low.c (spu_join): New.
13627 (spu_target_ops): Add spu_join.
13628 * win32-low.c (win32_detach): Adapt to new interface.
13629 Reopen current_process_handle before detaching. Issue a child
13630 resume before detaching.
13632 (win32_target_op): Add win32_join.
13634 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13636 * win32-low.c (win32-attach): Fix return value.
13637 * target.h (target_ops): Describe ATTACH return values.
13639 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13641 * win32-low.c (GETPROCADDRESS): Define.
13642 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13643 (winapi_DebugSetProcessKillOnExit): Likewise.
13644 (win32_create_inferior): Force usage of ansi CreateProcessA.
13645 (win32_attach): Use GETPROCADDRESS.
13646 (win32_detach): Likewise.
13648 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13650 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13652 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13654 * win32-low.c: Commit leftover changes from 2007-03-29.
13656 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13658 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13659 fields short instead of int. Add explicit padding.
13660 (i387_cache_to_fsave): Remove unnecessary casts.
13661 (i387_fsave_to_cache): Doc fix.
13662 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13664 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13666 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13667 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13669 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13671 * configure.srv (arm*-*-mingw32ce*): Move near the other
13674 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13676 * configure.ac: Add errno checking.
13677 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13678 sys/file.h and malloc.h.
13679 (AC_CHECK_DECLS): Add perror.
13680 (srv_mingwce): Handle.
13681 * configure.srv (i[34567]86-*-cygwin*): Add
13682 win32-i386-low.o to srv_tgtobj.
13683 (i[34567]86-*-mingw*): Likewise.
13684 (arm*-*-mingw32ce*): Add case.
13685 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13686 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13687 [__MINGW32CE__] (strerror): New function.
13688 [__MINGW32CE__] (errno): Define to GetLastError.
13689 [__MINGW32CE__] (COUNTOF): New macro.
13690 (remote_open): Remove extra close call.
13691 * mem-break.c (delete_breakpoint_at): New function.
13692 * mem-break.h (delete_breakpoint_at): Declare.
13693 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13694 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13695 [USE_WIN32API] (read, write): Add char* casts.
13696 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13697 * server.h: Include wincecompat.h on Windows CE.
13698 [HAVE_ERRNO_H]: Check.
13699 (perror): Declare if not declared.
13700 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13701 (perror_with_name): Remove errno declaration.
13702 * wincecompat.h: New.
13703 * wincecompat.c: New.
13704 * win32-low.h: New.
13705 * win32-arm-low.c: New.
13706 * win32-i386-low.c: New.
13707 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13708 (OUTMSG2): Make it safe.
13710 (COUNTOF): New macro.
13711 (NUM_REGS): Get it from the low target.
13712 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13713 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13714 (thread_rec): Let low target handle debug registers.
13715 (child_add_thread): Likewise.
13716 (child_init_thread_list): Likewise.
13717 (continue_one_thread): Likewise.
13719 (do_child_fetch_inferior_registers): Move to ...
13720 * win32-i386-low.c: ... here, and rename to ...
13721 (do_fetch_inferior_registers): ... this.
13722 * win32-low.c (child_fetch_inferior_registers):
13723 Go through the low target.
13724 (do_child_store_inferior_registers): Use regptr.
13725 (strwinerror): New function.
13726 (win32_create_inferior): Handle Windows CE.
13727 Use strwinerror instead of strerror on Windows error
13728 codes. Add program to the error output.
13729 Don't close the main thread handle on Windows CE.
13730 (win32_attach): Use coredll.dll on Windows CE.
13731 (win32_kill): Close current process and current
13733 (win32_detach): Use coredll.dll on Windows CE.
13734 (win32_resume): Let low target handle debug registers, and
13736 (handle_exception): Add/Remove initial breakpoint. Avoid
13737 non-existant WSTOPSIG on Windows CE.
13738 (win32_read_inferior_memory): Cast to remove warning.
13739 (win32_arch_string): Go through the low target.
13740 (initialize_low): Call set_breakpoint_data with the low
13741 target's breakpoint.
13742 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13743 FOP_REGNUM, mappings): Move to ...
13744 * win32-i386-low.c: ... here.
13745 * win32-low.c (win32_thread_info): Move to ...
13746 * win32-low.h: ... here.
13747 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13748 win32-arm-low.c and wincecompat.c.
13749 (all:): Add $EXEEXT.
13750 (install-only:): Likewise.
13751 (gdbserver:): Likewise.
13752 (gdbreplay:): Likewise.
13753 * config.in: Regenerate.
13754 * configure: Regenerate.
13756 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13758 * win32-low.c: Rename typedef thread_info to
13759 win32_thread_info throughout.
13761 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13763 * win32-i386-low.c: Rename to ...
13764 * win32-low.c: ... this.
13765 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13766 * Makefile.in: Likewise.
13768 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13770 * remote-utils.c (monitor_output): Constify msg parameter.
13771 * server.h (monitor_output): Likewise.
13772 * win32-i386-low.c (handle_output_debug_string): New.
13773 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13774 handle_output_debug_string.
13775 (get_child_debug_event): Likewise.
13777 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13779 * server.c (main): Correct strtoul check.
13781 2007-03-27 Jon Ringle <jon@ringle.org>
13783 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13785 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13787 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13789 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13791 * terminal.h: Check HAVE_SGTTY_H.
13793 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13795 * remote-utils.c (remote_open): Print out the assigned port number.
13797 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13799 * remote-utils.c (monitor_output): New function.
13800 * server.c (debug_threads): Define here.
13801 (monitor_show_help): New function.
13802 (handle_query): Handle qRcmd.
13803 (main): Do not handle 'd' packet.
13804 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13805 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13808 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13810 * Makefile.in (EXEEXT): New.
13811 (clean): Use $(EXEEXT).
13813 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13815 * target.h (target_ops): Rename send_signal to request_interrupt,
13816 and remove enum target_signal parameter.
13817 * linux-low.c (linux_request_interrupt): Rename from
13818 linux_send_signal, and always send SIGINT.
13819 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13820 and always send SIGINT.
13821 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13823 (input_interrupt): Likewise.
13825 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13827 * server.c (get_features_xml): Check if target implemented
13829 * win32-i386-low.c (win32_arch_string): New.
13830 (win32_target_ops): Add win32_arch_string as arch_string member.
13832 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13834 * spu-low.c (spu_arch_string): New.
13835 (spu_target_ops): Add spu_arch_string.
13837 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13839 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13840 * configure.ac: Do not check for terminal.h.
13841 * configure, config.in: Regenerated.
13843 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13845 * Makefile.in (OBS): Add $(XML_BUILTIN).
13846 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13848 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13849 (arm-with-iwmmxt.c): New.
13850 * config.in, configure: Regenerate.
13851 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13852 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13853 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13854 (arm*-*-linux*): Add iWMMXt and regset support.
13855 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13856 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13857 (arm_store_wmmxregset, target_regsets): New.
13858 * server.c (get_features_xml): Take annex argument. Check builtin
13860 (handle_query): Handle multiple annexes.
13862 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13864 * remote-utils.c [USE_WIN32API] (read, write): Define.
13865 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13868 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13870 * linux-i386-low.c (the_low_target): Set arch_string.
13871 * linux-x86-64-low.c (the_low_target): Likewise.
13872 * linux-low.c (linux_arch_string): New.
13873 (linux_target_ops): Add it.
13874 * linux-low.h (struct linux_target_ops): Add arch_string.
13875 * server.c (write_qxfer_response): Use const void * for DATA.
13876 (get_features_xml): New.
13877 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13878 * target.h (struct target_ops): Add arch_string method.
13880 2007-01-03 Denis Pilat <denis.pilat@st.com>
13881 Daniel Jacobowitz <dan@codesourcery.com>
13883 * linux-low.c (linux_kill): Handle being called with no threads.
13884 * win32-i386-low.c (win32_kill): Likewise.
13885 (get_child_debug_event): Clear current_process_handle.
13887 2006-12-30 Denis PILAT <denis.pilat@st.com>
13888 Daniel Jacobowitz <dan@codesourcery.com>
13890 * remote-utils.c (remote_open): Check the type of specified
13891 serial port devices before opening them.
13892 * server.c (main): Kill the inferior if an error occurs during
13893 the first remote_open.
13895 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13897 * README: Update supported targets.
13899 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13901 * Makefile.in (clean): Remove reg-mips64.c.
13902 (reg-mips64.c, reg-mips64.o): New rules.
13903 * configure.srv: Handle mips64. Include regset support for mips.
13904 * linux-mips-low.c (union mips_register): New.
13905 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13906 (mips_breakpoint, mips_breakpoint_at): Use int.
13907 (mips_collect_register, mips_supply_register)
13908 (mips_collect_register_32bit, mips_supply_register_32bit)
13909 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13910 (mips_store_fpregset, target_regsets): New.
13911 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13913 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13915 * configure.srv: Add target "spu*-*-*".
13916 * Makefile.in (clean): Remove reg-spu.c.
13917 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13918 * spu-low.c: New file.
13920 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13922 * configure.ac: Correct td_thr_tls_get_addr test.
13923 * configure: Regenerated.
13925 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13927 * linux-low.c (linux_wait_for_event): Reformat. Use the
13928 pass_signals array.
13929 * remote-utils.c (decode_address_to_semicolon): New.
13930 * server.c (pass_signals, handle_general_set): New.
13931 (handle_query): Mention QPassSignals for qSupported.
13932 (main): Call handle_general_set.
13933 * server.h (pass_signals, decode_address_to_semicolon): New.
13935 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13937 * server.c (handle_query): Correct error handling for read_auxv.
13939 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13941 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13942 and srv_linux_thread_db to yes.
13943 * linux-s390-low.c (s390_fill_gregset): New function.
13944 (target_regsets): Define data structure.
13946 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13948 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13949 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13950 * config.in, configure: Regenerated.
13951 * inferiors.c (gdb_id_to_thread): New function.
13952 (gdb_id_to_thread_id): Use it.
13953 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13954 * linux-low.h (struct process_info): Add th member.
13955 (thread_db_get_tls_address): New prototype.
13956 * remote-utils.c (decode_address): Make non-static.
13957 * server.c (handle_query): Handle qGetTLSAddr.
13958 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13959 * target.h (struct target_ops): Add get_tls_address.
13960 * thread-db.c (maybe_attach_thread): Save the thread handle.
13961 (thread_db_get_tls_address): New.
13963 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13965 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13966 (linux_resume_one_process): Take a siginfo_t *. Update all
13967 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13968 (struct pending_signals): Add a siginfo_t.
13969 (linux_wait_for_process): Always set last_status.
13970 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13971 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13972 * linux-low.h (struct process_info): Add last_status.
13974 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13976 * remote-utils.c (try_rle): New function.
13977 (putpkt_binary): Use it.
13979 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13981 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13982 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13983 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13984 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13985 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13988 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13990 * server.c (terminal_fd): New variable.
13991 (old_foreground_pgrp): Likewise.
13992 (restore_old_foreground_pgrp): New function.
13993 (start_inferior): Record the terminal file descriptor in terminal_fd
13994 and its original foreground group in old_foreground_pgrp. Register
13995 restore_old_foreground_pgrp with atexit().
13997 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13999 * server.c (handle_query): Correct qPart to qXfer.
14001 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14003 * configure.ac: Check for more headers which are missing on
14004 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14005 * configure.srv: Add Cygwin and mingw32.
14006 * remote-utils.c: Don't include headers unconditionally which
14007 are missing on mingw32. Include <winsock.h> for mingw32.
14008 (remote_open): Adjust for mingw32 support. Flush
14009 standard error after writing to it.
14010 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14011 (unblock_async_io, enable_async_io, disable_async_io)
14012 (readchar, getpkt): Update for Winsock support.
14013 (prepare_resume_reply): Expect a protocol signal number.
14014 * server.c: Disable <sys/wait.h> on mingw32.
14015 (start_inferior): Adjust for mingw32 support. Flush
14016 standard error after writing to it.
14017 (attach_inferior): Likewise. Use protocol signal
14019 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14021 * win32-i386-low.c: New file.
14022 * Makefile.in (XM_CLIBS): Set.
14023 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14024 (win32-i386-low.o): New dependency rule.
14025 * linux-low.c (linux_wait): Use target signal numbers.
14026 * target.h (struct target_ops): Doc fix.
14027 * server.h (target_signal_to_name): New prototype.
14028 * gdbreplay.c: Don't include headers unconditionally which
14029 are missing on mingw32. Include <winsock.h> for mingw32.
14030 (remote_close, remote_open): Adjust for Winsock support.
14031 * configure, config.in: Regenerated.
14033 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14035 * server.c (decode_xfer_read, write_qxfer_response): New.
14036 (handle_query): Take a packet length argument. Handle
14037 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14038 the qSupported response.
14039 (main): Update call to handle_query.
14041 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14043 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14044 (putpkt_binary): Renamed from putpkt and adjusted for binary
14046 (putpkt): New wrapper for putpkt_binary.
14047 (readchar): Don't mask off the high bit.
14048 (decode_X_packet): New function.
14049 * server.c (main): Call putpkt_binary if a handler sets the packet
14050 length. Save the length of the incoming packet. Handle 'X'.
14051 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14053 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14055 * server.c (handle_query): Handle qSupported.
14057 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14059 * remote-utils.c (all_symbols_looked_up): New variable.
14060 (look_up_one_symbol): Check it.
14061 * server.h (look_up_one_symbol): New declaration.
14062 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14064 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14066 * Makefile.in (linux-arm-low.o): Update dependencies.
14067 * linux-arm-low.c: Include "gdb_proc_service.h".
14068 (PTRACE_GET_THREAD_AREA): Define.
14069 (ps_get_thread_area): New function.
14071 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14073 * configure.srv (m68k*-*-uclinux*): New target.
14074 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14075 (linux_resume_one_process): Remove extraneous cast.
14076 (linux_read_offsets): New.
14077 (linux_target_op): Add linux_read_offsets on mmuless systems.
14078 * server.c (handle_query): Add qOffsets logic.
14079 * target.h (struct target_ops): Add read_offsets.
14081 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14083 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14084 (PTRACE_GET_THREAD_AREA): Define.
14085 (ps_get_thread_area): New function.
14086 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14087 (linux-x86-64-low.o): Update.
14089 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14091 * configure.ac: Remove checks for prfpregset_t.
14092 * gdb_proc_service.h: New file.
14093 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14094 new "gdb_proc_service.h".
14095 * proc-service.c: Likewise.
14096 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14097 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14098 * Makefile.in (gdb_proc_service_h): Updated.
14099 * configure, config.in: Regenerated.
14101 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14103 * remote-utils.c (prepare_resume_reply): Move declaration
14104 of gdb_id_from_wait to the top of the block.
14106 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14108 * linux-low.c (regsets_store_inferior_registers): Read the regset
14109 from the target before filling it.
14111 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14113 * server.c (attach_inferior): Return SIGTRAP for a successful
14116 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14118 * Makefile.in (OBS): Add version.o.
14119 (STAGESTUFF): Delete.
14120 (version.o): Add dependencies.
14121 (version.c): Replace rule.
14122 (clean): Remove version.c.
14123 * server.c (gdbserver_version): New.
14124 (gdbserver_usage): Use printf.
14125 (main): Handle --version and --help.
14126 * server.h (version, host_name): Add declarations.
14128 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14140 * linux-x86-64-low.c:
14142 * linux-s390-low.c:
14143 * linux-ppc64-low.c:
14145 * linux-mips-low.c:
14146 * linux-m68k-low.c:
14147 * linux-m32r-low.c:
14150 * linux-ia64-low.c:
14151 * linux-i386-low.c:
14152 * linux-crisv32-low.c:
14164 * gdbserver.1: Add (C) after Copyright. Update the FSF
14167 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14169 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14170 (arm_breakpoint_at): Recognize both breakpoints.
14171 (the_low_target): Use the correct breakpoint instruction.
14173 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14175 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14176 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14177 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14178 (the_low_target): Update.
14180 2005-10-25 Andreas Schwab <schwab@suse.de>
14182 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14184 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14185 (ia64_num_regs): Reduce to 462.
14187 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14189 * acinclude.m4: Correct quoting.
14190 * aclocal.m4: Regenerated.
14192 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14193 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14194 (thread_db_init): Call thread_db_err_str.
14195 * configure.ac: Check for TD_VERSION.
14196 * config.in, configure: Regenerated.
14198 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14200 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14202 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14204 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14205 is not available. Define HAVE_PTRACE_GETREGS if it is.
14206 * config.in, configure: Regenerated.
14207 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14208 * linux-i386-low.c, linux-m68k-low.c: Update to use
14209 HAVE_PTRACE_GETREGS.
14210 * linux-low.c (regsets_fetch_inferior_registers)
14211 (regsets_store_inferior_registers): Only return 0 if we processed
14213 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14214 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14216 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14218 * inferiors.c (struct thread_info): Add gdb_id.
14219 (add_thread): Add gdb_id argument.
14220 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14221 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14222 calls to add_thread.
14223 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14224 * server.c (handle_query): Use thread_to_gdb_id.
14225 (handle_v_cont, main): Use gdb_id_to_thread_id.
14226 * server.h (add_thread): Update prototype.
14227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14230 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14232 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14233 left-padded registers.
14234 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14235 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14237 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14239 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14240 * configure: Regenerate.
14241 * config.in: Regenerate.
14242 * server.h (NEED_DECLARATION_STRERROR):
14243 Replace with !HAVE_DECL_STRERROR.
14245 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14247 * linux-low.c (linux_wait, linux_send_signal): Don't test
14248 an unsigned long variable for > 0 if it could be MAX_ULONG.
14249 * server.c (myresume): Likewise.
14250 * target.c (set_desired_inferior): Likewise.
14252 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14254 * configure.ac: Simplify and improve check for socklen_t.
14255 * configure, config.in: Regenerate.
14257 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14259 * acconfig.h: Remove.
14260 * configure.ac: Add a test for socklen_t. Use three-argument
14261 AC_DEFINE throughout.
14262 * config.in: Regenerated using autoheader 2.59.
14263 * configure: Regenerated.
14265 * gdbreplay.c (socklen_t): Provide a default.
14266 (remote_open): Use socklen_t.
14267 * remote-utils.c (socklen_t): Provide a default.
14268 (remote_open): Use socklen_t.
14269 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14272 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14274 * linux-low.c (linux_read_memory, linux_write_memory)
14275 (linux_read_auxv): Likewise.
14276 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14277 (check_mem_write): Likewise.
14278 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14280 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14281 (registers_from_string, register_data): Likewise.
14282 * server.c (handle_query, main): Likewise.
14283 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14284 (decode_M_packet): Likewise.
14285 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14286 * target.h (struct target_ops): Update read_memory, write_memory,
14288 (read_inferior_memory, write_inferior_memory): Update.
14289 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14290 to unsigned char *.
14291 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14292 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14293 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14294 linux-s390-low.c, linux-sh-low.c: Update for changes in
14295 read_inferior_memory and the_low_target->breakpoint.
14297 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14299 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14300 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14301 * configure.srv: Add powerpc64-*-linux*.
14302 * linux-ppc64-low.c: New file.
14304 2005-05-23 Orjan Friberg <orjanf@axis.com>
14306 * linux-cris-low.c: New file with support for CRIS.
14307 * linux-crisv32-low.c: Ditto for CRISv32.
14308 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14309 (clean): Add reg-cris.c and reg-crisv32.c.
14310 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14311 reg-crisv32.o, and reg-crisv32.c to make rules.
14312 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14313 recognized targets.
14315 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14317 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14318 of sizeof (PTRACE_XFER_TYPE).
14319 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14321 2005-05-12 Orjan Friberg <orjanf@axis.com>
14323 * target.h (struct target_ops): Add insert_watchpoint,
14324 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14325 pointers for hardware watchpoint support.
14326 * linux-low.h (struct linux_target_ops): Ditto.
14327 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14328 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14329 to linux_target_ops.
14330 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14332 * server.c (main): Recognize 'Z' and 'z' packets.
14334 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14336 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14337 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14338 (the_low_target): Add new members.
14340 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14342 * proc-service.c (ps_lgetregs): Search all_processes instead of
14345 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14347 * server.c (start_inferior): Change return type to int.
14348 (attach_inferior): Change sigptr to int *.
14349 (handle_v_cont, handle_v_requests): Change signal to int *.
14350 (main): Change signal to int.
14352 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14354 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14355 * configure.srv: Add m32r*-*-linux*.
14356 * linux-m32r-low.c: New file.
14358 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14360 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14362 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14364 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14365 Take unsigned long arguments for PIDs.
14366 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14367 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14368 (wait_for_sigstop, linux_resume_one_process)
14369 (regsets_fetch_inferior_registers, linux_send_signal)
14370 (linux_read_auxv): Likewise. Update the types of variables holding
14371 PIDs. Update format string specifiers.
14372 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14373 * remote-utils.c (prepare_resume_reply): Likewise.
14374 * server.c (cont_thread, general_thread, step_thread)
14375 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14377 (handle_query): Update format specifiers.
14378 (handle_v_cont, main): Use strtoul for thread IDs.
14379 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14380 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14381 (general_thread, step_thread, thread_from_wait)
14382 (old_thread_from_wait): Update.
14383 * target.h (struct thread_resume): Use unsigned long for THREAD.
14384 (struct target_ops): Use unsigned long for arguments to attach and
14387 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14389 * acinclude.m4: Include bfd/bfd.m4 directly.
14390 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14391 <agriffis@toolchain.org>.
14392 * aclocal.m4, configure: Regenerated.
14394 2005-01-07 Andrew Cagney <cagney@gnu.org>
14396 * configure.ac: Rename configure.in, require autoconf 2.59.
14397 * configure: Re-generate.
14399 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14401 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14402 LIBS when finished.
14403 * aclocal.m4: Regenerated.
14404 * configure: Regenerated.
14406 2004-11-21 Andreas Schwab <schwab@suse.de>
14408 * linux-m68k-low.c (m68k_num_gregs): Define.
14409 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14410 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14411 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14412 (m68k_breakpoint_at): New. Add to the_low_target.
14414 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14415 srv_linux_thread_db to yes.
14417 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14419 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14420 (ARCH_SET_FS): Likewise.
14421 (ARCH_GET_FS): Likewise.
14422 (ARCH_GET_GS): Likewise.
14424 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14426 * linux-i386-low.c (ps_get_thread_area): New.
14427 * linux-x86-64-low.c (ps_get_thread_area): New.
14428 * linux-low.c: Include <sys/syscall.h>.
14429 (linux_kill_one_process): Don't kill the first thread here.
14430 (linux_kill): Kill the first thread here.
14431 (kill_lwp): New function.
14432 (send_sigstop, linux_send_signal): Use it.
14433 * proc-service.c: Clean up #ifdefs.
14434 (fpregset_info): Delete.
14435 (ps_lgetregs): Update and enable implementation.
14436 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14438 * remote-utils.c (struct sym_cache, symbol_cache): New.
14439 (input_interrupt): Print a clearer message.
14440 (async_io_enabled): New variable.
14441 (enable_async_io, disable_async_io): Use it. Update comments.
14442 (look_up_one_symbol): Use the symbol cache.
14443 * thread-db.c (thread_db_look_up_symbols): New function.
14444 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14446 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14448 * configure.in: Test for -rdynamic.
14449 * configure: Regenerated.
14450 * Makefile (INTERNAL_LDFLAGS): New.
14451 (gdbserver, gdbreplay): Use it.
14453 2004-09-02 Andrew Cagney <cagney@gnu.org>
14455 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14457 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14459 * linux-low.c (linux_wait): Clear all_processes list also.
14461 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14463 * linux-low.c: Include <errno.h>. Remove extern declaration of
14466 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14468 * gdbreplay.c, server.h, utils.c: Update copyright years.
14470 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14472 * server.c (main): Print child status or termination signal from
14473 variable 'signal', not 'sig'.
14475 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14477 * linux-low.c (linux_read_memory): Change return type to
14478 int. Check for and return error from ptrace().
14479 * target.c (read_inferior_memory): Change return type to int. Pass
14480 back return status from the_target->read_memory().
14481 * target.h (struct target_ops): Adapt *read_memory() prototype.
14483 (read_inferior_memory): Adapt prototype.
14484 * server.c (main): Return an error packet if
14485 read_inferior_memory() returns an error.
14487 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14489 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14490 Unify with other clean targets.
14492 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14494 * server.c (handle_v_cont): Call set_desired_inferior.
14496 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14498 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14500 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14502 * linux-low.c (linux_wait): Unblock async I/O.
14503 (linux_resume): Block and enable async I/O.
14504 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14505 * server.h (block_async_io, unblock_async_io): Add prototypes.
14507 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14509 * remote-utils.c (remote_open): Print a status notice after
14510 opening a TCP port.
14511 * server.c (attach_inferior): Print a status notice after
14514 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14516 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14518 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14520 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14522 * server.c, target.h: Update copyright years.
14524 2004-02-25 Roland McGrath <roland@redhat.com>
14526 * target.h (struct target_ops): New member `read_auxv'.
14527 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14528 * linux-low.c (linux_read_auxv): New function.
14529 (linux_target_ops): Initialize `read_auxv' member to that.
14531 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14533 Committed by Jim Blandy <jimb@redhat.com>.
14535 * linux-s390-low.c (s390_num_regs): Update.
14536 (s390_regmap): Remove control registers. Use __s390x__ predefine
14537 instead of GPR_SIZE to distiguish s390 and s390x targets.
14539 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14541 * linux-low.c: Update copyright year.
14542 (check_removed_breakpoint): Clear pending_is_breakpoint.
14543 (linux_set_resume_request, linux_queue_one_thread)
14544 (resume_status_pending_p): New functions.
14545 (linux_continue_one_thread): Use process->resume.
14546 (linux_resume): Only resume threads if there are no pending events.
14547 * linux-low.h (struct process_info): Add resume request
14550 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14552 * regcache.c (new_register_cache): Clear the allocated register
14553 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14555 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14557 * linux-low.c (linux_resume): Take a struct thread_resume *
14559 (linux_wait): Update call.
14560 (resume_ptr): New static variable.
14561 (linux_continue_one_thread): Renamed from
14562 linux_continue_one_process. Use resume_ptr.
14563 (linux_resume): Use linux_continue_one_thread.
14564 * server.c (handle_v_cont, handle_v_requests): New functions.
14565 (myresume): New function.
14566 (main): Handle 'v' case.
14567 * target.h (struct thread_resume): New type.
14568 (struct target_ops): Change argument of "resume" to struct
14570 (myresume): Delete macro.
14572 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14574 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14575 (uninstall): Support DESTDIR.
14577 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14579 * configure.srv: Add xscale*linux copy of arm*linux entry.
14581 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14583 * linux-arm-low.c (arm_reinsert_addr): New function.
14584 (the_low_target): Add arm_reinsert_addr.
14586 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14588 * mem-break.c: Remove whitespace at end of file.
14590 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14592 * configure.in: Check whether we need to prototype strerror.
14593 * server.h: Optionally prototype strerror.
14594 * gdbreplay.c (perror_with_name): Use strerror.
14595 * linux-low.c (linux_attach_lwp): Use strerror.
14596 * utils.c (perror_with_name): Use strerror.
14597 * config.in, configure: Regenerated.
14599 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14601 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14602 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14604 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14606 * Makefile.in (SFILES): Update.
14607 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14608 low-sun3.c: Remove files.
14610 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14612 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14613 (linux_detach_one_process, linux_detach): New functions.
14614 (linux_target_ops): Add linux_detach.
14615 * server.c (main): Handle 'D' packet.
14616 * target.h (struct target_ops): Add "detach" member.
14617 (detach_inferior): Define.
14619 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14621 From Kelley Cook <kelleycook@wideopenwest.com>:
14622 * configure.srv: Accept i[34567]86 variants.
14624 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14626 * linux-low.c (linux_wait_for_event): Correct comment typos.
14627 (linux_resume_one_process): Call check_removed_breakpoint.
14628 (linux_send_signal): New function.
14629 (linux_target_ops): Add linux_send_signal.
14630 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14632 * target.h (struct target_ops): Add send_signal.
14634 2003-05-29 Jim Blandy <jimb@redhat.com>
14636 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14637 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14638 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14639 away part of the register's value.
14641 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14643 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14644 (linux_wait_for_event, linux_init_signals): Likewise.
14646 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14648 * configure.in: Check for stdlib.h.
14649 * configure: Regenerated.
14650 * config.in: Regenerated.
14652 2003-01-04 Andreas Schwab <schwab@suse.de>
14654 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14656 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14658 * Makefile.in: Remove obsolete code.
14660 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14662 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14663 defined(PT_FPR0_HI).
14665 2002-11-17 Stuart Hughes <seh@zee2.com>
14667 * linux-arm-low.c (arm_num_regs): Increase.
14668 (arm_regmap): Include status register.
14670 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14672 * linux-low.c (register_addr): Remove incorrect -1 check.
14674 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14676 * linux-low.c (linux_create_inferior): Call setpgid. Return
14678 (unstopped_p, linux_signal_pid): Remove.
14679 (linux_target_ops): Remove linux_signal_pid.
14680 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14681 global instead of target method.
14682 * target.h (struct target_ops): Remove signal_pid. Update comment
14683 for create_inferior.
14684 * server.c (signal_pid): New variable.
14685 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14686 gdbserver. Set the child to be the foreground process group.
14687 (attach_inferior): Set signal_pid.
14689 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14691 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14693 2002-08-20 Jim Blandy <jimb@redhat.com>
14695 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14698 2002-08-01 Andrew Cagney <cagney@redhat.com>
14700 * Makefile.in: Make chill references obsolete.
14702 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14704 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14705 * configure: Regenerate.
14706 * config.in: Regenerate.
14708 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14710 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14711 (perror_with_name, remote_close, remote_open, expect, play): Static.
14713 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14715 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14716 byte offsets instead of an array of indexes.
14717 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14719 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14721 * regcache.c: Add comment.
14723 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14725 * thread-db.c: New file.
14726 * proc-service.c: New file.
14727 * acinclude.m4: New file.
14728 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14729 proc-service.o, and thread-db.o.
14730 (linux-low.o): Add USE_THREAD_DB.
14731 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14732 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14733 * aclocal.m4: Regenerated.
14734 * config.in: Regenerated.
14735 * configure: Regenerated.
14736 * configure.in: Check for proc_service.h, sys/procfs.h,
14737 thread_db.h, and linux/elf.h headrs.
14738 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14739 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14740 Check for -lthread_db and thread support.
14741 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14742 PowerPC, and SuperH.
14743 * i387-fp.c: Constify arguments.
14744 * i387-fp.h: Likewise.
14745 * inferiors.c: (struct thread_info): Renamed from
14746 `struct inferior_info'. Remove PID member. Use generic inferior
14747 list header. All uses updated.
14748 (inferiors, signal_pid): Removed.
14749 (all_threads): New variable.
14750 (get_thread): Define.
14751 (add_inferior_to_list): New function.
14752 (for_each_inferior): New function.
14753 (change_inferior_id): New function.
14754 (add_inferior): Removed.
14755 (remove_inferior): New function.
14756 (add_thread): New function.
14757 (free_one_thread): New function.
14758 (remove_thread): New function.
14759 (clear_inferiors): Use for_each_inferior and free_one_thread.
14760 (find_inferior): New function.
14761 (find_inferior_id): New function.
14762 (inferior_target_data): Update argument type.
14763 (set_inferior_target_data): Likewise.
14764 (inferior_regcache_data): Likewise.
14765 (set_inferior_regcache_data): Likewise.
14766 * linux-low.c (linux_bp_reinsert): Remove.
14767 (all_processes, stopping_threads, using_thrads)
14768 (struct pending_signals, debug_threads, pid_of): New.
14769 (inferior_pid): Replace with macro.
14770 (struct inferior_linux_data): Remove.
14771 (get_stop_pc, add_process): New functions.
14772 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14773 Use add_process and add_thread.
14774 (linux_attach_lwp): New function, based on old linux_attach. Use
14775 add_process and add_thread. Set stop_expected for new threads.
14776 (linux_attach): New function.
14777 (linux_kill_one_process): New function.
14778 (linux_kill): Kill all LWPs.
14779 (linux_thread_alive): Use find_inferior_id.
14780 (check_removed_breakpoints, status_pending_p): New functions.
14781 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14782 Update. Use WNOHANG. Wait for cloned processes also. Update process
14783 struct for the found process.
14784 (linux_wait_for_event): New function.
14785 (linux_wait): Use it. Support LWPs.
14786 (send_sigstop, wait_for_sigstop, stop_all_processes)
14787 (linux_resume_one_process, linux_continue_one_process): New functions.
14788 (linux_resume): Support LWPs.
14789 (REGISTER_RAW_SIZE): Remove.
14790 (fetch_register): Use register_size instead. Call supply_register.
14791 (usr_store_inferior_registers): Likewise. Call collect_register.
14792 Fix recursive case.
14793 (regsets_fetch_inferior_registers): Improve error message.
14794 (regsets_store_inferior_registers): Add debugging.
14795 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14796 (unstopped_p, linux_signal_pid): New functions.
14797 (linux_target_ops): Add linux_signal_pid.
14798 (linux_init_signals): New function.
14799 (initialize_low): Call it. Initialize using_threads.
14800 * regcache.c (inferior_regcache_data): Add valid
14802 (get_regcache): Fetch registers lazily. Add fetch argument
14803 and update all callers.
14804 (regcache_invalidate_one, regcache_invalidate): New
14806 (new_register_cache): Renamed from create_register_cache.
14807 Return the new regcache.
14808 (free_register_cache): Change argument to a void *.
14809 (registers_to_string, registers_from_string): Call get_regcache
14810 with fetch flag set.
14811 (register_data): Make static. Pass fetch flag to get_regcache.
14812 (supply_register): Call get_regcache with fetch flag clear.
14813 (collect_register): Call get_regcache with fetch flag set.
14814 (collect_register_as_string): New function.
14815 * regcache.h: Update.
14816 * remote-utils.c (putpkt): Flush after debug output and use
14818 Handle input interrupts while waiting for an ACK.
14819 (input_interrupt): Use signal_pid method.
14820 (getpkt): Flush after debug output and use stderr.
14821 (outreg): Use collect_register_as_string.
14822 (new_thread_notify, dead_thread_notify): New functions.
14823 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14824 and general_thread.
14825 (look_up_one_symbol): Flush after debug output.
14826 * server.c (step_thread, server_waiting): New variables.
14827 (start_inferior): Don't use signal_pid. Update call to mywait.
14828 (attach_inferior): Update call to mywait.
14829 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14830 (main): Don't fetch/store registers explicitly. Use
14831 set_desired_inferior. Support proposed ``Hs'' packet. Update
14833 * server.h: Update.
14834 (struct inferior_list, struct_inferior_list_entry): New.
14835 * target.c (set_desired_inferior): New.
14836 (write_inferior_memory): Constify.
14837 (mywait): New function.
14838 * target.h: Update.
14839 (struct target_ops): New signal_pid method.
14840 (mywait): Removed macro, added prototype.
14842 * linux-low.h (regset_func): Removed.
14843 (regset_fill_func, regset_store_func): New.
14844 (enum regset_type): New.
14845 (struct regset_info): Add type field. Use new operation types.
14846 (struct linux_target_ops): stop_pc renamed to get_pc.
14847 Add decr_pc_after_break and breakpoint_at.
14848 (get_process, get_thread_proess, get_process_thread)
14849 (strut process_info, all_processes, linux_attach_lwp)
14850 (thread_db_init): New.
14852 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14853 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14854 (the_low_target): Add new members.
14855 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14856 (i386_store_fpxregset): Constify.
14857 (target_regsets): Add new kind identifier.
14858 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14859 (i386_set_pc): Add debugging.
14860 (i386_breakpoint_at): New function.
14861 (the_low_target): Add new members.
14862 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14863 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14864 (mips_breakpoint_at): New.
14865 (the_low_target): Add new members.
14866 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14867 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14868 (the_low_target): Add new members.
14869 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14870 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14871 (the_low_target): Add new members.
14872 * linux-x86-64-low.c (target_regsets): Add new kind
14875 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14877 From Martin Pool <mbp@samba.org>:
14878 * server.c (gdbserver_usage): New function.
14881 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14883 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14884 stop_at -> stop_pc.
14886 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14888 * Makefile.in: Remove obsolete code.
14890 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14892 * linux-low.c (regsets_fetch_inferior_registers),
14893 (regsets_store_inferior_registers): Removed cast to int from
14895 * regcache.h: Added declaration of struct inferior_info.
14897 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14899 * inferiors.c (struct inferior_info): Add regcache_data.
14900 (add_inferior): Call create_register_cache.
14901 (clear_inferiors): Call free_register_cache.
14902 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14903 * regcache.c (struct inferior_regcache_data): New.
14904 (registers): Remove.
14905 (get_regcache): New function.
14906 (create_register_cache, free_register_cache): New functions.
14907 (set_register_cache): Don't initialize the register cache here.
14908 (registers_to_string, registers_from_string, register_data): Call
14910 * regcache.h: Add prototypes.
14911 * server.h: Likewise.
14913 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14915 * mem-break.c: New file.
14916 * mem-break.h: New file.
14917 * Makefile.in: Add mem-break.o rule; update server.h
14919 * inferiors.c (struct inferior_info): Add target_data
14921 (clear_inferiors): Free target_data member if set.
14922 (inferior_target_data, set_inferior_target_data): New functions.
14923 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14924 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14925 * linux-low.c (linux_bp_reinsert): New variable.
14926 (struct inferior_linux_data): New.
14927 (linux_create_inferior): Use set_inferior_target_data.
14928 (linux_attach): Likewise. Call add_inferior.
14929 (linux_wait_for_one_inferior): New function.
14930 (linux_wait): Call it.
14931 (linux_write_memory): Add const.
14932 (initialize_low): Call set_breakpoint_data.
14933 * linux-low.h (struct linux_target_ops): Add breakpoint
14935 * server.c (attach_inferior): Remove extra add_inferior
14937 * server.h: Include mem-break.h. Update inferior.c
14939 * target.c (read_inferior_memory)
14940 (write_inferior_memory): New functions.
14941 * target.h (read_inferior_memory)
14942 (write_inferior_memory): Change macros to prototypes.
14943 (struct target_ops): Update comments. Add const to write_memory
14946 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14948 * linux-low.c (usr_store_inferior_registers): Support
14949 registers which are allowed to fail to store.
14950 * linux-low.h (linux_target_ops): Likewise.
14951 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14952 (ppc_cannot_store_register): FPSCR may not be storable.
14954 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14956 * server.h: Include <string.h> if HAVE_STRING_H.
14957 * ChangeLog: Correct paths in last ChangeLog entry.
14959 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14961 * linux-low.h: Remove obsolete prototypes.
14962 (struct linux_target_ops): New.
14963 (extern the_low_target): New.
14964 * linux-low.c (num_regs, regmap): Remove declarations.
14965 (register_addr): Use the_low_target explicitly.
14966 (fetch_register): Likewise.
14967 (usr_fetch_inferior_registers): Likewise.
14968 (usr_store_inferior_registers): Likewise.
14969 * linux-arm-low.c (num_regs): Remove.
14970 (arm_num_regs): Define.
14971 (arm_regmap): Renamed from regmap, made static.
14972 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14974 (arm_cannot_store_register): Renamed from cannot_store_register,
14976 (the_low_target): New.
14977 * linux-i386-low.c (num_regs): Remove.
14978 (i386_num_regs): Define.
14979 (i386_regmap): Renamed from regmap, made static.
14980 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14982 (i386_cannot_store_register): Renamed from cannot_store_register,
14984 (the_low_target): New.
14985 * linux-ia64-low.c (num_regs): Remove.
14986 (ia64_num_regs): Define.
14987 (ia64_regmap): Renamed from regmap, made static.
14988 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14990 (ia64_cannot_store_register): Renamed from cannot_store_register,
14992 (the_low_target): New.
14993 * linux-m68k-low.c (num_regs): Remove.
14994 (m68k_num_regs): Define.
14995 (m68k_regmap): Renamed from regmap, made static.
14996 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14998 (m68k_cannot_store_register): Renamed from cannot_store_register,
15000 (the_low_target): New.
15001 * linux-mips-low.c (num_regs): Remove.
15002 (mips_num_regs): Define.
15003 (mips_regmap): Renamed from regmap, made static.
15004 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15006 (mips_cannot_store_register): Renamed from cannot_store_register,
15008 (the_low_target): New.
15009 * linux-ppc-low.c (num_regs): Remove.
15010 (ppc_num_regs): Define.
15011 (ppc_regmap): Renamed from regmap, made static.
15012 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15014 (ppc_cannot_store_register): Renamed from cannot_store_register,
15016 (the_low_target): New.
15017 * linux-s390-low.c (num_regs): Remove.
15018 (s390_num_regs): Define.
15019 (s390_regmap): Renamed from regmap, made static.
15020 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15022 (s390_cannot_store_register): Renamed from cannot_store_register,
15024 (the_low_target): New.
15025 * linux-sh-low.c (num_regs): Remove.
15026 (sh_num_regs): Define.
15027 (sh_regmap): Renamed from regmap, made static.
15028 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15030 (sh_cannot_store_register): Renamed from cannot_store_register,
15032 (the_low_target): New.
15033 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15034 (the_low_target): New.
15036 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15038 * Makefile.in: Add stamp-h target.
15039 * configure.in: Create stamp-h.
15040 * configure: Regenerated.
15042 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15044 * inferiors.c: New file.
15045 * target.c: New file.
15046 * target.h: New file.
15047 * Makefile.in: Add target.o and inferiors.o. Update
15049 * linux-low.c (inferior_pid): New static variable,
15050 moved from server.c.
15051 (linux_create_inferior): Renamed from create_inferior.
15052 Call add_inferior. Return 0 on success instead of a PID.
15053 (linux_attach): Renamed from myattach.
15054 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15055 (linux_thread_alive): Renamed from mythread_alive.
15056 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15058 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15059 (regsets_store_inferior_registers): Correct error message.
15060 Add missing ``return 0''.
15061 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15062 (linux_store_registers): Renamed from store_inferior_registers.
15063 (linux_read_memory): Renamed from read_inferior_memory.
15064 (linux_write_memory): Renamed from write_inferior_memory.
15065 (linux_target_ops): New structure.
15066 (initialize_low): Call set_target_ops ().
15067 * remote-utils.c (unhexify): New function.
15068 (hexify): New function.
15069 (input_interrupt): Send signals to ``signal_pid''.
15070 * server.c (inferior_pid): Remove.
15071 (start_inferior): Update create_inferior call.
15072 (attach_inferior): Call add_inferior.
15073 (handle_query): New function.
15074 (main): Call handle_query for `q' packets.
15075 * server.h: Include "target.h". Remove obsolete prototypes.
15076 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15078 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15080 * Makefile.in: Add WARN_CFLAGS. Update configury
15082 * configure.in: Check for <string.h>
15083 * configure: Regenerate.
15084 * config.in: Regenerate.
15085 * gdbreplay.c: Include needed system headers.
15086 (remote_open): Remove strchr prototype.
15087 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15088 * regcache.c (supply_register): Change buf argument to const void *.
15089 (supply_register_by_name): Likewise.
15090 (collect_register): Change buf argument to void *.
15091 (collect_register_by_name): Likewise.
15092 * regcache.h: Add missing prototypes.
15093 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15094 * server.c (handle_query): New function.
15095 (attached): New static variable, moved out of main.
15096 (main): Quiet longjmp clobber warnings.
15097 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15098 * utils.c (error): Remove NORETURN.