1 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3 * server.c (handle_general_set): Handle new packet
5 (handle_query): Add "QStartupWithShell" to the list of supported
7 (gdbserver_usage): Add help text explaining the
8 new "--startup-with-shell" and "--no-startup-with-shell" CLI
10 (captured_main): Recognize and act upon the presence of the new
13 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
14 Pedro Alves <palves@redhat.com>
16 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
17 * configure: Regenerate.
18 * configure.srv (srv_linux_obj): Add "fork-child.o" and
20 (i[34567]86-*-lynxos*): Likewise.
22 * fork-child.c: New file.
23 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
25 (linux_ptrace_fun): New function.
26 (linux_create_inferior): Adjust function prototype to reflect
27 change on "target.h". Adjust function code to use
29 (linux_request_interrupt): Delete "signal_pid".
30 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
31 (lynx_ptrace_fun): New function.
32 (lynx_create_inferior): Adjust function prototype to reflect
33 change on "target.h". Adjust function code to use
35 * nto-low.c (nto_create_inferior): Adjust function prototype and
36 code to reflect change on "target.h". Update comments.
37 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
38 "common-terminal.h" and "environ.h".
39 (terminal_fd): Moved to fork-child.c.
40 (old_foreground_pgrp): Likewise.
41 (restore_old_foreground_pgrp): Likewise.
42 (last_status): Make it global.
43 (last_ptid): Likewise.
44 (our_environ): New variable.
45 (startup_with_shell): Likewise.
46 (program_name): Likewise.
47 (program_argv): Rename to...
48 (program_args): ...this.
49 (wrapper_argv): New variable.
50 (start_inferior): Delete function.
51 (get_exec_wrapper): New function.
52 (get_exec_file): Likewise.
53 (get_environ): Likewise.
54 (prefork_hook): Likewise.
55 (post_fork_inferior): Likewise.
56 (postfork_hook): Likewise.
57 (postfork_child_hook): Likewise.
58 (handle_v_run): Update code to deal with arguments coming from the
59 remote host. Update calls from "start_inferior" to
61 (captured_main): Likewise. Initialize environment variable. Call
63 * server.h (post_fork_inferior): New prototype.
64 (get_environ): Likewise.
65 (last_status): Declare.
66 (last_ptid): Likewise.
67 (signal_pid): Likewise.
68 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
69 (spu_ptrace_fun): New function.
70 (spu_create_inferior): Adjust function prototype to reflect change
71 on "target.h". Adjust function code to use "fork_inferior".
72 * target.c (target_terminal_init): New function.
73 (target_terminal_inferior): Likewise.
74 (target_terminal_ours): Likewise.
75 * target.h: Include <vector>.
76 (struct target_ops) <create_inferior>: Update prototype.
77 (create_inferior): Update macro.
78 * utils.c (gdb_flush_out_err): New function.
79 * win32-low.c (win32_create_inferior): Adjust function prototype
80 and code to reflect change on "target.h".
82 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
84 * inferiors.c (switch_to_thread): New function.
86 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
88 * Makefile.in (SFILE): Add "common/job-control.c".
89 (OBS): Add "job-control.o".
91 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
93 * Makefile: Remove "@host_makefile_frag@".
95 2017-05-05 Pedro Alves <palves@redhat.com>
97 * configure: Regenerate.
99 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
101 * configure: Regenerate.
103 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
105 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
106 software_single_step change of return type to
107 std::vector<CORE_ADDR>.
108 * linux-low.c (install_software_single_step_breakpoints):
110 * linux-low.h (install_software_single_step_breakpoints):
113 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
115 * remote-utils.c: Include "gdb_termios.h" instead of
117 * terminal.h: Delete file.
119 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
121 * server.c: Include <vector>.
122 <program_argv, wrapper_argv>: Convert to std::vector.
123 (start_inferior): Rewrite function to use C++.
124 (handle_v_run): Likewise. Update code that calculates the argv
125 based on the vRun packet; use C++.
126 (captured_main): Likewise.
128 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
130 * server.c (handle_v_cont): Initialize thread_resume::thread
133 2017-04-05 Pedro Alves <palves@redhat.com>
135 * configure: Regenerate.
137 2017-04-05 Pedro Alves <palves@redhat.com>
139 * gdbreplay.c (sync_error): Constify.
140 * linux-x86-low.c (push_opcode): Constify.
142 2017-04-05 Pedro Alves <palves@redhat.com>
144 * win32-low.c (get_child_debug_event)
145 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
146 Report TARGET_WAITKIND_SPURIOUS instead.
148 2017-04-05 Pedro Alves <palves@redhat.com>
150 * remote-utils.c (remote_prepare, remote_open): Constify.
151 * remote-utils.h (remote_prepare, remote_open): Constify.
152 * server.c (captured_main): Constify 'port' handling.
154 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
156 * Makefile.in (clean): Clear .deps.
158 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
160 * .gitignore: Remove generated files, replace with wildcard.
161 * (clean): Replace removal of generated files with wildcard.
162 (version.c): Replace with...
163 (version-generated.c): ...this.
164 (xml-builtin.c): Replace with...
165 (xml-builtin-generated.c): ...this.
166 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
167 (%.c: *regformats*): Replace with...
168 (%-generated.c: *regformats*): ...this.
170 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
172 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
173 (xtensa_fill_gregset): Call collect_register_by_name for
175 (xtensa_store_gregset): Call supply_register_by_name for
178 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
180 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
181 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
182 (xtensa_store_gregset): Call supply_register for all registers in
183 a0_regnum..a0_regnum + C0_NREGS range.
185 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
187 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
188 (ax-ipa.o: ax.c): Remove.
189 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
190 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
191 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
192 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
193 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
195 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
197 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
198 (print-utils-ipa.o: ../common/print-utils.c): Remove.
199 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
200 (errors-ipa.o: ../common/errors.c): Remove.
201 (format-ipa.o: ../common/format.c): Remove.
202 (common-utils-ipa.o: ../common/common-utils.c): Remove.
204 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
206 * Makefile.in (%-ipa.o: %.c): New rule.
207 (tracepoint-ipa.o: tracepoint.c): Remove.
208 (utils-ipa.o: utils.c): Remove.
209 (remote-utils-ipa.o: remote-utils.c): Remove.
210 (regcache-ipa.o: regcache.c): Remove.
211 (i386-linux-ipa.o: i386-linux.c): Remove.
212 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
213 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
214 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
215 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
216 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
217 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
218 (amd64-linux-ipa.o: amd64-linux.c): Remove.
219 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
220 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
221 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
222 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
223 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
224 (aarch64-ipa.o: aarch64.c): Remove.
225 (s390-linux32-ipa.o: s390-linux32.c): Remove.
226 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
227 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
228 (s390-linux64-ipa.o: s390-linux64.c): Remove.
229 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
230 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
231 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
232 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
233 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
234 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
235 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
236 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
237 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
238 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
239 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
240 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
241 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
242 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
243 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
244 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
245 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
246 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
247 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
248 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
249 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
250 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
251 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
252 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
253 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
254 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
255 (tdesc-ipa.o: tdesc.c): Remove.
256 (x32-linux-ipa.o: x32-linux.c): Remove.
257 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
258 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
260 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
262 * Makefile.in (%.o: ../arch/%.c): New rule.
263 (arm.o: ../arch/arm.c): Remove.
264 (arm-linux.o: ../arch/arm-linux.c): Remove.
265 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
266 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
268 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
270 * Makefile.in (%.o: ../nat/%.c): New rule.
271 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
272 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
273 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
274 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
275 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
276 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
277 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
278 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
279 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
280 (linux-personality.o: ../nat/linux-personality.c): Remove.
281 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
282 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
283 (x86-linux.o: ../nat/x86-linux.c): Remove.
284 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
285 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
287 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
289 * Makefile.in (%.o: ../common/%.c): New rule.
290 (signals.o: ../common/signals.c): Remove.
291 (print-utils.o: ../common/print-utils.c): Remove.
292 (rsp-low.o: ../common/rsp-low.c): Remove.
293 (common-utils.o: ../common/common-utils.c): Remove.
294 (posix-strerror.o: ../common/posix-strerror.c): Remove.
295 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
296 (vec.o: ../common/vec.c): Remove.
297 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
298 (xml-utils.o: ../common/xml-utils.c): Remove.
299 (ptid.o: ../common/ptid.c): Remove.
300 (buffer.o: ../common/buffer.c): Remove.
301 (format.o: ../common/format.c): Remove.
302 (filestuff.o: ../common/filestuff.c): Remove.
303 (agent.o: ../common/agent.c): Remove.
304 (errors.o: ../common/errors.c): Remove.
305 (environ.o: ../common/environ.c): Remove.
306 (common-debug.o: ../common/common-debug.c): Remove.
307 (cleanups.o: ../common/cleanups.c): Remove.
308 (common-exceptions.o: ../common/common-exceptions.c): Remove.
309 (fileio.o: ../common/fileio.c): Remove.
310 (common-regcache.o: ../common/common-regcache.c): Remove.
311 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
312 (new-op.o: ../common/new-op.c): Remove.
313 (btrace-common.o: ../common/btrace-common.c): Remove.
315 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
317 * Makefile.in (%.o: ../target/%.c): New rule.
318 (waitstatus.o: ../target/waitstatus.c): Remove.
320 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
323 (%.c: ../regformats/%.dat,
324 (%.c: ../regformats/arm/%.dat,
325 (%.c: ../regformats/i386/%.dat,
326 (%.c: ../regformats/rs6000/%.dat): New rules.
329 (arm-with-iwmmxt.c): Remove.
330 (arm-with-vfpv2.c): Remove.
331 (arm-with-vfpv3.c): Remove.
332 (arm-with-neon.c): Remove.
333 (reg-bfin.c): Remove.
334 (reg-cris.c): Remove.
335 (reg-crisv32.c): Remove.
337 (i386-linux.c): Remove.
338 (i386-avx.c): Remove.
339 (i386-avx-linux.c): Remove.
340 (i386-avx-avx512.c): Remove.
341 (i386-avx-avx512-linux.c): Remove.
342 (i386-mpx.c): Remove.
343 (i386-mpx-linux.c): Remove.
344 (i386-avx-mpx-avx512-pku.c): Remove.
345 (i386-avx-mpx-avx512-pku-linux.c): Remove.
346 (i386-avx-mpx.c): Remove.
347 (i386-avx-mpx-linux.c): Remove.
348 (i386-mmx.c): Remove.
349 (i386-mmx-linux.c): Remove.
350 (reg-ia64.c): Remove.
351 (reg-m32r.c): Remove.
352 (reg-m68k.c): Remove.
354 (mips-linux.c): Remove.
355 (mips-dsp-linux.c): Remove.
356 (mips64-linux.c): Remove.
357 (mips64-dsp-linux.c): Remove.
358 (nios2-linux.c): Remove.
359 (powerpc-32.c): Remove.
360 (powerpc-32l.c): Remove.
361 (powerpc-altivec32l.c): Remove.
362 (powerpc-cell32l.c): Remove.
363 (powerpc-vsx32l.c): Remove.
364 (powerpc-isa205-32l.c): Remove.
365 (powerpc-isa205-altivec32l.c): Remove.
366 (powerpc-isa205-vsx32l.c): Remove.
367 (powerpc-e500l.c): Remove.
368 (powerpc-64l.c): Remove.
369 (powerpc-altivec64l.c): Remove.
370 (powerpc-cell64l.c): Remove.
371 (powerpc-vsx64l.c): Remove.
372 (powerpc-isa205-64l.c): Remove.
373 (powerpc-isa205-altivec64l.c): Remove.
374 (powerpc-isa205-vsx64l.c): Remove.
375 (s390-linux32.c): Remove.
376 (s390-linux32v1.c): Remove.
377 (s390-linux32v2.c): Remove.
378 (s390-linux64.c): Remove.
379 (s390-linux64v1.c): Remove.
380 (s390-linux64v2.c): Remove.
381 (s390-te-linux64.c): Remove.
382 (s390-vx-linux64.c): Remove.
383 (s390-tevx-linux64.c): Remove.
384 (s390x-linux64.c): Remove.
385 (s390x-linux64v1.c): Remove.
386 (s390x-linux64v2.c): Remove.
387 (s390x-te-linux64.c): Remove.
388 (s390x-vx-linux64.c): Remove.
389 (s390x-tevx-linux64.c): Remove.
390 (tic6x-c64xp-linux.c): Remove.
391 (tic6x-c64x-linux.c): Remove.
392 (tic6x-c62x-linux.c): Remove.
394 (reg-sparc64.c): Remove.
397 (amd64-linux.c): Remove.
398 (amd64-avx.c): Remove.
399 (amd64-avx-linux.c): Remove.
400 (amd64-avx-avx512.c): Remove.
401 (amd64-avx-avx512-linux.c): Remove.
402 (amd64-mpx.c): Remove.
403 (amd64-mpx-linux.c): Remove.
404 (amd64-avx-mpx-avx512-pku.c): Remove.
405 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
406 (amd64-avx-mpx.c): Remove.
407 (amd64-avx-mpx-linux.c): Remove.
409 (x32-linux.c): Remove.
411 (x32-avx-linux.c): Remove.
412 (x32-avx-avx512.c): Remove.
413 (x32-avx-avx512-linux.c): Remove.
414 (reg-xtensa.c): Remove.
415 (reg-tilegx.c): Remove.
416 (reg-tilegx32.c): Remove.
418 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
420 * Makefile.in (SFILES): Add "common/environ.c".
421 (OBJS): Add "common/environ.h".
423 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
425 * configure.ac: Check if the fs_base and gs_base members of
426 `struct user_regs_struct' exist.
427 * config.in: Regenerated.
428 * configure: Likewise.
430 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
432 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
434 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
435 (get_next_pcs_syscall_next_pc): Likewise.
437 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
439 * win32-i386-low.c: Fix incorrect reference to a couple source files.
440 * nto-x86-low.c: Likewise.
442 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
444 * Makefile.in: Include disable-implicit-rules.mk.
446 2016-11-23 Pedro Alves <palves@redhat.com>
448 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
449 (debug_vprintf): Use std::chrono::steady_clock instead of
450 gettimeofday. Use '.' instead of ':'.
451 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
452 (get_timestamp): Use std::chrono::steady_clock instead of
455 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
457 * Makefile.in: Fix whitespace formatting.
459 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
461 * Makefile.in (SFILES, OBS): Flatten list and order
464 2016-11-23 Pedro Alves <palves@redhat.com>
466 * event-loop.c (handle_file_event): Use warning.
467 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
468 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
471 2016-11-23 Pedro Alves <palves@redhat.com>
473 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
475 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
476 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
477 debug_printf and debug_flush for debug output.
478 * server.c (handle_general_set): Likewise.
479 * thread-db.c (try_thread_db_load): Use debug_printf for debug
482 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
484 * Makefile.in (.c.o): Replace rule with ...
485 (%.o: %.c): ... this one.
487 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
489 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
490 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
492 * configure.ac: Remove checks for the make program.
493 * configure: Re-generate.
495 2016-10-28 Pedro Alves <palves@redhat.com>
497 * Makefile.in (CXX_DIALECT): Get from configure.
498 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
499 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
500 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
501 * config.in: Regenerate.
502 * configure: Regenerate.
504 2016-10-27 Yao Qi <yao.qi@linaro.org>
506 * linux-low.c (linux_supports_range_stepping): Return true if
507 can_software_single_step return true.
509 2016-10-27 Yao Qi <yao.qi@linaro.org>
511 * inferiors.c (find_inferior_in_random): New function.
512 * inferiors.h (find_inferior_in_random): Declare.
513 * linux-low.c (linux_wait_for_event_filtered): Call
514 find_inferior_in_random instead of find_inferior.
516 2016-10-27 Yao Qi <yao.qi@linaro.org>
518 * linux-low.c (linux_wait_1): If single-step breakpoints are
519 inserted, remove them.
521 2016-10-26 Pedro Alves <palves@redhat.com>
523 * linux-low.c (handle_extended_wait): Link parent/child fork
525 (linux_wait_1): Unlink them.
526 (linux_set_resume_request): Ignore resume requests for
527 already-resumed and unhandled fork child threads.
528 * linux-low.h (struct lwp_info) <fork_relative>: New field.
529 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
531 (handle_v_requests) <vCont>: Don't call require_running.
532 * server.h (in_queued_stop_replies): New declaration.
534 2016-10-24 Yao Qi <yao.qi@linaro.org>
537 * linux-aarch64-low.c (append_insns): Cast the return value to
540 2016-10-10 Yao Qi <yao.qi@linaro.org>
542 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
544 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
546 * target.c (target_supports_multi_process): New function, moved
548 * target.h (target_supports_multi_process): ... here. Remove
551 2016-10-05 Tom Tromey <tom@tromey.com>
554 * tracepoint.c (handle_tracepoint_bkpts): Check
555 ipa_error_tracepoint, not ipa_stopping_tracepoint.
557 2016-10-05 Yao Qi <yao.qi@linaro.org>
559 * configure.srv: Update the path of arm-*.xml files.
561 2016-10-05 Terry Guo <terry.guo@arm.com>
562 Yao Qi <yao.qi@linaro.org>
564 * Makefile.in: Adjust the path of rules.
565 * configure.srv: Update the path of xml files.
566 * regformats/arm-with-iwmmxt.dat: Regenerated.
567 * regformats/arm-with-neon.dat: Likewise.
568 * regformats/arm-with-vfpv2.dat: Likewise.
569 * regformats/arm-with-vfpv3.dat Likewise.
571 2016-09-30 Yao Qi <yao.qi@linaro.org>
574 * target.c (target_stop_and_wait): Don't call
575 target_continue_no_signal, use resume_stop instead.
577 2016-09-26 Yao Qi <yao.qi@linaro.org>
579 * linux-low.c (linux_wait_1): Call debug_exit.
581 2016-09-23 Pedro Alves <palves@redhat.com>
583 * Makefile.in (SFILES): Add common/new-op.c.
584 (OBS): Add common/new-op.o.
585 (new-op.o): New rule.
587 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
589 * .gitinore: Ignore more files.
591 2016-09-21 Yao Qi <yao.qi@linaro.org>
593 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
596 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
598 * server.c (start_inferior): Call target_mourn_inferior instead of
599 mourn_inferior; pass ptid_t argument to it.
601 (handle_target_event): Likewise.
602 * target.c (target_mourn_inferior): New function.
603 * target.h (mourn_inferior): Delete macro.
605 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
607 * linux-low.c (lwp_is_stepping): New function.
609 2016-09-06 Carl Love <cel@us.ibm.com>
611 * server.c (start_inferior): Fixed comment, requested comment change
612 didn't get updated correctly. Removed reference to ptrace () call as
613 it is only true on Linux systems.
615 2016-09-06 Carl Love <cel@us.ibm.com>
617 * server.c (start_inferior): Do not call
618 function target_post_create_inferior () if the
619 inferior process has already exited.
621 2016-09-05 Pedro Alves <palves@redhat.com>
623 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
624 (COMPILE.pre, CC_LD): Use CXX directly.
625 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
626 * acinclude.m4: Don't include build-with-cxx.m4.
627 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
628 * configure: Regenerate.
630 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
633 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
634 call writing data to own_buf.
636 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
638 * target.c (mywait): Call target_wait instead of
640 (target_wait): New function.
642 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
644 * server.c (start_inferior): New variable 'ptid'. Replace calls
645 to the_target->resume by target_continue{,_no_signal}, depending
647 * target.c (target_stop_and_wait): Call target_continue_no_signal
648 instead of the_target->resume.
649 (target_continue): New function.
651 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
653 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
655 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
658 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
660 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
661 * linux-arm-low.c (ps_get_thread_area): Likewise.
662 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
663 * linux-m68k-low.c (ps_get_thread_area): Likewise.
664 * linux-mips-low.c (ps_get_thread_area): Likewise.
665 * linux-nios2-low.c (ps_get_thread_area): Likewise.
666 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
667 * linux-x86-low.c (ps_get_thread_area): Likewise.
668 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
670 2016-08-19 Pedro Alves <palves@redhat.com>
672 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
674 2016-08-19 Pedro Alves <palves@redhat.com>
676 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
677 comment. Use memcpy instead of casting through unsigned long.
679 2016-08-19 Pedro Alves <palves@redhat.com>
681 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
682 allocating around 0x80000000.
684 2016-08-19 Pedro Alves <palves@redhat.com>
687 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
688 (x32-avx512-linux-ipa.o): New rules.
689 * configure.ac (x86_64-*-linux*): New x32 check.
690 * configure.srv (ipa_x32_linux_regobj): New.
691 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
692 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
694 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
696 * configure: Regenerate.
698 2016-08-09 Pedro Alves <palves@redhat.com>
701 * Makefile.in (OBS): Add signals-state-save-restore.o.
702 (signals-state-save-restore.o): New rule.
703 * config.in: Regenerate.
704 * configure: Regenerate.
705 * linux-low.c: Include "signals-state-save-restore.h".
706 (linux_create_inferior): Call
707 restore_original_signals_state.
708 * server.c: Include "dispositions-save-restore.h".
709 (captured_main): Call save_original_signals_state.
711 2016-08-05 Pedro Alves <palves@redhat.com>
713 * configure: Regenerate.
715 2016-08-04 Yao Qi <yao.qi@linaro.org>
717 * linux-low.c (regsets_fetch_inferior_registers): Check
718 errno is ESRCH or not.
720 2016-08-02 Yao Qi <yao.qi@linaro.org>
722 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
723 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
724 (thread_db_load_search): Update.
725 (try_thread_db_load_1): Don't look for td_ta_event_addr,
726 td_ta_set_event and td_ta_event_getmsg.
728 2016-07-26 Pedro Alves <palves@redhat.com>
731 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
732 of unsigned long for 64-bit registers and use uint32_t instead of
733 unsigned int for 32-bit registers.
735 2016-07-26 Pedro Alves <palves@redhat.com>
737 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
740 2016-07-21 Tom Tromey <tom@tromey.com>
742 * configure: Rebuild.
744 2016-07-21 Yao Qi <yao.qi@linaro.org>
746 * mem-break.c (find_gdb_breakpoint): Cast bp to
747 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
749 2016-07-21 Yao Qi <yao.qi@linaro.org>
751 * server.c (handle_v_requests): Support s and S actions
752 if target_supports_software_single_step return true.
754 2016-07-21 Yao Qi <yao.qi@linaro.org>
756 * linux-low.c (resume_stopped_resumed_lwps): If resume request
757 is resume_step, call maybe_hw_step.
758 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
760 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
762 (proceed_one_lwp): If resume request is resume_step, install
763 reinsert breakpoints and call maybe_hw_step.
765 2016-07-21 Yao Qi <yao.qi@linaro.org>
767 * linux-low.c (proceed_one_lwp): Declare.
768 (linux_resume_one_thread): Remove local variable 'step'.
769 Lift code enqueue signal. Call proceed_one_lwp instead of
770 linux_resume_one_lwp.
772 2016-07-21 Yao Qi <yao.qi@linaro.org>
774 * linux-low.c (linux_resume_one_thread): Call
775 enqueue_pending_signal.
777 2016-07-21 Yao Qi <yao.qi@linaro.org>
779 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
780 * inferiors.c (do_restore_current_thread_cleanup): New function.
781 (make_cleanup_restore_current_thread): Likewise.
782 * linux-low.c (install_software_single_step_breakpoints): Call
783 make_cleanup_restore_current_thread. Switch current_thread to
786 2016-07-21 Yao Qi <yao.qi@linaro.org>
788 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
789 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
790 (clone_one_breakpoint): Likewise.
791 (delete_reinsert_breakpoints): Change parameter to thread.
793 (has_reinsert_breakpoints): Likewise.
794 (uninsert_reinsert_breakpoints): Likewise.
795 (reinsert_reinsert_breakpoints): Likewise.
796 * mem-break.h (set_reinsert_breakpoint): Update declaration.
797 (delete_reinsert_breakpoints): Likewise.
798 (reinsert_reinsert_breakpoints): Likewise.
799 (uninsert_reinsert_breakpoints): Likewise.
800 (has_reinsert_breakpoints): Likewise.
802 2016-07-21 Yao Qi <yao.qi@linaro.org>
804 * inferiors.c (get_thread_process): Make parameter const.
805 * inferiors.h (get_thread_process): Update declaration.
806 * mem-break.c (clone_all_breakpoints): Remove all parameters.
807 Add new parameters child_thread and parent_thread. Callers
809 * mem-break.h (clone_all_breakpoints): Update declaration.
811 2016-07-21 Yao Qi <yao.qi@linaro.org>
813 * mem-break.c (struct breakpoint) <cond_list>: Remove.
814 <command_list, handler>: Remove.
815 (struct gdb_breakpoint): New.
816 (struct other_breakpoint): New.
817 (struct reinsert_breakpoint): New.
818 (is_gdb_breakpoint): New function.
819 (any_persistent_commands): Update command_list if
820 is_gdb_breakpoint returns true.
821 (set_breakpoint): Create breakpoints according to their types.
822 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
823 (set_gdb_breakpoint_1): Likewise.
824 (set_gdb_breakpoint): Likewise.
825 (clear_breakpoint_conditions): Change parameter type to
826 'struct gdb_breakpoint *'.
827 (clear_breakpoint_commands): Likewise.
828 (clear_breakpoint_conditions_and_commands): Likewise.
829 (add_condition_to_breakpoint): Likewise.
830 (add_breakpoint_condition): Likewise.
831 (add_commands_to_breakpoint): Likewise.
832 (check_breakpoints): Check other_breakpoint.
833 (clone_one_breakpoint): Clone breakpopint according to its type.
834 * mem-break.h (struct gdb_breakpoint): Declare.
835 (set_gdb_breakpoint): Update declaration.
836 (clear_breakpoint_conditions_and_commands): Likewise.
837 (add_breakpoint_condition): Likewise.
838 (add_breakpoint_commands): Likewise.
839 * server.c (process_point_options): Change parameter type to
840 'struct gdb_breakpoint *'.
842 2016-07-21 Yao Qi <yao.qi@linaro.org>
844 * mem-break.c (set_breakpoint_at): Rename it to ...
845 (set_breakpoint_type_at): ... it.
846 (set_breakpoint_at): Call set_breakpoint_type_at.
847 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
848 * mem-break.h (set_breakpoint_at): Update comments.
850 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
852 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
854 (nios2_store_gregset): Likewise.
856 2016-07-01 Pedro Alves <palves@redhat.com>
857 Antoine Tremblay <antoine.tremblay@ericsson.com>
859 * linux-low.c: Change interface to take the target lwp_info
860 pointer directly and return void. Handle detaching from a zombie
862 (linux_detach_lwp_callback): New function.
863 (linux_detach): Detach from the leader thread after detaching from
866 2016-06-28 Yao Qi <yao.qi@linaro.org>
868 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
869 for variable new_offset.
870 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
871 (aarch64_ftrace_insn_reloc_cb): Likewise.
872 (aarch64_ftrace_insn_reloc_tb): Likewise.
873 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
874 PRIx64 instead of PRIx32.
876 2016-06-28 Yao Qi <yao.qi@linaro.org>
878 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
879 (the_low_target): Install arm_get_syscall_trapinfo.
881 2016-06-28 Yao Qi <yao.qi@linaro.org>
883 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
885 (the_low_target): Install aarch64_get_syscall_trapinfo.
887 2016-06-28 Yao Qi <yao.qi@linaro.org>
889 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
891 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
892 Remove parameter sysno.
893 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
896 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
898 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
899 (s390_emit_ne_goto): Likewise.
900 (s390_emit_lt_goto): Likewise.
901 (s390_emit_le_goto): Likewise.
902 (s390_emit_gt_goto): Likewise.
903 (s390_emit_ge_goto): Likewise.
904 (s390x_emit_eq_goto): Likewise.
905 (s390x_emit_ne_goto): Likewise.
906 (s390x_emit_lt_goto): Likewise.
907 (s390x_emit_le_goto): Likewise.
908 (s390x_emit_gt_goto): Likewise.
909 (s390x_emit_ge_goto): Likewise.
910 (s390_emit_ops_impl): Mark variable static.
911 (s390x_emit_ops): Likewise.
913 2016-06-17 Yao Qi <yao.qi@linaro.org>
915 * linux-low.c (handle_extended_wait): Call
916 uninsert_reinsert_breakpoints for the parent process. Remove
917 reinsert breakpoints from the child process. Reinsert them to
918 the parent process when vfork is done.
919 * mem-break.c (uninsert_reinsert_breakpoints): New function.
920 (reinsert_reinsert_breakpoints): New function.
921 * mem-break.h (uninsert_reinsert_breakpoints): Declare
922 (reinsert_reinsert_breakpoints): Declare.
924 2016-06-17 Yao Qi <yao.qi@linaro.org>
926 * linux-low.c (handle_extended_wait): If the parent is doing
927 step-over, remove the reinsert breakpoints from the forked child.
929 2016-06-17 Yao Qi <yao.qi@linaro.org>
931 * linux-low.c (unsuspend_all_lwps): Declare.
932 (linux_low_filter_event): If thread exited, call finish_step_over.
933 If step-over is finished, unsuspend other threads.
935 2016-06-17 Yao Qi <yao.qi@linaro.org>
937 * linux-low.c (linux_resume_one_lwp_throw): Assert
938 has_reinsert_breakpoints returns false.
939 * mem-break.c (delete_disabled_breakpoints): Assert
940 bp type isn't reinsert_breakpoint.
942 2016-06-17 Yao Qi <yao.qi@linaro.org>
944 * linux-low.c (maybe_hw_step): New function.
945 (linux_resume_one_lwp_throw): Call maybe_hw_step.
946 (finish_step_over): Switch current_thread to lwp temporarily,
947 and assert has_reinsert_breakpoints returns true.
948 (proceed_one_lwp): Call maybe_hw_step.
949 * mem-break.c (has_reinsert_breakpoints): New function.
950 * mem-break.h (has_reinsert_breakpoints): Declare.
952 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
954 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
956 2016-05-17 Yao Qi <yao.qi@linaro.org>
958 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
959 instead of find_inferior.
961 2016-05-05 Yao Qi <yao.qi@linaro.org>
963 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
964 Initialize res to zero.
966 2016-05-05 Yao Qi <yao.qi@linaro.org>
968 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
971 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
973 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
974 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
975 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
977 2016-04-28 Par Olsson <par.olsson@windriver.com>
978 Simon Marchi <simon.marchi@ericsson.com>
980 * tracepoint.c (write_inferior_int8): New function.
981 (cmd_qtenable_disable): Write enable flag using
984 2016-04-25 Yao Qi <yao.qi@linaro.org>
986 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
987 (need_step_over_p): Return zero if the LWP has pending signals
988 can be delivered on software single step target.
990 2016-04-25 Yao Qi <yao.qi@linaro.org>
992 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
993 return instead of error.
995 2016-04-22 Yao Qi <yao.qi@linaro.org>
997 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1000 2016-04-22 Yao Qi <yao.qi@linaro.org>
1002 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1003 signal when stepping over breakpoint with software single
1006 2016-04-21 Pedro Alves <palves@redhat.com>
1008 * linux-s390-low.c (s390_collect_ptrace_register)
1009 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1011 (s390_check_regset): Use void * instead of gdb_byte *.
1013 2016-04-20 Pedro Alves <palves@redhat.com>
1015 * configure: Renegerate.
1017 2016-04-20 Yao Qi <yao.qi@linaro.org>
1019 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1020 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1022 (arm_store_gregset): Likewise.
1024 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1026 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1027 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1028 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1029 (amd64-avx-mpx-linux.c): New rules.
1030 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1031 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1032 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1033 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1034 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1035 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1036 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1037 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1038 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1039 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1040 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1041 * linux-x86-low.c (x86_linux_read_description): Add case for
1042 X86_XSTATE_AVX_MPX_MASK.
1043 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1044 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1045 init_registers_i386_avx_mpx_linux.
1046 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1047 (initialize_low_tracepoint): Call
1048 init_registers_i386_avx_mpx_linux.
1049 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1050 (initialize_low_tracepoint): Call
1051 init_registers_amd64_avx_mpx_linux.
1052 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1053 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1054 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1057 2016-04-18 Pedro Alves <palves@redhat.com>
1059 * configure: Regenerate.
1061 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1063 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1064 (aarch64_emit_sub): Likewise.
1066 2016-04-12 Pedro Alves <palves@redhat.com>
1068 * utils.c (prepare_to_throw_exception): Delete.
1070 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1072 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1074 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1076 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1078 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1080 * linux-aarch64-ipa.c: Add <elf.h> include.
1081 * linux-ppc-ipa.c: Add <elf.h> include.
1082 * linux-s390-ipa.c: Add <elf.h> include.
1084 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1086 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1087 (get_raw_reg_ptr): Likewise.
1088 (get_trace_state_variable_value_ptr): Likewise.
1089 (set_trace_state_variable_value_ptr): Likewise.
1090 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1093 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1094 Marcin Kościelnicki <koriakin@0x04.net>
1097 * linux-ppc-low.c (emit_insns): New function.
1098 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1099 (ppc_emit_prologue): New function.
1100 (ppc_emit_epilogue): New function.
1101 (ppc_emit_add): New function.
1102 (ppc_emit_sub): New function.
1103 (ppc_emit_mul): New function.
1104 (ppc_emit_lsh): New function.
1105 (ppc_emit_rsh_signed): New function.
1106 (ppc_emit_rsh_unsigned): New function.
1107 (ppc_emit_ext): New function.
1108 (ppc_emit_zero_ext): New function.
1109 (ppc_emit_log_not): New function.
1110 (ppc_emit_bit_and): New function.
1111 (ppc_emit_bit_or): New function.
1112 (ppc_emit_bit_xor): New function.
1113 (ppc_emit_bit_not): New function.
1114 (ppc_emit_equal): New function.
1115 (ppc_emit_less_signed): New function.
1116 (ppc_emit_less_unsigned): New function.
1117 (ppc_emit_ref): New function.
1118 (ppc_emit_const): New function.
1119 (ppc_emit_reg): New function.
1120 (ppc_emit_pop): New function.
1121 (ppc_emit_stack_flush): New function.
1122 (ppc_emit_swap): New function.
1123 (ppc_emit_stack_adjust): New function.
1124 (ppc_emit_call): New function.
1125 (ppc_emit_int_call_1): New function.
1126 (ppc_emit_void_call_2): New function.
1127 (ppc_emit_if_goto): New function.
1128 (ppc_emit_goto): New function.
1129 (ppc_emit_eq_goto): New function.
1130 (ppc_emit_ne_goto): New function.
1131 (ppc_emit_lt_goto): New function.
1132 (ppc_emit_le_goto): New function.
1133 (ppc_emit_gt_goto): New function.
1134 (ppc_emit_ge_goto): New function.
1135 (ppc_write_goto_address): New function.
1136 (ppc_emit_ops_impl): New static variable.
1137 (ppc64v1_emit_prologue): New function.
1138 (ppc64v2_emit_prologue): New function.
1139 (ppc64_emit_epilogue): New function.
1140 (ppc64_emit_add): New function.
1141 (ppc64_emit_sub): New function.
1142 (ppc64_emit_mul): New function.
1143 (ppc64_emit_lsh): New function.
1144 (ppc64_emit_rsh_signed): New function.
1145 (ppc64_emit_rsh_unsigned): New function.
1146 (ppc64_emit_ext): New function.
1147 (ppc64_emit_zero_ext): New function.
1148 (ppc64_emit_log_not): New function.
1149 (ppc64_emit_bit_and): New function.
1150 (ppc64_emit_bit_or): New function.
1151 (ppc64_emit_bit_xor): New function.
1152 (ppc64_emit_bit_not): New function.
1153 (ppc64_emit_equal): New function.
1154 (ppc64_emit_less_signed): New function.
1155 (ppc64_emit_less_unsigned): New function.
1156 (ppc64_emit_ref): New function.
1157 (ppc64_emit_const): New function.
1158 (ppc64v1_emit_reg): New function.
1159 (ppc64v2_emit_reg): New function.
1160 (ppc64_emit_pop): New function.
1161 (ppc64_emit_stack_flush): New function.
1162 (ppc64_emit_swap): New function.
1163 (ppc64v1_emit_call): New function.
1164 (ppc64v2_emit_call): New function.
1165 (ppc64v1_emit_int_call_1): New function.
1166 (ppc64v2_emit_int_call_1): New function.
1167 (ppc64v1_emit_void_call_2): New function.
1168 (ppc64v2_emit_void_call_2): New function.
1169 (ppc64_emit_if_goto): New function.
1170 (ppc64_emit_eq_goto): New function.
1171 (ppc64_emit_ne_goto): New function.
1172 (ppc64_emit_lt_goto): New function.
1173 (ppc64_emit_le_goto): New function.
1174 (ppc64_emit_gt_goto): New function.
1175 (ppc64_emit_ge_goto): New function.
1176 (ppc64v1_emit_ops_impl): New static variable.
1177 (ppc64v2_emit_ops_impl): New static variable.
1178 (ppc_emit_ops): New function.
1179 (linux_low_target): Wire in ppc_emit_ops.
1181 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1182 Marcin Kościelnicki <koriakin@0x04.net>
1185 * Makefile.in: Add powerpc-*-ipa.o
1186 * configure.srv: Add ipa_obj for powerpc*-linux.
1187 * linux-ppc-ipa.c: New file.
1188 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1190 (PPC_FIELD): New macro.
1191 (PPC_SEXT): New macro.
1192 (PPC_OP6): New macro.
1193 (PPC_BO): New macro.
1194 (PPC_LI): New macro.
1195 (PPC_BD): New macro.
1196 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1197 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1198 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1199 (ppc_get_thread_area): New function.
1200 (is_elfv2_inferior): New function.
1201 (gen_ds_form): New function.
1202 (GEN_STD): New macro.
1203 (GEN_STDU): New macro.
1204 (GEN_LD): New macro.
1205 (GEN_LDU): New macro.
1206 (gen_d_form): New function.
1207 (GEN_ADDI): New macro.
1208 (GEN_ADDIS): New macro.
1209 (GEN_LI): New macro.
1210 (GEN_LIS): New macro.
1211 (GEN_ORI): New macro.
1212 (GEN_ORIS): New macro.
1213 (GEN_LWZ): New macro.
1214 (GEN_STW): New macro.
1215 (GEN_STWU): New macro.
1216 (gen_xfx_form): New function.
1217 (GEN_MFSPR): New macro.
1218 (GEN_MTSPR): New macro.
1219 (GEN_MFCR): New macro.
1220 (GEN_MTCR): New macro.
1221 (GEN_SYNC): New macro.
1222 (GEN_LWSYNC): New macro.
1223 (gen_x_form): New function.
1224 (GEN_OR): New macro.
1225 (GEN_MR): New macro.
1226 (GEN_LWARX): New macro.
1227 (GEN_STWCX): New macro.
1228 (GEN_CMPW): New macro.
1229 (gen_md_form): New function.
1230 (GEN_RLDICL): New macro.
1231 (GEN_RLDICR): New macro.
1232 (gen_i_form): New function.
1234 (GEN_BL): New macro.
1235 (gen_b_form): New function.
1236 (GEN_BNE): New macro.
1237 (GEN_LOAD): New macro.
1238 (GEN_STORE): New macro.
1239 (gen_limm): New function.
1240 (gen_atomic_xchg): New function.
1241 (gen_call): New function.
1242 (ppc_relocate_instruction): New function.
1243 (ppc_install_fast_tracepoint_jump_pad): New function.
1244 (ppc_get_min_fast_tracepoint_insn_len): New function.
1245 (ppc_get_ipa_tdesc_idx): New function.
1246 (the_low_target): Wire in the new functions.
1247 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1249 * linux-ppc-tdesc.h: New file.
1251 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1253 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1254 (alloc_jump_pad_buffer): New function.
1255 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1256 (alloc_jump_pad_buffer): New function.
1257 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1258 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1259 (alloc_jump_pad_buffer): New function.
1260 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1261 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1262 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1263 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1265 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1267 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1268 * linux-amd64-ipa.c: Likewise.
1269 * linux-i386-ipa.c: Likewise.
1270 * linux-s390-ipa.c: Likewise.
1271 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1272 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1273 set_trace_state_variable_value_ptr.
1274 (struct ipa_sym_addresses): Likewise.
1275 (symbol_list): Likewise.
1276 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1277 accessing gdb_collect directly.
1278 (gdb_collect_ptr_type): New typedef.
1279 (get_raw_reg_ptr_type): New typedef.
1280 (get_trace_state_variable_value_ptr_type): New typedef.
1281 (set_trace_state_variable_value_ptr_type): New typedef.
1282 (gdb_collect_ptr): New global.
1283 (get_raw_reg_ptr): New global.
1284 (get_trace_state_variable_value_ptr): New global.
1285 (set_trace_state_variable_value_ptr): New global.
1286 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1287 accessing get_raw_reg directly.
1288 (get_get_tsv_func_addr): Likewise for
1289 get_trace_state_variable_value_ptr.
1290 (get_set_tsv_func_addr): Likewise for
1291 set_trace_state_variable_value_ptr.
1292 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1294 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1296 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1298 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1300 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1302 (relocate_instruction): Remove own_buf.
1303 * server.c (own_buf): Make global.
1304 (handle_v_requests): Make global.
1305 * server.h (own_buf): New declaration.
1306 (handle_v_requests): New prototype.
1308 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1311 * linux-s390-low.c (add_insns): New function.
1312 (s390_emit_prologue): New function.
1313 (s390_emit_epilogue): New function.
1314 (s390_emit_add): New function.
1315 (s390_emit_sub): New function.
1316 (s390_emit_mul): New function.
1317 (s390_emit_lsh): New function.
1318 (s390_emit_rsh_signed): New function.
1319 (s390_emit_rsh_unsigned): New function.
1320 (s390_emit_ext): New function.
1321 (s390_emit_log_not): New function.
1322 (s390_emit_bit_and): New function.
1323 (s390_emit_bit_or): New function.
1324 (s390_emit_bit_xor): New function.
1325 (s390_emit_bit_not): New function.
1326 (s390_emit_equal): New function.
1327 (s390_emit_less_signed): New function.
1328 (s390_emit_less_unsigned): New function.
1329 (s390_emit_ref): New function.
1330 (s390_emit_if_goto): New function.
1331 (s390_emit_goto): New function.
1332 (s390_write_goto_address): New function.
1333 (s390_emit_litpool): New function.
1334 (s390_emit_const): New function.
1335 (s390_emit_call): New function.
1336 (s390_emit_reg): New function.
1337 (s390_emit_pop): New function.
1338 (s390_emit_stack_flush): New function.
1339 (s390_emit_zero_ext): New function.
1340 (s390_emit_swap): New function.
1341 (s390_emit_stack_adjust): New function.
1342 (s390_emit_set_r2): New function.
1343 (s390_emit_int_call_1): New function.
1344 (s390_emit_void_call_2): New function.
1345 (s390_emit_eq_goto): New function.
1346 (s390_emit_ne_goto): New function.
1347 (s390_emit_lt_goto): New function.
1348 (s390_emit_le_goto): New function.
1349 (s390_emit_gt_goto): New function.
1350 (s390_emit_ge_goto): New function.
1351 (s390x_emit_prologue): New function.
1352 (s390x_emit_epilogue): New function.
1353 (s390x_emit_add): New function.
1354 (s390x_emit_sub): New function.
1355 (s390x_emit_mul): New function.
1356 (s390x_emit_lsh): New function.
1357 (s390x_emit_rsh_signed): New function.
1358 (s390x_emit_rsh_unsigned): New function.
1359 (s390x_emit_ext): New function.
1360 (s390x_emit_log_not): New function.
1361 (s390x_emit_bit_and): New function.
1362 (s390x_emit_bit_or): New function.
1363 (s390x_emit_bit_xor): New function.
1364 (s390x_emit_bit_not): New function.
1365 (s390x_emit_equal): New function.
1366 (s390x_emit_less_signed): New function.
1367 (s390x_emit_less_unsigned): New function.
1368 (s390x_emit_ref): New function.
1369 (s390x_emit_if_goto): New function.
1370 (s390x_emit_const): New function.
1371 (s390x_emit_call): New function.
1372 (s390x_emit_reg): New function.
1373 (s390x_emit_pop): New function.
1374 (s390x_emit_stack_flush): New function.
1375 (s390x_emit_zero_ext): New function.
1376 (s390x_emit_swap): New function.
1377 (s390x_emit_stack_adjust): New function.
1378 (s390x_emit_int_call_1): New function.
1379 (s390x_emit_void_call_2): New function.
1380 (s390x_emit_eq_goto): New function.
1381 (s390x_emit_ne_goto): New function.
1382 (s390x_emit_lt_goto): New function.
1383 (s390x_emit_le_goto): New function.
1384 (s390x_emit_gt_goto): New function.
1385 (s390x_emit_ge_goto): New function.
1386 (s390_emit_ops): New function.
1387 (struct linux_target_ops): Fill in emit_ops hook.
1389 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1392 * Makefile.in: Add s390 IPA files.
1393 * configure.srv: Build IPA for s390.
1394 * linux-s390-ipa.c: New file.
1395 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1396 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1397 (tdesc_s390_linux32): Likewise.
1398 (init_registers_s390_linux32v1): Likewise.
1399 (tdesc_s390_linux32v1): Likewise.
1400 (init_registers_s390_linux32v2): Likewise.
1401 (tdesc_s390_linux32v2): Likewise.
1402 (init_registers_s390_linux64): Likewise.
1403 (tdesc_s390_linux64): Likewise.
1404 (init_registers_s390_linux64v1): Likewise.
1405 (tdesc_s390_linux64v1): Likewise.
1406 (init_registers_s390_linux64v2): Likewise.
1407 (tdesc_s390_linux64v2): Likewise.
1408 (init_registers_s390_te_linux64): Likewise.
1409 (tdesc_s390_te_linux64): Likewise.
1410 (init_registers_s390_vx_linux64): Likewise.
1411 (tdesc_s390_vx_linux64): Likewise.
1412 (init_registers_s390_tevx_linux64): Likewise.
1413 (tdesc_s390_tevx_linux64): Likewise.
1414 (init_registers_s390x_linux64): Likewise.
1415 (tdesc_s390x_linux64): Likewise.
1416 (init_registers_s390x_linux64v1): Likewise.
1417 (tdesc_s390x_linux64v1): Likewise.
1418 (init_registers_s390x_linux64v2): Likewise.
1419 (tdesc_s390x_linux64v2): Likewise.
1420 (init_registers_s390x_te_linux64): Likewise.
1421 (tdesc_s390x_te_linux64): Likewise.
1422 (init_registers_s390x_vx_linux64): Likewise.
1423 (tdesc_s390x_vx_linux64): Likewise.
1424 (init_registers_s390x_tevx_linux64): Likewise.
1425 (tdesc_s390x_tevx_linux64): Likewise.
1426 (have_hwcap_s390_vx): New static variable.
1427 (s390_arch_setup): Fill have_hwcap_s390_vx.
1428 (s390_get_thread_area): New function.
1429 (s390_ft_entry_gpr_esa): New const.
1430 (s390_ft_entry_gpr_zarch): New const.
1431 (s390_ft_entry_misc): New const.
1432 (s390_ft_entry_fr): New const.
1433 (s390_ft_entry_vr): New const.
1434 (s390_ft_main_31): New const.
1435 (s390_ft_main_64): New const.
1436 (s390_ft_exit_fr): New const.
1437 (s390_ft_exit_vr): New const.
1438 (s390_ft_exit_misc): New const.
1439 (s390_ft_exit_gpr_esa): New const.
1440 (s390_ft_exit_gpr_zarch): New const.
1441 (append_insns): New function.
1442 (s390_relocate_instruction): New function.
1443 (s390_install_fast_tracepoint_jump_pad): New function.
1444 (s390_get_min_fast_tracepoint_insn_len): New function.
1445 (s390_get_ipa_tdesc_idx): New function.
1446 (struct linux_target_ops): Wire in the above functions.
1447 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1448 * linux-s390-tdesc.h: New file.
1450 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1452 * linux-s390-low.c (s390_supports_tracepoints): New function.
1453 (struct linux_target_ops): Fill supports_tracepoints hook.
1455 2016-03-18 Yao Qi <yao.qi@linaro.org>
1457 * linux-low.c (lwp_signal_can_be_delivered): New function.
1458 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1460 2016-03-18 Yao Qi <yao.qi@linaro.org>
1462 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1463 0 if signal is enqueued. Remove 'signal' from one debugging
1464 message. Move one debugging message to some lines below.
1465 Remove code setting 'signal' to 0.
1467 2016-03-18 Yao Qi <yao.qi@linaro.org>
1469 * linux-low.c (linux_low_filter_event): Remove redundant
1470 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1472 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1474 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1475 (struct linux_target_ops): Wire in the above.
1477 2016-03-03 Yao Qi <yao.qi@linaro.org>
1479 * linux-low.c: Update comments to start_step_over.
1481 2016-03-03 Yao Qi <yao.qi@linaro.org>
1484 * linux-low.c (handle_extended_wait): Set child suspended
1485 if event_lwp->bp_reinsert isn't zero.
1487 2016-03-02 Yao Qi <yao.qi@linaro.org>
1489 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1490 enqueue_pending_signal.
1492 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1494 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1497 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1499 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1500 (s390_regmap_3264) [!__s390x__]: New global.
1501 (s390_collect_ptrace_register): Skip map entries containing -1.
1502 (s390_supply_ptrace_register): Ditto.
1503 (s390_fill_gprs_high): New function.
1504 (s390_store_gprs_high): New function.
1505 (s390_regsets): Add NT_S390_HIGH_GPRS.
1506 (s390_get_hwcap): Enable on 31-bit.
1507 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1508 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1509 Detect NT_S390_HIGH_GPRS.
1510 (s390_usrregs_info_3264): Enable on 31-bit.
1511 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1512 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1514 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1517 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1518 * configure.srv: Ditto.
1519 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1520 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1521 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1522 (init_registers_amd64_linux): Remove prototype.
1523 (tdesc_amd64_linux): Remove declaration.
1524 (get_ipa_tdesc): New function.
1525 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1526 initialize remaining tdescs.
1527 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1528 (init_registers_i386_linux): Remove prototype.
1529 (tdesc_i386_linux): Remove declaration.
1530 (get_ipa_tdesc): New function.
1531 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1532 initialize remaining tdescs.
1533 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1534 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1535 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1536 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1537 (x86_get_ipa_tdesc_idx): New function.
1538 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1539 * linux-x86-tdesc.h: New file.
1540 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1541 (target_get_ipa_tdesc_idx): New macro.
1542 * tracepoint.c (ipa_tdesc_idx): New macro.
1543 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1544 (symbol_list): Add ipa_tdesc_idx.
1545 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1546 (ipa_tdesc): Remove.
1547 (ipa_tdesc_idx): New variable.
1548 (get_context_regcache): Use get_ipa_tdesc.
1549 (gdb_collect): Ditto.
1551 * tracepoint.h (get_ipa_tdesc): New prototype.
1552 (ipa_tdesc): Remove.
1554 2016-02-24 Pedro Alves <palves@redhat.com>
1556 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1557 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1558 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1559 Factor out common code between the USE_SIGTRAP_SIGINFO and
1560 !USE_SIGTRAP_SIGINFO blocks.
1561 (linux_low_filter_event): Call save_stop_reason instead of
1562 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1564 (linux_wait_1): Update comments.
1566 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1568 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1569 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1570 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1571 ppc_insert_point, ppc_remove_point.
1573 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1575 * linux-s390-low.c (s390_supports_z_point_type): New function.
1576 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1578 2016-02-16 Yao Qi <yao.qi@linaro.org>
1580 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1581 PC. Get pc from regcache_read_pc.
1583 2016-02-12 Yao Qi <yao.qi@linaro.org>
1585 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1586 or linux_get_pc_32bit.
1587 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1589 2016-02-12 Yao Qi <yao.qi@linaro.org>
1591 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1592 arm_linux_get_next_pcs_fixup.
1594 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1596 * tracepoint.c (x_tracepoint_action_download): Change
1597 write_inferior_data_ptr to write_inferior_data_pointer.
1598 (cmd_qtstart): Likewise.
1599 (write_inferior_data_ptr): Remove.
1600 (download_agent_expr): Change write_inferior_data_ptr to
1601 write_inferior_data_pointer.
1602 (download_tracepoint_1): Likewise.
1603 (download_tracepoint): Likewise.
1604 (download_trace_state_variables): Likewise.
1606 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1607 Marcin Kościelnicki <koriakin@0x04.net>
1609 * tracepoint.c (struct tracepoint_action_ops): Remove.
1610 (struct tracepoint_action): Remove ops.
1611 (m_tracepoint_action_download, r_tracepoint_action_download)
1612 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1613 size and offset accordingly.
1614 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1615 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1616 (tracepoint_action_send, tracepoint_action_download): New functions.
1617 Helpers for trace action handlers.
1618 (add_tracepoint_action): Remove setup actions ops.
1619 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1621 2016-02-10 Yao Qi <yao.qi@linaro.org>
1623 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1625 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1627 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1629 * configure: Regenerate.
1631 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1633 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1634 void * to gdb_byte *.
1635 * linux-low.c (siginfo_fixup): Likewise.
1636 (linux_xfer_siginfo): Likewise.
1637 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1639 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1641 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1643 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1645 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1647 * linux-x86-low.c [__x86_64__]: Include
1648 "nat/amd64-linux-siginfo.h".
1649 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1650 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1651 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1652 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1653 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1654 (cpt_si_fd, si_timerid, si_overrun): Move from
1655 nat/amd64-linux-siginfo.c.
1656 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1658 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1660 * server.c (skip_to_semicolon): Remove.
1661 (process_point_options): Use strchrnul instead of
1664 2016-01-26 Yao Qi <yao.qi@linaro.org>
1666 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1667 * linux-low.c (install_software_single_step_breakpoints): Don't
1668 call regcache_read_pc.
1669 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1672 2016-01-26 Yao Qi <yao.qi@linaro.org>
1674 * linux-low.c (install_software_single_step_breakpoints): Call
1675 regcache_read_pc instead of get_pc.
1677 2016-01-26 Yao Qi <yao.qi@linaro.org>
1679 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1680 (unblock_async_io): Rename to ...
1681 (block_unblock_async_io): ... it. New function.
1682 (enable_async_io): Don't install SIGIO handler. Unblock it
1684 (disable_async_io): Don't ignore SIGIO. Block it instead.
1685 (initialize_async_io): Install SIGIO handler. Don't call
1688 2016-01-26 Yao Qi <yao.qi@linaro.org>
1690 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1691 first character is '\003', call *the_target->request_interrupt.
1693 2016-01-25 Yao Qi <yao.qi@linaro.org>
1695 * remote-utils.c (new_thread_notify): Remove.
1696 (dead_thread_notify): Likewise.
1697 * remote-utils.h (new_thread_notify): Remove declaration.
1698 (dead_thread_notify): Likewise.
1700 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1702 * gdb.trace/pending.exp: Fix expected message on continue.
1704 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1706 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1707 it works properly on big-endian machines where sizeof (CORE_ADDR)
1710 2016-01-21 Pedro Alves <palves@redhat.com>
1712 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1713 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1714 * configure: Regenerate.
1716 2016-01-21 Yao Qi <yao.qi@linaro.org>
1718 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1719 is_thumb and set it according to CPSR saved on the stack.
1720 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1721 arm_sigreturn_next_pc.
1723 2016-01-18 Yao Qi <yao.qi@linaro.org>
1725 * linux-low.c (linux_set_pc_64bit): New function.
1726 (linux_get_pc_64bit): New function.
1727 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1729 * linux-sparc-low.c (debug_threads): Remove declaration.
1730 (sparc_get_pc): Remove.
1731 (the_low_target): Use linux_get_pc_64bit instead of
1733 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1734 (the_low_target): Use linux_get_pc_64bit and
1737 2016-01-18 Yao Qi <yao.qi@linaro.org>
1739 * linux-arm-low.c (debug_threads): Remove declaration.
1740 (arm_get_pc, arm_set_pc): Remove.
1741 (the_low_target): Use linux_get_pc_32bit and
1743 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1744 (the_low_target): Use linux_get_pc_32bit and
1746 * linux-cris-low.c (debug_threads): Remove declaration.
1747 (cris_get_pc, cris_set_pc,): Remove.
1748 (the_low_target): Use linux_get_pc_32bit and
1750 * linux-crisv32-low.c (debug_threads): Remove declaration.
1751 (cris_get_pc, cris_set_pc): Remove.
1752 (the_low_target): Use linux_get_pc_32bit and
1754 * linux-low.c: Include inttypes.h.
1755 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1756 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1757 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1758 (the_low_target): Use linux_get_pc_32bit and
1760 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1761 (the_low_target): Use linux_get_pc_32bit and
1763 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1764 (the_low_target): Use linux_get_pc_32bit and
1766 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1767 (the_low_target): Use linux_get_pc_32bit and
1769 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1770 (the_low_target): Use linux_get_pc_32bit and
1773 2016-01-18 Gary Benson <gbenson@redhat.com>
1775 * configure.ac (AC_FUNC_FORK): New check.
1776 * config.in: Regenerate.
1777 * configure: Likewise.
1779 2016-01-14 Yao Qi <yao.qi@linaro.org>
1781 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1782 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1783 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1784 arm_get_next_pcs_ctor.
1786 2016-01-12 Josh Stone <jistone@redhat.com>
1787 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1789 * inferiors.h: Include "gdb_vecs.h".
1790 (struct process_info): Add syscalls_to_catch.
1791 * inferiors.c (remove_process): Free syscalls_to_catch.
1792 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1793 syscall_return stops.
1794 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1795 * server.c (handle_general_set): Handle QCatchSyscalls.
1796 (handle_query): Report support for QCatchSyscalls.
1797 * target.h (struct target_ops): Add supports_catch_syscall.
1798 (target_supports_catch_syscall): New macro.
1799 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1800 (struct lwp_info): Add syscall_state.
1801 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1802 Maintain syscall_state and syscalls_to_catch across exec.
1803 (get_syscall_trapinfo): New function, proxy to the_low_target.
1804 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1805 (linux_low_filter_event): Toggle syscall_state entry/return for
1806 syscall traps, and set it ignored for all others.
1807 (gdb_catching_syscalls_p): New function.
1808 (gdb_catch_this_syscall_p): New function.
1809 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1810 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1811 (linux_supports_catch_syscall): New function.
1812 (linux_target_ops): Install it.
1813 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1814 (the_low_target): Install it.
1816 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1818 * acinclude.m4: Include new ../warning.m4 file.
1819 * configure: Regenerated.
1820 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1822 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1824 * ax.c (is_goto_target): Mark static.
1825 * linux-low.c (register_addr): Likewise.
1826 (linux_fetch_registers, linux_store_registers): Likewise.
1827 * mem-break.c (any_persistent_commands): Fix old prototype.
1828 (add_commands_to_breakpoint): Mark static.
1829 * regcache.c (find_register_by_name): Delete unused func.
1830 * remote-utils.c (hex_or_minus_one): Mark static.
1831 * server.c (monitor_show_help): Mark static.
1832 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1833 handle_v_requests): Likewise.
1835 2016-01-12 Pedro Alves <palves@redhat.com>
1837 Remove use of the registered trademark symbol throughout.
1839 2016-01-08 Yao Qi <yao.qi@linaro.org>
1841 * remote-utils.c (getpkt): If c is '\003', call target hook
1844 2016-01-06 Yao Qi <yao.qi@linaro.org>
1846 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1847 linux-aarch32-low.c.
1848 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1849 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1850 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1851 (thumb2_breakpoint): Declare.
1852 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1853 linux-aarch32-low.h.
1854 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1855 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1856 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1858 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1860 * gdbreplay.c (gdbreplay_version): Change copyright year in
1862 * server.c (gdbserver_version): Likewise.
1864 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1866 * server.c (crc32_table): Delete.
1867 (crc32): Use libiberty's xcrc32 function.
1869 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1871 * lynx-low.c (lynx_delete_thread_callback): New function.
1872 (lynx_mourn): Properly delete our process and all of its
1873 threads. Remove call to clear_inferiors.
1875 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1877 * target.c (thread_search_callback): Add check that
1878 the thread_stopped target callback is not NULL before
1881 2015-12-21 Yao Qi <yao.qi@linaro.org>
1883 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1886 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1888 * server.c (handle_query): Call target_supports_software_single_step.
1890 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1892 * linux-low.c (single_step): New function.
1893 (linux_resume_one_lwp_throw): Call single_step.
1894 (start_step_over): Likewise.
1896 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1898 * Makefile.in (SFILES): Append arch/arm-linux.c,
1899 arch/arm-get-next-pcs.c.
1900 (arm-linux.o): New rule.
1901 (arm-get-next-pcs.o): New rule.
1902 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1904 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1905 to linux-aarch32-low.c.
1906 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1907 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1908 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1909 (thumb2_breakpoint_len): Likewise.
1910 (arm_is_thumb_mode): Make non-static.
1911 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1912 from linux-aarch32-low.c.
1913 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1914 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1915 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1916 (thumb2_breakpoint_len): Likewise.
1917 (arm_is_thumb_mode): New declaration.
1918 * linux-arm-low.c: Include arch/arm-linux.h
1919 aarch/arm-get-next-pcs.h, sys/syscall.h.
1920 (get_next_pcs_ops): New struct.
1921 (get_next_pcs_addr_bits_remove): New function.
1922 (get_next_pcs_is_thumb): New function.
1923 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1924 (arm_sigreturn_next_pc): Likewise.
1925 (get_next_pcs_syscall_next_pc): Likewise.
1926 (arm_gdbserver_get_next_pcs): Likewise.
1927 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1929 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1930 * server.h: Include gdb_vecs.h.
1932 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1934 * Makefile.in (SFILES): Append common/common-regcache.c.
1935 (OBS): Append common-regcache.o.
1936 (common-regcache.o): New rule.
1937 * regcache.c (init_register_cache): Initialize cache to
1939 (regcache_raw_read_unsigned): New function.
1940 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1941 register_status enum.
1943 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1945 * linux-aarch64-low.c (the_low_targets): Rename
1946 breakpoint_reinsert_addr to get_next_pcs.
1947 * linux-arm-low.c (the_low_targets): Likewise.
1948 * linux-bfin-low.c (the_low_targets): Likewise.
1949 * linux-cris-low.c (the_low_targets): Likewise.
1950 * linux-crisv32-low.c (the_low_targets): Likewise.
1951 * linux-low.c (can_software_single_step): Likewise.
1952 (install_software_single_step_breakpoints): New function.
1953 (start_step_over): Use install_software_single_step_breakpoints.
1954 * linux-low.h: New CORE_ADDR vector.
1955 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1957 * linux-mips-low.c (the_low_targets): Likewise.
1958 * linux-nios2-low.c (the_low_targets): Likewise.
1959 * linux-sparc-low.c (the_low_targets): Likewise.
1961 2015-12-17 Pedro Alves <palves@redhat.com>
1963 * linux-low.c (linux_kill_one_lwp): Remove references to
1965 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1967 (linux_init_signals): Delete.
1968 (initialize_low): Adjust.
1969 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1971 2015-12-16 Pedro Alves <palves@redhat.com>
1973 * configure.ac (compiler warning flags): When testing a
1974 -Wno-foo option, check whether -Wfoo works instead.
1975 * configure: Regenerate.
1977 2015-12-11 Don Breazeal <donb@codesourcery.com>
1979 * server.c (process_serial_event): Don't exit from gdbserver
1980 in remote mode if there are still active inferiors.
1982 2015-12-11 Yao Qi <yao.qi@linaro.org>
1984 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1985 arm_breakpoint_at if the process is 32-bit.
1987 2015-12-11 Yao Qi <yao.qi@linaro.org>
1989 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1992 2015-12-07 Yao Qi <yao.qi@linaro.org>
1994 * configure.srv: Append arm.o to srv_tgtobj for
1995 aarch64*-*-linux* target.
1996 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1997 from linux-arm-low.c.
1998 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1999 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2000 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2001 (thumb2_breakpoint_len): Likewise.
2002 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2003 (arm_breakpoint_kinds): Likewise.
2004 (arm_breakpoint_kind_from_pc): Likewise.
2005 (arm_sw_breakpoint_from_kind): Likewise.
2006 (arm_breakpoint_kind_from_current_state): Likewise.
2007 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2008 (arm_sw_breakpoint_from_kind): Declare.
2009 (arm_breakpoint_kind_from_current_state): Declare.
2010 (arm_breakpoint_at): Declare.
2011 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2012 arm_sw_breakpoint_from_kind if process is 32-bit.
2013 (aarch64_breakpoint_kind_from_pc): New function.
2014 (aarch64_breakpoint_kind_from_current_state): New function.
2015 (the_low_target): Initialize fields breakpoint_kind_from_pc
2016 and breakpoint_kind_from_current_state.
2017 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2018 linux-aarch32-low.c.
2019 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2020 (arm_breakpoint, arm_breakpoint_len): Likewise.
2021 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2022 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2023 (arm_is_thumb_mode): Likewise.
2024 (arm_breakpoint_at): Likewise.
2025 (arm_breakpoint_kind_from_pc): Likewise.
2026 (arm_sw_breakpoint_from_kind): Likewise.
2027 (arm_breakpoint_kind_from_current_state): Likewise.
2030 2015-08-04 Yao Qi <yao.qi@linaro.org>
2032 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2033 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2034 * server.c (extended_protocol): Remove "static".
2035 * server.h (extended_protocol): Declare it.
2037 2015-12-04 Josh Stone <jistone@redhat.com>
2039 * target.h (struct target_ops) <arch_setup>: Rename to ...
2040 (struct target_ops) <post_create_inferior>: ... this.
2041 (target_arch_setup): Rename to ...
2042 (target_post_create_inferior): ... this, calling post_create_inferior.
2043 * server.c (start_inferior): Update target_arch_setup calls to
2044 target_post_create_inferior.
2045 * linux-low.c (linux_low_ptrace_options): Forward declare.
2046 (linux_arch_setup): Update its comment for general use.
2047 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2048 (struct linux_target_ops): Use linux_post_create_inferior.
2049 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2050 to post_create_inferior.
2051 * nto-low.c (struct nto_target_ops): Likewise.
2052 * spu-low.c (struct spu_target_ops): Likewise.
2053 * win32-low.c (struct win32_target_ops): Likewise.
2055 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2057 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2059 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2061 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2062 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2063 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2064 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2065 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2066 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2067 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2068 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2069 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2070 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2071 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2072 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2074 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2076 * linux-low.c (linux_look_up_symbols): Don't call
2077 linux_supports_traceclone.
2078 * linux-low.h (thread_db_init): Remove use_events argument.
2079 * thread-db.c (thread_db_use_event): Remove global variable.
2080 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2081 (struct thread_db) <td_create_bp>: Remove field.
2082 (thread_db_create_event): Remove function.
2083 (thread_db_enable_reporting): Likewise.
2084 (find_one_thread): Don't check for thread_db_use_events.
2085 (attach_thread): Likewise.
2086 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2087 (try_thread_db_load_1): Don't check for thread_db_use_events.
2088 (thread_db_init): Remove use_events argument and thread events
2090 (remove_thread_event_breakpoints): Remove function.
2091 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2093 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2095 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2097 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2098 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2099 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2100 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2101 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2103 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2105 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2106 * linux-low.c (can_hardware_single_step): Use
2107 supports_hardware_single_step.
2108 (can_software_single_step): New function.
2109 (start_step_over): Call can_software_single_step.
2110 (linux_supports_hardware_single_step): New function.
2111 (struct target_ops) <supports_software_single_step>: Initialize.
2112 * linux-low.h (struct linux_target_ops)
2113 <supports_hardware_single_step>: Initialize.
2114 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2115 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2116 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2117 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2118 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2119 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2120 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2121 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2122 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2123 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2125 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2126 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2128 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2130 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2132 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2133 * target.h (struct target_ops): <supports_software_single_step>:
2135 (target_supports_software_single_step): New macro.
2137 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2139 * linux-low.c (linux_wait_1): Fix pc advance condition.
2140 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2141 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2143 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2145 * linux-arm-low.c (arm_is_thumb_mode): New function.
2146 (arm_breakpoint_at): Use arm_is_thumb_mode.
2147 (arm_breakpoint_kind_from_current_state): New function.
2148 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2150 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2151 (linux_breakpoint_kind_from_current_state): New function.
2152 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2153 * linux-low.h (struct linux_target_ops)
2154 <breakpoint_kind_from_current_state>: New field.
2155 * target.h (struct target_ops): Likewise.
2156 (target_breakpoint_kind_from_current_state): New macro.
2158 2015-11-30 Pedro Alves <palves@redhat.com>
2160 * linux-low.c (linux_resume): Wake up the event loop before
2163 2015-11-30 Pedro Alves <palves@redhat.com>
2165 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2167 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2169 * target.c (struct thread_search): New structure.
2170 (thread_search_callback): New function.
2171 (prev_general_thread): New global.
2172 (prepare_to_access_memory, done_accessing_memory): New functions.
2173 * target.h (prepare_to_access_memory, done_accessing_memory):
2174 Replace macros with function declarations.
2176 2015-11-30 Pedro Alves <palves@redhat.com>
2179 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2180 report TARGET_WAITKIND_NO_RESUMED.
2181 * remote-utils.c (prepare_resume_reply): Handle
2182 TARGET_WAITKIND_NO_RESUMED.
2183 * server.c (report_no_resumed): New global.
2184 (handle_query) <qSupported>: Handle "no-resumed+". Report
2185 "no-resumed+" support.
2186 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2187 return error if the client doesn't support no-resumed events.
2188 (push_stop_notification): New function.
2189 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2190 events if the client supports them.
2192 2015-11-30 Pedro Alves <palves@redhat.com>
2194 * linux-low.c (thread_still_has_status_pending_p): Don't check
2196 (lwp_resumed): New function.
2197 (status_pending_p_callback): Return early if the LWP is not
2198 supposed to be resumed.
2200 2015-11-30 Pedro Alves <palves@redhat.com>
2202 * linux-low.c (handle_extended_wait): Assert that the LWP's
2203 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2204 thread create events, leave the new child's status pending.
2205 (linux_low_filter_event): If GDB wants to hear about thread exit
2206 events, leave the LWP marked dead and don't delete it.
2207 (linux_wait_for_event_filtered): Don't check for thread exit.
2208 (filter_exit_event): New function.
2209 (linux_wait_1): Use it, when returning an exit event.
2210 (linux_resume_one_lwp_throw): Assert that the LWP's
2211 waitstatus is TARGET_WAITKIND_IGNORE.
2212 * remote-utils.c (prepare_resume_reply): Handle
2213 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2214 * server.c (report_thread_events): New global.
2215 (handle_general_set): Handle QThreadEvents.
2216 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2217 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2218 TARGET_WAITKIND_THREAD_EXITED.
2219 * server.h (report_thread_events): Declare.
2221 2015-11-30 Pedro Alves <palves@redhat.com>
2223 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2224 the thread's last_resume_kind was resume_stop.
2226 2015-11-30 Pedro Alves <palves@redhat.com>
2228 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2231 2015-11-30 Pedro Alves <palves@redhat.com>
2233 * server.c (handle_v_requests): Handle vCtrlC.
2235 2015-11-30 Pedro Alves <palves@redhat.com>
2237 * gdbthread.h (find_any_thread_of_pid): Declare.
2238 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2240 * server.c (handle_query): If current_thread is NULL, look for
2241 another thread of the selected process.
2243 2015-11-26 Daniel Colascione <dancol@dancol.org>
2244 Simon Marchi <simon.marchi@ericsson.com>
2246 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2247 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2249 * target.h (struct target_ops) <thread_name>: New field.
2250 (target_thread_name): New macro.
2252 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2254 * regcache.h (regcache_invalidate_pid): Add declaration.
2255 * regcache.c (regcache_invalidate_pid): New function, extracted
2256 from regcache_invalidate.
2257 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2258 Add trivial documentation comment.
2259 * lynx-low.c: Use regcache_invalidate_pid instead of
2260 regcache_invalidate.
2262 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2264 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2265 and Elf64_auxv_t if the target is Android.
2267 2015-11-22 Doug Evans <xdje42@gmail.com>
2269 * target.h: #include <sys/types.h>.
2271 2015-11-19 Pedro Alves <palves@redhat.com>
2273 * linux-low.c (linux_process_qsupported): Change prototype.
2275 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2277 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2278 and adjust to loop over all features.
2279 * server.c (handle_query) <qSupported>: Adjust to call
2280 target_process_qsupported once, passing it a vector of unprocessed
2282 * target.h (struct target_ops) <process_qsupported>: Change
2284 (target_process_qsupported): Adjust.
2286 2015-11-19 Pedro Alves <palves@redhat.com>
2288 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2290 * configure: Regenerate.
2292 2015-11-19 Pedro Alves <palves@redhat.com>
2294 * configure: Regenerate.
2296 2015-11-19 Yao Qi <yao.qi@linaro.org>
2298 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2301 2015-11-19 Yao Qi <yao.qi@linaro.org>
2303 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2304 (struct aarch64_operand): Move enum out.
2306 2015-11-19 Yao Qi <yao.qi@linaro.org>
2308 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2309 struct user_fpsimd_state *.
2310 (aarch64_store_fpregset): Likewise.
2312 2015-11-19 Yao Qi <yao.qi@linaro.org>
2314 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2315 struct user_pt_regs *.
2316 (aarch64_store_gregset): Likewise.
2318 2015-11-18 Pedro Alves <palves@redhat.com>
2320 * Makefile.in (all_object_files): Add $IPA_OBJS.
2322 2015-11-17 Pedro Alves <palves@redhat.com>
2324 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2325 GDB_SIGNAL_0 and gdb_signal_to_string.
2327 2015-11-17 Pedro Alves <palves@redhat.com>
2329 * win32-low.c (handle_output_debug_string): Remove parameter.
2330 (win32_kill): Remove our_status local and adjust call to
2331 handle_output_debug_string.
2332 (get_child_debug_event): Adjust call to
2333 handle_output_debug_string.
2335 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2337 * linux-mips-low.c (mips_fill_gregset): Add cast.
2338 (mips_store_gregset): Likewise.
2339 (mips_fill_fpregset): Likewise.
2340 (mips_store_fpregset): Likewise.
2342 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2344 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2347 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2349 * linux-mips-low.c (mips_linux_new_thread): Change type of
2350 watch_type to enum target_hw_bp_type.
2352 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2354 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2355 Change return type to arm_hwbp_type.
2357 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2359 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2360 (arm_store_gregset): Likewise.
2361 * linux-arm-low.c (arm_get_hwcap): Likewise.
2362 (arm_read_description): Likewise.
2364 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2366 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2368 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2370 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2371 (ppc_fill_vsxregset): Likewise.
2372 (ppc_store_vsxregset): Likewise.
2373 (ppc_fill_vrregset): Likewise.
2374 (ppc_store_vrregset): Likewise.
2375 (ppc_fill_evrregset): Likewise.
2376 (ppc_store_evrregset): Likewise.
2378 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2380 * linux-ppc-low.c (ppc_usrregs_info): Remove
2381 forward-declaration.
2382 (ppc_arch_setup): Move lower in file.
2384 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2386 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2387 (ps_pdwrite): Likewise.
2389 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2391 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2392 to after assert checks.
2394 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2396 * proc-service.c (ps_pdread): Add/adjust casts.
2397 (ps_pdwrite): Add/adjust casts.
2399 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2401 * server.c (handle_search_memory_1): Cast return value of
2404 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2406 * server.c (write_qxfer_response): Change type of data to
2409 2015-10-29 Pedro Alves <palves@redhat.com>
2411 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2413 2015-10-29 Pedro Alves <palves@redhat.com>
2415 * tracepoint.c (clear_installed_tracepoints): Add casts.
2417 2015-10-29 Pedro Alves <palves@redhat.com>
2419 * server.c (handle_v_cont, process_serial_event): Add enum
2420 gdb_signal casts to signal parsing code.
2422 2015-10-29 Pedro Alves <palves@redhat.com>
2424 * linux-low.h (NULL_REGSET): Define.
2425 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2426 * linux-arm-low.c (arm_regsets): Likewise.
2427 * linux-crisv32-low.c (cris_regsets): Likewise.
2428 * linux-m68k-low.c (m68k_regsets): Likewise.
2429 * linux-mips-low.c (mips_regsets): Likewise.
2430 * linux-nios2-low.c (nios2_regsets): Likewise.
2431 * linux-ppc-low.c (ppc_regsets): Likewise.
2432 * linux-s390-low.c (s390_regsets): Likewise.
2433 * linux-sh-low.c (sh_regsets): Likewise.
2434 * linux-sparc-low.c (sparc_regsets): Likewise.
2435 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2436 * linux-tile-low.c (tile_regsets): Likewise.
2437 * linux-x86-low.c (x86_regsets): Likewise.
2438 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2440 2015-10-29 Pedro Alves <palves@redhat.com>
2442 * linux-low.h (NULL_REGSET): Define.
2443 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2444 * linux-arm-low.c (arm_regsets): Likewise.
2445 * linux-crisv32-low.c (cris_regsets): Likewise.
2446 * linux-m68k-low.c (m68k_regsets): Likewise.
2447 * linux-mips-low.c (mips_regsets): Likewise.
2448 * linux-nios2-low.c (nios2_regsets): Likewise.
2449 * linux-ppc-low.c (ppc_regsets): Likewise.
2450 * linux-s390-low.c (s390_regsets): Likewise.
2451 * linux-sh-low.c (sh_regsets): Likewise.
2452 * linux-sparc-low.c (sparc_regsets): Likewise.
2453 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2454 * linux-tile-low.c (tile_regsets): Likewise.
2455 * linux-x86-low.c (x86_regsets): Likewise.
2456 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2458 2015-10-26 Doug Evans <dje@google.com>
2460 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2462 2015-10-26 Doug Evans <dje@google.com>
2464 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2466 2015-10-26 Doug Evans <dje@google.com>
2468 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2470 (attach_thread, find_new_threads_callback): Ditto.
2472 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2474 * mem-break.h (set_breakpoint_data): Remove.
2476 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2478 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2479 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2480 (initialize_low): Remove set_breakpoint_data call.
2481 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2482 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2483 (initialize_low): Remove set_breakpoint_data call.
2484 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2485 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2486 (initialize_low): Remove set_breakpoint_data call.
2488 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2490 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2491 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2492 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2493 * target.h (target_breakpoint_kind_from_pc): New macro.
2495 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2497 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2498 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2499 the default breakpoint kind.
2501 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2503 * linux-arm-low.c (arm_supports_z_point_type): Add software
2506 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2508 * linux-arm-low.c: Refactor breakpoint definitions.
2509 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2510 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2512 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2514 * Makefile.in: Add arm.c/o.
2515 * configure.srv: Likewise.
2516 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2517 (arm_breakpoint_kind_from_pc): New function.
2518 (arm_sw_breakpoint_from_kind): Return proper kind.
2519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2521 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2523 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2525 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2526 (struct raw_breakpoint) <size>: Remove.
2527 (struct raw_breakpoint) <kind>: Add.
2528 (bp_size): New function.
2529 (bp_opcode): Likewise.
2530 (find_raw_breakpoint_at): Adjust for kind.
2531 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2532 (remove_memory_breakpoint): Adjust for kind call bp_size.
2533 (set_raw_breakpoint_at): Adjust for kind.
2534 (set_breakpoint): Likewise.
2535 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2536 (delete_raw_breakpoint): Adjust for kind.
2537 (delete_breakpoint): Likewise.
2538 (find_gdb_breakpoint): Likewise.
2539 (set_gdb_breakpoint_1): Likewise.
2540 (set_gdb_breakpoint): Likewise.
2541 (delete_gdb_breakpoint_1): Likewise.
2542 (delete_gdb_breakpoint): Likewise.
2543 (uninsert_raw_breakpoint): Likewise.
2544 (reinsert_raw_breakpoint): Likewise.
2545 (set_breakpoint_data): Remove.
2546 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2547 (check_mem_read): Adjust for kind call bp_size.
2548 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2549 (clone_one_breakpoint): Adjust for kind.
2550 * mem-break.h (set_gdb_breakpoint): Likewise.
2551 (delete_gdb_breakpoint): Likewise.
2552 * server.c (process_serial_event): Likewise.
2554 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2556 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2557 (struct linux_target_ops) <breakpoint>: Remove.
2558 (struct linux_target_ops) <breakpoint_len>: Remove.
2559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2561 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2562 (arm_sw_breakpoint_from_kind): New function.
2563 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2564 (struct linux_target_ops) <breakpoint>: Remove.
2565 (struct linux_target_ops) <breakpoint_len>: Remove.
2566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2568 * linux-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2574 (struct linux_target_ops) <breakpoint>: Remove.
2575 (struct linux_target_ops) <breakpoint_len>: Remove.
2576 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2577 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2578 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2579 and sw_breakpoint_from_kind to increment the pc.
2580 (linux_breakpoint_kind_from_pc): New function.
2581 (linux_sw_breakpoint_from_kind): New function.
2582 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2583 (initialize_low): Call breakpoint_kind_from_pc and
2584 sw_breakpoint_from_kind to replace breakpoint_data/len.
2585 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2587 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2588 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2589 (struct linux_target_ops) <breakpoint>: Remove.
2590 (struct linux_target_ops) <breakpoint_len>: Remove.
2591 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2592 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2593 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2594 (struct linux_target_ops) <breakpoint>: Remove.
2595 (struct linux_target_ops) <breakpoint_len>: Remove.
2596 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2597 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2598 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2599 (struct linux_target_ops) <breakpoint>: Remove.
2600 (struct linux_target_ops) <breakpoint_len>: Remove.
2601 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2602 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2603 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2604 (struct linux_target_ops) <breakpoint>: Remove.
2605 (struct linux_target_ops) <breakpoint_len>: Remove.
2606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2608 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2609 (struct linux_target_ops) <breakpoint>: Remove.
2610 (struct linux_target_ops) <breakpoint_len>: Remove.
2611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2613 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2614 (struct linux_target_ops) <breakpoint>: Remove.
2615 (struct linux_target_ops) <breakpoint_len>: Remove.
2616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2618 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2619 (struct linux_target_ops) <breakpoint>: Remove.
2620 (struct linux_target_ops) <breakpoint_len>: Remove.
2621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2623 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2624 (struct linux_target_ops) <breakpoint>: Remove.
2625 (struct linux_target_ops) <breakpoint_len>: Remove.
2626 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2627 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2628 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2629 (struct linux_target_ops) <breakpoint>: Remove.
2630 (struct linux_target_ops) <breakpoint_len>: Remove.
2631 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2633 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2634 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2635 (struct linux_target_ops) <breakpoint>: Remove.
2636 (struct linux_target_ops) <breakpoint_len>: Remove.
2637 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2638 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2639 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2640 (struct linux_target_ops) <breakpoint>: Remove.
2641 (struct linux_target_ops) <breakpoint_len>: Remove.
2642 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2643 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2645 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2647 * linux-cris-low.c (cris_get_pc): Remove void arg.
2649 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2651 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2654 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2656 * inferiors.c (thread_pid_matches_callback): New function.
2657 (find_thread_process): New function.
2658 (remove_thread): Reset current_thread.
2659 (remove_process): Assert threads have been removed first.
2661 2015-10-15 Yao Qi <yao.qi@linaro.org>
2663 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2665 (aarch64_remove_point): Likewise.
2666 * regcache.c (regcache_register_size): New function.
2668 2015-10-12 Yao Qi <yao.qi@linaro.org>
2670 * linux-aarch64-low.c: Update all callers as emit_load_store
2671 is renamed to aarch64_emit_load_store.
2673 2015-10-12 Yao Qi <yao.qi@linaro.org>
2675 * linux-aarch64-low.c: Update all callers of function renaming
2676 from emit_insn to aarch64_emit_insn.
2678 2015-10-12 Yao Qi <yao.qi@linaro.org>
2680 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2681 arch/aarch64-insn.h.
2682 (struct aarch64_memory_operand): Likewise.
2684 (emit_insn): Move to arch/aarch64-insn.c.
2685 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2686 (emit_load_store): Move to arch/aarch64-insn.c.
2687 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2688 (can_encode_int32): Remove.
2690 2015-10-12 Yao Qi <yao.qi@linaro.org>
2692 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2693 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2694 (aarch64_relocate_instruction): Likewise.
2695 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2696 (struct aarch64_insn_visitor): Likewise.
2698 2015-10-12 Yao Qi <yao.qi@linaro.org>
2700 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2701 (struct aarch64_insn_visitor): New.
2702 (struct aarch64_insn_relocation_data): New.
2703 (aarch64_ftrace_insn_reloc_b): New function.
2704 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2705 (aarch64_ftrace_insn_reloc_cb): Likewise.
2706 (aarch64_ftrace_insn_reloc_tb): Likewise.
2707 (aarch64_ftrace_insn_reloc_adr): Likewise.
2708 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2709 (aarch64_ftrace_insn_reloc_others): Likewise.
2711 (aarch64_relocate_instruction): Use visitor.
2713 2015-10-12 Yao Qi <yao.qi@linaro.org>
2715 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2716 int. Add argument buf.
2717 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2718 aarch64_relocate_instruction.
2720 2015-10-12 Yao Qi <yao.qi@linaro.org>
2722 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2723 argument insn. Remove local variable insn. Don't call
2725 (aarch64_install_fast_tracepoint_jump_pad): Call
2728 2015-09-30 Yao Qi <yao.qi@linaro.org>
2730 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2731 (emit_load_store_pair): Likewise.
2733 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2735 * dll.c (match_dll): Add cast(s).
2736 (unloaded_dll): Likewise.
2737 * linux-low.c (second_thread_of_pid_p): Likewise.
2738 (delete_lwp_callback): Likewise.
2739 (count_events_callback): Likewise.
2740 (select_event_lwp_callback): Likewise.
2741 (linux_set_resume_request): Likewise.
2742 * server.c (accumulate_file_name_length): Likewise.
2743 (emit_dll_description): Likewise.
2744 (handle_qxfer_threads_worker): Likewise.
2745 (visit_actioned_threads): Likewise.
2746 * thread-db.c (any_thread_of): Likewise.
2747 * tracepoint.c (same_process_p): Likewise.
2748 (match_blocktype): Likewise.
2749 (build_traceframe_info_xml): Likewise.
2751 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2753 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2755 (gdb_unparse_agent_expr): Likewise.
2756 * hostio.c (require_data): Likewise.
2757 (handle_pread): Likewise.
2758 * linux-low.c (disable_regset): Likewise.
2759 (fetch_register): Likewise.
2760 (store_register): Likewise.
2761 (get_dynamic): Likewise.
2762 (linux_qxfer_libraries_svr4): Likewise.
2763 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2764 (set_fast_tracepoint_jump): Likewise.
2765 (uninsert_fast_tracepoint_jumps_at): Likewise.
2766 (reinsert_fast_tracepoint_jumps_at): Likewise.
2767 (validate_inserted_breakpoint): Likewise.
2768 (clone_agent_expr): Likewise.
2769 * regcache.c (init_register_cache): Likewise.
2770 * remote-utils.c (putpkt_binary_1): Likewise.
2771 (decode_M_packet): Likewise.
2772 (decode_X_packet): Likewise.
2773 (look_up_one_symbol): Likewise.
2774 (relocate_instruction): Likewise.
2775 (monitor_output): Likewise.
2776 * server.c (handle_search_memory): Likewise.
2777 (handle_qxfer_exec_file): Likewise.
2778 (handle_qxfer_libraries): Likewise.
2779 (handle_qxfer): Likewise.
2780 (handle_query): Likewise.
2781 (handle_v_cont): Likewise.
2782 (handle_v_run): Likewise.
2783 (captured_main): Likewise.
2784 * target.c (write_inferior_memory): Likewise.
2785 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2786 * tracepoint.c (init_trace_buffer): Likewise.
2787 (add_tracepoint_action): Likewise.
2788 (add_traceframe): Likewise.
2789 (add_traceframe_block): Likewise.
2790 (cmd_qtdpsrc): Likewise.
2791 (cmd_qtdv): Likewise.
2792 (cmd_qtstatus): Likewise.
2793 (response_source): Likewise.
2794 (response_tsv): Likewise.
2795 (cmd_qtnotes): Likewise.
2796 (gdb_collect): Likewise.
2797 (initialize_tracepoint): Likewise.
2799 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2801 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2802 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2803 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2805 (enum aarch64_condition_codes): New enum.
2806 (w0): New static global.
2809 (struct aarch64_memory_operand) <type>: New
2810 MEMORY_OPERAND_POSTINDEX type.
2811 (postindex_memory_operand): New helper function.
2812 (emit_ret): New function.
2813 (emit_load_store_pair): New function, factored out of emit_stp
2814 with support for MEMORY_OPERAND_POSTINDEX.
2815 (emit_stp): Rewrite using emit_load_store_pair.
2816 (emit_ldp): New function.
2817 (emit_load_store): Likewise.
2818 (emit_ldr): Mention post-index instruction in comment.
2819 (emit_ldrh): New function.
2820 (emit_ldrb): New function.
2821 (emit_ldrsw): Mention post-index instruction in comment.
2822 (emit_str): Likewise.
2823 (emit_subs): New function.
2824 (emit_cmp): Likewise.
2825 (emit_and): Likewise.
2826 (emit_orr): Likewise.
2827 (emit_orn): Likewise.
2828 (emit_eor): Likewise.
2829 (emit_mvn): Likewise.
2830 (emit_lslv): Likewise.
2831 (emit_lsrv): Likewise.
2832 (emit_asrv): Likewise.
2833 (emit_mul): Likewise.
2834 (emit_sbfm): Likewise.
2835 (emit_sbfx): Likewise.
2836 (emit_ubfm): Likewise.
2837 (emit_ubfx): Likewise.
2838 (emit_csinc): Likewise.
2839 (emit_cset): Likewise.
2840 (emit_nop): Likewise.
2841 (emit_ops_insns): New helper function.
2842 (emit_pop): Likewise.
2843 (emit_push): Likewise.
2844 (aarch64_emit_prologue): New function.
2845 (aarch64_emit_epilogue): Likewise.
2846 (aarch64_emit_add): Likewise.
2847 (aarch64_emit_sub): Likewise.
2848 (aarch64_emit_mul): Likewise.
2849 (aarch64_emit_lsh): Likewise.
2850 (aarch64_emit_rsh_signed): Likewise.
2851 (aarch64_emit_rsh_unsigned): Likewise.
2852 (aarch64_emit_ext): Likewise.
2853 (aarch64_emit_log_not): Likewise.
2854 (aarch64_emit_bit_and): Likewise.
2855 (aarch64_emit_bit_or): Likewise.
2856 (aarch64_emit_bit_xor): Likewise.
2857 (aarch64_emit_bit_not): Likewise.
2858 (aarch64_emit_equal): Likewise.
2859 (aarch64_emit_less_signed): Likewise.
2860 (aarch64_emit_less_unsigned): Likewise.
2861 (aarch64_emit_ref): Likewise.
2862 (aarch64_emit_if_goto): Likewise.
2863 (aarch64_emit_goto): Likewise.
2864 (aarch64_write_goto_address): Likewise.
2865 (aarch64_emit_const): Likewise.
2866 (aarch64_emit_call): Likewise.
2867 (aarch64_emit_reg): Likewise.
2868 (aarch64_emit_pop): Likewise.
2869 (aarch64_emit_stack_flush): Likewise.
2870 (aarch64_emit_zero_ext): Likewise.
2871 (aarch64_emit_swap): Likewise.
2872 (aarch64_emit_stack_adjust): Likewise.
2873 (aarch64_emit_int_call_1): Likewise.
2874 (aarch64_emit_void_call_2): Likewise.
2875 (aarch64_emit_eq_goto): Likewise.
2876 (aarch64_emit_ne_goto): Likewise.
2877 (aarch64_emit_lt_goto): Likewise.
2878 (aarch64_emit_le_goto): Likewise.
2879 (aarch64_emit_gt_goto): Likewise.
2880 (aarch64_emit_ge_got): Likewise.
2881 (aarch64_emit_ops_impl): New static global variable.
2882 (aarch64_emit_ops): New target function, return
2883 &aarch64_emit_ops_impl.
2884 (struct linux_target_ops): Install it.
2886 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2888 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2889 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2891 * linux-aarch64-ipa.c: New file.
2892 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2894 (aarch64_get_thread_area): New target method.
2895 (extract_signed_bitfield): New helper function.
2896 (aarch64_decode_ldr_literal): New function.
2897 (enum aarch64_opcodes): New enum.
2898 (struct aarch64_register): New struct.
2899 (struct aarch64_operand): New struct.
2900 (x0): New static global.
2909 (aarch64_register): New helper function.
2910 (register_operand): Likewise.
2911 (immediate_operand): Likewise.
2912 (struct aarch64_memory_operand): New struct.
2913 (offset_memory_operand): New helper function.
2914 (preindex_memory_operand): Likewise.
2915 (enum aarch64_system_control_registers): New enum.
2916 (ENCODE): New macro.
2917 (emit_insn): New helper function.
2918 (emit_b): New function.
2919 (emit_bcond): Likewise.
2920 (emit_cb): Likewise.
2921 (emit_tb): Likewise.
2922 (emit_blr): Likewise.
2923 (emit_stp): Likewise.
2924 (emit_ldp_q_offset): Likewise.
2925 (emit_stp_q_offset): Likewise.
2926 (emit_load_store): Likewise.
2927 (emit_ldr): Likewise.
2928 (emit_ldrsw): Likewise.
2929 (emit_str): Likewise.
2930 (emit_ldaxr): Likewise.
2931 (emit_stxr): Likewise.
2932 (emit_stlr): Likewise.
2933 (emit_data_processing_reg): Likewise.
2934 (emit_data_processing): Likewise.
2935 (emit_add): Likewise.
2936 (emit_sub): Likewise.
2937 (emit_mov): Likewise.
2938 (emit_movk): Likewise.
2939 (emit_mov_addr): Likewise.
2940 (emit_mrs): Likewise.
2941 (emit_msr): Likewise.
2942 (emit_sevl): Likewise.
2943 (emit_wfe): Likewise.
2944 (append_insns): Likewise.
2945 (can_encode_int32_in): New helper function.
2946 (aarch64_relocate_instruction): New function.
2947 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2948 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2949 (struct linux_target_ops): Install aarch64_get_thread_area,
2950 aarch64_install_fast_tracepoint_jump_pad and
2951 aarch64_get_min_fast_tracepoint_insn_len.
2953 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2955 * Makefile.in (aarch64-insn.o): New rule.
2956 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2958 2015-09-21 Yao Qi <yao.qi@linaro.org>
2960 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2962 2015-09-21 Yao Qi <yao.qi@linaro.org>
2964 * tracepoint.c (max_jump_pad_size): Remove.
2966 2015-09-18 Yao Qi <yao.qi@linaro.org>
2968 * linux-aarch64-low.c: Don't include sys/uio.h.
2969 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2971 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2973 * tracepoint.c (eval_result_type): Change prototype.
2974 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2976 2015-09-15 Pedro Alves <palves@redhat.com>
2978 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2979 Check whether to report exec events instead of checking whether
2980 multiprocess is enabled.
2982 2015-09-15 Pedro Alves <palves@redhat.com>
2985 * remote-utils.c (prepare_resume_reply): Merge
2986 TARGET_WAITKIND_VFORK_DONE switch case with the
2987 TARGET_WAITKIND_FORKED case.
2989 2015-09-15 Yao Qi <yao.qi@linaro.org>
2991 * server.c (handle_query): Check string comparison using
2992 "else if" instead of "if".
2994 2015-09-15 Yao Qi <yao.qi@linaro.org>
2996 * server.c (vCont_supported): New global variable.
2997 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2998 matches. Append ";vContSupported+" to own_buf.
2999 (handle_v_requests): Append ";s;S" to own_buf if target supports
3000 hardware single step or vCont_supported is false.
3001 (capture_main): Set vCont_supported to zero.
3003 2015-09-15 Yao Qi <yao.qi@linaro.org>
3005 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3007 (linux_supports_hardware_single_step): ... New function.
3008 (linux_target_ops): Update.
3009 * lynx-low.c (lynx_target_ops): Set field
3010 supports_hardware_single_step to target_can_do_hardware_single_step.
3011 * nto-low.c (nto_target_ops): Likewise.
3012 * spu-low.c (spu_target_ops): Likewise.
3013 * win32-low.c (win32_target_ops): Likewise.
3014 * target.c (target_can_do_hardware_single_step): New function.
3015 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3016 Remove. <supports_hardware_single_step>: New field.
3017 (target_supports_conditional_breakpoints): Remove.
3018 (target_supports_hardware_single_step): New macro.
3019 (target_can_do_hardware_single_step): Declare.
3020 * server.c (handle_query): Use target_supports_hardware_single_step
3021 instead of target_supports_conditional_breakpoints.
3023 2015-09-15 Yao Qi <yao.qi@linaro.org>
3025 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3027 (struct linux_target_ops the_low_target): Install
3028 aarch64_linux_siginfo_fixup.
3030 2015-09-11 Don Breazeal <donb@codesourcery.com>
3031 Luis Machado <lgustavo@codesourcery.com>
3033 * linux-low.c (linux_mourn): Static declaration.
3034 (linux_arch_setup): Move in front of
3035 handle_extended_wait.
3036 (linux_arch_setup_thread): New function.
3037 (handle_extended_wait): Handle exec events. Call
3038 linux_arch_setup_thread. Make event_lwp argument a
3039 pointer-to-a-pointer.
3040 (check_zombie_leaders): Do not check stopped threads.
3041 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3042 (linux_low_filter_event): Add lwp and thread for exec'ing
3043 non-leader thread if leader thread has been deleted.
3044 Refactor code into linux_arch_setup_thread and call it.
3045 Pass child lwp pointer by reference to handle_extended_wait.
3046 (linux_wait_for_event_filtered): Update comment.
3047 (linux_wait_1): Prevent clobbering exec event status.
3048 (linux_supports_exec_events): New function.
3049 (linux_target_ops) <supports_exec_events>: Initialize new member.
3050 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3052 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3053 * server.c (report_exec_events): New global variable.
3054 (handle_query): Handle qSupported query for exec-events feature.
3055 (captured_main): Initialize report_exec_events.
3056 * server.h (report_exec_events): Declare new global variable.
3057 * target.h (struct target_ops) <supports_exec_events>: New
3059 (target_supports_exec_events): New macro.
3060 * win32-low.c (win32_target_ops) <supports_exec_events>:
3061 Initialize new member.
3063 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3065 * linux-low.c (linux_low_enable_btrace): Remove.
3066 (linux_target_ops): Replace linux_low_enable_btrace with
3067 linux_enable_btrace.
3069 2015-09-03 Yao Qi <yao.qi@linaro.org>
3071 * linux-aarch64-low.c (aarch64_insert_point): Call
3072 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3075 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3077 * linux-low.c (check_stopped_by_breakpoint): Use
3078 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3080 2015-08-27 Pedro Alves <palves@redhat.com>
3082 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3084 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3086 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3087 the XNEW-family equivalent.
3088 (compile_bytecodes): Likewise.
3089 * dll.c (loaded_dll): Likewise.
3090 * event-loop.c (append_callback_event): Likewise.
3091 (create_file_handler): Likewise.
3092 (create_file_event): Likewise.
3093 * hostio.c (handle_open): Likewise.
3094 * inferiors.c (add_thread): Likewise.
3095 (add_process): Likewise.
3096 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3097 * linux-arm-low.c (arm_new_process): Likewise.
3098 (arm_new_thread): Likewise.
3099 * linux-low.c (add_to_pid_list): Likewise.
3100 (linux_add_process): Likewise.
3101 (handle_extended_wait): Likewise.
3102 (add_lwp): Likewise.
3103 (enqueue_one_deferred_signal): Likewise.
3104 (enqueue_pending_signal): Likewise.
3105 (linux_resume_one_lwp_throw): Likewise.
3106 (linux_resume_one_thread): Likewise.
3107 (linux_read_memory): Likewise.
3108 (linux_write_memory): Likewise.
3109 * linux-mips-low.c (mips_linux_new_process): Likewise.
3110 (mips_linux_new_thread): Likewise.
3111 (mips_add_watchpoint): Likewise.
3112 * linux-x86-low.c (initialize_low_arch): Likewise.
3113 * lynx-low.c (lynx_add_process): Likewise.
3114 * mem-break.c (set_raw_breakpoint_at): Likewise.
3115 (set_breakpoint): Likewise.
3116 (add_condition_to_breakpoint): Likewise.
3117 (add_commands_to_breakpoint): Likewise.
3118 (clone_agent_expr): Likewise.
3119 (clone_one_breakpoint): Likewise.
3120 * regcache.c (new_register_cache): Likewise.
3121 * remote-utils.c (look_up_one_symbol): Likewise.
3122 * server.c (queue_stop_reply): Likewise.
3123 (start_inferior): Likewise.
3124 (queue_stop_reply_callback): Likewise.
3125 (handle_target_event): Likewise.
3126 * spu-low.c (fetch_ppc_memory): Likewise.
3127 (store_ppc_memory): Likewise.
3128 * target.c (set_target_ops): Likewise.
3129 * thread-db.c (thread_db_load_search): Likewise.
3130 (try_thread_db_load_1): Likewise.
3131 * tracepoint.c (add_tracepoint): Likewise.
3132 (add_tracepoint_action): Likewise.
3133 (create_trace_state_variable): Likewise.
3134 (cmd_qtdpsrc): Likewise.
3135 (cmd_qtro): Likewise.
3136 (add_while_stepping_state): Likewise.
3137 * win32-low.c (child_add_thread): Likewise.
3138 (get_image_name): Likewise.
3140 2015-08-25 Yao Qi <yao.qi@linaro.org>
3142 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3144 2015-08-25 Yao Qi <yao.qi@linaro.org>
3146 * Makefile.in (aarch64-linux.o): New rule.
3147 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3149 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3150 (aarch64_init_debug_reg_state): Make it extern.
3151 (aarch64_linux_prepare_to_resume): Remove.
3153 2015-08-25 Yao Qi <yao.qi@linaro.org>
3155 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3156 lwp_arch_private_info and ptid_of_lwp.
3158 2015-08-25 Yao Qi <yao.qi@linaro.org>
3160 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3161 Find proc_info by find_process_pid. All callers updated.
3163 2015-08-25 Yao Qi <yao.qi@linaro.org>
3165 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3167 (debug_reg_change_callback): Remove.
3168 (aarch64_notify_debug_reg_change): Remove.
3170 2015-08-25 Yao Qi <yao.qi@linaro.org>
3172 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3173 Call current_lwp_ptid.
3175 2015-08-25 Yao Qi <yao.qi@linaro.org>
3177 * linux-aarch64-low.c (debug_reg_change_callback): Use
3180 2015-08-25 Yao Qi <yao.qi@linaro.org>
3182 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3184 2015-08-25 Yao Qi <yao.qi@linaro.org>
3186 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3188 2015-08-25 Yao Qi <yao.qi@linaro.org>
3190 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3193 2015-08-25 Yao Qi <yao.qi@linaro.org>
3195 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3197 (debug_reg_change_callback): Remove argument entry and add argument
3198 lwp. Remove local variable thread. Don't print thread id in the
3199 debugging output. Don't check whether pid of thread equals to pid.
3200 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3201 iterate_over_lwps instead find_inferior.
3203 2015-08-24 Pedro Alves <palves@redhat.com>
3205 * inferiors.c (get_first_process): New function.
3206 * inferiors.h (get_first_process): New declaration.
3207 * remote-utils.c (read_ptid): Default to the first process in the
3208 list, instead of to the current thread's process.
3210 2015-08-24 Pedro Alves <palves@redhat.com>
3212 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3213 * event-loop.c: Likewise.
3214 * remote-utils.c: Likewise.
3215 * tracepoint.c: Likewise.
3217 2015-08-24 Pedro Alves <palves@redhat.com>
3219 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3222 2015-08-21 Pedro Alves <palves@redhat.com>
3224 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3225 instead of literal 1.
3227 2015-08-21 Pedro Alves <palves@redhat.com>
3229 * tdesc.c (default_description): Explicitly zero-initialize.
3231 2015-08-21 Pedro Alves <palves@redhat.com>
3234 * inferiors.c (remove_thread): Discard any pending stop reply for
3236 * server.c (remove_all_on_match_pid): Rename to ...
3237 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3239 (discard_queued_stop_replies): Change parameter to a ptid. Now
3241 (handle_v_kill, kill_inferior_callback, captured_main)
3242 (process_serial_event): Adjust.
3243 * server.h (discard_queued_stop_replies): Declare.
3245 2015-08-21 Pedro Alves <palves@redhat.com>
3247 * linux-low.c (wait_for_sigstop): Always switch to no thread
3248 selected if the previously current thread dies.
3249 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3250 process instead of the current thread's.
3251 * remote-utils.c (input_interrupt): Don't check if there's no
3253 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3254 current thread to the general thread fails, error out.
3255 (handle_qxfer_auxv, handle_qxfer_libraries)
3256 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3257 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3258 (handle_query): Check if there's a thread selected instead of
3259 checking whether there's any thread in the thread list.
3260 (handle_qxfer_threads, handle_qxfer_btrace)
3261 (handle_qxfer_btrace_conf): Don't error out early if there's no
3262 thread in the thread list.
3263 (handle_v_cont, myresume): Don't set the current thread to the
3265 (process_serial_event) <Hg handling>: Also set thread_id if the
3266 previous general thread is still alive.
3267 (process_serial_event) <g/G handling>: If setting the current
3268 thread to the general thread fails, error out.
3269 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3270 thread's lwp instead of the current thread's.
3271 * target.c (set_desired_thread): If the desired thread was not
3272 found, leave the current thread pointing to NULL. Return an int
3273 (boolean) indicating success.
3274 * target.h (set_desired_thread): Change return type to int.
3276 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3278 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3279 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3281 (ps_get_thread_area): New function.
3283 2015-08-19 Gary Benson <gbenson@redhat.com>
3285 * hostio.c (handle_pread): Do not attempt to read more data
3286 than hostio_reply_with_data can fit in a packet.
3288 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3290 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3292 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3294 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3296 2015-08-06 Pedro Alves <palves@redhat.com>
3298 * tracepoint.c (expr_eval_result): Now an int.
3300 2015-08-06 Pedro Alves <palves@redhat.com>
3302 * gdbthread.h (struct regcache): Forward declare.
3303 (struct thread_info) <regcache_data>: Now a struct regcache
3305 * inferiors.c (inferior_regcache_data)
3306 (set_inferior_regcache_data): Now work with struct regcache
3308 * inferiors.h (struct regcache): Forward declare.
3309 (inferior_regcache_data, set_inferior_regcache_data): Now work
3310 with struct regcache pointers.
3311 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3312 (free_register_cache_thread): Remove struct regcache pointer
3315 2015-08-06 Pedro Alves <palves@redhat.com>
3317 * server.c (captured_main): On error, print the exception message
3318 to stderr, and if run_once is set, throw a quit.
3320 2015-08-06 Pedro Alves <palves@redhat.com>
3322 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3325 2015-08-06 Pedro Alves <palves@redhat.com>
3327 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3328 reading beyond the passed in buffer length.
3330 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3332 * tracepoint.c (symbol_list) <required>: Remove.
3334 2015-08-06 Pedro Alves <palves@redhat.com>
3336 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3337 count if stopping and suspending threads.
3338 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3339 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3340 (linux_detach): Complete an ongoing step-over.
3341 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3343 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3344 (linux_wait_1): If passing a signal to the inferior after
3345 finishing a step-over, unsuspend and re-resume all lwps. If we
3346 see a single-step event but the thread should be continuing, don't
3347 pass the trap to gdb.
3348 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3349 internal_error instead of gdb_assert.
3350 (enqueue_pending_signal): New function.
3351 (check_ptrace_stopped_lwp_gone): Add debug output.
3352 (start_step_over): Use internal_error instead of gdb_assert.
3353 (complete_ongoing_step_over): New function.
3354 (linux_resume_one_thread): Don't resume a suspended thread.
3355 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3358 2015-08-06 Pedro Alves <palves@redhat.com>
3360 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3361 (linux_thread_alive): Use lwp_is_marked_dead.
3362 (extended_event_reported): Delete.
3363 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3364 instead of extended_event_reported.
3365 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3367 (lwp_is_marked_dead): New function.
3368 (lwp_running): Use lwp_is_marked_dead.
3369 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3372 2015-08-06 Pedro Alves <palves@redhat.com>
3374 * linux-low.c (linux_wait_1): Move fork event output out of the
3375 !report_to_gdb check. Pass event_child->waitstatus to
3376 target_waitstatus_to_string instead of ourstatus.
3378 2015-08-04 Yao Qi <yao.qi@linaro.org>
3380 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3381 if current_thread is 32 bit.
3383 2015-08-04 Yao Qi <yao.qi@linaro.org>
3385 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3386 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3387 * server.c (extended_protocol): Remove "static".
3388 * server.h (extended_protocol): Declare it.
3390 2015-08-04 Yao Qi <yao.qi@linaro.org>
3392 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3393 both aarch64 and aarch32.
3394 (aarch64_set_pc): Likewise.
3396 2015-08-04 Yao Qi <yao.qi@linaro.org>
3398 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3399 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3400 arm-with-neon.xml to srv_xmlfiles.
3401 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3402 (is_64bit_tdesc): New function.
3403 (aarch64_linux_read_description): New function.
3404 (aarch64_arch_setup): Call aarch64_linux_read_description.
3405 (regs_info): Rename to regs_info_aarch64.
3406 (aarch64_regs_info): Return right regs_info.
3407 (initialize_low_arch): Call initialize_low_arch_aarch32.
3409 2015-08-04 Yao Qi <yao.qi@linaro.org>
3411 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3412 * linux-aarch32-low.c: New file.
3413 * linux-aarch32-low.h: New file.
3414 * linux-arm-low.c (arm_fill_gregset): Move it to
3415 linux-aarch32-low.c.
3416 (arm_store_gregset): Likewise.
3417 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3418 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3419 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3420 (regs_info): Rename to regs_info_arm.
3421 (arm_regs_info): Return regs_info_aarch32 if
3422 have_ptrace_getregset is 1 and target description is
3423 arm_with_neon or arm_with_vfpv3.
3424 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3425 Call initialize_low_arch_aarch32 instead.
3427 2015-08-04 Yao Qi <yao.qi@linaro.org>
3429 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3430 * linux-low.c: ... here.
3431 * linux-low.h (have_ptrace_getregset): Declare it.
3433 2015-08-04 Pedro Alves <palves@redhat.com>
3435 * thread-db.c (struct thread_db): Use new typedefs.
3436 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3438 (disable_thread_event_reporting): Cast result of dlsym to
3439 destination function pointer type.
3440 (thread_db_mourn): Use td_ta_delete_ftype.
3442 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3444 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3446 (CDX_BREAKPOINT): Define for R2.
3447 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3448 (the_low_target): Add comments.
3450 2015-07-30 Yao Qi <yao.qi@linaro.org>
3452 * linux-arm-low.c (arm_hwcap): Remove it.
3453 (arm_read_description): New local variable arm_hwcap. Don't
3454 set arm_hwcap to zero.
3456 2015-07-30 Yao Qi <yao.qi@linaro.org>
3458 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3459 Use regcache->tdesc instead.
3460 (arm_store_wmmxregset): Likewise.
3461 (arm_fill_vfpregset): Likewise.
3462 (arm_store_vfpregset): Likewise.
3464 2015-07-30 Yao Qi <yao.qi@linaro.org>
3466 * linux-arm-low.c: Include arch/arm.h.
3467 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3468 (arm_store_gregset): Likewise.
3470 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3472 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3473 ptrace's 4th parameter.
3475 2015-07-27 Yao Qi <yao.qi@linaro.org>
3477 * configure.srv (case aarch64*-*-linux*): Don't set
3480 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3482 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3484 * linux-arm-low.c: Likewise.
3485 * linux-cris-low.c: Likewise.
3486 * linux-crisv32-low.c: Likewise.
3487 * linux-low.c: Likewise.
3488 * linux-m68k-low.c: Likewise.
3489 * linux-mips-low.c: Likewise.
3490 * linux-nios2-low.c: Likewise.
3491 * linux-s390-low.c: Likewise.
3492 * linux-sparc-low.c: Likewise.
3493 * linux-tic6x-low.c: Likewise.
3494 * linux-tile-low.c: Likewise.
3495 * linux-x86-low.c: Likewise.
3497 2015-07-24 Pedro Alves <palves@redhat.com>
3499 * config.in: Regenerate.
3500 * configure: Regenerate.
3502 2015-07-24 Pedro Alves <palves@redhat.com>
3504 * acinclude.m4: Include ../ptrace.m4.
3505 * configure.ac: Call GDB_AC_PTRACE.
3506 * config.in, configure: Regenerate.
3508 2015-07-24 Yao Qi <yao.qi@linaro.org>
3510 * linux-low.c (linux_create_inferior): Remove setting to
3511 proc->priv->new_inferior.
3512 (linux_attach): Likewise.
3513 (linux_low_filter_event): Likewise.
3514 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3516 2015-07-24 Yao Qi <yao.qi@linaro.org>
3518 * linux-low.c (linux_arch_setup): New function.
3519 (linux_low_filter_event): If proc->tdesc is NULL and
3520 proc->attached is true, call the_low_target.arch_setup.
3521 Otherwise, keep status pending, and return.
3522 (linux_resume_one_lwp_throw): Don't call get_pc if
3523 thread->while_stepping isn't NULL. Don't call
3524 get_thread_regcache if proc->tdesc is NULL.
3525 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3526 (linux_target_ops): Install arch_setup.
3527 * server.c (start_inferior): Call the_target->arch_setup.
3528 * target.h (struct target_ops) <arch_setup>: New field.
3529 (target_arch_setup): New marco.
3530 * lynx-low.c (lynx_target_ops): Update.
3531 * nto-low.c (nto_target_ops): Update.
3532 * spu-low.c (spu_target_ops): Update.
3533 * win32-low.c (win32_target_ops): Update.
3535 2015-07-24 Yao Qi <yao.qi@linaro.org>
3537 * linux-low.c (linux_add_process): Don't set
3538 proc->priv->new_inferior.
3539 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3540 (linux_attach): Likewise.
3542 2015-07-24 Yao Qi <yao.qi@linaro.org>
3544 * server.c (start_inferior): Code refactor.
3546 2015-07-24 Yao Qi <yao.qi@linaro.org>
3548 * server.c (process_serial_event): Set general_thread.
3550 2015-07-21 Yao Qi <yao.qi@linaro.org>
3552 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3553 aarch64_linux_get_debug_reg_capacity.
3555 2015-07-17 Yao Qi <yao.qi@linaro.org>
3557 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3558 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3559 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3560 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3561 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3562 (AARCH64_HWP_ALIGNMENT): Likewise.
3563 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3564 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3565 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3566 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3567 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3568 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3569 (struct aarch64_debug_reg_state): Likewise.
3570 (struct arch_lwp_info): Likewise.
3571 (aarch64_align_watchpoint): Likewise.
3572 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3573 (aarch64_watchpoint_length): Likewise.
3574 (aarch64_point_encode_ctrl_reg): Likewise
3575 (aarch64_point_is_aligned): Likewise.
3576 (aarch64_align_watchpoint): Likewise.
3577 (aarch64_linux_set_debug_regs):
3578 (aarch64_dr_state_insert_one_point): Likewise.
3579 (aarch64_dr_state_remove_one_point): Likewise.
3580 (aarch64_handle_breakpoint): Likewise.
3581 (aarch64_handle_aligned_watchpoint): Likewise.
3582 (aarch64_handle_unaligned_watchpoint): Likewise.
3583 (aarch64_handle_watchpoint): Likewise.
3585 2015-07-17 Yao Qi <yao.qi@linaro.org>
3587 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3588 and don't aarch64_get_debug_reg_state. All callers update.
3589 (aarch64_handle_aligned_watchpoint): Likewise.
3590 (aarch64_handle_unaligned_watchpoint): Likewise.
3591 (aarch64_handle_watchpoint): Likewise.
3592 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3593 (aarch64_remove_point): Likewise.
3595 2015-07-17 Yao Qi <yao.qi@linaro.org>
3597 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3599 (aarch64_handle_unaligned_watchpoint): Likewise.
3601 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3603 Revert the previous 3 commits:
3604 Move gdb_regex* to common/
3605 Move linux_find_memory_regions_full & co.
3606 gdbserver build-id attribute generator
3608 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3609 Jan Kratochvil <jan.kratochvil@redhat.com>
3611 gdbserver build-id attribute generator.
3612 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3613 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3614 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3616 (get_dynamic): Use find_pdhr to traverse program headers.
3617 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3618 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3619 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3620 (get_hex_build_id): New.
3621 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3622 to reply XML document.
3624 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3625 Jan Kratochvil <jan.kratochvil@redhat.com>
3627 * target.c: Include target/target-utils.h and fcntl.h.
3628 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3629 (target_fileio_read_stralloc): New functions.
3631 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3633 * Makefile.in (OBS): Add gdb_regex.o.
3635 * config.in: Rebuilt.
3636 * configure: Rebuilt.
3638 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3639 Jan Kratochvil <jan.kratochvil@redhat.com>
3641 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3642 * Makefile.in (OBS): Add target-utils.o.
3643 (linux-maps.o, target-utils.o): New.
3644 * configure.srv (srv_linux_obj): Add linux-maps.o.
3646 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3648 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3650 (the_low_target): Install it.
3652 2015-07-14 Pedro Alves <palves@redhat.com>
3654 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3655 Instead, ignore ECHILD, and throw an error for other errnos.
3657 2015-07-10 Pedro Alves <palves@redhat.com>
3659 * event-loop.c (struct callback_event) <data>: Change type to
3660 gdb_client_data instance instead of gdb_client_data pointer.
3661 (append_callback_event): Adjust.
3663 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3665 * linux-aarch64-low.c: Add comments for each linux_target_ops
3666 method. Remove comments already covered in target_ops and
3667 linux_target_ops definitions.
3668 (the_low_target): Add comments for each unimplemented method.
3670 2015-07-09 Yao Qi <yao.qi@linaro.org>
3672 * linux-aarch64-low.c (aarch64_regmap): Remove.
3673 (aarch64_usrregs_info): Remove.
3674 (regs_info): Set field usrregs to NULL.
3676 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3678 * linux-low.c: Include "rsp-low.h"
3679 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3680 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3681 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3682 (handle_btrace_enable_pt): New.
3683 (handle_btrace_general_set): Support "pt".
3684 (handle_btrace_conf_general_set): Support "pt:size".
3686 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3688 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3691 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3693 * linux-aarch64-low.c: Remove comment about endianness.
3694 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3695 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3698 2015-06-24 Gary Benson <gbenson@redhat.com>
3700 * linux-i386-ipa.c (stdint.h): Do not include.
3701 * lynx-i386-low.c (stdint.h): Likewise.
3702 * lynx-ppc-low.c (stdint.h): Likewise.
3703 * mem-break.c (stdint.h): Likewise.
3704 * thread-db.c (stdint.h): Likewise.
3705 * tracepoint.c (stdint.h): Likewise.
3706 * win32-low.c (stdint.h): Likewise.
3708 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3710 * server.c (write_qxfer_response): Update call to
3711 remote_escape_output.
3713 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3714 Jan Kratochvil <jan.kratochvil@redhat.com>
3716 Merge multiple hex conversions.
3717 * gdbreplay.c (tohex): Rename to 'fromhex'.
3718 (logchar): Use fromhex.
3720 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3722 * server.c (handle_qxfer_libraries): Set `version' attribute for
3725 2015-06-10 Gary Benson <gbenson@redhat.com>
3727 * target.h (struct target_ops) <multifs_open>: New field.
3728 <multifs_unlink>: Likewise.
3729 <multifs_readlink>: Likewise.
3730 * linux-low.c (nat/linux-namespaces.h): New include.
3731 (linux_target_ops): Initialize the_target->multifs_open,
3732 the_target->multifs_unlink and the_target->multifs_readlink.
3733 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3734 * hostio.c (hostio_fs_pid): New static variable.
3735 (hostio_handle_new_gdb_connection): New function.
3736 (handle_setfs): Likewise.
3737 (handle_open): Use the_target->multifs_open as appropriate.
3738 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3739 (handle_readlink): Use the_target->multifs_readlink as
3741 (handle_vFile): Handle vFile:setfs packets.
3742 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3743 after target_handle_new_gdb_connection.
3745 2015-06-10 Gary Benson <gbenson@redhat.com>
3747 * configure.ac (AC_CHECK_FUNCS): Add setns.
3748 * config.in: Regenerate.
3749 * configure: Likewise.
3750 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3751 (linux-namespaces.o): New rule.
3752 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3754 2015-06-09 Gary Benson <gbenson@redhat.com>
3756 * hostio.c (handle_open): Process mode argument with
3757 fileio_to_host_mode.
3759 2015-06-01 Yao Qi <yao.qi@linaro.org>
3761 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3762 * linux-x86-low.c: Likewise.
3764 2015-05-28 Don Breazeal <donb@codesourcery.com>
3766 * linux-low.c (handle_extended_wait): Initialize
3767 thread_info.last_resume_kind for new fork children.
3769 2015-05-15 Pedro Alves <palves@redhat.com>
3771 * target.h (target_handle_new_gdb_connection): Rewrite using if
3772 wrapped in do/while.
3774 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3776 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3777 * configure, config.in: Regenerate.
3778 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3781 2015-05-12 Don Breazeal <donb@codesourcery.com>
3783 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3784 PTRACE_EVENT_VFORK_DONE.
3785 (linux_low_ptrace_options, extended_event_reported): Add vfork
3787 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3788 and "vforkdone" for RSP 'T' Stop Reply Packet.
3789 * server.h (report_vfork_events): Declare
3792 2015-05-12 Don Breazeal <donb@codesourcery.com>
3794 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3795 (the_low_target) <new_fork>: Initialize new member.
3796 * linux-arm-low.c (arm_new_fork): New function.
3797 (the_low_target) <new_fork>: Initialize new member.
3798 * linux-low.c (handle_extended_wait): Call new target function
3800 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3801 * linux-mips-low.c (mips_add_watchpoint): New function
3802 extracted from mips_insert_point.
3803 (the_low_target) <new_fork>: Initialize new member.
3804 (mips_linux_new_fork): New function.
3805 (mips_insert_point): Call mips_add_watchpoint.
3806 * linux-x86-low.c (x86_linux_new_fork): New function.
3807 (the_low_target) <new_fork>: Initialize new member.
3809 2015-05-12 Don Breazeal <donb@codesourcery.com>
3811 * linux-low.c (handle_extended_wait): Implement return value,
3812 rename argument 'event_child' to 'event_lwp', handle
3813 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3814 (linux_low_ptrace_options): New function.
3815 (linux_low_filter_event): Call linux_low_ptrace_options,
3816 use different argument fo linux_enable_event_reporting,
3817 use return value from handle_extended_wait.
3818 (extended_event_reported): New function.
3819 (linux_wait_1): Call extended_event_reported and set
3820 status to report fork events.
3821 (linux_write_memory): Add pid to debug message.
3822 (reset_lwp_ptrace_options_callback): New function.
3823 (linux_handle_new_gdb_connection): New function.
3824 (linux_target_ops): Initialize new structure member.
3825 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3826 * lynx-low.c: Initialize new structure member.
3827 * remote-utils.c (prepare_resume_reply): Implement stop reason
3828 "fork" for "T" stop message.
3829 * server.c (handle_query): Call handle_new_gdb_connection.
3830 * server.h (report_fork_events): Declare global flag.
3831 * target.h (struct target_ops) <handle_new_gdb_connection>:
3833 (target_handle_new_gdb_connection): New macro.
3834 * win32-low.c: Initialize new structure member.
3836 2015-05-12 Don Breazeal <donb@codesourcery.com>
3838 * mem-break.c (APPEND_TO_LIST): Define macro.
3839 (clone_agent_expr): New function.
3840 (clone_one_breakpoint): New function.
3841 (clone_all_breakpoints): New function.
3842 * mem-break.h: Declare new functions.
3844 2015-05-12 Don Breazeal <donb@codesourcery.com>
3846 * linux-low.c (linux_supports_fork_events): New function.
3847 (linux_supports_vfork_events): New function.
3848 (linux_target_ops): Initialize new structure members.
3849 (initialize_low): Call linux_check_ptrace_features.
3850 * lynx-low.c (lynx_target_ops): Initialize new structure
3852 * server.c (report_fork_events, report_vfork_events):
3854 (handle_query): Add new features to qSupported packet and
3856 (captured_main): Initialize new global variables.
3857 * target.h (struct target_ops) <supports_fork_events>:
3859 <supports_vfork_events>: New member.
3860 (target_supports_fork_events): New macro.
3861 (target_supports_vfork_events): New macro.
3862 * win32-low.c (win32_target_ops): Initialize new structure
3865 2015-05-12 Gary Benson <gbenson@redhat.com>
3867 * server.c (handle_qxfer_exec_file): Use current process
3870 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3872 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3873 Remove HAVE_PTRACE_GETREGS conditionals.
3874 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3875 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3877 2015-05-08 Yao Qi <yao.qi@linaro.org>
3879 * linux-low.c (linux_supports_conditional_breakpoints): New
3881 (linux_target_ops): Install new target method.
3882 * lynx-low.c (lynx_target_ops): Install NULL hook for
3883 supports_conditional_breakpoints.
3884 * nto-low.c (nto_target_ops): Likewise.
3885 * spu-low.c (spu_target_ops): Likewise.
3886 * win32-low.c (win32_target_ops): Likewise.
3887 * server.c (handle_query): Check
3888 target_supports_conditional_breakpoints.
3889 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3891 (target_supports_conditional_breakpoints): New macro.
3893 2015-05-06 Pedro Alves <palves@redhat.com>
3896 * server.c (start_inferior): If the process exits, mourn it.
3898 2015-04-21 Gary Benson <gbenson@redhat.com>
3900 * hostio.c (fileio_open_flags_to_host): Factored out to
3901 fileio_to_host_openflags in common/fileio.c. Single use
3904 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3906 * linux-xtensa-low.c (xtensa_fill_gregset)
3907 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3910 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3912 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3913 (regs_info): Replace usrregs pointer with NULL.
3915 2015-04-17 Gary Benson <gbenson@redhat.com>
3917 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3918 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3919 * server.c (handle_qxfer_exec_file): New function.
3920 (qxfer_packets): Add exec-file entry.
3921 (handle_query): Report qXfer:exec-file:read as supported packet.
3923 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3925 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3927 2015-04-09 Gary Benson <gbenson@redhat.com>
3929 * hostio-errno.c (errno_to_fileio_error): Remove function.
3930 Update caller to use remote_fileio_to_fio_error.
3932 2015-04-09 Yao Qi <yao.qi@linaro.org>
3934 * linux-low.c (linux_insert_point): Call
3935 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3936 (linux_remove_point): Call remove_memory_breakpoint if type is
3938 * linux-x86-low.c (x86_insert_point): Don't call
3939 insert_memory_breakpoint.
3940 (x86_remove_point): Don't call remove_memory_breakpoint.
3942 2015-04-01 Pedro Alves <palves@redhat.com>
3943 Cleber Rosa <crosa@redhat.com>
3945 * server.c (gdbserver_usage): Reorganize and extend the usage
3948 2015-03-24 Pedro Alves <palves@redhat.com>
3950 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3951 output. Also dump TRAP_TRACE.
3952 (linux_low_filter_event): In debug output, distinguish a
3953 resume_stop SIGSTOP from a delayed SIGSTOP.
3955 2015-03-24 Gary Benson <gbenson@redhat.com>
3957 * linux-x86-low.c (x86_linux_new_thread): Moved to
3959 (x86_linux_prepare_to_resume): Likewise.
3961 2015-03-24 Gary Benson <gbenson@redhat.com>
3963 * Makefile.in (x86-linux-dregs.o): New rule.
3964 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3965 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3966 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3967 (x86_linux_dr_get): Likewise.
3968 (x86_linux_dr_set): Likewise.
3969 (update_debug_registers_callback): Likewise.
3970 (x86_linux_dr_set_addr): Likewise.
3971 (x86_linux_dr_get_addr): Likewise.
3972 (x86_linux_dr_set_control): Likewise.
3973 (x86_linux_dr_get_control): Likewise.
3974 (x86_linux_dr_get_status): Likewise.
3975 (x86_linux_update_debug_registers): Likewise.
3977 2015-03-24 Gary Benson <gbenson@redhat.com>
3979 * linux-x86-low.c (x86_linux_update_debug_registers):
3980 New function, factored out from...
3981 (x86_linux_prepare_to_resume): ...this.
3983 2015-03-24 Gary Benson <gbenson@redhat.com>
3985 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3986 (x86_linux_dr_set): Likewise.
3987 (update_debug_registers_callback): Likewise.
3988 (x86_linux_dr_set_addr): Likewise.
3989 (x86_linux_dr_get_addr): Likewise.
3990 (x86_linux_dr_set_control): Likewise.
3991 (x86_linux_dr_get_control): Likewise.
3992 (x86_linux_dr_get_status): Likewise.
3993 (x86_linux_prepare_to_resume): Likewise.
3995 2015-03-24 Gary Benson <gbenson@redhat.com>
3997 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3998 Use perror_with_name. Pass string through gettext.
3999 (x86_linux_dr_set): Likewise.
4001 2015-03-24 Gary Benson <gbenson@redhat.com>
4003 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4004 (x86_linux_dr_set_addr): ...this.
4005 (x86_dr_low_get_addr): Rename to...
4006 (x86_linux_dr_get_addr): ...this.
4007 (x86_dr_low_set_control): Rename to...
4008 (x86_linux_dr_set_control): ...this.
4009 (x86_dr_low_get_control): Rename to...
4010 (x86_linux_dr_get_control): ...this.
4011 (x86_dr_low_get_status): Rename to...
4012 (x86_linux_dr_get_status): ...this.
4013 (x86_dr_low): Update with new function names.
4015 2015-03-24 Gary Benson <gbenson@redhat.com>
4017 * Makefile.in (x86-linux.o): New rule.
4018 * configure.srv: Add x86-linux.o to relevant targets.
4019 * linux-low.c (lwp_set_arch_private_info): New function.
4020 (lwp_arch_private_info): Likewise.
4021 * linux-x86-low.c: Include nat/x86-linux.h.
4022 (arch_lwp_info): Removed structure.
4023 (update_debug_registers_callback):
4024 Use lwp_set_debug_registers_changed.
4025 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4026 and lwp_set_debug_registers_changed.
4027 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4029 2015-03-24 Gary Benson <gbenson@redhat.com>
4031 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4032 * linux-arm-low.c (arm_new_thread): Likewise.
4033 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4034 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4035 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4036 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4038 2015-03-24 Gary Benson <gbenson@redhat.com>
4040 * linux-low.c (ptid_of_lwp): New function.
4041 (lwp_is_stopped): Likewise.
4042 (lwp_stop_reason): Likewise.
4043 * linux-x86-low.c (update_debug_registers_callback):
4045 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4048 2015-03-24 Gary Benson <gbenson@redhat.com>
4050 * linux-low.h (linux_stop_lwp): Remove declaration.
4052 2015-03-24 Gary Benson <gbenson@redhat.com>
4054 * linux-low.h: Include nat/linux-nat.h.
4055 * linux-low.c (iterate_over_lwps_args): New structure.
4056 (iterate_over_lwps_filter): New function.
4057 (iterate_over_lwps): Likewise.
4058 * linux-x86-low.c (update_debug_registers_callback):
4059 Update signature to what iterate_over_lwps expects.
4060 Remove PID check that iterate_over_lwps now performs.
4061 (x86_dr_low_set_addr): Use iterate_over_lwps.
4062 (x86_dr_low_set_control): Likewise.
4064 2015-03-24 Gary Benson <gbenson@redhat.com>
4066 * linux-x86-low.c (x86_debug_reg_state): New function.
4067 (x86_linux_prepare_to_resume): Use the above.
4069 2015-03-24 Gary Benson <gbenson@redhat.com>
4071 * linux-low.c (current_lwp_ptid): New function.
4072 * linux-x86-low.c: Include nat/linux-nat.h.
4073 (x86_dr_low_get_addr): Use current_lwp_ptid.
4074 (x86_dr_low_get_control): Likewise.
4075 (x86_dr_low_get_status): Likewise.
4077 2015-03-20 Pedro Alves <palves@redhat.com>
4079 * tracepoint.c (cmd_qtstatus): Make "str" const.
4081 2015-03-20 Pedro Alves <palves@redhat.com>
4083 * server.c (handle_general_set): Make "req_str" const.
4085 2015-03-19 Pedro Alves <palves@redhat.com>
4087 * linux-low.c (linux_resume_one_lwp): Rename to ...
4088 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4089 instead call perror_with_name.
4090 (check_ptrace_stopped_lwp_gone): New function.
4091 (linux_resume_one_lwp): Reimplement as wrapper around
4092 linux_resume_one_lwp_throw that swallows errors if the LWP is
4095 2015-03-19 Pedro Alves <palves@redhat.com>
4097 * linux-low.c (count_events_callback, select_event_lwp_callback):
4098 No longer check whether the thread has resume_stop as last resume
4101 2015-03-19 Pedro Alves <palves@redhat.com>
4103 * linux-low.c (count_events_callback, select_event_lwp_callback):
4104 Use the lwp's status_pending_p field, not the thread's.
4106 2015-03-19 Pedro Alves <palves@redhat.com>
4108 * linux-low.c (select_event_lwp_callback): Update comments to
4109 no longer mention SIGTRAP.
4111 2015-03-18 Gary Benson <gbenson@redhat.com>
4113 * server.c (handle_query): Do not report vFile:fstat as supported.
4115 2015-03-11 Gary Benson <gbenson@redhat.com>
4117 * hostio.c (sys/types.h): New include.
4118 (sys/stat.h): Likewise.
4119 (common-remote-fileio.h): Likewise.
4120 (handle_fstat): New function.
4121 (handle_vFile): Handle vFile:fstat packets.
4123 2015-03-11 Gary Benson <gbenson@redhat.com>
4125 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4126 struct stat.st_blocks and struct stat.st_blksize.
4127 * configure: Regenerate.
4128 * config.in: Likewise.
4129 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4130 (OBS): Add common-remote-fileio.o.
4131 (common-remote-fileio.o): New rule.
4133 2015-03-09 Pedro Alves <palves@redhat.com>
4135 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4136 'struct sockaddr' pointer in 'accept' call.
4138 2015-03-09 Pedro Alves <palves@redhat.com>
4141 2015-03-07 Pedro Alves <palves@redhat.com>
4142 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4143 or <winsock2.h> here. Instead include "gdb_socket.h".
4144 (remote_open): Use union gdb_sockaddr_u.
4145 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4146 or <winsock2.h> here. Instead include "gdb_socket.h".
4147 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4148 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4150 (init_named_socket, gdb_agent_helper_thread): Use union
4153 2015-03-07 Pedro Alves <palves@redhat.com>
4155 * configure.ac (build_warnings): Move
4156 -Wdeclaration-after-statement to the C-specific set.
4157 * configure: Regenerate.
4159 2015-03-07 Pedro Alves <palves@redhat.com>
4161 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4162 or <winsock2.h> here. Instead include "gdb_socket.h".
4163 (remote_open): Use union gdb_sockaddr_u.
4164 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4165 or <winsock2.h> here. Instead include "gdb_socket.h".
4166 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4167 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4169 (init_named_socket, gdb_agent_helper_thread): Use union
4172 2015-03-07 Pedro Alves <palves@redhat.com>
4174 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4177 2015-03-06 Yao Qi <yao.qi@linaro.org>
4179 * linux-aarch64-low.c (aarch64_insert_point): Use
4180 show_debug_regs as a boolean.
4181 (aarch64_remove_point): Likewise.
4183 2015-03-05 Pedro Alves <palves@redhat.com>
4185 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4186 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4187 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4188 * nto-low.c (nto_target_ops): Likewise.
4189 * spu-low.c (spu_target_ops): Likewise.
4190 * win32-low.c (win32_target_ops): Likewise.
4192 2015-03-04 Pedro Alves <palves@redhat.com>
4194 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4195 Decide whether a breakpoint triggered based on the SIGTRAP's
4197 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4198 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4199 (linux_low_filter_event): Check for breakpoints before checking
4201 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4203 (linux_stopped_by_sw_breakpoint)
4204 (linux_supports_stopped_by_sw_breakpoint)
4205 (linux_stopped_by_hw_breakpoint)
4206 (linux_supports_stopped_by_hw_breakpoint): New functions.
4207 (linux_target_ops): Install new target methods.
4209 2015-03-04 Pedro Alves <palves@redhat.com>
4211 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4212 * server.c (swbreak_feature, hwbreak_feature): New globals.
4213 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4214 (captured_main): Clear swbreak_feature and hwbreak_feature.
4215 * server.h (swbreak_feature, hwbreak_feature): Declare.
4216 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4217 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4218 supports_stopped_by_hw_breakpoint>: New fields.
4219 (target_supports_stopped_by_sw_breakpoint)
4220 (target_stopped_by_sw_breakpoint)
4221 (target_supports_stopped_by_hw_breakpoint)
4222 (target_stopped_by_hw_breakpoint): Declare.
4224 2015-03-04 Pedro Alves <palves@redhat.com>
4226 enum lwp_stop_reason -> enum target_stop_reason
4227 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4228 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4229 (linux_wait_1, stuck_in_jump_pad_callback)
4230 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4231 (linux_stopped_by_watchpoint):
4232 * linux-low.h (enum lwp_stop_reason): Delete.
4233 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4234 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4236 2015-03-04 Yao Qi <yao.qi@linaro.org>
4238 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4240 2015-03-03 Gary Benson <gbenson@redhat.com>
4242 * hostio.c (handle_vFile): Fix prefix lengths.
4244 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4246 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4249 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4251 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4252 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4253 (clean): Add "rm -f" for above C files.
4254 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4255 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4256 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4257 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4258 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4259 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4260 (init_registers_s390x_vx_linux64)
4261 (init_registers_s390x_tevx_linux64)
4262 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4263 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4265 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4266 (s390_store_vxrs_high): New functions.
4267 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4269 (s390_arch_setup): Add logic for selecting one of the new target
4270 descriptions. Activate the new vector regsets if applicable.
4271 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4272 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4273 and init_registers_s390x_tevx_linux64.
4275 2015-03-01 Pedro Alves <palves@redhat.com>
4277 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4280 2015-02-27 Pedro Alves <palves@redhat.com>
4282 * linux-x86-low.c (u_debugreg_offset): New function.
4283 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4285 2015-02-27 Pedro Alves <palves@redhat.com>
4287 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4288 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4289 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4290 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4291 (ps_lsetfpregs, ps_getpid)
4292 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4293 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4294 (ps_lsetxregs, ps_plog): Declare.
4296 2015-02-27 Pedro Alves <palves@redhat.com>
4298 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4299 IP_AGENT_EXPORT_FUNC.
4300 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4301 IP_AGENT_EXPORT_FUNC.
4302 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4303 (IP_AGENT_EXPORT): Delete.
4304 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4305 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4306 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4307 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4308 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4309 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4310 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4311 (traceframe_read_count, traceframe_write_count)
4312 (traceframes_created, trace_state_variables, get_raw_reg)
4313 (get_trace_state_variable_value, set_trace_state_variable_value)
4314 (ust_loaded, helper_thread_id, cmd_buf): Use
4315 IPA_SYM_EXPORTED_NAME.
4316 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4317 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4318 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4319 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4320 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4321 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4322 EXTERN_C_PUSH/EXTERN_C_POP.
4323 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4324 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4325 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4326 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4327 (traceframe_write_count, traceframe_read_count)
4328 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4329 (about_to_request_buffer_space, get_trace_state_variable_value)
4330 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4331 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4332 EXTERN_C_PUSH/EXTERN_C_POP.
4333 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4334 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4335 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4336 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4337 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4338 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4339 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4340 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4342 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4343 (IP_AGENT_EXPORT_VAR_DECL): Define.
4345 (gdb_agent_get_raw_reg): Declare.
4347 2015-02-27 Tom Tromey <tromey@redhat.com>
4348 Pedro Alves <palves@redhat.com>
4350 Rename symbols whose names are reserved C++ keywords throughout.
4352 2015-02-27 Pedro Alves <palves@redhat.com>
4354 * Makefile.in (COMPILER): New, get it from autoconf.
4355 (CXX): Get from autoconf instead.
4356 (COMPILE.pre): Use COMPILER.
4357 (CC-LD): Rename to ...
4358 (CC_LD): ... this. Use COMPILER.
4359 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4360 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4361 * acinclude.m4: Include build-with-cxx.m4.
4362 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4363 Disable -Werror by default if building in C++ mode.
4364 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4365 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4366 the C++ compiler. Save/restore CXXFLAGS too.
4367 * configure: Regenerate.
4369 2015-02-27 Pedro Alves <palves@redhat.com>
4371 * acinclude.m4: Include libiberty.m4.
4372 * configure.ac: Call libiberty_INIT.
4373 * config.in, configure: Regenerate.
4375 2015-02-26 Pedro Alves <palves@redhat.com>
4377 * linux-low.c (linux_wait_1): When incrementing the PC past a
4378 program breakpoint always use the_low_target.breakpoint_len as
4379 increment, rather than the maximum between that and
4380 the_low_target.decr_pc_after_break.
4382 2015-02-23 Pedro Alves <palves@redhat.com>
4384 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4385 thread was doing a step-over; always adjust the PC if
4386 we stepped over a permanent breakpoint.
4387 (linux_wait_1): If we stepped over breakpoint that was on top of a
4388 permanent breakpoint, manually advance the PC past it.
4390 2015-02-23 Pedro Alves <palves@redhat.com>
4392 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4394 (x86_fill_gregset, x86_store_gregset): Use it when handling
4397 2015-02-20 Pedro Alves <palves@redhat.com>
4399 * thread-db.c: Include "nat/linux-procfs.h".
4400 (thread_db_init): Skip listing new threads if the kernel supports
4401 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4403 2015-02-20 Pedro Alves <palves@redhat.com>
4405 * linux-low.c (status_pending_p_callback): Use ptid_match.
4407 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4409 PR breakpoints/16812
4410 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4411 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4412 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4414 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4416 PR breakpoints/15956
4417 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4419 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4421 * linux-low.c (linux_low_btrace_conf): Print size.
4422 * server.c (handle_btrace_conf_general_set): New.
4423 (hanle_general_set): Call handle_btrace_conf_general_set.
4424 (handle_query): Report Qbtrace-conf:bts:size as supported.
4426 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4428 * linux-low.c (linux_low_enable_btrace): Update parameters.
4429 (linux_low_btrace_conf): New.
4430 (linux_target_ops)<to_btrace_conf>: Initialize.
4431 * server.c (current_btrace_conf): New.
4432 (handle_btrace_enable): Rename to ...
4433 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4434 to target_enable_btrace. Update comment. Update users.
4435 (handle_qxfer_btrace_conf): New.
4436 (qxfer_packets): Add btrace-conf entry.
4437 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4438 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4439 (target_ops)<read_btrace_conf>: New.
4440 (target_enable_btrace): Update parameters.
4441 (target_read_btrace_conf): New.
4443 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4445 * server.c (handle_btrace_general_set): Remove call to
4446 target_supports_btrace.
4447 (supported_btrace_packets): New.
4448 (handle_query): Call supported_btrace_packets.
4449 * target.h: include btrace-common.h.
4450 (btrace_target_info): Removed.
4451 (supports_btrace, target_supports_btrace): Update parameters.
4453 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4455 * Makefile.in (SFILES): Add common/btrace-common.c.
4456 (OBS): Add common/btrace-common.o.
4457 (btrace-common.o): Add build rules.
4458 * linux-low: Include btrace-common.h.
4459 (linux_low_read_btrace): Use struct btrace_data. Call
4460 btrace_data_init and btrace_data_fini.
4462 2015-02-06 Pedro Alves <palves@redhat.com>
4464 * thread-db.c (find_new_threads_callback): Add debug output.
4466 2015-02-04 Pedro Alves <palves@redhat.com>
4468 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4469 (resume_stopped_resumed_lwps): New function.
4470 (linux_wait_for_event_filtered): Use it.
4472 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4474 * Makefile.in (SFILES): Add linux-personality.c.
4475 (linux-personality.o): New rule.
4476 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4477 list of objects to be built.
4478 * linux-low.c: Include nat/linux-personality.h.
4479 (linux_create_inferior): Remove code to disable address space
4480 randomization (moved to ../nat/linux-personality.c). Create
4481 cleanup to disable address space randomization.
4483 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4485 * Makefile.in (posix-strerror.o): New rule.
4486 (mingw-strerror.o): Likewise.
4487 * configure: Regenerated.
4488 * configure.ac: Source file ../common/common.host. Initialize new
4489 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4491 2015-01-14 Yao Qi <yao@codesourcery.com>
4493 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4494 (ppc-linux.o): New rule.
4495 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4496 * configure.ac: AC_CHECK_FUNCS(getauxval).
4497 * config.in: Re-generated.
4498 * configure: Re-generated.
4499 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4500 ppc64_64bit_inferior_p
4502 2015-01-14 Yao Qi <yao@codesourcery.com>
4504 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4505 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4506 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4507 (PT_ORIG_R3, PT_TRAP): Likewise.
4508 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4509 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4510 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4512 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4514 * i387-fp.c (i387_cache_to_xsave): In look over
4515 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4516 zmmh_low_space field by use of zmmh_high_space.
4518 2015-01-09 Pedro Alves <palves@redhat.com>
4520 * linux-low.c (step_over_bkpt): Move higher up in the file.
4521 (handle_extended_wait): Don't store the stop_pc here.
4522 (get_stop_pc): Adjust comments and rename to ...
4523 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4524 stopped for a software breakpoint or hardware breakpoint.
4525 (thread_still_has_status_pending_p): New function.
4526 (status_pending_p_callback): Use
4527 thread_still_has_status_pending_p. If the event is no longer
4528 interesting, resume the LWP.
4529 (handle_tracepoints): Add assert.
4530 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4531 (wstatus_maybe_breakpoint): New function.
4532 (cancel_breakpoint): Delete function.
4533 (check_stopped_by_watchpoint): New function, factored out from
4534 linux_low_filter_event.
4535 (lp_status_maybe_breakpoint): Delete function.
4536 (linux_low_filter_event): Remove filter_ptid argument.
4537 Leave thread group exits pending here. Store the LWP's stop PC.
4538 Always leave events pending.
4539 (linux_wait_for_event_filtered): Pull all events out of the
4540 kernel, and leave them all pending.
4541 (count_events_callback, select_event_lwp_callback): Consider all
4543 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4544 (select_event_lwp): Only give preference to the stepping LWP in
4545 all-stop mode. Adjust comments.
4546 (ignore_event): New function.
4547 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4548 references to cancel_breakpoints. Adjust to renames. Also give
4549 equal priority to all LWPs that have had events in non-stop mode.
4550 If reporting a software breakpoint event, unadjust the LWP's PC.
4551 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4552 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4554 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4555 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4556 (linux_stopped_by_watchpoint): Adjust.
4557 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4558 * linux-low.h (enum lwp_stop_reason): New.
4559 (struct lwp_info) <stop_pc>: Adjust comment.
4560 <stopped_by_watchpoint>: Delete field.
4561 <stop_reason>: New field.
4562 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4563 * mem-break.c (software_breakpoint_inserted_here)
4564 (hardware_breakpoint_inserted_here): New function.
4565 * mem-break.h (software_breakpoint_inserted_here)
4566 (hardware_breakpoint_inserted_here): Declare.
4567 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4568 (cancel_breakpoints): Delete.
4569 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4570 (upload_fast_traceframes): Remove references to
4573 2015-01-09 Pedro Alves <palves@redhat.com>
4575 * thread-db.c (find_new_threads_callback): Ignore thread if the
4576 kernel thread ID is -1.
4578 2015-01-09 Pedro Alves <palves@redhat.com>
4580 * linux-low.c (linux_attach_fail_reason_string): Move to
4581 nat/linux-ptrace.c, and rename.
4582 (linux_attach_lwp): Update comment.
4583 (attach_proc_task_lwp_callback): New function.
4584 (linux_attach): Adjust to rename and use
4585 linux_proc_attach_tgid_threads.
4586 (linux_attach_fail_reason_string): Delete declaration.
4588 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4590 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4591 * server.c (gdbserver_version): Likewise.
4593 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4595 * remote-utils.c: Include ctype.h.
4596 (input_interrupt): Explicitly handle the case when the char
4597 received is the NUL byte. Improve the printing of non-ASCII
4600 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4602 * linux-low.c (linux_low_filter_event): Update call to
4603 linux_enable_event_reporting following the addition of
4604 a new parameter to that function.
4606 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4609 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4610 (AARCH64_FPCR_REGNO): Likewise.
4611 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4612 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4613 (aarch64_store_fpregset): Likewise.
4615 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4617 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4618 Remove FIXME comment about assumption about N.
4620 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4622 * configure.ac: If large-file support is disabled in GDBserver,
4623 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4624 * configure: Regenerate.
4626 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4628 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4629 warning upon ENODATA from ptrace.
4630 * linux-s390-low.c (s390_store_tdb): New.
4631 (s390_regsets): Add regset for NT_S390_TDB.
4633 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4635 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4636 without a fill_function.
4637 * linux-s390-low.c (s390_fill_last_break): Remove.
4638 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4639 (s390_arch_setup): Use regset's size instead of fill_function for
4642 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4644 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4645 the regset's store function when ptrace returned an error.
4646 * regcache.c (get_thread_regcache): Invalidate register cache
4647 before fetching inferior's registers.
4649 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4651 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4652 while-loop as for-loop.
4653 (regsets_store_inferior_registers): Likewise.
4655 2014-11-28 Yao Qi <yao@codesourcery.com>
4657 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4658 * config.in, configure: Re-generate.
4659 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4662 2014-11-21 Yao Qi <yao@codesourcery.com>
4664 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4665 (AC_CHECK_HEADERS): Remove malloc.h.
4666 * configure: Re-generated.
4667 * config.in: Re-generated.
4668 * server.h: Don't include alloca.h and malloc.h.
4669 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4670 Don't include malloc.h.
4672 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4674 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4675 corresponding ERRNO check in same block.
4677 2014-11-12 Pedro Alves <palves@redhat.com>
4679 * server.c (cont_thread): Update comment.
4680 (start_inferior, attach_inferior): No longer clear cont_thread.
4681 (handle_v_cont): No longer set cont_thread.
4682 (captured_main): Clear cont_thread each time a GDB connects.
4684 2014-11-12 Pedro Alves <palves@redhat.com>
4686 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4687 thread, and don't resume all threads if the Hc thread has exited.
4689 2014-11-12 Pedro Alves <palves@redhat.com>
4691 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4692 the process group instead of to a specific LWP.
4694 2014-10-15 Pedro Alves <palves@redhat.com>
4697 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4699 (arm_set_thread_context): Delete.
4700 (the_low_target): Adjust.
4701 * win32-i386-low.c (debug_registers_changed)
4702 (debug_registers_used): Delete.
4703 (update_debug_registers_callback): New function.
4704 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4705 needing to update their debug registers.
4706 (win32_get_current_dr): New function.
4707 (x86_dr_low_get_addr, x86_dr_low_get_control)
4708 (x86_dr_low_get_status): Fetch the debug register from the thread
4710 (i386_initial_stuff): Adjust.
4711 (i386_get_thread_context): Remove current_event parameter. Don't
4712 clear debug_registers_changed nor copy DR values to
4714 (i386_set_thread_context): Delete.
4715 (i386_prepare_to_resume): New function.
4716 (i386_thread_added): Mark the thread as needing to update irs
4718 (the_low_target): Remove i386_set_thread_context and install
4719 i386_prepare_to_resume.
4720 * win32-low.c (win32_get_thread_context): Adjust.
4721 (win32_set_thread_context): Use SetThreadContext
4723 (win32_prepare_to_resume): New function.
4724 (win32_require_context): New function, factored out from ...
4725 (thread_rec): ... this.
4726 (continue_one_thread): Call win32_prepare_to_resume on each thread
4727 we're about to continue.
4728 (win32_resume): Call win32_prepare_to_resume on the event thread.
4729 * win32-low.h (struct win32_thread_info)
4730 <debug_registers_changed>: New field.
4731 (struct win32_target_ops): Change prototype of set_thread_context,
4732 delete set_thread_context and add prepare_to_resume.
4733 (win32_require_context): New declaration.
4735 2014-10-08 Gary Benson <gbenson@redhat.com>
4737 * server.h: Do not include common-exceptions.h.
4739 2014-10-08 Gary Benson <gbenson@redhat.com>
4741 * server.h: Do not include cleanups.h.
4743 2014-09-30 James Hogan <james.hogan@imgtec.com>
4745 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4748 2014-09-23 Yao Qi <yao@codesourcery.com>
4750 * linux-low.c (lp_status_maybe_breakpoint): New function.
4751 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4752 (count_events_callback): Likewise.
4753 (select_event_lwp_callback): Likewise.
4754 (cancel_breakpoints_callback): Likewise.
4756 2014-09-19 Don Breazeal <donb@codesourcery.com>
4758 * linux-low.c (handle_extended_wait): Call
4759 linux_ptrace_get_extended_event.
4760 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4761 linux_is_extended_waitstatus.
4763 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4765 * Makefile.in (CPPFLAGS): Define.
4766 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4767 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4769 2014-09-16 Gary Benson <gbenson@redhat.com>
4771 * inferiors.h (current_inferior): Renamed as...
4772 (current_thread): New variable. All uses updated.
4773 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4774 (maybe_move_out_of_jump_pad): Likewise.
4775 (cancel_breakpoint): Likewise.
4776 (linux_low_filter_event): Likewise.
4777 (wait_for_sigstop): Likewise.
4778 (linux_resume_one_lwp): Likewise.
4779 (need_step_over_p): Likewise.
4780 (start_step_over): Likewise.
4781 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4782 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4783 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4784 and save_inferior as saved_thread.
4785 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4787 (regcache_invalidate_thread): Likewise.
4788 * remote-utils.c (prepare_resume_reply): Likewise.
4789 * thread-db.c (thread_db_get_tls_address): Likewise.
4790 (disable_thread_event_reporting): Likewise.
4791 (remove_thread_event_breakpoints): Likewise.
4792 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4794 * target.h (set_desired_inferior): Renamed as...
4795 (set_desired_thread): New declaration. All uses updated.
4796 * server.c (myresume): Updated comment to reference thread instead
4798 (handle_serial_event): Likewise.
4799 (handle_target_event): Likewise.
4801 2014-09-12 Tom Tromey <tromey@redhat.com>
4802 Gary Benson <gbenson@redhat.com>
4804 * regcache.h: Include common-regcache.h.
4805 (regcache_read_pc): Don't declare.
4806 * regcache.c (get_thread_regcache_for_ptid): New function.
4808 2014-09-11 Tom Tromey <tromey@redhat.com>
4809 Gary Benson <gbenson@redhat.com>
4811 * symbol.c: New file.
4812 * Makefile.in (SFILES): Add symbol.c.
4813 (OBS): Add symbol.o.
4815 2014-09-11 Gary Benson <gbenson@redhat.com>
4817 * target.c (target_stop_ptid, target_continue_ptid): New
4820 2014-09-11 Tom Tromey <tromey@redhat.com>
4821 Gary Benson <gbenson@redhat.com>
4823 * target.h: Include target/target.h.
4824 * target.c (target_read_memory, target_read_uint32)
4825 (target_write_memory): New functions.
4827 2014-09-11 Gary Benson <gbenson@redhat.com>
4829 * server.h (debug_hw_points): Don't declare.
4830 * server.c (debug_hw_points): Don't define. Replace all uses
4831 with show_debug_regs.
4832 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4833 all uses with show_debug_regs.
4835 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4837 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4838 endianness into account.
4839 (ppc_supply_ptrace_register): Likewise.
4841 2014-09-03 James Hogan <james.hogan@imgtec.com>
4843 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4844 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4846 2014-09-03 Gary Benson <gbenson@redhat.com>
4848 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4849 ALL_DEBUG_ADDRESS_REGISTERS.
4851 2014-09-02 Gary Benson <gbenson@redhat.com>
4853 * i386-low.h: Renamed as...
4854 * x86-low.h: New file. All type, function and variable name
4855 prefixes changed from "i386_" to "x86_". All references updated.
4856 * i386-low.c: Renamed as...
4857 * x86-low.c: New file. All type, function and variable name
4858 prefixes changed from "i386_" to "x86_". All references updated.
4860 2014-09-02 Gary Benson <gbenson@redhat.com>
4862 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4863 (x86_linux_new_thread): Likewise.
4865 2014-08-29 Gary Benson <gbenson@redhat.com>
4867 * server.h (setjmp.h): Do not include.
4868 (toplevel): Do not declare.
4869 (common-exceptions.h): Include.
4870 (cleanups.h): Likewise.
4871 * server.c (toplevel): Do not define.
4872 (exit_code): New static global.
4873 (detach_or_kill_for_exit_cleanup): New function.
4874 (main): New function. Original main renamed to...
4875 (captured_main): New function.
4876 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4878 2014-08-29 Gary Benson <gbenson@redhat.com>
4880 * Makefile.in (SFILES): Add common/common-exceptions.c.
4881 (OBS): Add common-exceptions.o.
4882 (common-exceptions.o): New rule.
4883 * utils.c (prepare_to_throw_exception): New function.
4885 2014-08-29 Gary Benson <gbenson@redhat.com>
4887 * config.in: Regenerate.
4888 * configure: Likewise.
4890 2014-08-29 Gary Benson <gbenson@redhat.com>
4892 * Makefile.in (SFILES): Add common/cleanups.c.
4894 (cleanups.o): New rule.
4896 2014-08-29 Gary Benson <gbenson@redhat.com>
4898 * utils.c (internal_vwarning): New function.
4900 2014-08-28 Gary Benson <gbenson@redhat.com>
4902 * utils.h (fatal): Remove declaration.
4903 * utils.c (fatal): Remove function.
4905 2014-08-28 Gary Benson <gbenson@redhat.com>
4907 * tracepoint.c (gdb_agent_init): Replace fatal with
4909 (initialize_tracepoint): Likewise.
4911 2014-08-28 Gary Benson <gbenson@redhat.com>
4913 * remote-utils.c (remote_prepare): Replace fatal with error.
4915 2014-08-28 Gary Benson <gbenson@redhat.com>
4917 * linux-low.c (linux_async): Replace fatal with warning.
4919 (linux_start_non_stop): Return -1 if linux_async failed.
4921 2014-08-28 Gary Benson <gbenson@redhat.com>
4923 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4925 (i386_dr_low_get_addr): Remove vague comment.
4926 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4929 2014-08-28 Gary Benson <gbenson@redhat.com>
4931 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4932 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4934 (linux_resume_one_lwp): Likewise.
4935 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4937 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4938 with internal_error.
4939 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4940 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4941 (find_register_by_name): Replace fatal with internal_error.
4942 (find_regno): Likewise.
4943 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4944 * thread-db.c (thread_db_create_event): Likewise.
4945 (thread_db_load_search): Likewise.
4946 (try_thread_db_load_1): Likewise.
4947 * tracepoint.c (get_jump_space_head): Replace fatal with
4949 (claim_trampoline_space): Likewise.
4950 (have_fast_tracepoint_trampoline_buffer): Likewise.
4951 (cmd_qtstart): Likewise.
4952 (stop_tracing): Likewise.
4953 (fast_tracepoint_collecting): Likewise.
4954 (target_malloc): Likewise.
4955 (download_tracepoint): Likewise.
4956 (download_trace_state_variables): Replace check with gdb_assert.
4957 (upload_fast_traceframes): Replace fatal with internal_error.
4959 2014-08-19 Tom Tromey <tromey@redhat.com>
4960 Gary Benson <gbenson@redhat.com>
4962 * Makefile.in (SFILES): Add common/common-debug.c.
4963 (OBS): Add common-debug.o.
4964 (common-debug.o): New rule.
4965 * debug.h (debug_printf): Don't declare.
4966 * debug.c (debug_printf): Renamed and rewritten as...
4967 (debug_vprintf): New function.
4969 2014-08-19 Gary Benson <gbenson@redhat.com>
4971 * utils.h: Do not include print-utils.h.
4973 2014-08-19 Tom Tromey <tromey@redhat.com>
4974 Gary Benson <gbenson@redhat.com>
4976 * server.h: Add static assertion.
4977 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4979 2014-08-19 Tom Tromey <tromey@redhat.com>
4980 Gary Benson <gbenson@redhat.com>
4982 * Makefile.in (SFILES): Add common/errors.c.
4983 (OBS): Add errors.o.
4984 (IPA_OBS): Add errors-ipa.o.
4985 (errors.o): New rule.
4986 (errors-ipa.o): Likewise.
4987 * utils.h (perror_with_name, error, warning): Don't declare.
4988 * utils.c (warning): Renamed and rewritten as...
4989 (vwarning): New function.
4990 (error): Renamed and rewritten as...
4991 (verror): New function.
4992 (internal_error): Renamed and rewritten as...
4993 (internal_verror): New function.
4995 2014-08-07 Gary Benson <gbenson@redhat.com>
4997 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4998 * configure: Regenerate.
4999 * config.in: Likewise.
5000 * server.h: Do not include errno.h.
5001 * event-loop.c: Likewise.
5002 * hostio-errno.c: Likewise.
5003 * linux-low.c: Likewise.
5004 * remote-utils.c: Likewise.
5005 * spu-low.c: Likewise.
5006 * utils.c: Likewise.
5007 * gdbreplay.c: Unconditionally include errno.h.
5009 2014-08-07 Gary Benson <gbenson@redhat.com>
5011 * server.h: Do not include string.h.
5012 * event-loop.c: Likewise.
5013 * linux-low.c: Likewise.
5014 * regcache.c: Likewise.
5015 * remote-utils.c: Likewise.
5016 * spu-low.c: Likewise.
5017 * utils.c: Likewise.
5019 2014-08-07 Gary Benson <gbenson@redhat.com>
5021 * server.h: Do not include gdb_assert.h.
5023 2014-08-07 Gary Benson <gbenson@redhat.com>
5025 * server.h: Do not include common-utils.h.
5027 2014-08-07 Gary Benson <gbenson@redhat.com>
5029 * server.h: Do not include ptid.h.
5030 * notif.h: Likewise.
5032 2014-08-07 Gary Benson <gbenson@redhat.com>
5034 * server.h: Do not include gdb_locale.h.
5036 2014-08-07 Gary Benson <gbenson@redhat.com>
5038 * server.h: Do not include gdb/signals.h.
5039 * win32-low.c: Likewise.
5041 2014-08-07 Gary Benson <gbenson@redhat.com>
5043 * server.h: Do not include pathmax.h.
5045 2014-08-07 Gary Benson <gbenson@redhat.com>
5047 * server.h: Do not include libiberty.h.
5048 * linux-bfin-low.c: Likewise.
5050 2014-08-07 Gary Benson <gbenson@redhat.com>
5052 * server.h: Do not include ansidecl.h.
5054 2014-08-07 Gary Benson <gbenson@redhat.com>
5056 * linux-x86-low.c: Do not include stddef.h.
5057 * lynx-ppc-low.c: Likewise.
5058 * tracepoint.c: Likewise.
5060 2014-08-07 Gary Benson <gbenson@redhat.com>
5062 * server.h: Do not include stdarg.h.
5063 * nto-low.c: Likewise.
5065 2014-08-07 Gary Benson <gbenson@redhat.com>
5067 * server.h: Do not include stdlib.h.
5068 * inferiors.c: Likewise.
5069 * linux-low.c: Likewise.
5070 * regcache.c: Likewise.
5071 * spu-low.c: Likewise.
5072 * tracepoint.c: Likewise.
5073 * utils.c: Likewise.
5075 2014-08-07 Gary Benson <gbenson@redhat.com>
5077 * server.h: Do not include stdio.h.
5078 * linux-low.c: Likewise.
5079 * remote-utils.c: Likewise.
5080 * spu-low.c: Likewise.
5081 * utils.c: Likewise.
5082 * wincecompat.c: Likewise.
5084 2014-08-06 Gary Benson <gbenson@redhat.com>
5086 * regcache.c (init_register_cache): Move conditionals inside if.
5088 2014-08-06 Gary Benson <gbenson@redhat.com>
5090 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5092 2014-07-31 Gary Benson <gbenson@redhat.com>
5094 * ax.h: Do not include server.h.
5095 * gdbthread.h: Likewise.
5096 * lynx-low.h: Likewise.
5097 * notif.h: Likewise.
5099 2014-07-30 Gary Benson <gbenson@redhat.com>
5101 * server.h: Include common-defs.h.
5102 Do not include config.h or build-gnulib-gdbserver/config.h.
5104 2014-07-30 Gary Benson <gbenson@redhat.com>
5106 * hostio-errno.c: Move server.h to top of includes list.
5107 * inferiors.c: Likewise.
5108 * linux-x86-low.c: Likewise.
5109 * notif.c: Include server.h.
5111 2014-07-24 Tom Tromey <tromey@redhat.com>
5112 Gary Benson <gbenson@redhat.com>
5114 * server.h (CORE_ADDR): Now unsigned.
5116 2014-07-16 Pedro Alves <palves@redhat.com>
5118 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5120 2014-07-15 Pedro Alves <palves@redhat.com>
5122 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5125 2014-07-11 Pedro Alves <palves@redhat.com>
5127 * linux-low.c (kill_wait_lwp): New function, based on
5128 kill_one_lwp_callback, but use my_waitpid directly.
5129 (kill_one_lwp_callback, linux_kill): Use it.
5131 2014-06-23 Pedro Alves <palves@redhat.com>
5133 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5134 before setting DR0..DR3.
5136 2014-06-20 Gary Benson <gbenson@redhat.com>
5138 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5139 * configure: Regenerated.
5140 * config.in: Likewise.
5142 2014-06-20 Gary Benson <gbenson@redhat.com>
5144 * Makefile.in (SFILES): Update locations for files moved
5146 (object file files): Reordered.
5148 2014-06-20 Gary Benson <gbenson@redhat.com>
5150 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5151 (i386_dr_low_set_addr): Likewise.
5152 (i386_dr_low_get_addr): Likewise.
5153 (i386_dr_low_can_set_control): Likewise.
5154 (i386_dr_low_set_control): Likewise.
5155 (i386_dr_low_get_control): Likewise.
5156 (i386_dr_low_get_status): Likewise.
5157 (i386_get_debug_register_length): Likewise.
5158 * linux-x86-low.c (i386_dr_low_set_addr):
5159 Changed signature. Made static.
5160 (i386_dr_low_get_addr): Likewise.
5161 (i386_dr_low_set_control): Likewise.
5162 (i386_dr_low_get_control): Likewise.
5163 (i386_dr_low_get_status): Likewise.
5164 (i386_dr_low): New global variable.
5165 * win32-i386-low.c (i386_dr_low_set_addr):
5166 Changed signature. Made static.
5167 (i386_dr_low_get_addr): Likewise.
5168 (i386_dr_low_set_control): Likewise.
5169 (i386_dr_low_get_control): Likewise.
5170 (i386_dr_low_get_status): Likewise.
5171 (i386_dr_low): New global variable.
5173 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5175 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5176 * Makefile.in (AR, AR_FLAGS): Define.
5177 * configure: Regenerate.
5179 2014-06-19 Gary Benson <gbenson@redhat.com>
5181 * Makefile.in (i386-dregs.o): New rule.
5182 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5183 * i386-low.c (target.h): Remove include.
5184 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5185 (DR_CONTROL_SHIFT): Likewise.
5186 (DR_CONTROL_SIZE): Likewise.
5187 (DR_RW_EXECUTE): Likewise.
5188 (DR_RW_WRITE): Likewise.
5189 (DR_RW_READ): Likewise.
5190 (DR_RW_IORW): Likewise.
5191 (DR_LEN_1): Likewise.
5192 (DR_LEN_2): Likewise.
5193 (DR_LEN_4): Likewise.
5194 (DR_LEN_8): Likewise.
5195 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5196 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5197 (DR_ENABLE_SIZE): Likewise.
5198 (DR_LOCAL_SLOWDOWN): Likewise.
5199 (DR_GLOBAL_SLOWDOWN): Likewise.
5200 (DR_CONTROL_RESERVED): Likewise.
5201 (I386_DR_CONTROL_MASK): Likewise.
5202 (I386_DR_VACANT): Likewise.
5203 (I386_DR_LOCAL_ENABLE): Likewise.
5204 (I386_DR_GLOBAL_ENABLE): Likewise.
5205 (I386_DR_DISABLE): Likewise.
5206 (I386_DR_SET_RW_LEN): Likewise.
5207 (I386_DR_GET_RW_LEN): Likewise.
5208 (I386_DR_WATCH_HIT): Likewise.
5209 (i386_wp_op_t): Likewise.
5210 (i386_show_dr): Likewise.
5211 (i386_length_and_rw_bits): Likewise.
5212 (i386_insert_aligned_watchpoint): Likewise.
5213 (i386_remove_aligned_watchpoint): Likewise.
5214 (i386_handle_nonaligned_watchpoint): Likewise.
5215 i386_update_inferior_debug_regs(): Likewise.
5216 (i386_dr_insert_watchpoint): Likewise.
5217 (i386_dr_remove_watchpoint): Likewise.
5218 (i386_dr_region_ok_for_watchpoint): Likewise.
5219 (i386_dr_stopped_data_address): Likewise.
5220 (i386_dr_stopped_by_watchpoint): Likewise.
5222 2014-06-19 Gary Benson <gbenson@redhat.com>
5224 * i386-low.c (i386_dr_show): Renamed to
5225 i386_show_dr and made static. All uses updated.
5226 (i386_dr_length_and_rw_bits): Renamed to
5227 i386_length_and_rw_bits and made static.
5229 (i386_dr_insert_aligned_watchpoint): Renamed to
5230 i386_insert_aligned_watchpoint and made static.
5232 (i386_dr_remove_aligned_watchpoint): Renamed to
5233 i386_remove_aligned_watchpoint and made static.
5235 (i386_dr_update_inferior_debug_regs): Renamed to
5236 i386_update_inferior_debug_regs and made static.
5239 2014-06-18 Gary Benson <gbenson@redhat.com>
5241 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5242 (i386_dr_low_can_set_control): Likewise.
5243 (i386_get_debug_register_length): Likewise.
5244 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5245 (i386_dr_low_can_set_control): Likewise.
5246 (i386_get_debug_register_length): Likewise.
5248 2014-06-17 Gary Benson <gbenson@redhat.com>
5250 * i386-low.h (i386-dregs.h): New include.
5251 (DR_FIRSTADDR): Now in i386-dregs.h.
5252 (DR_LASTADDR): Likewise.
5253 (DR_NADDR): Likewise.
5254 (DR_STATUS): Likewise.
5255 (DR_CONTROL): Likewise.
5256 (i386_debug_reg_state): Likewise.
5257 (i386_dr_insert_watchpoint): Likewise.
5258 (i386_dr_remove_watchpoint): Likewise.
5259 (i386_dr_region_ok_for_watchpoint): Likewise.
5260 (i386_dr_stopped_data_address): Likewise.
5261 (i386_dr_stopped_by_watchpoint): Likewise.
5262 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5264 2014-06-18 Gary Benson <gbenson@redhat.com>
5266 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5267 i386_dr_insert_watchpoint.
5268 (i386_low_remove_watchpoint): Renamed to
5269 i386_dr_remove_watchpoint.
5270 (i386_low_region_ok_for_watchpoint): Renamed to
5271 i386_dr_region_ok_for_watchpoint.
5272 (i386_low_stopped_data_address): Renamed to
5273 i386_dr_stopped_data_address.
5274 (i386_low_stopped_by_watchpoint): Renamed to
5275 i386_dr_stopped_by_watchpoint.
5276 * i386-low.c (i386_show_dr): Renamed to
5277 i386_dr_show and made nonstatic. All uses updated.
5278 (i386_length_and_rw_bits): Renamed to
5279 i386_dr_length_and_rw_bits and made nonstatic.
5281 (i386_insert_aligned_watchpoint): Renamed to
5282 i386_dr_insert_aligned_watchpoint and made nonstatic.
5284 (i386_remove_aligned_watchpoint): Renamed to
5285 i386_dr_remove_aligned_watchpoint and made nonstatic.
5287 (i386_update_inferior_debug_regs): Renamed to
5288 i386_dr_update_inferior_debug_regs and made nonstatic.
5290 (i386_low_insert_watchpoint): Renamed to
5291 i386_dr_insert_watchpoint. All uses updated.
5292 (i386_low_remove_watchpoint): Renamed to
5293 i386_dr_remove_watchpoint. All uses updated.
5294 (i386_low_region_ok_for_watchpoint): Renamed to
5295 i386_dr_region_ok_for_watchpoint. All uses updated.
5296 (i386_low_stopped_data_address): Renamed to
5297 i386_dr_stopped_data_address. All uses updated.
5298 (i386_low_stopped_by_watchpoint): Renamed to
5299 i386_dr_stopped_by_watchpoint. All uses updated.
5301 2014-06-18 Gary Benson <gbenson@redhat.com>
5303 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5304 (i386_dr_low_can_set_control): Likewise.
5305 (i386_insert_aligned_watchpoint): New check.
5307 2014-06-18 Gary Benson <gbenson@redhat.com>
5309 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5312 2014-06-18 Gary Benson <gbenson@redhat.com>
5314 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5315 instead of fatal and error.
5316 (i386_handle_nonaligned_watchpoint): Likewise.
5318 2014-06-18 Gary Benson <gbenson@redhat.com>
5320 * i386-low.c (i386_get_debug_register_length): New macro.
5321 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5322 (i386_show_dr): Use debug_printf instead of fprintf. Use
5323 phex to format values.
5325 2014-06-18 Gary Benson <gbenson@redhat.com>
5327 * i386-low.h: Comment changes.
5328 * i386-low.c: Likewise.
5330 2014-06-18 Gary Benson <gbenson@redhat.com>
5332 * i386-low.c: Whitespace changes.
5334 2014-06-12 Tom Tromey <tromey@redhat.com>
5336 * utils.c (freeargv): Remove.
5338 2014-06-12 Tom Tromey <tromey@redhat.com>
5340 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5341 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5342 (parse_debug_format_options): Likewise.
5343 (gdbserver_usage): Likewise.
5344 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5345 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5346 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5348 ($(LIBGNU)): Depend on libiberty.
5349 (all-lib): Recurse into all subdirs.
5350 (install-only): Invoke "install" target in subdirs.
5351 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5353 * configure: Rebuild.
5354 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5355 for vasprintf, vsnprintf, or gettimeofday.
5356 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5359 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5361 * development.sh: Delete.
5362 * Makefile.in (config.status): Adjust dependency on development.sh.
5363 * configure.ac: Adjust development.sh source call.
5364 * configure: Regenerate.
5366 2014-06-02 Pedro Alves <palves@redhat.com>
5368 * ax.c (gdb_free_agent_expr): New function.
5369 * ax.h (gdb_free_agent_expr): New declaration.
5370 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5372 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5374 (clear_breakpoint_conditions_and_commands): New function.
5375 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5376 (clear_breakpoint_conditions_and_commands): New declaration.
5378 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5380 * linux-aarch64-low.c (asm/ptrace.h): Include.
5382 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5384 Fix TLS access for -static -pthread.
5385 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5386 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5387 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5389 2014-05-20 Pedro Alves <palves@redhat.com>
5391 * linux-aarch64-low.c (aarch64_insert_point)
5392 (aarch64_remove_point): No longer check whether the type is
5393 supported here. Adjust to new interface.
5394 (the_low_target): Install aarch64_supports_z_point_type as
5395 supports_z_point_type method.
5396 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5397 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5398 instead of a Z packet char. Adjust.
5399 (arm_supports_z_point_type): New function.
5400 (arm_insert_point, arm_remove_point): Adjust to new interface.
5401 (the_low_target): Install arm_supports_z_point_type.
5402 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5403 (cris_insert_point, cris_remove_point): Adjust to new interface.
5404 Don't check whether the type is supported here.
5405 (the_low_target): Install cris_supports_z_point_type.
5406 * linux-low.c (linux_supports_z_point_type): New function.
5407 (linux_insert_point, linux_remove_point): Adjust to new interface.
5408 * linux-low.h (struct linux_target_ops) <insert_point,
5409 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5410 raw_breakpoint pointer parameter.
5411 <supports_z_point_type>: New method.
5412 * linux-mips-low.c (mips_supports_z_point_type): New function.
5413 (mips_insert_point, mips_remove_point): Adjust to new interface.
5414 Use mips_supports_z_point_type.
5415 (the_low_target): Install mips_supports_z_point_type.
5416 * linux-ppc-low.c (the_low_target): Install NULL as
5417 supports_z_point_type method.
5418 * linux-s390-low.c (the_low_target): Install NULL as
5419 supports_z_point_type method.
5420 * linux-sparc-low.c (the_low_target): Install NULL as
5421 supports_z_point_type method.
5422 * linux-x86-low.c (x86_supports_z_point_type): New function.
5423 (x86_insert_point): Adjust to new insert_point interface. Use
5424 insert_memory_breakpoint. Adjust to new
5425 i386_low_insert_watchpoint interface.
5426 (x86_remove_point): Adjust to remove_point interface. Use
5427 remove_memory_breakpoint. Adjust to new
5428 i386_low_remove_watchpoint interface.
5429 (the_low_target): Install x86_supports_z_point_type.
5430 * lynx-low.c (lynx_target_ops): Install NULL as
5431 supports_z_point_type callback.
5432 * nto-low.c (nto_supports_z_point_type): New.
5433 (nto_insert_point, nto_remove_point): Adjust to new interface.
5434 (nto_target_ops): Install nto_supports_z_point_type.
5435 * mem-break.c: Adjust intro comment.
5436 (struct raw_breakpoint) <raw_type, size>: New fields.
5437 <inserted>: Update comment.
5438 <shlib_disabled>: Delete field.
5439 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5440 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5441 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5442 (raw_bkpt_type_to_target_hw_bp_type): New function.
5443 (find_enabled_raw_code_breakpoint_at): New function.
5444 (find_raw_breakpoint_at): New type and size parameters. Use them.
5445 (insert_memory_breakpoint): New function, based off
5446 set_raw_breakpoint_at.
5447 (remove_memory_breakpoint): New function.
5448 (set_raw_breakpoint_at): Reimplement.
5449 (set_breakpoint): New, based on set_breakpoint_at.
5450 (set_breakpoint_at): Reimplement.
5451 (delete_raw_breakpoint): Go through the_target->remove_point
5452 instead of assuming memory breakpoints.
5453 (find_gdb_breakpoint_at): Delete.
5454 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5455 (find_gdb_breakpoint): New function.
5456 (set_gdb_breakpoint_at): Delete.
5457 (z_type_supported): New function.
5458 (set_gdb_breakpoint_1): New function, loosely based off
5459 set_gdb_breakpoint_at.
5460 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5461 (delete_gdb_breakpoint_at): Delete.
5462 (delete_gdb_breakpoint_1): New function, loosely based off
5463 delete_gdb_breakpoint_at.
5464 (delete_gdb_breakpoint): New function.
5465 (clear_gdb_breakpoint_conditions): Rename to ...
5466 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5468 (add_condition_to_breakpoint): Make static.
5469 (add_breakpoint_condition): Take a struct breakpoint pointer
5470 instead of an address. Adjust.
5471 (gdb_condition_true_at_breakpoint): Rename to ...
5472 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5474 (gdb_condition_true_at_breakpoint): Reimplement.
5475 (add_breakpoint_commands): Take a struct breakpoint pointer
5476 instead of an address. Adjust.
5477 (gdb_no_commands_at_breakpoint): Rename to ...
5478 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5479 parameter. Return true if no breakpoint was found. Change debug
5481 (gdb_no_commands_at_breakpoint): Reimplement.
5482 (run_breakpoint_commands): Rename to ...
5483 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5484 and change return type to boolean.
5485 (run_breakpoint_commands): New function.
5486 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5487 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5488 breakpoint. Go through the_target->remove_point instead of
5489 assuming memory breakpoint.
5490 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5491 software and hardware breakpoints.
5492 (reinsert_raw_breakpoint): Go through the_target->insert_point
5493 instead of assuming memory breakpoint.
5494 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5495 software and hardware breakpoints.
5496 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5497 Check both software and hardware breakpoints.
5498 (validate_inserted_breakpoint): Assert the breakpoint is a
5499 software breakpoint. Set the inserted flag to -1 instead of
5500 setting shlib_disabled.
5501 (delete_disabled_breakpoints): Adjust.
5502 (validate_breakpoints): Only validate software breakpoints.
5503 Adjust to inserted flag change.
5504 (check_mem_read, check_mem_write): Skip breakpoint types other
5505 than software breakpoints. Adjust to inserted flag change.
5506 * mem-break.h (enum raw_bkpt_type): New enum.
5507 (raw_breakpoint, struct process_info): Forward declare.
5508 (Z_packet_to_target_hw_bp_type): Delete declaration.
5509 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5510 (set_gdb_breakpoint, delete_gdb_breakpoint)
5511 (clear_breakpoint_conditions): New declarations.
5512 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5513 (breakpoint_inserted_here): Update comment.
5514 (add_breakpoint_condition, add_breakpoint_commands): Replace
5515 address parameter with a breakpoint pointer parameter.
5516 (gdb_breakpoint_here): Update comment.
5517 (delete_gdb_breakpoint_at): Delete.
5518 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5519 * server.c (process_point_options): Take a struct breakpoint
5520 pointer instead of an address. Adjust.
5521 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5522 delete_gdb_breakpoint.
5523 * spu-low.c (spu_target_ops): Install NULL as
5524 supports_z_point_type method.
5525 * target.h: Include mem-break.h.
5526 (struct target_ops) <prepare_to_access_memory>: Update comment.
5527 <supports_z_point_type>: New field.
5528 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5529 instead of a char. Also take a raw breakpoint pointer.
5530 * win32-arm-low.c (the_low_target): Install NULL as
5531 supports_z_point_type.
5532 * win32-i386-low.c (i386_supports_z_point_type): New function.
5533 (i386_insert_point, i386_remove_point): Adjust to new interface.
5534 (the_low_target): Install i386_supports_z_point_type.
5535 * win32-low.c (win32_supports_z_point_type): New function.
5536 (win32_insert_point, win32_remove_point): Adjust to new interface.
5537 (win32_target_ops): Install win32_supports_z_point_type.
5538 * win32-low.h (struct win32_target_ops):
5539 <supports_z_point_type>: New method.
5540 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5541 instead of a char. Also take a raw breakpoint pointer.
5543 2014-05-20 Pedro Alves <palves@redhat.com>
5545 * mem-break.h: Include break-common.h.
5546 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5547 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5548 (Z_packet_to_target_hw_bp_type): New declaration.
5549 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5550 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5551 (Z_PACKET_ACCESS_WP): Delete macros.
5552 (Z_packet_to_hw_type): Delete function.
5553 * i386-low.h: Don't include break-common.h here.
5554 (Z_packet_to_hw_type): Delete declaration.
5555 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5556 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5557 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5558 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5559 * linux-aarch64-low.c: Don't include break-common.h here.
5560 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5561 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5562 (Z_packet_to_target_hw_bp_type): Delete function.
5563 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5565 (mips_insert_point, mips_remove_point): Use
5566 Z_packet_to_target_hw_bp_type.
5568 2014-05-20 Pedro Alves <palves@redhat.com>
5570 * linux-aarch64-low.c: Include break-common.h.
5571 (enum target_point_type): Delete.
5572 (Z_packet_to_point_type): Rename to ...
5573 (Z_packet_to_target_hw_bp_type): ... this, and return a
5574 target_hw_bp_type instead.
5575 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5576 instead of an enum target_point_type.
5577 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5579 (aarch64_dr_state_insert_one_point)
5580 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5581 (aarch64_handle_aligned_watchpoint)
5582 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5583 Take an enum target_hw_bp_type instead of an enum
5585 (aarch64_supports_z_point_type): New function.
5586 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5587 use Z_packet_to_target_hw_bp_type.
5589 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5591 * configure.ac: Only use -Werror by default when DEVELOPMENT
5593 * configure: Regenerate.
5595 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5597 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5598 * linux-x86-low.c (X86_64_USER_REGS): New.
5599 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5601 2014-04-28 Yao Qi <yao@codesourcery.com>
5603 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5606 2014-04-25 Pedro Alves <palves@redhat.com>
5609 * linux-low.c (linux_attach_fail_reason_string): New function.
5610 (linux_attach_lwp): Delete.
5611 (linux_attach_lwp_1): Rename to ...
5612 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5613 argument. Remove "initial" parameter. Return int instead of
5614 void. Don't error or warn here.
5615 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5616 failure to attach to the tgid. Call warning when failing to
5618 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5619 argument. Remove "initial" parameter. Return int instead of
5620 void. Don't error or warn here.
5621 (linux_attach_fail_reason_string): New declaration.
5622 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5623 interface change. Use linux_attach_fail_reason_string.
5625 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5626 Walfred Tedeschi <walfred.tedeschi@intel.com>
5628 * Makefile.in: Added rules to handle new files
5629 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5630 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5631 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5632 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5633 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5634 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5636 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5637 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5638 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5639 i386/x32-avx512.xml.
5640 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5641 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5642 i386/x32-avx512-linux.xml.
5643 * i387-fp.c (num_avx512_k_registers): New constant for number
5645 (num_avx512_zmmh_low_registers): New constant for number of
5646 lower ZMM registers (0-15).
5647 (num_avx512_zmmh_high_registers): New constant for number of
5648 higher ZMM registers (16-31).
5649 (num_avx512_ymmh_registers): New contant for number of higher
5650 YMM registers (ymm16-31 added by avx521 on x86_64).
5651 (num_avx512_xmm_registers): New constant for number of higher
5652 XMM registers (xmm16-31 added by AVX512 on x86_64).
5653 (struct i387_xsave): Add space for AVX512 registers.
5654 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5655 Add code to handle AVX512 registers.
5656 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5657 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5658 prototypei from generated file.
5659 (tdesc_amd64_avx512_linux): Likewise.
5660 (init_registers_x32_avx512_linux): Likewise.
5661 (tdesc_x32_avx512_linux): Likewise.
5662 (init_registers_i386_avx512_linux): Likewise.
5663 (tdesc_i386_avx512_linux): Likewise.
5664 (x86_64_regmap): Add AVX512 registers.
5665 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5667 (initialize_low_arch): Add code to initialize AVX512 registers.
5669 2014-04-23 Pedro Alves <palves@redhat.com>
5671 * mem-break.c (find_gdb_breakpoint_at): Make static.
5672 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5674 2014-04-23 Pedro Alves <palves@redhat.com>
5676 * i386-low.c: Don't include break-common.h here.
5677 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5678 prototype to take target_hw_bp_type as argument instead of a Z
5680 * i386-low.h: Include break-common.h here.
5681 (Z_packet_to_hw_type): Declare.
5682 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5684 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5685 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5686 (x86_remove_point): Convert the packet number to a
5687 target_hw_bp_type before calling i386_low_remove_watchpoint.
5688 * win32-i386-low.c (i386_insert_point): Convert the packet number
5689 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5690 (i386_remove_point): Convert the packet number to a
5691 target_hw_bp_type before calling i386_low_remove_watchpoint.
5693 2014-04-23 Pedro Alves <palves@redhat.com>
5695 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5697 2014-04-10 Pedro Alves <palves@redhat.com>
5699 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5700 Check if the condition or command is NULL before checking if the
5701 breakpoint is known. On success, return true.
5702 * mem-break.h (add_breakpoint_condition): Document return.
5703 (add_breakpoint_commands): Add describing comment.
5704 * server.c (skip_to_semicolon): New function.
5705 (process_point_options): Use it.
5707 2014-04-09 Pedro Alves <palves@redhat.com>
5709 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5712 2014-02-27 Pedro Alves <palves@redhat.com>
5715 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5717 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5719 (last_thread_of_process_p): Take a PID argument instead of a
5721 (linux_wait_for_lwp): Delete.
5722 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5724 (linux_low_filter_event): New function, party factored out from
5725 linux_wait_for_event.
5726 (linux_wait_for_event): Rename to ...
5727 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5728 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5729 sigsuspend. Check for zombie leaders.
5730 (linux_wait_for_event): Reimplement as wrapper around
5731 linux_wait_for_event_filtered.
5732 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5733 a normal or signal exit is seen, it's the whole process exiting.
5734 (wait_for_sigstop): No longer a for_each_inferior callback.
5735 Rewrite on top of linux_wait_for_event_filtered.
5736 (stop_all_lwps): Call wait_for_sigstop directly.
5737 * server.c (resume, handle_target_event): Handle
5738 TARGET_WAITKIND_NO_RESUMED.
5740 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5742 * win32-low.c (psapi_get_dll_name,
5743 * win32_CreateToolhelp32Snapshot): Delete.
5744 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5745 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5747 (handle_load_dll): Add function description.
5748 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5750 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5752 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5754 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5755 base address when calling win32_add_one_solib.
5756 (handle_load_dll): Delete local variable load_addr.
5757 Remove 0x1000 offset applied to DLL base address when calling
5758 win32_add_one_solib.
5759 (handle_unload_dll): Add comment.
5761 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5763 * win32-low.c (win32_add_all_dlls): Renames
5764 win32_ensure_ntdll_loaded. Rewrite function documentation.
5765 Adjust implementation to always load all DLLs.
5766 Add 0x1000 offset to DLL base address when calling
5767 win32_add_one_solib.
5768 (child_initialization_done): New static global.
5769 (do_initial_child_stuff): Set child_initialization_done to
5770 zero during child initialization, and 1 after. Replace call
5771 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5773 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5774 (handle_unload_dll): Add function documentation.
5775 (get_child_debug_event): Ignore load and unload DLL events
5776 during child initialization.
5778 2014-02-20 Doug Evans <dje@google.com>
5780 Remove global all_lwps.
5781 * inferiors.h (ptid_of): Move here from linux-low.h.
5782 (pid_of, lwpid_of): Ditto.
5783 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5784 parameter is a struct thread_info * now.
5785 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5786 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5787 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5789 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5790 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5791 * linux-arm-low.c (update_registers_callback): Update, "entry"
5792 parameter is a struct thread_info * now.
5793 Fetch lwpid from current_inferior directly.
5794 (arm_insert_point): Pass &all_threads to find_inferior instead of
5796 (arm_remove_point): Ditto.
5797 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5798 (arm_prepare_to_resume): Fetch pid from thread.
5799 (arm_read_description): Fetch lwpid from current_inferior directly.
5800 * linux-low.c (all_lwps): Delete.
5801 (delete_lwp): Delete call to remove_inferior.
5802 (handle_extended_wait): Fetch lwpid from thread.
5803 (add_lwp): Don't set lwp->entry.id. Remove call to
5804 add_inferior_to_list.
5805 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5806 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5807 (kill_one_lwp_callback): Ditto.
5808 (linux_kill): Don't dereference NULL pointer.
5809 Fetch ptid,lwpid from thread.
5810 (get_detach_signal): Fetch ptid from thread.
5811 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5812 Simplify call to regcache_invalidate_thread.
5813 (delete_lwp_callback): Update, "entry" parameter is a
5814 struct thread_info * now. Fetch pid from thread.
5815 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5816 (status_pending_p_callback): Update, "entry" parameter is a
5817 struct thread_info * now. Fetch ptid from thread.
5818 (find_lwp_pid): Update, "entry" parameter is a
5819 struct thread_info * now.
5820 (linux_wait_for_lwp): Fetch pid from thread.
5821 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5822 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5823 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5824 (dequeue_one_deferred_signal): Ditto.
5825 (cancel_breakpoint): Fetch ptid from current_inferior.
5826 (linux_wait_for_event): Pass &all_threads to find_inferior,
5827 not &all_lwps. Fetch ptid, lwpid from thread.
5828 (count_events_callback): Update, "entry" parameter is a
5829 struct thread_info * now.
5830 (select_singlestep_lwp_callback): Ditto.
5831 (select_event_lwp_callback): Ditto.
5832 (cancel_breakpoints_callback): Ditto.
5833 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5835 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5836 (unsuspend_one_lwp): Update, "entry" parameter is a
5837 struct thread_info * now.
5838 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5840 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5841 Fetch lwpid from thread, not lwp.
5842 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5843 Pass &all_threads to find_inferior, not &all_lwps.
5844 (send_sigstop): Fetch lwpid from thread, not lwp.
5845 (send_sigstop_callback): Update, "entry" parameter is a
5846 struct thread_info * now.
5847 (suspend_and_send_sigstop_callback): Ditto.
5848 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5849 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5850 struct thread_info * now.
5851 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5853 (lwp_running): Update, "entry" parameter is a
5854 struct thread_info * now.
5855 (stop_all_lwps): Fetch ptid from thread.
5856 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5857 (linux_resume_one_lwp): Fetch lwpid from thread.
5858 (linux_set_resume_request): Update, "entry" parameter is a
5859 struct thread_info * now. Fetch pid, lwpid from thread.
5860 (resume_status_pending_p): Update, "entry" parameter is a
5861 struct thread_info * now.
5862 (need_step_over_p): Ditto. Fetch lwpid from thread.
5863 (start_step_over): Fetch lwpid from thread.
5864 (linux_resume_one_thread): Update, "entry" parameter is a
5865 struct thread_info * now. Fetch lwpid from thread.
5866 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5867 (proceed_one_lwp): Update, "entry" parameter is a
5868 struct thread_info * now. Fetch lwpid from thread.
5869 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5870 struct thread_info * now.
5871 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5872 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5873 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5875 (regsets_store_inferior_registers): Ditto.
5876 (fetch_register, store_register): Ditto.
5877 (linux_read_memory, linux_write_memory): Ditto.
5878 (linux_request_interrupt): Ditto.
5879 (linux_read_auxv): Ditto.
5880 (linux_xfer_siginfo): Ditto.
5881 (linux_qxfer_spu): Ditto.
5882 (linux_qxfer_libraries_svr4): Ditto.
5883 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5884 moved to inferiors.h.
5886 (get_thread_lwp): Update.
5887 (struct lwp_info): Delete member "entry". Simplify comment for
5890 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5891 current_inferior directly.
5892 (update_watch_registers_callback): Update, "entry" parameter is a
5893 struct thread_info * now. Fetch pid from thread.
5894 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5895 (mips_insert_point): Fetch lwpid from current_inferior.
5896 Pass &all_threads to find_inferior, not &all_lwps.
5897 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5898 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5900 (mips_stopped_data_address): Ditto.
5901 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5903 * linux-tile-low.c (tile_arch_setup): Ditto.
5904 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5905 (update_debug_registers_callback): Update, "entry" parameter is a
5906 struct thread_info * now. Fetch pid from thread.
5907 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5908 Pass &all_threads to find_inferior, not &all_lwps.
5909 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5910 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5911 Pass &all_threads to find_inferior, not &all_lwps.
5912 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5913 (i386_dr_low_get_status): Ditto.
5914 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5915 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5916 (x86_linux_read_description): Ditto.
5917 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5919 2014-02-20 Doug Evans <dje@google.com>
5921 * inferiors.c (get_first_inferior): Fix buglet.
5923 2014-02-19 Doug Evans <dje@google.com>
5925 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5926 * inferiors.c (add_thread): Change result type to struct thread_info *.
5927 All callers updated.
5928 (add_lwp): Call add_thread here instead of in callers.
5929 All callers updated.
5930 * linux-low.h (get_lwp_thread): Rewrite.
5931 (struct lwp_info): New member "thread".
5933 2014-02-19 Doug Evans <dje@google.com>
5935 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5936 All callers updated.
5938 2014-02-19 Doug Evans <dje@google.com>
5940 * inferiors.c (add_thread): Fix whitespace.
5942 2014-02-19 Doug Evans <dje@google.com>
5944 * dll.c (clear_dlls): Replace accessing list implemention details
5946 * gdbthread.h (get_first_thread): Declare.
5947 * inferiors.c (for_each_inferior_with_data): New function.
5948 (get_first_thread): New function.
5949 (find_thread_ptid): Simplify.
5950 (get_first_inferior): New function.
5951 (clear_list): Delete.
5952 (one_inferior_p): New function.
5953 (clear_inferior_list): New function.
5954 (clear_inferiors): Update.
5955 * inferiors.h (for_each_inferior_with_data): Declare.
5956 (clear_inferior_list): Declare.
5957 (one_inferior_p): Declare.
5958 (get_first_inferior): Declare.
5959 * linux-low.c (linux_wait_for_event): Replace accessing list
5960 implemention details with API function.
5961 * server.c (target_running): Ditto.
5962 (accumulate_file_name_length): New function.
5963 (emit_dll_description): New function.
5964 (handle_qxfer_libraries): Replace accessing list implemention
5965 details with API function.
5966 (handle_qxfer_threads_worker): New function.
5967 (handle_qxfer_threads_proper): Replace accessing list implemention
5968 details with API function.
5969 (handle_query): Ditto.
5970 (visit_actioned_threads_callback_ftype): New typedef.
5971 (visit_actioned_threads_data): New struct.
5972 (visit_actioned_threads): Rewrite to be find_inferior callback.
5973 (resume): Call find_inferior.
5974 (handle_status): Replace accessing list implemention
5975 details with API function.
5976 (process_serial_event): Replace accessing list implemention details
5978 * target.c (set_desired_inferior): Replace accessing list implemention
5979 details with API function.
5980 * tracepoint.c (same_process_p): New function.
5981 (gdb_agent_about_to_close): Replace accessing list implemention
5982 details with API function.
5983 * win32-low.c (child_delete_thread): Replace accessing list
5984 implemention details with API function.
5985 (match_dll_by_basename): New function.
5986 (dll_is_loaded_by_basename): New function.
5987 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5988 details call to dll_is_loaded_by_basename.
5990 2014-02-19 Doug Evans <dje@google.com>
5992 * dll.h (struct dll_info): Add comment.
5993 * gdbthread.h (struct thread_info): Add comment.
5994 (current_ptid): Simplify.
5995 * inferiors.c (add_process): Update.
5996 (remove_process): Update.
5997 * inferiors.h (struct process_info): Rename member "head" to "entry".
5998 * linux-low.c (delete_lwp): Update.
6000 (last_thread_of_process_p): Update.
6001 (kill_one_lwp_callback, linux_kill): Update.
6002 (status_pending_p_callback): Update.
6003 (wait_for_sigstop): Update. Simplify read of ptid.
6004 (start_step_over): Update.
6005 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6006 (get_lwp_thread): Update.
6007 (struct lwp_info): Rename member "head" to "entry".
6008 * regcache.h (inferior_list_entry): Delete.
6009 * server.c (kill_inferior_callback): Update.
6010 (detach_or_kill_inferior_callback): Update.
6011 (print_started_pid): Update.
6012 (print_attached_pid): Update.
6013 (process_serial_event): Simplify read of ptid.
6014 * thread-db.c (thread_db_create_event): Update.
6015 (thread_db_get_tls_address): Update.
6016 * win32-low.c (current_inferior_ptid): Simplify.
6018 2014-02-19 Tom Tromey <tromey@redhat.com>
6020 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6022 (target_supports_btrace): Update.
6024 2014-02-14 Yao Qi <yao@codesourcery.com>
6026 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6027 (rsp-low-ipa.o): New target.
6029 2014-02-12 Tom Tromey <tromey@redhat.com>
6031 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6032 convert_ascii_to_int.
6033 * regcache.c (registers_to_string): Likewise.
6034 * remote-utils.c (decode_M_packet): Likewise.
6035 * server.c (process_serial_event): Likewise.
6037 2014-02-12 Tom Tromey <tromey@redhat.com>
6039 * server.c (handle_query, handle_v_run): Use hex2bin, not
6041 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6043 2014-02-12 Tom Tromey <tromey@redhat.com>
6045 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6046 convert_int_to_ascii.
6047 * regcache.c (registers_to_string, collect_register_as_string):
6049 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6051 * server.c (process_serial_event): Likewise.
6052 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6053 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6055 2014-02-12 Tom Tromey <tromey@redhat.com>
6057 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6058 bin2hex, not hexify.
6059 * tracepoint.c (cmd_qtstatus): Likewise.
6061 2014-02-12 Tom Tromey <tromey@redhat.com>
6063 * remote-utils.c (monitor_output): Pass explicit length to
6066 2014-02-12 Tom Tromey <tromey@redhat.com>
6068 * tracepoint.c: Include rsp-low.h.
6069 * server.c: Include rsp-low.h.
6070 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6071 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6073 * remote-utils.c: Include rsp-low.h.
6074 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6075 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6076 (convert_int_to_ascii, convert_ascii_to_int): Move to
6078 * regcache.c: Include rsp-low.h.
6079 * ax.c: Include rsp-low.h.
6080 * Makefile.in (SFILES): Add common/rsp-low.c.
6081 (OBS): Add rsp-low.o.
6082 (rsp-low.o): New target.
6084 2014-02-12 Tom Tromey <tromey@redhat.com>
6086 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6087 Include print-utils.h.
6088 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6089 (plongest, thirty_two, phex_nz): Remove.
6090 * Makefile.in (SFILES): Add common/print-utils.c.
6091 (OBS): Add print-utils.o.
6092 (print-utils-ipa.o): New target.
6093 (print-utils.o): New target.
6094 (IPA_OBJS): Add print-utils-ipa.o.
6096 2014-02-06 Tom Tromey <tromey@redhat.com>
6098 * Makefile.in (SFILES): Fix indentation.
6100 2014-02-05 Doug Evans <dje@google.com>
6102 * linux-low.c (linux_wait_for_event): Improve comment.
6103 (linux_wait_1): Keep current_inferior in sync with event_child.
6105 2014-01-22 Doug Evans <dje@google.com>
6107 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6109 2014-01-22 Doug Evans <dje@google.com>
6111 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6112 * configure: Regenerate.
6113 * config.in: Regenerate.
6114 * Makefile.in (SFILES): Add debug.c.
6116 * debug.c: New file.
6117 * debug.h: New file.
6118 * linux-aarch64-low.c (*): Update all debugging printfs to use
6119 debug_printf instead of fprintf.
6120 * linux-arm-low.c (*): Ditto.
6121 * linux-cris-low.c (*): Ditto.
6122 * linux-crisv32-low.c (*): Ditto.
6123 * linux-m32r-low.c (*): Ditto.
6124 * linux-sparc-low.c (*): Ditto.
6125 * linux-x86.c (*): Ditto.
6126 * linux-low.c (*): Ditto.
6127 (linux_wait_1): Add calls to debug_enter, debug_exit.
6128 (linux_wait): Remove redundant debugging printf.
6129 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6130 (linux_resume, unstop_all_lwps): Ditto.
6131 * mem-break.c (*): Update all debugging printfs to use
6132 debug_printf instead of fprintf.
6133 * remote-utils.c (*): Ditto.
6134 * thread-db.c (*): Ditto.
6135 * server.c #include <ctype.h>, "gdb_vecs.h".
6136 (debug_threads): Moved to debug.c.
6137 (*): Update all debugging printfs to use debug_printf instead of
6139 (start_inferior): Replace call to fflush with call to debug_flush.
6140 (monitor_show_help): Mention set debug-format.
6141 (parse_debug_format_options): New function.
6142 (handle_monitor_command): Handle "monitor set debug-format".
6143 (gdbserver_usage): Mention --debug-format.
6144 (main): Parse --debug-format.
6145 * server.h (debug_threads): Declaration moved to debug.h.
6147 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6148 trace_debug_1 that uses debug_printf.
6149 (tracepoint_look_up_symbols): Update all debugging printfs to use
6150 debug_printf instead of fprintf.
6152 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6154 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6157 2014-01-17 Pedro Alves <palves@redhat.com>
6160 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6161 defined after including gdb_proc_service.h.
6163 2014-01-16 Doug Evans <dje@google.com>
6165 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6166 (match_dll): Use it.
6168 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6170 * target.h (target_ops) <read_btrace>: Change parameters and
6171 return type to allow error reporting.
6172 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6173 trace reading errors on.
6174 * linux-low.c (linux_low_read_btrace): Pass trace reading
6176 (linux_low_disable_btrace): New.
6178 2014-01-15 Doug Evans <dje@google.com>
6180 * inferiors.c (thread_id_to_gdb_id): Delete.
6181 * inferiors.h (thread_id_to_gdb_id): Delete.
6183 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6185 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6186 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6189 2014-01-08 Pedro Alves <palves@redhat.com>
6191 * server.c (handle_status): Don't discard previous queued stop
6192 replies or thread's pending status here.
6193 (main) <disconnection>: Do it here instead.
6195 2014-01-08 Pedro Alves <palves@redhat.com>
6197 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6198 * server.c (visit_actioned_threads, handle_pending_status): New
6200 (handle_v_cont): Factor out parts to ...
6201 (resume): ... this new function. If in all-stop, and a thread
6202 being resumed has a pending status, report it without actually
6204 (myresume): Adjust to use the new 'resume' function.
6205 (clear_pending_status_callback, set_pending_status_callback)
6206 (find_status_pending_thread_callback): New functions.
6207 (handle_status): Handle the case of multiple threads having
6208 interesting statuses to report. Report threads' real last signal
6209 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6210 with an interesting thread to report the status for, instead of
6211 always reporting the status of the first thread.
6213 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6215 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6216 * gdbreplay.c (gdbreplay_version): Likewise.
6218 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6220 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6221 iov.iov_len with the real length in use.
6223 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6225 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6226 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6227 for all targets that use win32-low.c.
6228 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6229 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6231 2013-12-13 Pedro Alves <palves@redhat.com>
6233 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6234 if equal to TARGET_WAITKIND_LOADED.
6235 * win32-low.c (cached_status): New static global.
6236 (win32_wait): Add declaration.
6237 (do_initial_child_stuff): Flush all initial pending debug events
6238 up to the initial breakpoint.
6239 (win32_wait): If CACHED_STATUS was set, return that instead
6240 of doing a real wait. Remove the code resuming the execution
6241 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6242 during the initial phase. Also remove the code changing
6243 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6244 TARGET_WAITKIND_STOPPED.
6246 2013-12-11 Yao Qi <yao@codesourcery.com>
6248 * notif.c (handle_notif_ack): Return 0 if no notification
6251 2013-11-20 Doug Evans <dje@google.com>
6253 * linux-low.c (linux_set_resume_request): Fix comment.
6255 2013-11-20 Doug Evans <dje@google.com>
6257 * linux-low.c (resume_status_pending_p): Tweak comment.
6259 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6261 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6262 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6263 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6264 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6265 (srv_amd64_regobj): Add amd64-mpx.o.
6266 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6267 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6268 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6269 * i387-fp.c (num_pl_bnd_register) Added constant.
6270 (num_pl_bnd_cfg_registers) Added constant.
6271 (struct i387_xsave) Added reserved area and MPX fields.
6272 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6273 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6275 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6276 (init_registers_amd64_mpx_linux): Declare new function.
6277 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6278 (x86_64_regmap): Add MPX registers.
6279 (x86_linux_read_description): Add MPX case.
6280 (initialize_low_arch): Initialize MPX targets.
6282 2013-11-18 Tom Tromey <tromey@redhat.com>
6284 * configure: Rebuild.
6285 * configure.ac: Don't check for stdlib.h.
6286 * gdbreplay.c: Unconditionally include stdlib.h.
6288 2013-11-18 Tom Tromey <tromey@redhat.com>
6290 * config.in: Rebuild.
6291 * configure: Rebuild.
6292 * configure.ac: Don't use AC_HEADER_DIRENT.
6294 2013-11-18 Tom Tromey <tromey@redhat.com>
6296 * server.h: Don't check HAVE_STRING_H.
6297 * gdbreplay.c: Don't check HAVE_STRING_H.
6298 * configure: Rebuild.
6300 2013-11-18 Tom Tromey <tromey@redhat.com>
6302 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6305 2013-11-08 Tom Tromey <tromey@redhat.com>
6307 * configure, config.in: Rebuild.
6308 * configure.ac: Remove unused configury.
6310 2013-11-08 Tom Tromey <tromey@redhat.com>
6312 * acinclude.m4: Include common.m4, codeset.m4.
6313 * configure, config.in: Rebuild.
6314 * configure.ac: Use GDB_AC_COMMON.
6316 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6318 * linux-s390-low.c (HWCAP_S390_TE): New define.
6319 (s390_arch_setup): Consider the TE field in the HWCAP for
6320 determining 'have_regset_tdb'.
6322 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6325 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6328 2013-10-02 Pedro Alves <palves@redhat.com>
6330 * server.c (process_serial_event): Don't output "GDBserver
6331 exiting" if GDB is connected through stdio.
6332 * target.c (mywait): Likewise, be silent if GDB is connected
6335 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6337 * lynx-low.c (lynx_add_threads_after_attach): New function.
6338 (lynx_attach): Remove call to add_thread. Add call to
6339 lynx_add_threads_after_attach instead.
6341 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6343 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6344 * config.in, configure: Regenerated.
6346 2013-09-18 Yao Qi <yao@codesourcery.com>
6349 * server.c (start_inferior): Clear 'resume_info'.
6351 2013-09-16 Jiong Wang <jiwang@tilera.com>
6353 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6356 2013-09-16 Jiong Wang <jiwang@tilera.com>
6358 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6359 linux-tile-low.o to srv_tgtobj.
6361 2013-09-16 Will Newton <will.newton@linaro.org>
6363 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6366 2013-09-06 Pedro Alves <palves@redhat.com>
6368 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6369 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6370 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6371 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6372 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6373 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6375 2013-09-06 Pedro Alves <palves@redhat.com>
6377 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6378 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6380 2013-09-06 Pedro Alves <palves@redhat.com>
6382 * linux-amd64-ipa.c: Include tracepoint.h.
6383 * linux-i386-ipa.c: Include tracepoint.h.
6385 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6387 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6388 (ps_get_thread_area): New function.
6390 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6392 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6393 (initialize_low_arch): Call init_registers_crisv32 rather than
6394 init_register_crisv32.
6396 2013-09-05 Pedro Alves <palves@redhat.com>
6398 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6400 * hostio.h: ... this new file.
6401 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6402 win32-low.c: Include hostio.h.
6404 2013-09-05 Pedro Alves <palves@redhat.com>
6406 * server.h (gdb_client_data, handler_func, callback_handler_func)
6407 (delete_file_handler, add_file_handler, append_callback_event)
6408 (delete_callback_event, start_event_loop, initialize_event_loop):
6409 Move to event-loop.h and include it.
6410 * event-loop.h: New file.
6412 2013-09-05 Pedro Alves <palves@redhat.com>
6414 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6415 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6416 (loaded_dll, unloaded_dll): Move to ...
6417 * dll.h: ... this new file.
6418 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6420 2013-09-05 Pedro Alves <palves@redhat.com>
6422 * server.h (current_process, get_thread_process, all_processes)
6423 (add_inferior_to_list, for_each_inferior, current_inferior)
6424 (remove_inferior, add_process, remove_process, find_process_pid)
6425 (have_started_inferiors_p, have_attached_inferiors_p)
6426 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6427 (clear_inferiors, find_inferior, find_inferior_id)
6428 (inferior_target_data, set_inferior_target_data)
6429 (inferior_regcache_data, set_inferior_regcache_data): Move to
6430 inferiors.h, and include it.
6431 * inferiors.h: New file.
6433 2013-09-05 Pedro Alves <palves@redhat.com>
6435 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6439 2013-09-05 Pedro Alves <palves@redhat.com>
6441 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6443 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6444 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6445 (handle_tracepoint_general_set, handle_tracepoint_query)
6446 (tracepoint_finished_step, tracepoint_was_hit)
6447 (release_while_stepping_state_list, current_traceframe)
6448 (in_readonly_region, traceframe_read_mem)
6449 (fetch_traceframe_registers, traceframe_read_sdata)
6450 (traceframe_read_info, struct fast_tpoint_collect_status)
6451 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6452 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6453 (supply_fast_tracepoint_registers)
6454 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6455 (ipa_tdesc, claim_trampoline_space)
6456 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6457 (agent_mem_read, agent_get_trace_state_variable_value)
6458 (agent_set_trace_state_variable_value, agent_tsv_read)
6459 (agent_mem_read_string, get_raw_reg_func_addr)
6460 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6461 * tracepoint.h: ... this new file.
6463 2013-09-05 Pedro Alves <palves@redhat.com>
6465 * server.h (perror_with_name, error, fatal, warning, paddress)
6466 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6468 * utils.h: New file.
6470 2013-09-05 Pedro Alves <palves@redhat.com>
6472 * server.h (remote_debug, noack_mode, transport_is_reliable)
6473 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6474 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6475 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6476 (write_enn, initialize_async_io, enable_async_io)
6477 (disable_async_io, check_remote_input_interrupt_request)
6478 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6479 (dead_thread_notify, prepare_resume_reply)
6480 (decode_address_to_semicolon, decode_address, decode_m_packet)
6481 (decode_M_packet, decode_X_packet, decode_xfer_write)
6482 (decode_search_memory_packet, unhexify, hexify)
6483 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6484 (look_up_one_symbol, relocate_instruction)
6485 (monitor_output): Move to remote-utils.h, and include it.
6486 * remote-utils.h: New file.
6488 2013-09-05 Pedro Alves <palves@redhat.com>
6490 * server.h (_): Delete.
6492 2013-09-02 Pedro Alves <palves@redhat.com>
6494 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6495 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6497 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6499 2013-09-02 Pierre Muller <muller@sourceware.org>
6501 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6502 or WriteProcessMemory complete successfully and handle
6503 ERROR_PARTIAL_COPY error.
6505 2013-09-02 Pedro Alves <palves@redhat.com>
6507 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6508 error instead of EIO.
6510 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6513 * linux-low.c: Include filestuff.h.
6514 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6515 * lynx-low.c: Include filestuff.h.
6516 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6517 * server.c: Include filestuff.h.
6518 (main): Call notice_open_fds.
6519 * spu-low.c: Include filestuff.h.
6520 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6522 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6524 * Makefile.in: Explain why ../target and ../nat are not
6525 listed as include file search paths.
6526 (linux-waitpid.o): New object file rule.
6527 * configure.srv (srv_native_linux_obj): New variable.
6528 Replace all occurrences of linux native object files with
6529 $srv_native_linux_obj.
6530 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6531 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6532 (linux_enable_event_reporting): Remove declaration.
6533 (my_waitpid): Moved to common/linux-waitpid.c.
6534 (linux_wait_for_event): Pass ptid when calling
6535 linux_enable_event_reporting.
6536 (linux_supports_tracefork_flag): Remove.
6537 (linux_enable_event_reporting): Likewise.
6538 (linux_tracefork_grandchild): Remove.
6539 (STACK_SIZE): Moved to common/linux-ptrace.c.
6540 (linux_tracefork_child): Remove.
6541 (linux_test_for_tracefork): Remove.
6542 (linux_look_up_symbols): Call linux_supports_traceclone.
6543 (initialize_low): Remove call to linux_test_for_tracefork.
6544 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6545 common/linux-ptrace.h.
6546 (PTRACE_TYPE_ARG4): Likewise.
6547 Include linux-ptrace.h.
6549 2013-08-21 Pedro Alves <palves@redhat.com>
6551 * config.in: Renegerate.
6553 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6555 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6556 (SFILES): Remove $(srcdir)/common/target-common.c and
6557 add $(srcdir)/target/waitstatus.c.
6558 (OBS): Remove target-common.o and add waitstatus.o.
6559 (server_h): Remove $(srcdir)/../common/target-common.h and
6560 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6561 and $(srcdir)/../target/waitstatus.h.
6562 (target-common.o): Remove.
6563 (waitstatus.o): New target object file.
6564 * target.h: Do not include target-common.h and
6565 include target/resume.h, target/wait.h and
6566 target/waitstatus.h.
6568 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6570 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6571 to PTRACE_TYPE_ARG3.
6572 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6573 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6575 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6576 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6578 2013-07-27 Jie Zhang <jie@codesourcery.com>
6579 Daniel Jacobowitz <dan@codesourcery.com>
6580 Yao Qi <yao@codesourcery.com>
6582 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6583 (mips-linux-watch.o): New rule.
6584 (mips_linux_watch_h): New variable.
6585 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6587 * linux-mips-low.c: Include mips-linux-watch.h.
6588 (struct arch_process_info, struct arch_lwp_info): New.
6589 (update_watch_registers_callback): New function.
6590 (mips_linux_new_process, mips_linux_new_thread) New functions.
6591 (mips_linux_prepare_to_resume, mips_insert_point): New
6593 (mips_remove_point, mips_stopped_by_watchpoint): New
6595 (rsp_bp_type_to_target_hw_bp_type): New function.
6596 (mips_stopped_data_address): New function.
6597 (the_low_target): Add watchpoint support functions.
6599 2013-07-27 Yao Qi <yao@codesourcery.com>
6601 * i386-low.c: Include break-common.h.
6602 (enum target_hw_bp_type): Remove.
6604 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6606 * Makefile.in (SFILES): /common/target-common.c.
6607 (OBS): Add target-common.o.
6608 (server_h): Add $(srcdir)/../common/target-common.h.
6609 (target-common.o): New target.
6610 * server.c (queue_stop_reply_callback): Free
6611 status string after use.
6612 * target.c (target_waitstatus_to_string): Remove.
6613 * target.h: Include target-common.h.
6614 (resume_kind): Likewise.
6615 (target_waitkind): Likewise.
6616 (target_waitstatus): Likewise.
6617 (TARGET_WNOHANG): Likewise.
6619 2013-07-04 Yao Qi <yao@codesourcery.com>
6621 * Makefile.in (host_alias): Use @host_noncanonical@.
6622 (target_alias): Use @target_noncanonical@.
6623 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6624 ACX_NONCANONICAL_HOST.
6625 * configure: Regenerated.
6628 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6630 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6631 * configure: Rebuild.
6632 * Makefile.in (version_host, version_target): Get from configure.
6633 (version.c): Use $(version_host) and $(version_target).
6635 2013-07-03 Pedro Alves <palves@redhat.com>
6637 * Makefile.in (config.status): Depend on development.sh.
6638 * acinclude.m4: Include libmcheck.m4.
6639 * configure: Regenerate.
6641 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6643 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6644 attribute inside the parentheses.
6645 (winapi_DebugSetProcessKillOnExit): Ditto.
6646 (winapi_DebugBreakProcess): Ditto.
6647 (winapi_GenerateConsoleCtrlEvent): Ditto.
6649 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6651 * notif.h (notif_event): Add a dummy member to avoid compiler
6654 2013-07-01 Pedro Alves <palves@redhat.com>
6656 * hostio.c (HOSTIO_PATH_MAX): Define.
6657 (require_filename, handle_open, handle_unlink, handle_readlink):
6660 2013-07-01 Pedro Alves <palves@redhat.com>
6662 * server.h: Include "pathmax.h".
6663 * linux-low.c: Don't include sys/param.h.
6664 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6666 * win32-low.c: Don't include sys/param.h.
6667 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6669 2013-07-01 Pedro Alves <palves@redhat.com>
6671 * event-loop.c: Don't check HAVE_UNISTD_H before including
6673 * gdbreplay.c: Likewise.
6674 * remote-utils.c: Likewise.
6675 * server.c: Likewise.
6676 * configure.ac: Don't check for unistd.h.
6677 * configure: Regenerate.
6679 2013-06-28 Tom Tromey <tromey@redhat.com>
6681 * Makefile.in (version.c): Use version.in, not
6684 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6686 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6687 * configure: Rebuild.
6688 * Makefile.in (version_host, version_target): Get from configure.
6689 (version.c): Use $(version_host) and $(version_target).
6691 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6693 Fix trace-status to output user name without trailing colon.
6694 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6696 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6698 Fix trace-status to output proper start-time and stop-time.
6699 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6700 output start time and stop time in hex as gdb expects.
6702 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6704 * tracepoint.c (build_traceframe_info_xml): Output trace state
6705 variables present in the trace buffer.
6707 2013-06-24 Tom Tromey <tromey@redhat.com>
6709 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6711 (version.o): Remove.
6712 * gdbreplay.c: Include version.h.
6713 (version, host_name): Don't declare.
6714 * server.h: Include version.h.
6715 (version, host_name): Don't declare.
6717 2013-06-12 Pedro Alves <palves@redhat.com>
6719 * linux-x86-low.c (linux_is_elf64): Delete global.
6720 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6721 with local linux_pid_exe_is_elf_64_file use.
6723 2013-06-11 Pedro Alves <palves@redhat.com>
6725 * linux-low.c (regset_disabled, disable_regset): New functions.
6726 (regsets_fetch_inferior_registers)
6727 (regsets_store_inferior_registers): Use them.
6728 (initialize_regsets_info); Don't allocate the disabled_regsets
6730 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6733 2013-06-11 Pedro Alves <palves@redhat.com>
6735 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6738 2013-06-11 Pedro Alves <palves@redhat.com>
6740 * linux-x86-low.c (initialize_low_arch): Call
6741 init_registers_x32_avx_linux.
6743 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6745 Fix compatibility with Android Bionic.
6746 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6749 2013-06-07 Pedro Alves <palves@redhat.com>
6752 * Makefile.in (OBS): Add tdesc.o.
6753 (IPA_OBJS): Add tdesc-ipa.o.
6754 (tdesc-ipa.o): New rule.
6755 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6757 * linux-low.c (new_inferior): Delete.
6758 (disabled_regsets, num_regsets): Delete.
6759 (linux_add_process): Adjust to set the new per-process
6761 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6762 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6763 was a stop. When calling arch_setup, switch the current inferior
6764 to the thread that got an event.
6765 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6766 (regsets_fetch_inferior_registers)
6767 (regsets_store_inferior_registers): New regsets_info parameter.
6769 (linux_register_in_regsets): New regs_info parameter. Adjust to
6771 (register_addr, fetch_register, store_register): New usrregs_info
6772 parameter. Adjust to use it.
6773 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6774 parameter regs_info. Adjust to use it.
6775 (linux_fetch_registers): Get the current inferior's regs_info, and
6777 (linux_store_registers): Ditto.
6778 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6779 (initialize_low): Don't initialize the target_regsets here. Call
6780 initialize_low_arch.
6781 * linux-low.h (target_regsets): Delete declaration.
6782 (struct regsets_info): New.
6783 (struct usrregs_info): New.
6784 (struct regs_info): New.
6785 (struct process_info_private) <new_inferior>: New field.
6786 (struct linux_target_ops): Delete the num_regs, regmap, and
6787 regset_bitmap fields. New field regs_info.
6788 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6789 * i387-fp.c (num_xmm_registers): Delete.
6790 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6791 calls to new interface.
6792 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6793 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6794 Infer the number of xmm registers from the regcache's target
6796 * i387-fp.h (num_xmm_registers): Delete.
6797 * inferiors.c (add_thread): Don't install the thread's regcache
6799 * proc-service.c (gregset_info): Fetch the current inferior's
6800 regs_info. Adjust to use it.
6801 * regcache.c: Include tdesc.h.
6802 (register_bytes, reg_defs, num_registers)
6803 (gdbserver_expedite_regs): Delete.
6804 (get_thread_regcache): If the thread doesn't have a regcache yet,
6805 create one, instead of aborting gdbserver.
6806 (regcache_invalidate_one): Rename to ...
6807 (regcache_invalidate_thread): ... this.
6808 (regcache_invalidate_one): New.
6809 (regcache_invalidate): Only invalidate registers of the current
6811 (init_register_cache): Add target_desc parameter, and use it.
6812 (new_register_cache): Ditto. Assert the target description has a
6813 non zero registers_size.
6814 (regcache_cpy): Add assertions. Adjust.
6815 (realloc_register_cache, set_register_cache): Delete.
6816 (registers_to_string, registers_from_string): Adjust.
6817 (find_register_by_name, find_regno, find_register_by_number)
6818 (register_cache_size): Add target_desc parameter, and use it.
6819 (free_register_cache_thread, free_register_cache_thread_one)
6820 (regcache_release, register_cache_size): New.
6821 (register_size): Add target_desc parameter, and use it.
6822 (register_data, supply_register, supply_register_zeroed)
6823 (supply_regblock, supply_register_by_name, collect_register)
6824 (collect_register_as_string, collect_register_by_name): Adjust.
6825 * regcache.h (struct target_desc): Forward declare.
6826 (struct regcache) <tdesc>: New field.
6827 (init_register_cache, new_register_cache): Add target_desc
6829 (regcache_invalidate_thread): Declare.
6830 (regcache_invalidate_one): Delete declaration.
6831 (regcache_release): Declare.
6832 (find_register_by_number, register_cache_size, register_size)
6833 (find_regno): Add target_desc parameter.
6834 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6836 * remote-utils.c: Include tdesc.h.
6837 (outreg, prepare_resume_reply): Adjust.
6838 * server.c: Include tdesc.h.
6839 (gdbserver_xmltarget): Delete declaration.
6840 (get_features_xml, process_serial_event): Adjust.
6841 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6843 (struct process_info) <tdesc>: New field.
6844 (ipa_tdesc): Declare.
6845 * tdesc.c: New file.
6846 * tdesc.h: New file.
6847 * tracepoint.c: Include tdesc.h.
6848 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6849 (get_context_regcache): Adjust to pass ipa_tdesc down.
6850 (do_action_at_tracepoint): Adjust to get the register cache size
6851 from the context regcache's description.
6852 (traceframe_walk_blocks): Adjust to get the register cache size
6853 from the current trace frame's description.
6854 (traceframe_get_pc): Adjust to get current trace frame's
6855 description and pass it down.
6856 (gdb_collect): Adjust to get the register cache size from the
6858 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6859 (gdbserver_xmltarget): Delete.
6860 (initialize_low_tracepoint): Set the ipa's target description.
6861 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6862 (initialize_low_tracepoint): Set the ipa's target description.
6863 * linux-x86-low.c: Include tdesc.h.
6864 [__x86_64__] (is_64bit_tdesc): New.
6865 (ps_get_thread_area, x86_get_thread_area): Use it.
6866 (i386_cannot_store_register): Rename to ...
6867 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6868 (i386_cannot_fetch_register): Rename to ...
6869 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6870 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6872 (target_regsets): Rename to ...
6873 (x86_regsets): ... this.
6874 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6876 (x86_siginfo_fixup): Use is_64bit_tdesc.
6877 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6878 (tdesc_x32_avx_linux, tdesc_x32_linux)
6879 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6881 (x86_linux_update_xmltarget): Delete.
6882 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6883 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6884 (AMD64_LINUX_USER64_CS): New.
6885 (x86_linux_read_description): New, based on
6886 x86_linux_update_xmltarget.
6887 (same_process_callback): New.
6888 (x86_arch_setup_process_callback): New.
6889 (x86_linux_update_xmltarget): New.
6890 (x86_regsets_info): New.
6891 (amd64_linux_regs_info): New.
6892 (i386_linux_usrregs_info): New.
6893 (i386_linux_regs_info): New.
6894 (x86_linux_regs_info): New.
6895 (x86_arch_setup): Reimplement.
6896 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6897 (x86_emit_ops): Ditto.
6898 (the_low_target): Adjust. Install x86_linux_regs_info,
6899 x86_cannot_fetch_register, and x86_cannot_store_register.
6900 (initialize_low_arch): New.
6901 * linux-ia64-low.c (tdesc_ia64): Declare.
6902 (ia64_fetch_register): Adjust.
6903 (ia64_usrregs_info, regs_info): New globals.
6904 (ia64_regs_info): New function.
6905 (the_low_target): Adjust.
6906 (initialize_low_arch): New function.
6907 * linux-sparc-low.c (tdesc_sparc64): Declare.
6908 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6910 (sparc_arch_setup): New function.
6911 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6912 (the_low_target): Adjust.
6913 (initialize_low_arch): New function.
6914 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6915 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6916 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6917 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6918 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6919 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6920 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6921 (tdesc_powerpc_isa205_vsx64l): Declare.
6922 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6923 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6924 (ppc_set_pc, ppc_get_hwcap): Adjust.
6925 (ppc_usrregs_info): Forward declare.
6926 (!__powerpc64__) ppc_regmap_adjusted: New global.
6927 (ppc_arch_setup): Adjust to the current process'es target
6929 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6930 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6931 (ppc_store_evrregset): Adjust.
6932 (target_regsets): Rename to ...
6933 (ppc_regsets): ... this, and make static.
6934 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6935 (ppc_regs_info): New function.
6936 (the_low_target): Adjust.
6937 (initialize_low_arch): New function.
6938 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6939 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6940 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6941 (tdesc_s390x_linux64v2): Declare.
6942 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6943 (s390_fill_gregset, s390_store_last_break): Adjust.
6944 (target_regsets): Rename to ...
6945 (s390_regsets): ... this, and make static.
6946 (s390_get_pc, s390_set_pc): Adjust.
6947 (s390_get_hwcap): New target_desc parameter, and use it.
6948 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6949 (s390_arch_setup): Adjust to set the current process'es target
6950 description. Don't adjust the regmap.
6951 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6952 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6953 (regs_info_3264): New globals.
6954 (s390_regs_info): New function.
6955 (the_low_target): Adjust.
6956 (initialize_low_arch): New function.
6957 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6958 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6959 [__mips64] (init_registers_mips_linux)
6960 (init_registers_mips_dsp_linux): Delete defines.
6961 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6962 (have_dsp): New global.
6963 (mips_read_description): New, based on mips_arch_setup.
6964 (mips_arch_setup): Reimplement.
6965 (get_usrregs_info): New function.
6966 (mips_cannot_fetch_register, mips_cannot_store_register)
6967 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6968 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6969 (target_regsets): Rename to ...
6970 (mips_regsets): ... this, and make static.
6971 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6972 (dsp_regs_info, regs_info): New globals.
6973 (mips_regs_info): New function.
6974 (the_low_target): Adjust.
6975 (initialize_low_arch): New function.
6976 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6977 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6979 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6980 (arm_read_description): New, with bits factored from
6982 (arm_arch_setup): Reimplement.
6983 (target_regsets): Rename to ...
6984 (arm_regsets): ... this, and make static.
6985 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6986 (arm_regs_info): New function.
6987 (the_low_target): Adjust.
6988 (initialize_low_arch): New function.
6989 * linux-m68k-low.c (tdesc_m68k): Declare.
6990 (target_regsets): Rename to ...
6991 (m68k_regsets): ... this, and make static.
6992 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6993 (m68k_regs_info): New function.
6994 (m68k_arch_setup): New function.
6995 (the_low_target): Adjust.
6996 (initialize_low_arch): New function.
6997 * linux-sh-low.c (tdesc_sharch): Declare.
6998 (target_regsets): Rename to ...
6999 (sh_regsets): ... this, and make static.
7000 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7001 (sh_regs_info, sh_arch_setup): New functions.
7002 (the_low_target): Adjust.
7003 (initialize_low_arch): New function.
7004 * linux-bfin-low.c (tdesc_bfin): Declare.
7005 (bfin_arch_setup): New function.
7006 (bfin_usrregs_info, regs_info): New globals.
7007 (bfin_regs_info): New function.
7008 (the_low_target): Adjust.
7009 (initialize_low_arch): New function.
7010 * linux-cris-low.c (tdesc_cris): Declare.
7011 (cris_arch_setup): New function.
7012 (cris_usrregs_info, regs_info): New globals.
7013 (cris_regs_info): New function.
7014 (the_low_target): Adjust.
7015 (initialize_low_arch): New function.
7016 * linux-cris-low.c (tdesc_crisv32): Declare.
7017 (cris_arch_setup): New function.
7018 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7019 (cris_regs_info): New function.
7020 (the_low_target): Adjust.
7021 (initialize_low_arch): New function.
7022 * linux-m32r-low.c (tdesc_m32r): Declare.
7023 (m32r_arch_setup): New function.
7024 (m32r_usrregs_info, regs_info): New globals.
7025 (m32r_regs_info): Adjust.
7026 (initialize_low_arch): New function.
7027 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7028 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7029 (tic6x_usrregs_info): Forward declare.
7030 (tic6x_read_description): New function, based on ...
7031 (tic6x_arch_setup): ... this. Reimplement.
7032 (target_regsets): Rename to ...
7033 (tic6x_regsets): ... this, and make static.
7034 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7035 (tic6x_regs_info): New function.
7036 (the_low_target): Adjust.
7037 (initialize_low_arch): New function.
7038 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7039 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7040 (target_regsets): Rename to ...
7041 (xtensa_regsets): ... this, and make static.
7042 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7044 (xtensa_arch_setup, xtensa_regs_info): New functions.
7045 (the_low_target): Adjust.
7046 (initialize_low_arch): New function.
7047 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7048 (nios2_arch_setup): Set the current process'es tdesc.
7049 (target_regsets): Rename to ...
7050 (nios2_regsets): ... this.
7051 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7052 (nios2_regs_info): New function.
7053 (the_low_target): Adjust.
7054 (initialize_low_arch): New function.
7055 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7056 (aarch64_arch_setup): Set the current process'es tdesc.
7057 (target_regsets): Rename to ...
7058 (aarch64_regsets): ... this.
7059 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7060 (aarch64_regs_info): New function.
7061 (the_low_target): Adjust.
7062 (initialize_low_arch): New function.
7063 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7065 (target_regsets): Rename to ...
7066 (tile_regsets): ... this.
7067 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7068 (tile_regs_info): New function.
7069 (tile_arch_setup): Set the current process'es tdesc.
7070 (the_low_target): Adjust.
7071 (initialize_low_arch): New function.
7072 * spu-low.c (tdesc_spu): Declare.
7073 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7074 * win32-arm-low.c (tdesc_arm): Declare.
7075 (arm_arch_setup): New function.
7076 (the_low_target): Install arm_arch_setup instead of
7078 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7079 (init_windows_x86): Rename to ...
7080 (i386_arch_setup): ... this. Set `win32_tdesc'.
7081 (the_low_target): Adjust.
7082 * win32-low.c (win32_tdesc): New global.
7083 (child_add_thread): Don't create the thread cache here.
7084 (do_initial_child_stuff): Set the new process'es tdesc.
7085 * win32-low.h (struct target_desc): Forward declare.
7086 (win32_tdesc): Declare.
7087 * lynx-i386-low.c (tdesc_i386): Declare global.
7088 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7089 * lynx-low.c (lynx_tdesc): New global.
7090 (lynx_add_process): Set the new process'es tdesc.
7091 * lynx-low.h (struct target_desc): Forward declare.
7092 (lynx_tdesc): Declare global.
7093 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7094 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7095 * nto-low.c (nto_tdesc): New global.
7096 (do_attach): Set the new process'es tdesc.
7097 * nto-low.h (struct target_desc): Forward declare.
7098 (nto_tdesc): Declare.
7099 * nto-x86-low.c (tdesc_i386): Declare.
7100 (nto_x86_arch_setup): Set `nto_tdesc'.
7102 2013-06-04 Gary Benson <gbenson@redhat.com>
7104 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7105 to qSupported response when appropriate.
7106 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7107 with nonzero-length annex.
7108 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7109 arguments supplied in annex.
7111 2013-05-31 Doug Evans <dje@google.com>
7114 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7115 64 bits in 64-cross-32 environment.
7117 2013-05-28 Pedro Alves <palves@redhat.com>
7119 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7120 (aarch64-without-fpu.c): Delete rule.
7121 * configure.srv (aarch64*-*-linux*): Remove references to
7122 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7123 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7126 2013-05-24 Pedro Alves <palves@redhat.com>
7128 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7129 instead of strchr/decode_address. Error if the range isn't split
7130 with a ','. Don't assume there's be a ':' in the action.
7132 2013-05-23 Yao Qi <yao@codesourcery.com>
7133 Pedro Alves <palves@redhat.com>
7135 * linux-low.c (lwp_in_step_range): New function.
7136 (linux_wait_1): If the thread was range stepping and stopped
7137 outside the stepping range, report the stop to GDB. Otherwise,
7138 continue stepping. Add range stepping debug output.
7139 (linux_set_resume_request): Copy the step range from the resume
7141 (linux_supports_range_stepping): New.
7142 (linux_target_ops) <supports_range_stepping>: Set to
7143 linux_supports_range_stepping.
7144 * linux-low.h (struct linux_target_ops)
7145 <supports_range_stepping>: New field.
7146 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7147 * linux-x86-low.c (x86_supports_range_stepping): New.
7148 (the_low_target) <supports_range_stepping>: Set to
7149 x86_supports_range_stepping.
7150 * server.c (handle_v_cont): Handle 'r' action.
7151 (handle_v_requests): Append ";r" if the target supports range
7153 * target.h (struct thread_resume) <step_range_start,
7154 step_range_end>: New fields.
7155 (struct target_ops) <supports_range_stepping>:
7157 (target_supports_range_stepping): New macro.
7159 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7161 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7162 confusion in comment.
7164 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7166 * lynx-low.c (struct process_info_private): New type.
7167 (lynx_add_process): New function.
7168 (lynx_create_inferior, lynx_attach): Replace calls to
7169 add_process by calls to lynx_add_process.
7170 (lynx_resume): If PTID is null, then try using
7171 current_process()->private->last_wait_event_ptid.
7173 (lynx_clear_inferiors): Delete. The contents of that function
7174 has been inlined in lynx_mourn;
7175 (lynx_wait_1): Save the ptid in the process's private data.
7176 (lynx_mourn): Free the process' private data. Replace call
7177 to lynx_clear_inferiors by call to clear_inferiors.
7179 2013-05-17 Yao Qi <yao@codesourcery.com>
7181 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7184 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7186 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7187 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7188 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7189 PT_TEXT_END_ADDR guards. Update comments.
7190 (linux_target_op) <read_offsets>: Conditionally define to
7191 linux_read_offsets if the target is UCLIBC and if it defines
7192 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7194 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7195 Andrew Jenner <andrew@codesourcery.com>
7197 * Makefile.in (SFILES): Add linux-nios2-low.c.
7198 (clean): Add action to delete nios2-linux.c.
7199 (nios2-linux.c): New rule.
7200 * configure.srv: Add nios2*-*-linux*.
7201 * linux-nios2-low.c: New.
7203 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7205 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7207 2013-04-25 Hui Zhu <hui@codesourcery.com>
7210 * ax.c (ax_printf): Add fflush.
7212 2013-04-22 Tom Tromey <tromey@redhat.com>
7214 * Makefile.in (SFILES): Add filestuff.c.
7215 (OBS): Add filestuff.o.
7216 (filestuff.o): New target.
7217 * config.in, configure: Rebuild.
7218 * configure.ac: Check for fdwalk, pipe2.
7220 2013-04-17 Pedro Alves <palves@redhat.com>
7222 * configure.ac (USE_THREAD_DB): Delete variable.
7223 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7224 Don't AC_SUBST USE_THREAD_DB.
7225 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7226 * config.in, configure: Regenerate.
7228 2013-04-16 Pedro Alves <palves@redhat.com>
7230 * linux-low.h (struct lwp_info) <thread_known>: Move under
7231 the USE_THREAD_DB #ifdef.
7233 2013-04-16 Pedro Alves <palves@redhat.com>
7235 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7236 (linux-low.o): Delete rule.
7237 * linux-low.h: Always include "gdb_thread_db.h" instead of
7238 conditionally including thread_db.h.
7239 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7242 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7244 * Makefile.in (install-only): Fix make install regression.
7246 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7248 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7249 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7251 * gdbserver.1: Remove.
7253 2013-03-22 Pedro Alves <palves@redhat.com>
7255 * linux-low.c (handle_extended_wait): Don't call
7256 linux_enable_event_reporting.
7258 2013-03-15 Tony Theodore <tonyt@logyst.com>
7261 * Makefile.in (SHELL): Use @SHELL@.
7263 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7265 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7268 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7270 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7271 Remove extraneous NULL element.
7273 2013-03-13 Yao Qi <yao@codesourcery.com>
7275 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7276 'V' block in trace frame.
7278 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7280 * target.h (struct target_ops): Add btrace ops.
7281 (target_supports_btrace): New macro.
7282 (target_enable_btrace): New macro.
7283 (target_disable_btrace): New macro.
7284 (target_read_btrace): New macro.
7285 * gdbthread.h (struct thread_info): Add btrace field.
7286 * server.c: Include btrace-common.h.
7287 (handle_btrace_general_set): New function.
7288 (handle_btrace_enable): New function.
7289 (handle_btrace_disable): New function.
7290 (handle_general_set): Call handle_btrace_general_set.
7291 (handle_qxfer_btrace): New function.
7292 (struct qxfer qxfer_packets[]): Add btrace entry.
7293 * inferiors.c (remove_thread): Disable btrace.
7294 * linux-low: Include linux-btrace.h.
7295 (linux_low_enable_btrace): New function.
7296 (linux_low_read_btrace): New function.
7297 (linux_target_ops): Add btrace ops.
7298 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7299 Add srv_linux_btrace=yes.
7300 (x86_64-*-linux*): Add linux-btrace.o.
7301 Add srv_linux_btrace=yes.
7302 * configure.ac: Define HAVE_LINUX_BTRACE.
7303 * config.in: Regenerated.
7304 * configure: Regenerated.
7306 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7308 * server.c (handle_qxfer): Preserve error message if -3 is
7310 (qxfer): Document the -3 return value.
7312 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7314 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7315 (linux_btrace_h): New variable.
7316 (linux-btrace.o): New rule.
7318 2013-03-08 Stan Shebs <stan@codesourcery.com>
7319 Hafiz Abid Qadeer <abidh@codesourcery.com>
7321 * tracepoint.c (trace_buffer_size): New global.
7322 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7323 (init_trace_buffer): Change to one-argument function. Allocate
7324 trace buffer memory.
7325 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7326 handle QTBuffer:size packet.
7327 (cmd_bigqtbuffer_size): New function.
7328 (initialize_tracepoint): Call init_trace_buffer with
7329 DEFAULT_TRACE_BUFFER_SIZE.
7330 * server.c (handle_query): Add QTBuffer:size in the
7333 2013-03-07 Yao Qi <yao@codesourcery.com>
7335 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7336 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7338 (cmd_qtsp): Adjust condition. Do post increment.
7339 Set cur_action and cur_step_action back to 0.
7341 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7344 * linux-low.c (linux_write_memory): Return early success if LEN is
7347 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7349 * configure.srv: Add x86_64-*-cygwin* as target.
7351 2013-02-28 Tom Tromey <tromey@redhat.com>
7353 * configure.ac: Invoke AC_SYS_LARGEFILE.
7354 * configure, config.in: Rebuild.
7356 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7358 * win32-low.c: Throughout, fix format strings and casts of
7359 printf-like functions to avoid type related warnings on all
7361 (get_child_debug_event): Print dwDebugEventCode as hex since
7362 that's how it's usually documented.
7364 2013-02-28 Yao Qi <yao@codesourcery.com>
7366 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7369 2013-02-27 Jiong Wang <jiwang@tilera.com>
7371 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7372 (reg-tilegx32.c): New rule.
7373 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7374 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7375 different register info initializer according to elf class.
7376 (init_registers_tilgx32): New function. The tilegx32 register info
7378 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7379 (tile_store_gregset): Likewise.
7381 2013-02-27 Yao Qi <yao@codesourcery.com>
7383 * server.c (process_point_options): Print debug message when
7384 debug_threads is true.
7386 2013-02-26 Yao Qi <yao@codesourcery.com>
7388 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7390 2013-02-19 Pedro Alves <palves@redhat.com>
7391 Kai Tietz <ktietz@redhat.com>
7395 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7396 instead of strtoul to extract address from packet.
7397 (process_serial_event) <'z'>: Likewise.
7399 2013-02-18 Yao Qi <yao@codesourcery.com>
7401 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7403 2013-02-14 Pedro Alves <palves@redhat.com>
7407 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7408 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7410 2013-02-14 Pedro Alves <palves@redhat.com>
7412 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7414 2013-02-14 Pedro Alves <palves@redhat.com>
7416 * tracepoint.c (save_string): Delete.
7417 (add_tracepoint_action): Use savestring instead of save_string.
7419 2013-02-12 Pedro Alves <palves@redhat.com>
7421 * linux-xtensa-low.c: Ditto.
7422 * xtensa-xtregs.c: Ditto.
7424 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7426 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7429 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7431 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7432 aarch64_num_wp_regs and aarch64_num_bp_regs to
7433 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7435 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7437 * linux-aarch64-low.c (ps_get_thread_area): Replace
7438 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7440 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7441 Marcus Shawcroft <marcus.shawcroft@arm.com>
7442 Nigel Stephens <nigel.stephens@arm.com>
7443 Yufeng Zhang <yufeng.zhang@arm.com>
7445 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7446 (aarch64.c, aarch64-without-fpu.c): New targets.
7447 * configure.srv (aarch64*-*-linux*): New.
7448 * linux-aarch64-low.c: New file.
7450 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7452 * linux-low.c (handle_extended_wait, linux_create_inferior)
7453 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7454 (dequeue_one_deferred_signal, linux_resume_one_thread)
7455 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7456 (linux_tracefork_grandchild, linux_test_for_tracefork)
7457 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7458 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7459 where the argument is 0.
7461 2013-01-25 Yao Qi <yao@codesourcery.com>
7463 * event-loop.c: Include "queue.h".
7464 (gdb_event_p): New typedef.
7465 (struct gdb_event) <next_event>: Remove.
7466 (event_queue): Change to QUEUE(gdb_event_p).
7467 (async_queue_event): Remove.
7468 (gdb_event_xfree): New.
7469 (initialize_event_loop): New.
7470 (process_event): Use API from QUEUE.
7471 (wait_for_event): Likewise.
7472 * server.c (main): Call initialize_event_loop.
7473 * server.h (initialize_event_loop): Declare.
7475 2013-01-18 Yao Qi <yao@codesourcery.com>
7477 * ax.h (struct eval_agent_expr_context): New.
7478 (gdb_eval_agent_expr): Update declaration.
7479 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7480 TFRAME. Add new argument CTX.
7481 * server.h (struct eval_agent_expr_context): Declare.
7482 (agent_mem_read, agent_tsv_read): Update declaration.
7483 (agent_mem_read_string): Likewise.
7484 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7485 (add_traceframe_block): Add new argument TPOINT.
7486 Increase TPOINT->traceframe_usage.
7487 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7488 eval_tracepoint_agent_expr.
7489 (condition_true_at_tracepoint): Likewise.
7490 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7491 (agent_mem_read_string, agent_tsv_read): Likewise.
7493 2013-01-16 Yao Qi <yao@codesourcery.com>
7495 * linux-low.c (linux_resume_one_lwp): Don't check
7496 'lwp->bp_reinsert != 0'.
7498 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7499 Pedro Alves <palves@redhat.com>
7501 * lynx-low.c (ptrace_request_to_str): Define a temporary
7502 macro and use it to simplify this function's implementation.
7504 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7506 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7509 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7511 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7513 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7515 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7517 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7519 * lynx-low.c (lynx_resume): Use the resume_info parameter
7520 to determine the ptid for the lynx_ptrace call, unless
7521 it is equal to minus_one_ptid, in which case we use the
7522 ptid of the current_inferior.
7523 (lynx_wait_1): After having received a thread create/exit
7524 event, resume the inferior's execution using the signaling
7525 thread's ptid, rather than the old ptid.
7527 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7529 * lynx-low.c (lynx_resume): Delete variable ret.
7531 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7533 * gdbreplay.c (gdbreplay_version): Update copyright year.
7534 * server.c (gdbserver_version): Likewise.
7536 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7538 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7541 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7543 * lynx-low.c (ptrace_request_to_str): Add handling for
7546 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7548 * lynx-low.c (lynx_attach): Delete variable new_process.
7550 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7552 * lynx-low.c (lynx_create_inferior): Delete variable
7555 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7557 * lynx-low.c (ptrace_request_to_str): Do not handle
7558 PTRACE_GETTHREADLIST if this macro does not exist.
7560 2012-12-15 Yao Qi <yao@codesourcery.com>
7562 * Makefile.in (OBS): Add notif.o.
7563 * notif.c, notif.h: New.
7564 * server.c: Include "notif.h".
7565 (struct vstop_notif) <next>: Remove.
7567 (queue_stop_reply): Update.
7568 (push_event, send_next_stop_reply): Remove.
7569 (discard_queued_stop_replies): Update.
7570 (notif_stop): New variable.
7571 (handle_v_stopped): Remove.
7572 (handle_v_requests): Don't call handle_v_stopped. Call
7573 handle_ack_notif instead.
7574 (queue_stop_reply_callback): Call notif_event_enque instead
7575 of queue_stop_reply.
7576 (handle_status): Don't call send_next_stop_reply, call
7577 notif_write_event instead.
7578 (kill_inferior_callback): Likewise.
7579 (detach_or_kill_inferior_callback): Likewise.
7580 (main): Call initialize_notif.
7581 (process_serial_event): Call QUEUE_is_empty.
7582 (handle_target_event): Call notif_push instead of push event.
7583 * server.h (push_event): Remove declaration.
7585 2012-12-10 Tom Tromey <tromey@redhat.com>
7587 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7588 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7591 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7592 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7593 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7594 (amd64-linux-ipa.o, ax.o): Rewrite.
7595 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7596 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7597 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7598 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7599 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7600 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7601 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7602 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7603 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7604 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7605 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7606 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7607 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7608 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7609 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7610 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7611 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7612 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7613 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7614 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7615 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7616 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7617 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7618 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7619 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7620 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7621 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7622 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7623 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7624 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7625 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7626 (reg-tilegx.o): Remove.
7627 (all_object_files): New macro.
7628 Include .deps files.
7629 * aclocal.m4, configure: Rebuild.
7630 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7631 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7632 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7634 2012-12-05 Tom Tromey <tromey@redhat.com>
7637 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7639 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7641 * configure.ac: Check for linux/perf_event.h.
7642 * config.in: Regenerated.
7643 * configure: Regenerated.
7645 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7647 * hostio.c (handle_readlink): Decrease buffer size
7648 parameter passed to readlink by one byte.
7650 2012-11-26 Yao Qi <yao@codesourcery.com>
7652 * configure.ac (build_warnings): Append '-Wempty-body'.
7653 * configure: Regenerated.
7654 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7657 2012-11-15 Pierre Muller <muller@sourceware.org>
7659 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7660 * config.in: Regenerate.
7661 * configure: Regenerate.
7662 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7663 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7664 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7665 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7667 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7668 instead of <sys/wait.h> header.
7669 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7671 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7673 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7674 (various make rules): Remove -DGDBSERVER
7676 2012-11-09 Yao Qi <yao@codesourcery.com>
7678 * spu-low.c (current_ptid): Move it to ..
7679 * gdbthread.h: ... here. New.
7680 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7681 * server.c (myresume, process_serial_event): Likewise.
7682 * thread-db.c (thread_db_find_new_threads): Likewise.
7683 * tracepoint.c (run_inferior_command): Likewise.
7685 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7687 * server.c (handle_search_memory_1): Include access length in
7690 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7692 * linux-crisv32-low.c: Fix compile errors.
7694 2012-09-04 Yao Qi <yao@codesourcery.com>
7696 * tracepoint.c (cmd_qtsv): Adjust debug message.
7697 Don't check CUR_TPOINT.
7699 2012-08-28 Yao Qi <yao@codesourcery.com>
7701 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7702 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7703 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7704 Remove declarations of xmalloc, xreallloc, xstrdup and
7706 * Makefile.in (libiberty_h): New.
7707 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7708 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7710 2012-08-23 Yao Qi <yao@codesourcery.com>
7712 * server.h: Remove declaration of 'xsnprintf'.
7714 2012-08-22 Keith Seitz <keiths@redhat.com>
7716 * server.h: Include build-gnulib-gbserver/config.h.
7717 * gdbreplay.c: Likewise.
7719 2012-08-08 Doug Evans <dje@google.com>
7721 * Makefile.in (SFILES): Add gdb_vecs.c.
7722 (OBS): Add gdb_vecs.o.
7723 (gdb_vecs_h, host_defs_h): New variables.
7724 (thread-db.o): Add $(gdb_vecs_h) dependency.
7725 (gdb_vecs.o): New rule.
7726 * thread-db.c: #include "gdb_vecs.h".
7727 (thread_db_load_search): Use a vector to iterate over path elements.
7728 Handle text appearing after "$pdir".
7730 * configure.ac: Add check for strstr.
7731 * config.in: Regenerate.
7732 * configure: Regenerate.
7734 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7736 * hostio.c (handle_pread): If pread fails, fall back to attempting
7738 (handle_pwrite): Likewise for pwrite.
7740 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7742 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7743 between unsupported TYPE and unimplementable ADDR/LEN combination.
7744 (arm_insert_point): Act on new return value.
7746 2012-07-31 Pedro Alves <palves@redhat.com>
7748 * server.c (process_point_options): Only skip tokens if we find
7749 one that is unrecognized. Don't treat 'X' specially while
7750 skipping unrecognized tokens.
7752 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7754 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7755 to 4-byte-align HW breakpoint addresses for Thumb.
7757 2012-07-27 Yao Qi <yao@codesourcery.com>
7761 * server.h: Declare gdb_agent_about_to_close.
7762 * target.c (kill_inferior): Include "agent.h".
7763 New. Send command 'kill'.
7764 * target.h (kill_inferior): Removed macro.
7765 * tracepoint.c (gdb_agent_about_to_close): New.
7766 (gdb_agent_helper_thread): Handle command 'close'.
7767 Wait endlessly until the inferior stops.
7768 Install gdb_agent_remove_socket to atexit hook.
7769 (agent_socket_name): New static variable.
7770 (gdb_agent_socket_init): Replace local variable 'name' with
7771 'agent_socket_name'.
7772 (gdb_agent_remove_socket): New.
7774 2012-07-27 Yao Qi <yao@codesourcery.com>
7776 * server.c (process_point_options): Stop at 'X' when parsing.
7778 2012-07-19 Michael Eager <eager@eagercon.com>
7780 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7782 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7783 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7784 hardware breakpoint.
7786 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7788 * gdbserver/linux-low.c (initialize_low): Call
7789 linux_ptrace_init_warnings.
7791 2012-07-02 Doug Evans <dje@google.com>
7793 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7796 2012-07-02 Stan Shebs <stan@codesourcery.com>
7798 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7799 (ax.o): Add it to build rule.
7801 (OBS): Add format.o.
7802 (IPA_OBS): Add format.o.
7803 * server.c (handle_query): Claim support for breakpoint commands.
7804 (process_point_options): Add command case.
7805 (process_serial_event): Leave running if there are printfs in
7807 * mem-break.h (any_persistent_commands): Declare.
7808 (add_breakpoint_commands): Declare.
7809 (gdb_no_commands_at_breakpoint): Declare.
7810 (run_breakpoint_commands): Declare.
7811 * mem-break.c (struct point_command_list): New struct.
7812 (struct breakpoint): New field command_list.
7813 (any_persistent_commands): New function.
7814 (add_commands_to_breakpoint): New function.
7815 (add_breakpoint_commands): New function.
7816 (gdb_no_commands_at_breakpoint): New function.
7817 (run_breakpoint_commands): New function.
7818 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7820 * ax.c: Include format.h.
7821 (ax_printf): New function.
7822 (gdb_eval_agent_expr): Add printf opcode.
7824 2012-06-13 Yao Qi <yao@codesourcery.com>
7826 * server.c (start_inferior): Remove duplicated writes to fields
7827 'last_resume_kind' and 'last_status' of 'current_inferior'.
7829 2012-06-12 Yao Qi <yao@codesourcery.com>
7830 Pedro Alves <palves@redhat.com>
7832 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7834 * server.c (handle_v_cont): Extend comment.
7836 2012-06-11 Yao Qi <yao@codesourcery.com>
7838 * linux-low.c (linux_attach): Add 'static'.
7840 2012-06-06 Yao Qi <yao@codesourcery.com>
7842 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7844 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7846 Fix gcc -flto compilation warning.
7847 * server.c (main): Make variable multi_mode and attach volatile.
7849 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7851 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7852 if the platform doesn't know about it.
7854 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7856 * Makefile.in (SFILES): Add linux-tile-low.c.
7857 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7858 * configure.srv: Handle tilegx-*-linux*.
7859 * linux-tile-low.c: New file.
7861 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7863 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7865 2012-05-24 Pedro Alves <palves@redhat.com>
7869 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7871 2012-05-24 Pedro Alves <palves@redhat.com>
7875 Replace target_signal with gdb_signal throughout.
7877 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7879 * linux-low.c (linux_store_registers): Avoid the copying sequence
7880 when no data has been retrieved by ptrace.
7882 2012-05-22 Will Deacon <will.deacon@arm.com>
7884 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7885 Include asm/ptrace.h.
7886 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7889 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7891 * linux-low.c (linux_store_registers): Don't re-retrieve data
7892 with ptrace that has already been obtained from /proc. Always
7893 copy any data retrieved with ptrace to the buffer supplied.
7895 2012-05-11 Yao Qi <yao@codesourcery.com>
7896 Pedro Alves <palves@redhat.com>
7898 * linux-low.c (enum stopping_threads_kind): New.
7899 (stopping_threads): Change type to `enum stopping_threads_kind'.
7900 (handle_extended_wait): If stopping and suspending threads, leave
7901 the new_lwp suspended too.
7902 (linux_wait_for_event): Adjust.
7903 (stop_all_lwps): Set `stopping_threads' to
7904 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7905 whether we're suspending threads or just stopping them. Assert no
7908 2012-04-29 Yao Qi <yao@codesourcery.com>
7910 * server.h: Move some code to ...
7911 * gdbthread.h: ... here. New.
7912 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7913 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7914 (nto-low.o, win32-low.o): Likewise.
7915 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7916 * regcache.c, remote-utils.c, server.c: Likewise.
7917 * target.c, tracepoint.c, win32-low.c: Likewise.
7919 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7921 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7922 (PTRACE_ARG4_TYPE): Likewise.
7923 (PTRACE_XFER_TYPE): Likewise.
7924 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7925 ptrace to PTRACE_ARG3_TYPE.
7926 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7927 (PTRACE_ARG4_TYPE): Likewise.
7928 (PTRACE_XFER_TYPE): Likewise.
7929 (linux_detach_one_lwp): Cast fourth argument of
7930 ptrace to long then PTRACE_ARG4_TYPE.
7931 (regsets_fetch_inferior_registers): Cast third argument of
7932 ptrace to long then PTRACE_ARG3_TYPE.
7933 (regsets_store_inferior_registers): Likewise.
7935 2012-04-20 Pedro Alves <palves@redhat.com>
7937 * configure: Regenerate.
7939 2012-04-19 Pedro Alves <palves@redhat.com>
7941 * Makefile.in (GNULIB_BUILDDIR): New.
7942 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7943 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7944 (all, install-only, uninstall, clean-info, all-lib, clean): No
7945 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7946 (maintainer-clean realclean distclean): Use subdir_do.
7948 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7949 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7950 * acinclude.m4: Include acx_configure_dir.m4.
7951 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7952 calls. Call AC_PROG_RANLIB. Configure gnulib using
7955 (GNULIB_STDINT_H): Adjust.
7956 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7957 * gdbreplay.c: Include build-gnulib/config.h.
7958 * server.h: Likewise.
7959 * aclocal.m4: Regenerate.
7960 * config.in: Regenerate.
7961 * configure: Regenerate.
7963 2012-04-19 Pedro Alves <palves@redhat.com>
7965 * Makefile.in (LIBGNU, INCGNU): Adjust.
7966 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7967 (all, install-only, uninstall, clean-info, all-lib, clean)
7968 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7969 * configure.ac: Adjust AC_OUTPUT output.
7970 * aclocal.m4: Regenerate.
7971 * configure: Regenerate.
7973 2012-04-19 Pedro Alves <palves@redhat.com>
7975 * Makefile.in (generated_files): New.
7976 (server_h): Remove the explicit dependency on config.h, and depend
7977 on $generated_files.
7979 2012-04-19 Pedro Alves <palves@redhat.com>
7981 * Makefile.in (INCGNU): Add -Ignulib.
7983 2012-04-19 Pedro Alves <palves@redhat.com>
7985 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7986 (INCGNU): ... this, and spell out -I here.
7987 (GNULIB_LIB): Rename to ...
7989 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7991 2012-04-19 Pedro Alves <palves@redhat.com>
7993 * config.in: Regenerate.
7995 2012-04-19 Pedro Alves <palves@redhat.com>
7997 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7998 * server.h (memmem): Remove declaration.
7999 * config.in: Regenerate.
8000 * configure: Regenerate.
8002 2012-04-19 Yao Qi <yao@codesourcery.com>
8004 * Makefile.in (SFILES): Add common/vec.c.
8008 2012-04-19 Yao Qi <yao@codesourcery.com>
8010 * remote-utils.c (prepare_resume_reply): Replace with macro
8011 target_core_of_thread.
8012 * server.c (handle_qxfer_threads_proper): Likewise.
8013 * target.h (traget_core_of_thread): New macro.
8015 2012-04-18 Pedro Alves <palves@redhat.com>
8017 * aclocal.m4: Regenerate.
8018 * configure: Regenerate.
8020 2012-04-16 Yao Qi <yao@codesourcery.com>
8022 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8023 duplicated on address.
8025 2012-04-16 Yao Qi <yao@codesourcery.com>
8027 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8028 (struct tracepoint_action_ops) <send>: New field.
8029 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8030 (agent_expr_send, x_tracepoint_action_send): New.
8031 (l_tracepoint_action_send): New.
8032 (cmd_qtdp): Download and install tracepoint
8033 according to `use_agent'.
8034 (run_inferior_command): Add one more parameter `len'.
8036 (tracepoint_send_agent): New.
8037 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8039 2012-04-16 Yao Qi <yao@codesourcery.com>
8041 * tracepoint.c (download_tracepoints): Moved to ...
8042 (cmd_qtstart): ... here.
8044 2012-04-14 Yao Qi <yao@codesourcery.com>
8046 * tracepoint.c: Include inttypes.h.
8047 (struct collect_memory_action): Use sized types.
8048 (struct tracepoint): Likewise.
8049 (cmd_qtdp, stop_tracing): Update print specifiers.
8050 (cmd_qtp, response_tracepoint): Likewise.
8051 (collect_data_at_tracepoint): Likewise.
8052 (collect_data_at_step): Likewise.
8054 2012-04-14 Yao Qi <yao@codesourcery.com>
8056 Import gnulib module inttypes.
8057 * aclocal.m4, config.in, configure: Regenerated.
8059 2012-04-14 Yao Qi <yao@codesourcery.com>
8061 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8062 Makefile and config.status at last.
8064 2012-04-13 Yao Qi <yao@codesourcery.com>
8066 * tracepoint.c: Include stdint.h unconditionally.
8068 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8070 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8071 on BFD_HAVE_SYS_PROCFS_TYPE.
8072 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8073 * configure: Regenerate.
8074 * config.in: Likewise.
8076 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8078 * Makefile.in (clean): Also remove x32.c x32-linux.c
8079 x32-avx.c x32-avx-linux.c.
8080 (x32.o): New target.
8082 (x32-linux.o): Likewise.
8083 (x32-linux.c): Likewise.
8084 (x32-avx.o): Likewise.
8085 (x32-avx.c): Likewise.
8086 (x32-avx-linux.o): Likewise.
8087 (x32-avx-linux.c): Likewise.
8089 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8090 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8091 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8092 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8093 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8094 i386/x32-avx-linux.xml.
8096 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8097 (init_registers_x32_avx_linux): Likwise.
8098 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8099 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8101 2012-04-13 Pedro Alves <palves@redhat.com>
8103 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8104 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8105 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8106 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8109 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8111 * linux-x86-low.c (compat_x32_clock_t): New.
8112 (compat_x32_siginfo_t): Likewise.
8113 (compat_x32_siginfo_from_siginfo): Likewise.
8114 (siginfo_from_compat_x32_siginfo): Likewise.
8115 (linux_is_elf64): Likewise.
8116 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8117 and siginfo_from_compat_x32_siginfo for x32.
8118 (x86_arch_setup): Set linux_is_elf64.
8120 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8123 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8125 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8126 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8127 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8128 compatible with process.
8130 2012-04-12 Yao Qi <yao@codesourcery.com>
8132 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8133 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8134 (install-only, install-info, clean): Handle sub dir gnulib.
8135 (all-lib, am--refresh): New targets.
8136 (memmem.o): Remove target.
8137 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8138 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8139 (AC_REPLACE_FUNCS): Remove memmem.
8140 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8141 (AC_OUTPUT): Generate Makefile in gnulib/.
8142 * aclocal.m4, config.in, configure: Regenerated.
8144 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8146 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8148 2012-04-05 Pedro Alves <palves@redhat.com>
8150 -Werror=strict-aliasing
8152 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8155 2012-04-04 Pedro Alves <palves@redhat.com>
8157 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8158 (sparc_store_gregset_from_stack, sparc_store_gregset)
8159 (sparc_breakpoint_at): Fix formatting.
8161 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8163 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8165 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8166 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8167 * config.in: Regenerate.
8168 * configure: Likewise.
8170 2012-03-29 Pedro Alves <palves@redhat.com>
8172 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8173 Correct ptrace arguments.
8175 2012-03-28 Pedro Alves <palves@redhat.com>
8177 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8178 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8179 (IA64_FR1_REGNUM): New defines.
8180 (ia64_fetch_register): New.
8181 (the_low_target): Install it.
8182 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8184 * linux-low.c (linux_fetch_registers): Try the
8185 the_low_target.fetch_register hook first.
8187 * linux-arm-low.c (the_low_target): Adjust.
8188 * linux-bfin-low.c (the_low_target): Adjust.
8189 * linux-cris-low.c (the_low_target): Adjust.
8190 * linux-crisv32-low.c (the_low_target): Adjust.
8191 * linux-m32r-low.c (the_low_target): Adjust.
8192 * linux-m68k-low.c (the_low_target): Adjust.
8193 * linux-mips-low.c (the_low_target): Adjust.
8194 * linux-ppc-low.c (the_low_target): Adjust.
8195 * linux-s390-low.c (the_low_target): Adjust.
8196 * linux-sh-low.c (the_low_target): Adjust.
8197 * linux-sparc-low.c (the_low_target): Adjust.
8198 * linux-tic6x-low.c (the_low_target): Adjust.
8199 * linux-x86-low.c (the_low_target): Adjust.
8200 * linux-xtensa-low.c (the_low_target): Adjust.
8202 2012-03-26 Pedro Alves <palves@redhat.com>
8204 * server.c (handle_qxfer_libraries): Don't bail early if
8205 the_target->qxfer_libraries_svr4 is not NULL.
8207 2012-03-26 Pedro Alves <palves@redhat.com>
8209 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8211 2012-03-23 Pedro Alves <palves@redhat.com>
8213 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8214 "library-list-svr4" element's start tag when the the DSO list is
8217 2012-03-23 Pedro Alves <palves@redhat.com>
8219 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8220 a variable whose type size is the same as the inferior's pointer
8223 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8225 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8227 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8228 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8229 * linux-low.h: Include <signal.h>.
8230 (struct siginfo): Remove forward declaration.
8231 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8234 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8236 * .gitignore: Ignore more files.
8238 2012-03-19 Pedro Alves <palves@redhat.com>
8239 Jan Kratochvil <jan.kratochvil@redhat.com>
8241 * server.c (cont_thread, general_thread): Add describing comments.
8242 (start_inferior): Clear `cont_thread'.
8243 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8246 2012-03-15 Yao Qi <yao@codesourcery.com>
8248 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8250 (cmd_qtdp): ... here.
8252 2012-03-15 Yao Qi <yao@codesourcery.com>
8254 * tracepoint.c (struct tracepoint_action_ops): New.
8255 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8256 (m_tracepoint_action_download): New.
8257 (r_tracepoint_action_download): New.
8258 (x_tracepoint_action_download): New.
8259 (l_tracepoint_action_download): New.
8260 (add_tracepoint_action): Install `action->ops' according type.
8261 (download_tracepoint_1): Move code `download' function pointer
8262 of various tracepoint_action_ops.
8264 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8266 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8267 linux_ptrace_attach_warnings.
8269 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8271 * Makefile.in (linux-ptrace.o): New.
8272 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8273 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8274 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8275 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8276 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8278 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8280 2012-03-08 Yao Qi <yao@codesourcery.com>
8281 Pedro Alves <palves@redhat.com>
8283 Fix PR server/13392.
8284 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8286 * tracepoint.c (remove_tracepoint): New.
8287 (cmd_qtdp): Call remove_tracepoint when failed to install.
8289 2012-03-07 Pedro Alves <palves@redhat.com>
8291 * linux-low.c (get_detach_signal): New.
8292 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8293 Pass on pending signals to PTRACE_DETACH. Check the result of the
8295 * server.c (program_signals, program_signals_p): New.
8296 (handle_general_set): Handle QProgramSignals.
8297 * server.h (program_signals, program_signals_p): Declare.
8299 2012-03-05 Pedro Alves <palves@redhat.com>
8300 Jan Kratochvil <jan.kratochvil@redhat.com>
8302 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8305 2012-03-03 Yao Qi <yao@codesourcery.com>
8307 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8308 agent_look_up_symbols.
8310 2012-03-03 Yao Qi <yao@codesourcery.com>
8312 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8313 (linux-x86-low.o): Likewise.
8314 * server.h: Remove in_process_agent_loaded.
8315 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8319 2012-03-03 Yao Qi <yao@codesourcery.com>
8321 * tracepoint.c (gdb_agent_capability): New global.
8322 (in_process_agent_loaded_ust): Renamed to
8323 `in_process_agent_supports_ust'.
8325 (in_process_agent_supports_ust): Call agent_capability_check.
8326 (clear_installed_tracepoints): Assert that agent supports
8329 2012-03-03 Yao Qi <yao@codesourcery.com>
8331 * linux-low.c (linux_supports_agent): New.
8332 (linux_target_ops): Initialize field `supports_agent' with
8333 linux_supports_agent.
8334 * target.h (struct target_ops) <supports_agent>: New.
8335 (target_supports_agent): New macro.
8336 * server.c (handle_general_set): Handle packet 'QAgent'.
8337 (handle_query): Send `QAgent+'.
8338 * Makefile.in (server.o): Depends on agent.h.
8340 2012-03-03 Yao Qi <yao@codesourcery.com>
8342 * Makefile.in (OBS): Add agent.o.
8343 Add new rule for agent.o.
8344 Track dependence of tracepoint.c on agent.h.
8345 * tracepoint.c (run_inferior_command_1):
8346 (run_inferior_command): Call agent_run_command.
8347 (gdb_ust_connect_sync_socket): Deleted. Move it to
8349 (resume_thread, stop_thread): Likewise.
8350 (gdb_ust_socket_init): Renamed to ...
8351 (gdb_agent_socket_init): ... New.
8352 (gdb_ust_thread): Renamed to ...
8353 (gdb_agent_helper_thread): ... New.
8354 (gdb_ust_init): Move some code to ...
8355 (gdb_agent_init): ... here. New.
8356 [HAVE_UST]: Call gdb_ust_init.
8357 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8358 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8359 * config.in, configure: Regenerated.
8361 2012-03-02 Pedro Alves <palves@redhat.com>
8363 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8364 * linux-low.c (struct simple_pid_list): New.
8365 (stopped_pids): New a struct simple_pid_list pointer.
8366 (add_to_pid_list, pull_pid_from_list): New.
8367 (handle_extended_wait): Don't assume the first signal new children
8368 report is SIGSTOP. Adjust call to pull_pid_from_list.
8369 (linux_wait_for_lwp): Adjust.
8371 2012-03-02 Yao Qi <yao@codesourcery.com>
8373 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8376 2012-03-02 Yao Qi <yao@codesourcery.com>
8378 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8379 `stop_pc' and `tpoint'. Update caller.
8381 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8383 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8384 * linux-low.c (use_linux_regsets): New macro.
8385 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8386 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8387 (linux_register_in_regsets): New function.
8388 (usr_fetch_inferior_registers): Skip registers covered by
8390 (usr_store_inferior_registers): Likewise.
8391 (usr_fetch_inferior_registers): New macro.
8392 (usr_store_inferior_registers): Likewise.
8393 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8394 (linux_store_registers): Likewise.
8395 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8397 (init_registers_mips64_dsp_linux): Likewise.
8398 (init_registers_mips_linux): New macro.
8399 (init_registers_mips_dsp_linux): Likewise.
8400 (mips_dsp_num_regs): Likewise.
8401 (DSP_BASE, DSP_CONTROL): New fallback macros.
8402 (mips_base_regs): New macro.
8403 (mips_regmap): Use it. Fix the size.
8404 (mips_dsp_regmap): New variable.
8405 (mips_dsp_regset_bitmap): Likewise.
8406 (mips_arch_setup): New function.
8407 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8409 (mips_cannot_store_register): Likewise.
8410 (the_low_target): Update .arch_setup, .num_regs and .regmap
8411 initializers. Add .regset_bitmap initializer.
8412 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8414 * linux-bfin-low.c (the_low_target): Likewise.
8415 * linux-cris-low.c (the_low_target): Likewise.
8416 * linux-crisv32-low.c (the_low_target): Likewise.
8417 * linux-ia64-low.c (the_low_target): Likewise.
8418 * linux-m32r-low.c (the_low_target): Likewise.
8419 * linux-m68k-low.c (the_low_target): Likewise.
8420 * linux-ppc-low.c (the_low_target): Likewise.
8421 * linux-s390-low.c (the_low_target): Likewise.
8422 * linux-sh-low.c (the_low_target): Likewise.
8423 * linux-sparc-low.c (the_low_target): Likewise.
8424 * linux-tic6x-low.c (the_low_target): Likewise.
8425 * linux-x86-low.c (the_low_target): Likewise.
8426 * linux-xtensa-low.c (the_low_target): Likewise.
8427 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8428 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8429 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8431 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8432 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8434 2012-02-29 Yao Qi <yao@codesourcery.com>
8435 Pedro Alves <palves@redhat.com>
8437 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8438 `step_over_finished' is true.
8440 2012-02-27 Pedro Alves <palves@redhat.com>
8442 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8443 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8445 2012-02-27 Pedro Alves <palves@redhat.com>
8448 * linux-low.c (pid_is_stopped): New.
8449 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8451 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8453 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8456 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8458 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8460 2012-02-24 Luis Machado <lgustavo@codesourcery>
8462 * server.c (handle_query): Advertise support for target-side
8463 breakpoint condition evaluation.
8464 (process_point_options): New function.
8465 (process_serial_event): When inserting a breakpoint, check for
8466 a target-side condition that should be evaluated.
8468 * mem-break.c: Include regcache.h and ax.h.
8469 (point_cond_list_t): New data structure.
8470 (breakpoint) <cond_list>: New field.
8471 (find_gdb_breakpoint_at): Make non-static.
8472 (delete_gdb_breakpoint_at): Clear any target-side
8474 (clear_gdb_breakpoint_conditions): New function.
8475 (add_condition_to_breakpoint): Likewise.
8476 (add_breakpoint_condition): Likewise.
8477 (gdb_condition_true_at_breakpoint): Likewise.
8478 (gdb_breakpoint_here): Return result directly instead
8479 of going through a local variable.
8481 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8482 (clear_gdb_breakpoint_conditions): Likewise.
8483 (add_breakpoint_condition): Likewise.
8484 (gdb_condition_true_at_breakpoint): Likewise.
8486 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8487 (need_step_over_p): Take target-side breakpoint condition into
8490 2012-02-24 Luis Machado <lgustavo@codesourcery>
8492 * server.h: Include tracepoint.h.
8493 (agent_mem_read, agent_get_trace_state_variable_value,
8494 agent_set_trace_state_variable_value,
8495 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8496 get_set_tsv_func_addr): New prototypes.
8498 * ax.h: New include file.
8499 * ax.c: New source file.
8501 * tracepoint.c: Include ax.h.
8502 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8503 agent_expr, eval_result_type): Move to ax.h.
8504 (parse_agent_expr): Rename to ...
8505 (gdb_parse_agent_expr): ... this, make it non-static and move
8507 (unparse_agent_expr) Rename to ...
8508 (gdb_unparse_agent_expr): ... this, make it non-static and move
8510 (eval_agent_expr): Rename to ...
8511 (eval_tracepoint_agent_expr): ... this.
8512 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8513 forward declarations.
8514 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8515 (agent_get_trace_state_variable_value): New function.
8516 (agent_set_trace_state_variable_value): New function.
8517 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8518 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8519 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8520 (condition_true_at_tracepoint): Likewise.
8521 (parse_agent_expr): Rename to ...
8522 (gdb_parse_agent_expr): ... this and move to ax.c.
8523 (unparse_agent_expr): Rename to ...
8524 (gdb_unparse_agent_expr): ... this and move to ax.c.
8525 (gdb_agent_op_name): Move to ax.c.
8526 (eval_agent_expr): Rename to ...
8527 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8529 (eval_tracepoint_agent_expr): New function.
8530 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8532 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8534 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8535 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8536 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8537 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8538 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8539 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8540 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8541 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8542 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8543 (compile_bytecodes): Remove forward declaration.
8544 (is_goto_target): Move to ax.c.
8545 (compile_bytecodes): Move to ax.c and call
8546 agent_get_trace_state_variable_value (...) and
8547 agent_set_trace_state_variable_value (...).
8549 * Makefile.in: Update ax.c and IPA dependencies.
8551 2012-02-24 Pedro Alves <palves@redhat.com>
8553 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8554 (cmd_bigqtbuffer_circular): ... this. Only handle
8555 'QTBuffer:circular:'.
8556 (handle_tracepoint_general_set): Adjust.
8558 2012-02-16 Yao Qi <yao@codesourcery.com>
8560 * inferiors.c: Move code to ...
8561 * dll.c: .... here. New.
8562 * server.h: Declare clear_dlls.
8563 * Makefile.in (SFILES): Add dll.c.
8567 2012-02-11 Yao Qi <yao@codesourcery.com>
8569 * server.c: (handle_monitor_command): Add a new parameter
8571 (handle_query): Update caller.
8573 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8575 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8576 * configure, config.in: Regenerate.
8577 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8580 2012-02-02 Pedro Alves <palves@redhat.com>
8582 Try SIGKILL first, then PTRACE_KILL.
8583 * linux-low.c (linux_kill_one_lwp): New.
8584 (linux_kill_one_lwp): Rename to ...
8585 (kill_one_lwp_callback): ... this. Use the new
8588 2012-02-02 Pedro Alves <palves@redhat.com>
8590 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8593 2012-01-27 Pedro Alves <palves@redhat.com>
8595 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8596 (elf_64_file_p): Make static.
8597 (linux_pid_exe_is_elf_64_file): New.
8598 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8599 Delete declarations.
8600 (linux_pid_exe_is_elf_64_file): Declare.
8601 * linux-x86-low.c (x86_arch_setup): Use
8602 linux_pid_exe_is_elf_64_file.
8604 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8606 * linux-low.c (linux_wait_for_event_1): Rename to ...
8607 (linux_wait_for_event): ... here and merge it with former
8608 linux_wait_for_event - new variable wait_ptid, use it.
8609 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8611 2012-01-23 Pedro Alves <palves@redhat.com>
8613 * server.c (main): Avoid yet another case of infinite loop while
8614 detaching/killing after a longjmp.
8616 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8619 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8621 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8623 * hostio.c (handle_readlink): New function.
8624 (handle_vFile): Call it to handle "vFile:readlink" packets.
8626 2012-01-20 Pedro Alves <palves@redhat.com>
8627 Ulrich Weigand <ulrich.weigand@linaro.org>
8629 * server.c (handle_v_requests): Only support vAttach and vRun to
8630 start multiple processes when in extended protocol mode.
8632 2012-01-17 Pedro Alves <palves@redhat.com>
8634 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8635 memalign plus mprotect to allocate the scratch buffer.
8637 2012-01-13 Pedro Alves <palves@redhat.com>
8639 * server.c (attach_inferior): Clear `cont_thread'.
8641 2012-01-13 Pedro Alves <palves@redhat.com>
8643 * server.c (main): Avoid infinite loop while detaching/killing
8646 2012-01-09 Doug Evans <dje@google.com>
8648 * server.c (start_inferior): Set last_ptid in --wrapper case.
8650 2012-01-06 Yao Qi <yao@codesourcery.com>
8652 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8654 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8656 2012-01-04 Yao Qi <yao@codesourcery.com>
8658 * tracepoint.c (cmd_qtdp): Print debug message
8659 for static tracepoint.
8661 2012-01-04 Yao Qi <yao@codesourcery.com>
8663 * tracepoint.c (trace_vdebug): Differentiate debug message
8664 between gdbserver and IPA.
8666 2012-01-03 Yao Qi <yao@codesourcery.com>
8668 * tracepoint.c (tracepoint_was_hit): Don't collect for
8671 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8673 * terminal.h: Reformat copyright header.
8675 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8677 * server.c (gdbserver_version): Update copyright year.
8678 * gdbreplay.c (gdbreplay_version): Likewise.
8680 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8682 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8685 2011-12-18 Hui Zhu <teawater@gmail.com>
8686 * linux-low.c (linux_create_inferior): Save return value to ret.
8688 2011-12-18 Hui Zhu <teawater@gmail.com>
8690 * linux-low.c (linux_create_inferior): Save return value to ret.
8692 2011-12-16 Doug Evans <dje@google.com>
8694 * linux-low.c (linux_create_inferior): If stdio connection,
8695 redirect stdin from /dev/null, stdout to stderr.
8696 * remote-utils.c (remote_is_stdio): New static global.
8697 (remote_connection_is_stdio): New function.
8698 (remote_prepare): Handle stdio connection.
8699 (remote_open): Ditto.
8700 (remote_close): Don't close stdin for stdio connections.
8701 (read_prim,write_prim): New functions. Replace all calls to
8702 read/write to these.
8703 * server.c (main): Watch for "-" argument. Move call to
8704 remote_prepare before start_inferior.
8705 * server.h (STDIO_CONNECTION_NAME): New macro.
8706 (remote_connection_is_stdio): Declare.
8708 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8709 in debugging output.
8711 2011-12-15 Yao Qi <yao@codesourcery.com>
8713 * tracepoint.c: Include sys/syscall.h.
8714 (gdb_ust_thread): Remove preprocessor conditional.
8716 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8718 * linux-low.c (linux_detach_one_lwp): Call
8719 the_low_target.prepare_to_resume before detaching.
8721 2011-12-14 Yao Qi <yao@codesourcery.com>
8723 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8726 2011-12-14 Yao Qi <yao@codesourcery.com>
8728 * i386-low.c (i386_low_stopped_data_address): Initialize local
8731 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8735 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8736 DR_CONTROL unless necessary. Extend comments.
8737 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8738 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8740 2011-12-13 Yao Qi <yao@codesourcery.com>
8742 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8744 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8746 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8748 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8749 Print new debug message for such case.
8751 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8753 Fix overlapping memcpy.
8754 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8755 the read_inferior_memory transfer.
8756 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8757 write_inferior_memory transfer.
8758 (set_fast_tracepoint_jump): New variable buf. Use it for the
8759 read_inferior_memory and write_inferior_memory transfers.
8760 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8761 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8762 Use it for the write_inferior_memory transfer.
8763 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8766 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8768 * linux-low.c (fetch_register, store_register): Make code
8769 consistent, fix formatting.
8771 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8773 * linux-low.c (usr_store_inferior_registers): Factor out code
8774 to handle individual registers into...
8775 (store_register): ... this new function.
8777 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8779 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8780 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8781 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8782 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8783 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8784 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8785 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8786 (srv_xmlfiles): Add new XML files.
8788 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8790 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8791 (init_registers_s390_linux32v1): Add prototype.
8792 (init_registers_s390_linux32v2): Likewise.
8793 (init_registers_s390_linux64v1): Likewise.
8794 (init_registers_s390_linux64v2): Likewise.
8795 (init_registers_s390x_linux64v1): Likewise.
8796 (init_registers_s390x_linux64v2): Likewise.
8797 (s390_num_regs): Increment to 52.
8798 (s390_regmap): Add orig_r2 register.
8799 (s390_num_regs_3264): Increment to 68.
8800 (s390_regmap_3264): Add orig_r2 register.
8801 (s390_collect_ptrace_register): Handle orig_r2 register.
8802 (s390_supply_ptrace_register): Likewise.
8803 (s390_fill_last_break): New function.
8804 (s390_store_last_break): Likewise.
8805 (s390_fill_system_call): New function.
8806 (s390_store_system_call): Likewise.
8807 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8809 (s390_check_regset): New function.
8810 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8811 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8812 Update target_regsets for available register sets.
8814 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8815 Jan Kratochvil <jan.kratochvil@redhat.com>
8817 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8818 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8820 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8821 * linux-low.h (struct process_info_private): New member r_debug.
8822 * server.c (handle_qxfer_libraries): Call
8823 the_target->qxfer_libraries_svr4.
8824 (handle_qxfer_libraries_svr4): New function.
8825 (qxfer_packets): New entry "libraries-svr4".
8826 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8827 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8828 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8829 PACKET_qXfer_libraries_svr4.
8831 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8833 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8834 PSW address/mask between 8-byte and 16-byte formats.
8835 (s390_supply_ptrace_register): Likewise.
8836 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8837 basic addressing mode bit.
8839 2011-11-24 Stan Shebs <stan@codesourcery.com>
8841 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8843 2011-11-17 Stan Shebs <stan@codesourcery.com>
8845 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8846 (tracing_start_time): New global.
8847 (tracing_stop_time): New global.
8848 (tracing_user_name): New global.
8849 (tracing_notes): New global.
8850 (tracing_stop_note): New global.
8851 (cmd_qtstart): Set traceframe_usage, start_time.
8852 (stop_tracing): Set stop_time.
8853 (cmd_qtstatus): Report additional status.
8854 (cmd_qtp): New function.
8855 (handle_tracepoint_query): Call it.
8856 (cmd_qtnotes): New function.
8857 (handle_tracepoint_general_set): Call it.
8858 (get_timestamp): Rename from tsv_get_timestamp.
8860 2011-11-14 Stan Shebs <stan@codesourcery.com>
8861 Kwok Cheung Yeung <kcy@codesourcery.com>
8863 * linux-x86-low.c (small_jump_insn): New.
8864 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8865 trampoline and error message, build a trampoline and issue a small
8866 jump instruction to it.
8867 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8868 trampoline and error message.
8869 (x86_get_min_fast_tracepoint_insn_len): New.
8870 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8871 * linux-low.h (struct linux_target_ops): Add arguments to
8872 install_fast_tracepoint_jump_pad operation, add new operation.
8873 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8875 (linux_get_min_fast_tracepoint_insn_len): New function.
8876 (linux_target_op): Add new operation.
8877 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8878 (gdb_trampoline_buffer_end): Ditto.
8879 (gdb_trampoline_buffer_error): Ditto.
8880 (struct ipa_sym_addresses): Add fields for new IPA variables.
8881 (symbol_list): Add entries for new IPA variables.
8882 (struct tracepoint): Add fields to hold the address range of the
8883 trampoline used by the tracepoint.
8884 (trampoline_buffer_head): New static variable.
8885 (trampoline_buffer_tail): Ditto.
8886 (claim_trampoline_space): New function.
8887 (have_fast_tracepoint_trampoline_buffer): New function.
8888 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8890 (install_fast_tracepoint): Ditto, also add error buffer argument.
8891 (cmd_qtminftpilen): New function.
8892 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8893 (fast_tracepoint_from_trampoline_address): New function.
8894 (fast_tracepoint_collecting): Handle trampoline as part of jump
8896 (set_trampoline_buffer_space): New function.
8897 (initialize_tracepoint): Initialize new IPA variables.
8898 * target.h (struct target_ops): Add arguments to
8899 install_fast_tracepoint_jump_pad operation, add new
8900 get_min_fast_tracepoint_insn_len operation.
8901 (target_get_min_fast_tracepoint_insn_len): New.
8902 (install_fast_tracepoint_jump_pad): Add arguments.
8903 * server.h (IPA_BUFSIZ): Define.
8904 * linux-i386-ipa.c: Include extra header files.
8905 (initialize_fast_tracepoint_trampoline_buffer): New function.
8906 (initialize_low_tracepoint): Call it.
8907 * server.h (set_trampoline_buffer_space): Declare.
8908 (claim_trampoline_space): Ditto.
8909 (have_fast_tracepoint_trampoline_buffer): Ditto.
8911 2011-11-14 Yao Qi <yao@codesourcery.com>
8913 * server.c (handle_query): Handle InstallInTrace for qSupported.
8914 * tracepoint.c (add_tracepoint): Sort list.
8915 (install_tracepoint, download_tracepoint): New.
8916 (cmd_qtdp): Call them to install and download tracepoints.
8917 (sort_tracepoints): Removed.
8918 (cmd_qtstart): Update.
8920 2011-11-14 Yao Qi <yao@codesourcery.com>
8922 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8923 * mem-break.h: Declare.
8924 * tracepoint.c (cmd_qtstart): Move some code to ...
8925 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8927 (download_tracepoints): Move some code to ...
8928 (download_tracepoint_1): ... here. New.
8930 2011-11-08 Yao Qi <yao@codesourcery.com>
8932 * remote-utils.c (relocate_instruction): A comment fix.
8934 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8936 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8937 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8938 dr_status_mirror and dr_control_mirror from debug_reg_state.
8939 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8940 (i386_initial_stuff): Remove use of deleted globals.
8941 (i386_get_thread_context, i386_set_thread_context,
8942 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8943 from debug_reg_state.
8945 2011-11-05 Yao Qi <yao@codesourcery.com>
8947 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8948 address as TPOINT's.
8950 2011-11-02 Stan Shebs <stan@codesourcery.com>
8952 * tracepoint.c (agent_mem_read_string): New function.
8953 (eval_agent_expr): Call it for tracenz.
8954 * server.c (handle_query): Report support for tracenz.
8956 2011-11-02 Yao Qi <yao@codesourcery.com>
8958 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8960 2011-11-02 Yao Qi <yao@codesourcery.com>
8962 * target.h: Fix a typo in comment.
8964 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8966 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8967 clobber the breakpoints' shadows with fast tracepoint jumps.
8968 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8969 * target.c (write_inferior_memory): Also pass MYADDR down to
8972 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8974 * configure.ac: Check support for personality routine.
8975 * configure: Regenerate.
8976 * config.in: Likewise.
8977 * linux-low.c: Include <sys/personality.h>.
8978 Define ADDR_NO_RANDOMIZE if necessary.
8979 (linux_create_inferior): Disable address space randomization when
8980 forking inferior, if requested.
8981 (linux_supports_disable_randomization): New function.
8982 (linux_target_ops): Install it.
8983 * server.h (disable_randomization): Declare.
8984 * server.c (disable_randomization): New global variable.
8985 (handle_general_set): Handle QDisableRandomization.
8986 (handle_query): Likewise for qSupported.
8987 (main): Support --disable-randomization and --no-disable-randomization
8988 command line arguments.
8989 * target.h (struct target_ops): Add supports_disable_randomization.
8990 (target_supports_disable_randomization): New macro.
8992 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8994 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8996 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8997 [!PT_GETDSBT] (target_loadmap): New definition.
8998 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8999 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9000 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9001 and PT_GETDSBT to LINUX_LOADMAP.
9002 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9003 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9005 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9007 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9008 (arm_linux_hwbp_cap): New static variable.
9009 (arm_linux_get_hwbp_cap): Replace by ...
9010 (arm_linux_init_hwbp_cap): ... this new function.
9011 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9012 (arm_linux_get_hw_watchpoint_count): Likewise.
9013 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9014 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9015 (arm_prepare_to_resume): Use perror_with_name instead of error.
9017 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9019 * linux-arm-low.c: Include <signal.h>.
9020 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9021 (struct arm_linux_hwbp_cap): New data type.
9022 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9023 (struct arm_linux_hw_breakpoint): New data type.
9024 (MAX_BPTS, MAX_WPTS): Define.
9025 (struct arch_process_info, struct arch_lwp_info): New data types.
9026 (arm_linux_get_hwbp_cap): New function.
9027 (arm_linux_get_hw_breakpoint_count): Likewise.
9028 (arm_linux_get_hw_watchpoint_count): Likewise.
9029 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9030 (arm_hwbp_control_initialize): Likewise.
9031 (arm_hwbp_control_is_enabled): Likewise.
9032 (arm_hwbp_control_is_initialized): Likewise.
9033 (arm_hwbp_control_disable): Likewise.
9034 (arm_linux_hw_breakpoint_equal): Likewise.
9035 (arm_linux_hw_point_initialize): Likewise.
9036 (struct update_registers_data): New data structure.
9037 (update_registers_callback: New function.
9038 (arm_insert_point): Likewise.
9039 (arm_remove_point): Likewise.
9040 (arm_stopped_by_watchpoint): Likewise.
9041 (arm_stopped_data_address): Likewise.
9042 (arm_new_process): Likewise.
9043 (arm_new_thread): Likewise.
9044 (arm_prepare_to_resume): Likewise.
9045 (the_low_target): Register arm_insert_point, arm_remove_point,
9046 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9047 arm_new_thread, and arm_prepare_to_resume.
9049 2011-09-15 Stan Shebs <stan@codesourcery.com>
9051 * server.h (struct emit_ops): Add compare-goto fields.
9052 * tracepoint.c (gdb_agent_op_sizes): New table.
9053 (emit_eq_goto): New function.
9054 (emit_ne_goto): New function.
9055 (emit_lt_goto): New function.
9056 (emit_le_goto): New function.
9057 (emit_gt_goto): New function.
9058 (emit_ge_goto): New function.
9059 (is_goto_target): New function.
9060 (compile_bytecodes): Recognize special cases of compare-goto
9061 combinations and call specialized emitters for them.
9062 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9063 (amd64_emit_ne_goto): New function.
9064 (amd64_emit_lt_goto): New function.
9065 (amd64_emit_le_goto): New function.
9066 (amd64_emit_gt_goto): New function.
9067 (amd64_emit_ge_goto): New function.
9068 (amd64_emit_ops): Add the new functions.
9069 (i386_emit_eq_goto): New function.
9070 (i386_emit_ne_goto): New function.
9071 (i386_emit_lt_goto): New function.
9072 (i386_emit_le_goto): New function.
9073 (i386_emit_gt_goto): New function.
9074 (i386_emit_ge_goto): New function.
9075 (i386_emit_ops): Add the new functions.
9077 2011-09-08 Stan Shebs <stan@codesourcery.com>
9079 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9080 (i386_emit_epilogue): Restore %ebx.
9082 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9084 * server.c (step_thread): Remove definition.
9085 (process_serial_event): Don't handle Hs.
9086 * server.h (step_thread): Remove declaration.
9087 * target.c (set_desired_inferior): Remove use of step_thread.
9089 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9091 * linux-low.c: Include linux-procfs.h.
9092 (linux_attach_lwp_1): Update comments.
9093 (linux_attach): Scan for existing threads when attaching to a
9094 process that is the tgid.
9095 * Makefile.in: Update dependencies.
9097 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9099 * configure.srv: Add linux-procfs.o dependencies.
9101 2011-08-14 Yao Qi <yao@codesourcery.com>
9103 * target.h (struct target_ops): Fix indent.
9104 * win32-low.c (win32_target_ops): Fix comment.
9106 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9107 Yao Qi <yao@codesourcery.com>
9109 * Makefile.in (clean): Remove tic6x-*.c files.
9110 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9111 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9112 (tic6x-c64xp-linux.c): Likewise.
9113 * configure.srv: Add support for tic6x-*-uclinux.
9114 * linux-tic6x-low.c: New.
9115 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9117 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9118 Yao Qi <yao@codesourcery.com>
9120 * target.h (struct target_ops): Add read_loadmap.
9121 * linux-low.c (struct target_loadseg): New type.
9122 (struct target_loadmap): New type.
9123 (linux_read_loadmap): New function.
9124 (linux_target_ops): Add linux_read_loadmap.
9125 * server.c (handle_query): Support qXfer:fdpic:read packet.
9126 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9129 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9131 * win32-low.c: Include <stdint.h>.
9133 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9135 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9136 to the inferior here.
9137 (i386_remove_aligned_watchpoint): Ditto.
9138 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9139 fit part of the watchpoint in the debug registers.
9140 (i386_update_inferior_debug_regs): New.
9141 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9142 registers, and only update the inferior on success.
9143 (i386_low_remove_watchpoint): Ditto.
9145 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9147 * linux-low.c (compare_ints, unique, list_threads, show_process,
9148 linux_core_of_thread): Delete.
9149 (linux_target_ops): Change linux_core_of_thread to
9150 linux_common_core_of_thread.
9151 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9152 * utils.c (malloc_failure): Change type of argument.
9153 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9154 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9155 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9156 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9157 (IPA_OBJS): Add common-utils-ipa.o.
9158 (ptid_h, linux_osdata_h): New macros.
9159 (server_h): Add common/common-utils.h, common/xml-utils.h,
9160 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9162 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9163 ptid.o, buffer.o): New rules.
9164 (linux-low.o): Add common/linux-osdata.h as a dependency.
9165 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9166 * configure.ac: Add AC_HEADER_DIRENT check.
9167 * config.in: Regenerate.
9168 * configure: Regenerate.
9169 * remote-utils.c (xml_escape_text): Delete.
9170 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9171 buffer_xml_printf): Move to common/buffer.c.
9172 * server.c (main): Remove call to initialize_inferiors.
9173 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9174 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9175 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9176 internal_error, gdb_assert, gdb_assert_fail): Delete.
9177 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9178 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9180 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9181 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9182 initialize_inferiors): Delete.
9184 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9186 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9189 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9191 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9193 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9195 2011-05-26 Yao Qi <yao@codesourcery.com>
9197 * Makefile.in (thread-db.o): Track dependence to
9198 common/gdb_thread_db.h.
9199 * thread-db.c: include gdb_thread_db.h from right place.
9201 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9203 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9204 __FILE__ and __LINE__ to internal_error.
9206 2011-05-13 Doug Evans <dje@google.com>
9208 * thread-db.c (try_thread_db_load_from_sdir): New function.
9209 (try_thread_db_load_from_dir): New function.
9210 (thread_db_load_search): Handle $sdir, ignore $pdir.
9211 Remove trying of system directories if search of
9212 libthread-db-search-path fails, that is now done via $sdir.
9214 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9216 * server.c (handle_query): Add EnableDisableTracepoints to the list
9217 of supported features.
9218 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9220 (cmd_qtenable_disable): New.
9221 (cmd_qtstart): Install tracepoints even if disabled.
9222 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9223 receiving a QTEnable or QTDisable packet.
9224 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9225 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9227 (gdb_probe): Skip data collection if static tracepoint is disabled.
9229 2011-05-10 Doug Evans <dje@google.com>
9231 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9233 2011-05-04 Doug Evans <dje@google.com>
9235 * linux-low.c (linux_join): Skip process lookup.
9236 * spu-low.c (spu_join): Ditto.
9237 * server.c (join_inferiors_callback): Delete.
9238 (process_serial_event): For 'D' packet (detach) call join_inferior
9241 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9243 * README: Don't mention xscale*-*-linux*.
9244 * configure.srv (xscale*-*-linux*): Don't handle target.
9246 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9248 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9250 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9251 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9252 (i386_emit_void_call_2): Likewise.
9254 2011-04-26 Yao Qi <yao@codesourcery.com>
9256 * linux-low.c: Move common macros to linux-ptrace.h.
9257 Include linux-ptrace.h.
9258 * Makefile.in (linux_ptrace_h): New.
9259 (linux-low.o): Depends on linux-ptrace.h.
9261 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9263 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9264 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9265 (remote_prepare): New function with most of the TCP code from ...
9266 (remote_open): ... here. Detect PORT here unconditionally. Move also
9267 setting transport_is_reliable.
9268 * server.c (run_once): New variable.
9269 (gdbserver_usage): Document it.
9270 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9271 the first run if RUN_ONCE.
9272 * server.h (run_once, remote_prepare): New declarations.
9274 2011-04-19 Tom Tromey <tromey@redhat.com>
9276 * win32-low.c (handle_load_dll): Remove duplicate "the".
9278 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9280 Remove support for old Cygwin 1.5 versions.
9281 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9282 function to avoid warning.
9283 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9286 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9288 * gdbserver/server.h (Macro _): Define it if not available.
9290 2011-03-14 Michael Snyder <msnyder@vmware.com>
9292 * hostio.c (handle_close): Remove unnecessary null test.
9294 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9296 * Makefile.in (maintainer-clean realclean distclean): Remove
9297 "make ... subdir_do" command.
9299 2011-03-10 Michael Snyder <msnyder@vmware.com>
9301 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9303 * server.c (handle_v_run): Free alloced buffer on early return.
9305 2011-03-09 Yao Qi <yao@codesourcery.com>
9308 2011-03-04 Yao Qi <yao@codesourcery.com>
9310 * Makefile.in: Remove GNU make feature --directory.
9312 2011-03-05 Yao Qi <yao@codesourcery.com>
9314 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9315 (subdir_do): New make target. Copied from gdb/Makefile.
9316 (maintainer-clean, realclean, distclean, clean): Call corresponding
9317 make targets in common/Makefile.
9319 2011-02-11 Yao Qi <yao@codesourcery.com>
9321 * configure.ac: Call AC_PROG_RANLIB.
9322 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9323 * configure: Regenerate.
9325 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9327 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9329 2011-03-06 Yao Qi <yao@codesourcery.com>
9331 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9333 2011-03-05 Yao Qi <yao@codesourcery.com>
9335 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9336 (subdir_do): New make target. Copied from gdb/Makefile.
9337 (maintainer-clean, realclean, distclean, clean): Call corresponding
9338 make targets in common/Makefile.
9340 2011-03-04 Yao Qi <yao@codesourcery.com>
9342 * Makefile.in: Remove GNU make feature --directory.
9344 2011-03-04 Michael Snyder <msnyder@vmware.com>
9346 * server.c (queue_stop_reply): Call xmalloc not malloc.
9348 2011-03-02 Michael Snyder <msnyder@vmware.com>
9350 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9352 2011-02-28 Michael Snyder <msnyder@vmware.com>
9354 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9355 (cmd_qtframe): Ditto.
9356 (cmd_qtbuffer): Ditto.
9357 (cmd_bigqtbuffer): Ditto.
9359 * utils.c (decimal2str): Initialize 'width' to nine, then
9362 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9364 * hostio.c (require_data): Free *data, not data.
9366 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9368 * hostio.c (require_data): Use free, not xfree.
9370 2011-02-27 Michael Snyder <msnyder@vmware.com>
9372 * server.c (handle_query): Discard unused value.
9374 * hostio.c (require_data): Free malloc memory before returning
9377 2011-02-26 Michael Snyder <msnyder@vmware.com>
9379 * linux-low.c (list_threads): Call closedir for dirent.
9381 2011-02-27 Michael Snyder <msnyder@vmware.com>
9383 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9384 a case statement falls through.
9386 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9388 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9391 2011-02-26 Michael Snyder <msnyder@vmware.com>
9393 * utils.c (decimal2str): Eliminate dead code and dead param.
9394 (pulongest): Drop dead param from call to decimal2str.
9397 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9399 Revert the following patch (not approved yet):
9400 2011-02-21 Hui Zhu <teawater@gmail.com>
9401 * tracepoint.c (tp_printf): New function.
9402 (eval_agent_expr): Handle gdb_agent_op_printf.
9404 2011-02-21 Hui Zhu <teawater@gmail.com>
9406 * tracepoint.c (tp_printf): New function.
9407 (eval_agent_expr): Handle gdb_agent_op_printf.
9409 2011-02-18 Tom Tromey <tromey@redhat.com>
9411 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9412 (tracepoint.o): Likewise.
9413 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9414 (gdb_agent_op_names): Likewise.
9416 2011-02-18 Tom Tromey <tromey@redhat.com>
9418 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9419 gdb_agent_op_rot>: New constants.
9420 (gdb_agent_op_names): Add pick and roll.
9421 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9424 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9426 * aclocal.m4: Regenerated with aclocal-1.11.1.
9428 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9430 * server.c (handle_qxfer_traceframe_info): New.
9431 (qxfer_packets): Register "traceframe-info".
9432 (handle_query): Report support for qXfer:traceframe-info:read+.
9433 * tracepoint.c (match_blocktype): New.
9434 (traceframe_find_block_type): Rename to ...
9435 (traceframe_walk_blocks): ... this. Add callback filter argument,
9437 (traceframe_find_block_type): New, reimplemented on top of
9438 traceframe_walk_blocks.
9439 (build_traceframe_info_xml): New.
9440 (traceframe_read_info): New.
9441 * server.h (traceframe_read_info): Declare.
9443 2011-02-11 Yao Qi <yao@codesourcery.com>
9445 * configure.ac: Call AC_PROG_RANLIB.
9446 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9447 * configure: Regenerate.
9449 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9451 * server.c (gdb_read_memory): Change return semantics to allow
9453 (handle_search_memory_1): Adjust.
9454 (process_serial_event) <'m' packet>: Handle partial transfers.
9455 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9457 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9459 * regcache.c (init_register_cache): Initialize
9460 regcache->register_status.
9461 (free_register_cache): Release regcache->register_status.
9462 (regcache_cpy): Copy register_status.
9463 (registers_to_string): Print 'x's for unavailable registers.
9464 (supply_register): Mark the register's status valid or
9465 unavailable, depending on whether a buffer was passed in or not.
9466 (supply_register_zeroed): New.
9467 (supply_regblock): Mark the registers' status valid or
9468 unavailable, depending on whether a buffer was passed in or not.
9469 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9470 (struct regcache): New `register_status' field.
9471 (supply_register_zeroed): Declare.
9472 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9473 supply_register_zeroed, rather than passing a NULL buffer to
9475 * tracepoint.c (fetch_traceframe_registers): Update comment.
9477 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9479 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9482 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9484 * server.h (decode_xfer_write): Change prototype.
9485 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9486 and don't extract the annex here.
9487 * server.c (decode_xfer_read): Remove `annex' parameter,
9488 and don't extract the annex here.
9490 (struct qxfer): New.
9491 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9492 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9493 (handle_qxfer_statictrace): New functions, abstracted out from
9494 handle_query, and made to use the struct qxfer interface.
9495 (handle_threads_qxfer_proper): Rename to ...
9496 (handle_qxfer_threads_proper): ... this.
9497 (handle_threads_qxfer): Rename to ...
9498 (handle_qxfer_threads): ... this. Adjust.
9499 (qxfer_packets): New array.
9500 (handle_qxfer): New function.
9501 (handle_query): Use handle_qxfer.
9503 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9505 * gdbreplay.c: Shorten lines of >= 80 columns.
9506 * linux-low.c: Ditto.
9507 * linux-ppc-low.c: Ditto.
9508 * linux-s390-low.c: Ditto.
9509 * linux-sparc-low.c: Ditto.
9510 * linux-x86-low.c: Ditto.
9511 * linux-xtensa-low.c: Ditto.
9512 * mem-break.c: Ditto.
9514 * regcache.h: Ditto.
9515 * remote-utils.c: Ditto.
9518 * thread-db.c: Ditto.
9519 * tracepoint.c: Ditto.
9521 * win32-low.h: Ditto.
9523 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9525 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9528 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9530 * server.c (gdbserver_version): Update copyright year in version
9532 * gdbreplay.c (gdbreplay_version): Ditto.
9534 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9536 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9537 * linux-bfin-low.c: New file.
9538 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9539 PT_DATA_ADDR for BFIN targets.
9540 * Makefile.in (SFILES): Add linux-bfin-low.c.
9541 (clean): Remove reg-bfin.c.
9542 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9543 * README: Mention supported Blackfin targets.
9545 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9547 * .gitignore: New file.
9549 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9551 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9553 2010-10-22 Jie Zhang <jie@codesourcery.com>
9555 * Makefile.in: Add FLAGS_TO_PASS variable.
9556 (install): Remove dependency of install-only and recursively
9557 invoke make for install-only.
9559 2010-10-04 Doug Evans <dje@google.com>
9561 * Makefile.in (uninstall): Use $(DESTDIR).
9563 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9567 * linux-x86-low.c (compat_siginfo_from_siginfo)
9568 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9569 si_code is < 0. Check for si_code == SI_TIMER before checking for
9572 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9574 * lynx-i386-low.c: New file.
9575 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9577 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9579 * lynx-low.c (ptrace_request_to_str): Remove handling for
9580 request values that have been removed in LynxOS 5.x.
9582 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9584 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9587 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9589 * configure.ac: Add --enable-inprocess-agent option.
9590 * configure: Rebuilt.
9592 2010-09-06 Yao Qi <yao@codesourcery.com>
9594 * linux-low.c (linux_kill): Remove unused variable.
9595 (linux_stabilize_threads): Likewise.
9596 * server.c (start_inferior): Likewise.
9597 (queue_stop_reply_callback): Likewise.
9598 * tracepoint.c (do_action_at_tracepoint): Likewise.
9600 2010-09-06 Yao Qi <yao@codesourcery.com>
9602 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9605 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9607 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9609 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9611 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9614 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9616 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9617 gdbserver/lynx-ppc-low.c: New files.
9618 * Makefile.in (lynx_low_h): New variable.
9619 (lynx-low.o, lynx-ppc-low.o): New rules.
9620 * configure.ac: On LynxOS, link with -lnetinet.
9621 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9622 * configure: regenerate.
9624 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9626 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9627 * configure.ac: Add check for vasprintf and vsnprintf.
9628 * configure, config.in: Regenerate.
9629 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9631 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9633 * gdbreplay.c: Move include of alloca.h up, next to include of
9635 * server.h: Add include of malloc.h.
9636 * mem-break.c: Remove include of malloc.h.
9637 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9639 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9641 * Makefile.in (memmem.o): Build with -Wno-error.
9643 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9645 * utils.c (xsnprintf): Make non-static.
9646 * server.h: Add xsnprintf declaration.
9647 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9648 replace calls to snprintf by calls to xsnprintf throughout.
9650 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9652 * configure.ac: Add configure check for alloca.
9653 * configure, config.in: Regenerate.
9654 * server.h: Include alloca.h if it exists.
9655 * gdbreplay.c: Include alloca.h if it exists.
9657 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9659 * linux-low.c (__SIGRTMIN): Define if not already defined.
9660 (linux_create_inferior): Check for __ANDROID__ rather than
9662 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9663 are already deferred.
9664 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9665 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9666 stopped and already has a pending signal to report.
9667 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9668 a pending signal to report or is moving out of a jump pad.
9669 (linux_init_signals): Check for __ANDROID__ rather than
9672 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9674 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9675 debug_threads check. Avoid a linear search when not doing debug
9678 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9680 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9681 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9682 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9683 (process_event): Change local fd's type to gdb_fildes_t.
9684 (create_file_handler): Adjust prototype.
9685 (delete_file_handler): Adjust prototype.
9686 (handle_file_event): Adjust prototype. Use pfildes.
9687 (create_file_event): Adjsut prototype.
9688 * remote-utils.c (remote_desc, listen_desc): Change type to
9690 * server.h: New gdb_fildes_t typedef.
9691 [USE_WIN32API]: Include winsock2.h.
9692 (delete_file_handler, add_file_handler): Adjust prototypes.
9694 * utils.c (pfildes): New.
9696 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9698 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9699 * configure: Regenerate.
9701 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9703 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9704 (linux_done_accessing_memory): ... this.
9705 (linux_target_ops): Adjust.
9706 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9707 * nto-low.c (nto_target_ops): Adjust comment.
9708 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9709 * spu-low.c (spu_target_ops): Adjust comment.
9710 * target.h (target_ops): Rename unprepare_to_access_memory field
9711 to done_accessing_memory.
9712 (unprepare_to_access_memory): Rename to ...
9713 (done_accessing_memory): ... this.
9715 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9717 * linux-low.c (linux_prepare_to_access_memory): New.
9718 (linux_unprepare_to_access_memory): New.
9719 (linux_target_ops): Install them.
9720 * server.c (read_memory): Rename to ...
9721 (gdb_read_memory): ... this. Use
9722 prepare_to_access_memory/prepare_to_access_memory.
9723 (write_memory): Rename to ...
9724 (gdb_write_memory): ... this. Use
9725 prepare_to_access_memory/prepare_to_access_memory.
9726 (handle_search_memory_1): Adjust.
9727 (process_serial_event): Adjust.
9728 * target.h (struct target_ops): New fields
9729 prepare_to_access_memory and unprepare_to_access_memory.
9730 (prepare_to_access_memory, unprepare_to_access_memory): New.
9731 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9732 prepare_to_access_memory/prepare_to_access_memory.
9733 * nto-low.c (nto_target_ops): Adjust.
9734 * spu-low.c (spu_target_ops): Adjust.
9735 * win32-low.c (win32_target_ops): Adjust.
9737 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9739 * Makefile.in (WARN_CFLAGS): Get it from configure.
9740 (WERROR_CFLAGS): New.
9741 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9742 * configure.ac: Introduce --enable-werror, which adds -Werror to
9743 the compiler command line. Enabled by default. Disable with
9744 --disable-werror. Add -Wdeclaration-after-statement
9745 Wpointer-arith and -Wformat-nonliteral to warning flags.
9746 * configure: Regenerate.
9748 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9750 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9752 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9754 * gdbreplay.c (remote_error): New.
9756 (expect): Use gdbchar. Check for error reading from GDB.
9757 Clarify sync error output.
9758 (play): Check for errors writing to GDB.
9759 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9760 * remote-utils.c (getpkt): Check for errors writing to the remote
9763 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9765 * linux-low.c (linux_wait_1): Move non-debugging code out of
9766 `debug_threads' control.
9768 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9770 * linux-low.c (linux_wait_1): Don't set last_status here.
9771 * server.c (push_event, queue_stop_reply_callback): Assert we're
9772 not pushing a TARGET_WAITKIND_IGNORE event.
9773 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9774 (myresume, handle_target_event): Set the thread's last_resume_kind
9775 and last_status from the target returned status.
9777 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9781 * linux-x86-low.c (update_debug_registers_callback): New.
9782 (i386_dr_low_set_addr): Use it.
9783 (i386_dr_low_get_addr): New.
9784 (i386_dr_low_set_control): Use update_debug_registers_callback.
9785 (i386_dr_low_get_control): New.
9786 (i386_dr_low_get_status): Adjust.
9787 * linux-low.c (linux_stop_lwp): New.
9788 * linux-low.h (linux_stop_lwp): Declare.
9790 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9791 argument instead of a i386_debug_reg_state.
9792 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9793 a i386_debug_reg_state.
9794 (i386_insert_aligned_watchpoint): Adjust.
9795 (i386_remove_aligned_watchpoint): Adjust.
9796 (i386_low_stopped_data_address): Read the debug registers from the
9797 inferior instead of from the mirrors.
9798 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9799 (i386_dr_low_get_addr): Declare.
9800 (i386_dr_low_get_control): Declare.
9801 (i386_dr_low_get_status): Change prototype.
9803 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9804 (i386_dr_low_get_addr): New.
9805 (i386_dr_low_get_control): New.
9806 (i386_dr_low_get_status): Adjust prototype. Return
9808 (i386_initial_stuff): Clear dr_status_mirror and
9810 (i386_get_thread_context): Adjust.
9811 (i386_set_thread_context): Adjust.
9812 (i386_thread_added): Adjust.
9814 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9816 * linux-low.h (linux_thread_area): Delete declaration.
9818 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9820 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9821 after its termination.
9823 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9825 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9826 (gdb_wants_all_stopped): Delete.
9827 (linux_wait_1): Don't call them.
9828 * server.c (handle_v_cont): Tag all threads as want-stopped.
9829 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9830 stopped as "client-wants-stopped".
9832 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9834 * Makefile.in (signals_h): New.
9835 (server_h): Depend on it.
9836 (server.o): Don't depend on $(signals_def).
9837 (signals.o): Depend on $(signals_def).
9839 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9841 * Makefile.in (signals_def): New.
9842 (server_h): Append include/gdb/signals.h and signals_def.
9843 (server.o): Append signals_def.
9845 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9847 * server.c (handle_target_event): Use target_signal_to_host for
9848 resume_info.sig initialization.
9849 * target.h (struct thread_resume) <sig>: New comment.
9851 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9853 * server.c (handle_query): strcpy() the returned string from paddress()
9854 instead of sprintf().
9855 * utils.c (paddress): Return phex_nz().
9857 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9859 * server.c (handle_v_cont): Call mourn_inferior if process
9861 (myresume): Likewise.
9863 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9865 Static tracepoints, and integration with UST.
9867 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9868 * mem-break.c (uninsert_all_breakpoints)
9869 (reinsert_all_breakpoints): New.
9870 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9871 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9872 (gdb_agent_ust_loaded, helper_thread_id)
9873 (gdb_agent_helper_thread_id): New macros.
9874 (struct ipa_sym_addresses): Add addr_ust_loaded,
9875 addr_helper_thread_id, addr_cmd_buf.
9876 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9877 (in_process_agent_loaded_ust): New.
9878 (write_e_ust_not_loaded): New.
9879 (maybe_write_ipa_ust_not_loaded): New.
9880 (struct collect_static_trace_data_action): New.
9881 (enum tracepoint_type) <static_tracepoint>: New.
9882 (struct tracepoint) <handle>: Mention static tracepoints.
9883 (struct static_tracepoint_ctx): New.
9884 (CMD_BUF_SIZE): New.
9885 (add_tracepoint_action): Handle static tracepoint actions.
9886 (unprobe_marker_at): New.
9887 (clear_installed_tracepoints): Handle static tracepoints.
9888 (cmd_qtdp): Handle static tracepoints.
9889 (probe_marker_at): New.
9890 (cmd_qtstart): Handle static tracepoints.
9891 (response_tracepoint): Handle static tracepoints.
9892 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9893 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9894 (get_context_regcache): Handle static tracepoints.
9895 (do_action_at_tracepoint): Handle static tracepoint actions.
9896 (traceframe_find_block_type): Handle static trace data blocks.
9897 (traceframe_read_sdata): New.
9898 (download_tracepoints): Download static tracepoint actions.
9899 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9900 (GDB_PROBE_NAME): New.
9905 (ust_marker_to_static_tracepoint): New.
9907 (collect_ust_data_at_tracepoint): New.
9908 (gdb_ust_probe): New.
9909 (UNIX_PATH_MAX, SOCK_DIR): New.
9910 (gdb_ust_connect_sync_socket): New.
9911 (resume_thread, stop_thread): New.
9912 (run_inferior_command): New.
9913 (init_named_socket): New.
9914 (gdb_ust_socket_init): New.
9915 (cstr_to_hexstr): New.
9917 (first_marker, next_marker): New.
9918 (response_ust_marker): New.
9919 (cmd_qtfstm, cmd_qtsstm): New.
9920 (unprobe_marker_at, probe_marker_at): New.
9921 (cmd_qtstmat, gdb_ust_thread): New.
9922 (gdb_ust_init): New.
9923 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9924 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9926 (x86_64_st_collect_regmap): New.
9927 (X86_64_NUM_ST_COLLECT_GREGS): New.
9928 (AMD64_RIP_REGNUM): New.
9929 (supply_static_tracepoint_registers): New.
9930 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9932 (i386_st_collect_regmap): New.
9933 (i386_NUM_ST_COLLECT_GREGS): New.
9934 (supply_static_tracepoint_registers): New.
9935 * server.c (handle_query): Handle qXfer:statictrace:read.
9936 <qSupported>: Report support for StaticTracepoints, and
9937 qXfer:statictrace:read features.
9938 * server.h (traceframe_read_sdata)
9939 (supply_static_tracepoint_registers): Declare.
9940 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9941 (unpack_varlen_hex): Include in IPA build.
9942 * Makefile.in (ustlibs, ustinc): New.
9943 (IPA_OBJS): Add remote-utils-ipa.o.
9944 ($(IPA_LIB)): Link -ldl and -lpthread.
9946 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9947 * config.in, configure: Regenerate.
9949 2010-06-20 Ian Lance Taylor <iant@google.com>
9950 Pedro Alves <pedro@codesourcery.com>
9952 * linux-x86-low.c (always_true): Delete.
9953 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9954 trying to fool the compiler with always_true.
9956 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9958 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9959 conditions in gdbserver.
9961 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9963 * spu-low.c (spu_read_memory): Wrap around local store limit.
9964 (spu_write_memory): Likewise.
9966 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9968 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9969 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9971 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9973 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9974 uses with LONGEST uses.
9976 2010-06-14 Stan Shebs <stan@codesourcery.com>
9977 Pedro Alves <pedro@codesourcery.com>
9981 * linux-x86-low.c: Include limits.h.
9986 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9987 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9988 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9989 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9990 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9991 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9992 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9993 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9994 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9995 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9996 (amd64_emit_void_call_2): New.
9997 (amd64_emit_ops): New.
9998 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9999 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10000 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10001 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10002 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10003 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10004 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10005 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10006 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10007 (i386_emit_stack_adjust, i386_emit_int_call_1)
10008 (i386_emit_void_call_2): New.
10009 (i386_emit_ops): New.
10010 (x86_emit_ops): New.
10011 (the_low_target): Install x86_emit_ops.
10012 * server.h (struct emit_ops): New.
10013 (get_raw_reg_func_addr): Declare.
10014 (current_insn_ptr, emit_error): Declare.
10015 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10016 (set_trace_state_variable_value): New defines.
10017 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10018 addr_get_trace_state_variable_value and
10019 addr_set_trace_state_variable_value.
10020 (symbol_list): New fields for get_raw_reg,
10021 get_trace_state_variable_value and set_trace_state_variable_value.
10022 (condfn): New typedef.
10023 (struct tracepoint): New field `compiled_cond'.
10024 (do_action_at_tracepoint): Clear compiled_cond.
10025 (get_trace_state_variable_value, set_trace_state_variable_value):
10027 (condition_true_at_tracepoint): If there's a compiled condition,
10029 (current_insn_ptr, emit_error): New globals.
10030 (struct bytecode_address): New.
10031 (get_raw_reg_func_addr): New.
10032 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10033 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10034 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10035 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10036 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10037 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10038 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10039 (compile_tracepoint_condition, compile_bytecodes): New.
10040 * target.h (emit_ops): Forward declare.
10041 (struct target_ops): New field emit_ops.
10042 (target_emit_ops): New.
10043 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10044 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10045 * linux-low.c (linux_emit_ops): New.
10046 (linux_target_ops): Install it.
10047 * linux-low.h (struct linux_target_ops): New field emit_ops.
10049 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10051 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10052 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10054 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10055 Stan Shebs <stan@codesourcery.com>
10057 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10058 (all): Depend on $(extra_libraries).
10059 (install-only): Install the IPA.
10060 (IPA_OBJS, IPA_LIB): New.
10061 (clean): Remove the IPA lib.
10062 (IPAGENT_CFLAGS): New.
10063 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10064 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10065 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10066 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10067 * configure.ac: Check for atomic builtins support in the compiler.
10068 (IPA_DEPFILES, extra_libraries): Define.
10069 * configure.srv (ipa_obj): Add description.
10070 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10071 (i[34567]86-*-linux*): Set ipa_obj.
10072 (x86_64-*-linux*): Set ipa_obj.
10073 * linux-low.c (stabilizing_threads): New.
10074 (supports_fast_tracepoints): New.
10075 (linux_detach): Stabilize threads before detaching.
10076 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10077 the lwp is either not stabilizing, or is moving out of a jump pad.
10078 (linux_fast_tracepoint_collecting): New.
10079 (maybe_move_out_of_jump_pad): New.
10080 (enqueue_one_deferred_signal): New.
10081 (dequeue_one_deferred_signal): New.
10082 (linux_wait_for_event_1): If moving out of a jump pad, defer
10083 pending signals to later.
10084 (linux_stabilize_threads): New.
10085 (linux_wait_1): Check if threads need moving out of jump pads, and
10087 (stuck_in_jump_pad_callback): New.
10088 (move_out_of_jump_pad_callback): New.
10089 (lwp_running): New.
10090 (linux_resume_one_lwp): Handle moving out of jump pads.
10091 (linux_set_resume_request): Dequeue deferred signals.
10092 (need_step_over_p): Also step over fast tracepoint jumps.
10093 (start_step_over): Also uninsert fast tracepoint jumps.
10094 (finish_step_over): Also reinsert fast tracepoint jumps.
10095 (linux_install_fast_tracepoint_jump): New.
10096 (linux_target_ops): Install linux_stabilize_threads and
10097 linux_install_fast_tracepoint_jump_pad.
10098 * linux-low.h (linux_target_ops) <get_thread_area,
10099 install_fast_tracepoint_jump_pad>: New fields.
10100 (struct lwp_info) <collecting_fast_tracepoint,
10101 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10102 (linux_get_thread_area): Declare.
10103 * linux-x86-low.c (jump_insn): New.
10104 (x86_get_thread_area): New.
10105 (append_insns): New.
10106 (push_opcode): New.
10107 (amd64_install_fast_tracepoint_jump_pad): New.
10108 (i386_install_fast_tracepoint_jump_pad): New.
10109 (x86_install_fast_tracepoint_jump_pad): New.
10110 (the_low_target): Install x86_get_thread_area and
10111 x86_install_fast_tracepoint_jump_pad.
10112 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10113 (struct fast_tracepoint_jump): New.
10114 (fast_tracepoint_jump_insn): New.
10115 (fast_tracepoint_jump_shadow): New.
10116 (find_fast_tracepoint_jump_at): New.
10117 (fast_tracepoint_jump_here): New.
10118 (delete_fast_tracepoint_jump): New.
10119 (set_fast_tracepoint_jump): New.
10120 (uninsert_fast_tracepoint_jumps_at): New.
10121 (reinsert_fast_tracepoint_jumps_at): New.
10122 (set_breakpoint_at): Use write_inferior_memory.
10123 (uninsert_raw_breakpoint): Use write_inferior_memory.
10124 (check_mem_read): Mask out fast tracepoint jumps.
10125 (check_mem_write): Mask out fast tracepoint jumps.
10126 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10127 (set_fast_tracepoint_jump): Declare.
10128 (delete_fast_tracepoint_jump)
10129 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10130 (reinsert_fast_tracepoint_jumps_at): Declare.
10131 * regcache.c: Don't compile many functions when building the
10132 in-process agent library.
10133 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10134 the register buffer in the heap.
10135 (free_register_cache): If the register buffer isn't owned by the
10136 regcache, don't free it.
10137 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10138 pre-existing register caches.
10139 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10141 (convert_ascii_to_int): : Constify `from' parameter type.
10142 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10143 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10144 the needed buffer in-place.
10145 (relocate_instruction): New.
10146 * server.c (handle_query) <qSymbols>: If the target supports
10147 tracepoints, give it a chance of looking up symbols. Report
10148 support for fast tracepoints.
10149 (handle_status): Stabilize threads.
10150 (process_serial_event): Adjust.
10151 * server.h (struct fast_tracepoint_jump): Forward declare.
10152 (struct process_info) <fast_tracepoint_jumps>: New field.
10153 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10154 (decode_X_packet, decode_M_packet): Adjust.
10155 (relocate_instruction): Declare.
10156 (in_process_agent_loaded): Declare.
10157 (tracepoint_look_up_symbols): Declare.
10158 (struct fast_tpoint_collect_status): Declare.
10159 (fast_tracepoint_collecting): Declare.
10160 (force_unlock_trace_buffer): Declare.
10161 (handle_tracepoint_bkpts): Declare.
10162 (initialize_low_tracepoint)
10163 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10164 * target.h (struct target_ops) <stabilize_threads,
10165 install_fast_tracepoint_jump_pad>: New fields.
10166 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10167 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10168 [HAVE_STDINT_H]: Include stdint.h.
10169 (trace_debug_1): Rename to ...
10170 (trace_vdebug): ... this.
10171 (trace_debug): Rename to ...
10172 (trace_debug_1): ... this. Add `level' parameter.
10173 (trace_debug): New.
10174 (ATTR_USED, ATTR_NOINLINE): New.
10175 (IP_AGENT_EXPORT): New.
10176 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10177 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10178 (about_to_request_buffer_space, trace_buffer_is_full)
10179 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10180 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10181 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10182 (traceframe_write_count, traceframes_created)
10183 (trace_state_variables)
10184 New renaming defines.
10185 (struct ipa_sym_addresses): New.
10186 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10187 (symbol_list): New.
10188 (ipa_sym_addrs): New.
10189 (all_tracepoint_symbols_looked_up): New.
10190 (in_process_agent_loaded): New.
10191 (write_e_ipa_not_loaded): New.
10192 (maybe_write_ipa_not_loaded): New.
10193 (tracepoint_look_up_symbols): New.
10194 (debug_threads) [IN_PROCESS_AGENT]: New.
10195 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10196 (UNKNOWN_SIDE_EFFECTS): New.
10197 (stop_tracing): New.
10198 (flush_trace_buffer): New.
10199 (stop_tracing_bkpt): New.
10200 (flush_trace_buffer_bkpt): New.
10201 (read_inferior_integer): New.
10202 (read_inferior_uinteger): New.
10203 (read_inferior_data_pointer): New.
10204 (write_inferior_data_pointer): New.
10205 (write_inferior_integer): New.
10206 (write_inferior_uinteger): New.
10207 (struct collect_static_trace_data_action): Delete.
10208 (enum tracepoint_type): New.
10209 (struct tracepoint) <type>: New field `type'.
10210 <actions_str, step_actions, step_actions_str>: Only include in
10212 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10213 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10214 (tracepoints): Use IP_AGENT_EXPORT.
10215 (last_tracepoint): Don't include in the IPA.
10216 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10217 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10218 (alloced_trace_state_variables): New.
10219 (trace_state_variables): Use IP_AGENT_EXPORT.
10220 (traceframe_t): Delete unused variable.
10221 (circular_trace_buffer): Don't include in the IPA.
10222 (trace_buffer_start): Delete.
10223 (struct trace_buffer_control): New.
10224 (trace_buffer_free): Delete.
10225 (struct ipa_trace_buffer_control): New.
10226 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10227 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10229 (trace_buffer_ctrl): New.
10230 (TRACE_BUFFER_CTRL_CURR): New.
10231 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10232 Reimplement as macros.
10233 (trace_buffer_wrap): Delete.
10234 (traceframe_write_count, traceframe_read_count)
10235 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10236 (struct tracepoint_hit_ctx) <type>: New field.
10237 (struct fast_tracepoint_ctx): New.
10238 (memory_barrier): New.
10240 (record_tracepoint_error): Update atomically in the IPA.
10241 (clear_inferior_trace_buffer): New.
10242 (about_to_request_buffer_space): New.
10243 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10244 updating the same buffer.
10245 (add_tracepoint): Default the tracepoint's type to trap
10246 tracepoint, and orig_size to -1.
10247 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10248 internal variables.
10249 (create_trace_state_variable): New parameter `gdb'. Handle it.
10250 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10251 (cmd_qtdp): Handle fast tracepoints.
10252 (cmd_qtdv): Adjust.
10253 (max_jump_pad_size): New.
10254 (gdb_jump_pad_head): New.
10255 (get_jump_space_head): New.
10256 (claim_jump_space): New.
10257 (sort_tracepoints): New.
10258 (MAX_JUMP_SIZE): New.
10259 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10261 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10262 support. Upload fast traceframes, and delete internal IPA
10264 (stop_tracing_handler): New.
10265 (flush_trace_buffer_handler): New.
10266 (cmd_qtstop): Upload fast tracepoints.
10267 (response_tracepoint): Handle fast tracepoints.
10268 (tracepoint_finished_step): Upload fast traceframes. Set the
10269 tracepoint hit context's tracepoint type.
10270 (handle_tracepoint_bkpts): New.
10271 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10272 type. Add comment about fast tracepoints.
10273 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10274 non-existing action_str field.
10275 (get_context_regcache): Handle fast tracepoints.
10276 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10278 (fast_tracepoint_from_jump_pad_address): New.
10279 (fast_tracepoint_from_ipa_tpoint_address): New.
10280 (collecting_t): New.
10281 (force_unlock_trace_buffer): New.
10282 (fast_tracepoint_collecting): New.
10284 (gdb_collect): New.
10285 (write_inferior_data_ptr): New.
10286 (target_tp_heap): New.
10287 (target_malloc): New.
10288 (download_agent_expr): New.
10290 (download_tracepoints): New.
10291 (download_trace_state_variables): New.
10292 (upload_fast_traceframes): New.
10293 (IPA_FIRST_TRACEFRAME): New.
10294 (IPA_NEXT_TRACEFRAME_1): New.
10295 (IPA_NEXT_TRACEFRAME): New.
10296 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10297 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10298 (gdb_jump_pad_buffer_end): New.
10299 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10300 (initialize_tracepoint): Adjust.
10301 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10302 buffer. Initialize the low module.
10303 * utils.c (PREFIX, TOOLNAME): New.
10304 (malloc_failure): Use PREFIX.
10305 (error): In the IPA, an error causes an exit.
10306 (fatal, warning): Use PREFIX.
10307 (internal_error): Use TOOLNAME.
10308 (NUMCELLS): Increase to 10.
10309 * configure, config.in: Regenerate.
10311 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10313 * server.c (handle_query) <qSupported>: Do two passes over the
10314 qSupported string to avoid nesting strtok.
10316 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10318 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10320 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10321 -Wl,--dynamic-list.
10322 * configure: Regenerate.
10323 * proc-service.list: New.
10325 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10327 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10330 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10332 * gdbreplay.c (remote_open): Check error return from socket() call by
10333 its equality to -1 not by it being negative.
10334 * remote-utils.c (remote_open): Likewise.
10336 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10338 * config.h: Regenerate.
10340 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10342 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10343 doesn't provide PTRACE_GET_THREAD_AREA.
10345 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10347 * linux-m68k-low.c: Include <asm/ptrace.h>
10348 (ps_get_thread_area): Implement.
10350 2010-05-03 Doug Evans <dje@google.com>
10352 * event-loop.c (struct callback_event): New struct.
10353 (callback_list): New global.
10354 (append_callback_event, delete_callback_event): New functions.
10355 (process_callback): New function.
10356 (start_event_loop): Call it.
10357 * remote-utils.c (NOT_SCHEDULED): Define.
10358 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10359 moved out of readchar.
10360 (readchar): Rewrite. Call reschedule before returning.
10361 (reset_readchar): New function.
10362 (remote_close): Call it.
10363 (process_remaining, reschedule): New functions.
10364 * server.h (callback_handler_func): New typedef.
10365 (append_callback_event, delete_callback_event): Declare.
10367 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10369 * proc-service.c (ps_pglobal_lookup): Use
10370 thread_db_look_up_one_symbol.
10371 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10372 parameter. Use it instead of all_symbols_looked_up.
10373 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10375 (all_symbols_looked_up): Don't declare.
10376 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10377 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10379 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10380 Set all_symbols_looked_up here.
10381 (thread_db_look_up_one_symbol): New.
10382 (thread_db_get_tls_address): Adjust.
10383 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10384 thread_db object on the heap, and tentatively set it in the
10386 (thread_db_init): Don't set all_symbols_looked_up here.
10387 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10389 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10391 * linux-low.c (linux_kill, linux_detach): Adjust.
10392 (status_pending_p_callback): Remove redundant statement. Check
10393 for !TARGET_WAITIKIND_IGNORE, instead of
10394 TARGET_WAITKIND_STOPPED.
10395 (handle_tracepoints): Make sure LWP is locked. Adjust.
10396 (linux_wait_for_event_1): Adjust.
10397 (linux_cancel_breakpoints): New.
10398 (unsuspend_one_lwp): New.
10399 (unsuspend_all_lwps): New.
10400 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10401 (send_sigstop_callback): Change return type to int, add new
10402 `except' parameter and handle it.
10403 (suspend_and_send_sigstop_callback): New.
10404 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10405 pass them down. If SUSPEND, also increment the lwp's suspend
10407 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10408 (need_step_over_p): Don't consider suspended LWPs.
10409 (start_step_over): Adjust.
10410 (proceed_one_lwp): Change return type to int, add new `except'
10411 parameter and handle it.
10412 (unsuspend_and_proceed_one_lwp): New.
10413 (proceed_all_lwps): Use find_inferior instead of
10415 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10416 also decrement the suspend count of LWPs. Pass `except' down,
10417 instead of hacking its suspend count.
10418 (linux_pause_all): Add `freeze' parameter. Adjust.
10419 (linux_unpause_all): New.
10420 (linux_target_ops): Install linux_unpause_all.
10421 * server.c (handle_status): Adjust.
10422 * target.h (struct target_ops): New fields `unpause_all' and
10423 `cancel_breakpoints'. Add new parameter to `pause_all'.
10424 (pause_all): Add new `freeze' parameter.
10425 (unpause_all): New.
10426 (cancel_breakpoints): New.
10427 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10428 cancel breakpoints.
10429 (cmd_qtstart): Pause threads.
10430 (stop_tracing): Pause threads, and cancel breakpoints.
10431 * win32-low.c (win32_target_ops): Adjust.
10433 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10435 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10436 the inferior right away from here...
10437 (linux_wait_1): ... to here, and adjust to check the thread's
10438 last_resume_kind instead of the lwp's step or stop_expected flags.
10440 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10442 * README: Use consistent `GDB' and `GDBserver' spellings.
10444 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10446 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10447 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10448 (linux_detach_one_lwp): Assume the lwp is stopped.
10449 (any_thread_of): Delete.
10450 (linux_detach): Stop all lwps here. Don't blindly delete all
10452 (delete_lwp_callback): New.
10453 (linux_mourn): Delete all lwps of the process that is gone.
10454 (linux_wait_1): Don't delete the last lwp of the process here.
10455 * mem-break.h (mark_breakpoints_out): Declare.
10456 * mem-break.c (mark_breakpoints_out): New.
10457 (free_all_breakpoints): Use it.
10458 * server.c (handle_target_event): If the process is gone, mark
10460 * thread-db.c (struct thread_db) <create_bp>: New field.
10461 (thread_db_enable_reporting): Fix prototype. Store a thread event
10462 breakpoint reference in the thread_db struct.
10463 (thread_db_load_search): Clear the thread_db object.
10464 (try_thread_db_load_1): Ditto.
10465 (switch_to_process): New.
10466 (disable_thread_event_reporting): Use it.
10467 (remove_thread_event_breakpoints): New.
10468 (thread_db_detach, thread_db_mourn): Use it.
10470 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10472 * linux-low.c (linux_enable_event_reporting): New.
10473 (linux_wait_for_event_1, handle_extended_wait): Use it.
10475 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10477 * linux-low.c (linux_kill_one_lwp, linux_kill)
10478 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10479 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10480 SIGSTOP even if the LWP is stopped.
10481 (send_sigstop_callback): New.
10482 (stop_all_lwps): Use send_sigstop_callback instead.
10483 (linux_resume_one_thread): Adjust.
10484 (proceed_one_lwp): Still proceed an LWP that the client has
10485 requested to stop, if we haven't reported it as stopped yet. Make
10486 sure that LWPs the client want stopped, have a pending SIGSTOP.
10488 2010-04-26 Doug Evans <dje@google.com>
10490 * server.c (handle_general_set): Make static.
10492 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10493 Print received char after testing for error/eof instead of before.
10494 (input_interrupt): Tweak comment.
10496 2010-04-23 Doug Evans <dje@google.com>
10498 * server.c (start_inferior): Print inferior argv if --debug.
10500 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10502 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10503 * nto-x86-low.c: Include server.h
10505 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10507 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10508 be consistent with other sources of this directory.
10509 (init_registers_amd64): Correct name of source file of this function
10512 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10514 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10515 64-bit executables.
10517 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10519 * win32-i386-low.c: Add 64-bit support.
10520 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10521 (init_registers_amd64): Declare.
10522 (mappings): Add 64-bit version of array.
10523 (init_windows_x86): New function.
10524 (the_low_target): Change init_arch field to init_windows_x86.
10526 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10528 * win32-low.c: Adapt to support also 64-bit architecture.
10529 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10530 (get_image_name): Use SIZE_T type for local variable `done'.
10531 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10532 (toolhelp_get_dll_name): Idem.
10533 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10534 Use uintptr_t typecast to avoid warning.
10535 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10536 (handle_exception): Use phex_nz to avoid warning.
10537 (win32_wait): Remove unused local variable `process'.
10539 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10541 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10544 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10546 * configure.ac: Use `ws2_32' library for srv_mingw.
10547 * configure: Regenerate.
10548 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10549 * remote-utils.c: Likewise.
10551 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10553 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10554 if __x86_64__ is defined.
10556 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10558 * configure: Regenerate.
10560 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10562 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10563 * target.h (target_ops): New get_tib_address field.
10564 * win32-low.h (win32_thread_info): Add thread_local_base field.
10565 * win32-low.c (child_add_thread): Add tlb argument.
10566 Set thread_local_base field to TLB.
10567 (get_child_debug_event): Adapt to child_add_thread change.
10568 (win32_get_tib_address): New function.
10569 (win32_target_ops): Set get_tib_address field to
10570 win32_get_tib_address.
10571 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10573 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10575 * linux-low.c (linux_mourn): Also remove the process.
10576 * server.c (handle_target_event): Don't remove the process here.
10577 * nto-low.c (nto_mourn): New.
10578 (nto_target_ops): Install it.
10579 * spu-low.c (spu_mourn): New.
10580 (spu_target_ops): Install it.
10581 * win32-low.c (win32_mourn): New.
10582 (win32_target_ops): Install it.
10584 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10586 * server.h (buffer_xml_printf): Remove redundant `;'.
10588 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10590 * regcache.c (set_register_cache): Invalidate regcaches before
10591 changing the register cache layout.
10592 (regcache_invalidate_one): Allow a NULL regcache.
10593 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10594 regcaches before changing the register cache layout or the target
10597 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10599 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10600 variable warning on Linux/x86-64.
10602 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10604 GDBserver disconnected tracing support.
10606 * linux-low.c (linux_remove_process): Delete.
10607 (add_lwp): Don't set last_resume_kind here.
10608 (linux_kill): Use `mourn'.
10609 (linux_detach): Use `thread_db_detach', and `mourn'.
10610 (linux_mourn): New.
10611 (linux_attach_lwp_1): Adjust comment.
10612 (linux_attach): last_resume_kind moved the thread_info; adjust.
10613 (status_pending_p_callback): Adjust.
10614 (linux_wait_for_event_1): Adjust.
10615 (count_events_callback, select_singlestep_lwp_callback)
10616 (select_event_lwp_callback, cancel_breakpoints_callback)
10617 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10618 (proceed_one_lwp): Adjust.
10619 (linux_async): Add debug output.
10620 (linux_thread_stopped): New.
10621 (linux_pause_all): New.
10622 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10624 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10625 (thread_db_free): Delete declaration.
10626 (thread_db_detach, thread_db_mourn): Declare.
10627 * thread-db.c (thread_db_init): Use thread_db_mourn.
10628 (thread_db_free): Delete, split in two.
10629 (disable_thread_event_reporting): New.
10630 (thread_db_detach): New.
10631 (thread_db_mourn): New.
10633 * server.h (struct thread_info) <last_resume_kind>: New field.
10634 <attached>: Add comment.
10635 <gdb_detached>: New field.
10636 (handler_func): Change return type to int.
10637 (handle_serial_event, handle_target_event): Ditto.
10638 (gdb_connected): Declare.
10640 (disconnected_tracing): Declare.
10641 (stop_tracing): Declare.
10643 * server.c (handle_query) <qSupported>: Report support for
10644 disconnected tracing.
10645 (queue_stop_reply_callback): Account for running threads.
10646 (gdb_wants_thread_stopped): New.
10647 (gdb_wants_all_threads_stopped): New.
10648 (gdb_reattached_process): New.
10649 (handle_status): Clear the `gdb_detached' flag of all processes.
10650 In all-stop, stop all threads.
10651 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10652 (process_serial_event): If the remote connection breaks, or if an
10653 exit was forced with "monitor exit", force an event loop exit.
10654 Handle disconnected tracing on detach.
10655 (handle_serial_event): Adjust.
10656 (handle_target_event): If GDB isn't connected, forward events back
10657 to the inferior, unless the last process exited, in which case,
10658 exit gdbserver. Adjust interface.
10660 * remote-utils.c (remote_open): Don't block in accept. Instead
10661 register an event loop source on the listen socket file
10662 descriptor. Refactor bits into ...
10663 (listen_desc): ... this new global.
10664 (gdb_connected): ... this new function.
10665 (enable_async_notification): ... this new function.
10666 (handle_accept_event): ... this new function.
10667 (remote_close): Clear remote_desc.
10669 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10671 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10673 (mourn_inferior): Define.
10674 (target_process_qsupported): Avoid the dangling else problem.
10675 (thread_stopped): Define.
10676 (pause_all): Define.
10677 (target_waitstatus_to_string): Declare.
10678 * target.c (target_waitstatus_to_string): New.
10680 * tracepoint.c (tracing): Make extern.
10681 (disconnected_tracing): New.
10682 (stop_tracing): Make extern. Handle tracing stops due to GDB
10684 (cmd_qtdisconnected): New.
10685 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10686 (handle_tracepoint_general_set): Handle QTDisconnected.
10688 * event-loop.c (event_handler_func): Change return type to int.
10689 (process_event): Bail out if the event handler wants the event
10691 (handle_file_event): Ditto.
10692 (start_event_loop): Bail out if the event handler wants the event
10695 * nto-low.c (nto_target_ops): Adjust.
10696 * spu-low.c (spu_wait): Don't remove the process here.
10697 (spu_target_ops): Adjust.
10698 * win32-low.c (win32_wait): Don't remove the process here.
10699 (win32_target_ops): Adjust.
10701 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10703 * regcache.c (realloc_register_cache): Invalidate inferior's
10704 regcache before recreating it.
10706 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10708 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10710 2010-04-09 Stan Shebs <stan@codesourcery.com>
10711 Pedro Alves <pedro@codesourcery.com>
10713 * server.h (LONGEST): New.
10714 (struct thread_info) <while_stepping>: New field.
10715 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10717 (initialize_tracepoint, handle_tracepoint_general_set)
10718 (handle_tracepoint_query, tracepoint_finished_step)
10719 (tracepoint_was_hit, release_while_stepping_state_list):
10720 (current_traceframe): Declare.
10721 * server.c (handle_general_set): Handle tracepoint packets.
10722 (read_memory): New.
10723 (write_memory): New.
10724 (handle_search_memory_1): Use read_memory.
10725 (handle_query): Report support for conditional tracepoints, trace
10726 state variables, and tracepoint sources. Handle tracepoint
10728 (main): Initialize the tracepoints module.
10729 (process_serial_event): Handle traceframe reads/writes.
10731 * linux-low.c (handle_tracepoints): New.
10732 (linux_wait_1): Call it.
10733 (linux_resume_one_lwp): Handle while-stepping.
10734 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10735 (linux_target_ops): Install them.
10736 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10738 * linux-x86-low.c (x86_supports_tracepoints): New.
10739 (the_low_target). Install it.
10741 * mem-break.h (delete_breakpoint): Declare.
10742 * mem-break.c (delete_breakpoint): Make external.
10744 * target.h (struct target_ops): Add `supports_tracepoints',
10745 `read_pc', and `write_pc' fields.
10746 (target_supports_tracepoints): Define.
10747 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10750 * regcache.h (struct regcache) <registers_owned>: New field.
10751 (init_register_cache, regcache_cpy): Declare.
10752 (regcache_read_pc, regcache_write_pc): Declare.
10753 (register_cache_size): Declare.
10754 (supply_regblock): Declare.
10755 * regcache.c (init_register_cache): New.
10756 (new_register_cache): Use it.
10757 (regcache_cpy): New.
10758 (register_cache_size): New.
10759 (supply_regblock): New.
10760 (regcache_read_pc, regcache_write_pc): New.
10762 * tracepoint.c: New.
10764 * Makefile.in (OBS): Add tracepoint.o.
10765 (tracepoint.o): New rule.
10767 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10769 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10771 (i386-mmx.c): Likewise.
10772 (i386-mmx-linux.o): Likewise.
10773 (i386-mmx-linux.c): Likewise.
10775 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10776 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10777 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10778 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10780 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10781 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10782 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10784 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10786 * Makefile.in (clean): Updated.
10788 (i386-avx.c): Likewise.
10789 (i386-avx-linux.o): Likewise.
10790 (i386-avx-linux.c): Likewise.
10791 (amd64-avx.o): Likewise.
10792 (amd64-avx.c): Likewise.
10793 (amd64-avx-linux.o): Likewise.
10794 (amd64-avx-linux.c): Likewise.
10796 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10797 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10798 (srv_amd64_regobj): Add amd64-avx.o.
10799 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10800 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10801 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10802 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10803 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10804 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10805 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10807 * i387-fp.c: Include "i386-xstate.h".
10809 (i387_cache_to_xsave): Likewise.
10810 (i387_xsave_to_cache): Likewise.
10811 (x86_xcr0): Likewise.
10813 * i387-fp.h (i387_cache_to_xsave): Likewise.
10814 (i387_xsave_to_cache): Likewise.
10815 (x86_xcr0): Likewise.
10817 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10818 * linux-crisv32-low.c (target_regsets): Likewise.
10819 * linux-m68k-low.c (target_regsets): Likewise.
10820 * linux-mips-low.c (target_regsets): Likewise.
10821 * linux-ppc-low.c (target_regsets): Likewise.
10822 * linux-s390-low.c (target_regsets): Likewise.
10823 * linux-sh-low.c (target_regsets): Likewise.
10824 * linux-sparc-low.c (target_regsets): Likewise.
10825 * linux-xtensa-low.c (target_regsets): Likewise.
10827 * linux-low.c: Include <sys/uio.h>.
10828 (regsets_fetch_inferior_registers): Support nt_type.
10829 (regsets_store_inferior_registers): Likewise.
10830 (linux_process_qsupported): New.
10831 (linux_target_ops): Add linux_process_qsupported.
10833 * linux-low.h (regset_info): Add nt_type.
10834 (linux_target_ops): Add process_qsupported.
10836 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10838 (init_registers_i386_avx_linux): New.
10839 (init_registers_amd64_avx_linux): Likewise.
10840 (xmltarget_i386_linux_no_xml): Likewise.
10841 (xmltarget_amd64_linux_no_xml): Likewise.
10842 (PTRACE_GETREGSET): Likewise.
10843 (PTRACE_SETREGSET): Likewise.
10844 (x86_fill_xstateregset): Likewise.
10845 (x86_store_xstateregset): Likewise.
10846 (use_xml): Likewise.
10847 (x86_linux_update_xmltarget): Likewise.
10848 (x86_linux_process_qsupported): Likewise.
10849 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10850 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10851 init_registers_i386_linux here. Call
10852 x86_linux_update_xmltarget.
10853 (the_low_target): Add x86_linux_process_qsupported.
10855 * server.c (handle_query): Call target_process_qsupported.
10857 * target.h (target_ops): Add process_qsupported.
10858 (target_process_qsupported): New.
10860 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10862 * inferiors.c (add_thread): Set last_status kind to
10863 TARGET_WAITKIND_IGNORE.
10864 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10865 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10866 (linux_wait_1): Move `thread' local definition to block that uses
10867 it. Don't NULL initialize `event_child'.
10868 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10869 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10870 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10872 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10874 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10875 an extended waitstatus, or by a watchpoint.
10876 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10877 thread was stepping or has been stopped by a watchpoint.
10879 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10881 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10882 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10883 of another, then delete the previous, and validate all
10885 (validate_inserted_breakpoint): New.
10886 (delete_disabled_breakpoints): New.
10887 (validate_breakpoints): New.
10888 (check_mem_read): Validate breakpoints before trusting their
10889 shadow. Delete disabled breakpoints.
10890 (check_mem_write): Validate breakpoints before trusting they
10891 should be inserted. Delete disabled breakpoints.
10892 * mem-break.h (validate_breakpoints):
10893 * server.c (handle_query): Validate breakpoints when we see a
10896 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10898 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10899 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10900 if we could tell there's a GDB breakpoint at stop_pc.
10901 (need_step_over_p): Don't do a step over if we find a GDB
10902 breakpoint at the resume PC.
10904 * mem-break.c (struct raw_breakpoint): New.
10905 (enum bkpt_type): New type `gdb_breakpoint'.
10906 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10907 fields. New field `raw'.
10908 (find_raw_breakpoint_at): New.
10909 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10910 breakpoint instead.
10911 (set_breakpoint_at): Adjust.
10912 (delete_raw_breakpoint): New.
10913 (release_breakpoint): New.
10914 (delete_breakpoint): Rename to...
10915 (delete_breakpoint_1): ... this. Add proc parameter. Use
10916 release_breakpoint. Return ENOENT.
10917 (delete_breakpoint): Reimplement.
10918 (find_breakpoint_at): Delete.
10919 (find_gdb_breakpoint_at): New.
10920 (delete_breakpoint_at): Delete.
10921 (set_gdb_breakpoint_at): New.
10922 (delete_gdb_breakpoint_at): New.
10923 (gdb_breakpoint_here): New.
10924 (set_reinsert_breakpoint): Use release_breakpoint.
10925 (uninsert_breakpoint): Rename to ...
10926 (uninsert_raw_breakpoint): ... this.
10927 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10928 (reinsert_raw_breakpoint): Change parameter type to
10930 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10932 (check_breakpoints): Adjust. Use release_breakpoint.
10933 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10934 (breakpoint_inserted_here): Ditto.
10935 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10936 Don't trust the breakpoint's shadow if it is not inserted.
10937 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10938 (delete_all_breakpoints): Adjust.
10939 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10940 use delete_breakpoint_1.
10942 * mem-break.h (breakpoints_supported): Delete declaration.
10943 (set_gdb_breakpoint_at): Declare.
10944 (gdb_breakpoint_here): Declare.
10945 (delete_breakpoint_at): Delete.
10946 (delete_gdb_breakpoint_at): Declare.
10948 * server.h (struct raw_breakpoint): Forward declare.
10949 (struct process_info): New field `raw_breakpoints'.
10951 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10954 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10956 * linux-low.c (status_pending_p_callback): Fix comment.
10957 (linux_wait_for_event_1): Move most of the internal breakpoint
10958 handling from here...
10959 (linux_wait_1): ... to here.
10960 (count_events_callback): New.
10961 (select_singlestep_lwp_callback): New.
10962 (select_event_lwp_callback): New.
10963 (cancel_breakpoints_callback): New.
10964 (select_event_lwp): New.
10965 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10966 priority to all LWPs that have had events that should be reported
10967 to the client. Cancel breakpoints when about to reporting the
10968 event to the client, not while stopping lwps. No longer cancel
10969 finished single-steps here.
10970 (cancel_finished_single_step): Delete.
10971 (cancel_finished_single_steps): Delete.
10973 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10975 * mem-break.c (enum bkpt_type): New.
10976 (struct breakpoint): New field `type'.
10977 (set_breakpoint_at): Change return type to struct breakpoint
10978 pointer. Set type to `other_breakpoint' by default.
10979 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10980 in the breakpoint list.
10981 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10982 (reinsert_breakpoint): Rename to ...
10983 (reinsert_raw_breakpoint): ... this.
10984 (reinsert_breakpoints_at): Adjust.
10985 * mem-break.h (struct breakpoint): Declare.
10986 (set_breakpoint_at): Change return type to struct breakpoint
10989 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10991 * server.c (handle_query): Assign, not compare.
10993 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10995 Teach linux gdbserver to step-over-breakpoints.
10997 * linux-low.c (can_hardware_single_step): New.
10998 (supports_breakpoints): New.
10999 (handle_extended_wait): If stopping threads, read the stop pc of
11000 the new cloned LWP.
11002 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11003 low target doesn't support retrieving the PC.
11004 (add_lwp): Set last_resume_kind to resume_continue.
11005 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11006 (linux_attach): Don't clear stop_expected. Set the lwp's
11007 last_resume_kind to resume_stop.
11008 (linux_detach_one_lwp): Don't check for removed breakpoints.
11009 (check_removed_breakpoint): Delete.
11010 (status_pending_p): Rename to ...
11011 (status_pending_p_callback): ... this. Don't check for removed
11012 breakpoints. Don't consider threads that are stopped from GDB's
11014 (linux_wait_for_lwp): Always read the stop_pc here.
11015 (cancel_breakpoint): New.
11016 (step_over_bkpt): New global.
11017 (linux_wait_for_event_1): Implement stepping over breakpoints.
11018 (gdb_wants_lwp_stopped): New.
11019 (gdb_wants_all_stopped): New.
11020 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11021 single-step traps here. Store the thread's last reported target
11023 (send_sigstop): Don't clear stop_expected. Always set it,
11025 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11026 (cancel_finished_single_step): New.
11027 (cancel_finished_single_steps): New.
11028 (wait_for_sigstop): Don't cancel finished single-step traps here.
11029 (linux_resume_one_lwp): Don't check for removed breakpoints.
11030 Don't set `step' on non-hardware step archs.
11031 (linux_set_resume_request): Ignore resume_stop requests if already
11032 stopping or stopped. Set the lwp's last_resume_kind.
11033 (resume_status_pending_p): Don't check for removed breakpoints.
11034 (need_step_over_p): New.
11035 (start_step_over): New.
11036 (finish_step_over): New.
11037 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11038 requests. Clear the thread's last reported target waitstatus.
11039 Don't use the `suspended' flag. Don't consider pending breakpoints.
11040 (linux_resume): Start a step-over if necessary.
11041 (proceed_one_lwp): New.
11042 (proceed_all_lwps): New.
11043 (unstop_all_lwps): New.
11044 * linux-low.h (struct lwp_info): Rewrite comment for the
11045 `suspended' flag. Add the `stop_pc' field. Delete the
11046 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11047 Add `'last_resume_kind' and `need_step_over' fields.
11048 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11049 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11050 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11051 (set_raw_breakpoint_at): New.
11052 (set_breakpoint_at): Rewrite to use it.
11053 (reinsert_breakpoint_handler): Delete.
11054 (set_reinsert_breakpoint): New.
11055 (reinsert_breakpoint_by_bp): Delete.
11056 (delete_reinsert_breakpoints): New.
11057 (uninsert_breakpoint): Rewrite.
11058 (uninsert_breakpoints_at): New.
11059 (reinsert_breakpoint): Rewrite.
11060 (reinsert_breakpoints_at): New.
11061 (check_breakpoints): Rewrite.
11062 (breakpoint_here): New.
11063 (breakpoint_inserted_here): New.
11064 (check_mem_read): Adjust.
11065 * mem-break.h (breakpoints_supported, breakpoint_here)
11066 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11067 (reinsert_breakpoint_by_bp): Delete declaration.
11068 (delete_reinsert_breakpoints): Declare.
11069 (reinsert_breakpoint): Delete declaration.
11070 (reinsert_breakpoints_at): Declare.
11071 (uninsert_breakpoint): Delete declaration.
11072 (uninsert_breakpoints_at): Declare.
11073 (check_breakpoints): Adjust prototype.
11074 * server.h: Adjust include order.
11075 (struct thread_info): Declare here. Add a `last_status' field.
11077 2010-03-23 Michael Snyder <msnyder@vmware.com>
11079 * server.c (crc32): New function.
11080 (handle_query): Add handling for 'qCRC:' request.
11082 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11084 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11085 lwp had been stopped by a watchpoint.
11087 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11089 * server.h (internal_error): Declare.
11090 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11091 * utils.c (internal_error): New function.
11093 2010-03-15 Andreas Schwab <schwab@redhat.com>
11095 * configure.srv: Fix typo setting srv_regobj.
11097 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11099 * linux-low.c (fetch_register): Avoid passing a non string literal
11101 (usr_store_inferior_registers): Ditto.
11103 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11105 * linux-low.c (linux_write_memory): Bail out early if peeking
11108 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11110 * linux-low.h (struct lwp_info): New fields
11111 `stopped_by_watchpoint' and `stopped_data_address'.
11112 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11113 here, and cache them in the lwp object.
11114 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11116 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11118 (linux_stopped_by_watchpoint): Rewrite.
11119 (linux_stopped_data_address): Rewrite.
11121 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11123 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11124 switching the current inferior, not before.
11126 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11128 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11129 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11130 i386-linux.c and amd64-linux.c.
11131 (reg-i386.o): Removed.
11132 (reg-i386.c): Likewise.
11133 (reg-i386-linux.o): Likewise.
11134 (reg-i386-linux.c): Likewise.
11135 (reg-x86-64.o): Likewise.
11136 (reg-x86-64.c): Likewise.
11137 (reg-x86-64-linux.o): Likewise.
11138 (reg-x86-64-linux.c): Likewise.
11140 (i386.c): Likewise.
11141 (i386-linux.o): Likewise.
11142 (i386-linux.c): Likewise.
11143 (amd64.o): Likewise.
11144 (amd64.c): Likewise.
11145 (amd64-linux.o): Likewise.
11146 (amd64-linux.c): Likewise.
11148 * configure.srv (srv_i386_regobj): New.
11149 (srv_i386_linux_regobj): Likewise.
11150 (srv_amd64_regobj): Likewise.
11151 (srv_amd64_linux_regobj): Likewise.
11152 (srv_i386_32bit_xmlfiles): Likewise.
11153 (srv_i386_64bit_xmlfiles): Likewise.
11154 (srv_i386_xmlfiles): Likewise.
11155 (srv_amd64_xmlfiles): Likewise.
11156 (srv_i386_linux_xmlfiles): Likewise.
11157 (srv_amd64_linux_xmlfiles): Likewise.
11158 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11159 srv_xmlfiles to $srv_i386_xmlfiles.
11160 (i[34567]86-*-mingw32ce*): Likewise.
11161 (i[34567]86-*-mingw*): Likewise.
11162 (i[34567]86-*-nto*): Likewise.
11163 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11164 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11165 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11166 (x86_64-*-linux*): Likewise.
11168 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11169 (init_registers_amd64_linux): New.
11170 (x86_arch_setup): Replace init_registers_x86_64_linux with
11171 init_registers_amd64_linux.
11173 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11175 * configure.ac: Check for libdl. If it is not available link against
11176 static libthread_db.
11177 * configure: Regenerate.
11179 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11183 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11184 handing a read watchpoint.
11185 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11187 2010-02-12 Doug Evans <dje@google.com>
11189 * linux-low.c (linux_supports_tracefork_flag): Document.
11190 (linux_look_up_symbols): Add comment.
11192 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11194 * regcache.c (supply_register): Clear regcache if buf is NULL.
11196 2010-02-02 Nicolas Roche <roche@sourceware.org>
11197 Joel Brobecker <brobecker@adacore.com>
11199 * inferiors.c (find_inferior): Add function documentation.
11200 (unloaded_dll): Handle the case where the unloaded dll has not
11201 been previously registered in the dll list.
11203 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11205 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11206 (thumb2_breakpoint): New.
11207 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11209 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11211 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11212 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11215 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11217 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11219 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11221 * linux-s390-low.c (s390_collect_ptrace_register)
11222 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11224 2010-01-21 Doug Evans <dje@google.com>
11226 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11227 (PTRACE_ARG4_TYPE): New macro.
11228 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11229 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11230 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11231 (usr_store_inferior_registers): Ditto.
11232 (linux_read_memory, linux_write_memory): Ditto.
11233 (linux_test_for_tracefork): Ditto.
11235 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11236 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11238 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11240 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11243 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11245 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11246 prototype to take a regcache. Adjust.
11248 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11250 * regcache.h (struct thread_info): Forward declare.
11251 (struct regcache): New.
11252 (new_register_cache): Adjust prototype.
11253 (get_thread_regcache): Declare.
11254 (free_register_cache): Adjust prototype.
11255 (registers_to_string, registers_from_string): Ditto.
11256 (supply_register, supply_register_by_name, collect_register)
11257 (collect_register_as_string, collect_register_by_name): Ditto.
11258 * regcache.c (struct inferior_regcache_data): Delete.
11259 (get_regcache): Rename to ...
11260 (get_thread_regcache): ... this. Adjust. Switch inferior before
11261 fetching registers.
11262 (regcache_invalidate_one): Adjust.
11263 (regcache_invalidate): Fix prototype.
11264 (new_register_cache): Return the new register cache.
11265 (free_register_cache): Change prototype.
11266 (realloc_register_cache): Adjust.
11267 (registers_to_string): Change prototype to take a regcache. Adjust.
11268 (registers_from_string): Ditto.
11269 (register_data): Ditto.
11270 (supply_register): Ditto.
11271 (supply_register_by_name): Ditto.
11272 (collect_register): Ditto.
11273 (collect_register_as_string): Ditto.
11274 (collect_register_by_name): Ditto.
11275 * server.c (process_serial_event): Adjust.
11276 * linux-low.h (regset_fill_func, regset_store_func): Change
11278 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11280 * linux-low.c (get_stop_pc): Adjust.
11281 (check_removed_breakpoint): Adjust.
11282 (linux_wait_for_event): Adjust.
11283 (linux_resume_one_lwp): Adjust.
11284 (fetch_register): Add regcache parameter. Adjust.
11285 (usr_store_inferior_registers): Ditto.
11286 (regsets_fetch_inferior_registers): Ditto.
11287 (regsets_store_inferior_registers): Ditto.
11288 (linux_fetch_registers, linux_store_registers): Ditto.
11289 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11291 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11293 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11294 prototype to take a regcache.
11295 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11296 * remote-utils.c (convert_ascii_to_int, outreg)
11297 (prepare_resume_reply): Change prototype to take a regcache.
11299 * target.h (struct target_ops) <fetch_registers, store_registers>:
11300 Change prototype to take a regcache.
11301 (fetch_inferior_registers, store_inferior_registers): Change
11302 prototype to take a regcache. Adjust.
11303 * proc-service.c (ps_lgetregs): Adjust.
11304 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11305 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11306 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11307 take a regcache. Adjust.
11308 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11309 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11310 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11311 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11312 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11313 (cris_cannot_fetch_register):
11314 (cris_breakpoint_at): Change prototype to take a regcache.
11316 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11317 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11318 to take a regcache. Adjust.
11319 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11321 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11322 take a regcache. Adjust.
11323 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11324 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11325 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11326 * linux-mips-low.c (mips_get_pc):
11327 (mips_set_pc): Change prototype to take a regcache. Adjust.
11328 (mips_reinsert_addr): Adjust.
11329 (mips_collect_register): Change prototype to take a regcache.
11331 (mips_supply_register):
11332 (mips_collect_register_32bit, mips_supply_register_32bit)
11333 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11334 (mips_store_fpregset): Ditto.
11335 * linux-ppc-low.c (ppc_supply_ptrace_register)
11336 (ppc_supply_ptrace_register): Ditto.
11337 (parse_spufs_run): Adjust.
11338 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11339 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11340 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11341 take a regcache. Adjust.
11342 * linux-s390-low.c (s390_collect_ptrace_register)
11343 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11344 (s390_set_pc): Change prototype to take a regcache. Adjust.
11345 (s390_arch_setup): Adjust.
11346 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11347 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11348 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11349 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11350 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11352 (sparc_breakpoint_at): Adjust.
11353 * linux-xtensa-low.c (xtensa_fill_gregset):
11354 (xtensa_store_gregset):
11355 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11356 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11357 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11358 prototype to take a regcache. Adjust.
11359 * win32-arm-low.c (arm_fetch_inferior_register)
11360 (arm_store_inferior_register): Change prototype to take a
11362 * win32-i386-low.c (i386_fetch_inferior_register)
11363 (i386_store_inferior_register): Change prototype to take a
11365 * win32-low.c (child_fetch_inferior_registers)
11366 (child_store_inferior_registers): Change prototype to take a
11368 (win32_wait): Adjust.
11369 (win32_fetch_inferior_registers): Change prototype to take a
11371 (win32_store_inferior_registers): Adjust.
11372 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11373 store_inferior_register>: Change prototype to take a regcache.
11375 2010-01-20 Doug Evans <dje@google.com>
11377 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11379 (linux_wait_for_event1, linux_init_signals): Ditto.
11380 (W_STOPCODE): Provide definition if missing.
11382 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11384 * linux-low.c (linux_core_of_thread): New.
11385 (compare_ints, show_process, list_threads): New.
11386 (linux_qxfer_osdata): Report threads and cores.
11387 (linux_target_op): Register linux_core_of_thread.
11388 * remote-utils.c (prepare_resume_reply): Report the core.
11389 (buffer_xml_printf): Support %d specifier.
11390 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11392 (handle_query): Handle qXfer:threads. Announce availability
11394 * target.h (struct target_ops): New field core_of_thread.
11396 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11398 * Makefile.in (clean): Remove new generated files.
11399 (reg-s390.o, reg-s390.c): Remove rules.
11400 (reg-s390x.o, reg-s390x.c): Likewise.
11401 (s390-linux32.o, s390-linux32.c): Add rules.
11402 (s390-linux64.o, s390-linux64.c): Likewise.
11403 (s390x-linux64.o, s390x-linux64.c): Likewise.
11404 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11405 * linux-s390-low.c: Include <elf.h>.
11406 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11407 (init_registers_s390): Remove prototype.
11408 (init_registers_s390x): Likewise.
11409 (init_registers_s390_linux32): Add prototype.
11410 (init_registers_s390_linux64): Likewise.
11411 (init_registers_s390x_linux64): Likewise.
11412 (s390_num_regs_3264): New define.
11413 (s390_regmap_3264): New global variable.
11414 (s390_cannot_fetch_register): Remove obsolete check.
11415 (s390_cannot_store_register): Likewise.
11416 (s390_collect_ptrace_register): Handle upper/lower register halves.
11417 (s390_supply_ptrace_register): Likewise.
11418 (s390_fill_gregset): Update to register number changes.
11419 (s390_get_hwcap): New routine.
11420 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11421 Install appropriate regmap and register set.
11423 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11425 * server.c (gdbserver_version): Update copyright year to 2010.
11426 * gdbreplay.c (gdbreplay_version): Likewise.
11428 2009-12-28 Doug Evans <dje@google.com>
11430 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11431 elf/external.h. Include <elf.h> instead but only if necessary.
11433 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11435 * linux-low.c (linux_remove_process): Remove `detaching'
11436 parameter. Don't release/detach from thread_db here.
11437 (linux_kill): Release/detach from thread_db here, ...
11438 (linux_detach): ... and here, before actually detaching.
11439 (linux_wait_1): ... and here, when a process exits.
11440 * thread-db.c (any_thread_of): New.
11441 (thread_db_free): Switch the current inferior to a thread of the
11444 2009-12-21 Doug Evans <dje@google.com>
11446 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11448 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11449 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11450 warning ifndef __NR_tkill. Move setting of errno there too.
11451 Delete unnecessary resetting of errno after syscall.
11452 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11454 * configure.ac: Check for dladdr.
11455 * config.in: Regenerate.
11456 * configure: Regenerate.
11457 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11458 (try_thread_db_load): Update.
11460 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11462 2009-12-18 Doug Evans <dje@google.com>
11464 * event-loop.c: Include unistd.h if it exists.
11466 * linux-low.c (my_waitpid): Move definition away from being in
11467 between linux_tracefork_child/linux_test_for_tracefork.
11469 * gdb_proc_service.h (psaddr_t): Fix type.
11470 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11471 signature to match glibc.
11473 2009-12-16 Doug Evans <dje@google.com>
11475 * linux-low.c (linux_read_memory): Fix argument to read.
11477 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11479 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11480 events, don't leave current_inferior pointing at null.
11482 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11484 * win32-low.c (LOG): Delete.
11485 (OUTMSG): Output to stderr.
11486 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11487 on compile time LOG macro.
11488 (win32_wait): Fix debug output.
11490 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11492 * win32-low.c (win32_add_one_solib): If the dll name is
11493 "ntdll.dll", prepend the system directory to the dll path.
11495 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11497 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11499 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11500 Vladimir Prus <vladimir@codesourcery.com>
11502 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11503 * configure.ac: Check for __mcoldfire__ and set
11504 gdb_cv_m68k_is_coldfire.
11505 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11506 reg-cf.o and reg-m68k.o.
11507 * configure: Regenerated.
11509 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11511 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11512 Pass it to thread_db_free.
11513 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11514 proper `detaching' argument to linux_remove_process.
11515 * linux-low.h (thread_db_free): Add `detaching' parameter.
11516 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11518 (thread_db_free): Add `detaching' parameter. Only
11519 call td_ta_clear_event if detaching from process.
11521 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11523 * thread-db.c (thread_db_free): Fix typo.
11525 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11528 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11530 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11532 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11533 with an i686 compiler.
11534 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11536 * configure: Rebuilt.
11538 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11542 * server.c (handle_search_memory_1): Correct read_addr initialization
11543 in loop for searching subsequent chunks.
11545 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11547 * configure.ac: New --with-libthread-db option.
11548 * thread-db.c: Allow direct dependence on libthread_db.
11549 (thread_db_free): Adjust.
11550 * config.in: Regenerate.
11551 * configure: Likewise.
11553 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11556 * thread-db.c (attach_thread): New function.
11557 (maybe_attach_thread): Return success/failure.
11558 (find_new_threads_callback): Adjust.
11559 (thread_db_find_new_threads): Loop until no new threads.
11561 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11563 * proc-service.c (ps_lgetregs): Formatting.
11565 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11567 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11568 * configure.ac: Adjust.
11569 * linux-low.h (struct process_info_private): Move members to struct
11571 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11572 * linux-low.c (linux_remove_process): Adjust.
11573 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11574 * server.c (handle_query): Move code ...
11575 (handle_monitor_command): ... here. New function.
11576 * target.h (struct target_ops): New member.
11577 * thread-db.c (struct thread_db): New.
11578 (libthread_db_search_path): New variable.
11579 (thread_db_create_event, thread_db_enable_reporting)
11580 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11581 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11582 (try_thread_db_load_1, dladdr_to_soname): New functions.
11583 (try_thread_db_load, thread_db_load_search): New functions.
11584 (thread_db_init): Search for libthread_db.
11585 (thread_db_free): New function.
11586 (thread_db_handle_monitor_command): Likewise.
11587 * config.in: Regenerate.
11588 * configure: Regenerate.
11590 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11592 * spu-low.c (spu_kill): Wait for inferior to terminate.
11593 Call clear_inferiors.
11594 (spu_detach): Call clear_inferiors.
11596 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11598 * aclocal.m4: Regenerate.
11599 * config.in: Likewise.
11600 * configure: Likewise.
11602 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11604 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11605 (parse_spufs_run): New function.
11606 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11607 (ppc_breakpoint_at): Handle SPU breakpoints.
11609 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11611 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11612 (SPUFS_MAGIC): Define.
11613 (spu_enumerate_spu_ids): New function.
11614 (linux_qxfer_spu): New function.
11615 (linux_target_ops): Install linux_qxfer_spu.
11617 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11619 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11620 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11621 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11622 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11623 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11624 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11625 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11626 (init_registers_powerpc_cell32l): Add prototype.
11627 (init_registers_powerpc_cell64l): Likewise.
11628 (ppc_arch_setup): Detect Cell/B.E. architecture.
11630 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11632 * Makefile.in (datarootdir): New variable.
11634 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11636 * linux-low.c (linux_write_memory): Update debugging output.
11637 * Makefile.in (clean): Add new descriptions.
11638 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11639 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11640 * configure.srv: Add new files for arm*-*-linux*.
11641 * linux-arm-low.c: Add new declarations.
11642 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11643 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11644 (HWCAP_VFPv3D16): New.
11645 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11646 instead of __IWMMXT__.
11647 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11648 (arm_arch_setup): New.
11649 (target_regsets): Remove #ifdef. Add VFP regset.
11650 (the_low_target): Use arm_arch_setup.
11652 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11654 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11655 the main thread again.
11657 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11659 Adding Neutrino gdbserver.
11660 * configure: Regenerated.
11661 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11662 * configure.srv (i[34567]86-*-nto*): New target.
11663 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11664 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11665 (nto_comctrl) [__QNX__]: New function.
11666 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11668 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11670 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11673 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11674 Pedro Alves <pedro@codesourcery.com>
11676 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11677 don't support CONTEXT_EXTENDED_REGISTERS.
11678 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11679 (the_low_target): Install them.
11680 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11681 failing with ERROR_PIPE_NOT_CONNECTED.
11683 2009-06-30 Doug Evans <dje@google.com>
11684 Pierre Muller <muller@ics.u-strasbg.fr>
11686 Add h/w watchpoint support to x86-linux, win32-i386.
11687 * Makefile.in (SFILES): Add i386-low.c
11688 (i386_low_h): Define.
11689 (i386-low.o): Add dependencies.
11690 (linux-x86-low.o): Add i386-low.h dependency.
11691 (win32-i386-low.o): Ditto.
11692 * i386-low.c: New file.
11693 * i386-low.h: New file.
11694 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11695 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11696 * linux-low.c (linux_add_process): Initialize arch_private.
11697 (linux_remove_process): Free arch_private.
11698 (add_lwp): Initialize arch_private.
11699 (delete_lwp): Free arch_private.
11700 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11702 * linux-low.h (process_info_private): New member arch_private.
11703 (lwp_info): New member arch_private.
11704 (linux_target_ops): New members new_process, new_thread,
11706 (ptid_of): New macro.
11707 * linux-x86-low.c: Include stddef.h, i386-low.h.
11708 (arch_process_info): New struct.
11709 (arch_lwp_info): New struct.
11710 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11711 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11712 (i386_dr_low_get_status): New function.
11713 (x86_insert_point, x86_remove_point): New functions.
11714 (x86_stopped_by_watchpoint): New function.
11715 (x86_stopped_data_address): New function.
11716 (x86_linux_new_process, x86_linux_new_thread): New functions.
11717 (x86_linux_prepare_to_resume): New function.
11718 (the_low_target): Add entries for insert_point, remove_point,
11719 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11721 * server.c (debug_hw_points): New global.
11722 (monitor_show_help): Document set debug-hw-points.
11723 (handle_query): Process "set debug-hw-points".
11724 * server.h (debug_hw_points): Declare.
11725 (paddress): Declare.
11726 * utils.c (NUMCELLS, CELLSIZE): New macros.
11727 (get_sell, xsnprintf, paddress): New functions.
11728 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11729 remove_point, stopped_by_watchpoint, stopped_data_address.
11730 * win32-i386-low.c: Include i386-low.h.
11731 (debug_reg_state): Replaces dr.
11732 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11733 (i386_dr_low_get_status): New function.
11734 (i386_insert_point, i386_remove_point): New functions.
11735 (i386_stopped_by_watchpoint): New function.
11736 (i386_stopped_data_address): New function.
11737 (i386_initial_stuff): Update.
11738 (get_thread_context,set_thread_context,i386_thread_added): Update.
11739 (the_low_target): Add entries for insert_point,
11740 remove_point, stopped_by_watchpoint, stopped_data_address.
11741 * win32-low.c (win32_insert_watchpoint): New function.
11742 (win32_remove_watchpoint): New function.
11743 (win32_stopped_by_watchpoint): New function.
11744 (win32_stopped_data_address): New function.
11745 (win32_target_ops): Add entries for insert_watchpoint,
11746 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11747 * win32-low.h (win32_target_ops): New members insert_point,
11748 remove_point, stopped_by_watchpoint, stopped_data_address.
11750 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11752 * server.c (process_serial_event): Re-return unsupported, not
11753 error, if the type isn't recognized. Re-allow supporting only
11754 insert or remove packets. Also call require_running for
11755 breakpoints. Add missing break statement to default case. Tidy.
11756 * target.h (struct target_ops): Rename insert_watchpoint to
11757 insert_point, and remove_watchpoint to remove_point.
11759 * linux-low.h (struct linux_target_ops): Likewise.
11760 * linux-low.c (linux_insert_watchpoint): Rename to ...
11761 (linux_insert_point): ... this. Adjust.
11762 (linux_remove_watchpoint): Rename to ...
11763 (linux_remove_point): ... this. Adjust.
11764 (linux_target_ops): Adjust.
11765 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11766 (cris_insert_point): ... this.
11767 (cris_remove_watchpoint): Rename to ...
11768 (cris_remove_point): ... this.
11769 (the_low_target): Adjust.
11771 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11773 * server.c (handle_v_kill): Pass signal_pid to
11774 kill_inferior if multi_process is zero.
11776 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11778 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11779 * target.h (target_ops): Comment for *_watchpoint to make it clear
11780 the functions can get types '0' and '1'.
11782 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11784 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11785 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11786 * regcache.c (get_regcache): Likewise.
11787 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11788 * win32-low.c (child_fetch_inferior_registers): Remove check for
11791 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11792 Pedro Alves <pedro@codesourcery.com>
11794 * target.h (struct target_ops) <supports_multi_process>: New
11796 (target_supports_multi_process): New.
11797 * server.c (handle_query): Even if GDB reports support, only
11798 enable multi-process if the target also supports it. Report
11799 multi-process support only if the target backend supports it.
11800 * linux-low.c (linux_supports_multi_process): New function.
11801 (linux_target_ops): Install it as target_supports_multi_process
11804 2009-05-24 Doug Evans <dje@google.com>
11806 Global renaming of find_thread_pid to find_thread_ptid.
11807 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11808 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11809 All callers updated.
11811 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11812 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11815 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11816 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11817 (linux_resume_one_lwp): Ditto.
11819 2009-05-23 Doug Evans <dje@google.com>
11821 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11822 from struct inferior_list_entry * to struct lwp_info *.
11823 All callers updated.
11825 2009-05-13 Doug Evans <dje@google.com>
11827 * linux-x86-low.c: Don't include assert.h.
11828 (x86_siginfo_fixup): Use fatal, not assert.
11829 (x86_arch_setup): Fix comment.
11831 2009-05-12 Doug Evans <dje@google.com>
11833 Biarch support for i386/amd64 gdbserver.
11834 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11835 Add linux-x86-low.c.
11836 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11837 (linux-x86-low.o): Add.
11838 * linux-x86-64-low.c: Delete.
11839 * linux-i386-low.c: Delete.
11840 * linux-x86-low.c: New file.
11841 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11843 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11845 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11846 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11847 (linux_child_pid_to_exec_file): New function.
11848 (elf_64_header_p, elf_64_file_p): New functions.
11849 (siginfo_fixup): New function.
11850 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11851 give target a chance to convert layout.
11852 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11853 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11855 2009-05-07 Doug Evans <dje@google.com>
11857 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11858 (regsets_store_inferior_registers): Ditto.
11860 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11864 * linux-low.c (must_set_ptrace_flags): Delete.
11865 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11867 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11868 `lwp->must_set_ptrace_flags' instead.
11869 (linux_wait_for_event_1): Set ptrace options here.
11870 (linux_wait_1): ... not here.
11872 2009-04-30 Doug Evans <dje@google.com>
11874 * inferiors.c (started_inferior_callback): New function.
11875 (attached_inferior_callback): New function.
11876 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11877 * server.c (print_started_pid, print_attached_pid): New functions.
11878 (detach_or_kill_for_exit): New function.
11879 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11880 * server.h (have_started_inferiors_p): Declare.
11881 (have_attached_inferiors_p): Declare.
11883 * inferiors.c (remove_process): Fix memory leak, free process.
11884 * linux-low.c (linux_remove_process): New function.
11885 (linux_kill): Call it instead of remove_process.
11886 (linux_detach, linux_wait_1): Ditto.
11888 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11890 * configure.srv: Add x86 Windows CE target.
11892 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11894 * inferiors.c (get_thread_process): Make global.
11895 * server.h (get_thread_process): Add prototype.
11896 * thread-db.c (find_one_thread): Use get_thread_process
11897 instead of current_process.
11898 (thread_db_get_tls_address): Do not crash if called when
11899 thread layer is not yet initialized.
11901 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11903 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11904 * spu-low.c (current_tid): Rename to ...
11905 (current_ptid): ... this.
11906 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11907 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11908 ptid_get_lwp (current_ptid) instead of current_tid.
11909 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11910 instead of current_tid. Use find_process_pid to verify pid
11911 argument is valid. Pass proper argument to remove_process.
11912 (spu_thread_alive): Compare current_ptid instead of current_tid.
11913 (spu_resume): Likewise.
11915 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11917 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11920 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11922 Implement the multiprocess extensions, and add linux multiprocess
11925 * server.h (ULONGEST): Declare.
11926 (struct ptid, ptid_t): New.
11927 (minus_one_ptid, null_ptid): Declare.
11928 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11929 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11930 (struct inferior_list_entry): Change `id' type from unsigned from
11932 (struct sym_cache, struct breakpoint, struct
11933 process_info_private): Forward declare.
11934 (struct process_info): Declare.
11935 (current_process): Declare.
11936 (all_processes): Declare.
11937 (initialize_inferiors): Declare.
11938 (add_thread): Adjust to use ptid_t.
11939 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11940 (add_process, remove_process, find_thread_pid): Declare.
11941 (find_inferior_id): Adjust to use ptid_t.
11942 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11943 (multi_process): Declare.
11944 (push_event): Adjust to use ptid_t.
11945 (read_ptid, write_ptid): Declare.
11946 (prepare_resume_reply): Adjust to use ptid_t.
11947 (clear_symbol_cache): Declare.
11948 * inferiors.c (all_processes): New.
11949 (null_ptid, minus_one_ptid): New.
11950 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11951 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11952 (add_thread): Change unsigned long to ptid. Remove gdb_id
11954 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11955 (gdb_id_to_thread): Rename to ...
11956 (find_thread_pid): ... this. Change unsigned long to ptid.
11957 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11958 (loaded_dll, pull_pid_from_list): Adjust.
11959 (add_process, remove_process, find_process_pid)
11960 (get_thread_process, current_process, initialize_inferiors): New.
11961 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11962 (struct target_waitstatus) <related_pid>: Ditto.
11963 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11964 return type to int.
11965 (struct target_ops) <join>: Add `pid' argument.
11966 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11967 (struct target_ops) <wait>: Add `ptid' field. Change return type
11969 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11970 (mywait): Add `ptid' argument. Change return type to ptid_t.
11971 (target_pid_to_str): Declare.
11972 * target.c (set_desired_inferior): Adjust to use ptids.
11973 (mywait): Add new `ptid' argument. Adjust.
11974 (target_pid_to_str): New.
11975 * mem-break.h (free_all_breakpoints): Declare.
11976 * mem-break.c (breakpoints): Delelete.
11977 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11978 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11979 to use per-process breakpoint list.
11980 (free_all_breakpoints): New.
11981 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11982 (symbol_cache, all_symbols_looked_up): Delete.
11984 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11986 (prepare_resume_reply): Change ptid argument's type from unsigned
11987 long to ptid_t. Adjust. Implement W;process and X;process.
11988 (free_sym_cache, clear_symbol_cache): New.
11989 (look_up_one_symbol): Adjust to per-process symbol cache. *
11990 * server.c (cont_thread, general_thread, step_thread): Change type
11992 (attached): Delete.
11993 (multi_process): New.
11994 (last_ptid): Change type to ptid_t.
11995 (struct vstop_notif) <ptid>: Change type to ptid_t.
11996 (queue_stop_reply, push_event): Change `ptid' argument's type to
11998 (discard_queued_stop_replies): Add `pid' argument.
11999 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12000 changes. Don't reference the `attached' global.
12001 (attach_inferior): Adjust to mywait interface changes.
12002 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12003 features. Handle and report "multiprocess+". Handle
12005 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12007 (handle_v_kill): New.
12008 (handle_v_stopped): Adjust to use target_pid_to_str.
12009 (handle_v_requests): Allow multiple attaches and runs when
12010 multiprocess extensions are in effect. Handle "vKill".
12011 (myresume): Adjust to use ptids.
12012 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12013 (handle_status): Adjust to discard_queued_stop_replies interface
12015 (first_thread_of, kill_inferior_callback)
12016 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12017 (main): Call initialize_inferiors. Adjust to use ptids, killing
12018 and detaching from all inferiors. Handle multiprocess packet
12020 * linux-low.h: Include gdb_proc_service.h.
12021 (struct process_info_private): New.
12022 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12023 <lwpid_of>: Use ptid_get_lwp.
12024 (get_lwp_thread): Adjust.
12025 (struct lwp_info): Add `dead' member.
12026 (find_lwp_pid): Declare.
12027 * linux-low.c (thread_db_active): Delete.
12028 (new_inferior): Adjust comment.
12029 (inferior_pid): Delete.
12030 (linux_add_process): New.
12031 (handle_extended_wait): Adjust.
12032 (add_lwp): Change unsigned long to ptid.
12033 (linux_create_inferior): Add process to processes table. Adjust
12034 to use ptids. Don't set new_inferior here.
12035 (linux_attach_lwp): Rename to ...
12036 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12037 it. Adjust to use ptids.
12038 (linux_attach_lwp): New.
12039 (linux_attach): Add process to processes table. Don't set
12041 (struct counter): New.
12042 (second_thread_of_pid_p, last_thread_of_process_p): New.
12043 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12044 multiple processes.
12045 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12046 processes. Remove process from process table.
12047 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12048 to multiple processes.
12049 (any_thread_of): New.
12050 (linux_detach): Add `pid' argument, and handle it. Remove process
12051 from processes table.
12052 (linux_join): Add `pid' argument. Handle it.
12053 (linux_thread_alive): Change unsighed long argument to ptid_t.
12054 Consider dead lwps as not being alive.
12055 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12056 threads we're not interested in.
12057 (same_lwp, find_lwp_pid): New.
12058 (linux_wait_for_lwp): Change `pid' argument's type from int to
12060 (linux_wait_for_event): Rename to ...
12061 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12062 from int to ptid_t. Adjust.
12063 (linux_wait_for_event): New.
12064 (linux_wait_1): Add `ptid' argument. Change return type to
12065 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12066 that exit from the process table.
12067 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12069 (mark_lwp_dead): New.
12070 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12071 stopping all threads, mark its main lwp as dead.
12072 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12074 (fetch_register, usr_store_inferior_registers)
12075 (regsets_fetch_inferior_registers)
12076 (regsets_store_inferior_registers, linux_read_memory)
12077 (linux_write_memory): Inline `inferior_pid'.
12078 (linux_look_up_symbols): Adjust to use per-process
12079 `thread_db_active'.
12080 (linux_request_interrupt): Adjust to use ptids.
12081 (linux_read_auxv): Inline `inferior_pid'.
12082 (initialize_low): Don't reference thread_db_active.
12083 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12084 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12085 (ps_getpid): Return the pid of the current inferior.
12086 * thread-db.c (proc_handle, thread_agent): Delete.
12087 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12089 (find_one_thread): Change argument type to ptid_t. Adjust to
12091 (maybe_attach_thread): Adjust to per-process data and ptids.
12092 (thread_db_find_new_threads): Ditto.
12093 (thread_db_init): Ditto.
12094 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12095 processes table. Adjust to use ptids.
12096 (spu_kill, spu_detach): Adjust interface. Remove process from
12098 (spu_join, spu_thread_alive): Adjust interface.
12099 (spu_wait): Adjust interface. Remove process from processes
12100 table. Adjust to use ptids.
12101 * win32-low.c (current_inferior_tid): Delete.
12102 (current_inferior_ptid): New.
12103 (debug_event_ptid): New.
12104 (thread_rec): Take a ptid. Adjust.
12105 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12106 (child_delete_thread): Ditto.
12107 (do_initial_child_stuff): Add `attached' argument. Add process to
12109 (child_fetch_inferior_registers, child_store_inferior_registers):
12111 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12112 (win32_attach): Pass 1 to do_initial_child_stuff.
12113 (win32_kill): Adjust interface. Remove process from processes
12115 (win32_detach): Ditto.
12116 (win32_join): Adjust interface.
12117 (win32_thread_alive): Take a ptid.
12118 (win32_resume): Adjust to use ptids.
12119 (get_child_debug_event): Ditto.
12120 (win32_wait): Adjust interface. Remove exiting process from
12123 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12125 Non-stop mode support.
12127 * server.h (non_stop): Declare.
12128 (gdb_client_data, handler_func): Declare.
12129 (delete_file_handler, add_file_handler, start_event_loop):
12131 (handle_serial_event, handle_target_event, push_event)
12132 (putpkt_notif): Declare.
12133 * target.h (enum resume_kind): New.
12134 (struct thread_resume): Replace `step' field by `kind' field.
12135 (TARGET_WNOHANG): Define.
12136 (struct target_ops) <wait>: Add `options' argument.
12137 <supports_non_stop, async, start_non_stop>: New fields.
12138 (target_supports_non_stop, target_async): New.
12139 (start_non_stop): Declare.
12140 (mywait): Add `options' argument.
12141 * target.c (mywait): Add `options' argument. Print child exit
12142 notifications here.
12143 (start_non_stop): New.
12144 * server.c (non_stop, own_buf, mem_buf): New globals.
12145 (struct vstop_notif): New.
12146 (notif_queue): New global.
12147 (queue_stop_reply, push_event, discard_queued_stop_replies)
12148 (send_next_stop_reply): New.
12149 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12151 (attach_inferior): In non-stop mode, don't wait for the target
12153 (handle_general_set): Handle QNonStop.
12154 (handle_query): When handling qC, return the current general
12155 thread, instead of the first thread of the list.
12156 (handle_query): If the backend supports non-stop mode, include
12157 QNonStop+ in the qSupported query response.
12158 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12160 (handle_v_attach, handle_v_run): Handle non-stop mode.
12161 (handle_v_stopped): New.
12162 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12163 (myresume): Adjust to use resume_kind. Handle non-stop.
12164 (queue_stop_reply_callback): New.
12165 (handle_status): Handle non-stop mode.
12166 (main): Clear non_stop flag on reconnection. Use the event-loop.
12167 Refactor serial protocol handling from here ...
12168 (process_serial_event): ... to this new function. When GDB
12169 selects any thread, select one here. In non-stop mode, wait until
12170 GDB acks all pending events before exiting.
12171 (handle_serial_event, handle_target_event): New.
12172 * remote-utils.c (remote_open): Install remote_desc in the event
12174 (remote_close): Remove remote_desc from the event loop.
12175 (putpkt_binary): Rename to...
12176 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12177 (putpkt_binary): New as wrapper around putpkt_binary_1.
12178 (putpkt_notif): New.
12179 (prepare_resume_reply): In non-stop mode, don't change the
12181 * event-loop.c: New.
12182 * Makefile.in (OBJ): Add event-loop.o.
12183 (event-loop.o): New rule.
12185 * linux-low.h (pid_of): Moved here.
12187 (get_lwp_thread): Use lwpid_of.
12188 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12189 * linux-low.c (pid_of): Delete.
12190 (inferior_pid): Use lwpid_of.
12191 (linux_event_pipe): New.
12192 (target_is_async_p): New.
12194 (handle_extended_wait): Use lwpid_of.
12195 (add_lwp): Don't set lwpid field.
12196 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12197 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12198 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12199 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12200 first. Adjust to linux_wait_for_event interface changes. Use
12202 (linux_detach): Don't delete the main lwp here.
12203 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12204 (status_pending_p): Don't consider explicitly suspended lwps.
12205 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12206 pointer. Add OPTIONS argument. Change return type to int. Use
12207 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12208 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12209 pointer. Add status pointer argument. Return a pid instead of a
12210 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12211 changes. In non-stop mode, don't switch to a random thread.
12212 (linux_wait): Rename to...
12213 (linux_wait_1): ... this. Add target_options argument, and handle
12214 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12215 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12216 clean exit and signal exit code. Don't stop all threads in
12217 non-stop mode. In all-stop mode, only stop all threads when
12218 reporting a stop to GDB. Handle explicit thread stop requests.
12219 (async_file_flush, async_file_mark): New.
12221 (send_sigstop): Use lwpid_of.
12222 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12223 interface changes. In non-stop mode, don't switch to a random
12225 (linux_resume_one_lwp): Use lwpid_of.
12226 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12227 (linux_resume_one_thread): ... this. Handle resume_stop. In
12228 non-stop mode, don't look for pending flag in all threads.
12229 (resume_status_pending_p): Don't consider explicitly suspended
12231 (my_waitpid): Reimplement. Emulate __WALL.
12232 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12234 (sigchld_handler, linux_supports_non_stop, linux_async)
12235 (linux_start_non_stop): New.
12236 (linux_target_ops): Register linux_supports_non_stop, linux_async
12237 and linux_start_non_stop.
12238 (initialize_low): Install SIGCHLD handler.
12239 * thread-db.c (thread_db_create_event, find_one_thread)
12240 (thread_db_get_tls_address): Use lwpid_of.
12241 * win32-low.c (win32_detach): Adjust to use resume_kind.
12242 (win32_wait): Add `options' argument.
12243 * spu-low.c (spu_resume): Adjust to use resume_kind.
12244 (spu_wait): Add `options' argument.
12246 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12248 Decouple target code from remote protocol.
12250 * target.h (enum target_waitkind): New.
12251 (struct target_waitstatus): New.
12252 (struct target_ops) <wait>: Return an unsigned long. Take a
12253 target_waitstatus pointer instead of a char pointer.
12254 (mywait): Likewise.
12255 * target.c (mywait): Change prototype to return an unsigned long.
12256 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12257 * server.h (thread_from_wait, old_thread_from_wait): Delete
12259 (prepare_resume_reply): Change prototype to take a
12261 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12262 (last_status, last_ptid): New.
12263 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12264 pid instead of a signal.
12265 (attach_inferior): Remove "status" and "signal" parameters.
12267 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12269 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12270 (handle_v_requests, myresume): Remove "status" and "signal"
12271 parameters. Adjust.
12272 (handle_status): New.
12273 (main): Delete local `status'. Adjust.
12274 * remote-utils.c: Include target.h.
12275 (prepare_resume_reply): Change prototype to take a
12276 target_waitstatus. Adjust.
12278 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12280 * spu-low.c (spu_wait): Adjust.
12281 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12283 (win32_wait): Adjust.
12285 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12287 * target.h (struct thread_resume): Delete leave_stopped member.
12288 (struct target_ops): Add a `n' argument to the `resume' callback.
12289 * server.c (start_inferior): Adjust.
12290 (handle_v_cont, myresume): Adjust.
12291 * linux-low.c (check_removed_breakpoint): Adjust to resume
12292 interface change, and to removed leave_stopped field.
12293 (resume_ptr): Delete.
12294 (struct thread_resume_array): New.
12295 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12296 resume interface change.
12297 (linux_continue_one_thread, linux_queue_one_thread)
12298 (resume_status_pending_p): Check if the resume field is NULL
12299 instead of checking the leave_stopped member.
12300 (linux_resume): Adjust to the target resume interface change.
12301 * spu-low.c (spu_resume): Adjust to the target resume interface
12303 * win32-low.c (win32_detach, win32_resume): Ditto.
12305 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12307 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12309 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12311 (linux_continue_one_thread): Only preserve the stepping flag if
12312 there's a pending breakpoint.
12314 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12316 * server.c (main): After the inferior having exited, call
12317 remote_close before exiting gdbserver.
12319 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12321 Fix size of FPSCR in Power 7 processors.
12322 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12323 (PPC_FEATURE_HAS_DFP): New #define.
12324 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12327 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12329 * server.c (handle_query) Whitespace and formatting.
12331 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12333 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12334 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12335 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12336 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12337 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12338 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12339 Makefile.in, configure.ac: Fix whitespace throughout.
12340 * configure: Regenerate.
12342 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12344 * inferiors.c (find_inferior): Make it safe for the callback
12345 function to delete the currently iterated inferior.
12347 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12349 * Makefile.in (linuw_low_h): Move higher.
12350 (thread-db.o): Depend on $(linux_low_h).
12352 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12354 Rename "process" to "lwp" throughout.
12356 * linux-low.c (all_processes): Rename to...
12357 (all_lwps): ... this.
12358 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12359 (add_process): Rename to ...
12360 (add_lwp): ... this. Adjust.
12361 (linux_create_inferior): Adjust.
12362 (linux_attach_lwp): Adjust.
12363 (linux_attach): Adjust.
12364 (linux_kill_one_process): Rename to ...
12365 (linux_kill_one_lwp): ... this. Adjust.
12366 (linux_kill): Adjust.
12367 (linux_detach_one_process): Rename to ...
12368 (linux_detach_one_lwp): ... this. Adjust.
12369 (linux_detach): Adjust.
12370 (check_removed_breakpoint): Adjust.
12371 (status_pending_p): Adjust.
12372 (linux_wait_for_process): Rename to ...
12373 (linux_wait_for_lwp): ... this. Adjust.
12374 (linux_wait_for_event): Adjust.
12375 (send_sigstop): Adjust.
12376 (wait_for_sigstop): Adjust.
12377 (stop_all_processes): Rename to ...
12378 (stop_all_lwps): ... this.
12379 (linux_resume_one_process): Rename to ...
12380 (linux_resume_one_lwp): ... this. Adjust.
12381 (linux_set_resume_request, linux_continue_one_thread)
12382 (linux_queue_one_thread, resume_status_pending_p)
12383 (usr_store_inferior_registers, regsets_store_inferior_registers)
12384 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12386 * linux-low.h (get_process): Rename to ...
12387 (get_lwp): ... this. Adjust.
12388 (get_thread_process): Rename to ...
12389 (get_thread_lwp): ... this. Adjust.
12390 (get_process_thread): Rename to ...
12391 (get_lwp_thread): ... this. Adjust.
12392 (struct process_info): Rename to ...
12393 (struct lwp_info): ... this.
12394 (all_processes): Rename to ...
12395 (all_lwps): ... this.
12396 * proc-service.c (ps_lgetregs): Adjust.
12397 * thread-db.c (thread_db_create_event, find_one_thread)
12398 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12400 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12402 * server.c (handle_query): Handle "qAttached".
12404 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12406 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12407 GPLv3, update license URL.
12409 2009-03-01 Doug Evans <dje@google.com>
12411 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12412 (server_h): Add gdb_signals.h.
12413 (signals.o): Update.
12414 * server.h (target_signal_from_host,target_signal_to_host_p)
12415 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12417 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12419 * remote-utils.c (getpkt): Also generate remote-debug
12420 information if noack_mode is set.
12422 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12424 * server.c (handle_query): Report qXfer:siginfo:read and
12425 qXfer:siginfo:write as supported and handle them.
12426 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12427 * linux-low.c (linux_xfer_siginfo): New.
12428 (linux_target_ops): Set it.
12430 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12432 * server.c (gdbserver_usage): Mention --remote-debug.
12433 (main): Accept '--remote-debug' switch.
12435 2009-01-18 Doug Evans <dje@google.com>
12437 * regcache.c (new_register_cache): No need to check result of xcalloc.
12438 * server.c (handle_search_memory): Back out calls to xmalloc,
12439 result is checked and error is returned to user upon failure.
12440 (handle_query): Ditto. Add more checks for result of malloc.
12441 (handle_v_cont): Check result of malloc, report error back to
12443 (handle_v_run): Ditto. Call freeargv.
12444 * server.h (freeargv): Declare.
12445 * utils.c (freeargv): New fn.
12447 2009-01-15 Doug Evans <dje@google.com>
12449 * gdbreplay.c (perror_with_name): Make arg const char *.
12450 * server.h (target_signal_to_name): Make return type const char *.
12451 * thread-db.c (thread_db_err_str): Make return type const char *.
12452 * utils.c (perror_with_name): Make arg const char *.
12454 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12456 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12457 when handling a EXIT_PROCESS_DEBUG_EVENT.
12459 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12461 * gdbreplay.c (gdbreplay_version): Update copyright year.
12462 * server.c (gdbserver_version): Likewise.
12464 2009-01-05 Doug Evans <dje@google.com>
12466 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12467 (handle_extended_wait): Improve comment.
12469 2008-12-13 Doug Evans <dje@google.com>
12471 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12472 * server.h (ATTR_MALLOC): New macro.
12473 (xmalloc,xcalloc,xstrdup): Declare.
12474 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12475 * inferiors.c: Ditto.
12476 * linux-low.c: Ditto.
12477 * mem-break.c: Ditto.
12478 * regcache.c: Ditto.
12479 * remote-utils.c: Ditto.
12482 * win32-low.c: Ditto.
12484 2008-12-12 Doug Evans <dje@google.com>
12486 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12487 in debugging printf.
12489 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12491 2008-12-09 Doug Evans <dje@google.com>
12493 * linux-low.h (struct process_info): Delete member tid, unused.
12494 * thread-db.c (find_one_thread): Update.
12495 (maybe_attach_thread): Update.
12497 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12499 * target.h (struct target_ops): Add qxfer_osdata member.
12500 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12502 (linux_qxfer_osdata): New functions.
12503 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12505 * server.c (handle_query): Handle "qXfer:osdata:read:".
12506 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12507 (buffer_xml_printf): New functions.
12508 * server.h (struct buffer): New.
12509 (buffer_grow_str, buffer_grow_str0): New macros.
12510 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12511 (buffer_xml_printf): Declare.
12513 2008-11-24 Doug Evans <dje@google.com>
12515 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12517 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12519 * server.c (handle_v_run): Always use the supplied argument list.
12521 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12523 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12524 (xtensa_regmap_table): Add entry for scompare1.
12526 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12528 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12529 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12530 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12531 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12532 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12533 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12534 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12535 XML target descriptions.
12536 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12537 when inferior is running on an ISA 2.05 or later processor. Add
12538 special case to return offset for full 64-bit slot of FPSCR when
12541 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12543 * Makefile.in (SFILES, clean): Added sparc64 files.
12544 (reg-sparc64.o, reg-sparc64.c): New.
12545 * configure.srv (sparc*-*-linux*): New configuration.
12546 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12547 syscall arguments for SPARC.
12548 (regsets_store_inferior_registers): Likewise.
12549 * linux-sparc-low.c: New file.
12551 2008-10-21 Doug Evans <dje@google.com>
12553 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12554 (READLINE_DIR,READLINE_DEP): Delete.
12555 (INTERNAL_CFLAGS): Update.
12556 (LINTFLAGS): Update.
12558 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12560 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12561 whole argv from the last run, not just argv[0].
12563 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12565 * regcache.c (new_register_cache): Return NULL if the register
12566 cache size isn't known yet.
12567 (free_register_cache): Avoid dereferencing a NULL regcache.
12569 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12571 * configure.srv: Merge MIPS and MIPS64.
12573 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12575 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12577 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12579 * Makefile.in: Add required vsx dependencies.
12581 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12582 Declare init_registers_powerpc_vsx32l.
12583 Declare init_registers_powerpc_vsx64l.
12584 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12585 (ppc_arch_setup): Check for VSX in hwcap.
12586 (ppc_fill_vsxregset): New function.
12587 (ppc_store_vsxregset): New function.
12588 Add new VSX entry in regset_info target_regsets.
12590 * configure.srv: Add new VSX dependencies.
12592 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12594 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12595 (remote_open): Set or clear transport_is_reliable.
12596 (putpkt_binary): Don't expect acks in noack mode.
12597 (getpkt): Don't send ack/nac in noack mode.
12598 * server.c (handle_general_set): Handle QStartNoAckMode.
12599 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12601 (main): Reset noack_mode on every connection.
12602 * server.h (noack_mode): Declare.
12604 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12606 * Makefile.in (GDBREPLAY_OBS): New variable.
12607 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12609 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12610 Daniel Jacobowitz <dan@codesourcery.com>
12612 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12613 (usr_store_inferior_registers): Likewise.
12614 (regsets_store_inferior_registers): Likewise.
12616 2008-07-31 Rolf Jansen <rj@surtec.com>
12617 Pedro Alves <pedro@codesourcery.com>
12619 * configure.ac: Check for memmem declaration.
12620 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12621 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12622 (disable_packet_qfThreadInfo): Unconditionally compile.
12623 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12624 * configure, config.in: Regenerate.
12626 2008-07-28 Doug Kwan <dougkwan@google.com>
12628 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12629 (linux_write_memory): Remove declaration of errno.
12631 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12633 * linux-low.c (handle_extended_wait): Do not use "status"
12634 variable uninitialized.
12636 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12638 * server.c (handle_v_attach): Inhibit reporting dll changes.
12640 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12642 * remote-utils.c (prepare_resume_reply): If requested, don't
12643 output "thread:TID" in the T stop reply.
12645 * server.c (disable_packet_vCont, disable_packet_Tthread)
12646 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12647 (handle_query): If requested, disable support for qC, qfThreadInfo
12649 (handle_v_requests): If requested, disable support for vCont.
12650 (gdbserver_show_disableable): New.
12651 (main): Handle --disable-packet and --disable-packet=LIST.
12653 * server.h (disable_packet_vCont, disable_packet_Tthread)
12654 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12656 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12658 * server.c (gdbserver_usage): Mention --version.
12660 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12662 * Makefile.in (gdbreplay.o): New rule.
12664 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12666 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12667 message, not gdbserver.
12669 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12670 Nathan Sidwell <nathan@codesourcery.com>
12671 Joseph Myers <joseph@codesourcery.com>
12673 * acinclude.m4: Include ../../config/acx.m4.
12674 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12675 * configure, config.in: Regenerate.
12676 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12677 * server.c (gdbserver_version): Print PKGVERSION.
12678 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12679 (main): Adjust gdbserver_usage calls.
12680 * gdbreplay.c (version, host_name): Add declarations.
12681 (gdbreplay_version, gdbreplay_usage): New.
12682 (main): Accept --version and --help options.
12684 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12686 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12687 (arm_breakpoint_at): Handle Thumb.
12688 (the_low_target): Add comment.
12690 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12692 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12694 2008-05-09 Doug Evans <dje@google.com>
12696 * server.h (decode_search_memory_packet): Declare.
12697 * remote-utils.c (decode_search_memory_packet): New fn.
12698 * server.c (handle_search_memory_1): New fn.
12699 (handle_search_memory): New fn.
12700 (handle_query): Process qSearch:memory packets.
12702 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12704 * regcache.c (registers_length): Remove.
12705 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12706 full register packet.
12707 * regcache.h (registers_length): Remove prototype.
12708 * server.h (PBUFSIZ): Define to 16384.
12710 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12712 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12713 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12714 powerpc-64l.o, and powerpc-altivec64l.o.
12715 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12716 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12717 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12718 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12719 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12722 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12723 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12724 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12725 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12726 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12727 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12728 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12729 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12730 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12731 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12734 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12735 (init_registers_powerpc_32l): ... this new prototype.
12736 (init_registers_powerpc_32): Remove, replace by ...
12737 (init_registers_powerpc_altivec32l): ... this new prototype.
12738 (init_registers_powerpc_e500): Remove, replace by ...
12739 (init_registers_powerpc_e500l): ... this new prototype.
12740 (init_registers_ppc64): Remove, replace by ...
12741 (init_registers_powerpc_64l): ... this new prototype.
12742 (init_registers_powerpc_64): Remove, replace by ...
12743 (init_registers_powerpc_altivec64l): ... this new prototype.
12744 (ppc_num_regs): Set to 73.
12745 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12746 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12747 (ppc_cannot_store_register): Handle orig_r3 and trap.
12748 (ppc_arch_setup): Update init_registers_... calls.
12749 (ppc_fill_gregset): Handle orig_r3 and trap.
12751 * inferiors.c (clear_inferiors): Reset current_inferior.
12753 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12755 * acinclude.m4: Add override.m4.
12756 * configure: Regenerate.
12758 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12760 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12761 initial call to init_register_ppc64.
12763 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12765 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12766 single powerpc*-*-linux* case.
12767 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12769 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12771 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12772 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12774 * linux-ppc-low.c: Include <elf.h>.
12775 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12776 (ppc_hwcap): New global variable.
12777 (ppc_regmap): Remove __SPE__ #ifdef sections.
12778 (ppc_regmap_e500): New global variable.
12779 (ppc_cannot_store_register): Update __SPE__ special case.
12780 (ppc_get_hwcap): New function.
12781 (ppc_arch_setup): Use it to determine whether inferior supports
12782 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12783 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12784 Do not access registers if target does not support AltiVec.
12785 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12786 Do not access registers if target does not support SPE.
12787 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12789 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12791 * linux-low.c (disabled_regsets, num_regsets): New.
12792 (use_regsets_p): Delete.
12793 (linux_wait_for_process): Clear disabled_regsets.
12794 (regsets_fetch_inferior_registers): Check and set it.
12795 (regsets_store_inferior_registers): Likewise.
12796 (linux_fetch_registers, linux_store_registers): Do not use
12798 (initialize_low): Allocate disabled_regsets.
12800 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12802 * Makefile.in (LIBOBJS): New.
12803 (OBS): Use LIBOBJS.
12804 (memmem.o): New rule.
12805 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12806 * configure: Regenerated.
12808 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12810 * server.c (handle_query): Never return "unsupported" for
12811 qXfer:features:read queries.
12813 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12815 * server.c (get_features_xml): Fix inverted condition.
12816 (handle_query): Always support qXfer:feature:read.
12818 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12820 * server.c (wrapper_argv): New.
12821 (start_inferior): Handle wrapper_argv. If set, expect an extra
12823 (gdbserver_usage): Document --wrapper.
12824 (main): Parse --wrapper.
12826 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12828 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12829 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12830 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12831 (ppc_set_pc): Likewise.
12832 (ppc_arch_setup): New function.
12833 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12834 of collect_register.
12835 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12837 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12839 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12840 instead of linux-ppc64-low.o.
12841 * linux-ppc64-low.c: Remove file.
12842 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12843 (linux-ppc64-low.o): Remove rule.
12845 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12846 (init_registers_powerpc_64): Likewise.
12847 (ppc_regmap): Conditionally define depending on __powerpc64__.
12848 (ppc_cannot_store_register): Do not special-case "fpscr" when
12849 compiled on __powerpc64__.
12850 (ppc_collect_ptrace_register): New function.
12851 (ppc_supply_ptrace_register): New function.
12852 (ppc_breakpoint): Change type to "unsigned int".
12853 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12854 (the_low_target): Conditionally provide initializers for the
12855 arch_setup member depending on __powerpc64__. Install
12856 collect_ptrace_register and supply_ptrace_register members.
12858 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12860 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12861 * server.c (gdbserver_xmltarget): Define.
12862 (get_features_xml): Use it to replace "target.xml" and arch_string.
12864 * configure.srv: Remove srv_xmltarget. Add XML files that were
12865 mentioned there to srv_xmlfiles instead. Remove conditional tests
12866 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12867 srv_xmlfiles and srv_regobj to include all possible choices.
12868 * configure.ac (srv_xmltarget): Remove.
12869 (srv_xmlfiles): Do not add "target.xml".
12870 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12871 checks for supplementary target information.
12872 * configure: Regenerate.
12873 * Makefile.in (XML_TARGET): Remove.
12874 (target.xml): Remove rule.
12875 (clean): Do not clean up target.xml.
12876 (.PRECIOUS): Do not mention target.xml.
12878 * target.h (struct target_ops): Remove arch_string member.
12879 * linux-low.c (linux_arch_string): Remove.
12880 (linux_target_ops): Remove arch_string initializer.
12881 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12882 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12883 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12884 * spu-low.c (spu_arch_string): Remove.
12885 (spu_target_ops): Remove arch_string initializer.
12886 * win32-low.c (win32_arch_string): Remove.
12887 (win32_target_ops): Remove arch_string initializer.
12888 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12889 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12890 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12892 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12894 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12895 by collect_ptrace_register and supply_ptrace_register hooks.
12896 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12897 instead of checking for the_low_target.left_pad_xfer.
12898 (usr_store_inferior_registers): Use collect_ptrace_register callback
12899 instead of checking for the_low_target.left_pad_xfer.
12901 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12902 (s390_supply_ptrace_register): Likewise.
12903 (s390_fill_gregset): Call s390_collect_ptrace_register.
12904 (the_low_target): Update.
12906 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12907 (ppc_supply_ptrace_register): Likewise.
12908 (the_low_target): Update.
12910 * linux-i386-low.c (the_low_target): Update.
12911 * linux-x86-64-low.c (the_low_target): Update.
12913 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12915 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12916 reg-s390.o and reg-s390x.o.
12918 * linux-low.c (new_inferior): New global variable.
12919 (linux_create_inferior, linux_attach): Set it.
12920 (linux_wait_for_process): Call the_low_target.arch_setup after the
12921 target has stopped for the first time.
12922 (initialize_low): Do not call the_low_target.arch_setup.
12924 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12925 (s390_set_pc): Likewise.
12926 (s390_arch_setup): New function.
12927 (the_low_target): Use s390_arch_setup as arch_setup routine.
12929 * regcache.c (realloc_register_cache): New function.
12930 (set_register_cache): Call it for each existing regcache.
12932 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12934 * server.h (init_registers): Remove prototype.
12936 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12937 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12938 instead of init_registers ().
12939 * linux-arm-low.c (init_registers_arm): Add prototype.
12940 (init_registers_arm_with_iwmmxt): Likewise.
12941 (the_low_target): Add initializer for arch_setup field.
12942 * linux-cris-low.c (init_registers_cris): Add prototype.
12943 (the_low_target): Add initializer for arch_setup field.
12944 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12945 (the_low_target): Add initializer for arch_setup field.
12946 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12947 (the_low_target): Add initializer for arch_setup field.
12948 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12949 (the_low_target): Add initializer for arch_setup field.
12950 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12951 (the_low_target): Add initializer for arch_setup field.
12952 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12953 (the_low_target): Add initializer for arch_setup field.
12954 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12955 (init_registers_mips64_linux): Likewise.
12956 (the_low_target): Add initializer for arch_setup field.
12957 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12958 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12959 (the_low_target): Add initializer for arch_setup field.
12960 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12961 (init_registers_powerpc_64): Likewise.
12962 (the_low_target): Add initializer for arch_setup field.
12963 * linux-s390-low.c (init_registers_s390): Add prototype.
12964 (init_registers_s390x): Likewise.
12965 (the_low_target): Add initializer for arch_setup field.
12966 * linux-sh-low.c (init_registers_sh): Add prototype.
12967 (the_low_target): Add initializer for arch_setup field.
12968 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12969 (the_low_target): Add initializer for arch_setup field.
12970 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12971 (the_low_target): Add initializer for arch_setup field.
12973 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12974 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12975 instead of init_registers ().
12976 * win32-arm-low.c (init_registers_arm): Add prototype.
12977 (the_low_target): Add initializer for arch_setup field.
12978 * win32-i386-low.c (init_registers_i386): Add prototype.
12979 (the_low_target): Add initializer for arch_setup field.
12981 * spu-low.c (init_registers_spu): Add prototype.
12982 (initialize_low): Call initialie_registers_spu () instead of
12983 initialize_registers ().
12985 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12987 * server.c (handle_v_requests): When handling the vRun and vAttach
12988 packets, if already debugging a process, don't kill it. Return an
12991 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12993 * server.c (handle_query): Correct length check.
12995 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12997 * win32-low.c (do_initial_child_stuff): Add process handle
12998 parameter. Set current_process_handle and current_process_id from the
12999 parameters. Clear globals.
13000 (win32_create_inferior): Don't set current_process_handle and
13001 current_process_id here. Instead pass them on the call to
13002 do_initial_child_stuff.
13003 (win32_attach): Likewise.
13004 (win32_clear_inferiors): New.
13005 (win32_kill): Don't close the current process handle or the
13006 current thread handle here. Instead call win32_clear_inferiors.
13007 (win32_detach): Don't open a new handle to the process. Call
13008 win32_clear_inferiors.
13009 (win32_join): Don't rely on current_process_handle; open a new
13010 handle using the process id.
13011 (win32_wait): Call win32_clear_inferiors when the inferior process
13014 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13016 * server.c (monitor_show_help): Add "exit".
13018 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13020 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13021 (clean): Add reg-xtensa.c.
13022 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13023 * configure.srv (xtensa*-*-linux*) New target.
13024 * linux-xtensa-low.c: New.
13025 * xtensa-xtregs.c: New.
13027 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13029 * hostio.c: Don't include errno.h.
13030 (errno_to_fileio_errno): Move to hostio-errno.
13031 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13032 error number outputting to the target->hostio_last_error callback.
13033 (hostio_packet_error): Use FILEIO_EINVAL directly.
13034 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13035 calls to hostio_error.
13036 * hostio-errno.c: New.
13037 * server.h (hostio_last_error_from_errno): Declare.
13038 * target.h (target_ops): Add hostio_last_error member.
13039 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13040 as hostio_last_error handler.
13041 * spu-low.c (spu_target_ops): Likewise.
13042 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13043 (wince_hostio_last_error): New functions.
13044 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13045 as hostio_last_error handler.
13046 (win32_target_ops) [!_WIN32_WCE]: Register
13047 hostio_last_error_from_errno as hostio_last_error handler.
13048 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13049 (hostio-errno.o): New rule.
13050 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13051 * configure.srv (srv_hostio_err_objs): New variable. Default to
13053 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13054 * configure: Regenerate.
13056 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13058 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13059 (linux_kill, linux_detach): Clean up the process list.
13060 * remote-utils.c (remote_open): Improve port number parsing.
13061 (putpkt_binary, input_interrupt): Only send interrupts if the target
13063 * server.c (extended_protocol): Make static.
13064 (attached): Define earlier.
13065 (exit_requested, response_needed, program_argv): New variables.
13066 (target_running): New.
13067 (start_inferior): Clear attached here.
13068 (attach_inferior): Set attached here.
13069 (require_running): Define.
13070 (handle_query): Use require_running and target_running. Implement
13072 (handle_v_attach, handle_v_run): New.
13073 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13074 (gdbserver_usage): Update.
13075 (main): Redo argument parsing. Handle --debug and --multi. Handle
13076 --attach along with other options or after the port. Save
13077 program_argv. Support no initial program. Resynchronize
13078 communication with GDB after an error. Handle "monitor exit".
13079 Use require_running and target_running. Always allow the extended
13080 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13081 restart in extended mode.
13082 * README: Refer to the GDB manual. Update --attach usage.
13084 2007-12-20 Andreas Schwab <schwab@suse.de>
13086 * linux-low.c (STACK_SIZE): Define.
13087 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13088 (linux_test_for_tracefork): Likewise.
13090 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13092 * linux-low.c (linux_wait_for_event): Update messages. Do not
13093 reinsert auto-delete breakpoints.
13094 * mem-break.c (struct breakpoint): Change return type of handler to
13096 (set_breakpoint_at): Update handler type.
13097 (reinsert_breakpoint_handler): Return 1 instead of calling
13099 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13101 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13102 * mem-break.h (set_breakpoint_at): Update handler type.
13103 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13104 * win32-low.c (auto_delete_breakpoint): New.
13105 (get_child_debug_event): Use it.
13107 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13109 * configure.ac: Check for pread and pwrite.
13110 * hostio.c (handle_pread): Fall back to lseek and read.
13111 (handle_pwrite): Fall back to lseek and write.
13112 * config.in, configure: Regenerated.
13114 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13116 * server.c (myresume): Add own_buf argument.
13117 (main): Update calls.
13119 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13121 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13122 * remote-utils.c (remote_open): Do not call disable_async_io.
13123 (block_async_io): Delete.
13124 (unblock_async_io): Make static.
13125 (initialize_async_io): New.
13126 * server.c (handle_v_cont): Handle async I/O here.
13127 (myresume): Likewise. Move other common resume tasks here...
13128 (main): ... from here. Call initialize_async_io. Disable async
13129 I/O before the main loop.
13130 * server.h (initialize_async_io): Declare.
13131 (block_async_io, unblock_async_io): Delete prototypes.
13132 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13134 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13136 * remote-utils.c (readchar): Allow binary data in received messages.
13138 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13140 * win32-low.c (attaching): New global.
13141 (win32_create_inferior): Clear the `attaching' global.
13142 (win32_attach): Set the `attaching' global.
13143 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13144 attaching. Only set a breakpoint at the entry point if not
13147 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13149 * server.c (main): Don't report dll events on the initial
13150 connection on attaches.
13152 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13154 * server.c (main): Relax numerical bases supported for the pid of
13155 the --attach command line argument.
13157 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13159 * win32-low.c (win32_attach): Call OpenProcess before
13160 DebugActiveProcess, not after. Add last error output to error
13163 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13165 * win32-low.c (win32_get_thread_context)
13166 (win32_set_thread_context): New functions.
13167 (thread_rec): Use win32_get_thread_context.
13168 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13169 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13172 2007-12-03 Leo Zayas
13173 Pedro Alves <pedro_alves@portugalmail.pt>
13175 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13177 (child_add_thread): Minor cleanup.
13178 (child_continue): Resume artificially suspended threads before
13179 calling ContinueDebugEvent.
13180 (suspend_one_thread): New.
13181 (fake_breakpoint_event): New.
13182 (get_child_debug_event): Change return type to int. Check here if
13183 gdb sent an interrupt request. If a soft interrupt was requested,
13184 fake a breakpoint event. Return 0 if there is no event to handle,
13186 (win32_wait): Don't check here if gdb sent an interrupt request.
13187 Ensure there is a valid event to handle.
13188 (win32_request_interrupt): Add soft interruption method as last
13191 2007-12-03 Leo Zayas
13192 Pedro Alves <pedro_alves@portugalmail.pt>
13194 * win32-low.h (win32_thread_info): Add descriptions to the
13195 structure members. Replace `suspend_count' counter by a
13197 * win32-low.c (thread_rec): Update condition of when to get the
13198 context from the inferior. Rely on ContextFlags being set if it
13199 has already been retrieved. Only suspend the inferior thread if
13200 we haven't already. Warn if that fails.
13201 (continue_one_thread): s/suspend_count/suspended/. Only call
13202 ResumeThread once. Warn if that fails.
13204 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13206 * win32-low.c (win32_wait): Don't read from the inferior when it
13207 has already exited.
13209 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13211 * Makefile.in (win32_low_h): New variable.
13212 (win32-low.o): Add dependency on $(win32_low_h).
13213 (win32-arm-low.o, win32-i386-low.o): New rules.
13215 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13217 * hostio.c: Correct copyright year.
13219 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13221 * Makefile.in (OBS): Add hostio.o.
13222 (hostio.o): New rule.
13223 * server.h (handle_vFile): Declare.
13224 * hostio.c: New file.
13225 * server.c (handle_v_requests): Take packet_len and new_packet_len
13226 for binary packets. Call handle_vFile.
13227 (main): Update call to handle_v_requests.
13229 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13231 * linux-low.c: Include <sched.h>.
13233 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13235 * linux-low.c (linux_tracefork_grandchild): New.
13236 (linux_tracefork_child): Use clone.
13237 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13239 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13241 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13243 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13245 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13247 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13249 * inferiors.c (change_inferior_id): Delete.
13250 (add_pid_to_list, pull_pid_from_list): New.
13251 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13252 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13253 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13254 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13255 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13256 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13257 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13258 (using_threads): Always set to 1.
13259 (handle_extended_wait): New.
13260 (add_process): Do not set TID.
13261 (linux_create_inferior): Set must_set_ptrace_flags.
13262 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13263 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13264 (linux_thread_alive): Rename TID argument to LWPID.
13265 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13266 (linux_wait_for_event): Do not use TID or check using_threads. Update
13267 call to dead_thread_notify. Call handle_extended_wait.
13268 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13269 (send_sigstop): Delete sigstop_sent.
13270 (wait_for_sigstop): Avoid TID.
13271 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13272 (linux_test_for_tracefork): New.
13273 (linux_lookup_signals): Use thread_db_active and
13274 linux_supports_tracefork_flag.
13275 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13276 * linux-low.h (get_process_thread): Avoid TID.
13277 (struct process_ifo): Move thread_known and tid to the end. Remove
13279 (linux_attach_lwp, thread_db_init): Update prototypes.
13280 * server.h (change_inferior_id): Delete prototype.
13281 (add_pid_to_list, pull_pid_from_list): New prototypes.
13282 * thread-db.c (thread_db_use_events): New.
13283 (find_first_thread): Rename to...
13284 (find_one_thread): ...this. Update callers and messages. Do not
13285 call fatal. Check thread_db_use_events. Do not call
13286 change_inferior_id or new_thread_notify.
13287 (maybe_attach_thread): Update. Do not call new_thread_notify.
13288 (thread_db_init): Set thread_db_use_events. Check use_events.
13289 * utils.c (fatal, warning): Correct message prefix.
13291 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13293 * Makefile.in (clean): Remove new files.
13294 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13295 (powerpc-64.o, powerpc-64.c): New rules.
13296 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13297 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13299 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13301 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13302 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13303 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13304 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13305 (target_regsets): Add AltiVec and SPE register sets.
13306 * configure.ac: Check for AltiVec and SPE.
13307 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13308 (ppc_fill_vrregset, ppc_store_vrregset): New.
13309 (target_regsets): Add AltiVec register set.
13310 * configure: Regenerated.
13312 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13314 * linux-low.c (O_LARGEFILE): Define.
13315 (linux_read_memory): Use /proc/PID/mem.
13316 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13317 * configure, config.in: Regenerated.
13319 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13321 * linux-low.c (linux_wait_for_event): Do not pass signals while
13324 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13326 * win32-low.c (create_process): New.
13327 (win32_create_inferior): Use create_process instead of
13328 CreateProcess. If create_process failed retry appending an ".exe"
13329 suffix. Store the GetLastError result immediatelly after
13330 create_process calls and use it on the call to error.
13332 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13334 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13336 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13338 * configure.ac: Switch license to GPLv3.
13340 2007-08-01 Michael Snyder <msnyder@access-company.com>
13342 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13344 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13346 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13348 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13349 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13350 CloseToolhelp32Snapshot.
13351 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13352 CloseToolhelp32Snapshot.
13354 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13356 * server.c (main): Check for inferior exit before main loop.
13358 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13360 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13361 instead of on tmp_desc.
13363 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13364 Daniel Jacobowitz <dan@codesourcery.com>
13366 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13367 (add_thread): Minor cleanups.
13368 (clear_inferiors): Move lower in the file. Clear the DLL
13370 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13371 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13372 (xml_escape_text): New.
13373 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13375 (handle_v_cont): Report errors.
13376 (gdbserver_version): Update.
13377 (main): Correct size of own_buf. Do not report initial DLL events.
13378 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13379 (unloaded_dll, xml_escape_text): New.
13380 * win32-low.c (enum target_waitkind): Update comments.
13381 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13382 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13383 (win32_EnumProcessModules, win32_GetModuleInformation)
13384 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13385 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13386 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13387 (win32_Module32First, win32_Module32Next, load_toolhelp)
13388 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13389 (get_child_debug_event): Handle DLL events.
13390 (win32_wait): Likewise.
13392 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13394 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13395 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13397 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13399 * win32-low.c (handle_output_debug_string): Ignore event if not
13402 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13404 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13406 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13408 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13410 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13412 * inferiors.c (change_inferior_id): Add comment.
13413 * linux-low.c (check_removed_breakpoint): Add an early
13414 prototype. Improve debug output.
13415 (linux_attach): Doc update.
13416 (linux_detach_one_process, linux_detach): Clean up before releasing
13418 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13419 * linux-low.h (struct process_info): Doc improvement.
13420 * mem-break.c (delete_all_breakpoints): New.
13421 * mem-break.h (delete_all_breakpoints): New prototype.
13422 * thread-db.c (find_first_thread): New.
13423 (thread_db_create_event): Call it instead of
13424 thread_db_find_new_threads. Clean up unused variables.
13425 (maybe_attach_thread): Remove first thread handling.
13426 (thread_db_find_new_threads): Use find_first_thread.
13427 (thread_db_get_tls_address): Likewise.
13429 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13431 * thread-db.c (thread_db_find_new_threads): Add prototype.
13432 (thread_db_create_event): Check for the main thread before adding
13434 (maybe_attach_thread): Only enable event reporting if TID == 0.
13435 (thread_db_get_tls_address): Check for new threads.
13437 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13439 * linux-low.c (linux_create_inferior): Try execv before execvp.
13440 * spu-low.c (spu_create_inferior): Likewise.
13442 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13444 * linux-low.c (linux_create_inferior): Change execv to execvp.
13445 * spu-low.c (spu_create_inferior): Likewies.
13447 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13449 * Makefile.in (clean): Clean new files instead of deleted ones.
13450 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13451 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13453 * configure.srv: Specify XML files and new regformats for MIPS and
13455 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13456 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13457 an entry for the restart register.
13458 (mips_cannot_fetch_register, mips_cannot_store_register)
13459 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13460 register names to match the XML descriptions.
13461 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13462 restart register instead of $0.
13464 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13465 Markus Deuling <deuling@de.ibm.com>
13467 * remote-utils.c (decode_xfer_write): New function.
13468 * server.h (decode_xfer_write): Add prototype.
13469 * server.c (handle_query): Add PACKET_LEN argument. Support
13470 qXfer:spu:read and qXfer:spu:write packets.
13471 (main): Pass packet_len to handle_query.
13472 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13473 * target.h (target_ops): Add qxfer_spu.
13475 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13477 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13478 accessing non-seekable spufs files.
13480 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13482 * server.c (handle_query): Add reply for qC packet.
13484 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13485 Leo Zayas <lerele@champenstudios@com>
13487 * server.h (check_remote_input_interrupt_request): New function.
13488 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13489 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13490 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13491 (check_remote_input_interrupt_request): New function.
13492 * server.h (check_remote_input_interrupt_request): Declare.
13493 * win32-low.c (winapi_DebugBreakProcess,
13494 winapi_GenerateConsoleCtrlEvent): New typedefs.
13495 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13497 (win32_wait): Check for remote interrupt request
13498 with check_remote_input_interrupt_request.
13499 (win32_request_interrupt): New function.
13500 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13504 * win32-low.c (debug_registers_changed,
13505 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13506 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13507 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13508 (thread_rec): Get context using the low target.
13509 (child_add_thread): Call thread_added on the low target,
13510 which does the same thing.
13512 (do_initial_child_stuff): Remove debug registers references.
13513 Set context using the low target. Resume threads after
13514 setting the contexts.
13515 (child_continue): Remove dead variable. Remove debug
13516 registers references.
13517 (child_fetch_inferior_registers): Go through the low target.
13518 (do_child_store_inferior_registers): Remove.
13519 (child_store_inferior_registers): Go through the low target.
13520 (win32_resume): Remove debug registers references.
13521 Set context using the low target.
13522 (handle_exception): Change return type to void. Don't record
13523 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13524 first chance exception.
13525 (get_child_debug_event): Change return type to void. Remove
13526 goto loop. Always return after waiting for debug event.
13527 (win32_wait): Convert to switch statement. Handle spurious
13530 * win32-i386-low.c (debug_registers_changed,
13531 debug_registers_used): New.
13532 (initial_stuff): Rename to ...
13533 (i386_initial_stuff): ... this. Clear debug registers
13535 (store_debug_registers): Delete.
13536 (i386_get_thread_context): New.
13537 (load_debug_registers): Delete.
13538 (i386_set_thread_context): New.
13539 (i386_thread_added): New.
13540 (single_step): Rename to ...
13541 (i386_single_step): ... this.
13542 (do_fetch_inferior_registers): Rename to ...
13543 (i386_fetch_inferior_register): ... this.
13544 (i386_store_inferior_register): New.
13545 (the_low_target): Adapt to new interface.
13547 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13548 (arm_get_thread_context): New.
13549 (arm_set_thread_context): New.
13551 (do_fetch_inferior_registers): Rename to ...
13552 (arm_fetch_inferior_register): ... this.
13553 (arm_store_inferior_register): New.
13554 (arm_wince_breakpoint): Reimplement as unsigned long.
13555 (arm_wince_breakpoint_len): Define.
13556 (the_low_target): Adapt to new interface.
13558 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13559 load_debug_registers. Add get_thread_context, set_thread_context,
13560 thread_added and store_inferior_register. Rename
13561 fetch_inferior_registers to fetch_inferior_register.
13562 (regptr): Remove declaration.
13564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13566 * linux-low.c (linux_detach): Change return type to int. Return 0.
13567 * spu-low.c (spu_detach): Likewise.
13569 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13571 * target.h (target_ops): Change return type of detach to int.
13573 (join_inferior): New.
13574 * server.c (main): Don't skip detach support on mingw32.
13575 If the inferior doesn't support detaching return error.
13576 Call join_inferior instead of using waitpid.
13577 * linux-low.c (linux_join): New.
13578 (linux_target_op): Add linux_join.
13579 * spu-low.c (spu_join): New.
13580 (spu_target_ops): Add spu_join.
13581 * win32-low.c (win32_detach): Adapt to new interface.
13582 Reopen current_process_handle before detaching. Issue a child
13583 resume before detaching.
13585 (win32_target_op): Add win32_join.
13587 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13589 * win32-low.c (win32-attach): Fix return value.
13590 * target.h (target_ops): Describe ATTACH return values.
13592 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13594 * win32-low.c (GETPROCADDRESS): Define.
13595 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13596 (winapi_DebugSetProcessKillOnExit): Likewise.
13597 (win32_create_inferior): Force usage of ansi CreateProcessA.
13598 (win32_attach): Use GETPROCADDRESS.
13599 (win32_detach): Likewise.
13601 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13603 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13605 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13607 * win32-low.c: Commit leftover changes from 2007-03-29.
13609 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13611 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13612 fields short instead of int. Add explicit padding.
13613 (i387_cache_to_fsave): Remove unnecessary casts.
13614 (i387_fsave_to_cache): Doc fix.
13615 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13617 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13619 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13620 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13622 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13624 * configure.srv (arm*-*-mingw32ce*): Move near the other
13627 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13629 * configure.ac: Add errno checking.
13630 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13631 sys/file.h and malloc.h.
13632 (AC_CHECK_DECLS): Add perror.
13633 (srv_mingwce): Handle.
13634 * configure.srv (i[34567]86-*-cygwin*): Add
13635 win32-i386-low.o to srv_tgtobj.
13636 (i[34567]86-*-mingw*): Likewise.
13637 (arm*-*-mingw32ce*): Add case.
13638 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13639 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13640 [__MINGW32CE__] (strerror): New function.
13641 [__MINGW32CE__] (errno): Define to GetLastError.
13642 [__MINGW32CE__] (COUNTOF): New macro.
13643 (remote_open): Remove extra close call.
13644 * mem-break.c (delete_breakpoint_at): New function.
13645 * mem-break.h (delete_breakpoint_at): Declare.
13646 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13647 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13648 [USE_WIN32API] (read, write): Add char* casts.
13649 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13650 * server.h: Include wincecompat.h on Windows CE.
13651 [HAVE_ERRNO_H]: Check.
13652 (perror): Declare if not declared.
13653 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13654 (perror_with_name): Remove errno declaration.
13655 * wincecompat.h: New.
13656 * wincecompat.c: New.
13657 * win32-low.h: New.
13658 * win32-arm-low.c: New.
13659 * win32-i386-low.c: New.
13660 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13661 (OUTMSG2): Make it safe.
13663 (COUNTOF): New macro.
13664 (NUM_REGS): Get it from the low target.
13665 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13666 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13667 (thread_rec): Let low target handle debug registers.
13668 (child_add_thread): Likewise.
13669 (child_init_thread_list): Likewise.
13670 (continue_one_thread): Likewise.
13672 (do_child_fetch_inferior_registers): Move to ...
13673 * win32-i386-low.c: ... here, and rename to ...
13674 (do_fetch_inferior_registers): ... this.
13675 * win32-low.c (child_fetch_inferior_registers):
13676 Go through the low target.
13677 (do_child_store_inferior_registers): Use regptr.
13678 (strwinerror): New function.
13679 (win32_create_inferior): Handle Windows CE.
13680 Use strwinerror instead of strerror on Windows error
13681 codes. Add program to the error output.
13682 Don't close the main thread handle on Windows CE.
13683 (win32_attach): Use coredll.dll on Windows CE.
13684 (win32_kill): Close current process and current
13686 (win32_detach): Use coredll.dll on Windows CE.
13687 (win32_resume): Let low target handle debug registers, and
13689 (handle_exception): Add/Remove initial breakpoint. Avoid
13690 non-existant WSTOPSIG on Windows CE.
13691 (win32_read_inferior_memory): Cast to remove warning.
13692 (win32_arch_string): Go through the low target.
13693 (initialize_low): Call set_breakpoint_data with the low
13694 target's breakpoint.
13695 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13696 FOP_REGNUM, mappings): Move to ...
13697 * win32-i386-low.c: ... here.
13698 * win32-low.c (win32_thread_info): Move to ...
13699 * win32-low.h: ... here.
13700 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13701 win32-arm-low.c and wincecompat.c.
13702 (all:): Add $EXEEXT.
13703 (install-only:): Likewise.
13704 (gdbserver:): Likewise.
13705 (gdbreplay:): Likewise.
13706 * config.in: Regenerate.
13707 * configure: Regenerate.
13709 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13711 * win32-low.c: Rename typedef thread_info to
13712 win32_thread_info throughout.
13714 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13716 * win32-i386-low.c: Rename to ...
13717 * win32-low.c: ... this.
13718 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13719 * Makefile.in: Likewise.
13721 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13723 * remote-utils.c (monitor_output): Constify msg parameter.
13724 * server.h (monitor_output): Likewise.
13725 * win32-i386-low.c (handle_output_debug_string): New.
13726 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13727 handle_output_debug_string.
13728 (get_child_debug_event): Likewise.
13730 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13732 * server.c (main): Correct strtoul check.
13734 2007-03-27 Jon Ringle <jon@ringle.org>
13736 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13738 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13740 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13742 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13744 * terminal.h: Check HAVE_SGTTY_H.
13746 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13748 * remote-utils.c (remote_open): Print out the assigned port number.
13750 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13752 * remote-utils.c (monitor_output): New function.
13753 * server.c (debug_threads): Define here.
13754 (monitor_show_help): New function.
13755 (handle_query): Handle qRcmd.
13756 (main): Do not handle 'd' packet.
13757 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13758 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13761 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13763 * Makefile.in (EXEEXT): New.
13764 (clean): Use $(EXEEXT).
13766 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13768 * target.h (target_ops): Rename send_signal to request_interrupt,
13769 and remove enum target_signal parameter.
13770 * linux-low.c (linux_request_interrupt): Rename from
13771 linux_send_signal, and always send SIGINT.
13772 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13773 and always send SIGINT.
13774 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13776 (input_interrupt): Likewise.
13778 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13780 * server.c (get_features_xml): Check if target implemented
13782 * win32-i386-low.c (win32_arch_string): New.
13783 (win32_target_ops): Add win32_arch_string as arch_string member.
13785 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13787 * spu-low.c (spu_arch_string): New.
13788 (spu_target_ops): Add spu_arch_string.
13790 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13792 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13793 * configure.ac: Do not check for terminal.h.
13794 * configure, config.in: Regenerated.
13796 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13798 * Makefile.in (OBS): Add $(XML_BUILTIN).
13799 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13801 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13802 (arm-with-iwmmxt.c): New.
13803 * config.in, configure: Regenerate.
13804 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13805 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13806 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13807 (arm*-*-linux*): Add iWMMXt and regset support.
13808 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13809 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13810 (arm_store_wmmxregset, target_regsets): New.
13811 * server.c (get_features_xml): Take annex argument. Check builtin
13813 (handle_query): Handle multiple annexes.
13815 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13817 * remote-utils.c [USE_WIN32API] (read, write): Define.
13818 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13821 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13823 * linux-i386-low.c (the_low_target): Set arch_string.
13824 * linux-x86-64-low.c (the_low_target): Likewise.
13825 * linux-low.c (linux_arch_string): New.
13826 (linux_target_ops): Add it.
13827 * linux-low.h (struct linux_target_ops): Add arch_string.
13828 * server.c (write_qxfer_response): Use const void * for DATA.
13829 (get_features_xml): New.
13830 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13831 * target.h (struct target_ops): Add arch_string method.
13833 2007-01-03 Denis Pilat <denis.pilat@st.com>
13834 Daniel Jacobowitz <dan@codesourcery.com>
13836 * linux-low.c (linux_kill): Handle being called with no threads.
13837 * win32-i386-low.c (win32_kill): Likewise.
13838 (get_child_debug_event): Clear current_process_handle.
13840 2006-12-30 Denis PILAT <denis.pilat@st.com>
13841 Daniel Jacobowitz <dan@codesourcery.com>
13843 * remote-utils.c (remote_open): Check the type of specified
13844 serial port devices before opening them.
13845 * server.c (main): Kill the inferior if an error occurs during
13846 the first remote_open.
13848 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13850 * README: Update supported targets.
13852 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13854 * Makefile.in (clean): Remove reg-mips64.c.
13855 (reg-mips64.c, reg-mips64.o): New rules.
13856 * configure.srv: Handle mips64. Include regset support for mips.
13857 * linux-mips-low.c (union mips_register): New.
13858 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13859 (mips_breakpoint, mips_breakpoint_at): Use int.
13860 (mips_collect_register, mips_supply_register)
13861 (mips_collect_register_32bit, mips_supply_register_32bit)
13862 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13863 (mips_store_fpregset, target_regsets): New.
13864 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13866 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13868 * configure.srv: Add target "spu*-*-*".
13869 * Makefile.in (clean): Remove reg-spu.c.
13870 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13871 * spu-low.c: New file.
13873 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13875 * configure.ac: Correct td_thr_tls_get_addr test.
13876 * configure: Regenerated.
13878 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13880 * linux-low.c (linux_wait_for_event): Reformat. Use the
13881 pass_signals array.
13882 * remote-utils.c (decode_address_to_semicolon): New.
13883 * server.c (pass_signals, handle_general_set): New.
13884 (handle_query): Mention QPassSignals for qSupported.
13885 (main): Call handle_general_set.
13886 * server.h (pass_signals, decode_address_to_semicolon): New.
13888 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13890 * server.c (handle_query): Correct error handling for read_auxv.
13892 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13894 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13895 and srv_linux_thread_db to yes.
13896 * linux-s390-low.c (s390_fill_gregset): New function.
13897 (target_regsets): Define data structure.
13899 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13901 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13902 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13903 * config.in, configure: Regenerated.
13904 * inferiors.c (gdb_id_to_thread): New function.
13905 (gdb_id_to_thread_id): Use it.
13906 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13907 * linux-low.h (struct process_info): Add th member.
13908 (thread_db_get_tls_address): New prototype.
13909 * remote-utils.c (decode_address): Make non-static.
13910 * server.c (handle_query): Handle qGetTLSAddr.
13911 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13912 * target.h (struct target_ops): Add get_tls_address.
13913 * thread-db.c (maybe_attach_thread): Save the thread handle.
13914 (thread_db_get_tls_address): New.
13916 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13918 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13919 (linux_resume_one_process): Take a siginfo_t *. Update all
13920 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13921 (struct pending_signals): Add a siginfo_t.
13922 (linux_wait_for_process): Always set last_status.
13923 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13924 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13925 * linux-low.h (struct process_info): Add last_status.
13927 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13929 * remote-utils.c (try_rle): New function.
13930 (putpkt_binary): Use it.
13932 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13934 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13935 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13936 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13937 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13938 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13941 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13943 * server.c (terminal_fd): New variable.
13944 (old_foreground_pgrp): Likewise.
13945 (restore_old_foreground_pgrp): New function.
13946 (start_inferior): Record the terminal file descriptor in terminal_fd
13947 and its original foreground group in old_foreground_pgrp. Register
13948 restore_old_foreground_pgrp with atexit().
13950 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13952 * server.c (handle_query): Correct qPart to qXfer.
13954 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13956 * configure.ac: Check for more headers which are missing on
13957 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13958 * configure.srv: Add Cygwin and mingw32.
13959 * remote-utils.c: Don't include headers unconditionally which
13960 are missing on mingw32. Include <winsock.h> for mingw32.
13961 (remote_open): Adjust for mingw32 support. Flush
13962 standard error after writing to it.
13963 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13964 (unblock_async_io, enable_async_io, disable_async_io)
13965 (readchar, getpkt): Update for Winsock support.
13966 (prepare_resume_reply): Expect a protocol signal number.
13967 * server.c: Disable <sys/wait.h> on mingw32.
13968 (start_inferior): Adjust for mingw32 support. Flush
13969 standard error after writing to it.
13970 (attach_inferior): Likewise. Use protocol signal
13972 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13974 * win32-i386-low.c: New file.
13975 * Makefile.in (XM_CLIBS): Set.
13976 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13977 (win32-i386-low.o): New dependency rule.
13978 * linux-low.c (linux_wait): Use target signal numbers.
13979 * target.h (struct target_ops): Doc fix.
13980 * server.h (target_signal_to_name): New prototype.
13981 * gdbreplay.c: Don't include headers unconditionally which
13982 are missing on mingw32. Include <winsock.h> for mingw32.
13983 (remote_close, remote_open): Adjust for Winsock support.
13984 * configure, config.in: Regenerated.
13986 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13988 * server.c (decode_xfer_read, write_qxfer_response): New.
13989 (handle_query): Take a packet length argument. Handle
13990 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13991 the qSupported response.
13992 (main): Update call to handle_query.
13994 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13996 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13997 (putpkt_binary): Renamed from putpkt and adjusted for binary
13999 (putpkt): New wrapper for putpkt_binary.
14000 (readchar): Don't mask off the high bit.
14001 (decode_X_packet): New function.
14002 * server.c (main): Call putpkt_binary if a handler sets the packet
14003 length. Save the length of the incoming packet. Handle 'X'.
14004 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14006 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14008 * server.c (handle_query): Handle qSupported.
14010 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14012 * remote-utils.c (all_symbols_looked_up): New variable.
14013 (look_up_one_symbol): Check it.
14014 * server.h (look_up_one_symbol): New declaration.
14015 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14017 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14019 * Makefile.in (linux-arm-low.o): Update dependencies.
14020 * linux-arm-low.c: Include "gdb_proc_service.h".
14021 (PTRACE_GET_THREAD_AREA): Define.
14022 (ps_get_thread_area): New function.
14024 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14026 * configure.srv (m68k*-*-uclinux*): New target.
14027 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14028 (linux_resume_one_process): Remove extraneous cast.
14029 (linux_read_offsets): New.
14030 (linux_target_op): Add linux_read_offsets on mmuless systems.
14031 * server.c (handle_query): Add qOffsets logic.
14032 * target.h (struct target_ops): Add read_offsets.
14034 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14036 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14037 (PTRACE_GET_THREAD_AREA): Define.
14038 (ps_get_thread_area): New function.
14039 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14040 (linux-x86-64-low.o): Update.
14042 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14044 * configure.ac: Remove checks for prfpregset_t.
14045 * gdb_proc_service.h: New file.
14046 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14047 new "gdb_proc_service.h".
14048 * proc-service.c: Likewise.
14049 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14050 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14051 * Makefile.in (gdb_proc_service_h): Updated.
14052 * configure, config.in: Regenerated.
14054 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14056 * remote-utils.c (prepare_resume_reply): Move declaration
14057 of gdb_id_from_wait to the top of the block.
14059 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14061 * linux-low.c (regsets_store_inferior_registers): Read the regset
14062 from the target before filling it.
14064 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14066 * server.c (attach_inferior): Return SIGTRAP for a successful
14069 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14071 * Makefile.in (OBS): Add version.o.
14072 (STAGESTUFF): Delete.
14073 (version.o): Add dependencies.
14074 (version.c): Replace rule.
14075 (clean): Remove version.c.
14076 * server.c (gdbserver_version): New.
14077 (gdbserver_usage): Use printf.
14078 (main): Handle --version and --help.
14079 * server.h (version, host_name): Add declarations.
14081 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14093 * linux-x86-64-low.c:
14095 * linux-s390-low.c:
14096 * linux-ppc64-low.c:
14098 * linux-mips-low.c:
14099 * linux-m68k-low.c:
14100 * linux-m32r-low.c:
14103 * linux-ia64-low.c:
14104 * linux-i386-low.c:
14105 * linux-crisv32-low.c:
14117 * gdbserver.1: Add (C) after Copyright. Update the FSF
14120 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14122 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14123 (arm_breakpoint_at): Recognize both breakpoints.
14124 (the_low_target): Use the correct breakpoint instruction.
14126 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14128 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14129 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14130 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14131 (the_low_target): Update.
14133 2005-10-25 Andreas Schwab <schwab@suse.de>
14135 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14137 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14138 (ia64_num_regs): Reduce to 462.
14140 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14142 * acinclude.m4: Correct quoting.
14143 * aclocal.m4: Regenerated.
14145 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14146 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14147 (thread_db_init): Call thread_db_err_str.
14148 * configure.ac: Check for TD_VERSION.
14149 * config.in, configure: Regenerated.
14151 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14153 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14155 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14157 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14158 is not available. Define HAVE_PTRACE_GETREGS if it is.
14159 * config.in, configure: Regenerated.
14160 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14161 * linux-i386-low.c, linux-m68k-low.c: Update to use
14162 HAVE_PTRACE_GETREGS.
14163 * linux-low.c (regsets_fetch_inferior_registers)
14164 (regsets_store_inferior_registers): Only return 0 if we processed
14166 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14167 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14169 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14171 * inferiors.c (struct thread_info): Add gdb_id.
14172 (add_thread): Add gdb_id argument.
14173 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14174 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14175 calls to add_thread.
14176 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14177 * server.c (handle_query): Use thread_to_gdb_id.
14178 (handle_v_cont, main): Use gdb_id_to_thread_id.
14179 * server.h (add_thread): Update prototype.
14180 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14183 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14185 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14186 left-padded registers.
14187 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14188 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14190 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14192 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14193 * configure: Regenerate.
14194 * config.in: Regenerate.
14195 * server.h (NEED_DECLARATION_STRERROR):
14196 Replace with !HAVE_DECL_STRERROR.
14198 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14200 * linux-low.c (linux_wait, linux_send_signal): Don't test
14201 an unsigned long variable for > 0 if it could be MAX_ULONG.
14202 * server.c (myresume): Likewise.
14203 * target.c (set_desired_inferior): Likewise.
14205 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14207 * configure.ac: Simplify and improve check for socklen_t.
14208 * configure, config.in: Regenerate.
14210 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14212 * acconfig.h: Remove.
14213 * configure.ac: Add a test for socklen_t. Use three-argument
14214 AC_DEFINE throughout.
14215 * config.in: Regenerated using autoheader 2.59.
14216 * configure: Regenerated.
14218 * gdbreplay.c (socklen_t): Provide a default.
14219 (remote_open): Use socklen_t.
14220 * remote-utils.c (socklen_t): Provide a default.
14221 (remote_open): Use socklen_t.
14222 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14225 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14227 * linux-low.c (linux_read_memory, linux_write_memory)
14228 (linux_read_auxv): Likewise.
14229 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14230 (check_mem_write): Likewise.
14231 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14233 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14234 (registers_from_string, register_data): Likewise.
14235 * server.c (handle_query, main): Likewise.
14236 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14237 (decode_M_packet): Likewise.
14238 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14239 * target.h (struct target_ops): Update read_memory, write_memory,
14241 (read_inferior_memory, write_inferior_memory): Update.
14242 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14243 to unsigned char *.
14244 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14245 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14246 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14247 linux-s390-low.c, linux-sh-low.c: Update for changes in
14248 read_inferior_memory and the_low_target->breakpoint.
14250 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14252 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14253 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14254 * configure.srv: Add powerpc64-*-linux*.
14255 * linux-ppc64-low.c: New file.
14257 2005-05-23 Orjan Friberg <orjanf@axis.com>
14259 * linux-cris-low.c: New file with support for CRIS.
14260 * linux-crisv32-low.c: Ditto for CRISv32.
14261 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14262 (clean): Add reg-cris.c and reg-crisv32.c.
14263 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14264 reg-crisv32.o, and reg-crisv32.c to make rules.
14265 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14266 recognized targets.
14268 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14270 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14271 of sizeof (PTRACE_XFER_TYPE).
14272 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14274 2005-05-12 Orjan Friberg <orjanf@axis.com>
14276 * target.h (struct target_ops): Add insert_watchpoint,
14277 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14278 pointers for hardware watchpoint support.
14279 * linux-low.h (struct linux_target_ops): Ditto.
14280 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14281 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14282 to linux_target_ops.
14283 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14285 * server.c (main): Recognize 'Z' and 'z' packets.
14287 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14289 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14290 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14291 (the_low_target): Add new members.
14293 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14295 * proc-service.c (ps_lgetregs): Search all_processes instead of
14298 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14300 * server.c (start_inferior): Change return type to int.
14301 (attach_inferior): Change sigptr to int *.
14302 (handle_v_cont, handle_v_requests): Change signal to int *.
14303 (main): Change signal to int.
14305 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14307 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14308 * configure.srv: Add m32r*-*-linux*.
14309 * linux-m32r-low.c: New file.
14311 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14313 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14315 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14317 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14318 Take unsigned long arguments for PIDs.
14319 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14320 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14321 (wait_for_sigstop, linux_resume_one_process)
14322 (regsets_fetch_inferior_registers, linux_send_signal)
14323 (linux_read_auxv): Likewise. Update the types of variables holding
14324 PIDs. Update format string specifiers.
14325 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14326 * remote-utils.c (prepare_resume_reply): Likewise.
14327 * server.c (cont_thread, general_thread, step_thread)
14328 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14330 (handle_query): Update format specifiers.
14331 (handle_v_cont, main): Use strtoul for thread IDs.
14332 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14333 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14334 (general_thread, step_thread, thread_from_wait)
14335 (old_thread_from_wait): Update.
14336 * target.h (struct thread_resume): Use unsigned long for THREAD.
14337 (struct target_ops): Use unsigned long for arguments to attach and
14340 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14342 * acinclude.m4: Include bfd/bfd.m4 directly.
14343 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14344 <agriffis@toolchain.org>.
14345 * aclocal.m4, configure: Regenerated.
14347 2005-01-07 Andrew Cagney <cagney@gnu.org>
14349 * configure.ac: Rename configure.in, require autoconf 2.59.
14350 * configure: Re-generate.
14352 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14354 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14355 LIBS when finished.
14356 * aclocal.m4: Regenerated.
14357 * configure: Regenerated.
14359 2004-11-21 Andreas Schwab <schwab@suse.de>
14361 * linux-m68k-low.c (m68k_num_gregs): Define.
14362 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14363 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14364 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14365 (m68k_breakpoint_at): New. Add to the_low_target.
14367 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14368 srv_linux_thread_db to yes.
14370 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14372 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14373 (ARCH_SET_FS): Likewise.
14374 (ARCH_GET_FS): Likewise.
14375 (ARCH_GET_GS): Likewise.
14377 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14379 * linux-i386-low.c (ps_get_thread_area): New.
14380 * linux-x86-64-low.c (ps_get_thread_area): New.
14381 * linux-low.c: Include <sys/syscall.h>.
14382 (linux_kill_one_process): Don't kill the first thread here.
14383 (linux_kill): Kill the first thread here.
14384 (kill_lwp): New function.
14385 (send_sigstop, linux_send_signal): Use it.
14386 * proc-service.c: Clean up #ifdefs.
14387 (fpregset_info): Delete.
14388 (ps_lgetregs): Update and enable implementation.
14389 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14391 * remote-utils.c (struct sym_cache, symbol_cache): New.
14392 (input_interrupt): Print a clearer message.
14393 (async_io_enabled): New variable.
14394 (enable_async_io, disable_async_io): Use it. Update comments.
14395 (look_up_one_symbol): Use the symbol cache.
14396 * thread-db.c (thread_db_look_up_symbols): New function.
14397 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14399 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14401 * configure.in: Test for -rdynamic.
14402 * configure: Regenerated.
14403 * Makefile (INTERNAL_LDFLAGS): New.
14404 (gdbserver, gdbreplay): Use it.
14406 2004-09-02 Andrew Cagney <cagney@gnu.org>
14408 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14410 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14412 * linux-low.c (linux_wait): Clear all_processes list also.
14414 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14416 * linux-low.c: Include <errno.h>. Remove extern declaration of
14419 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14421 * gdbreplay.c, server.h, utils.c: Update copyright years.
14423 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14425 * server.c (main): Print child status or termination signal from
14426 variable 'signal', not 'sig'.
14428 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14430 * linux-low.c (linux_read_memory): Change return type to
14431 int. Check for and return error from ptrace().
14432 * target.c (read_inferior_memory): Change return type to int. Pass
14433 back return status from the_target->read_memory().
14434 * target.h (struct target_ops): Adapt *read_memory() prototype.
14436 (read_inferior_memory): Adapt prototype.
14437 * server.c (main): Return an error packet if
14438 read_inferior_memory() returns an error.
14440 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14442 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14443 Unify with other clean targets.
14445 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14447 * server.c (handle_v_cont): Call set_desired_inferior.
14449 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14451 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14453 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14455 * linux-low.c (linux_wait): Unblock async I/O.
14456 (linux_resume): Block and enable async I/O.
14457 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14458 * server.h (block_async_io, unblock_async_io): Add prototypes.
14460 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14462 * remote-utils.c (remote_open): Print a status notice after
14463 opening a TCP port.
14464 * server.c (attach_inferior): Print a status notice after
14467 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14469 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14471 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14473 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14475 * server.c, target.h: Update copyright years.
14477 2004-02-25 Roland McGrath <roland@redhat.com>
14479 * target.h (struct target_ops): New member `read_auxv'.
14480 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14481 * linux-low.c (linux_read_auxv): New function.
14482 (linux_target_ops): Initialize `read_auxv' member to that.
14484 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14486 Committed by Jim Blandy <jimb@redhat.com>.
14488 * linux-s390-low.c (s390_num_regs): Update.
14489 (s390_regmap): Remove control registers. Use __s390x__ predefine
14490 instead of GPR_SIZE to distiguish s390 and s390x targets.
14492 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14494 * linux-low.c: Update copyright year.
14495 (check_removed_breakpoint): Clear pending_is_breakpoint.
14496 (linux_set_resume_request, linux_queue_one_thread)
14497 (resume_status_pending_p): New functions.
14498 (linux_continue_one_thread): Use process->resume.
14499 (linux_resume): Only resume threads if there are no pending events.
14500 * linux-low.h (struct process_info): Add resume request
14503 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14505 * regcache.c (new_register_cache): Clear the allocated register
14506 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14508 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14510 * linux-low.c (linux_resume): Take a struct thread_resume *
14512 (linux_wait): Update call.
14513 (resume_ptr): New static variable.
14514 (linux_continue_one_thread): Renamed from
14515 linux_continue_one_process. Use resume_ptr.
14516 (linux_resume): Use linux_continue_one_thread.
14517 * server.c (handle_v_cont, handle_v_requests): New functions.
14518 (myresume): New function.
14519 (main): Handle 'v' case.
14520 * target.h (struct thread_resume): New type.
14521 (struct target_ops): Change argument of "resume" to struct
14523 (myresume): Delete macro.
14525 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14527 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14528 (uninstall): Support DESTDIR.
14530 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14532 * configure.srv: Add xscale*linux copy of arm*linux entry.
14534 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14536 * linux-arm-low.c (arm_reinsert_addr): New function.
14537 (the_low_target): Add arm_reinsert_addr.
14539 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14541 * mem-break.c: Remove whitespace at end of file.
14543 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14545 * configure.in: Check whether we need to prototype strerror.
14546 * server.h: Optionally prototype strerror.
14547 * gdbreplay.c (perror_with_name): Use strerror.
14548 * linux-low.c (linux_attach_lwp): Use strerror.
14549 * utils.c (perror_with_name): Use strerror.
14550 * config.in, configure: Regenerated.
14552 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14554 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14555 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14557 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14559 * Makefile.in (SFILES): Update.
14560 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14561 low-sun3.c: Remove files.
14563 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14565 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14566 (linux_detach_one_process, linux_detach): New functions.
14567 (linux_target_ops): Add linux_detach.
14568 * server.c (main): Handle 'D' packet.
14569 * target.h (struct target_ops): Add "detach" member.
14570 (detach_inferior): Define.
14572 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14574 From Kelley Cook <kelleycook@wideopenwest.com>:
14575 * configure.srv: Accept i[34567]86 variants.
14577 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14579 * linux-low.c (linux_wait_for_event): Correct comment typos.
14580 (linux_resume_one_process): Call check_removed_breakpoint.
14581 (linux_send_signal): New function.
14582 (linux_target_ops): Add linux_send_signal.
14583 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14585 * target.h (struct target_ops): Add send_signal.
14587 2003-05-29 Jim Blandy <jimb@redhat.com>
14589 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14590 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14591 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14592 away part of the register's value.
14594 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14596 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14597 (linux_wait_for_event, linux_init_signals): Likewise.
14599 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14601 * configure.in: Check for stdlib.h.
14602 * configure: Regenerated.
14603 * config.in: Regenerated.
14605 2003-01-04 Andreas Schwab <schwab@suse.de>
14607 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14609 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14611 * Makefile.in: Remove obsolete code.
14613 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14615 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14616 defined(PT_FPR0_HI).
14618 2002-11-17 Stuart Hughes <seh@zee2.com>
14620 * linux-arm-low.c (arm_num_regs): Increase.
14621 (arm_regmap): Include status register.
14623 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14625 * linux-low.c (register_addr): Remove incorrect -1 check.
14627 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14629 * linux-low.c (linux_create_inferior): Call setpgid. Return
14631 (unstopped_p, linux_signal_pid): Remove.
14632 (linux_target_ops): Remove linux_signal_pid.
14633 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14634 global instead of target method.
14635 * target.h (struct target_ops): Remove signal_pid. Update comment
14636 for create_inferior.
14637 * server.c (signal_pid): New variable.
14638 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14639 gdbserver. Set the child to be the foreground process group.
14640 (attach_inferior): Set signal_pid.
14642 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14644 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14646 2002-08-20 Jim Blandy <jimb@redhat.com>
14648 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14651 2002-08-01 Andrew Cagney <cagney@redhat.com>
14653 * Makefile.in: Make chill references obsolete.
14655 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14657 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14658 * configure: Regenerate.
14659 * config.in: Regenerate.
14661 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14663 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14664 (perror_with_name, remote_close, remote_open, expect, play): Static.
14666 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14668 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14669 byte offsets instead of an array of indexes.
14670 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14672 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14674 * regcache.c: Add comment.
14676 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14678 * thread-db.c: New file.
14679 * proc-service.c: New file.
14680 * acinclude.m4: New file.
14681 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14682 proc-service.o, and thread-db.o.
14683 (linux-low.o): Add USE_THREAD_DB.
14684 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14685 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14686 * aclocal.m4: Regenerated.
14687 * config.in: Regenerated.
14688 * configure: Regenerated.
14689 * configure.in: Check for proc_service.h, sys/procfs.h,
14690 thread_db.h, and linux/elf.h headrs.
14691 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14692 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14693 Check for -lthread_db and thread support.
14694 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14695 PowerPC, and SuperH.
14696 * i387-fp.c: Constify arguments.
14697 * i387-fp.h: Likewise.
14698 * inferiors.c: (struct thread_info): Renamed from
14699 `struct inferior_info'. Remove PID member. Use generic inferior
14700 list header. All uses updated.
14701 (inferiors, signal_pid): Removed.
14702 (all_threads): New variable.
14703 (get_thread): Define.
14704 (add_inferior_to_list): New function.
14705 (for_each_inferior): New function.
14706 (change_inferior_id): New function.
14707 (add_inferior): Removed.
14708 (remove_inferior): New function.
14709 (add_thread): New function.
14710 (free_one_thread): New function.
14711 (remove_thread): New function.
14712 (clear_inferiors): Use for_each_inferior and free_one_thread.
14713 (find_inferior): New function.
14714 (find_inferior_id): New function.
14715 (inferior_target_data): Update argument type.
14716 (set_inferior_target_data): Likewise.
14717 (inferior_regcache_data): Likewise.
14718 (set_inferior_regcache_data): Likewise.
14719 * linux-low.c (linux_bp_reinsert): Remove.
14720 (all_processes, stopping_threads, using_thrads)
14721 (struct pending_signals, debug_threads, pid_of): New.
14722 (inferior_pid): Replace with macro.
14723 (struct inferior_linux_data): Remove.
14724 (get_stop_pc, add_process): New functions.
14725 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14726 Use add_process and add_thread.
14727 (linux_attach_lwp): New function, based on old linux_attach. Use
14728 add_process and add_thread. Set stop_expected for new threads.
14729 (linux_attach): New function.
14730 (linux_kill_one_process): New function.
14731 (linux_kill): Kill all LWPs.
14732 (linux_thread_alive): Use find_inferior_id.
14733 (check_removed_breakpoints, status_pending_p): New functions.
14734 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14735 Update. Use WNOHANG. Wait for cloned processes also. Update process
14736 struct for the found process.
14737 (linux_wait_for_event): New function.
14738 (linux_wait): Use it. Support LWPs.
14739 (send_sigstop, wait_for_sigstop, stop_all_processes)
14740 (linux_resume_one_process, linux_continue_one_process): New functions.
14741 (linux_resume): Support LWPs.
14742 (REGISTER_RAW_SIZE): Remove.
14743 (fetch_register): Use register_size instead. Call supply_register.
14744 (usr_store_inferior_registers): Likewise. Call collect_register.
14745 Fix recursive case.
14746 (regsets_fetch_inferior_registers): Improve error message.
14747 (regsets_store_inferior_registers): Add debugging.
14748 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14749 (unstopped_p, linux_signal_pid): New functions.
14750 (linux_target_ops): Add linux_signal_pid.
14751 (linux_init_signals): New function.
14752 (initialize_low): Call it. Initialize using_threads.
14753 * regcache.c (inferior_regcache_data): Add valid
14755 (get_regcache): Fetch registers lazily. Add fetch argument
14756 and update all callers.
14757 (regcache_invalidate_one, regcache_invalidate): New
14759 (new_register_cache): Renamed from create_register_cache.
14760 Return the new regcache.
14761 (free_register_cache): Change argument to a void *.
14762 (registers_to_string, registers_from_string): Call get_regcache
14763 with fetch flag set.
14764 (register_data): Make static. Pass fetch flag to get_regcache.
14765 (supply_register): Call get_regcache with fetch flag clear.
14766 (collect_register): Call get_regcache with fetch flag set.
14767 (collect_register_as_string): New function.
14768 * regcache.h: Update.
14769 * remote-utils.c (putpkt): Flush after debug output and use
14771 Handle input interrupts while waiting for an ACK.
14772 (input_interrupt): Use signal_pid method.
14773 (getpkt): Flush after debug output and use stderr.
14774 (outreg): Use collect_register_as_string.
14775 (new_thread_notify, dead_thread_notify): New functions.
14776 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14777 and general_thread.
14778 (look_up_one_symbol): Flush after debug output.
14779 * server.c (step_thread, server_waiting): New variables.
14780 (start_inferior): Don't use signal_pid. Update call to mywait.
14781 (attach_inferior): Update call to mywait.
14782 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14783 (main): Don't fetch/store registers explicitly. Use
14784 set_desired_inferior. Support proposed ``Hs'' packet. Update
14786 * server.h: Update.
14787 (struct inferior_list, struct_inferior_list_entry): New.
14788 * target.c (set_desired_inferior): New.
14789 (write_inferior_memory): Constify.
14790 (mywait): New function.
14791 * target.h: Update.
14792 (struct target_ops): New signal_pid method.
14793 (mywait): Removed macro, added prototype.
14795 * linux-low.h (regset_func): Removed.
14796 (regset_fill_func, regset_store_func): New.
14797 (enum regset_type): New.
14798 (struct regset_info): Add type field. Use new operation types.
14799 (struct linux_target_ops): stop_pc renamed to get_pc.
14800 Add decr_pc_after_break and breakpoint_at.
14801 (get_process, get_thread_proess, get_process_thread)
14802 (strut process_info, all_processes, linux_attach_lwp)
14803 (thread_db_init): New.
14805 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14806 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14807 (the_low_target): Add new members.
14808 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14809 (i386_store_fpxregset): Constify.
14810 (target_regsets): Add new kind identifier.
14811 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14812 (i386_set_pc): Add debugging.
14813 (i386_breakpoint_at): New function.
14814 (the_low_target): Add new members.
14815 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14816 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14817 (mips_breakpoint_at): New.
14818 (the_low_target): Add new members.
14819 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14820 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14821 (the_low_target): Add new members.
14822 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14823 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14824 (the_low_target): Add new members.
14825 * linux-x86-64-low.c (target_regsets): Add new kind
14828 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14830 From Martin Pool <mbp@samba.org>:
14831 * server.c (gdbserver_usage): New function.
14834 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14836 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14837 stop_at -> stop_pc.
14839 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14841 * Makefile.in: Remove obsolete code.
14843 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14845 * linux-low.c (regsets_fetch_inferior_registers),
14846 (regsets_store_inferior_registers): Removed cast to int from
14848 * regcache.h: Added declaration of struct inferior_info.
14850 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14852 * inferiors.c (struct inferior_info): Add regcache_data.
14853 (add_inferior): Call create_register_cache.
14854 (clear_inferiors): Call free_register_cache.
14855 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14856 * regcache.c (struct inferior_regcache_data): New.
14857 (registers): Remove.
14858 (get_regcache): New function.
14859 (create_register_cache, free_register_cache): New functions.
14860 (set_register_cache): Don't initialize the register cache here.
14861 (registers_to_string, registers_from_string, register_data): Call
14863 * regcache.h: Add prototypes.
14864 * server.h: Likewise.
14866 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14868 * mem-break.c: New file.
14869 * mem-break.h: New file.
14870 * Makefile.in: Add mem-break.o rule; update server.h
14872 * inferiors.c (struct inferior_info): Add target_data
14874 (clear_inferiors): Free target_data member if set.
14875 (inferior_target_data, set_inferior_target_data): New functions.
14876 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14877 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14878 * linux-low.c (linux_bp_reinsert): New variable.
14879 (struct inferior_linux_data): New.
14880 (linux_create_inferior): Use set_inferior_target_data.
14881 (linux_attach): Likewise. Call add_inferior.
14882 (linux_wait_for_one_inferior): New function.
14883 (linux_wait): Call it.
14884 (linux_write_memory): Add const.
14885 (initialize_low): Call set_breakpoint_data.
14886 * linux-low.h (struct linux_target_ops): Add breakpoint
14888 * server.c (attach_inferior): Remove extra add_inferior
14890 * server.h: Include mem-break.h. Update inferior.c
14892 * target.c (read_inferior_memory)
14893 (write_inferior_memory): New functions.
14894 * target.h (read_inferior_memory)
14895 (write_inferior_memory): Change macros to prototypes.
14896 (struct target_ops): Update comments. Add const to write_memory
14899 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14901 * linux-low.c (usr_store_inferior_registers): Support
14902 registers which are allowed to fail to store.
14903 * linux-low.h (linux_target_ops): Likewise.
14904 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14905 (ppc_cannot_store_register): FPSCR may not be storable.
14907 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14909 * server.h: Include <string.h> if HAVE_STRING_H.
14910 * ChangeLog: Correct paths in last ChangeLog entry.
14912 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14914 * linux-low.h: Remove obsolete prototypes.
14915 (struct linux_target_ops): New.
14916 (extern the_low_target): New.
14917 * linux-low.c (num_regs, regmap): Remove declarations.
14918 (register_addr): Use the_low_target explicitly.
14919 (fetch_register): Likewise.
14920 (usr_fetch_inferior_registers): Likewise.
14921 (usr_store_inferior_registers): Likewise.
14922 * linux-arm-low.c (num_regs): Remove.
14923 (arm_num_regs): Define.
14924 (arm_regmap): Renamed from regmap, made static.
14925 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14927 (arm_cannot_store_register): Renamed from cannot_store_register,
14929 (the_low_target): New.
14930 * linux-i386-low.c (num_regs): Remove.
14931 (i386_num_regs): Define.
14932 (i386_regmap): Renamed from regmap, made static.
14933 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14935 (i386_cannot_store_register): Renamed from cannot_store_register,
14937 (the_low_target): New.
14938 * linux-ia64-low.c (num_regs): Remove.
14939 (ia64_num_regs): Define.
14940 (ia64_regmap): Renamed from regmap, made static.
14941 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14943 (ia64_cannot_store_register): Renamed from cannot_store_register,
14945 (the_low_target): New.
14946 * linux-m68k-low.c (num_regs): Remove.
14947 (m68k_num_regs): Define.
14948 (m68k_regmap): Renamed from regmap, made static.
14949 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14951 (m68k_cannot_store_register): Renamed from cannot_store_register,
14953 (the_low_target): New.
14954 * linux-mips-low.c (num_regs): Remove.
14955 (mips_num_regs): Define.
14956 (mips_regmap): Renamed from regmap, made static.
14957 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14959 (mips_cannot_store_register): Renamed from cannot_store_register,
14961 (the_low_target): New.
14962 * linux-ppc-low.c (num_regs): Remove.
14963 (ppc_num_regs): Define.
14964 (ppc_regmap): Renamed from regmap, made static.
14965 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14967 (ppc_cannot_store_register): Renamed from cannot_store_register,
14969 (the_low_target): New.
14970 * linux-s390-low.c (num_regs): Remove.
14971 (s390_num_regs): Define.
14972 (s390_regmap): Renamed from regmap, made static.
14973 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14975 (s390_cannot_store_register): Renamed from cannot_store_register,
14977 (the_low_target): New.
14978 * linux-sh-low.c (num_regs): Remove.
14979 (sh_num_regs): Define.
14980 (sh_regmap): Renamed from regmap, made static.
14981 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14983 (sh_cannot_store_register): Renamed from cannot_store_register,
14985 (the_low_target): New.
14986 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14987 (the_low_target): New.
14989 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14991 * Makefile.in: Add stamp-h target.
14992 * configure.in: Create stamp-h.
14993 * configure: Regenerated.
14995 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14997 * inferiors.c: New file.
14998 * target.c: New file.
14999 * target.h: New file.
15000 * Makefile.in: Add target.o and inferiors.o. Update
15002 * linux-low.c (inferior_pid): New static variable,
15003 moved from server.c.
15004 (linux_create_inferior): Renamed from create_inferior.
15005 Call add_inferior. Return 0 on success instead of a PID.
15006 (linux_attach): Renamed from myattach.
15007 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15008 (linux_thread_alive): Renamed from mythread_alive.
15009 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15011 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15012 (regsets_store_inferior_registers): Correct error message.
15013 Add missing ``return 0''.
15014 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15015 (linux_store_registers): Renamed from store_inferior_registers.
15016 (linux_read_memory): Renamed from read_inferior_memory.
15017 (linux_write_memory): Renamed from write_inferior_memory.
15018 (linux_target_ops): New structure.
15019 (initialize_low): Call set_target_ops ().
15020 * remote-utils.c (unhexify): New function.
15021 (hexify): New function.
15022 (input_interrupt): Send signals to ``signal_pid''.
15023 * server.c (inferior_pid): Remove.
15024 (start_inferior): Update create_inferior call.
15025 (attach_inferior): Call add_inferior.
15026 (handle_query): New function.
15027 (main): Call handle_query for `q' packets.
15028 * server.h: Include "target.h". Remove obsolete prototypes.
15029 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15031 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15033 * Makefile.in: Add WARN_CFLAGS. Update configury
15035 * configure.in: Check for <string.h>
15036 * configure: Regenerate.
15037 * config.in: Regenerate.
15038 * gdbreplay.c: Include needed system headers.
15039 (remote_open): Remove strchr prototype.
15040 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15041 * regcache.c (supply_register): Change buf argument to const void *.
15042 (supply_register_by_name): Likewise.
15043 (collect_register): Change buf argument to void *.
15044 (collect_register_by_name): Likewise.
15045 * regcache.h: Add missing prototypes.
15046 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15047 * server.c (handle_query): New function.
15048 (attached): New static variable, moved out of main.
15049 (main): Quiet longjmp clobber warnings.
15050 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15051 * utils.c (error): Remove NORETURN.