1 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3 * configure: Re-generate.
5 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7 * Makefile.in (COMPILE.pre): Add "-x c++".
9 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
11 * fork-child.c: Conditionally include <signal.h>.
13 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
15 * server.c (handle_general_set): Handle new packet
17 (handle_query): Add "QStartupWithShell" to the list of supported
19 (gdbserver_usage): Add help text explaining the
20 new "--startup-with-shell" and "--no-startup-with-shell" CLI
22 (captured_main): Recognize and act upon the presence of the new
25 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
26 Pedro Alves <palves@redhat.com>
28 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
29 * configure: Regenerate.
30 * configure.srv (srv_linux_obj): Add "fork-child.o" and
32 (i[34567]86-*-lynxos*): Likewise.
34 * fork-child.c: New file.
35 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
37 (linux_ptrace_fun): New function.
38 (linux_create_inferior): Adjust function prototype to reflect
39 change on "target.h". Adjust function code to use
41 (linux_request_interrupt): Delete "signal_pid".
42 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
43 (lynx_ptrace_fun): New function.
44 (lynx_create_inferior): Adjust function prototype to reflect
45 change on "target.h". Adjust function code to use
47 * nto-low.c (nto_create_inferior): Adjust function prototype and
48 code to reflect change on "target.h". Update comments.
49 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
50 "common-terminal.h" and "environ.h".
51 (terminal_fd): Moved to fork-child.c.
52 (old_foreground_pgrp): Likewise.
53 (restore_old_foreground_pgrp): Likewise.
54 (last_status): Make it global.
55 (last_ptid): Likewise.
56 (our_environ): New variable.
57 (startup_with_shell): Likewise.
58 (program_name): Likewise.
59 (program_argv): Rename to...
60 (program_args): ...this.
61 (wrapper_argv): New variable.
62 (start_inferior): Delete function.
63 (get_exec_wrapper): New function.
64 (get_exec_file): Likewise.
65 (get_environ): Likewise.
66 (prefork_hook): Likewise.
67 (post_fork_inferior): Likewise.
68 (postfork_hook): Likewise.
69 (postfork_child_hook): Likewise.
70 (handle_v_run): Update code to deal with arguments coming from the
71 remote host. Update calls from "start_inferior" to
73 (captured_main): Likewise. Initialize environment variable. Call
75 * server.h (post_fork_inferior): New prototype.
76 (get_environ): Likewise.
77 (last_status): Declare.
78 (last_ptid): Likewise.
79 (signal_pid): Likewise.
80 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
81 (spu_ptrace_fun): New function.
82 (spu_create_inferior): Adjust function prototype to reflect change
83 on "target.h". Adjust function code to use "fork_inferior".
84 * target.c (target_terminal_init): New function.
85 (target_terminal_inferior): Likewise.
86 (target_terminal_ours): Likewise.
87 * target.h: Include <vector>.
88 (struct target_ops) <create_inferior>: Update prototype.
89 (create_inferior): Update macro.
90 * utils.c (gdb_flush_out_err): New function.
91 * win32-low.c (win32_create_inferior): Adjust function prototype
92 and code to reflect change on "target.h".
94 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
96 * inferiors.c (switch_to_thread): New function.
98 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
100 * Makefile.in (SFILE): Add "common/job-control.c".
101 (OBS): Add "job-control.o".
103 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
105 * Makefile: Remove "@host_makefile_frag@".
107 2017-05-05 Pedro Alves <palves@redhat.com>
109 * configure: Regenerate.
111 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
113 * configure: Regenerate.
115 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
117 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
118 software_single_step change of return type to
119 std::vector<CORE_ADDR>.
120 * linux-low.c (install_software_single_step_breakpoints):
122 * linux-low.h (install_software_single_step_breakpoints):
125 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
127 * remote-utils.c: Include "gdb_termios.h" instead of
129 * terminal.h: Delete file.
131 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
133 * server.c: Include <vector>.
134 <program_argv, wrapper_argv>: Convert to std::vector.
135 (start_inferior): Rewrite function to use C++.
136 (handle_v_run): Likewise. Update code that calculates the argv
137 based on the vRun packet; use C++.
138 (captured_main): Likewise.
140 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
142 * server.c (handle_v_cont): Initialize thread_resume::thread
145 2017-04-05 Pedro Alves <palves@redhat.com>
147 * configure: Regenerate.
149 2017-04-05 Pedro Alves <palves@redhat.com>
151 * gdbreplay.c (sync_error): Constify.
152 * linux-x86-low.c (push_opcode): Constify.
154 2017-04-05 Pedro Alves <palves@redhat.com>
156 * win32-low.c (get_child_debug_event)
157 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
158 Report TARGET_WAITKIND_SPURIOUS instead.
160 2017-04-05 Pedro Alves <palves@redhat.com>
162 * remote-utils.c (remote_prepare, remote_open): Constify.
163 * remote-utils.h (remote_prepare, remote_open): Constify.
164 * server.c (captured_main): Constify 'port' handling.
166 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
168 * Makefile.in (clean): Clear .deps.
170 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
172 * .gitignore: Remove generated files, replace with wildcard.
173 * (clean): Replace removal of generated files with wildcard.
174 (version.c): Replace with...
175 (version-generated.c): ...this.
176 (xml-builtin.c): Replace with...
177 (xml-builtin-generated.c): ...this.
178 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
179 (%.c: *regformats*): Replace with...
180 (%-generated.c: *regformats*): ...this.
182 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
184 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
185 (xtensa_fill_gregset): Call collect_register_by_name for
187 (xtensa_store_gregset): Call supply_register_by_name for
190 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
192 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
193 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
194 (xtensa_store_gregset): Call supply_register for all registers in
195 a0_regnum..a0_regnum + C0_NREGS range.
197 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
199 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
200 (ax-ipa.o: ax.c): Remove.
201 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
202 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
203 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
204 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
205 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
207 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
209 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
210 (print-utils-ipa.o: ../common/print-utils.c): Remove.
211 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
212 (errors-ipa.o: ../common/errors.c): Remove.
213 (format-ipa.o: ../common/format.c): Remove.
214 (common-utils-ipa.o: ../common/common-utils.c): Remove.
216 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
218 * Makefile.in (%-ipa.o: %.c): New rule.
219 (tracepoint-ipa.o: tracepoint.c): Remove.
220 (utils-ipa.o: utils.c): Remove.
221 (remote-utils-ipa.o: remote-utils.c): Remove.
222 (regcache-ipa.o: regcache.c): Remove.
223 (i386-linux-ipa.o: i386-linux.c): Remove.
224 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
225 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
226 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
227 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
228 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
229 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
230 (amd64-linux-ipa.o: amd64-linux.c): Remove.
231 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
232 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
233 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
234 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
235 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
236 (aarch64-ipa.o: aarch64.c): Remove.
237 (s390-linux32-ipa.o: s390-linux32.c): Remove.
238 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
239 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
240 (s390-linux64-ipa.o: s390-linux64.c): Remove.
241 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
242 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
243 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
244 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
245 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
246 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
247 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
248 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
249 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
250 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
251 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
252 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
253 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
254 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
255 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
256 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
257 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
258 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
259 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
260 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
261 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
262 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
263 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
264 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
265 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
266 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
267 (tdesc-ipa.o: tdesc.c): Remove.
268 (x32-linux-ipa.o: x32-linux.c): Remove.
269 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
270 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
272 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
274 * Makefile.in (%.o: ../arch/%.c): New rule.
275 (arm.o: ../arch/arm.c): Remove.
276 (arm-linux.o: ../arch/arm-linux.c): Remove.
277 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
278 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
280 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
282 * Makefile.in (%.o: ../nat/%.c): New rule.
283 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
284 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
285 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
286 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
287 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
288 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
289 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
290 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
291 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
292 (linux-personality.o: ../nat/linux-personality.c): Remove.
293 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
294 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
295 (x86-linux.o: ../nat/x86-linux.c): Remove.
296 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
297 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
299 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
301 * Makefile.in (%.o: ../common/%.c): New rule.
302 (signals.o: ../common/signals.c): Remove.
303 (print-utils.o: ../common/print-utils.c): Remove.
304 (rsp-low.o: ../common/rsp-low.c): Remove.
305 (common-utils.o: ../common/common-utils.c): Remove.
306 (posix-strerror.o: ../common/posix-strerror.c): Remove.
307 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
308 (vec.o: ../common/vec.c): Remove.
309 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
310 (xml-utils.o: ../common/xml-utils.c): Remove.
311 (ptid.o: ../common/ptid.c): Remove.
312 (buffer.o: ../common/buffer.c): Remove.
313 (format.o: ../common/format.c): Remove.
314 (filestuff.o: ../common/filestuff.c): Remove.
315 (agent.o: ../common/agent.c): Remove.
316 (errors.o: ../common/errors.c): Remove.
317 (environ.o: ../common/environ.c): Remove.
318 (common-debug.o: ../common/common-debug.c): Remove.
319 (cleanups.o: ../common/cleanups.c): Remove.
320 (common-exceptions.o: ../common/common-exceptions.c): Remove.
321 (fileio.o: ../common/fileio.c): Remove.
322 (common-regcache.o: ../common/common-regcache.c): Remove.
323 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
324 (new-op.o: ../common/new-op.c): Remove.
325 (btrace-common.o: ../common/btrace-common.c): Remove.
327 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
329 * Makefile.in (%.o: ../target/%.c): New rule.
330 (waitstatus.o: ../target/waitstatus.c): Remove.
332 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
335 (%.c: ../regformats/%.dat,
336 (%.c: ../regformats/arm/%.dat,
337 (%.c: ../regformats/i386/%.dat,
338 (%.c: ../regformats/rs6000/%.dat): New rules.
341 (arm-with-iwmmxt.c): Remove.
342 (arm-with-vfpv2.c): Remove.
343 (arm-with-vfpv3.c): Remove.
344 (arm-with-neon.c): Remove.
345 (reg-bfin.c): Remove.
346 (reg-cris.c): Remove.
347 (reg-crisv32.c): Remove.
349 (i386-linux.c): Remove.
350 (i386-avx.c): Remove.
351 (i386-avx-linux.c): Remove.
352 (i386-avx-avx512.c): Remove.
353 (i386-avx-avx512-linux.c): Remove.
354 (i386-mpx.c): Remove.
355 (i386-mpx-linux.c): Remove.
356 (i386-avx-mpx-avx512-pku.c): Remove.
357 (i386-avx-mpx-avx512-pku-linux.c): Remove.
358 (i386-avx-mpx.c): Remove.
359 (i386-avx-mpx-linux.c): Remove.
360 (i386-mmx.c): Remove.
361 (i386-mmx-linux.c): Remove.
362 (reg-ia64.c): Remove.
363 (reg-m32r.c): Remove.
364 (reg-m68k.c): Remove.
366 (mips-linux.c): Remove.
367 (mips-dsp-linux.c): Remove.
368 (mips64-linux.c): Remove.
369 (mips64-dsp-linux.c): Remove.
370 (nios2-linux.c): Remove.
371 (powerpc-32.c): Remove.
372 (powerpc-32l.c): Remove.
373 (powerpc-altivec32l.c): Remove.
374 (powerpc-cell32l.c): Remove.
375 (powerpc-vsx32l.c): Remove.
376 (powerpc-isa205-32l.c): Remove.
377 (powerpc-isa205-altivec32l.c): Remove.
378 (powerpc-isa205-vsx32l.c): Remove.
379 (powerpc-e500l.c): Remove.
380 (powerpc-64l.c): Remove.
381 (powerpc-altivec64l.c): Remove.
382 (powerpc-cell64l.c): Remove.
383 (powerpc-vsx64l.c): Remove.
384 (powerpc-isa205-64l.c): Remove.
385 (powerpc-isa205-altivec64l.c): Remove.
386 (powerpc-isa205-vsx64l.c): Remove.
387 (s390-linux32.c): Remove.
388 (s390-linux32v1.c): Remove.
389 (s390-linux32v2.c): Remove.
390 (s390-linux64.c): Remove.
391 (s390-linux64v1.c): Remove.
392 (s390-linux64v2.c): Remove.
393 (s390-te-linux64.c): Remove.
394 (s390-vx-linux64.c): Remove.
395 (s390-tevx-linux64.c): Remove.
396 (s390x-linux64.c): Remove.
397 (s390x-linux64v1.c): Remove.
398 (s390x-linux64v2.c): Remove.
399 (s390x-te-linux64.c): Remove.
400 (s390x-vx-linux64.c): Remove.
401 (s390x-tevx-linux64.c): Remove.
402 (tic6x-c64xp-linux.c): Remove.
403 (tic6x-c64x-linux.c): Remove.
404 (tic6x-c62x-linux.c): Remove.
406 (reg-sparc64.c): Remove.
409 (amd64-linux.c): Remove.
410 (amd64-avx.c): Remove.
411 (amd64-avx-linux.c): Remove.
412 (amd64-avx-avx512.c): Remove.
413 (amd64-avx-avx512-linux.c): Remove.
414 (amd64-mpx.c): Remove.
415 (amd64-mpx-linux.c): Remove.
416 (amd64-avx-mpx-avx512-pku.c): Remove.
417 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
418 (amd64-avx-mpx.c): Remove.
419 (amd64-avx-mpx-linux.c): Remove.
421 (x32-linux.c): Remove.
423 (x32-avx-linux.c): Remove.
424 (x32-avx-avx512.c): Remove.
425 (x32-avx-avx512-linux.c): Remove.
426 (reg-xtensa.c): Remove.
427 (reg-tilegx.c): Remove.
428 (reg-tilegx32.c): Remove.
430 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
432 * Makefile.in (SFILES): Add "common/environ.c".
433 (OBJS): Add "common/environ.h".
435 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
437 * configure.ac: Check if the fs_base and gs_base members of
438 `struct user_regs_struct' exist.
439 * config.in: Regenerated.
440 * configure: Likewise.
442 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
444 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
446 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
447 (get_next_pcs_syscall_next_pc): Likewise.
449 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
451 * win32-i386-low.c: Fix incorrect reference to a couple source files.
452 * nto-x86-low.c: Likewise.
454 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
456 * Makefile.in: Include disable-implicit-rules.mk.
458 2016-11-23 Pedro Alves <palves@redhat.com>
460 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
461 (debug_vprintf): Use std::chrono::steady_clock instead of
462 gettimeofday. Use '.' instead of ':'.
463 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
464 (get_timestamp): Use std::chrono::steady_clock instead of
467 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
469 * Makefile.in: Fix whitespace formatting.
471 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
473 * Makefile.in (SFILES, OBS): Flatten list and order
476 2016-11-23 Pedro Alves <palves@redhat.com>
478 * event-loop.c (handle_file_event): Use warning.
479 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
480 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
483 2016-11-23 Pedro Alves <palves@redhat.com>
485 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
487 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
488 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
489 debug_printf and debug_flush for debug output.
490 * server.c (handle_general_set): Likewise.
491 * thread-db.c (try_thread_db_load): Use debug_printf for debug
494 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
496 * Makefile.in (.c.o): Replace rule with ...
497 (%.o: %.c): ... this one.
499 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
501 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
502 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
504 * configure.ac: Remove checks for the make program.
505 * configure: Re-generate.
507 2016-10-28 Pedro Alves <palves@redhat.com>
509 * Makefile.in (CXX_DIALECT): Get from configure.
510 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
511 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
512 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
513 * config.in: Regenerate.
514 * configure: Regenerate.
516 2016-10-27 Yao Qi <yao.qi@linaro.org>
518 * linux-low.c (linux_supports_range_stepping): Return true if
519 can_software_single_step return true.
521 2016-10-27 Yao Qi <yao.qi@linaro.org>
523 * inferiors.c (find_inferior_in_random): New function.
524 * inferiors.h (find_inferior_in_random): Declare.
525 * linux-low.c (linux_wait_for_event_filtered): Call
526 find_inferior_in_random instead of find_inferior.
528 2016-10-27 Yao Qi <yao.qi@linaro.org>
530 * linux-low.c (linux_wait_1): If single-step breakpoints are
531 inserted, remove them.
533 2016-10-26 Pedro Alves <palves@redhat.com>
535 * linux-low.c (handle_extended_wait): Link parent/child fork
537 (linux_wait_1): Unlink them.
538 (linux_set_resume_request): Ignore resume requests for
539 already-resumed and unhandled fork child threads.
540 * linux-low.h (struct lwp_info) <fork_relative>: New field.
541 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
543 (handle_v_requests) <vCont>: Don't call require_running.
544 * server.h (in_queued_stop_replies): New declaration.
546 2016-10-24 Yao Qi <yao.qi@linaro.org>
549 * linux-aarch64-low.c (append_insns): Cast the return value to
552 2016-10-10 Yao Qi <yao.qi@linaro.org>
554 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
556 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
558 * target.c (target_supports_multi_process): New function, moved
560 * target.h (target_supports_multi_process): ... here. Remove
563 2016-10-05 Tom Tromey <tom@tromey.com>
566 * tracepoint.c (handle_tracepoint_bkpts): Check
567 ipa_error_tracepoint, not ipa_stopping_tracepoint.
569 2016-10-05 Yao Qi <yao.qi@linaro.org>
571 * configure.srv: Update the path of arm-*.xml files.
573 2016-10-05 Terry Guo <terry.guo@arm.com>
574 Yao Qi <yao.qi@linaro.org>
576 * Makefile.in: Adjust the path of rules.
577 * configure.srv: Update the path of xml files.
578 * regformats/arm-with-iwmmxt.dat: Regenerated.
579 * regformats/arm-with-neon.dat: Likewise.
580 * regformats/arm-with-vfpv2.dat: Likewise.
581 * regformats/arm-with-vfpv3.dat Likewise.
583 2016-09-30 Yao Qi <yao.qi@linaro.org>
586 * target.c (target_stop_and_wait): Don't call
587 target_continue_no_signal, use resume_stop instead.
589 2016-09-26 Yao Qi <yao.qi@linaro.org>
591 * linux-low.c (linux_wait_1): Call debug_exit.
593 2016-09-23 Pedro Alves <palves@redhat.com>
595 * Makefile.in (SFILES): Add common/new-op.c.
596 (OBS): Add common/new-op.o.
597 (new-op.o): New rule.
599 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
601 * .gitinore: Ignore more files.
603 2016-09-21 Yao Qi <yao.qi@linaro.org>
605 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
608 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
610 * server.c (start_inferior): Call target_mourn_inferior instead of
611 mourn_inferior; pass ptid_t argument to it.
613 (handle_target_event): Likewise.
614 * target.c (target_mourn_inferior): New function.
615 * target.h (mourn_inferior): Delete macro.
617 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
619 * linux-low.c (lwp_is_stepping): New function.
621 2016-09-06 Carl Love <cel@us.ibm.com>
623 * server.c (start_inferior): Fixed comment, requested comment change
624 didn't get updated correctly. Removed reference to ptrace () call as
625 it is only true on Linux systems.
627 2016-09-06 Carl Love <cel@us.ibm.com>
629 * server.c (start_inferior): Do not call
630 function target_post_create_inferior () if the
631 inferior process has already exited.
633 2016-09-05 Pedro Alves <palves@redhat.com>
635 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
636 (COMPILE.pre, CC_LD): Use CXX directly.
637 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
638 * acinclude.m4: Don't include build-with-cxx.m4.
639 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
640 * configure: Regenerate.
642 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
645 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
646 call writing data to own_buf.
648 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
650 * target.c (mywait): Call target_wait instead of
652 (target_wait): New function.
654 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
656 * server.c (start_inferior): New variable 'ptid'. Replace calls
657 to the_target->resume by target_continue{,_no_signal}, depending
659 * target.c (target_stop_and_wait): Call target_continue_no_signal
660 instead of the_target->resume.
661 (target_continue): New function.
663 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
665 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
667 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
670 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
672 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
673 * linux-arm-low.c (ps_get_thread_area): Likewise.
674 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
675 * linux-m68k-low.c (ps_get_thread_area): Likewise.
676 * linux-mips-low.c (ps_get_thread_area): Likewise.
677 * linux-nios2-low.c (ps_get_thread_area): Likewise.
678 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
679 * linux-x86-low.c (ps_get_thread_area): Likewise.
680 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
682 2016-08-19 Pedro Alves <palves@redhat.com>
684 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
686 2016-08-19 Pedro Alves <palves@redhat.com>
688 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
689 comment. Use memcpy instead of casting through unsigned long.
691 2016-08-19 Pedro Alves <palves@redhat.com>
693 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
694 allocating around 0x80000000.
696 2016-08-19 Pedro Alves <palves@redhat.com>
699 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
700 (x32-avx512-linux-ipa.o): New rules.
701 * configure.ac (x86_64-*-linux*): New x32 check.
702 * configure.srv (ipa_x32_linux_regobj): New.
703 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
704 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
706 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
708 * configure: Regenerate.
710 2016-08-09 Pedro Alves <palves@redhat.com>
713 * Makefile.in (OBS): Add signals-state-save-restore.o.
714 (signals-state-save-restore.o): New rule.
715 * config.in: Regenerate.
716 * configure: Regenerate.
717 * linux-low.c: Include "signals-state-save-restore.h".
718 (linux_create_inferior): Call
719 restore_original_signals_state.
720 * server.c: Include "dispositions-save-restore.h".
721 (captured_main): Call save_original_signals_state.
723 2016-08-05 Pedro Alves <palves@redhat.com>
725 * configure: Regenerate.
727 2016-08-04 Yao Qi <yao.qi@linaro.org>
729 * linux-low.c (regsets_fetch_inferior_registers): Check
730 errno is ESRCH or not.
732 2016-08-02 Yao Qi <yao.qi@linaro.org>
734 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
735 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
736 (thread_db_load_search): Update.
737 (try_thread_db_load_1): Don't look for td_ta_event_addr,
738 td_ta_set_event and td_ta_event_getmsg.
740 2016-07-26 Pedro Alves <palves@redhat.com>
743 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
744 of unsigned long for 64-bit registers and use uint32_t instead of
745 unsigned int for 32-bit registers.
747 2016-07-26 Pedro Alves <palves@redhat.com>
749 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
752 2016-07-21 Tom Tromey <tom@tromey.com>
754 * configure: Rebuild.
756 2016-07-21 Yao Qi <yao.qi@linaro.org>
758 * mem-break.c (find_gdb_breakpoint): Cast bp to
759 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
761 2016-07-21 Yao Qi <yao.qi@linaro.org>
763 * server.c (handle_v_requests): Support s and S actions
764 if target_supports_software_single_step return true.
766 2016-07-21 Yao Qi <yao.qi@linaro.org>
768 * linux-low.c (resume_stopped_resumed_lwps): If resume request
769 is resume_step, call maybe_hw_step.
770 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
772 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
774 (proceed_one_lwp): If resume request is resume_step, install
775 reinsert breakpoints and call maybe_hw_step.
777 2016-07-21 Yao Qi <yao.qi@linaro.org>
779 * linux-low.c (proceed_one_lwp): Declare.
780 (linux_resume_one_thread): Remove local variable 'step'.
781 Lift code enqueue signal. Call proceed_one_lwp instead of
782 linux_resume_one_lwp.
784 2016-07-21 Yao Qi <yao.qi@linaro.org>
786 * linux-low.c (linux_resume_one_thread): Call
787 enqueue_pending_signal.
789 2016-07-21 Yao Qi <yao.qi@linaro.org>
791 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
792 * inferiors.c (do_restore_current_thread_cleanup): New function.
793 (make_cleanup_restore_current_thread): Likewise.
794 * linux-low.c (install_software_single_step_breakpoints): Call
795 make_cleanup_restore_current_thread. Switch current_thread to
798 2016-07-21 Yao Qi <yao.qi@linaro.org>
800 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
801 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
802 (clone_one_breakpoint): Likewise.
803 (delete_reinsert_breakpoints): Change parameter to thread.
805 (has_reinsert_breakpoints): Likewise.
806 (uninsert_reinsert_breakpoints): Likewise.
807 (reinsert_reinsert_breakpoints): Likewise.
808 * mem-break.h (set_reinsert_breakpoint): Update declaration.
809 (delete_reinsert_breakpoints): Likewise.
810 (reinsert_reinsert_breakpoints): Likewise.
811 (uninsert_reinsert_breakpoints): Likewise.
812 (has_reinsert_breakpoints): Likewise.
814 2016-07-21 Yao Qi <yao.qi@linaro.org>
816 * inferiors.c (get_thread_process): Make parameter const.
817 * inferiors.h (get_thread_process): Update declaration.
818 * mem-break.c (clone_all_breakpoints): Remove all parameters.
819 Add new parameters child_thread and parent_thread. Callers
821 * mem-break.h (clone_all_breakpoints): Update declaration.
823 2016-07-21 Yao Qi <yao.qi@linaro.org>
825 * mem-break.c (struct breakpoint) <cond_list>: Remove.
826 <command_list, handler>: Remove.
827 (struct gdb_breakpoint): New.
828 (struct other_breakpoint): New.
829 (struct reinsert_breakpoint): New.
830 (is_gdb_breakpoint): New function.
831 (any_persistent_commands): Update command_list if
832 is_gdb_breakpoint returns true.
833 (set_breakpoint): Create breakpoints according to their types.
834 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
835 (set_gdb_breakpoint_1): Likewise.
836 (set_gdb_breakpoint): Likewise.
837 (clear_breakpoint_conditions): Change parameter type to
838 'struct gdb_breakpoint *'.
839 (clear_breakpoint_commands): Likewise.
840 (clear_breakpoint_conditions_and_commands): Likewise.
841 (add_condition_to_breakpoint): Likewise.
842 (add_breakpoint_condition): Likewise.
843 (add_commands_to_breakpoint): Likewise.
844 (check_breakpoints): Check other_breakpoint.
845 (clone_one_breakpoint): Clone breakpopint according to its type.
846 * mem-break.h (struct gdb_breakpoint): Declare.
847 (set_gdb_breakpoint): Update declaration.
848 (clear_breakpoint_conditions_and_commands): Likewise.
849 (add_breakpoint_condition): Likewise.
850 (add_breakpoint_commands): Likewise.
851 * server.c (process_point_options): Change parameter type to
852 'struct gdb_breakpoint *'.
854 2016-07-21 Yao Qi <yao.qi@linaro.org>
856 * mem-break.c (set_breakpoint_at): Rename it to ...
857 (set_breakpoint_type_at): ... it.
858 (set_breakpoint_at): Call set_breakpoint_type_at.
859 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
860 * mem-break.h (set_breakpoint_at): Update comments.
862 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
864 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
866 (nios2_store_gregset): Likewise.
868 2016-07-01 Pedro Alves <palves@redhat.com>
869 Antoine Tremblay <antoine.tremblay@ericsson.com>
871 * linux-low.c: Change interface to take the target lwp_info
872 pointer directly and return void. Handle detaching from a zombie
874 (linux_detach_lwp_callback): New function.
875 (linux_detach): Detach from the leader thread after detaching from
878 2016-06-28 Yao Qi <yao.qi@linaro.org>
880 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
881 for variable new_offset.
882 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
883 (aarch64_ftrace_insn_reloc_cb): Likewise.
884 (aarch64_ftrace_insn_reloc_tb): Likewise.
885 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
886 PRIx64 instead of PRIx32.
888 2016-06-28 Yao Qi <yao.qi@linaro.org>
890 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
891 (the_low_target): Install arm_get_syscall_trapinfo.
893 2016-06-28 Yao Qi <yao.qi@linaro.org>
895 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
897 (the_low_target): Install aarch64_get_syscall_trapinfo.
899 2016-06-28 Yao Qi <yao.qi@linaro.org>
901 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
903 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
904 Remove parameter sysno.
905 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
908 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
910 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
911 (s390_emit_ne_goto): Likewise.
912 (s390_emit_lt_goto): Likewise.
913 (s390_emit_le_goto): Likewise.
914 (s390_emit_gt_goto): Likewise.
915 (s390_emit_ge_goto): Likewise.
916 (s390x_emit_eq_goto): Likewise.
917 (s390x_emit_ne_goto): Likewise.
918 (s390x_emit_lt_goto): Likewise.
919 (s390x_emit_le_goto): Likewise.
920 (s390x_emit_gt_goto): Likewise.
921 (s390x_emit_ge_goto): Likewise.
922 (s390_emit_ops_impl): Mark variable static.
923 (s390x_emit_ops): Likewise.
925 2016-06-17 Yao Qi <yao.qi@linaro.org>
927 * linux-low.c (handle_extended_wait): Call
928 uninsert_reinsert_breakpoints for the parent process. Remove
929 reinsert breakpoints from the child process. Reinsert them to
930 the parent process when vfork is done.
931 * mem-break.c (uninsert_reinsert_breakpoints): New function.
932 (reinsert_reinsert_breakpoints): New function.
933 * mem-break.h (uninsert_reinsert_breakpoints): Declare
934 (reinsert_reinsert_breakpoints): Declare.
936 2016-06-17 Yao Qi <yao.qi@linaro.org>
938 * linux-low.c (handle_extended_wait): If the parent is doing
939 step-over, remove the reinsert breakpoints from the forked child.
941 2016-06-17 Yao Qi <yao.qi@linaro.org>
943 * linux-low.c (unsuspend_all_lwps): Declare.
944 (linux_low_filter_event): If thread exited, call finish_step_over.
945 If step-over is finished, unsuspend other threads.
947 2016-06-17 Yao Qi <yao.qi@linaro.org>
949 * linux-low.c (linux_resume_one_lwp_throw): Assert
950 has_reinsert_breakpoints returns false.
951 * mem-break.c (delete_disabled_breakpoints): Assert
952 bp type isn't reinsert_breakpoint.
954 2016-06-17 Yao Qi <yao.qi@linaro.org>
956 * linux-low.c (maybe_hw_step): New function.
957 (linux_resume_one_lwp_throw): Call maybe_hw_step.
958 (finish_step_over): Switch current_thread to lwp temporarily,
959 and assert has_reinsert_breakpoints returns true.
960 (proceed_one_lwp): Call maybe_hw_step.
961 * mem-break.c (has_reinsert_breakpoints): New function.
962 * mem-break.h (has_reinsert_breakpoints): Declare.
964 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
966 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
968 2016-05-17 Yao Qi <yao.qi@linaro.org>
970 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
971 instead of find_inferior.
973 2016-05-05 Yao Qi <yao.qi@linaro.org>
975 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
976 Initialize res to zero.
978 2016-05-05 Yao Qi <yao.qi@linaro.org>
980 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
983 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
985 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
986 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
987 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
989 2016-04-28 Par Olsson <par.olsson@windriver.com>
990 Simon Marchi <simon.marchi@ericsson.com>
992 * tracepoint.c (write_inferior_int8): New function.
993 (cmd_qtenable_disable): Write enable flag using
996 2016-04-25 Yao Qi <yao.qi@linaro.org>
998 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
999 (need_step_over_p): Return zero if the LWP has pending signals
1000 can be delivered on software single step target.
1002 2016-04-25 Yao Qi <yao.qi@linaro.org>
1004 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1005 return instead of error.
1007 2016-04-22 Yao Qi <yao.qi@linaro.org>
1009 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1012 2016-04-22 Yao Qi <yao.qi@linaro.org>
1014 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1015 signal when stepping over breakpoint with software single
1018 2016-04-21 Pedro Alves <palves@redhat.com>
1020 * linux-s390-low.c (s390_collect_ptrace_register)
1021 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1023 (s390_check_regset): Use void * instead of gdb_byte *.
1025 2016-04-20 Pedro Alves <palves@redhat.com>
1027 * configure: Renegerate.
1029 2016-04-20 Yao Qi <yao.qi@linaro.org>
1031 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1032 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1034 (arm_store_gregset): Likewise.
1036 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1038 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1039 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1040 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1041 (amd64-avx-mpx-linux.c): New rules.
1042 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1043 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1044 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1045 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1046 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1047 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1048 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1049 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1050 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1051 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1052 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1053 * linux-x86-low.c (x86_linux_read_description): Add case for
1054 X86_XSTATE_AVX_MPX_MASK.
1055 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1056 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1057 init_registers_i386_avx_mpx_linux.
1058 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1059 (initialize_low_tracepoint): Call
1060 init_registers_i386_avx_mpx_linux.
1061 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1062 (initialize_low_tracepoint): Call
1063 init_registers_amd64_avx_mpx_linux.
1064 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1065 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1066 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1069 2016-04-18 Pedro Alves <palves@redhat.com>
1071 * configure: Regenerate.
1073 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1075 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1076 (aarch64_emit_sub): Likewise.
1078 2016-04-12 Pedro Alves <palves@redhat.com>
1080 * utils.c (prepare_to_throw_exception): Delete.
1082 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1084 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1086 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1088 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1090 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1092 * linux-aarch64-ipa.c: Add <elf.h> include.
1093 * linux-ppc-ipa.c: Add <elf.h> include.
1094 * linux-s390-ipa.c: Add <elf.h> include.
1096 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1098 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1099 (get_raw_reg_ptr): Likewise.
1100 (get_trace_state_variable_value_ptr): Likewise.
1101 (set_trace_state_variable_value_ptr): Likewise.
1102 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1105 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1106 Marcin Kościelnicki <koriakin@0x04.net>
1109 * linux-ppc-low.c (emit_insns): New function.
1110 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1111 (ppc_emit_prologue): New function.
1112 (ppc_emit_epilogue): New function.
1113 (ppc_emit_add): New function.
1114 (ppc_emit_sub): New function.
1115 (ppc_emit_mul): New function.
1116 (ppc_emit_lsh): New function.
1117 (ppc_emit_rsh_signed): New function.
1118 (ppc_emit_rsh_unsigned): New function.
1119 (ppc_emit_ext): New function.
1120 (ppc_emit_zero_ext): New function.
1121 (ppc_emit_log_not): New function.
1122 (ppc_emit_bit_and): New function.
1123 (ppc_emit_bit_or): New function.
1124 (ppc_emit_bit_xor): New function.
1125 (ppc_emit_bit_not): New function.
1126 (ppc_emit_equal): New function.
1127 (ppc_emit_less_signed): New function.
1128 (ppc_emit_less_unsigned): New function.
1129 (ppc_emit_ref): New function.
1130 (ppc_emit_const): New function.
1131 (ppc_emit_reg): New function.
1132 (ppc_emit_pop): New function.
1133 (ppc_emit_stack_flush): New function.
1134 (ppc_emit_swap): New function.
1135 (ppc_emit_stack_adjust): New function.
1136 (ppc_emit_call): New function.
1137 (ppc_emit_int_call_1): New function.
1138 (ppc_emit_void_call_2): New function.
1139 (ppc_emit_if_goto): New function.
1140 (ppc_emit_goto): New function.
1141 (ppc_emit_eq_goto): New function.
1142 (ppc_emit_ne_goto): New function.
1143 (ppc_emit_lt_goto): New function.
1144 (ppc_emit_le_goto): New function.
1145 (ppc_emit_gt_goto): New function.
1146 (ppc_emit_ge_goto): New function.
1147 (ppc_write_goto_address): New function.
1148 (ppc_emit_ops_impl): New static variable.
1149 (ppc64v1_emit_prologue): New function.
1150 (ppc64v2_emit_prologue): New function.
1151 (ppc64_emit_epilogue): New function.
1152 (ppc64_emit_add): New function.
1153 (ppc64_emit_sub): New function.
1154 (ppc64_emit_mul): New function.
1155 (ppc64_emit_lsh): New function.
1156 (ppc64_emit_rsh_signed): New function.
1157 (ppc64_emit_rsh_unsigned): New function.
1158 (ppc64_emit_ext): New function.
1159 (ppc64_emit_zero_ext): New function.
1160 (ppc64_emit_log_not): New function.
1161 (ppc64_emit_bit_and): New function.
1162 (ppc64_emit_bit_or): New function.
1163 (ppc64_emit_bit_xor): New function.
1164 (ppc64_emit_bit_not): New function.
1165 (ppc64_emit_equal): New function.
1166 (ppc64_emit_less_signed): New function.
1167 (ppc64_emit_less_unsigned): New function.
1168 (ppc64_emit_ref): New function.
1169 (ppc64_emit_const): New function.
1170 (ppc64v1_emit_reg): New function.
1171 (ppc64v2_emit_reg): New function.
1172 (ppc64_emit_pop): New function.
1173 (ppc64_emit_stack_flush): New function.
1174 (ppc64_emit_swap): New function.
1175 (ppc64v1_emit_call): New function.
1176 (ppc64v2_emit_call): New function.
1177 (ppc64v1_emit_int_call_1): New function.
1178 (ppc64v2_emit_int_call_1): New function.
1179 (ppc64v1_emit_void_call_2): New function.
1180 (ppc64v2_emit_void_call_2): New function.
1181 (ppc64_emit_if_goto): New function.
1182 (ppc64_emit_eq_goto): New function.
1183 (ppc64_emit_ne_goto): New function.
1184 (ppc64_emit_lt_goto): New function.
1185 (ppc64_emit_le_goto): New function.
1186 (ppc64_emit_gt_goto): New function.
1187 (ppc64_emit_ge_goto): New function.
1188 (ppc64v1_emit_ops_impl): New static variable.
1189 (ppc64v2_emit_ops_impl): New static variable.
1190 (ppc_emit_ops): New function.
1191 (linux_low_target): Wire in ppc_emit_ops.
1193 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1194 Marcin Kościelnicki <koriakin@0x04.net>
1197 * Makefile.in: Add powerpc-*-ipa.o
1198 * configure.srv: Add ipa_obj for powerpc*-linux.
1199 * linux-ppc-ipa.c: New file.
1200 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1202 (PPC_FIELD): New macro.
1203 (PPC_SEXT): New macro.
1204 (PPC_OP6): New macro.
1205 (PPC_BO): New macro.
1206 (PPC_LI): New macro.
1207 (PPC_BD): New macro.
1208 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1209 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1210 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1211 (ppc_get_thread_area): New function.
1212 (is_elfv2_inferior): New function.
1213 (gen_ds_form): New function.
1214 (GEN_STD): New macro.
1215 (GEN_STDU): New macro.
1216 (GEN_LD): New macro.
1217 (GEN_LDU): New macro.
1218 (gen_d_form): New function.
1219 (GEN_ADDI): New macro.
1220 (GEN_ADDIS): New macro.
1221 (GEN_LI): New macro.
1222 (GEN_LIS): New macro.
1223 (GEN_ORI): New macro.
1224 (GEN_ORIS): New macro.
1225 (GEN_LWZ): New macro.
1226 (GEN_STW): New macro.
1227 (GEN_STWU): New macro.
1228 (gen_xfx_form): New function.
1229 (GEN_MFSPR): New macro.
1230 (GEN_MTSPR): New macro.
1231 (GEN_MFCR): New macro.
1232 (GEN_MTCR): New macro.
1233 (GEN_SYNC): New macro.
1234 (GEN_LWSYNC): New macro.
1235 (gen_x_form): New function.
1236 (GEN_OR): New macro.
1237 (GEN_MR): New macro.
1238 (GEN_LWARX): New macro.
1239 (GEN_STWCX): New macro.
1240 (GEN_CMPW): New macro.
1241 (gen_md_form): New function.
1242 (GEN_RLDICL): New macro.
1243 (GEN_RLDICR): New macro.
1244 (gen_i_form): New function.
1246 (GEN_BL): New macro.
1247 (gen_b_form): New function.
1248 (GEN_BNE): New macro.
1249 (GEN_LOAD): New macro.
1250 (GEN_STORE): New macro.
1251 (gen_limm): New function.
1252 (gen_atomic_xchg): New function.
1253 (gen_call): New function.
1254 (ppc_relocate_instruction): New function.
1255 (ppc_install_fast_tracepoint_jump_pad): New function.
1256 (ppc_get_min_fast_tracepoint_insn_len): New function.
1257 (ppc_get_ipa_tdesc_idx): New function.
1258 (the_low_target): Wire in the new functions.
1259 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1261 * linux-ppc-tdesc.h: New file.
1263 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1265 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1266 (alloc_jump_pad_buffer): New function.
1267 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1268 (alloc_jump_pad_buffer): New function.
1269 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1270 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1271 (alloc_jump_pad_buffer): New function.
1272 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1273 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1274 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1275 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1277 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1279 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1280 * linux-amd64-ipa.c: Likewise.
1281 * linux-i386-ipa.c: Likewise.
1282 * linux-s390-ipa.c: Likewise.
1283 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1284 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1285 set_trace_state_variable_value_ptr.
1286 (struct ipa_sym_addresses): Likewise.
1287 (symbol_list): Likewise.
1288 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1289 accessing gdb_collect directly.
1290 (gdb_collect_ptr_type): New typedef.
1291 (get_raw_reg_ptr_type): New typedef.
1292 (get_trace_state_variable_value_ptr_type): New typedef.
1293 (set_trace_state_variable_value_ptr_type): New typedef.
1294 (gdb_collect_ptr): New global.
1295 (get_raw_reg_ptr): New global.
1296 (get_trace_state_variable_value_ptr): New global.
1297 (set_trace_state_variable_value_ptr): New global.
1298 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1299 accessing get_raw_reg directly.
1300 (get_get_tsv_func_addr): Likewise for
1301 get_trace_state_variable_value_ptr.
1302 (get_set_tsv_func_addr): Likewise for
1303 set_trace_state_variable_value_ptr.
1304 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1306 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1308 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1310 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1312 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1314 (relocate_instruction): Remove own_buf.
1315 * server.c (own_buf): Make global.
1316 (handle_v_requests): Make global.
1317 * server.h (own_buf): New declaration.
1318 (handle_v_requests): New prototype.
1320 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1323 * linux-s390-low.c (add_insns): New function.
1324 (s390_emit_prologue): New function.
1325 (s390_emit_epilogue): New function.
1326 (s390_emit_add): New function.
1327 (s390_emit_sub): New function.
1328 (s390_emit_mul): New function.
1329 (s390_emit_lsh): New function.
1330 (s390_emit_rsh_signed): New function.
1331 (s390_emit_rsh_unsigned): New function.
1332 (s390_emit_ext): New function.
1333 (s390_emit_log_not): New function.
1334 (s390_emit_bit_and): New function.
1335 (s390_emit_bit_or): New function.
1336 (s390_emit_bit_xor): New function.
1337 (s390_emit_bit_not): New function.
1338 (s390_emit_equal): New function.
1339 (s390_emit_less_signed): New function.
1340 (s390_emit_less_unsigned): New function.
1341 (s390_emit_ref): New function.
1342 (s390_emit_if_goto): New function.
1343 (s390_emit_goto): New function.
1344 (s390_write_goto_address): New function.
1345 (s390_emit_litpool): New function.
1346 (s390_emit_const): New function.
1347 (s390_emit_call): New function.
1348 (s390_emit_reg): New function.
1349 (s390_emit_pop): New function.
1350 (s390_emit_stack_flush): New function.
1351 (s390_emit_zero_ext): New function.
1352 (s390_emit_swap): New function.
1353 (s390_emit_stack_adjust): New function.
1354 (s390_emit_set_r2): New function.
1355 (s390_emit_int_call_1): New function.
1356 (s390_emit_void_call_2): New function.
1357 (s390_emit_eq_goto): New function.
1358 (s390_emit_ne_goto): New function.
1359 (s390_emit_lt_goto): New function.
1360 (s390_emit_le_goto): New function.
1361 (s390_emit_gt_goto): New function.
1362 (s390_emit_ge_goto): New function.
1363 (s390x_emit_prologue): New function.
1364 (s390x_emit_epilogue): New function.
1365 (s390x_emit_add): New function.
1366 (s390x_emit_sub): New function.
1367 (s390x_emit_mul): New function.
1368 (s390x_emit_lsh): New function.
1369 (s390x_emit_rsh_signed): New function.
1370 (s390x_emit_rsh_unsigned): New function.
1371 (s390x_emit_ext): New function.
1372 (s390x_emit_log_not): New function.
1373 (s390x_emit_bit_and): New function.
1374 (s390x_emit_bit_or): New function.
1375 (s390x_emit_bit_xor): New function.
1376 (s390x_emit_bit_not): New function.
1377 (s390x_emit_equal): New function.
1378 (s390x_emit_less_signed): New function.
1379 (s390x_emit_less_unsigned): New function.
1380 (s390x_emit_ref): New function.
1381 (s390x_emit_if_goto): New function.
1382 (s390x_emit_const): New function.
1383 (s390x_emit_call): New function.
1384 (s390x_emit_reg): New function.
1385 (s390x_emit_pop): New function.
1386 (s390x_emit_stack_flush): New function.
1387 (s390x_emit_zero_ext): New function.
1388 (s390x_emit_swap): New function.
1389 (s390x_emit_stack_adjust): New function.
1390 (s390x_emit_int_call_1): New function.
1391 (s390x_emit_void_call_2): New function.
1392 (s390x_emit_eq_goto): New function.
1393 (s390x_emit_ne_goto): New function.
1394 (s390x_emit_lt_goto): New function.
1395 (s390x_emit_le_goto): New function.
1396 (s390x_emit_gt_goto): New function.
1397 (s390x_emit_ge_goto): New function.
1398 (s390_emit_ops): New function.
1399 (struct linux_target_ops): Fill in emit_ops hook.
1401 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1404 * Makefile.in: Add s390 IPA files.
1405 * configure.srv: Build IPA for s390.
1406 * linux-s390-ipa.c: New file.
1407 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1408 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1409 (tdesc_s390_linux32): Likewise.
1410 (init_registers_s390_linux32v1): Likewise.
1411 (tdesc_s390_linux32v1): Likewise.
1412 (init_registers_s390_linux32v2): Likewise.
1413 (tdesc_s390_linux32v2): Likewise.
1414 (init_registers_s390_linux64): Likewise.
1415 (tdesc_s390_linux64): Likewise.
1416 (init_registers_s390_linux64v1): Likewise.
1417 (tdesc_s390_linux64v1): Likewise.
1418 (init_registers_s390_linux64v2): Likewise.
1419 (tdesc_s390_linux64v2): Likewise.
1420 (init_registers_s390_te_linux64): Likewise.
1421 (tdesc_s390_te_linux64): Likewise.
1422 (init_registers_s390_vx_linux64): Likewise.
1423 (tdesc_s390_vx_linux64): Likewise.
1424 (init_registers_s390_tevx_linux64): Likewise.
1425 (tdesc_s390_tevx_linux64): Likewise.
1426 (init_registers_s390x_linux64): Likewise.
1427 (tdesc_s390x_linux64): Likewise.
1428 (init_registers_s390x_linux64v1): Likewise.
1429 (tdesc_s390x_linux64v1): Likewise.
1430 (init_registers_s390x_linux64v2): Likewise.
1431 (tdesc_s390x_linux64v2): Likewise.
1432 (init_registers_s390x_te_linux64): Likewise.
1433 (tdesc_s390x_te_linux64): Likewise.
1434 (init_registers_s390x_vx_linux64): Likewise.
1435 (tdesc_s390x_vx_linux64): Likewise.
1436 (init_registers_s390x_tevx_linux64): Likewise.
1437 (tdesc_s390x_tevx_linux64): Likewise.
1438 (have_hwcap_s390_vx): New static variable.
1439 (s390_arch_setup): Fill have_hwcap_s390_vx.
1440 (s390_get_thread_area): New function.
1441 (s390_ft_entry_gpr_esa): New const.
1442 (s390_ft_entry_gpr_zarch): New const.
1443 (s390_ft_entry_misc): New const.
1444 (s390_ft_entry_fr): New const.
1445 (s390_ft_entry_vr): New const.
1446 (s390_ft_main_31): New const.
1447 (s390_ft_main_64): New const.
1448 (s390_ft_exit_fr): New const.
1449 (s390_ft_exit_vr): New const.
1450 (s390_ft_exit_misc): New const.
1451 (s390_ft_exit_gpr_esa): New const.
1452 (s390_ft_exit_gpr_zarch): New const.
1453 (append_insns): New function.
1454 (s390_relocate_instruction): New function.
1455 (s390_install_fast_tracepoint_jump_pad): New function.
1456 (s390_get_min_fast_tracepoint_insn_len): New function.
1457 (s390_get_ipa_tdesc_idx): New function.
1458 (struct linux_target_ops): Wire in the above functions.
1459 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1460 * linux-s390-tdesc.h: New file.
1462 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1464 * linux-s390-low.c (s390_supports_tracepoints): New function.
1465 (struct linux_target_ops): Fill supports_tracepoints hook.
1467 2016-03-18 Yao Qi <yao.qi@linaro.org>
1469 * linux-low.c (lwp_signal_can_be_delivered): New function.
1470 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1472 2016-03-18 Yao Qi <yao.qi@linaro.org>
1474 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1475 0 if signal is enqueued. Remove 'signal' from one debugging
1476 message. Move one debugging message to some lines below.
1477 Remove code setting 'signal' to 0.
1479 2016-03-18 Yao Qi <yao.qi@linaro.org>
1481 * linux-low.c (linux_low_filter_event): Remove redundant
1482 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1484 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1486 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1487 (struct linux_target_ops): Wire in the above.
1489 2016-03-03 Yao Qi <yao.qi@linaro.org>
1491 * linux-low.c: Update comments to start_step_over.
1493 2016-03-03 Yao Qi <yao.qi@linaro.org>
1496 * linux-low.c (handle_extended_wait): Set child suspended
1497 if event_lwp->bp_reinsert isn't zero.
1499 2016-03-02 Yao Qi <yao.qi@linaro.org>
1501 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1502 enqueue_pending_signal.
1504 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1506 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1509 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1511 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1512 (s390_regmap_3264) [!__s390x__]: New global.
1513 (s390_collect_ptrace_register): Skip map entries containing -1.
1514 (s390_supply_ptrace_register): Ditto.
1515 (s390_fill_gprs_high): New function.
1516 (s390_store_gprs_high): New function.
1517 (s390_regsets): Add NT_S390_HIGH_GPRS.
1518 (s390_get_hwcap): Enable on 31-bit.
1519 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1520 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1521 Detect NT_S390_HIGH_GPRS.
1522 (s390_usrregs_info_3264): Enable on 31-bit.
1523 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1524 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1526 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1529 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1530 * configure.srv: Ditto.
1531 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1532 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1533 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1534 (init_registers_amd64_linux): Remove prototype.
1535 (tdesc_amd64_linux): Remove declaration.
1536 (get_ipa_tdesc): New function.
1537 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1538 initialize remaining tdescs.
1539 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1540 (init_registers_i386_linux): Remove prototype.
1541 (tdesc_i386_linux): Remove declaration.
1542 (get_ipa_tdesc): New function.
1543 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1544 initialize remaining tdescs.
1545 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1546 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1547 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1548 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1549 (x86_get_ipa_tdesc_idx): New function.
1550 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1551 * linux-x86-tdesc.h: New file.
1552 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1553 (target_get_ipa_tdesc_idx): New macro.
1554 * tracepoint.c (ipa_tdesc_idx): New macro.
1555 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1556 (symbol_list): Add ipa_tdesc_idx.
1557 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1558 (ipa_tdesc): Remove.
1559 (ipa_tdesc_idx): New variable.
1560 (get_context_regcache): Use get_ipa_tdesc.
1561 (gdb_collect): Ditto.
1563 * tracepoint.h (get_ipa_tdesc): New prototype.
1564 (ipa_tdesc): Remove.
1566 2016-02-24 Pedro Alves <palves@redhat.com>
1568 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1569 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1570 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1571 Factor out common code between the USE_SIGTRAP_SIGINFO and
1572 !USE_SIGTRAP_SIGINFO blocks.
1573 (linux_low_filter_event): Call save_stop_reason instead of
1574 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1576 (linux_wait_1): Update comments.
1578 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1580 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1581 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1582 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1583 ppc_insert_point, ppc_remove_point.
1585 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1587 * linux-s390-low.c (s390_supports_z_point_type): New function.
1588 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1590 2016-02-16 Yao Qi <yao.qi@linaro.org>
1592 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1593 PC. Get pc from regcache_read_pc.
1595 2016-02-12 Yao Qi <yao.qi@linaro.org>
1597 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1598 or linux_get_pc_32bit.
1599 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1601 2016-02-12 Yao Qi <yao.qi@linaro.org>
1603 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1604 arm_linux_get_next_pcs_fixup.
1606 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1608 * tracepoint.c (x_tracepoint_action_download): Change
1609 write_inferior_data_ptr to write_inferior_data_pointer.
1610 (cmd_qtstart): Likewise.
1611 (write_inferior_data_ptr): Remove.
1612 (download_agent_expr): Change write_inferior_data_ptr to
1613 write_inferior_data_pointer.
1614 (download_tracepoint_1): Likewise.
1615 (download_tracepoint): Likewise.
1616 (download_trace_state_variables): Likewise.
1618 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1619 Marcin Kościelnicki <koriakin@0x04.net>
1621 * tracepoint.c (struct tracepoint_action_ops): Remove.
1622 (struct tracepoint_action): Remove ops.
1623 (m_tracepoint_action_download, r_tracepoint_action_download)
1624 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1625 size and offset accordingly.
1626 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1627 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1628 (tracepoint_action_send, tracepoint_action_download): New functions.
1629 Helpers for trace action handlers.
1630 (add_tracepoint_action): Remove setup actions ops.
1631 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1633 2016-02-10 Yao Qi <yao.qi@linaro.org>
1635 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1637 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1639 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1641 * configure: Regenerate.
1643 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1645 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1646 void * to gdb_byte *.
1647 * linux-low.c (siginfo_fixup): Likewise.
1648 (linux_xfer_siginfo): Likewise.
1649 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1651 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1653 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1655 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1657 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1659 * linux-x86-low.c [__x86_64__]: Include
1660 "nat/amd64-linux-siginfo.h".
1661 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1662 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1663 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1664 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1665 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1666 (cpt_si_fd, si_timerid, si_overrun): Move from
1667 nat/amd64-linux-siginfo.c.
1668 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1670 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1672 * server.c (skip_to_semicolon): Remove.
1673 (process_point_options): Use strchrnul instead of
1676 2016-01-26 Yao Qi <yao.qi@linaro.org>
1678 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1679 * linux-low.c (install_software_single_step_breakpoints): Don't
1680 call regcache_read_pc.
1681 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1684 2016-01-26 Yao Qi <yao.qi@linaro.org>
1686 * linux-low.c (install_software_single_step_breakpoints): Call
1687 regcache_read_pc instead of get_pc.
1689 2016-01-26 Yao Qi <yao.qi@linaro.org>
1691 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1692 (unblock_async_io): Rename to ...
1693 (block_unblock_async_io): ... it. New function.
1694 (enable_async_io): Don't install SIGIO handler. Unblock it
1696 (disable_async_io): Don't ignore SIGIO. Block it instead.
1697 (initialize_async_io): Install SIGIO handler. Don't call
1700 2016-01-26 Yao Qi <yao.qi@linaro.org>
1702 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1703 first character is '\003', call *the_target->request_interrupt.
1705 2016-01-25 Yao Qi <yao.qi@linaro.org>
1707 * remote-utils.c (new_thread_notify): Remove.
1708 (dead_thread_notify): Likewise.
1709 * remote-utils.h (new_thread_notify): Remove declaration.
1710 (dead_thread_notify): Likewise.
1712 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1714 * gdb.trace/pending.exp: Fix expected message on continue.
1716 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1718 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1719 it works properly on big-endian machines where sizeof (CORE_ADDR)
1722 2016-01-21 Pedro Alves <palves@redhat.com>
1724 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1725 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1726 * configure: Regenerate.
1728 2016-01-21 Yao Qi <yao.qi@linaro.org>
1730 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1731 is_thumb and set it according to CPSR saved on the stack.
1732 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1733 arm_sigreturn_next_pc.
1735 2016-01-18 Yao Qi <yao.qi@linaro.org>
1737 * linux-low.c (linux_set_pc_64bit): New function.
1738 (linux_get_pc_64bit): New function.
1739 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1741 * linux-sparc-low.c (debug_threads): Remove declaration.
1742 (sparc_get_pc): Remove.
1743 (the_low_target): Use linux_get_pc_64bit instead of
1745 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1746 (the_low_target): Use linux_get_pc_64bit and
1749 2016-01-18 Yao Qi <yao.qi@linaro.org>
1751 * linux-arm-low.c (debug_threads): Remove declaration.
1752 (arm_get_pc, arm_set_pc): Remove.
1753 (the_low_target): Use linux_get_pc_32bit and
1755 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1756 (the_low_target): Use linux_get_pc_32bit and
1758 * linux-cris-low.c (debug_threads): Remove declaration.
1759 (cris_get_pc, cris_set_pc,): Remove.
1760 (the_low_target): Use linux_get_pc_32bit and
1762 * linux-crisv32-low.c (debug_threads): Remove declaration.
1763 (cris_get_pc, cris_set_pc): Remove.
1764 (the_low_target): Use linux_get_pc_32bit and
1766 * linux-low.c: Include inttypes.h.
1767 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1768 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1769 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1770 (the_low_target): Use linux_get_pc_32bit and
1772 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1773 (the_low_target): Use linux_get_pc_32bit and
1775 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1776 (the_low_target): Use linux_get_pc_32bit and
1778 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1779 (the_low_target): Use linux_get_pc_32bit and
1781 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1782 (the_low_target): Use linux_get_pc_32bit and
1785 2016-01-18 Gary Benson <gbenson@redhat.com>
1787 * configure.ac (AC_FUNC_FORK): New check.
1788 * config.in: Regenerate.
1789 * configure: Likewise.
1791 2016-01-14 Yao Qi <yao.qi@linaro.org>
1793 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1794 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1795 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1796 arm_get_next_pcs_ctor.
1798 2016-01-12 Josh Stone <jistone@redhat.com>
1799 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1801 * inferiors.h: Include "gdb_vecs.h".
1802 (struct process_info): Add syscalls_to_catch.
1803 * inferiors.c (remove_process): Free syscalls_to_catch.
1804 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1805 syscall_return stops.
1806 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1807 * server.c (handle_general_set): Handle QCatchSyscalls.
1808 (handle_query): Report support for QCatchSyscalls.
1809 * target.h (struct target_ops): Add supports_catch_syscall.
1810 (target_supports_catch_syscall): New macro.
1811 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1812 (struct lwp_info): Add syscall_state.
1813 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1814 Maintain syscall_state and syscalls_to_catch across exec.
1815 (get_syscall_trapinfo): New function, proxy to the_low_target.
1816 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1817 (linux_low_filter_event): Toggle syscall_state entry/return for
1818 syscall traps, and set it ignored for all others.
1819 (gdb_catching_syscalls_p): New function.
1820 (gdb_catch_this_syscall_p): New function.
1821 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1822 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1823 (linux_supports_catch_syscall): New function.
1824 (linux_target_ops): Install it.
1825 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1826 (the_low_target): Install it.
1828 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1830 * acinclude.m4: Include new ../warning.m4 file.
1831 * configure: Regenerated.
1832 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1834 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1836 * ax.c (is_goto_target): Mark static.
1837 * linux-low.c (register_addr): Likewise.
1838 (linux_fetch_registers, linux_store_registers): Likewise.
1839 * mem-break.c (any_persistent_commands): Fix old prototype.
1840 (add_commands_to_breakpoint): Mark static.
1841 * regcache.c (find_register_by_name): Delete unused func.
1842 * remote-utils.c (hex_or_minus_one): Mark static.
1843 * server.c (monitor_show_help): Mark static.
1844 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1845 handle_v_requests): Likewise.
1847 2016-01-12 Pedro Alves <palves@redhat.com>
1849 Remove use of the registered trademark symbol throughout.
1851 2016-01-08 Yao Qi <yao.qi@linaro.org>
1853 * remote-utils.c (getpkt): If c is '\003', call target hook
1856 2016-01-06 Yao Qi <yao.qi@linaro.org>
1858 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1859 linux-aarch32-low.c.
1860 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1861 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1862 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1863 (thumb2_breakpoint): Declare.
1864 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1865 linux-aarch32-low.h.
1866 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1867 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1868 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1870 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1872 * gdbreplay.c (gdbreplay_version): Change copyright year in
1874 * server.c (gdbserver_version): Likewise.
1876 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1878 * server.c (crc32_table): Delete.
1879 (crc32): Use libiberty's xcrc32 function.
1881 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1883 * lynx-low.c (lynx_delete_thread_callback): New function.
1884 (lynx_mourn): Properly delete our process and all of its
1885 threads. Remove call to clear_inferiors.
1887 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1889 * target.c (thread_search_callback): Add check that
1890 the thread_stopped target callback is not NULL before
1893 2015-12-21 Yao Qi <yao.qi@linaro.org>
1895 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1898 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1900 * server.c (handle_query): Call target_supports_software_single_step.
1902 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1904 * linux-low.c (single_step): New function.
1905 (linux_resume_one_lwp_throw): Call single_step.
1906 (start_step_over): Likewise.
1908 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1910 * Makefile.in (SFILES): Append arch/arm-linux.c,
1911 arch/arm-get-next-pcs.c.
1912 (arm-linux.o): New rule.
1913 (arm-get-next-pcs.o): New rule.
1914 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1916 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1917 to linux-aarch32-low.c.
1918 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1919 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1920 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1921 (thumb2_breakpoint_len): Likewise.
1922 (arm_is_thumb_mode): Make non-static.
1923 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1924 from linux-aarch32-low.c.
1925 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1926 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1927 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1928 (thumb2_breakpoint_len): Likewise.
1929 (arm_is_thumb_mode): New declaration.
1930 * linux-arm-low.c: Include arch/arm-linux.h
1931 aarch/arm-get-next-pcs.h, sys/syscall.h.
1932 (get_next_pcs_ops): New struct.
1933 (get_next_pcs_addr_bits_remove): New function.
1934 (get_next_pcs_is_thumb): New function.
1935 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1936 (arm_sigreturn_next_pc): Likewise.
1937 (get_next_pcs_syscall_next_pc): Likewise.
1938 (arm_gdbserver_get_next_pcs): Likewise.
1939 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1941 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1942 * server.h: Include gdb_vecs.h.
1944 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1946 * Makefile.in (SFILES): Append common/common-regcache.c.
1947 (OBS): Append common-regcache.o.
1948 (common-regcache.o): New rule.
1949 * regcache.c (init_register_cache): Initialize cache to
1951 (regcache_raw_read_unsigned): New function.
1952 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1953 register_status enum.
1955 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1957 * linux-aarch64-low.c (the_low_targets): Rename
1958 breakpoint_reinsert_addr to get_next_pcs.
1959 * linux-arm-low.c (the_low_targets): Likewise.
1960 * linux-bfin-low.c (the_low_targets): Likewise.
1961 * linux-cris-low.c (the_low_targets): Likewise.
1962 * linux-crisv32-low.c (the_low_targets): Likewise.
1963 * linux-low.c (can_software_single_step): Likewise.
1964 (install_software_single_step_breakpoints): New function.
1965 (start_step_over): Use install_software_single_step_breakpoints.
1966 * linux-low.h: New CORE_ADDR vector.
1967 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1969 * linux-mips-low.c (the_low_targets): Likewise.
1970 * linux-nios2-low.c (the_low_targets): Likewise.
1971 * linux-sparc-low.c (the_low_targets): Likewise.
1973 2015-12-17 Pedro Alves <palves@redhat.com>
1975 * linux-low.c (linux_kill_one_lwp): Remove references to
1977 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1979 (linux_init_signals): Delete.
1980 (initialize_low): Adjust.
1981 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1983 2015-12-16 Pedro Alves <palves@redhat.com>
1985 * configure.ac (compiler warning flags): When testing a
1986 -Wno-foo option, check whether -Wfoo works instead.
1987 * configure: Regenerate.
1989 2015-12-11 Don Breazeal <donb@codesourcery.com>
1991 * server.c (process_serial_event): Don't exit from gdbserver
1992 in remote mode if there are still active inferiors.
1994 2015-12-11 Yao Qi <yao.qi@linaro.org>
1996 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1997 arm_breakpoint_at if the process is 32-bit.
1999 2015-12-11 Yao Qi <yao.qi@linaro.org>
2001 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2004 2015-12-07 Yao Qi <yao.qi@linaro.org>
2006 * configure.srv: Append arm.o to srv_tgtobj for
2007 aarch64*-*-linux* target.
2008 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2009 from linux-arm-low.c.
2010 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2011 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2012 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2013 (thumb2_breakpoint_len): Likewise.
2014 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2015 (arm_breakpoint_kinds): Likewise.
2016 (arm_breakpoint_kind_from_pc): Likewise.
2017 (arm_sw_breakpoint_from_kind): Likewise.
2018 (arm_breakpoint_kind_from_current_state): Likewise.
2019 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2020 (arm_sw_breakpoint_from_kind): Declare.
2021 (arm_breakpoint_kind_from_current_state): Declare.
2022 (arm_breakpoint_at): Declare.
2023 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2024 arm_sw_breakpoint_from_kind if process is 32-bit.
2025 (aarch64_breakpoint_kind_from_pc): New function.
2026 (aarch64_breakpoint_kind_from_current_state): New function.
2027 (the_low_target): Initialize fields breakpoint_kind_from_pc
2028 and breakpoint_kind_from_current_state.
2029 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2030 linux-aarch32-low.c.
2031 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2032 (arm_breakpoint, arm_breakpoint_len): Likewise.
2033 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2034 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2035 (arm_is_thumb_mode): Likewise.
2036 (arm_breakpoint_at): Likewise.
2037 (arm_breakpoint_kind_from_pc): Likewise.
2038 (arm_sw_breakpoint_from_kind): Likewise.
2039 (arm_breakpoint_kind_from_current_state): Likewise.
2042 2015-08-04 Yao Qi <yao.qi@linaro.org>
2044 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2045 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2046 * server.c (extended_protocol): Remove "static".
2047 * server.h (extended_protocol): Declare it.
2049 2015-12-04 Josh Stone <jistone@redhat.com>
2051 * target.h (struct target_ops) <arch_setup>: Rename to ...
2052 (struct target_ops) <post_create_inferior>: ... this.
2053 (target_arch_setup): Rename to ...
2054 (target_post_create_inferior): ... this, calling post_create_inferior.
2055 * server.c (start_inferior): Update target_arch_setup calls to
2056 target_post_create_inferior.
2057 * linux-low.c (linux_low_ptrace_options): Forward declare.
2058 (linux_arch_setup): Update its comment for general use.
2059 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2060 (struct linux_target_ops): Use linux_post_create_inferior.
2061 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2062 to post_create_inferior.
2063 * nto-low.c (struct nto_target_ops): Likewise.
2064 * spu-low.c (struct spu_target_ops): Likewise.
2065 * win32-low.c (struct win32_target_ops): Likewise.
2067 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2069 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2071 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2073 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2074 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2075 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2076 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2077 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2078 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2079 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2080 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2081 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2082 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2083 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2084 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2086 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2088 * linux-low.c (linux_look_up_symbols): Don't call
2089 linux_supports_traceclone.
2090 * linux-low.h (thread_db_init): Remove use_events argument.
2091 * thread-db.c (thread_db_use_event): Remove global variable.
2092 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2093 (struct thread_db) <td_create_bp>: Remove field.
2094 (thread_db_create_event): Remove function.
2095 (thread_db_enable_reporting): Likewise.
2096 (find_one_thread): Don't check for thread_db_use_events.
2097 (attach_thread): Likewise.
2098 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2099 (try_thread_db_load_1): Don't check for thread_db_use_events.
2100 (thread_db_init): Remove use_events argument and thread events
2102 (remove_thread_event_breakpoints): Remove function.
2103 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2105 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2107 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2110 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2111 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2112 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2113 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2115 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2117 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2118 * linux-low.c (can_hardware_single_step): Use
2119 supports_hardware_single_step.
2120 (can_software_single_step): New function.
2121 (start_step_over): Call can_software_single_step.
2122 (linux_supports_hardware_single_step): New function.
2123 (struct target_ops) <supports_software_single_step>: Initialize.
2124 * linux-low.h (struct linux_target_ops)
2125 <supports_hardware_single_step>: Initialize.
2126 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2127 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2128 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2129 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2130 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2131 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2132 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2133 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2134 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2135 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2137 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2138 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2140 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2141 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2142 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2144 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2145 * target.h (struct target_ops): <supports_software_single_step>:
2147 (target_supports_software_single_step): New macro.
2149 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2151 * linux-low.c (linux_wait_1): Fix pc advance condition.
2152 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2153 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2155 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2157 * linux-arm-low.c (arm_is_thumb_mode): New function.
2158 (arm_breakpoint_at): Use arm_is_thumb_mode.
2159 (arm_breakpoint_kind_from_current_state): New function.
2160 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2162 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2163 (linux_breakpoint_kind_from_current_state): New function.
2164 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2165 * linux-low.h (struct linux_target_ops)
2166 <breakpoint_kind_from_current_state>: New field.
2167 * target.h (struct target_ops): Likewise.
2168 (target_breakpoint_kind_from_current_state): New macro.
2170 2015-11-30 Pedro Alves <palves@redhat.com>
2172 * linux-low.c (linux_resume): Wake up the event loop before
2175 2015-11-30 Pedro Alves <palves@redhat.com>
2177 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2179 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2181 * target.c (struct thread_search): New structure.
2182 (thread_search_callback): New function.
2183 (prev_general_thread): New global.
2184 (prepare_to_access_memory, done_accessing_memory): New functions.
2185 * target.h (prepare_to_access_memory, done_accessing_memory):
2186 Replace macros with function declarations.
2188 2015-11-30 Pedro Alves <palves@redhat.com>
2191 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2192 report TARGET_WAITKIND_NO_RESUMED.
2193 * remote-utils.c (prepare_resume_reply): Handle
2194 TARGET_WAITKIND_NO_RESUMED.
2195 * server.c (report_no_resumed): New global.
2196 (handle_query) <qSupported>: Handle "no-resumed+". Report
2197 "no-resumed+" support.
2198 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2199 return error if the client doesn't support no-resumed events.
2200 (push_stop_notification): New function.
2201 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2202 events if the client supports them.
2204 2015-11-30 Pedro Alves <palves@redhat.com>
2206 * linux-low.c (thread_still_has_status_pending_p): Don't check
2208 (lwp_resumed): New function.
2209 (status_pending_p_callback): Return early if the LWP is not
2210 supposed to be resumed.
2212 2015-11-30 Pedro Alves <palves@redhat.com>
2214 * linux-low.c (handle_extended_wait): Assert that the LWP's
2215 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2216 thread create events, leave the new child's status pending.
2217 (linux_low_filter_event): If GDB wants to hear about thread exit
2218 events, leave the LWP marked dead and don't delete it.
2219 (linux_wait_for_event_filtered): Don't check for thread exit.
2220 (filter_exit_event): New function.
2221 (linux_wait_1): Use it, when returning an exit event.
2222 (linux_resume_one_lwp_throw): Assert that the LWP's
2223 waitstatus is TARGET_WAITKIND_IGNORE.
2224 * remote-utils.c (prepare_resume_reply): Handle
2225 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2226 * server.c (report_thread_events): New global.
2227 (handle_general_set): Handle QThreadEvents.
2228 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2229 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2230 TARGET_WAITKIND_THREAD_EXITED.
2231 * server.h (report_thread_events): Declare.
2233 2015-11-30 Pedro Alves <palves@redhat.com>
2235 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2236 the thread's last_resume_kind was resume_stop.
2238 2015-11-30 Pedro Alves <palves@redhat.com>
2240 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2243 2015-11-30 Pedro Alves <palves@redhat.com>
2245 * server.c (handle_v_requests): Handle vCtrlC.
2247 2015-11-30 Pedro Alves <palves@redhat.com>
2249 * gdbthread.h (find_any_thread_of_pid): Declare.
2250 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2252 * server.c (handle_query): If current_thread is NULL, look for
2253 another thread of the selected process.
2255 2015-11-26 Daniel Colascione <dancol@dancol.org>
2256 Simon Marchi <simon.marchi@ericsson.com>
2258 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2259 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2261 * target.h (struct target_ops) <thread_name>: New field.
2262 (target_thread_name): New macro.
2264 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2266 * regcache.h (regcache_invalidate_pid): Add declaration.
2267 * regcache.c (regcache_invalidate_pid): New function, extracted
2268 from regcache_invalidate.
2269 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2270 Add trivial documentation comment.
2271 * lynx-low.c: Use regcache_invalidate_pid instead of
2272 regcache_invalidate.
2274 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2276 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2277 and Elf64_auxv_t if the target is Android.
2279 2015-11-22 Doug Evans <xdje42@gmail.com>
2281 * target.h: #include <sys/types.h>.
2283 2015-11-19 Pedro Alves <palves@redhat.com>
2285 * linux-low.c (linux_process_qsupported): Change prototype.
2287 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2289 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2290 and adjust to loop over all features.
2291 * server.c (handle_query) <qSupported>: Adjust to call
2292 target_process_qsupported once, passing it a vector of unprocessed
2294 * target.h (struct target_ops) <process_qsupported>: Change
2296 (target_process_qsupported): Adjust.
2298 2015-11-19 Pedro Alves <palves@redhat.com>
2300 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2302 * configure: Regenerate.
2304 2015-11-19 Pedro Alves <palves@redhat.com>
2306 * configure: Regenerate.
2308 2015-11-19 Yao Qi <yao.qi@linaro.org>
2310 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2313 2015-11-19 Yao Qi <yao.qi@linaro.org>
2315 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2316 (struct aarch64_operand): Move enum out.
2318 2015-11-19 Yao Qi <yao.qi@linaro.org>
2320 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2321 struct user_fpsimd_state *.
2322 (aarch64_store_fpregset): Likewise.
2324 2015-11-19 Yao Qi <yao.qi@linaro.org>
2326 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2327 struct user_pt_regs *.
2328 (aarch64_store_gregset): Likewise.
2330 2015-11-18 Pedro Alves <palves@redhat.com>
2332 * Makefile.in (all_object_files): Add $IPA_OBJS.
2334 2015-11-17 Pedro Alves <palves@redhat.com>
2336 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2337 GDB_SIGNAL_0 and gdb_signal_to_string.
2339 2015-11-17 Pedro Alves <palves@redhat.com>
2341 * win32-low.c (handle_output_debug_string): Remove parameter.
2342 (win32_kill): Remove our_status local and adjust call to
2343 handle_output_debug_string.
2344 (get_child_debug_event): Adjust call to
2345 handle_output_debug_string.
2347 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2349 * linux-mips-low.c (mips_fill_gregset): Add cast.
2350 (mips_store_gregset): Likewise.
2351 (mips_fill_fpregset): Likewise.
2352 (mips_store_fpregset): Likewise.
2354 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2356 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2359 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2361 * linux-mips-low.c (mips_linux_new_thread): Change type of
2362 watch_type to enum target_hw_bp_type.
2364 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2366 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2367 Change return type to arm_hwbp_type.
2369 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2371 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2372 (arm_store_gregset): Likewise.
2373 * linux-arm-low.c (arm_get_hwcap): Likewise.
2374 (arm_read_description): Likewise.
2376 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2378 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2380 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2382 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2383 (ppc_fill_vsxregset): Likewise.
2384 (ppc_store_vsxregset): Likewise.
2385 (ppc_fill_vrregset): Likewise.
2386 (ppc_store_vrregset): Likewise.
2387 (ppc_fill_evrregset): Likewise.
2388 (ppc_store_evrregset): Likewise.
2390 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2392 * linux-ppc-low.c (ppc_usrregs_info): Remove
2393 forward-declaration.
2394 (ppc_arch_setup): Move lower in file.
2396 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2398 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2399 (ps_pdwrite): Likewise.
2401 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2403 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2404 to after assert checks.
2406 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2408 * proc-service.c (ps_pdread): Add/adjust casts.
2409 (ps_pdwrite): Add/adjust casts.
2411 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2413 * server.c (handle_search_memory_1): Cast return value of
2416 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2418 * server.c (write_qxfer_response): Change type of data to
2421 2015-10-29 Pedro Alves <palves@redhat.com>
2423 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2425 2015-10-29 Pedro Alves <palves@redhat.com>
2427 * tracepoint.c (clear_installed_tracepoints): Add casts.
2429 2015-10-29 Pedro Alves <palves@redhat.com>
2431 * server.c (handle_v_cont, process_serial_event): Add enum
2432 gdb_signal casts to signal parsing code.
2434 2015-10-29 Pedro Alves <palves@redhat.com>
2436 * linux-low.h (NULL_REGSET): Define.
2437 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2438 * linux-arm-low.c (arm_regsets): Likewise.
2439 * linux-crisv32-low.c (cris_regsets): Likewise.
2440 * linux-m68k-low.c (m68k_regsets): Likewise.
2441 * linux-mips-low.c (mips_regsets): Likewise.
2442 * linux-nios2-low.c (nios2_regsets): Likewise.
2443 * linux-ppc-low.c (ppc_regsets): Likewise.
2444 * linux-s390-low.c (s390_regsets): Likewise.
2445 * linux-sh-low.c (sh_regsets): Likewise.
2446 * linux-sparc-low.c (sparc_regsets): Likewise.
2447 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2448 * linux-tile-low.c (tile_regsets): Likewise.
2449 * linux-x86-low.c (x86_regsets): Likewise.
2450 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2452 2015-10-29 Pedro Alves <palves@redhat.com>
2454 * linux-low.h (NULL_REGSET): Define.
2455 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2456 * linux-arm-low.c (arm_regsets): Likewise.
2457 * linux-crisv32-low.c (cris_regsets): Likewise.
2458 * linux-m68k-low.c (m68k_regsets): Likewise.
2459 * linux-mips-low.c (mips_regsets): Likewise.
2460 * linux-nios2-low.c (nios2_regsets): Likewise.
2461 * linux-ppc-low.c (ppc_regsets): Likewise.
2462 * linux-s390-low.c (s390_regsets): Likewise.
2463 * linux-sh-low.c (sh_regsets): Likewise.
2464 * linux-sparc-low.c (sparc_regsets): Likewise.
2465 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2466 * linux-tile-low.c (tile_regsets): Likewise.
2467 * linux-x86-low.c (x86_regsets): Likewise.
2468 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2470 2015-10-26 Doug Evans <dje@google.com>
2472 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2474 2015-10-26 Doug Evans <dje@google.com>
2476 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2478 2015-10-26 Doug Evans <dje@google.com>
2480 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2482 (attach_thread, find_new_threads_callback): Ditto.
2484 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2486 * mem-break.h (set_breakpoint_data): Remove.
2488 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2490 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2491 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2492 (initialize_low): Remove set_breakpoint_data call.
2493 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2494 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2495 (initialize_low): Remove set_breakpoint_data call.
2496 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2497 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2498 (initialize_low): Remove set_breakpoint_data call.
2500 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2502 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2503 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2504 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2505 * target.h (target_breakpoint_kind_from_pc): New macro.
2507 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2509 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2510 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2511 the default breakpoint kind.
2513 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2515 * linux-arm-low.c (arm_supports_z_point_type): Add software
2518 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2520 * linux-arm-low.c: Refactor breakpoint definitions.
2521 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2522 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2524 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2526 * Makefile.in: Add arm.c/o.
2527 * configure.srv: Likewise.
2528 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2529 (arm_breakpoint_kind_from_pc): New function.
2530 (arm_sw_breakpoint_from_kind): Return proper kind.
2531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2533 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2535 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2537 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2538 (struct raw_breakpoint) <size>: Remove.
2539 (struct raw_breakpoint) <kind>: Add.
2540 (bp_size): New function.
2541 (bp_opcode): Likewise.
2542 (find_raw_breakpoint_at): Adjust for kind.
2543 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2544 (remove_memory_breakpoint): Adjust for kind call bp_size.
2545 (set_raw_breakpoint_at): Adjust for kind.
2546 (set_breakpoint): Likewise.
2547 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2548 (delete_raw_breakpoint): Adjust for kind.
2549 (delete_breakpoint): Likewise.
2550 (find_gdb_breakpoint): Likewise.
2551 (set_gdb_breakpoint_1): Likewise.
2552 (set_gdb_breakpoint): Likewise.
2553 (delete_gdb_breakpoint_1): Likewise.
2554 (delete_gdb_breakpoint): Likewise.
2555 (uninsert_raw_breakpoint): Likewise.
2556 (reinsert_raw_breakpoint): Likewise.
2557 (set_breakpoint_data): Remove.
2558 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2559 (check_mem_read): Adjust for kind call bp_size.
2560 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2561 (clone_one_breakpoint): Adjust for kind.
2562 * mem-break.h (set_gdb_breakpoint): Likewise.
2563 (delete_gdb_breakpoint): Likewise.
2564 * server.c (process_serial_event): Likewise.
2566 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2568 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2569 (struct linux_target_ops) <breakpoint>: Remove.
2570 (struct linux_target_ops) <breakpoint_len>: Remove.
2571 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2572 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2573 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2574 (arm_sw_breakpoint_from_kind): New function.
2575 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2576 (struct linux_target_ops) <breakpoint>: Remove.
2577 (struct linux_target_ops) <breakpoint_len>: Remove.
2578 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2579 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2580 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2581 (struct linux_target_ops) <breakpoint>: Remove.
2582 (struct linux_target_ops) <breakpoint_len>: Remove.
2583 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2584 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2585 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2586 (struct linux_target_ops) <breakpoint>: Remove.
2587 (struct linux_target_ops) <breakpoint_len>: Remove.
2588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2590 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2591 and sw_breakpoint_from_kind to increment the pc.
2592 (linux_breakpoint_kind_from_pc): New function.
2593 (linux_sw_breakpoint_from_kind): New function.
2594 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2595 (initialize_low): Call breakpoint_kind_from_pc and
2596 sw_breakpoint_from_kind to replace breakpoint_data/len.
2597 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2599 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2600 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2601 (struct linux_target_ops) <breakpoint>: Remove.
2602 (struct linux_target_ops) <breakpoint_len>: Remove.
2603 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2604 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2605 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2606 (struct linux_target_ops) <breakpoint>: Remove.
2607 (struct linux_target_ops) <breakpoint_len>: Remove.
2608 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2609 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2610 * linux-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2626 (struct linux_target_ops) <breakpoint>: Remove.
2627 (struct linux_target_ops) <breakpoint_len>: Remove.
2628 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2629 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2630 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2631 (struct linux_target_ops) <breakpoint>: Remove.
2632 (struct linux_target_ops) <breakpoint_len>: Remove.
2633 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2635 * linux-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2646 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2647 (struct linux_target_ops) <breakpoint>: Remove.
2648 (struct linux_target_ops) <breakpoint_len>: Remove.
2649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2651 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2652 (struct linux_target_ops) <breakpoint>: Remove.
2653 (struct linux_target_ops) <breakpoint_len>: Remove.
2654 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2657 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2659 * linux-cris-low.c (cris_get_pc): Remove void arg.
2661 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2663 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2666 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2668 * inferiors.c (thread_pid_matches_callback): New function.
2669 (find_thread_process): New function.
2670 (remove_thread): Reset current_thread.
2671 (remove_process): Assert threads have been removed first.
2673 2015-10-15 Yao Qi <yao.qi@linaro.org>
2675 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2677 (aarch64_remove_point): Likewise.
2678 * regcache.c (regcache_register_size): New function.
2680 2015-10-12 Yao Qi <yao.qi@linaro.org>
2682 * linux-aarch64-low.c: Update all callers as emit_load_store
2683 is renamed to aarch64_emit_load_store.
2685 2015-10-12 Yao Qi <yao.qi@linaro.org>
2687 * linux-aarch64-low.c: Update all callers of function renaming
2688 from emit_insn to aarch64_emit_insn.
2690 2015-10-12 Yao Qi <yao.qi@linaro.org>
2692 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2693 arch/aarch64-insn.h.
2694 (struct aarch64_memory_operand): Likewise.
2696 (emit_insn): Move to arch/aarch64-insn.c.
2697 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2698 (emit_load_store): Move to arch/aarch64-insn.c.
2699 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2700 (can_encode_int32): Remove.
2702 2015-10-12 Yao Qi <yao.qi@linaro.org>
2704 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2705 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2706 (aarch64_relocate_instruction): Likewise.
2707 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2708 (struct aarch64_insn_visitor): Likewise.
2710 2015-10-12 Yao Qi <yao.qi@linaro.org>
2712 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2713 (struct aarch64_insn_visitor): New.
2714 (struct aarch64_insn_relocation_data): New.
2715 (aarch64_ftrace_insn_reloc_b): New function.
2716 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2717 (aarch64_ftrace_insn_reloc_cb): Likewise.
2718 (aarch64_ftrace_insn_reloc_tb): Likewise.
2719 (aarch64_ftrace_insn_reloc_adr): Likewise.
2720 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2721 (aarch64_ftrace_insn_reloc_others): Likewise.
2723 (aarch64_relocate_instruction): Use visitor.
2725 2015-10-12 Yao Qi <yao.qi@linaro.org>
2727 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2728 int. Add argument buf.
2729 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2730 aarch64_relocate_instruction.
2732 2015-10-12 Yao Qi <yao.qi@linaro.org>
2734 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2735 argument insn. Remove local variable insn. Don't call
2737 (aarch64_install_fast_tracepoint_jump_pad): Call
2740 2015-09-30 Yao Qi <yao.qi@linaro.org>
2742 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2743 (emit_load_store_pair): Likewise.
2745 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2747 * dll.c (match_dll): Add cast(s).
2748 (unloaded_dll): Likewise.
2749 * linux-low.c (second_thread_of_pid_p): Likewise.
2750 (delete_lwp_callback): Likewise.
2751 (count_events_callback): Likewise.
2752 (select_event_lwp_callback): Likewise.
2753 (linux_set_resume_request): Likewise.
2754 * server.c (accumulate_file_name_length): Likewise.
2755 (emit_dll_description): Likewise.
2756 (handle_qxfer_threads_worker): Likewise.
2757 (visit_actioned_threads): Likewise.
2758 * thread-db.c (any_thread_of): Likewise.
2759 * tracepoint.c (same_process_p): Likewise.
2760 (match_blocktype): Likewise.
2761 (build_traceframe_info_xml): Likewise.
2763 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2765 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2767 (gdb_unparse_agent_expr): Likewise.
2768 * hostio.c (require_data): Likewise.
2769 (handle_pread): Likewise.
2770 * linux-low.c (disable_regset): Likewise.
2771 (fetch_register): Likewise.
2772 (store_register): Likewise.
2773 (get_dynamic): Likewise.
2774 (linux_qxfer_libraries_svr4): Likewise.
2775 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2776 (set_fast_tracepoint_jump): Likewise.
2777 (uninsert_fast_tracepoint_jumps_at): Likewise.
2778 (reinsert_fast_tracepoint_jumps_at): Likewise.
2779 (validate_inserted_breakpoint): Likewise.
2780 (clone_agent_expr): Likewise.
2781 * regcache.c (init_register_cache): Likewise.
2782 * remote-utils.c (putpkt_binary_1): Likewise.
2783 (decode_M_packet): Likewise.
2784 (decode_X_packet): Likewise.
2785 (look_up_one_symbol): Likewise.
2786 (relocate_instruction): Likewise.
2787 (monitor_output): Likewise.
2788 * server.c (handle_search_memory): Likewise.
2789 (handle_qxfer_exec_file): Likewise.
2790 (handle_qxfer_libraries): Likewise.
2791 (handle_qxfer): Likewise.
2792 (handle_query): Likewise.
2793 (handle_v_cont): Likewise.
2794 (handle_v_run): Likewise.
2795 (captured_main): Likewise.
2796 * target.c (write_inferior_memory): Likewise.
2797 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2798 * tracepoint.c (init_trace_buffer): Likewise.
2799 (add_tracepoint_action): Likewise.
2800 (add_traceframe): Likewise.
2801 (add_traceframe_block): Likewise.
2802 (cmd_qtdpsrc): Likewise.
2803 (cmd_qtdv): Likewise.
2804 (cmd_qtstatus): Likewise.
2805 (response_source): Likewise.
2806 (response_tsv): Likewise.
2807 (cmd_qtnotes): Likewise.
2808 (gdb_collect): Likewise.
2809 (initialize_tracepoint): Likewise.
2811 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2813 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2814 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2815 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2817 (enum aarch64_condition_codes): New enum.
2818 (w0): New static global.
2821 (struct aarch64_memory_operand) <type>: New
2822 MEMORY_OPERAND_POSTINDEX type.
2823 (postindex_memory_operand): New helper function.
2824 (emit_ret): New function.
2825 (emit_load_store_pair): New function, factored out of emit_stp
2826 with support for MEMORY_OPERAND_POSTINDEX.
2827 (emit_stp): Rewrite using emit_load_store_pair.
2828 (emit_ldp): New function.
2829 (emit_load_store): Likewise.
2830 (emit_ldr): Mention post-index instruction in comment.
2831 (emit_ldrh): New function.
2832 (emit_ldrb): New function.
2833 (emit_ldrsw): Mention post-index instruction in comment.
2834 (emit_str): Likewise.
2835 (emit_subs): New function.
2836 (emit_cmp): Likewise.
2837 (emit_and): Likewise.
2838 (emit_orr): Likewise.
2839 (emit_orn): Likewise.
2840 (emit_eor): Likewise.
2841 (emit_mvn): Likewise.
2842 (emit_lslv): Likewise.
2843 (emit_lsrv): Likewise.
2844 (emit_asrv): Likewise.
2845 (emit_mul): Likewise.
2846 (emit_sbfm): Likewise.
2847 (emit_sbfx): Likewise.
2848 (emit_ubfm): Likewise.
2849 (emit_ubfx): Likewise.
2850 (emit_csinc): Likewise.
2851 (emit_cset): Likewise.
2852 (emit_nop): Likewise.
2853 (emit_ops_insns): New helper function.
2854 (emit_pop): Likewise.
2855 (emit_push): Likewise.
2856 (aarch64_emit_prologue): New function.
2857 (aarch64_emit_epilogue): Likewise.
2858 (aarch64_emit_add): Likewise.
2859 (aarch64_emit_sub): Likewise.
2860 (aarch64_emit_mul): Likewise.
2861 (aarch64_emit_lsh): Likewise.
2862 (aarch64_emit_rsh_signed): Likewise.
2863 (aarch64_emit_rsh_unsigned): Likewise.
2864 (aarch64_emit_ext): Likewise.
2865 (aarch64_emit_log_not): Likewise.
2866 (aarch64_emit_bit_and): Likewise.
2867 (aarch64_emit_bit_or): Likewise.
2868 (aarch64_emit_bit_xor): Likewise.
2869 (aarch64_emit_bit_not): Likewise.
2870 (aarch64_emit_equal): Likewise.
2871 (aarch64_emit_less_signed): Likewise.
2872 (aarch64_emit_less_unsigned): Likewise.
2873 (aarch64_emit_ref): Likewise.
2874 (aarch64_emit_if_goto): Likewise.
2875 (aarch64_emit_goto): Likewise.
2876 (aarch64_write_goto_address): Likewise.
2877 (aarch64_emit_const): Likewise.
2878 (aarch64_emit_call): Likewise.
2879 (aarch64_emit_reg): Likewise.
2880 (aarch64_emit_pop): Likewise.
2881 (aarch64_emit_stack_flush): Likewise.
2882 (aarch64_emit_zero_ext): Likewise.
2883 (aarch64_emit_swap): Likewise.
2884 (aarch64_emit_stack_adjust): Likewise.
2885 (aarch64_emit_int_call_1): Likewise.
2886 (aarch64_emit_void_call_2): Likewise.
2887 (aarch64_emit_eq_goto): Likewise.
2888 (aarch64_emit_ne_goto): Likewise.
2889 (aarch64_emit_lt_goto): Likewise.
2890 (aarch64_emit_le_goto): Likewise.
2891 (aarch64_emit_gt_goto): Likewise.
2892 (aarch64_emit_ge_got): Likewise.
2893 (aarch64_emit_ops_impl): New static global variable.
2894 (aarch64_emit_ops): New target function, return
2895 &aarch64_emit_ops_impl.
2896 (struct linux_target_ops): Install it.
2898 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2900 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2901 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2903 * linux-aarch64-ipa.c: New file.
2904 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2906 (aarch64_get_thread_area): New target method.
2907 (extract_signed_bitfield): New helper function.
2908 (aarch64_decode_ldr_literal): New function.
2909 (enum aarch64_opcodes): New enum.
2910 (struct aarch64_register): New struct.
2911 (struct aarch64_operand): New struct.
2912 (x0): New static global.
2921 (aarch64_register): New helper function.
2922 (register_operand): Likewise.
2923 (immediate_operand): Likewise.
2924 (struct aarch64_memory_operand): New struct.
2925 (offset_memory_operand): New helper function.
2926 (preindex_memory_operand): Likewise.
2927 (enum aarch64_system_control_registers): New enum.
2928 (ENCODE): New macro.
2929 (emit_insn): New helper function.
2930 (emit_b): New function.
2931 (emit_bcond): Likewise.
2932 (emit_cb): Likewise.
2933 (emit_tb): Likewise.
2934 (emit_blr): Likewise.
2935 (emit_stp): Likewise.
2936 (emit_ldp_q_offset): Likewise.
2937 (emit_stp_q_offset): Likewise.
2938 (emit_load_store): Likewise.
2939 (emit_ldr): Likewise.
2940 (emit_ldrsw): Likewise.
2941 (emit_str): Likewise.
2942 (emit_ldaxr): Likewise.
2943 (emit_stxr): Likewise.
2944 (emit_stlr): Likewise.
2945 (emit_data_processing_reg): Likewise.
2946 (emit_data_processing): Likewise.
2947 (emit_add): Likewise.
2948 (emit_sub): Likewise.
2949 (emit_mov): Likewise.
2950 (emit_movk): Likewise.
2951 (emit_mov_addr): Likewise.
2952 (emit_mrs): Likewise.
2953 (emit_msr): Likewise.
2954 (emit_sevl): Likewise.
2955 (emit_wfe): Likewise.
2956 (append_insns): Likewise.
2957 (can_encode_int32_in): New helper function.
2958 (aarch64_relocate_instruction): New function.
2959 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2960 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2961 (struct linux_target_ops): Install aarch64_get_thread_area,
2962 aarch64_install_fast_tracepoint_jump_pad and
2963 aarch64_get_min_fast_tracepoint_insn_len.
2965 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2967 * Makefile.in (aarch64-insn.o): New rule.
2968 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2970 2015-09-21 Yao Qi <yao.qi@linaro.org>
2972 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2974 2015-09-21 Yao Qi <yao.qi@linaro.org>
2976 * tracepoint.c (max_jump_pad_size): Remove.
2978 2015-09-18 Yao Qi <yao.qi@linaro.org>
2980 * linux-aarch64-low.c: Don't include sys/uio.h.
2981 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2983 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2985 * tracepoint.c (eval_result_type): Change prototype.
2986 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2988 2015-09-15 Pedro Alves <palves@redhat.com>
2990 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2991 Check whether to report exec events instead of checking whether
2992 multiprocess is enabled.
2994 2015-09-15 Pedro Alves <palves@redhat.com>
2997 * remote-utils.c (prepare_resume_reply): Merge
2998 TARGET_WAITKIND_VFORK_DONE switch case with the
2999 TARGET_WAITKIND_FORKED case.
3001 2015-09-15 Yao Qi <yao.qi@linaro.org>
3003 * server.c (handle_query): Check string comparison using
3004 "else if" instead of "if".
3006 2015-09-15 Yao Qi <yao.qi@linaro.org>
3008 * server.c (vCont_supported): New global variable.
3009 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3010 matches. Append ";vContSupported+" to own_buf.
3011 (handle_v_requests): Append ";s;S" to own_buf if target supports
3012 hardware single step or vCont_supported is false.
3013 (capture_main): Set vCont_supported to zero.
3015 2015-09-15 Yao Qi <yao.qi@linaro.org>
3017 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3019 (linux_supports_hardware_single_step): ... New function.
3020 (linux_target_ops): Update.
3021 * lynx-low.c (lynx_target_ops): Set field
3022 supports_hardware_single_step to target_can_do_hardware_single_step.
3023 * nto-low.c (nto_target_ops): Likewise.
3024 * spu-low.c (spu_target_ops): Likewise.
3025 * win32-low.c (win32_target_ops): Likewise.
3026 * target.c (target_can_do_hardware_single_step): New function.
3027 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3028 Remove. <supports_hardware_single_step>: New field.
3029 (target_supports_conditional_breakpoints): Remove.
3030 (target_supports_hardware_single_step): New macro.
3031 (target_can_do_hardware_single_step): Declare.
3032 * server.c (handle_query): Use target_supports_hardware_single_step
3033 instead of target_supports_conditional_breakpoints.
3035 2015-09-15 Yao Qi <yao.qi@linaro.org>
3037 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3039 (struct linux_target_ops the_low_target): Install
3040 aarch64_linux_siginfo_fixup.
3042 2015-09-11 Don Breazeal <donb@codesourcery.com>
3043 Luis Machado <lgustavo@codesourcery.com>
3045 * linux-low.c (linux_mourn): Static declaration.
3046 (linux_arch_setup): Move in front of
3047 handle_extended_wait.
3048 (linux_arch_setup_thread): New function.
3049 (handle_extended_wait): Handle exec events. Call
3050 linux_arch_setup_thread. Make event_lwp argument a
3051 pointer-to-a-pointer.
3052 (check_zombie_leaders): Do not check stopped threads.
3053 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3054 (linux_low_filter_event): Add lwp and thread for exec'ing
3055 non-leader thread if leader thread has been deleted.
3056 Refactor code into linux_arch_setup_thread and call it.
3057 Pass child lwp pointer by reference to handle_extended_wait.
3058 (linux_wait_for_event_filtered): Update comment.
3059 (linux_wait_1): Prevent clobbering exec event status.
3060 (linux_supports_exec_events): New function.
3061 (linux_target_ops) <supports_exec_events>: Initialize new member.
3062 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3064 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3065 * server.c (report_exec_events): New global variable.
3066 (handle_query): Handle qSupported query for exec-events feature.
3067 (captured_main): Initialize report_exec_events.
3068 * server.h (report_exec_events): Declare new global variable.
3069 * target.h (struct target_ops) <supports_exec_events>: New
3071 (target_supports_exec_events): New macro.
3072 * win32-low.c (win32_target_ops) <supports_exec_events>:
3073 Initialize new member.
3075 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3077 * linux-low.c (linux_low_enable_btrace): Remove.
3078 (linux_target_ops): Replace linux_low_enable_btrace with
3079 linux_enable_btrace.
3081 2015-09-03 Yao Qi <yao.qi@linaro.org>
3083 * linux-aarch64-low.c (aarch64_insert_point): Call
3084 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3087 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3089 * linux-low.c (check_stopped_by_breakpoint): Use
3090 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3092 2015-08-27 Pedro Alves <palves@redhat.com>
3094 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3096 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3098 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3099 the XNEW-family equivalent.
3100 (compile_bytecodes): Likewise.
3101 * dll.c (loaded_dll): Likewise.
3102 * event-loop.c (append_callback_event): Likewise.
3103 (create_file_handler): Likewise.
3104 (create_file_event): Likewise.
3105 * hostio.c (handle_open): Likewise.
3106 * inferiors.c (add_thread): Likewise.
3107 (add_process): Likewise.
3108 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3109 * linux-arm-low.c (arm_new_process): Likewise.
3110 (arm_new_thread): Likewise.
3111 * linux-low.c (add_to_pid_list): Likewise.
3112 (linux_add_process): Likewise.
3113 (handle_extended_wait): Likewise.
3114 (add_lwp): Likewise.
3115 (enqueue_one_deferred_signal): Likewise.
3116 (enqueue_pending_signal): Likewise.
3117 (linux_resume_one_lwp_throw): Likewise.
3118 (linux_resume_one_thread): Likewise.
3119 (linux_read_memory): Likewise.
3120 (linux_write_memory): Likewise.
3121 * linux-mips-low.c (mips_linux_new_process): Likewise.
3122 (mips_linux_new_thread): Likewise.
3123 (mips_add_watchpoint): Likewise.
3124 * linux-x86-low.c (initialize_low_arch): Likewise.
3125 * lynx-low.c (lynx_add_process): Likewise.
3126 * mem-break.c (set_raw_breakpoint_at): Likewise.
3127 (set_breakpoint): Likewise.
3128 (add_condition_to_breakpoint): Likewise.
3129 (add_commands_to_breakpoint): Likewise.
3130 (clone_agent_expr): Likewise.
3131 (clone_one_breakpoint): Likewise.
3132 * regcache.c (new_register_cache): Likewise.
3133 * remote-utils.c (look_up_one_symbol): Likewise.
3134 * server.c (queue_stop_reply): Likewise.
3135 (start_inferior): Likewise.
3136 (queue_stop_reply_callback): Likewise.
3137 (handle_target_event): Likewise.
3138 * spu-low.c (fetch_ppc_memory): Likewise.
3139 (store_ppc_memory): Likewise.
3140 * target.c (set_target_ops): Likewise.
3141 * thread-db.c (thread_db_load_search): Likewise.
3142 (try_thread_db_load_1): Likewise.
3143 * tracepoint.c (add_tracepoint): Likewise.
3144 (add_tracepoint_action): Likewise.
3145 (create_trace_state_variable): Likewise.
3146 (cmd_qtdpsrc): Likewise.
3147 (cmd_qtro): Likewise.
3148 (add_while_stepping_state): Likewise.
3149 * win32-low.c (child_add_thread): Likewise.
3150 (get_image_name): Likewise.
3152 2015-08-25 Yao Qi <yao.qi@linaro.org>
3154 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3156 2015-08-25 Yao Qi <yao.qi@linaro.org>
3158 * Makefile.in (aarch64-linux.o): New rule.
3159 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3161 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3162 (aarch64_init_debug_reg_state): Make it extern.
3163 (aarch64_linux_prepare_to_resume): Remove.
3165 2015-08-25 Yao Qi <yao.qi@linaro.org>
3167 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3168 lwp_arch_private_info and ptid_of_lwp.
3170 2015-08-25 Yao Qi <yao.qi@linaro.org>
3172 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3173 Find proc_info by find_process_pid. All callers updated.
3175 2015-08-25 Yao Qi <yao.qi@linaro.org>
3177 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3179 (debug_reg_change_callback): Remove.
3180 (aarch64_notify_debug_reg_change): Remove.
3182 2015-08-25 Yao Qi <yao.qi@linaro.org>
3184 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3185 Call current_lwp_ptid.
3187 2015-08-25 Yao Qi <yao.qi@linaro.org>
3189 * linux-aarch64-low.c (debug_reg_change_callback): Use
3192 2015-08-25 Yao Qi <yao.qi@linaro.org>
3194 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3196 2015-08-25 Yao Qi <yao.qi@linaro.org>
3198 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3200 2015-08-25 Yao Qi <yao.qi@linaro.org>
3202 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3205 2015-08-25 Yao Qi <yao.qi@linaro.org>
3207 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3209 (debug_reg_change_callback): Remove argument entry and add argument
3210 lwp. Remove local variable thread. Don't print thread id in the
3211 debugging output. Don't check whether pid of thread equals to pid.
3212 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3213 iterate_over_lwps instead find_inferior.
3215 2015-08-24 Pedro Alves <palves@redhat.com>
3217 * inferiors.c (get_first_process): New function.
3218 * inferiors.h (get_first_process): New declaration.
3219 * remote-utils.c (read_ptid): Default to the first process in the
3220 list, instead of to the current thread's process.
3222 2015-08-24 Pedro Alves <palves@redhat.com>
3224 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3225 * event-loop.c: Likewise.
3226 * remote-utils.c: Likewise.
3227 * tracepoint.c: Likewise.
3229 2015-08-24 Pedro Alves <palves@redhat.com>
3231 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3234 2015-08-21 Pedro Alves <palves@redhat.com>
3236 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3237 instead of literal 1.
3239 2015-08-21 Pedro Alves <palves@redhat.com>
3241 * tdesc.c (default_description): Explicitly zero-initialize.
3243 2015-08-21 Pedro Alves <palves@redhat.com>
3246 * inferiors.c (remove_thread): Discard any pending stop reply for
3248 * server.c (remove_all_on_match_pid): Rename to ...
3249 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3251 (discard_queued_stop_replies): Change parameter to a ptid. Now
3253 (handle_v_kill, kill_inferior_callback, captured_main)
3254 (process_serial_event): Adjust.
3255 * server.h (discard_queued_stop_replies): Declare.
3257 2015-08-21 Pedro Alves <palves@redhat.com>
3259 * linux-low.c (wait_for_sigstop): Always switch to no thread
3260 selected if the previously current thread dies.
3261 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3262 process instead of the current thread's.
3263 * remote-utils.c (input_interrupt): Don't check if there's no
3265 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3266 current thread to the general thread fails, error out.
3267 (handle_qxfer_auxv, handle_qxfer_libraries)
3268 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3269 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3270 (handle_query): Check if there's a thread selected instead of
3271 checking whether there's any thread in the thread list.
3272 (handle_qxfer_threads, handle_qxfer_btrace)
3273 (handle_qxfer_btrace_conf): Don't error out early if there's no
3274 thread in the thread list.
3275 (handle_v_cont, myresume): Don't set the current thread to the
3277 (process_serial_event) <Hg handling>: Also set thread_id if the
3278 previous general thread is still alive.
3279 (process_serial_event) <g/G handling>: If setting the current
3280 thread to the general thread fails, error out.
3281 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3282 thread's lwp instead of the current thread's.
3283 * target.c (set_desired_thread): If the desired thread was not
3284 found, leave the current thread pointing to NULL. Return an int
3285 (boolean) indicating success.
3286 * target.h (set_desired_thread): Change return type to int.
3288 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3290 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3291 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3293 (ps_get_thread_area): New function.
3295 2015-08-19 Gary Benson <gbenson@redhat.com>
3297 * hostio.c (handle_pread): Do not attempt to read more data
3298 than hostio_reply_with_data can fit in a packet.
3300 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3302 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3304 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3306 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3308 2015-08-06 Pedro Alves <palves@redhat.com>
3310 * tracepoint.c (expr_eval_result): Now an int.
3312 2015-08-06 Pedro Alves <palves@redhat.com>
3314 * gdbthread.h (struct regcache): Forward declare.
3315 (struct thread_info) <regcache_data>: Now a struct regcache
3317 * inferiors.c (inferior_regcache_data)
3318 (set_inferior_regcache_data): Now work with struct regcache
3320 * inferiors.h (struct regcache): Forward declare.
3321 (inferior_regcache_data, set_inferior_regcache_data): Now work
3322 with struct regcache pointers.
3323 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3324 (free_register_cache_thread): Remove struct regcache pointer
3327 2015-08-06 Pedro Alves <palves@redhat.com>
3329 * server.c (captured_main): On error, print the exception message
3330 to stderr, and if run_once is set, throw a quit.
3332 2015-08-06 Pedro Alves <palves@redhat.com>
3334 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3337 2015-08-06 Pedro Alves <palves@redhat.com>
3339 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3340 reading beyond the passed in buffer length.
3342 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3344 * tracepoint.c (symbol_list) <required>: Remove.
3346 2015-08-06 Pedro Alves <palves@redhat.com>
3348 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3349 count if stopping and suspending threads.
3350 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3351 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3352 (linux_detach): Complete an ongoing step-over.
3353 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3355 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3356 (linux_wait_1): If passing a signal to the inferior after
3357 finishing a step-over, unsuspend and re-resume all lwps. If we
3358 see a single-step event but the thread should be continuing, don't
3359 pass the trap to gdb.
3360 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3361 internal_error instead of gdb_assert.
3362 (enqueue_pending_signal): New function.
3363 (check_ptrace_stopped_lwp_gone): Add debug output.
3364 (start_step_over): Use internal_error instead of gdb_assert.
3365 (complete_ongoing_step_over): New function.
3366 (linux_resume_one_thread): Don't resume a suspended thread.
3367 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3370 2015-08-06 Pedro Alves <palves@redhat.com>
3372 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3373 (linux_thread_alive): Use lwp_is_marked_dead.
3374 (extended_event_reported): Delete.
3375 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3376 instead of extended_event_reported.
3377 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3379 (lwp_is_marked_dead): New function.
3380 (lwp_running): Use lwp_is_marked_dead.
3381 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3384 2015-08-06 Pedro Alves <palves@redhat.com>
3386 * linux-low.c (linux_wait_1): Move fork event output out of the
3387 !report_to_gdb check. Pass event_child->waitstatus to
3388 target_waitstatus_to_string instead of ourstatus.
3390 2015-08-04 Yao Qi <yao.qi@linaro.org>
3392 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3393 if current_thread is 32 bit.
3395 2015-08-04 Yao Qi <yao.qi@linaro.org>
3397 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3398 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3399 * server.c (extended_protocol): Remove "static".
3400 * server.h (extended_protocol): Declare it.
3402 2015-08-04 Yao Qi <yao.qi@linaro.org>
3404 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3405 both aarch64 and aarch32.
3406 (aarch64_set_pc): Likewise.
3408 2015-08-04 Yao Qi <yao.qi@linaro.org>
3410 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3411 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3412 arm-with-neon.xml to srv_xmlfiles.
3413 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3414 (is_64bit_tdesc): New function.
3415 (aarch64_linux_read_description): New function.
3416 (aarch64_arch_setup): Call aarch64_linux_read_description.
3417 (regs_info): Rename to regs_info_aarch64.
3418 (aarch64_regs_info): Return right regs_info.
3419 (initialize_low_arch): Call initialize_low_arch_aarch32.
3421 2015-08-04 Yao Qi <yao.qi@linaro.org>
3423 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3424 * linux-aarch32-low.c: New file.
3425 * linux-aarch32-low.h: New file.
3426 * linux-arm-low.c (arm_fill_gregset): Move it to
3427 linux-aarch32-low.c.
3428 (arm_store_gregset): Likewise.
3429 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3430 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3431 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3432 (regs_info): Rename to regs_info_arm.
3433 (arm_regs_info): Return regs_info_aarch32 if
3434 have_ptrace_getregset is 1 and target description is
3435 arm_with_neon or arm_with_vfpv3.
3436 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3437 Call initialize_low_arch_aarch32 instead.
3439 2015-08-04 Yao Qi <yao.qi@linaro.org>
3441 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3442 * linux-low.c: ... here.
3443 * linux-low.h (have_ptrace_getregset): Declare it.
3445 2015-08-04 Pedro Alves <palves@redhat.com>
3447 * thread-db.c (struct thread_db): Use new typedefs.
3448 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3450 (disable_thread_event_reporting): Cast result of dlsym to
3451 destination function pointer type.
3452 (thread_db_mourn): Use td_ta_delete_ftype.
3454 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3456 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3458 (CDX_BREAKPOINT): Define for R2.
3459 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3460 (the_low_target): Add comments.
3462 2015-07-30 Yao Qi <yao.qi@linaro.org>
3464 * linux-arm-low.c (arm_hwcap): Remove it.
3465 (arm_read_description): New local variable arm_hwcap. Don't
3466 set arm_hwcap to zero.
3468 2015-07-30 Yao Qi <yao.qi@linaro.org>
3470 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3471 Use regcache->tdesc instead.
3472 (arm_store_wmmxregset): Likewise.
3473 (arm_fill_vfpregset): Likewise.
3474 (arm_store_vfpregset): Likewise.
3476 2015-07-30 Yao Qi <yao.qi@linaro.org>
3478 * linux-arm-low.c: Include arch/arm.h.
3479 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3480 (arm_store_gregset): Likewise.
3482 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3484 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3485 ptrace's 4th parameter.
3487 2015-07-27 Yao Qi <yao.qi@linaro.org>
3489 * configure.srv (case aarch64*-*-linux*): Don't set
3492 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3494 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3496 * linux-arm-low.c: Likewise.
3497 * linux-cris-low.c: Likewise.
3498 * linux-crisv32-low.c: Likewise.
3499 * linux-low.c: Likewise.
3500 * linux-m68k-low.c: Likewise.
3501 * linux-mips-low.c: Likewise.
3502 * linux-nios2-low.c: Likewise.
3503 * linux-s390-low.c: Likewise.
3504 * linux-sparc-low.c: Likewise.
3505 * linux-tic6x-low.c: Likewise.
3506 * linux-tile-low.c: Likewise.
3507 * linux-x86-low.c: Likewise.
3509 2015-07-24 Pedro Alves <palves@redhat.com>
3511 * config.in: Regenerate.
3512 * configure: Regenerate.
3514 2015-07-24 Pedro Alves <palves@redhat.com>
3516 * acinclude.m4: Include ../ptrace.m4.
3517 * configure.ac: Call GDB_AC_PTRACE.
3518 * config.in, configure: Regenerate.
3520 2015-07-24 Yao Qi <yao.qi@linaro.org>
3522 * linux-low.c (linux_create_inferior): Remove setting to
3523 proc->priv->new_inferior.
3524 (linux_attach): Likewise.
3525 (linux_low_filter_event): Likewise.
3526 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3528 2015-07-24 Yao Qi <yao.qi@linaro.org>
3530 * linux-low.c (linux_arch_setup): New function.
3531 (linux_low_filter_event): If proc->tdesc is NULL and
3532 proc->attached is true, call the_low_target.arch_setup.
3533 Otherwise, keep status pending, and return.
3534 (linux_resume_one_lwp_throw): Don't call get_pc if
3535 thread->while_stepping isn't NULL. Don't call
3536 get_thread_regcache if proc->tdesc is NULL.
3537 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3538 (linux_target_ops): Install arch_setup.
3539 * server.c (start_inferior): Call the_target->arch_setup.
3540 * target.h (struct target_ops) <arch_setup>: New field.
3541 (target_arch_setup): New marco.
3542 * lynx-low.c (lynx_target_ops): Update.
3543 * nto-low.c (nto_target_ops): Update.
3544 * spu-low.c (spu_target_ops): Update.
3545 * win32-low.c (win32_target_ops): Update.
3547 2015-07-24 Yao Qi <yao.qi@linaro.org>
3549 * linux-low.c (linux_add_process): Don't set
3550 proc->priv->new_inferior.
3551 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3552 (linux_attach): Likewise.
3554 2015-07-24 Yao Qi <yao.qi@linaro.org>
3556 * server.c (start_inferior): Code refactor.
3558 2015-07-24 Yao Qi <yao.qi@linaro.org>
3560 * server.c (process_serial_event): Set general_thread.
3562 2015-07-21 Yao Qi <yao.qi@linaro.org>
3564 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3565 aarch64_linux_get_debug_reg_capacity.
3567 2015-07-17 Yao Qi <yao.qi@linaro.org>
3569 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3570 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3571 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3572 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3573 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3574 (AARCH64_HWP_ALIGNMENT): Likewise.
3575 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3576 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3577 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3578 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3579 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3580 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3581 (struct aarch64_debug_reg_state): Likewise.
3582 (struct arch_lwp_info): Likewise.
3583 (aarch64_align_watchpoint): Likewise.
3584 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3585 (aarch64_watchpoint_length): Likewise.
3586 (aarch64_point_encode_ctrl_reg): Likewise
3587 (aarch64_point_is_aligned): Likewise.
3588 (aarch64_align_watchpoint): Likewise.
3589 (aarch64_linux_set_debug_regs):
3590 (aarch64_dr_state_insert_one_point): Likewise.
3591 (aarch64_dr_state_remove_one_point): Likewise.
3592 (aarch64_handle_breakpoint): Likewise.
3593 (aarch64_handle_aligned_watchpoint): Likewise.
3594 (aarch64_handle_unaligned_watchpoint): Likewise.
3595 (aarch64_handle_watchpoint): Likewise.
3597 2015-07-17 Yao Qi <yao.qi@linaro.org>
3599 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3600 and don't aarch64_get_debug_reg_state. All callers update.
3601 (aarch64_handle_aligned_watchpoint): Likewise.
3602 (aarch64_handle_unaligned_watchpoint): Likewise.
3603 (aarch64_handle_watchpoint): Likewise.
3604 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3605 (aarch64_remove_point): Likewise.
3607 2015-07-17 Yao Qi <yao.qi@linaro.org>
3609 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3611 (aarch64_handle_unaligned_watchpoint): Likewise.
3613 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3615 Revert the previous 3 commits:
3616 Move gdb_regex* to common/
3617 Move linux_find_memory_regions_full & co.
3618 gdbserver build-id attribute generator
3620 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3621 Jan Kratochvil <jan.kratochvil@redhat.com>
3623 gdbserver build-id attribute generator.
3624 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3625 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3626 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3628 (get_dynamic): Use find_pdhr to traverse program headers.
3629 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3630 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3631 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3632 (get_hex_build_id): New.
3633 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3634 to reply XML document.
3636 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3637 Jan Kratochvil <jan.kratochvil@redhat.com>
3639 * target.c: Include target/target-utils.h and fcntl.h.
3640 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3641 (target_fileio_read_stralloc): New functions.
3643 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3645 * Makefile.in (OBS): Add gdb_regex.o.
3647 * config.in: Rebuilt.
3648 * configure: Rebuilt.
3650 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3651 Jan Kratochvil <jan.kratochvil@redhat.com>
3653 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3654 * Makefile.in (OBS): Add target-utils.o.
3655 (linux-maps.o, target-utils.o): New.
3656 * configure.srv (srv_linux_obj): Add linux-maps.o.
3658 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3660 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3662 (the_low_target): Install it.
3664 2015-07-14 Pedro Alves <palves@redhat.com>
3666 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3667 Instead, ignore ECHILD, and throw an error for other errnos.
3669 2015-07-10 Pedro Alves <palves@redhat.com>
3671 * event-loop.c (struct callback_event) <data>: Change type to
3672 gdb_client_data instance instead of gdb_client_data pointer.
3673 (append_callback_event): Adjust.
3675 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3677 * linux-aarch64-low.c: Add comments for each linux_target_ops
3678 method. Remove comments already covered in target_ops and
3679 linux_target_ops definitions.
3680 (the_low_target): Add comments for each unimplemented method.
3682 2015-07-09 Yao Qi <yao.qi@linaro.org>
3684 * linux-aarch64-low.c (aarch64_regmap): Remove.
3685 (aarch64_usrregs_info): Remove.
3686 (regs_info): Set field usrregs to NULL.
3688 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3690 * linux-low.c: Include "rsp-low.h"
3691 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3692 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3693 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3694 (handle_btrace_enable_pt): New.
3695 (handle_btrace_general_set): Support "pt".
3696 (handle_btrace_conf_general_set): Support "pt:size".
3698 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3700 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3703 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3705 * linux-aarch64-low.c: Remove comment about endianness.
3706 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3707 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3710 2015-06-24 Gary Benson <gbenson@redhat.com>
3712 * linux-i386-ipa.c (stdint.h): Do not include.
3713 * lynx-i386-low.c (stdint.h): Likewise.
3714 * lynx-ppc-low.c (stdint.h): Likewise.
3715 * mem-break.c (stdint.h): Likewise.
3716 * thread-db.c (stdint.h): Likewise.
3717 * tracepoint.c (stdint.h): Likewise.
3718 * win32-low.c (stdint.h): Likewise.
3720 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3722 * server.c (write_qxfer_response): Update call to
3723 remote_escape_output.
3725 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3726 Jan Kratochvil <jan.kratochvil@redhat.com>
3728 Merge multiple hex conversions.
3729 * gdbreplay.c (tohex): Rename to 'fromhex'.
3730 (logchar): Use fromhex.
3732 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3734 * server.c (handle_qxfer_libraries): Set `version' attribute for
3737 2015-06-10 Gary Benson <gbenson@redhat.com>
3739 * target.h (struct target_ops) <multifs_open>: New field.
3740 <multifs_unlink>: Likewise.
3741 <multifs_readlink>: Likewise.
3742 * linux-low.c (nat/linux-namespaces.h): New include.
3743 (linux_target_ops): Initialize the_target->multifs_open,
3744 the_target->multifs_unlink and the_target->multifs_readlink.
3745 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3746 * hostio.c (hostio_fs_pid): New static variable.
3747 (hostio_handle_new_gdb_connection): New function.
3748 (handle_setfs): Likewise.
3749 (handle_open): Use the_target->multifs_open as appropriate.
3750 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3751 (handle_readlink): Use the_target->multifs_readlink as
3753 (handle_vFile): Handle vFile:setfs packets.
3754 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3755 after target_handle_new_gdb_connection.
3757 2015-06-10 Gary Benson <gbenson@redhat.com>
3759 * configure.ac (AC_CHECK_FUNCS): Add setns.
3760 * config.in: Regenerate.
3761 * configure: Likewise.
3762 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3763 (linux-namespaces.o): New rule.
3764 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3766 2015-06-09 Gary Benson <gbenson@redhat.com>
3768 * hostio.c (handle_open): Process mode argument with
3769 fileio_to_host_mode.
3771 2015-06-01 Yao Qi <yao.qi@linaro.org>
3773 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3774 * linux-x86-low.c: Likewise.
3776 2015-05-28 Don Breazeal <donb@codesourcery.com>
3778 * linux-low.c (handle_extended_wait): Initialize
3779 thread_info.last_resume_kind for new fork children.
3781 2015-05-15 Pedro Alves <palves@redhat.com>
3783 * target.h (target_handle_new_gdb_connection): Rewrite using if
3784 wrapped in do/while.
3786 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3788 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3789 * configure, config.in: Regenerate.
3790 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3793 2015-05-12 Don Breazeal <donb@codesourcery.com>
3795 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3796 PTRACE_EVENT_VFORK_DONE.
3797 (linux_low_ptrace_options, extended_event_reported): Add vfork
3799 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3800 and "vforkdone" for RSP 'T' Stop Reply Packet.
3801 * server.h (report_vfork_events): Declare
3804 2015-05-12 Don Breazeal <donb@codesourcery.com>
3806 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3807 (the_low_target) <new_fork>: Initialize new member.
3808 * linux-arm-low.c (arm_new_fork): New function.
3809 (the_low_target) <new_fork>: Initialize new member.
3810 * linux-low.c (handle_extended_wait): Call new target function
3812 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3813 * linux-mips-low.c (mips_add_watchpoint): New function
3814 extracted from mips_insert_point.
3815 (the_low_target) <new_fork>: Initialize new member.
3816 (mips_linux_new_fork): New function.
3817 (mips_insert_point): Call mips_add_watchpoint.
3818 * linux-x86-low.c (x86_linux_new_fork): New function.
3819 (the_low_target) <new_fork>: Initialize new member.
3821 2015-05-12 Don Breazeal <donb@codesourcery.com>
3823 * linux-low.c (handle_extended_wait): Implement return value,
3824 rename argument 'event_child' to 'event_lwp', handle
3825 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3826 (linux_low_ptrace_options): New function.
3827 (linux_low_filter_event): Call linux_low_ptrace_options,
3828 use different argument fo linux_enable_event_reporting,
3829 use return value from handle_extended_wait.
3830 (extended_event_reported): New function.
3831 (linux_wait_1): Call extended_event_reported and set
3832 status to report fork events.
3833 (linux_write_memory): Add pid to debug message.
3834 (reset_lwp_ptrace_options_callback): New function.
3835 (linux_handle_new_gdb_connection): New function.
3836 (linux_target_ops): Initialize new structure member.
3837 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3838 * lynx-low.c: Initialize new structure member.
3839 * remote-utils.c (prepare_resume_reply): Implement stop reason
3840 "fork" for "T" stop message.
3841 * server.c (handle_query): Call handle_new_gdb_connection.
3842 * server.h (report_fork_events): Declare global flag.
3843 * target.h (struct target_ops) <handle_new_gdb_connection>:
3845 (target_handle_new_gdb_connection): New macro.
3846 * win32-low.c: Initialize new structure member.
3848 2015-05-12 Don Breazeal <donb@codesourcery.com>
3850 * mem-break.c (APPEND_TO_LIST): Define macro.
3851 (clone_agent_expr): New function.
3852 (clone_one_breakpoint): New function.
3853 (clone_all_breakpoints): New function.
3854 * mem-break.h: Declare new functions.
3856 2015-05-12 Don Breazeal <donb@codesourcery.com>
3858 * linux-low.c (linux_supports_fork_events): New function.
3859 (linux_supports_vfork_events): New function.
3860 (linux_target_ops): Initialize new structure members.
3861 (initialize_low): Call linux_check_ptrace_features.
3862 * lynx-low.c (lynx_target_ops): Initialize new structure
3864 * server.c (report_fork_events, report_vfork_events):
3866 (handle_query): Add new features to qSupported packet and
3868 (captured_main): Initialize new global variables.
3869 * target.h (struct target_ops) <supports_fork_events>:
3871 <supports_vfork_events>: New member.
3872 (target_supports_fork_events): New macro.
3873 (target_supports_vfork_events): New macro.
3874 * win32-low.c (win32_target_ops): Initialize new structure
3877 2015-05-12 Gary Benson <gbenson@redhat.com>
3879 * server.c (handle_qxfer_exec_file): Use current process
3882 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3884 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3885 Remove HAVE_PTRACE_GETREGS conditionals.
3886 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3887 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3889 2015-05-08 Yao Qi <yao.qi@linaro.org>
3891 * linux-low.c (linux_supports_conditional_breakpoints): New
3893 (linux_target_ops): Install new target method.
3894 * lynx-low.c (lynx_target_ops): Install NULL hook for
3895 supports_conditional_breakpoints.
3896 * nto-low.c (nto_target_ops): Likewise.
3897 * spu-low.c (spu_target_ops): Likewise.
3898 * win32-low.c (win32_target_ops): Likewise.
3899 * server.c (handle_query): Check
3900 target_supports_conditional_breakpoints.
3901 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3903 (target_supports_conditional_breakpoints): New macro.
3905 2015-05-06 Pedro Alves <palves@redhat.com>
3908 * server.c (start_inferior): If the process exits, mourn it.
3910 2015-04-21 Gary Benson <gbenson@redhat.com>
3912 * hostio.c (fileio_open_flags_to_host): Factored out to
3913 fileio_to_host_openflags in common/fileio.c. Single use
3916 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3918 * linux-xtensa-low.c (xtensa_fill_gregset)
3919 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3922 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3924 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3925 (regs_info): Replace usrregs pointer with NULL.
3927 2015-04-17 Gary Benson <gbenson@redhat.com>
3929 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3930 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3931 * server.c (handle_qxfer_exec_file): New function.
3932 (qxfer_packets): Add exec-file entry.
3933 (handle_query): Report qXfer:exec-file:read as supported packet.
3935 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3937 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3939 2015-04-09 Gary Benson <gbenson@redhat.com>
3941 * hostio-errno.c (errno_to_fileio_error): Remove function.
3942 Update caller to use remote_fileio_to_fio_error.
3944 2015-04-09 Yao Qi <yao.qi@linaro.org>
3946 * linux-low.c (linux_insert_point): Call
3947 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3948 (linux_remove_point): Call remove_memory_breakpoint if type is
3950 * linux-x86-low.c (x86_insert_point): Don't call
3951 insert_memory_breakpoint.
3952 (x86_remove_point): Don't call remove_memory_breakpoint.
3954 2015-04-01 Pedro Alves <palves@redhat.com>
3955 Cleber Rosa <crosa@redhat.com>
3957 * server.c (gdbserver_usage): Reorganize and extend the usage
3960 2015-03-24 Pedro Alves <palves@redhat.com>
3962 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3963 output. Also dump TRAP_TRACE.
3964 (linux_low_filter_event): In debug output, distinguish a
3965 resume_stop SIGSTOP from a delayed SIGSTOP.
3967 2015-03-24 Gary Benson <gbenson@redhat.com>
3969 * linux-x86-low.c (x86_linux_new_thread): Moved to
3971 (x86_linux_prepare_to_resume): Likewise.
3973 2015-03-24 Gary Benson <gbenson@redhat.com>
3975 * Makefile.in (x86-linux-dregs.o): New rule.
3976 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3977 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3978 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3979 (x86_linux_dr_get): Likewise.
3980 (x86_linux_dr_set): Likewise.
3981 (update_debug_registers_callback): Likewise.
3982 (x86_linux_dr_set_addr): Likewise.
3983 (x86_linux_dr_get_addr): Likewise.
3984 (x86_linux_dr_set_control): Likewise.
3985 (x86_linux_dr_get_control): Likewise.
3986 (x86_linux_dr_get_status): Likewise.
3987 (x86_linux_update_debug_registers): Likewise.
3989 2015-03-24 Gary Benson <gbenson@redhat.com>
3991 * linux-x86-low.c (x86_linux_update_debug_registers):
3992 New function, factored out from...
3993 (x86_linux_prepare_to_resume): ...this.
3995 2015-03-24 Gary Benson <gbenson@redhat.com>
3997 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3998 (x86_linux_dr_set): Likewise.
3999 (update_debug_registers_callback): Likewise.
4000 (x86_linux_dr_set_addr): Likewise.
4001 (x86_linux_dr_get_addr): Likewise.
4002 (x86_linux_dr_set_control): Likewise.
4003 (x86_linux_dr_get_control): Likewise.
4004 (x86_linux_dr_get_status): Likewise.
4005 (x86_linux_prepare_to_resume): Likewise.
4007 2015-03-24 Gary Benson <gbenson@redhat.com>
4009 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4010 Use perror_with_name. Pass string through gettext.
4011 (x86_linux_dr_set): Likewise.
4013 2015-03-24 Gary Benson <gbenson@redhat.com>
4015 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4016 (x86_linux_dr_set_addr): ...this.
4017 (x86_dr_low_get_addr): Rename to...
4018 (x86_linux_dr_get_addr): ...this.
4019 (x86_dr_low_set_control): Rename to...
4020 (x86_linux_dr_set_control): ...this.
4021 (x86_dr_low_get_control): Rename to...
4022 (x86_linux_dr_get_control): ...this.
4023 (x86_dr_low_get_status): Rename to...
4024 (x86_linux_dr_get_status): ...this.
4025 (x86_dr_low): Update with new function names.
4027 2015-03-24 Gary Benson <gbenson@redhat.com>
4029 * Makefile.in (x86-linux.o): New rule.
4030 * configure.srv: Add x86-linux.o to relevant targets.
4031 * linux-low.c (lwp_set_arch_private_info): New function.
4032 (lwp_arch_private_info): Likewise.
4033 * linux-x86-low.c: Include nat/x86-linux.h.
4034 (arch_lwp_info): Removed structure.
4035 (update_debug_registers_callback):
4036 Use lwp_set_debug_registers_changed.
4037 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4038 and lwp_set_debug_registers_changed.
4039 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4041 2015-03-24 Gary Benson <gbenson@redhat.com>
4043 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4044 * linux-arm-low.c (arm_new_thread): Likewise.
4045 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4046 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4047 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4048 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4050 2015-03-24 Gary Benson <gbenson@redhat.com>
4052 * linux-low.c (ptid_of_lwp): New function.
4053 (lwp_is_stopped): Likewise.
4054 (lwp_stop_reason): Likewise.
4055 * linux-x86-low.c (update_debug_registers_callback):
4057 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4060 2015-03-24 Gary Benson <gbenson@redhat.com>
4062 * linux-low.h (linux_stop_lwp): Remove declaration.
4064 2015-03-24 Gary Benson <gbenson@redhat.com>
4066 * linux-low.h: Include nat/linux-nat.h.
4067 * linux-low.c (iterate_over_lwps_args): New structure.
4068 (iterate_over_lwps_filter): New function.
4069 (iterate_over_lwps): Likewise.
4070 * linux-x86-low.c (update_debug_registers_callback):
4071 Update signature to what iterate_over_lwps expects.
4072 Remove PID check that iterate_over_lwps now performs.
4073 (x86_dr_low_set_addr): Use iterate_over_lwps.
4074 (x86_dr_low_set_control): Likewise.
4076 2015-03-24 Gary Benson <gbenson@redhat.com>
4078 * linux-x86-low.c (x86_debug_reg_state): New function.
4079 (x86_linux_prepare_to_resume): Use the above.
4081 2015-03-24 Gary Benson <gbenson@redhat.com>
4083 * linux-low.c (current_lwp_ptid): New function.
4084 * linux-x86-low.c: Include nat/linux-nat.h.
4085 (x86_dr_low_get_addr): Use current_lwp_ptid.
4086 (x86_dr_low_get_control): Likewise.
4087 (x86_dr_low_get_status): Likewise.
4089 2015-03-20 Pedro Alves <palves@redhat.com>
4091 * tracepoint.c (cmd_qtstatus): Make "str" const.
4093 2015-03-20 Pedro Alves <palves@redhat.com>
4095 * server.c (handle_general_set): Make "req_str" const.
4097 2015-03-19 Pedro Alves <palves@redhat.com>
4099 * linux-low.c (linux_resume_one_lwp): Rename to ...
4100 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4101 instead call perror_with_name.
4102 (check_ptrace_stopped_lwp_gone): New function.
4103 (linux_resume_one_lwp): Reimplement as wrapper around
4104 linux_resume_one_lwp_throw that swallows errors if the LWP is
4107 2015-03-19 Pedro Alves <palves@redhat.com>
4109 * linux-low.c (count_events_callback, select_event_lwp_callback):
4110 No longer check whether the thread has resume_stop as last resume
4113 2015-03-19 Pedro Alves <palves@redhat.com>
4115 * linux-low.c (count_events_callback, select_event_lwp_callback):
4116 Use the lwp's status_pending_p field, not the thread's.
4118 2015-03-19 Pedro Alves <palves@redhat.com>
4120 * linux-low.c (select_event_lwp_callback): Update comments to
4121 no longer mention SIGTRAP.
4123 2015-03-18 Gary Benson <gbenson@redhat.com>
4125 * server.c (handle_query): Do not report vFile:fstat as supported.
4127 2015-03-11 Gary Benson <gbenson@redhat.com>
4129 * hostio.c (sys/types.h): New include.
4130 (sys/stat.h): Likewise.
4131 (common-remote-fileio.h): Likewise.
4132 (handle_fstat): New function.
4133 (handle_vFile): Handle vFile:fstat packets.
4135 2015-03-11 Gary Benson <gbenson@redhat.com>
4137 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4138 struct stat.st_blocks and struct stat.st_blksize.
4139 * configure: Regenerate.
4140 * config.in: Likewise.
4141 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4142 (OBS): Add common-remote-fileio.o.
4143 (common-remote-fileio.o): New rule.
4145 2015-03-09 Pedro Alves <palves@redhat.com>
4147 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4148 'struct sockaddr' pointer in 'accept' call.
4150 2015-03-09 Pedro Alves <palves@redhat.com>
4153 2015-03-07 Pedro Alves <palves@redhat.com>
4154 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4155 or <winsock2.h> here. Instead include "gdb_socket.h".
4156 (remote_open): Use union gdb_sockaddr_u.
4157 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4158 or <winsock2.h> here. Instead include "gdb_socket.h".
4159 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4160 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4162 (init_named_socket, gdb_agent_helper_thread): Use union
4165 2015-03-07 Pedro Alves <palves@redhat.com>
4167 * configure.ac (build_warnings): Move
4168 -Wdeclaration-after-statement to the C-specific set.
4169 * configure: Regenerate.
4171 2015-03-07 Pedro Alves <palves@redhat.com>
4173 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4174 or <winsock2.h> here. Instead include "gdb_socket.h".
4175 (remote_open): Use union gdb_sockaddr_u.
4176 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4177 or <winsock2.h> here. Instead include "gdb_socket.h".
4178 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4179 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4181 (init_named_socket, gdb_agent_helper_thread): Use union
4184 2015-03-07 Pedro Alves <palves@redhat.com>
4186 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4189 2015-03-06 Yao Qi <yao.qi@linaro.org>
4191 * linux-aarch64-low.c (aarch64_insert_point): Use
4192 show_debug_regs as a boolean.
4193 (aarch64_remove_point): Likewise.
4195 2015-03-05 Pedro Alves <palves@redhat.com>
4197 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4198 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4199 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4200 * nto-low.c (nto_target_ops): Likewise.
4201 * spu-low.c (spu_target_ops): Likewise.
4202 * win32-low.c (win32_target_ops): Likewise.
4204 2015-03-04 Pedro Alves <palves@redhat.com>
4206 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4207 Decide whether a breakpoint triggered based on the SIGTRAP's
4209 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4210 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4211 (linux_low_filter_event): Check for breakpoints before checking
4213 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4215 (linux_stopped_by_sw_breakpoint)
4216 (linux_supports_stopped_by_sw_breakpoint)
4217 (linux_stopped_by_hw_breakpoint)
4218 (linux_supports_stopped_by_hw_breakpoint): New functions.
4219 (linux_target_ops): Install new target methods.
4221 2015-03-04 Pedro Alves <palves@redhat.com>
4223 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4224 * server.c (swbreak_feature, hwbreak_feature): New globals.
4225 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4226 (captured_main): Clear swbreak_feature and hwbreak_feature.
4227 * server.h (swbreak_feature, hwbreak_feature): Declare.
4228 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4229 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4230 supports_stopped_by_hw_breakpoint>: New fields.
4231 (target_supports_stopped_by_sw_breakpoint)
4232 (target_stopped_by_sw_breakpoint)
4233 (target_supports_stopped_by_hw_breakpoint)
4234 (target_stopped_by_hw_breakpoint): Declare.
4236 2015-03-04 Pedro Alves <palves@redhat.com>
4238 enum lwp_stop_reason -> enum target_stop_reason
4239 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4240 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4241 (linux_wait_1, stuck_in_jump_pad_callback)
4242 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4243 (linux_stopped_by_watchpoint):
4244 * linux-low.h (enum lwp_stop_reason): Delete.
4245 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4246 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4248 2015-03-04 Yao Qi <yao.qi@linaro.org>
4250 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4252 2015-03-03 Gary Benson <gbenson@redhat.com>
4254 * hostio.c (handle_vFile): Fix prefix lengths.
4256 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4258 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4261 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4263 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4264 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4265 (clean): Add "rm -f" for above C files.
4266 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4267 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4268 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4269 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4270 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4271 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4272 (init_registers_s390x_vx_linux64)
4273 (init_registers_s390x_tevx_linux64)
4274 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4275 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4277 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4278 (s390_store_vxrs_high): New functions.
4279 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4281 (s390_arch_setup): Add logic for selecting one of the new target
4282 descriptions. Activate the new vector regsets if applicable.
4283 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4284 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4285 and init_registers_s390x_tevx_linux64.
4287 2015-03-01 Pedro Alves <palves@redhat.com>
4289 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4292 2015-02-27 Pedro Alves <palves@redhat.com>
4294 * linux-x86-low.c (u_debugreg_offset): New function.
4295 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4297 2015-02-27 Pedro Alves <palves@redhat.com>
4299 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4300 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4301 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4302 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4303 (ps_lsetfpregs, ps_getpid)
4304 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4305 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4306 (ps_lsetxregs, ps_plog): Declare.
4308 2015-02-27 Pedro Alves <palves@redhat.com>
4310 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4311 IP_AGENT_EXPORT_FUNC.
4312 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4313 IP_AGENT_EXPORT_FUNC.
4314 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4315 (IP_AGENT_EXPORT): Delete.
4316 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4317 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4318 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4319 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4320 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4321 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4322 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4323 (traceframe_read_count, traceframe_write_count)
4324 (traceframes_created, trace_state_variables, get_raw_reg)
4325 (get_trace_state_variable_value, set_trace_state_variable_value)
4326 (ust_loaded, helper_thread_id, cmd_buf): Use
4327 IPA_SYM_EXPORTED_NAME.
4328 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4329 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4330 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4331 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4332 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4333 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4334 EXTERN_C_PUSH/EXTERN_C_POP.
4335 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4336 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4337 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4338 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4339 (traceframe_write_count, traceframe_read_count)
4340 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4341 (about_to_request_buffer_space, get_trace_state_variable_value)
4342 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4343 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4344 EXTERN_C_PUSH/EXTERN_C_POP.
4345 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4346 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4347 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4348 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4349 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4350 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4351 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4352 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4354 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4355 (IP_AGENT_EXPORT_VAR_DECL): Define.
4357 (gdb_agent_get_raw_reg): Declare.
4359 2015-02-27 Tom Tromey <tromey@redhat.com>
4360 Pedro Alves <palves@redhat.com>
4362 Rename symbols whose names are reserved C++ keywords throughout.
4364 2015-02-27 Pedro Alves <palves@redhat.com>
4366 * Makefile.in (COMPILER): New, get it from autoconf.
4367 (CXX): Get from autoconf instead.
4368 (COMPILE.pre): Use COMPILER.
4369 (CC-LD): Rename to ...
4370 (CC_LD): ... this. Use COMPILER.
4371 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4372 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4373 * acinclude.m4: Include build-with-cxx.m4.
4374 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4375 Disable -Werror by default if building in C++ mode.
4376 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4377 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4378 the C++ compiler. Save/restore CXXFLAGS too.
4379 * configure: Regenerate.
4381 2015-02-27 Pedro Alves <palves@redhat.com>
4383 * acinclude.m4: Include libiberty.m4.
4384 * configure.ac: Call libiberty_INIT.
4385 * config.in, configure: Regenerate.
4387 2015-02-26 Pedro Alves <palves@redhat.com>
4389 * linux-low.c (linux_wait_1): When incrementing the PC past a
4390 program breakpoint always use the_low_target.breakpoint_len as
4391 increment, rather than the maximum between that and
4392 the_low_target.decr_pc_after_break.
4394 2015-02-23 Pedro Alves <palves@redhat.com>
4396 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4397 thread was doing a step-over; always adjust the PC if
4398 we stepped over a permanent breakpoint.
4399 (linux_wait_1): If we stepped over breakpoint that was on top of a
4400 permanent breakpoint, manually advance the PC past it.
4402 2015-02-23 Pedro Alves <palves@redhat.com>
4404 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4406 (x86_fill_gregset, x86_store_gregset): Use it when handling
4409 2015-02-20 Pedro Alves <palves@redhat.com>
4411 * thread-db.c: Include "nat/linux-procfs.h".
4412 (thread_db_init): Skip listing new threads if the kernel supports
4413 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4415 2015-02-20 Pedro Alves <palves@redhat.com>
4417 * linux-low.c (status_pending_p_callback): Use ptid_match.
4419 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4421 PR breakpoints/16812
4422 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4423 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4424 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4426 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4428 PR breakpoints/15956
4429 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4431 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4433 * linux-low.c (linux_low_btrace_conf): Print size.
4434 * server.c (handle_btrace_conf_general_set): New.
4435 (hanle_general_set): Call handle_btrace_conf_general_set.
4436 (handle_query): Report Qbtrace-conf:bts:size as supported.
4438 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4440 * linux-low.c (linux_low_enable_btrace): Update parameters.
4441 (linux_low_btrace_conf): New.
4442 (linux_target_ops)<to_btrace_conf>: Initialize.
4443 * server.c (current_btrace_conf): New.
4444 (handle_btrace_enable): Rename to ...
4445 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4446 to target_enable_btrace. Update comment. Update users.
4447 (handle_qxfer_btrace_conf): New.
4448 (qxfer_packets): Add btrace-conf entry.
4449 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4450 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4451 (target_ops)<read_btrace_conf>: New.
4452 (target_enable_btrace): Update parameters.
4453 (target_read_btrace_conf): New.
4455 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4457 * server.c (handle_btrace_general_set): Remove call to
4458 target_supports_btrace.
4459 (supported_btrace_packets): New.
4460 (handle_query): Call supported_btrace_packets.
4461 * target.h: include btrace-common.h.
4462 (btrace_target_info): Removed.
4463 (supports_btrace, target_supports_btrace): Update parameters.
4465 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4467 * Makefile.in (SFILES): Add common/btrace-common.c.
4468 (OBS): Add common/btrace-common.o.
4469 (btrace-common.o): Add build rules.
4470 * linux-low: Include btrace-common.h.
4471 (linux_low_read_btrace): Use struct btrace_data. Call
4472 btrace_data_init and btrace_data_fini.
4474 2015-02-06 Pedro Alves <palves@redhat.com>
4476 * thread-db.c (find_new_threads_callback): Add debug output.
4478 2015-02-04 Pedro Alves <palves@redhat.com>
4480 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4481 (resume_stopped_resumed_lwps): New function.
4482 (linux_wait_for_event_filtered): Use it.
4484 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4486 * Makefile.in (SFILES): Add linux-personality.c.
4487 (linux-personality.o): New rule.
4488 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4489 list of objects to be built.
4490 * linux-low.c: Include nat/linux-personality.h.
4491 (linux_create_inferior): Remove code to disable address space
4492 randomization (moved to ../nat/linux-personality.c). Create
4493 cleanup to disable address space randomization.
4495 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4497 * Makefile.in (posix-strerror.o): New rule.
4498 (mingw-strerror.o): Likewise.
4499 * configure: Regenerated.
4500 * configure.ac: Source file ../common/common.host. Initialize new
4501 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4503 2015-01-14 Yao Qi <yao@codesourcery.com>
4505 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4506 (ppc-linux.o): New rule.
4507 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4508 * configure.ac: AC_CHECK_FUNCS(getauxval).
4509 * config.in: Re-generated.
4510 * configure: Re-generated.
4511 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4512 ppc64_64bit_inferior_p
4514 2015-01-14 Yao Qi <yao@codesourcery.com>
4516 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4517 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4518 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4519 (PT_ORIG_R3, PT_TRAP): Likewise.
4520 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4521 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4522 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4524 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4526 * i387-fp.c (i387_cache_to_xsave): In look over
4527 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4528 zmmh_low_space field by use of zmmh_high_space.
4530 2015-01-09 Pedro Alves <palves@redhat.com>
4532 * linux-low.c (step_over_bkpt): Move higher up in the file.
4533 (handle_extended_wait): Don't store the stop_pc here.
4534 (get_stop_pc): Adjust comments and rename to ...
4535 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4536 stopped for a software breakpoint or hardware breakpoint.
4537 (thread_still_has_status_pending_p): New function.
4538 (status_pending_p_callback): Use
4539 thread_still_has_status_pending_p. If the event is no longer
4540 interesting, resume the LWP.
4541 (handle_tracepoints): Add assert.
4542 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4543 (wstatus_maybe_breakpoint): New function.
4544 (cancel_breakpoint): Delete function.
4545 (check_stopped_by_watchpoint): New function, factored out from
4546 linux_low_filter_event.
4547 (lp_status_maybe_breakpoint): Delete function.
4548 (linux_low_filter_event): Remove filter_ptid argument.
4549 Leave thread group exits pending here. Store the LWP's stop PC.
4550 Always leave events pending.
4551 (linux_wait_for_event_filtered): Pull all events out of the
4552 kernel, and leave them all pending.
4553 (count_events_callback, select_event_lwp_callback): Consider all
4555 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4556 (select_event_lwp): Only give preference to the stepping LWP in
4557 all-stop mode. Adjust comments.
4558 (ignore_event): New function.
4559 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4560 references to cancel_breakpoints. Adjust to renames. Also give
4561 equal priority to all LWPs that have had events in non-stop mode.
4562 If reporting a software breakpoint event, unadjust the LWP's PC.
4563 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4564 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4566 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4567 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4568 (linux_stopped_by_watchpoint): Adjust.
4569 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4570 * linux-low.h (enum lwp_stop_reason): New.
4571 (struct lwp_info) <stop_pc>: Adjust comment.
4572 <stopped_by_watchpoint>: Delete field.
4573 <stop_reason>: New field.
4574 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4575 * mem-break.c (software_breakpoint_inserted_here)
4576 (hardware_breakpoint_inserted_here): New function.
4577 * mem-break.h (software_breakpoint_inserted_here)
4578 (hardware_breakpoint_inserted_here): Declare.
4579 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4580 (cancel_breakpoints): Delete.
4581 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4582 (upload_fast_traceframes): Remove references to
4585 2015-01-09 Pedro Alves <palves@redhat.com>
4587 * thread-db.c (find_new_threads_callback): Ignore thread if the
4588 kernel thread ID is -1.
4590 2015-01-09 Pedro Alves <palves@redhat.com>
4592 * linux-low.c (linux_attach_fail_reason_string): Move to
4593 nat/linux-ptrace.c, and rename.
4594 (linux_attach_lwp): Update comment.
4595 (attach_proc_task_lwp_callback): New function.
4596 (linux_attach): Adjust to rename and use
4597 linux_proc_attach_tgid_threads.
4598 (linux_attach_fail_reason_string): Delete declaration.
4600 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4602 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4603 * server.c (gdbserver_version): Likewise.
4605 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4607 * remote-utils.c: Include ctype.h.
4608 (input_interrupt): Explicitly handle the case when the char
4609 received is the NUL byte. Improve the printing of non-ASCII
4612 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4614 * linux-low.c (linux_low_filter_event): Update call to
4615 linux_enable_event_reporting following the addition of
4616 a new parameter to that function.
4618 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4621 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4622 (AARCH64_FPCR_REGNO): Likewise.
4623 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4624 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4625 (aarch64_store_fpregset): Likewise.
4627 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4629 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4630 Remove FIXME comment about assumption about N.
4632 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4634 * configure.ac: If large-file support is disabled in GDBserver,
4635 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4636 * configure: Regenerate.
4638 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4640 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4641 warning upon ENODATA from ptrace.
4642 * linux-s390-low.c (s390_store_tdb): New.
4643 (s390_regsets): Add regset for NT_S390_TDB.
4645 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4647 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4648 without a fill_function.
4649 * linux-s390-low.c (s390_fill_last_break): Remove.
4650 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4651 (s390_arch_setup): Use regset's size instead of fill_function for
4654 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4656 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4657 the regset's store function when ptrace returned an error.
4658 * regcache.c (get_thread_regcache): Invalidate register cache
4659 before fetching inferior's registers.
4661 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4663 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4664 while-loop as for-loop.
4665 (regsets_store_inferior_registers): Likewise.
4667 2014-11-28 Yao Qi <yao@codesourcery.com>
4669 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4670 * config.in, configure: Re-generate.
4671 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4674 2014-11-21 Yao Qi <yao@codesourcery.com>
4676 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4677 (AC_CHECK_HEADERS): Remove malloc.h.
4678 * configure: Re-generated.
4679 * config.in: Re-generated.
4680 * server.h: Don't include alloca.h and malloc.h.
4681 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4682 Don't include malloc.h.
4684 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4686 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4687 corresponding ERRNO check in same block.
4689 2014-11-12 Pedro Alves <palves@redhat.com>
4691 * server.c (cont_thread): Update comment.
4692 (start_inferior, attach_inferior): No longer clear cont_thread.
4693 (handle_v_cont): No longer set cont_thread.
4694 (captured_main): Clear cont_thread each time a GDB connects.
4696 2014-11-12 Pedro Alves <palves@redhat.com>
4698 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4699 thread, and don't resume all threads if the Hc thread has exited.
4701 2014-11-12 Pedro Alves <palves@redhat.com>
4703 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4704 the process group instead of to a specific LWP.
4706 2014-10-15 Pedro Alves <palves@redhat.com>
4709 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4711 (arm_set_thread_context): Delete.
4712 (the_low_target): Adjust.
4713 * win32-i386-low.c (debug_registers_changed)
4714 (debug_registers_used): Delete.
4715 (update_debug_registers_callback): New function.
4716 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4717 needing to update their debug registers.
4718 (win32_get_current_dr): New function.
4719 (x86_dr_low_get_addr, x86_dr_low_get_control)
4720 (x86_dr_low_get_status): Fetch the debug register from the thread
4722 (i386_initial_stuff): Adjust.
4723 (i386_get_thread_context): Remove current_event parameter. Don't
4724 clear debug_registers_changed nor copy DR values to
4726 (i386_set_thread_context): Delete.
4727 (i386_prepare_to_resume): New function.
4728 (i386_thread_added): Mark the thread as needing to update irs
4730 (the_low_target): Remove i386_set_thread_context and install
4731 i386_prepare_to_resume.
4732 * win32-low.c (win32_get_thread_context): Adjust.
4733 (win32_set_thread_context): Use SetThreadContext
4735 (win32_prepare_to_resume): New function.
4736 (win32_require_context): New function, factored out from ...
4737 (thread_rec): ... this.
4738 (continue_one_thread): Call win32_prepare_to_resume on each thread
4739 we're about to continue.
4740 (win32_resume): Call win32_prepare_to_resume on the event thread.
4741 * win32-low.h (struct win32_thread_info)
4742 <debug_registers_changed>: New field.
4743 (struct win32_target_ops): Change prototype of set_thread_context,
4744 delete set_thread_context and add prepare_to_resume.
4745 (win32_require_context): New declaration.
4747 2014-10-08 Gary Benson <gbenson@redhat.com>
4749 * server.h: Do not include common-exceptions.h.
4751 2014-10-08 Gary Benson <gbenson@redhat.com>
4753 * server.h: Do not include cleanups.h.
4755 2014-09-30 James Hogan <james.hogan@imgtec.com>
4757 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4760 2014-09-23 Yao Qi <yao@codesourcery.com>
4762 * linux-low.c (lp_status_maybe_breakpoint): New function.
4763 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4764 (count_events_callback): Likewise.
4765 (select_event_lwp_callback): Likewise.
4766 (cancel_breakpoints_callback): Likewise.
4768 2014-09-19 Don Breazeal <donb@codesourcery.com>
4770 * linux-low.c (handle_extended_wait): Call
4771 linux_ptrace_get_extended_event.
4772 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4773 linux_is_extended_waitstatus.
4775 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4777 * Makefile.in (CPPFLAGS): Define.
4778 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4779 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4781 2014-09-16 Gary Benson <gbenson@redhat.com>
4783 * inferiors.h (current_inferior): Renamed as...
4784 (current_thread): New variable. All uses updated.
4785 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4786 (maybe_move_out_of_jump_pad): Likewise.
4787 (cancel_breakpoint): Likewise.
4788 (linux_low_filter_event): Likewise.
4789 (wait_for_sigstop): Likewise.
4790 (linux_resume_one_lwp): Likewise.
4791 (need_step_over_p): Likewise.
4792 (start_step_over): Likewise.
4793 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4794 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4795 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4796 and save_inferior as saved_thread.
4797 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4799 (regcache_invalidate_thread): Likewise.
4800 * remote-utils.c (prepare_resume_reply): Likewise.
4801 * thread-db.c (thread_db_get_tls_address): Likewise.
4802 (disable_thread_event_reporting): Likewise.
4803 (remove_thread_event_breakpoints): Likewise.
4804 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4806 * target.h (set_desired_inferior): Renamed as...
4807 (set_desired_thread): New declaration. All uses updated.
4808 * server.c (myresume): Updated comment to reference thread instead
4810 (handle_serial_event): Likewise.
4811 (handle_target_event): Likewise.
4813 2014-09-12 Tom Tromey <tromey@redhat.com>
4814 Gary Benson <gbenson@redhat.com>
4816 * regcache.h: Include common-regcache.h.
4817 (regcache_read_pc): Don't declare.
4818 * regcache.c (get_thread_regcache_for_ptid): New function.
4820 2014-09-11 Tom Tromey <tromey@redhat.com>
4821 Gary Benson <gbenson@redhat.com>
4823 * symbol.c: New file.
4824 * Makefile.in (SFILES): Add symbol.c.
4825 (OBS): Add symbol.o.
4827 2014-09-11 Gary Benson <gbenson@redhat.com>
4829 * target.c (target_stop_ptid, target_continue_ptid): New
4832 2014-09-11 Tom Tromey <tromey@redhat.com>
4833 Gary Benson <gbenson@redhat.com>
4835 * target.h: Include target/target.h.
4836 * target.c (target_read_memory, target_read_uint32)
4837 (target_write_memory): New functions.
4839 2014-09-11 Gary Benson <gbenson@redhat.com>
4841 * server.h (debug_hw_points): Don't declare.
4842 * server.c (debug_hw_points): Don't define. Replace all uses
4843 with show_debug_regs.
4844 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4845 all uses with show_debug_regs.
4847 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4849 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4850 endianness into account.
4851 (ppc_supply_ptrace_register): Likewise.
4853 2014-09-03 James Hogan <james.hogan@imgtec.com>
4855 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4856 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4858 2014-09-03 Gary Benson <gbenson@redhat.com>
4860 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4861 ALL_DEBUG_ADDRESS_REGISTERS.
4863 2014-09-02 Gary Benson <gbenson@redhat.com>
4865 * i386-low.h: Renamed as...
4866 * x86-low.h: New file. All type, function and variable name
4867 prefixes changed from "i386_" to "x86_". All references updated.
4868 * i386-low.c: Renamed as...
4869 * x86-low.c: New file. All type, function and variable name
4870 prefixes changed from "i386_" to "x86_". All references updated.
4872 2014-09-02 Gary Benson <gbenson@redhat.com>
4874 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4875 (x86_linux_new_thread): Likewise.
4877 2014-08-29 Gary Benson <gbenson@redhat.com>
4879 * server.h (setjmp.h): Do not include.
4880 (toplevel): Do not declare.
4881 (common-exceptions.h): Include.
4882 (cleanups.h): Likewise.
4883 * server.c (toplevel): Do not define.
4884 (exit_code): New static global.
4885 (detach_or_kill_for_exit_cleanup): New function.
4886 (main): New function. Original main renamed to...
4887 (captured_main): New function.
4888 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4890 2014-08-29 Gary Benson <gbenson@redhat.com>
4892 * Makefile.in (SFILES): Add common/common-exceptions.c.
4893 (OBS): Add common-exceptions.o.
4894 (common-exceptions.o): New rule.
4895 * utils.c (prepare_to_throw_exception): New function.
4897 2014-08-29 Gary Benson <gbenson@redhat.com>
4899 * config.in: Regenerate.
4900 * configure: Likewise.
4902 2014-08-29 Gary Benson <gbenson@redhat.com>
4904 * Makefile.in (SFILES): Add common/cleanups.c.
4906 (cleanups.o): New rule.
4908 2014-08-29 Gary Benson <gbenson@redhat.com>
4910 * utils.c (internal_vwarning): New function.
4912 2014-08-28 Gary Benson <gbenson@redhat.com>
4914 * utils.h (fatal): Remove declaration.
4915 * utils.c (fatal): Remove function.
4917 2014-08-28 Gary Benson <gbenson@redhat.com>
4919 * tracepoint.c (gdb_agent_init): Replace fatal with
4921 (initialize_tracepoint): Likewise.
4923 2014-08-28 Gary Benson <gbenson@redhat.com>
4925 * remote-utils.c (remote_prepare): Replace fatal with error.
4927 2014-08-28 Gary Benson <gbenson@redhat.com>
4929 * linux-low.c (linux_async): Replace fatal with warning.
4931 (linux_start_non_stop): Return -1 if linux_async failed.
4933 2014-08-28 Gary Benson <gbenson@redhat.com>
4935 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4937 (i386_dr_low_get_addr): Remove vague comment.
4938 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4941 2014-08-28 Gary Benson <gbenson@redhat.com>
4943 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4944 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4946 (linux_resume_one_lwp): Likewise.
4947 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4949 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4950 with internal_error.
4951 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4952 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4953 (find_register_by_name): Replace fatal with internal_error.
4954 (find_regno): Likewise.
4955 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4956 * thread-db.c (thread_db_create_event): Likewise.
4957 (thread_db_load_search): Likewise.
4958 (try_thread_db_load_1): Likewise.
4959 * tracepoint.c (get_jump_space_head): Replace fatal with
4961 (claim_trampoline_space): Likewise.
4962 (have_fast_tracepoint_trampoline_buffer): Likewise.
4963 (cmd_qtstart): Likewise.
4964 (stop_tracing): Likewise.
4965 (fast_tracepoint_collecting): Likewise.
4966 (target_malloc): Likewise.
4967 (download_tracepoint): Likewise.
4968 (download_trace_state_variables): Replace check with gdb_assert.
4969 (upload_fast_traceframes): Replace fatal with internal_error.
4971 2014-08-19 Tom Tromey <tromey@redhat.com>
4972 Gary Benson <gbenson@redhat.com>
4974 * Makefile.in (SFILES): Add common/common-debug.c.
4975 (OBS): Add common-debug.o.
4976 (common-debug.o): New rule.
4977 * debug.h (debug_printf): Don't declare.
4978 * debug.c (debug_printf): Renamed and rewritten as...
4979 (debug_vprintf): New function.
4981 2014-08-19 Gary Benson <gbenson@redhat.com>
4983 * utils.h: Do not include print-utils.h.
4985 2014-08-19 Tom Tromey <tromey@redhat.com>
4986 Gary Benson <gbenson@redhat.com>
4988 * server.h: Add static assertion.
4989 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4991 2014-08-19 Tom Tromey <tromey@redhat.com>
4992 Gary Benson <gbenson@redhat.com>
4994 * Makefile.in (SFILES): Add common/errors.c.
4995 (OBS): Add errors.o.
4996 (IPA_OBS): Add errors-ipa.o.
4997 (errors.o): New rule.
4998 (errors-ipa.o): Likewise.
4999 * utils.h (perror_with_name, error, warning): Don't declare.
5000 * utils.c (warning): Renamed and rewritten as...
5001 (vwarning): New function.
5002 (error): Renamed and rewritten as...
5003 (verror): New function.
5004 (internal_error): Renamed and rewritten as...
5005 (internal_verror): New function.
5007 2014-08-07 Gary Benson <gbenson@redhat.com>
5009 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5010 * configure: Regenerate.
5011 * config.in: Likewise.
5012 * server.h: Do not include errno.h.
5013 * event-loop.c: Likewise.
5014 * hostio-errno.c: Likewise.
5015 * linux-low.c: Likewise.
5016 * remote-utils.c: Likewise.
5017 * spu-low.c: Likewise.
5018 * utils.c: Likewise.
5019 * gdbreplay.c: Unconditionally include errno.h.
5021 2014-08-07 Gary Benson <gbenson@redhat.com>
5023 * server.h: Do not include string.h.
5024 * event-loop.c: Likewise.
5025 * linux-low.c: Likewise.
5026 * regcache.c: Likewise.
5027 * remote-utils.c: Likewise.
5028 * spu-low.c: Likewise.
5029 * utils.c: Likewise.
5031 2014-08-07 Gary Benson <gbenson@redhat.com>
5033 * server.h: Do not include gdb_assert.h.
5035 2014-08-07 Gary Benson <gbenson@redhat.com>
5037 * server.h: Do not include common-utils.h.
5039 2014-08-07 Gary Benson <gbenson@redhat.com>
5041 * server.h: Do not include ptid.h.
5042 * notif.h: Likewise.
5044 2014-08-07 Gary Benson <gbenson@redhat.com>
5046 * server.h: Do not include gdb_locale.h.
5048 2014-08-07 Gary Benson <gbenson@redhat.com>
5050 * server.h: Do not include gdb/signals.h.
5051 * win32-low.c: Likewise.
5053 2014-08-07 Gary Benson <gbenson@redhat.com>
5055 * server.h: Do not include pathmax.h.
5057 2014-08-07 Gary Benson <gbenson@redhat.com>
5059 * server.h: Do not include libiberty.h.
5060 * linux-bfin-low.c: Likewise.
5062 2014-08-07 Gary Benson <gbenson@redhat.com>
5064 * server.h: Do not include ansidecl.h.
5066 2014-08-07 Gary Benson <gbenson@redhat.com>
5068 * linux-x86-low.c: Do not include stddef.h.
5069 * lynx-ppc-low.c: Likewise.
5070 * tracepoint.c: Likewise.
5072 2014-08-07 Gary Benson <gbenson@redhat.com>
5074 * server.h: Do not include stdarg.h.
5075 * nto-low.c: Likewise.
5077 2014-08-07 Gary Benson <gbenson@redhat.com>
5079 * server.h: Do not include stdlib.h.
5080 * inferiors.c: Likewise.
5081 * linux-low.c: Likewise.
5082 * regcache.c: Likewise.
5083 * spu-low.c: Likewise.
5084 * tracepoint.c: Likewise.
5085 * utils.c: Likewise.
5087 2014-08-07 Gary Benson <gbenson@redhat.com>
5089 * server.h: Do not include stdio.h.
5090 * linux-low.c: Likewise.
5091 * remote-utils.c: Likewise.
5092 * spu-low.c: Likewise.
5093 * utils.c: Likewise.
5094 * wincecompat.c: Likewise.
5096 2014-08-06 Gary Benson <gbenson@redhat.com>
5098 * regcache.c (init_register_cache): Move conditionals inside if.
5100 2014-08-06 Gary Benson <gbenson@redhat.com>
5102 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5104 2014-07-31 Gary Benson <gbenson@redhat.com>
5106 * ax.h: Do not include server.h.
5107 * gdbthread.h: Likewise.
5108 * lynx-low.h: Likewise.
5109 * notif.h: Likewise.
5111 2014-07-30 Gary Benson <gbenson@redhat.com>
5113 * server.h: Include common-defs.h.
5114 Do not include config.h or build-gnulib-gdbserver/config.h.
5116 2014-07-30 Gary Benson <gbenson@redhat.com>
5118 * hostio-errno.c: Move server.h to top of includes list.
5119 * inferiors.c: Likewise.
5120 * linux-x86-low.c: Likewise.
5121 * notif.c: Include server.h.
5123 2014-07-24 Tom Tromey <tromey@redhat.com>
5124 Gary Benson <gbenson@redhat.com>
5126 * server.h (CORE_ADDR): Now unsigned.
5128 2014-07-16 Pedro Alves <palves@redhat.com>
5130 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5132 2014-07-15 Pedro Alves <palves@redhat.com>
5134 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5137 2014-07-11 Pedro Alves <palves@redhat.com>
5139 * linux-low.c (kill_wait_lwp): New function, based on
5140 kill_one_lwp_callback, but use my_waitpid directly.
5141 (kill_one_lwp_callback, linux_kill): Use it.
5143 2014-06-23 Pedro Alves <palves@redhat.com>
5145 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5146 before setting DR0..DR3.
5148 2014-06-20 Gary Benson <gbenson@redhat.com>
5150 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5151 * configure: Regenerated.
5152 * config.in: Likewise.
5154 2014-06-20 Gary Benson <gbenson@redhat.com>
5156 * Makefile.in (SFILES): Update locations for files moved
5158 (object file files): Reordered.
5160 2014-06-20 Gary Benson <gbenson@redhat.com>
5162 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5163 (i386_dr_low_set_addr): Likewise.
5164 (i386_dr_low_get_addr): Likewise.
5165 (i386_dr_low_can_set_control): Likewise.
5166 (i386_dr_low_set_control): Likewise.
5167 (i386_dr_low_get_control): Likewise.
5168 (i386_dr_low_get_status): Likewise.
5169 (i386_get_debug_register_length): Likewise.
5170 * linux-x86-low.c (i386_dr_low_set_addr):
5171 Changed signature. Made static.
5172 (i386_dr_low_get_addr): Likewise.
5173 (i386_dr_low_set_control): Likewise.
5174 (i386_dr_low_get_control): Likewise.
5175 (i386_dr_low_get_status): Likewise.
5176 (i386_dr_low): New global variable.
5177 * win32-i386-low.c (i386_dr_low_set_addr):
5178 Changed signature. Made static.
5179 (i386_dr_low_get_addr): Likewise.
5180 (i386_dr_low_set_control): Likewise.
5181 (i386_dr_low_get_control): Likewise.
5182 (i386_dr_low_get_status): Likewise.
5183 (i386_dr_low): New global variable.
5185 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5187 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5188 * Makefile.in (AR, AR_FLAGS): Define.
5189 * configure: Regenerate.
5191 2014-06-19 Gary Benson <gbenson@redhat.com>
5193 * Makefile.in (i386-dregs.o): New rule.
5194 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5195 * i386-low.c (target.h): Remove include.
5196 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5197 (DR_CONTROL_SHIFT): Likewise.
5198 (DR_CONTROL_SIZE): Likewise.
5199 (DR_RW_EXECUTE): Likewise.
5200 (DR_RW_WRITE): Likewise.
5201 (DR_RW_READ): Likewise.
5202 (DR_RW_IORW): Likewise.
5203 (DR_LEN_1): Likewise.
5204 (DR_LEN_2): Likewise.
5205 (DR_LEN_4): Likewise.
5206 (DR_LEN_8): Likewise.
5207 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5208 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5209 (DR_ENABLE_SIZE): Likewise.
5210 (DR_LOCAL_SLOWDOWN): Likewise.
5211 (DR_GLOBAL_SLOWDOWN): Likewise.
5212 (DR_CONTROL_RESERVED): Likewise.
5213 (I386_DR_CONTROL_MASK): Likewise.
5214 (I386_DR_VACANT): Likewise.
5215 (I386_DR_LOCAL_ENABLE): Likewise.
5216 (I386_DR_GLOBAL_ENABLE): Likewise.
5217 (I386_DR_DISABLE): Likewise.
5218 (I386_DR_SET_RW_LEN): Likewise.
5219 (I386_DR_GET_RW_LEN): Likewise.
5220 (I386_DR_WATCH_HIT): Likewise.
5221 (i386_wp_op_t): Likewise.
5222 (i386_show_dr): Likewise.
5223 (i386_length_and_rw_bits): Likewise.
5224 (i386_insert_aligned_watchpoint): Likewise.
5225 (i386_remove_aligned_watchpoint): Likewise.
5226 (i386_handle_nonaligned_watchpoint): Likewise.
5227 i386_update_inferior_debug_regs(): Likewise.
5228 (i386_dr_insert_watchpoint): Likewise.
5229 (i386_dr_remove_watchpoint): Likewise.
5230 (i386_dr_region_ok_for_watchpoint): Likewise.
5231 (i386_dr_stopped_data_address): Likewise.
5232 (i386_dr_stopped_by_watchpoint): Likewise.
5234 2014-06-19 Gary Benson <gbenson@redhat.com>
5236 * i386-low.c (i386_dr_show): Renamed to
5237 i386_show_dr and made static. All uses updated.
5238 (i386_dr_length_and_rw_bits): Renamed to
5239 i386_length_and_rw_bits and made static.
5241 (i386_dr_insert_aligned_watchpoint): Renamed to
5242 i386_insert_aligned_watchpoint and made static.
5244 (i386_dr_remove_aligned_watchpoint): Renamed to
5245 i386_remove_aligned_watchpoint and made static.
5247 (i386_dr_update_inferior_debug_regs): Renamed to
5248 i386_update_inferior_debug_regs and made static.
5251 2014-06-18 Gary Benson <gbenson@redhat.com>
5253 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5254 (i386_dr_low_can_set_control): Likewise.
5255 (i386_get_debug_register_length): Likewise.
5256 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5257 (i386_dr_low_can_set_control): Likewise.
5258 (i386_get_debug_register_length): Likewise.
5260 2014-06-17 Gary Benson <gbenson@redhat.com>
5262 * i386-low.h (i386-dregs.h): New include.
5263 (DR_FIRSTADDR): Now in i386-dregs.h.
5264 (DR_LASTADDR): Likewise.
5265 (DR_NADDR): Likewise.
5266 (DR_STATUS): Likewise.
5267 (DR_CONTROL): Likewise.
5268 (i386_debug_reg_state): Likewise.
5269 (i386_dr_insert_watchpoint): Likewise.
5270 (i386_dr_remove_watchpoint): Likewise.
5271 (i386_dr_region_ok_for_watchpoint): Likewise.
5272 (i386_dr_stopped_data_address): Likewise.
5273 (i386_dr_stopped_by_watchpoint): Likewise.
5274 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5276 2014-06-18 Gary Benson <gbenson@redhat.com>
5278 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5279 i386_dr_insert_watchpoint.
5280 (i386_low_remove_watchpoint): Renamed to
5281 i386_dr_remove_watchpoint.
5282 (i386_low_region_ok_for_watchpoint): Renamed to
5283 i386_dr_region_ok_for_watchpoint.
5284 (i386_low_stopped_data_address): Renamed to
5285 i386_dr_stopped_data_address.
5286 (i386_low_stopped_by_watchpoint): Renamed to
5287 i386_dr_stopped_by_watchpoint.
5288 * i386-low.c (i386_show_dr): Renamed to
5289 i386_dr_show and made nonstatic. All uses updated.
5290 (i386_length_and_rw_bits): Renamed to
5291 i386_dr_length_and_rw_bits and made nonstatic.
5293 (i386_insert_aligned_watchpoint): Renamed to
5294 i386_dr_insert_aligned_watchpoint and made nonstatic.
5296 (i386_remove_aligned_watchpoint): Renamed to
5297 i386_dr_remove_aligned_watchpoint and made nonstatic.
5299 (i386_update_inferior_debug_regs): Renamed to
5300 i386_dr_update_inferior_debug_regs and made nonstatic.
5302 (i386_low_insert_watchpoint): Renamed to
5303 i386_dr_insert_watchpoint. All uses updated.
5304 (i386_low_remove_watchpoint): Renamed to
5305 i386_dr_remove_watchpoint. All uses updated.
5306 (i386_low_region_ok_for_watchpoint): Renamed to
5307 i386_dr_region_ok_for_watchpoint. All uses updated.
5308 (i386_low_stopped_data_address): Renamed to
5309 i386_dr_stopped_data_address. All uses updated.
5310 (i386_low_stopped_by_watchpoint): Renamed to
5311 i386_dr_stopped_by_watchpoint. All uses updated.
5313 2014-06-18 Gary Benson <gbenson@redhat.com>
5315 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5316 (i386_dr_low_can_set_control): Likewise.
5317 (i386_insert_aligned_watchpoint): New check.
5319 2014-06-18 Gary Benson <gbenson@redhat.com>
5321 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5324 2014-06-18 Gary Benson <gbenson@redhat.com>
5326 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5327 instead of fatal and error.
5328 (i386_handle_nonaligned_watchpoint): Likewise.
5330 2014-06-18 Gary Benson <gbenson@redhat.com>
5332 * i386-low.c (i386_get_debug_register_length): New macro.
5333 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5334 (i386_show_dr): Use debug_printf instead of fprintf. Use
5335 phex to format values.
5337 2014-06-18 Gary Benson <gbenson@redhat.com>
5339 * i386-low.h: Comment changes.
5340 * i386-low.c: Likewise.
5342 2014-06-18 Gary Benson <gbenson@redhat.com>
5344 * i386-low.c: Whitespace changes.
5346 2014-06-12 Tom Tromey <tromey@redhat.com>
5348 * utils.c (freeargv): Remove.
5350 2014-06-12 Tom Tromey <tromey@redhat.com>
5352 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5353 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5354 (parse_debug_format_options): Likewise.
5355 (gdbserver_usage): Likewise.
5356 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5357 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5358 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5360 ($(LIBGNU)): Depend on libiberty.
5361 (all-lib): Recurse into all subdirs.
5362 (install-only): Invoke "install" target in subdirs.
5363 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5365 * configure: Rebuild.
5366 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5367 for vasprintf, vsnprintf, or gettimeofday.
5368 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5371 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5373 * development.sh: Delete.
5374 * Makefile.in (config.status): Adjust dependency on development.sh.
5375 * configure.ac: Adjust development.sh source call.
5376 * configure: Regenerate.
5378 2014-06-02 Pedro Alves <palves@redhat.com>
5380 * ax.c (gdb_free_agent_expr): New function.
5381 * ax.h (gdb_free_agent_expr): New declaration.
5382 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5384 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5386 (clear_breakpoint_conditions_and_commands): New function.
5387 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5388 (clear_breakpoint_conditions_and_commands): New declaration.
5390 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5392 * linux-aarch64-low.c (asm/ptrace.h): Include.
5394 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5396 Fix TLS access for -static -pthread.
5397 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5398 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5399 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5401 2014-05-20 Pedro Alves <palves@redhat.com>
5403 * linux-aarch64-low.c (aarch64_insert_point)
5404 (aarch64_remove_point): No longer check whether the type is
5405 supported here. Adjust to new interface.
5406 (the_low_target): Install aarch64_supports_z_point_type as
5407 supports_z_point_type method.
5408 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5409 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5410 instead of a Z packet char. Adjust.
5411 (arm_supports_z_point_type): New function.
5412 (arm_insert_point, arm_remove_point): Adjust to new interface.
5413 (the_low_target): Install arm_supports_z_point_type.
5414 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5415 (cris_insert_point, cris_remove_point): Adjust to new interface.
5416 Don't check whether the type is supported here.
5417 (the_low_target): Install cris_supports_z_point_type.
5418 * linux-low.c (linux_supports_z_point_type): New function.
5419 (linux_insert_point, linux_remove_point): Adjust to new interface.
5420 * linux-low.h (struct linux_target_ops) <insert_point,
5421 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5422 raw_breakpoint pointer parameter.
5423 <supports_z_point_type>: New method.
5424 * linux-mips-low.c (mips_supports_z_point_type): New function.
5425 (mips_insert_point, mips_remove_point): Adjust to new interface.
5426 Use mips_supports_z_point_type.
5427 (the_low_target): Install mips_supports_z_point_type.
5428 * linux-ppc-low.c (the_low_target): Install NULL as
5429 supports_z_point_type method.
5430 * linux-s390-low.c (the_low_target): Install NULL as
5431 supports_z_point_type method.
5432 * linux-sparc-low.c (the_low_target): Install NULL as
5433 supports_z_point_type method.
5434 * linux-x86-low.c (x86_supports_z_point_type): New function.
5435 (x86_insert_point): Adjust to new insert_point interface. Use
5436 insert_memory_breakpoint. Adjust to new
5437 i386_low_insert_watchpoint interface.
5438 (x86_remove_point): Adjust to remove_point interface. Use
5439 remove_memory_breakpoint. Adjust to new
5440 i386_low_remove_watchpoint interface.
5441 (the_low_target): Install x86_supports_z_point_type.
5442 * lynx-low.c (lynx_target_ops): Install NULL as
5443 supports_z_point_type callback.
5444 * nto-low.c (nto_supports_z_point_type): New.
5445 (nto_insert_point, nto_remove_point): Adjust to new interface.
5446 (nto_target_ops): Install nto_supports_z_point_type.
5447 * mem-break.c: Adjust intro comment.
5448 (struct raw_breakpoint) <raw_type, size>: New fields.
5449 <inserted>: Update comment.
5450 <shlib_disabled>: Delete field.
5451 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5452 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5453 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5454 (raw_bkpt_type_to_target_hw_bp_type): New function.
5455 (find_enabled_raw_code_breakpoint_at): New function.
5456 (find_raw_breakpoint_at): New type and size parameters. Use them.
5457 (insert_memory_breakpoint): New function, based off
5458 set_raw_breakpoint_at.
5459 (remove_memory_breakpoint): New function.
5460 (set_raw_breakpoint_at): Reimplement.
5461 (set_breakpoint): New, based on set_breakpoint_at.
5462 (set_breakpoint_at): Reimplement.
5463 (delete_raw_breakpoint): Go through the_target->remove_point
5464 instead of assuming memory breakpoints.
5465 (find_gdb_breakpoint_at): Delete.
5466 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5467 (find_gdb_breakpoint): New function.
5468 (set_gdb_breakpoint_at): Delete.
5469 (z_type_supported): New function.
5470 (set_gdb_breakpoint_1): New function, loosely based off
5471 set_gdb_breakpoint_at.
5472 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5473 (delete_gdb_breakpoint_at): Delete.
5474 (delete_gdb_breakpoint_1): New function, loosely based off
5475 delete_gdb_breakpoint_at.
5476 (delete_gdb_breakpoint): New function.
5477 (clear_gdb_breakpoint_conditions): Rename to ...
5478 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5480 (add_condition_to_breakpoint): Make static.
5481 (add_breakpoint_condition): Take a struct breakpoint pointer
5482 instead of an address. Adjust.
5483 (gdb_condition_true_at_breakpoint): Rename to ...
5484 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5486 (gdb_condition_true_at_breakpoint): Reimplement.
5487 (add_breakpoint_commands): Take a struct breakpoint pointer
5488 instead of an address. Adjust.
5489 (gdb_no_commands_at_breakpoint): Rename to ...
5490 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5491 parameter. Return true if no breakpoint was found. Change debug
5493 (gdb_no_commands_at_breakpoint): Reimplement.
5494 (run_breakpoint_commands): Rename to ...
5495 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5496 and change return type to boolean.
5497 (run_breakpoint_commands): New function.
5498 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5499 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5500 breakpoint. Go through the_target->remove_point instead of
5501 assuming memory breakpoint.
5502 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5503 software and hardware breakpoints.
5504 (reinsert_raw_breakpoint): Go through the_target->insert_point
5505 instead of assuming memory breakpoint.
5506 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5507 software and hardware breakpoints.
5508 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5509 Check both software and hardware breakpoints.
5510 (validate_inserted_breakpoint): Assert the breakpoint is a
5511 software breakpoint. Set the inserted flag to -1 instead of
5512 setting shlib_disabled.
5513 (delete_disabled_breakpoints): Adjust.
5514 (validate_breakpoints): Only validate software breakpoints.
5515 Adjust to inserted flag change.
5516 (check_mem_read, check_mem_write): Skip breakpoint types other
5517 than software breakpoints. Adjust to inserted flag change.
5518 * mem-break.h (enum raw_bkpt_type): New enum.
5519 (raw_breakpoint, struct process_info): Forward declare.
5520 (Z_packet_to_target_hw_bp_type): Delete declaration.
5521 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5522 (set_gdb_breakpoint, delete_gdb_breakpoint)
5523 (clear_breakpoint_conditions): New declarations.
5524 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5525 (breakpoint_inserted_here): Update comment.
5526 (add_breakpoint_condition, add_breakpoint_commands): Replace
5527 address parameter with a breakpoint pointer parameter.
5528 (gdb_breakpoint_here): Update comment.
5529 (delete_gdb_breakpoint_at): Delete.
5530 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5531 * server.c (process_point_options): Take a struct breakpoint
5532 pointer instead of an address. Adjust.
5533 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5534 delete_gdb_breakpoint.
5535 * spu-low.c (spu_target_ops): Install NULL as
5536 supports_z_point_type method.
5537 * target.h: Include mem-break.h.
5538 (struct target_ops) <prepare_to_access_memory>: Update comment.
5539 <supports_z_point_type>: New field.
5540 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5541 instead of a char. Also take a raw breakpoint pointer.
5542 * win32-arm-low.c (the_low_target): Install NULL as
5543 supports_z_point_type.
5544 * win32-i386-low.c (i386_supports_z_point_type): New function.
5545 (i386_insert_point, i386_remove_point): Adjust to new interface.
5546 (the_low_target): Install i386_supports_z_point_type.
5547 * win32-low.c (win32_supports_z_point_type): New function.
5548 (win32_insert_point, win32_remove_point): Adjust to new interface.
5549 (win32_target_ops): Install win32_supports_z_point_type.
5550 * win32-low.h (struct win32_target_ops):
5551 <supports_z_point_type>: New method.
5552 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5553 instead of a char. Also take a raw breakpoint pointer.
5555 2014-05-20 Pedro Alves <palves@redhat.com>
5557 * mem-break.h: Include break-common.h.
5558 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5559 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5560 (Z_packet_to_target_hw_bp_type): New declaration.
5561 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5562 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5563 (Z_PACKET_ACCESS_WP): Delete macros.
5564 (Z_packet_to_hw_type): Delete function.
5565 * i386-low.h: Don't include break-common.h here.
5566 (Z_packet_to_hw_type): Delete declaration.
5567 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5568 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5569 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5570 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5571 * linux-aarch64-low.c: Don't include break-common.h here.
5572 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5573 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5574 (Z_packet_to_target_hw_bp_type): Delete function.
5575 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5577 (mips_insert_point, mips_remove_point): Use
5578 Z_packet_to_target_hw_bp_type.
5580 2014-05-20 Pedro Alves <palves@redhat.com>
5582 * linux-aarch64-low.c: Include break-common.h.
5583 (enum target_point_type): Delete.
5584 (Z_packet_to_point_type): Rename to ...
5585 (Z_packet_to_target_hw_bp_type): ... this, and return a
5586 target_hw_bp_type instead.
5587 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5588 instead of an enum target_point_type.
5589 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5591 (aarch64_dr_state_insert_one_point)
5592 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5593 (aarch64_handle_aligned_watchpoint)
5594 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5595 Take an enum target_hw_bp_type instead of an enum
5597 (aarch64_supports_z_point_type): New function.
5598 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5599 use Z_packet_to_target_hw_bp_type.
5601 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5603 * configure.ac: Only use -Werror by default when DEVELOPMENT
5605 * configure: Regenerate.
5607 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5609 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5610 * linux-x86-low.c (X86_64_USER_REGS): New.
5611 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5613 2014-04-28 Yao Qi <yao@codesourcery.com>
5615 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5618 2014-04-25 Pedro Alves <palves@redhat.com>
5621 * linux-low.c (linux_attach_fail_reason_string): New function.
5622 (linux_attach_lwp): Delete.
5623 (linux_attach_lwp_1): Rename to ...
5624 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5625 argument. Remove "initial" parameter. Return int instead of
5626 void. Don't error or warn here.
5627 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5628 failure to attach to the tgid. Call warning when failing to
5630 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5631 argument. Remove "initial" parameter. Return int instead of
5632 void. Don't error or warn here.
5633 (linux_attach_fail_reason_string): New declaration.
5634 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5635 interface change. Use linux_attach_fail_reason_string.
5637 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5638 Walfred Tedeschi <walfred.tedeschi@intel.com>
5640 * Makefile.in: Added rules to handle new files
5641 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5642 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5643 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5644 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5645 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5646 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5648 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5649 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5650 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5651 i386/x32-avx512.xml.
5652 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5653 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5654 i386/x32-avx512-linux.xml.
5655 * i387-fp.c (num_avx512_k_registers): New constant for number
5657 (num_avx512_zmmh_low_registers): New constant for number of
5658 lower ZMM registers (0-15).
5659 (num_avx512_zmmh_high_registers): New constant for number of
5660 higher ZMM registers (16-31).
5661 (num_avx512_ymmh_registers): New contant for number of higher
5662 YMM registers (ymm16-31 added by avx521 on x86_64).
5663 (num_avx512_xmm_registers): New constant for number of higher
5664 XMM registers (xmm16-31 added by AVX512 on x86_64).
5665 (struct i387_xsave): Add space for AVX512 registers.
5666 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5667 Add code to handle AVX512 registers.
5668 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5669 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5670 prototypei from generated file.
5671 (tdesc_amd64_avx512_linux): Likewise.
5672 (init_registers_x32_avx512_linux): Likewise.
5673 (tdesc_x32_avx512_linux): Likewise.
5674 (init_registers_i386_avx512_linux): Likewise.
5675 (tdesc_i386_avx512_linux): Likewise.
5676 (x86_64_regmap): Add AVX512 registers.
5677 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5679 (initialize_low_arch): Add code to initialize AVX512 registers.
5681 2014-04-23 Pedro Alves <palves@redhat.com>
5683 * mem-break.c (find_gdb_breakpoint_at): Make static.
5684 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5686 2014-04-23 Pedro Alves <palves@redhat.com>
5688 * i386-low.c: Don't include break-common.h here.
5689 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5690 prototype to take target_hw_bp_type as argument instead of a Z
5692 * i386-low.h: Include break-common.h here.
5693 (Z_packet_to_hw_type): Declare.
5694 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5696 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5697 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5698 (x86_remove_point): Convert the packet number to a
5699 target_hw_bp_type before calling i386_low_remove_watchpoint.
5700 * win32-i386-low.c (i386_insert_point): Convert the packet number
5701 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5702 (i386_remove_point): Convert the packet number to a
5703 target_hw_bp_type before calling i386_low_remove_watchpoint.
5705 2014-04-23 Pedro Alves <palves@redhat.com>
5707 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5709 2014-04-10 Pedro Alves <palves@redhat.com>
5711 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5712 Check if the condition or command is NULL before checking if the
5713 breakpoint is known. On success, return true.
5714 * mem-break.h (add_breakpoint_condition): Document return.
5715 (add_breakpoint_commands): Add describing comment.
5716 * server.c (skip_to_semicolon): New function.
5717 (process_point_options): Use it.
5719 2014-04-09 Pedro Alves <palves@redhat.com>
5721 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5724 2014-02-27 Pedro Alves <palves@redhat.com>
5727 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5729 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5731 (last_thread_of_process_p): Take a PID argument instead of a
5733 (linux_wait_for_lwp): Delete.
5734 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5736 (linux_low_filter_event): New function, party factored out from
5737 linux_wait_for_event.
5738 (linux_wait_for_event): Rename to ...
5739 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5740 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5741 sigsuspend. Check for zombie leaders.
5742 (linux_wait_for_event): Reimplement as wrapper around
5743 linux_wait_for_event_filtered.
5744 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5745 a normal or signal exit is seen, it's the whole process exiting.
5746 (wait_for_sigstop): No longer a for_each_inferior callback.
5747 Rewrite on top of linux_wait_for_event_filtered.
5748 (stop_all_lwps): Call wait_for_sigstop directly.
5749 * server.c (resume, handle_target_event): Handle
5750 TARGET_WAITKIND_NO_RESUMED.
5752 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5754 * win32-low.c (psapi_get_dll_name,
5755 * win32_CreateToolhelp32Snapshot): Delete.
5756 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5757 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5759 (handle_load_dll): Add function description.
5760 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5762 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5764 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5766 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5767 base address when calling win32_add_one_solib.
5768 (handle_load_dll): Delete local variable load_addr.
5769 Remove 0x1000 offset applied to DLL base address when calling
5770 win32_add_one_solib.
5771 (handle_unload_dll): Add comment.
5773 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5775 * win32-low.c (win32_add_all_dlls): Renames
5776 win32_ensure_ntdll_loaded. Rewrite function documentation.
5777 Adjust implementation to always load all DLLs.
5778 Add 0x1000 offset to DLL base address when calling
5779 win32_add_one_solib.
5780 (child_initialization_done): New static global.
5781 (do_initial_child_stuff): Set child_initialization_done to
5782 zero during child initialization, and 1 after. Replace call
5783 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5785 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5786 (handle_unload_dll): Add function documentation.
5787 (get_child_debug_event): Ignore load and unload DLL events
5788 during child initialization.
5790 2014-02-20 Doug Evans <dje@google.com>
5792 Remove global all_lwps.
5793 * inferiors.h (ptid_of): Move here from linux-low.h.
5794 (pid_of, lwpid_of): Ditto.
5795 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5796 parameter is a struct thread_info * now.
5797 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5798 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5799 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5801 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5802 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5803 * linux-arm-low.c (update_registers_callback): Update, "entry"
5804 parameter is a struct thread_info * now.
5805 Fetch lwpid from current_inferior directly.
5806 (arm_insert_point): Pass &all_threads to find_inferior instead of
5808 (arm_remove_point): Ditto.
5809 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5810 (arm_prepare_to_resume): Fetch pid from thread.
5811 (arm_read_description): Fetch lwpid from current_inferior directly.
5812 * linux-low.c (all_lwps): Delete.
5813 (delete_lwp): Delete call to remove_inferior.
5814 (handle_extended_wait): Fetch lwpid from thread.
5815 (add_lwp): Don't set lwp->entry.id. Remove call to
5816 add_inferior_to_list.
5817 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5818 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5819 (kill_one_lwp_callback): Ditto.
5820 (linux_kill): Don't dereference NULL pointer.
5821 Fetch ptid,lwpid from thread.
5822 (get_detach_signal): Fetch ptid from thread.
5823 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5824 Simplify call to regcache_invalidate_thread.
5825 (delete_lwp_callback): Update, "entry" parameter is a
5826 struct thread_info * now. Fetch pid from thread.
5827 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5828 (status_pending_p_callback): Update, "entry" parameter is a
5829 struct thread_info * now. Fetch ptid from thread.
5830 (find_lwp_pid): Update, "entry" parameter is a
5831 struct thread_info * now.
5832 (linux_wait_for_lwp): Fetch pid from thread.
5833 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5834 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5835 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5836 (dequeue_one_deferred_signal): Ditto.
5837 (cancel_breakpoint): Fetch ptid from current_inferior.
5838 (linux_wait_for_event): Pass &all_threads to find_inferior,
5839 not &all_lwps. Fetch ptid, lwpid from thread.
5840 (count_events_callback): Update, "entry" parameter is a
5841 struct thread_info * now.
5842 (select_singlestep_lwp_callback): Ditto.
5843 (select_event_lwp_callback): Ditto.
5844 (cancel_breakpoints_callback): Ditto.
5845 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5847 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5848 (unsuspend_one_lwp): Update, "entry" parameter is a
5849 struct thread_info * now.
5850 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5852 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5853 Fetch lwpid from thread, not lwp.
5854 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5855 Pass &all_threads to find_inferior, not &all_lwps.
5856 (send_sigstop): Fetch lwpid from thread, not lwp.
5857 (send_sigstop_callback): Update, "entry" parameter is a
5858 struct thread_info * now.
5859 (suspend_and_send_sigstop_callback): Ditto.
5860 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5861 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5862 struct thread_info * now.
5863 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5865 (lwp_running): Update, "entry" parameter is a
5866 struct thread_info * now.
5867 (stop_all_lwps): Fetch ptid from thread.
5868 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5869 (linux_resume_one_lwp): Fetch lwpid from thread.
5870 (linux_set_resume_request): Update, "entry" parameter is a
5871 struct thread_info * now. Fetch pid, lwpid from thread.
5872 (resume_status_pending_p): Update, "entry" parameter is a
5873 struct thread_info * now.
5874 (need_step_over_p): Ditto. Fetch lwpid from thread.
5875 (start_step_over): Fetch lwpid from thread.
5876 (linux_resume_one_thread): Update, "entry" parameter is a
5877 struct thread_info * now. Fetch lwpid from thread.
5878 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5879 (proceed_one_lwp): Update, "entry" parameter is a
5880 struct thread_info * now. Fetch lwpid from thread.
5881 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5882 struct thread_info * now.
5883 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5884 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5885 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5887 (regsets_store_inferior_registers): Ditto.
5888 (fetch_register, store_register): Ditto.
5889 (linux_read_memory, linux_write_memory): Ditto.
5890 (linux_request_interrupt): Ditto.
5891 (linux_read_auxv): Ditto.
5892 (linux_xfer_siginfo): Ditto.
5893 (linux_qxfer_spu): Ditto.
5894 (linux_qxfer_libraries_svr4): Ditto.
5895 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5896 moved to inferiors.h.
5898 (get_thread_lwp): Update.
5899 (struct lwp_info): Delete member "entry". Simplify comment for
5902 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5903 current_inferior directly.
5904 (update_watch_registers_callback): Update, "entry" parameter is a
5905 struct thread_info * now. Fetch pid from thread.
5906 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5907 (mips_insert_point): Fetch lwpid from current_inferior.
5908 Pass &all_threads to find_inferior, not &all_lwps.
5909 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5910 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5912 (mips_stopped_data_address): Ditto.
5913 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5915 * linux-tile-low.c (tile_arch_setup): Ditto.
5916 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5917 (update_debug_registers_callback): Update, "entry" parameter is a
5918 struct thread_info * now. Fetch pid from thread.
5919 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5920 Pass &all_threads to find_inferior, not &all_lwps.
5921 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5922 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5923 Pass &all_threads to find_inferior, not &all_lwps.
5924 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5925 (i386_dr_low_get_status): Ditto.
5926 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5927 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5928 (x86_linux_read_description): Ditto.
5929 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5931 2014-02-20 Doug Evans <dje@google.com>
5933 * inferiors.c (get_first_inferior): Fix buglet.
5935 2014-02-19 Doug Evans <dje@google.com>
5937 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5938 * inferiors.c (add_thread): Change result type to struct thread_info *.
5939 All callers updated.
5940 (add_lwp): Call add_thread here instead of in callers.
5941 All callers updated.
5942 * linux-low.h (get_lwp_thread): Rewrite.
5943 (struct lwp_info): New member "thread".
5945 2014-02-19 Doug Evans <dje@google.com>
5947 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5948 All callers updated.
5950 2014-02-19 Doug Evans <dje@google.com>
5952 * inferiors.c (add_thread): Fix whitespace.
5954 2014-02-19 Doug Evans <dje@google.com>
5956 * dll.c (clear_dlls): Replace accessing list implemention details
5958 * gdbthread.h (get_first_thread): Declare.
5959 * inferiors.c (for_each_inferior_with_data): New function.
5960 (get_first_thread): New function.
5961 (find_thread_ptid): Simplify.
5962 (get_first_inferior): New function.
5963 (clear_list): Delete.
5964 (one_inferior_p): New function.
5965 (clear_inferior_list): New function.
5966 (clear_inferiors): Update.
5967 * inferiors.h (for_each_inferior_with_data): Declare.
5968 (clear_inferior_list): Declare.
5969 (one_inferior_p): Declare.
5970 (get_first_inferior): Declare.
5971 * linux-low.c (linux_wait_for_event): Replace accessing list
5972 implemention details with API function.
5973 * server.c (target_running): Ditto.
5974 (accumulate_file_name_length): New function.
5975 (emit_dll_description): New function.
5976 (handle_qxfer_libraries): Replace accessing list implemention
5977 details with API function.
5978 (handle_qxfer_threads_worker): New function.
5979 (handle_qxfer_threads_proper): Replace accessing list implemention
5980 details with API function.
5981 (handle_query): Ditto.
5982 (visit_actioned_threads_callback_ftype): New typedef.
5983 (visit_actioned_threads_data): New struct.
5984 (visit_actioned_threads): Rewrite to be find_inferior callback.
5985 (resume): Call find_inferior.
5986 (handle_status): Replace accessing list implemention
5987 details with API function.
5988 (process_serial_event): Replace accessing list implemention details
5990 * target.c (set_desired_inferior): Replace accessing list implemention
5991 details with API function.
5992 * tracepoint.c (same_process_p): New function.
5993 (gdb_agent_about_to_close): Replace accessing list implemention
5994 details with API function.
5995 * win32-low.c (child_delete_thread): Replace accessing list
5996 implemention details with API function.
5997 (match_dll_by_basename): New function.
5998 (dll_is_loaded_by_basename): New function.
5999 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6000 details call to dll_is_loaded_by_basename.
6002 2014-02-19 Doug Evans <dje@google.com>
6004 * dll.h (struct dll_info): Add comment.
6005 * gdbthread.h (struct thread_info): Add comment.
6006 (current_ptid): Simplify.
6007 * inferiors.c (add_process): Update.
6008 (remove_process): Update.
6009 * inferiors.h (struct process_info): Rename member "head" to "entry".
6010 * linux-low.c (delete_lwp): Update.
6012 (last_thread_of_process_p): Update.
6013 (kill_one_lwp_callback, linux_kill): Update.
6014 (status_pending_p_callback): Update.
6015 (wait_for_sigstop): Update. Simplify read of ptid.
6016 (start_step_over): Update.
6017 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6018 (get_lwp_thread): Update.
6019 (struct lwp_info): Rename member "head" to "entry".
6020 * regcache.h (inferior_list_entry): Delete.
6021 * server.c (kill_inferior_callback): Update.
6022 (detach_or_kill_inferior_callback): Update.
6023 (print_started_pid): Update.
6024 (print_attached_pid): Update.
6025 (process_serial_event): Simplify read of ptid.
6026 * thread-db.c (thread_db_create_event): Update.
6027 (thread_db_get_tls_address): Update.
6028 * win32-low.c (current_inferior_ptid): Simplify.
6030 2014-02-19 Tom Tromey <tromey@redhat.com>
6032 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6034 (target_supports_btrace): Update.
6036 2014-02-14 Yao Qi <yao@codesourcery.com>
6038 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6039 (rsp-low-ipa.o): New target.
6041 2014-02-12 Tom Tromey <tromey@redhat.com>
6043 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6044 convert_ascii_to_int.
6045 * regcache.c (registers_to_string): Likewise.
6046 * remote-utils.c (decode_M_packet): Likewise.
6047 * server.c (process_serial_event): Likewise.
6049 2014-02-12 Tom Tromey <tromey@redhat.com>
6051 * server.c (handle_query, handle_v_run): Use hex2bin, not
6053 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6055 2014-02-12 Tom Tromey <tromey@redhat.com>
6057 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6058 convert_int_to_ascii.
6059 * regcache.c (registers_to_string, collect_register_as_string):
6061 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6063 * server.c (process_serial_event): Likewise.
6064 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6065 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6067 2014-02-12 Tom Tromey <tromey@redhat.com>
6069 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6070 bin2hex, not hexify.
6071 * tracepoint.c (cmd_qtstatus): Likewise.
6073 2014-02-12 Tom Tromey <tromey@redhat.com>
6075 * remote-utils.c (monitor_output): Pass explicit length to
6078 2014-02-12 Tom Tromey <tromey@redhat.com>
6080 * tracepoint.c: Include rsp-low.h.
6081 * server.c: Include rsp-low.h.
6082 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6083 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6085 * remote-utils.c: Include rsp-low.h.
6086 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6087 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6088 (convert_int_to_ascii, convert_ascii_to_int): Move to
6090 * regcache.c: Include rsp-low.h.
6091 * ax.c: Include rsp-low.h.
6092 * Makefile.in (SFILES): Add common/rsp-low.c.
6093 (OBS): Add rsp-low.o.
6094 (rsp-low.o): New target.
6096 2014-02-12 Tom Tromey <tromey@redhat.com>
6098 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6099 Include print-utils.h.
6100 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6101 (plongest, thirty_two, phex_nz): Remove.
6102 * Makefile.in (SFILES): Add common/print-utils.c.
6103 (OBS): Add print-utils.o.
6104 (print-utils-ipa.o): New target.
6105 (print-utils.o): New target.
6106 (IPA_OBJS): Add print-utils-ipa.o.
6108 2014-02-06 Tom Tromey <tromey@redhat.com>
6110 * Makefile.in (SFILES): Fix indentation.
6112 2014-02-05 Doug Evans <dje@google.com>
6114 * linux-low.c (linux_wait_for_event): Improve comment.
6115 (linux_wait_1): Keep current_inferior in sync with event_child.
6117 2014-01-22 Doug Evans <dje@google.com>
6119 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6121 2014-01-22 Doug Evans <dje@google.com>
6123 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6124 * configure: Regenerate.
6125 * config.in: Regenerate.
6126 * Makefile.in (SFILES): Add debug.c.
6128 * debug.c: New file.
6129 * debug.h: New file.
6130 * linux-aarch64-low.c (*): Update all debugging printfs to use
6131 debug_printf instead of fprintf.
6132 * linux-arm-low.c (*): Ditto.
6133 * linux-cris-low.c (*): Ditto.
6134 * linux-crisv32-low.c (*): Ditto.
6135 * linux-m32r-low.c (*): Ditto.
6136 * linux-sparc-low.c (*): Ditto.
6137 * linux-x86.c (*): Ditto.
6138 * linux-low.c (*): Ditto.
6139 (linux_wait_1): Add calls to debug_enter, debug_exit.
6140 (linux_wait): Remove redundant debugging printf.
6141 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6142 (linux_resume, unstop_all_lwps): Ditto.
6143 * mem-break.c (*): Update all debugging printfs to use
6144 debug_printf instead of fprintf.
6145 * remote-utils.c (*): Ditto.
6146 * thread-db.c (*): Ditto.
6147 * server.c #include <ctype.h>, "gdb_vecs.h".
6148 (debug_threads): Moved to debug.c.
6149 (*): Update all debugging printfs to use debug_printf instead of
6151 (start_inferior): Replace call to fflush with call to debug_flush.
6152 (monitor_show_help): Mention set debug-format.
6153 (parse_debug_format_options): New function.
6154 (handle_monitor_command): Handle "monitor set debug-format".
6155 (gdbserver_usage): Mention --debug-format.
6156 (main): Parse --debug-format.
6157 * server.h (debug_threads): Declaration moved to debug.h.
6159 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6160 trace_debug_1 that uses debug_printf.
6161 (tracepoint_look_up_symbols): Update all debugging printfs to use
6162 debug_printf instead of fprintf.
6164 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6166 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6169 2014-01-17 Pedro Alves <palves@redhat.com>
6172 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6173 defined after including gdb_proc_service.h.
6175 2014-01-16 Doug Evans <dje@google.com>
6177 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6178 (match_dll): Use it.
6180 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6182 * target.h (target_ops) <read_btrace>: Change parameters and
6183 return type to allow error reporting.
6184 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6185 trace reading errors on.
6186 * linux-low.c (linux_low_read_btrace): Pass trace reading
6188 (linux_low_disable_btrace): New.
6190 2014-01-15 Doug Evans <dje@google.com>
6192 * inferiors.c (thread_id_to_gdb_id): Delete.
6193 * inferiors.h (thread_id_to_gdb_id): Delete.
6195 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6197 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6198 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6201 2014-01-08 Pedro Alves <palves@redhat.com>
6203 * server.c (handle_status): Don't discard previous queued stop
6204 replies or thread's pending status here.
6205 (main) <disconnection>: Do it here instead.
6207 2014-01-08 Pedro Alves <palves@redhat.com>
6209 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6210 * server.c (visit_actioned_threads, handle_pending_status): New
6212 (handle_v_cont): Factor out parts to ...
6213 (resume): ... this new function. If in all-stop, and a thread
6214 being resumed has a pending status, report it without actually
6216 (myresume): Adjust to use the new 'resume' function.
6217 (clear_pending_status_callback, set_pending_status_callback)
6218 (find_status_pending_thread_callback): New functions.
6219 (handle_status): Handle the case of multiple threads having
6220 interesting statuses to report. Report threads' real last signal
6221 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6222 with an interesting thread to report the status for, instead of
6223 always reporting the status of the first thread.
6225 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6227 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6228 * gdbreplay.c (gdbreplay_version): Likewise.
6230 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6232 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6233 iov.iov_len with the real length in use.
6235 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6237 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6238 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6239 for all targets that use win32-low.c.
6240 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6241 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6243 2013-12-13 Pedro Alves <palves@redhat.com>
6245 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6246 if equal to TARGET_WAITKIND_LOADED.
6247 * win32-low.c (cached_status): New static global.
6248 (win32_wait): Add declaration.
6249 (do_initial_child_stuff): Flush all initial pending debug events
6250 up to the initial breakpoint.
6251 (win32_wait): If CACHED_STATUS was set, return that instead
6252 of doing a real wait. Remove the code resuming the execution
6253 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6254 during the initial phase. Also remove the code changing
6255 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6256 TARGET_WAITKIND_STOPPED.
6258 2013-12-11 Yao Qi <yao@codesourcery.com>
6260 * notif.c (handle_notif_ack): Return 0 if no notification
6263 2013-11-20 Doug Evans <dje@google.com>
6265 * linux-low.c (linux_set_resume_request): Fix comment.
6267 2013-11-20 Doug Evans <dje@google.com>
6269 * linux-low.c (resume_status_pending_p): Tweak comment.
6271 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6273 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6274 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6275 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6276 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6277 (srv_amd64_regobj): Add amd64-mpx.o.
6278 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6279 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6280 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6281 * i387-fp.c (num_pl_bnd_register) Added constant.
6282 (num_pl_bnd_cfg_registers) Added constant.
6283 (struct i387_xsave) Added reserved area and MPX fields.
6284 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6285 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6287 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6288 (init_registers_amd64_mpx_linux): Declare new function.
6289 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6290 (x86_64_regmap): Add MPX registers.
6291 (x86_linux_read_description): Add MPX case.
6292 (initialize_low_arch): Initialize MPX targets.
6294 2013-11-18 Tom Tromey <tromey@redhat.com>
6296 * configure: Rebuild.
6297 * configure.ac: Don't check for stdlib.h.
6298 * gdbreplay.c: Unconditionally include stdlib.h.
6300 2013-11-18 Tom Tromey <tromey@redhat.com>
6302 * config.in: Rebuild.
6303 * configure: Rebuild.
6304 * configure.ac: Don't use AC_HEADER_DIRENT.
6306 2013-11-18 Tom Tromey <tromey@redhat.com>
6308 * server.h: Don't check HAVE_STRING_H.
6309 * gdbreplay.c: Don't check HAVE_STRING_H.
6310 * configure: Rebuild.
6312 2013-11-18 Tom Tromey <tromey@redhat.com>
6314 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6317 2013-11-08 Tom Tromey <tromey@redhat.com>
6319 * configure, config.in: Rebuild.
6320 * configure.ac: Remove unused configury.
6322 2013-11-08 Tom Tromey <tromey@redhat.com>
6324 * acinclude.m4: Include common.m4, codeset.m4.
6325 * configure, config.in: Rebuild.
6326 * configure.ac: Use GDB_AC_COMMON.
6328 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6330 * linux-s390-low.c (HWCAP_S390_TE): New define.
6331 (s390_arch_setup): Consider the TE field in the HWCAP for
6332 determining 'have_regset_tdb'.
6334 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6337 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6340 2013-10-02 Pedro Alves <palves@redhat.com>
6342 * server.c (process_serial_event): Don't output "GDBserver
6343 exiting" if GDB is connected through stdio.
6344 * target.c (mywait): Likewise, be silent if GDB is connected
6347 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6349 * lynx-low.c (lynx_add_threads_after_attach): New function.
6350 (lynx_attach): Remove call to add_thread. Add call to
6351 lynx_add_threads_after_attach instead.
6353 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6355 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6356 * config.in, configure: Regenerated.
6358 2013-09-18 Yao Qi <yao@codesourcery.com>
6361 * server.c (start_inferior): Clear 'resume_info'.
6363 2013-09-16 Jiong Wang <jiwang@tilera.com>
6365 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6368 2013-09-16 Jiong Wang <jiwang@tilera.com>
6370 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6371 linux-tile-low.o to srv_tgtobj.
6373 2013-09-16 Will Newton <will.newton@linaro.org>
6375 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6378 2013-09-06 Pedro Alves <palves@redhat.com>
6380 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6381 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6382 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6383 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6384 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6385 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6387 2013-09-06 Pedro Alves <palves@redhat.com>
6389 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6390 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6392 2013-09-06 Pedro Alves <palves@redhat.com>
6394 * linux-amd64-ipa.c: Include tracepoint.h.
6395 * linux-i386-ipa.c: Include tracepoint.h.
6397 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6399 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6400 (ps_get_thread_area): New function.
6402 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6404 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6405 (initialize_low_arch): Call init_registers_crisv32 rather than
6406 init_register_crisv32.
6408 2013-09-05 Pedro Alves <palves@redhat.com>
6410 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6412 * hostio.h: ... this new file.
6413 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6414 win32-low.c: Include hostio.h.
6416 2013-09-05 Pedro Alves <palves@redhat.com>
6418 * server.h (gdb_client_data, handler_func, callback_handler_func)
6419 (delete_file_handler, add_file_handler, append_callback_event)
6420 (delete_callback_event, start_event_loop, initialize_event_loop):
6421 Move to event-loop.h and include it.
6422 * event-loop.h: New file.
6424 2013-09-05 Pedro Alves <palves@redhat.com>
6426 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6427 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6428 (loaded_dll, unloaded_dll): Move to ...
6429 * dll.h: ... this new file.
6430 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6432 2013-09-05 Pedro Alves <palves@redhat.com>
6434 * server.h (current_process, get_thread_process, all_processes)
6435 (add_inferior_to_list, for_each_inferior, current_inferior)
6436 (remove_inferior, add_process, remove_process, find_process_pid)
6437 (have_started_inferiors_p, have_attached_inferiors_p)
6438 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6439 (clear_inferiors, find_inferior, find_inferior_id)
6440 (inferior_target_data, set_inferior_target_data)
6441 (inferior_regcache_data, set_inferior_regcache_data): Move to
6442 inferiors.h, and include it.
6443 * inferiors.h: New file.
6445 2013-09-05 Pedro Alves <palves@redhat.com>
6447 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6451 2013-09-05 Pedro Alves <palves@redhat.com>
6453 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6455 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6456 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6457 (handle_tracepoint_general_set, handle_tracepoint_query)
6458 (tracepoint_finished_step, tracepoint_was_hit)
6459 (release_while_stepping_state_list, current_traceframe)
6460 (in_readonly_region, traceframe_read_mem)
6461 (fetch_traceframe_registers, traceframe_read_sdata)
6462 (traceframe_read_info, struct fast_tpoint_collect_status)
6463 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6464 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6465 (supply_fast_tracepoint_registers)
6466 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6467 (ipa_tdesc, claim_trampoline_space)
6468 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6469 (agent_mem_read, agent_get_trace_state_variable_value)
6470 (agent_set_trace_state_variable_value, agent_tsv_read)
6471 (agent_mem_read_string, get_raw_reg_func_addr)
6472 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6473 * tracepoint.h: ... this new file.
6475 2013-09-05 Pedro Alves <palves@redhat.com>
6477 * server.h (perror_with_name, error, fatal, warning, paddress)
6478 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6480 * utils.h: New file.
6482 2013-09-05 Pedro Alves <palves@redhat.com>
6484 * server.h (remote_debug, noack_mode, transport_is_reliable)
6485 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6486 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6487 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6488 (write_enn, initialize_async_io, enable_async_io)
6489 (disable_async_io, check_remote_input_interrupt_request)
6490 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6491 (dead_thread_notify, prepare_resume_reply)
6492 (decode_address_to_semicolon, decode_address, decode_m_packet)
6493 (decode_M_packet, decode_X_packet, decode_xfer_write)
6494 (decode_search_memory_packet, unhexify, hexify)
6495 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6496 (look_up_one_symbol, relocate_instruction)
6497 (monitor_output): Move to remote-utils.h, and include it.
6498 * remote-utils.h: New file.
6500 2013-09-05 Pedro Alves <palves@redhat.com>
6502 * server.h (_): Delete.
6504 2013-09-02 Pedro Alves <palves@redhat.com>
6506 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6507 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6509 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6511 2013-09-02 Pierre Muller <muller@sourceware.org>
6513 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6514 or WriteProcessMemory complete successfully and handle
6515 ERROR_PARTIAL_COPY error.
6517 2013-09-02 Pedro Alves <palves@redhat.com>
6519 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6520 error instead of EIO.
6522 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6525 * linux-low.c: Include filestuff.h.
6526 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6527 * lynx-low.c: Include filestuff.h.
6528 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6529 * server.c: Include filestuff.h.
6530 (main): Call notice_open_fds.
6531 * spu-low.c: Include filestuff.h.
6532 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6534 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6536 * Makefile.in: Explain why ../target and ../nat are not
6537 listed as include file search paths.
6538 (linux-waitpid.o): New object file rule.
6539 * configure.srv (srv_native_linux_obj): New variable.
6540 Replace all occurrences of linux native object files with
6541 $srv_native_linux_obj.
6542 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6543 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6544 (linux_enable_event_reporting): Remove declaration.
6545 (my_waitpid): Moved to common/linux-waitpid.c.
6546 (linux_wait_for_event): Pass ptid when calling
6547 linux_enable_event_reporting.
6548 (linux_supports_tracefork_flag): Remove.
6549 (linux_enable_event_reporting): Likewise.
6550 (linux_tracefork_grandchild): Remove.
6551 (STACK_SIZE): Moved to common/linux-ptrace.c.
6552 (linux_tracefork_child): Remove.
6553 (linux_test_for_tracefork): Remove.
6554 (linux_look_up_symbols): Call linux_supports_traceclone.
6555 (initialize_low): Remove call to linux_test_for_tracefork.
6556 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6557 common/linux-ptrace.h.
6558 (PTRACE_TYPE_ARG4): Likewise.
6559 Include linux-ptrace.h.
6561 2013-08-21 Pedro Alves <palves@redhat.com>
6563 * config.in: Renegerate.
6565 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6567 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6568 (SFILES): Remove $(srcdir)/common/target-common.c and
6569 add $(srcdir)/target/waitstatus.c.
6570 (OBS): Remove target-common.o and add waitstatus.o.
6571 (server_h): Remove $(srcdir)/../common/target-common.h and
6572 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6573 and $(srcdir)/../target/waitstatus.h.
6574 (target-common.o): Remove.
6575 (waitstatus.o): New target object file.
6576 * target.h: Do not include target-common.h and
6577 include target/resume.h, target/wait.h and
6578 target/waitstatus.h.
6580 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6582 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6583 to PTRACE_TYPE_ARG3.
6584 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6585 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6587 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6588 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6590 2013-07-27 Jie Zhang <jie@codesourcery.com>
6591 Daniel Jacobowitz <dan@codesourcery.com>
6592 Yao Qi <yao@codesourcery.com>
6594 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6595 (mips-linux-watch.o): New rule.
6596 (mips_linux_watch_h): New variable.
6597 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6599 * linux-mips-low.c: Include mips-linux-watch.h.
6600 (struct arch_process_info, struct arch_lwp_info): New.
6601 (update_watch_registers_callback): New function.
6602 (mips_linux_new_process, mips_linux_new_thread) New functions.
6603 (mips_linux_prepare_to_resume, mips_insert_point): New
6605 (mips_remove_point, mips_stopped_by_watchpoint): New
6607 (rsp_bp_type_to_target_hw_bp_type): New function.
6608 (mips_stopped_data_address): New function.
6609 (the_low_target): Add watchpoint support functions.
6611 2013-07-27 Yao Qi <yao@codesourcery.com>
6613 * i386-low.c: Include break-common.h.
6614 (enum target_hw_bp_type): Remove.
6616 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6618 * Makefile.in (SFILES): /common/target-common.c.
6619 (OBS): Add target-common.o.
6620 (server_h): Add $(srcdir)/../common/target-common.h.
6621 (target-common.o): New target.
6622 * server.c (queue_stop_reply_callback): Free
6623 status string after use.
6624 * target.c (target_waitstatus_to_string): Remove.
6625 * target.h: Include target-common.h.
6626 (resume_kind): Likewise.
6627 (target_waitkind): Likewise.
6628 (target_waitstatus): Likewise.
6629 (TARGET_WNOHANG): Likewise.
6631 2013-07-04 Yao Qi <yao@codesourcery.com>
6633 * Makefile.in (host_alias): Use @host_noncanonical@.
6634 (target_alias): Use @target_noncanonical@.
6635 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6636 ACX_NONCANONICAL_HOST.
6637 * configure: Regenerated.
6640 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6642 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6643 * configure: Rebuild.
6644 * Makefile.in (version_host, version_target): Get from configure.
6645 (version.c): Use $(version_host) and $(version_target).
6647 2013-07-03 Pedro Alves <palves@redhat.com>
6649 * Makefile.in (config.status): Depend on development.sh.
6650 * acinclude.m4: Include libmcheck.m4.
6651 * configure: Regenerate.
6653 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6655 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6656 attribute inside the parentheses.
6657 (winapi_DebugSetProcessKillOnExit): Ditto.
6658 (winapi_DebugBreakProcess): Ditto.
6659 (winapi_GenerateConsoleCtrlEvent): Ditto.
6661 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6663 * notif.h (notif_event): Add a dummy member to avoid compiler
6666 2013-07-01 Pedro Alves <palves@redhat.com>
6668 * hostio.c (HOSTIO_PATH_MAX): Define.
6669 (require_filename, handle_open, handle_unlink, handle_readlink):
6672 2013-07-01 Pedro Alves <palves@redhat.com>
6674 * server.h: Include "pathmax.h".
6675 * linux-low.c: Don't include sys/param.h.
6676 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6678 * win32-low.c: Don't include sys/param.h.
6679 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6681 2013-07-01 Pedro Alves <palves@redhat.com>
6683 * event-loop.c: Don't check HAVE_UNISTD_H before including
6685 * gdbreplay.c: Likewise.
6686 * remote-utils.c: Likewise.
6687 * server.c: Likewise.
6688 * configure.ac: Don't check for unistd.h.
6689 * configure: Regenerate.
6691 2013-06-28 Tom Tromey <tromey@redhat.com>
6693 * Makefile.in (version.c): Use version.in, not
6696 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6698 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6699 * configure: Rebuild.
6700 * Makefile.in (version_host, version_target): Get from configure.
6701 (version.c): Use $(version_host) and $(version_target).
6703 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6705 Fix trace-status to output user name without trailing colon.
6706 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6708 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6710 Fix trace-status to output proper start-time and stop-time.
6711 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6712 output start time and stop time in hex as gdb expects.
6714 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6716 * tracepoint.c (build_traceframe_info_xml): Output trace state
6717 variables present in the trace buffer.
6719 2013-06-24 Tom Tromey <tromey@redhat.com>
6721 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6723 (version.o): Remove.
6724 * gdbreplay.c: Include version.h.
6725 (version, host_name): Don't declare.
6726 * server.h: Include version.h.
6727 (version, host_name): Don't declare.
6729 2013-06-12 Pedro Alves <palves@redhat.com>
6731 * linux-x86-low.c (linux_is_elf64): Delete global.
6732 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6733 with local linux_pid_exe_is_elf_64_file use.
6735 2013-06-11 Pedro Alves <palves@redhat.com>
6737 * linux-low.c (regset_disabled, disable_regset): New functions.
6738 (regsets_fetch_inferior_registers)
6739 (regsets_store_inferior_registers): Use them.
6740 (initialize_regsets_info); Don't allocate the disabled_regsets
6742 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6745 2013-06-11 Pedro Alves <palves@redhat.com>
6747 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6750 2013-06-11 Pedro Alves <palves@redhat.com>
6752 * linux-x86-low.c (initialize_low_arch): Call
6753 init_registers_x32_avx_linux.
6755 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6757 Fix compatibility with Android Bionic.
6758 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6761 2013-06-07 Pedro Alves <palves@redhat.com>
6764 * Makefile.in (OBS): Add tdesc.o.
6765 (IPA_OBJS): Add tdesc-ipa.o.
6766 (tdesc-ipa.o): New rule.
6767 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6769 * linux-low.c (new_inferior): Delete.
6770 (disabled_regsets, num_regsets): Delete.
6771 (linux_add_process): Adjust to set the new per-process
6773 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6774 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6775 was a stop. When calling arch_setup, switch the current inferior
6776 to the thread that got an event.
6777 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6778 (regsets_fetch_inferior_registers)
6779 (regsets_store_inferior_registers): New regsets_info parameter.
6781 (linux_register_in_regsets): New regs_info parameter. Adjust to
6783 (register_addr, fetch_register, store_register): New usrregs_info
6784 parameter. Adjust to use it.
6785 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6786 parameter regs_info. Adjust to use it.
6787 (linux_fetch_registers): Get the current inferior's regs_info, and
6789 (linux_store_registers): Ditto.
6790 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6791 (initialize_low): Don't initialize the target_regsets here. Call
6792 initialize_low_arch.
6793 * linux-low.h (target_regsets): Delete declaration.
6794 (struct regsets_info): New.
6795 (struct usrregs_info): New.
6796 (struct regs_info): New.
6797 (struct process_info_private) <new_inferior>: New field.
6798 (struct linux_target_ops): Delete the num_regs, regmap, and
6799 regset_bitmap fields. New field regs_info.
6800 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6801 * i387-fp.c (num_xmm_registers): Delete.
6802 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6803 calls to new interface.
6804 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6805 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6806 Infer the number of xmm registers from the regcache's target
6808 * i387-fp.h (num_xmm_registers): Delete.
6809 * inferiors.c (add_thread): Don't install the thread's regcache
6811 * proc-service.c (gregset_info): Fetch the current inferior's
6812 regs_info. Adjust to use it.
6813 * regcache.c: Include tdesc.h.
6814 (register_bytes, reg_defs, num_registers)
6815 (gdbserver_expedite_regs): Delete.
6816 (get_thread_regcache): If the thread doesn't have a regcache yet,
6817 create one, instead of aborting gdbserver.
6818 (regcache_invalidate_one): Rename to ...
6819 (regcache_invalidate_thread): ... this.
6820 (regcache_invalidate_one): New.
6821 (regcache_invalidate): Only invalidate registers of the current
6823 (init_register_cache): Add target_desc parameter, and use it.
6824 (new_register_cache): Ditto. Assert the target description has a
6825 non zero registers_size.
6826 (regcache_cpy): Add assertions. Adjust.
6827 (realloc_register_cache, set_register_cache): Delete.
6828 (registers_to_string, registers_from_string): Adjust.
6829 (find_register_by_name, find_regno, find_register_by_number)
6830 (register_cache_size): Add target_desc parameter, and use it.
6831 (free_register_cache_thread, free_register_cache_thread_one)
6832 (regcache_release, register_cache_size): New.
6833 (register_size): Add target_desc parameter, and use it.
6834 (register_data, supply_register, supply_register_zeroed)
6835 (supply_regblock, supply_register_by_name, collect_register)
6836 (collect_register_as_string, collect_register_by_name): Adjust.
6837 * regcache.h (struct target_desc): Forward declare.
6838 (struct regcache) <tdesc>: New field.
6839 (init_register_cache, new_register_cache): Add target_desc
6841 (regcache_invalidate_thread): Declare.
6842 (regcache_invalidate_one): Delete declaration.
6843 (regcache_release): Declare.
6844 (find_register_by_number, register_cache_size, register_size)
6845 (find_regno): Add target_desc parameter.
6846 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6848 * remote-utils.c: Include tdesc.h.
6849 (outreg, prepare_resume_reply): Adjust.
6850 * server.c: Include tdesc.h.
6851 (gdbserver_xmltarget): Delete declaration.
6852 (get_features_xml, process_serial_event): Adjust.
6853 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6855 (struct process_info) <tdesc>: New field.
6856 (ipa_tdesc): Declare.
6857 * tdesc.c: New file.
6858 * tdesc.h: New file.
6859 * tracepoint.c: Include tdesc.h.
6860 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6861 (get_context_regcache): Adjust to pass ipa_tdesc down.
6862 (do_action_at_tracepoint): Adjust to get the register cache size
6863 from the context regcache's description.
6864 (traceframe_walk_blocks): Adjust to get the register cache size
6865 from the current trace frame's description.
6866 (traceframe_get_pc): Adjust to get current trace frame's
6867 description and pass it down.
6868 (gdb_collect): Adjust to get the register cache size from the
6870 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6871 (gdbserver_xmltarget): Delete.
6872 (initialize_low_tracepoint): Set the ipa's target description.
6873 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6874 (initialize_low_tracepoint): Set the ipa's target description.
6875 * linux-x86-low.c: Include tdesc.h.
6876 [__x86_64__] (is_64bit_tdesc): New.
6877 (ps_get_thread_area, x86_get_thread_area): Use it.
6878 (i386_cannot_store_register): Rename to ...
6879 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6880 (i386_cannot_fetch_register): Rename to ...
6881 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6882 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6884 (target_regsets): Rename to ...
6885 (x86_regsets): ... this.
6886 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6888 (x86_siginfo_fixup): Use is_64bit_tdesc.
6889 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6890 (tdesc_x32_avx_linux, tdesc_x32_linux)
6891 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6893 (x86_linux_update_xmltarget): Delete.
6894 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6895 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6896 (AMD64_LINUX_USER64_CS): New.
6897 (x86_linux_read_description): New, based on
6898 x86_linux_update_xmltarget.
6899 (same_process_callback): New.
6900 (x86_arch_setup_process_callback): New.
6901 (x86_linux_update_xmltarget): New.
6902 (x86_regsets_info): New.
6903 (amd64_linux_regs_info): New.
6904 (i386_linux_usrregs_info): New.
6905 (i386_linux_regs_info): New.
6906 (x86_linux_regs_info): New.
6907 (x86_arch_setup): Reimplement.
6908 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6909 (x86_emit_ops): Ditto.
6910 (the_low_target): Adjust. Install x86_linux_regs_info,
6911 x86_cannot_fetch_register, and x86_cannot_store_register.
6912 (initialize_low_arch): New.
6913 * linux-ia64-low.c (tdesc_ia64): Declare.
6914 (ia64_fetch_register): Adjust.
6915 (ia64_usrregs_info, regs_info): New globals.
6916 (ia64_regs_info): New function.
6917 (the_low_target): Adjust.
6918 (initialize_low_arch): New function.
6919 * linux-sparc-low.c (tdesc_sparc64): Declare.
6920 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6922 (sparc_arch_setup): New function.
6923 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6924 (the_low_target): Adjust.
6925 (initialize_low_arch): New function.
6926 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6927 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6928 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6929 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6930 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6931 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6932 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6933 (tdesc_powerpc_isa205_vsx64l): Declare.
6934 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6935 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6936 (ppc_set_pc, ppc_get_hwcap): Adjust.
6937 (ppc_usrregs_info): Forward declare.
6938 (!__powerpc64__) ppc_regmap_adjusted: New global.
6939 (ppc_arch_setup): Adjust to the current process'es target
6941 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6942 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6943 (ppc_store_evrregset): Adjust.
6944 (target_regsets): Rename to ...
6945 (ppc_regsets): ... this, and make static.
6946 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6947 (ppc_regs_info): New function.
6948 (the_low_target): Adjust.
6949 (initialize_low_arch): New function.
6950 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6951 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6952 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6953 (tdesc_s390x_linux64v2): Declare.
6954 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6955 (s390_fill_gregset, s390_store_last_break): Adjust.
6956 (target_regsets): Rename to ...
6957 (s390_regsets): ... this, and make static.
6958 (s390_get_pc, s390_set_pc): Adjust.
6959 (s390_get_hwcap): New target_desc parameter, and use it.
6960 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6961 (s390_arch_setup): Adjust to set the current process'es target
6962 description. Don't adjust the regmap.
6963 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6964 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6965 (regs_info_3264): New globals.
6966 (s390_regs_info): New function.
6967 (the_low_target): Adjust.
6968 (initialize_low_arch): New function.
6969 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6970 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6971 [__mips64] (init_registers_mips_linux)
6972 (init_registers_mips_dsp_linux): Delete defines.
6973 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6974 (have_dsp): New global.
6975 (mips_read_description): New, based on mips_arch_setup.
6976 (mips_arch_setup): Reimplement.
6977 (get_usrregs_info): New function.
6978 (mips_cannot_fetch_register, mips_cannot_store_register)
6979 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6980 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6981 (target_regsets): Rename to ...
6982 (mips_regsets): ... this, and make static.
6983 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6984 (dsp_regs_info, regs_info): New globals.
6985 (mips_regs_info): New function.
6986 (the_low_target): Adjust.
6987 (initialize_low_arch): New function.
6988 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6989 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6991 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6992 (arm_read_description): New, with bits factored from
6994 (arm_arch_setup): Reimplement.
6995 (target_regsets): Rename to ...
6996 (arm_regsets): ... this, and make static.
6997 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6998 (arm_regs_info): New function.
6999 (the_low_target): Adjust.
7000 (initialize_low_arch): New function.
7001 * linux-m68k-low.c (tdesc_m68k): Declare.
7002 (target_regsets): Rename to ...
7003 (m68k_regsets): ... this, and make static.
7004 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7005 (m68k_regs_info): New function.
7006 (m68k_arch_setup): New function.
7007 (the_low_target): Adjust.
7008 (initialize_low_arch): New function.
7009 * linux-sh-low.c (tdesc_sharch): Declare.
7010 (target_regsets): Rename to ...
7011 (sh_regsets): ... this, and make static.
7012 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7013 (sh_regs_info, sh_arch_setup): New functions.
7014 (the_low_target): Adjust.
7015 (initialize_low_arch): New function.
7016 * linux-bfin-low.c (tdesc_bfin): Declare.
7017 (bfin_arch_setup): New function.
7018 (bfin_usrregs_info, regs_info): New globals.
7019 (bfin_regs_info): New function.
7020 (the_low_target): Adjust.
7021 (initialize_low_arch): New function.
7022 * linux-cris-low.c (tdesc_cris): Declare.
7023 (cris_arch_setup): New function.
7024 (cris_usrregs_info, regs_info): New globals.
7025 (cris_regs_info): New function.
7026 (the_low_target): Adjust.
7027 (initialize_low_arch): New function.
7028 * linux-cris-low.c (tdesc_crisv32): Declare.
7029 (cris_arch_setup): New function.
7030 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7031 (cris_regs_info): New function.
7032 (the_low_target): Adjust.
7033 (initialize_low_arch): New function.
7034 * linux-m32r-low.c (tdesc_m32r): Declare.
7035 (m32r_arch_setup): New function.
7036 (m32r_usrregs_info, regs_info): New globals.
7037 (m32r_regs_info): Adjust.
7038 (initialize_low_arch): New function.
7039 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7040 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7041 (tic6x_usrregs_info): Forward declare.
7042 (tic6x_read_description): New function, based on ...
7043 (tic6x_arch_setup): ... this. Reimplement.
7044 (target_regsets): Rename to ...
7045 (tic6x_regsets): ... this, and make static.
7046 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7047 (tic6x_regs_info): New function.
7048 (the_low_target): Adjust.
7049 (initialize_low_arch): New function.
7050 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7051 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7052 (target_regsets): Rename to ...
7053 (xtensa_regsets): ... this, and make static.
7054 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7056 (xtensa_arch_setup, xtensa_regs_info): New functions.
7057 (the_low_target): Adjust.
7058 (initialize_low_arch): New function.
7059 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7060 (nios2_arch_setup): Set the current process'es tdesc.
7061 (target_regsets): Rename to ...
7062 (nios2_regsets): ... this.
7063 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7064 (nios2_regs_info): New function.
7065 (the_low_target): Adjust.
7066 (initialize_low_arch): New function.
7067 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7068 (aarch64_arch_setup): Set the current process'es tdesc.
7069 (target_regsets): Rename to ...
7070 (aarch64_regsets): ... this.
7071 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7072 (aarch64_regs_info): New function.
7073 (the_low_target): Adjust.
7074 (initialize_low_arch): New function.
7075 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7077 (target_regsets): Rename to ...
7078 (tile_regsets): ... this.
7079 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7080 (tile_regs_info): New function.
7081 (tile_arch_setup): Set the current process'es tdesc.
7082 (the_low_target): Adjust.
7083 (initialize_low_arch): New function.
7084 * spu-low.c (tdesc_spu): Declare.
7085 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7086 * win32-arm-low.c (tdesc_arm): Declare.
7087 (arm_arch_setup): New function.
7088 (the_low_target): Install arm_arch_setup instead of
7090 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7091 (init_windows_x86): Rename to ...
7092 (i386_arch_setup): ... this. Set `win32_tdesc'.
7093 (the_low_target): Adjust.
7094 * win32-low.c (win32_tdesc): New global.
7095 (child_add_thread): Don't create the thread cache here.
7096 (do_initial_child_stuff): Set the new process'es tdesc.
7097 * win32-low.h (struct target_desc): Forward declare.
7098 (win32_tdesc): Declare.
7099 * lynx-i386-low.c (tdesc_i386): Declare global.
7100 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7101 * lynx-low.c (lynx_tdesc): New global.
7102 (lynx_add_process): Set the new process'es tdesc.
7103 * lynx-low.h (struct target_desc): Forward declare.
7104 (lynx_tdesc): Declare global.
7105 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7106 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7107 * nto-low.c (nto_tdesc): New global.
7108 (do_attach): Set the new process'es tdesc.
7109 * nto-low.h (struct target_desc): Forward declare.
7110 (nto_tdesc): Declare.
7111 * nto-x86-low.c (tdesc_i386): Declare.
7112 (nto_x86_arch_setup): Set `nto_tdesc'.
7114 2013-06-04 Gary Benson <gbenson@redhat.com>
7116 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7117 to qSupported response when appropriate.
7118 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7119 with nonzero-length annex.
7120 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7121 arguments supplied in annex.
7123 2013-05-31 Doug Evans <dje@google.com>
7126 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7127 64 bits in 64-cross-32 environment.
7129 2013-05-28 Pedro Alves <palves@redhat.com>
7131 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7132 (aarch64-without-fpu.c): Delete rule.
7133 * configure.srv (aarch64*-*-linux*): Remove references to
7134 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7135 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7138 2013-05-24 Pedro Alves <palves@redhat.com>
7140 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7141 instead of strchr/decode_address. Error if the range isn't split
7142 with a ','. Don't assume there's be a ':' in the action.
7144 2013-05-23 Yao Qi <yao@codesourcery.com>
7145 Pedro Alves <palves@redhat.com>
7147 * linux-low.c (lwp_in_step_range): New function.
7148 (linux_wait_1): If the thread was range stepping and stopped
7149 outside the stepping range, report the stop to GDB. Otherwise,
7150 continue stepping. Add range stepping debug output.
7151 (linux_set_resume_request): Copy the step range from the resume
7153 (linux_supports_range_stepping): New.
7154 (linux_target_ops) <supports_range_stepping>: Set to
7155 linux_supports_range_stepping.
7156 * linux-low.h (struct linux_target_ops)
7157 <supports_range_stepping>: New field.
7158 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7159 * linux-x86-low.c (x86_supports_range_stepping): New.
7160 (the_low_target) <supports_range_stepping>: Set to
7161 x86_supports_range_stepping.
7162 * server.c (handle_v_cont): Handle 'r' action.
7163 (handle_v_requests): Append ";r" if the target supports range
7165 * target.h (struct thread_resume) <step_range_start,
7166 step_range_end>: New fields.
7167 (struct target_ops) <supports_range_stepping>:
7169 (target_supports_range_stepping): New macro.
7171 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7173 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7174 confusion in comment.
7176 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7178 * lynx-low.c (struct process_info_private): New type.
7179 (lynx_add_process): New function.
7180 (lynx_create_inferior, lynx_attach): Replace calls to
7181 add_process by calls to lynx_add_process.
7182 (lynx_resume): If PTID is null, then try using
7183 current_process()->private->last_wait_event_ptid.
7185 (lynx_clear_inferiors): Delete. The contents of that function
7186 has been inlined in lynx_mourn;
7187 (lynx_wait_1): Save the ptid in the process's private data.
7188 (lynx_mourn): Free the process' private data. Replace call
7189 to lynx_clear_inferiors by call to clear_inferiors.
7191 2013-05-17 Yao Qi <yao@codesourcery.com>
7193 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7196 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7198 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7199 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7200 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7201 PT_TEXT_END_ADDR guards. Update comments.
7202 (linux_target_op) <read_offsets>: Conditionally define to
7203 linux_read_offsets if the target is UCLIBC and if it defines
7204 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7206 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7207 Andrew Jenner <andrew@codesourcery.com>
7209 * Makefile.in (SFILES): Add linux-nios2-low.c.
7210 (clean): Add action to delete nios2-linux.c.
7211 (nios2-linux.c): New rule.
7212 * configure.srv: Add nios2*-*-linux*.
7213 * linux-nios2-low.c: New.
7215 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7217 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7219 2013-04-25 Hui Zhu <hui@codesourcery.com>
7222 * ax.c (ax_printf): Add fflush.
7224 2013-04-22 Tom Tromey <tromey@redhat.com>
7226 * Makefile.in (SFILES): Add filestuff.c.
7227 (OBS): Add filestuff.o.
7228 (filestuff.o): New target.
7229 * config.in, configure: Rebuild.
7230 * configure.ac: Check for fdwalk, pipe2.
7232 2013-04-17 Pedro Alves <palves@redhat.com>
7234 * configure.ac (USE_THREAD_DB): Delete variable.
7235 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7236 Don't AC_SUBST USE_THREAD_DB.
7237 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7238 * config.in, configure: Regenerate.
7240 2013-04-16 Pedro Alves <palves@redhat.com>
7242 * linux-low.h (struct lwp_info) <thread_known>: Move under
7243 the USE_THREAD_DB #ifdef.
7245 2013-04-16 Pedro Alves <palves@redhat.com>
7247 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7248 (linux-low.o): Delete rule.
7249 * linux-low.h: Always include "gdb_thread_db.h" instead of
7250 conditionally including thread_db.h.
7251 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7254 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7256 * Makefile.in (install-only): Fix make install regression.
7258 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7260 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7261 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7263 * gdbserver.1: Remove.
7265 2013-03-22 Pedro Alves <palves@redhat.com>
7267 * linux-low.c (handle_extended_wait): Don't call
7268 linux_enable_event_reporting.
7270 2013-03-15 Tony Theodore <tonyt@logyst.com>
7273 * Makefile.in (SHELL): Use @SHELL@.
7275 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7277 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7280 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7282 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7283 Remove extraneous NULL element.
7285 2013-03-13 Yao Qi <yao@codesourcery.com>
7287 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7288 'V' block in trace frame.
7290 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7292 * target.h (struct target_ops): Add btrace ops.
7293 (target_supports_btrace): New macro.
7294 (target_enable_btrace): New macro.
7295 (target_disable_btrace): New macro.
7296 (target_read_btrace): New macro.
7297 * gdbthread.h (struct thread_info): Add btrace field.
7298 * server.c: Include btrace-common.h.
7299 (handle_btrace_general_set): New function.
7300 (handle_btrace_enable): New function.
7301 (handle_btrace_disable): New function.
7302 (handle_general_set): Call handle_btrace_general_set.
7303 (handle_qxfer_btrace): New function.
7304 (struct qxfer qxfer_packets[]): Add btrace entry.
7305 * inferiors.c (remove_thread): Disable btrace.
7306 * linux-low: Include linux-btrace.h.
7307 (linux_low_enable_btrace): New function.
7308 (linux_low_read_btrace): New function.
7309 (linux_target_ops): Add btrace ops.
7310 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7311 Add srv_linux_btrace=yes.
7312 (x86_64-*-linux*): Add linux-btrace.o.
7313 Add srv_linux_btrace=yes.
7314 * configure.ac: Define HAVE_LINUX_BTRACE.
7315 * config.in: Regenerated.
7316 * configure: Regenerated.
7318 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7320 * server.c (handle_qxfer): Preserve error message if -3 is
7322 (qxfer): Document the -3 return value.
7324 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7326 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7327 (linux_btrace_h): New variable.
7328 (linux-btrace.o): New rule.
7330 2013-03-08 Stan Shebs <stan@codesourcery.com>
7331 Hafiz Abid Qadeer <abidh@codesourcery.com>
7333 * tracepoint.c (trace_buffer_size): New global.
7334 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7335 (init_trace_buffer): Change to one-argument function. Allocate
7336 trace buffer memory.
7337 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7338 handle QTBuffer:size packet.
7339 (cmd_bigqtbuffer_size): New function.
7340 (initialize_tracepoint): Call init_trace_buffer with
7341 DEFAULT_TRACE_BUFFER_SIZE.
7342 * server.c (handle_query): Add QTBuffer:size in the
7345 2013-03-07 Yao Qi <yao@codesourcery.com>
7347 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7348 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7350 (cmd_qtsp): Adjust condition. Do post increment.
7351 Set cur_action and cur_step_action back to 0.
7353 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7356 * linux-low.c (linux_write_memory): Return early success if LEN is
7359 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7361 * configure.srv: Add x86_64-*-cygwin* as target.
7363 2013-02-28 Tom Tromey <tromey@redhat.com>
7365 * configure.ac: Invoke AC_SYS_LARGEFILE.
7366 * configure, config.in: Rebuild.
7368 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7370 * win32-low.c: Throughout, fix format strings and casts of
7371 printf-like functions to avoid type related warnings on all
7373 (get_child_debug_event): Print dwDebugEventCode as hex since
7374 that's how it's usually documented.
7376 2013-02-28 Yao Qi <yao@codesourcery.com>
7378 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7381 2013-02-27 Jiong Wang <jiwang@tilera.com>
7383 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7384 (reg-tilegx32.c): New rule.
7385 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7386 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7387 different register info initializer according to elf class.
7388 (init_registers_tilgx32): New function. The tilegx32 register info
7390 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7391 (tile_store_gregset): Likewise.
7393 2013-02-27 Yao Qi <yao@codesourcery.com>
7395 * server.c (process_point_options): Print debug message when
7396 debug_threads is true.
7398 2013-02-26 Yao Qi <yao@codesourcery.com>
7400 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7402 2013-02-19 Pedro Alves <palves@redhat.com>
7403 Kai Tietz <ktietz@redhat.com>
7407 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7408 instead of strtoul to extract address from packet.
7409 (process_serial_event) <'z'>: Likewise.
7411 2013-02-18 Yao Qi <yao@codesourcery.com>
7413 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7415 2013-02-14 Pedro Alves <palves@redhat.com>
7419 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7420 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7422 2013-02-14 Pedro Alves <palves@redhat.com>
7424 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7426 2013-02-14 Pedro Alves <palves@redhat.com>
7428 * tracepoint.c (save_string): Delete.
7429 (add_tracepoint_action): Use savestring instead of save_string.
7431 2013-02-12 Pedro Alves <palves@redhat.com>
7433 * linux-xtensa-low.c: Ditto.
7434 * xtensa-xtregs.c: Ditto.
7436 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7438 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7441 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7443 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7444 aarch64_num_wp_regs and aarch64_num_bp_regs to
7445 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7447 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7449 * linux-aarch64-low.c (ps_get_thread_area): Replace
7450 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7452 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7453 Marcus Shawcroft <marcus.shawcroft@arm.com>
7454 Nigel Stephens <nigel.stephens@arm.com>
7455 Yufeng Zhang <yufeng.zhang@arm.com>
7457 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7458 (aarch64.c, aarch64-without-fpu.c): New targets.
7459 * configure.srv (aarch64*-*-linux*): New.
7460 * linux-aarch64-low.c: New file.
7462 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7464 * linux-low.c (handle_extended_wait, linux_create_inferior)
7465 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7466 (dequeue_one_deferred_signal, linux_resume_one_thread)
7467 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7468 (linux_tracefork_grandchild, linux_test_for_tracefork)
7469 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7470 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7471 where the argument is 0.
7473 2013-01-25 Yao Qi <yao@codesourcery.com>
7475 * event-loop.c: Include "queue.h".
7476 (gdb_event_p): New typedef.
7477 (struct gdb_event) <next_event>: Remove.
7478 (event_queue): Change to QUEUE(gdb_event_p).
7479 (async_queue_event): Remove.
7480 (gdb_event_xfree): New.
7481 (initialize_event_loop): New.
7482 (process_event): Use API from QUEUE.
7483 (wait_for_event): Likewise.
7484 * server.c (main): Call initialize_event_loop.
7485 * server.h (initialize_event_loop): Declare.
7487 2013-01-18 Yao Qi <yao@codesourcery.com>
7489 * ax.h (struct eval_agent_expr_context): New.
7490 (gdb_eval_agent_expr): Update declaration.
7491 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7492 TFRAME. Add new argument CTX.
7493 * server.h (struct eval_agent_expr_context): Declare.
7494 (agent_mem_read, agent_tsv_read): Update declaration.
7495 (agent_mem_read_string): Likewise.
7496 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7497 (add_traceframe_block): Add new argument TPOINT.
7498 Increase TPOINT->traceframe_usage.
7499 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7500 eval_tracepoint_agent_expr.
7501 (condition_true_at_tracepoint): Likewise.
7502 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7503 (agent_mem_read_string, agent_tsv_read): Likewise.
7505 2013-01-16 Yao Qi <yao@codesourcery.com>
7507 * linux-low.c (linux_resume_one_lwp): Don't check
7508 'lwp->bp_reinsert != 0'.
7510 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7511 Pedro Alves <palves@redhat.com>
7513 * lynx-low.c (ptrace_request_to_str): Define a temporary
7514 macro and use it to simplify this function's implementation.
7516 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7518 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7521 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7523 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7525 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7527 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7529 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7531 * lynx-low.c (lynx_resume): Use the resume_info parameter
7532 to determine the ptid for the lynx_ptrace call, unless
7533 it is equal to minus_one_ptid, in which case we use the
7534 ptid of the current_inferior.
7535 (lynx_wait_1): After having received a thread create/exit
7536 event, resume the inferior's execution using the signaling
7537 thread's ptid, rather than the old ptid.
7539 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7541 * lynx-low.c (lynx_resume): Delete variable ret.
7543 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7545 * gdbreplay.c (gdbreplay_version): Update copyright year.
7546 * server.c (gdbserver_version): Likewise.
7548 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7550 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7553 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7555 * lynx-low.c (ptrace_request_to_str): Add handling for
7558 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7560 * lynx-low.c (lynx_attach): Delete variable new_process.
7562 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7564 * lynx-low.c (lynx_create_inferior): Delete variable
7567 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7569 * lynx-low.c (ptrace_request_to_str): Do not handle
7570 PTRACE_GETTHREADLIST if this macro does not exist.
7572 2012-12-15 Yao Qi <yao@codesourcery.com>
7574 * Makefile.in (OBS): Add notif.o.
7575 * notif.c, notif.h: New.
7576 * server.c: Include "notif.h".
7577 (struct vstop_notif) <next>: Remove.
7579 (queue_stop_reply): Update.
7580 (push_event, send_next_stop_reply): Remove.
7581 (discard_queued_stop_replies): Update.
7582 (notif_stop): New variable.
7583 (handle_v_stopped): Remove.
7584 (handle_v_requests): Don't call handle_v_stopped. Call
7585 handle_ack_notif instead.
7586 (queue_stop_reply_callback): Call notif_event_enque instead
7587 of queue_stop_reply.
7588 (handle_status): Don't call send_next_stop_reply, call
7589 notif_write_event instead.
7590 (kill_inferior_callback): Likewise.
7591 (detach_or_kill_inferior_callback): Likewise.
7592 (main): Call initialize_notif.
7593 (process_serial_event): Call QUEUE_is_empty.
7594 (handle_target_event): Call notif_push instead of push event.
7595 * server.h (push_event): Remove declaration.
7597 2012-12-10 Tom Tromey <tromey@redhat.com>
7599 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7600 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7603 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7604 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7605 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7606 (amd64-linux-ipa.o, ax.o): Rewrite.
7607 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7608 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7609 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7610 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7611 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7612 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7613 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7614 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7615 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7616 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7617 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7618 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7619 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7620 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7621 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7622 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7623 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7624 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7625 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7626 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7627 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7628 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7629 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7630 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7631 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7632 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7633 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7634 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7635 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7636 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7637 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7638 (reg-tilegx.o): Remove.
7639 (all_object_files): New macro.
7640 Include .deps files.
7641 * aclocal.m4, configure: Rebuild.
7642 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7643 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7644 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7646 2012-12-05 Tom Tromey <tromey@redhat.com>
7649 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7651 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7653 * configure.ac: Check for linux/perf_event.h.
7654 * config.in: Regenerated.
7655 * configure: Regenerated.
7657 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7659 * hostio.c (handle_readlink): Decrease buffer size
7660 parameter passed to readlink by one byte.
7662 2012-11-26 Yao Qi <yao@codesourcery.com>
7664 * configure.ac (build_warnings): Append '-Wempty-body'.
7665 * configure: Regenerated.
7666 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7669 2012-11-15 Pierre Muller <muller@sourceware.org>
7671 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7672 * config.in: Regenerate.
7673 * configure: Regenerate.
7674 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7675 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7676 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7677 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7679 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7680 instead of <sys/wait.h> header.
7681 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7683 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7685 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7686 (various make rules): Remove -DGDBSERVER
7688 2012-11-09 Yao Qi <yao@codesourcery.com>
7690 * spu-low.c (current_ptid): Move it to ..
7691 * gdbthread.h: ... here. New.
7692 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7693 * server.c (myresume, process_serial_event): Likewise.
7694 * thread-db.c (thread_db_find_new_threads): Likewise.
7695 * tracepoint.c (run_inferior_command): Likewise.
7697 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7699 * server.c (handle_search_memory_1): Include access length in
7702 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7704 * linux-crisv32-low.c: Fix compile errors.
7706 2012-09-04 Yao Qi <yao@codesourcery.com>
7708 * tracepoint.c (cmd_qtsv): Adjust debug message.
7709 Don't check CUR_TPOINT.
7711 2012-08-28 Yao Qi <yao@codesourcery.com>
7713 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7714 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7715 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7716 Remove declarations of xmalloc, xreallloc, xstrdup and
7718 * Makefile.in (libiberty_h): New.
7719 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7720 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7722 2012-08-23 Yao Qi <yao@codesourcery.com>
7724 * server.h: Remove declaration of 'xsnprintf'.
7726 2012-08-22 Keith Seitz <keiths@redhat.com>
7728 * server.h: Include build-gnulib-gbserver/config.h.
7729 * gdbreplay.c: Likewise.
7731 2012-08-08 Doug Evans <dje@google.com>
7733 * Makefile.in (SFILES): Add gdb_vecs.c.
7734 (OBS): Add gdb_vecs.o.
7735 (gdb_vecs_h, host_defs_h): New variables.
7736 (thread-db.o): Add $(gdb_vecs_h) dependency.
7737 (gdb_vecs.o): New rule.
7738 * thread-db.c: #include "gdb_vecs.h".
7739 (thread_db_load_search): Use a vector to iterate over path elements.
7740 Handle text appearing after "$pdir".
7742 * configure.ac: Add check for strstr.
7743 * config.in: Regenerate.
7744 * configure: Regenerate.
7746 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7748 * hostio.c (handle_pread): If pread fails, fall back to attempting
7750 (handle_pwrite): Likewise for pwrite.
7752 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7754 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7755 between unsupported TYPE and unimplementable ADDR/LEN combination.
7756 (arm_insert_point): Act on new return value.
7758 2012-07-31 Pedro Alves <palves@redhat.com>
7760 * server.c (process_point_options): Only skip tokens if we find
7761 one that is unrecognized. Don't treat 'X' specially while
7762 skipping unrecognized tokens.
7764 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7766 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7767 to 4-byte-align HW breakpoint addresses for Thumb.
7769 2012-07-27 Yao Qi <yao@codesourcery.com>
7773 * server.h: Declare gdb_agent_about_to_close.
7774 * target.c (kill_inferior): Include "agent.h".
7775 New. Send command 'kill'.
7776 * target.h (kill_inferior): Removed macro.
7777 * tracepoint.c (gdb_agent_about_to_close): New.
7778 (gdb_agent_helper_thread): Handle command 'close'.
7779 Wait endlessly until the inferior stops.
7780 Install gdb_agent_remove_socket to atexit hook.
7781 (agent_socket_name): New static variable.
7782 (gdb_agent_socket_init): Replace local variable 'name' with
7783 'agent_socket_name'.
7784 (gdb_agent_remove_socket): New.
7786 2012-07-27 Yao Qi <yao@codesourcery.com>
7788 * server.c (process_point_options): Stop at 'X' when parsing.
7790 2012-07-19 Michael Eager <eager@eagercon.com>
7792 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7794 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7795 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7796 hardware breakpoint.
7798 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7800 * gdbserver/linux-low.c (initialize_low): Call
7801 linux_ptrace_init_warnings.
7803 2012-07-02 Doug Evans <dje@google.com>
7805 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7808 2012-07-02 Stan Shebs <stan@codesourcery.com>
7810 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7811 (ax.o): Add it to build rule.
7813 (OBS): Add format.o.
7814 (IPA_OBS): Add format.o.
7815 * server.c (handle_query): Claim support for breakpoint commands.
7816 (process_point_options): Add command case.
7817 (process_serial_event): Leave running if there are printfs in
7819 * mem-break.h (any_persistent_commands): Declare.
7820 (add_breakpoint_commands): Declare.
7821 (gdb_no_commands_at_breakpoint): Declare.
7822 (run_breakpoint_commands): Declare.
7823 * mem-break.c (struct point_command_list): New struct.
7824 (struct breakpoint): New field command_list.
7825 (any_persistent_commands): New function.
7826 (add_commands_to_breakpoint): New function.
7827 (add_breakpoint_commands): New function.
7828 (gdb_no_commands_at_breakpoint): New function.
7829 (run_breakpoint_commands): New function.
7830 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7832 * ax.c: Include format.h.
7833 (ax_printf): New function.
7834 (gdb_eval_agent_expr): Add printf opcode.
7836 2012-06-13 Yao Qi <yao@codesourcery.com>
7838 * server.c (start_inferior): Remove duplicated writes to fields
7839 'last_resume_kind' and 'last_status' of 'current_inferior'.
7841 2012-06-12 Yao Qi <yao@codesourcery.com>
7842 Pedro Alves <palves@redhat.com>
7844 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7846 * server.c (handle_v_cont): Extend comment.
7848 2012-06-11 Yao Qi <yao@codesourcery.com>
7850 * linux-low.c (linux_attach): Add 'static'.
7852 2012-06-06 Yao Qi <yao@codesourcery.com>
7854 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7856 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7858 Fix gcc -flto compilation warning.
7859 * server.c (main): Make variable multi_mode and attach volatile.
7861 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7863 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7864 if the platform doesn't know about it.
7866 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7868 * Makefile.in (SFILES): Add linux-tile-low.c.
7869 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7870 * configure.srv: Handle tilegx-*-linux*.
7871 * linux-tile-low.c: New file.
7873 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7875 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7877 2012-05-24 Pedro Alves <palves@redhat.com>
7881 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7883 2012-05-24 Pedro Alves <palves@redhat.com>
7887 Replace target_signal with gdb_signal throughout.
7889 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7891 * linux-low.c (linux_store_registers): Avoid the copying sequence
7892 when no data has been retrieved by ptrace.
7894 2012-05-22 Will Deacon <will.deacon@arm.com>
7896 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7897 Include asm/ptrace.h.
7898 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7901 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7903 * linux-low.c (linux_store_registers): Don't re-retrieve data
7904 with ptrace that has already been obtained from /proc. Always
7905 copy any data retrieved with ptrace to the buffer supplied.
7907 2012-05-11 Yao Qi <yao@codesourcery.com>
7908 Pedro Alves <palves@redhat.com>
7910 * linux-low.c (enum stopping_threads_kind): New.
7911 (stopping_threads): Change type to `enum stopping_threads_kind'.
7912 (handle_extended_wait): If stopping and suspending threads, leave
7913 the new_lwp suspended too.
7914 (linux_wait_for_event): Adjust.
7915 (stop_all_lwps): Set `stopping_threads' to
7916 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7917 whether we're suspending threads or just stopping them. Assert no
7920 2012-04-29 Yao Qi <yao@codesourcery.com>
7922 * server.h: Move some code to ...
7923 * gdbthread.h: ... here. New.
7924 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7925 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7926 (nto-low.o, win32-low.o): Likewise.
7927 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7928 * regcache.c, remote-utils.c, server.c: Likewise.
7929 * target.c, tracepoint.c, win32-low.c: Likewise.
7931 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7933 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7934 (PTRACE_ARG4_TYPE): Likewise.
7935 (PTRACE_XFER_TYPE): Likewise.
7936 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7937 ptrace to PTRACE_ARG3_TYPE.
7938 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7939 (PTRACE_ARG4_TYPE): Likewise.
7940 (PTRACE_XFER_TYPE): Likewise.
7941 (linux_detach_one_lwp): Cast fourth argument of
7942 ptrace to long then PTRACE_ARG4_TYPE.
7943 (regsets_fetch_inferior_registers): Cast third argument of
7944 ptrace to long then PTRACE_ARG3_TYPE.
7945 (regsets_store_inferior_registers): Likewise.
7947 2012-04-20 Pedro Alves <palves@redhat.com>
7949 * configure: Regenerate.
7951 2012-04-19 Pedro Alves <palves@redhat.com>
7953 * Makefile.in (GNULIB_BUILDDIR): New.
7954 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7955 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7956 (all, install-only, uninstall, clean-info, all-lib, clean): No
7957 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7958 (maintainer-clean realclean distclean): Use subdir_do.
7960 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7961 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7962 * acinclude.m4: Include acx_configure_dir.m4.
7963 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7964 calls. Call AC_PROG_RANLIB. Configure gnulib using
7967 (GNULIB_STDINT_H): Adjust.
7968 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7969 * gdbreplay.c: Include build-gnulib/config.h.
7970 * server.h: Likewise.
7971 * aclocal.m4: Regenerate.
7972 * config.in: Regenerate.
7973 * configure: Regenerate.
7975 2012-04-19 Pedro Alves <palves@redhat.com>
7977 * Makefile.in (LIBGNU, INCGNU): Adjust.
7978 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7979 (all, install-only, uninstall, clean-info, all-lib, clean)
7980 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7981 * configure.ac: Adjust AC_OUTPUT output.
7982 * aclocal.m4: Regenerate.
7983 * configure: Regenerate.
7985 2012-04-19 Pedro Alves <palves@redhat.com>
7987 * Makefile.in (generated_files): New.
7988 (server_h): Remove the explicit dependency on config.h, and depend
7989 on $generated_files.
7991 2012-04-19 Pedro Alves <palves@redhat.com>
7993 * Makefile.in (INCGNU): Add -Ignulib.
7995 2012-04-19 Pedro Alves <palves@redhat.com>
7997 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7998 (INCGNU): ... this, and spell out -I here.
7999 (GNULIB_LIB): Rename to ...
8001 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8003 2012-04-19 Pedro Alves <palves@redhat.com>
8005 * config.in: Regenerate.
8007 2012-04-19 Pedro Alves <palves@redhat.com>
8009 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8010 * server.h (memmem): Remove declaration.
8011 * config.in: Regenerate.
8012 * configure: Regenerate.
8014 2012-04-19 Yao Qi <yao@codesourcery.com>
8016 * Makefile.in (SFILES): Add common/vec.c.
8020 2012-04-19 Yao Qi <yao@codesourcery.com>
8022 * remote-utils.c (prepare_resume_reply): Replace with macro
8023 target_core_of_thread.
8024 * server.c (handle_qxfer_threads_proper): Likewise.
8025 * target.h (traget_core_of_thread): New macro.
8027 2012-04-18 Pedro Alves <palves@redhat.com>
8029 * aclocal.m4: Regenerate.
8030 * configure: Regenerate.
8032 2012-04-16 Yao Qi <yao@codesourcery.com>
8034 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8035 duplicated on address.
8037 2012-04-16 Yao Qi <yao@codesourcery.com>
8039 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8040 (struct tracepoint_action_ops) <send>: New field.
8041 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8042 (agent_expr_send, x_tracepoint_action_send): New.
8043 (l_tracepoint_action_send): New.
8044 (cmd_qtdp): Download and install tracepoint
8045 according to `use_agent'.
8046 (run_inferior_command): Add one more parameter `len'.
8048 (tracepoint_send_agent): New.
8049 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8051 2012-04-16 Yao Qi <yao@codesourcery.com>
8053 * tracepoint.c (download_tracepoints): Moved to ...
8054 (cmd_qtstart): ... here.
8056 2012-04-14 Yao Qi <yao@codesourcery.com>
8058 * tracepoint.c: Include inttypes.h.
8059 (struct collect_memory_action): Use sized types.
8060 (struct tracepoint): Likewise.
8061 (cmd_qtdp, stop_tracing): Update print specifiers.
8062 (cmd_qtp, response_tracepoint): Likewise.
8063 (collect_data_at_tracepoint): Likewise.
8064 (collect_data_at_step): Likewise.
8066 2012-04-14 Yao Qi <yao@codesourcery.com>
8068 Import gnulib module inttypes.
8069 * aclocal.m4, config.in, configure: Regenerated.
8071 2012-04-14 Yao Qi <yao@codesourcery.com>
8073 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8074 Makefile and config.status at last.
8076 2012-04-13 Yao Qi <yao@codesourcery.com>
8078 * tracepoint.c: Include stdint.h unconditionally.
8080 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8082 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8083 on BFD_HAVE_SYS_PROCFS_TYPE.
8084 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8085 * configure: Regenerate.
8086 * config.in: Likewise.
8088 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8090 * Makefile.in (clean): Also remove x32.c x32-linux.c
8091 x32-avx.c x32-avx-linux.c.
8092 (x32.o): New target.
8094 (x32-linux.o): Likewise.
8095 (x32-linux.c): Likewise.
8096 (x32-avx.o): Likewise.
8097 (x32-avx.c): Likewise.
8098 (x32-avx-linux.o): Likewise.
8099 (x32-avx-linux.c): Likewise.
8101 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8102 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8103 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8104 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8105 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8106 i386/x32-avx-linux.xml.
8108 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8109 (init_registers_x32_avx_linux): Likwise.
8110 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8111 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8113 2012-04-13 Pedro Alves <palves@redhat.com>
8115 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8116 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8117 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8118 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8121 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8123 * linux-x86-low.c (compat_x32_clock_t): New.
8124 (compat_x32_siginfo_t): Likewise.
8125 (compat_x32_siginfo_from_siginfo): Likewise.
8126 (siginfo_from_compat_x32_siginfo): Likewise.
8127 (linux_is_elf64): Likewise.
8128 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8129 and siginfo_from_compat_x32_siginfo for x32.
8130 (x86_arch_setup): Set linux_is_elf64.
8132 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8135 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8137 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8138 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8139 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8140 compatible with process.
8142 2012-04-12 Yao Qi <yao@codesourcery.com>
8144 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8145 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8146 (install-only, install-info, clean): Handle sub dir gnulib.
8147 (all-lib, am--refresh): New targets.
8148 (memmem.o): Remove target.
8149 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8150 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8151 (AC_REPLACE_FUNCS): Remove memmem.
8152 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8153 (AC_OUTPUT): Generate Makefile in gnulib/.
8154 * aclocal.m4, config.in, configure: Regenerated.
8156 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8158 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8160 2012-04-05 Pedro Alves <palves@redhat.com>
8162 -Werror=strict-aliasing
8164 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8167 2012-04-04 Pedro Alves <palves@redhat.com>
8169 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8170 (sparc_store_gregset_from_stack, sparc_store_gregset)
8171 (sparc_breakpoint_at): Fix formatting.
8173 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8175 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8177 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8178 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8179 * config.in: Regenerate.
8180 * configure: Likewise.
8182 2012-03-29 Pedro Alves <palves@redhat.com>
8184 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8185 Correct ptrace arguments.
8187 2012-03-28 Pedro Alves <palves@redhat.com>
8189 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8190 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8191 (IA64_FR1_REGNUM): New defines.
8192 (ia64_fetch_register): New.
8193 (the_low_target): Install it.
8194 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8196 * linux-low.c (linux_fetch_registers): Try the
8197 the_low_target.fetch_register hook first.
8199 * linux-arm-low.c (the_low_target): Adjust.
8200 * linux-bfin-low.c (the_low_target): Adjust.
8201 * linux-cris-low.c (the_low_target): Adjust.
8202 * linux-crisv32-low.c (the_low_target): Adjust.
8203 * linux-m32r-low.c (the_low_target): Adjust.
8204 * linux-m68k-low.c (the_low_target): Adjust.
8205 * linux-mips-low.c (the_low_target): Adjust.
8206 * linux-ppc-low.c (the_low_target): Adjust.
8207 * linux-s390-low.c (the_low_target): Adjust.
8208 * linux-sh-low.c (the_low_target): Adjust.
8209 * linux-sparc-low.c (the_low_target): Adjust.
8210 * linux-tic6x-low.c (the_low_target): Adjust.
8211 * linux-x86-low.c (the_low_target): Adjust.
8212 * linux-xtensa-low.c (the_low_target): Adjust.
8214 2012-03-26 Pedro Alves <palves@redhat.com>
8216 * server.c (handle_qxfer_libraries): Don't bail early if
8217 the_target->qxfer_libraries_svr4 is not NULL.
8219 2012-03-26 Pedro Alves <palves@redhat.com>
8221 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8223 2012-03-23 Pedro Alves <palves@redhat.com>
8225 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8226 "library-list-svr4" element's start tag when the the DSO list is
8229 2012-03-23 Pedro Alves <palves@redhat.com>
8231 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8232 a variable whose type size is the same as the inferior's pointer
8235 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8237 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8239 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8240 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8241 * linux-low.h: Include <signal.h>.
8242 (struct siginfo): Remove forward declaration.
8243 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8246 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8248 * .gitignore: Ignore more files.
8250 2012-03-19 Pedro Alves <palves@redhat.com>
8251 Jan Kratochvil <jan.kratochvil@redhat.com>
8253 * server.c (cont_thread, general_thread): Add describing comments.
8254 (start_inferior): Clear `cont_thread'.
8255 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8258 2012-03-15 Yao Qi <yao@codesourcery.com>
8260 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8262 (cmd_qtdp): ... here.
8264 2012-03-15 Yao Qi <yao@codesourcery.com>
8266 * tracepoint.c (struct tracepoint_action_ops): New.
8267 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8268 (m_tracepoint_action_download): New.
8269 (r_tracepoint_action_download): New.
8270 (x_tracepoint_action_download): New.
8271 (l_tracepoint_action_download): New.
8272 (add_tracepoint_action): Install `action->ops' according type.
8273 (download_tracepoint_1): Move code `download' function pointer
8274 of various tracepoint_action_ops.
8276 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8278 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8279 linux_ptrace_attach_warnings.
8281 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8283 * Makefile.in (linux-ptrace.o): New.
8284 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8285 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8286 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8287 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8288 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8290 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8292 2012-03-08 Yao Qi <yao@codesourcery.com>
8293 Pedro Alves <palves@redhat.com>
8295 Fix PR server/13392.
8296 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8298 * tracepoint.c (remove_tracepoint): New.
8299 (cmd_qtdp): Call remove_tracepoint when failed to install.
8301 2012-03-07 Pedro Alves <palves@redhat.com>
8303 * linux-low.c (get_detach_signal): New.
8304 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8305 Pass on pending signals to PTRACE_DETACH. Check the result of the
8307 * server.c (program_signals, program_signals_p): New.
8308 (handle_general_set): Handle QProgramSignals.
8309 * server.h (program_signals, program_signals_p): Declare.
8311 2012-03-05 Pedro Alves <palves@redhat.com>
8312 Jan Kratochvil <jan.kratochvil@redhat.com>
8314 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8317 2012-03-03 Yao Qi <yao@codesourcery.com>
8319 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8320 agent_look_up_symbols.
8322 2012-03-03 Yao Qi <yao@codesourcery.com>
8324 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8325 (linux-x86-low.o): Likewise.
8326 * server.h: Remove in_process_agent_loaded.
8327 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8331 2012-03-03 Yao Qi <yao@codesourcery.com>
8333 * tracepoint.c (gdb_agent_capability): New global.
8334 (in_process_agent_loaded_ust): Renamed to
8335 `in_process_agent_supports_ust'.
8337 (in_process_agent_supports_ust): Call agent_capability_check.
8338 (clear_installed_tracepoints): Assert that agent supports
8341 2012-03-03 Yao Qi <yao@codesourcery.com>
8343 * linux-low.c (linux_supports_agent): New.
8344 (linux_target_ops): Initialize field `supports_agent' with
8345 linux_supports_agent.
8346 * target.h (struct target_ops) <supports_agent>: New.
8347 (target_supports_agent): New macro.
8348 * server.c (handle_general_set): Handle packet 'QAgent'.
8349 (handle_query): Send `QAgent+'.
8350 * Makefile.in (server.o): Depends on agent.h.
8352 2012-03-03 Yao Qi <yao@codesourcery.com>
8354 * Makefile.in (OBS): Add agent.o.
8355 Add new rule for agent.o.
8356 Track dependence of tracepoint.c on agent.h.
8357 * tracepoint.c (run_inferior_command_1):
8358 (run_inferior_command): Call agent_run_command.
8359 (gdb_ust_connect_sync_socket): Deleted. Move it to
8361 (resume_thread, stop_thread): Likewise.
8362 (gdb_ust_socket_init): Renamed to ...
8363 (gdb_agent_socket_init): ... New.
8364 (gdb_ust_thread): Renamed to ...
8365 (gdb_agent_helper_thread): ... New.
8366 (gdb_ust_init): Move some code to ...
8367 (gdb_agent_init): ... here. New.
8368 [HAVE_UST]: Call gdb_ust_init.
8369 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8370 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8371 * config.in, configure: Regenerated.
8373 2012-03-02 Pedro Alves <palves@redhat.com>
8375 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8376 * linux-low.c (struct simple_pid_list): New.
8377 (stopped_pids): New a struct simple_pid_list pointer.
8378 (add_to_pid_list, pull_pid_from_list): New.
8379 (handle_extended_wait): Don't assume the first signal new children
8380 report is SIGSTOP. Adjust call to pull_pid_from_list.
8381 (linux_wait_for_lwp): Adjust.
8383 2012-03-02 Yao Qi <yao@codesourcery.com>
8385 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8388 2012-03-02 Yao Qi <yao@codesourcery.com>
8390 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8391 `stop_pc' and `tpoint'. Update caller.
8393 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8395 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8396 * linux-low.c (use_linux_regsets): New macro.
8397 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8398 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8399 (linux_register_in_regsets): New function.
8400 (usr_fetch_inferior_registers): Skip registers covered by
8402 (usr_store_inferior_registers): Likewise.
8403 (usr_fetch_inferior_registers): New macro.
8404 (usr_store_inferior_registers): Likewise.
8405 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8406 (linux_store_registers): Likewise.
8407 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8409 (init_registers_mips64_dsp_linux): Likewise.
8410 (init_registers_mips_linux): New macro.
8411 (init_registers_mips_dsp_linux): Likewise.
8412 (mips_dsp_num_regs): Likewise.
8413 (DSP_BASE, DSP_CONTROL): New fallback macros.
8414 (mips_base_regs): New macro.
8415 (mips_regmap): Use it. Fix the size.
8416 (mips_dsp_regmap): New variable.
8417 (mips_dsp_regset_bitmap): Likewise.
8418 (mips_arch_setup): New function.
8419 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8421 (mips_cannot_store_register): Likewise.
8422 (the_low_target): Update .arch_setup, .num_regs and .regmap
8423 initializers. Add .regset_bitmap initializer.
8424 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8426 * linux-bfin-low.c (the_low_target): Likewise.
8427 * linux-cris-low.c (the_low_target): Likewise.
8428 * linux-crisv32-low.c (the_low_target): Likewise.
8429 * linux-ia64-low.c (the_low_target): Likewise.
8430 * linux-m32r-low.c (the_low_target): Likewise.
8431 * linux-m68k-low.c (the_low_target): Likewise.
8432 * linux-ppc-low.c (the_low_target): Likewise.
8433 * linux-s390-low.c (the_low_target): Likewise.
8434 * linux-sh-low.c (the_low_target): Likewise.
8435 * linux-sparc-low.c (the_low_target): Likewise.
8436 * linux-tic6x-low.c (the_low_target): Likewise.
8437 * linux-x86-low.c (the_low_target): Likewise.
8438 * linux-xtensa-low.c (the_low_target): Likewise.
8439 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8440 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8441 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8443 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8444 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8446 2012-02-29 Yao Qi <yao@codesourcery.com>
8447 Pedro Alves <palves@redhat.com>
8449 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8450 `step_over_finished' is true.
8452 2012-02-27 Pedro Alves <palves@redhat.com>
8454 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8455 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8457 2012-02-27 Pedro Alves <palves@redhat.com>
8460 * linux-low.c (pid_is_stopped): New.
8461 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8463 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8465 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8468 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8470 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8472 2012-02-24 Luis Machado <lgustavo@codesourcery>
8474 * server.c (handle_query): Advertise support for target-side
8475 breakpoint condition evaluation.
8476 (process_point_options): New function.
8477 (process_serial_event): When inserting a breakpoint, check for
8478 a target-side condition that should be evaluated.
8480 * mem-break.c: Include regcache.h and ax.h.
8481 (point_cond_list_t): New data structure.
8482 (breakpoint) <cond_list>: New field.
8483 (find_gdb_breakpoint_at): Make non-static.
8484 (delete_gdb_breakpoint_at): Clear any target-side
8486 (clear_gdb_breakpoint_conditions): New function.
8487 (add_condition_to_breakpoint): Likewise.
8488 (add_breakpoint_condition): Likewise.
8489 (gdb_condition_true_at_breakpoint): Likewise.
8490 (gdb_breakpoint_here): Return result directly instead
8491 of going through a local variable.
8493 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8494 (clear_gdb_breakpoint_conditions): Likewise.
8495 (add_breakpoint_condition): Likewise.
8496 (gdb_condition_true_at_breakpoint): Likewise.
8498 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8499 (need_step_over_p): Take target-side breakpoint condition into
8502 2012-02-24 Luis Machado <lgustavo@codesourcery>
8504 * server.h: Include tracepoint.h.
8505 (agent_mem_read, agent_get_trace_state_variable_value,
8506 agent_set_trace_state_variable_value,
8507 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8508 get_set_tsv_func_addr): New prototypes.
8510 * ax.h: New include file.
8511 * ax.c: New source file.
8513 * tracepoint.c: Include ax.h.
8514 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8515 agent_expr, eval_result_type): Move to ax.h.
8516 (parse_agent_expr): Rename to ...
8517 (gdb_parse_agent_expr): ... this, make it non-static and move
8519 (unparse_agent_expr) Rename to ...
8520 (gdb_unparse_agent_expr): ... this, make it non-static and move
8522 (eval_agent_expr): Rename to ...
8523 (eval_tracepoint_agent_expr): ... this.
8524 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8525 forward declarations.
8526 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8527 (agent_get_trace_state_variable_value): New function.
8528 (agent_set_trace_state_variable_value): New function.
8529 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8530 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8531 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8532 (condition_true_at_tracepoint): Likewise.
8533 (parse_agent_expr): Rename to ...
8534 (gdb_parse_agent_expr): ... this and move to ax.c.
8535 (unparse_agent_expr): Rename to ...
8536 (gdb_unparse_agent_expr): ... this and move to ax.c.
8537 (gdb_agent_op_name): Move to ax.c.
8538 (eval_agent_expr): Rename to ...
8539 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8541 (eval_tracepoint_agent_expr): New function.
8542 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8544 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8546 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8547 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8548 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8549 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8550 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8551 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8552 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8553 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8554 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8555 (compile_bytecodes): Remove forward declaration.
8556 (is_goto_target): Move to ax.c.
8557 (compile_bytecodes): Move to ax.c and call
8558 agent_get_trace_state_variable_value (...) and
8559 agent_set_trace_state_variable_value (...).
8561 * Makefile.in: Update ax.c and IPA dependencies.
8563 2012-02-24 Pedro Alves <palves@redhat.com>
8565 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8566 (cmd_bigqtbuffer_circular): ... this. Only handle
8567 'QTBuffer:circular:'.
8568 (handle_tracepoint_general_set): Adjust.
8570 2012-02-16 Yao Qi <yao@codesourcery.com>
8572 * inferiors.c: Move code to ...
8573 * dll.c: .... here. New.
8574 * server.h: Declare clear_dlls.
8575 * Makefile.in (SFILES): Add dll.c.
8579 2012-02-11 Yao Qi <yao@codesourcery.com>
8581 * server.c: (handle_monitor_command): Add a new parameter
8583 (handle_query): Update caller.
8585 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8587 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8588 * configure, config.in: Regenerate.
8589 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8592 2012-02-02 Pedro Alves <palves@redhat.com>
8594 Try SIGKILL first, then PTRACE_KILL.
8595 * linux-low.c (linux_kill_one_lwp): New.
8596 (linux_kill_one_lwp): Rename to ...
8597 (kill_one_lwp_callback): ... this. Use the new
8600 2012-02-02 Pedro Alves <palves@redhat.com>
8602 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8605 2012-01-27 Pedro Alves <palves@redhat.com>
8607 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8608 (elf_64_file_p): Make static.
8609 (linux_pid_exe_is_elf_64_file): New.
8610 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8611 Delete declarations.
8612 (linux_pid_exe_is_elf_64_file): Declare.
8613 * linux-x86-low.c (x86_arch_setup): Use
8614 linux_pid_exe_is_elf_64_file.
8616 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8618 * linux-low.c (linux_wait_for_event_1): Rename to ...
8619 (linux_wait_for_event): ... here and merge it with former
8620 linux_wait_for_event - new variable wait_ptid, use it.
8621 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8623 2012-01-23 Pedro Alves <palves@redhat.com>
8625 * server.c (main): Avoid yet another case of infinite loop while
8626 detaching/killing after a longjmp.
8628 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8631 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8633 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8635 * hostio.c (handle_readlink): New function.
8636 (handle_vFile): Call it to handle "vFile:readlink" packets.
8638 2012-01-20 Pedro Alves <palves@redhat.com>
8639 Ulrich Weigand <ulrich.weigand@linaro.org>
8641 * server.c (handle_v_requests): Only support vAttach and vRun to
8642 start multiple processes when in extended protocol mode.
8644 2012-01-17 Pedro Alves <palves@redhat.com>
8646 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8647 memalign plus mprotect to allocate the scratch buffer.
8649 2012-01-13 Pedro Alves <palves@redhat.com>
8651 * server.c (attach_inferior): Clear `cont_thread'.
8653 2012-01-13 Pedro Alves <palves@redhat.com>
8655 * server.c (main): Avoid infinite loop while detaching/killing
8658 2012-01-09 Doug Evans <dje@google.com>
8660 * server.c (start_inferior): Set last_ptid in --wrapper case.
8662 2012-01-06 Yao Qi <yao@codesourcery.com>
8664 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8666 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8668 2012-01-04 Yao Qi <yao@codesourcery.com>
8670 * tracepoint.c (cmd_qtdp): Print debug message
8671 for static tracepoint.
8673 2012-01-04 Yao Qi <yao@codesourcery.com>
8675 * tracepoint.c (trace_vdebug): Differentiate debug message
8676 between gdbserver and IPA.
8678 2012-01-03 Yao Qi <yao@codesourcery.com>
8680 * tracepoint.c (tracepoint_was_hit): Don't collect for
8683 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8685 * terminal.h: Reformat copyright header.
8687 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8689 * server.c (gdbserver_version): Update copyright year.
8690 * gdbreplay.c (gdbreplay_version): Likewise.
8692 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8694 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8697 2011-12-18 Hui Zhu <teawater@gmail.com>
8698 * linux-low.c (linux_create_inferior): Save return value to ret.
8700 2011-12-18 Hui Zhu <teawater@gmail.com>
8702 * linux-low.c (linux_create_inferior): Save return value to ret.
8704 2011-12-16 Doug Evans <dje@google.com>
8706 * linux-low.c (linux_create_inferior): If stdio connection,
8707 redirect stdin from /dev/null, stdout to stderr.
8708 * remote-utils.c (remote_is_stdio): New static global.
8709 (remote_connection_is_stdio): New function.
8710 (remote_prepare): Handle stdio connection.
8711 (remote_open): Ditto.
8712 (remote_close): Don't close stdin for stdio connections.
8713 (read_prim,write_prim): New functions. Replace all calls to
8714 read/write to these.
8715 * server.c (main): Watch for "-" argument. Move call to
8716 remote_prepare before start_inferior.
8717 * server.h (STDIO_CONNECTION_NAME): New macro.
8718 (remote_connection_is_stdio): Declare.
8720 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8721 in debugging output.
8723 2011-12-15 Yao Qi <yao@codesourcery.com>
8725 * tracepoint.c: Include sys/syscall.h.
8726 (gdb_ust_thread): Remove preprocessor conditional.
8728 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8730 * linux-low.c (linux_detach_one_lwp): Call
8731 the_low_target.prepare_to_resume before detaching.
8733 2011-12-14 Yao Qi <yao@codesourcery.com>
8735 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8738 2011-12-14 Yao Qi <yao@codesourcery.com>
8740 * i386-low.c (i386_low_stopped_data_address): Initialize local
8743 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8747 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8748 DR_CONTROL unless necessary. Extend comments.
8749 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8750 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8752 2011-12-13 Yao Qi <yao@codesourcery.com>
8754 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8756 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8758 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8760 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8761 Print new debug message for such case.
8763 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8765 Fix overlapping memcpy.
8766 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8767 the read_inferior_memory transfer.
8768 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8769 write_inferior_memory transfer.
8770 (set_fast_tracepoint_jump): New variable buf. Use it for the
8771 read_inferior_memory and write_inferior_memory transfers.
8772 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8773 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8774 Use it for the write_inferior_memory transfer.
8775 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8778 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8780 * linux-low.c (fetch_register, store_register): Make code
8781 consistent, fix formatting.
8783 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8785 * linux-low.c (usr_store_inferior_registers): Factor out code
8786 to handle individual registers into...
8787 (store_register): ... this new function.
8789 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8791 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8792 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8793 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8794 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8795 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8796 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8797 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8798 (srv_xmlfiles): Add new XML files.
8800 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8802 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8803 (init_registers_s390_linux32v1): Add prototype.
8804 (init_registers_s390_linux32v2): Likewise.
8805 (init_registers_s390_linux64v1): Likewise.
8806 (init_registers_s390_linux64v2): Likewise.
8807 (init_registers_s390x_linux64v1): Likewise.
8808 (init_registers_s390x_linux64v2): Likewise.
8809 (s390_num_regs): Increment to 52.
8810 (s390_regmap): Add orig_r2 register.
8811 (s390_num_regs_3264): Increment to 68.
8812 (s390_regmap_3264): Add orig_r2 register.
8813 (s390_collect_ptrace_register): Handle orig_r2 register.
8814 (s390_supply_ptrace_register): Likewise.
8815 (s390_fill_last_break): New function.
8816 (s390_store_last_break): Likewise.
8817 (s390_fill_system_call): New function.
8818 (s390_store_system_call): Likewise.
8819 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8821 (s390_check_regset): New function.
8822 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8823 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8824 Update target_regsets for available register sets.
8826 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8827 Jan Kratochvil <jan.kratochvil@redhat.com>
8829 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8830 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8832 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8833 * linux-low.h (struct process_info_private): New member r_debug.
8834 * server.c (handle_qxfer_libraries): Call
8835 the_target->qxfer_libraries_svr4.
8836 (handle_qxfer_libraries_svr4): New function.
8837 (qxfer_packets): New entry "libraries-svr4".
8838 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8839 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8840 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8841 PACKET_qXfer_libraries_svr4.
8843 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8845 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8846 PSW address/mask between 8-byte and 16-byte formats.
8847 (s390_supply_ptrace_register): Likewise.
8848 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8849 basic addressing mode bit.
8851 2011-11-24 Stan Shebs <stan@codesourcery.com>
8853 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8855 2011-11-17 Stan Shebs <stan@codesourcery.com>
8857 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8858 (tracing_start_time): New global.
8859 (tracing_stop_time): New global.
8860 (tracing_user_name): New global.
8861 (tracing_notes): New global.
8862 (tracing_stop_note): New global.
8863 (cmd_qtstart): Set traceframe_usage, start_time.
8864 (stop_tracing): Set stop_time.
8865 (cmd_qtstatus): Report additional status.
8866 (cmd_qtp): New function.
8867 (handle_tracepoint_query): Call it.
8868 (cmd_qtnotes): New function.
8869 (handle_tracepoint_general_set): Call it.
8870 (get_timestamp): Rename from tsv_get_timestamp.
8872 2011-11-14 Stan Shebs <stan@codesourcery.com>
8873 Kwok Cheung Yeung <kcy@codesourcery.com>
8875 * linux-x86-low.c (small_jump_insn): New.
8876 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8877 trampoline and error message, build a trampoline and issue a small
8878 jump instruction to it.
8879 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8880 trampoline and error message.
8881 (x86_get_min_fast_tracepoint_insn_len): New.
8882 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8883 * linux-low.h (struct linux_target_ops): Add arguments to
8884 install_fast_tracepoint_jump_pad operation, add new operation.
8885 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8887 (linux_get_min_fast_tracepoint_insn_len): New function.
8888 (linux_target_op): Add new operation.
8889 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8890 (gdb_trampoline_buffer_end): Ditto.
8891 (gdb_trampoline_buffer_error): Ditto.
8892 (struct ipa_sym_addresses): Add fields for new IPA variables.
8893 (symbol_list): Add entries for new IPA variables.
8894 (struct tracepoint): Add fields to hold the address range of the
8895 trampoline used by the tracepoint.
8896 (trampoline_buffer_head): New static variable.
8897 (trampoline_buffer_tail): Ditto.
8898 (claim_trampoline_space): New function.
8899 (have_fast_tracepoint_trampoline_buffer): New function.
8900 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8902 (install_fast_tracepoint): Ditto, also add error buffer argument.
8903 (cmd_qtminftpilen): New function.
8904 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8905 (fast_tracepoint_from_trampoline_address): New function.
8906 (fast_tracepoint_collecting): Handle trampoline as part of jump
8908 (set_trampoline_buffer_space): New function.
8909 (initialize_tracepoint): Initialize new IPA variables.
8910 * target.h (struct target_ops): Add arguments to
8911 install_fast_tracepoint_jump_pad operation, add new
8912 get_min_fast_tracepoint_insn_len operation.
8913 (target_get_min_fast_tracepoint_insn_len): New.
8914 (install_fast_tracepoint_jump_pad): Add arguments.
8915 * server.h (IPA_BUFSIZ): Define.
8916 * linux-i386-ipa.c: Include extra header files.
8917 (initialize_fast_tracepoint_trampoline_buffer): New function.
8918 (initialize_low_tracepoint): Call it.
8919 * server.h (set_trampoline_buffer_space): Declare.
8920 (claim_trampoline_space): Ditto.
8921 (have_fast_tracepoint_trampoline_buffer): Ditto.
8923 2011-11-14 Yao Qi <yao@codesourcery.com>
8925 * server.c (handle_query): Handle InstallInTrace for qSupported.
8926 * tracepoint.c (add_tracepoint): Sort list.
8927 (install_tracepoint, download_tracepoint): New.
8928 (cmd_qtdp): Call them to install and download tracepoints.
8929 (sort_tracepoints): Removed.
8930 (cmd_qtstart): Update.
8932 2011-11-14 Yao Qi <yao@codesourcery.com>
8934 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8935 * mem-break.h: Declare.
8936 * tracepoint.c (cmd_qtstart): Move some code to ...
8937 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8939 (download_tracepoints): Move some code to ...
8940 (download_tracepoint_1): ... here. New.
8942 2011-11-08 Yao Qi <yao@codesourcery.com>
8944 * remote-utils.c (relocate_instruction): A comment fix.
8946 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8948 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8949 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8950 dr_status_mirror and dr_control_mirror from debug_reg_state.
8951 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8952 (i386_initial_stuff): Remove use of deleted globals.
8953 (i386_get_thread_context, i386_set_thread_context,
8954 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8955 from debug_reg_state.
8957 2011-11-05 Yao Qi <yao@codesourcery.com>
8959 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8960 address as TPOINT's.
8962 2011-11-02 Stan Shebs <stan@codesourcery.com>
8964 * tracepoint.c (agent_mem_read_string): New function.
8965 (eval_agent_expr): Call it for tracenz.
8966 * server.c (handle_query): Report support for tracenz.
8968 2011-11-02 Yao Qi <yao@codesourcery.com>
8970 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8972 2011-11-02 Yao Qi <yao@codesourcery.com>
8974 * target.h: Fix a typo in comment.
8976 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8978 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8979 clobber the breakpoints' shadows with fast tracepoint jumps.
8980 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8981 * target.c (write_inferior_memory): Also pass MYADDR down to
8984 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8986 * configure.ac: Check support for personality routine.
8987 * configure: Regenerate.
8988 * config.in: Likewise.
8989 * linux-low.c: Include <sys/personality.h>.
8990 Define ADDR_NO_RANDOMIZE if necessary.
8991 (linux_create_inferior): Disable address space randomization when
8992 forking inferior, if requested.
8993 (linux_supports_disable_randomization): New function.
8994 (linux_target_ops): Install it.
8995 * server.h (disable_randomization): Declare.
8996 * server.c (disable_randomization): New global variable.
8997 (handle_general_set): Handle QDisableRandomization.
8998 (handle_query): Likewise for qSupported.
8999 (main): Support --disable-randomization and --no-disable-randomization
9000 command line arguments.
9001 * target.h (struct target_ops): Add supports_disable_randomization.
9002 (target_supports_disable_randomization): New macro.
9004 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9006 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9008 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9009 [!PT_GETDSBT] (target_loadmap): New definition.
9010 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9011 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9012 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9013 and PT_GETDSBT to LINUX_LOADMAP.
9014 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9015 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9017 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9019 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9020 (arm_linux_hwbp_cap): New static variable.
9021 (arm_linux_get_hwbp_cap): Replace by ...
9022 (arm_linux_init_hwbp_cap): ... this new function.
9023 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9024 (arm_linux_get_hw_watchpoint_count): Likewise.
9025 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9026 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9027 (arm_prepare_to_resume): Use perror_with_name instead of error.
9029 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9031 * linux-arm-low.c: Include <signal.h>.
9032 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9033 (struct arm_linux_hwbp_cap): New data type.
9034 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9035 (struct arm_linux_hw_breakpoint): New data type.
9036 (MAX_BPTS, MAX_WPTS): Define.
9037 (struct arch_process_info, struct arch_lwp_info): New data types.
9038 (arm_linux_get_hwbp_cap): New function.
9039 (arm_linux_get_hw_breakpoint_count): Likewise.
9040 (arm_linux_get_hw_watchpoint_count): Likewise.
9041 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9042 (arm_hwbp_control_initialize): Likewise.
9043 (arm_hwbp_control_is_enabled): Likewise.
9044 (arm_hwbp_control_is_initialized): Likewise.
9045 (arm_hwbp_control_disable): Likewise.
9046 (arm_linux_hw_breakpoint_equal): Likewise.
9047 (arm_linux_hw_point_initialize): Likewise.
9048 (struct update_registers_data): New data structure.
9049 (update_registers_callback: New function.
9050 (arm_insert_point): Likewise.
9051 (arm_remove_point): Likewise.
9052 (arm_stopped_by_watchpoint): Likewise.
9053 (arm_stopped_data_address): Likewise.
9054 (arm_new_process): Likewise.
9055 (arm_new_thread): Likewise.
9056 (arm_prepare_to_resume): Likewise.
9057 (the_low_target): Register arm_insert_point, arm_remove_point,
9058 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9059 arm_new_thread, and arm_prepare_to_resume.
9061 2011-09-15 Stan Shebs <stan@codesourcery.com>
9063 * server.h (struct emit_ops): Add compare-goto fields.
9064 * tracepoint.c (gdb_agent_op_sizes): New table.
9065 (emit_eq_goto): New function.
9066 (emit_ne_goto): New function.
9067 (emit_lt_goto): New function.
9068 (emit_le_goto): New function.
9069 (emit_gt_goto): New function.
9070 (emit_ge_goto): New function.
9071 (is_goto_target): New function.
9072 (compile_bytecodes): Recognize special cases of compare-goto
9073 combinations and call specialized emitters for them.
9074 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9075 (amd64_emit_ne_goto): New function.
9076 (amd64_emit_lt_goto): New function.
9077 (amd64_emit_le_goto): New function.
9078 (amd64_emit_gt_goto): New function.
9079 (amd64_emit_ge_goto): New function.
9080 (amd64_emit_ops): Add the new functions.
9081 (i386_emit_eq_goto): New function.
9082 (i386_emit_ne_goto): New function.
9083 (i386_emit_lt_goto): New function.
9084 (i386_emit_le_goto): New function.
9085 (i386_emit_gt_goto): New function.
9086 (i386_emit_ge_goto): New function.
9087 (i386_emit_ops): Add the new functions.
9089 2011-09-08 Stan Shebs <stan@codesourcery.com>
9091 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9092 (i386_emit_epilogue): Restore %ebx.
9094 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9096 * server.c (step_thread): Remove definition.
9097 (process_serial_event): Don't handle Hs.
9098 * server.h (step_thread): Remove declaration.
9099 * target.c (set_desired_inferior): Remove use of step_thread.
9101 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9103 * linux-low.c: Include linux-procfs.h.
9104 (linux_attach_lwp_1): Update comments.
9105 (linux_attach): Scan for existing threads when attaching to a
9106 process that is the tgid.
9107 * Makefile.in: Update dependencies.
9109 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9111 * configure.srv: Add linux-procfs.o dependencies.
9113 2011-08-14 Yao Qi <yao@codesourcery.com>
9115 * target.h (struct target_ops): Fix indent.
9116 * win32-low.c (win32_target_ops): Fix comment.
9118 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9119 Yao Qi <yao@codesourcery.com>
9121 * Makefile.in (clean): Remove tic6x-*.c files.
9122 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9123 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9124 (tic6x-c64xp-linux.c): Likewise.
9125 * configure.srv: Add support for tic6x-*-uclinux.
9126 * linux-tic6x-low.c: New.
9127 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9129 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9130 Yao Qi <yao@codesourcery.com>
9132 * target.h (struct target_ops): Add read_loadmap.
9133 * linux-low.c (struct target_loadseg): New type.
9134 (struct target_loadmap): New type.
9135 (linux_read_loadmap): New function.
9136 (linux_target_ops): Add linux_read_loadmap.
9137 * server.c (handle_query): Support qXfer:fdpic:read packet.
9138 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9141 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9143 * win32-low.c: Include <stdint.h>.
9145 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9147 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9148 to the inferior here.
9149 (i386_remove_aligned_watchpoint): Ditto.
9150 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9151 fit part of the watchpoint in the debug registers.
9152 (i386_update_inferior_debug_regs): New.
9153 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9154 registers, and only update the inferior on success.
9155 (i386_low_remove_watchpoint): Ditto.
9157 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9159 * linux-low.c (compare_ints, unique, list_threads, show_process,
9160 linux_core_of_thread): Delete.
9161 (linux_target_ops): Change linux_core_of_thread to
9162 linux_common_core_of_thread.
9163 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9164 * utils.c (malloc_failure): Change type of argument.
9165 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9166 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9167 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9168 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9169 (IPA_OBJS): Add common-utils-ipa.o.
9170 (ptid_h, linux_osdata_h): New macros.
9171 (server_h): Add common/common-utils.h, common/xml-utils.h,
9172 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9174 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9175 ptid.o, buffer.o): New rules.
9176 (linux-low.o): Add common/linux-osdata.h as a dependency.
9177 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9178 * configure.ac: Add AC_HEADER_DIRENT check.
9179 * config.in: Regenerate.
9180 * configure: Regenerate.
9181 * remote-utils.c (xml_escape_text): Delete.
9182 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9183 buffer_xml_printf): Move to common/buffer.c.
9184 * server.c (main): Remove call to initialize_inferiors.
9185 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9186 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9187 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9188 internal_error, gdb_assert, gdb_assert_fail): Delete.
9189 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9190 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9192 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9193 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9194 initialize_inferiors): Delete.
9196 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9198 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9201 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9203 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9205 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9207 2011-05-26 Yao Qi <yao@codesourcery.com>
9209 * Makefile.in (thread-db.o): Track dependence to
9210 common/gdb_thread_db.h.
9211 * thread-db.c: include gdb_thread_db.h from right place.
9213 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9215 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9216 __FILE__ and __LINE__ to internal_error.
9218 2011-05-13 Doug Evans <dje@google.com>
9220 * thread-db.c (try_thread_db_load_from_sdir): New function.
9221 (try_thread_db_load_from_dir): New function.
9222 (thread_db_load_search): Handle $sdir, ignore $pdir.
9223 Remove trying of system directories if search of
9224 libthread-db-search-path fails, that is now done via $sdir.
9226 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9228 * server.c (handle_query): Add EnableDisableTracepoints to the list
9229 of supported features.
9230 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9232 (cmd_qtenable_disable): New.
9233 (cmd_qtstart): Install tracepoints even if disabled.
9234 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9235 receiving a QTEnable or QTDisable packet.
9236 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9237 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9239 (gdb_probe): Skip data collection if static tracepoint is disabled.
9241 2011-05-10 Doug Evans <dje@google.com>
9243 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9245 2011-05-04 Doug Evans <dje@google.com>
9247 * linux-low.c (linux_join): Skip process lookup.
9248 * spu-low.c (spu_join): Ditto.
9249 * server.c (join_inferiors_callback): Delete.
9250 (process_serial_event): For 'D' packet (detach) call join_inferior
9253 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9255 * README: Don't mention xscale*-*-linux*.
9256 * configure.srv (xscale*-*-linux*): Don't handle target.
9258 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9260 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9262 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9263 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9264 (i386_emit_void_call_2): Likewise.
9266 2011-04-26 Yao Qi <yao@codesourcery.com>
9268 * linux-low.c: Move common macros to linux-ptrace.h.
9269 Include linux-ptrace.h.
9270 * Makefile.in (linux_ptrace_h): New.
9271 (linux-low.o): Depends on linux-ptrace.h.
9273 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9275 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9276 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9277 (remote_prepare): New function with most of the TCP code from ...
9278 (remote_open): ... here. Detect PORT here unconditionally. Move also
9279 setting transport_is_reliable.
9280 * server.c (run_once): New variable.
9281 (gdbserver_usage): Document it.
9282 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9283 the first run if RUN_ONCE.
9284 * server.h (run_once, remote_prepare): New declarations.
9286 2011-04-19 Tom Tromey <tromey@redhat.com>
9288 * win32-low.c (handle_load_dll): Remove duplicate "the".
9290 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9292 Remove support for old Cygwin 1.5 versions.
9293 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9294 function to avoid warning.
9295 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9298 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9300 * gdbserver/server.h (Macro _): Define it if not available.
9302 2011-03-14 Michael Snyder <msnyder@vmware.com>
9304 * hostio.c (handle_close): Remove unnecessary null test.
9306 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9308 * Makefile.in (maintainer-clean realclean distclean): Remove
9309 "make ... subdir_do" command.
9311 2011-03-10 Michael Snyder <msnyder@vmware.com>
9313 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9315 * server.c (handle_v_run): Free alloced buffer on early return.
9317 2011-03-09 Yao Qi <yao@codesourcery.com>
9320 2011-03-04 Yao Qi <yao@codesourcery.com>
9322 * Makefile.in: Remove GNU make feature --directory.
9324 2011-03-05 Yao Qi <yao@codesourcery.com>
9326 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9327 (subdir_do): New make target. Copied from gdb/Makefile.
9328 (maintainer-clean, realclean, distclean, clean): Call corresponding
9329 make targets in common/Makefile.
9331 2011-02-11 Yao Qi <yao@codesourcery.com>
9333 * configure.ac: Call AC_PROG_RANLIB.
9334 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9335 * configure: Regenerate.
9337 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9339 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9341 2011-03-06 Yao Qi <yao@codesourcery.com>
9343 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9345 2011-03-05 Yao Qi <yao@codesourcery.com>
9347 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9348 (subdir_do): New make target. Copied from gdb/Makefile.
9349 (maintainer-clean, realclean, distclean, clean): Call corresponding
9350 make targets in common/Makefile.
9352 2011-03-04 Yao Qi <yao@codesourcery.com>
9354 * Makefile.in: Remove GNU make feature --directory.
9356 2011-03-04 Michael Snyder <msnyder@vmware.com>
9358 * server.c (queue_stop_reply): Call xmalloc not malloc.
9360 2011-03-02 Michael Snyder <msnyder@vmware.com>
9362 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9364 2011-02-28 Michael Snyder <msnyder@vmware.com>
9366 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9367 (cmd_qtframe): Ditto.
9368 (cmd_qtbuffer): Ditto.
9369 (cmd_bigqtbuffer): Ditto.
9371 * utils.c (decimal2str): Initialize 'width' to nine, then
9374 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9376 * hostio.c (require_data): Free *data, not data.
9378 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9380 * hostio.c (require_data): Use free, not xfree.
9382 2011-02-27 Michael Snyder <msnyder@vmware.com>
9384 * server.c (handle_query): Discard unused value.
9386 * hostio.c (require_data): Free malloc memory before returning
9389 2011-02-26 Michael Snyder <msnyder@vmware.com>
9391 * linux-low.c (list_threads): Call closedir for dirent.
9393 2011-02-27 Michael Snyder <msnyder@vmware.com>
9395 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9396 a case statement falls through.
9398 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9400 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9403 2011-02-26 Michael Snyder <msnyder@vmware.com>
9405 * utils.c (decimal2str): Eliminate dead code and dead param.
9406 (pulongest): Drop dead param from call to decimal2str.
9409 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9411 Revert the following patch (not approved yet):
9412 2011-02-21 Hui Zhu <teawater@gmail.com>
9413 * tracepoint.c (tp_printf): New function.
9414 (eval_agent_expr): Handle gdb_agent_op_printf.
9416 2011-02-21 Hui Zhu <teawater@gmail.com>
9418 * tracepoint.c (tp_printf): New function.
9419 (eval_agent_expr): Handle gdb_agent_op_printf.
9421 2011-02-18 Tom Tromey <tromey@redhat.com>
9423 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9424 (tracepoint.o): Likewise.
9425 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9426 (gdb_agent_op_names): Likewise.
9428 2011-02-18 Tom Tromey <tromey@redhat.com>
9430 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9431 gdb_agent_op_rot>: New constants.
9432 (gdb_agent_op_names): Add pick and roll.
9433 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9436 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9438 * aclocal.m4: Regenerated with aclocal-1.11.1.
9440 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9442 * server.c (handle_qxfer_traceframe_info): New.
9443 (qxfer_packets): Register "traceframe-info".
9444 (handle_query): Report support for qXfer:traceframe-info:read+.
9445 * tracepoint.c (match_blocktype): New.
9446 (traceframe_find_block_type): Rename to ...
9447 (traceframe_walk_blocks): ... this. Add callback filter argument,
9449 (traceframe_find_block_type): New, reimplemented on top of
9450 traceframe_walk_blocks.
9451 (build_traceframe_info_xml): New.
9452 (traceframe_read_info): New.
9453 * server.h (traceframe_read_info): Declare.
9455 2011-02-11 Yao Qi <yao@codesourcery.com>
9457 * configure.ac: Call AC_PROG_RANLIB.
9458 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9459 * configure: Regenerate.
9461 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9463 * server.c (gdb_read_memory): Change return semantics to allow
9465 (handle_search_memory_1): Adjust.
9466 (process_serial_event) <'m' packet>: Handle partial transfers.
9467 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9469 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9471 * regcache.c (init_register_cache): Initialize
9472 regcache->register_status.
9473 (free_register_cache): Release regcache->register_status.
9474 (regcache_cpy): Copy register_status.
9475 (registers_to_string): Print 'x's for unavailable registers.
9476 (supply_register): Mark the register's status valid or
9477 unavailable, depending on whether a buffer was passed in or not.
9478 (supply_register_zeroed): New.
9479 (supply_regblock): Mark the registers' status valid or
9480 unavailable, depending on whether a buffer was passed in or not.
9481 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9482 (struct regcache): New `register_status' field.
9483 (supply_register_zeroed): Declare.
9484 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9485 supply_register_zeroed, rather than passing a NULL buffer to
9487 * tracepoint.c (fetch_traceframe_registers): Update comment.
9489 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9491 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9494 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9496 * server.h (decode_xfer_write): Change prototype.
9497 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9498 and don't extract the annex here.
9499 * server.c (decode_xfer_read): Remove `annex' parameter,
9500 and don't extract the annex here.
9502 (struct qxfer): New.
9503 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9504 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9505 (handle_qxfer_statictrace): New functions, abstracted out from
9506 handle_query, and made to use the struct qxfer interface.
9507 (handle_threads_qxfer_proper): Rename to ...
9508 (handle_qxfer_threads_proper): ... this.
9509 (handle_threads_qxfer): Rename to ...
9510 (handle_qxfer_threads): ... this. Adjust.
9511 (qxfer_packets): New array.
9512 (handle_qxfer): New function.
9513 (handle_query): Use handle_qxfer.
9515 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9517 * gdbreplay.c: Shorten lines of >= 80 columns.
9518 * linux-low.c: Ditto.
9519 * linux-ppc-low.c: Ditto.
9520 * linux-s390-low.c: Ditto.
9521 * linux-sparc-low.c: Ditto.
9522 * linux-x86-low.c: Ditto.
9523 * linux-xtensa-low.c: Ditto.
9524 * mem-break.c: Ditto.
9526 * regcache.h: Ditto.
9527 * remote-utils.c: Ditto.
9530 * thread-db.c: Ditto.
9531 * tracepoint.c: Ditto.
9533 * win32-low.h: Ditto.
9535 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9537 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9540 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9542 * server.c (gdbserver_version): Update copyright year in version
9544 * gdbreplay.c (gdbreplay_version): Ditto.
9546 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9548 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9549 * linux-bfin-low.c: New file.
9550 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9551 PT_DATA_ADDR for BFIN targets.
9552 * Makefile.in (SFILES): Add linux-bfin-low.c.
9553 (clean): Remove reg-bfin.c.
9554 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9555 * README: Mention supported Blackfin targets.
9557 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9559 * .gitignore: New file.
9561 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9563 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9565 2010-10-22 Jie Zhang <jie@codesourcery.com>
9567 * Makefile.in: Add FLAGS_TO_PASS variable.
9568 (install): Remove dependency of install-only and recursively
9569 invoke make for install-only.
9571 2010-10-04 Doug Evans <dje@google.com>
9573 * Makefile.in (uninstall): Use $(DESTDIR).
9575 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9579 * linux-x86-low.c (compat_siginfo_from_siginfo)
9580 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9581 si_code is < 0. Check for si_code == SI_TIMER before checking for
9584 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9586 * lynx-i386-low.c: New file.
9587 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9589 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9591 * lynx-low.c (ptrace_request_to_str): Remove handling for
9592 request values that have been removed in LynxOS 5.x.
9594 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9596 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9599 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9601 * configure.ac: Add --enable-inprocess-agent option.
9602 * configure: Rebuilt.
9604 2010-09-06 Yao Qi <yao@codesourcery.com>
9606 * linux-low.c (linux_kill): Remove unused variable.
9607 (linux_stabilize_threads): Likewise.
9608 * server.c (start_inferior): Likewise.
9609 (queue_stop_reply_callback): Likewise.
9610 * tracepoint.c (do_action_at_tracepoint): Likewise.
9612 2010-09-06 Yao Qi <yao@codesourcery.com>
9614 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9617 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9619 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9621 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9623 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9626 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9628 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9629 gdbserver/lynx-ppc-low.c: New files.
9630 * Makefile.in (lynx_low_h): New variable.
9631 (lynx-low.o, lynx-ppc-low.o): New rules.
9632 * configure.ac: On LynxOS, link with -lnetinet.
9633 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9634 * configure: regenerate.
9636 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9638 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9639 * configure.ac: Add check for vasprintf and vsnprintf.
9640 * configure, config.in: Regenerate.
9641 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9643 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9645 * gdbreplay.c: Move include of alloca.h up, next to include of
9647 * server.h: Add include of malloc.h.
9648 * mem-break.c: Remove include of malloc.h.
9649 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9651 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9653 * Makefile.in (memmem.o): Build with -Wno-error.
9655 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9657 * utils.c (xsnprintf): Make non-static.
9658 * server.h: Add xsnprintf declaration.
9659 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9660 replace calls to snprintf by calls to xsnprintf throughout.
9662 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9664 * configure.ac: Add configure check for alloca.
9665 * configure, config.in: Regenerate.
9666 * server.h: Include alloca.h if it exists.
9667 * gdbreplay.c: Include alloca.h if it exists.
9669 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9671 * linux-low.c (__SIGRTMIN): Define if not already defined.
9672 (linux_create_inferior): Check for __ANDROID__ rather than
9674 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9675 are already deferred.
9676 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9677 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9678 stopped and already has a pending signal to report.
9679 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9680 a pending signal to report or is moving out of a jump pad.
9681 (linux_init_signals): Check for __ANDROID__ rather than
9684 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9686 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9687 debug_threads check. Avoid a linear search when not doing debug
9690 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9692 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9693 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9694 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9695 (process_event): Change local fd's type to gdb_fildes_t.
9696 (create_file_handler): Adjust prototype.
9697 (delete_file_handler): Adjust prototype.
9698 (handle_file_event): Adjust prototype. Use pfildes.
9699 (create_file_event): Adjsut prototype.
9700 * remote-utils.c (remote_desc, listen_desc): Change type to
9702 * server.h: New gdb_fildes_t typedef.
9703 [USE_WIN32API]: Include winsock2.h.
9704 (delete_file_handler, add_file_handler): Adjust prototypes.
9706 * utils.c (pfildes): New.
9708 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9710 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9711 * configure: Regenerate.
9713 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9715 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9716 (linux_done_accessing_memory): ... this.
9717 (linux_target_ops): Adjust.
9718 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9719 * nto-low.c (nto_target_ops): Adjust comment.
9720 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9721 * spu-low.c (spu_target_ops): Adjust comment.
9722 * target.h (target_ops): Rename unprepare_to_access_memory field
9723 to done_accessing_memory.
9724 (unprepare_to_access_memory): Rename to ...
9725 (done_accessing_memory): ... this.
9727 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9729 * linux-low.c (linux_prepare_to_access_memory): New.
9730 (linux_unprepare_to_access_memory): New.
9731 (linux_target_ops): Install them.
9732 * server.c (read_memory): Rename to ...
9733 (gdb_read_memory): ... this. Use
9734 prepare_to_access_memory/prepare_to_access_memory.
9735 (write_memory): Rename to ...
9736 (gdb_write_memory): ... this. Use
9737 prepare_to_access_memory/prepare_to_access_memory.
9738 (handle_search_memory_1): Adjust.
9739 (process_serial_event): Adjust.
9740 * target.h (struct target_ops): New fields
9741 prepare_to_access_memory and unprepare_to_access_memory.
9742 (prepare_to_access_memory, unprepare_to_access_memory): New.
9743 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9744 prepare_to_access_memory/prepare_to_access_memory.
9745 * nto-low.c (nto_target_ops): Adjust.
9746 * spu-low.c (spu_target_ops): Adjust.
9747 * win32-low.c (win32_target_ops): Adjust.
9749 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9751 * Makefile.in (WARN_CFLAGS): Get it from configure.
9752 (WERROR_CFLAGS): New.
9753 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9754 * configure.ac: Introduce --enable-werror, which adds -Werror to
9755 the compiler command line. Enabled by default. Disable with
9756 --disable-werror. Add -Wdeclaration-after-statement
9757 Wpointer-arith and -Wformat-nonliteral to warning flags.
9758 * configure: Regenerate.
9760 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9762 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9764 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9766 * gdbreplay.c (remote_error): New.
9768 (expect): Use gdbchar. Check for error reading from GDB.
9769 Clarify sync error output.
9770 (play): Check for errors writing to GDB.
9771 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9772 * remote-utils.c (getpkt): Check for errors writing to the remote
9775 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9777 * linux-low.c (linux_wait_1): Move non-debugging code out of
9778 `debug_threads' control.
9780 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9782 * linux-low.c (linux_wait_1): Don't set last_status here.
9783 * server.c (push_event, queue_stop_reply_callback): Assert we're
9784 not pushing a TARGET_WAITKIND_IGNORE event.
9785 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9786 (myresume, handle_target_event): Set the thread's last_resume_kind
9787 and last_status from the target returned status.
9789 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9793 * linux-x86-low.c (update_debug_registers_callback): New.
9794 (i386_dr_low_set_addr): Use it.
9795 (i386_dr_low_get_addr): New.
9796 (i386_dr_low_set_control): Use update_debug_registers_callback.
9797 (i386_dr_low_get_control): New.
9798 (i386_dr_low_get_status): Adjust.
9799 * linux-low.c (linux_stop_lwp): New.
9800 * linux-low.h (linux_stop_lwp): Declare.
9802 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9803 argument instead of a i386_debug_reg_state.
9804 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9805 a i386_debug_reg_state.
9806 (i386_insert_aligned_watchpoint): Adjust.
9807 (i386_remove_aligned_watchpoint): Adjust.
9808 (i386_low_stopped_data_address): Read the debug registers from the
9809 inferior instead of from the mirrors.
9810 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9811 (i386_dr_low_get_addr): Declare.
9812 (i386_dr_low_get_control): Declare.
9813 (i386_dr_low_get_status): Change prototype.
9815 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9816 (i386_dr_low_get_addr): New.
9817 (i386_dr_low_get_control): New.
9818 (i386_dr_low_get_status): Adjust prototype. Return
9820 (i386_initial_stuff): Clear dr_status_mirror and
9822 (i386_get_thread_context): Adjust.
9823 (i386_set_thread_context): Adjust.
9824 (i386_thread_added): Adjust.
9826 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9828 * linux-low.h (linux_thread_area): Delete declaration.
9830 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9832 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9833 after its termination.
9835 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9837 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9838 (gdb_wants_all_stopped): Delete.
9839 (linux_wait_1): Don't call them.
9840 * server.c (handle_v_cont): Tag all threads as want-stopped.
9841 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9842 stopped as "client-wants-stopped".
9844 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9846 * Makefile.in (signals_h): New.
9847 (server_h): Depend on it.
9848 (server.o): Don't depend on $(signals_def).
9849 (signals.o): Depend on $(signals_def).
9851 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9853 * Makefile.in (signals_def): New.
9854 (server_h): Append include/gdb/signals.h and signals_def.
9855 (server.o): Append signals_def.
9857 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9859 * server.c (handle_target_event): Use target_signal_to_host for
9860 resume_info.sig initialization.
9861 * target.h (struct thread_resume) <sig>: New comment.
9863 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9865 * server.c (handle_query): strcpy() the returned string from paddress()
9866 instead of sprintf().
9867 * utils.c (paddress): Return phex_nz().
9869 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9871 * server.c (handle_v_cont): Call mourn_inferior if process
9873 (myresume): Likewise.
9875 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9877 Static tracepoints, and integration with UST.
9879 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9880 * mem-break.c (uninsert_all_breakpoints)
9881 (reinsert_all_breakpoints): New.
9882 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9883 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9884 (gdb_agent_ust_loaded, helper_thread_id)
9885 (gdb_agent_helper_thread_id): New macros.
9886 (struct ipa_sym_addresses): Add addr_ust_loaded,
9887 addr_helper_thread_id, addr_cmd_buf.
9888 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9889 (in_process_agent_loaded_ust): New.
9890 (write_e_ust_not_loaded): New.
9891 (maybe_write_ipa_ust_not_loaded): New.
9892 (struct collect_static_trace_data_action): New.
9893 (enum tracepoint_type) <static_tracepoint>: New.
9894 (struct tracepoint) <handle>: Mention static tracepoints.
9895 (struct static_tracepoint_ctx): New.
9896 (CMD_BUF_SIZE): New.
9897 (add_tracepoint_action): Handle static tracepoint actions.
9898 (unprobe_marker_at): New.
9899 (clear_installed_tracepoints): Handle static tracepoints.
9900 (cmd_qtdp): Handle static tracepoints.
9901 (probe_marker_at): New.
9902 (cmd_qtstart): Handle static tracepoints.
9903 (response_tracepoint): Handle static tracepoints.
9904 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9905 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9906 (get_context_regcache): Handle static tracepoints.
9907 (do_action_at_tracepoint): Handle static tracepoint actions.
9908 (traceframe_find_block_type): Handle static trace data blocks.
9909 (traceframe_read_sdata): New.
9910 (download_tracepoints): Download static tracepoint actions.
9911 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9912 (GDB_PROBE_NAME): New.
9917 (ust_marker_to_static_tracepoint): New.
9919 (collect_ust_data_at_tracepoint): New.
9920 (gdb_ust_probe): New.
9921 (UNIX_PATH_MAX, SOCK_DIR): New.
9922 (gdb_ust_connect_sync_socket): New.
9923 (resume_thread, stop_thread): New.
9924 (run_inferior_command): New.
9925 (init_named_socket): New.
9926 (gdb_ust_socket_init): New.
9927 (cstr_to_hexstr): New.
9929 (first_marker, next_marker): New.
9930 (response_ust_marker): New.
9931 (cmd_qtfstm, cmd_qtsstm): New.
9932 (unprobe_marker_at, probe_marker_at): New.
9933 (cmd_qtstmat, gdb_ust_thread): New.
9934 (gdb_ust_init): New.
9935 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9936 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9938 (x86_64_st_collect_regmap): New.
9939 (X86_64_NUM_ST_COLLECT_GREGS): New.
9940 (AMD64_RIP_REGNUM): New.
9941 (supply_static_tracepoint_registers): New.
9942 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9944 (i386_st_collect_regmap): New.
9945 (i386_NUM_ST_COLLECT_GREGS): New.
9946 (supply_static_tracepoint_registers): New.
9947 * server.c (handle_query): Handle qXfer:statictrace:read.
9948 <qSupported>: Report support for StaticTracepoints, and
9949 qXfer:statictrace:read features.
9950 * server.h (traceframe_read_sdata)
9951 (supply_static_tracepoint_registers): Declare.
9952 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9953 (unpack_varlen_hex): Include in IPA build.
9954 * Makefile.in (ustlibs, ustinc): New.
9955 (IPA_OBJS): Add remote-utils-ipa.o.
9956 ($(IPA_LIB)): Link -ldl and -lpthread.
9958 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9959 * config.in, configure: Regenerate.
9961 2010-06-20 Ian Lance Taylor <iant@google.com>
9962 Pedro Alves <pedro@codesourcery.com>
9964 * linux-x86-low.c (always_true): Delete.
9965 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9966 trying to fool the compiler with always_true.
9968 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9970 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9971 conditions in gdbserver.
9973 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9975 * spu-low.c (spu_read_memory): Wrap around local store limit.
9976 (spu_write_memory): Likewise.
9978 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9980 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9981 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9983 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9985 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9986 uses with LONGEST uses.
9988 2010-06-14 Stan Shebs <stan@codesourcery.com>
9989 Pedro Alves <pedro@codesourcery.com>
9993 * linux-x86-low.c: Include limits.h.
9998 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9999 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10000 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10001 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10002 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10003 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10004 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10005 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10006 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10007 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10008 (amd64_emit_void_call_2): New.
10009 (amd64_emit_ops): New.
10010 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10011 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10012 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10013 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10014 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10015 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10016 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10017 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10018 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10019 (i386_emit_stack_adjust, i386_emit_int_call_1)
10020 (i386_emit_void_call_2): New.
10021 (i386_emit_ops): New.
10022 (x86_emit_ops): New.
10023 (the_low_target): Install x86_emit_ops.
10024 * server.h (struct emit_ops): New.
10025 (get_raw_reg_func_addr): Declare.
10026 (current_insn_ptr, emit_error): Declare.
10027 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10028 (set_trace_state_variable_value): New defines.
10029 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10030 addr_get_trace_state_variable_value and
10031 addr_set_trace_state_variable_value.
10032 (symbol_list): New fields for get_raw_reg,
10033 get_trace_state_variable_value and set_trace_state_variable_value.
10034 (condfn): New typedef.
10035 (struct tracepoint): New field `compiled_cond'.
10036 (do_action_at_tracepoint): Clear compiled_cond.
10037 (get_trace_state_variable_value, set_trace_state_variable_value):
10039 (condition_true_at_tracepoint): If there's a compiled condition,
10041 (current_insn_ptr, emit_error): New globals.
10042 (struct bytecode_address): New.
10043 (get_raw_reg_func_addr): New.
10044 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10045 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10046 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10047 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10048 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10049 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10050 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10051 (compile_tracepoint_condition, compile_bytecodes): New.
10052 * target.h (emit_ops): Forward declare.
10053 (struct target_ops): New field emit_ops.
10054 (target_emit_ops): New.
10055 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10056 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10057 * linux-low.c (linux_emit_ops): New.
10058 (linux_target_ops): Install it.
10059 * linux-low.h (struct linux_target_ops): New field emit_ops.
10061 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10063 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10064 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10066 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10067 Stan Shebs <stan@codesourcery.com>
10069 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10070 (all): Depend on $(extra_libraries).
10071 (install-only): Install the IPA.
10072 (IPA_OBJS, IPA_LIB): New.
10073 (clean): Remove the IPA lib.
10074 (IPAGENT_CFLAGS): New.
10075 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10076 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10077 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10078 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10079 * configure.ac: Check for atomic builtins support in the compiler.
10080 (IPA_DEPFILES, extra_libraries): Define.
10081 * configure.srv (ipa_obj): Add description.
10082 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10083 (i[34567]86-*-linux*): Set ipa_obj.
10084 (x86_64-*-linux*): Set ipa_obj.
10085 * linux-low.c (stabilizing_threads): New.
10086 (supports_fast_tracepoints): New.
10087 (linux_detach): Stabilize threads before detaching.
10088 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10089 the lwp is either not stabilizing, or is moving out of a jump pad.
10090 (linux_fast_tracepoint_collecting): New.
10091 (maybe_move_out_of_jump_pad): New.
10092 (enqueue_one_deferred_signal): New.
10093 (dequeue_one_deferred_signal): New.
10094 (linux_wait_for_event_1): If moving out of a jump pad, defer
10095 pending signals to later.
10096 (linux_stabilize_threads): New.
10097 (linux_wait_1): Check if threads need moving out of jump pads, and
10099 (stuck_in_jump_pad_callback): New.
10100 (move_out_of_jump_pad_callback): New.
10101 (lwp_running): New.
10102 (linux_resume_one_lwp): Handle moving out of jump pads.
10103 (linux_set_resume_request): Dequeue deferred signals.
10104 (need_step_over_p): Also step over fast tracepoint jumps.
10105 (start_step_over): Also uninsert fast tracepoint jumps.
10106 (finish_step_over): Also reinsert fast tracepoint jumps.
10107 (linux_install_fast_tracepoint_jump): New.
10108 (linux_target_ops): Install linux_stabilize_threads and
10109 linux_install_fast_tracepoint_jump_pad.
10110 * linux-low.h (linux_target_ops) <get_thread_area,
10111 install_fast_tracepoint_jump_pad>: New fields.
10112 (struct lwp_info) <collecting_fast_tracepoint,
10113 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10114 (linux_get_thread_area): Declare.
10115 * linux-x86-low.c (jump_insn): New.
10116 (x86_get_thread_area): New.
10117 (append_insns): New.
10118 (push_opcode): New.
10119 (amd64_install_fast_tracepoint_jump_pad): New.
10120 (i386_install_fast_tracepoint_jump_pad): New.
10121 (x86_install_fast_tracepoint_jump_pad): New.
10122 (the_low_target): Install x86_get_thread_area and
10123 x86_install_fast_tracepoint_jump_pad.
10124 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10125 (struct fast_tracepoint_jump): New.
10126 (fast_tracepoint_jump_insn): New.
10127 (fast_tracepoint_jump_shadow): New.
10128 (find_fast_tracepoint_jump_at): New.
10129 (fast_tracepoint_jump_here): New.
10130 (delete_fast_tracepoint_jump): New.
10131 (set_fast_tracepoint_jump): New.
10132 (uninsert_fast_tracepoint_jumps_at): New.
10133 (reinsert_fast_tracepoint_jumps_at): New.
10134 (set_breakpoint_at): Use write_inferior_memory.
10135 (uninsert_raw_breakpoint): Use write_inferior_memory.
10136 (check_mem_read): Mask out fast tracepoint jumps.
10137 (check_mem_write): Mask out fast tracepoint jumps.
10138 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10139 (set_fast_tracepoint_jump): Declare.
10140 (delete_fast_tracepoint_jump)
10141 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10142 (reinsert_fast_tracepoint_jumps_at): Declare.
10143 * regcache.c: Don't compile many functions when building the
10144 in-process agent library.
10145 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10146 the register buffer in the heap.
10147 (free_register_cache): If the register buffer isn't owned by the
10148 regcache, don't free it.
10149 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10150 pre-existing register caches.
10151 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10153 (convert_ascii_to_int): : Constify `from' parameter type.
10154 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10155 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10156 the needed buffer in-place.
10157 (relocate_instruction): New.
10158 * server.c (handle_query) <qSymbols>: If the target supports
10159 tracepoints, give it a chance of looking up symbols. Report
10160 support for fast tracepoints.
10161 (handle_status): Stabilize threads.
10162 (process_serial_event): Adjust.
10163 * server.h (struct fast_tracepoint_jump): Forward declare.
10164 (struct process_info) <fast_tracepoint_jumps>: New field.
10165 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10166 (decode_X_packet, decode_M_packet): Adjust.
10167 (relocate_instruction): Declare.
10168 (in_process_agent_loaded): Declare.
10169 (tracepoint_look_up_symbols): Declare.
10170 (struct fast_tpoint_collect_status): Declare.
10171 (fast_tracepoint_collecting): Declare.
10172 (force_unlock_trace_buffer): Declare.
10173 (handle_tracepoint_bkpts): Declare.
10174 (initialize_low_tracepoint)
10175 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10176 * target.h (struct target_ops) <stabilize_threads,
10177 install_fast_tracepoint_jump_pad>: New fields.
10178 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10179 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10180 [HAVE_STDINT_H]: Include stdint.h.
10181 (trace_debug_1): Rename to ...
10182 (trace_vdebug): ... this.
10183 (trace_debug): Rename to ...
10184 (trace_debug_1): ... this. Add `level' parameter.
10185 (trace_debug): New.
10186 (ATTR_USED, ATTR_NOINLINE): New.
10187 (IP_AGENT_EXPORT): New.
10188 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10189 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10190 (about_to_request_buffer_space, trace_buffer_is_full)
10191 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10192 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10193 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10194 (traceframe_write_count, traceframes_created)
10195 (trace_state_variables)
10196 New renaming defines.
10197 (struct ipa_sym_addresses): New.
10198 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10199 (symbol_list): New.
10200 (ipa_sym_addrs): New.
10201 (all_tracepoint_symbols_looked_up): New.
10202 (in_process_agent_loaded): New.
10203 (write_e_ipa_not_loaded): New.
10204 (maybe_write_ipa_not_loaded): New.
10205 (tracepoint_look_up_symbols): New.
10206 (debug_threads) [IN_PROCESS_AGENT]: New.
10207 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10208 (UNKNOWN_SIDE_EFFECTS): New.
10209 (stop_tracing): New.
10210 (flush_trace_buffer): New.
10211 (stop_tracing_bkpt): New.
10212 (flush_trace_buffer_bkpt): New.
10213 (read_inferior_integer): New.
10214 (read_inferior_uinteger): New.
10215 (read_inferior_data_pointer): New.
10216 (write_inferior_data_pointer): New.
10217 (write_inferior_integer): New.
10218 (write_inferior_uinteger): New.
10219 (struct collect_static_trace_data_action): Delete.
10220 (enum tracepoint_type): New.
10221 (struct tracepoint) <type>: New field `type'.
10222 <actions_str, step_actions, step_actions_str>: Only include in
10224 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10225 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10226 (tracepoints): Use IP_AGENT_EXPORT.
10227 (last_tracepoint): Don't include in the IPA.
10228 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10229 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10230 (alloced_trace_state_variables): New.
10231 (trace_state_variables): Use IP_AGENT_EXPORT.
10232 (traceframe_t): Delete unused variable.
10233 (circular_trace_buffer): Don't include in the IPA.
10234 (trace_buffer_start): Delete.
10235 (struct trace_buffer_control): New.
10236 (trace_buffer_free): Delete.
10237 (struct ipa_trace_buffer_control): New.
10238 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10239 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10241 (trace_buffer_ctrl): New.
10242 (TRACE_BUFFER_CTRL_CURR): New.
10243 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10244 Reimplement as macros.
10245 (trace_buffer_wrap): Delete.
10246 (traceframe_write_count, traceframe_read_count)
10247 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10248 (struct tracepoint_hit_ctx) <type>: New field.
10249 (struct fast_tracepoint_ctx): New.
10250 (memory_barrier): New.
10252 (record_tracepoint_error): Update atomically in the IPA.
10253 (clear_inferior_trace_buffer): New.
10254 (about_to_request_buffer_space): New.
10255 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10256 updating the same buffer.
10257 (add_tracepoint): Default the tracepoint's type to trap
10258 tracepoint, and orig_size to -1.
10259 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10260 internal variables.
10261 (create_trace_state_variable): New parameter `gdb'. Handle it.
10262 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10263 (cmd_qtdp): Handle fast tracepoints.
10264 (cmd_qtdv): Adjust.
10265 (max_jump_pad_size): New.
10266 (gdb_jump_pad_head): New.
10267 (get_jump_space_head): New.
10268 (claim_jump_space): New.
10269 (sort_tracepoints): New.
10270 (MAX_JUMP_SIZE): New.
10271 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10273 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10274 support. Upload fast traceframes, and delete internal IPA
10276 (stop_tracing_handler): New.
10277 (flush_trace_buffer_handler): New.
10278 (cmd_qtstop): Upload fast tracepoints.
10279 (response_tracepoint): Handle fast tracepoints.
10280 (tracepoint_finished_step): Upload fast traceframes. Set the
10281 tracepoint hit context's tracepoint type.
10282 (handle_tracepoint_bkpts): New.
10283 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10284 type. Add comment about fast tracepoints.
10285 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10286 non-existing action_str field.
10287 (get_context_regcache): Handle fast tracepoints.
10288 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10290 (fast_tracepoint_from_jump_pad_address): New.
10291 (fast_tracepoint_from_ipa_tpoint_address): New.
10292 (collecting_t): New.
10293 (force_unlock_trace_buffer): New.
10294 (fast_tracepoint_collecting): New.
10296 (gdb_collect): New.
10297 (write_inferior_data_ptr): New.
10298 (target_tp_heap): New.
10299 (target_malloc): New.
10300 (download_agent_expr): New.
10302 (download_tracepoints): New.
10303 (download_trace_state_variables): New.
10304 (upload_fast_traceframes): New.
10305 (IPA_FIRST_TRACEFRAME): New.
10306 (IPA_NEXT_TRACEFRAME_1): New.
10307 (IPA_NEXT_TRACEFRAME): New.
10308 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10309 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10310 (gdb_jump_pad_buffer_end): New.
10311 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10312 (initialize_tracepoint): Adjust.
10313 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10314 buffer. Initialize the low module.
10315 * utils.c (PREFIX, TOOLNAME): New.
10316 (malloc_failure): Use PREFIX.
10317 (error): In the IPA, an error causes an exit.
10318 (fatal, warning): Use PREFIX.
10319 (internal_error): Use TOOLNAME.
10320 (NUMCELLS): Increase to 10.
10321 * configure, config.in: Regenerate.
10323 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10325 * server.c (handle_query) <qSupported>: Do two passes over the
10326 qSupported string to avoid nesting strtok.
10328 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10330 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10332 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10333 -Wl,--dynamic-list.
10334 * configure: Regenerate.
10335 * proc-service.list: New.
10337 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10339 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10342 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10344 * gdbreplay.c (remote_open): Check error return from socket() call by
10345 its equality to -1 not by it being negative.
10346 * remote-utils.c (remote_open): Likewise.
10348 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10350 * config.h: Regenerate.
10352 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10354 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10355 doesn't provide PTRACE_GET_THREAD_AREA.
10357 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10359 * linux-m68k-low.c: Include <asm/ptrace.h>
10360 (ps_get_thread_area): Implement.
10362 2010-05-03 Doug Evans <dje@google.com>
10364 * event-loop.c (struct callback_event): New struct.
10365 (callback_list): New global.
10366 (append_callback_event, delete_callback_event): New functions.
10367 (process_callback): New function.
10368 (start_event_loop): Call it.
10369 * remote-utils.c (NOT_SCHEDULED): Define.
10370 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10371 moved out of readchar.
10372 (readchar): Rewrite. Call reschedule before returning.
10373 (reset_readchar): New function.
10374 (remote_close): Call it.
10375 (process_remaining, reschedule): New functions.
10376 * server.h (callback_handler_func): New typedef.
10377 (append_callback_event, delete_callback_event): Declare.
10379 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10381 * proc-service.c (ps_pglobal_lookup): Use
10382 thread_db_look_up_one_symbol.
10383 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10384 parameter. Use it instead of all_symbols_looked_up.
10385 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10387 (all_symbols_looked_up): Don't declare.
10388 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10389 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10391 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10392 Set all_symbols_looked_up here.
10393 (thread_db_look_up_one_symbol): New.
10394 (thread_db_get_tls_address): Adjust.
10395 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10396 thread_db object on the heap, and tentatively set it in the
10398 (thread_db_init): Don't set all_symbols_looked_up here.
10399 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10401 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10403 * linux-low.c (linux_kill, linux_detach): Adjust.
10404 (status_pending_p_callback): Remove redundant statement. Check
10405 for !TARGET_WAITIKIND_IGNORE, instead of
10406 TARGET_WAITKIND_STOPPED.
10407 (handle_tracepoints): Make sure LWP is locked. Adjust.
10408 (linux_wait_for_event_1): Adjust.
10409 (linux_cancel_breakpoints): New.
10410 (unsuspend_one_lwp): New.
10411 (unsuspend_all_lwps): New.
10412 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10413 (send_sigstop_callback): Change return type to int, add new
10414 `except' parameter and handle it.
10415 (suspend_and_send_sigstop_callback): New.
10416 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10417 pass them down. If SUSPEND, also increment the lwp's suspend
10419 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10420 (need_step_over_p): Don't consider suspended LWPs.
10421 (start_step_over): Adjust.
10422 (proceed_one_lwp): Change return type to int, add new `except'
10423 parameter and handle it.
10424 (unsuspend_and_proceed_one_lwp): New.
10425 (proceed_all_lwps): Use find_inferior instead of
10427 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10428 also decrement the suspend count of LWPs. Pass `except' down,
10429 instead of hacking its suspend count.
10430 (linux_pause_all): Add `freeze' parameter. Adjust.
10431 (linux_unpause_all): New.
10432 (linux_target_ops): Install linux_unpause_all.
10433 * server.c (handle_status): Adjust.
10434 * target.h (struct target_ops): New fields `unpause_all' and
10435 `cancel_breakpoints'. Add new parameter to `pause_all'.
10436 (pause_all): Add new `freeze' parameter.
10437 (unpause_all): New.
10438 (cancel_breakpoints): New.
10439 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10440 cancel breakpoints.
10441 (cmd_qtstart): Pause threads.
10442 (stop_tracing): Pause threads, and cancel breakpoints.
10443 * win32-low.c (win32_target_ops): Adjust.
10445 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10447 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10448 the inferior right away from here...
10449 (linux_wait_1): ... to here, and adjust to check the thread's
10450 last_resume_kind instead of the lwp's step or stop_expected flags.
10452 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10454 * README: Use consistent `GDB' and `GDBserver' spellings.
10456 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10458 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10459 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10460 (linux_detach_one_lwp): Assume the lwp is stopped.
10461 (any_thread_of): Delete.
10462 (linux_detach): Stop all lwps here. Don't blindly delete all
10464 (delete_lwp_callback): New.
10465 (linux_mourn): Delete all lwps of the process that is gone.
10466 (linux_wait_1): Don't delete the last lwp of the process here.
10467 * mem-break.h (mark_breakpoints_out): Declare.
10468 * mem-break.c (mark_breakpoints_out): New.
10469 (free_all_breakpoints): Use it.
10470 * server.c (handle_target_event): If the process is gone, mark
10472 * thread-db.c (struct thread_db) <create_bp>: New field.
10473 (thread_db_enable_reporting): Fix prototype. Store a thread event
10474 breakpoint reference in the thread_db struct.
10475 (thread_db_load_search): Clear the thread_db object.
10476 (try_thread_db_load_1): Ditto.
10477 (switch_to_process): New.
10478 (disable_thread_event_reporting): Use it.
10479 (remove_thread_event_breakpoints): New.
10480 (thread_db_detach, thread_db_mourn): Use it.
10482 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10484 * linux-low.c (linux_enable_event_reporting): New.
10485 (linux_wait_for_event_1, handle_extended_wait): Use it.
10487 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10489 * linux-low.c (linux_kill_one_lwp, linux_kill)
10490 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10491 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10492 SIGSTOP even if the LWP is stopped.
10493 (send_sigstop_callback): New.
10494 (stop_all_lwps): Use send_sigstop_callback instead.
10495 (linux_resume_one_thread): Adjust.
10496 (proceed_one_lwp): Still proceed an LWP that the client has
10497 requested to stop, if we haven't reported it as stopped yet. Make
10498 sure that LWPs the client want stopped, have a pending SIGSTOP.
10500 2010-04-26 Doug Evans <dje@google.com>
10502 * server.c (handle_general_set): Make static.
10504 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10505 Print received char after testing for error/eof instead of before.
10506 (input_interrupt): Tweak comment.
10508 2010-04-23 Doug Evans <dje@google.com>
10510 * server.c (start_inferior): Print inferior argv if --debug.
10512 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10514 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10515 * nto-x86-low.c: Include server.h
10517 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10519 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10520 be consistent with other sources of this directory.
10521 (init_registers_amd64): Correct name of source file of this function
10524 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10526 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10527 64-bit executables.
10529 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10531 * win32-i386-low.c: Add 64-bit support.
10532 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10533 (init_registers_amd64): Declare.
10534 (mappings): Add 64-bit version of array.
10535 (init_windows_x86): New function.
10536 (the_low_target): Change init_arch field to init_windows_x86.
10538 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10540 * win32-low.c: Adapt to support also 64-bit architecture.
10541 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10542 (get_image_name): Use SIZE_T type for local variable `done'.
10543 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10544 (toolhelp_get_dll_name): Idem.
10545 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10546 Use uintptr_t typecast to avoid warning.
10547 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10548 (handle_exception): Use phex_nz to avoid warning.
10549 (win32_wait): Remove unused local variable `process'.
10551 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10553 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10556 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10558 * configure.ac: Use `ws2_32' library for srv_mingw.
10559 * configure: Regenerate.
10560 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10561 * remote-utils.c: Likewise.
10563 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10565 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10566 if __x86_64__ is defined.
10568 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10570 * configure: Regenerate.
10572 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10574 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10575 * target.h (target_ops): New get_tib_address field.
10576 * win32-low.h (win32_thread_info): Add thread_local_base field.
10577 * win32-low.c (child_add_thread): Add tlb argument.
10578 Set thread_local_base field to TLB.
10579 (get_child_debug_event): Adapt to child_add_thread change.
10580 (win32_get_tib_address): New function.
10581 (win32_target_ops): Set get_tib_address field to
10582 win32_get_tib_address.
10583 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10585 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10587 * linux-low.c (linux_mourn): Also remove the process.
10588 * server.c (handle_target_event): Don't remove the process here.
10589 * nto-low.c (nto_mourn): New.
10590 (nto_target_ops): Install it.
10591 * spu-low.c (spu_mourn): New.
10592 (spu_target_ops): Install it.
10593 * win32-low.c (win32_mourn): New.
10594 (win32_target_ops): Install it.
10596 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10598 * server.h (buffer_xml_printf): Remove redundant `;'.
10600 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10602 * regcache.c (set_register_cache): Invalidate regcaches before
10603 changing the register cache layout.
10604 (regcache_invalidate_one): Allow a NULL regcache.
10605 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10606 regcaches before changing the register cache layout or the target
10609 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10611 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10612 variable warning on Linux/x86-64.
10614 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10616 GDBserver disconnected tracing support.
10618 * linux-low.c (linux_remove_process): Delete.
10619 (add_lwp): Don't set last_resume_kind here.
10620 (linux_kill): Use `mourn'.
10621 (linux_detach): Use `thread_db_detach', and `mourn'.
10622 (linux_mourn): New.
10623 (linux_attach_lwp_1): Adjust comment.
10624 (linux_attach): last_resume_kind moved the thread_info; adjust.
10625 (status_pending_p_callback): Adjust.
10626 (linux_wait_for_event_1): Adjust.
10627 (count_events_callback, select_singlestep_lwp_callback)
10628 (select_event_lwp_callback, cancel_breakpoints_callback)
10629 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10630 (proceed_one_lwp): Adjust.
10631 (linux_async): Add debug output.
10632 (linux_thread_stopped): New.
10633 (linux_pause_all): New.
10634 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10636 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10637 (thread_db_free): Delete declaration.
10638 (thread_db_detach, thread_db_mourn): Declare.
10639 * thread-db.c (thread_db_init): Use thread_db_mourn.
10640 (thread_db_free): Delete, split in two.
10641 (disable_thread_event_reporting): New.
10642 (thread_db_detach): New.
10643 (thread_db_mourn): New.
10645 * server.h (struct thread_info) <last_resume_kind>: New field.
10646 <attached>: Add comment.
10647 <gdb_detached>: New field.
10648 (handler_func): Change return type to int.
10649 (handle_serial_event, handle_target_event): Ditto.
10650 (gdb_connected): Declare.
10652 (disconnected_tracing): Declare.
10653 (stop_tracing): Declare.
10655 * server.c (handle_query) <qSupported>: Report support for
10656 disconnected tracing.
10657 (queue_stop_reply_callback): Account for running threads.
10658 (gdb_wants_thread_stopped): New.
10659 (gdb_wants_all_threads_stopped): New.
10660 (gdb_reattached_process): New.
10661 (handle_status): Clear the `gdb_detached' flag of all processes.
10662 In all-stop, stop all threads.
10663 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10664 (process_serial_event): If the remote connection breaks, or if an
10665 exit was forced with "monitor exit", force an event loop exit.
10666 Handle disconnected tracing on detach.
10667 (handle_serial_event): Adjust.
10668 (handle_target_event): If GDB isn't connected, forward events back
10669 to the inferior, unless the last process exited, in which case,
10670 exit gdbserver. Adjust interface.
10672 * remote-utils.c (remote_open): Don't block in accept. Instead
10673 register an event loop source on the listen socket file
10674 descriptor. Refactor bits into ...
10675 (listen_desc): ... this new global.
10676 (gdb_connected): ... this new function.
10677 (enable_async_notification): ... this new function.
10678 (handle_accept_event): ... this new function.
10679 (remote_close): Clear remote_desc.
10681 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10683 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10685 (mourn_inferior): Define.
10686 (target_process_qsupported): Avoid the dangling else problem.
10687 (thread_stopped): Define.
10688 (pause_all): Define.
10689 (target_waitstatus_to_string): Declare.
10690 * target.c (target_waitstatus_to_string): New.
10692 * tracepoint.c (tracing): Make extern.
10693 (disconnected_tracing): New.
10694 (stop_tracing): Make extern. Handle tracing stops due to GDB
10696 (cmd_qtdisconnected): New.
10697 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10698 (handle_tracepoint_general_set): Handle QTDisconnected.
10700 * event-loop.c (event_handler_func): Change return type to int.
10701 (process_event): Bail out if the event handler wants the event
10703 (handle_file_event): Ditto.
10704 (start_event_loop): Bail out if the event handler wants the event
10707 * nto-low.c (nto_target_ops): Adjust.
10708 * spu-low.c (spu_wait): Don't remove the process here.
10709 (spu_target_ops): Adjust.
10710 * win32-low.c (win32_wait): Don't remove the process here.
10711 (win32_target_ops): Adjust.
10713 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10715 * regcache.c (realloc_register_cache): Invalidate inferior's
10716 regcache before recreating it.
10718 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10720 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10722 2010-04-09 Stan Shebs <stan@codesourcery.com>
10723 Pedro Alves <pedro@codesourcery.com>
10725 * server.h (LONGEST): New.
10726 (struct thread_info) <while_stepping>: New field.
10727 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10729 (initialize_tracepoint, handle_tracepoint_general_set)
10730 (handle_tracepoint_query, tracepoint_finished_step)
10731 (tracepoint_was_hit, release_while_stepping_state_list):
10732 (current_traceframe): Declare.
10733 * server.c (handle_general_set): Handle tracepoint packets.
10734 (read_memory): New.
10735 (write_memory): New.
10736 (handle_search_memory_1): Use read_memory.
10737 (handle_query): Report support for conditional tracepoints, trace
10738 state variables, and tracepoint sources. Handle tracepoint
10740 (main): Initialize the tracepoints module.
10741 (process_serial_event): Handle traceframe reads/writes.
10743 * linux-low.c (handle_tracepoints): New.
10744 (linux_wait_1): Call it.
10745 (linux_resume_one_lwp): Handle while-stepping.
10746 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10747 (linux_target_ops): Install them.
10748 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10750 * linux-x86-low.c (x86_supports_tracepoints): New.
10751 (the_low_target). Install it.
10753 * mem-break.h (delete_breakpoint): Declare.
10754 * mem-break.c (delete_breakpoint): Make external.
10756 * target.h (struct target_ops): Add `supports_tracepoints',
10757 `read_pc', and `write_pc' fields.
10758 (target_supports_tracepoints): Define.
10759 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10762 * regcache.h (struct regcache) <registers_owned>: New field.
10763 (init_register_cache, regcache_cpy): Declare.
10764 (regcache_read_pc, regcache_write_pc): Declare.
10765 (register_cache_size): Declare.
10766 (supply_regblock): Declare.
10767 * regcache.c (init_register_cache): New.
10768 (new_register_cache): Use it.
10769 (regcache_cpy): New.
10770 (register_cache_size): New.
10771 (supply_regblock): New.
10772 (regcache_read_pc, regcache_write_pc): New.
10774 * tracepoint.c: New.
10776 * Makefile.in (OBS): Add tracepoint.o.
10777 (tracepoint.o): New rule.
10779 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10781 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10783 (i386-mmx.c): Likewise.
10784 (i386-mmx-linux.o): Likewise.
10785 (i386-mmx-linux.c): Likewise.
10787 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10788 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10789 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10790 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10792 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10793 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10794 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10796 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10798 * Makefile.in (clean): Updated.
10800 (i386-avx.c): Likewise.
10801 (i386-avx-linux.o): Likewise.
10802 (i386-avx-linux.c): Likewise.
10803 (amd64-avx.o): Likewise.
10804 (amd64-avx.c): Likewise.
10805 (amd64-avx-linux.o): Likewise.
10806 (amd64-avx-linux.c): Likewise.
10808 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10809 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10810 (srv_amd64_regobj): Add amd64-avx.o.
10811 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10812 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10813 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10814 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10815 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10816 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10817 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10819 * i387-fp.c: Include "i386-xstate.h".
10821 (i387_cache_to_xsave): Likewise.
10822 (i387_xsave_to_cache): Likewise.
10823 (x86_xcr0): Likewise.
10825 * i387-fp.h (i387_cache_to_xsave): Likewise.
10826 (i387_xsave_to_cache): Likewise.
10827 (x86_xcr0): Likewise.
10829 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10830 * linux-crisv32-low.c (target_regsets): Likewise.
10831 * linux-m68k-low.c (target_regsets): Likewise.
10832 * linux-mips-low.c (target_regsets): Likewise.
10833 * linux-ppc-low.c (target_regsets): Likewise.
10834 * linux-s390-low.c (target_regsets): Likewise.
10835 * linux-sh-low.c (target_regsets): Likewise.
10836 * linux-sparc-low.c (target_regsets): Likewise.
10837 * linux-xtensa-low.c (target_regsets): Likewise.
10839 * linux-low.c: Include <sys/uio.h>.
10840 (regsets_fetch_inferior_registers): Support nt_type.
10841 (regsets_store_inferior_registers): Likewise.
10842 (linux_process_qsupported): New.
10843 (linux_target_ops): Add linux_process_qsupported.
10845 * linux-low.h (regset_info): Add nt_type.
10846 (linux_target_ops): Add process_qsupported.
10848 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10850 (init_registers_i386_avx_linux): New.
10851 (init_registers_amd64_avx_linux): Likewise.
10852 (xmltarget_i386_linux_no_xml): Likewise.
10853 (xmltarget_amd64_linux_no_xml): Likewise.
10854 (PTRACE_GETREGSET): Likewise.
10855 (PTRACE_SETREGSET): Likewise.
10856 (x86_fill_xstateregset): Likewise.
10857 (x86_store_xstateregset): Likewise.
10858 (use_xml): Likewise.
10859 (x86_linux_update_xmltarget): Likewise.
10860 (x86_linux_process_qsupported): Likewise.
10861 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10862 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10863 init_registers_i386_linux here. Call
10864 x86_linux_update_xmltarget.
10865 (the_low_target): Add x86_linux_process_qsupported.
10867 * server.c (handle_query): Call target_process_qsupported.
10869 * target.h (target_ops): Add process_qsupported.
10870 (target_process_qsupported): New.
10872 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10874 * inferiors.c (add_thread): Set last_status kind to
10875 TARGET_WAITKIND_IGNORE.
10876 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10877 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10878 (linux_wait_1): Move `thread' local definition to block that uses
10879 it. Don't NULL initialize `event_child'.
10880 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10881 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10882 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10884 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10886 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10887 an extended waitstatus, or by a watchpoint.
10888 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10889 thread was stepping or has been stopped by a watchpoint.
10891 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10893 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10894 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10895 of another, then delete the previous, and validate all
10897 (validate_inserted_breakpoint): New.
10898 (delete_disabled_breakpoints): New.
10899 (validate_breakpoints): New.
10900 (check_mem_read): Validate breakpoints before trusting their
10901 shadow. Delete disabled breakpoints.
10902 (check_mem_write): Validate breakpoints before trusting they
10903 should be inserted. Delete disabled breakpoints.
10904 * mem-break.h (validate_breakpoints):
10905 * server.c (handle_query): Validate breakpoints when we see a
10908 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10910 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10911 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10912 if we could tell there's a GDB breakpoint at stop_pc.
10913 (need_step_over_p): Don't do a step over if we find a GDB
10914 breakpoint at the resume PC.
10916 * mem-break.c (struct raw_breakpoint): New.
10917 (enum bkpt_type): New type `gdb_breakpoint'.
10918 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10919 fields. New field `raw'.
10920 (find_raw_breakpoint_at): New.
10921 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10922 breakpoint instead.
10923 (set_breakpoint_at): Adjust.
10924 (delete_raw_breakpoint): New.
10925 (release_breakpoint): New.
10926 (delete_breakpoint): Rename to...
10927 (delete_breakpoint_1): ... this. Add proc parameter. Use
10928 release_breakpoint. Return ENOENT.
10929 (delete_breakpoint): Reimplement.
10930 (find_breakpoint_at): Delete.
10931 (find_gdb_breakpoint_at): New.
10932 (delete_breakpoint_at): Delete.
10933 (set_gdb_breakpoint_at): New.
10934 (delete_gdb_breakpoint_at): New.
10935 (gdb_breakpoint_here): New.
10936 (set_reinsert_breakpoint): Use release_breakpoint.
10937 (uninsert_breakpoint): Rename to ...
10938 (uninsert_raw_breakpoint): ... this.
10939 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10940 (reinsert_raw_breakpoint): Change parameter type to
10942 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10944 (check_breakpoints): Adjust. Use release_breakpoint.
10945 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10946 (breakpoint_inserted_here): Ditto.
10947 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10948 Don't trust the breakpoint's shadow if it is not inserted.
10949 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10950 (delete_all_breakpoints): Adjust.
10951 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10952 use delete_breakpoint_1.
10954 * mem-break.h (breakpoints_supported): Delete declaration.
10955 (set_gdb_breakpoint_at): Declare.
10956 (gdb_breakpoint_here): Declare.
10957 (delete_breakpoint_at): Delete.
10958 (delete_gdb_breakpoint_at): Declare.
10960 * server.h (struct raw_breakpoint): Forward declare.
10961 (struct process_info): New field `raw_breakpoints'.
10963 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10966 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10968 * linux-low.c (status_pending_p_callback): Fix comment.
10969 (linux_wait_for_event_1): Move most of the internal breakpoint
10970 handling from here...
10971 (linux_wait_1): ... to here.
10972 (count_events_callback): New.
10973 (select_singlestep_lwp_callback): New.
10974 (select_event_lwp_callback): New.
10975 (cancel_breakpoints_callback): New.
10976 (select_event_lwp): New.
10977 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10978 priority to all LWPs that have had events that should be reported
10979 to the client. Cancel breakpoints when about to reporting the
10980 event to the client, not while stopping lwps. No longer cancel
10981 finished single-steps here.
10982 (cancel_finished_single_step): Delete.
10983 (cancel_finished_single_steps): Delete.
10985 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10987 * mem-break.c (enum bkpt_type): New.
10988 (struct breakpoint): New field `type'.
10989 (set_breakpoint_at): Change return type to struct breakpoint
10990 pointer. Set type to `other_breakpoint' by default.
10991 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10992 in the breakpoint list.
10993 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10994 (reinsert_breakpoint): Rename to ...
10995 (reinsert_raw_breakpoint): ... this.
10996 (reinsert_breakpoints_at): Adjust.
10997 * mem-break.h (struct breakpoint): Declare.
10998 (set_breakpoint_at): Change return type to struct breakpoint
11001 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11003 * server.c (handle_query): Assign, not compare.
11005 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11007 Teach linux gdbserver to step-over-breakpoints.
11009 * linux-low.c (can_hardware_single_step): New.
11010 (supports_breakpoints): New.
11011 (handle_extended_wait): If stopping threads, read the stop pc of
11012 the new cloned LWP.
11014 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11015 low target doesn't support retrieving the PC.
11016 (add_lwp): Set last_resume_kind to resume_continue.
11017 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11018 (linux_attach): Don't clear stop_expected. Set the lwp's
11019 last_resume_kind to resume_stop.
11020 (linux_detach_one_lwp): Don't check for removed breakpoints.
11021 (check_removed_breakpoint): Delete.
11022 (status_pending_p): Rename to ...
11023 (status_pending_p_callback): ... this. Don't check for removed
11024 breakpoints. Don't consider threads that are stopped from GDB's
11026 (linux_wait_for_lwp): Always read the stop_pc here.
11027 (cancel_breakpoint): New.
11028 (step_over_bkpt): New global.
11029 (linux_wait_for_event_1): Implement stepping over breakpoints.
11030 (gdb_wants_lwp_stopped): New.
11031 (gdb_wants_all_stopped): New.
11032 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11033 single-step traps here. Store the thread's last reported target
11035 (send_sigstop): Don't clear stop_expected. Always set it,
11037 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11038 (cancel_finished_single_step): New.
11039 (cancel_finished_single_steps): New.
11040 (wait_for_sigstop): Don't cancel finished single-step traps here.
11041 (linux_resume_one_lwp): Don't check for removed breakpoints.
11042 Don't set `step' on non-hardware step archs.
11043 (linux_set_resume_request): Ignore resume_stop requests if already
11044 stopping or stopped. Set the lwp's last_resume_kind.
11045 (resume_status_pending_p): Don't check for removed breakpoints.
11046 (need_step_over_p): New.
11047 (start_step_over): New.
11048 (finish_step_over): New.
11049 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11050 requests. Clear the thread's last reported target waitstatus.
11051 Don't use the `suspended' flag. Don't consider pending breakpoints.
11052 (linux_resume): Start a step-over if necessary.
11053 (proceed_one_lwp): New.
11054 (proceed_all_lwps): New.
11055 (unstop_all_lwps): New.
11056 * linux-low.h (struct lwp_info): Rewrite comment for the
11057 `suspended' flag. Add the `stop_pc' field. Delete the
11058 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11059 Add `'last_resume_kind' and `need_step_over' fields.
11060 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11061 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11062 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11063 (set_raw_breakpoint_at): New.
11064 (set_breakpoint_at): Rewrite to use it.
11065 (reinsert_breakpoint_handler): Delete.
11066 (set_reinsert_breakpoint): New.
11067 (reinsert_breakpoint_by_bp): Delete.
11068 (delete_reinsert_breakpoints): New.
11069 (uninsert_breakpoint): Rewrite.
11070 (uninsert_breakpoints_at): New.
11071 (reinsert_breakpoint): Rewrite.
11072 (reinsert_breakpoints_at): New.
11073 (check_breakpoints): Rewrite.
11074 (breakpoint_here): New.
11075 (breakpoint_inserted_here): New.
11076 (check_mem_read): Adjust.
11077 * mem-break.h (breakpoints_supported, breakpoint_here)
11078 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11079 (reinsert_breakpoint_by_bp): Delete declaration.
11080 (delete_reinsert_breakpoints): Declare.
11081 (reinsert_breakpoint): Delete declaration.
11082 (reinsert_breakpoints_at): Declare.
11083 (uninsert_breakpoint): Delete declaration.
11084 (uninsert_breakpoints_at): Declare.
11085 (check_breakpoints): Adjust prototype.
11086 * server.h: Adjust include order.
11087 (struct thread_info): Declare here. Add a `last_status' field.
11089 2010-03-23 Michael Snyder <msnyder@vmware.com>
11091 * server.c (crc32): New function.
11092 (handle_query): Add handling for 'qCRC:' request.
11094 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11096 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11097 lwp had been stopped by a watchpoint.
11099 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11101 * server.h (internal_error): Declare.
11102 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11103 * utils.c (internal_error): New function.
11105 2010-03-15 Andreas Schwab <schwab@redhat.com>
11107 * configure.srv: Fix typo setting srv_regobj.
11109 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11111 * linux-low.c (fetch_register): Avoid passing a non string literal
11113 (usr_store_inferior_registers): Ditto.
11115 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11117 * linux-low.c (linux_write_memory): Bail out early if peeking
11120 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11122 * linux-low.h (struct lwp_info): New fields
11123 `stopped_by_watchpoint' and `stopped_data_address'.
11124 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11125 here, and cache them in the lwp object.
11126 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11128 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11130 (linux_stopped_by_watchpoint): Rewrite.
11131 (linux_stopped_data_address): Rewrite.
11133 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11135 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11136 switching the current inferior, not before.
11138 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11140 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11141 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11142 i386-linux.c and amd64-linux.c.
11143 (reg-i386.o): Removed.
11144 (reg-i386.c): Likewise.
11145 (reg-i386-linux.o): Likewise.
11146 (reg-i386-linux.c): Likewise.
11147 (reg-x86-64.o): Likewise.
11148 (reg-x86-64.c): Likewise.
11149 (reg-x86-64-linux.o): Likewise.
11150 (reg-x86-64-linux.c): Likewise.
11152 (i386.c): Likewise.
11153 (i386-linux.o): Likewise.
11154 (i386-linux.c): Likewise.
11155 (amd64.o): Likewise.
11156 (amd64.c): Likewise.
11157 (amd64-linux.o): Likewise.
11158 (amd64-linux.c): Likewise.
11160 * configure.srv (srv_i386_regobj): New.
11161 (srv_i386_linux_regobj): Likewise.
11162 (srv_amd64_regobj): Likewise.
11163 (srv_amd64_linux_regobj): Likewise.
11164 (srv_i386_32bit_xmlfiles): Likewise.
11165 (srv_i386_64bit_xmlfiles): Likewise.
11166 (srv_i386_xmlfiles): Likewise.
11167 (srv_amd64_xmlfiles): Likewise.
11168 (srv_i386_linux_xmlfiles): Likewise.
11169 (srv_amd64_linux_xmlfiles): Likewise.
11170 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11171 srv_xmlfiles to $srv_i386_xmlfiles.
11172 (i[34567]86-*-mingw32ce*): Likewise.
11173 (i[34567]86-*-mingw*): Likewise.
11174 (i[34567]86-*-nto*): Likewise.
11175 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11176 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11177 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11178 (x86_64-*-linux*): Likewise.
11180 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11181 (init_registers_amd64_linux): New.
11182 (x86_arch_setup): Replace init_registers_x86_64_linux with
11183 init_registers_amd64_linux.
11185 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11187 * configure.ac: Check for libdl. If it is not available link against
11188 static libthread_db.
11189 * configure: Regenerate.
11191 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11195 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11196 handing a read watchpoint.
11197 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11199 2010-02-12 Doug Evans <dje@google.com>
11201 * linux-low.c (linux_supports_tracefork_flag): Document.
11202 (linux_look_up_symbols): Add comment.
11204 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11206 * regcache.c (supply_register): Clear regcache if buf is NULL.
11208 2010-02-02 Nicolas Roche <roche@sourceware.org>
11209 Joel Brobecker <brobecker@adacore.com>
11211 * inferiors.c (find_inferior): Add function documentation.
11212 (unloaded_dll): Handle the case where the unloaded dll has not
11213 been previously registered in the dll list.
11215 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11217 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11218 (thumb2_breakpoint): New.
11219 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11221 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11223 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11224 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11227 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11229 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11231 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11233 * linux-s390-low.c (s390_collect_ptrace_register)
11234 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11236 2010-01-21 Doug Evans <dje@google.com>
11238 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11239 (PTRACE_ARG4_TYPE): New macro.
11240 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11241 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11242 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11243 (usr_store_inferior_registers): Ditto.
11244 (linux_read_memory, linux_write_memory): Ditto.
11245 (linux_test_for_tracefork): Ditto.
11247 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11248 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11250 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11252 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11255 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11257 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11258 prototype to take a regcache. Adjust.
11260 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11262 * regcache.h (struct thread_info): Forward declare.
11263 (struct regcache): New.
11264 (new_register_cache): Adjust prototype.
11265 (get_thread_regcache): Declare.
11266 (free_register_cache): Adjust prototype.
11267 (registers_to_string, registers_from_string): Ditto.
11268 (supply_register, supply_register_by_name, collect_register)
11269 (collect_register_as_string, collect_register_by_name): Ditto.
11270 * regcache.c (struct inferior_regcache_data): Delete.
11271 (get_regcache): Rename to ...
11272 (get_thread_regcache): ... this. Adjust. Switch inferior before
11273 fetching registers.
11274 (regcache_invalidate_one): Adjust.
11275 (regcache_invalidate): Fix prototype.
11276 (new_register_cache): Return the new register cache.
11277 (free_register_cache): Change prototype.
11278 (realloc_register_cache): Adjust.
11279 (registers_to_string): Change prototype to take a regcache. Adjust.
11280 (registers_from_string): Ditto.
11281 (register_data): Ditto.
11282 (supply_register): Ditto.
11283 (supply_register_by_name): Ditto.
11284 (collect_register): Ditto.
11285 (collect_register_as_string): Ditto.
11286 (collect_register_by_name): Ditto.
11287 * server.c (process_serial_event): Adjust.
11288 * linux-low.h (regset_fill_func, regset_store_func): Change
11290 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11292 * linux-low.c (get_stop_pc): Adjust.
11293 (check_removed_breakpoint): Adjust.
11294 (linux_wait_for_event): Adjust.
11295 (linux_resume_one_lwp): Adjust.
11296 (fetch_register): Add regcache parameter. Adjust.
11297 (usr_store_inferior_registers): Ditto.
11298 (regsets_fetch_inferior_registers): Ditto.
11299 (regsets_store_inferior_registers): Ditto.
11300 (linux_fetch_registers, linux_store_registers): Ditto.
11301 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11303 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11305 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11306 prototype to take a regcache.
11307 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11308 * remote-utils.c (convert_ascii_to_int, outreg)
11309 (prepare_resume_reply): Change prototype to take a regcache.
11311 * target.h (struct target_ops) <fetch_registers, store_registers>:
11312 Change prototype to take a regcache.
11313 (fetch_inferior_registers, store_inferior_registers): Change
11314 prototype to take a regcache. Adjust.
11315 * proc-service.c (ps_lgetregs): Adjust.
11316 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11317 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11318 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11319 take a regcache. Adjust.
11320 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11321 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11322 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11323 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11324 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11325 (cris_cannot_fetch_register):
11326 (cris_breakpoint_at): Change prototype to take a regcache.
11328 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11329 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11330 to take a regcache. Adjust.
11331 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11333 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11334 take a regcache. Adjust.
11335 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11336 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11337 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11338 * linux-mips-low.c (mips_get_pc):
11339 (mips_set_pc): Change prototype to take a regcache. Adjust.
11340 (mips_reinsert_addr): Adjust.
11341 (mips_collect_register): Change prototype to take a regcache.
11343 (mips_supply_register):
11344 (mips_collect_register_32bit, mips_supply_register_32bit)
11345 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11346 (mips_store_fpregset): Ditto.
11347 * linux-ppc-low.c (ppc_supply_ptrace_register)
11348 (ppc_supply_ptrace_register): Ditto.
11349 (parse_spufs_run): Adjust.
11350 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11351 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11352 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11353 take a regcache. Adjust.
11354 * linux-s390-low.c (s390_collect_ptrace_register)
11355 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11356 (s390_set_pc): Change prototype to take a regcache. Adjust.
11357 (s390_arch_setup): Adjust.
11358 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11359 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11360 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11361 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11362 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11364 (sparc_breakpoint_at): Adjust.
11365 * linux-xtensa-low.c (xtensa_fill_gregset):
11366 (xtensa_store_gregset):
11367 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11368 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11369 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11370 prototype to take a regcache. Adjust.
11371 * win32-arm-low.c (arm_fetch_inferior_register)
11372 (arm_store_inferior_register): Change prototype to take a
11374 * win32-i386-low.c (i386_fetch_inferior_register)
11375 (i386_store_inferior_register): Change prototype to take a
11377 * win32-low.c (child_fetch_inferior_registers)
11378 (child_store_inferior_registers): Change prototype to take a
11380 (win32_wait): Adjust.
11381 (win32_fetch_inferior_registers): Change prototype to take a
11383 (win32_store_inferior_registers): Adjust.
11384 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11385 store_inferior_register>: Change prototype to take a regcache.
11387 2010-01-20 Doug Evans <dje@google.com>
11389 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11391 (linux_wait_for_event1, linux_init_signals): Ditto.
11392 (W_STOPCODE): Provide definition if missing.
11394 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11396 * linux-low.c (linux_core_of_thread): New.
11397 (compare_ints, show_process, list_threads): New.
11398 (linux_qxfer_osdata): Report threads and cores.
11399 (linux_target_op): Register linux_core_of_thread.
11400 * remote-utils.c (prepare_resume_reply): Report the core.
11401 (buffer_xml_printf): Support %d specifier.
11402 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11404 (handle_query): Handle qXfer:threads. Announce availability
11406 * target.h (struct target_ops): New field core_of_thread.
11408 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11410 * Makefile.in (clean): Remove new generated files.
11411 (reg-s390.o, reg-s390.c): Remove rules.
11412 (reg-s390x.o, reg-s390x.c): Likewise.
11413 (s390-linux32.o, s390-linux32.c): Add rules.
11414 (s390-linux64.o, s390-linux64.c): Likewise.
11415 (s390x-linux64.o, s390x-linux64.c): Likewise.
11416 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11417 * linux-s390-low.c: Include <elf.h>.
11418 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11419 (init_registers_s390): Remove prototype.
11420 (init_registers_s390x): Likewise.
11421 (init_registers_s390_linux32): Add prototype.
11422 (init_registers_s390_linux64): Likewise.
11423 (init_registers_s390x_linux64): Likewise.
11424 (s390_num_regs_3264): New define.
11425 (s390_regmap_3264): New global variable.
11426 (s390_cannot_fetch_register): Remove obsolete check.
11427 (s390_cannot_store_register): Likewise.
11428 (s390_collect_ptrace_register): Handle upper/lower register halves.
11429 (s390_supply_ptrace_register): Likewise.
11430 (s390_fill_gregset): Update to register number changes.
11431 (s390_get_hwcap): New routine.
11432 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11433 Install appropriate regmap and register set.
11435 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11437 * server.c (gdbserver_version): Update copyright year to 2010.
11438 * gdbreplay.c (gdbreplay_version): Likewise.
11440 2009-12-28 Doug Evans <dje@google.com>
11442 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11443 elf/external.h. Include <elf.h> instead but only if necessary.
11445 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11447 * linux-low.c (linux_remove_process): Remove `detaching'
11448 parameter. Don't release/detach from thread_db here.
11449 (linux_kill): Release/detach from thread_db here, ...
11450 (linux_detach): ... and here, before actually detaching.
11451 (linux_wait_1): ... and here, when a process exits.
11452 * thread-db.c (any_thread_of): New.
11453 (thread_db_free): Switch the current inferior to a thread of the
11456 2009-12-21 Doug Evans <dje@google.com>
11458 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11460 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11461 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11462 warning ifndef __NR_tkill. Move setting of errno there too.
11463 Delete unnecessary resetting of errno after syscall.
11464 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11466 * configure.ac: Check for dladdr.
11467 * config.in: Regenerate.
11468 * configure: Regenerate.
11469 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11470 (try_thread_db_load): Update.
11472 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11474 2009-12-18 Doug Evans <dje@google.com>
11476 * event-loop.c: Include unistd.h if it exists.
11478 * linux-low.c (my_waitpid): Move definition away from being in
11479 between linux_tracefork_child/linux_test_for_tracefork.
11481 * gdb_proc_service.h (psaddr_t): Fix type.
11482 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11483 signature to match glibc.
11485 2009-12-16 Doug Evans <dje@google.com>
11487 * linux-low.c (linux_read_memory): Fix argument to read.
11489 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11491 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11492 events, don't leave current_inferior pointing at null.
11494 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11496 * win32-low.c (LOG): Delete.
11497 (OUTMSG): Output to stderr.
11498 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11499 on compile time LOG macro.
11500 (win32_wait): Fix debug output.
11502 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11504 * win32-low.c (win32_add_one_solib): If the dll name is
11505 "ntdll.dll", prepend the system directory to the dll path.
11507 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11509 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11511 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11512 Vladimir Prus <vladimir@codesourcery.com>
11514 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11515 * configure.ac: Check for __mcoldfire__ and set
11516 gdb_cv_m68k_is_coldfire.
11517 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11518 reg-cf.o and reg-m68k.o.
11519 * configure: Regenerated.
11521 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11523 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11524 Pass it to thread_db_free.
11525 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11526 proper `detaching' argument to linux_remove_process.
11527 * linux-low.h (thread_db_free): Add `detaching' parameter.
11528 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11530 (thread_db_free): Add `detaching' parameter. Only
11531 call td_ta_clear_event if detaching from process.
11533 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11535 * thread-db.c (thread_db_free): Fix typo.
11537 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11540 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11542 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11544 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11545 with an i686 compiler.
11546 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11548 * configure: Rebuilt.
11550 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11554 * server.c (handle_search_memory_1): Correct read_addr initialization
11555 in loop for searching subsequent chunks.
11557 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11559 * configure.ac: New --with-libthread-db option.
11560 * thread-db.c: Allow direct dependence on libthread_db.
11561 (thread_db_free): Adjust.
11562 * config.in: Regenerate.
11563 * configure: Likewise.
11565 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11568 * thread-db.c (attach_thread): New function.
11569 (maybe_attach_thread): Return success/failure.
11570 (find_new_threads_callback): Adjust.
11571 (thread_db_find_new_threads): Loop until no new threads.
11573 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11575 * proc-service.c (ps_lgetregs): Formatting.
11577 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11579 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11580 * configure.ac: Adjust.
11581 * linux-low.h (struct process_info_private): Move members to struct
11583 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11584 * linux-low.c (linux_remove_process): Adjust.
11585 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11586 * server.c (handle_query): Move code ...
11587 (handle_monitor_command): ... here. New function.
11588 * target.h (struct target_ops): New member.
11589 * thread-db.c (struct thread_db): New.
11590 (libthread_db_search_path): New variable.
11591 (thread_db_create_event, thread_db_enable_reporting)
11592 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11593 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11594 (try_thread_db_load_1, dladdr_to_soname): New functions.
11595 (try_thread_db_load, thread_db_load_search): New functions.
11596 (thread_db_init): Search for libthread_db.
11597 (thread_db_free): New function.
11598 (thread_db_handle_monitor_command): Likewise.
11599 * config.in: Regenerate.
11600 * configure: Regenerate.
11602 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11604 * spu-low.c (spu_kill): Wait for inferior to terminate.
11605 Call clear_inferiors.
11606 (spu_detach): Call clear_inferiors.
11608 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11610 * aclocal.m4: Regenerate.
11611 * config.in: Likewise.
11612 * configure: Likewise.
11614 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11616 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11617 (parse_spufs_run): New function.
11618 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11619 (ppc_breakpoint_at): Handle SPU breakpoints.
11621 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11623 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11624 (SPUFS_MAGIC): Define.
11625 (spu_enumerate_spu_ids): New function.
11626 (linux_qxfer_spu): New function.
11627 (linux_target_ops): Install linux_qxfer_spu.
11629 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11631 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11632 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11633 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11634 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11635 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11636 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11637 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11638 (init_registers_powerpc_cell32l): Add prototype.
11639 (init_registers_powerpc_cell64l): Likewise.
11640 (ppc_arch_setup): Detect Cell/B.E. architecture.
11642 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11644 * Makefile.in (datarootdir): New variable.
11646 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11648 * linux-low.c (linux_write_memory): Update debugging output.
11649 * Makefile.in (clean): Add new descriptions.
11650 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11651 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11652 * configure.srv: Add new files for arm*-*-linux*.
11653 * linux-arm-low.c: Add new declarations.
11654 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11655 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11656 (HWCAP_VFPv3D16): New.
11657 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11658 instead of __IWMMXT__.
11659 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11660 (arm_arch_setup): New.
11661 (target_regsets): Remove #ifdef. Add VFP regset.
11662 (the_low_target): Use arm_arch_setup.
11664 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11666 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11667 the main thread again.
11669 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11671 Adding Neutrino gdbserver.
11672 * configure: Regenerated.
11673 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11674 * configure.srv (i[34567]86-*-nto*): New target.
11675 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11676 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11677 (nto_comctrl) [__QNX__]: New function.
11678 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11680 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11682 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11685 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11686 Pedro Alves <pedro@codesourcery.com>
11688 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11689 don't support CONTEXT_EXTENDED_REGISTERS.
11690 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11691 (the_low_target): Install them.
11692 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11693 failing with ERROR_PIPE_NOT_CONNECTED.
11695 2009-06-30 Doug Evans <dje@google.com>
11696 Pierre Muller <muller@ics.u-strasbg.fr>
11698 Add h/w watchpoint support to x86-linux, win32-i386.
11699 * Makefile.in (SFILES): Add i386-low.c
11700 (i386_low_h): Define.
11701 (i386-low.o): Add dependencies.
11702 (linux-x86-low.o): Add i386-low.h dependency.
11703 (win32-i386-low.o): Ditto.
11704 * i386-low.c: New file.
11705 * i386-low.h: New file.
11706 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11707 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11708 * linux-low.c (linux_add_process): Initialize arch_private.
11709 (linux_remove_process): Free arch_private.
11710 (add_lwp): Initialize arch_private.
11711 (delete_lwp): Free arch_private.
11712 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11714 * linux-low.h (process_info_private): New member arch_private.
11715 (lwp_info): New member arch_private.
11716 (linux_target_ops): New members new_process, new_thread,
11718 (ptid_of): New macro.
11719 * linux-x86-low.c: Include stddef.h, i386-low.h.
11720 (arch_process_info): New struct.
11721 (arch_lwp_info): New struct.
11722 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11723 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11724 (i386_dr_low_get_status): New function.
11725 (x86_insert_point, x86_remove_point): New functions.
11726 (x86_stopped_by_watchpoint): New function.
11727 (x86_stopped_data_address): New function.
11728 (x86_linux_new_process, x86_linux_new_thread): New functions.
11729 (x86_linux_prepare_to_resume): New function.
11730 (the_low_target): Add entries for insert_point, remove_point,
11731 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11733 * server.c (debug_hw_points): New global.
11734 (monitor_show_help): Document set debug-hw-points.
11735 (handle_query): Process "set debug-hw-points".
11736 * server.h (debug_hw_points): Declare.
11737 (paddress): Declare.
11738 * utils.c (NUMCELLS, CELLSIZE): New macros.
11739 (get_sell, xsnprintf, paddress): New functions.
11740 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11741 remove_point, stopped_by_watchpoint, stopped_data_address.
11742 * win32-i386-low.c: Include i386-low.h.
11743 (debug_reg_state): Replaces dr.
11744 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11745 (i386_dr_low_get_status): New function.
11746 (i386_insert_point, i386_remove_point): New functions.
11747 (i386_stopped_by_watchpoint): New function.
11748 (i386_stopped_data_address): New function.
11749 (i386_initial_stuff): Update.
11750 (get_thread_context,set_thread_context,i386_thread_added): Update.
11751 (the_low_target): Add entries for insert_point,
11752 remove_point, stopped_by_watchpoint, stopped_data_address.
11753 * win32-low.c (win32_insert_watchpoint): New function.
11754 (win32_remove_watchpoint): New function.
11755 (win32_stopped_by_watchpoint): New function.
11756 (win32_stopped_data_address): New function.
11757 (win32_target_ops): Add entries for insert_watchpoint,
11758 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11759 * win32-low.h (win32_target_ops): New members insert_point,
11760 remove_point, stopped_by_watchpoint, stopped_data_address.
11762 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11764 * server.c (process_serial_event): Re-return unsupported, not
11765 error, if the type isn't recognized. Re-allow supporting only
11766 insert or remove packets. Also call require_running for
11767 breakpoints. Add missing break statement to default case. Tidy.
11768 * target.h (struct target_ops): Rename insert_watchpoint to
11769 insert_point, and remove_watchpoint to remove_point.
11771 * linux-low.h (struct linux_target_ops): Likewise.
11772 * linux-low.c (linux_insert_watchpoint): Rename to ...
11773 (linux_insert_point): ... this. Adjust.
11774 (linux_remove_watchpoint): Rename to ...
11775 (linux_remove_point): ... this. Adjust.
11776 (linux_target_ops): Adjust.
11777 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11778 (cris_insert_point): ... this.
11779 (cris_remove_watchpoint): Rename to ...
11780 (cris_remove_point): ... this.
11781 (the_low_target): Adjust.
11783 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11785 * server.c (handle_v_kill): Pass signal_pid to
11786 kill_inferior if multi_process is zero.
11788 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11790 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11791 * target.h (target_ops): Comment for *_watchpoint to make it clear
11792 the functions can get types '0' and '1'.
11794 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11796 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11797 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11798 * regcache.c (get_regcache): Likewise.
11799 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11800 * win32-low.c (child_fetch_inferior_registers): Remove check for
11803 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11804 Pedro Alves <pedro@codesourcery.com>
11806 * target.h (struct target_ops) <supports_multi_process>: New
11808 (target_supports_multi_process): New.
11809 * server.c (handle_query): Even if GDB reports support, only
11810 enable multi-process if the target also supports it. Report
11811 multi-process support only if the target backend supports it.
11812 * linux-low.c (linux_supports_multi_process): New function.
11813 (linux_target_ops): Install it as target_supports_multi_process
11816 2009-05-24 Doug Evans <dje@google.com>
11818 Global renaming of find_thread_pid to find_thread_ptid.
11819 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11820 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11821 All callers updated.
11823 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11824 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11827 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11828 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11829 (linux_resume_one_lwp): Ditto.
11831 2009-05-23 Doug Evans <dje@google.com>
11833 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11834 from struct inferior_list_entry * to struct lwp_info *.
11835 All callers updated.
11837 2009-05-13 Doug Evans <dje@google.com>
11839 * linux-x86-low.c: Don't include assert.h.
11840 (x86_siginfo_fixup): Use fatal, not assert.
11841 (x86_arch_setup): Fix comment.
11843 2009-05-12 Doug Evans <dje@google.com>
11845 Biarch support for i386/amd64 gdbserver.
11846 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11847 Add linux-x86-low.c.
11848 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11849 (linux-x86-low.o): Add.
11850 * linux-x86-64-low.c: Delete.
11851 * linux-i386-low.c: Delete.
11852 * linux-x86-low.c: New file.
11853 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11855 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11857 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11858 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11859 (linux_child_pid_to_exec_file): New function.
11860 (elf_64_header_p, elf_64_file_p): New functions.
11861 (siginfo_fixup): New function.
11862 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11863 give target a chance to convert layout.
11864 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11865 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11867 2009-05-07 Doug Evans <dje@google.com>
11869 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11870 (regsets_store_inferior_registers): Ditto.
11872 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11876 * linux-low.c (must_set_ptrace_flags): Delete.
11877 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11879 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11880 `lwp->must_set_ptrace_flags' instead.
11881 (linux_wait_for_event_1): Set ptrace options here.
11882 (linux_wait_1): ... not here.
11884 2009-04-30 Doug Evans <dje@google.com>
11886 * inferiors.c (started_inferior_callback): New function.
11887 (attached_inferior_callback): New function.
11888 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11889 * server.c (print_started_pid, print_attached_pid): New functions.
11890 (detach_or_kill_for_exit): New function.
11891 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11892 * server.h (have_started_inferiors_p): Declare.
11893 (have_attached_inferiors_p): Declare.
11895 * inferiors.c (remove_process): Fix memory leak, free process.
11896 * linux-low.c (linux_remove_process): New function.
11897 (linux_kill): Call it instead of remove_process.
11898 (linux_detach, linux_wait_1): Ditto.
11900 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11902 * configure.srv: Add x86 Windows CE target.
11904 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11906 * inferiors.c (get_thread_process): Make global.
11907 * server.h (get_thread_process): Add prototype.
11908 * thread-db.c (find_one_thread): Use get_thread_process
11909 instead of current_process.
11910 (thread_db_get_tls_address): Do not crash if called when
11911 thread layer is not yet initialized.
11913 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11915 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11916 * spu-low.c (current_tid): Rename to ...
11917 (current_ptid): ... this.
11918 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11919 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11920 ptid_get_lwp (current_ptid) instead of current_tid.
11921 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11922 instead of current_tid. Use find_process_pid to verify pid
11923 argument is valid. Pass proper argument to remove_process.
11924 (spu_thread_alive): Compare current_ptid instead of current_tid.
11925 (spu_resume): Likewise.
11927 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11929 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11932 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11934 Implement the multiprocess extensions, and add linux multiprocess
11937 * server.h (ULONGEST): Declare.
11938 (struct ptid, ptid_t): New.
11939 (minus_one_ptid, null_ptid): Declare.
11940 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11941 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11942 (struct inferior_list_entry): Change `id' type from unsigned from
11944 (struct sym_cache, struct breakpoint, struct
11945 process_info_private): Forward declare.
11946 (struct process_info): Declare.
11947 (current_process): Declare.
11948 (all_processes): Declare.
11949 (initialize_inferiors): Declare.
11950 (add_thread): Adjust to use ptid_t.
11951 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11952 (add_process, remove_process, find_thread_pid): Declare.
11953 (find_inferior_id): Adjust to use ptid_t.
11954 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11955 (multi_process): Declare.
11956 (push_event): Adjust to use ptid_t.
11957 (read_ptid, write_ptid): Declare.
11958 (prepare_resume_reply): Adjust to use ptid_t.
11959 (clear_symbol_cache): Declare.
11960 * inferiors.c (all_processes): New.
11961 (null_ptid, minus_one_ptid): New.
11962 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11963 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11964 (add_thread): Change unsigned long to ptid. Remove gdb_id
11966 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11967 (gdb_id_to_thread): Rename to ...
11968 (find_thread_pid): ... this. Change unsigned long to ptid.
11969 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11970 (loaded_dll, pull_pid_from_list): Adjust.
11971 (add_process, remove_process, find_process_pid)
11972 (get_thread_process, current_process, initialize_inferiors): New.
11973 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11974 (struct target_waitstatus) <related_pid>: Ditto.
11975 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11976 return type to int.
11977 (struct target_ops) <join>: Add `pid' argument.
11978 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11979 (struct target_ops) <wait>: Add `ptid' field. Change return type
11981 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11982 (mywait): Add `ptid' argument. Change return type to ptid_t.
11983 (target_pid_to_str): Declare.
11984 * target.c (set_desired_inferior): Adjust to use ptids.
11985 (mywait): Add new `ptid' argument. Adjust.
11986 (target_pid_to_str): New.
11987 * mem-break.h (free_all_breakpoints): Declare.
11988 * mem-break.c (breakpoints): Delelete.
11989 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11990 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11991 to use per-process breakpoint list.
11992 (free_all_breakpoints): New.
11993 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11994 (symbol_cache, all_symbols_looked_up): Delete.
11996 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11998 (prepare_resume_reply): Change ptid argument's type from unsigned
11999 long to ptid_t. Adjust. Implement W;process and X;process.
12000 (free_sym_cache, clear_symbol_cache): New.
12001 (look_up_one_symbol): Adjust to per-process symbol cache. *
12002 * server.c (cont_thread, general_thread, step_thread): Change type
12004 (attached): Delete.
12005 (multi_process): New.
12006 (last_ptid): Change type to ptid_t.
12007 (struct vstop_notif) <ptid>: Change type to ptid_t.
12008 (queue_stop_reply, push_event): Change `ptid' argument's type to
12010 (discard_queued_stop_replies): Add `pid' argument.
12011 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12012 changes. Don't reference the `attached' global.
12013 (attach_inferior): Adjust to mywait interface changes.
12014 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12015 features. Handle and report "multiprocess+". Handle
12017 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12019 (handle_v_kill): New.
12020 (handle_v_stopped): Adjust to use target_pid_to_str.
12021 (handle_v_requests): Allow multiple attaches and runs when
12022 multiprocess extensions are in effect. Handle "vKill".
12023 (myresume): Adjust to use ptids.
12024 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12025 (handle_status): Adjust to discard_queued_stop_replies interface
12027 (first_thread_of, kill_inferior_callback)
12028 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12029 (main): Call initialize_inferiors. Adjust to use ptids, killing
12030 and detaching from all inferiors. Handle multiprocess packet
12032 * linux-low.h: Include gdb_proc_service.h.
12033 (struct process_info_private): New.
12034 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12035 <lwpid_of>: Use ptid_get_lwp.
12036 (get_lwp_thread): Adjust.
12037 (struct lwp_info): Add `dead' member.
12038 (find_lwp_pid): Declare.
12039 * linux-low.c (thread_db_active): Delete.
12040 (new_inferior): Adjust comment.
12041 (inferior_pid): Delete.
12042 (linux_add_process): New.
12043 (handle_extended_wait): Adjust.
12044 (add_lwp): Change unsigned long to ptid.
12045 (linux_create_inferior): Add process to processes table. Adjust
12046 to use ptids. Don't set new_inferior here.
12047 (linux_attach_lwp): Rename to ...
12048 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12049 it. Adjust to use ptids.
12050 (linux_attach_lwp): New.
12051 (linux_attach): Add process to processes table. Don't set
12053 (struct counter): New.
12054 (second_thread_of_pid_p, last_thread_of_process_p): New.
12055 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12056 multiple processes.
12057 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12058 processes. Remove process from process table.
12059 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12060 to multiple processes.
12061 (any_thread_of): New.
12062 (linux_detach): Add `pid' argument, and handle it. Remove process
12063 from processes table.
12064 (linux_join): Add `pid' argument. Handle it.
12065 (linux_thread_alive): Change unsighed long argument to ptid_t.
12066 Consider dead lwps as not being alive.
12067 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12068 threads we're not interested in.
12069 (same_lwp, find_lwp_pid): New.
12070 (linux_wait_for_lwp): Change `pid' argument's type from int to
12072 (linux_wait_for_event): Rename to ...
12073 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12074 from int to ptid_t. Adjust.
12075 (linux_wait_for_event): New.
12076 (linux_wait_1): Add `ptid' argument. Change return type to
12077 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12078 that exit from the process table.
12079 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12081 (mark_lwp_dead): New.
12082 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12083 stopping all threads, mark its main lwp as dead.
12084 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12086 (fetch_register, usr_store_inferior_registers)
12087 (regsets_fetch_inferior_registers)
12088 (regsets_store_inferior_registers, linux_read_memory)
12089 (linux_write_memory): Inline `inferior_pid'.
12090 (linux_look_up_symbols): Adjust to use per-process
12091 `thread_db_active'.
12092 (linux_request_interrupt): Adjust to use ptids.
12093 (linux_read_auxv): Inline `inferior_pid'.
12094 (initialize_low): Don't reference thread_db_active.
12095 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12096 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12097 (ps_getpid): Return the pid of the current inferior.
12098 * thread-db.c (proc_handle, thread_agent): Delete.
12099 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12101 (find_one_thread): Change argument type to ptid_t. Adjust to
12103 (maybe_attach_thread): Adjust to per-process data and ptids.
12104 (thread_db_find_new_threads): Ditto.
12105 (thread_db_init): Ditto.
12106 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12107 processes table. Adjust to use ptids.
12108 (spu_kill, spu_detach): Adjust interface. Remove process from
12110 (spu_join, spu_thread_alive): Adjust interface.
12111 (spu_wait): Adjust interface. Remove process from processes
12112 table. Adjust to use ptids.
12113 * win32-low.c (current_inferior_tid): Delete.
12114 (current_inferior_ptid): New.
12115 (debug_event_ptid): New.
12116 (thread_rec): Take a ptid. Adjust.
12117 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12118 (child_delete_thread): Ditto.
12119 (do_initial_child_stuff): Add `attached' argument. Add process to
12121 (child_fetch_inferior_registers, child_store_inferior_registers):
12123 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12124 (win32_attach): Pass 1 to do_initial_child_stuff.
12125 (win32_kill): Adjust interface. Remove process from processes
12127 (win32_detach): Ditto.
12128 (win32_join): Adjust interface.
12129 (win32_thread_alive): Take a ptid.
12130 (win32_resume): Adjust to use ptids.
12131 (get_child_debug_event): Ditto.
12132 (win32_wait): Adjust interface. Remove exiting process from
12135 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12137 Non-stop mode support.
12139 * server.h (non_stop): Declare.
12140 (gdb_client_data, handler_func): Declare.
12141 (delete_file_handler, add_file_handler, start_event_loop):
12143 (handle_serial_event, handle_target_event, push_event)
12144 (putpkt_notif): Declare.
12145 * target.h (enum resume_kind): New.
12146 (struct thread_resume): Replace `step' field by `kind' field.
12147 (TARGET_WNOHANG): Define.
12148 (struct target_ops) <wait>: Add `options' argument.
12149 <supports_non_stop, async, start_non_stop>: New fields.
12150 (target_supports_non_stop, target_async): New.
12151 (start_non_stop): Declare.
12152 (mywait): Add `options' argument.
12153 * target.c (mywait): Add `options' argument. Print child exit
12154 notifications here.
12155 (start_non_stop): New.
12156 * server.c (non_stop, own_buf, mem_buf): New globals.
12157 (struct vstop_notif): New.
12158 (notif_queue): New global.
12159 (queue_stop_reply, push_event, discard_queued_stop_replies)
12160 (send_next_stop_reply): New.
12161 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12163 (attach_inferior): In non-stop mode, don't wait for the target
12165 (handle_general_set): Handle QNonStop.
12166 (handle_query): When handling qC, return the current general
12167 thread, instead of the first thread of the list.
12168 (handle_query): If the backend supports non-stop mode, include
12169 QNonStop+ in the qSupported query response.
12170 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12172 (handle_v_attach, handle_v_run): Handle non-stop mode.
12173 (handle_v_stopped): New.
12174 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12175 (myresume): Adjust to use resume_kind. Handle non-stop.
12176 (queue_stop_reply_callback): New.
12177 (handle_status): Handle non-stop mode.
12178 (main): Clear non_stop flag on reconnection. Use the event-loop.
12179 Refactor serial protocol handling from here ...
12180 (process_serial_event): ... to this new function. When GDB
12181 selects any thread, select one here. In non-stop mode, wait until
12182 GDB acks all pending events before exiting.
12183 (handle_serial_event, handle_target_event): New.
12184 * remote-utils.c (remote_open): Install remote_desc in the event
12186 (remote_close): Remove remote_desc from the event loop.
12187 (putpkt_binary): Rename to...
12188 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12189 (putpkt_binary): New as wrapper around putpkt_binary_1.
12190 (putpkt_notif): New.
12191 (prepare_resume_reply): In non-stop mode, don't change the
12193 * event-loop.c: New.
12194 * Makefile.in (OBJ): Add event-loop.o.
12195 (event-loop.o): New rule.
12197 * linux-low.h (pid_of): Moved here.
12199 (get_lwp_thread): Use lwpid_of.
12200 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12201 * linux-low.c (pid_of): Delete.
12202 (inferior_pid): Use lwpid_of.
12203 (linux_event_pipe): New.
12204 (target_is_async_p): New.
12206 (handle_extended_wait): Use lwpid_of.
12207 (add_lwp): Don't set lwpid field.
12208 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12209 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12210 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12211 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12212 first. Adjust to linux_wait_for_event interface changes. Use
12214 (linux_detach): Don't delete the main lwp here.
12215 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12216 (status_pending_p): Don't consider explicitly suspended lwps.
12217 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12218 pointer. Add OPTIONS argument. Change return type to int. Use
12219 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12220 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12221 pointer. Add status pointer argument. Return a pid instead of a
12222 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12223 changes. In non-stop mode, don't switch to a random thread.
12224 (linux_wait): Rename to...
12225 (linux_wait_1): ... this. Add target_options argument, and handle
12226 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12227 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12228 clean exit and signal exit code. Don't stop all threads in
12229 non-stop mode. In all-stop mode, only stop all threads when
12230 reporting a stop to GDB. Handle explicit thread stop requests.
12231 (async_file_flush, async_file_mark): New.
12233 (send_sigstop): Use lwpid_of.
12234 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12235 interface changes. In non-stop mode, don't switch to a random
12237 (linux_resume_one_lwp): Use lwpid_of.
12238 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12239 (linux_resume_one_thread): ... this. Handle resume_stop. In
12240 non-stop mode, don't look for pending flag in all threads.
12241 (resume_status_pending_p): Don't consider explicitly suspended
12243 (my_waitpid): Reimplement. Emulate __WALL.
12244 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12246 (sigchld_handler, linux_supports_non_stop, linux_async)
12247 (linux_start_non_stop): New.
12248 (linux_target_ops): Register linux_supports_non_stop, linux_async
12249 and linux_start_non_stop.
12250 (initialize_low): Install SIGCHLD handler.
12251 * thread-db.c (thread_db_create_event, find_one_thread)
12252 (thread_db_get_tls_address): Use lwpid_of.
12253 * win32-low.c (win32_detach): Adjust to use resume_kind.
12254 (win32_wait): Add `options' argument.
12255 * spu-low.c (spu_resume): Adjust to use resume_kind.
12256 (spu_wait): Add `options' argument.
12258 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12260 Decouple target code from remote protocol.
12262 * target.h (enum target_waitkind): New.
12263 (struct target_waitstatus): New.
12264 (struct target_ops) <wait>: Return an unsigned long. Take a
12265 target_waitstatus pointer instead of a char pointer.
12266 (mywait): Likewise.
12267 * target.c (mywait): Change prototype to return an unsigned long.
12268 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12269 * server.h (thread_from_wait, old_thread_from_wait): Delete
12271 (prepare_resume_reply): Change prototype to take a
12273 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12274 (last_status, last_ptid): New.
12275 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12276 pid instead of a signal.
12277 (attach_inferior): Remove "status" and "signal" parameters.
12279 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12281 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12282 (handle_v_requests, myresume): Remove "status" and "signal"
12283 parameters. Adjust.
12284 (handle_status): New.
12285 (main): Delete local `status'. Adjust.
12286 * remote-utils.c: Include target.h.
12287 (prepare_resume_reply): Change prototype to take a
12288 target_waitstatus. Adjust.
12290 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12292 * spu-low.c (spu_wait): Adjust.
12293 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12295 (win32_wait): Adjust.
12297 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12299 * target.h (struct thread_resume): Delete leave_stopped member.
12300 (struct target_ops): Add a `n' argument to the `resume' callback.
12301 * server.c (start_inferior): Adjust.
12302 (handle_v_cont, myresume): Adjust.
12303 * linux-low.c (check_removed_breakpoint): Adjust to resume
12304 interface change, and to removed leave_stopped field.
12305 (resume_ptr): Delete.
12306 (struct thread_resume_array): New.
12307 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12308 resume interface change.
12309 (linux_continue_one_thread, linux_queue_one_thread)
12310 (resume_status_pending_p): Check if the resume field is NULL
12311 instead of checking the leave_stopped member.
12312 (linux_resume): Adjust to the target resume interface change.
12313 * spu-low.c (spu_resume): Adjust to the target resume interface
12315 * win32-low.c (win32_detach, win32_resume): Ditto.
12317 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12319 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12321 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12323 (linux_continue_one_thread): Only preserve the stepping flag if
12324 there's a pending breakpoint.
12326 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12328 * server.c (main): After the inferior having exited, call
12329 remote_close before exiting gdbserver.
12331 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12333 Fix size of FPSCR in Power 7 processors.
12334 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12335 (PPC_FEATURE_HAS_DFP): New #define.
12336 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12339 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12341 * server.c (handle_query) Whitespace and formatting.
12343 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12345 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12346 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12347 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12348 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12349 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12350 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12351 Makefile.in, configure.ac: Fix whitespace throughout.
12352 * configure: Regenerate.
12354 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12356 * inferiors.c (find_inferior): Make it safe for the callback
12357 function to delete the currently iterated inferior.
12359 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12361 * Makefile.in (linuw_low_h): Move higher.
12362 (thread-db.o): Depend on $(linux_low_h).
12364 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12366 Rename "process" to "lwp" throughout.
12368 * linux-low.c (all_processes): Rename to...
12369 (all_lwps): ... this.
12370 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12371 (add_process): Rename to ...
12372 (add_lwp): ... this. Adjust.
12373 (linux_create_inferior): Adjust.
12374 (linux_attach_lwp): Adjust.
12375 (linux_attach): Adjust.
12376 (linux_kill_one_process): Rename to ...
12377 (linux_kill_one_lwp): ... this. Adjust.
12378 (linux_kill): Adjust.
12379 (linux_detach_one_process): Rename to ...
12380 (linux_detach_one_lwp): ... this. Adjust.
12381 (linux_detach): Adjust.
12382 (check_removed_breakpoint): Adjust.
12383 (status_pending_p): Adjust.
12384 (linux_wait_for_process): Rename to ...
12385 (linux_wait_for_lwp): ... this. Adjust.
12386 (linux_wait_for_event): Adjust.
12387 (send_sigstop): Adjust.
12388 (wait_for_sigstop): Adjust.
12389 (stop_all_processes): Rename to ...
12390 (stop_all_lwps): ... this.
12391 (linux_resume_one_process): Rename to ...
12392 (linux_resume_one_lwp): ... this. Adjust.
12393 (linux_set_resume_request, linux_continue_one_thread)
12394 (linux_queue_one_thread, resume_status_pending_p)
12395 (usr_store_inferior_registers, regsets_store_inferior_registers)
12396 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12398 * linux-low.h (get_process): Rename to ...
12399 (get_lwp): ... this. Adjust.
12400 (get_thread_process): Rename to ...
12401 (get_thread_lwp): ... this. Adjust.
12402 (get_process_thread): Rename to ...
12403 (get_lwp_thread): ... this. Adjust.
12404 (struct process_info): Rename to ...
12405 (struct lwp_info): ... this.
12406 (all_processes): Rename to ...
12407 (all_lwps): ... this.
12408 * proc-service.c (ps_lgetregs): Adjust.
12409 * thread-db.c (thread_db_create_event, find_one_thread)
12410 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12412 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12414 * server.c (handle_query): Handle "qAttached".
12416 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12418 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12419 GPLv3, update license URL.
12421 2009-03-01 Doug Evans <dje@google.com>
12423 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12424 (server_h): Add gdb_signals.h.
12425 (signals.o): Update.
12426 * server.h (target_signal_from_host,target_signal_to_host_p)
12427 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12429 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12431 * remote-utils.c (getpkt): Also generate remote-debug
12432 information if noack_mode is set.
12434 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12436 * server.c (handle_query): Report qXfer:siginfo:read and
12437 qXfer:siginfo:write as supported and handle them.
12438 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12439 * linux-low.c (linux_xfer_siginfo): New.
12440 (linux_target_ops): Set it.
12442 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12444 * server.c (gdbserver_usage): Mention --remote-debug.
12445 (main): Accept '--remote-debug' switch.
12447 2009-01-18 Doug Evans <dje@google.com>
12449 * regcache.c (new_register_cache): No need to check result of xcalloc.
12450 * server.c (handle_search_memory): Back out calls to xmalloc,
12451 result is checked and error is returned to user upon failure.
12452 (handle_query): Ditto. Add more checks for result of malloc.
12453 (handle_v_cont): Check result of malloc, report error back to
12455 (handle_v_run): Ditto. Call freeargv.
12456 * server.h (freeargv): Declare.
12457 * utils.c (freeargv): New fn.
12459 2009-01-15 Doug Evans <dje@google.com>
12461 * gdbreplay.c (perror_with_name): Make arg const char *.
12462 * server.h (target_signal_to_name): Make return type const char *.
12463 * thread-db.c (thread_db_err_str): Make return type const char *.
12464 * utils.c (perror_with_name): Make arg const char *.
12466 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12468 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12469 when handling a EXIT_PROCESS_DEBUG_EVENT.
12471 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12473 * gdbreplay.c (gdbreplay_version): Update copyright year.
12474 * server.c (gdbserver_version): Likewise.
12476 2009-01-05 Doug Evans <dje@google.com>
12478 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12479 (handle_extended_wait): Improve comment.
12481 2008-12-13 Doug Evans <dje@google.com>
12483 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12484 * server.h (ATTR_MALLOC): New macro.
12485 (xmalloc,xcalloc,xstrdup): Declare.
12486 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12487 * inferiors.c: Ditto.
12488 * linux-low.c: Ditto.
12489 * mem-break.c: Ditto.
12490 * regcache.c: Ditto.
12491 * remote-utils.c: Ditto.
12494 * win32-low.c: Ditto.
12496 2008-12-12 Doug Evans <dje@google.com>
12498 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12499 in debugging printf.
12501 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12503 2008-12-09 Doug Evans <dje@google.com>
12505 * linux-low.h (struct process_info): Delete member tid, unused.
12506 * thread-db.c (find_one_thread): Update.
12507 (maybe_attach_thread): Update.
12509 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12511 * target.h (struct target_ops): Add qxfer_osdata member.
12512 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12514 (linux_qxfer_osdata): New functions.
12515 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12517 * server.c (handle_query): Handle "qXfer:osdata:read:".
12518 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12519 (buffer_xml_printf): New functions.
12520 * server.h (struct buffer): New.
12521 (buffer_grow_str, buffer_grow_str0): New macros.
12522 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12523 (buffer_xml_printf): Declare.
12525 2008-11-24 Doug Evans <dje@google.com>
12527 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12529 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12531 * server.c (handle_v_run): Always use the supplied argument list.
12533 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12535 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12536 (xtensa_regmap_table): Add entry for scompare1.
12538 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12540 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12541 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12542 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12543 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12544 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12545 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12546 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12547 XML target descriptions.
12548 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12549 when inferior is running on an ISA 2.05 or later processor. Add
12550 special case to return offset for full 64-bit slot of FPSCR when
12553 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12555 * Makefile.in (SFILES, clean): Added sparc64 files.
12556 (reg-sparc64.o, reg-sparc64.c): New.
12557 * configure.srv (sparc*-*-linux*): New configuration.
12558 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12559 syscall arguments for SPARC.
12560 (regsets_store_inferior_registers): Likewise.
12561 * linux-sparc-low.c: New file.
12563 2008-10-21 Doug Evans <dje@google.com>
12565 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12566 (READLINE_DIR,READLINE_DEP): Delete.
12567 (INTERNAL_CFLAGS): Update.
12568 (LINTFLAGS): Update.
12570 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12572 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12573 whole argv from the last run, not just argv[0].
12575 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12577 * regcache.c (new_register_cache): Return NULL if the register
12578 cache size isn't known yet.
12579 (free_register_cache): Avoid dereferencing a NULL regcache.
12581 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12583 * configure.srv: Merge MIPS and MIPS64.
12585 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12587 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12589 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12591 * Makefile.in: Add required vsx dependencies.
12593 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12594 Declare init_registers_powerpc_vsx32l.
12595 Declare init_registers_powerpc_vsx64l.
12596 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12597 (ppc_arch_setup): Check for VSX in hwcap.
12598 (ppc_fill_vsxregset): New function.
12599 (ppc_store_vsxregset): New function.
12600 Add new VSX entry in regset_info target_regsets.
12602 * configure.srv: Add new VSX dependencies.
12604 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12606 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12607 (remote_open): Set or clear transport_is_reliable.
12608 (putpkt_binary): Don't expect acks in noack mode.
12609 (getpkt): Don't send ack/nac in noack mode.
12610 * server.c (handle_general_set): Handle QStartNoAckMode.
12611 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12613 (main): Reset noack_mode on every connection.
12614 * server.h (noack_mode): Declare.
12616 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12618 * Makefile.in (GDBREPLAY_OBS): New variable.
12619 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12621 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12622 Daniel Jacobowitz <dan@codesourcery.com>
12624 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12625 (usr_store_inferior_registers): Likewise.
12626 (regsets_store_inferior_registers): Likewise.
12628 2008-07-31 Rolf Jansen <rj@surtec.com>
12629 Pedro Alves <pedro@codesourcery.com>
12631 * configure.ac: Check for memmem declaration.
12632 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12633 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12634 (disable_packet_qfThreadInfo): Unconditionally compile.
12635 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12636 * configure, config.in: Regenerate.
12638 2008-07-28 Doug Kwan <dougkwan@google.com>
12640 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12641 (linux_write_memory): Remove declaration of errno.
12643 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12645 * linux-low.c (handle_extended_wait): Do not use "status"
12646 variable uninitialized.
12648 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12650 * server.c (handle_v_attach): Inhibit reporting dll changes.
12652 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12654 * remote-utils.c (prepare_resume_reply): If requested, don't
12655 output "thread:TID" in the T stop reply.
12657 * server.c (disable_packet_vCont, disable_packet_Tthread)
12658 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12659 (handle_query): If requested, disable support for qC, qfThreadInfo
12661 (handle_v_requests): If requested, disable support for vCont.
12662 (gdbserver_show_disableable): New.
12663 (main): Handle --disable-packet and --disable-packet=LIST.
12665 * server.h (disable_packet_vCont, disable_packet_Tthread)
12666 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12668 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12670 * server.c (gdbserver_usage): Mention --version.
12672 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12674 * Makefile.in (gdbreplay.o): New rule.
12676 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12678 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12679 message, not gdbserver.
12681 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12682 Nathan Sidwell <nathan@codesourcery.com>
12683 Joseph Myers <joseph@codesourcery.com>
12685 * acinclude.m4: Include ../../config/acx.m4.
12686 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12687 * configure, config.in: Regenerate.
12688 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12689 * server.c (gdbserver_version): Print PKGVERSION.
12690 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12691 (main): Adjust gdbserver_usage calls.
12692 * gdbreplay.c (version, host_name): Add declarations.
12693 (gdbreplay_version, gdbreplay_usage): New.
12694 (main): Accept --version and --help options.
12696 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12698 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12699 (arm_breakpoint_at): Handle Thumb.
12700 (the_low_target): Add comment.
12702 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12704 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12706 2008-05-09 Doug Evans <dje@google.com>
12708 * server.h (decode_search_memory_packet): Declare.
12709 * remote-utils.c (decode_search_memory_packet): New fn.
12710 * server.c (handle_search_memory_1): New fn.
12711 (handle_search_memory): New fn.
12712 (handle_query): Process qSearch:memory packets.
12714 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12716 * regcache.c (registers_length): Remove.
12717 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12718 full register packet.
12719 * regcache.h (registers_length): Remove prototype.
12720 * server.h (PBUFSIZ): Define to 16384.
12722 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12724 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12725 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12726 powerpc-64l.o, and powerpc-altivec64l.o.
12727 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12728 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12729 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12730 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12731 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12734 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12735 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12736 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12737 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12738 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12739 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12740 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12741 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12742 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12743 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12746 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12747 (init_registers_powerpc_32l): ... this new prototype.
12748 (init_registers_powerpc_32): Remove, replace by ...
12749 (init_registers_powerpc_altivec32l): ... this new prototype.
12750 (init_registers_powerpc_e500): Remove, replace by ...
12751 (init_registers_powerpc_e500l): ... this new prototype.
12752 (init_registers_ppc64): Remove, replace by ...
12753 (init_registers_powerpc_64l): ... this new prototype.
12754 (init_registers_powerpc_64): Remove, replace by ...
12755 (init_registers_powerpc_altivec64l): ... this new prototype.
12756 (ppc_num_regs): Set to 73.
12757 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12758 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12759 (ppc_cannot_store_register): Handle orig_r3 and trap.
12760 (ppc_arch_setup): Update init_registers_... calls.
12761 (ppc_fill_gregset): Handle orig_r3 and trap.
12763 * inferiors.c (clear_inferiors): Reset current_inferior.
12765 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12767 * acinclude.m4: Add override.m4.
12768 * configure: Regenerate.
12770 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12772 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12773 initial call to init_register_ppc64.
12775 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12777 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12778 single powerpc*-*-linux* case.
12779 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12781 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12783 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12784 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12786 * linux-ppc-low.c: Include <elf.h>.
12787 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12788 (ppc_hwcap): New global variable.
12789 (ppc_regmap): Remove __SPE__ #ifdef sections.
12790 (ppc_regmap_e500): New global variable.
12791 (ppc_cannot_store_register): Update __SPE__ special case.
12792 (ppc_get_hwcap): New function.
12793 (ppc_arch_setup): Use it to determine whether inferior supports
12794 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12795 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12796 Do not access registers if target does not support AltiVec.
12797 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12798 Do not access registers if target does not support SPE.
12799 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12801 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12803 * linux-low.c (disabled_regsets, num_regsets): New.
12804 (use_regsets_p): Delete.
12805 (linux_wait_for_process): Clear disabled_regsets.
12806 (regsets_fetch_inferior_registers): Check and set it.
12807 (regsets_store_inferior_registers): Likewise.
12808 (linux_fetch_registers, linux_store_registers): Do not use
12810 (initialize_low): Allocate disabled_regsets.
12812 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12814 * Makefile.in (LIBOBJS): New.
12815 (OBS): Use LIBOBJS.
12816 (memmem.o): New rule.
12817 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12818 * configure: Regenerated.
12820 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12822 * server.c (handle_query): Never return "unsupported" for
12823 qXfer:features:read queries.
12825 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12827 * server.c (get_features_xml): Fix inverted condition.
12828 (handle_query): Always support qXfer:feature:read.
12830 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12832 * server.c (wrapper_argv): New.
12833 (start_inferior): Handle wrapper_argv. If set, expect an extra
12835 (gdbserver_usage): Document --wrapper.
12836 (main): Parse --wrapper.
12838 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12840 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12841 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12842 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12843 (ppc_set_pc): Likewise.
12844 (ppc_arch_setup): New function.
12845 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12846 of collect_register.
12847 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12849 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12851 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12852 instead of linux-ppc64-low.o.
12853 * linux-ppc64-low.c: Remove file.
12854 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12855 (linux-ppc64-low.o): Remove rule.
12857 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12858 (init_registers_powerpc_64): Likewise.
12859 (ppc_regmap): Conditionally define depending on __powerpc64__.
12860 (ppc_cannot_store_register): Do not special-case "fpscr" when
12861 compiled on __powerpc64__.
12862 (ppc_collect_ptrace_register): New function.
12863 (ppc_supply_ptrace_register): New function.
12864 (ppc_breakpoint): Change type to "unsigned int".
12865 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12866 (the_low_target): Conditionally provide initializers for the
12867 arch_setup member depending on __powerpc64__. Install
12868 collect_ptrace_register and supply_ptrace_register members.
12870 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12872 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12873 * server.c (gdbserver_xmltarget): Define.
12874 (get_features_xml): Use it to replace "target.xml" and arch_string.
12876 * configure.srv: Remove srv_xmltarget. Add XML files that were
12877 mentioned there to srv_xmlfiles instead. Remove conditional tests
12878 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12879 srv_xmlfiles and srv_regobj to include all possible choices.
12880 * configure.ac (srv_xmltarget): Remove.
12881 (srv_xmlfiles): Do not add "target.xml".
12882 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12883 checks for supplementary target information.
12884 * configure: Regenerate.
12885 * Makefile.in (XML_TARGET): Remove.
12886 (target.xml): Remove rule.
12887 (clean): Do not clean up target.xml.
12888 (.PRECIOUS): Do not mention target.xml.
12890 * target.h (struct target_ops): Remove arch_string member.
12891 * linux-low.c (linux_arch_string): Remove.
12892 (linux_target_ops): Remove arch_string initializer.
12893 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12894 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12895 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12896 * spu-low.c (spu_arch_string): Remove.
12897 (spu_target_ops): Remove arch_string initializer.
12898 * win32-low.c (win32_arch_string): Remove.
12899 (win32_target_ops): Remove arch_string initializer.
12900 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12901 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12902 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12904 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12906 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12907 by collect_ptrace_register and supply_ptrace_register hooks.
12908 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12909 instead of checking for the_low_target.left_pad_xfer.
12910 (usr_store_inferior_registers): Use collect_ptrace_register callback
12911 instead of checking for the_low_target.left_pad_xfer.
12913 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12914 (s390_supply_ptrace_register): Likewise.
12915 (s390_fill_gregset): Call s390_collect_ptrace_register.
12916 (the_low_target): Update.
12918 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12919 (ppc_supply_ptrace_register): Likewise.
12920 (the_low_target): Update.
12922 * linux-i386-low.c (the_low_target): Update.
12923 * linux-x86-64-low.c (the_low_target): Update.
12925 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12927 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12928 reg-s390.o and reg-s390x.o.
12930 * linux-low.c (new_inferior): New global variable.
12931 (linux_create_inferior, linux_attach): Set it.
12932 (linux_wait_for_process): Call the_low_target.arch_setup after the
12933 target has stopped for the first time.
12934 (initialize_low): Do not call the_low_target.arch_setup.
12936 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12937 (s390_set_pc): Likewise.
12938 (s390_arch_setup): New function.
12939 (the_low_target): Use s390_arch_setup as arch_setup routine.
12941 * regcache.c (realloc_register_cache): New function.
12942 (set_register_cache): Call it for each existing regcache.
12944 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12946 * server.h (init_registers): Remove prototype.
12948 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12949 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12950 instead of init_registers ().
12951 * linux-arm-low.c (init_registers_arm): Add prototype.
12952 (init_registers_arm_with_iwmmxt): Likewise.
12953 (the_low_target): Add initializer for arch_setup field.
12954 * linux-cris-low.c (init_registers_cris): Add prototype.
12955 (the_low_target): Add initializer for arch_setup field.
12956 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12957 (the_low_target): Add initializer for arch_setup field.
12958 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12959 (the_low_target): Add initializer for arch_setup field.
12960 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12961 (the_low_target): Add initializer for arch_setup field.
12962 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12963 (the_low_target): Add initializer for arch_setup field.
12964 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12965 (the_low_target): Add initializer for arch_setup field.
12966 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12967 (init_registers_mips64_linux): Likewise.
12968 (the_low_target): Add initializer for arch_setup field.
12969 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12970 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12971 (the_low_target): Add initializer for arch_setup field.
12972 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12973 (init_registers_powerpc_64): Likewise.
12974 (the_low_target): Add initializer for arch_setup field.
12975 * linux-s390-low.c (init_registers_s390): Add prototype.
12976 (init_registers_s390x): Likewise.
12977 (the_low_target): Add initializer for arch_setup field.
12978 * linux-sh-low.c (init_registers_sh): Add prototype.
12979 (the_low_target): Add initializer for arch_setup field.
12980 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12981 (the_low_target): Add initializer for arch_setup field.
12982 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12983 (the_low_target): Add initializer for arch_setup field.
12985 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12986 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12987 instead of init_registers ().
12988 * win32-arm-low.c (init_registers_arm): Add prototype.
12989 (the_low_target): Add initializer for arch_setup field.
12990 * win32-i386-low.c (init_registers_i386): Add prototype.
12991 (the_low_target): Add initializer for arch_setup field.
12993 * spu-low.c (init_registers_spu): Add prototype.
12994 (initialize_low): Call initialie_registers_spu () instead of
12995 initialize_registers ().
12997 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12999 * server.c (handle_v_requests): When handling the vRun and vAttach
13000 packets, if already debugging a process, don't kill it. Return an
13003 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13005 * server.c (handle_query): Correct length check.
13007 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13009 * win32-low.c (do_initial_child_stuff): Add process handle
13010 parameter. Set current_process_handle and current_process_id from the
13011 parameters. Clear globals.
13012 (win32_create_inferior): Don't set current_process_handle and
13013 current_process_id here. Instead pass them on the call to
13014 do_initial_child_stuff.
13015 (win32_attach): Likewise.
13016 (win32_clear_inferiors): New.
13017 (win32_kill): Don't close the current process handle or the
13018 current thread handle here. Instead call win32_clear_inferiors.
13019 (win32_detach): Don't open a new handle to the process. Call
13020 win32_clear_inferiors.
13021 (win32_join): Don't rely on current_process_handle; open a new
13022 handle using the process id.
13023 (win32_wait): Call win32_clear_inferiors when the inferior process
13026 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13028 * server.c (monitor_show_help): Add "exit".
13030 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13032 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13033 (clean): Add reg-xtensa.c.
13034 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13035 * configure.srv (xtensa*-*-linux*) New target.
13036 * linux-xtensa-low.c: New.
13037 * xtensa-xtregs.c: New.
13039 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13041 * hostio.c: Don't include errno.h.
13042 (errno_to_fileio_errno): Move to hostio-errno.
13043 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13044 error number outputting to the target->hostio_last_error callback.
13045 (hostio_packet_error): Use FILEIO_EINVAL directly.
13046 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13047 calls to hostio_error.
13048 * hostio-errno.c: New.
13049 * server.h (hostio_last_error_from_errno): Declare.
13050 * target.h (target_ops): Add hostio_last_error member.
13051 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13052 as hostio_last_error handler.
13053 * spu-low.c (spu_target_ops): Likewise.
13054 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13055 (wince_hostio_last_error): New functions.
13056 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13057 as hostio_last_error handler.
13058 (win32_target_ops) [!_WIN32_WCE]: Register
13059 hostio_last_error_from_errno as hostio_last_error handler.
13060 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13061 (hostio-errno.o): New rule.
13062 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13063 * configure.srv (srv_hostio_err_objs): New variable. Default to
13065 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13066 * configure: Regenerate.
13068 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13070 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13071 (linux_kill, linux_detach): Clean up the process list.
13072 * remote-utils.c (remote_open): Improve port number parsing.
13073 (putpkt_binary, input_interrupt): Only send interrupts if the target
13075 * server.c (extended_protocol): Make static.
13076 (attached): Define earlier.
13077 (exit_requested, response_needed, program_argv): New variables.
13078 (target_running): New.
13079 (start_inferior): Clear attached here.
13080 (attach_inferior): Set attached here.
13081 (require_running): Define.
13082 (handle_query): Use require_running and target_running. Implement
13084 (handle_v_attach, handle_v_run): New.
13085 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13086 (gdbserver_usage): Update.
13087 (main): Redo argument parsing. Handle --debug and --multi. Handle
13088 --attach along with other options or after the port. Save
13089 program_argv. Support no initial program. Resynchronize
13090 communication with GDB after an error. Handle "monitor exit".
13091 Use require_running and target_running. Always allow the extended
13092 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13093 restart in extended mode.
13094 * README: Refer to the GDB manual. Update --attach usage.
13096 2007-12-20 Andreas Schwab <schwab@suse.de>
13098 * linux-low.c (STACK_SIZE): Define.
13099 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13100 (linux_test_for_tracefork): Likewise.
13102 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13104 * linux-low.c (linux_wait_for_event): Update messages. Do not
13105 reinsert auto-delete breakpoints.
13106 * mem-break.c (struct breakpoint): Change return type of handler to
13108 (set_breakpoint_at): Update handler type.
13109 (reinsert_breakpoint_handler): Return 1 instead of calling
13111 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13113 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13114 * mem-break.h (set_breakpoint_at): Update handler type.
13115 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13116 * win32-low.c (auto_delete_breakpoint): New.
13117 (get_child_debug_event): Use it.
13119 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13121 * configure.ac: Check for pread and pwrite.
13122 * hostio.c (handle_pread): Fall back to lseek and read.
13123 (handle_pwrite): Fall back to lseek and write.
13124 * config.in, configure: Regenerated.
13126 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13128 * server.c (myresume): Add own_buf argument.
13129 (main): Update calls.
13131 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13133 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13134 * remote-utils.c (remote_open): Do not call disable_async_io.
13135 (block_async_io): Delete.
13136 (unblock_async_io): Make static.
13137 (initialize_async_io): New.
13138 * server.c (handle_v_cont): Handle async I/O here.
13139 (myresume): Likewise. Move other common resume tasks here...
13140 (main): ... from here. Call initialize_async_io. Disable async
13141 I/O before the main loop.
13142 * server.h (initialize_async_io): Declare.
13143 (block_async_io, unblock_async_io): Delete prototypes.
13144 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13146 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13148 * remote-utils.c (readchar): Allow binary data in received messages.
13150 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13152 * win32-low.c (attaching): New global.
13153 (win32_create_inferior): Clear the `attaching' global.
13154 (win32_attach): Set the `attaching' global.
13155 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13156 attaching. Only set a breakpoint at the entry point if not
13159 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13161 * server.c (main): Don't report dll events on the initial
13162 connection on attaches.
13164 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13166 * server.c (main): Relax numerical bases supported for the pid of
13167 the --attach command line argument.
13169 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13171 * win32-low.c (win32_attach): Call OpenProcess before
13172 DebugActiveProcess, not after. Add last error output to error
13175 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13177 * win32-low.c (win32_get_thread_context)
13178 (win32_set_thread_context): New functions.
13179 (thread_rec): Use win32_get_thread_context.
13180 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13181 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13184 2007-12-03 Leo Zayas
13185 Pedro Alves <pedro_alves@portugalmail.pt>
13187 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13189 (child_add_thread): Minor cleanup.
13190 (child_continue): Resume artificially suspended threads before
13191 calling ContinueDebugEvent.
13192 (suspend_one_thread): New.
13193 (fake_breakpoint_event): New.
13194 (get_child_debug_event): Change return type to int. Check here if
13195 gdb sent an interrupt request. If a soft interrupt was requested,
13196 fake a breakpoint event. Return 0 if there is no event to handle,
13198 (win32_wait): Don't check here if gdb sent an interrupt request.
13199 Ensure there is a valid event to handle.
13200 (win32_request_interrupt): Add soft interruption method as last
13203 2007-12-03 Leo Zayas
13204 Pedro Alves <pedro_alves@portugalmail.pt>
13206 * win32-low.h (win32_thread_info): Add descriptions to the
13207 structure members. Replace `suspend_count' counter by a
13209 * win32-low.c (thread_rec): Update condition of when to get the
13210 context from the inferior. Rely on ContextFlags being set if it
13211 has already been retrieved. Only suspend the inferior thread if
13212 we haven't already. Warn if that fails.
13213 (continue_one_thread): s/suspend_count/suspended/. Only call
13214 ResumeThread once. Warn if that fails.
13216 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13218 * win32-low.c (win32_wait): Don't read from the inferior when it
13219 has already exited.
13221 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13223 * Makefile.in (win32_low_h): New variable.
13224 (win32-low.o): Add dependency on $(win32_low_h).
13225 (win32-arm-low.o, win32-i386-low.o): New rules.
13227 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13229 * hostio.c: Correct copyright year.
13231 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13233 * Makefile.in (OBS): Add hostio.o.
13234 (hostio.o): New rule.
13235 * server.h (handle_vFile): Declare.
13236 * hostio.c: New file.
13237 * server.c (handle_v_requests): Take packet_len and new_packet_len
13238 for binary packets. Call handle_vFile.
13239 (main): Update call to handle_v_requests.
13241 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13243 * linux-low.c: Include <sched.h>.
13245 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13247 * linux-low.c (linux_tracefork_grandchild): New.
13248 (linux_tracefork_child): Use clone.
13249 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13251 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13253 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13255 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13257 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13259 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13261 * inferiors.c (change_inferior_id): Delete.
13262 (add_pid_to_list, pull_pid_from_list): New.
13263 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13264 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13265 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13266 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13267 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13268 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13269 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13270 (using_threads): Always set to 1.
13271 (handle_extended_wait): New.
13272 (add_process): Do not set TID.
13273 (linux_create_inferior): Set must_set_ptrace_flags.
13274 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13275 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13276 (linux_thread_alive): Rename TID argument to LWPID.
13277 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13278 (linux_wait_for_event): Do not use TID or check using_threads. Update
13279 call to dead_thread_notify. Call handle_extended_wait.
13280 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13281 (send_sigstop): Delete sigstop_sent.
13282 (wait_for_sigstop): Avoid TID.
13283 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13284 (linux_test_for_tracefork): New.
13285 (linux_lookup_signals): Use thread_db_active and
13286 linux_supports_tracefork_flag.
13287 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13288 * linux-low.h (get_process_thread): Avoid TID.
13289 (struct process_ifo): Move thread_known and tid to the end. Remove
13291 (linux_attach_lwp, thread_db_init): Update prototypes.
13292 * server.h (change_inferior_id): Delete prototype.
13293 (add_pid_to_list, pull_pid_from_list): New prototypes.
13294 * thread-db.c (thread_db_use_events): New.
13295 (find_first_thread): Rename to...
13296 (find_one_thread): ...this. Update callers and messages. Do not
13297 call fatal. Check thread_db_use_events. Do not call
13298 change_inferior_id or new_thread_notify.
13299 (maybe_attach_thread): Update. Do not call new_thread_notify.
13300 (thread_db_init): Set thread_db_use_events. Check use_events.
13301 * utils.c (fatal, warning): Correct message prefix.
13303 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13305 * Makefile.in (clean): Remove new files.
13306 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13307 (powerpc-64.o, powerpc-64.c): New rules.
13308 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13309 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13311 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13313 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13314 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13315 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13316 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13317 (target_regsets): Add AltiVec and SPE register sets.
13318 * configure.ac: Check for AltiVec and SPE.
13319 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13320 (ppc_fill_vrregset, ppc_store_vrregset): New.
13321 (target_regsets): Add AltiVec register set.
13322 * configure: Regenerated.
13324 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13326 * linux-low.c (O_LARGEFILE): Define.
13327 (linux_read_memory): Use /proc/PID/mem.
13328 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13329 * configure, config.in: Regenerated.
13331 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13333 * linux-low.c (linux_wait_for_event): Do not pass signals while
13336 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13338 * win32-low.c (create_process): New.
13339 (win32_create_inferior): Use create_process instead of
13340 CreateProcess. If create_process failed retry appending an ".exe"
13341 suffix. Store the GetLastError result immediatelly after
13342 create_process calls and use it on the call to error.
13344 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13346 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13348 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13350 * configure.ac: Switch license to GPLv3.
13352 2007-08-01 Michael Snyder <msnyder@access-company.com>
13354 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13356 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13358 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13360 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13361 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13362 CloseToolhelp32Snapshot.
13363 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13364 CloseToolhelp32Snapshot.
13366 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13368 * server.c (main): Check for inferior exit before main loop.
13370 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13372 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13373 instead of on tmp_desc.
13375 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13376 Daniel Jacobowitz <dan@codesourcery.com>
13378 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13379 (add_thread): Minor cleanups.
13380 (clear_inferiors): Move lower in the file. Clear the DLL
13382 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13383 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13384 (xml_escape_text): New.
13385 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13387 (handle_v_cont): Report errors.
13388 (gdbserver_version): Update.
13389 (main): Correct size of own_buf. Do not report initial DLL events.
13390 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13391 (unloaded_dll, xml_escape_text): New.
13392 * win32-low.c (enum target_waitkind): Update comments.
13393 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13394 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13395 (win32_EnumProcessModules, win32_GetModuleInformation)
13396 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13397 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13398 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13399 (win32_Module32First, win32_Module32Next, load_toolhelp)
13400 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13401 (get_child_debug_event): Handle DLL events.
13402 (win32_wait): Likewise.
13404 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13406 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13407 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13409 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13411 * win32-low.c (handle_output_debug_string): Ignore event if not
13414 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13416 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13418 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13420 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13422 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13424 * inferiors.c (change_inferior_id): Add comment.
13425 * linux-low.c (check_removed_breakpoint): Add an early
13426 prototype. Improve debug output.
13427 (linux_attach): Doc update.
13428 (linux_detach_one_process, linux_detach): Clean up before releasing
13430 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13431 * linux-low.h (struct process_info): Doc improvement.
13432 * mem-break.c (delete_all_breakpoints): New.
13433 * mem-break.h (delete_all_breakpoints): New prototype.
13434 * thread-db.c (find_first_thread): New.
13435 (thread_db_create_event): Call it instead of
13436 thread_db_find_new_threads. Clean up unused variables.
13437 (maybe_attach_thread): Remove first thread handling.
13438 (thread_db_find_new_threads): Use find_first_thread.
13439 (thread_db_get_tls_address): Likewise.
13441 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13443 * thread-db.c (thread_db_find_new_threads): Add prototype.
13444 (thread_db_create_event): Check for the main thread before adding
13446 (maybe_attach_thread): Only enable event reporting if TID == 0.
13447 (thread_db_get_tls_address): Check for new threads.
13449 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13451 * linux-low.c (linux_create_inferior): Try execv before execvp.
13452 * spu-low.c (spu_create_inferior): Likewise.
13454 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13456 * linux-low.c (linux_create_inferior): Change execv to execvp.
13457 * spu-low.c (spu_create_inferior): Likewies.
13459 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13461 * Makefile.in (clean): Clean new files instead of deleted ones.
13462 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13463 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13465 * configure.srv: Specify XML files and new regformats for MIPS and
13467 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13468 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13469 an entry for the restart register.
13470 (mips_cannot_fetch_register, mips_cannot_store_register)
13471 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13472 register names to match the XML descriptions.
13473 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13474 restart register instead of $0.
13476 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13477 Markus Deuling <deuling@de.ibm.com>
13479 * remote-utils.c (decode_xfer_write): New function.
13480 * server.h (decode_xfer_write): Add prototype.
13481 * server.c (handle_query): Add PACKET_LEN argument. Support
13482 qXfer:spu:read and qXfer:spu:write packets.
13483 (main): Pass packet_len to handle_query.
13484 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13485 * target.h (target_ops): Add qxfer_spu.
13487 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13489 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13490 accessing non-seekable spufs files.
13492 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13494 * server.c (handle_query): Add reply for qC packet.
13496 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13497 Leo Zayas <lerele@champenstudios@com>
13499 * server.h (check_remote_input_interrupt_request): New function.
13500 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13501 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13502 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13503 (check_remote_input_interrupt_request): New function.
13504 * server.h (check_remote_input_interrupt_request): Declare.
13505 * win32-low.c (winapi_DebugBreakProcess,
13506 winapi_GenerateConsoleCtrlEvent): New typedefs.
13507 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13509 (win32_wait): Check for remote interrupt request
13510 with check_remote_input_interrupt_request.
13511 (win32_request_interrupt): New function.
13512 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13514 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13516 * win32-low.c (debug_registers_changed,
13517 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13518 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13519 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13520 (thread_rec): Get context using the low target.
13521 (child_add_thread): Call thread_added on the low target,
13522 which does the same thing.
13524 (do_initial_child_stuff): Remove debug registers references.
13525 Set context using the low target. Resume threads after
13526 setting the contexts.
13527 (child_continue): Remove dead variable. Remove debug
13528 registers references.
13529 (child_fetch_inferior_registers): Go through the low target.
13530 (do_child_store_inferior_registers): Remove.
13531 (child_store_inferior_registers): Go through the low target.
13532 (win32_resume): Remove debug registers references.
13533 Set context using the low target.
13534 (handle_exception): Change return type to void. Don't record
13535 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13536 first chance exception.
13537 (get_child_debug_event): Change return type to void. Remove
13538 goto loop. Always return after waiting for debug event.
13539 (win32_wait): Convert to switch statement. Handle spurious
13542 * win32-i386-low.c (debug_registers_changed,
13543 debug_registers_used): New.
13544 (initial_stuff): Rename to ...
13545 (i386_initial_stuff): ... this. Clear debug registers
13547 (store_debug_registers): Delete.
13548 (i386_get_thread_context): New.
13549 (load_debug_registers): Delete.
13550 (i386_set_thread_context): New.
13551 (i386_thread_added): New.
13552 (single_step): Rename to ...
13553 (i386_single_step): ... this.
13554 (do_fetch_inferior_registers): Rename to ...
13555 (i386_fetch_inferior_register): ... this.
13556 (i386_store_inferior_register): New.
13557 (the_low_target): Adapt to new interface.
13559 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13560 (arm_get_thread_context): New.
13561 (arm_set_thread_context): New.
13563 (do_fetch_inferior_registers): Rename to ...
13564 (arm_fetch_inferior_register): ... this.
13565 (arm_store_inferior_register): New.
13566 (arm_wince_breakpoint): Reimplement as unsigned long.
13567 (arm_wince_breakpoint_len): Define.
13568 (the_low_target): Adapt to new interface.
13570 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13571 load_debug_registers. Add get_thread_context, set_thread_context,
13572 thread_added and store_inferior_register. Rename
13573 fetch_inferior_registers to fetch_inferior_register.
13574 (regptr): Remove declaration.
13576 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13578 * linux-low.c (linux_detach): Change return type to int. Return 0.
13579 * spu-low.c (spu_detach): Likewise.
13581 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13583 * target.h (target_ops): Change return type of detach to int.
13585 (join_inferior): New.
13586 * server.c (main): Don't skip detach support on mingw32.
13587 If the inferior doesn't support detaching return error.
13588 Call join_inferior instead of using waitpid.
13589 * linux-low.c (linux_join): New.
13590 (linux_target_op): Add linux_join.
13591 * spu-low.c (spu_join): New.
13592 (spu_target_ops): Add spu_join.
13593 * win32-low.c (win32_detach): Adapt to new interface.
13594 Reopen current_process_handle before detaching. Issue a child
13595 resume before detaching.
13597 (win32_target_op): Add win32_join.
13599 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13601 * win32-low.c (win32-attach): Fix return value.
13602 * target.h (target_ops): Describe ATTACH return values.
13604 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13606 * win32-low.c (GETPROCADDRESS): Define.
13607 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13608 (winapi_DebugSetProcessKillOnExit): Likewise.
13609 (win32_create_inferior): Force usage of ansi CreateProcessA.
13610 (win32_attach): Use GETPROCADDRESS.
13611 (win32_detach): Likewise.
13613 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13615 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13617 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13619 * win32-low.c: Commit leftover changes from 2007-03-29.
13621 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13623 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13624 fields short instead of int. Add explicit padding.
13625 (i387_cache_to_fsave): Remove unnecessary casts.
13626 (i387_fsave_to_cache): Doc fix.
13627 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13629 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13631 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13632 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13634 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13636 * configure.srv (arm*-*-mingw32ce*): Move near the other
13639 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13641 * configure.ac: Add errno checking.
13642 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13643 sys/file.h and malloc.h.
13644 (AC_CHECK_DECLS): Add perror.
13645 (srv_mingwce): Handle.
13646 * configure.srv (i[34567]86-*-cygwin*): Add
13647 win32-i386-low.o to srv_tgtobj.
13648 (i[34567]86-*-mingw*): Likewise.
13649 (arm*-*-mingw32ce*): Add case.
13650 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13651 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13652 [__MINGW32CE__] (strerror): New function.
13653 [__MINGW32CE__] (errno): Define to GetLastError.
13654 [__MINGW32CE__] (COUNTOF): New macro.
13655 (remote_open): Remove extra close call.
13656 * mem-break.c (delete_breakpoint_at): New function.
13657 * mem-break.h (delete_breakpoint_at): Declare.
13658 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13659 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13660 [USE_WIN32API] (read, write): Add char* casts.
13661 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13662 * server.h: Include wincecompat.h on Windows CE.
13663 [HAVE_ERRNO_H]: Check.
13664 (perror): Declare if not declared.
13665 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13666 (perror_with_name): Remove errno declaration.
13667 * wincecompat.h: New.
13668 * wincecompat.c: New.
13669 * win32-low.h: New.
13670 * win32-arm-low.c: New.
13671 * win32-i386-low.c: New.
13672 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13673 (OUTMSG2): Make it safe.
13675 (COUNTOF): New macro.
13676 (NUM_REGS): Get it from the low target.
13677 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13678 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13679 (thread_rec): Let low target handle debug registers.
13680 (child_add_thread): Likewise.
13681 (child_init_thread_list): Likewise.
13682 (continue_one_thread): Likewise.
13684 (do_child_fetch_inferior_registers): Move to ...
13685 * win32-i386-low.c: ... here, and rename to ...
13686 (do_fetch_inferior_registers): ... this.
13687 * win32-low.c (child_fetch_inferior_registers):
13688 Go through the low target.
13689 (do_child_store_inferior_registers): Use regptr.
13690 (strwinerror): New function.
13691 (win32_create_inferior): Handle Windows CE.
13692 Use strwinerror instead of strerror on Windows error
13693 codes. Add program to the error output.
13694 Don't close the main thread handle on Windows CE.
13695 (win32_attach): Use coredll.dll on Windows CE.
13696 (win32_kill): Close current process and current
13698 (win32_detach): Use coredll.dll on Windows CE.
13699 (win32_resume): Let low target handle debug registers, and
13701 (handle_exception): Add/Remove initial breakpoint. Avoid
13702 non-existant WSTOPSIG on Windows CE.
13703 (win32_read_inferior_memory): Cast to remove warning.
13704 (win32_arch_string): Go through the low target.
13705 (initialize_low): Call set_breakpoint_data with the low
13706 target's breakpoint.
13707 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13708 FOP_REGNUM, mappings): Move to ...
13709 * win32-i386-low.c: ... here.
13710 * win32-low.c (win32_thread_info): Move to ...
13711 * win32-low.h: ... here.
13712 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13713 win32-arm-low.c and wincecompat.c.
13714 (all:): Add $EXEEXT.
13715 (install-only:): Likewise.
13716 (gdbserver:): Likewise.
13717 (gdbreplay:): Likewise.
13718 * config.in: Regenerate.
13719 * configure: Regenerate.
13721 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13723 * win32-low.c: Rename typedef thread_info to
13724 win32_thread_info throughout.
13726 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13728 * win32-i386-low.c: Rename to ...
13729 * win32-low.c: ... this.
13730 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13731 * Makefile.in: Likewise.
13733 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13735 * remote-utils.c (monitor_output): Constify msg parameter.
13736 * server.h (monitor_output): Likewise.
13737 * win32-i386-low.c (handle_output_debug_string): New.
13738 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13739 handle_output_debug_string.
13740 (get_child_debug_event): Likewise.
13742 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13744 * server.c (main): Correct strtoul check.
13746 2007-03-27 Jon Ringle <jon@ringle.org>
13748 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13750 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13752 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13754 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13756 * terminal.h: Check HAVE_SGTTY_H.
13758 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13760 * remote-utils.c (remote_open): Print out the assigned port number.
13762 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13764 * remote-utils.c (monitor_output): New function.
13765 * server.c (debug_threads): Define here.
13766 (monitor_show_help): New function.
13767 (handle_query): Handle qRcmd.
13768 (main): Do not handle 'd' packet.
13769 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13770 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13773 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13775 * Makefile.in (EXEEXT): New.
13776 (clean): Use $(EXEEXT).
13778 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13780 * target.h (target_ops): Rename send_signal to request_interrupt,
13781 and remove enum target_signal parameter.
13782 * linux-low.c (linux_request_interrupt): Rename from
13783 linux_send_signal, and always send SIGINT.
13784 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13785 and always send SIGINT.
13786 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13788 (input_interrupt): Likewise.
13790 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13792 * server.c (get_features_xml): Check if target implemented
13794 * win32-i386-low.c (win32_arch_string): New.
13795 (win32_target_ops): Add win32_arch_string as arch_string member.
13797 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13799 * spu-low.c (spu_arch_string): New.
13800 (spu_target_ops): Add spu_arch_string.
13802 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13804 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13805 * configure.ac: Do not check for terminal.h.
13806 * configure, config.in: Regenerated.
13808 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13810 * Makefile.in (OBS): Add $(XML_BUILTIN).
13811 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13813 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13814 (arm-with-iwmmxt.c): New.
13815 * config.in, configure: Regenerate.
13816 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13817 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13818 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13819 (arm*-*-linux*): Add iWMMXt and regset support.
13820 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13821 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13822 (arm_store_wmmxregset, target_regsets): New.
13823 * server.c (get_features_xml): Take annex argument. Check builtin
13825 (handle_query): Handle multiple annexes.
13827 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13829 * remote-utils.c [USE_WIN32API] (read, write): Define.
13830 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13833 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13835 * linux-i386-low.c (the_low_target): Set arch_string.
13836 * linux-x86-64-low.c (the_low_target): Likewise.
13837 * linux-low.c (linux_arch_string): New.
13838 (linux_target_ops): Add it.
13839 * linux-low.h (struct linux_target_ops): Add arch_string.
13840 * server.c (write_qxfer_response): Use const void * for DATA.
13841 (get_features_xml): New.
13842 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13843 * target.h (struct target_ops): Add arch_string method.
13845 2007-01-03 Denis Pilat <denis.pilat@st.com>
13846 Daniel Jacobowitz <dan@codesourcery.com>
13848 * linux-low.c (linux_kill): Handle being called with no threads.
13849 * win32-i386-low.c (win32_kill): Likewise.
13850 (get_child_debug_event): Clear current_process_handle.
13852 2006-12-30 Denis PILAT <denis.pilat@st.com>
13853 Daniel Jacobowitz <dan@codesourcery.com>
13855 * remote-utils.c (remote_open): Check the type of specified
13856 serial port devices before opening them.
13857 * server.c (main): Kill the inferior if an error occurs during
13858 the first remote_open.
13860 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13862 * README: Update supported targets.
13864 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13866 * Makefile.in (clean): Remove reg-mips64.c.
13867 (reg-mips64.c, reg-mips64.o): New rules.
13868 * configure.srv: Handle mips64. Include regset support for mips.
13869 * linux-mips-low.c (union mips_register): New.
13870 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13871 (mips_breakpoint, mips_breakpoint_at): Use int.
13872 (mips_collect_register, mips_supply_register)
13873 (mips_collect_register_32bit, mips_supply_register_32bit)
13874 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13875 (mips_store_fpregset, target_regsets): New.
13876 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13878 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13880 * configure.srv: Add target "spu*-*-*".
13881 * Makefile.in (clean): Remove reg-spu.c.
13882 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13883 * spu-low.c: New file.
13885 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13887 * configure.ac: Correct td_thr_tls_get_addr test.
13888 * configure: Regenerated.
13890 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13892 * linux-low.c (linux_wait_for_event): Reformat. Use the
13893 pass_signals array.
13894 * remote-utils.c (decode_address_to_semicolon): New.
13895 * server.c (pass_signals, handle_general_set): New.
13896 (handle_query): Mention QPassSignals for qSupported.
13897 (main): Call handle_general_set.
13898 * server.h (pass_signals, decode_address_to_semicolon): New.
13900 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13902 * server.c (handle_query): Correct error handling for read_auxv.
13904 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13906 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13907 and srv_linux_thread_db to yes.
13908 * linux-s390-low.c (s390_fill_gregset): New function.
13909 (target_regsets): Define data structure.
13911 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13913 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13914 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13915 * config.in, configure: Regenerated.
13916 * inferiors.c (gdb_id_to_thread): New function.
13917 (gdb_id_to_thread_id): Use it.
13918 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13919 * linux-low.h (struct process_info): Add th member.
13920 (thread_db_get_tls_address): New prototype.
13921 * remote-utils.c (decode_address): Make non-static.
13922 * server.c (handle_query): Handle qGetTLSAddr.
13923 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13924 * target.h (struct target_ops): Add get_tls_address.
13925 * thread-db.c (maybe_attach_thread): Save the thread handle.
13926 (thread_db_get_tls_address): New.
13928 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13930 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13931 (linux_resume_one_process): Take a siginfo_t *. Update all
13932 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13933 (struct pending_signals): Add a siginfo_t.
13934 (linux_wait_for_process): Always set last_status.
13935 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13936 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13937 * linux-low.h (struct process_info): Add last_status.
13939 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13941 * remote-utils.c (try_rle): New function.
13942 (putpkt_binary): Use it.
13944 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13946 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13947 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13948 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13949 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13950 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13953 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13955 * server.c (terminal_fd): New variable.
13956 (old_foreground_pgrp): Likewise.
13957 (restore_old_foreground_pgrp): New function.
13958 (start_inferior): Record the terminal file descriptor in terminal_fd
13959 and its original foreground group in old_foreground_pgrp. Register
13960 restore_old_foreground_pgrp with atexit().
13962 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13964 * server.c (handle_query): Correct qPart to qXfer.
13966 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13968 * configure.ac: Check for more headers which are missing on
13969 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13970 * configure.srv: Add Cygwin and mingw32.
13971 * remote-utils.c: Don't include headers unconditionally which
13972 are missing on mingw32. Include <winsock.h> for mingw32.
13973 (remote_open): Adjust for mingw32 support. Flush
13974 standard error after writing to it.
13975 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13976 (unblock_async_io, enable_async_io, disable_async_io)
13977 (readchar, getpkt): Update for Winsock support.
13978 (prepare_resume_reply): Expect a protocol signal number.
13979 * server.c: Disable <sys/wait.h> on mingw32.
13980 (start_inferior): Adjust for mingw32 support. Flush
13981 standard error after writing to it.
13982 (attach_inferior): Likewise. Use protocol signal
13984 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13986 * win32-i386-low.c: New file.
13987 * Makefile.in (XM_CLIBS): Set.
13988 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13989 (win32-i386-low.o): New dependency rule.
13990 * linux-low.c (linux_wait): Use target signal numbers.
13991 * target.h (struct target_ops): Doc fix.
13992 * server.h (target_signal_to_name): New prototype.
13993 * gdbreplay.c: Don't include headers unconditionally which
13994 are missing on mingw32. Include <winsock.h> for mingw32.
13995 (remote_close, remote_open): Adjust for Winsock support.
13996 * configure, config.in: Regenerated.
13998 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14000 * server.c (decode_xfer_read, write_qxfer_response): New.
14001 (handle_query): Take a packet length argument. Handle
14002 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14003 the qSupported response.
14004 (main): Update call to handle_query.
14006 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14008 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14009 (putpkt_binary): Renamed from putpkt and adjusted for binary
14011 (putpkt): New wrapper for putpkt_binary.
14012 (readchar): Don't mask off the high bit.
14013 (decode_X_packet): New function.
14014 * server.c (main): Call putpkt_binary if a handler sets the packet
14015 length. Save the length of the incoming packet. Handle 'X'.
14016 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14018 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14020 * server.c (handle_query): Handle qSupported.
14022 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14024 * remote-utils.c (all_symbols_looked_up): New variable.
14025 (look_up_one_symbol): Check it.
14026 * server.h (look_up_one_symbol): New declaration.
14027 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14029 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14031 * Makefile.in (linux-arm-low.o): Update dependencies.
14032 * linux-arm-low.c: Include "gdb_proc_service.h".
14033 (PTRACE_GET_THREAD_AREA): Define.
14034 (ps_get_thread_area): New function.
14036 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14038 * configure.srv (m68k*-*-uclinux*): New target.
14039 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14040 (linux_resume_one_process): Remove extraneous cast.
14041 (linux_read_offsets): New.
14042 (linux_target_op): Add linux_read_offsets on mmuless systems.
14043 * server.c (handle_query): Add qOffsets logic.
14044 * target.h (struct target_ops): Add read_offsets.
14046 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14048 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14049 (PTRACE_GET_THREAD_AREA): Define.
14050 (ps_get_thread_area): New function.
14051 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14052 (linux-x86-64-low.o): Update.
14054 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14056 * configure.ac: Remove checks for prfpregset_t.
14057 * gdb_proc_service.h: New file.
14058 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14059 new "gdb_proc_service.h".
14060 * proc-service.c: Likewise.
14061 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14062 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14063 * Makefile.in (gdb_proc_service_h): Updated.
14064 * configure, config.in: Regenerated.
14066 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14068 * remote-utils.c (prepare_resume_reply): Move declaration
14069 of gdb_id_from_wait to the top of the block.
14071 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14073 * linux-low.c (regsets_store_inferior_registers): Read the regset
14074 from the target before filling it.
14076 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14078 * server.c (attach_inferior): Return SIGTRAP for a successful
14081 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14083 * Makefile.in (OBS): Add version.o.
14084 (STAGESTUFF): Delete.
14085 (version.o): Add dependencies.
14086 (version.c): Replace rule.
14087 (clean): Remove version.c.
14088 * server.c (gdbserver_version): New.
14089 (gdbserver_usage): Use printf.
14090 (main): Handle --version and --help.
14091 * server.h (version, host_name): Add declarations.
14093 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14105 * linux-x86-64-low.c:
14107 * linux-s390-low.c:
14108 * linux-ppc64-low.c:
14110 * linux-mips-low.c:
14111 * linux-m68k-low.c:
14112 * linux-m32r-low.c:
14115 * linux-ia64-low.c:
14116 * linux-i386-low.c:
14117 * linux-crisv32-low.c:
14129 * gdbserver.1: Add (C) after Copyright. Update the FSF
14132 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14134 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14135 (arm_breakpoint_at): Recognize both breakpoints.
14136 (the_low_target): Use the correct breakpoint instruction.
14138 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14140 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14141 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14142 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14143 (the_low_target): Update.
14145 2005-10-25 Andreas Schwab <schwab@suse.de>
14147 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14149 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14150 (ia64_num_regs): Reduce to 462.
14152 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14154 * acinclude.m4: Correct quoting.
14155 * aclocal.m4: Regenerated.
14157 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14158 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14159 (thread_db_init): Call thread_db_err_str.
14160 * configure.ac: Check for TD_VERSION.
14161 * config.in, configure: Regenerated.
14163 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14165 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14167 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14169 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14170 is not available. Define HAVE_PTRACE_GETREGS if it is.
14171 * config.in, configure: Regenerated.
14172 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14173 * linux-i386-low.c, linux-m68k-low.c: Update to use
14174 HAVE_PTRACE_GETREGS.
14175 * linux-low.c (regsets_fetch_inferior_registers)
14176 (regsets_store_inferior_registers): Only return 0 if we processed
14178 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14179 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14181 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14183 * inferiors.c (struct thread_info): Add gdb_id.
14184 (add_thread): Add gdb_id argument.
14185 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14186 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14187 calls to add_thread.
14188 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14189 * server.c (handle_query): Use thread_to_gdb_id.
14190 (handle_v_cont, main): Use gdb_id_to_thread_id.
14191 * server.h (add_thread): Update prototype.
14192 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14195 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14197 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14198 left-padded registers.
14199 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14200 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14202 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14204 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14205 * configure: Regenerate.
14206 * config.in: Regenerate.
14207 * server.h (NEED_DECLARATION_STRERROR):
14208 Replace with !HAVE_DECL_STRERROR.
14210 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14212 * linux-low.c (linux_wait, linux_send_signal): Don't test
14213 an unsigned long variable for > 0 if it could be MAX_ULONG.
14214 * server.c (myresume): Likewise.
14215 * target.c (set_desired_inferior): Likewise.
14217 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14219 * configure.ac: Simplify and improve check for socklen_t.
14220 * configure, config.in: Regenerate.
14222 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14224 * acconfig.h: Remove.
14225 * configure.ac: Add a test for socklen_t. Use three-argument
14226 AC_DEFINE throughout.
14227 * config.in: Regenerated using autoheader 2.59.
14228 * configure: Regenerated.
14230 * gdbreplay.c (socklen_t): Provide a default.
14231 (remote_open): Use socklen_t.
14232 * remote-utils.c (socklen_t): Provide a default.
14233 (remote_open): Use socklen_t.
14234 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14237 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14239 * linux-low.c (linux_read_memory, linux_write_memory)
14240 (linux_read_auxv): Likewise.
14241 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14242 (check_mem_write): Likewise.
14243 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14245 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14246 (registers_from_string, register_data): Likewise.
14247 * server.c (handle_query, main): Likewise.
14248 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14249 (decode_M_packet): Likewise.
14250 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14251 * target.h (struct target_ops): Update read_memory, write_memory,
14253 (read_inferior_memory, write_inferior_memory): Update.
14254 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14255 to unsigned char *.
14256 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14257 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14258 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14259 linux-s390-low.c, linux-sh-low.c: Update for changes in
14260 read_inferior_memory and the_low_target->breakpoint.
14262 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14264 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14265 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14266 * configure.srv: Add powerpc64-*-linux*.
14267 * linux-ppc64-low.c: New file.
14269 2005-05-23 Orjan Friberg <orjanf@axis.com>
14271 * linux-cris-low.c: New file with support for CRIS.
14272 * linux-crisv32-low.c: Ditto for CRISv32.
14273 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14274 (clean): Add reg-cris.c and reg-crisv32.c.
14275 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14276 reg-crisv32.o, and reg-crisv32.c to make rules.
14277 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14278 recognized targets.
14280 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14282 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14283 of sizeof (PTRACE_XFER_TYPE).
14284 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14286 2005-05-12 Orjan Friberg <orjanf@axis.com>
14288 * target.h (struct target_ops): Add insert_watchpoint,
14289 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14290 pointers for hardware watchpoint support.
14291 * linux-low.h (struct linux_target_ops): Ditto.
14292 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14293 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14294 to linux_target_ops.
14295 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14297 * server.c (main): Recognize 'Z' and 'z' packets.
14299 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14301 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14302 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14303 (the_low_target): Add new members.
14305 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14307 * proc-service.c (ps_lgetregs): Search all_processes instead of
14310 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14312 * server.c (start_inferior): Change return type to int.
14313 (attach_inferior): Change sigptr to int *.
14314 (handle_v_cont, handle_v_requests): Change signal to int *.
14315 (main): Change signal to int.
14317 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14319 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14320 * configure.srv: Add m32r*-*-linux*.
14321 * linux-m32r-low.c: New file.
14323 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14325 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14327 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14329 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14330 Take unsigned long arguments for PIDs.
14331 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14332 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14333 (wait_for_sigstop, linux_resume_one_process)
14334 (regsets_fetch_inferior_registers, linux_send_signal)
14335 (linux_read_auxv): Likewise. Update the types of variables holding
14336 PIDs. Update format string specifiers.
14337 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14338 * remote-utils.c (prepare_resume_reply): Likewise.
14339 * server.c (cont_thread, general_thread, step_thread)
14340 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14342 (handle_query): Update format specifiers.
14343 (handle_v_cont, main): Use strtoul for thread IDs.
14344 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14345 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14346 (general_thread, step_thread, thread_from_wait)
14347 (old_thread_from_wait): Update.
14348 * target.h (struct thread_resume): Use unsigned long for THREAD.
14349 (struct target_ops): Use unsigned long for arguments to attach and
14352 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14354 * acinclude.m4: Include bfd/bfd.m4 directly.
14355 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14356 <agriffis@toolchain.org>.
14357 * aclocal.m4, configure: Regenerated.
14359 2005-01-07 Andrew Cagney <cagney@gnu.org>
14361 * configure.ac: Rename configure.in, require autoconf 2.59.
14362 * configure: Re-generate.
14364 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14366 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14367 LIBS when finished.
14368 * aclocal.m4: Regenerated.
14369 * configure: Regenerated.
14371 2004-11-21 Andreas Schwab <schwab@suse.de>
14373 * linux-m68k-low.c (m68k_num_gregs): Define.
14374 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14375 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14376 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14377 (m68k_breakpoint_at): New. Add to the_low_target.
14379 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14380 srv_linux_thread_db to yes.
14382 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14384 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14385 (ARCH_SET_FS): Likewise.
14386 (ARCH_GET_FS): Likewise.
14387 (ARCH_GET_GS): Likewise.
14389 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14391 * linux-i386-low.c (ps_get_thread_area): New.
14392 * linux-x86-64-low.c (ps_get_thread_area): New.
14393 * linux-low.c: Include <sys/syscall.h>.
14394 (linux_kill_one_process): Don't kill the first thread here.
14395 (linux_kill): Kill the first thread here.
14396 (kill_lwp): New function.
14397 (send_sigstop, linux_send_signal): Use it.
14398 * proc-service.c: Clean up #ifdefs.
14399 (fpregset_info): Delete.
14400 (ps_lgetregs): Update and enable implementation.
14401 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14403 * remote-utils.c (struct sym_cache, symbol_cache): New.
14404 (input_interrupt): Print a clearer message.
14405 (async_io_enabled): New variable.
14406 (enable_async_io, disable_async_io): Use it. Update comments.
14407 (look_up_one_symbol): Use the symbol cache.
14408 * thread-db.c (thread_db_look_up_symbols): New function.
14409 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14411 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14413 * configure.in: Test for -rdynamic.
14414 * configure: Regenerated.
14415 * Makefile (INTERNAL_LDFLAGS): New.
14416 (gdbserver, gdbreplay): Use it.
14418 2004-09-02 Andrew Cagney <cagney@gnu.org>
14420 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14422 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14424 * linux-low.c (linux_wait): Clear all_processes list also.
14426 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14428 * linux-low.c: Include <errno.h>. Remove extern declaration of
14431 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14433 * gdbreplay.c, server.h, utils.c: Update copyright years.
14435 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14437 * server.c (main): Print child status or termination signal from
14438 variable 'signal', not 'sig'.
14440 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14442 * linux-low.c (linux_read_memory): Change return type to
14443 int. Check for and return error from ptrace().
14444 * target.c (read_inferior_memory): Change return type to int. Pass
14445 back return status from the_target->read_memory().
14446 * target.h (struct target_ops): Adapt *read_memory() prototype.
14448 (read_inferior_memory): Adapt prototype.
14449 * server.c (main): Return an error packet if
14450 read_inferior_memory() returns an error.
14452 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14454 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14455 Unify with other clean targets.
14457 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14459 * server.c (handle_v_cont): Call set_desired_inferior.
14461 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14463 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14465 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14467 * linux-low.c (linux_wait): Unblock async I/O.
14468 (linux_resume): Block and enable async I/O.
14469 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14470 * server.h (block_async_io, unblock_async_io): Add prototypes.
14472 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14474 * remote-utils.c (remote_open): Print a status notice after
14475 opening a TCP port.
14476 * server.c (attach_inferior): Print a status notice after
14479 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14481 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14483 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14485 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14487 * server.c, target.h: Update copyright years.
14489 2004-02-25 Roland McGrath <roland@redhat.com>
14491 * target.h (struct target_ops): New member `read_auxv'.
14492 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14493 * linux-low.c (linux_read_auxv): New function.
14494 (linux_target_ops): Initialize `read_auxv' member to that.
14496 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14498 Committed by Jim Blandy <jimb@redhat.com>.
14500 * linux-s390-low.c (s390_num_regs): Update.
14501 (s390_regmap): Remove control registers. Use __s390x__ predefine
14502 instead of GPR_SIZE to distiguish s390 and s390x targets.
14504 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14506 * linux-low.c: Update copyright year.
14507 (check_removed_breakpoint): Clear pending_is_breakpoint.
14508 (linux_set_resume_request, linux_queue_one_thread)
14509 (resume_status_pending_p): New functions.
14510 (linux_continue_one_thread): Use process->resume.
14511 (linux_resume): Only resume threads if there are no pending events.
14512 * linux-low.h (struct process_info): Add resume request
14515 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14517 * regcache.c (new_register_cache): Clear the allocated register
14518 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14520 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14522 * linux-low.c (linux_resume): Take a struct thread_resume *
14524 (linux_wait): Update call.
14525 (resume_ptr): New static variable.
14526 (linux_continue_one_thread): Renamed from
14527 linux_continue_one_process. Use resume_ptr.
14528 (linux_resume): Use linux_continue_one_thread.
14529 * server.c (handle_v_cont, handle_v_requests): New functions.
14530 (myresume): New function.
14531 (main): Handle 'v' case.
14532 * target.h (struct thread_resume): New type.
14533 (struct target_ops): Change argument of "resume" to struct
14535 (myresume): Delete macro.
14537 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14539 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14540 (uninstall): Support DESTDIR.
14542 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14544 * configure.srv: Add xscale*linux copy of arm*linux entry.
14546 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14548 * linux-arm-low.c (arm_reinsert_addr): New function.
14549 (the_low_target): Add arm_reinsert_addr.
14551 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14553 * mem-break.c: Remove whitespace at end of file.
14555 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14557 * configure.in: Check whether we need to prototype strerror.
14558 * server.h: Optionally prototype strerror.
14559 * gdbreplay.c (perror_with_name): Use strerror.
14560 * linux-low.c (linux_attach_lwp): Use strerror.
14561 * utils.c (perror_with_name): Use strerror.
14562 * config.in, configure: Regenerated.
14564 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14566 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14567 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14569 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14571 * Makefile.in (SFILES): Update.
14572 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14573 low-sun3.c: Remove files.
14575 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14577 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14578 (linux_detach_one_process, linux_detach): New functions.
14579 (linux_target_ops): Add linux_detach.
14580 * server.c (main): Handle 'D' packet.
14581 * target.h (struct target_ops): Add "detach" member.
14582 (detach_inferior): Define.
14584 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14586 From Kelley Cook <kelleycook@wideopenwest.com>:
14587 * configure.srv: Accept i[34567]86 variants.
14589 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14591 * linux-low.c (linux_wait_for_event): Correct comment typos.
14592 (linux_resume_one_process): Call check_removed_breakpoint.
14593 (linux_send_signal): New function.
14594 (linux_target_ops): Add linux_send_signal.
14595 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14597 * target.h (struct target_ops): Add send_signal.
14599 2003-05-29 Jim Blandy <jimb@redhat.com>
14601 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14602 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14603 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14604 away part of the register's value.
14606 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14608 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14609 (linux_wait_for_event, linux_init_signals): Likewise.
14611 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14613 * configure.in: Check for stdlib.h.
14614 * configure: Regenerated.
14615 * config.in: Regenerated.
14617 2003-01-04 Andreas Schwab <schwab@suse.de>
14619 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14621 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14623 * Makefile.in: Remove obsolete code.
14625 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14627 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14628 defined(PT_FPR0_HI).
14630 2002-11-17 Stuart Hughes <seh@zee2.com>
14632 * linux-arm-low.c (arm_num_regs): Increase.
14633 (arm_regmap): Include status register.
14635 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14637 * linux-low.c (register_addr): Remove incorrect -1 check.
14639 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14641 * linux-low.c (linux_create_inferior): Call setpgid. Return
14643 (unstopped_p, linux_signal_pid): Remove.
14644 (linux_target_ops): Remove linux_signal_pid.
14645 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14646 global instead of target method.
14647 * target.h (struct target_ops): Remove signal_pid. Update comment
14648 for create_inferior.
14649 * server.c (signal_pid): New variable.
14650 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14651 gdbserver. Set the child to be the foreground process group.
14652 (attach_inferior): Set signal_pid.
14654 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14656 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14658 2002-08-20 Jim Blandy <jimb@redhat.com>
14660 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14663 2002-08-01 Andrew Cagney <cagney@redhat.com>
14665 * Makefile.in: Make chill references obsolete.
14667 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14669 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14670 * configure: Regenerate.
14671 * config.in: Regenerate.
14673 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14675 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14676 (perror_with_name, remote_close, remote_open, expect, play): Static.
14678 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14680 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14681 byte offsets instead of an array of indexes.
14682 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14684 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14686 * regcache.c: Add comment.
14688 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14690 * thread-db.c: New file.
14691 * proc-service.c: New file.
14692 * acinclude.m4: New file.
14693 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14694 proc-service.o, and thread-db.o.
14695 (linux-low.o): Add USE_THREAD_DB.
14696 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14697 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14698 * aclocal.m4: Regenerated.
14699 * config.in: Regenerated.
14700 * configure: Regenerated.
14701 * configure.in: Check for proc_service.h, sys/procfs.h,
14702 thread_db.h, and linux/elf.h headrs.
14703 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14704 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14705 Check for -lthread_db and thread support.
14706 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14707 PowerPC, and SuperH.
14708 * i387-fp.c: Constify arguments.
14709 * i387-fp.h: Likewise.
14710 * inferiors.c: (struct thread_info): Renamed from
14711 `struct inferior_info'. Remove PID member. Use generic inferior
14712 list header. All uses updated.
14713 (inferiors, signal_pid): Removed.
14714 (all_threads): New variable.
14715 (get_thread): Define.
14716 (add_inferior_to_list): New function.
14717 (for_each_inferior): New function.
14718 (change_inferior_id): New function.
14719 (add_inferior): Removed.
14720 (remove_inferior): New function.
14721 (add_thread): New function.
14722 (free_one_thread): New function.
14723 (remove_thread): New function.
14724 (clear_inferiors): Use for_each_inferior and free_one_thread.
14725 (find_inferior): New function.
14726 (find_inferior_id): New function.
14727 (inferior_target_data): Update argument type.
14728 (set_inferior_target_data): Likewise.
14729 (inferior_regcache_data): Likewise.
14730 (set_inferior_regcache_data): Likewise.
14731 * linux-low.c (linux_bp_reinsert): Remove.
14732 (all_processes, stopping_threads, using_thrads)
14733 (struct pending_signals, debug_threads, pid_of): New.
14734 (inferior_pid): Replace with macro.
14735 (struct inferior_linux_data): Remove.
14736 (get_stop_pc, add_process): New functions.
14737 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14738 Use add_process and add_thread.
14739 (linux_attach_lwp): New function, based on old linux_attach. Use
14740 add_process and add_thread. Set stop_expected for new threads.
14741 (linux_attach): New function.
14742 (linux_kill_one_process): New function.
14743 (linux_kill): Kill all LWPs.
14744 (linux_thread_alive): Use find_inferior_id.
14745 (check_removed_breakpoints, status_pending_p): New functions.
14746 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14747 Update. Use WNOHANG. Wait for cloned processes also. Update process
14748 struct for the found process.
14749 (linux_wait_for_event): New function.
14750 (linux_wait): Use it. Support LWPs.
14751 (send_sigstop, wait_for_sigstop, stop_all_processes)
14752 (linux_resume_one_process, linux_continue_one_process): New functions.
14753 (linux_resume): Support LWPs.
14754 (REGISTER_RAW_SIZE): Remove.
14755 (fetch_register): Use register_size instead. Call supply_register.
14756 (usr_store_inferior_registers): Likewise. Call collect_register.
14757 Fix recursive case.
14758 (regsets_fetch_inferior_registers): Improve error message.
14759 (regsets_store_inferior_registers): Add debugging.
14760 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14761 (unstopped_p, linux_signal_pid): New functions.
14762 (linux_target_ops): Add linux_signal_pid.
14763 (linux_init_signals): New function.
14764 (initialize_low): Call it. Initialize using_threads.
14765 * regcache.c (inferior_regcache_data): Add valid
14767 (get_regcache): Fetch registers lazily. Add fetch argument
14768 and update all callers.
14769 (regcache_invalidate_one, regcache_invalidate): New
14771 (new_register_cache): Renamed from create_register_cache.
14772 Return the new regcache.
14773 (free_register_cache): Change argument to a void *.
14774 (registers_to_string, registers_from_string): Call get_regcache
14775 with fetch flag set.
14776 (register_data): Make static. Pass fetch flag to get_regcache.
14777 (supply_register): Call get_regcache with fetch flag clear.
14778 (collect_register): Call get_regcache with fetch flag set.
14779 (collect_register_as_string): New function.
14780 * regcache.h: Update.
14781 * remote-utils.c (putpkt): Flush after debug output and use
14783 Handle input interrupts while waiting for an ACK.
14784 (input_interrupt): Use signal_pid method.
14785 (getpkt): Flush after debug output and use stderr.
14786 (outreg): Use collect_register_as_string.
14787 (new_thread_notify, dead_thread_notify): New functions.
14788 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14789 and general_thread.
14790 (look_up_one_symbol): Flush after debug output.
14791 * server.c (step_thread, server_waiting): New variables.
14792 (start_inferior): Don't use signal_pid. Update call to mywait.
14793 (attach_inferior): Update call to mywait.
14794 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14795 (main): Don't fetch/store registers explicitly. Use
14796 set_desired_inferior. Support proposed ``Hs'' packet. Update
14798 * server.h: Update.
14799 (struct inferior_list, struct_inferior_list_entry): New.
14800 * target.c (set_desired_inferior): New.
14801 (write_inferior_memory): Constify.
14802 (mywait): New function.
14803 * target.h: Update.
14804 (struct target_ops): New signal_pid method.
14805 (mywait): Removed macro, added prototype.
14807 * linux-low.h (regset_func): Removed.
14808 (regset_fill_func, regset_store_func): New.
14809 (enum regset_type): New.
14810 (struct regset_info): Add type field. Use new operation types.
14811 (struct linux_target_ops): stop_pc renamed to get_pc.
14812 Add decr_pc_after_break and breakpoint_at.
14813 (get_process, get_thread_proess, get_process_thread)
14814 (strut process_info, all_processes, linux_attach_lwp)
14815 (thread_db_init): New.
14817 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14818 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14819 (the_low_target): Add new members.
14820 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14821 (i386_store_fpxregset): Constify.
14822 (target_regsets): Add new kind identifier.
14823 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14824 (i386_set_pc): Add debugging.
14825 (i386_breakpoint_at): New function.
14826 (the_low_target): Add new members.
14827 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14828 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14829 (mips_breakpoint_at): New.
14830 (the_low_target): Add new members.
14831 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14832 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14833 (the_low_target): Add new members.
14834 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14835 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14836 (the_low_target): Add new members.
14837 * linux-x86-64-low.c (target_regsets): Add new kind
14840 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14842 From Martin Pool <mbp@samba.org>:
14843 * server.c (gdbserver_usage): New function.
14846 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14848 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14849 stop_at -> stop_pc.
14851 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14853 * Makefile.in: Remove obsolete code.
14855 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14857 * linux-low.c (regsets_fetch_inferior_registers),
14858 (regsets_store_inferior_registers): Removed cast to int from
14860 * regcache.h: Added declaration of struct inferior_info.
14862 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14864 * inferiors.c (struct inferior_info): Add regcache_data.
14865 (add_inferior): Call create_register_cache.
14866 (clear_inferiors): Call free_register_cache.
14867 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14868 * regcache.c (struct inferior_regcache_data): New.
14869 (registers): Remove.
14870 (get_regcache): New function.
14871 (create_register_cache, free_register_cache): New functions.
14872 (set_register_cache): Don't initialize the register cache here.
14873 (registers_to_string, registers_from_string, register_data): Call
14875 * regcache.h: Add prototypes.
14876 * server.h: Likewise.
14878 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14880 * mem-break.c: New file.
14881 * mem-break.h: New file.
14882 * Makefile.in: Add mem-break.o rule; update server.h
14884 * inferiors.c (struct inferior_info): Add target_data
14886 (clear_inferiors): Free target_data member if set.
14887 (inferior_target_data, set_inferior_target_data): New functions.
14888 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14889 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14890 * linux-low.c (linux_bp_reinsert): New variable.
14891 (struct inferior_linux_data): New.
14892 (linux_create_inferior): Use set_inferior_target_data.
14893 (linux_attach): Likewise. Call add_inferior.
14894 (linux_wait_for_one_inferior): New function.
14895 (linux_wait): Call it.
14896 (linux_write_memory): Add const.
14897 (initialize_low): Call set_breakpoint_data.
14898 * linux-low.h (struct linux_target_ops): Add breakpoint
14900 * server.c (attach_inferior): Remove extra add_inferior
14902 * server.h: Include mem-break.h. Update inferior.c
14904 * target.c (read_inferior_memory)
14905 (write_inferior_memory): New functions.
14906 * target.h (read_inferior_memory)
14907 (write_inferior_memory): Change macros to prototypes.
14908 (struct target_ops): Update comments. Add const to write_memory
14911 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14913 * linux-low.c (usr_store_inferior_registers): Support
14914 registers which are allowed to fail to store.
14915 * linux-low.h (linux_target_ops): Likewise.
14916 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14917 (ppc_cannot_store_register): FPSCR may not be storable.
14919 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14921 * server.h: Include <string.h> if HAVE_STRING_H.
14922 * ChangeLog: Correct paths in last ChangeLog entry.
14924 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14926 * linux-low.h: Remove obsolete prototypes.
14927 (struct linux_target_ops): New.
14928 (extern the_low_target): New.
14929 * linux-low.c (num_regs, regmap): Remove declarations.
14930 (register_addr): Use the_low_target explicitly.
14931 (fetch_register): Likewise.
14932 (usr_fetch_inferior_registers): Likewise.
14933 (usr_store_inferior_registers): Likewise.
14934 * linux-arm-low.c (num_regs): Remove.
14935 (arm_num_regs): Define.
14936 (arm_regmap): Renamed from regmap, made static.
14937 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14939 (arm_cannot_store_register): Renamed from cannot_store_register,
14941 (the_low_target): New.
14942 * linux-i386-low.c (num_regs): Remove.
14943 (i386_num_regs): Define.
14944 (i386_regmap): Renamed from regmap, made static.
14945 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14947 (i386_cannot_store_register): Renamed from cannot_store_register,
14949 (the_low_target): New.
14950 * linux-ia64-low.c (num_regs): Remove.
14951 (ia64_num_regs): Define.
14952 (ia64_regmap): Renamed from regmap, made static.
14953 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14955 (ia64_cannot_store_register): Renamed from cannot_store_register,
14957 (the_low_target): New.
14958 * linux-m68k-low.c (num_regs): Remove.
14959 (m68k_num_regs): Define.
14960 (m68k_regmap): Renamed from regmap, made static.
14961 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14963 (m68k_cannot_store_register): Renamed from cannot_store_register,
14965 (the_low_target): New.
14966 * linux-mips-low.c (num_regs): Remove.
14967 (mips_num_regs): Define.
14968 (mips_regmap): Renamed from regmap, made static.
14969 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14971 (mips_cannot_store_register): Renamed from cannot_store_register,
14973 (the_low_target): New.
14974 * linux-ppc-low.c (num_regs): Remove.
14975 (ppc_num_regs): Define.
14976 (ppc_regmap): Renamed from regmap, made static.
14977 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14979 (ppc_cannot_store_register): Renamed from cannot_store_register,
14981 (the_low_target): New.
14982 * linux-s390-low.c (num_regs): Remove.
14983 (s390_num_regs): Define.
14984 (s390_regmap): Renamed from regmap, made static.
14985 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14987 (s390_cannot_store_register): Renamed from cannot_store_register,
14989 (the_low_target): New.
14990 * linux-sh-low.c (num_regs): Remove.
14991 (sh_num_regs): Define.
14992 (sh_regmap): Renamed from regmap, made static.
14993 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14995 (sh_cannot_store_register): Renamed from cannot_store_register,
14997 (the_low_target): New.
14998 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14999 (the_low_target): New.
15001 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15003 * Makefile.in: Add stamp-h target.
15004 * configure.in: Create stamp-h.
15005 * configure: Regenerated.
15007 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15009 * inferiors.c: New file.
15010 * target.c: New file.
15011 * target.h: New file.
15012 * Makefile.in: Add target.o and inferiors.o. Update
15014 * linux-low.c (inferior_pid): New static variable,
15015 moved from server.c.
15016 (linux_create_inferior): Renamed from create_inferior.
15017 Call add_inferior. Return 0 on success instead of a PID.
15018 (linux_attach): Renamed from myattach.
15019 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15020 (linux_thread_alive): Renamed from mythread_alive.
15021 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15023 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15024 (regsets_store_inferior_registers): Correct error message.
15025 Add missing ``return 0''.
15026 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15027 (linux_store_registers): Renamed from store_inferior_registers.
15028 (linux_read_memory): Renamed from read_inferior_memory.
15029 (linux_write_memory): Renamed from write_inferior_memory.
15030 (linux_target_ops): New structure.
15031 (initialize_low): Call set_target_ops ().
15032 * remote-utils.c (unhexify): New function.
15033 (hexify): New function.
15034 (input_interrupt): Send signals to ``signal_pid''.
15035 * server.c (inferior_pid): Remove.
15036 (start_inferior): Update create_inferior call.
15037 (attach_inferior): Call add_inferior.
15038 (handle_query): New function.
15039 (main): Call handle_query for `q' packets.
15040 * server.h: Include "target.h". Remove obsolete prototypes.
15041 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15043 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15045 * Makefile.in: Add WARN_CFLAGS. Update configury
15047 * configure.in: Check for <string.h>
15048 * configure: Regenerate.
15049 * config.in: Regenerate.
15050 * gdbreplay.c: Include needed system headers.
15051 (remote_open): Remove strchr prototype.
15052 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15053 * regcache.c (supply_register): Change buf argument to const void *.
15054 (supply_register_by_name): Likewise.
15055 (collect_register): Change buf argument to void *.
15056 (collect_register_by_name): Likewise.
15057 * regcache.h: Add missing prototypes.
15058 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15059 * server.c (handle_query): New function.
15060 (attached): New static variable, moved out of main.
15061 (main): Quiet longjmp clobber warnings.
15062 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15063 * utils.c (error): Remove NORETURN.