1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's detach op into a method of
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (detach_inferior): Update the macro.
10 Update the derived classes and callers below.
12 * linux-low.cc (linux_target_ops): Update.
13 (linux_detach): Turn into ...
14 (linux_process_target::detach): ... this.
15 * linux-low.h (class linux_process_target): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 (lynx_detach): Turn into ...
18 (lynx_process_target::detach): ... this.
19 * lynx-low.h (class lynx_process_target): Update.
20 * nto-low.cc (nto_target_ops): Update.
21 (nto_detach): Turn into ...
22 (nto_process_target::detach): ... this.
23 * nto-low.h (class nto_process_target): Update.
24 * win32-low.cc (win32_target_ops): Update.
25 (win32_detach): Turn into ...
26 (win32_process_target::detach): ... this.
27 * win32-low.h (class win32_process_target): Update.
29 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
31 Turn process_stratum_target's kill op into a method of
34 * target.h (struct process_stratum_target): Remove the target op.
35 (class process_target): Add the target op.
37 Update the derived classes and callers below.
39 * target.cc (kill_inferior): Update.
40 * linux-low.cc (linux_target_ops): Update.
41 (linux_kill): Turn into ...
42 (linux_process_target::kill): ... this.
43 * linux-low.h (class linux_process_target): Update.
44 * lynx-low.cc (lynx_target_ops): Update.
45 (lynx_kill): Turn into ...
46 (lynx_process_target::kill): ... this.
47 * lynx-low.h (class lynx_process_target): Update.
48 * nto-low.cc (nto_target_ops): Update.
49 (nto_kill): Turn into ...
50 (nto_process_target::kill): ... this.
51 * nto-low.h (class nto_process_target): Update.
52 * win32-low.cc (win32_target_ops): Update.
53 (win32_kill): Turn into ...
54 (win32_process_target::kill): ... this.
55 * win32-low.h (class win32_process_target): Update.
57 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
59 Turn process_stratum_target's attach op into a method of
62 * target.h (struct process_stratum_target): Remove the target op.
63 (class process_target): Add the target op.
64 (myattach): Update the macro.
66 Update the derived classes and callers below.
68 * linux-low.cc (linux_target_ops): Update.
69 (linux_attach): Turn into ...
70 (linux_process_target::attach): ... this.
71 * linux-low.h (class linux_process_target): Update.
72 * lynx-low.cc (lynx_target_ops): Update.
73 (lynx_attach): Turn into ...
74 (lynx_process_target::attach): ... this.
75 * lynx-low.h (class lynx_process_target): Update.
76 * nto-low.cc (nto_target_ops): Update.
77 (nto_attach): Turn into ...
78 (nto_process_target::attach): ... this.
79 * nto-low.h (class nto_process_target): Update.
80 * win32-low.cc (win32_target_ops): Update.
81 (win32_attach): Turn into ...
82 (win32_process_target::attach): ... this.
83 * win32-low.h (class win32_process_target): Update.
85 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
87 Turn process_stratum_target's post_create_inferior op into a method
90 * target.h (struct process_stratum_target): Remove the target op.
91 (class process_target): Add the target op.
92 (target_post_create_inferior): Update the macro.
93 * target.cc (process_target::post_create_inferior): Define.
95 Update the derived classes and callers below.
97 * linux-low.cc (linux_target_ops): Update.
98 (linux_post_create_inferior): Turn into ...
99 (linux_process_target::post_create_inferior): ... this.
100 * linux-low.h (class linux_process_target): Update.
101 * lynx-low.cc (lynx_target_ops): Update.
102 * nto-low.cc (nto_target_ops): Update.
103 * win32-low.cc (win32_target_ops): Update.
105 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
107 Turn process_stratum_target's create_inferior op into a method of
110 * target.h (struct process_stratum_target): Remove the target op.
111 (class process_target): Add the target op.
112 (create_inferior): Rename the macro to ...
113 (target_create_inferior): ... this.
115 Update the derived classes and callers below.
117 * server.cc (handle_v_run): Update.
118 (captured_main): Update.
119 (process_serial_event): Update.
120 * linux-low.cc (linux_target_ops): Update.
121 (linux_create_inferior): Turn into ...
122 (linux_process_target::create_inferior): ... this.
123 * linux-low.h (class linux_process_target): Update.
124 * lynx-low.cc (lynx_target_ops): Update.
125 (lynx_create_inferior): Turn into ...
126 (lynx_process_target::create_inferior): ... this.
127 * lynx-low.h (class lynx_process_target): Update.
128 * nto-low.cc (nto_target_ops): Update.
129 (nto_create_inferior): Turn into ...
130 (nto_process_target::create_inferior): ... this.
131 * nto-low.h (class nto_process_target): Update.
132 * win32-low.cc (win32_target_ops): Update.
133 (win32_create_inferior): Turn into ...
134 (win32_process_target::create_inferior): ... this.
135 * win32-low.h (class win32_process_target): Update.
137 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
139 * target.h (class process_target): New class definition.
140 (struct process_stratum_target) <pt>: New field with type
142 * linux-low.h (class linux_process_target): Define as a derived
143 class of 'process_target'.
144 * linux-low.cc (linux_target_ops): Add a linux_process_target*
146 * lynx-low.h (class lynx_process_target): Define as a derived
147 class of 'process_target'.
148 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
150 * nto-low.h (class nto_process_target): Define as a derived
151 class of 'process_target'.
152 * nto-low.cc (nto_target_ops): Add an nto_process_target*
154 * win32-low.h (class win32_process_target): Define as a derived
155 class of 'process_target'.
156 * win32-low.cc (win32_target_ops): Add a win32_process_target*
159 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
161 * configure: Regenerate.
163 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
164 Andrew Burgess <andrew.burgess@embecosm.com>
166 * linux-riscv-low.cc: New file.
167 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
168 and nat/riscv-linux-tdesc.c.
169 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
170 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
173 2020-02-14 Tom Tromey <tom@tromey.com>
175 * acinclude.m4: Don't include acx_configure_dir.m4.
176 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
177 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
178 (all, install-only, uninstall, clean-info, clean)
179 (maintainer-clean): Don't recurse.
180 (subdir_do, all-lib): Remove.
181 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
183 (generated_files): Update.
184 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
185 * configure: Rebuild.
186 * configure.ac: Don't configure gnulib or libiberty.
189 2020-02-14 Eli Zaretskii <eliz@gnu.org>
191 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
192 preparing the command line for CreateProcess.
193 (win32_create_inferior): Reflect the program name in debugging
194 output that shows the process and its command line.
196 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
198 * Makefile.in: Rename source files from .c to .cc.
199 * %.c: Rename to %.cc.
200 * configure.ac: Rename server.c to server.cc.
201 * configure: Re-generate.
203 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
205 * Makefile.in: Rename gdbsupport source files from .c to .cc.
207 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
209 * win32-low.c (win32_create_inferior): Set signal_pid.
211 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
212 Pedro Alves <palves@redhat.com>
214 Skip building gdbserver in a cross-configuration.
215 * configure.srv: Set $gdbserver_host depending on whether $target
216 is $host. Use $gdbserver_host instead of $host.
218 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
220 * configure: Re-generate.
222 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
224 * configure: Re-generate.
226 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
228 * acinclude.m4: Update warning.m4 path.
230 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
232 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
233 (handle_exception): Set siginfo_er.
234 (win32_xfer_siginfo): New function.
236 2020-02-07 Tom Tromey <tom@tromey.com>
237 Pedro Alves <palves@redhat.com>
239 * README: Update build documentation.
240 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
242 * configure.ac: Update paths.
243 * configure: Rebuild.
244 * acinclude.m4: Update paths.
245 * Makefile.in: Update include paths.
246 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
247 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
248 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
249 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
250 (%-generated.c): Update paths.
251 * Move entire directory from ../gdb/gdbserver.
253 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
255 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
257 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
259 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
260 assignment instead of srv_linux_obj.
262 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
264 * server.c (handle_qxfer_libraries): Write segment-address with
267 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
269 * Makefile.in (install-strip): New target.
270 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
271 * aclocal.m4: Regenerate.
272 * configure: Regenerate.
273 * configure.ac: Add AM_PROG_INSTALL_STRIP.
275 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
277 * Makefile.in (SFILES): Adjust paths to point to real files.
278 (OBS): Move waitstatus.o to target/waitstatus.o.
279 (TAGS): Transform paths appropriately.
281 (nat/%.o): ... this pattern rule.
283 (target/%.o): ... this pattern rule.
284 * configure.srv: Adjust paths throughout to include nat/ prefix
285 with the revant files.
286 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
287 * configure: Regenerate.
289 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
291 * Makefile.in (TAGS): Remove config files from the recipe.
293 2020-01-14 Tom Tromey <tom@tromey.com>
295 * configure: Rebuild.
296 * configure.ac: Remove any checks that were added to common.m4.
297 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
300 2020-01-14 Tom Tromey <tom@tromey.com>
302 * server.h: Include config.h.
303 * gdbreplay.c: Include config.h.
304 * configure: Rebuild.
305 * configure.ac: Don't source common.host.
306 * acinclude.m4: Update path.
307 * Makefile.in (INCSUPPORT): New variable.
308 (INCLUDE_CFLAGS): Add INCSUPPORT.
309 (SFILES): Update paths.
310 (version-generated.c): Update path to create-version.sh.
311 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
313 2020-01-14 Tom Tromey <tom@tromey.com>
315 * configure.ac (LIBS): Use WIN32APILIBS.
316 (USE_WIN32API): Don't define.
317 * configure: Rebuild.
319 2020-01-14 Tom Tromey <tom@tromey.com>
321 * configure: Rebuild.
323 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
325 * Makefile.in (%-generated.c): Remove rule for files from
328 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
330 * configure: Re-generate.
332 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
334 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
336 * tracepoint.c (stop_tracing, flush_trace_buffer,
337 about_to_request_buffer_space, get_trace_state_variable_value,
338 set_trace_state_variable_value, gdb_collect): Add declaration.
340 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
342 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
343 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
344 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
345 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
346 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
349 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
351 * inferiors.c: Include gdbsupport/common-inferior.h.
353 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
355 * hostio-errno.c: Include hostio.h.
357 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
359 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
362 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
364 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
365 * linux-arm-tdesc.h: Include arch/arm.h.
367 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
369 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
371 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
373 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
374 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
376 2020-01-10 Pedro Alves <palves@redhat.com>
378 * fork-child.c (post_fork_inferior): Pass target down to
380 * inferiors.c (switch_to_thread): Add process_stratum_target
382 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
383 * nto-low.c (nto_target_ops): Now a process_stratum_target.
384 * linux-low.c (linux_target_ops): Now a process_stratum_target.
385 * remote-utils.c (prepare_resume_reply): Pass the target to
387 * target.c (the_target): Now a process_stratum_target.
388 (done_accessing_memory): Pass the target to switch_to_thread.
389 (set_target_ops): Ajust to use process_stratum_target.
390 * target.h (struct target_ops): Rename to ...
391 (struct process_stratum_target): ... this.
392 (the_target, set_target_ops): Adjust.
393 (prepare_to_access_memory): Adjust comment.
394 * win32-low.c (child_xfer_memory): Adjust to use
395 process_stratum_target.
396 (win32_target_ops): Now a process_stratum_target.
398 2020-01-06 Eli Zaretskii <eliz@gnu.org>
399 Pedro Alves <palves@redhat.com>
401 * win32-low.c (get_child_debug_event): Extract the fatal exception
402 from the exit status and convert to the equivalent Posix signal
404 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
405 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
407 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
409 * Makefile.in: Use INSTALL_PROGRAM_ENV.
411 2020-01-01 Joel Brobecker <brobecker@adacore.com>
413 * server.c (gdbserver_version): Change copyright year to 2020.
414 * gdbreplay.c (gdbreplay_version): Likewise.
416 2019-12-19 Christian Biesinger <cbiesinger@google.com>
418 * configure: Regenerate.
419 * configure.ac: Quote variable arguments of test.
421 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
423 * Makefile.in: Fix build with GNU Make 3.81
425 2019-12-16 Tom Tromey <tromey@adacore.com>
427 * server.c (get_exec_file): Constify result.
429 2019-12-10 Christian Biesinger <cbiesinger@google.com>
431 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
432 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
433 * config.in: Regenerate.
434 * configure: Regenerate.
435 * configure.ac: Don't check for strerror.
436 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
437 Call safe_strerror instead of strerror.
438 * server.h (strerror): Remove this now-unnecessary declaration.
439 * tracepoint.c (init_named_socket): Call safe_strerror instead of
441 (gdb_agent_helper_thread): Likewise.
442 * utils.c (perror_with_name): Likewise.
444 2019-11-26 Tom Tromey <tom@tromey.com>
446 * configure, config.in: Rebuild.
448 2019-11-26 Tom Tromey <tom@tromey.com>
450 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
451 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
453 * configure, config.in: Rebuild.
455 2019-11-26 Tom Tromey <tom@tromey.com>
457 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
458 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
459 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
460 * acinclude.m4: Include ax_pthread.m4.
461 * config.in, configure: Rebuild.
463 2019-11-26 Christian Biesinger <cbiesinger@google.com>
465 * debug.c (debug_set_output): Call safe_strerror instead of
467 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
468 (linux_kill_one_lwp): Likewise.
469 (linux_detach_one_lwp): Likewise.
470 (linux_wait_for_event_filtered): Likewise.
471 (store_register): Likewise.
472 * lynx-low.c (lynx_attach): Likewise.
473 * mem-break.c (insert_memory_breakpoint): Likewise.
474 (remove_memory_breakpoint): Likewise.
475 (delete_fast_tracepoint_jump): Likewise.
476 (set_fast_tracepoint_jump): Likewise.
477 (uninsert_fast_tracepoint_jumps_at): Likewise.
478 (reinsert_fast_tracepoint_jumps_at): Likewise.
479 * nto-low.c (nto_xfer_memory): Likewise.
480 (nto_resume): Likewise.
482 2019-11-20 Luis Machado <luis.machado@linaro.org>
484 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
485 instead of register count.
486 * tdesc.c (tdesc_contains_feature): New function.
487 * tdesc.h (tdesc_contains_feature): New prototype.
489 2019-11-15 Christian Biesinger <cbiesinger@google.com>
491 * Makefile.in: Add safe-strerror.c.
492 * configure: Regenerate.
493 * configure.ac: Don't source common.host.
495 2019-11-15 Christian Biesinger <cbiesinger@google.com>
497 * config.in: Regenerate.
498 * configure: Regenerate.
500 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
502 * ax.c (ax_printf): Handle size_t_arg.
504 2019-11-06 Christian Biesinger <cbiesinger@google.com>
506 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
507 * mi/mi-main.c (output_cores): Likewise.
508 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
509 (linux_xfer_osdata_modules): Likewise.
510 * remote.c (register_remote_support_xml): Likewise.
511 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
512 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
514 2019-11-01 Christian Biesinger <cbiesinger@google.com>
516 * configure: Regenerate.
517 * configure.ac: Remove check for strerror_r.
519 2019-10-31 Christian Biesinger <cbiesinger@google.com>
521 * config.in: Regenerate.
522 * configure: Regenerate.
523 * configure.ac: Also check for strerror_r.
525 2019-10-31 Christian Biesinger <cbiesinger@google.com>
527 * ax.h (debug_agent): Remove duplicate declaration.
529 2019-10-26 Tom de Vries <tdevries@suse.de>
531 * linux-aarch64-low.c: Fix typos in comments.
532 * linux-arm-low.c: Same.
534 * linux-ppc-low.c: Same.
535 * proc-service.c: Same.
538 * tracepoint.c: Same.
541 2019-10-25 Tom Tromey <tromey@adacore.com>
543 * utils.c (xstrdup): Remove.
545 2019-10-23 Tom Tromey <tom@tromey.com>
547 * configure, config.in: Rebuild.
549 2019-10-23 Tom Tromey <tom@tromey.com>
551 * configure: Rebuild.
552 * acinclude.m4: Use m4_include, not sinclude.
554 2019-10-17 Tom Tromey <tromey@adacore.com>
556 * configure: Rebuild.
557 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
558 in AC_CONFIG_FILES invocation.
559 * Makefile.in (stamp-h, Makefile): Use new-style config.status
562 2019-10-16 Christian Biesinger <cbiesinger@google.com>
564 * server.c: Include xml-builtin.h.
565 (get_xml_features): Don't declare xml_builtins here.
567 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
569 * Makefile.in: Remove references to vec-ipa.o.
571 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
573 * Makefile.in: Remove references to vec.c.
575 2019-10-02 Christian Biesinger <cbiesinger@google.com>
577 * server.c (server_waiting): Change to bool.
578 (extended_protocol): Likewise.
579 (response_needed): Likewise.
580 (exit_requested): Likewise.
581 (run_once): Likewise.
582 (report_no_resumed): Likewise.
583 (non_stop): Likewise.
584 (disable_packet_vCont): Likewise.
585 (disable_packet_Tthread): Likewise.
586 (disable_packet_qC): Likewise.
587 (disable_packet_qfThreadInfo): Likewise.
588 (handle_general_set): Update.
589 (handle_detach): Update.
590 (handle_monitor_command): Update.
591 (handle_query): Update.
592 (captured_main): Update.
593 (process_serial_event): Update.
594 * server.h (server_waiting): Change to bool.
595 (disable_packet_vCont): Likewise.
596 (disable_packet_Tthread): Likewise.
597 (disable_packet_qC): Likewise.
598 (disable_packet_qfThreadInfo): Likewise.
599 (run_once): Likewise.
600 (non_stop): Likewise.
601 * target.c (target_stop_and_wait): Update.
603 2019-10-02 Tom Tromey <tromey@adacore.com>
605 * Makefile.in (SFILES): Add common-inferior.c.
606 (OBS): Add common-inferior.o.
607 * server.c (startup_with_shell): Don't define.
609 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
611 * linux-low.c (linux_low_read_btrace): Update for change to
614 2019-09-20 Christian Biesinger <cbiesinger@google.com>
616 * debug.c (debug_threads): Remove comment in favor of the header.
617 * debug.h (using_threads): Add declaration.
618 (debug_threads): Add comment.
619 * linux-aarch64-low.c: Include debug.h and remove declaration of
621 * nto-low.c: Likewise.
622 * remote-utils.c: Likewise.
623 * thread-db.c: Likewise.
625 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
627 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
628 and powerpc-cell64l-ipa.o.
629 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
630 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
631 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
634 * spu-low.c: Remove file.
636 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
637 (parse_spufs_run): Remove.
638 (ppc_get_pc): Remove Cell/B.E. support.
639 (ppc_set_pc): Likewise.
640 (ppc_breakpoint_at): Likewise.
641 (ppc_arch_setup): Likewise.
642 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
643 tdesc_powerpc_cell32l.
644 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
645 or init_registers_powerpc_cell32l.
646 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
647 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
648 or init_registers_powerpc_cell32l.
649 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
650 (init_registers_powerpc_cell32l): Remove prototype.
651 (init_registers_powerpc_cell64l): Likewise.
653 * target.h (struct target_ops): Remove qxfer_spu member.
654 * server.c (handle_qxfer_spu): Remove.
655 (qxfer_packets): Remove entry for "spu".
656 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
657 * linux-low.c (SPUFS_MAGIC): Remove.
658 (spu_enumerate_spu_ids): Remove.
659 (linux_qxfer_spu): Remove.
660 (linux_target_ops): Remove qxfer_spu member.
661 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
662 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
663 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
665 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
667 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
668 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
669 * config.in: Regenerate.
670 * configure: Regenerate.
672 2019-08-15 Tom Tromey <tromey@adacore.com>
674 * target.c (target_write_memory): Use gdb::byte_vector.
676 2019-08-15 Tom Tromey <tromey@adacore.com>
678 * tracepoint.c (write_inferior_data_pointer)
679 (write_inferior_integer, write_inferior_int8)
680 (write_inferior_uinteger, m_tracepoint_action_download)
681 (r_tracepoint_action_download, x_tracepoint_action_download)
682 (l_tracepoint_action_download, clear_inferior_trace_buffer)
683 (download_agent_expr, download_tracepoint_1)
684 (download_trace_state_variables, upload_fast_traceframes): Update.
685 * server.c (gdb_write_memory): Update.
686 * remote-utils.c (relocate_instruction): Update.
687 * proc-service.c (ps_pdwrite): Update.
688 * mem-break.c (remove_memory_breakpoint)
689 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
690 (uninsert_fast_tracepoint_jumps_at)
691 (reinsert_fast_tracepoint_jumps_at): Update.
692 * linux-x86-low.c (append_insns)
693 (i386_install_fast_tracepoint_jump_pad)
694 (amd64_write_goto_address, i386_write_goto_address): Update.
695 * linux-s390-low.c (append_insns, s390_write_goto_address):
697 * linux-ppc-low.c (ppc_relocate_instruction)
698 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
699 (ppc_write_goto_address): Update.
700 * linux-aarch64-low.c (append_insns): Update.
701 * target.h (struct target_ops): Update.
702 (write_inferior_memory): Don't declare.
703 * target.c (target_write_memory): Rename from
704 write_inferior_memory. Remove old target_write_memory.
706 2019-08-15 Tom Tromey <tromey@adacore.com>
708 * target.c (write_inferior_memory): Use std::vector.
710 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
713 * configure.ac: Drop enable-libmcheck support.
714 * configure, config.in: Rebuild.
715 * acinclude.m4: Don't include it.
717 2019-07-19 Alan Hayward <alan.hayward@arm.com>
719 * configure.srv: Remove Arm xml files.
721 2019-07-19 Alan Hayward <alan.hayward@arm.com>
723 * configure.srv: Add new files. Remove xml generated files.
724 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
726 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
727 * linux-aarch32-tdesc.c: New file.
728 * linux-aarch32-tdesc.h: New file.
729 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
730 * linux-arm-low.c (init_registers_arm, tdesc_arm)
731 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
732 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
733 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
734 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
735 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
736 (arm_read_description): Call arm_linux_read_description.
737 (initialize_low_arch): Don't init registers.
738 * linux-arm-tdesc.c: New file.
739 * linux-arm-tdesc.h: New file.
741 2019-07-10 Alan Hayward <alan.hayward@arm.com>
743 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
744 Move counter inside for.
745 (arm_read_description): Check ptrace earlier.
746 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
748 2019-07-09 Tom Tromey <tom@tromey.com>
750 * configure: Rebuild.
751 * configure.ac: Change common to gdbsupport.
752 * acinclude.m4: Change common to gdbsupport.
753 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
754 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
755 common to gdbsupport.
756 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
757 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
758 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
759 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
760 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
761 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
762 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
763 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
764 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
765 common to gdbsupport.
767 2019-07-04 Alan Hayward <alan.hayward@arm.com>
769 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
771 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
773 2019-07-04 Alan Hayward <alan.hayward@arm.com>
775 * configure.srv: Remove legacy xml.
776 * linux-aarch64-low.c (initialize_low_arch): Remove
777 initialize_low_tdesc call.
778 * linux-aarch64-tdesc-selftest.c: Remove file.
779 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
780 * linux-x86-low.c (initialize_low_arch): Remove
781 initialize_low_tdesc call.
782 * linux-x86-tdesc-selftest.c: Remove file.
783 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
785 2019-06-20 Tom de Vries <tdevries@suse.de>
787 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
788 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
790 2019-06-19 Tom de Vries <tdevries@suse.de>
792 * debug.h (debug_write): Change return type to ssize_t.
793 * debug.c (debug_write): Same.
795 2019-06-14 Tom Tromey <tom@tromey.com>
797 * configure.ac: Use new path to gnulib.
798 * configure: Rebuild.
799 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
802 2019-06-11 Tom Tromey <tom@tromey.com>
804 * Makefile.in (SFILES): Add alloc.c.
806 (IPA_OBJS): Add alloc-ipa.o.
807 (alloc-ipa.o): New target.
808 (%.o: ../%.c): New pattern rule.
810 2019-06-10 Tom Tromey <tromey@adacore.com>
812 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
813 end warning with a newline.
814 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
816 * thread-db.c (attach_thread): Don't end warning with a newline.
817 (thread_db_notice_clone): Likewise.
818 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
820 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
821 end warning with a newline.
823 2019-06-04 Pedro Alves <palves@redhat.com>
825 * server.c (captured_main): Use make_unique_xstrdup.
827 2019-06-02 Tom Tromey <tom@tromey.com>
829 * gdbreplay.c (fromhex): Remove.
830 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
832 2019-05-29 Tom Tromey <tromey@adacore.com>
834 * configure: Rebuild.
836 2019-05-06 Kevin Buettner <kevinb@redhat.com>
838 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
839 sign extension code on 32-bit builds.
841 2019-05-03 Eli Zaretskii <eliz@gnu.org>
844 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
846 2019-04-19 Tom Tromey <tom@tromey.com>
848 * server.c (struct vstop_notif): Derive from notif_event.
850 (queue_stop_reply): Update.
851 (remove_all_on_match_ptid): Change type. Rewrite.
852 (discard_queued_stop_replies): Rewrite.
853 (in_queued_stop_replies_ptid): Change type.
854 (in_queued_stop_replies): Rewrite.
855 (notif_stop): Update.
856 (queue_stop_reply_callback): Update.
857 (captured_main): Don't call initialize_notif.
858 (push_stop_notification): Update.
859 * notif.c (notif_write_event, handle_notif_ack)
860 (notif_event_enque, notif_push): Update.
861 (notif_event_xfree, initialize_notif): Remove.
862 * notif.h (struct notif_event): Include <list>, not
864 (struct notif_server) <queue>: Now a std::list.
865 (notif_event_p): Remove typedef.
866 (initialize_notif): Don't declare.
867 (struct notif_event): Add virtual destructor.
869 2019-04-17 Alan Hayward <alan.hayward@arm.com>
871 * ax.c (ax_vdebug): Call debug_printf.
872 * debug.c (debug_write): New function.
873 * debug.h (debug_write): New declaration.
874 * linux-low.c (sigchld_handler): Call debug_write.
876 2019-04-17 Alan Hayward <alan.hayward@arm.com>
878 * debug.c (debug_set_output): New function.
879 (debug_vprintf): Send output to debug_file.
880 (debug_flush): Likewise.
881 * debug.h (debug_set_output): New declaration.
882 * server.c (handle_monitor_command): Add debug-file option.
883 (captured_main): Likewise.
885 2019-04-17 Alan Hayward <alan.hayward@arm.com>
887 * debug.c (remote_debug): Add definition.
888 * debug.h (remote_debug): Add declaration.
889 * hostio.c (remote_debug): Remove declaration.
890 * remote-utils.c (struct ui_file): Likewise.
891 (remote_debug): Likewise.
892 * remote-utils.h (remote_debug): Likewise,
893 * server.c (remote_debug): Remove definition.
895 2019-04-10 Kevin Buettner <kevinb@redhat.com>
897 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
898 when using a 64-bit gdbserver.
900 2019-04-09 Tom Tromey <tromey@adacore.com>
902 * linux-low.c (select_event_lwp): Use find_thread_in_random.
904 2019-04-08 Tom Tromey <tom@tromey.com>
906 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
908 (linux_resume_one_lwp): Likewise.
910 2019-04-08 Tom Tromey <tom@tromey.com>
912 * gdbreplay.c: Update.
913 * linux-low.c: Update.
916 2019-04-08 Tom Tromey <tom@tromey.com>
918 * server.c: Use C++ exception handling.
919 * linux-low.c: Use C++ exception handling.
920 * gdbreplay.c: Use C++ exception handling.
922 2019-04-08 Tom Tromey <tom@tromey.com>
924 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
925 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
926 (captured_main, main): Update.
927 * gdbreplay.c (main): Update.
929 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
931 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
932 value in argument pointer, return 1 if the entry is found and 0
933 otherwise. Move comment.
934 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
935 * linux-low.h (linux_get_auxv): Declare.
936 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
938 2019-04-05 Tom Tromey <tromey@adacore.com>
940 * server.c (gdbserver_usage): Use upper-case for metasyntactic
943 2019-03-28 Alan Hayward <alan.hayward@arm.com>
945 * linux-low.c (AT_HWCAP2): Add define if not already included.
947 2019-03-26 Alan Hayward <alan.hayward@arm.com>
949 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
950 (aarch64_arch_setup): Call linux_get_hwcap.
951 * linux-arm-low.c (arm_get_hwcap): Remove function.
952 (arm_read_description): Call linux_get_hwcap.
953 * linux-low.c (linux_get_auxv): New function.
954 (linux_get_hwcap): Likewise.
955 (linux_get_hwcap2): Likewise.
956 * linux-low.h (linux_get_hwcap): New declaration.
957 (linux_get_hwcap2): Likewise.
958 * linux-ppc-low.c (ppc_get_auxv): Remove function.
959 (ppc_arch_setup): Call linux_get_hwcap.
960 * linux-s390-low.c (s390_get_hwcap): Remove function.
961 (s390_arch_setup): Call linux_get_hwcap.
963 2019-03-22 Alan Hayward <alan.hayward@arm.com>
964 Jiong Wang <jiong.wang@arm.com>
966 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
967 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
969 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
971 2019-03-22 Alan Hayward <alan.hayward@arm.com>
972 Jiong Wang <jiong.wang@arm.com>
974 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
975 (aarch64_get_hwcap): New function.
976 (aarch64_arch_setup): Read APIA hwcap.
978 2019-03-22 Alan Hayward <alan.hayward@arm.com>
979 Jiong Wang <jiong.wang@arm.com>
981 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
982 (initialize_low_tracepoint): Likewise.
983 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
984 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
985 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
986 (aarch64_linux_read_description): Likewise.
987 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
989 2019-03-12 John Baldwin <jhb@FreeBSD.org>
991 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
992 i386_create_target_description for 'segments' parameter.
993 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
994 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
995 * win32-i386-low.c (i386_arch_setup): Likewise.
997 2019-03-12 Tom Tromey <tromey@adacore.com>
999 * linux-low.c (iterate_over_lwps): Update.
1001 2019-03-06 Tom Tromey <tom@tromey.com>
1003 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1004 (captured_main): Use SCOPE_EXIT.
1006 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1008 * configure.srv: Use '$enable_unittest' instead of '$development'
1009 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1012 2019-02-27 Tom Tromey <tromey@adacore.com>
1014 * gdbreplay.c (logchar): Handle \r\n.
1016 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1018 * linux-low.c (linux_attach): Add process before lwp.
1019 * server.c (attach_inferior): Check if already attached.
1021 2019-02-07 Tom Tromey <tom@tromey.com>
1023 * x86-tdesc.h: Rename include guard.
1024 * x86-low.h: Add include guard.
1025 * wincecompat.h: Rename include guard.
1026 * win32-low.h: Add include guard.
1027 * utils.h: Rename include guard.
1028 * tracepoint.h: Rename include guard.
1029 * tdesc.h: Rename include guard.
1030 * target.h: Rename include guard.
1031 * server.h: Rename include guard.
1032 * remote-utils.h: Rename include guard.
1033 * regcache.h: Rename include guard.
1034 * nto-low.h: Rename include guard.
1035 * notif.h: Add include guard.
1036 * mem-break.h: Rename include guard.
1037 * lynx-low.h: Add include guard.
1038 * linux-x86-tdesc.h: Add include guard.
1039 * linux-s390-tdesc.h: Add include guard.
1040 * linux-ppc-tdesc-init.h: Add include guard.
1041 * linux-low.h: Add include guard.
1042 * linux-aarch64-tdesc.h: Add include guard.
1043 * linux-aarch32-low.h: Add include guard.
1044 * inferiors.h: Rename include guard.
1045 * i387-fp.h: Rename include guard.
1046 * hostio.h: Rename include guard.
1047 * gdbthread.h: Rename include guard.
1048 * gdb_proc_service.h: Rename include guard.
1049 * event-loop.h: Rename include guard.
1050 * dll.h: Rename include guard.
1051 * debug.h: Rename include guard.
1052 * ax.h: Rename include guard.
1054 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1057 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1058 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1060 2019-01-25 Tom Tromey <tom@tromey.com>
1062 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1064 2019-01-25 Tom Tromey <tom@tromey.com>
1066 * win32-low.c: Fix common/ includes.
1067 * win32-i386-low.c: Fix common/ includes.
1068 * tracepoint.c: Fix common/ includes.
1069 * thread-db.c: Fix common/ includes.
1070 * target.h: Fix common/ includes.
1071 * symbol.c: Fix common/ includes.
1072 * spu-low.c: Fix common/ includes.
1073 * server.h: Fix common/ includes.
1074 * server.c: Fix common/ includes.
1075 * remote-utils.c: Fix common/ includes.
1076 * regcache.h: Fix common/ includes.
1077 * regcache.c: Fix common/ includes.
1078 * nto-x86-low.c: Fix common/ includes.
1079 * notif.h: Fix common/ includes.
1080 * mem-break.h: Fix common/ includes.
1081 * lynx-low.c: Fix common/ includes.
1082 * lynx-i386-low.c: Fix common/ includes.
1083 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1084 * linux-x86-low.c: Fix common/ includes.
1085 * linux-low.c: Fix common/ includes.
1086 * inferiors.h: Fix common/ includes.
1087 * i387-fp.c: Fix common/ includes.
1088 * hostio.c: Fix common/ includes.
1089 * hostio-errno.c: Fix common/ includes.
1090 * gdbthread.h: Fix common/ includes.
1091 * gdbreplay.c: Fix common/ includes.
1092 * fork-child.c: Fix common/ includes.
1093 * event-loop.c: Fix common/ includes.
1095 (enum gdb_agent_op): Fix common/ includes.
1097 2019-01-21 Tom Tromey <tom@tromey.com>
1099 * tracepoint.c: Fix includes.
1100 * remote-utils.c: Fix includes.
1101 * linux-x86-low.c: Fix includes.
1103 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1105 * gdbreplay.c (gdbreplay_version): Update copyright year in
1107 * server.c (gdbserver_version): Likewise.
1109 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1111 * linux-low.c (add_lwp): Switch ordering.
1113 2018-11-29 Tom Tromey <tom@tromey.com>
1115 * win32-low.c (win32_join): Take pid, not process.
1116 * target.h (struct target_ops) <join>: Change argument type.
1117 (join_inferior): Change argument name.
1118 * spu-low.c (spu_join): Take pid, not process.
1119 * server.c (handle_detach): Preserve pid before destroying
1121 * lynx-low.c (lynx_join): Take pid, not process.
1122 * linux-low.c (linux_join): Take pid, not process.
1124 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1126 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1127 (aarch64_cannot_fetch_register): Likewise.
1128 (struct linux_target_ops): Update references.
1130 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1132 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1134 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1136 * configure.srv (ipa_ppc_linux_regobj): Add
1137 powerpc-isa207-htm-vsx32l-ipa.o and
1138 powerpc-isa207-htm-vsx64l-ipa.o.
1139 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1140 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1141 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1142 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1143 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1144 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1145 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1146 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1147 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1148 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1149 (init_registers_powerpc_isa207_htm_vsx32l)
1150 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1151 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1152 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1153 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1154 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1155 (ppc_store_tm_ctarregset): New functions.
1156 (ppc_regsets): Add entries for HTM regsets.
1157 (ppc_arch_setup): Set htm in features struct when needed. Set
1158 sizes for the HTM regsets.
1159 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1160 (initialize_low_arch): Call
1161 init_registers_powerpc_isa207_htm_vsx32l and
1162 init_registers_powerpc_isa207_htm_vsx64l.
1163 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1164 PPC_TDESC_ISA207_HTM_VSX.
1165 (initialize_low_tracepoint): Call
1166 init_registers_powerpc_isa207_htm_vsx32l and
1167 init_registers_powerpc_isa207_htm_vsx64l.
1169 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1171 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1172 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1173 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1174 (ppc_store_pmuregset): New functions.
1175 (ppc_regsets): Add entries for ebb and pmu regsets.
1176 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1177 pmu regsets are available. Set sizes for these regsets.
1179 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1181 * configure.srv (ipa_ppc_linux_regobj): Add
1182 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1183 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1184 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1185 rs6000/powerpc-isa207-vsx32l.xml, and
1186 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1187 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1188 <PPC_TDESC_ISA207_VSX>: New enum value.
1189 (init_registers_powerpc_isa207_vsx32l): Declare.
1190 (init_registers_powerpc_isa207_vsx64l): Declare.
1191 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1192 (ppc_store_tarregset): New function.
1193 (ppc_regsets): Add entry for the TAR regset.
1194 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1195 size for the TAR regsets.
1196 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1197 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1198 and init_registers_powerpc_isa207_vsx64l.
1199 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1200 (initialize_low_tracepoint): Call
1201 init_registers_powerpc_isa207_vsx32l and
1202 init_registers_powerpc_isa207_vsx64l.
1204 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1205 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1207 * configure.srv (ipa_ppc_linux_regobj): Add
1208 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1209 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1210 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1211 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1212 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1213 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1214 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1215 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1216 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1217 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1218 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1219 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1220 (ppc_hwcap): Add comment.
1221 (ppc_hwcap2): New global.
1222 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1223 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1224 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1225 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1226 when needed. Set sizes for the the DSCR and PPR regsets.
1227 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1228 (initialize_low_arch): Call
1229 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1230 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1231 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1232 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1233 (initialize_low_tracepoint): Call
1234 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1235 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1237 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1239 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1241 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1242 Simon Marchi <simark@simark.ca>
1244 * acinclude.m4: Include "../selftest.m4".
1245 * configure: Regenerate.
1246 * configure.ac: Use "GDB_AC_SELFTEST".
1247 * configure.srv: Use "$enable_unittests" instead of
1248 "$development" when checking whether unit tests have been
1250 * server.c (captured_main): Update message informing that
1251 selftests have been disabled.
1253 2018-10-04 Tom Tromey <tom@tromey.com>
1255 * configure: Rebuild.
1257 2018-10-04 Tom Tromey <tom@tromey.com>
1259 * server.c (handle_status): Rename inner "thread".
1260 (process_serial_event): Declare "res" in 'm' case.
1261 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1262 (iterate_over_lwps): Rename inner "thread".
1263 (linux_qxfer_libraries_svr4): Rename inner "len".
1264 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1266 2018-10-01 Gary Benson <gbenson@redhat.com>
1268 * gdb_proc_service.h: Moved common code to
1269 common/gdb_proc_service.h.
1271 2018-10-01 Gary Benson <gbenson@redhat.com>
1273 * gdb_proc_service.h: Synchronize comments and whitespace with
1274 GDB's version of this file.
1276 2018-09-25 Tom Tromey <tom@tromey.com>
1278 * configure: Rebuild.
1279 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1281 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1283 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1284 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1285 ($(IPA_LIB)): Sort IPA_OBJS.
1287 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1289 * Makefile.in: Remove references to $(ADD_DEPS).
1291 2018-09-16 Tom Tromey <tom@tromey.com>
1293 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1295 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1298 2018-09-05 Tom Tromey <tom@tromey.com>
1300 * configure: Rebuild.
1302 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1305 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1307 2018-08-27 Tom Tromey <tom@tromey.com>
1310 * configure: Rebuild.
1312 2018-08-27 Tom Tromey <tom@tromey.com>
1314 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1315 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1316 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1317 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1318 (s390x_emit_stack_adjust): Add casts to unsigned char.
1320 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1324 * server.h (struct client_state) <disable_randomization>:
1327 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1329 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1331 (mips_supply_ptrace_register): Likewise.
1333 2018-07-22 Tom Tromey <tom@tromey.com>
1335 * configure: Rebuild.
1337 2018-07-22 Tom Tromey <tom@tromey.com>
1339 * win32-low.c (win32_create_inferior): Remove unused variables.
1340 * gdbreplay.c (remote_open): Remove unused variable.
1341 * remote-utils.c (remote_prepare): Remove unused variable.
1342 * x86-tdesc.h (X86_TDESC_H): Define.
1343 (amd64_expedite_regs): Define conditionally.
1344 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1345 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1346 * remote-utils.c (readchar): Remove unused variable.
1348 2018-07-13 Pedro Alves <palves@redhat.com>
1350 * linux-low.c (linux_kill): Change parameter to process_info
1351 pointer instead of pid. Adjust.
1352 * lynx-low.c (lynx_kill): Likewise.
1353 * nto-low.c (nto_kill): Likewise.
1354 * spu-low.c (spu_kill): Likewise.
1355 * win32-low.c (win32_kill): Likewise.
1356 * server.c (handle_v_kill, kill_inferior_callback)
1357 (detach_or_kill_for_exit): Adjust.
1358 * target.c (kill_inferior): Change parameter to process_info
1359 pointer instead of pid. Adjust.
1360 * target.h (struct target_ops) <kill>: Change parameter to
1361 process_info pointer instead of pid. Adjust all implementations
1363 (kill_inferior): Likewise.
1365 2018-07-13 Pedro Alves <palves@redhat.com>
1367 * linux-low.c (linux_detach, linux_join): Change parameter to
1368 process_info pointer instead of pid. Adjust.
1369 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1370 * nto-low.c (nto_detach): Likewise.
1371 * spu-low.c (spu_detach, spu_join): Likewise.
1372 * win32-low.c (win32_detach, win32_join): Likewise.
1373 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1374 * target.h (struct target_ops) <detach, join>: Change parameter to
1375 process_info pointer instead of pid. Adjust all implementations
1377 (detach_inferior, join_inferior): Rename 'pid' parameter to
1380 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1381 Jan Kratochvil <jan.kratochvil@redhat.com>
1382 Paul Fertser <fercerpav@gmail.com>
1383 Tsutomu Seki <sekiriki@gmail.com>
1385 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1386 (OBS): Add 'common/netstuff.o'.
1387 (GDBREPLAY_OBS): Likewise.
1388 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1389 (remote_open): Implement support for IPv6
1391 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1393 (handle_accept_event): Accept connections from IPv6 sources.
1394 (remote_prepare): Handle IPv6-style hostnames; implement
1395 support for IPv6 connections.
1396 (remote_open): Implement support for printing connections from
1399 2018-07-11 Pedro Alves <palves@redhat.com>
1402 * mem-break.c (any_persistent_commands): Add process_info
1403 parameter and use it instead of relying on the current process.
1404 Change return type to bool.
1405 * mem-break.h (any_persistent_commands): Add process_info
1406 parameter and change return type to bool.
1407 * server.c (handle_detach): Remove require_running_or_return call.
1408 Look up the process_info for the process we're about to detach.
1409 If not found, return back error to GDB. Adjust
1410 any_persistent_commands call to pass down a process pointer.
1412 2018-07-11 Pedro Alves <palves@redhat.com>
1414 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1415 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1416 instead of collect_register_by_name.
1417 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1418 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1420 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1421 Pedro Alves <palves@redhat.com>
1423 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1425 2018-07-03 Tom Tromey <tom@tromey.com>
1427 * linux-low.c: Update.
1428 * lynx-low.c: Update.
1429 * mem-break.c: Update.
1430 * nto-low.c: Update.
1431 * remote-utils.c: Update.
1433 * spu-low.c: Update.
1435 * win32-low.c: Update.
1437 2018-07-03 Tom Tromey <tom@tromey.com>
1441 2018-07-03 Tom Tromey <tom@tromey.com>
1443 * linux-low.c: Update.
1445 2018-07-03 Tom Tromey <tom@tromey.com>
1449 2018-07-03 Tom Tromey <tom@tromey.com>
1451 * linux-low.c: Update.
1452 * linux-mips-low.c: Update.
1453 * lynx-low.c: Update.
1454 * nto-low.c: Update.
1455 * remote-utils.c: Update.
1457 * spu-low.c: Update.
1459 * thread-db.c: Update.
1461 2018-07-03 Tom Tromey <tom@tromey.com>
1463 * linux-low.c: Update.
1464 * linux-mips-low.c: Update.
1465 * lynx-low.c: Update.
1466 * mem-break.c: Update.
1467 * nto-low.c: Update.
1468 * remote-utils.c: Update.
1470 * spu-low.c: Update.
1472 * tracepoint.c: Update.
1474 2018-07-03 Tom Tromey <tom@tromey.com>
1476 * linux-low.c: Update.
1477 * linux-ppc-low.c: Update.
1478 * linux-x86-low.c: Update.
1479 * proc-service.c: Update.
1481 * spu-low.c: Update.
1482 * thread-db.c: Update.
1483 * win32-low.c: Update.
1485 2018-07-03 Tom Tromey <tom@tromey.com>
1487 * linux-low.c: Update.
1488 * lynx-low.c: Update.
1489 * nto-low.c: Update.
1490 * remote-utils.c: Update.
1491 * spu-low.c: Update.
1492 * thread-db.c: Update.
1493 * win32-low.c: Update.
1495 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1497 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1498 parameter in call to 'amd64_create_target_description'.
1500 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1502 * x86-tdesc.h: Remove executable permission flag.
1504 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1506 * configure.ac: Remove AC_PREREQ, add missing quoting.
1507 * configure: Re-generate.
1508 * config.in: Re-generate.
1509 * aclocal.m4: Re-generate.
1511 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1513 * tracepoint.h (current_traceframe): Remove declaration.
1515 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1517 * linux-aarch64-low.c (is_sve_tdesc): New function.
1518 (aarch64_sve_regs_copy_to_regcache): Likewise.
1519 (aarch64_sve_regs_copy_from_regcache): Likewise.
1520 (aarch64_regs_info): Add SVE checks.
1521 (initialize_low_arch): Initialize SVE.
1523 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1525 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1527 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1529 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1530 (initialize_low_tracepoint): Likewise
1531 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1532 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1534 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1536 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1538 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1540 * server.h (PBUFSIZ): Increase size
1542 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1544 * regcache.c (regcache::raw_compare): New function.
1545 * regcache.h (regcache::raw_compare): New declaration.
1547 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1549 * regcache.c (new_register_cache): Use new.
1550 (free_register_cache): Use delete.
1551 (register_data): Use const.
1552 (supply_register): Move body inside regcache.
1553 (regcache::raw_supply): New override function.
1554 (collect_register): Move body inside regcache.
1555 (regcache::raw_collect): New override function.
1556 (regcache::get_register_status): New override function.
1557 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1559 2018-06-09 Tom Tromey <tom@tromey.com>
1561 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1563 (event_queue): Use std::queue.
1564 (gdb_event_xfree): Remove.
1565 (initialize_event_loop, process_event, wait_for_event): Update.
1567 2018-06-08 Stan Cox <scox@redhat.com>
1569 * win32-low.c (win32_create_inferior): last_ptid and last_status
1570 moved to client_state.
1572 2018-06-08 Pedro Alves <palves@redhat.com>
1574 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1575 common/common-exceptions.o, common/common-utils.o,
1576 common/errors.o, common/print-utils.o and utils.o.
1577 * gdbreplay.c: Include "common-defs.h" instead of the two
1578 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1579 string.h or alloca.h.
1580 (perror_with_name): Delete.
1581 (remote_open): Use xstrdup instead of strdup.
1582 (main): Rename to ...
1583 (captured_main): ... this.
1586 2018-06-08 Tom Tromey <tom@tromey.com>
1588 * linux-low.c (linux_low_read_btrace): Update.
1590 2018-06-04 Stan Cox <scox@redhat.com>
1592 * server.h (struct client_state): New.
1593 * server.c (cont_thread, general_thread, multi_process)
1594 (report_fork_events, report_vfork_events, report_exec_events)
1595 (report_thread_events, swbreak_feature, hwbreak_feature)
1596 (vCont_supported, disable_randomization, pass_signals)
1597 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1598 Moved to client_state.
1599 * remote-utils.c (remote_debug, noack_mode)
1600 (transport_is_reliable): Moved to client_state.
1601 * tracepoint.c (current_traceframe): Moved to client_state.
1604 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1605 linux-low.c, remote-utils.h, target.c: Use client_state.
1607 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1609 * configure.srv: Add new c/h file.
1611 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1613 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1616 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1618 * gdb.arch/mips-fpregset-core.exp: New test.
1619 * gdb.arch/mips-fpregset-core.c: New test source.
1621 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1624 * hostio.c (require_int): Do not report overflow for integers
1625 between 0xfffffff and 0x7fffffff.
1627 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1629 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1630 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1631 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1633 (the_low_target): Wire them.
1635 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1637 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1638 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1639 mode. Call collect_register_by_name with vscr using
1640 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1641 (ppc_store_vrregset): Add and set vscr_offset variable as in
1642 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1645 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1647 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1648 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1649 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1651 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1653 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1654 (ppc_store_vsxregset): Likewise.
1655 (ppc_fill_vrregset): Likewise.
1656 (ppc_store_vrregset): Likewise.
1657 (ppc_fill_evrregset): Likewise.
1658 (ppc_store_evrregset): Likewise.
1659 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1660 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1663 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1665 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1666 wordsize of the inferior. Call ppc_linux_target_wordsize.
1668 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1670 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1671 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1672 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1673 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1674 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1675 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1676 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1677 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1678 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1679 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1680 (tdesc_powerpc_e500l): Remove.
1681 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1682 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1683 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1684 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1686 (ppc_arch_setup): Remove target description matching code. Fill a
1687 ppc_linux_features struct and call ppc_linux_match_description
1690 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1692 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1693 width of the requested register exceeds the width of the
1695 (mips_cannot_store_register): Likewise.
1697 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1699 * linux-mips-low.c (mips_fetch_register): New function. Update
1701 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1702 (the_low_target): Wire `mips_fetch_register'.
1704 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1706 * lynx-i386-low.c (LYNXOS_178): New macro.
1707 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1708 the layout on LynxOS-178.
1709 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1710 handle floating point registers that are not supported by
1713 2018-05-10 Tom Tromey <tom@tromey.com>
1715 * configure: Rebuild.
1717 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1720 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1721 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1722 Use it to set the expedite_regs field in the given tdesc.
1723 * x86-tdesc.h: New file.
1724 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1725 Adjust following the addition of the new expedite_regs parameter
1726 to init_target_desc.
1727 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1728 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1729 (i386_linux_read_description, amd64_linux_read_description):
1730 Adjust following the addition of the new expedite_regs parameter
1731 to init_target_desc.
1732 * lynx-i386-low.c: #include "x86-tdesc.h".
1733 (lynx_i386_arch_setup): Adjust following the addition of the new
1734 expedite_regs parameter to init_target_desc.
1735 * nto-x86-low.c: #include "x86-tdesc.h".
1736 (nto_x86_arch_setup): Adjust following the addition of the new
1737 expedite_regs parameter to init_target_desc.
1738 * win32-i386-low.c: #include "x86-tdesc.h".
1739 (i386_arch_setup): Adjust following the addition of the new
1740 expedite_regs parameter to init_target_desc.
1742 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1745 * win32-low.c (win32_create_inferior): Add call to my_wait
1746 setting last_status global.
1748 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1751 * win32-low.c (create_process): Only call gdb_tilde_expand if
1752 inferior_cwd is not NULL.
1754 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1756 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1757 registers to the cache if their values have changed.
1758 (i387_xsave_to_cache): Provide default values for x87 control
1759 registers when these features are available, but disabled.
1760 * regcache.c (supply_register_by_name_zeroed): New function.
1761 * regcache.h (supply_register_by_name_zeroed): Declare new
1764 2018-05-07 Tom Tromey <tom@tromey.com>
1766 * configure: Rebuild.
1768 2018-05-04 Tom Tromey <tom@tromey.com>
1770 * configure: Rebuild.
1772 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1773 Pedro Alves <palves@redhat.com>
1775 * linux-aarch64-low.c (aarch64_stopped_data_address):
1778 2018-04-27 Tom Tromey <tom@tromey.com>
1780 * configure: Rebuild.
1782 2018-04-23 Tom Tromey <tom@tromey.com>
1784 * configure: Rebuild.
1786 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1788 * Makefile.in (depcomp): Add "..".
1789 (all_deps_files): New and use it.
1791 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1793 * configure.srv (aarch64*-*-linux*): Don't include xml.
1794 (i[34567]86-*-cygwin*): Likewise.
1795 (i[34567]86-*-linux*): Likewise.
1796 (i[34567]86-*-lynxos*): Likewise.
1797 (i[34567]86-*-mingw32ce*): Likewise.
1798 (i[34567]86-*-mingw*): Likewise.
1799 (i[34567]86-*-nto*): Likewise.
1800 (tic6x-*-uclinux): Likewise.
1801 (x86_64-*-linux*): Likewise.
1802 (x86_64-*-mingw*): Likewise.
1803 (x86_64-*-cygwin*): Likewise.
1805 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1807 * tdesc.c: Remove xml parameter.
1809 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1811 * server.c (get_features_xml): Remove cast.
1812 * tdesc.c (void target_desc::accept): Fill in function.
1813 (tdesc_get_features_xml): Remove old xml creation.
1814 (print_xml_feature::visit_pre): Add xml vistor.
1815 * tdesc.h (struct target_desc): Make xmltarget mutable.
1816 (tdesc_get_features_xml): Remove declaration.
1818 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1820 * tdesc.c (tdesc_architecture_name): Add new function.
1821 (tdesc_osabi_name): Likewise.
1822 (tdesc_get_features_xml): Use new functions.
1824 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1826 * tdesc.c (tdesc_create_flags): Remove.
1827 (tdesc_add_flag): Likewise.
1828 (tdesc_named_type): Likewise.
1829 (tdesc_create_union): Likewise.
1830 (tdesc_create_struct): Likewise.
1831 (tdesc_create_vector): Likewise.
1832 (tdesc_add_bitfield): Likewise.
1833 (tdesc_add_field): Likewise.
1834 (tdesc_set_struct_size): Likewise.
1836 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1838 * tdesc.c (~target_desc): Remove implictly deleted items.
1839 (init_target_desc): Iterate all features.
1840 (tdesc_get_features_xml): Use vector.
1841 (tdesc_create_feature): Create feature.
1842 * tdesc.h (tdesc_feature) Remove
1843 (target_desc): Add features.
1845 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1847 * Makefile.in: Add common/tdesc.c
1848 * tdesc.c (init_target_desc): init all reg_defs from register
1850 (tdesc_create_reg): Create tdesc_reg.
1851 * tdesc.h (tdesc_feature): Add register vector.
1853 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1855 * tdesc.h (struct target_desc) <features>: Change type to
1856 std::vector<std::string>.
1857 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1859 (tdesc_get_features_xml): Likewise.
1860 (tdesc_create_feature): Likewise.
1862 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1864 * regcache.c (find_register_by_number): Return a ref.
1865 (find_regno): Use references.
1866 (register_size): Likewise.
1867 (register_data): Likewise.
1868 * tdesc.c (target_desc::~target_desc): Remove free calls.
1869 (target_desc::operator==): Use std::vector compare.
1870 (init_target_desc): Use reference.
1871 (tdesc_create_reg): Use reg constructors.
1872 * tdesc.h (struct target_desc): Replace pointer with object.
1874 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1876 * regcache.c (find_register_by_number): Make static.
1877 (find_regno): Use find_register_by_number
1878 * regcache.h (struct reg): Remove declaration.
1880 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1882 * tdesc.c (target_desc::~target_desc): Move to here.
1883 (target_desc::operator==): Likewise.
1884 * tdesc.h (target_desc::~target_desc): Move from here.
1885 (target_desc::operator==): Likewise.
1887 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1889 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1891 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1893 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1895 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1896 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1897 and init_registers_s390_gs_linux64.
1899 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1901 * linux-s390-low.c (s390_fill_gs): Remove function.
1902 (s390_fill_gsbc): Remove function.
1903 (s390_regsets): Set fill functions for the guarded storage regsets
1906 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1908 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1909 the word size. Add comment.
1910 (s390_get_wordsize): New function.
1911 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1912 pswm with it. Instead, use s390_get_wordsize to determine the
1913 word size first and derive the correct tdesc from that directly.
1915 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1917 * Makefile.in: Include silent-rules.mk.
1918 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1919 (COMPILE): Add ECHO_CXX.
1920 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1921 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1922 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1923 (version-generated.c): Add ECHO_GEN.
1924 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1925 (IPAGENT_COMPILE): Add ECHO_CXX.
1926 (%-generated.c): Add ECHO_REGDAT.
1928 2018-03-14 Tom Tromey <tom@tromey.com>
1931 * ax.c (ax_printf): Special case for NULL.
1933 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1935 * linux-low.c (linux_qxfer_libraries_svr4): Use
1936 xml_escape_text_append.
1938 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1940 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1942 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1944 * server.c (handle_general_set): Remove unnecessary xstrdup.
1946 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1948 * server.c (parse_debug_format_options): Adjust to
1949 delim_string_to_char_ptr_vec changes.
1950 * thread-db.c (thread_db_load_search): Adjust to
1951 dirnames_to_char_ptr_vec changes.
1953 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1955 * target.h (target_enable_btrace, target_disable_btrace)
1956 (target_read_btrace, target_read_btrace_conf): Turn macro into
1957 inline function. Throw error if target method is not defined.
1958 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1959 check for btrace target method. Be prepared to handle exceptions
1960 from btrace target methods.
1962 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1964 * server.c (captured_main): Change order of error message printed
1965 when the current working directory cannot be found.
1967 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1969 * server.c: Include "filenames.h" and "pathstuff.h".
1970 (program_name): Delete variable.
1971 (program_path): New anonymous class.
1972 (get_exec_wrapper): Use "program_path" instead of
1974 (handle_v_run): Likewise.
1975 (captured_main): Likewise.
1976 (process_serial_event): Likewise.
1978 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1980 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1981 (OBJS): Add "pathstuff.o".
1982 * server.c (current_directory): New global variable.
1983 (captured_main): Initialize "current_directory".
1985 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1987 * tdesc.c: Use common/tdesc.h.
1988 * tdesc.h: Likewise.
1990 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1991 Simon Marchi <simon.marchi@ericsson.com>
1993 * Makefile.in: Switch order of make rules.
1995 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1997 * Makefile.in: Add common directory in build.
1998 * configure.ac: Add common reference.
1999 * configure: Regenerate.
2001 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2003 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2004 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2005 * spu-low.c (spu_target_ops): Likewise.
2006 * win32-low.c (win32_target_ops): Likewise.
2007 * server.c (supported_btrace_packets): Report packets unconditionally.
2008 * target.h (target_ops) <supports_btrace>: Remove.
2009 (target_supports_btrace): Remove.
2011 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2013 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2014 (handle_btrace_disable): Change return type to void. Use exceptions
2016 (handle_btrace_general_set): Catch exception and copy message to
2019 2018-02-08 Tom Tromey <tom@tromey.com>
2021 * linux-low.c (install_software_single_step_breakpoints): Use
2022 make_scoped_restore.
2023 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2024 (do_restore_current_thread_cleanup): Remove.
2025 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2028 2018-02-08 Tom Tromey <tom@tromey.com>
2030 * mem-break.c (set_raw_breakpoint_at): Use
2031 gdb::unique_xmalloc_ptr.
2033 2018-01-30 Pedro Alves <palves@redhat.com>
2036 * target.c (target_terminal::terminal_state): Rename to ...
2037 (target_terminal::m_terminal_state): ... this.
2039 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2041 * linux-low.c (handle_extended_wait): Surround call to
2042 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2044 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2046 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2047 linux_ptrace_attach_fail_reason_string now returning an
2049 (linux_attach): Likewise.
2050 * thread-db.c (attach_thread): Likewise.
2052 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2055 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2056 checking for fs_base/gs_base fields in struct user_regs_struct.
2057 * configure: Regenerate.
2059 2018-01-16 Yao Qi <yao.qi@linaro.org>
2062 * linux-low.c (fetch_register): Call supply_register instead of
2065 2018-01-08 Yao Qi <yao.qi@linaro.org>
2066 Simon Marchi <simon.marchi@ericsson.com>
2068 * Makefile.in (OBS): Remove selftest.o.
2069 * configure.ac: Set srv_selftest_objs if $development is true.
2070 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2071 * configure: Re-generated.
2072 * server.c (captured_main): Wrap variable selftest_filter with
2075 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2077 * server.c (parse_debug_format_options): Return std::string.
2078 (handle_monitor_command, captured_main): Adjust.
2080 2018-01-05 Pedro Alves <palves@redhat.com>
2083 * server.c (captured_main): Pass quiet=false to
2084 save_original_signals_state.
2086 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2088 * gdbreplay.c (gdbreplay_version): Update copyright year in
2090 * server.c (gdbserver_version): Likewise.
2092 2017-12-08 Tom Tromey <tom@tromey.com>
2094 * ax.c (ax_printf): Update.
2096 2017-12-07 Yao Qi <yao.qi@linaro.org>
2098 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2099 aarch64_linux_read_description.
2100 * linux-amd64-ipa.c (idx2mask): New array.
2101 (get_ipa_tdesc): Move idx2mask out.
2102 (initialize_low_tracepoint): Initialize target descriptions.
2103 * linux-i386-ipa.c (idx2mask): New array.
2104 (get_ipa_tdesc): Move idx2mask out.
2105 (initialize_low_tracepoint): Initialize target descriptions.
2107 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2109 * tdesc.c (struct tdesc_type): Change return type.
2110 (tdesc_add_flag): Change parameter type.
2111 (tdesc_add_bitfield): Likewise.
2112 (tdesc_add_field): Likewise.
2113 (tdesc_set_struct_size): Likewise.
2115 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2117 * regcache.c (registers_to_string): Remove unused variable.
2119 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2121 * inferiors.c (for_each_inferior_with_data): Remove.
2122 * inferiors.h (for_each_inferior_with_data): Remove.
2123 * server.c (handle_qxfer_threads_worker): Change parameter type.
2124 (handle_qxfer_threads_proper): Use for_each_thread.
2126 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2128 * inferiors.c (for_each_inferior): Remove.
2129 (clear_inferiors): Use for_each_thread.
2130 * inferiors.h (for_each_inferior): Remove.
2131 * linux-low.c (linux_wait_for_event_filtered): Use
2133 (linux_stabilize_threads): Likewise.
2134 * regcache.c (regcache_release): Likewise.
2135 * server.c (gdb_wants_all_threads_stopped): Likewise.
2136 (clear_pending_status_callback): Remove.
2137 (handle_status): Use for_each_thread.
2138 (captured_main): Likewise.
2139 * win32-low.c (child_init_thread_list): Likewise.
2140 (win32_clear_inferiors): Likewise.
2141 (fake_breakpoint_event): Likewise.
2143 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2145 * inferiors.h (find_inferior): Remove.
2146 * inferiors.c (find_inferior): Remove.
2148 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2150 * linux-low.c (resume_status_pending_p): Update comment.
2151 (need_step_over_p): Update comment.
2153 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2155 * linux-low.c (proceed_one_lwp): Return void, change parameter
2157 (unsuspend_and_proceed_one_lwp): Likewise.
2158 (proceed_all_lwps): Use for_each_thread.
2159 (unstop_all_lwps): Likewise.
2161 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2163 * linux-low.c (linux_resume_one_thread): Return void, take
2165 (linux_resume): Use for_each_thread.
2167 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2169 * linux-low.c (send_sigstop_callback): Return void, change
2170 parameter type. Rename to...
2171 (send_sigstop): ... this.
2172 (suspend_and_send_sigstop_callback): Return void, change parameter
2174 (suspend_and_send_sigstop): ... this.
2175 (stop_all_lwps): Use for_each_thread.
2177 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2179 * linux-low.c (lwp_running): Return bool, remove unused
2181 (linux_stabilize_threads): Use find_thread.
2183 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2185 * linux-low.c (select_singlestep_lwp_callback): Remove.
2186 (count_events_callback): Remove.
2187 (select_event_lwp_callback): Remove.
2188 (select_event_lwp): Use find_thread/for_each_thread.
2190 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2192 * linux-low.c (not_stopped_callback): Return bool, take filter
2194 (linux_wait_for_event_filtered): Use find_thread.
2195 (linux_wait_1): Likewise.
2197 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2199 * linux-low.c (same_lwp): Remove.
2200 (find_lwp_pid): Use find_thread.
2202 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2204 * linux-low.c (delete_lwp_callback): Remove.
2205 (linux_mourn): Use for_each_thread.
2207 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2209 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2210 args parameter, don't check for pid.
2211 (linux_detach): Use for_each_thread.
2213 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2215 * linux-low.c (struct counter): Remove.
2216 (second_thread_of_pid_p): Remove.
2217 (last_thread_of_process_p): Use find_thread.
2219 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2221 * inferiors.c (find_inferior_in_random): Remove.
2222 * inferiors.h (find_inferior_in_random): Remove.
2223 * linux-low.c (status_pending_p_callback): Return bool, accept
2224 parameter ptid directly.
2225 (linux_wait_for_event_filtered): Use find_thread_in_random.
2226 (linux_wait_1): Likewise.
2228 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2230 * inferiors.c (find_inferior_id): Remove.
2231 (find_thread_ptid): Move implemention from find_inferior_id to
2233 * inferiors.h (find_inferior_id): Remove.
2234 * server.c (handle_status): Use find_thread_ptid.
2235 (process_serial_event): Likewise.
2236 * thread-db.c (find_one_thread): Likewise.
2237 (thread_db_thread_handle): Likewise.
2238 * win32-low.c (thread_rec): Likewise.
2239 (child_delete_thread): Likewise.
2240 (win32_thread_alive): Likewise.
2241 (get_child_debug_event): Likewise.
2243 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2245 * linux-mips-low.c (update_watch_registers_callback): Return
2246 void, remove pid_p parameter, don't check for pid.
2247 (mips_insert_point, mips_remove_point): Use for_each_thread.
2249 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2251 * lynx.low (lynx_delete_thread_callback): Remove.
2252 (lynx_mourn): Use for_each_thread.
2254 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2256 * regcache.c (regcache_invalidate_one): Remove.
2257 (regcache_invalidate_pid): use for_each_thread.
2259 2017-11-26 Tom Tromey <tom@tromey.com>
2261 * linux-low.c (linux_create_inferior): Update.
2263 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2265 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2267 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2269 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2270 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2271 * linux-aarch64-tdesc-selftest.c: New file.
2272 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2274 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2276 * configure.srv: Add new file.
2277 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2278 * linux-aarch64-tdesc-selftest.c: New file.
2279 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2281 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2283 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2284 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2285 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2287 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2289 * configure.srv: Add new files.
2290 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2291 aarch64_linux_read_description.
2292 * linux-aarch64-low.c (aarch64_linux_read_description):
2293 Merge with aarch64_arch_setup.
2294 (aarch64_arch_setup): Call aarch64_linux_read_description.
2295 * linux-aarch64-tdesc.c: New file.
2296 * linux-aarch64-tdesc.h: New file.
2298 2017-11-24 Yao Qi <yao.qi@linaro.org>
2300 * configure.srv: Set $srv_regobj for tic6x-linux.
2301 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2302 (tic6x_read_description): Move some code to tic6x_arch_setup.
2303 (tic6x_tdesc_test): New function.
2304 (initialize_low_arch): Call selftests::register_test.
2306 2017-11-22 Yao Qi <yao.qi@linaro.org>
2308 * remote-utils.c (prepare_resume_reply): Use memcpy.
2310 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2312 * linux-low.c (kill_one_lwp_callback): Return void, take
2313 argument directly, don't filter on pid.
2314 (linux_kill): Use for_each_thread.
2316 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2318 * linux-low.c (need_step_over_p): Return bool, remove dummy
2320 (linux_resume, proceed_all_lwps): Use find_thread.
2322 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2324 * linux-low.c (resume_status_pending_p): Return bool, remove
2326 (linux_resume): Use find_thread.
2328 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2330 * linux-low.c (struct thread_resume_array): Remove.
2331 (linux_set_resume_request): Return void, take arguments
2333 (linux_resume): Use for_each_thread.
2335 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2337 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2338 return bool, remove data argument.
2339 (linux_stabilize_threads): Use find_thread.
2341 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2343 * linux-low.c (unsuspend_one_lwp): Remove.
2344 (unsuspend_all_lwps): Use for_each_thread, inline code from
2347 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2349 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2350 * linux-low.c (struct iterate_over_lwps_args): Remove.
2351 (iterate_over_lwps_filter): Remove.
2352 (iterate_over_lwps): Use find_thread.
2354 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2356 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2357 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2358 code from reset_lwp_ptrace_options_callback.
2360 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2362 * linux-arm-low.c (struct update_registers_data): Remove.
2363 (update_registers_callback): Return void, take arguments
2364 directly, don't check thread's pid.
2365 (arm_insert_point, arm_remove_point): Use for_each_thread.
2367 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2369 * win32-low.c (continue_one_thread): Return void, take argument
2371 (child_continue): Use for_each_thread.
2373 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2375 * win32-i386-low.c (update_debug_registers_callback): Rename
2377 (update_debug_registers): ... this, return void, remove pid_p arg.
2378 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2380 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2382 * inferiors.h (struct process_info): Add constructor, initialize
2384 <syscalls_to_catch>: Change type to std::vector<int>.
2385 * inferiors.c (add_process): Allocate process_info with new.
2386 (remove_process): Free process_info with delete.
2387 * linux-low.c (handle_extended_wait): Adjust.
2388 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2389 * server.c (handle_general_set): Adjust.
2391 2017-11-16 Pedro Alves <palves@redhat.com>
2393 * remote-utils.c (remote_close): Block SIGIO signals instead of
2394 uninstalling the SIGIO handler.
2396 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2398 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2400 2017-11-16 Yao Qi <yao.qi@linaro.org>
2402 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2403 (tic6x_store_gregset): Likewise.
2404 (tic6x_usrregs_info): Move it up.
2406 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2408 * Makefile.in: Update arch rules.
2409 * configure.srv: Explicitly mark arch/ files.
2411 2017-11-13 Andreas Schwab <schwab@suse.de>
2413 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2415 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2417 2017-11-06 Pedro Alves <palves@redhat.com>
2419 * config.in, configure: Regenerate.
2421 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2423 * target.c (struct thread_search): Remove.
2424 (thread_search_callback): Remove.
2425 (prepare_to_access_memory): Use for_each_thread instead of
2426 find_inferior. Inline code from thread_search_callback.
2428 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2430 * server.c (struct visit_actioned_threads_data): Remove.
2431 (visit_actioned_threads): Change prototype to take arguments
2433 (resume): Use find_thread instead of find_inferior.
2435 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2437 * server.c (queue_stop_reply_callback): Change prototype, return
2439 (find_status_pending_thread_callback): Remove.
2440 (handle_status): Replace find_inferior with find_thread and
2443 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2445 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2447 (aarch64_store_gregset): Likewise.
2448 (aarch64_fill_fpregset): Likewise.
2449 (aarch64_store_fpregset): Likewise.
2451 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2453 * gdbthread.h (find_thread, for_each_thread): New functions.
2454 * inferiors.c (thread_of_pid): Remove.
2455 (find_any_thread_of_pid): Use find_thread.
2456 * linux-low.c (num_lwps): Use for_each_thread.
2458 2017-10-17 Yao Qi <yao.qi@linaro.org>
2460 * Makefile.in: Remove one rule.
2461 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2463 2017-10-17 Yao Qi <yao.qi@linaro.org>
2465 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2466 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2468 2017-10-17 Yao Qi <yao.qi@linaro.org>
2470 * configure.srv: Rename arm.o with arch/arm.o.
2472 2017-10-17 Yao Qi <yao.qi@linaro.org>
2474 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2475 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2476 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2477 (arch-i386.o, arch-amd64.o): Remove rules.
2478 (arch/%.o): New rule.
2479 Update POSTCOMPILE and COMPILE.pre.
2480 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2481 * configure: Re-generated.
2482 * configure.srv: Replace arch-i386.o with arch/i386.o.
2483 Replace arch-amd64.o with arch/amd64.o.
2485 2017-10-16 Yao Qi <yao.qi@linaro.org>
2487 * configure: Regenerated.
2489 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2491 * inferiors.h: (struct inferior_list): Remove.
2492 (struct inferior_list_entry); Remove.
2493 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2494 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2495 get_first_inferior): Remove.
2496 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2497 find_inferior_id, find_inferior_in_random): Change signature.
2498 * inferiors.c (all_threads): Change type to
2499 std::list<thread_info *>.
2500 (get_thread): Remove macro.
2501 (find_inferior, find_inferior_id): Change signature, implement
2503 (find_inferior_in_random): Change signature, implement using
2504 find_thread_in_random.
2505 (for_each_inferior, for_each_inferior_with_data): Change
2506 signature, implement using for_each_thread.
2507 (add_inferior_to_list, remove_inferior): Remove.
2508 (add_thread, get_first_thread, thread_of_pid,
2509 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2510 (get_first_inferior, one_inferior_p, clear_inferior_list):
2512 (clear_inferiors, get_thread_process): Update.
2513 * gdbthread.h: Include <list>.
2514 (struct thread_info) <entry>: Remove field.
2516 (all_threads): Change type to std::list<thread_info *>.
2517 (get_first_inferior): Add doc.
2518 (find_thread, for_each_thread, find_thread_in_random): New
2520 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2521 * linux-arm-low.c (update_registers_callback): Update.
2522 * linux-low.c (second_thread_of_pid_p): Update.
2523 (kill_one_lwp_callback, linux_detach_lwp_callback,
2524 delete_lwp_callback, status_pending_p_callback, same_lwp,
2525 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2526 iterate_over_lwps, not_stopped_callback,
2527 resume_stopped_resumed_lwps, count_events_callback,
2528 select_singlestep_lwp_callback, select_event_lwp_callback,
2529 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2530 suspend_and_send_sigstop_callback, wait_for_sigstop,
2531 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2532 lwp_running, linux_set_resume_request, resume_status_pending_p,
2533 need_step_over_p, start_step_over, linux_resume_one_thread,
2534 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2535 reset_lwp_ptrace_options_callback): Update.
2536 * linux-mips-low.c (update_watch_registers_callback): Update.
2537 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2539 (free_register_cache_thread_one): Remove.
2540 (regcache_release): Update.
2541 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2542 handle_qxfer_threads_worker): Update.
2543 (handle_query): Update, use list iterator.
2544 (visit_actioned_threads, handle_pending_status,
2545 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2546 clear_pending_status_callback, set_pending_status_callback,
2547 find_status_pending_thread_callback, handle_status,
2548 process_serial_event): Update.
2549 * target.c (thread_search_callback): Update.
2550 * thread-db.c (thread_db_get_tls_address): Update.
2551 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2553 * win32-i386-low.c (update_debug_registers_callback): Update.
2554 * win32-low.c (delete_thread_info, child_delete_thread,
2555 continue_one_thread, suspend_one_thread,
2556 get_child_debug_event): Adjust.
2558 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2560 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2561 * inferiors.h: Include <list>.
2562 (struct process_info) <entry>: Remove field.
2564 (pid_of): Change macro to function.
2565 (ptid_of, lwpid_of): Remove macro.
2566 (all_processes): Change type to std::list<process_info *>.
2567 (ALL_PROCESSES): Remove macro.
2568 (for_each_process, find_process): New function.
2569 * inferiors.c (all_processes): Change type to
2570 std::list<process_info *>.
2571 (find_thread_process): Adjust.
2572 (add_process): Likewise.
2573 (remove_process): Likewise.
2574 (find_process_pid): Likewise.
2575 (get_first_process): Likewise.
2576 (started_inferior_callback): Remove.
2577 (have_started_inferiors_p): Adjust.
2578 (attached_inferior_callback): Remove.
2579 (have_attached_inferiors_p): Adjust.
2580 * linux-low.c (check_zombie_leaders): Likewise.
2581 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2582 (x86_linux_update_xmltarget): Adjust.
2583 * server.c (handle_query): Likewise.
2584 (gdb_reattached_process): Remove.
2585 (handle_status): Adjust.
2586 (kill_inferior_callback): Likewise.
2587 (detach_or_kill_inferior): Remove.
2588 (print_started_pid): Likewise.
2589 (print_attached_pid): Likewise.
2590 (detach_or_kill_for_exit): Update.
2591 (process_serial_event): Likewise.
2592 * linux-arm-low.c (arm_new_fork): Likewise.
2594 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2596 * dll.h: Include <list>.
2597 (struct dll_info): Add constructor.
2598 <entry>: Remove field.
2599 (all_dlls): Change type to std::list<dll_info>.
2600 * dll.c: Include <algorithm>.
2601 (get_dll): Remove macro.
2602 (all_dlls): Change type to std::list<dll_info *>.
2603 (free_one_dll): Remove.
2604 (match_dll): Likewise.
2605 (loaded_dll): Adjust.
2606 (unloaded_dll): Adjust to all_dlls type change, use
2607 std::find_if. Inline code from match_dll.
2608 (clear_dlls): Adjust to all_dlls type change.
2609 * server.c (emit_dll_description): Remove.
2610 (handle_qxfer_libraries): Adjust to all_dlls type change,
2611 integrate emit_dll_description's functionality.
2613 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2615 * linux-low.h (struct linux_target_ops) <delete_process>: New
2617 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2618 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2619 (struct linux_target_ops): Add delete_process callback.
2620 * linux-arm-low.c (arm_delete_process): New.
2621 (struct linux_target_ops): Add delete_process callback.
2622 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2623 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2624 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2625 * linux-mips-low.c (mips_linux_delete_process): New.
2626 (struct linux_target_ops): Add delete_process callback.
2627 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2628 * linux-s390-low.c (struct linux_target_ops): Likewise.
2629 * linux-sh-low.c (struct linux_target_ops): Likewise.
2630 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2631 * linux-tile-low.c (struct linux_target_ops): Likewise.
2632 * linux-x86-low.c (x86_linux_delete_process): New.
2633 (struct linux_target_ops): Add delete_process callback.
2634 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2636 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2638 * linux-aarch64-low.c (the_low_target): Add thread delete
2640 * linux-arm-low.c (arm_delete_thread): New function.
2641 (the_low_target): Add thread delete callback.
2642 * linux-bfin-low.c (the_low_target): Likewise.
2643 * linux-crisv32-low.c (the_low_target): Likewise.
2644 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2646 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2648 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2649 * linux-mips-low.c (mips_linux_delete_thread): New function.
2650 (the_low_target): Add thread delete callback.
2651 * linux-ppc-low.c (the_low_target): Likewise.
2652 * linux-s390-low.c (the_low_target): Likewise.
2653 * linux-sh-low.c (the_low_target): Likewise.
2654 * linux-tic6x-low.c (the_low_target): Likewise.
2655 * linux-tile-low.c (the_low_target): Likewise.
2656 * linux-x86-low.c (the_low_target): Likewise.
2657 * linux-xtensa-low.c (the_low_target): Likewise.
2659 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2661 * win32-low.c: Include "common-inferior.h".
2663 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2665 * inferiors.c (set_inferior_cwd): New function.
2666 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2667 (handle_query): Inform that QSetWorkingDir is supported.
2668 * win32-low.c (create_process): Pass the inferior's cwd to
2671 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2673 * inferiors.c (current_inferior_cwd): New global variable.
2674 (get_inferior_cwd): New function.
2675 * inferiors.h (struct process_info) <cwd>: New field.
2677 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2679 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2680 (OBS): Add gdb_tilde_expand.o.
2682 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2684 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2685 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2687 2017-09-29 Pedro Alves <palves@redhat.com>
2689 * ax.c (gdb_parse_agent_expr): Constify.
2690 * ax.h (gdb_parse_agent_expr): Constify.
2691 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2693 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2694 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2695 * remote-utils.h (read_ptid): Constify.
2696 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2697 (process_point_options, process_serial_event): Constify.
2698 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2699 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2700 (cmd_qtbuffer): Constify.
2702 2017-09-29 Pedro Alves <palves@redhat.com>
2704 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2707 2017-09-29 Pedro Alves <palves@redhat.com>
2709 * linux-low.c (handle_extended_wait): Pass parent thread instead
2710 of process to thread_db_notice_clone.
2711 * linux-low.h (thread_db_notice_clone): Replace parent process
2712 parameter with parent thread parameter.
2713 * thread-db.c (find_one_thread): Add comment.
2714 (thread_db_notice_clone): Replace parent process parameter with
2715 parent thread parameter. Temporarily switch to the parent thread.
2717 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2719 * gdbthread.h: Include "common-gdbthread.h".
2720 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2721 "if" when validating the ptid.
2722 * remote-utils.c: Include "gdbthread.h".
2723 (prepare_resume_reply): Use "switch_to_thread".
2724 * target.c (done_accessing_memory): Likewise.
2726 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2728 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2729 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2730 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2731 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2732 s390x-gs-linux64-ipa.o to ipa_obj.
2733 * linux-s390-low.c (HWCAP_S390_GS): New define.
2734 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2736 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2737 (s390_arch_setup): Check for guarded-storage support and choose
2739 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2740 init_registers_s390x_gs_linux64.
2741 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2743 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2744 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2746 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2748 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2750 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2752 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2753 (thread_db_thread_handle): Declare.
2754 * linux-low.c (linux_target_ops): Initialize thread_handle.
2755 * server.c (handle_qxfer_threads_worker): Add support for
2757 * target.h (struct target_ops): Add new function pointer,
2759 (target_thread_handle): Define.
2760 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2762 (thread_db_thread_handle): New function.
2764 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2766 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2767 * linux-low.h (thread_db_notice_clone): Declare.
2768 * thread-db.c (thread_db_notice_clone): New function.
2770 2017-09-21 Pedro Alves <palves@redhat.com>
2772 * server.c (gdb_read_memory, handle_status, process_serial_event)
2773 (handle_serial_event, handle_target_event): Adjust to
2774 set_desired_thread prototype change.
2775 * target.c (set_desired_thread): Remove 'use_general' parameter
2777 * target.h (set_desired_thread): Remove 'use_general' parameter.
2779 2017-09-20 Tom Tromey <tom@tromey.com>
2781 * target.c (target_terminal::terminal_state): Define.
2782 (target_terminal::init): Rename from target_terminal_init.
2783 (target_terminal::inferior): Rename from
2784 target_terminal_inferior.
2785 (target_terminal::ours): Rename from target_terminal_ours.
2786 (target_terminal::ours_for_output, target_terminal::info): New.
2788 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2790 * server.c (accumulate_file_name_length): Remove.
2791 (emit_dll_description): Adjust to std::string change.
2792 (handle_qxfer_libraries): Use std::string to hold document.
2794 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2796 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2797 return type of xml_escape_text.
2798 * server.c (emit_dll_description): Likewise.
2800 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2802 * server.c (captured_main): Accept argument for --selftest.
2803 Update run_tests call.
2804 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2805 when registering selftests.
2807 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2809 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2810 instead of "VEC" for "target_desc.reg_defs".
2811 (regcache_cpy): Likewise.
2812 (registers_to_string): Likewise.
2813 (registers_from_string): Likewise.
2814 (find_regno): Likewise.
2815 (supply_regblock): Likewise.
2816 (regcache_raw_read_unsigned): Likewise.
2817 * tdesc.c (init_target_desc): Likewise.
2818 (tdesc_create_reg): Likewise.
2819 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2820 (struct target_desc) <reg_defs>: Convert to "std::vector".
2821 (target_desc): Do not initialize "reg_defs".
2822 (~target_desc): Update code to use "std::vector" instead of "VEC"
2823 for "target_desc.reg_defs".
2824 (operator==): Likewise.
2826 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2828 * inferiors.h (thread_to_gdb_id): Remove.
2829 * inferiors.c (thread_to_gdb_id): Remove.
2830 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2831 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2832 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2834 * nto-low.c (nto_fetch_registers, nto_store_registers,
2835 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2837 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2839 * inferiors.h (gdb_id_to_thread_id): Remove.
2840 * inferiors.c (gdb_id_to_thread_id): Remove.
2841 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2842 removal. Move pid declaration closer to where it's used.
2844 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2846 * server.c (handle_detach): New function.
2847 (process_serial_event): Move code out, call handle_detach.
2849 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2851 * server.c (require_running): Rename to ...
2852 (require_running_or_return): ... this ...
2853 (require_running_or_break): ... and this.
2854 (handle_query, process_serial_event): Adjust.
2856 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2858 * linux-low.c (linux_set_resume_request): Remove unused
2861 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2863 * server.c (first_thread_of): Remove.
2864 (process_serial_event): Replace usage of first_thread_of with
2865 find_any_thread_of_pid.
2866 * tracepoint.c (same_process_p): Remove.
2867 (gdb_agent_about_to_close): Replace usage of same_process_p with
2868 find_any_thread_of_pid.
2869 * linux-x86-low.c (same_process_callback): Remove.
2870 (x86_arch_setup_process_callback): Replace usage of
2871 same_process_callback with find_any_thread_of_pid.
2872 * thread-db.c (any_thread_of): Remove.
2873 (switch_to_process): Replace usage of any_thread_of with
2874 find_any_thread_of_pid.
2875 * inferiors.c (thread_pid_matches_callback): Remove.
2876 (find_thread_process): Adjust to use find_any_thread_of_pid.
2878 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2880 * regcache.c (get_thread_regcache): Guard calls to "memset"
2883 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2885 * linux-low.c (handle_extended_wait): Use
2886 "allocate_target_description" instead of "XNEW".
2887 * linux-x86-low.c (initialize_low_arch): Likewise.
2889 2017-09-05 Yao Qi <yao.qi@linaro.org>
2891 * configure.srv (srv_i386_regobj): Remove.
2892 (srv_amd64_regobj): Remove.
2893 (srv_regobj): Set it to "" for x86 non-linux targets.
2894 * linux-x86-tdesc.c (i386_linux_read_description):
2895 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2896 (init_registers_i386): Remove the declaration.
2897 (tdesc_i386): Remove the declaration.
2898 (lynx_i386_arch_setup): Call i386_create_target_description.
2899 * nto-x86-low.c: Likewise.
2900 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2901 [!__x86_64__]: include arch/i386.h.
2902 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2904 2017-09-05 Yao Qi <yao.qi@linaro.org>
2906 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2907 i386/amd64-XXX-linux from it.
2909 2017-09-05 Yao Qi <yao.qi@linaro.org>
2911 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2913 (ipa_amd64_linux_regobj): Remove.
2914 (ipa_x32_linux_regobj): Remove.
2916 2017-09-05 Yao Qi <yao.qi@linaro.org>
2918 * Makefile.in (arch-amd64.o): New rule.
2919 * configure.srv: Append arch-amd64.o.
2920 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2921 (get_ipa_tdesc): Call amd64_linux_read_description.
2922 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2923 and init_registers_amd64_XXX.
2924 * linux-x86-low.c (x86_linux_read_description): Call
2925 amd64_linux_read_description.
2926 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2927 (initialize_low_arch): Don't call init_registers_x32_XXX and
2928 init_registers_amd64_XXX.
2929 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2930 and tdesc_amd64_XXX.
2931 [__x86_64__] (amd64_tdesc_test): New function.
2932 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2933 and init_registers_amd64_XXX.
2934 * linux-x86-tdesc.c: Include arch/amd64.h.
2935 (xcr0_to_tdesc_idx): New function.
2936 (i386_linux_read_description): New function.
2937 (amd64_get_ipa_tdesc_idx): New function.
2938 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2939 (amd64_get_ipa_tdesc): Declare.
2941 2017-09-05 Yao Qi <yao.qi@linaro.org>
2943 * configure.srv (srv_i386_linux_xmlfiles): Remove
2944 i386/i386-XXX-linux.xml from it.
2946 2017-09-05 Yao Qi <yao.qi@linaro.org>
2948 * configure.srv: Set srv_i386_linux_regobj empty if $development
2950 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2951 initialize_low_tdesc.
2952 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2953 with #if initialize_low_tdesc.
2954 * linux-x86-tdesc-selftest.c: New file.
2955 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2957 2017-09-05 Yao Qi <yao.qi@linaro.org>
2959 * Makefile.in (arch-i386.o): New rule.
2960 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2961 (x86_64-*-linux*): Likewise.
2962 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2963 include arch/i386.h.
2964 (i386_linux_read_description): Remove code and call
2965 i386_create_target_description.
2966 * tdesc.c (allocate_target_description): New function.
2967 * tdesc.h (set_tdesc_architecture): Remove declaration.
2968 (set_tdesc_osabi): Likewise.
2970 2017-09-05 Yao Qi <yao.qi@linaro.org>
2972 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2973 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2974 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2976 * server.c (get_features_xml): Call tdesc_get_features_xml.
2977 * tdesc.c (set_tdesc_architecture): New function.
2978 (set_tdesc_osabi): New function.
2979 (tdesc_get_features_xml): New function.
2980 (tdesc_create_feature): Add an argument.
2981 * tdesc.h (struct target_desc) <features>: New field.
2982 <arch, osabi>: New field.
2983 (~target_desc): xfree features, arch, and osabi.
2984 (target_desc::oerator==): Don't compare .xmltarget.
2985 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2986 (set_tdesc_osabi): Likewise.
2987 (tdesc_get_features_xml): Likewise.
2989 2017-09-05 Yao Qi <yao.qi@linaro.org>
2991 * linux-x86-tdesc.c: Include selftest.h.
2992 (i386_tdesc_test): New function.
2993 (initialize_low_tdesc): Call selftests::register_test.
2994 * tdesc.h: Include regdef.h.
2995 (target_desc): Override operator == and !=.
2997 2017-09-05 Yao Qi <yao.qi@linaro.org>
2999 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3000 (ipa_obj): Likewise.
3001 * linux-i386-ipa.c: Include common/x86-xstate.h
3002 (get_ipa_tdesc): Call i386_linux_read_description.
3003 (initialize_low_tracepoint): Don't call init_registers_XXX
3004 functions, call initialize_low_tdesc instead.
3005 * linux-x86-low.c (x86_linux_read_description): Call
3006 i386_linux_read_description.
3007 (initialize_low_arch): Don't call init_registers_i386_XXX
3008 functions, call initialize_low_tdesc.
3009 * linux-x86-tdesc.c: New file.
3010 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3011 (i386_get_ipa_tdesc_idx): Declare.
3012 (i386_get_ipa_tdesc): Declare.
3013 (initialize_low_tdesc): Declare.
3015 2017-09-05 Yao Qi <yao.qi@linaro.org>
3017 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3020 2017-09-05 Yao Qi <yao.qi@linaro.org>
3022 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3023 * regcache.c (get_thread_regcache): Use VEC_length.
3024 (init_register_cache): Likewise.
3025 (regcache_cpy): Likewise.
3026 (registers_to_string): Iterate reg_defs via VEC_iterate.
3027 (find_regno): Likewise.
3028 (find_register_by_number): Use VEC_index.
3029 (register_size): Call find_register_by_number.
3030 (register_data): Call find_register_by_number.
3031 (supply_regblock): Use VEC_length.
3032 (regcache_raw_read_unsigned): Likewise.
3033 * tdesc.c (init_target_desc): Iterate reg_defs via
3035 (default_description): Update initializer.
3036 (copy_target_description): Don't update field num_registers.
3037 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3038 <num_registers>: Remove.
3040 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3042 * Makefile.in (.SECONDARY): Define target.
3044 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3046 * linux-low.c (linux_wait_1): Adjust.
3047 * server.c (queue_stop_reply_callback): Adjust.
3049 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3051 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3052 QEnvironmentUnset and QEnvironmentReset packets.
3053 (handle_query): Inform remote that QEnvironmentHexEncoded,
3054 QEnvironmentUnset and QEnvironmentReset are supported.
3056 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3058 * inferiors.h (inferior_target_data): Rename to ...
3059 (thread_target_data): ... this.
3060 (inferior_regcache_data): Rename to ...
3061 (thread_regcache_data): ... this.
3062 (set_inferior_regcache_data): Rename to ...
3063 (set_thread_regcache_data): ... this.
3064 * inferiors.c (inferior_target_data): Rename to ...
3065 (thread_target_data): ... this.
3066 (inferior_regcache_data): Rename to ...
3067 (thread_regcache_data): ... this.
3068 (set_inferior_regcache_data): Rename to ...
3069 (set_thread_regcache_data): ... this.
3070 (free_one_thread): Update.
3071 * linux-low.h (get_thread_lwp): Update.
3072 * regcache.c (get_thread_regcache): Update.
3073 (regcache_invalidate_thread): Update.
3074 (free_register_cache_thread): Update.
3075 * win32-i386-low.c (update_debug_registers_callback): Update.
3076 (win32_get_current_dr): Update.
3077 * win32-low.c (thread_rec): Update.
3078 (delete_thread_info): Update.
3079 (continue_one_thread): Update.
3080 (suspend_one_thread): Update.
3082 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3084 * inferiors.c (set_inferior_target_data): Remove.
3085 * inferiors.h (set_inferior_target_data): Remove.
3087 2017-08-18 Yao Qi <yao.qi@linaro.org>
3089 * Makefile.in (OBS): Add selftest.o.
3090 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3091 * configure, config.in: Re-generated.
3092 * server.c: Include common/sefltest.h.
3093 (captured_main): Handle option --selftest.
3095 2017-08-09 Yao Qi <yao.qi@linaro.org>
3097 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3098 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3099 i386-avx-mpx.o and i386-mmx.o.
3100 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3101 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3102 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3103 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3104 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3105 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3106 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3107 i386/amd64-avx-mpx.xml.
3109 2017-08-09 Yao Qi <yao.qi@linaro.org>
3111 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3112 and x32-avx-avx512.o.
3113 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3114 i386/x32-avx-avx512.xml.
3116 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3118 * tracepoint.h (enum class fast_tpoint_collect_result): New
3120 (fast_tracepoint_collecting): Change return type to
3121 fast_tpoint_collect_result.
3122 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3123 * linux-low.h: Include tracepoint.h.
3124 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3125 fast_tpoint_collect_result.
3126 * linux-low.c (handle_tracepoints): Adjust.
3127 (linux_fast_tracepoint_collecting): Change return type to
3128 fast_tpoint_collect_result.
3129 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3130 linux_wait_1, stuck_in_jump_pad_callback,
3131 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3132 proceed_one_lwp): Adjust to type change.
3134 2017-07-10 Yao Qi <yao.qi@linaro.org>
3136 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3138 2017-06-29 Yao Qi <yao.qi@linaro.org>
3140 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3142 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3144 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3146 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3148 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3150 * linux-low.c (linux_create_inferior): Adjust code to access the
3151 environment information via 'gdb_environ' class.
3152 * lynx-low.c (lynx_create_inferior): Likewise.
3153 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3154 (get_environ): Return a pointer to 'our_environ'.
3155 (captured_main): Initialize 'our_environ'.
3156 * server.h (get_environ): Adjust prototype.
3157 * spu-low.c (spu_create_inferior): Adjust code to access the
3158 environment information via 'gdb_environ' class.
3160 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3162 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3163 usage of "register" keyword.
3165 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3167 * configure: Re-generate.
3169 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3171 * configure: Re-generate.
3173 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3175 * Makefile.in (COMPILE.pre): Add "-x c++".
3177 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3179 * fork-child.c: Conditionally include <signal.h>.
3181 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3183 * server.c (handle_general_set): Handle new packet
3184 "QStartupWithShell".
3185 (handle_query): Add "QStartupWithShell" to the list of supported
3187 (gdbserver_usage): Add help text explaining the
3188 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3190 (captured_main): Recognize and act upon the presence of the new
3193 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3194 Pedro Alves <palves@redhat.com>
3196 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3197 * configure: Regenerate.
3198 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3200 (i[34567]86-*-lynxos*): Likewise.
3201 (spu*-*-*): Likewise.
3202 * fork-child.c: New file.
3203 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3205 (linux_ptrace_fun): New function.
3206 (linux_create_inferior): Adjust function prototype to reflect
3207 change on "target.h". Adjust function code to use
3209 (linux_request_interrupt): Delete "signal_pid".
3210 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3211 (lynx_ptrace_fun): New function.
3212 (lynx_create_inferior): Adjust function prototype to reflect
3213 change on "target.h". Adjust function code to use
3215 * nto-low.c (nto_create_inferior): Adjust function prototype and
3216 code to reflect change on "target.h". Update comments.
3217 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3218 "common-terminal.h" and "environ.h".
3219 (terminal_fd): Moved to fork-child.c.
3220 (old_foreground_pgrp): Likewise.
3221 (restore_old_foreground_pgrp): Likewise.
3222 (last_status): Make it global.
3223 (last_ptid): Likewise.
3224 (our_environ): New variable.
3225 (startup_with_shell): Likewise.
3226 (program_name): Likewise.
3227 (program_argv): Rename to...
3228 (program_args): ...this.
3229 (wrapper_argv): New variable.
3230 (start_inferior): Delete function.
3231 (get_exec_wrapper): New function.
3232 (get_exec_file): Likewise.
3233 (get_environ): Likewise.
3234 (prefork_hook): Likewise.
3235 (post_fork_inferior): Likewise.
3236 (postfork_hook): Likewise.
3237 (postfork_child_hook): Likewise.
3238 (handle_v_run): Update code to deal with arguments coming from the
3239 remote host. Update calls from "start_inferior" to
3241 (captured_main): Likewise. Initialize environment variable. Call
3243 * server.h (post_fork_inferior): New prototype.
3244 (get_environ): Likewise.
3245 (last_status): Declare.
3246 (last_ptid): Likewise.
3247 (signal_pid): Likewise.
3248 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3249 (spu_ptrace_fun): New function.
3250 (spu_create_inferior): Adjust function prototype to reflect change
3251 on "target.h". Adjust function code to use "fork_inferior".
3252 * target.c (target_terminal_init): New function.
3253 (target_terminal_inferior): Likewise.
3254 (target_terminal_ours): Likewise.
3255 * target.h: Include <vector>.
3256 (struct target_ops) <create_inferior>: Update prototype.
3257 (create_inferior): Update macro.
3258 * utils.c (gdb_flush_out_err): New function.
3259 * win32-low.c (win32_create_inferior): Adjust function prototype
3260 and code to reflect change on "target.h".
3262 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3264 * inferiors.c (switch_to_thread): New function.
3266 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3268 * Makefile.in (SFILE): Add "common/job-control.c".
3269 (OBS): Add "job-control.o".
3271 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3273 * Makefile: Remove "@host_makefile_frag@".
3275 2017-05-05 Pedro Alves <palves@redhat.com>
3277 * configure: Regenerate.
3279 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3281 * configure: Regenerate.
3283 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3285 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3286 software_single_step change of return type to
3287 std::vector<CORE_ADDR>.
3288 * linux-low.c (install_software_single_step_breakpoints):
3290 * linux-low.h (install_software_single_step_breakpoints):
3293 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3295 * remote-utils.c: Include "gdb_termios.h" instead of
3297 * terminal.h: Delete file.
3299 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3301 * server.c: Include <vector>.
3302 <program_argv, wrapper_argv>: Convert to std::vector.
3303 (start_inferior): Rewrite function to use C++.
3304 (handle_v_run): Likewise. Update code that calculates the argv
3305 based on the vRun packet; use C++.
3306 (captured_main): Likewise.
3308 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3310 * server.c (handle_v_cont): Initialize thread_resume::thread
3313 2017-04-05 Pedro Alves <palves@redhat.com>
3315 * configure: Regenerate.
3317 2017-04-05 Pedro Alves <palves@redhat.com>
3319 * gdbreplay.c (sync_error): Constify.
3320 * linux-x86-low.c (push_opcode): Constify.
3322 2017-04-05 Pedro Alves <palves@redhat.com>
3324 * win32-low.c (get_child_debug_event)
3325 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3326 Report TARGET_WAITKIND_SPURIOUS instead.
3328 2017-04-05 Pedro Alves <palves@redhat.com>
3330 * remote-utils.c (remote_prepare, remote_open): Constify.
3331 * remote-utils.h (remote_prepare, remote_open): Constify.
3332 * server.c (captured_main): Constify 'port' handling.
3334 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3336 * Makefile.in (clean): Clear .deps.
3338 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3340 * .gitignore: Remove generated files, replace with wildcard.
3341 * (clean): Replace removal of generated files with wildcard.
3342 (version.c): Replace with...
3343 (version-generated.c): ...this.
3344 (xml-builtin.c): Replace with...
3345 (xml-builtin-generated.c): ...this.
3346 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3347 (%.c: *regformats*): Replace with...
3348 (%-generated.c: *regformats*): ...this.
3350 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3352 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3353 (xtensa_fill_gregset): Call collect_register_by_name for
3355 (xtensa_store_gregset): Call supply_register_by_name for
3358 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3360 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3361 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3362 (xtensa_store_gregset): Call supply_register for all registers in
3363 a0_regnum..a0_regnum + C0_NREGS range.
3365 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3367 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3368 (ax-ipa.o: ax.c): Remove.
3369 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3370 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3371 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3372 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3373 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3375 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3377 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3378 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3379 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3380 (errors-ipa.o: ../common/errors.c): Remove.
3381 (format-ipa.o: ../common/format.c): Remove.
3382 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3384 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3386 * Makefile.in (%-ipa.o: %.c): New rule.
3387 (tracepoint-ipa.o: tracepoint.c): Remove.
3388 (utils-ipa.o: utils.c): Remove.
3389 (remote-utils-ipa.o: remote-utils.c): Remove.
3390 (regcache-ipa.o: regcache.c): Remove.
3391 (i386-linux-ipa.o: i386-linux.c): Remove.
3392 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3393 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3394 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3395 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3396 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3397 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3398 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3399 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3400 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3401 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3402 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3403 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3404 (aarch64-ipa.o: aarch64.c): Remove.
3405 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3406 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3407 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3408 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3409 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3410 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3411 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3412 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3413 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3414 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3415 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3416 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3417 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3418 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3419 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3420 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3421 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3422 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3423 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3424 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3425 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3426 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3427 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3428 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3429 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3430 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3431 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3432 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3433 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3434 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3435 (tdesc-ipa.o: tdesc.c): Remove.
3436 (x32-linux-ipa.o: x32-linux.c): Remove.
3437 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3438 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3440 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3442 * Makefile.in (%.o: ../arch/%.c): New rule.
3443 (arm.o: ../arch/arm.c): Remove.
3444 (arm-linux.o: ../arch/arm-linux.c): Remove.
3445 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3446 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3448 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3450 * Makefile.in (%.o: ../nat/%.c): New rule.
3451 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3452 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3453 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3454 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3455 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3456 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3457 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3458 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3459 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3460 (linux-personality.o: ../nat/linux-personality.c): Remove.
3461 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3462 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3463 (x86-linux.o: ../nat/x86-linux.c): Remove.
3464 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3465 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3467 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3469 * Makefile.in (%.o: ../common/%.c): New rule.
3470 (signals.o: ../common/signals.c): Remove.
3471 (print-utils.o: ../common/print-utils.c): Remove.
3472 (rsp-low.o: ../common/rsp-low.c): Remove.
3473 (common-utils.o: ../common/common-utils.c): Remove.
3474 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3475 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3476 (vec.o: ../common/vec.c): Remove.
3477 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3478 (xml-utils.o: ../common/xml-utils.c): Remove.
3479 (ptid.o: ../common/ptid.c): Remove.
3480 (buffer.o: ../common/buffer.c): Remove.
3481 (format.o: ../common/format.c): Remove.
3482 (filestuff.o: ../common/filestuff.c): Remove.
3483 (agent.o: ../common/agent.c): Remove.
3484 (errors.o: ../common/errors.c): Remove.
3485 (environ.o: ../common/environ.c): Remove.
3486 (common-debug.o: ../common/common-debug.c): Remove.
3487 (cleanups.o: ../common/cleanups.c): Remove.
3488 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3489 (fileio.o: ../common/fileio.c): Remove.
3490 (common-regcache.o: ../common/common-regcache.c): Remove.
3491 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3492 (new-op.o: ../common/new-op.c): Remove.
3493 (btrace-common.o: ../common/btrace-common.c): Remove.
3495 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3497 * Makefile.in (%.o: ../target/%.c): New rule.
3498 (waitstatus.o: ../target/waitstatus.c): Remove.
3500 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3503 (%.c: ../regformats/%.dat,
3504 (%.c: ../regformats/arm/%.dat,
3505 (%.c: ../regformats/i386/%.dat,
3506 (%.c: ../regformats/rs6000/%.dat): New rules.
3507 (aarch64.c): Remove.
3508 (reg-arm.c): Remove.
3509 (arm-with-iwmmxt.c): Remove.
3510 (arm-with-vfpv2.c): Remove.
3511 (arm-with-vfpv3.c): Remove.
3512 (arm-with-neon.c): Remove.
3513 (reg-bfin.c): Remove.
3514 (reg-cris.c): Remove.
3515 (reg-crisv32.c): Remove.
3517 (i386-linux.c): Remove.
3518 (i386-avx.c): Remove.
3519 (i386-avx-linux.c): Remove.
3520 (i386-avx-avx512.c): Remove.
3521 (i386-avx-avx512-linux.c): Remove.
3522 (i386-mpx.c): Remove.
3523 (i386-mpx-linux.c): Remove.
3524 (i386-avx-mpx-avx512-pku.c): Remove.
3525 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3526 (i386-avx-mpx.c): Remove.
3527 (i386-avx-mpx-linux.c): Remove.
3528 (i386-mmx.c): Remove.
3529 (i386-mmx-linux.c): Remove.
3530 (reg-ia64.c): Remove.
3531 (reg-m32r.c): Remove.
3532 (reg-m68k.c): Remove.
3534 (mips-linux.c): Remove.
3535 (mips-dsp-linux.c): Remove.
3536 (mips64-linux.c): Remove.
3537 (mips64-dsp-linux.c): Remove.
3538 (nios2-linux.c): Remove.
3539 (powerpc-32.c): Remove.
3540 (powerpc-32l.c): Remove.
3541 (powerpc-altivec32l.c): Remove.
3542 (powerpc-cell32l.c): Remove.
3543 (powerpc-vsx32l.c): Remove.
3544 (powerpc-isa205-32l.c): Remove.
3545 (powerpc-isa205-altivec32l.c): Remove.
3546 (powerpc-isa205-vsx32l.c): Remove.
3547 (powerpc-e500l.c): Remove.
3548 (powerpc-64l.c): Remove.
3549 (powerpc-altivec64l.c): Remove.
3550 (powerpc-cell64l.c): Remove.
3551 (powerpc-vsx64l.c): Remove.
3552 (powerpc-isa205-64l.c): Remove.
3553 (powerpc-isa205-altivec64l.c): Remove.
3554 (powerpc-isa205-vsx64l.c): Remove.
3555 (s390-linux32.c): Remove.
3556 (s390-linux32v1.c): Remove.
3557 (s390-linux32v2.c): Remove.
3558 (s390-linux64.c): Remove.
3559 (s390-linux64v1.c): Remove.
3560 (s390-linux64v2.c): Remove.
3561 (s390-te-linux64.c): Remove.
3562 (s390-vx-linux64.c): Remove.
3563 (s390-tevx-linux64.c): Remove.
3564 (s390x-linux64.c): Remove.
3565 (s390x-linux64v1.c): Remove.
3566 (s390x-linux64v2.c): Remove.
3567 (s390x-te-linux64.c): Remove.
3568 (s390x-vx-linux64.c): Remove.
3569 (s390x-tevx-linux64.c): Remove.
3570 (tic6x-c64xp-linux.c): Remove.
3571 (tic6x-c64x-linux.c): Remove.
3572 (tic6x-c62x-linux.c): Remove.
3574 (reg-sparc64.c): Remove.
3575 (reg-spu.c): Remove.
3577 (amd64-linux.c): Remove.
3578 (amd64-avx.c): Remove.
3579 (amd64-avx-linux.c): Remove.
3580 (amd64-avx-avx512.c): Remove.
3581 (amd64-avx-avx512-linux.c): Remove.
3582 (amd64-mpx.c): Remove.
3583 (amd64-mpx-linux.c): Remove.
3584 (amd64-avx-mpx-avx512-pku.c): Remove.
3585 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3586 (amd64-avx-mpx.c): Remove.
3587 (amd64-avx-mpx-linux.c): Remove.
3589 (x32-linux.c): Remove.
3590 (x32-avx.c): Remove.
3591 (x32-avx-linux.c): Remove.
3592 (x32-avx-avx512.c): Remove.
3593 (x32-avx-avx512-linux.c): Remove.
3594 (reg-xtensa.c): Remove.
3595 (reg-tilegx.c): Remove.
3596 (reg-tilegx32.c): Remove.
3598 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3600 * Makefile.in (SFILES): Add "common/environ.c".
3601 (OBJS): Add "common/environ.h".
3603 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3605 * configure.ac: Check if the fs_base and gs_base members of
3606 `struct user_regs_struct' exist.
3607 * config.in: Regenerated.
3608 * configure: Likewise.
3610 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3612 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3614 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3615 (get_next_pcs_syscall_next_pc): Likewise.
3617 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3619 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3620 * nto-x86-low.c: Likewise.
3622 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3624 * Makefile.in: Include disable-implicit-rules.mk.
3626 2016-11-23 Pedro Alves <palves@redhat.com>
3628 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3629 (debug_vprintf): Use std::chrono::steady_clock instead of
3630 gettimeofday. Use '.' instead of ':'.
3631 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3632 (get_timestamp): Use std::chrono::steady_clock instead of
3635 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3637 * Makefile.in: Fix whitespace formatting.
3639 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3641 * Makefile.in (SFILES, OBS): Flatten list and order
3644 2016-11-23 Pedro Alves <palves@redhat.com>
3646 * event-loop.c (handle_file_event): Use warning.
3647 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3648 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3651 2016-11-23 Pedro Alves <palves@redhat.com>
3653 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3655 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3656 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3657 debug_printf and debug_flush for debug output.
3658 * server.c (handle_general_set): Likewise.
3659 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3662 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3664 * Makefile.in (.c.o): Replace rule with ...
3665 (%.o: %.c): ... this one.
3667 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3669 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3670 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3672 * configure.ac: Remove checks for the make program.
3673 * configure: Re-generate.
3675 2016-10-28 Pedro Alves <palves@redhat.com>
3677 * Makefile.in (CXX_DIALECT): Get from configure.
3678 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3679 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3680 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3681 * config.in: Regenerate.
3682 * configure: Regenerate.
3684 2016-10-27 Yao Qi <yao.qi@linaro.org>
3686 * linux-low.c (linux_supports_range_stepping): Return true if
3687 can_software_single_step return true.
3689 2016-10-27 Yao Qi <yao.qi@linaro.org>
3691 * inferiors.c (find_inferior_in_random): New function.
3692 * inferiors.h (find_inferior_in_random): Declare.
3693 * linux-low.c (linux_wait_for_event_filtered): Call
3694 find_inferior_in_random instead of find_inferior.
3696 2016-10-27 Yao Qi <yao.qi@linaro.org>
3698 * linux-low.c (linux_wait_1): If single-step breakpoints are
3699 inserted, remove them.
3701 2016-10-26 Pedro Alves <palves@redhat.com>
3703 * linux-low.c (handle_extended_wait): Link parent/child fork
3705 (linux_wait_1): Unlink them.
3706 (linux_set_resume_request): Ignore resume requests for
3707 already-resumed and unhandled fork child threads.
3708 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3709 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3711 (handle_v_requests) <vCont>: Don't call require_running.
3712 * server.h (in_queued_stop_replies): New declaration.
3714 2016-10-24 Yao Qi <yao.qi@linaro.org>
3717 * linux-aarch64-low.c (append_insns): Cast the return value to
3720 2016-10-10 Yao Qi <yao.qi@linaro.org>
3722 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3724 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3726 * target.c (target_supports_multi_process): New function, moved
3728 * target.h (target_supports_multi_process): ... here. Remove
3731 2016-10-05 Tom Tromey <tom@tromey.com>
3734 * tracepoint.c (handle_tracepoint_bkpts): Check
3735 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3737 2016-10-05 Yao Qi <yao.qi@linaro.org>
3739 * configure.srv: Update the path of arm-*.xml files.
3741 2016-10-05 Terry Guo <terry.guo@arm.com>
3742 Yao Qi <yao.qi@linaro.org>
3744 * Makefile.in: Adjust the path of rules.
3745 * configure.srv: Update the path of xml files.
3746 * regformats/arm-with-iwmmxt.dat: Regenerated.
3747 * regformats/arm-with-neon.dat: Likewise.
3748 * regformats/arm-with-vfpv2.dat: Likewise.
3749 * regformats/arm-with-vfpv3.dat Likewise.
3751 2016-09-30 Yao Qi <yao.qi@linaro.org>
3754 * target.c (target_stop_and_wait): Don't call
3755 target_continue_no_signal, use resume_stop instead.
3757 2016-09-26 Yao Qi <yao.qi@linaro.org>
3759 * linux-low.c (linux_wait_1): Call debug_exit.
3761 2016-09-23 Pedro Alves <palves@redhat.com>
3763 * Makefile.in (SFILES): Add common/new-op.c.
3764 (OBS): Add common/new-op.o.
3765 (new-op.o): New rule.
3767 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3769 * .gitinore: Ignore more files.
3771 2016-09-21 Yao Qi <yao.qi@linaro.org>
3773 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3776 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3778 * server.c (start_inferior): Call target_mourn_inferior instead of
3779 mourn_inferior; pass ptid_t argument to it.
3781 (handle_target_event): Likewise.
3782 * target.c (target_mourn_inferior): New function.
3783 * target.h (mourn_inferior): Delete macro.
3785 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3787 * linux-low.c (lwp_is_stepping): New function.
3789 2016-09-06 Carl Love <cel@us.ibm.com>
3791 * server.c (start_inferior): Fixed comment, requested comment change
3792 didn't get updated correctly. Removed reference to ptrace () call as
3793 it is only true on Linux systems.
3795 2016-09-06 Carl Love <cel@us.ibm.com>
3797 * server.c (start_inferior): Do not call
3798 function target_post_create_inferior () if the
3799 inferior process has already exited.
3801 2016-09-05 Pedro Alves <palves@redhat.com>
3803 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3804 (COMPILE.pre, CC_LD): Use CXX directly.
3805 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3806 * acinclude.m4: Don't include build-with-cxx.m4.
3807 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3808 * configure: Regenerate.
3810 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3813 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3814 call writing data to own_buf.
3816 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3818 * target.c (mywait): Call target_wait instead of
3820 (target_wait): New function.
3822 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3824 * server.c (start_inferior): New variable 'ptid'. Replace calls
3825 to the_target->resume by target_continue{,_no_signal}, depending
3827 * target.c (target_stop_and_wait): Call target_continue_no_signal
3828 instead of the_target->resume.
3829 (target_continue): New function.
3831 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3833 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3835 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3838 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3840 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3841 * linux-arm-low.c (ps_get_thread_area): Likewise.
3842 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3843 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3844 * linux-mips-low.c (ps_get_thread_area): Likewise.
3845 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3846 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3847 * linux-x86-low.c (ps_get_thread_area): Likewise.
3848 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3850 2016-08-19 Pedro Alves <palves@redhat.com>
3852 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3854 2016-08-19 Pedro Alves <palves@redhat.com>
3856 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3857 comment. Use memcpy instead of casting through unsigned long.
3859 2016-08-19 Pedro Alves <palves@redhat.com>
3861 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3862 allocating around 0x80000000.
3864 2016-08-19 Pedro Alves <palves@redhat.com>
3867 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3868 (x32-avx512-linux-ipa.o): New rules.
3869 * configure.ac (x86_64-*-linux*): New x32 check.
3870 * configure.srv (ipa_x32_linux_regobj): New.
3871 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3872 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3874 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3876 * configure: Regenerate.
3878 2016-08-09 Pedro Alves <palves@redhat.com>
3881 * Makefile.in (OBS): Add signals-state-save-restore.o.
3882 (signals-state-save-restore.o): New rule.
3883 * config.in: Regenerate.
3884 * configure: Regenerate.
3885 * linux-low.c: Include "signals-state-save-restore.h".
3886 (linux_create_inferior): Call
3887 restore_original_signals_state.
3888 * server.c: Include "dispositions-save-restore.h".
3889 (captured_main): Call save_original_signals_state.
3891 2016-08-05 Pedro Alves <palves@redhat.com>
3893 * configure: Regenerate.
3895 2016-08-04 Yao Qi <yao.qi@linaro.org>
3897 * linux-low.c (regsets_fetch_inferior_registers): Check
3898 errno is ESRCH or not.
3900 2016-08-02 Yao Qi <yao.qi@linaro.org>
3902 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3903 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3904 (thread_db_load_search): Update.
3905 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3906 td_ta_set_event and td_ta_event_getmsg.
3908 2016-07-26 Pedro Alves <palves@redhat.com>
3911 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3912 of unsigned long for 64-bit registers and use uint32_t instead of
3913 unsigned int for 32-bit registers.
3915 2016-07-26 Pedro Alves <palves@redhat.com>
3917 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3920 2016-07-21 Tom Tromey <tom@tromey.com>
3922 * configure: Rebuild.
3924 2016-07-21 Yao Qi <yao.qi@linaro.org>
3926 * mem-break.c (find_gdb_breakpoint): Cast bp to
3927 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3929 2016-07-21 Yao Qi <yao.qi@linaro.org>
3931 * server.c (handle_v_requests): Support s and S actions
3932 if target_supports_software_single_step return true.
3934 2016-07-21 Yao Qi <yao.qi@linaro.org>
3936 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3937 is resume_step, call maybe_hw_step.
3938 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3940 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3942 (proceed_one_lwp): If resume request is resume_step, install
3943 reinsert breakpoints and call maybe_hw_step.
3945 2016-07-21 Yao Qi <yao.qi@linaro.org>
3947 * linux-low.c (proceed_one_lwp): Declare.
3948 (linux_resume_one_thread): Remove local variable 'step'.
3949 Lift code enqueue signal. Call proceed_one_lwp instead of
3950 linux_resume_one_lwp.
3952 2016-07-21 Yao Qi <yao.qi@linaro.org>
3954 * linux-low.c (linux_resume_one_thread): Call
3955 enqueue_pending_signal.
3957 2016-07-21 Yao Qi <yao.qi@linaro.org>
3959 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3960 * inferiors.c (do_restore_current_thread_cleanup): New function.
3961 (make_cleanup_restore_current_thread): Likewise.
3962 * linux-low.c (install_software_single_step_breakpoints): Call
3963 make_cleanup_restore_current_thread. Switch current_thread to
3966 2016-07-21 Yao Qi <yao.qi@linaro.org>
3968 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3969 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3970 (clone_one_breakpoint): Likewise.
3971 (delete_reinsert_breakpoints): Change parameter to thread.
3973 (has_reinsert_breakpoints): Likewise.
3974 (uninsert_reinsert_breakpoints): Likewise.
3975 (reinsert_reinsert_breakpoints): Likewise.
3976 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3977 (delete_reinsert_breakpoints): Likewise.
3978 (reinsert_reinsert_breakpoints): Likewise.
3979 (uninsert_reinsert_breakpoints): Likewise.
3980 (has_reinsert_breakpoints): Likewise.
3982 2016-07-21 Yao Qi <yao.qi@linaro.org>
3984 * inferiors.c (get_thread_process): Make parameter const.
3985 * inferiors.h (get_thread_process): Update declaration.
3986 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3987 Add new parameters child_thread and parent_thread. Callers
3989 * mem-break.h (clone_all_breakpoints): Update declaration.
3991 2016-07-21 Yao Qi <yao.qi@linaro.org>
3993 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3994 <command_list, handler>: Remove.
3995 (struct gdb_breakpoint): New.
3996 (struct other_breakpoint): New.
3997 (struct reinsert_breakpoint): New.
3998 (is_gdb_breakpoint): New function.
3999 (any_persistent_commands): Update command_list if
4000 is_gdb_breakpoint returns true.
4001 (set_breakpoint): Create breakpoints according to their types.
4002 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4003 (set_gdb_breakpoint_1): Likewise.
4004 (set_gdb_breakpoint): Likewise.
4005 (clear_breakpoint_conditions): Change parameter type to
4006 'struct gdb_breakpoint *'.
4007 (clear_breakpoint_commands): Likewise.
4008 (clear_breakpoint_conditions_and_commands): Likewise.
4009 (add_condition_to_breakpoint): Likewise.
4010 (add_breakpoint_condition): Likewise.
4011 (add_commands_to_breakpoint): Likewise.
4012 (check_breakpoints): Check other_breakpoint.
4013 (clone_one_breakpoint): Clone breakpopint according to its type.
4014 * mem-break.h (struct gdb_breakpoint): Declare.
4015 (set_gdb_breakpoint): Update declaration.
4016 (clear_breakpoint_conditions_and_commands): Likewise.
4017 (add_breakpoint_condition): Likewise.
4018 (add_breakpoint_commands): Likewise.
4019 * server.c (process_point_options): Change parameter type to
4020 'struct gdb_breakpoint *'.
4022 2016-07-21 Yao Qi <yao.qi@linaro.org>
4024 * mem-break.c (set_breakpoint_at): Rename it to ...
4025 (set_breakpoint_type_at): ... it.
4026 (set_breakpoint_at): Call set_breakpoint_type_at.
4027 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4028 * mem-break.h (set_breakpoint_at): Update comments.
4030 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4032 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4034 (nios2_store_gregset): Likewise.
4036 2016-07-01 Pedro Alves <palves@redhat.com>
4037 Antoine Tremblay <antoine.tremblay@ericsson.com>
4039 * linux-low.c: Change interface to take the target lwp_info
4040 pointer directly and return void. Handle detaching from a zombie
4042 (linux_detach_lwp_callback): New function.
4043 (linux_detach): Detach from the leader thread after detaching from
4046 2016-06-28 Yao Qi <yao.qi@linaro.org>
4048 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4049 for variable new_offset.
4050 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4051 (aarch64_ftrace_insn_reloc_cb): Likewise.
4052 (aarch64_ftrace_insn_reloc_tb): Likewise.
4053 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4054 PRIx64 instead of PRIx32.
4056 2016-06-28 Yao Qi <yao.qi@linaro.org>
4058 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4059 (the_low_target): Install arm_get_syscall_trapinfo.
4061 2016-06-28 Yao Qi <yao.qi@linaro.org>
4063 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4065 (the_low_target): Install aarch64_get_syscall_trapinfo.
4067 2016-06-28 Yao Qi <yao.qi@linaro.org>
4069 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4071 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4072 Remove parameter sysno.
4073 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4076 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4078 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4079 (s390_emit_ne_goto): Likewise.
4080 (s390_emit_lt_goto): Likewise.
4081 (s390_emit_le_goto): Likewise.
4082 (s390_emit_gt_goto): Likewise.
4083 (s390_emit_ge_goto): Likewise.
4084 (s390x_emit_eq_goto): Likewise.
4085 (s390x_emit_ne_goto): Likewise.
4086 (s390x_emit_lt_goto): Likewise.
4087 (s390x_emit_le_goto): Likewise.
4088 (s390x_emit_gt_goto): Likewise.
4089 (s390x_emit_ge_goto): Likewise.
4090 (s390_emit_ops_impl): Mark variable static.
4091 (s390x_emit_ops): Likewise.
4093 2016-06-17 Yao Qi <yao.qi@linaro.org>
4095 * linux-low.c (handle_extended_wait): Call
4096 uninsert_reinsert_breakpoints for the parent process. Remove
4097 reinsert breakpoints from the child process. Reinsert them to
4098 the parent process when vfork is done.
4099 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4100 (reinsert_reinsert_breakpoints): New function.
4101 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4102 (reinsert_reinsert_breakpoints): Declare.
4104 2016-06-17 Yao Qi <yao.qi@linaro.org>
4106 * linux-low.c (handle_extended_wait): If the parent is doing
4107 step-over, remove the reinsert breakpoints from the forked child.
4109 2016-06-17 Yao Qi <yao.qi@linaro.org>
4111 * linux-low.c (unsuspend_all_lwps): Declare.
4112 (linux_low_filter_event): If thread exited, call finish_step_over.
4113 If step-over is finished, unsuspend other threads.
4115 2016-06-17 Yao Qi <yao.qi@linaro.org>
4117 * linux-low.c (linux_resume_one_lwp_throw): Assert
4118 has_reinsert_breakpoints returns false.
4119 * mem-break.c (delete_disabled_breakpoints): Assert
4120 bp type isn't reinsert_breakpoint.
4122 2016-06-17 Yao Qi <yao.qi@linaro.org>
4124 * linux-low.c (maybe_hw_step): New function.
4125 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4126 (finish_step_over): Switch current_thread to lwp temporarily,
4127 and assert has_reinsert_breakpoints returns true.
4128 (proceed_one_lwp): Call maybe_hw_step.
4129 * mem-break.c (has_reinsert_breakpoints): New function.
4130 * mem-break.h (has_reinsert_breakpoints): Declare.
4132 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4134 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4136 2016-05-17 Yao Qi <yao.qi@linaro.org>
4138 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4139 instead of find_inferior.
4141 2016-05-05 Yao Qi <yao.qi@linaro.org>
4143 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4144 Initialize res to zero.
4146 2016-05-05 Yao Qi <yao.qi@linaro.org>
4148 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4151 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4153 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4154 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4155 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4157 2016-04-28 Par Olsson <par.olsson@windriver.com>
4158 Simon Marchi <simon.marchi@ericsson.com>
4160 * tracepoint.c (write_inferior_int8): New function.
4161 (cmd_qtenable_disable): Write enable flag using
4162 write_inferior_int8.
4164 2016-04-25 Yao Qi <yao.qi@linaro.org>
4166 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4167 (need_step_over_p): Return zero if the LWP has pending signals
4168 can be delivered on software single step target.
4170 2016-04-25 Yao Qi <yao.qi@linaro.org>
4172 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4173 return instead of error.
4175 2016-04-22 Yao Qi <yao.qi@linaro.org>
4177 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4180 2016-04-22 Yao Qi <yao.qi@linaro.org>
4182 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4183 signal when stepping over breakpoint with software single
4186 2016-04-21 Pedro Alves <palves@redhat.com>
4188 * linux-s390-low.c (s390_collect_ptrace_register)
4189 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4191 (s390_check_regset): Use void * instead of gdb_byte *.
4193 2016-04-20 Pedro Alves <palves@redhat.com>
4195 * configure: Renegerate.
4197 2016-04-20 Yao Qi <yao.qi@linaro.org>
4199 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4200 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4202 (arm_store_gregset): Likewise.
4204 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4206 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4207 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4208 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4209 (amd64-avx-mpx-linux.c): New rules.
4210 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4211 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4212 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4213 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4214 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4215 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4216 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4217 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4218 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4219 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4220 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4221 * linux-x86-low.c (x86_linux_read_description): Add case for
4222 X86_XSTATE_AVX_MPX_MASK.
4223 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4224 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4225 init_registers_i386_avx_mpx_linux.
4226 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4227 (initialize_low_tracepoint): Call
4228 init_registers_i386_avx_mpx_linux.
4229 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4230 (initialize_low_tracepoint): Call
4231 init_registers_amd64_avx_mpx_linux.
4232 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4233 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4234 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4237 2016-04-18 Pedro Alves <palves@redhat.com>
4239 * configure: Regenerate.
4241 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4243 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4244 (aarch64_emit_sub): Likewise.
4246 2016-04-12 Pedro Alves <palves@redhat.com>
4248 * utils.c (prepare_to_throw_exception): Delete.
4250 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4252 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4254 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4256 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4258 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4260 * linux-aarch64-ipa.c: Add <elf.h> include.
4261 * linux-ppc-ipa.c: Add <elf.h> include.
4262 * linux-s390-ipa.c: Add <elf.h> include.
4264 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4266 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4267 (get_raw_reg_ptr): Likewise.
4268 (get_trace_state_variable_value_ptr): Likewise.
4269 (set_trace_state_variable_value_ptr): Likewise.
4270 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4273 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4274 Marcin Kościelnicki <koriakin@0x04.net>
4277 * linux-ppc-low.c (emit_insns): New function.
4278 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4279 (ppc_emit_prologue): New function.
4280 (ppc_emit_epilogue): New function.
4281 (ppc_emit_add): New function.
4282 (ppc_emit_sub): New function.
4283 (ppc_emit_mul): New function.
4284 (ppc_emit_lsh): New function.
4285 (ppc_emit_rsh_signed): New function.
4286 (ppc_emit_rsh_unsigned): New function.
4287 (ppc_emit_ext): New function.
4288 (ppc_emit_zero_ext): New function.
4289 (ppc_emit_log_not): New function.
4290 (ppc_emit_bit_and): New function.
4291 (ppc_emit_bit_or): New function.
4292 (ppc_emit_bit_xor): New function.
4293 (ppc_emit_bit_not): New function.
4294 (ppc_emit_equal): New function.
4295 (ppc_emit_less_signed): New function.
4296 (ppc_emit_less_unsigned): New function.
4297 (ppc_emit_ref): New function.
4298 (ppc_emit_const): New function.
4299 (ppc_emit_reg): New function.
4300 (ppc_emit_pop): New function.
4301 (ppc_emit_stack_flush): New function.
4302 (ppc_emit_swap): New function.
4303 (ppc_emit_stack_adjust): New function.
4304 (ppc_emit_call): New function.
4305 (ppc_emit_int_call_1): New function.
4306 (ppc_emit_void_call_2): New function.
4307 (ppc_emit_if_goto): New function.
4308 (ppc_emit_goto): New function.
4309 (ppc_emit_eq_goto): New function.
4310 (ppc_emit_ne_goto): New function.
4311 (ppc_emit_lt_goto): New function.
4312 (ppc_emit_le_goto): New function.
4313 (ppc_emit_gt_goto): New function.
4314 (ppc_emit_ge_goto): New function.
4315 (ppc_write_goto_address): New function.
4316 (ppc_emit_ops_impl): New static variable.
4317 (ppc64v1_emit_prologue): New function.
4318 (ppc64v2_emit_prologue): New function.
4319 (ppc64_emit_epilogue): New function.
4320 (ppc64_emit_add): New function.
4321 (ppc64_emit_sub): New function.
4322 (ppc64_emit_mul): New function.
4323 (ppc64_emit_lsh): New function.
4324 (ppc64_emit_rsh_signed): New function.
4325 (ppc64_emit_rsh_unsigned): New function.
4326 (ppc64_emit_ext): New function.
4327 (ppc64_emit_zero_ext): New function.
4328 (ppc64_emit_log_not): New function.
4329 (ppc64_emit_bit_and): New function.
4330 (ppc64_emit_bit_or): New function.
4331 (ppc64_emit_bit_xor): New function.
4332 (ppc64_emit_bit_not): New function.
4333 (ppc64_emit_equal): New function.
4334 (ppc64_emit_less_signed): New function.
4335 (ppc64_emit_less_unsigned): New function.
4336 (ppc64_emit_ref): New function.
4337 (ppc64_emit_const): New function.
4338 (ppc64v1_emit_reg): New function.
4339 (ppc64v2_emit_reg): New function.
4340 (ppc64_emit_pop): New function.
4341 (ppc64_emit_stack_flush): New function.
4342 (ppc64_emit_swap): New function.
4343 (ppc64v1_emit_call): New function.
4344 (ppc64v2_emit_call): New function.
4345 (ppc64v1_emit_int_call_1): New function.
4346 (ppc64v2_emit_int_call_1): New function.
4347 (ppc64v1_emit_void_call_2): New function.
4348 (ppc64v2_emit_void_call_2): New function.
4349 (ppc64_emit_if_goto): New function.
4350 (ppc64_emit_eq_goto): New function.
4351 (ppc64_emit_ne_goto): New function.
4352 (ppc64_emit_lt_goto): New function.
4353 (ppc64_emit_le_goto): New function.
4354 (ppc64_emit_gt_goto): New function.
4355 (ppc64_emit_ge_goto): New function.
4356 (ppc64v1_emit_ops_impl): New static variable.
4357 (ppc64v2_emit_ops_impl): New static variable.
4358 (ppc_emit_ops): New function.
4359 (linux_low_target): Wire in ppc_emit_ops.
4361 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4362 Marcin Kościelnicki <koriakin@0x04.net>
4365 * Makefile.in: Add powerpc-*-ipa.o
4366 * configure.srv: Add ipa_obj for powerpc*-linux.
4367 * linux-ppc-ipa.c: New file.
4368 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4370 (PPC_FIELD): New macro.
4371 (PPC_SEXT): New macro.
4372 (PPC_OP6): New macro.
4373 (PPC_BO): New macro.
4374 (PPC_LI): New macro.
4375 (PPC_BD): New macro.
4376 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4377 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4378 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4379 (ppc_get_thread_area): New function.
4380 (is_elfv2_inferior): New function.
4381 (gen_ds_form): New function.
4382 (GEN_STD): New macro.
4383 (GEN_STDU): New macro.
4384 (GEN_LD): New macro.
4385 (GEN_LDU): New macro.
4386 (gen_d_form): New function.
4387 (GEN_ADDI): New macro.
4388 (GEN_ADDIS): New macro.
4389 (GEN_LI): New macro.
4390 (GEN_LIS): New macro.
4391 (GEN_ORI): New macro.
4392 (GEN_ORIS): New macro.
4393 (GEN_LWZ): New macro.
4394 (GEN_STW): New macro.
4395 (GEN_STWU): New macro.
4396 (gen_xfx_form): New function.
4397 (GEN_MFSPR): New macro.
4398 (GEN_MTSPR): New macro.
4399 (GEN_MFCR): New macro.
4400 (GEN_MTCR): New macro.
4401 (GEN_SYNC): New macro.
4402 (GEN_LWSYNC): New macro.
4403 (gen_x_form): New function.
4404 (GEN_OR): New macro.
4405 (GEN_MR): New macro.
4406 (GEN_LWARX): New macro.
4407 (GEN_STWCX): New macro.
4408 (GEN_CMPW): New macro.
4409 (gen_md_form): New function.
4410 (GEN_RLDICL): New macro.
4411 (GEN_RLDICR): New macro.
4412 (gen_i_form): New function.
4414 (GEN_BL): New macro.
4415 (gen_b_form): New function.
4416 (GEN_BNE): New macro.
4417 (GEN_LOAD): New macro.
4418 (GEN_STORE): New macro.
4419 (gen_limm): New function.
4420 (gen_atomic_xchg): New function.
4421 (gen_call): New function.
4422 (ppc_relocate_instruction): New function.
4423 (ppc_install_fast_tracepoint_jump_pad): New function.
4424 (ppc_get_min_fast_tracepoint_insn_len): New function.
4425 (ppc_get_ipa_tdesc_idx): New function.
4426 (the_low_target): Wire in the new functions.
4427 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4429 * linux-ppc-tdesc.h: New file.
4431 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4433 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4434 (alloc_jump_pad_buffer): New function.
4435 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4436 (alloc_jump_pad_buffer): New function.
4437 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4438 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4439 (alloc_jump_pad_buffer): New function.
4440 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4441 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4442 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4443 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4445 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4447 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4448 * linux-amd64-ipa.c: Likewise.
4449 * linux-i386-ipa.c: Likewise.
4450 * linux-s390-ipa.c: Likewise.
4451 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4452 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4453 set_trace_state_variable_value_ptr.
4454 (struct ipa_sym_addresses): Likewise.
4455 (symbol_list): Likewise.
4456 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4457 accessing gdb_collect directly.
4458 (gdb_collect_ptr_type): New typedef.
4459 (get_raw_reg_ptr_type): New typedef.
4460 (get_trace_state_variable_value_ptr_type): New typedef.
4461 (set_trace_state_variable_value_ptr_type): New typedef.
4462 (gdb_collect_ptr): New global.
4463 (get_raw_reg_ptr): New global.
4464 (get_trace_state_variable_value_ptr): New global.
4465 (set_trace_state_variable_value_ptr): New global.
4466 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4467 accessing get_raw_reg directly.
4468 (get_get_tsv_func_addr): Likewise for
4469 get_trace_state_variable_value_ptr.
4470 (get_set_tsv_func_addr): Likewise for
4471 set_trace_state_variable_value_ptr.
4472 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4474 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4476 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4478 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4480 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4482 (relocate_instruction): Remove own_buf.
4483 * server.c (own_buf): Make global.
4484 (handle_v_requests): Make global.
4485 * server.h (own_buf): New declaration.
4486 (handle_v_requests): New prototype.
4488 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4491 * linux-s390-low.c (add_insns): New function.
4492 (s390_emit_prologue): New function.
4493 (s390_emit_epilogue): New function.
4494 (s390_emit_add): New function.
4495 (s390_emit_sub): New function.
4496 (s390_emit_mul): New function.
4497 (s390_emit_lsh): New function.
4498 (s390_emit_rsh_signed): New function.
4499 (s390_emit_rsh_unsigned): New function.
4500 (s390_emit_ext): New function.
4501 (s390_emit_log_not): New function.
4502 (s390_emit_bit_and): New function.
4503 (s390_emit_bit_or): New function.
4504 (s390_emit_bit_xor): New function.
4505 (s390_emit_bit_not): New function.
4506 (s390_emit_equal): New function.
4507 (s390_emit_less_signed): New function.
4508 (s390_emit_less_unsigned): New function.
4509 (s390_emit_ref): New function.
4510 (s390_emit_if_goto): New function.
4511 (s390_emit_goto): New function.
4512 (s390_write_goto_address): New function.
4513 (s390_emit_litpool): New function.
4514 (s390_emit_const): New function.
4515 (s390_emit_call): New function.
4516 (s390_emit_reg): New function.
4517 (s390_emit_pop): New function.
4518 (s390_emit_stack_flush): New function.
4519 (s390_emit_zero_ext): New function.
4520 (s390_emit_swap): New function.
4521 (s390_emit_stack_adjust): New function.
4522 (s390_emit_set_r2): New function.
4523 (s390_emit_int_call_1): New function.
4524 (s390_emit_void_call_2): New function.
4525 (s390_emit_eq_goto): New function.
4526 (s390_emit_ne_goto): New function.
4527 (s390_emit_lt_goto): New function.
4528 (s390_emit_le_goto): New function.
4529 (s390_emit_gt_goto): New function.
4530 (s390_emit_ge_goto): New function.
4531 (s390x_emit_prologue): New function.
4532 (s390x_emit_epilogue): New function.
4533 (s390x_emit_add): New function.
4534 (s390x_emit_sub): New function.
4535 (s390x_emit_mul): New function.
4536 (s390x_emit_lsh): New function.
4537 (s390x_emit_rsh_signed): New function.
4538 (s390x_emit_rsh_unsigned): New function.
4539 (s390x_emit_ext): New function.
4540 (s390x_emit_log_not): New function.
4541 (s390x_emit_bit_and): New function.
4542 (s390x_emit_bit_or): New function.
4543 (s390x_emit_bit_xor): New function.
4544 (s390x_emit_bit_not): New function.
4545 (s390x_emit_equal): New function.
4546 (s390x_emit_less_signed): New function.
4547 (s390x_emit_less_unsigned): New function.
4548 (s390x_emit_ref): New function.
4549 (s390x_emit_if_goto): New function.
4550 (s390x_emit_const): New function.
4551 (s390x_emit_call): New function.
4552 (s390x_emit_reg): New function.
4553 (s390x_emit_pop): New function.
4554 (s390x_emit_stack_flush): New function.
4555 (s390x_emit_zero_ext): New function.
4556 (s390x_emit_swap): New function.
4557 (s390x_emit_stack_adjust): New function.
4558 (s390x_emit_int_call_1): New function.
4559 (s390x_emit_void_call_2): New function.
4560 (s390x_emit_eq_goto): New function.
4561 (s390x_emit_ne_goto): New function.
4562 (s390x_emit_lt_goto): New function.
4563 (s390x_emit_le_goto): New function.
4564 (s390x_emit_gt_goto): New function.
4565 (s390x_emit_ge_goto): New function.
4566 (s390_emit_ops): New function.
4567 (struct linux_target_ops): Fill in emit_ops hook.
4569 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4572 * Makefile.in: Add s390 IPA files.
4573 * configure.srv: Build IPA for s390.
4574 * linux-s390-ipa.c: New file.
4575 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4576 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4577 (tdesc_s390_linux32): Likewise.
4578 (init_registers_s390_linux32v1): Likewise.
4579 (tdesc_s390_linux32v1): Likewise.
4580 (init_registers_s390_linux32v2): Likewise.
4581 (tdesc_s390_linux32v2): Likewise.
4582 (init_registers_s390_linux64): Likewise.
4583 (tdesc_s390_linux64): Likewise.
4584 (init_registers_s390_linux64v1): Likewise.
4585 (tdesc_s390_linux64v1): Likewise.
4586 (init_registers_s390_linux64v2): Likewise.
4587 (tdesc_s390_linux64v2): Likewise.
4588 (init_registers_s390_te_linux64): Likewise.
4589 (tdesc_s390_te_linux64): Likewise.
4590 (init_registers_s390_vx_linux64): Likewise.
4591 (tdesc_s390_vx_linux64): Likewise.
4592 (init_registers_s390_tevx_linux64): Likewise.
4593 (tdesc_s390_tevx_linux64): Likewise.
4594 (init_registers_s390x_linux64): Likewise.
4595 (tdesc_s390x_linux64): Likewise.
4596 (init_registers_s390x_linux64v1): Likewise.
4597 (tdesc_s390x_linux64v1): Likewise.
4598 (init_registers_s390x_linux64v2): Likewise.
4599 (tdesc_s390x_linux64v2): Likewise.
4600 (init_registers_s390x_te_linux64): Likewise.
4601 (tdesc_s390x_te_linux64): Likewise.
4602 (init_registers_s390x_vx_linux64): Likewise.
4603 (tdesc_s390x_vx_linux64): Likewise.
4604 (init_registers_s390x_tevx_linux64): Likewise.
4605 (tdesc_s390x_tevx_linux64): Likewise.
4606 (have_hwcap_s390_vx): New static variable.
4607 (s390_arch_setup): Fill have_hwcap_s390_vx.
4608 (s390_get_thread_area): New function.
4609 (s390_ft_entry_gpr_esa): New const.
4610 (s390_ft_entry_gpr_zarch): New const.
4611 (s390_ft_entry_misc): New const.
4612 (s390_ft_entry_fr): New const.
4613 (s390_ft_entry_vr): New const.
4614 (s390_ft_main_31): New const.
4615 (s390_ft_main_64): New const.
4616 (s390_ft_exit_fr): New const.
4617 (s390_ft_exit_vr): New const.
4618 (s390_ft_exit_misc): New const.
4619 (s390_ft_exit_gpr_esa): New const.
4620 (s390_ft_exit_gpr_zarch): New const.
4621 (append_insns): New function.
4622 (s390_relocate_instruction): New function.
4623 (s390_install_fast_tracepoint_jump_pad): New function.
4624 (s390_get_min_fast_tracepoint_insn_len): New function.
4625 (s390_get_ipa_tdesc_idx): New function.
4626 (struct linux_target_ops): Wire in the above functions.
4627 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4628 * linux-s390-tdesc.h: New file.
4630 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4632 * linux-s390-low.c (s390_supports_tracepoints): New function.
4633 (struct linux_target_ops): Fill supports_tracepoints hook.
4635 2016-03-18 Yao Qi <yao.qi@linaro.org>
4637 * linux-low.c (lwp_signal_can_be_delivered): New function.
4638 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4640 2016-03-18 Yao Qi <yao.qi@linaro.org>
4642 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4643 0 if signal is enqueued. Remove 'signal' from one debugging
4644 message. Move one debugging message to some lines below.
4645 Remove code setting 'signal' to 0.
4647 2016-03-18 Yao Qi <yao.qi@linaro.org>
4649 * linux-low.c (linux_low_filter_event): Remove redundant
4650 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4652 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4654 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4655 (struct linux_target_ops): Wire in the above.
4657 2016-03-03 Yao Qi <yao.qi@linaro.org>
4659 * linux-low.c: Update comments to start_step_over.
4661 2016-03-03 Yao Qi <yao.qi@linaro.org>
4664 * linux-low.c (handle_extended_wait): Set child suspended
4665 if event_lwp->bp_reinsert isn't zero.
4667 2016-03-02 Yao Qi <yao.qi@linaro.org>
4669 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4670 enqueue_pending_signal.
4672 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4674 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4677 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4679 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4680 (s390_regmap_3264) [!__s390x__]: New global.
4681 (s390_collect_ptrace_register): Skip map entries containing -1.
4682 (s390_supply_ptrace_register): Ditto.
4683 (s390_fill_gprs_high): New function.
4684 (s390_store_gprs_high): New function.
4685 (s390_regsets): Add NT_S390_HIGH_GPRS.
4686 (s390_get_hwcap): Enable on 31-bit.
4687 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4688 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4689 Detect NT_S390_HIGH_GPRS.
4690 (s390_usrregs_info_3264): Enable on 31-bit.
4691 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4692 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4694 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4697 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4698 * configure.srv: Ditto.
4699 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4700 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4701 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4702 (init_registers_amd64_linux): Remove prototype.
4703 (tdesc_amd64_linux): Remove declaration.
4704 (get_ipa_tdesc): New function.
4705 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4706 initialize remaining tdescs.
4707 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4708 (init_registers_i386_linux): Remove prototype.
4709 (tdesc_i386_linux): Remove declaration.
4710 (get_ipa_tdesc): New function.
4711 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4712 initialize remaining tdescs.
4713 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4714 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4715 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4716 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4717 (x86_get_ipa_tdesc_idx): New function.
4718 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4719 * linux-x86-tdesc.h: New file.
4720 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4721 (target_get_ipa_tdesc_idx): New macro.
4722 * tracepoint.c (ipa_tdesc_idx): New macro.
4723 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4724 (symbol_list): Add ipa_tdesc_idx.
4725 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4726 (ipa_tdesc): Remove.
4727 (ipa_tdesc_idx): New variable.
4728 (get_context_regcache): Use get_ipa_tdesc.
4729 (gdb_collect): Ditto.
4731 * tracepoint.h (get_ipa_tdesc): New prototype.
4732 (ipa_tdesc): Remove.
4734 2016-02-24 Pedro Alves <palves@redhat.com>
4736 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4737 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4738 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4739 Factor out common code between the USE_SIGTRAP_SIGINFO and
4740 !USE_SIGTRAP_SIGINFO blocks.
4741 (linux_low_filter_event): Call save_stop_reason instead of
4742 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4744 (linux_wait_1): Update comments.
4746 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4748 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4749 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4750 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4751 ppc_insert_point, ppc_remove_point.
4753 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4755 * linux-s390-low.c (s390_supports_z_point_type): New function.
4756 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4758 2016-02-16 Yao Qi <yao.qi@linaro.org>
4760 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4761 PC. Get pc from regcache_read_pc.
4763 2016-02-12 Yao Qi <yao.qi@linaro.org>
4765 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4766 or linux_get_pc_32bit.
4767 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4769 2016-02-12 Yao Qi <yao.qi@linaro.org>
4771 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4772 arm_linux_get_next_pcs_fixup.
4774 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4776 * tracepoint.c (x_tracepoint_action_download): Change
4777 write_inferior_data_ptr to write_inferior_data_pointer.
4778 (cmd_qtstart): Likewise.
4779 (write_inferior_data_ptr): Remove.
4780 (download_agent_expr): Change write_inferior_data_ptr to
4781 write_inferior_data_pointer.
4782 (download_tracepoint_1): Likewise.
4783 (download_tracepoint): Likewise.
4784 (download_trace_state_variables): Likewise.
4786 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4787 Marcin Kościelnicki <koriakin@0x04.net>
4789 * tracepoint.c (struct tracepoint_action_ops): Remove.
4790 (struct tracepoint_action): Remove ops.
4791 (m_tracepoint_action_download, r_tracepoint_action_download)
4792 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4793 size and offset accordingly.
4794 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4795 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4796 (tracepoint_action_send, tracepoint_action_download): New functions.
4797 Helpers for trace action handlers.
4798 (add_tracepoint_action): Remove setup actions ops.
4799 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4801 2016-02-10 Yao Qi <yao.qi@linaro.org>
4803 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4805 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4807 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4809 * configure: Regenerate.
4811 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4813 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4814 void * to gdb_byte *.
4815 * linux-low.c (siginfo_fixup): Likewise.
4816 (linux_xfer_siginfo): Likewise.
4817 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4819 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4821 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4823 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4825 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4827 * linux-x86-low.c [__x86_64__]: Include
4828 "nat/amd64-linux-siginfo.h".
4829 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4830 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4831 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4832 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4833 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4834 (cpt_si_fd, si_timerid, si_overrun): Move from
4835 nat/amd64-linux-siginfo.c.
4836 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4838 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4840 * server.c (skip_to_semicolon): Remove.
4841 (process_point_options): Use strchrnul instead of
4844 2016-01-26 Yao Qi <yao.qi@linaro.org>
4846 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4847 * linux-low.c (install_software_single_step_breakpoints): Don't
4848 call regcache_read_pc.
4849 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4852 2016-01-26 Yao Qi <yao.qi@linaro.org>
4854 * linux-low.c (install_software_single_step_breakpoints): Call
4855 regcache_read_pc instead of get_pc.
4857 2016-01-26 Yao Qi <yao.qi@linaro.org>
4859 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4860 (unblock_async_io): Rename to ...
4861 (block_unblock_async_io): ... it. New function.
4862 (enable_async_io): Don't install SIGIO handler. Unblock it
4864 (disable_async_io): Don't ignore SIGIO. Block it instead.
4865 (initialize_async_io): Install SIGIO handler. Don't call
4868 2016-01-26 Yao Qi <yao.qi@linaro.org>
4870 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4871 first character is '\003', call *the_target->request_interrupt.
4873 2016-01-25 Yao Qi <yao.qi@linaro.org>
4875 * remote-utils.c (new_thread_notify): Remove.
4876 (dead_thread_notify): Likewise.
4877 * remote-utils.h (new_thread_notify): Remove declaration.
4878 (dead_thread_notify): Likewise.
4880 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4882 * gdb.trace/pending.exp: Fix expected message on continue.
4884 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4886 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4887 it works properly on big-endian machines where sizeof (CORE_ADDR)
4890 2016-01-21 Pedro Alves <palves@redhat.com>
4892 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4893 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4894 * configure: Regenerate.
4896 2016-01-21 Yao Qi <yao.qi@linaro.org>
4898 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4899 is_thumb and set it according to CPSR saved on the stack.
4900 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4901 arm_sigreturn_next_pc.
4903 2016-01-18 Yao Qi <yao.qi@linaro.org>
4905 * linux-low.c (linux_set_pc_64bit): New function.
4906 (linux_get_pc_64bit): New function.
4907 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4909 * linux-sparc-low.c (debug_threads): Remove declaration.
4910 (sparc_get_pc): Remove.
4911 (the_low_target): Use linux_get_pc_64bit instead of
4913 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4914 (the_low_target): Use linux_get_pc_64bit and
4917 2016-01-18 Yao Qi <yao.qi@linaro.org>
4919 * linux-arm-low.c (debug_threads): Remove declaration.
4920 (arm_get_pc, arm_set_pc): Remove.
4921 (the_low_target): Use linux_get_pc_32bit and
4923 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4924 (the_low_target): Use linux_get_pc_32bit and
4926 * linux-cris-low.c (debug_threads): Remove declaration.
4927 (cris_get_pc, cris_set_pc,): Remove.
4928 (the_low_target): Use linux_get_pc_32bit and
4930 * linux-crisv32-low.c (debug_threads): Remove declaration.
4931 (cris_get_pc, cris_set_pc): Remove.
4932 (the_low_target): Use linux_get_pc_32bit and
4934 * linux-low.c: Include inttypes.h.
4935 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4936 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4937 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4938 (the_low_target): Use linux_get_pc_32bit and
4940 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4941 (the_low_target): Use linux_get_pc_32bit and
4943 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4944 (the_low_target): Use linux_get_pc_32bit and
4946 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4947 (the_low_target): Use linux_get_pc_32bit and
4949 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4950 (the_low_target): Use linux_get_pc_32bit and
4953 2016-01-18 Gary Benson <gbenson@redhat.com>
4955 * configure.ac (AC_FUNC_FORK): New check.
4956 * config.in: Regenerate.
4957 * configure: Likewise.
4959 2016-01-14 Yao Qi <yao.qi@linaro.org>
4961 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4962 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4963 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4964 arm_get_next_pcs_ctor.
4966 2016-01-12 Josh Stone <jistone@redhat.com>
4967 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4969 * inferiors.h: Include "gdb_vecs.h".
4970 (struct process_info): Add syscalls_to_catch.
4971 * inferiors.c (remove_process): Free syscalls_to_catch.
4972 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4973 syscall_return stops.
4974 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4975 * server.c (handle_general_set): Handle QCatchSyscalls.
4976 (handle_query): Report support for QCatchSyscalls.
4977 * target.h (struct target_ops): Add supports_catch_syscall.
4978 (target_supports_catch_syscall): New macro.
4979 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4980 (struct lwp_info): Add syscall_state.
4981 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4982 Maintain syscall_state and syscalls_to_catch across exec.
4983 (get_syscall_trapinfo): New function, proxy to the_low_target.
4984 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4985 (linux_low_filter_event): Toggle syscall_state entry/return for
4986 syscall traps, and set it ignored for all others.
4987 (gdb_catching_syscalls_p): New function.
4988 (gdb_catch_this_syscall_p): New function.
4989 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4990 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4991 (linux_supports_catch_syscall): New function.
4992 (linux_target_ops): Install it.
4993 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4994 (the_low_target): Install it.
4996 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4998 * acinclude.m4: Include new ../warning.m4 file.
4999 * configure: Regenerated.
5000 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5002 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5004 * ax.c (is_goto_target): Mark static.
5005 * linux-low.c (register_addr): Likewise.
5006 (linux_fetch_registers, linux_store_registers): Likewise.
5007 * mem-break.c (any_persistent_commands): Fix old prototype.
5008 (add_commands_to_breakpoint): Mark static.
5009 * regcache.c (find_register_by_name): Delete unused func.
5010 * remote-utils.c (hex_or_minus_one): Mark static.
5011 * server.c (monitor_show_help): Mark static.
5012 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5013 handle_v_requests): Likewise.
5015 2016-01-12 Pedro Alves <palves@redhat.com>
5017 Remove use of the registered trademark symbol throughout.
5019 2016-01-08 Yao Qi <yao.qi@linaro.org>
5021 * remote-utils.c (getpkt): If c is '\003', call target hook
5024 2016-01-06 Yao Qi <yao.qi@linaro.org>
5026 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5027 linux-aarch32-low.c.
5028 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5029 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5030 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5031 (thumb2_breakpoint): Declare.
5032 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5033 linux-aarch32-low.h.
5034 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5035 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5036 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5038 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5040 * gdbreplay.c (gdbreplay_version): Change copyright year in
5042 * server.c (gdbserver_version): Likewise.
5044 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5046 * server.c (crc32_table): Delete.
5047 (crc32): Use libiberty's xcrc32 function.
5049 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5051 * lynx-low.c (lynx_delete_thread_callback): New function.
5052 (lynx_mourn): Properly delete our process and all of its
5053 threads. Remove call to clear_inferiors.
5055 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5057 * target.c (thread_search_callback): Add check that
5058 the thread_stopped target callback is not NULL before
5061 2015-12-21 Yao Qi <yao.qi@linaro.org>
5063 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5066 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5068 * server.c (handle_query): Call target_supports_software_single_step.
5070 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5072 * linux-low.c (single_step): New function.
5073 (linux_resume_one_lwp_throw): Call single_step.
5074 (start_step_over): Likewise.
5076 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5078 * Makefile.in (SFILES): Append arch/arm-linux.c,
5079 arch/arm-get-next-pcs.c.
5080 (arm-linux.o): New rule.
5081 (arm-get-next-pcs.o): New rule.
5082 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5084 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5085 to linux-aarch32-low.c.
5086 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5087 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5088 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5089 (thumb2_breakpoint_len): Likewise.
5090 (arm_is_thumb_mode): Make non-static.
5091 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5092 from linux-aarch32-low.c.
5093 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5094 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5095 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5096 (thumb2_breakpoint_len): Likewise.
5097 (arm_is_thumb_mode): New declaration.
5098 * linux-arm-low.c: Include arch/arm-linux.h
5099 aarch/arm-get-next-pcs.h, sys/syscall.h.
5100 (get_next_pcs_ops): New struct.
5101 (get_next_pcs_addr_bits_remove): New function.
5102 (get_next_pcs_is_thumb): New function.
5103 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5104 (arm_sigreturn_next_pc): Likewise.
5105 (get_next_pcs_syscall_next_pc): Likewise.
5106 (arm_gdbserver_get_next_pcs): Likewise.
5107 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5109 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5110 * server.h: Include gdb_vecs.h.
5112 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5114 * Makefile.in (SFILES): Append common/common-regcache.c.
5115 (OBS): Append common-regcache.o.
5116 (common-regcache.o): New rule.
5117 * regcache.c (init_register_cache): Initialize cache to
5119 (regcache_raw_read_unsigned): New function.
5120 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5121 register_status enum.
5123 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5125 * linux-aarch64-low.c (the_low_targets): Rename
5126 breakpoint_reinsert_addr to get_next_pcs.
5127 * linux-arm-low.c (the_low_targets): Likewise.
5128 * linux-bfin-low.c (the_low_targets): Likewise.
5129 * linux-cris-low.c (the_low_targets): Likewise.
5130 * linux-crisv32-low.c (the_low_targets): Likewise.
5131 * linux-low.c (can_software_single_step): Likewise.
5132 (install_software_single_step_breakpoints): New function.
5133 (start_step_over): Use install_software_single_step_breakpoints.
5134 * linux-low.h: New CORE_ADDR vector.
5135 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5137 * linux-mips-low.c (the_low_targets): Likewise.
5138 * linux-nios2-low.c (the_low_targets): Likewise.
5139 * linux-sparc-low.c (the_low_targets): Likewise.
5141 2015-12-17 Pedro Alves <palves@redhat.com>
5143 * linux-low.c (linux_kill_one_lwp): Remove references to
5145 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5147 (linux_init_signals): Delete.
5148 (initialize_low): Adjust.
5149 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5151 2015-12-16 Pedro Alves <palves@redhat.com>
5153 * configure.ac (compiler warning flags): When testing a
5154 -Wno-foo option, check whether -Wfoo works instead.
5155 * configure: Regenerate.
5157 2015-12-11 Don Breazeal <donb@codesourcery.com>
5159 * server.c (process_serial_event): Don't exit from gdbserver
5160 in remote mode if there are still active inferiors.
5162 2015-12-11 Yao Qi <yao.qi@linaro.org>
5164 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5165 arm_breakpoint_at if the process is 32-bit.
5167 2015-12-11 Yao Qi <yao.qi@linaro.org>
5169 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5172 2015-12-07 Yao Qi <yao.qi@linaro.org>
5174 * configure.srv: Append arm.o to srv_tgtobj for
5175 aarch64*-*-linux* target.
5176 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5177 from linux-arm-low.c.
5178 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5179 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5180 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5181 (thumb2_breakpoint_len): Likewise.
5182 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5183 (arm_breakpoint_kinds): Likewise.
5184 (arm_breakpoint_kind_from_pc): Likewise.
5185 (arm_sw_breakpoint_from_kind): Likewise.
5186 (arm_breakpoint_kind_from_current_state): Likewise.
5187 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5188 (arm_sw_breakpoint_from_kind): Declare.
5189 (arm_breakpoint_kind_from_current_state): Declare.
5190 (arm_breakpoint_at): Declare.
5191 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5192 arm_sw_breakpoint_from_kind if process is 32-bit.
5193 (aarch64_breakpoint_kind_from_pc): New function.
5194 (aarch64_breakpoint_kind_from_current_state): New function.
5195 (the_low_target): Initialize fields breakpoint_kind_from_pc
5196 and breakpoint_kind_from_current_state.
5197 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5198 linux-aarch32-low.c.
5199 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5200 (arm_breakpoint, arm_breakpoint_len): Likewise.
5201 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5202 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5203 (arm_is_thumb_mode): Likewise.
5204 (arm_breakpoint_at): Likewise.
5205 (arm_breakpoint_kind_from_pc): Likewise.
5206 (arm_sw_breakpoint_from_kind): Likewise.
5207 (arm_breakpoint_kind_from_current_state): Likewise.
5210 2015-08-04 Yao Qi <yao.qi@linaro.org>
5212 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5213 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5214 * server.c (extended_protocol): Remove "static".
5215 * server.h (extended_protocol): Declare it.
5217 2015-12-04 Josh Stone <jistone@redhat.com>
5219 * target.h (struct target_ops) <arch_setup>: Rename to ...
5220 (struct target_ops) <post_create_inferior>: ... this.
5221 (target_arch_setup): Rename to ...
5222 (target_post_create_inferior): ... this, calling post_create_inferior.
5223 * server.c (start_inferior): Update target_arch_setup calls to
5224 target_post_create_inferior.
5225 * linux-low.c (linux_low_ptrace_options): Forward declare.
5226 (linux_arch_setup): Update its comment for general use.
5227 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5228 (struct linux_target_ops): Use linux_post_create_inferior.
5229 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5230 to post_create_inferior.
5231 * nto-low.c (struct nto_target_ops): Likewise.
5232 * spu-low.c (struct spu_target_ops): Likewise.
5233 * win32-low.c (struct win32_target_ops): Likewise.
5235 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5237 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5239 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5241 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5242 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5243 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5244 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5245 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5246 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5247 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5248 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5249 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5250 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5251 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5252 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5254 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5256 * linux-low.c (linux_look_up_symbols): Don't call
5257 linux_supports_traceclone.
5258 * linux-low.h (thread_db_init): Remove use_events argument.
5259 * thread-db.c (thread_db_use_event): Remove global variable.
5260 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5261 (struct thread_db) <td_create_bp>: Remove field.
5262 (thread_db_create_event): Remove function.
5263 (thread_db_enable_reporting): Likewise.
5264 (find_one_thread): Don't check for thread_db_use_events.
5265 (attach_thread): Likewise.
5266 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5267 (try_thread_db_load_1): Don't check for thread_db_use_events.
5268 (thread_db_init): Remove use_events argument and thread events
5270 (remove_thread_event_breakpoints): Remove function.
5271 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5273 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5275 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5277 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5278 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5279 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5280 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5281 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5283 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5285 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5286 * linux-low.c (can_hardware_single_step): Use
5287 supports_hardware_single_step.
5288 (can_software_single_step): New function.
5289 (start_step_over): Call can_software_single_step.
5290 (linux_supports_hardware_single_step): New function.
5291 (struct target_ops) <supports_software_single_step>: Initialize.
5292 * linux-low.h (struct linux_target_ops)
5293 <supports_hardware_single_step>: Initialize.
5294 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5295 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5296 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5297 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5298 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5299 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5300 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5301 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5302 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5303 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5305 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5306 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5308 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5309 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5310 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5312 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5313 * target.h (struct target_ops): <supports_software_single_step>:
5315 (target_supports_software_single_step): New macro.
5317 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5319 * linux-low.c (linux_wait_1): Fix pc advance condition.
5320 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5321 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5323 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5325 * linux-arm-low.c (arm_is_thumb_mode): New function.
5326 (arm_breakpoint_at): Use arm_is_thumb_mode.
5327 (arm_breakpoint_kind_from_current_state): New function.
5328 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5330 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5331 (linux_breakpoint_kind_from_current_state): New function.
5332 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5333 * linux-low.h (struct linux_target_ops)
5334 <breakpoint_kind_from_current_state>: New field.
5335 * target.h (struct target_ops): Likewise.
5336 (target_breakpoint_kind_from_current_state): New macro.
5338 2015-11-30 Pedro Alves <palves@redhat.com>
5340 * linux-low.c (linux_resume): Wake up the event loop before
5343 2015-11-30 Pedro Alves <palves@redhat.com>
5345 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5347 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5349 * target.c (struct thread_search): New structure.
5350 (thread_search_callback): New function.
5351 (prev_general_thread): New global.
5352 (prepare_to_access_memory, done_accessing_memory): New functions.
5353 * target.h (prepare_to_access_memory, done_accessing_memory):
5354 Replace macros with function declarations.
5356 2015-11-30 Pedro Alves <palves@redhat.com>
5359 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5360 report TARGET_WAITKIND_NO_RESUMED.
5361 * remote-utils.c (prepare_resume_reply): Handle
5362 TARGET_WAITKIND_NO_RESUMED.
5363 * server.c (report_no_resumed): New global.
5364 (handle_query) <qSupported>: Handle "no-resumed+". Report
5365 "no-resumed+" support.
5366 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5367 return error if the client doesn't support no-resumed events.
5368 (push_stop_notification): New function.
5369 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5370 events if the client supports them.
5372 2015-11-30 Pedro Alves <palves@redhat.com>
5374 * linux-low.c (thread_still_has_status_pending_p): Don't check
5376 (lwp_resumed): New function.
5377 (status_pending_p_callback): Return early if the LWP is not
5378 supposed to be resumed.
5380 2015-11-30 Pedro Alves <palves@redhat.com>
5382 * linux-low.c (handle_extended_wait): Assert that the LWP's
5383 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5384 thread create events, leave the new child's status pending.
5385 (linux_low_filter_event): If GDB wants to hear about thread exit
5386 events, leave the LWP marked dead and don't delete it.
5387 (linux_wait_for_event_filtered): Don't check for thread exit.
5388 (filter_exit_event): New function.
5389 (linux_wait_1): Use it, when returning an exit event.
5390 (linux_resume_one_lwp_throw): Assert that the LWP's
5391 waitstatus is TARGET_WAITKIND_IGNORE.
5392 * remote-utils.c (prepare_resume_reply): Handle
5393 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5394 * server.c (report_thread_events): New global.
5395 (handle_general_set): Handle QThreadEvents.
5396 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5397 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5398 TARGET_WAITKIND_THREAD_EXITED.
5399 * server.h (report_thread_events): Declare.
5401 2015-11-30 Pedro Alves <palves@redhat.com>
5403 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5404 the thread's last_resume_kind was resume_stop.
5406 2015-11-30 Pedro Alves <palves@redhat.com>
5408 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5411 2015-11-30 Pedro Alves <palves@redhat.com>
5413 * server.c (handle_v_requests): Handle vCtrlC.
5415 2015-11-30 Pedro Alves <palves@redhat.com>
5417 * gdbthread.h (find_any_thread_of_pid): Declare.
5418 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5420 * server.c (handle_query): If current_thread is NULL, look for
5421 another thread of the selected process.
5423 2015-11-26 Daniel Colascione <dancol@dancol.org>
5424 Simon Marchi <simon.marchi@ericsson.com>
5426 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5427 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5429 * target.h (struct target_ops) <thread_name>: New field.
5430 (target_thread_name): New macro.
5432 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5434 * regcache.h (regcache_invalidate_pid): Add declaration.
5435 * regcache.c (regcache_invalidate_pid): New function, extracted
5436 from regcache_invalidate.
5437 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5438 Add trivial documentation comment.
5439 * lynx-low.c: Use regcache_invalidate_pid instead of
5440 regcache_invalidate.
5442 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5444 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5445 and Elf64_auxv_t if the target is Android.
5447 2015-11-22 Doug Evans <xdje42@gmail.com>
5449 * target.h: #include <sys/types.h>.
5451 2015-11-19 Pedro Alves <palves@redhat.com>
5453 * linux-low.c (linux_process_qsupported): Change prototype.
5455 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5457 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5458 and adjust to loop over all features.
5459 * server.c (handle_query) <qSupported>: Adjust to call
5460 target_process_qsupported once, passing it a vector of unprocessed
5462 * target.h (struct target_ops) <process_qsupported>: Change
5464 (target_process_qsupported): Adjust.
5466 2015-11-19 Pedro Alves <palves@redhat.com>
5468 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5470 * configure: Regenerate.
5472 2015-11-19 Pedro Alves <palves@redhat.com>
5474 * configure: Regenerate.
5476 2015-11-19 Yao Qi <yao.qi@linaro.org>
5478 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5481 2015-11-19 Yao Qi <yao.qi@linaro.org>
5483 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5484 (struct aarch64_operand): Move enum out.
5486 2015-11-19 Yao Qi <yao.qi@linaro.org>
5488 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5489 struct user_fpsimd_state *.
5490 (aarch64_store_fpregset): Likewise.
5492 2015-11-19 Yao Qi <yao.qi@linaro.org>
5494 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5495 struct user_pt_regs *.
5496 (aarch64_store_gregset): Likewise.
5498 2015-11-18 Pedro Alves <palves@redhat.com>
5500 * Makefile.in (all_object_files): Add $IPA_OBJS.
5502 2015-11-17 Pedro Alves <palves@redhat.com>
5504 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5505 GDB_SIGNAL_0 and gdb_signal_to_string.
5507 2015-11-17 Pedro Alves <palves@redhat.com>
5509 * win32-low.c (handle_output_debug_string): Remove parameter.
5510 (win32_kill): Remove our_status local and adjust call to
5511 handle_output_debug_string.
5512 (get_child_debug_event): Adjust call to
5513 handle_output_debug_string.
5515 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5517 * linux-mips-low.c (mips_fill_gregset): Add cast.
5518 (mips_store_gregset): Likewise.
5519 (mips_fill_fpregset): Likewise.
5520 (mips_store_fpregset): Likewise.
5522 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5524 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5527 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5529 * linux-mips-low.c (mips_linux_new_thread): Change type of
5530 watch_type to enum target_hw_bp_type.
5532 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5534 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5535 Change return type to arm_hwbp_type.
5537 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5539 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5540 (arm_store_gregset): Likewise.
5541 * linux-arm-low.c (arm_get_hwcap): Likewise.
5542 (arm_read_description): Likewise.
5544 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5546 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5548 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5550 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5551 (ppc_fill_vsxregset): Likewise.
5552 (ppc_store_vsxregset): Likewise.
5553 (ppc_fill_vrregset): Likewise.
5554 (ppc_store_vrregset): Likewise.
5555 (ppc_fill_evrregset): Likewise.
5556 (ppc_store_evrregset): Likewise.
5558 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5560 * linux-ppc-low.c (ppc_usrregs_info): Remove
5561 forward-declaration.
5562 (ppc_arch_setup): Move lower in file.
5564 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5566 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5567 (ps_pdwrite): Likewise.
5569 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5571 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5572 to after assert checks.
5574 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5576 * proc-service.c (ps_pdread): Add/adjust casts.
5577 (ps_pdwrite): Add/adjust casts.
5579 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5581 * server.c (handle_search_memory_1): Cast return value of
5584 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5586 * server.c (write_qxfer_response): Change type of data to
5589 2015-10-29 Pedro Alves <palves@redhat.com>
5591 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5593 2015-10-29 Pedro Alves <palves@redhat.com>
5595 * tracepoint.c (clear_installed_tracepoints): Add casts.
5597 2015-10-29 Pedro Alves <palves@redhat.com>
5599 * server.c (handle_v_cont, process_serial_event): Add enum
5600 gdb_signal casts to signal parsing code.
5602 2015-10-29 Pedro Alves <palves@redhat.com>
5604 * linux-low.h (NULL_REGSET): Define.
5605 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5606 * linux-arm-low.c (arm_regsets): Likewise.
5607 * linux-crisv32-low.c (cris_regsets): Likewise.
5608 * linux-m68k-low.c (m68k_regsets): Likewise.
5609 * linux-mips-low.c (mips_regsets): Likewise.
5610 * linux-nios2-low.c (nios2_regsets): Likewise.
5611 * linux-ppc-low.c (ppc_regsets): Likewise.
5612 * linux-s390-low.c (s390_regsets): Likewise.
5613 * linux-sh-low.c (sh_regsets): Likewise.
5614 * linux-sparc-low.c (sparc_regsets): Likewise.
5615 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5616 * linux-tile-low.c (tile_regsets): Likewise.
5617 * linux-x86-low.c (x86_regsets): Likewise.
5618 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5620 2015-10-29 Pedro Alves <palves@redhat.com>
5622 * linux-low.h (NULL_REGSET): Define.
5623 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5624 * linux-arm-low.c (arm_regsets): Likewise.
5625 * linux-crisv32-low.c (cris_regsets): Likewise.
5626 * linux-m68k-low.c (m68k_regsets): Likewise.
5627 * linux-mips-low.c (mips_regsets): Likewise.
5628 * linux-nios2-low.c (nios2_regsets): Likewise.
5629 * linux-ppc-low.c (ppc_regsets): Likewise.
5630 * linux-s390-low.c (s390_regsets): Likewise.
5631 * linux-sh-low.c (sh_regsets): Likewise.
5632 * linux-sparc-low.c (sparc_regsets): Likewise.
5633 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5634 * linux-tile-low.c (tile_regsets): Likewise.
5635 * linux-x86-low.c (x86_regsets): Likewise.
5636 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5638 2015-10-26 Doug Evans <dje@google.com>
5640 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5642 2015-10-26 Doug Evans <dje@google.com>
5644 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5646 2015-10-26 Doug Evans <dje@google.com>
5648 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5650 (attach_thread, find_new_threads_callback): Ditto.
5652 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5654 * mem-break.h (set_breakpoint_data): Remove.
5656 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5658 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5659 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5660 (initialize_low): Remove set_breakpoint_data call.
5661 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5662 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5663 (initialize_low): Remove set_breakpoint_data call.
5664 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5665 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5666 (initialize_low): Remove set_breakpoint_data call.
5668 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5670 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5671 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5672 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5673 * target.h (target_breakpoint_kind_from_pc): New macro.
5675 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5677 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5678 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5679 the default breakpoint kind.
5681 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5683 * linux-arm-low.c (arm_supports_z_point_type): Add software
5686 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5688 * linux-arm-low.c: Refactor breakpoint definitions.
5689 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5690 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5692 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5694 * Makefile.in: Add arm.c/o.
5695 * configure.srv: Likewise.
5696 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5697 (arm_breakpoint_kind_from_pc): New function.
5698 (arm_sw_breakpoint_from_kind): Return proper kind.
5699 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5701 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5703 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5705 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5706 (struct raw_breakpoint) <size>: Remove.
5707 (struct raw_breakpoint) <kind>: Add.
5708 (bp_size): New function.
5709 (bp_opcode): Likewise.
5710 (find_raw_breakpoint_at): Adjust for kind.
5711 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5712 (remove_memory_breakpoint): Adjust for kind call bp_size.
5713 (set_raw_breakpoint_at): Adjust for kind.
5714 (set_breakpoint): Likewise.
5715 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5716 (delete_raw_breakpoint): Adjust for kind.
5717 (delete_breakpoint): Likewise.
5718 (find_gdb_breakpoint): Likewise.
5719 (set_gdb_breakpoint_1): Likewise.
5720 (set_gdb_breakpoint): Likewise.
5721 (delete_gdb_breakpoint_1): Likewise.
5722 (delete_gdb_breakpoint): Likewise.
5723 (uninsert_raw_breakpoint): Likewise.
5724 (reinsert_raw_breakpoint): Likewise.
5725 (set_breakpoint_data): Remove.
5726 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5727 (check_mem_read): Adjust for kind call bp_size.
5728 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5729 (clone_one_breakpoint): Adjust for kind.
5730 * mem-break.h (set_gdb_breakpoint): Likewise.
5731 (delete_gdb_breakpoint): Likewise.
5732 * server.c (process_serial_event): Likewise.
5734 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5736 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5737 (struct linux_target_ops) <breakpoint>: Remove.
5738 (struct linux_target_ops) <breakpoint_len>: Remove.
5739 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5740 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5741 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5742 (arm_sw_breakpoint_from_kind): New function.
5743 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5744 (struct linux_target_ops) <breakpoint>: Remove.
5745 (struct linux_target_ops) <breakpoint_len>: Remove.
5746 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5747 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5748 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5749 (struct linux_target_ops) <breakpoint>: Remove.
5750 (struct linux_target_ops) <breakpoint_len>: Remove.
5751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5753 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5754 (struct linux_target_ops) <breakpoint>: Remove.
5755 (struct linux_target_ops) <breakpoint_len>: Remove.
5756 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5757 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5758 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5759 and sw_breakpoint_from_kind to increment the pc.
5760 (linux_breakpoint_kind_from_pc): New function.
5761 (linux_sw_breakpoint_from_kind): New function.
5762 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5763 (initialize_low): Call breakpoint_kind_from_pc and
5764 sw_breakpoint_from_kind to replace breakpoint_data/len.
5765 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5768 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5769 (struct linux_target_ops) <breakpoint>: Remove.
5770 (struct linux_target_ops) <breakpoint_len>: Remove.
5771 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5772 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5773 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5774 (struct linux_target_ops) <breakpoint>: Remove.
5775 (struct linux_target_ops) <breakpoint_len>: Remove.
5776 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5777 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5778 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5779 (struct linux_target_ops) <breakpoint>: Remove.
5780 (struct linux_target_ops) <breakpoint_len>: Remove.
5781 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5782 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5783 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5784 (struct linux_target_ops) <breakpoint>: Remove.
5785 (struct linux_target_ops) <breakpoint_len>: Remove.
5786 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5787 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5788 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5789 (struct linux_target_ops) <breakpoint>: Remove.
5790 (struct linux_target_ops) <breakpoint_len>: Remove.
5791 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5792 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5793 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5794 (struct linux_target_ops) <breakpoint>: Remove.
5795 (struct linux_target_ops) <breakpoint_len>: Remove.
5796 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5797 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5798 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5799 (struct linux_target_ops) <breakpoint>: Remove.
5800 (struct linux_target_ops) <breakpoint_len>: Remove.
5801 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5802 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5803 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5804 (struct linux_target_ops) <breakpoint>: Remove.
5805 (struct linux_target_ops) <breakpoint_len>: Remove.
5806 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5807 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5808 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5809 (struct linux_target_ops) <breakpoint>: Remove.
5810 (struct linux_target_ops) <breakpoint_len>: Remove.
5811 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5812 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5813 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5814 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5815 (struct linux_target_ops) <breakpoint>: Remove.
5816 (struct linux_target_ops) <breakpoint_len>: Remove.
5817 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5818 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5819 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5820 (struct linux_target_ops) <breakpoint>: Remove.
5821 (struct linux_target_ops) <breakpoint_len>: Remove.
5822 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5823 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5825 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5827 * linux-cris-low.c (cris_get_pc): Remove void arg.
5829 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5831 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5834 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5836 * inferiors.c (thread_pid_matches_callback): New function.
5837 (find_thread_process): New function.
5838 (remove_thread): Reset current_thread.
5839 (remove_process): Assert threads have been removed first.
5841 2015-10-15 Yao Qi <yao.qi@linaro.org>
5843 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5845 (aarch64_remove_point): Likewise.
5846 * regcache.c (regcache_register_size): New function.
5848 2015-10-12 Yao Qi <yao.qi@linaro.org>
5850 * linux-aarch64-low.c: Update all callers as emit_load_store
5851 is renamed to aarch64_emit_load_store.
5853 2015-10-12 Yao Qi <yao.qi@linaro.org>
5855 * linux-aarch64-low.c: Update all callers of function renaming
5856 from emit_insn to aarch64_emit_insn.
5858 2015-10-12 Yao Qi <yao.qi@linaro.org>
5860 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5861 arch/aarch64-insn.h.
5862 (struct aarch64_memory_operand): Likewise.
5864 (emit_insn): Move to arch/aarch64-insn.c.
5865 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5866 (emit_load_store): Move to arch/aarch64-insn.c.
5867 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5868 (can_encode_int32): Remove.
5870 2015-10-12 Yao Qi <yao.qi@linaro.org>
5872 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5873 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5874 (aarch64_relocate_instruction): Likewise.
5875 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5876 (struct aarch64_insn_visitor): Likewise.
5878 2015-10-12 Yao Qi <yao.qi@linaro.org>
5880 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5881 (struct aarch64_insn_visitor): New.
5882 (struct aarch64_insn_relocation_data): New.
5883 (aarch64_ftrace_insn_reloc_b): New function.
5884 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5885 (aarch64_ftrace_insn_reloc_cb): Likewise.
5886 (aarch64_ftrace_insn_reloc_tb): Likewise.
5887 (aarch64_ftrace_insn_reloc_adr): Likewise.
5888 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5889 (aarch64_ftrace_insn_reloc_others): Likewise.
5891 (aarch64_relocate_instruction): Use visitor.
5893 2015-10-12 Yao Qi <yao.qi@linaro.org>
5895 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5896 int. Add argument buf.
5897 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5898 aarch64_relocate_instruction.
5900 2015-10-12 Yao Qi <yao.qi@linaro.org>
5902 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5903 argument insn. Remove local variable insn. Don't call
5905 (aarch64_install_fast_tracepoint_jump_pad): Call
5908 2015-09-30 Yao Qi <yao.qi@linaro.org>
5910 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5911 (emit_load_store_pair): Likewise.
5913 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5915 * dll.c (match_dll): Add cast(s).
5916 (unloaded_dll): Likewise.
5917 * linux-low.c (second_thread_of_pid_p): Likewise.
5918 (delete_lwp_callback): Likewise.
5919 (count_events_callback): Likewise.
5920 (select_event_lwp_callback): Likewise.
5921 (linux_set_resume_request): Likewise.
5922 * server.c (accumulate_file_name_length): Likewise.
5923 (emit_dll_description): Likewise.
5924 (handle_qxfer_threads_worker): Likewise.
5925 (visit_actioned_threads): Likewise.
5926 * thread-db.c (any_thread_of): Likewise.
5927 * tracepoint.c (same_process_p): Likewise.
5928 (match_blocktype): Likewise.
5929 (build_traceframe_info_xml): Likewise.
5931 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5933 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5935 (gdb_unparse_agent_expr): Likewise.
5936 * hostio.c (require_data): Likewise.
5937 (handle_pread): Likewise.
5938 * linux-low.c (disable_regset): Likewise.
5939 (fetch_register): Likewise.
5940 (store_register): Likewise.
5941 (get_dynamic): Likewise.
5942 (linux_qxfer_libraries_svr4): Likewise.
5943 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5944 (set_fast_tracepoint_jump): Likewise.
5945 (uninsert_fast_tracepoint_jumps_at): Likewise.
5946 (reinsert_fast_tracepoint_jumps_at): Likewise.
5947 (validate_inserted_breakpoint): Likewise.
5948 (clone_agent_expr): Likewise.
5949 * regcache.c (init_register_cache): Likewise.
5950 * remote-utils.c (putpkt_binary_1): Likewise.
5951 (decode_M_packet): Likewise.
5952 (decode_X_packet): Likewise.
5953 (look_up_one_symbol): Likewise.
5954 (relocate_instruction): Likewise.
5955 (monitor_output): Likewise.
5956 * server.c (handle_search_memory): Likewise.
5957 (handle_qxfer_exec_file): Likewise.
5958 (handle_qxfer_libraries): Likewise.
5959 (handle_qxfer): Likewise.
5960 (handle_query): Likewise.
5961 (handle_v_cont): Likewise.
5962 (handle_v_run): Likewise.
5963 (captured_main): Likewise.
5964 * target.c (write_inferior_memory): Likewise.
5965 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5966 * tracepoint.c (init_trace_buffer): Likewise.
5967 (add_tracepoint_action): Likewise.
5968 (add_traceframe): Likewise.
5969 (add_traceframe_block): Likewise.
5970 (cmd_qtdpsrc): Likewise.
5971 (cmd_qtdv): Likewise.
5972 (cmd_qtstatus): Likewise.
5973 (response_source): Likewise.
5974 (response_tsv): Likewise.
5975 (cmd_qtnotes): Likewise.
5976 (gdb_collect): Likewise.
5977 (initialize_tracepoint): Likewise.
5979 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5981 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5982 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5983 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5985 (enum aarch64_condition_codes): New enum.
5986 (w0): New static global.
5989 (struct aarch64_memory_operand) <type>: New
5990 MEMORY_OPERAND_POSTINDEX type.
5991 (postindex_memory_operand): New helper function.
5992 (emit_ret): New function.
5993 (emit_load_store_pair): New function, factored out of emit_stp
5994 with support for MEMORY_OPERAND_POSTINDEX.
5995 (emit_stp): Rewrite using emit_load_store_pair.
5996 (emit_ldp): New function.
5997 (emit_load_store): Likewise.
5998 (emit_ldr): Mention post-index instruction in comment.
5999 (emit_ldrh): New function.
6000 (emit_ldrb): New function.
6001 (emit_ldrsw): Mention post-index instruction in comment.
6002 (emit_str): Likewise.
6003 (emit_subs): New function.
6004 (emit_cmp): Likewise.
6005 (emit_and): Likewise.
6006 (emit_orr): Likewise.
6007 (emit_orn): Likewise.
6008 (emit_eor): Likewise.
6009 (emit_mvn): Likewise.
6010 (emit_lslv): Likewise.
6011 (emit_lsrv): Likewise.
6012 (emit_asrv): Likewise.
6013 (emit_mul): Likewise.
6014 (emit_sbfm): Likewise.
6015 (emit_sbfx): Likewise.
6016 (emit_ubfm): Likewise.
6017 (emit_ubfx): Likewise.
6018 (emit_csinc): Likewise.
6019 (emit_cset): Likewise.
6020 (emit_nop): Likewise.
6021 (emit_ops_insns): New helper function.
6022 (emit_pop): Likewise.
6023 (emit_push): Likewise.
6024 (aarch64_emit_prologue): New function.
6025 (aarch64_emit_epilogue): Likewise.
6026 (aarch64_emit_add): Likewise.
6027 (aarch64_emit_sub): Likewise.
6028 (aarch64_emit_mul): Likewise.
6029 (aarch64_emit_lsh): Likewise.
6030 (aarch64_emit_rsh_signed): Likewise.
6031 (aarch64_emit_rsh_unsigned): Likewise.
6032 (aarch64_emit_ext): Likewise.
6033 (aarch64_emit_log_not): Likewise.
6034 (aarch64_emit_bit_and): Likewise.
6035 (aarch64_emit_bit_or): Likewise.
6036 (aarch64_emit_bit_xor): Likewise.
6037 (aarch64_emit_bit_not): Likewise.
6038 (aarch64_emit_equal): Likewise.
6039 (aarch64_emit_less_signed): Likewise.
6040 (aarch64_emit_less_unsigned): Likewise.
6041 (aarch64_emit_ref): Likewise.
6042 (aarch64_emit_if_goto): Likewise.
6043 (aarch64_emit_goto): Likewise.
6044 (aarch64_write_goto_address): Likewise.
6045 (aarch64_emit_const): Likewise.
6046 (aarch64_emit_call): Likewise.
6047 (aarch64_emit_reg): Likewise.
6048 (aarch64_emit_pop): Likewise.
6049 (aarch64_emit_stack_flush): Likewise.
6050 (aarch64_emit_zero_ext): Likewise.
6051 (aarch64_emit_swap): Likewise.
6052 (aarch64_emit_stack_adjust): Likewise.
6053 (aarch64_emit_int_call_1): Likewise.
6054 (aarch64_emit_void_call_2): Likewise.
6055 (aarch64_emit_eq_goto): Likewise.
6056 (aarch64_emit_ne_goto): Likewise.
6057 (aarch64_emit_lt_goto): Likewise.
6058 (aarch64_emit_le_goto): Likewise.
6059 (aarch64_emit_gt_goto): Likewise.
6060 (aarch64_emit_ge_got): Likewise.
6061 (aarch64_emit_ops_impl): New static global variable.
6062 (aarch64_emit_ops): New target function, return
6063 &aarch64_emit_ops_impl.
6064 (struct linux_target_ops): Install it.
6066 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6068 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6069 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6071 * linux-aarch64-ipa.c: New file.
6072 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6074 (aarch64_get_thread_area): New target method.
6075 (extract_signed_bitfield): New helper function.
6076 (aarch64_decode_ldr_literal): New function.
6077 (enum aarch64_opcodes): New enum.
6078 (struct aarch64_register): New struct.
6079 (struct aarch64_operand): New struct.
6080 (x0): New static global.
6089 (aarch64_register): New helper function.
6090 (register_operand): Likewise.
6091 (immediate_operand): Likewise.
6092 (struct aarch64_memory_operand): New struct.
6093 (offset_memory_operand): New helper function.
6094 (preindex_memory_operand): Likewise.
6095 (enum aarch64_system_control_registers): New enum.
6096 (ENCODE): New macro.
6097 (emit_insn): New helper function.
6098 (emit_b): New function.
6099 (emit_bcond): Likewise.
6100 (emit_cb): Likewise.
6101 (emit_tb): Likewise.
6102 (emit_blr): Likewise.
6103 (emit_stp): Likewise.
6104 (emit_ldp_q_offset): Likewise.
6105 (emit_stp_q_offset): Likewise.
6106 (emit_load_store): Likewise.
6107 (emit_ldr): Likewise.
6108 (emit_ldrsw): Likewise.
6109 (emit_str): Likewise.
6110 (emit_ldaxr): Likewise.
6111 (emit_stxr): Likewise.
6112 (emit_stlr): Likewise.
6113 (emit_data_processing_reg): Likewise.
6114 (emit_data_processing): Likewise.
6115 (emit_add): Likewise.
6116 (emit_sub): Likewise.
6117 (emit_mov): Likewise.
6118 (emit_movk): Likewise.
6119 (emit_mov_addr): Likewise.
6120 (emit_mrs): Likewise.
6121 (emit_msr): Likewise.
6122 (emit_sevl): Likewise.
6123 (emit_wfe): Likewise.
6124 (append_insns): Likewise.
6125 (can_encode_int32_in): New helper function.
6126 (aarch64_relocate_instruction): New function.
6127 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6128 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6129 (struct linux_target_ops): Install aarch64_get_thread_area,
6130 aarch64_install_fast_tracepoint_jump_pad and
6131 aarch64_get_min_fast_tracepoint_insn_len.
6133 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6135 * Makefile.in (aarch64-insn.o): New rule.
6136 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6138 2015-09-21 Yao Qi <yao.qi@linaro.org>
6140 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6142 2015-09-21 Yao Qi <yao.qi@linaro.org>
6144 * tracepoint.c (max_jump_pad_size): Remove.
6146 2015-09-18 Yao Qi <yao.qi@linaro.org>
6148 * linux-aarch64-low.c: Don't include sys/uio.h.
6149 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6151 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6153 * tracepoint.c (eval_result_type): Change prototype.
6154 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6156 2015-09-15 Pedro Alves <palves@redhat.com>
6158 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6159 Check whether to report exec events instead of checking whether
6160 multiprocess is enabled.
6162 2015-09-15 Pedro Alves <palves@redhat.com>
6165 * remote-utils.c (prepare_resume_reply): Merge
6166 TARGET_WAITKIND_VFORK_DONE switch case with the
6167 TARGET_WAITKIND_FORKED case.
6169 2015-09-15 Yao Qi <yao.qi@linaro.org>
6171 * server.c (handle_query): Check string comparison using
6172 "else if" instead of "if".
6174 2015-09-15 Yao Qi <yao.qi@linaro.org>
6176 * server.c (vCont_supported): New global variable.
6177 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6178 matches. Append ";vContSupported+" to own_buf.
6179 (handle_v_requests): Append ";s;S" to own_buf if target supports
6180 hardware single step or vCont_supported is false.
6181 (capture_main): Set vCont_supported to zero.
6183 2015-09-15 Yao Qi <yao.qi@linaro.org>
6185 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6187 (linux_supports_hardware_single_step): ... New function.
6188 (linux_target_ops): Update.
6189 * lynx-low.c (lynx_target_ops): Set field
6190 supports_hardware_single_step to target_can_do_hardware_single_step.
6191 * nto-low.c (nto_target_ops): Likewise.
6192 * spu-low.c (spu_target_ops): Likewise.
6193 * win32-low.c (win32_target_ops): Likewise.
6194 * target.c (target_can_do_hardware_single_step): New function.
6195 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6196 Remove. <supports_hardware_single_step>: New field.
6197 (target_supports_conditional_breakpoints): Remove.
6198 (target_supports_hardware_single_step): New macro.
6199 (target_can_do_hardware_single_step): Declare.
6200 * server.c (handle_query): Use target_supports_hardware_single_step
6201 instead of target_supports_conditional_breakpoints.
6203 2015-09-15 Yao Qi <yao.qi@linaro.org>
6205 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6207 (struct linux_target_ops the_low_target): Install
6208 aarch64_linux_siginfo_fixup.
6210 2015-09-11 Don Breazeal <donb@codesourcery.com>
6211 Luis Machado <lgustavo@codesourcery.com>
6213 * linux-low.c (linux_mourn): Static declaration.
6214 (linux_arch_setup): Move in front of
6215 handle_extended_wait.
6216 (linux_arch_setup_thread): New function.
6217 (handle_extended_wait): Handle exec events. Call
6218 linux_arch_setup_thread. Make event_lwp argument a
6219 pointer-to-a-pointer.
6220 (check_zombie_leaders): Do not check stopped threads.
6221 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6222 (linux_low_filter_event): Add lwp and thread for exec'ing
6223 non-leader thread if leader thread has been deleted.
6224 Refactor code into linux_arch_setup_thread and call it.
6225 Pass child lwp pointer by reference to handle_extended_wait.
6226 (linux_wait_for_event_filtered): Update comment.
6227 (linux_wait_1): Prevent clobbering exec event status.
6228 (linux_supports_exec_events): New function.
6229 (linux_target_ops) <supports_exec_events>: Initialize new member.
6230 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6232 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6233 * server.c (report_exec_events): New global variable.
6234 (handle_query): Handle qSupported query for exec-events feature.
6235 (captured_main): Initialize report_exec_events.
6236 * server.h (report_exec_events): Declare new global variable.
6237 * target.h (struct target_ops) <supports_exec_events>: New
6239 (target_supports_exec_events): New macro.
6240 * win32-low.c (win32_target_ops) <supports_exec_events>:
6241 Initialize new member.
6243 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6245 * linux-low.c (linux_low_enable_btrace): Remove.
6246 (linux_target_ops): Replace linux_low_enable_btrace with
6247 linux_enable_btrace.
6249 2015-09-03 Yao Qi <yao.qi@linaro.org>
6251 * linux-aarch64-low.c (aarch64_insert_point): Call
6252 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6255 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6257 * linux-low.c (check_stopped_by_breakpoint): Use
6258 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6260 2015-08-27 Pedro Alves <palves@redhat.com>
6262 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6264 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6266 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6267 the XNEW-family equivalent.
6268 (compile_bytecodes): Likewise.
6269 * dll.c (loaded_dll): Likewise.
6270 * event-loop.c (append_callback_event): Likewise.
6271 (create_file_handler): Likewise.
6272 (create_file_event): Likewise.
6273 * hostio.c (handle_open): Likewise.
6274 * inferiors.c (add_thread): Likewise.
6275 (add_process): Likewise.
6276 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6277 * linux-arm-low.c (arm_new_process): Likewise.
6278 (arm_new_thread): Likewise.
6279 * linux-low.c (add_to_pid_list): Likewise.
6280 (linux_add_process): Likewise.
6281 (handle_extended_wait): Likewise.
6282 (add_lwp): Likewise.
6283 (enqueue_one_deferred_signal): Likewise.
6284 (enqueue_pending_signal): Likewise.
6285 (linux_resume_one_lwp_throw): Likewise.
6286 (linux_resume_one_thread): Likewise.
6287 (linux_read_memory): Likewise.
6288 (linux_write_memory): Likewise.
6289 * linux-mips-low.c (mips_linux_new_process): Likewise.
6290 (mips_linux_new_thread): Likewise.
6291 (mips_add_watchpoint): Likewise.
6292 * linux-x86-low.c (initialize_low_arch): Likewise.
6293 * lynx-low.c (lynx_add_process): Likewise.
6294 * mem-break.c (set_raw_breakpoint_at): Likewise.
6295 (set_breakpoint): Likewise.
6296 (add_condition_to_breakpoint): Likewise.
6297 (add_commands_to_breakpoint): Likewise.
6298 (clone_agent_expr): Likewise.
6299 (clone_one_breakpoint): Likewise.
6300 * regcache.c (new_register_cache): Likewise.
6301 * remote-utils.c (look_up_one_symbol): Likewise.
6302 * server.c (queue_stop_reply): Likewise.
6303 (start_inferior): Likewise.
6304 (queue_stop_reply_callback): Likewise.
6305 (handle_target_event): Likewise.
6306 * spu-low.c (fetch_ppc_memory): Likewise.
6307 (store_ppc_memory): Likewise.
6308 * target.c (set_target_ops): Likewise.
6309 * thread-db.c (thread_db_load_search): Likewise.
6310 (try_thread_db_load_1): Likewise.
6311 * tracepoint.c (add_tracepoint): Likewise.
6312 (add_tracepoint_action): Likewise.
6313 (create_trace_state_variable): Likewise.
6314 (cmd_qtdpsrc): Likewise.
6315 (cmd_qtro): Likewise.
6316 (add_while_stepping_state): Likewise.
6317 * win32-low.c (child_add_thread): Likewise.
6318 (get_image_name): Likewise.
6320 2015-08-25 Yao Qi <yao.qi@linaro.org>
6322 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6324 2015-08-25 Yao Qi <yao.qi@linaro.org>
6326 * Makefile.in (aarch64-linux.o): New rule.
6327 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6329 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6330 (aarch64_init_debug_reg_state): Make it extern.
6331 (aarch64_linux_prepare_to_resume): Remove.
6333 2015-08-25 Yao Qi <yao.qi@linaro.org>
6335 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6336 lwp_arch_private_info and ptid_of_lwp.
6338 2015-08-25 Yao Qi <yao.qi@linaro.org>
6340 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6341 Find proc_info by find_process_pid. All callers updated.
6343 2015-08-25 Yao Qi <yao.qi@linaro.org>
6345 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6347 (debug_reg_change_callback): Remove.
6348 (aarch64_notify_debug_reg_change): Remove.
6350 2015-08-25 Yao Qi <yao.qi@linaro.org>
6352 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6353 Call current_lwp_ptid.
6355 2015-08-25 Yao Qi <yao.qi@linaro.org>
6357 * linux-aarch64-low.c (debug_reg_change_callback): Use
6360 2015-08-25 Yao Qi <yao.qi@linaro.org>
6362 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6364 2015-08-25 Yao Qi <yao.qi@linaro.org>
6366 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6368 2015-08-25 Yao Qi <yao.qi@linaro.org>
6370 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6373 2015-08-25 Yao Qi <yao.qi@linaro.org>
6375 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6377 (debug_reg_change_callback): Remove argument entry and add argument
6378 lwp. Remove local variable thread. Don't print thread id in the
6379 debugging output. Don't check whether pid of thread equals to pid.
6380 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6381 iterate_over_lwps instead find_inferior.
6383 2015-08-24 Pedro Alves <palves@redhat.com>
6385 * inferiors.c (get_first_process): New function.
6386 * inferiors.h (get_first_process): New declaration.
6387 * remote-utils.c (read_ptid): Default to the first process in the
6388 list, instead of to the current thread's process.
6390 2015-08-24 Pedro Alves <palves@redhat.com>
6392 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6393 * event-loop.c: Likewise.
6394 * remote-utils.c: Likewise.
6395 * tracepoint.c: Likewise.
6397 2015-08-24 Pedro Alves <palves@redhat.com>
6399 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6402 2015-08-21 Pedro Alves <palves@redhat.com>
6404 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6405 instead of literal 1.
6407 2015-08-21 Pedro Alves <palves@redhat.com>
6409 * tdesc.c (default_description): Explicitly zero-initialize.
6411 2015-08-21 Pedro Alves <palves@redhat.com>
6414 * inferiors.c (remove_thread): Discard any pending stop reply for
6416 * server.c (remove_all_on_match_pid): Rename to ...
6417 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6419 (discard_queued_stop_replies): Change parameter to a ptid. Now
6421 (handle_v_kill, kill_inferior_callback, captured_main)
6422 (process_serial_event): Adjust.
6423 * server.h (discard_queued_stop_replies): Declare.
6425 2015-08-21 Pedro Alves <palves@redhat.com>
6427 * linux-low.c (wait_for_sigstop): Always switch to no thread
6428 selected if the previously current thread dies.
6429 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6430 process instead of the current thread's.
6431 * remote-utils.c (input_interrupt): Don't check if there's no
6433 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6434 current thread to the general thread fails, error out.
6435 (handle_qxfer_auxv, handle_qxfer_libraries)
6436 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6437 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6438 (handle_query): Check if there's a thread selected instead of
6439 checking whether there's any thread in the thread list.
6440 (handle_qxfer_threads, handle_qxfer_btrace)
6441 (handle_qxfer_btrace_conf): Don't error out early if there's no
6442 thread in the thread list.
6443 (handle_v_cont, myresume): Don't set the current thread to the
6445 (process_serial_event) <Hg handling>: Also set thread_id if the
6446 previous general thread is still alive.
6447 (process_serial_event) <g/G handling>: If setting the current
6448 thread to the general thread fails, error out.
6449 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6450 thread's lwp instead of the current thread's.
6451 * target.c (set_desired_thread): If the desired thread was not
6452 found, leave the current thread pointing to NULL. Return an int
6453 (boolean) indicating success.
6454 * target.h (set_desired_thread): Change return type to int.
6456 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6458 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6459 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6461 (ps_get_thread_area): New function.
6463 2015-08-19 Gary Benson <gbenson@redhat.com>
6465 * hostio.c (handle_pread): Do not attempt to read more data
6466 than hostio_reply_with_data can fit in a packet.
6468 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6470 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6472 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6474 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6476 2015-08-06 Pedro Alves <palves@redhat.com>
6478 * tracepoint.c (expr_eval_result): Now an int.
6480 2015-08-06 Pedro Alves <palves@redhat.com>
6482 * gdbthread.h (struct regcache): Forward declare.
6483 (struct thread_info) <regcache_data>: Now a struct regcache
6485 * inferiors.c (inferior_regcache_data)
6486 (set_inferior_regcache_data): Now work with struct regcache
6488 * inferiors.h (struct regcache): Forward declare.
6489 (inferior_regcache_data, set_inferior_regcache_data): Now work
6490 with struct regcache pointers.
6491 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6492 (free_register_cache_thread): Remove struct regcache pointer
6495 2015-08-06 Pedro Alves <palves@redhat.com>
6497 * server.c (captured_main): On error, print the exception message
6498 to stderr, and if run_once is set, throw a quit.
6500 2015-08-06 Pedro Alves <palves@redhat.com>
6502 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6505 2015-08-06 Pedro Alves <palves@redhat.com>
6507 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6508 reading beyond the passed in buffer length.
6510 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6512 * tracepoint.c (symbol_list) <required>: Remove.
6514 2015-08-06 Pedro Alves <palves@redhat.com>
6516 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6517 count if stopping and suspending threads.
6518 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6519 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6520 (linux_detach): Complete an ongoing step-over.
6521 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6523 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6524 (linux_wait_1): If passing a signal to the inferior after
6525 finishing a step-over, unsuspend and re-resume all lwps. If we
6526 see a single-step event but the thread should be continuing, don't
6527 pass the trap to gdb.
6528 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6529 internal_error instead of gdb_assert.
6530 (enqueue_pending_signal): New function.
6531 (check_ptrace_stopped_lwp_gone): Add debug output.
6532 (start_step_over): Use internal_error instead of gdb_assert.
6533 (complete_ongoing_step_over): New function.
6534 (linux_resume_one_thread): Don't resume a suspended thread.
6535 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6538 2015-08-06 Pedro Alves <palves@redhat.com>
6540 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6541 (linux_thread_alive): Use lwp_is_marked_dead.
6542 (extended_event_reported): Delete.
6543 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6544 instead of extended_event_reported.
6545 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6547 (lwp_is_marked_dead): New function.
6548 (lwp_running): Use lwp_is_marked_dead.
6549 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6552 2015-08-06 Pedro Alves <palves@redhat.com>
6554 * linux-low.c (linux_wait_1): Move fork event output out of the
6555 !report_to_gdb check. Pass event_child->waitstatus to
6556 target_waitstatus_to_string instead of ourstatus.
6558 2015-08-04 Yao Qi <yao.qi@linaro.org>
6560 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6561 if current_thread is 32 bit.
6563 2015-08-04 Yao Qi <yao.qi@linaro.org>
6565 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6566 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6567 * server.c (extended_protocol): Remove "static".
6568 * server.h (extended_protocol): Declare it.
6570 2015-08-04 Yao Qi <yao.qi@linaro.org>
6572 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6573 both aarch64 and aarch32.
6574 (aarch64_set_pc): Likewise.
6576 2015-08-04 Yao Qi <yao.qi@linaro.org>
6578 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6579 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6580 arm-with-neon.xml to srv_xmlfiles.
6581 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6582 (is_64bit_tdesc): New function.
6583 (aarch64_linux_read_description): New function.
6584 (aarch64_arch_setup): Call aarch64_linux_read_description.
6585 (regs_info): Rename to regs_info_aarch64.
6586 (aarch64_regs_info): Return right regs_info.
6587 (initialize_low_arch): Call initialize_low_arch_aarch32.
6589 2015-08-04 Yao Qi <yao.qi@linaro.org>
6591 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6592 * linux-aarch32-low.c: New file.
6593 * linux-aarch32-low.h: New file.
6594 * linux-arm-low.c (arm_fill_gregset): Move it to
6595 linux-aarch32-low.c.
6596 (arm_store_gregset): Likewise.
6597 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6598 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6599 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6600 (regs_info): Rename to regs_info_arm.
6601 (arm_regs_info): Return regs_info_aarch32 if
6602 have_ptrace_getregset is 1 and target description is
6603 arm_with_neon or arm_with_vfpv3.
6604 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6605 Call initialize_low_arch_aarch32 instead.
6607 2015-08-04 Yao Qi <yao.qi@linaro.org>
6609 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6610 * linux-low.c: ... here.
6611 * linux-low.h (have_ptrace_getregset): Declare it.
6613 2015-08-04 Pedro Alves <palves@redhat.com>
6615 * thread-db.c (struct thread_db): Use new typedefs.
6616 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6618 (disable_thread_event_reporting): Cast result of dlsym to
6619 destination function pointer type.
6620 (thread_db_mourn): Use td_ta_delete_ftype.
6622 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6624 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6626 (CDX_BREAKPOINT): Define for R2.
6627 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6628 (the_low_target): Add comments.
6630 2015-07-30 Yao Qi <yao.qi@linaro.org>
6632 * linux-arm-low.c (arm_hwcap): Remove it.
6633 (arm_read_description): New local variable arm_hwcap. Don't
6634 set arm_hwcap to zero.
6636 2015-07-30 Yao Qi <yao.qi@linaro.org>
6638 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6639 Use regcache->tdesc instead.
6640 (arm_store_wmmxregset): Likewise.
6641 (arm_fill_vfpregset): Likewise.
6642 (arm_store_vfpregset): Likewise.
6644 2015-07-30 Yao Qi <yao.qi@linaro.org>
6646 * linux-arm-low.c: Include arch/arm.h.
6647 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6648 (arm_store_gregset): Likewise.
6650 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6652 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6653 ptrace's 4th parameter.
6655 2015-07-27 Yao Qi <yao.qi@linaro.org>
6657 * configure.srv (case aarch64*-*-linux*): Don't set
6660 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6662 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6664 * linux-arm-low.c: Likewise.
6665 * linux-cris-low.c: Likewise.
6666 * linux-crisv32-low.c: Likewise.
6667 * linux-low.c: Likewise.
6668 * linux-m68k-low.c: Likewise.
6669 * linux-mips-low.c: Likewise.
6670 * linux-nios2-low.c: Likewise.
6671 * linux-s390-low.c: Likewise.
6672 * linux-sparc-low.c: Likewise.
6673 * linux-tic6x-low.c: Likewise.
6674 * linux-tile-low.c: Likewise.
6675 * linux-x86-low.c: Likewise.
6677 2015-07-24 Pedro Alves <palves@redhat.com>
6679 * config.in: Regenerate.
6680 * configure: Regenerate.
6682 2015-07-24 Pedro Alves <palves@redhat.com>
6684 * acinclude.m4: Include ../ptrace.m4.
6685 * configure.ac: Call GDB_AC_PTRACE.
6686 * config.in, configure: Regenerate.
6688 2015-07-24 Yao Qi <yao.qi@linaro.org>
6690 * linux-low.c (linux_create_inferior): Remove setting to
6691 proc->priv->new_inferior.
6692 (linux_attach): Likewise.
6693 (linux_low_filter_event): Likewise.
6694 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6696 2015-07-24 Yao Qi <yao.qi@linaro.org>
6698 * linux-low.c (linux_arch_setup): New function.
6699 (linux_low_filter_event): If proc->tdesc is NULL and
6700 proc->attached is true, call the_low_target.arch_setup.
6701 Otherwise, keep status pending, and return.
6702 (linux_resume_one_lwp_throw): Don't call get_pc if
6703 thread->while_stepping isn't NULL. Don't call
6704 get_thread_regcache if proc->tdesc is NULL.
6705 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6706 (linux_target_ops): Install arch_setup.
6707 * server.c (start_inferior): Call the_target->arch_setup.
6708 * target.h (struct target_ops) <arch_setup>: New field.
6709 (target_arch_setup): New marco.
6710 * lynx-low.c (lynx_target_ops): Update.
6711 * nto-low.c (nto_target_ops): Update.
6712 * spu-low.c (spu_target_ops): Update.
6713 * win32-low.c (win32_target_ops): Update.
6715 2015-07-24 Yao Qi <yao.qi@linaro.org>
6717 * linux-low.c (linux_add_process): Don't set
6718 proc->priv->new_inferior.
6719 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6720 (linux_attach): Likewise.
6722 2015-07-24 Yao Qi <yao.qi@linaro.org>
6724 * server.c (start_inferior): Code refactor.
6726 2015-07-24 Yao Qi <yao.qi@linaro.org>
6728 * server.c (process_serial_event): Set general_thread.
6730 2015-07-21 Yao Qi <yao.qi@linaro.org>
6732 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6733 aarch64_linux_get_debug_reg_capacity.
6735 2015-07-17 Yao Qi <yao.qi@linaro.org>
6737 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6738 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6739 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6740 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6741 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6742 (AARCH64_HWP_ALIGNMENT): Likewise.
6743 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6744 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6745 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6746 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6747 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6748 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6749 (struct aarch64_debug_reg_state): Likewise.
6750 (struct arch_lwp_info): Likewise.
6751 (aarch64_align_watchpoint): Likewise.
6752 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6753 (aarch64_watchpoint_length): Likewise.
6754 (aarch64_point_encode_ctrl_reg): Likewise
6755 (aarch64_point_is_aligned): Likewise.
6756 (aarch64_align_watchpoint): Likewise.
6757 (aarch64_linux_set_debug_regs):
6758 (aarch64_dr_state_insert_one_point): Likewise.
6759 (aarch64_dr_state_remove_one_point): Likewise.
6760 (aarch64_handle_breakpoint): Likewise.
6761 (aarch64_handle_aligned_watchpoint): Likewise.
6762 (aarch64_handle_unaligned_watchpoint): Likewise.
6763 (aarch64_handle_watchpoint): Likewise.
6765 2015-07-17 Yao Qi <yao.qi@linaro.org>
6767 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6768 and don't aarch64_get_debug_reg_state. All callers update.
6769 (aarch64_handle_aligned_watchpoint): Likewise.
6770 (aarch64_handle_unaligned_watchpoint): Likewise.
6771 (aarch64_handle_watchpoint): Likewise.
6772 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6773 (aarch64_remove_point): Likewise.
6775 2015-07-17 Yao Qi <yao.qi@linaro.org>
6777 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6779 (aarch64_handle_unaligned_watchpoint): Likewise.
6781 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6783 Revert the previous 3 commits:
6784 Move gdb_regex* to common/
6785 Move linux_find_memory_regions_full & co.
6786 gdbserver build-id attribute generator
6788 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6789 Jan Kratochvil <jan.kratochvil@redhat.com>
6791 gdbserver build-id attribute generator.
6792 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6793 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6794 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6796 (get_dynamic): Use find_pdhr to traverse program headers.
6797 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6798 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6799 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6800 (get_hex_build_id): New.
6801 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6802 to reply XML document.
6804 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6805 Jan Kratochvil <jan.kratochvil@redhat.com>
6807 * target.c: Include target/target-utils.h and fcntl.h.
6808 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6809 (target_fileio_read_stralloc): New functions.
6811 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6813 * Makefile.in (OBS): Add gdb_regex.o.
6815 * config.in: Rebuilt.
6816 * configure: Rebuilt.
6818 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6819 Jan Kratochvil <jan.kratochvil@redhat.com>
6821 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6822 * Makefile.in (OBS): Add target-utils.o.
6823 (linux-maps.o, target-utils.o): New.
6824 * configure.srv (srv_linux_obj): Add linux-maps.o.
6826 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6828 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6830 (the_low_target): Install it.
6832 2015-07-14 Pedro Alves <palves@redhat.com>
6834 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6835 Instead, ignore ECHILD, and throw an error for other errnos.
6837 2015-07-10 Pedro Alves <palves@redhat.com>
6839 * event-loop.c (struct callback_event) <data>: Change type to
6840 gdb_client_data instance instead of gdb_client_data pointer.
6841 (append_callback_event): Adjust.
6843 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6845 * linux-aarch64-low.c: Add comments for each linux_target_ops
6846 method. Remove comments already covered in target_ops and
6847 linux_target_ops definitions.
6848 (the_low_target): Add comments for each unimplemented method.
6850 2015-07-09 Yao Qi <yao.qi@linaro.org>
6852 * linux-aarch64-low.c (aarch64_regmap): Remove.
6853 (aarch64_usrregs_info): Remove.
6854 (regs_info): Set field usrregs to NULL.
6856 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6858 * linux-low.c: Include "rsp-low.h"
6859 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6860 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6861 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6862 (handle_btrace_enable_pt): New.
6863 (handle_btrace_general_set): Support "pt".
6864 (handle_btrace_conf_general_set): Support "pt:size".
6866 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6868 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6871 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6873 * linux-aarch64-low.c: Remove comment about endianness.
6874 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6875 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6878 2015-06-24 Gary Benson <gbenson@redhat.com>
6880 * linux-i386-ipa.c (stdint.h): Do not include.
6881 * lynx-i386-low.c (stdint.h): Likewise.
6882 * lynx-ppc-low.c (stdint.h): Likewise.
6883 * mem-break.c (stdint.h): Likewise.
6884 * thread-db.c (stdint.h): Likewise.
6885 * tracepoint.c (stdint.h): Likewise.
6886 * win32-low.c (stdint.h): Likewise.
6888 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6890 * server.c (write_qxfer_response): Update call to
6891 remote_escape_output.
6893 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6894 Jan Kratochvil <jan.kratochvil@redhat.com>
6896 Merge multiple hex conversions.
6897 * gdbreplay.c (tohex): Rename to 'fromhex'.
6898 (logchar): Use fromhex.
6900 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6902 * server.c (handle_qxfer_libraries): Set `version' attribute for
6905 2015-06-10 Gary Benson <gbenson@redhat.com>
6907 * target.h (struct target_ops) <multifs_open>: New field.
6908 <multifs_unlink>: Likewise.
6909 <multifs_readlink>: Likewise.
6910 * linux-low.c (nat/linux-namespaces.h): New include.
6911 (linux_target_ops): Initialize the_target->multifs_open,
6912 the_target->multifs_unlink and the_target->multifs_readlink.
6913 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6914 * hostio.c (hostio_fs_pid): New static variable.
6915 (hostio_handle_new_gdb_connection): New function.
6916 (handle_setfs): Likewise.
6917 (handle_open): Use the_target->multifs_open as appropriate.
6918 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6919 (handle_readlink): Use the_target->multifs_readlink as
6921 (handle_vFile): Handle vFile:setfs packets.
6922 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6923 after target_handle_new_gdb_connection.
6925 2015-06-10 Gary Benson <gbenson@redhat.com>
6927 * configure.ac (AC_CHECK_FUNCS): Add setns.
6928 * config.in: Regenerate.
6929 * configure: Likewise.
6930 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6931 (linux-namespaces.o): New rule.
6932 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6934 2015-06-09 Gary Benson <gbenson@redhat.com>
6936 * hostio.c (handle_open): Process mode argument with
6937 fileio_to_host_mode.
6939 2015-06-01 Yao Qi <yao.qi@linaro.org>
6941 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6942 * linux-x86-low.c: Likewise.
6944 2015-05-28 Don Breazeal <donb@codesourcery.com>
6946 * linux-low.c (handle_extended_wait): Initialize
6947 thread_info.last_resume_kind for new fork children.
6949 2015-05-15 Pedro Alves <palves@redhat.com>
6951 * target.h (target_handle_new_gdb_connection): Rewrite using if
6952 wrapped in do/while.
6954 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6956 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6957 * configure, config.in: Regenerate.
6958 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6961 2015-05-12 Don Breazeal <donb@codesourcery.com>
6963 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6964 PTRACE_EVENT_VFORK_DONE.
6965 (linux_low_ptrace_options, extended_event_reported): Add vfork
6967 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6968 and "vforkdone" for RSP 'T' Stop Reply Packet.
6969 * server.h (report_vfork_events): Declare
6972 2015-05-12 Don Breazeal <donb@codesourcery.com>
6974 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6975 (the_low_target) <new_fork>: Initialize new member.
6976 * linux-arm-low.c (arm_new_fork): New function.
6977 (the_low_target) <new_fork>: Initialize new member.
6978 * linux-low.c (handle_extended_wait): Call new target function
6980 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6981 * linux-mips-low.c (mips_add_watchpoint): New function
6982 extracted from mips_insert_point.
6983 (the_low_target) <new_fork>: Initialize new member.
6984 (mips_linux_new_fork): New function.
6985 (mips_insert_point): Call mips_add_watchpoint.
6986 * linux-x86-low.c (x86_linux_new_fork): New function.
6987 (the_low_target) <new_fork>: Initialize new member.
6989 2015-05-12 Don Breazeal <donb@codesourcery.com>
6991 * linux-low.c (handle_extended_wait): Implement return value,
6992 rename argument 'event_child' to 'event_lwp', handle
6993 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6994 (linux_low_ptrace_options): New function.
6995 (linux_low_filter_event): Call linux_low_ptrace_options,
6996 use different argument fo linux_enable_event_reporting,
6997 use return value from handle_extended_wait.
6998 (extended_event_reported): New function.
6999 (linux_wait_1): Call extended_event_reported and set
7000 status to report fork events.
7001 (linux_write_memory): Add pid to debug message.
7002 (reset_lwp_ptrace_options_callback): New function.
7003 (linux_handle_new_gdb_connection): New function.
7004 (linux_target_ops): Initialize new structure member.
7005 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7006 * lynx-low.c: Initialize new structure member.
7007 * remote-utils.c (prepare_resume_reply): Implement stop reason
7008 "fork" for "T" stop message.
7009 * server.c (handle_query): Call handle_new_gdb_connection.
7010 * server.h (report_fork_events): Declare global flag.
7011 * target.h (struct target_ops) <handle_new_gdb_connection>:
7013 (target_handle_new_gdb_connection): New macro.
7014 * win32-low.c: Initialize new structure member.
7016 2015-05-12 Don Breazeal <donb@codesourcery.com>
7018 * mem-break.c (APPEND_TO_LIST): Define macro.
7019 (clone_agent_expr): New function.
7020 (clone_one_breakpoint): New function.
7021 (clone_all_breakpoints): New function.
7022 * mem-break.h: Declare new functions.
7024 2015-05-12 Don Breazeal <donb@codesourcery.com>
7026 * linux-low.c (linux_supports_fork_events): New function.
7027 (linux_supports_vfork_events): New function.
7028 (linux_target_ops): Initialize new structure members.
7029 (initialize_low): Call linux_check_ptrace_features.
7030 * lynx-low.c (lynx_target_ops): Initialize new structure
7032 * server.c (report_fork_events, report_vfork_events):
7034 (handle_query): Add new features to qSupported packet and
7036 (captured_main): Initialize new global variables.
7037 * target.h (struct target_ops) <supports_fork_events>:
7039 <supports_vfork_events>: New member.
7040 (target_supports_fork_events): New macro.
7041 (target_supports_vfork_events): New macro.
7042 * win32-low.c (win32_target_ops): Initialize new structure
7045 2015-05-12 Gary Benson <gbenson@redhat.com>
7047 * server.c (handle_qxfer_exec_file): Use current process
7050 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7052 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7053 Remove HAVE_PTRACE_GETREGS conditionals.
7054 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7055 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7057 2015-05-08 Yao Qi <yao.qi@linaro.org>
7059 * linux-low.c (linux_supports_conditional_breakpoints): New
7061 (linux_target_ops): Install new target method.
7062 * lynx-low.c (lynx_target_ops): Install NULL hook for
7063 supports_conditional_breakpoints.
7064 * nto-low.c (nto_target_ops): Likewise.
7065 * spu-low.c (spu_target_ops): Likewise.
7066 * win32-low.c (win32_target_ops): Likewise.
7067 * server.c (handle_query): Check
7068 target_supports_conditional_breakpoints.
7069 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7071 (target_supports_conditional_breakpoints): New macro.
7073 2015-05-06 Pedro Alves <palves@redhat.com>
7076 * server.c (start_inferior): If the process exits, mourn it.
7078 2015-04-21 Gary Benson <gbenson@redhat.com>
7080 * hostio.c (fileio_open_flags_to_host): Factored out to
7081 fileio_to_host_openflags in common/fileio.c. Single use
7084 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7086 * linux-xtensa-low.c (xtensa_fill_gregset)
7087 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7090 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7092 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7093 (regs_info): Replace usrregs pointer with NULL.
7095 2015-04-17 Gary Benson <gbenson@redhat.com>
7097 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7098 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7099 * server.c (handle_qxfer_exec_file): New function.
7100 (qxfer_packets): Add exec-file entry.
7101 (handle_query): Report qXfer:exec-file:read as supported packet.
7103 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7105 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7107 2015-04-09 Gary Benson <gbenson@redhat.com>
7109 * hostio-errno.c (errno_to_fileio_error): Remove function.
7110 Update caller to use remote_fileio_to_fio_error.
7112 2015-04-09 Yao Qi <yao.qi@linaro.org>
7114 * linux-low.c (linux_insert_point): Call
7115 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7116 (linux_remove_point): Call remove_memory_breakpoint if type is
7118 * linux-x86-low.c (x86_insert_point): Don't call
7119 insert_memory_breakpoint.
7120 (x86_remove_point): Don't call remove_memory_breakpoint.
7122 2015-04-01 Pedro Alves <palves@redhat.com>
7123 Cleber Rosa <crosa@redhat.com>
7125 * server.c (gdbserver_usage): Reorganize and extend the usage
7128 2015-03-24 Pedro Alves <palves@redhat.com>
7130 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7131 output. Also dump TRAP_TRACE.
7132 (linux_low_filter_event): In debug output, distinguish a
7133 resume_stop SIGSTOP from a delayed SIGSTOP.
7135 2015-03-24 Gary Benson <gbenson@redhat.com>
7137 * linux-x86-low.c (x86_linux_new_thread): Moved to
7139 (x86_linux_prepare_to_resume): Likewise.
7141 2015-03-24 Gary Benson <gbenson@redhat.com>
7143 * Makefile.in (x86-linux-dregs.o): New rule.
7144 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7145 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7146 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7147 (x86_linux_dr_get): Likewise.
7148 (x86_linux_dr_set): Likewise.
7149 (update_debug_registers_callback): Likewise.
7150 (x86_linux_dr_set_addr): Likewise.
7151 (x86_linux_dr_get_addr): Likewise.
7152 (x86_linux_dr_set_control): Likewise.
7153 (x86_linux_dr_get_control): Likewise.
7154 (x86_linux_dr_get_status): Likewise.
7155 (x86_linux_update_debug_registers): Likewise.
7157 2015-03-24 Gary Benson <gbenson@redhat.com>
7159 * linux-x86-low.c (x86_linux_update_debug_registers):
7160 New function, factored out from...
7161 (x86_linux_prepare_to_resume): ...this.
7163 2015-03-24 Gary Benson <gbenson@redhat.com>
7165 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7166 (x86_linux_dr_set): Likewise.
7167 (update_debug_registers_callback): Likewise.
7168 (x86_linux_dr_set_addr): Likewise.
7169 (x86_linux_dr_get_addr): Likewise.
7170 (x86_linux_dr_set_control): Likewise.
7171 (x86_linux_dr_get_control): Likewise.
7172 (x86_linux_dr_get_status): Likewise.
7173 (x86_linux_prepare_to_resume): Likewise.
7175 2015-03-24 Gary Benson <gbenson@redhat.com>
7177 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7178 Use perror_with_name. Pass string through gettext.
7179 (x86_linux_dr_set): Likewise.
7181 2015-03-24 Gary Benson <gbenson@redhat.com>
7183 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7184 (x86_linux_dr_set_addr): ...this.
7185 (x86_dr_low_get_addr): Rename to...
7186 (x86_linux_dr_get_addr): ...this.
7187 (x86_dr_low_set_control): Rename to...
7188 (x86_linux_dr_set_control): ...this.
7189 (x86_dr_low_get_control): Rename to...
7190 (x86_linux_dr_get_control): ...this.
7191 (x86_dr_low_get_status): Rename to...
7192 (x86_linux_dr_get_status): ...this.
7193 (x86_dr_low): Update with new function names.
7195 2015-03-24 Gary Benson <gbenson@redhat.com>
7197 * Makefile.in (x86-linux.o): New rule.
7198 * configure.srv: Add x86-linux.o to relevant targets.
7199 * linux-low.c (lwp_set_arch_private_info): New function.
7200 (lwp_arch_private_info): Likewise.
7201 * linux-x86-low.c: Include nat/x86-linux.h.
7202 (arch_lwp_info): Removed structure.
7203 (update_debug_registers_callback):
7204 Use lwp_set_debug_registers_changed.
7205 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7206 and lwp_set_debug_registers_changed.
7207 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7209 2015-03-24 Gary Benson <gbenson@redhat.com>
7211 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7212 * linux-arm-low.c (arm_new_thread): Likewise.
7213 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7214 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7215 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7216 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7218 2015-03-24 Gary Benson <gbenson@redhat.com>
7220 * linux-low.c (ptid_of_lwp): New function.
7221 (lwp_is_stopped): Likewise.
7222 (lwp_stop_reason): Likewise.
7223 * linux-x86-low.c (update_debug_registers_callback):
7225 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7228 2015-03-24 Gary Benson <gbenson@redhat.com>
7230 * linux-low.h (linux_stop_lwp): Remove declaration.
7232 2015-03-24 Gary Benson <gbenson@redhat.com>
7234 * linux-low.h: Include nat/linux-nat.h.
7235 * linux-low.c (iterate_over_lwps_args): New structure.
7236 (iterate_over_lwps_filter): New function.
7237 (iterate_over_lwps): Likewise.
7238 * linux-x86-low.c (update_debug_registers_callback):
7239 Update signature to what iterate_over_lwps expects.
7240 Remove PID check that iterate_over_lwps now performs.
7241 (x86_dr_low_set_addr): Use iterate_over_lwps.
7242 (x86_dr_low_set_control): Likewise.
7244 2015-03-24 Gary Benson <gbenson@redhat.com>
7246 * linux-x86-low.c (x86_debug_reg_state): New function.
7247 (x86_linux_prepare_to_resume): Use the above.
7249 2015-03-24 Gary Benson <gbenson@redhat.com>
7251 * linux-low.c (current_lwp_ptid): New function.
7252 * linux-x86-low.c: Include nat/linux-nat.h.
7253 (x86_dr_low_get_addr): Use current_lwp_ptid.
7254 (x86_dr_low_get_control): Likewise.
7255 (x86_dr_low_get_status): Likewise.
7257 2015-03-20 Pedro Alves <palves@redhat.com>
7259 * tracepoint.c (cmd_qtstatus): Make "str" const.
7261 2015-03-20 Pedro Alves <palves@redhat.com>
7263 * server.c (handle_general_set): Make "req_str" const.
7265 2015-03-19 Pedro Alves <palves@redhat.com>
7267 * linux-low.c (linux_resume_one_lwp): Rename to ...
7268 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7269 instead call perror_with_name.
7270 (check_ptrace_stopped_lwp_gone): New function.
7271 (linux_resume_one_lwp): Reimplement as wrapper around
7272 linux_resume_one_lwp_throw that swallows errors if the LWP is
7275 2015-03-19 Pedro Alves <palves@redhat.com>
7277 * linux-low.c (count_events_callback, select_event_lwp_callback):
7278 No longer check whether the thread has resume_stop as last resume
7281 2015-03-19 Pedro Alves <palves@redhat.com>
7283 * linux-low.c (count_events_callback, select_event_lwp_callback):
7284 Use the lwp's status_pending_p field, not the thread's.
7286 2015-03-19 Pedro Alves <palves@redhat.com>
7288 * linux-low.c (select_event_lwp_callback): Update comments to
7289 no longer mention SIGTRAP.
7291 2015-03-18 Gary Benson <gbenson@redhat.com>
7293 * server.c (handle_query): Do not report vFile:fstat as supported.
7295 2015-03-11 Gary Benson <gbenson@redhat.com>
7297 * hostio.c (sys/types.h): New include.
7298 (sys/stat.h): Likewise.
7299 (common-remote-fileio.h): Likewise.
7300 (handle_fstat): New function.
7301 (handle_vFile): Handle vFile:fstat packets.
7303 2015-03-11 Gary Benson <gbenson@redhat.com>
7305 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7306 struct stat.st_blocks and struct stat.st_blksize.
7307 * configure: Regenerate.
7308 * config.in: Likewise.
7309 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7310 (OBS): Add common-remote-fileio.o.
7311 (common-remote-fileio.o): New rule.
7313 2015-03-09 Pedro Alves <palves@redhat.com>
7315 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7316 'struct sockaddr' pointer in 'accept' call.
7318 2015-03-09 Pedro Alves <palves@redhat.com>
7321 2015-03-07 Pedro Alves <palves@redhat.com>
7322 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7323 or <winsock2.h> here. Instead include "gdb_socket.h".
7324 (remote_open): Use union gdb_sockaddr_u.
7325 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7326 or <winsock2.h> here. Instead include "gdb_socket.h".
7327 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7328 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7330 (init_named_socket, gdb_agent_helper_thread): Use union
7333 2015-03-07 Pedro Alves <palves@redhat.com>
7335 * configure.ac (build_warnings): Move
7336 -Wdeclaration-after-statement to the C-specific set.
7337 * configure: Regenerate.
7339 2015-03-07 Pedro Alves <palves@redhat.com>
7341 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7342 or <winsock2.h> here. Instead include "gdb_socket.h".
7343 (remote_open): Use union gdb_sockaddr_u.
7344 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7345 or <winsock2.h> here. Instead include "gdb_socket.h".
7346 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7347 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7349 (init_named_socket, gdb_agent_helper_thread): Use union
7352 2015-03-07 Pedro Alves <palves@redhat.com>
7354 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7357 2015-03-06 Yao Qi <yao.qi@linaro.org>
7359 * linux-aarch64-low.c (aarch64_insert_point): Use
7360 show_debug_regs as a boolean.
7361 (aarch64_remove_point): Likewise.
7363 2015-03-05 Pedro Alves <palves@redhat.com>
7365 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7366 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7367 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7368 * nto-low.c (nto_target_ops): Likewise.
7369 * spu-low.c (spu_target_ops): Likewise.
7370 * win32-low.c (win32_target_ops): Likewise.
7372 2015-03-04 Pedro Alves <palves@redhat.com>
7374 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7375 Decide whether a breakpoint triggered based on the SIGTRAP's
7377 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7378 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7379 (linux_low_filter_event): Check for breakpoints before checking
7381 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7383 (linux_stopped_by_sw_breakpoint)
7384 (linux_supports_stopped_by_sw_breakpoint)
7385 (linux_stopped_by_hw_breakpoint)
7386 (linux_supports_stopped_by_hw_breakpoint): New functions.
7387 (linux_target_ops): Install new target methods.
7389 2015-03-04 Pedro Alves <palves@redhat.com>
7391 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7392 * server.c (swbreak_feature, hwbreak_feature): New globals.
7393 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7394 (captured_main): Clear swbreak_feature and hwbreak_feature.
7395 * server.h (swbreak_feature, hwbreak_feature): Declare.
7396 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7397 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7398 supports_stopped_by_hw_breakpoint>: New fields.
7399 (target_supports_stopped_by_sw_breakpoint)
7400 (target_stopped_by_sw_breakpoint)
7401 (target_supports_stopped_by_hw_breakpoint)
7402 (target_stopped_by_hw_breakpoint): Declare.
7404 2015-03-04 Pedro Alves <palves@redhat.com>
7406 enum lwp_stop_reason -> enum target_stop_reason
7407 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7408 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7409 (linux_wait_1, stuck_in_jump_pad_callback)
7410 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7411 (linux_stopped_by_watchpoint):
7412 * linux-low.h (enum lwp_stop_reason): Delete.
7413 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7414 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7416 2015-03-04 Yao Qi <yao.qi@linaro.org>
7418 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7420 2015-03-03 Gary Benson <gbenson@redhat.com>
7422 * hostio.c (handle_vFile): Fix prefix lengths.
7424 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7426 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7429 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7431 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7432 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7433 (clean): Add "rm -f" for above C files.
7434 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7435 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7436 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7437 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7438 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7439 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7440 (init_registers_s390x_vx_linux64)
7441 (init_registers_s390x_tevx_linux64)
7442 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7443 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7445 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7446 (s390_store_vxrs_high): New functions.
7447 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7449 (s390_arch_setup): Add logic for selecting one of the new target
7450 descriptions. Activate the new vector regsets if applicable.
7451 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7452 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7453 and init_registers_s390x_tevx_linux64.
7455 2015-03-01 Pedro Alves <palves@redhat.com>
7457 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7460 2015-02-27 Pedro Alves <palves@redhat.com>
7462 * linux-x86-low.c (u_debugreg_offset): New function.
7463 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7465 2015-02-27 Pedro Alves <palves@redhat.com>
7467 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7468 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7469 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7470 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7471 (ps_lsetfpregs, ps_getpid)
7472 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7473 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7474 (ps_lsetxregs, ps_plog): Declare.
7476 2015-02-27 Pedro Alves <palves@redhat.com>
7478 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7479 IP_AGENT_EXPORT_FUNC.
7480 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7481 IP_AGENT_EXPORT_FUNC.
7482 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7483 (IP_AGENT_EXPORT): Delete.
7484 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7485 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7486 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7487 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7488 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7489 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7490 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7491 (traceframe_read_count, traceframe_write_count)
7492 (traceframes_created, trace_state_variables, get_raw_reg)
7493 (get_trace_state_variable_value, set_trace_state_variable_value)
7494 (ust_loaded, helper_thread_id, cmd_buf): Use
7495 IPA_SYM_EXPORTED_NAME.
7496 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7497 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7498 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7499 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7500 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7501 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7502 EXTERN_C_PUSH/EXTERN_C_POP.
7503 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7504 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7505 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7506 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7507 (traceframe_write_count, traceframe_read_count)
7508 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7509 (about_to_request_buffer_space, get_trace_state_variable_value)
7510 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7511 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7512 EXTERN_C_PUSH/EXTERN_C_POP.
7513 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7514 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7515 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7516 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7517 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7518 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7519 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7520 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7522 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7523 (IP_AGENT_EXPORT_VAR_DECL): Define.
7525 (gdb_agent_get_raw_reg): Declare.
7527 2015-02-27 Tom Tromey <tromey@redhat.com>
7528 Pedro Alves <palves@redhat.com>
7530 Rename symbols whose names are reserved C++ keywords throughout.
7532 2015-02-27 Pedro Alves <palves@redhat.com>
7534 * Makefile.in (COMPILER): New, get it from autoconf.
7535 (CXX): Get from autoconf instead.
7536 (COMPILE.pre): Use COMPILER.
7537 (CC-LD): Rename to ...
7538 (CC_LD): ... this. Use COMPILER.
7539 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7540 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7541 * acinclude.m4: Include build-with-cxx.m4.
7542 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7543 Disable -Werror by default if building in C++ mode.
7544 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7545 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7546 the C++ compiler. Save/restore CXXFLAGS too.
7547 * configure: Regenerate.
7549 2015-02-27 Pedro Alves <palves@redhat.com>
7551 * acinclude.m4: Include libiberty.m4.
7552 * configure.ac: Call libiberty_INIT.
7553 * config.in, configure: Regenerate.
7555 2015-02-26 Pedro Alves <palves@redhat.com>
7557 * linux-low.c (linux_wait_1): When incrementing the PC past a
7558 program breakpoint always use the_low_target.breakpoint_len as
7559 increment, rather than the maximum between that and
7560 the_low_target.decr_pc_after_break.
7562 2015-02-23 Pedro Alves <palves@redhat.com>
7564 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7565 thread was doing a step-over; always adjust the PC if
7566 we stepped over a permanent breakpoint.
7567 (linux_wait_1): If we stepped over breakpoint that was on top of a
7568 permanent breakpoint, manually advance the PC past it.
7570 2015-02-23 Pedro Alves <palves@redhat.com>
7572 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7574 (x86_fill_gregset, x86_store_gregset): Use it when handling
7577 2015-02-20 Pedro Alves <palves@redhat.com>
7579 * thread-db.c: Include "nat/linux-procfs.h".
7580 (thread_db_init): Skip listing new threads if the kernel supports
7581 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7583 2015-02-20 Pedro Alves <palves@redhat.com>
7585 * linux-low.c (status_pending_p_callback): Use ptid_match.
7587 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7589 PR breakpoints/16812
7590 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7591 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7592 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7594 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7596 PR breakpoints/15956
7597 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7599 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7601 * linux-low.c (linux_low_btrace_conf): Print size.
7602 * server.c (handle_btrace_conf_general_set): New.
7603 (hanle_general_set): Call handle_btrace_conf_general_set.
7604 (handle_query): Report Qbtrace-conf:bts:size as supported.
7606 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7608 * linux-low.c (linux_low_enable_btrace): Update parameters.
7609 (linux_low_btrace_conf): New.
7610 (linux_target_ops)<to_btrace_conf>: Initialize.
7611 * server.c (current_btrace_conf): New.
7612 (handle_btrace_enable): Rename to ...
7613 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7614 to target_enable_btrace. Update comment. Update users.
7615 (handle_qxfer_btrace_conf): New.
7616 (qxfer_packets): Add btrace-conf entry.
7617 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7618 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7619 (target_ops)<read_btrace_conf>: New.
7620 (target_enable_btrace): Update parameters.
7621 (target_read_btrace_conf): New.
7623 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7625 * server.c (handle_btrace_general_set): Remove call to
7626 target_supports_btrace.
7627 (supported_btrace_packets): New.
7628 (handle_query): Call supported_btrace_packets.
7629 * target.h: include btrace-common.h.
7630 (btrace_target_info): Removed.
7631 (supports_btrace, target_supports_btrace): Update parameters.
7633 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7635 * Makefile.in (SFILES): Add common/btrace-common.c.
7636 (OBS): Add common/btrace-common.o.
7637 (btrace-common.o): Add build rules.
7638 * linux-low: Include btrace-common.h.
7639 (linux_low_read_btrace): Use struct btrace_data. Call
7640 btrace_data_init and btrace_data_fini.
7642 2015-02-06 Pedro Alves <palves@redhat.com>
7644 * thread-db.c (find_new_threads_callback): Add debug output.
7646 2015-02-04 Pedro Alves <palves@redhat.com>
7648 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7649 (resume_stopped_resumed_lwps): New function.
7650 (linux_wait_for_event_filtered): Use it.
7652 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7654 * Makefile.in (SFILES): Add linux-personality.c.
7655 (linux-personality.o): New rule.
7656 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7657 list of objects to be built.
7658 * linux-low.c: Include nat/linux-personality.h.
7659 (linux_create_inferior): Remove code to disable address space
7660 randomization (moved to ../nat/linux-personality.c). Create
7661 cleanup to disable address space randomization.
7663 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7665 * Makefile.in (posix-strerror.o): New rule.
7666 (mingw-strerror.o): Likewise.
7667 * configure: Regenerated.
7668 * configure.ac: Source file ../common/common.host. Initialize new
7669 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7671 2015-01-14 Yao Qi <yao@codesourcery.com>
7673 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7674 (ppc-linux.o): New rule.
7675 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7676 * configure.ac: AC_CHECK_FUNCS(getauxval).
7677 * config.in: Re-generated.
7678 * configure: Re-generated.
7679 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7680 ppc64_64bit_inferior_p
7682 2015-01-14 Yao Qi <yao@codesourcery.com>
7684 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7685 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7686 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7687 (PT_ORIG_R3, PT_TRAP): Likewise.
7688 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7689 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7690 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7692 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7694 * i387-fp.c (i387_cache_to_xsave): In look over
7695 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7696 zmmh_low_space field by use of zmmh_high_space.
7698 2015-01-09 Pedro Alves <palves@redhat.com>
7700 * linux-low.c (step_over_bkpt): Move higher up in the file.
7701 (handle_extended_wait): Don't store the stop_pc here.
7702 (get_stop_pc): Adjust comments and rename to ...
7703 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7704 stopped for a software breakpoint or hardware breakpoint.
7705 (thread_still_has_status_pending_p): New function.
7706 (status_pending_p_callback): Use
7707 thread_still_has_status_pending_p. If the event is no longer
7708 interesting, resume the LWP.
7709 (handle_tracepoints): Add assert.
7710 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7711 (wstatus_maybe_breakpoint): New function.
7712 (cancel_breakpoint): Delete function.
7713 (check_stopped_by_watchpoint): New function, factored out from
7714 linux_low_filter_event.
7715 (lp_status_maybe_breakpoint): Delete function.
7716 (linux_low_filter_event): Remove filter_ptid argument.
7717 Leave thread group exits pending here. Store the LWP's stop PC.
7718 Always leave events pending.
7719 (linux_wait_for_event_filtered): Pull all events out of the
7720 kernel, and leave them all pending.
7721 (count_events_callback, select_event_lwp_callback): Consider all
7723 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7724 (select_event_lwp): Only give preference to the stepping LWP in
7725 all-stop mode. Adjust comments.
7726 (ignore_event): New function.
7727 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7728 references to cancel_breakpoints. Adjust to renames. Also give
7729 equal priority to all LWPs that have had events in non-stop mode.
7730 If reporting a software breakpoint event, unadjust the LWP's PC.
7731 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7732 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7734 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7735 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7736 (linux_stopped_by_watchpoint): Adjust.
7737 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7738 * linux-low.h (enum lwp_stop_reason): New.
7739 (struct lwp_info) <stop_pc>: Adjust comment.
7740 <stopped_by_watchpoint>: Delete field.
7741 <stop_reason>: New field.
7742 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7743 * mem-break.c (software_breakpoint_inserted_here)
7744 (hardware_breakpoint_inserted_here): New function.
7745 * mem-break.h (software_breakpoint_inserted_here)
7746 (hardware_breakpoint_inserted_here): Declare.
7747 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7748 (cancel_breakpoints): Delete.
7749 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7750 (upload_fast_traceframes): Remove references to
7753 2015-01-09 Pedro Alves <palves@redhat.com>
7755 * thread-db.c (find_new_threads_callback): Ignore thread if the
7756 kernel thread ID is -1.
7758 2015-01-09 Pedro Alves <palves@redhat.com>
7760 * linux-low.c (linux_attach_fail_reason_string): Move to
7761 nat/linux-ptrace.c, and rename.
7762 (linux_attach_lwp): Update comment.
7763 (attach_proc_task_lwp_callback): New function.
7764 (linux_attach): Adjust to rename and use
7765 linux_proc_attach_tgid_threads.
7766 (linux_attach_fail_reason_string): Delete declaration.
7768 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7770 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7771 * server.c (gdbserver_version): Likewise.
7773 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7775 * remote-utils.c: Include ctype.h.
7776 (input_interrupt): Explicitly handle the case when the char
7777 received is the NUL byte. Improve the printing of non-ASCII
7780 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7782 * linux-low.c (linux_low_filter_event): Update call to
7783 linux_enable_event_reporting following the addition of
7784 a new parameter to that function.
7786 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7789 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7790 (AARCH64_FPCR_REGNO): Likewise.
7791 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7792 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7793 (aarch64_store_fpregset): Likewise.
7795 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7797 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7798 Remove FIXME comment about assumption about N.
7800 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7802 * configure.ac: If large-file support is disabled in GDBserver,
7803 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7804 * configure: Regenerate.
7806 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7808 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7809 warning upon ENODATA from ptrace.
7810 * linux-s390-low.c (s390_store_tdb): New.
7811 (s390_regsets): Add regset for NT_S390_TDB.
7813 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7815 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7816 without a fill_function.
7817 * linux-s390-low.c (s390_fill_last_break): Remove.
7818 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7819 (s390_arch_setup): Use regset's size instead of fill_function for
7822 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7824 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7825 the regset's store function when ptrace returned an error.
7826 * regcache.c (get_thread_regcache): Invalidate register cache
7827 before fetching inferior's registers.
7829 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7831 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7832 while-loop as for-loop.
7833 (regsets_store_inferior_registers): Likewise.
7835 2014-11-28 Yao Qi <yao@codesourcery.com>
7837 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7838 * config.in, configure: Re-generate.
7839 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7842 2014-11-21 Yao Qi <yao@codesourcery.com>
7844 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7845 (AC_CHECK_HEADERS): Remove malloc.h.
7846 * configure: Re-generated.
7847 * config.in: Re-generated.
7848 * server.h: Don't include alloca.h and malloc.h.
7849 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7850 Don't include malloc.h.
7852 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7854 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7855 corresponding ERRNO check in same block.
7857 2014-11-12 Pedro Alves <palves@redhat.com>
7859 * server.c (cont_thread): Update comment.
7860 (start_inferior, attach_inferior): No longer clear cont_thread.
7861 (handle_v_cont): No longer set cont_thread.
7862 (captured_main): Clear cont_thread each time a GDB connects.
7864 2014-11-12 Pedro Alves <palves@redhat.com>
7866 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7867 thread, and don't resume all threads if the Hc thread has exited.
7869 2014-11-12 Pedro Alves <palves@redhat.com>
7871 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7872 the process group instead of to a specific LWP.
7874 2014-10-15 Pedro Alves <palves@redhat.com>
7877 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7879 (arm_set_thread_context): Delete.
7880 (the_low_target): Adjust.
7881 * win32-i386-low.c (debug_registers_changed)
7882 (debug_registers_used): Delete.
7883 (update_debug_registers_callback): New function.
7884 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7885 needing to update their debug registers.
7886 (win32_get_current_dr): New function.
7887 (x86_dr_low_get_addr, x86_dr_low_get_control)
7888 (x86_dr_low_get_status): Fetch the debug register from the thread
7890 (i386_initial_stuff): Adjust.
7891 (i386_get_thread_context): Remove current_event parameter. Don't
7892 clear debug_registers_changed nor copy DR values to
7894 (i386_set_thread_context): Delete.
7895 (i386_prepare_to_resume): New function.
7896 (i386_thread_added): Mark the thread as needing to update irs
7898 (the_low_target): Remove i386_set_thread_context and install
7899 i386_prepare_to_resume.
7900 * win32-low.c (win32_get_thread_context): Adjust.
7901 (win32_set_thread_context): Use SetThreadContext
7903 (win32_prepare_to_resume): New function.
7904 (win32_require_context): New function, factored out from ...
7905 (thread_rec): ... this.
7906 (continue_one_thread): Call win32_prepare_to_resume on each thread
7907 we're about to continue.
7908 (win32_resume): Call win32_prepare_to_resume on the event thread.
7909 * win32-low.h (struct win32_thread_info)
7910 <debug_registers_changed>: New field.
7911 (struct win32_target_ops): Change prototype of set_thread_context,
7912 delete set_thread_context and add prepare_to_resume.
7913 (win32_require_context): New declaration.
7915 2014-10-08 Gary Benson <gbenson@redhat.com>
7917 * server.h: Do not include common-exceptions.h.
7919 2014-10-08 Gary Benson <gbenson@redhat.com>
7921 * server.h: Do not include cleanups.h.
7923 2014-09-30 James Hogan <james.hogan@imgtec.com>
7925 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7928 2014-09-23 Yao Qi <yao@codesourcery.com>
7930 * linux-low.c (lp_status_maybe_breakpoint): New function.
7931 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7932 (count_events_callback): Likewise.
7933 (select_event_lwp_callback): Likewise.
7934 (cancel_breakpoints_callback): Likewise.
7936 2014-09-19 Don Breazeal <donb@codesourcery.com>
7938 * linux-low.c (handle_extended_wait): Call
7939 linux_ptrace_get_extended_event.
7940 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7941 linux_is_extended_waitstatus.
7943 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7945 * Makefile.in (CPPFLAGS): Define.
7946 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7947 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7949 2014-09-16 Gary Benson <gbenson@redhat.com>
7951 * inferiors.h (current_inferior): Renamed as...
7952 (current_thread): New variable. All uses updated.
7953 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7954 (maybe_move_out_of_jump_pad): Likewise.
7955 (cancel_breakpoint): Likewise.
7956 (linux_low_filter_event): Likewise.
7957 (wait_for_sigstop): Likewise.
7958 (linux_resume_one_lwp): Likewise.
7959 (need_step_over_p): Likewise.
7960 (start_step_over): Likewise.
7961 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7962 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7963 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7964 and save_inferior as saved_thread.
7965 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7967 (regcache_invalidate_thread): Likewise.
7968 * remote-utils.c (prepare_resume_reply): Likewise.
7969 * thread-db.c (thread_db_get_tls_address): Likewise.
7970 (disable_thread_event_reporting): Likewise.
7971 (remove_thread_event_breakpoints): Likewise.
7972 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7974 * target.h (set_desired_inferior): Renamed as...
7975 (set_desired_thread): New declaration. All uses updated.
7976 * server.c (myresume): Updated comment to reference thread instead
7978 (handle_serial_event): Likewise.
7979 (handle_target_event): Likewise.
7981 2014-09-12 Tom Tromey <tromey@redhat.com>
7982 Gary Benson <gbenson@redhat.com>
7984 * regcache.h: Include common-regcache.h.
7985 (regcache_read_pc): Don't declare.
7986 * regcache.c (get_thread_regcache_for_ptid): New function.
7988 2014-09-11 Tom Tromey <tromey@redhat.com>
7989 Gary Benson <gbenson@redhat.com>
7991 * symbol.c: New file.
7992 * Makefile.in (SFILES): Add symbol.c.
7993 (OBS): Add symbol.o.
7995 2014-09-11 Gary Benson <gbenson@redhat.com>
7997 * target.c (target_stop_ptid, target_continue_ptid): New
8000 2014-09-11 Tom Tromey <tromey@redhat.com>
8001 Gary Benson <gbenson@redhat.com>
8003 * target.h: Include target/target.h.
8004 * target.c (target_read_memory, target_read_uint32)
8005 (target_write_memory): New functions.
8007 2014-09-11 Gary Benson <gbenson@redhat.com>
8009 * server.h (debug_hw_points): Don't declare.
8010 * server.c (debug_hw_points): Don't define. Replace all uses
8011 with show_debug_regs.
8012 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8013 all uses with show_debug_regs.
8015 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8017 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8018 endianness into account.
8019 (ppc_supply_ptrace_register): Likewise.
8021 2014-09-03 James Hogan <james.hogan@imgtec.com>
8023 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8024 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8026 2014-09-03 Gary Benson <gbenson@redhat.com>
8028 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8029 ALL_DEBUG_ADDRESS_REGISTERS.
8031 2014-09-02 Gary Benson <gbenson@redhat.com>
8033 * i386-low.h: Renamed as...
8034 * x86-low.h: New file. All type, function and variable name
8035 prefixes changed from "i386_" to "x86_". All references updated.
8036 * i386-low.c: Renamed as...
8037 * x86-low.c: New file. All type, function and variable name
8038 prefixes changed from "i386_" to "x86_". All references updated.
8040 2014-09-02 Gary Benson <gbenson@redhat.com>
8042 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8043 (x86_linux_new_thread): Likewise.
8045 2014-08-29 Gary Benson <gbenson@redhat.com>
8047 * server.h (setjmp.h): Do not include.
8048 (toplevel): Do not declare.
8049 (common-exceptions.h): Include.
8050 (cleanups.h): Likewise.
8051 * server.c (toplevel): Do not define.
8052 (exit_code): New static global.
8053 (detach_or_kill_for_exit_cleanup): New function.
8054 (main): New function. Original main renamed to...
8055 (captured_main): New function.
8056 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8058 2014-08-29 Gary Benson <gbenson@redhat.com>
8060 * Makefile.in (SFILES): Add common/common-exceptions.c.
8061 (OBS): Add common-exceptions.o.
8062 (common-exceptions.o): New rule.
8063 * utils.c (prepare_to_throw_exception): New function.
8065 2014-08-29 Gary Benson <gbenson@redhat.com>
8067 * config.in: Regenerate.
8068 * configure: Likewise.
8070 2014-08-29 Gary Benson <gbenson@redhat.com>
8072 * Makefile.in (SFILES): Add common/cleanups.c.
8074 (cleanups.o): New rule.
8076 2014-08-29 Gary Benson <gbenson@redhat.com>
8078 * utils.c (internal_vwarning): New function.
8080 2014-08-28 Gary Benson <gbenson@redhat.com>
8082 * utils.h (fatal): Remove declaration.
8083 * utils.c (fatal): Remove function.
8085 2014-08-28 Gary Benson <gbenson@redhat.com>
8087 * tracepoint.c (gdb_agent_init): Replace fatal with
8089 (initialize_tracepoint): Likewise.
8091 2014-08-28 Gary Benson <gbenson@redhat.com>
8093 * remote-utils.c (remote_prepare): Replace fatal with error.
8095 2014-08-28 Gary Benson <gbenson@redhat.com>
8097 * linux-low.c (linux_async): Replace fatal with warning.
8099 (linux_start_non_stop): Return -1 if linux_async failed.
8101 2014-08-28 Gary Benson <gbenson@redhat.com>
8103 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8105 (i386_dr_low_get_addr): Remove vague comment.
8106 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8109 2014-08-28 Gary Benson <gbenson@redhat.com>
8111 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8112 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8114 (linux_resume_one_lwp): Likewise.
8115 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8117 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8118 with internal_error.
8119 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8120 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8121 (find_register_by_name): Replace fatal with internal_error.
8122 (find_regno): Likewise.
8123 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8124 * thread-db.c (thread_db_create_event): Likewise.
8125 (thread_db_load_search): Likewise.
8126 (try_thread_db_load_1): Likewise.
8127 * tracepoint.c (get_jump_space_head): Replace fatal with
8129 (claim_trampoline_space): Likewise.
8130 (have_fast_tracepoint_trampoline_buffer): Likewise.
8131 (cmd_qtstart): Likewise.
8132 (stop_tracing): Likewise.
8133 (fast_tracepoint_collecting): Likewise.
8134 (target_malloc): Likewise.
8135 (download_tracepoint): Likewise.
8136 (download_trace_state_variables): Replace check with gdb_assert.
8137 (upload_fast_traceframes): Replace fatal with internal_error.
8139 2014-08-19 Tom Tromey <tromey@redhat.com>
8140 Gary Benson <gbenson@redhat.com>
8142 * Makefile.in (SFILES): Add common/common-debug.c.
8143 (OBS): Add common-debug.o.
8144 (common-debug.o): New rule.
8145 * debug.h (debug_printf): Don't declare.
8146 * debug.c (debug_printf): Renamed and rewritten as...
8147 (debug_vprintf): New function.
8149 2014-08-19 Gary Benson <gbenson@redhat.com>
8151 * utils.h: Do not include print-utils.h.
8153 2014-08-19 Tom Tromey <tromey@redhat.com>
8154 Gary Benson <gbenson@redhat.com>
8156 * server.h: Add static assertion.
8157 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8159 2014-08-19 Tom Tromey <tromey@redhat.com>
8160 Gary Benson <gbenson@redhat.com>
8162 * Makefile.in (SFILES): Add common/errors.c.
8163 (OBS): Add errors.o.
8164 (IPA_OBS): Add errors-ipa.o.
8165 (errors.o): New rule.
8166 (errors-ipa.o): Likewise.
8167 * utils.h (perror_with_name, error, warning): Don't declare.
8168 * utils.c (warning): Renamed and rewritten as...
8169 (vwarning): New function.
8170 (error): Renamed and rewritten as...
8171 (verror): New function.
8172 (internal_error): Renamed and rewritten as...
8173 (internal_verror): New function.
8175 2014-08-07 Gary Benson <gbenson@redhat.com>
8177 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8178 * configure: Regenerate.
8179 * config.in: Likewise.
8180 * server.h: Do not include errno.h.
8181 * event-loop.c: Likewise.
8182 * hostio-errno.c: Likewise.
8183 * linux-low.c: Likewise.
8184 * remote-utils.c: Likewise.
8185 * spu-low.c: Likewise.
8186 * utils.c: Likewise.
8187 * gdbreplay.c: Unconditionally include errno.h.
8189 2014-08-07 Gary Benson <gbenson@redhat.com>
8191 * server.h: Do not include string.h.
8192 * event-loop.c: Likewise.
8193 * linux-low.c: Likewise.
8194 * regcache.c: Likewise.
8195 * remote-utils.c: Likewise.
8196 * spu-low.c: Likewise.
8197 * utils.c: Likewise.
8199 2014-08-07 Gary Benson <gbenson@redhat.com>
8201 * server.h: Do not include gdb_assert.h.
8203 2014-08-07 Gary Benson <gbenson@redhat.com>
8205 * server.h: Do not include common-utils.h.
8207 2014-08-07 Gary Benson <gbenson@redhat.com>
8209 * server.h: Do not include ptid.h.
8210 * notif.h: Likewise.
8212 2014-08-07 Gary Benson <gbenson@redhat.com>
8214 * server.h: Do not include gdb_locale.h.
8216 2014-08-07 Gary Benson <gbenson@redhat.com>
8218 * server.h: Do not include gdb/signals.h.
8219 * win32-low.c: Likewise.
8221 2014-08-07 Gary Benson <gbenson@redhat.com>
8223 * server.h: Do not include pathmax.h.
8225 2014-08-07 Gary Benson <gbenson@redhat.com>
8227 * server.h: Do not include libiberty.h.
8228 * linux-bfin-low.c: Likewise.
8230 2014-08-07 Gary Benson <gbenson@redhat.com>
8232 * server.h: Do not include ansidecl.h.
8234 2014-08-07 Gary Benson <gbenson@redhat.com>
8236 * linux-x86-low.c: Do not include stddef.h.
8237 * lynx-ppc-low.c: Likewise.
8238 * tracepoint.c: Likewise.
8240 2014-08-07 Gary Benson <gbenson@redhat.com>
8242 * server.h: Do not include stdarg.h.
8243 * nto-low.c: Likewise.
8245 2014-08-07 Gary Benson <gbenson@redhat.com>
8247 * server.h: Do not include stdlib.h.
8248 * inferiors.c: Likewise.
8249 * linux-low.c: Likewise.
8250 * regcache.c: Likewise.
8251 * spu-low.c: Likewise.
8252 * tracepoint.c: Likewise.
8253 * utils.c: Likewise.
8255 2014-08-07 Gary Benson <gbenson@redhat.com>
8257 * server.h: Do not include stdio.h.
8258 * linux-low.c: Likewise.
8259 * remote-utils.c: Likewise.
8260 * spu-low.c: Likewise.
8261 * utils.c: Likewise.
8262 * wincecompat.c: Likewise.
8264 2014-08-06 Gary Benson <gbenson@redhat.com>
8266 * regcache.c (init_register_cache): Move conditionals inside if.
8268 2014-08-06 Gary Benson <gbenson@redhat.com>
8270 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8272 2014-07-31 Gary Benson <gbenson@redhat.com>
8274 * ax.h: Do not include server.h.
8275 * gdbthread.h: Likewise.
8276 * lynx-low.h: Likewise.
8277 * notif.h: Likewise.
8279 2014-07-30 Gary Benson <gbenson@redhat.com>
8281 * server.h: Include common-defs.h.
8282 Do not include config.h or build-gnulib-gdbserver/config.h.
8284 2014-07-30 Gary Benson <gbenson@redhat.com>
8286 * hostio-errno.c: Move server.h to top of includes list.
8287 * inferiors.c: Likewise.
8288 * linux-x86-low.c: Likewise.
8289 * notif.c: Include server.h.
8291 2014-07-24 Tom Tromey <tromey@redhat.com>
8292 Gary Benson <gbenson@redhat.com>
8294 * server.h (CORE_ADDR): Now unsigned.
8296 2014-07-16 Pedro Alves <palves@redhat.com>
8298 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8300 2014-07-15 Pedro Alves <palves@redhat.com>
8302 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8305 2014-07-11 Pedro Alves <palves@redhat.com>
8307 * linux-low.c (kill_wait_lwp): New function, based on
8308 kill_one_lwp_callback, but use my_waitpid directly.
8309 (kill_one_lwp_callback, linux_kill): Use it.
8311 2014-06-23 Pedro Alves <palves@redhat.com>
8313 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8314 before setting DR0..DR3.
8316 2014-06-20 Gary Benson <gbenson@redhat.com>
8318 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8319 * configure: Regenerated.
8320 * config.in: Likewise.
8322 2014-06-20 Gary Benson <gbenson@redhat.com>
8324 * Makefile.in (SFILES): Update locations for files moved
8326 (object file files): Reordered.
8328 2014-06-20 Gary Benson <gbenson@redhat.com>
8330 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8331 (i386_dr_low_set_addr): Likewise.
8332 (i386_dr_low_get_addr): Likewise.
8333 (i386_dr_low_can_set_control): Likewise.
8334 (i386_dr_low_set_control): Likewise.
8335 (i386_dr_low_get_control): Likewise.
8336 (i386_dr_low_get_status): Likewise.
8337 (i386_get_debug_register_length): Likewise.
8338 * linux-x86-low.c (i386_dr_low_set_addr):
8339 Changed signature. Made static.
8340 (i386_dr_low_get_addr): Likewise.
8341 (i386_dr_low_set_control): Likewise.
8342 (i386_dr_low_get_control): Likewise.
8343 (i386_dr_low_get_status): Likewise.
8344 (i386_dr_low): New global variable.
8345 * win32-i386-low.c (i386_dr_low_set_addr):
8346 Changed signature. Made static.
8347 (i386_dr_low_get_addr): Likewise.
8348 (i386_dr_low_set_control): Likewise.
8349 (i386_dr_low_get_control): Likewise.
8350 (i386_dr_low_get_status): Likewise.
8351 (i386_dr_low): New global variable.
8353 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8355 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8356 * Makefile.in (AR, AR_FLAGS): Define.
8357 * configure: Regenerate.
8359 2014-06-19 Gary Benson <gbenson@redhat.com>
8361 * Makefile.in (i386-dregs.o): New rule.
8362 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8363 * i386-low.c (target.h): Remove include.
8364 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8365 (DR_CONTROL_SHIFT): Likewise.
8366 (DR_CONTROL_SIZE): Likewise.
8367 (DR_RW_EXECUTE): Likewise.
8368 (DR_RW_WRITE): Likewise.
8369 (DR_RW_READ): Likewise.
8370 (DR_RW_IORW): Likewise.
8371 (DR_LEN_1): Likewise.
8372 (DR_LEN_2): Likewise.
8373 (DR_LEN_4): Likewise.
8374 (DR_LEN_8): Likewise.
8375 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8376 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8377 (DR_ENABLE_SIZE): Likewise.
8378 (DR_LOCAL_SLOWDOWN): Likewise.
8379 (DR_GLOBAL_SLOWDOWN): Likewise.
8380 (DR_CONTROL_RESERVED): Likewise.
8381 (I386_DR_CONTROL_MASK): Likewise.
8382 (I386_DR_VACANT): Likewise.
8383 (I386_DR_LOCAL_ENABLE): Likewise.
8384 (I386_DR_GLOBAL_ENABLE): Likewise.
8385 (I386_DR_DISABLE): Likewise.
8386 (I386_DR_SET_RW_LEN): Likewise.
8387 (I386_DR_GET_RW_LEN): Likewise.
8388 (I386_DR_WATCH_HIT): Likewise.
8389 (i386_wp_op_t): Likewise.
8390 (i386_show_dr): Likewise.
8391 (i386_length_and_rw_bits): Likewise.
8392 (i386_insert_aligned_watchpoint): Likewise.
8393 (i386_remove_aligned_watchpoint): Likewise.
8394 (i386_handle_nonaligned_watchpoint): Likewise.
8395 i386_update_inferior_debug_regs(): Likewise.
8396 (i386_dr_insert_watchpoint): Likewise.
8397 (i386_dr_remove_watchpoint): Likewise.
8398 (i386_dr_region_ok_for_watchpoint): Likewise.
8399 (i386_dr_stopped_data_address): Likewise.
8400 (i386_dr_stopped_by_watchpoint): Likewise.
8402 2014-06-19 Gary Benson <gbenson@redhat.com>
8404 * i386-low.c (i386_dr_show): Renamed to
8405 i386_show_dr and made static. All uses updated.
8406 (i386_dr_length_and_rw_bits): Renamed to
8407 i386_length_and_rw_bits and made static.
8409 (i386_dr_insert_aligned_watchpoint): Renamed to
8410 i386_insert_aligned_watchpoint and made static.
8412 (i386_dr_remove_aligned_watchpoint): Renamed to
8413 i386_remove_aligned_watchpoint and made static.
8415 (i386_dr_update_inferior_debug_regs): Renamed to
8416 i386_update_inferior_debug_regs and made static.
8419 2014-06-18 Gary Benson <gbenson@redhat.com>
8421 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8422 (i386_dr_low_can_set_control): Likewise.
8423 (i386_get_debug_register_length): Likewise.
8424 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8425 (i386_dr_low_can_set_control): Likewise.
8426 (i386_get_debug_register_length): Likewise.
8428 2014-06-17 Gary Benson <gbenson@redhat.com>
8430 * i386-low.h (i386-dregs.h): New include.
8431 (DR_FIRSTADDR): Now in i386-dregs.h.
8432 (DR_LASTADDR): Likewise.
8433 (DR_NADDR): Likewise.
8434 (DR_STATUS): Likewise.
8435 (DR_CONTROL): Likewise.
8436 (i386_debug_reg_state): Likewise.
8437 (i386_dr_insert_watchpoint): Likewise.
8438 (i386_dr_remove_watchpoint): Likewise.
8439 (i386_dr_region_ok_for_watchpoint): Likewise.
8440 (i386_dr_stopped_data_address): Likewise.
8441 (i386_dr_stopped_by_watchpoint): Likewise.
8442 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8444 2014-06-18 Gary Benson <gbenson@redhat.com>
8446 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8447 i386_dr_insert_watchpoint.
8448 (i386_low_remove_watchpoint): Renamed to
8449 i386_dr_remove_watchpoint.
8450 (i386_low_region_ok_for_watchpoint): Renamed to
8451 i386_dr_region_ok_for_watchpoint.
8452 (i386_low_stopped_data_address): Renamed to
8453 i386_dr_stopped_data_address.
8454 (i386_low_stopped_by_watchpoint): Renamed to
8455 i386_dr_stopped_by_watchpoint.
8456 * i386-low.c (i386_show_dr): Renamed to
8457 i386_dr_show and made nonstatic. All uses updated.
8458 (i386_length_and_rw_bits): Renamed to
8459 i386_dr_length_and_rw_bits and made nonstatic.
8461 (i386_insert_aligned_watchpoint): Renamed to
8462 i386_dr_insert_aligned_watchpoint and made nonstatic.
8464 (i386_remove_aligned_watchpoint): Renamed to
8465 i386_dr_remove_aligned_watchpoint and made nonstatic.
8467 (i386_update_inferior_debug_regs): Renamed to
8468 i386_dr_update_inferior_debug_regs and made nonstatic.
8470 (i386_low_insert_watchpoint): Renamed to
8471 i386_dr_insert_watchpoint. All uses updated.
8472 (i386_low_remove_watchpoint): Renamed to
8473 i386_dr_remove_watchpoint. All uses updated.
8474 (i386_low_region_ok_for_watchpoint): Renamed to
8475 i386_dr_region_ok_for_watchpoint. All uses updated.
8476 (i386_low_stopped_data_address): Renamed to
8477 i386_dr_stopped_data_address. All uses updated.
8478 (i386_low_stopped_by_watchpoint): Renamed to
8479 i386_dr_stopped_by_watchpoint. All uses updated.
8481 2014-06-18 Gary Benson <gbenson@redhat.com>
8483 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8484 (i386_dr_low_can_set_control): Likewise.
8485 (i386_insert_aligned_watchpoint): New check.
8487 2014-06-18 Gary Benson <gbenson@redhat.com>
8489 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8492 2014-06-18 Gary Benson <gbenson@redhat.com>
8494 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8495 instead of fatal and error.
8496 (i386_handle_nonaligned_watchpoint): Likewise.
8498 2014-06-18 Gary Benson <gbenson@redhat.com>
8500 * i386-low.c (i386_get_debug_register_length): New macro.
8501 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8502 (i386_show_dr): Use debug_printf instead of fprintf. Use
8503 phex to format values.
8505 2014-06-18 Gary Benson <gbenson@redhat.com>
8507 * i386-low.h: Comment changes.
8508 * i386-low.c: Likewise.
8510 2014-06-18 Gary Benson <gbenson@redhat.com>
8512 * i386-low.c: Whitespace changes.
8514 2014-06-12 Tom Tromey <tromey@redhat.com>
8516 * utils.c (freeargv): Remove.
8518 2014-06-12 Tom Tromey <tromey@redhat.com>
8520 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8521 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8522 (parse_debug_format_options): Likewise.
8523 (gdbserver_usage): Likewise.
8524 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8525 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8526 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8528 ($(LIBGNU)): Depend on libiberty.
8529 (all-lib): Recurse into all subdirs.
8530 (install-only): Invoke "install" target in subdirs.
8531 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8533 * configure: Rebuild.
8534 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8535 for vasprintf, vsnprintf, or gettimeofday.
8536 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8539 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8541 * development.sh: Delete.
8542 * Makefile.in (config.status): Adjust dependency on development.sh.
8543 * configure.ac: Adjust development.sh source call.
8544 * configure: Regenerate.
8546 2014-06-02 Pedro Alves <palves@redhat.com>
8548 * ax.c (gdb_free_agent_expr): New function.
8549 * ax.h (gdb_free_agent_expr): New declaration.
8550 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8552 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8554 (clear_breakpoint_conditions_and_commands): New function.
8555 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8556 (clear_breakpoint_conditions_and_commands): New declaration.
8558 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8560 * linux-aarch64-low.c (asm/ptrace.h): Include.
8562 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8564 Fix TLS access for -static -pthread.
8565 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8566 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8567 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8569 2014-05-20 Pedro Alves <palves@redhat.com>
8571 * linux-aarch64-low.c (aarch64_insert_point)
8572 (aarch64_remove_point): No longer check whether the type is
8573 supported here. Adjust to new interface.
8574 (the_low_target): Install aarch64_supports_z_point_type as
8575 supports_z_point_type method.
8576 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8577 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8578 instead of a Z packet char. Adjust.
8579 (arm_supports_z_point_type): New function.
8580 (arm_insert_point, arm_remove_point): Adjust to new interface.
8581 (the_low_target): Install arm_supports_z_point_type.
8582 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8583 (cris_insert_point, cris_remove_point): Adjust to new interface.
8584 Don't check whether the type is supported here.
8585 (the_low_target): Install cris_supports_z_point_type.
8586 * linux-low.c (linux_supports_z_point_type): New function.
8587 (linux_insert_point, linux_remove_point): Adjust to new interface.
8588 * linux-low.h (struct linux_target_ops) <insert_point,
8589 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8590 raw_breakpoint pointer parameter.
8591 <supports_z_point_type>: New method.
8592 * linux-mips-low.c (mips_supports_z_point_type): New function.
8593 (mips_insert_point, mips_remove_point): Adjust to new interface.
8594 Use mips_supports_z_point_type.
8595 (the_low_target): Install mips_supports_z_point_type.
8596 * linux-ppc-low.c (the_low_target): Install NULL as
8597 supports_z_point_type method.
8598 * linux-s390-low.c (the_low_target): Install NULL as
8599 supports_z_point_type method.
8600 * linux-sparc-low.c (the_low_target): Install NULL as
8601 supports_z_point_type method.
8602 * linux-x86-low.c (x86_supports_z_point_type): New function.
8603 (x86_insert_point): Adjust to new insert_point interface. Use
8604 insert_memory_breakpoint. Adjust to new
8605 i386_low_insert_watchpoint interface.
8606 (x86_remove_point): Adjust to remove_point interface. Use
8607 remove_memory_breakpoint. Adjust to new
8608 i386_low_remove_watchpoint interface.
8609 (the_low_target): Install x86_supports_z_point_type.
8610 * lynx-low.c (lynx_target_ops): Install NULL as
8611 supports_z_point_type callback.
8612 * nto-low.c (nto_supports_z_point_type): New.
8613 (nto_insert_point, nto_remove_point): Adjust to new interface.
8614 (nto_target_ops): Install nto_supports_z_point_type.
8615 * mem-break.c: Adjust intro comment.
8616 (struct raw_breakpoint) <raw_type, size>: New fields.
8617 <inserted>: Update comment.
8618 <shlib_disabled>: Delete field.
8619 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8620 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8621 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8622 (raw_bkpt_type_to_target_hw_bp_type): New function.
8623 (find_enabled_raw_code_breakpoint_at): New function.
8624 (find_raw_breakpoint_at): New type and size parameters. Use them.
8625 (insert_memory_breakpoint): New function, based off
8626 set_raw_breakpoint_at.
8627 (remove_memory_breakpoint): New function.
8628 (set_raw_breakpoint_at): Reimplement.
8629 (set_breakpoint): New, based on set_breakpoint_at.
8630 (set_breakpoint_at): Reimplement.
8631 (delete_raw_breakpoint): Go through the_target->remove_point
8632 instead of assuming memory breakpoints.
8633 (find_gdb_breakpoint_at): Delete.
8634 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8635 (find_gdb_breakpoint): New function.
8636 (set_gdb_breakpoint_at): Delete.
8637 (z_type_supported): New function.
8638 (set_gdb_breakpoint_1): New function, loosely based off
8639 set_gdb_breakpoint_at.
8640 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8641 (delete_gdb_breakpoint_at): Delete.
8642 (delete_gdb_breakpoint_1): New function, loosely based off
8643 delete_gdb_breakpoint_at.
8644 (delete_gdb_breakpoint): New function.
8645 (clear_gdb_breakpoint_conditions): Rename to ...
8646 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8648 (add_condition_to_breakpoint): Make static.
8649 (add_breakpoint_condition): Take a struct breakpoint pointer
8650 instead of an address. Adjust.
8651 (gdb_condition_true_at_breakpoint): Rename to ...
8652 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8654 (gdb_condition_true_at_breakpoint): Reimplement.
8655 (add_breakpoint_commands): Take a struct breakpoint pointer
8656 instead of an address. Adjust.
8657 (gdb_no_commands_at_breakpoint): Rename to ...
8658 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8659 parameter. Return true if no breakpoint was found. Change debug
8661 (gdb_no_commands_at_breakpoint): Reimplement.
8662 (run_breakpoint_commands): Rename to ...
8663 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8664 and change return type to boolean.
8665 (run_breakpoint_commands): New function.
8666 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8667 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8668 breakpoint. Go through the_target->remove_point instead of
8669 assuming memory breakpoint.
8670 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8671 software and hardware breakpoints.
8672 (reinsert_raw_breakpoint): Go through the_target->insert_point
8673 instead of assuming memory breakpoint.
8674 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8675 software and hardware breakpoints.
8676 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8677 Check both software and hardware breakpoints.
8678 (validate_inserted_breakpoint): Assert the breakpoint is a
8679 software breakpoint. Set the inserted flag to -1 instead of
8680 setting shlib_disabled.
8681 (delete_disabled_breakpoints): Adjust.
8682 (validate_breakpoints): Only validate software breakpoints.
8683 Adjust to inserted flag change.
8684 (check_mem_read, check_mem_write): Skip breakpoint types other
8685 than software breakpoints. Adjust to inserted flag change.
8686 * mem-break.h (enum raw_bkpt_type): New enum.
8687 (raw_breakpoint, struct process_info): Forward declare.
8688 (Z_packet_to_target_hw_bp_type): Delete declaration.
8689 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8690 (set_gdb_breakpoint, delete_gdb_breakpoint)
8691 (clear_breakpoint_conditions): New declarations.
8692 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8693 (breakpoint_inserted_here): Update comment.
8694 (add_breakpoint_condition, add_breakpoint_commands): Replace
8695 address parameter with a breakpoint pointer parameter.
8696 (gdb_breakpoint_here): Update comment.
8697 (delete_gdb_breakpoint_at): Delete.
8698 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8699 * server.c (process_point_options): Take a struct breakpoint
8700 pointer instead of an address. Adjust.
8701 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8702 delete_gdb_breakpoint.
8703 * spu-low.c (spu_target_ops): Install NULL as
8704 supports_z_point_type method.
8705 * target.h: Include mem-break.h.
8706 (struct target_ops) <prepare_to_access_memory>: Update comment.
8707 <supports_z_point_type>: New field.
8708 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8709 instead of a char. Also take a raw breakpoint pointer.
8710 * win32-arm-low.c (the_low_target): Install NULL as
8711 supports_z_point_type.
8712 * win32-i386-low.c (i386_supports_z_point_type): New function.
8713 (i386_insert_point, i386_remove_point): Adjust to new interface.
8714 (the_low_target): Install i386_supports_z_point_type.
8715 * win32-low.c (win32_supports_z_point_type): New function.
8716 (win32_insert_point, win32_remove_point): Adjust to new interface.
8717 (win32_target_ops): Install win32_supports_z_point_type.
8718 * win32-low.h (struct win32_target_ops):
8719 <supports_z_point_type>: New method.
8720 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8721 instead of a char. Also take a raw breakpoint pointer.
8723 2014-05-20 Pedro Alves <palves@redhat.com>
8725 * mem-break.h: Include break-common.h.
8726 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8727 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8728 (Z_packet_to_target_hw_bp_type): New declaration.
8729 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8730 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8731 (Z_PACKET_ACCESS_WP): Delete macros.
8732 (Z_packet_to_hw_type): Delete function.
8733 * i386-low.h: Don't include break-common.h here.
8734 (Z_packet_to_hw_type): Delete declaration.
8735 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8736 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8737 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8738 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8739 * linux-aarch64-low.c: Don't include break-common.h here.
8740 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8741 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8742 (Z_packet_to_target_hw_bp_type): Delete function.
8743 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8745 (mips_insert_point, mips_remove_point): Use
8746 Z_packet_to_target_hw_bp_type.
8748 2014-05-20 Pedro Alves <palves@redhat.com>
8750 * linux-aarch64-low.c: Include break-common.h.
8751 (enum target_point_type): Delete.
8752 (Z_packet_to_point_type): Rename to ...
8753 (Z_packet_to_target_hw_bp_type): ... this, and return a
8754 target_hw_bp_type instead.
8755 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8756 instead of an enum target_point_type.
8757 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8759 (aarch64_dr_state_insert_one_point)
8760 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8761 (aarch64_handle_aligned_watchpoint)
8762 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8763 Take an enum target_hw_bp_type instead of an enum
8765 (aarch64_supports_z_point_type): New function.
8766 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8767 use Z_packet_to_target_hw_bp_type.
8769 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8771 * configure.ac: Only use -Werror by default when DEVELOPMENT
8773 * configure: Regenerate.
8775 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8777 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8778 * linux-x86-low.c (X86_64_USER_REGS): New.
8779 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8781 2014-04-28 Yao Qi <yao@codesourcery.com>
8783 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8786 2014-04-25 Pedro Alves <palves@redhat.com>
8789 * linux-low.c (linux_attach_fail_reason_string): New function.
8790 (linux_attach_lwp): Delete.
8791 (linux_attach_lwp_1): Rename to ...
8792 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8793 argument. Remove "initial" parameter. Return int instead of
8794 void. Don't error or warn here.
8795 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8796 failure to attach to the tgid. Call warning when failing to
8798 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8799 argument. Remove "initial" parameter. Return int instead of
8800 void. Don't error or warn here.
8801 (linux_attach_fail_reason_string): New declaration.
8802 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8803 interface change. Use linux_attach_fail_reason_string.
8805 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8806 Walfred Tedeschi <walfred.tedeschi@intel.com>
8808 * Makefile.in: Added rules to handle new files
8809 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8810 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8811 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8812 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8813 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8814 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8816 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8817 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8818 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8819 i386/x32-avx512.xml.
8820 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8821 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8822 i386/x32-avx512-linux.xml.
8823 * i387-fp.c (num_avx512_k_registers): New constant for number
8825 (num_avx512_zmmh_low_registers): New constant for number of
8826 lower ZMM registers (0-15).
8827 (num_avx512_zmmh_high_registers): New constant for number of
8828 higher ZMM registers (16-31).
8829 (num_avx512_ymmh_registers): New contant for number of higher
8830 YMM registers (ymm16-31 added by avx521 on x86_64).
8831 (num_avx512_xmm_registers): New constant for number of higher
8832 XMM registers (xmm16-31 added by AVX512 on x86_64).
8833 (struct i387_xsave): Add space for AVX512 registers.
8834 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8835 Add code to handle AVX512 registers.
8836 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8837 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8838 prototypei from generated file.
8839 (tdesc_amd64_avx512_linux): Likewise.
8840 (init_registers_x32_avx512_linux): Likewise.
8841 (tdesc_x32_avx512_linux): Likewise.
8842 (init_registers_i386_avx512_linux): Likewise.
8843 (tdesc_i386_avx512_linux): Likewise.
8844 (x86_64_regmap): Add AVX512 registers.
8845 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8847 (initialize_low_arch): Add code to initialize AVX512 registers.
8849 2014-04-23 Pedro Alves <palves@redhat.com>
8851 * mem-break.c (find_gdb_breakpoint_at): Make static.
8852 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8854 2014-04-23 Pedro Alves <palves@redhat.com>
8856 * i386-low.c: Don't include break-common.h here.
8857 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8858 prototype to take target_hw_bp_type as argument instead of a Z
8860 * i386-low.h: Include break-common.h here.
8861 (Z_packet_to_hw_type): Declare.
8862 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8864 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8865 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8866 (x86_remove_point): Convert the packet number to a
8867 target_hw_bp_type before calling i386_low_remove_watchpoint.
8868 * win32-i386-low.c (i386_insert_point): Convert the packet number
8869 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8870 (i386_remove_point): Convert the packet number to a
8871 target_hw_bp_type before calling i386_low_remove_watchpoint.
8873 2014-04-23 Pedro Alves <palves@redhat.com>
8875 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8877 2014-04-10 Pedro Alves <palves@redhat.com>
8879 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8880 Check if the condition or command is NULL before checking if the
8881 breakpoint is known. On success, return true.
8882 * mem-break.h (add_breakpoint_condition): Document return.
8883 (add_breakpoint_commands): Add describing comment.
8884 * server.c (skip_to_semicolon): New function.
8885 (process_point_options): Use it.
8887 2014-04-09 Pedro Alves <palves@redhat.com>
8889 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8892 2014-02-27 Pedro Alves <palves@redhat.com>
8895 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8897 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8899 (last_thread_of_process_p): Take a PID argument instead of a
8901 (linux_wait_for_lwp): Delete.
8902 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8904 (linux_low_filter_event): New function, party factored out from
8905 linux_wait_for_event.
8906 (linux_wait_for_event): Rename to ...
8907 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8908 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8909 sigsuspend. Check for zombie leaders.
8910 (linux_wait_for_event): Reimplement as wrapper around
8911 linux_wait_for_event_filtered.
8912 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8913 a normal or signal exit is seen, it's the whole process exiting.
8914 (wait_for_sigstop): No longer a for_each_inferior callback.
8915 Rewrite on top of linux_wait_for_event_filtered.
8916 (stop_all_lwps): Call wait_for_sigstop directly.
8917 * server.c (resume, handle_target_event): Handle
8918 TARGET_WAITKIND_NO_RESUMED.
8920 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8922 * win32-low.c (psapi_get_dll_name,
8923 * win32_CreateToolhelp32Snapshot): Delete.
8924 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8925 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8927 (handle_load_dll): Add function description.
8928 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8930 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8932 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8934 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8935 base address when calling win32_add_one_solib.
8936 (handle_load_dll): Delete local variable load_addr.
8937 Remove 0x1000 offset applied to DLL base address when calling
8938 win32_add_one_solib.
8939 (handle_unload_dll): Add comment.
8941 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8943 * win32-low.c (win32_add_all_dlls): Renames
8944 win32_ensure_ntdll_loaded. Rewrite function documentation.
8945 Adjust implementation to always load all DLLs.
8946 Add 0x1000 offset to DLL base address when calling
8947 win32_add_one_solib.
8948 (child_initialization_done): New static global.
8949 (do_initial_child_stuff): Set child_initialization_done to
8950 zero during child initialization, and 1 after. Replace call
8951 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8953 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8954 (handle_unload_dll): Add function documentation.
8955 (get_child_debug_event): Ignore load and unload DLL events
8956 during child initialization.
8958 2014-02-20 Doug Evans <dje@google.com>
8960 Remove global all_lwps.
8961 * inferiors.h (ptid_of): Move here from linux-low.h.
8962 (pid_of, lwpid_of): Ditto.
8963 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8964 parameter is a struct thread_info * now.
8965 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8966 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8967 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8969 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8970 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8971 * linux-arm-low.c (update_registers_callback): Update, "entry"
8972 parameter is a struct thread_info * now.
8973 Fetch lwpid from current_inferior directly.
8974 (arm_insert_point): Pass &all_threads to find_inferior instead of
8976 (arm_remove_point): Ditto.
8977 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8978 (arm_prepare_to_resume): Fetch pid from thread.
8979 (arm_read_description): Fetch lwpid from current_inferior directly.
8980 * linux-low.c (all_lwps): Delete.
8981 (delete_lwp): Delete call to remove_inferior.
8982 (handle_extended_wait): Fetch lwpid from thread.
8983 (add_lwp): Don't set lwp->entry.id. Remove call to
8984 add_inferior_to_list.
8985 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8986 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8987 (kill_one_lwp_callback): Ditto.
8988 (linux_kill): Don't dereference NULL pointer.
8989 Fetch ptid,lwpid from thread.
8990 (get_detach_signal): Fetch ptid from thread.
8991 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8992 Simplify call to regcache_invalidate_thread.
8993 (delete_lwp_callback): Update, "entry" parameter is a
8994 struct thread_info * now. Fetch pid from thread.
8995 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8996 (status_pending_p_callback): Update, "entry" parameter is a
8997 struct thread_info * now. Fetch ptid from thread.
8998 (find_lwp_pid): Update, "entry" parameter is a
8999 struct thread_info * now.
9000 (linux_wait_for_lwp): Fetch pid from thread.
9001 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9002 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9003 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9004 (dequeue_one_deferred_signal): Ditto.
9005 (cancel_breakpoint): Fetch ptid from current_inferior.
9006 (linux_wait_for_event): Pass &all_threads to find_inferior,
9007 not &all_lwps. Fetch ptid, lwpid from thread.
9008 (count_events_callback): Update, "entry" parameter is a
9009 struct thread_info * now.
9010 (select_singlestep_lwp_callback): Ditto.
9011 (select_event_lwp_callback): Ditto.
9012 (cancel_breakpoints_callback): Ditto.
9013 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9015 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9016 (unsuspend_one_lwp): Update, "entry" parameter is a
9017 struct thread_info * now.
9018 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9020 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9021 Fetch lwpid from thread, not lwp.
9022 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9023 Pass &all_threads to find_inferior, not &all_lwps.
9024 (send_sigstop): Fetch lwpid from thread, not lwp.
9025 (send_sigstop_callback): Update, "entry" parameter is a
9026 struct thread_info * now.
9027 (suspend_and_send_sigstop_callback): Ditto.
9028 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9029 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9030 struct thread_info * now.
9031 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9033 (lwp_running): Update, "entry" parameter is a
9034 struct thread_info * now.
9035 (stop_all_lwps): Fetch ptid from thread.
9036 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9037 (linux_resume_one_lwp): Fetch lwpid from thread.
9038 (linux_set_resume_request): Update, "entry" parameter is a
9039 struct thread_info * now. Fetch pid, lwpid from thread.
9040 (resume_status_pending_p): Update, "entry" parameter is a
9041 struct thread_info * now.
9042 (need_step_over_p): Ditto. Fetch lwpid from thread.
9043 (start_step_over): Fetch lwpid from thread.
9044 (linux_resume_one_thread): Update, "entry" parameter is a
9045 struct thread_info * now. Fetch lwpid from thread.
9046 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9047 (proceed_one_lwp): Update, "entry" parameter is a
9048 struct thread_info * now. Fetch lwpid from thread.
9049 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9050 struct thread_info * now.
9051 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9052 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9053 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9055 (regsets_store_inferior_registers): Ditto.
9056 (fetch_register, store_register): Ditto.
9057 (linux_read_memory, linux_write_memory): Ditto.
9058 (linux_request_interrupt): Ditto.
9059 (linux_read_auxv): Ditto.
9060 (linux_xfer_siginfo): Ditto.
9061 (linux_qxfer_spu): Ditto.
9062 (linux_qxfer_libraries_svr4): Ditto.
9063 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9064 moved to inferiors.h.
9066 (get_thread_lwp): Update.
9067 (struct lwp_info): Delete member "entry". Simplify comment for
9070 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9071 current_inferior directly.
9072 (update_watch_registers_callback): Update, "entry" parameter is a
9073 struct thread_info * now. Fetch pid from thread.
9074 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9075 (mips_insert_point): Fetch lwpid from current_inferior.
9076 Pass &all_threads to find_inferior, not &all_lwps.
9077 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9078 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9080 (mips_stopped_data_address): Ditto.
9081 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9083 * linux-tile-low.c (tile_arch_setup): Ditto.
9084 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9085 (update_debug_registers_callback): Update, "entry" parameter is a
9086 struct thread_info * now. Fetch pid from thread.
9087 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9088 Pass &all_threads to find_inferior, not &all_lwps.
9089 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9090 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9091 Pass &all_threads to find_inferior, not &all_lwps.
9092 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9093 (i386_dr_low_get_status): Ditto.
9094 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9095 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9096 (x86_linux_read_description): Ditto.
9097 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9099 2014-02-20 Doug Evans <dje@google.com>
9101 * inferiors.c (get_first_inferior): Fix buglet.
9103 2014-02-19 Doug Evans <dje@google.com>
9105 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9106 * inferiors.c (add_thread): Change result type to struct thread_info *.
9107 All callers updated.
9108 (add_lwp): Call add_thread here instead of in callers.
9109 All callers updated.
9110 * linux-low.h (get_lwp_thread): Rewrite.
9111 (struct lwp_info): New member "thread".
9113 2014-02-19 Doug Evans <dje@google.com>
9115 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9116 All callers updated.
9118 2014-02-19 Doug Evans <dje@google.com>
9120 * inferiors.c (add_thread): Fix whitespace.
9122 2014-02-19 Doug Evans <dje@google.com>
9124 * dll.c (clear_dlls): Replace accessing list implemention details
9126 * gdbthread.h (get_first_thread): Declare.
9127 * inferiors.c (for_each_inferior_with_data): New function.
9128 (get_first_thread): New function.
9129 (find_thread_ptid): Simplify.
9130 (get_first_inferior): New function.
9131 (clear_list): Delete.
9132 (one_inferior_p): New function.
9133 (clear_inferior_list): New function.
9134 (clear_inferiors): Update.
9135 * inferiors.h (for_each_inferior_with_data): Declare.
9136 (clear_inferior_list): Declare.
9137 (one_inferior_p): Declare.
9138 (get_first_inferior): Declare.
9139 * linux-low.c (linux_wait_for_event): Replace accessing list
9140 implemention details with API function.
9141 * server.c (target_running): Ditto.
9142 (accumulate_file_name_length): New function.
9143 (emit_dll_description): New function.
9144 (handle_qxfer_libraries): Replace accessing list implemention
9145 details with API function.
9146 (handle_qxfer_threads_worker): New function.
9147 (handle_qxfer_threads_proper): Replace accessing list implemention
9148 details with API function.
9149 (handle_query): Ditto.
9150 (visit_actioned_threads_callback_ftype): New typedef.
9151 (visit_actioned_threads_data): New struct.
9152 (visit_actioned_threads): Rewrite to be find_inferior callback.
9153 (resume): Call find_inferior.
9154 (handle_status): Replace accessing list implemention
9155 details with API function.
9156 (process_serial_event): Replace accessing list implemention details
9158 * target.c (set_desired_inferior): Replace accessing list implemention
9159 details with API function.
9160 * tracepoint.c (same_process_p): New function.
9161 (gdb_agent_about_to_close): Replace accessing list implemention
9162 details with API function.
9163 * win32-low.c (child_delete_thread): Replace accessing list
9164 implemention details with API function.
9165 (match_dll_by_basename): New function.
9166 (dll_is_loaded_by_basename): New function.
9167 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9168 details call to dll_is_loaded_by_basename.
9170 2014-02-19 Doug Evans <dje@google.com>
9172 * dll.h (struct dll_info): Add comment.
9173 * gdbthread.h (struct thread_info): Add comment.
9174 (current_ptid): Simplify.
9175 * inferiors.c (add_process): Update.
9176 (remove_process): Update.
9177 * inferiors.h (struct process_info): Rename member "head" to "entry".
9178 * linux-low.c (delete_lwp): Update.
9180 (last_thread_of_process_p): Update.
9181 (kill_one_lwp_callback, linux_kill): Update.
9182 (status_pending_p_callback): Update.
9183 (wait_for_sigstop): Update. Simplify read of ptid.
9184 (start_step_over): Update.
9185 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9186 (get_lwp_thread): Update.
9187 (struct lwp_info): Rename member "head" to "entry".
9188 * regcache.h (inferior_list_entry): Delete.
9189 * server.c (kill_inferior_callback): Update.
9190 (detach_or_kill_inferior_callback): Update.
9191 (print_started_pid): Update.
9192 (print_attached_pid): Update.
9193 (process_serial_event): Simplify read of ptid.
9194 * thread-db.c (thread_db_create_event): Update.
9195 (thread_db_get_tls_address): Update.
9196 * win32-low.c (current_inferior_ptid): Simplify.
9198 2014-02-19 Tom Tromey <tromey@redhat.com>
9200 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9202 (target_supports_btrace): Update.
9204 2014-02-14 Yao Qi <yao@codesourcery.com>
9206 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9207 (rsp-low-ipa.o): New target.
9209 2014-02-12 Tom Tromey <tromey@redhat.com>
9211 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9212 convert_ascii_to_int.
9213 * regcache.c (registers_to_string): Likewise.
9214 * remote-utils.c (decode_M_packet): Likewise.
9215 * server.c (process_serial_event): Likewise.
9217 2014-02-12 Tom Tromey <tromey@redhat.com>
9219 * server.c (handle_query, handle_v_run): Use hex2bin, not
9221 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9223 2014-02-12 Tom Tromey <tromey@redhat.com>
9225 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9226 convert_int_to_ascii.
9227 * regcache.c (registers_to_string, collect_register_as_string):
9229 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9231 * server.c (process_serial_event): Likewise.
9232 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9233 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9235 2014-02-12 Tom Tromey <tromey@redhat.com>
9237 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9238 bin2hex, not hexify.
9239 * tracepoint.c (cmd_qtstatus): Likewise.
9241 2014-02-12 Tom Tromey <tromey@redhat.com>
9243 * remote-utils.c (monitor_output): Pass explicit length to
9246 2014-02-12 Tom Tromey <tromey@redhat.com>
9248 * tracepoint.c: Include rsp-low.h.
9249 * server.c: Include rsp-low.h.
9250 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9251 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9253 * remote-utils.c: Include rsp-low.h.
9254 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9255 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9256 (convert_int_to_ascii, convert_ascii_to_int): Move to
9258 * regcache.c: Include rsp-low.h.
9259 * ax.c: Include rsp-low.h.
9260 * Makefile.in (SFILES): Add common/rsp-low.c.
9261 (OBS): Add rsp-low.o.
9262 (rsp-low.o): New target.
9264 2014-02-12 Tom Tromey <tromey@redhat.com>
9266 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9267 Include print-utils.h.
9268 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9269 (plongest, thirty_two, phex_nz): Remove.
9270 * Makefile.in (SFILES): Add common/print-utils.c.
9271 (OBS): Add print-utils.o.
9272 (print-utils-ipa.o): New target.
9273 (print-utils.o): New target.
9274 (IPA_OBJS): Add print-utils-ipa.o.
9276 2014-02-06 Tom Tromey <tromey@redhat.com>
9278 * Makefile.in (SFILES): Fix indentation.
9280 2014-02-05 Doug Evans <dje@google.com>
9282 * linux-low.c (linux_wait_for_event): Improve comment.
9283 (linux_wait_1): Keep current_inferior in sync with event_child.
9285 2014-01-22 Doug Evans <dje@google.com>
9287 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9289 2014-01-22 Doug Evans <dje@google.com>
9291 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9292 * configure: Regenerate.
9293 * config.in: Regenerate.
9294 * Makefile.in (SFILES): Add debug.c.
9296 * debug.c: New file.
9297 * debug.h: New file.
9298 * linux-aarch64-low.c (*): Update all debugging printfs to use
9299 debug_printf instead of fprintf.
9300 * linux-arm-low.c (*): Ditto.
9301 * linux-cris-low.c (*): Ditto.
9302 * linux-crisv32-low.c (*): Ditto.
9303 * linux-m32r-low.c (*): Ditto.
9304 * linux-sparc-low.c (*): Ditto.
9305 * linux-x86.c (*): Ditto.
9306 * linux-low.c (*): Ditto.
9307 (linux_wait_1): Add calls to debug_enter, debug_exit.
9308 (linux_wait): Remove redundant debugging printf.
9309 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9310 (linux_resume, unstop_all_lwps): Ditto.
9311 * mem-break.c (*): Update all debugging printfs to use
9312 debug_printf instead of fprintf.
9313 * remote-utils.c (*): Ditto.
9314 * thread-db.c (*): Ditto.
9315 * server.c #include <ctype.h>, "gdb_vecs.h".
9316 (debug_threads): Moved to debug.c.
9317 (*): Update all debugging printfs to use debug_printf instead of
9319 (start_inferior): Replace call to fflush with call to debug_flush.
9320 (monitor_show_help): Mention set debug-format.
9321 (parse_debug_format_options): New function.
9322 (handle_monitor_command): Handle "monitor set debug-format".
9323 (gdbserver_usage): Mention --debug-format.
9324 (main): Parse --debug-format.
9325 * server.h (debug_threads): Declaration moved to debug.h.
9327 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9328 trace_debug_1 that uses debug_printf.
9329 (tracepoint_look_up_symbols): Update all debugging printfs to use
9330 debug_printf instead of fprintf.
9332 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9334 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9337 2014-01-17 Pedro Alves <palves@redhat.com>
9340 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9341 defined after including gdb_proc_service.h.
9343 2014-01-16 Doug Evans <dje@google.com>
9345 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9346 (match_dll): Use it.
9348 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9350 * target.h (target_ops) <read_btrace>: Change parameters and
9351 return type to allow error reporting.
9352 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9353 trace reading errors on.
9354 * linux-low.c (linux_low_read_btrace): Pass trace reading
9356 (linux_low_disable_btrace): New.
9358 2014-01-15 Doug Evans <dje@google.com>
9360 * inferiors.c (thread_id_to_gdb_id): Delete.
9361 * inferiors.h (thread_id_to_gdb_id): Delete.
9363 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9365 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9366 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9369 2014-01-08 Pedro Alves <palves@redhat.com>
9371 * server.c (handle_status): Don't discard previous queued stop
9372 replies or thread's pending status here.
9373 (main) <disconnection>: Do it here instead.
9375 2014-01-08 Pedro Alves <palves@redhat.com>
9377 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9378 * server.c (visit_actioned_threads, handle_pending_status): New
9380 (handle_v_cont): Factor out parts to ...
9381 (resume): ... this new function. If in all-stop, and a thread
9382 being resumed has a pending status, report it without actually
9384 (myresume): Adjust to use the new 'resume' function.
9385 (clear_pending_status_callback, set_pending_status_callback)
9386 (find_status_pending_thread_callback): New functions.
9387 (handle_status): Handle the case of multiple threads having
9388 interesting statuses to report. Report threads' real last signal
9389 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9390 with an interesting thread to report the status for, instead of
9391 always reporting the status of the first thread.
9393 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9395 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9396 * gdbreplay.c (gdbreplay_version): Likewise.
9398 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9400 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9401 iov.iov_len with the real length in use.
9403 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9405 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9406 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9407 for all targets that use win32-low.c.
9408 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9409 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9411 2013-12-13 Pedro Alves <palves@redhat.com>
9413 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9414 if equal to TARGET_WAITKIND_LOADED.
9415 * win32-low.c (cached_status): New static global.
9416 (win32_wait): Add declaration.
9417 (do_initial_child_stuff): Flush all initial pending debug events
9418 up to the initial breakpoint.
9419 (win32_wait): If CACHED_STATUS was set, return that instead
9420 of doing a real wait. Remove the code resuming the execution
9421 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9422 during the initial phase. Also remove the code changing
9423 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9424 TARGET_WAITKIND_STOPPED.
9426 2013-12-11 Yao Qi <yao@codesourcery.com>
9428 * notif.c (handle_notif_ack): Return 0 if no notification
9431 2013-11-20 Doug Evans <dje@google.com>
9433 * linux-low.c (linux_set_resume_request): Fix comment.
9435 2013-11-20 Doug Evans <dje@google.com>
9437 * linux-low.c (resume_status_pending_p): Tweak comment.
9439 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9441 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9442 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9443 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9444 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9445 (srv_amd64_regobj): Add amd64-mpx.o.
9446 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9447 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9448 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9449 * i387-fp.c (num_pl_bnd_register) Added constant.
9450 (num_pl_bnd_cfg_registers) Added constant.
9451 (struct i387_xsave) Added reserved area and MPX fields.
9452 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9453 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9455 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9456 (init_registers_amd64_mpx_linux): Declare new function.
9457 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9458 (x86_64_regmap): Add MPX registers.
9459 (x86_linux_read_description): Add MPX case.
9460 (initialize_low_arch): Initialize MPX targets.
9462 2013-11-18 Tom Tromey <tromey@redhat.com>
9464 * configure: Rebuild.
9465 * configure.ac: Don't check for stdlib.h.
9466 * gdbreplay.c: Unconditionally include stdlib.h.
9468 2013-11-18 Tom Tromey <tromey@redhat.com>
9470 * config.in: Rebuild.
9471 * configure: Rebuild.
9472 * configure.ac: Don't use AC_HEADER_DIRENT.
9474 2013-11-18 Tom Tromey <tromey@redhat.com>
9476 * server.h: Don't check HAVE_STRING_H.
9477 * gdbreplay.c: Don't check HAVE_STRING_H.
9478 * configure: Rebuild.
9480 2013-11-18 Tom Tromey <tromey@redhat.com>
9482 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9485 2013-11-08 Tom Tromey <tromey@redhat.com>
9487 * configure, config.in: Rebuild.
9488 * configure.ac: Remove unused configury.
9490 2013-11-08 Tom Tromey <tromey@redhat.com>
9492 * acinclude.m4: Include common.m4, codeset.m4.
9493 * configure, config.in: Rebuild.
9494 * configure.ac: Use GDB_AC_COMMON.
9496 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9498 * linux-s390-low.c (HWCAP_S390_TE): New define.
9499 (s390_arch_setup): Consider the TE field in the HWCAP for
9500 determining 'have_regset_tdb'.
9502 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9505 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9508 2013-10-02 Pedro Alves <palves@redhat.com>
9510 * server.c (process_serial_event): Don't output "GDBserver
9511 exiting" if GDB is connected through stdio.
9512 * target.c (mywait): Likewise, be silent if GDB is connected
9515 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9517 * lynx-low.c (lynx_add_threads_after_attach): New function.
9518 (lynx_attach): Remove call to add_thread. Add call to
9519 lynx_add_threads_after_attach instead.
9521 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9523 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9524 * config.in, configure: Regenerated.
9526 2013-09-18 Yao Qi <yao@codesourcery.com>
9529 * server.c (start_inferior): Clear 'resume_info'.
9531 2013-09-16 Jiong Wang <jiwang@tilera.com>
9533 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9536 2013-09-16 Jiong Wang <jiwang@tilera.com>
9538 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9539 linux-tile-low.o to srv_tgtobj.
9541 2013-09-16 Will Newton <will.newton@linaro.org>
9543 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9546 2013-09-06 Pedro Alves <palves@redhat.com>
9548 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9549 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9550 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9551 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9552 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9553 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9555 2013-09-06 Pedro Alves <palves@redhat.com>
9557 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9558 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9560 2013-09-06 Pedro Alves <palves@redhat.com>
9562 * linux-amd64-ipa.c: Include tracepoint.h.
9563 * linux-i386-ipa.c: Include tracepoint.h.
9565 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9567 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9568 (ps_get_thread_area): New function.
9570 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9572 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9573 (initialize_low_arch): Call init_registers_crisv32 rather than
9574 init_register_crisv32.
9576 2013-09-05 Pedro Alves <palves@redhat.com>
9578 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9580 * hostio.h: ... this new file.
9581 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9582 win32-low.c: Include hostio.h.
9584 2013-09-05 Pedro Alves <palves@redhat.com>
9586 * server.h (gdb_client_data, handler_func, callback_handler_func)
9587 (delete_file_handler, add_file_handler, append_callback_event)
9588 (delete_callback_event, start_event_loop, initialize_event_loop):
9589 Move to event-loop.h and include it.
9590 * event-loop.h: New file.
9592 2013-09-05 Pedro Alves <palves@redhat.com>
9594 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9595 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9596 (loaded_dll, unloaded_dll): Move to ...
9597 * dll.h: ... this new file.
9598 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9600 2013-09-05 Pedro Alves <palves@redhat.com>
9602 * server.h (current_process, get_thread_process, all_processes)
9603 (add_inferior_to_list, for_each_inferior, current_inferior)
9604 (remove_inferior, add_process, remove_process, find_process_pid)
9605 (have_started_inferiors_p, have_attached_inferiors_p)
9606 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9607 (clear_inferiors, find_inferior, find_inferior_id)
9608 (inferior_target_data, set_inferior_target_data)
9609 (inferior_regcache_data, set_inferior_regcache_data): Move to
9610 inferiors.h, and include it.
9611 * inferiors.h: New file.
9613 2013-09-05 Pedro Alves <palves@redhat.com>
9615 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9619 2013-09-05 Pedro Alves <palves@redhat.com>
9621 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9623 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9624 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9625 (handle_tracepoint_general_set, handle_tracepoint_query)
9626 (tracepoint_finished_step, tracepoint_was_hit)
9627 (release_while_stepping_state_list, current_traceframe)
9628 (in_readonly_region, traceframe_read_mem)
9629 (fetch_traceframe_registers, traceframe_read_sdata)
9630 (traceframe_read_info, struct fast_tpoint_collect_status)
9631 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9632 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9633 (supply_fast_tracepoint_registers)
9634 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9635 (ipa_tdesc, claim_trampoline_space)
9636 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9637 (agent_mem_read, agent_get_trace_state_variable_value)
9638 (agent_set_trace_state_variable_value, agent_tsv_read)
9639 (agent_mem_read_string, get_raw_reg_func_addr)
9640 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9641 * tracepoint.h: ... this new file.
9643 2013-09-05 Pedro Alves <palves@redhat.com>
9645 * server.h (perror_with_name, error, fatal, warning, paddress)
9646 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9648 * utils.h: New file.
9650 2013-09-05 Pedro Alves <palves@redhat.com>
9652 * server.h (remote_debug, noack_mode, transport_is_reliable)
9653 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9654 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9655 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9656 (write_enn, initialize_async_io, enable_async_io)
9657 (disable_async_io, check_remote_input_interrupt_request)
9658 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9659 (dead_thread_notify, prepare_resume_reply)
9660 (decode_address_to_semicolon, decode_address, decode_m_packet)
9661 (decode_M_packet, decode_X_packet, decode_xfer_write)
9662 (decode_search_memory_packet, unhexify, hexify)
9663 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9664 (look_up_one_symbol, relocate_instruction)
9665 (monitor_output): Move to remote-utils.h, and include it.
9666 * remote-utils.h: New file.
9668 2013-09-05 Pedro Alves <palves@redhat.com>
9670 * server.h (_): Delete.
9672 2013-09-02 Pedro Alves <palves@redhat.com>
9674 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9675 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9677 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9679 2013-09-02 Pierre Muller <muller@sourceware.org>
9681 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9682 or WriteProcessMemory complete successfully and handle
9683 ERROR_PARTIAL_COPY error.
9685 2013-09-02 Pedro Alves <palves@redhat.com>
9687 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9688 error instead of EIO.
9690 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9693 * linux-low.c: Include filestuff.h.
9694 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9695 * lynx-low.c: Include filestuff.h.
9696 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9697 * server.c: Include filestuff.h.
9698 (main): Call notice_open_fds.
9699 * spu-low.c: Include filestuff.h.
9700 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9702 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9704 * Makefile.in: Explain why ../target and ../nat are not
9705 listed as include file search paths.
9706 (linux-waitpid.o): New object file rule.
9707 * configure.srv (srv_native_linux_obj): New variable.
9708 Replace all occurrences of linux native object files with
9709 $srv_native_linux_obj.
9710 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9711 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9712 (linux_enable_event_reporting): Remove declaration.
9713 (my_waitpid): Moved to common/linux-waitpid.c.
9714 (linux_wait_for_event): Pass ptid when calling
9715 linux_enable_event_reporting.
9716 (linux_supports_tracefork_flag): Remove.
9717 (linux_enable_event_reporting): Likewise.
9718 (linux_tracefork_grandchild): Remove.
9719 (STACK_SIZE): Moved to common/linux-ptrace.c.
9720 (linux_tracefork_child): Remove.
9721 (linux_test_for_tracefork): Remove.
9722 (linux_look_up_symbols): Call linux_supports_traceclone.
9723 (initialize_low): Remove call to linux_test_for_tracefork.
9724 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9725 common/linux-ptrace.h.
9726 (PTRACE_TYPE_ARG4): Likewise.
9727 Include linux-ptrace.h.
9729 2013-08-21 Pedro Alves <palves@redhat.com>
9731 * config.in: Renegerate.
9733 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9735 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9736 (SFILES): Remove $(srcdir)/common/target-common.c and
9737 add $(srcdir)/target/waitstatus.c.
9738 (OBS): Remove target-common.o and add waitstatus.o.
9739 (server_h): Remove $(srcdir)/../common/target-common.h and
9740 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9741 and $(srcdir)/../target/waitstatus.h.
9742 (target-common.o): Remove.
9743 (waitstatus.o): New target object file.
9744 * target.h: Do not include target-common.h and
9745 include target/resume.h, target/wait.h and
9746 target/waitstatus.h.
9748 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9750 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9751 to PTRACE_TYPE_ARG3.
9752 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9753 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9755 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9756 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9758 2013-07-27 Jie Zhang <jie@codesourcery.com>
9759 Daniel Jacobowitz <dan@codesourcery.com>
9760 Yao Qi <yao@codesourcery.com>
9762 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9763 (mips-linux-watch.o): New rule.
9764 (mips_linux_watch_h): New variable.
9765 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9767 * linux-mips-low.c: Include mips-linux-watch.h.
9768 (struct arch_process_info, struct arch_lwp_info): New.
9769 (update_watch_registers_callback): New function.
9770 (mips_linux_new_process, mips_linux_new_thread) New functions.
9771 (mips_linux_prepare_to_resume, mips_insert_point): New
9773 (mips_remove_point, mips_stopped_by_watchpoint): New
9775 (rsp_bp_type_to_target_hw_bp_type): New function.
9776 (mips_stopped_data_address): New function.
9777 (the_low_target): Add watchpoint support functions.
9779 2013-07-27 Yao Qi <yao@codesourcery.com>
9781 * i386-low.c: Include break-common.h.
9782 (enum target_hw_bp_type): Remove.
9784 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9786 * Makefile.in (SFILES): /common/target-common.c.
9787 (OBS): Add target-common.o.
9788 (server_h): Add $(srcdir)/../common/target-common.h.
9789 (target-common.o): New target.
9790 * server.c (queue_stop_reply_callback): Free
9791 status string after use.
9792 * target.c (target_waitstatus_to_string): Remove.
9793 * target.h: Include target-common.h.
9794 (resume_kind): Likewise.
9795 (target_waitkind): Likewise.
9796 (target_waitstatus): Likewise.
9797 (TARGET_WNOHANG): Likewise.
9799 2013-07-04 Yao Qi <yao@codesourcery.com>
9801 * Makefile.in (host_alias): Use @host_noncanonical@.
9802 (target_alias): Use @target_noncanonical@.
9803 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9804 ACX_NONCANONICAL_HOST.
9805 * configure: Regenerated.
9808 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9810 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9811 * configure: Rebuild.
9812 * Makefile.in (version_host, version_target): Get from configure.
9813 (version.c): Use $(version_host) and $(version_target).
9815 2013-07-03 Pedro Alves <palves@redhat.com>
9817 * Makefile.in (config.status): Depend on development.sh.
9818 * acinclude.m4: Include libmcheck.m4.
9819 * configure: Regenerate.
9821 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9823 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9824 attribute inside the parentheses.
9825 (winapi_DebugSetProcessKillOnExit): Ditto.
9826 (winapi_DebugBreakProcess): Ditto.
9827 (winapi_GenerateConsoleCtrlEvent): Ditto.
9829 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9831 * notif.h (notif_event): Add a dummy member to avoid compiler
9834 2013-07-01 Pedro Alves <palves@redhat.com>
9836 * hostio.c (HOSTIO_PATH_MAX): Define.
9837 (require_filename, handle_open, handle_unlink, handle_readlink):
9840 2013-07-01 Pedro Alves <palves@redhat.com>
9842 * server.h: Include "pathmax.h".
9843 * linux-low.c: Don't include sys/param.h.
9844 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9846 * win32-low.c: Don't include sys/param.h.
9847 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9849 2013-07-01 Pedro Alves <palves@redhat.com>
9851 * event-loop.c: Don't check HAVE_UNISTD_H before including
9853 * gdbreplay.c: Likewise.
9854 * remote-utils.c: Likewise.
9855 * server.c: Likewise.
9856 * configure.ac: Don't check for unistd.h.
9857 * configure: Regenerate.
9859 2013-06-28 Tom Tromey <tromey@redhat.com>
9861 * Makefile.in (version.c): Use version.in, not
9864 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9866 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9867 * configure: Rebuild.
9868 * Makefile.in (version_host, version_target): Get from configure.
9869 (version.c): Use $(version_host) and $(version_target).
9871 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9873 Fix trace-status to output user name without trailing colon.
9874 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9876 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9878 Fix trace-status to output proper start-time and stop-time.
9879 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9880 output start time and stop time in hex as gdb expects.
9882 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9884 * tracepoint.c (build_traceframe_info_xml): Output trace state
9885 variables present in the trace buffer.
9887 2013-06-24 Tom Tromey <tromey@redhat.com>
9889 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9891 (version.o): Remove.
9892 * gdbreplay.c: Include version.h.
9893 (version, host_name): Don't declare.
9894 * server.h: Include version.h.
9895 (version, host_name): Don't declare.
9897 2013-06-12 Pedro Alves <palves@redhat.com>
9899 * linux-x86-low.c (linux_is_elf64): Delete global.
9900 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9901 with local linux_pid_exe_is_elf_64_file use.
9903 2013-06-11 Pedro Alves <palves@redhat.com>
9905 * linux-low.c (regset_disabled, disable_regset): New functions.
9906 (regsets_fetch_inferior_registers)
9907 (regsets_store_inferior_registers): Use them.
9908 (initialize_regsets_info); Don't allocate the disabled_regsets
9910 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9913 2013-06-11 Pedro Alves <palves@redhat.com>
9915 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9918 2013-06-11 Pedro Alves <palves@redhat.com>
9920 * linux-x86-low.c (initialize_low_arch): Call
9921 init_registers_x32_avx_linux.
9923 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9925 Fix compatibility with Android Bionic.
9926 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9929 2013-06-07 Pedro Alves <palves@redhat.com>
9932 * Makefile.in (OBS): Add tdesc.o.
9933 (IPA_OBJS): Add tdesc-ipa.o.
9934 (tdesc-ipa.o): New rule.
9935 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9937 * linux-low.c (new_inferior): Delete.
9938 (disabled_regsets, num_regsets): Delete.
9939 (linux_add_process): Adjust to set the new per-process
9941 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9942 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9943 was a stop. When calling arch_setup, switch the current inferior
9944 to the thread that got an event.
9945 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9946 (regsets_fetch_inferior_registers)
9947 (regsets_store_inferior_registers): New regsets_info parameter.
9949 (linux_register_in_regsets): New regs_info parameter. Adjust to
9951 (register_addr, fetch_register, store_register): New usrregs_info
9952 parameter. Adjust to use it.
9953 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9954 parameter regs_info. Adjust to use it.
9955 (linux_fetch_registers): Get the current inferior's regs_info, and
9957 (linux_store_registers): Ditto.
9958 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9959 (initialize_low): Don't initialize the target_regsets here. Call
9960 initialize_low_arch.
9961 * linux-low.h (target_regsets): Delete declaration.
9962 (struct regsets_info): New.
9963 (struct usrregs_info): New.
9964 (struct regs_info): New.
9965 (struct process_info_private) <new_inferior>: New field.
9966 (struct linux_target_ops): Delete the num_regs, regmap, and
9967 regset_bitmap fields. New field regs_info.
9968 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9969 * i387-fp.c (num_xmm_registers): Delete.
9970 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9971 calls to new interface.
9972 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9973 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9974 Infer the number of xmm registers from the regcache's target
9976 * i387-fp.h (num_xmm_registers): Delete.
9977 * inferiors.c (add_thread): Don't install the thread's regcache
9979 * proc-service.c (gregset_info): Fetch the current inferior's
9980 regs_info. Adjust to use it.
9981 * regcache.c: Include tdesc.h.
9982 (register_bytes, reg_defs, num_registers)
9983 (gdbserver_expedite_regs): Delete.
9984 (get_thread_regcache): If the thread doesn't have a regcache yet,
9985 create one, instead of aborting gdbserver.
9986 (regcache_invalidate_one): Rename to ...
9987 (regcache_invalidate_thread): ... this.
9988 (regcache_invalidate_one): New.
9989 (regcache_invalidate): Only invalidate registers of the current
9991 (init_register_cache): Add target_desc parameter, and use it.
9992 (new_register_cache): Ditto. Assert the target description has a
9993 non zero registers_size.
9994 (regcache_cpy): Add assertions. Adjust.
9995 (realloc_register_cache, set_register_cache): Delete.
9996 (registers_to_string, registers_from_string): Adjust.
9997 (find_register_by_name, find_regno, find_register_by_number)
9998 (register_cache_size): Add target_desc parameter, and use it.
9999 (free_register_cache_thread, free_register_cache_thread_one)
10000 (regcache_release, register_cache_size): New.
10001 (register_size): Add target_desc parameter, and use it.
10002 (register_data, supply_register, supply_register_zeroed)
10003 (supply_regblock, supply_register_by_name, collect_register)
10004 (collect_register_as_string, collect_register_by_name): Adjust.
10005 * regcache.h (struct target_desc): Forward declare.
10006 (struct regcache) <tdesc>: New field.
10007 (init_register_cache, new_register_cache): Add target_desc
10009 (regcache_invalidate_thread): Declare.
10010 (regcache_invalidate_one): Delete declaration.
10011 (regcache_release): Declare.
10012 (find_register_by_number, register_cache_size, register_size)
10013 (find_regno): Add target_desc parameter.
10014 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10016 * remote-utils.c: Include tdesc.h.
10017 (outreg, prepare_resume_reply): Adjust.
10018 * server.c: Include tdesc.h.
10019 (gdbserver_xmltarget): Delete declaration.
10020 (get_features_xml, process_serial_event): Adjust.
10021 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10023 (struct process_info) <tdesc>: New field.
10024 (ipa_tdesc): Declare.
10025 * tdesc.c: New file.
10026 * tdesc.h: New file.
10027 * tracepoint.c: Include tdesc.h.
10028 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10029 (get_context_regcache): Adjust to pass ipa_tdesc down.
10030 (do_action_at_tracepoint): Adjust to get the register cache size
10031 from the context regcache's description.
10032 (traceframe_walk_blocks): Adjust to get the register cache size
10033 from the current trace frame's description.
10034 (traceframe_get_pc): Adjust to get current trace frame's
10035 description and pass it down.
10036 (gdb_collect): Adjust to get the register cache size from the
10038 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10039 (gdbserver_xmltarget): Delete.
10040 (initialize_low_tracepoint): Set the ipa's target description.
10041 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10042 (initialize_low_tracepoint): Set the ipa's target description.
10043 * linux-x86-low.c: Include tdesc.h.
10044 [__x86_64__] (is_64bit_tdesc): New.
10045 (ps_get_thread_area, x86_get_thread_area): Use it.
10046 (i386_cannot_store_register): Rename to ...
10047 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10048 (i386_cannot_fetch_register): Rename to ...
10049 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10050 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10052 (target_regsets): Rename to ...
10053 (x86_regsets): ... this.
10054 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10056 (x86_siginfo_fixup): Use is_64bit_tdesc.
10057 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10058 (tdesc_x32_avx_linux, tdesc_x32_linux)
10059 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10061 (x86_linux_update_xmltarget): Delete.
10062 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10063 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10064 (AMD64_LINUX_USER64_CS): New.
10065 (x86_linux_read_description): New, based on
10066 x86_linux_update_xmltarget.
10067 (same_process_callback): New.
10068 (x86_arch_setup_process_callback): New.
10069 (x86_linux_update_xmltarget): New.
10070 (x86_regsets_info): New.
10071 (amd64_linux_regs_info): New.
10072 (i386_linux_usrregs_info): New.
10073 (i386_linux_regs_info): New.
10074 (x86_linux_regs_info): New.
10075 (x86_arch_setup): Reimplement.
10076 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10077 (x86_emit_ops): Ditto.
10078 (the_low_target): Adjust. Install x86_linux_regs_info,
10079 x86_cannot_fetch_register, and x86_cannot_store_register.
10080 (initialize_low_arch): New.
10081 * linux-ia64-low.c (tdesc_ia64): Declare.
10082 (ia64_fetch_register): Adjust.
10083 (ia64_usrregs_info, regs_info): New globals.
10084 (ia64_regs_info): New function.
10085 (the_low_target): Adjust.
10086 (initialize_low_arch): New function.
10087 * linux-sparc-low.c (tdesc_sparc64): Declare.
10088 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10090 (sparc_arch_setup): New function.
10091 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10092 (the_low_target): Adjust.
10093 (initialize_low_arch): New function.
10094 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10095 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10096 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10097 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10098 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10099 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10100 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10101 (tdesc_powerpc_isa205_vsx64l): Declare.
10102 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10103 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10104 (ppc_set_pc, ppc_get_hwcap): Adjust.
10105 (ppc_usrregs_info): Forward declare.
10106 (!__powerpc64__) ppc_regmap_adjusted: New global.
10107 (ppc_arch_setup): Adjust to the current process'es target
10109 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10110 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10111 (ppc_store_evrregset): Adjust.
10112 (target_regsets): Rename to ...
10113 (ppc_regsets): ... this, and make static.
10114 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10115 (ppc_regs_info): New function.
10116 (the_low_target): Adjust.
10117 (initialize_low_arch): New function.
10118 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10119 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10120 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10121 (tdesc_s390x_linux64v2): Declare.
10122 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10123 (s390_fill_gregset, s390_store_last_break): Adjust.
10124 (target_regsets): Rename to ...
10125 (s390_regsets): ... this, and make static.
10126 (s390_get_pc, s390_set_pc): Adjust.
10127 (s390_get_hwcap): New target_desc parameter, and use it.
10128 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10129 (s390_arch_setup): Adjust to set the current process'es target
10130 description. Don't adjust the regmap.
10131 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10132 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10133 (regs_info_3264): New globals.
10134 (s390_regs_info): New function.
10135 (the_low_target): Adjust.
10136 (initialize_low_arch): New function.
10137 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10138 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10139 [__mips64] (init_registers_mips_linux)
10140 (init_registers_mips_dsp_linux): Delete defines.
10141 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10142 (have_dsp): New global.
10143 (mips_read_description): New, based on mips_arch_setup.
10144 (mips_arch_setup): Reimplement.
10145 (get_usrregs_info): New function.
10146 (mips_cannot_fetch_register, mips_cannot_store_register)
10147 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10148 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10149 (target_regsets): Rename to ...
10150 (mips_regsets): ... this, and make static.
10151 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10152 (dsp_regs_info, regs_info): New globals.
10153 (mips_regs_info): New function.
10154 (the_low_target): Adjust.
10155 (initialize_low_arch): New function.
10156 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10157 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10159 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10160 (arm_read_description): New, with bits factored from
10162 (arm_arch_setup): Reimplement.
10163 (target_regsets): Rename to ...
10164 (arm_regsets): ... this, and make static.
10165 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10166 (arm_regs_info): New function.
10167 (the_low_target): Adjust.
10168 (initialize_low_arch): New function.
10169 * linux-m68k-low.c (tdesc_m68k): Declare.
10170 (target_regsets): Rename to ...
10171 (m68k_regsets): ... this, and make static.
10172 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10173 (m68k_regs_info): New function.
10174 (m68k_arch_setup): New function.
10175 (the_low_target): Adjust.
10176 (initialize_low_arch): New function.
10177 * linux-sh-low.c (tdesc_sharch): Declare.
10178 (target_regsets): Rename to ...
10179 (sh_regsets): ... this, and make static.
10180 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10181 (sh_regs_info, sh_arch_setup): New functions.
10182 (the_low_target): Adjust.
10183 (initialize_low_arch): New function.
10184 * linux-bfin-low.c (tdesc_bfin): Declare.
10185 (bfin_arch_setup): New function.
10186 (bfin_usrregs_info, regs_info): New globals.
10187 (bfin_regs_info): New function.
10188 (the_low_target): Adjust.
10189 (initialize_low_arch): New function.
10190 * linux-cris-low.c (tdesc_cris): Declare.
10191 (cris_arch_setup): New function.
10192 (cris_usrregs_info, regs_info): New globals.
10193 (cris_regs_info): New function.
10194 (the_low_target): Adjust.
10195 (initialize_low_arch): New function.
10196 * linux-cris-low.c (tdesc_crisv32): Declare.
10197 (cris_arch_setup): New function.
10198 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10199 (cris_regs_info): New function.
10200 (the_low_target): Adjust.
10201 (initialize_low_arch): New function.
10202 * linux-m32r-low.c (tdesc_m32r): Declare.
10203 (m32r_arch_setup): New function.
10204 (m32r_usrregs_info, regs_info): New globals.
10205 (m32r_regs_info): Adjust.
10206 (initialize_low_arch): New function.
10207 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10208 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10209 (tic6x_usrregs_info): Forward declare.
10210 (tic6x_read_description): New function, based on ...
10211 (tic6x_arch_setup): ... this. Reimplement.
10212 (target_regsets): Rename to ...
10213 (tic6x_regsets): ... this, and make static.
10214 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10215 (tic6x_regs_info): New function.
10216 (the_low_target): Adjust.
10217 (initialize_low_arch): New function.
10218 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10219 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10220 (target_regsets): Rename to ...
10221 (xtensa_regsets): ... this, and make static.
10222 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10224 (xtensa_arch_setup, xtensa_regs_info): New functions.
10225 (the_low_target): Adjust.
10226 (initialize_low_arch): New function.
10227 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10228 (nios2_arch_setup): Set the current process'es tdesc.
10229 (target_regsets): Rename to ...
10230 (nios2_regsets): ... this.
10231 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10232 (nios2_regs_info): New function.
10233 (the_low_target): Adjust.
10234 (initialize_low_arch): New function.
10235 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10236 (aarch64_arch_setup): Set the current process'es tdesc.
10237 (target_regsets): Rename to ...
10238 (aarch64_regsets): ... this.
10239 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10240 (aarch64_regs_info): New function.
10241 (the_low_target): Adjust.
10242 (initialize_low_arch): New function.
10243 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10245 (target_regsets): Rename to ...
10246 (tile_regsets): ... this.
10247 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10248 (tile_regs_info): New function.
10249 (tile_arch_setup): Set the current process'es tdesc.
10250 (the_low_target): Adjust.
10251 (initialize_low_arch): New function.
10252 * spu-low.c (tdesc_spu): Declare.
10253 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10254 * win32-arm-low.c (tdesc_arm): Declare.
10255 (arm_arch_setup): New function.
10256 (the_low_target): Install arm_arch_setup instead of
10257 init_registers_arm.
10258 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10259 (init_windows_x86): Rename to ...
10260 (i386_arch_setup): ... this. Set `win32_tdesc'.
10261 (the_low_target): Adjust.
10262 * win32-low.c (win32_tdesc): New global.
10263 (child_add_thread): Don't create the thread cache here.
10264 (do_initial_child_stuff): Set the new process'es tdesc.
10265 * win32-low.h (struct target_desc): Forward declare.
10266 (win32_tdesc): Declare.
10267 * lynx-i386-low.c (tdesc_i386): Declare global.
10268 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10269 * lynx-low.c (lynx_tdesc): New global.
10270 (lynx_add_process): Set the new process'es tdesc.
10271 * lynx-low.h (struct target_desc): Forward declare.
10272 (lynx_tdesc): Declare global.
10273 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10274 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10275 * nto-low.c (nto_tdesc): New global.
10276 (do_attach): Set the new process'es tdesc.
10277 * nto-low.h (struct target_desc): Forward declare.
10278 (nto_tdesc): Declare.
10279 * nto-x86-low.c (tdesc_i386): Declare.
10280 (nto_x86_arch_setup): Set `nto_tdesc'.
10282 2013-06-04 Gary Benson <gbenson@redhat.com>
10284 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10285 to qSupported response when appropriate.
10286 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10287 with nonzero-length annex.
10288 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10289 arguments supplied in annex.
10291 2013-05-31 Doug Evans <dje@google.com>
10294 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10295 64 bits in 64-cross-32 environment.
10297 2013-05-28 Pedro Alves <palves@redhat.com>
10299 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10300 (aarch64-without-fpu.c): Delete rule.
10301 * configure.srv (aarch64*-*-linux*): Remove references to
10302 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10303 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10306 2013-05-24 Pedro Alves <palves@redhat.com>
10308 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10309 instead of strchr/decode_address. Error if the range isn't split
10310 with a ','. Don't assume there's be a ':' in the action.
10312 2013-05-23 Yao Qi <yao@codesourcery.com>
10313 Pedro Alves <palves@redhat.com>
10315 * linux-low.c (lwp_in_step_range): New function.
10316 (linux_wait_1): If the thread was range stepping and stopped
10317 outside the stepping range, report the stop to GDB. Otherwise,
10318 continue stepping. Add range stepping debug output.
10319 (linux_set_resume_request): Copy the step range from the resume
10320 request to the lwp.
10321 (linux_supports_range_stepping): New.
10322 (linux_target_ops) <supports_range_stepping>: Set to
10323 linux_supports_range_stepping.
10324 * linux-low.h (struct linux_target_ops)
10325 <supports_range_stepping>: New field.
10326 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10327 * linux-x86-low.c (x86_supports_range_stepping): New.
10328 (the_low_target) <supports_range_stepping>: Set to
10329 x86_supports_range_stepping.
10330 * server.c (handle_v_cont): Handle 'r' action.
10331 (handle_v_requests): Append ";r" if the target supports range
10333 * target.h (struct thread_resume) <step_range_start,
10334 step_range_end>: New fields.
10335 (struct target_ops) <supports_range_stepping>:
10337 (target_supports_range_stepping): New macro.
10339 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10341 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10342 confusion in comment.
10344 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10346 * lynx-low.c (struct process_info_private): New type.
10347 (lynx_add_process): New function.
10348 (lynx_create_inferior, lynx_attach): Replace calls to
10349 add_process by calls to lynx_add_process.
10350 (lynx_resume): If PTID is null, then try using
10351 current_process()->private->last_wait_event_ptid.
10353 (lynx_clear_inferiors): Delete. The contents of that function
10354 has been inlined in lynx_mourn;
10355 (lynx_wait_1): Save the ptid in the process's private data.
10356 (lynx_mourn): Free the process' private data. Replace call
10357 to lynx_clear_inferiors by call to clear_inferiors.
10359 2013-05-17 Yao Qi <yao@codesourcery.com>
10361 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10364 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10366 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10367 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10368 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10369 PT_TEXT_END_ADDR guards. Update comments.
10370 (linux_target_op) <read_offsets>: Conditionally define to
10371 linux_read_offsets if the target is UCLIBC and if it defines
10372 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10374 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10375 Andrew Jenner <andrew@codesourcery.com>
10377 * Makefile.in (SFILES): Add linux-nios2-low.c.
10378 (clean): Add action to delete nios2-linux.c.
10379 (nios2-linux.c): New rule.
10380 * configure.srv: Add nios2*-*-linux*.
10381 * linux-nios2-low.c: New.
10383 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10385 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10387 2013-04-25 Hui Zhu <hui@codesourcery.com>
10390 * ax.c (ax_printf): Add fflush.
10392 2013-04-22 Tom Tromey <tromey@redhat.com>
10394 * Makefile.in (SFILES): Add filestuff.c.
10395 (OBS): Add filestuff.o.
10396 (filestuff.o): New target.
10397 * config.in, configure: Rebuild.
10398 * configure.ac: Check for fdwalk, pipe2.
10400 2013-04-17 Pedro Alves <palves@redhat.com>
10402 * configure.ac (USE_THREAD_DB): Delete variable.
10403 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10404 Don't AC_SUBST USE_THREAD_DB.
10405 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10406 * config.in, configure: Regenerate.
10408 2013-04-16 Pedro Alves <palves@redhat.com>
10410 * linux-low.h (struct lwp_info) <thread_known>: Move under
10411 the USE_THREAD_DB #ifdef.
10413 2013-04-16 Pedro Alves <palves@redhat.com>
10415 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10416 (linux-low.o): Delete rule.
10417 * linux-low.h: Always include "gdb_thread_db.h" instead of
10418 conditionally including thread_db.h.
10419 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10422 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10424 * Makefile.in (install-only): Fix make install regression.
10426 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10428 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10429 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10431 * gdbserver.1: Remove.
10433 2013-03-22 Pedro Alves <palves@redhat.com>
10435 * linux-low.c (handle_extended_wait): Don't call
10436 linux_enable_event_reporting.
10438 2013-03-15 Tony Theodore <tonyt@logyst.com>
10441 * Makefile.in (SHELL): Use @SHELL@.
10443 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10445 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10448 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10450 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10451 Remove extraneous NULL element.
10453 2013-03-13 Yao Qi <yao@codesourcery.com>
10455 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10456 'V' block in trace frame.
10458 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10460 * target.h (struct target_ops): Add btrace ops.
10461 (target_supports_btrace): New macro.
10462 (target_enable_btrace): New macro.
10463 (target_disable_btrace): New macro.
10464 (target_read_btrace): New macro.
10465 * gdbthread.h (struct thread_info): Add btrace field.
10466 * server.c: Include btrace-common.h.
10467 (handle_btrace_general_set): New function.
10468 (handle_btrace_enable): New function.
10469 (handle_btrace_disable): New function.
10470 (handle_general_set): Call handle_btrace_general_set.
10471 (handle_qxfer_btrace): New function.
10472 (struct qxfer qxfer_packets[]): Add btrace entry.
10473 * inferiors.c (remove_thread): Disable btrace.
10474 * linux-low: Include linux-btrace.h.
10475 (linux_low_enable_btrace): New function.
10476 (linux_low_read_btrace): New function.
10477 (linux_target_ops): Add btrace ops.
10478 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10479 Add srv_linux_btrace=yes.
10480 (x86_64-*-linux*): Add linux-btrace.o.
10481 Add srv_linux_btrace=yes.
10482 * configure.ac: Define HAVE_LINUX_BTRACE.
10483 * config.in: Regenerated.
10484 * configure: Regenerated.
10486 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10488 * server.c (handle_qxfer): Preserve error message if -3 is
10490 (qxfer): Document the -3 return value.
10492 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10494 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10495 (linux_btrace_h): New variable.
10496 (linux-btrace.o): New rule.
10498 2013-03-08 Stan Shebs <stan@codesourcery.com>
10499 Hafiz Abid Qadeer <abidh@codesourcery.com>
10501 * tracepoint.c (trace_buffer_size): New global.
10502 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10503 (init_trace_buffer): Change to one-argument function. Allocate
10504 trace buffer memory.
10505 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10506 handle QTBuffer:size packet.
10507 (cmd_bigqtbuffer_size): New function.
10508 (initialize_tracepoint): Call init_trace_buffer with
10509 DEFAULT_TRACE_BUFFER_SIZE.
10510 * server.c (handle_query): Add QTBuffer:size in the
10513 2013-03-07 Yao Qi <yao@codesourcery.com>
10515 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10516 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10518 (cmd_qtsp): Adjust condition. Do post increment.
10519 Set cur_action and cur_step_action back to 0.
10521 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10524 * linux-low.c (linux_write_memory): Return early success if LEN is
10527 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10529 * configure.srv: Add x86_64-*-cygwin* as target.
10531 2013-02-28 Tom Tromey <tromey@redhat.com>
10533 * configure.ac: Invoke AC_SYS_LARGEFILE.
10534 * configure, config.in: Rebuild.
10536 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10538 * win32-low.c: Throughout, fix format strings and casts of
10539 printf-like functions to avoid type related warnings on all
10541 (get_child_debug_event): Print dwDebugEventCode as hex since
10542 that's how it's usually documented.
10544 2013-02-28 Yao Qi <yao@codesourcery.com>
10546 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10549 2013-02-27 Jiong Wang <jiwang@tilera.com>
10551 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10552 (reg-tilegx32.c): New rule.
10553 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10554 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10555 different register info initializer according to elf class.
10556 (init_registers_tilgx32): New function. The tilegx32 register info
10558 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10559 (tile_store_gregset): Likewise.
10561 2013-02-27 Yao Qi <yao@codesourcery.com>
10563 * server.c (process_point_options): Print debug message when
10564 debug_threads is true.
10566 2013-02-26 Yao Qi <yao@codesourcery.com>
10568 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10570 2013-02-19 Pedro Alves <palves@redhat.com>
10571 Kai Tietz <ktietz@redhat.com>
10575 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10576 instead of strtoul to extract address from packet.
10577 (process_serial_event) <'z'>: Likewise.
10579 2013-02-18 Yao Qi <yao@codesourcery.com>
10581 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10583 2013-02-14 Pedro Alves <palves@redhat.com>
10587 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10588 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10590 2013-02-14 Pedro Alves <palves@redhat.com>
10592 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10594 2013-02-14 Pedro Alves <palves@redhat.com>
10596 * tracepoint.c (save_string): Delete.
10597 (add_tracepoint_action): Use savestring instead of save_string.
10599 2013-02-12 Pedro Alves <palves@redhat.com>
10601 * linux-xtensa-low.c: Ditto.
10602 * xtensa-xtregs.c: Ditto.
10604 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10606 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10609 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10611 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10612 aarch64_num_wp_regs and aarch64_num_bp_regs to
10613 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10615 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10617 * linux-aarch64-low.c (ps_get_thread_area): Replace
10618 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10620 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10621 Marcus Shawcroft <marcus.shawcroft@arm.com>
10622 Nigel Stephens <nigel.stephens@arm.com>
10623 Yufeng Zhang <yufeng.zhang@arm.com>
10625 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10626 (aarch64.c, aarch64-without-fpu.c): New targets.
10627 * configure.srv (aarch64*-*-linux*): New.
10628 * linux-aarch64-low.c: New file.
10630 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10632 * linux-low.c (handle_extended_wait, linux_create_inferior)
10633 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10634 (dequeue_one_deferred_signal, linux_resume_one_thread)
10635 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10636 (linux_tracefork_grandchild, linux_test_for_tracefork)
10637 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10638 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10639 where the argument is 0.
10641 2013-01-25 Yao Qi <yao@codesourcery.com>
10643 * event-loop.c: Include "queue.h".
10644 (gdb_event_p): New typedef.
10645 (struct gdb_event) <next_event>: Remove.
10646 (event_queue): Change to QUEUE(gdb_event_p).
10647 (async_queue_event): Remove.
10648 (gdb_event_xfree): New.
10649 (initialize_event_loop): New.
10650 (process_event): Use API from QUEUE.
10651 (wait_for_event): Likewise.
10652 * server.c (main): Call initialize_event_loop.
10653 * server.h (initialize_event_loop): Declare.
10655 2013-01-18 Yao Qi <yao@codesourcery.com>
10657 * ax.h (struct eval_agent_expr_context): New.
10658 (gdb_eval_agent_expr): Update declaration.
10659 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10660 TFRAME. Add new argument CTX.
10661 * server.h (struct eval_agent_expr_context): Declare.
10662 (agent_mem_read, agent_tsv_read): Update declaration.
10663 (agent_mem_read_string): Likewise.
10664 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10665 (add_traceframe_block): Add new argument TPOINT.
10666 Increase TPOINT->traceframe_usage.
10667 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10668 eval_tracepoint_agent_expr.
10669 (condition_true_at_tracepoint): Likewise.
10670 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10671 (agent_mem_read_string, agent_tsv_read): Likewise.
10673 2013-01-16 Yao Qi <yao@codesourcery.com>
10675 * linux-low.c (linux_resume_one_lwp): Don't check
10676 'lwp->bp_reinsert != 0'.
10678 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10679 Pedro Alves <palves@redhat.com>
10681 * lynx-low.c (ptrace_request_to_str): Define a temporary
10682 macro and use it to simplify this function's implementation.
10684 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10686 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10689 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10691 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10693 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10695 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10697 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10699 * lynx-low.c (lynx_resume): Use the resume_info parameter
10700 to determine the ptid for the lynx_ptrace call, unless
10701 it is equal to minus_one_ptid, in which case we use the
10702 ptid of the current_inferior.
10703 (lynx_wait_1): After having received a thread create/exit
10704 event, resume the inferior's execution using the signaling
10705 thread's ptid, rather than the old ptid.
10707 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10709 * lynx-low.c (lynx_resume): Delete variable ret.
10711 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10713 * gdbreplay.c (gdbreplay_version): Update copyright year.
10714 * server.c (gdbserver_version): Likewise.
10716 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10718 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10721 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10723 * lynx-low.c (ptrace_request_to_str): Add handling for
10724 PTRACE_GETTRACESIG.
10726 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10728 * lynx-low.c (lynx_attach): Delete variable new_process.
10730 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10732 * lynx-low.c (lynx_create_inferior): Delete variable
10735 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10737 * lynx-low.c (ptrace_request_to_str): Do not handle
10738 PTRACE_GETTHREADLIST if this macro does not exist.
10740 2012-12-15 Yao Qi <yao@codesourcery.com>
10742 * Makefile.in (OBS): Add notif.o.
10743 * notif.c, notif.h: New.
10744 * server.c: Include "notif.h".
10745 (struct vstop_notif) <next>: Remove.
10747 (queue_stop_reply): Update.
10748 (push_event, send_next_stop_reply): Remove.
10749 (discard_queued_stop_replies): Update.
10750 (notif_stop): New variable.
10751 (handle_v_stopped): Remove.
10752 (handle_v_requests): Don't call handle_v_stopped. Call
10753 handle_ack_notif instead.
10754 (queue_stop_reply_callback): Call notif_event_enque instead
10755 of queue_stop_reply.
10756 (handle_status): Don't call send_next_stop_reply, call
10757 notif_write_event instead.
10758 (kill_inferior_callback): Likewise.
10759 (detach_or_kill_inferior_callback): Likewise.
10760 (main): Call initialize_notif.
10761 (process_serial_event): Call QUEUE_is_empty.
10762 (handle_target_event): Call notif_push instead of push event.
10763 * server.h (push_event): Remove declaration.
10765 2012-12-10 Tom Tromey <tromey@redhat.com>
10767 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10768 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10771 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10772 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10773 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10774 (amd64-linux-ipa.o, ax.o): Rewrite.
10775 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10776 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10777 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10778 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10779 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10780 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10781 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10782 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10783 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10784 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10785 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10786 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10787 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10788 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10789 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10790 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10791 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10792 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10793 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10794 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10795 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10796 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10797 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10798 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10799 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10800 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10801 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10802 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10803 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10804 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10805 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10806 (reg-tilegx.o): Remove.
10807 (all_object_files): New macro.
10808 Include .deps files.
10809 * aclocal.m4, configure: Rebuild.
10810 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10811 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10812 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10814 2012-12-05 Tom Tromey <tromey@redhat.com>
10817 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10819 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10821 * configure.ac: Check for linux/perf_event.h.
10822 * config.in: Regenerated.
10823 * configure: Regenerated.
10825 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10827 * hostio.c (handle_readlink): Decrease buffer size
10828 parameter passed to readlink by one byte.
10830 2012-11-26 Yao Qi <yao@codesourcery.com>
10832 * configure.ac (build_warnings): Append '-Wempty-body'.
10833 * configure: Regenerated.
10834 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10837 2012-11-15 Pierre Muller <muller@sourceware.org>
10839 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10840 * config.in: Regenerate.
10841 * configure: Regenerate.
10842 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10843 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10844 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10845 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10847 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10848 instead of <sys/wait.h> header.
10849 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10851 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10853 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10854 (various make rules): Remove -DGDBSERVER
10856 2012-11-09 Yao Qi <yao@codesourcery.com>
10858 * spu-low.c (current_ptid): Move it to ..
10859 * gdbthread.h: ... here. New.
10860 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10861 * server.c (myresume, process_serial_event): Likewise.
10862 * thread-db.c (thread_db_find_new_threads): Likewise.
10863 * tracepoint.c (run_inferior_command): Likewise.
10865 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10867 * server.c (handle_search_memory_1): Include access length in
10870 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10872 * linux-crisv32-low.c: Fix compile errors.
10874 2012-09-04 Yao Qi <yao@codesourcery.com>
10876 * tracepoint.c (cmd_qtsv): Adjust debug message.
10877 Don't check CUR_TPOINT.
10879 2012-08-28 Yao Qi <yao@codesourcery.com>
10881 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10882 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10883 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10884 Remove declarations of xmalloc, xreallloc, xstrdup and
10886 * Makefile.in (libiberty_h): New.
10887 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10888 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10890 2012-08-23 Yao Qi <yao@codesourcery.com>
10892 * server.h: Remove declaration of 'xsnprintf'.
10894 2012-08-22 Keith Seitz <keiths@redhat.com>
10896 * server.h: Include build-gnulib-gbserver/config.h.
10897 * gdbreplay.c: Likewise.
10899 2012-08-08 Doug Evans <dje@google.com>
10901 * Makefile.in (SFILES): Add gdb_vecs.c.
10902 (OBS): Add gdb_vecs.o.
10903 (gdb_vecs_h, host_defs_h): New variables.
10904 (thread-db.o): Add $(gdb_vecs_h) dependency.
10905 (gdb_vecs.o): New rule.
10906 * thread-db.c: #include "gdb_vecs.h".
10907 (thread_db_load_search): Use a vector to iterate over path elements.
10908 Handle text appearing after "$pdir".
10910 * configure.ac: Add check for strstr.
10911 * config.in: Regenerate.
10912 * configure: Regenerate.
10914 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10916 * hostio.c (handle_pread): If pread fails, fall back to attempting
10918 (handle_pwrite): Likewise for pwrite.
10920 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10922 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10923 between unsupported TYPE and unimplementable ADDR/LEN combination.
10924 (arm_insert_point): Act on new return value.
10926 2012-07-31 Pedro Alves <palves@redhat.com>
10928 * server.c (process_point_options): Only skip tokens if we find
10929 one that is unrecognized. Don't treat 'X' specially while
10930 skipping unrecognized tokens.
10932 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10934 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10935 to 4-byte-align HW breakpoint addresses for Thumb.
10937 2012-07-27 Yao Qi <yao@codesourcery.com>
10941 * server.h: Declare gdb_agent_about_to_close.
10942 * target.c (kill_inferior): Include "agent.h".
10943 New. Send command 'kill'.
10944 * target.h (kill_inferior): Removed macro.
10945 * tracepoint.c (gdb_agent_about_to_close): New.
10946 (gdb_agent_helper_thread): Handle command 'close'.
10947 Wait endlessly until the inferior stops.
10948 Install gdb_agent_remove_socket to atexit hook.
10949 (agent_socket_name): New static variable.
10950 (gdb_agent_socket_init): Replace local variable 'name' with
10951 'agent_socket_name'.
10952 (gdb_agent_remove_socket): New.
10954 2012-07-27 Yao Qi <yao@codesourcery.com>
10956 * server.c (process_point_options): Stop at 'X' when parsing.
10958 2012-07-19 Michael Eager <eager@eagercon.com>
10960 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10962 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10963 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10964 hardware breakpoint.
10966 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10968 * gdbserver/linux-low.c (initialize_low): Call
10969 linux_ptrace_init_warnings.
10971 2012-07-02 Doug Evans <dje@google.com>
10973 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10976 2012-07-02 Stan Shebs <stan@codesourcery.com>
10978 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10979 (ax.o): Add it to build rule.
10981 (OBS): Add format.o.
10982 (IPA_OBS): Add format.o.
10983 * server.c (handle_query): Claim support for breakpoint commands.
10984 (process_point_options): Add command case.
10985 (process_serial_event): Leave running if there are printfs in
10987 * mem-break.h (any_persistent_commands): Declare.
10988 (add_breakpoint_commands): Declare.
10989 (gdb_no_commands_at_breakpoint): Declare.
10990 (run_breakpoint_commands): Declare.
10991 * mem-break.c (struct point_command_list): New struct.
10992 (struct breakpoint): New field command_list.
10993 (any_persistent_commands): New function.
10994 (add_commands_to_breakpoint): New function.
10995 (add_breakpoint_commands): New function.
10996 (gdb_no_commands_at_breakpoint): New function.
10997 (run_breakpoint_commands): New function.
10998 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11000 * ax.c: Include format.h.
11001 (ax_printf): New function.
11002 (gdb_eval_agent_expr): Add printf opcode.
11004 2012-06-13 Yao Qi <yao@codesourcery.com>
11006 * server.c (start_inferior): Remove duplicated writes to fields
11007 'last_resume_kind' and 'last_status' of 'current_inferior'.
11009 2012-06-12 Yao Qi <yao@codesourcery.com>
11010 Pedro Alves <palves@redhat.com>
11012 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11014 * server.c (handle_v_cont): Extend comment.
11016 2012-06-11 Yao Qi <yao@codesourcery.com>
11018 * linux-low.c (linux_attach): Add 'static'.
11020 2012-06-06 Yao Qi <yao@codesourcery.com>
11022 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11024 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11026 Fix gcc -flto compilation warning.
11027 * server.c (main): Make variable multi_mode and attach volatile.
11029 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11031 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11032 if the platform doesn't know about it.
11034 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11036 * Makefile.in (SFILES): Add linux-tile-low.c.
11037 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11038 * configure.srv: Handle tilegx-*-linux*.
11039 * linux-tile-low.c: New file.
11041 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11043 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11045 2012-05-24 Pedro Alves <palves@redhat.com>
11049 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11051 2012-05-24 Pedro Alves <palves@redhat.com>
11055 Replace target_signal with gdb_signal throughout.
11057 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11059 * linux-low.c (linux_store_registers): Avoid the copying sequence
11060 when no data has been retrieved by ptrace.
11062 2012-05-22 Will Deacon <will.deacon@arm.com>
11064 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11065 Include asm/ptrace.h.
11066 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11069 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11071 * linux-low.c (linux_store_registers): Don't re-retrieve data
11072 with ptrace that has already been obtained from /proc. Always
11073 copy any data retrieved with ptrace to the buffer supplied.
11075 2012-05-11 Yao Qi <yao@codesourcery.com>
11076 Pedro Alves <palves@redhat.com>
11078 * linux-low.c (enum stopping_threads_kind): New.
11079 (stopping_threads): Change type to `enum stopping_threads_kind'.
11080 (handle_extended_wait): If stopping and suspending threads, leave
11081 the new_lwp suspended too.
11082 (linux_wait_for_event): Adjust.
11083 (stop_all_lwps): Set `stopping_threads' to
11084 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11085 whether we're suspending threads or just stopping them. Assert no
11088 2012-04-29 Yao Qi <yao@codesourcery.com>
11090 * server.h: Move some code to ...
11091 * gdbthread.h: ... here. New.
11092 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11093 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11094 (nto-low.o, win32-low.o): Likewise.
11095 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11096 * regcache.c, remote-utils.c, server.c: Likewise.
11097 * target.c, tracepoint.c, win32-low.c: Likewise.
11099 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11101 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11102 (PTRACE_ARG4_TYPE): Likewise.
11103 (PTRACE_XFER_TYPE): Likewise.
11104 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11105 ptrace to PTRACE_ARG3_TYPE.
11106 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11107 (PTRACE_ARG4_TYPE): Likewise.
11108 (PTRACE_XFER_TYPE): Likewise.
11109 (linux_detach_one_lwp): Cast fourth argument of
11110 ptrace to long then PTRACE_ARG4_TYPE.
11111 (regsets_fetch_inferior_registers): Cast third argument of
11112 ptrace to long then PTRACE_ARG3_TYPE.
11113 (regsets_store_inferior_registers): Likewise.
11115 2012-04-20 Pedro Alves <palves@redhat.com>
11117 * configure: Regenerate.
11119 2012-04-19 Pedro Alves <palves@redhat.com>
11121 * Makefile.in (GNULIB_BUILDDIR): New.
11122 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11123 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11124 (all, install-only, uninstall, clean-info, all-lib, clean): No
11125 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11126 (maintainer-clean realclean distclean): Use subdir_do.
11128 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11129 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11130 * acinclude.m4: Include acx_configure_dir.m4.
11131 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11132 calls. Call AC_PROG_RANLIB. Configure gnulib using
11135 (GNULIB_STDINT_H): Adjust.
11136 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11137 * gdbreplay.c: Include build-gnulib/config.h.
11138 * server.h: Likewise.
11139 * aclocal.m4: Regenerate.
11140 * config.in: Regenerate.
11141 * configure: Regenerate.
11143 2012-04-19 Pedro Alves <palves@redhat.com>
11145 * Makefile.in (LIBGNU, INCGNU): Adjust.
11146 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11147 (all, install-only, uninstall, clean-info, all-lib, clean)
11148 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11149 * configure.ac: Adjust AC_OUTPUT output.
11150 * aclocal.m4: Regenerate.
11151 * configure: Regenerate.
11153 2012-04-19 Pedro Alves <palves@redhat.com>
11155 * Makefile.in (generated_files): New.
11156 (server_h): Remove the explicit dependency on config.h, and depend
11157 on $generated_files.
11159 2012-04-19 Pedro Alves <palves@redhat.com>
11161 * Makefile.in (INCGNU): Add -Ignulib.
11163 2012-04-19 Pedro Alves <palves@redhat.com>
11165 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11166 (INCGNU): ... this, and spell out -I here.
11167 (GNULIB_LIB): Rename to ...
11168 (LIBGNU): ... this.
11169 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11171 2012-04-19 Pedro Alves <palves@redhat.com>
11173 * config.in: Regenerate.
11175 2012-04-19 Pedro Alves <palves@redhat.com>
11177 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11178 * server.h (memmem): Remove declaration.
11179 * config.in: Regenerate.
11180 * configure: Regenerate.
11182 2012-04-19 Yao Qi <yao@codesourcery.com>
11184 * Makefile.in (SFILES): Add common/vec.c.
11188 2012-04-19 Yao Qi <yao@codesourcery.com>
11190 * remote-utils.c (prepare_resume_reply): Replace with macro
11191 target_core_of_thread.
11192 * server.c (handle_qxfer_threads_proper): Likewise.
11193 * target.h (traget_core_of_thread): New macro.
11195 2012-04-18 Pedro Alves <palves@redhat.com>
11197 * aclocal.m4: Regenerate.
11198 * configure: Regenerate.
11200 2012-04-16 Yao Qi <yao@codesourcery.com>
11202 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11203 duplicated on address.
11205 2012-04-16 Yao Qi <yao@codesourcery.com>
11207 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11208 (struct tracepoint_action_ops) <send>: New field.
11209 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11210 (agent_expr_send, x_tracepoint_action_send): New.
11211 (l_tracepoint_action_send): New.
11212 (cmd_qtdp): Download and install tracepoint
11213 according to `use_agent'.
11214 (run_inferior_command): Add one more parameter `len'.
11216 (tracepoint_send_agent): New.
11217 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11219 2012-04-16 Yao Qi <yao@codesourcery.com>
11221 * tracepoint.c (download_tracepoints): Moved to ...
11222 (cmd_qtstart): ... here.
11224 2012-04-14 Yao Qi <yao@codesourcery.com>
11226 * tracepoint.c: Include inttypes.h.
11227 (struct collect_memory_action): Use sized types.
11228 (struct tracepoint): Likewise.
11229 (cmd_qtdp, stop_tracing): Update print specifiers.
11230 (cmd_qtp, response_tracepoint): Likewise.
11231 (collect_data_at_tracepoint): Likewise.
11232 (collect_data_at_step): Likewise.
11234 2012-04-14 Yao Qi <yao@codesourcery.com>
11236 Import gnulib module inttypes.
11237 * aclocal.m4, config.in, configure: Regenerated.
11239 2012-04-14 Yao Qi <yao@codesourcery.com>
11241 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11242 Makefile and config.status at last.
11244 2012-04-13 Yao Qi <yao@codesourcery.com>
11246 * tracepoint.c: Include stdint.h unconditionally.
11248 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11250 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11251 on BFD_HAVE_SYS_PROCFS_TYPE.
11252 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11253 * configure: Regenerate.
11254 * config.in: Likewise.
11256 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11258 * Makefile.in (clean): Also remove x32.c x32-linux.c
11259 x32-avx.c x32-avx-linux.c.
11260 (x32.o): New target.
11262 (x32-linux.o): Likewise.
11263 (x32-linux.c): Likewise.
11264 (x32-avx.o): Likewise.
11265 (x32-avx.c): Likewise.
11266 (x32-avx-linux.o): Likewise.
11267 (x32-avx-linux.c): Likewise.
11269 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11270 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11271 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11272 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11273 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11274 i386/x32-avx-linux.xml.
11276 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11277 (init_registers_x32_avx_linux): Likwise.
11278 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11279 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11281 2012-04-13 Pedro Alves <palves@redhat.com>
11283 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11284 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11285 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11286 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11289 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11291 * linux-x86-low.c (compat_x32_clock_t): New.
11292 (compat_x32_siginfo_t): Likewise.
11293 (compat_x32_siginfo_from_siginfo): Likewise.
11294 (siginfo_from_compat_x32_siginfo): Likewise.
11295 (linux_is_elf64): Likewise.
11296 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11297 and siginfo_from_compat_x32_siginfo for x32.
11298 (x86_arch_setup): Set linux_is_elf64.
11300 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11303 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11305 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11306 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11307 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11308 compatible with process.
11310 2012-04-12 Yao Qi <yao@codesourcery.com>
11312 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11313 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11314 (install-only, install-info, clean): Handle sub dir gnulib.
11315 (all-lib, am--refresh): New targets.
11316 (memmem.o): Remove target.
11317 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11318 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11319 (AC_REPLACE_FUNCS): Remove memmem.
11320 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11321 (AC_OUTPUT): Generate Makefile in gnulib/.
11322 * aclocal.m4, config.in, configure: Regenerated.
11324 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11326 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11328 2012-04-05 Pedro Alves <palves@redhat.com>
11330 -Werror=strict-aliasing
11332 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11335 2012-04-04 Pedro Alves <palves@redhat.com>
11337 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11338 (sparc_store_gregset_from_stack, sparc_store_gregset)
11339 (sparc_breakpoint_at): Fix formatting.
11341 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11343 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11345 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11346 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11347 * config.in: Regenerate.
11348 * configure: Likewise.
11350 2012-03-29 Pedro Alves <palves@redhat.com>
11352 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11353 Correct ptrace arguments.
11355 2012-03-28 Pedro Alves <palves@redhat.com>
11357 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11358 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11359 (IA64_FR1_REGNUM): New defines.
11360 (ia64_fetch_register): New.
11361 (the_low_target): Install it.
11362 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11364 * linux-low.c (linux_fetch_registers): Try the
11365 the_low_target.fetch_register hook first.
11367 * linux-arm-low.c (the_low_target): Adjust.
11368 * linux-bfin-low.c (the_low_target): Adjust.
11369 * linux-cris-low.c (the_low_target): Adjust.
11370 * linux-crisv32-low.c (the_low_target): Adjust.
11371 * linux-m32r-low.c (the_low_target): Adjust.
11372 * linux-m68k-low.c (the_low_target): Adjust.
11373 * linux-mips-low.c (the_low_target): Adjust.
11374 * linux-ppc-low.c (the_low_target): Adjust.
11375 * linux-s390-low.c (the_low_target): Adjust.
11376 * linux-sh-low.c (the_low_target): Adjust.
11377 * linux-sparc-low.c (the_low_target): Adjust.
11378 * linux-tic6x-low.c (the_low_target): Adjust.
11379 * linux-x86-low.c (the_low_target): Adjust.
11380 * linux-xtensa-low.c (the_low_target): Adjust.
11382 2012-03-26 Pedro Alves <palves@redhat.com>
11384 * server.c (handle_qxfer_libraries): Don't bail early if
11385 the_target->qxfer_libraries_svr4 is not NULL.
11387 2012-03-26 Pedro Alves <palves@redhat.com>
11389 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11391 2012-03-23 Pedro Alves <palves@redhat.com>
11393 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11394 "library-list-svr4" element's start tag when the the DSO list is
11397 2012-03-23 Pedro Alves <palves@redhat.com>
11399 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11400 a variable whose type size is the same as the inferior's pointer
11403 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11405 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11407 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11408 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11409 * linux-low.h: Include <signal.h>.
11410 (struct siginfo): Remove forward declaration.
11411 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11414 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11416 * .gitignore: Ignore more files.
11418 2012-03-19 Pedro Alves <palves@redhat.com>
11419 Jan Kratochvil <jan.kratochvil@redhat.com>
11421 * server.c (cont_thread, general_thread): Add describing comments.
11422 (start_inferior): Clear `cont_thread'.
11423 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11426 2012-03-15 Yao Qi <yao@codesourcery.com>
11428 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11430 (cmd_qtdp): ... here.
11432 2012-03-15 Yao Qi <yao@codesourcery.com>
11434 * tracepoint.c (struct tracepoint_action_ops): New.
11435 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11436 (m_tracepoint_action_download): New.
11437 (r_tracepoint_action_download): New.
11438 (x_tracepoint_action_download): New.
11439 (l_tracepoint_action_download): New.
11440 (add_tracepoint_action): Install `action->ops' according type.
11441 (download_tracepoint_1): Move code `download' function pointer
11442 of various tracepoint_action_ops.
11444 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11446 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11447 linux_ptrace_attach_warnings.
11449 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11451 * Makefile.in (linux-ptrace.o): New.
11452 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11453 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11454 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11455 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11456 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11458 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11460 2012-03-08 Yao Qi <yao@codesourcery.com>
11461 Pedro Alves <palves@redhat.com>
11463 Fix PR server/13392.
11464 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11465 offset of JMP insn.
11466 * tracepoint.c (remove_tracepoint): New.
11467 (cmd_qtdp): Call remove_tracepoint when failed to install.
11469 2012-03-07 Pedro Alves <palves@redhat.com>
11471 * linux-low.c (get_detach_signal): New.
11472 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11473 Pass on pending signals to PTRACE_DETACH. Check the result of the
11475 * server.c (program_signals, program_signals_p): New.
11476 (handle_general_set): Handle QProgramSignals.
11477 * server.h (program_signals, program_signals_p): Declare.
11479 2012-03-05 Pedro Alves <palves@redhat.com>
11480 Jan Kratochvil <jan.kratochvil@redhat.com>
11482 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11485 2012-03-03 Yao Qi <yao@codesourcery.com>
11487 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11488 agent_look_up_symbols.
11490 2012-03-03 Yao Qi <yao@codesourcery.com>
11492 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11493 (linux-x86-low.o): Likewise.
11494 * server.h: Remove in_process_agent_loaded.
11495 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11499 2012-03-03 Yao Qi <yao@codesourcery.com>
11501 * tracepoint.c (gdb_agent_capability): New global.
11502 (in_process_agent_loaded_ust): Renamed to
11503 `in_process_agent_supports_ust'.
11505 (in_process_agent_supports_ust): Call agent_capability_check.
11506 (clear_installed_tracepoints): Assert that agent supports
11509 2012-03-03 Yao Qi <yao@codesourcery.com>
11511 * linux-low.c (linux_supports_agent): New.
11512 (linux_target_ops): Initialize field `supports_agent' with
11513 linux_supports_agent.
11514 * target.h (struct target_ops) <supports_agent>: New.
11515 (target_supports_agent): New macro.
11516 * server.c (handle_general_set): Handle packet 'QAgent'.
11517 (handle_query): Send `QAgent+'.
11518 * Makefile.in (server.o): Depends on agent.h.
11520 2012-03-03 Yao Qi <yao@codesourcery.com>
11522 * Makefile.in (OBS): Add agent.o.
11523 Add new rule for agent.o.
11524 Track dependence of tracepoint.c on agent.h.
11525 * tracepoint.c (run_inferior_command_1):
11526 (run_inferior_command): Call agent_run_command.
11527 (gdb_ust_connect_sync_socket): Deleted. Move it to
11529 (resume_thread, stop_thread): Likewise.
11530 (gdb_ust_socket_init): Renamed to ...
11531 (gdb_agent_socket_init): ... New.
11532 (gdb_ust_thread): Renamed to ...
11533 (gdb_agent_helper_thread): ... New.
11534 (gdb_ust_init): Move some code to ...
11535 (gdb_agent_init): ... here. New.
11536 [HAVE_UST]: Call gdb_ust_init.
11537 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11538 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11539 * config.in, configure: Regenerated.
11541 2012-03-02 Pedro Alves <palves@redhat.com>
11543 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11544 * linux-low.c (struct simple_pid_list): New.
11545 (stopped_pids): New a struct simple_pid_list pointer.
11546 (add_to_pid_list, pull_pid_from_list): New.
11547 (handle_extended_wait): Don't assume the first signal new children
11548 report is SIGSTOP. Adjust call to pull_pid_from_list.
11549 (linux_wait_for_lwp): Adjust.
11551 2012-03-02 Yao Qi <yao@codesourcery.com>
11553 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11556 2012-03-02 Yao Qi <yao@codesourcery.com>
11558 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11559 `stop_pc' and `tpoint'. Update caller.
11561 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11563 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11564 * linux-low.c (use_linux_regsets): New macro.
11565 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11566 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11567 (linux_register_in_regsets): New function.
11568 (usr_fetch_inferior_registers): Skip registers covered by
11570 (usr_store_inferior_registers): Likewise.
11571 (usr_fetch_inferior_registers): New macro.
11572 (usr_store_inferior_registers): Likewise.
11573 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11574 (linux_store_registers): Likewise.
11575 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11577 (init_registers_mips64_dsp_linux): Likewise.
11578 (init_registers_mips_linux): New macro.
11579 (init_registers_mips_dsp_linux): Likewise.
11580 (mips_dsp_num_regs): Likewise.
11581 (DSP_BASE, DSP_CONTROL): New fallback macros.
11582 (mips_base_regs): New macro.
11583 (mips_regmap): Use it. Fix the size.
11584 (mips_dsp_regmap): New variable.
11585 (mips_dsp_regset_bitmap): Likewise.
11586 (mips_arch_setup): New function.
11587 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11589 (mips_cannot_store_register): Likewise.
11590 (the_low_target): Update .arch_setup, .num_regs and .regmap
11591 initializers. Add .regset_bitmap initializer.
11592 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11594 * linux-bfin-low.c (the_low_target): Likewise.
11595 * linux-cris-low.c (the_low_target): Likewise.
11596 * linux-crisv32-low.c (the_low_target): Likewise.
11597 * linux-ia64-low.c (the_low_target): Likewise.
11598 * linux-m32r-low.c (the_low_target): Likewise.
11599 * linux-m68k-low.c (the_low_target): Likewise.
11600 * linux-ppc-low.c (the_low_target): Likewise.
11601 * linux-s390-low.c (the_low_target): Likewise.
11602 * linux-sh-low.c (the_low_target): Likewise.
11603 * linux-sparc-low.c (the_low_target): Likewise.
11604 * linux-tic6x-low.c (the_low_target): Likewise.
11605 * linux-x86-low.c (the_low_target): Likewise.
11606 * linux-xtensa-low.c (the_low_target): Likewise.
11607 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11608 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11609 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11611 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11612 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11614 2012-02-29 Yao Qi <yao@codesourcery.com>
11615 Pedro Alves <palves@redhat.com>
11617 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11618 `step_over_finished' is true.
11620 2012-02-27 Pedro Alves <palves@redhat.com>
11622 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11623 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11625 2012-02-27 Pedro Alves <palves@redhat.com>
11628 * linux-low.c (pid_is_stopped): New.
11629 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11631 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11633 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11636 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11638 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11640 2012-02-24 Luis Machado <lgustavo@codesourcery>
11642 * server.c (handle_query): Advertise support for target-side
11643 breakpoint condition evaluation.
11644 (process_point_options): New function.
11645 (process_serial_event): When inserting a breakpoint, check for
11646 a target-side condition that should be evaluated.
11648 * mem-break.c: Include regcache.h and ax.h.
11649 (point_cond_list_t): New data structure.
11650 (breakpoint) <cond_list>: New field.
11651 (find_gdb_breakpoint_at): Make non-static.
11652 (delete_gdb_breakpoint_at): Clear any target-side
11654 (clear_gdb_breakpoint_conditions): New function.
11655 (add_condition_to_breakpoint): Likewise.
11656 (add_breakpoint_condition): Likewise.
11657 (gdb_condition_true_at_breakpoint): Likewise.
11658 (gdb_breakpoint_here): Return result directly instead
11659 of going through a local variable.
11661 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11662 (clear_gdb_breakpoint_conditions): Likewise.
11663 (add_breakpoint_condition): Likewise.
11664 (gdb_condition_true_at_breakpoint): Likewise.
11666 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11667 (need_step_over_p): Take target-side breakpoint condition into
11670 2012-02-24 Luis Machado <lgustavo@codesourcery>
11672 * server.h: Include tracepoint.h.
11673 (agent_mem_read, agent_get_trace_state_variable_value,
11674 agent_set_trace_state_variable_value,
11675 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11676 get_set_tsv_func_addr): New prototypes.
11678 * ax.h: New include file.
11679 * ax.c: New source file.
11681 * tracepoint.c: Include ax.h.
11682 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11683 agent_expr, eval_result_type): Move to ax.h.
11684 (parse_agent_expr): Rename to ...
11685 (gdb_parse_agent_expr): ... this, make it non-static and move
11687 (unparse_agent_expr) Rename to ...
11688 (gdb_unparse_agent_expr): ... this, make it non-static and move
11690 (eval_agent_expr): Rename to ...
11691 (eval_tracepoint_agent_expr): ... this.
11692 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11693 forward declarations.
11694 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11695 (agent_get_trace_state_variable_value): New function.
11696 (agent_set_trace_state_variable_value): New function.
11697 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11698 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11699 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11700 (condition_true_at_tracepoint): Likewise.
11701 (parse_agent_expr): Rename to ...
11702 (gdb_parse_agent_expr): ... this and move to ax.c.
11703 (unparse_agent_expr): Rename to ...
11704 (gdb_unparse_agent_expr): ... this and move to ax.c.
11705 (gdb_agent_op_name): Move to ax.c.
11706 (eval_agent_expr): Rename to ...
11707 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11709 (eval_tracepoint_agent_expr): New function.
11710 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11712 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11714 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11715 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11716 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11717 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11718 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11719 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11720 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11721 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11722 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11723 (compile_bytecodes): Remove forward declaration.
11724 (is_goto_target): Move to ax.c.
11725 (compile_bytecodes): Move to ax.c and call
11726 agent_get_trace_state_variable_value (...) and
11727 agent_set_trace_state_variable_value (...).
11729 * Makefile.in: Update ax.c and IPA dependencies.
11731 2012-02-24 Pedro Alves <palves@redhat.com>
11733 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11734 (cmd_bigqtbuffer_circular): ... this. Only handle
11735 'QTBuffer:circular:'.
11736 (handle_tracepoint_general_set): Adjust.
11738 2012-02-16 Yao Qi <yao@codesourcery.com>
11740 * inferiors.c: Move code to ...
11741 * dll.c: .... here. New.
11742 * server.h: Declare clear_dlls.
11743 * Makefile.in (SFILES): Add dll.c.
11747 2012-02-11 Yao Qi <yao@codesourcery.com>
11749 * server.c: (handle_monitor_command): Add a new parameter
11751 (handle_query): Update caller.
11753 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11755 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11756 * configure, config.in: Regenerate.
11757 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11760 2012-02-02 Pedro Alves <palves@redhat.com>
11762 Try SIGKILL first, then PTRACE_KILL.
11763 * linux-low.c (linux_kill_one_lwp): New.
11764 (linux_kill_one_lwp): Rename to ...
11765 (kill_one_lwp_callback): ... this. Use the new
11766 linux_kill_one_lwp.
11768 2012-02-02 Pedro Alves <palves@redhat.com>
11770 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11773 2012-01-27 Pedro Alves <palves@redhat.com>
11775 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11776 (elf_64_file_p): Make static.
11777 (linux_pid_exe_is_elf_64_file): New.
11778 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11779 Delete declarations.
11780 (linux_pid_exe_is_elf_64_file): Declare.
11781 * linux-x86-low.c (x86_arch_setup): Use
11782 linux_pid_exe_is_elf_64_file.
11784 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11786 * linux-low.c (linux_wait_for_event_1): Rename to ...
11787 (linux_wait_for_event): ... here and merge it with former
11788 linux_wait_for_event - new variable wait_ptid, use it.
11789 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11791 2012-01-23 Pedro Alves <palves@redhat.com>
11793 * server.c (main): Avoid yet another case of infinite loop while
11794 detaching/killing after a longjmp.
11796 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11799 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11801 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11803 * hostio.c (handle_readlink): New function.
11804 (handle_vFile): Call it to handle "vFile:readlink" packets.
11806 2012-01-20 Pedro Alves <palves@redhat.com>
11807 Ulrich Weigand <ulrich.weigand@linaro.org>
11809 * server.c (handle_v_requests): Only support vAttach and vRun to
11810 start multiple processes when in extended protocol mode.
11812 2012-01-17 Pedro Alves <palves@redhat.com>
11814 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11815 memalign plus mprotect to allocate the scratch buffer.
11817 2012-01-13 Pedro Alves <palves@redhat.com>
11819 * server.c (attach_inferior): Clear `cont_thread'.
11821 2012-01-13 Pedro Alves <palves@redhat.com>
11823 * server.c (main): Avoid infinite loop while detaching/killing
11826 2012-01-09 Doug Evans <dje@google.com>
11828 * server.c (start_inferior): Set last_ptid in --wrapper case.
11830 2012-01-06 Yao Qi <yao@codesourcery.com>
11832 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11834 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11836 2012-01-04 Yao Qi <yao@codesourcery.com>
11838 * tracepoint.c (cmd_qtdp): Print debug message
11839 for static tracepoint.
11841 2012-01-04 Yao Qi <yao@codesourcery.com>
11843 * tracepoint.c (trace_vdebug): Differentiate debug message
11844 between gdbserver and IPA.
11846 2012-01-03 Yao Qi <yao@codesourcery.com>
11848 * tracepoint.c (tracepoint_was_hit): Don't collect for
11851 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11853 * terminal.h: Reformat copyright header.
11855 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11857 * server.c (gdbserver_version): Update copyright year.
11858 * gdbreplay.c (gdbreplay_version): Likewise.
11860 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11862 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11865 2011-12-18 Hui Zhu <teawater@gmail.com>
11866 * linux-low.c (linux_create_inferior): Save return value to ret.
11868 2011-12-18 Hui Zhu <teawater@gmail.com>
11870 * linux-low.c (linux_create_inferior): Save return value to ret.
11872 2011-12-16 Doug Evans <dje@google.com>
11874 * linux-low.c (linux_create_inferior): If stdio connection,
11875 redirect stdin from /dev/null, stdout to stderr.
11876 * remote-utils.c (remote_is_stdio): New static global.
11877 (remote_connection_is_stdio): New function.
11878 (remote_prepare): Handle stdio connection.
11879 (remote_open): Ditto.
11880 (remote_close): Don't close stdin for stdio connections.
11881 (read_prim,write_prim): New functions. Replace all calls to
11882 read/write to these.
11883 * server.c (main): Watch for "-" argument. Move call to
11884 remote_prepare before start_inferior.
11885 * server.h (STDIO_CONNECTION_NAME): New macro.
11886 (remote_connection_is_stdio): Declare.
11888 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11889 in debugging output.
11891 2011-12-15 Yao Qi <yao@codesourcery.com>
11893 * tracepoint.c: Include sys/syscall.h.
11894 (gdb_ust_thread): Remove preprocessor conditional.
11896 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11898 * linux-low.c (linux_detach_one_lwp): Call
11899 the_low_target.prepare_to_resume before detaching.
11901 2011-12-14 Yao Qi <yao@codesourcery.com>
11903 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11906 2011-12-14 Yao Qi <yao@codesourcery.com>
11908 * i386-low.c (i386_low_stopped_data_address): Initialize local
11909 variable `control'.
11911 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11915 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11916 DR_CONTROL unless necessary. Extend comments.
11917 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11918 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11920 2011-12-13 Yao Qi <yao@codesourcery.com>
11922 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11924 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11926 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11928 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11929 Print new debug message for such case.
11931 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11933 Fix overlapping memcpy.
11934 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11935 the read_inferior_memory transfer.
11936 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11937 write_inferior_memory transfer.
11938 (set_fast_tracepoint_jump): New variable buf. Use it for the
11939 read_inferior_memory and write_inferior_memory transfers.
11940 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11941 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11942 Use it for the write_inferior_memory transfer.
11943 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11946 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11948 * linux-low.c (fetch_register, store_register): Make code
11949 consistent, fix formatting.
11951 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11953 * linux-low.c (usr_store_inferior_registers): Factor out code
11954 to handle individual registers into...
11955 (store_register): ... this new function.
11957 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11959 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11960 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11961 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11962 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11963 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11964 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11965 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11966 (srv_xmlfiles): Add new XML files.
11968 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11970 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11971 (init_registers_s390_linux32v1): Add prototype.
11972 (init_registers_s390_linux32v2): Likewise.
11973 (init_registers_s390_linux64v1): Likewise.
11974 (init_registers_s390_linux64v2): Likewise.
11975 (init_registers_s390x_linux64v1): Likewise.
11976 (init_registers_s390x_linux64v2): Likewise.
11977 (s390_num_regs): Increment to 52.
11978 (s390_regmap): Add orig_r2 register.
11979 (s390_num_regs_3264): Increment to 68.
11980 (s390_regmap_3264): Add orig_r2 register.
11981 (s390_collect_ptrace_register): Handle orig_r2 register.
11982 (s390_supply_ptrace_register): Likewise.
11983 (s390_fill_last_break): New function.
11984 (s390_store_last_break): Likewise.
11985 (s390_fill_system_call): New function.
11986 (s390_store_system_call): Likewise.
11987 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11989 (s390_check_regset): New function.
11990 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11991 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11992 Update target_regsets for available register sets.
11994 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11995 Jan Kratochvil <jan.kratochvil@redhat.com>
11997 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11998 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12000 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12001 * linux-low.h (struct process_info_private): New member r_debug.
12002 * server.c (handle_qxfer_libraries): Call
12003 the_target->qxfer_libraries_svr4.
12004 (handle_qxfer_libraries_svr4): New function.
12005 (qxfer_packets): New entry "libraries-svr4".
12006 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12007 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12008 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12009 PACKET_qXfer_libraries_svr4.
12011 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12013 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12014 PSW address/mask between 8-byte and 16-byte formats.
12015 (s390_supply_ptrace_register): Likewise.
12016 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12017 basic addressing mode bit.
12019 2011-11-24 Stan Shebs <stan@codesourcery.com>
12021 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12023 2011-11-17 Stan Shebs <stan@codesourcery.com>
12025 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12026 (tracing_start_time): New global.
12027 (tracing_stop_time): New global.
12028 (tracing_user_name): New global.
12029 (tracing_notes): New global.
12030 (tracing_stop_note): New global.
12031 (cmd_qtstart): Set traceframe_usage, start_time.
12032 (stop_tracing): Set stop_time.
12033 (cmd_qtstatus): Report additional status.
12034 (cmd_qtp): New function.
12035 (handle_tracepoint_query): Call it.
12036 (cmd_qtnotes): New function.
12037 (handle_tracepoint_general_set): Call it.
12038 (get_timestamp): Rename from tsv_get_timestamp.
12040 2011-11-14 Stan Shebs <stan@codesourcery.com>
12041 Kwok Cheung Yeung <kcy@codesourcery.com>
12043 * linux-x86-low.c (small_jump_insn): New.
12044 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12045 trampoline and error message, build a trampoline and issue a small
12046 jump instruction to it.
12047 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12048 trampoline and error message.
12049 (x86_get_min_fast_tracepoint_insn_len): New.
12050 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12051 * linux-low.h (struct linux_target_ops): Add arguments to
12052 install_fast_tracepoint_jump_pad operation, add new operation.
12053 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12055 (linux_get_min_fast_tracepoint_insn_len): New function.
12056 (linux_target_op): Add new operation.
12057 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12058 (gdb_trampoline_buffer_end): Ditto.
12059 (gdb_trampoline_buffer_error): Ditto.
12060 (struct ipa_sym_addresses): Add fields for new IPA variables.
12061 (symbol_list): Add entries for new IPA variables.
12062 (struct tracepoint): Add fields to hold the address range of the
12063 trampoline used by the tracepoint.
12064 (trampoline_buffer_head): New static variable.
12065 (trampoline_buffer_tail): Ditto.
12066 (claim_trampoline_space): New function.
12067 (have_fast_tracepoint_trampoline_buffer): New function.
12068 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12070 (install_fast_tracepoint): Ditto, also add error buffer argument.
12071 (cmd_qtminftpilen): New function.
12072 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12073 (fast_tracepoint_from_trampoline_address): New function.
12074 (fast_tracepoint_collecting): Handle trampoline as part of jump
12076 (set_trampoline_buffer_space): New function.
12077 (initialize_tracepoint): Initialize new IPA variables.
12078 * target.h (struct target_ops): Add arguments to
12079 install_fast_tracepoint_jump_pad operation, add new
12080 get_min_fast_tracepoint_insn_len operation.
12081 (target_get_min_fast_tracepoint_insn_len): New.
12082 (install_fast_tracepoint_jump_pad): Add arguments.
12083 * server.h (IPA_BUFSIZ): Define.
12084 * linux-i386-ipa.c: Include extra header files.
12085 (initialize_fast_tracepoint_trampoline_buffer): New function.
12086 (initialize_low_tracepoint): Call it.
12087 * server.h (set_trampoline_buffer_space): Declare.
12088 (claim_trampoline_space): Ditto.
12089 (have_fast_tracepoint_trampoline_buffer): Ditto.
12091 2011-11-14 Yao Qi <yao@codesourcery.com>
12093 * server.c (handle_query): Handle InstallInTrace for qSupported.
12094 * tracepoint.c (add_tracepoint): Sort list.
12095 (install_tracepoint, download_tracepoint): New.
12096 (cmd_qtdp): Call them to install and download tracepoints.
12097 (sort_tracepoints): Removed.
12098 (cmd_qtstart): Update.
12100 2011-11-14 Yao Qi <yao@codesourcery.com>
12102 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12103 * mem-break.h: Declare.
12104 * tracepoint.c (cmd_qtstart): Move some code to ...
12105 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12107 (download_tracepoints): Move some code to ...
12108 (download_tracepoint_1): ... here. New.
12110 2011-11-08 Yao Qi <yao@codesourcery.com>
12112 * remote-utils.c (relocate_instruction): A comment fix.
12114 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12116 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12117 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12118 dr_status_mirror and dr_control_mirror from debug_reg_state.
12119 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12120 (i386_initial_stuff): Remove use of deleted globals.
12121 (i386_get_thread_context, i386_set_thread_context,
12122 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12123 from debug_reg_state.
12125 2011-11-05 Yao Qi <yao@codesourcery.com>
12127 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12128 address as TPOINT's.
12130 2011-11-02 Stan Shebs <stan@codesourcery.com>
12132 * tracepoint.c (agent_mem_read_string): New function.
12133 (eval_agent_expr): Call it for tracenz.
12134 * server.c (handle_query): Report support for tracenz.
12136 2011-11-02 Yao Qi <yao@codesourcery.com>
12138 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12140 2011-11-02 Yao Qi <yao@codesourcery.com>
12142 * target.h: Fix a typo in comment.
12144 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12146 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12147 clobber the breakpoints' shadows with fast tracepoint jumps.
12148 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12149 * target.c (write_inferior_memory): Also pass MYADDR down to
12152 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12154 * configure.ac: Check support for personality routine.
12155 * configure: Regenerate.
12156 * config.in: Likewise.
12157 * linux-low.c: Include <sys/personality.h>.
12158 Define ADDR_NO_RANDOMIZE if necessary.
12159 (linux_create_inferior): Disable address space randomization when
12160 forking inferior, if requested.
12161 (linux_supports_disable_randomization): New function.
12162 (linux_target_ops): Install it.
12163 * server.h (disable_randomization): Declare.
12164 * server.c (disable_randomization): New global variable.
12165 (handle_general_set): Handle QDisableRandomization.
12166 (handle_query): Likewise for qSupported.
12167 (main): Support --disable-randomization and --no-disable-randomization
12168 command line arguments.
12169 * target.h (struct target_ops): Add supports_disable_randomization.
12170 (target_supports_disable_randomization): New macro.
12172 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12174 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12176 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12177 [!PT_GETDSBT] (target_loadmap): New definition.
12178 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12179 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12180 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12181 and PT_GETDSBT to LINUX_LOADMAP.
12182 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12183 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12185 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12187 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12188 (arm_linux_hwbp_cap): New static variable.
12189 (arm_linux_get_hwbp_cap): Replace by ...
12190 (arm_linux_init_hwbp_cap): ... this new function.
12191 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12192 (arm_linux_get_hw_watchpoint_count): Likewise.
12193 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12194 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12195 (arm_prepare_to_resume): Use perror_with_name instead of error.
12197 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12199 * linux-arm-low.c: Include <signal.h>.
12200 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12201 (struct arm_linux_hwbp_cap): New data type.
12202 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12203 (struct arm_linux_hw_breakpoint): New data type.
12204 (MAX_BPTS, MAX_WPTS): Define.
12205 (struct arch_process_info, struct arch_lwp_info): New data types.
12206 (arm_linux_get_hwbp_cap): New function.
12207 (arm_linux_get_hw_breakpoint_count): Likewise.
12208 (arm_linux_get_hw_watchpoint_count): Likewise.
12209 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12210 (arm_hwbp_control_initialize): Likewise.
12211 (arm_hwbp_control_is_enabled): Likewise.
12212 (arm_hwbp_control_is_initialized): Likewise.
12213 (arm_hwbp_control_disable): Likewise.
12214 (arm_linux_hw_breakpoint_equal): Likewise.
12215 (arm_linux_hw_point_initialize): Likewise.
12216 (struct update_registers_data): New data structure.
12217 (update_registers_callback: New function.
12218 (arm_insert_point): Likewise.
12219 (arm_remove_point): Likewise.
12220 (arm_stopped_by_watchpoint): Likewise.
12221 (arm_stopped_data_address): Likewise.
12222 (arm_new_process): Likewise.
12223 (arm_new_thread): Likewise.
12224 (arm_prepare_to_resume): Likewise.
12225 (the_low_target): Register arm_insert_point, arm_remove_point,
12226 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12227 arm_new_thread, and arm_prepare_to_resume.
12229 2011-09-15 Stan Shebs <stan@codesourcery.com>
12231 * server.h (struct emit_ops): Add compare-goto fields.
12232 * tracepoint.c (gdb_agent_op_sizes): New table.
12233 (emit_eq_goto): New function.
12234 (emit_ne_goto): New function.
12235 (emit_lt_goto): New function.
12236 (emit_le_goto): New function.
12237 (emit_gt_goto): New function.
12238 (emit_ge_goto): New function.
12239 (is_goto_target): New function.
12240 (compile_bytecodes): Recognize special cases of compare-goto
12241 combinations and call specialized emitters for them.
12242 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12243 (amd64_emit_ne_goto): New function.
12244 (amd64_emit_lt_goto): New function.
12245 (amd64_emit_le_goto): New function.
12246 (amd64_emit_gt_goto): New function.
12247 (amd64_emit_ge_goto): New function.
12248 (amd64_emit_ops): Add the new functions.
12249 (i386_emit_eq_goto): New function.
12250 (i386_emit_ne_goto): New function.
12251 (i386_emit_lt_goto): New function.
12252 (i386_emit_le_goto): New function.
12253 (i386_emit_gt_goto): New function.
12254 (i386_emit_ge_goto): New function.
12255 (i386_emit_ops): Add the new functions.
12257 2011-09-08 Stan Shebs <stan@codesourcery.com>
12259 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12260 (i386_emit_epilogue): Restore %ebx.
12262 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12264 * server.c (step_thread): Remove definition.
12265 (process_serial_event): Don't handle Hs.
12266 * server.h (step_thread): Remove declaration.
12267 * target.c (set_desired_inferior): Remove use of step_thread.
12269 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12271 * linux-low.c: Include linux-procfs.h.
12272 (linux_attach_lwp_1): Update comments.
12273 (linux_attach): Scan for existing threads when attaching to a
12274 process that is the tgid.
12275 * Makefile.in: Update dependencies.
12277 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12279 * configure.srv: Add linux-procfs.o dependencies.
12281 2011-08-14 Yao Qi <yao@codesourcery.com>
12283 * target.h (struct target_ops): Fix indent.
12284 * win32-low.c (win32_target_ops): Fix comment.
12286 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12287 Yao Qi <yao@codesourcery.com>
12289 * Makefile.in (clean): Remove tic6x-*.c files.
12290 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12291 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12292 (tic6x-c64xp-linux.c): Likewise.
12293 * configure.srv: Add support for tic6x-*-uclinux.
12294 * linux-tic6x-low.c: New.
12295 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12297 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12298 Yao Qi <yao@codesourcery.com>
12300 * target.h (struct target_ops): Add read_loadmap.
12301 * linux-low.c (struct target_loadseg): New type.
12302 (struct target_loadmap): New type.
12303 (linux_read_loadmap): New function.
12304 (linux_target_ops): Add linux_read_loadmap.
12305 * server.c (handle_query): Support qXfer:fdpic:read packet.
12306 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12309 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12311 * win32-low.c: Include <stdint.h>.
12313 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12315 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12316 to the inferior here.
12317 (i386_remove_aligned_watchpoint): Ditto.
12318 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12319 fit part of the watchpoint in the debug registers.
12320 (i386_update_inferior_debug_regs): New.
12321 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12322 registers, and only update the inferior on success.
12323 (i386_low_remove_watchpoint): Ditto.
12325 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12327 * linux-low.c (compare_ints, unique, list_threads, show_process,
12328 linux_core_of_thread): Delete.
12329 (linux_target_ops): Change linux_core_of_thread to
12330 linux_common_core_of_thread.
12331 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12332 * utils.c (malloc_failure): Change type of argument.
12333 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12334 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12335 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12336 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12337 (IPA_OBJS): Add common-utils-ipa.o.
12338 (ptid_h, linux_osdata_h): New macros.
12339 (server_h): Add common/common-utils.h, common/xml-utils.h,
12340 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12342 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12343 ptid.o, buffer.o): New rules.
12344 (linux-low.o): Add common/linux-osdata.h as a dependency.
12345 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12346 * configure.ac: Add AC_HEADER_DIRENT check.
12347 * config.in: Regenerate.
12348 * configure: Regenerate.
12349 * remote-utils.c (xml_escape_text): Delete.
12350 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12351 buffer_xml_printf): Move to common/buffer.c.
12352 * server.c (main): Remove call to initialize_inferiors.
12353 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12354 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12355 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12356 internal_error, gdb_assert, gdb_assert_fail): Delete.
12357 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12358 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12360 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12361 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12362 initialize_inferiors): Delete.
12364 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12366 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12369 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12371 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12373 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12375 2011-05-26 Yao Qi <yao@codesourcery.com>
12377 * Makefile.in (thread-db.o): Track dependence to
12378 common/gdb_thread_db.h.
12379 * thread-db.c: include gdb_thread_db.h from right place.
12381 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12383 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12384 __FILE__ and __LINE__ to internal_error.
12386 2011-05-13 Doug Evans <dje@google.com>
12388 * thread-db.c (try_thread_db_load_from_sdir): New function.
12389 (try_thread_db_load_from_dir): New function.
12390 (thread_db_load_search): Handle $sdir, ignore $pdir.
12391 Remove trying of system directories if search of
12392 libthread-db-search-path fails, that is now done via $sdir.
12394 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12396 * server.c (handle_query): Add EnableDisableTracepoints to the list
12397 of supported features.
12398 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12400 (cmd_qtenable_disable): New.
12401 (cmd_qtstart): Install tracepoints even if disabled.
12402 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12403 receiving a QTEnable or QTDisable packet.
12404 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12405 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12407 (gdb_probe): Skip data collection if static tracepoint is disabled.
12409 2011-05-10 Doug Evans <dje@google.com>
12411 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12413 2011-05-04 Doug Evans <dje@google.com>
12415 * linux-low.c (linux_join): Skip process lookup.
12416 * spu-low.c (spu_join): Ditto.
12417 * server.c (join_inferiors_callback): Delete.
12418 (process_serial_event): For 'D' packet (detach) call join_inferior
12421 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12423 * README: Don't mention xscale*-*-linux*.
12424 * configure.srv (xscale*-*-linux*): Don't handle target.
12426 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12428 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12430 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12431 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12432 (i386_emit_void_call_2): Likewise.
12434 2011-04-26 Yao Qi <yao@codesourcery.com>
12436 * linux-low.c: Move common macros to linux-ptrace.h.
12437 Include linux-ptrace.h.
12438 * Makefile.in (linux_ptrace_h): New.
12439 (linux-low.o): Depends on linux-ptrace.h.
12441 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12443 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12444 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12445 (remote_prepare): New function with most of the TCP code from ...
12446 (remote_open): ... here. Detect PORT here unconditionally. Move also
12447 setting transport_is_reliable.
12448 * server.c (run_once): New variable.
12449 (gdbserver_usage): Document it.
12450 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12451 the first run if RUN_ONCE.
12452 * server.h (run_once, remote_prepare): New declarations.
12454 2011-04-19 Tom Tromey <tromey@redhat.com>
12456 * win32-low.c (handle_load_dll): Remove duplicate "the".
12458 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12460 Remove support for old Cygwin 1.5 versions.
12461 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12462 function to avoid warning.
12463 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12466 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12468 * gdbserver/server.h (Macro _): Define it if not available.
12470 2011-03-14 Michael Snyder <msnyder@vmware.com>
12472 * hostio.c (handle_close): Remove unnecessary null test.
12474 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12476 * Makefile.in (maintainer-clean realclean distclean): Remove
12477 "make ... subdir_do" command.
12479 2011-03-10 Michael Snyder <msnyder@vmware.com>
12481 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12483 * server.c (handle_v_run): Free alloced buffer on early return.
12485 2011-03-09 Yao Qi <yao@codesourcery.com>
12488 2011-03-04 Yao Qi <yao@codesourcery.com>
12490 * Makefile.in: Remove GNU make feature --directory.
12492 2011-03-05 Yao Qi <yao@codesourcery.com>
12494 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12495 (subdir_do): New make target. Copied from gdb/Makefile.
12496 (maintainer-clean, realclean, distclean, clean): Call corresponding
12497 make targets in common/Makefile.
12499 2011-02-11 Yao Qi <yao@codesourcery.com>
12501 * configure.ac: Call AC_PROG_RANLIB.
12502 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12503 * configure: Regenerate.
12505 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12507 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12509 2011-03-06 Yao Qi <yao@codesourcery.com>
12511 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12513 2011-03-05 Yao Qi <yao@codesourcery.com>
12515 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12516 (subdir_do): New make target. Copied from gdb/Makefile.
12517 (maintainer-clean, realclean, distclean, clean): Call corresponding
12518 make targets in common/Makefile.
12520 2011-03-04 Yao Qi <yao@codesourcery.com>
12522 * Makefile.in: Remove GNU make feature --directory.
12524 2011-03-04 Michael Snyder <msnyder@vmware.com>
12526 * server.c (queue_stop_reply): Call xmalloc not malloc.
12528 2011-03-02 Michael Snyder <msnyder@vmware.com>
12530 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12532 2011-02-28 Michael Snyder <msnyder@vmware.com>
12534 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12535 (cmd_qtframe): Ditto.
12536 (cmd_qtbuffer): Ditto.
12537 (cmd_bigqtbuffer): Ditto.
12539 * utils.c (decimal2str): Initialize 'width' to nine, then
12540 don't mess with it.
12542 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12544 * hostio.c (require_data): Free *data, not data.
12546 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12548 * hostio.c (require_data): Use free, not xfree.
12550 2011-02-27 Michael Snyder <msnyder@vmware.com>
12552 * server.c (handle_query): Discard unused value.
12554 * hostio.c (require_data): Free malloc memory before returning
12557 2011-02-26 Michael Snyder <msnyder@vmware.com>
12559 * linux-low.c (list_threads): Call closedir for dirent.
12561 2011-02-27 Michael Snyder <msnyder@vmware.com>
12563 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12564 a case statement falls through.
12566 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12568 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12571 2011-02-26 Michael Snyder <msnyder@vmware.com>
12573 * utils.c (decimal2str): Eliminate dead code and dead param.
12574 (pulongest): Drop dead param from call to decimal2str.
12577 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12579 Revert the following patch (not approved yet):
12580 2011-02-21 Hui Zhu <teawater@gmail.com>
12581 * tracepoint.c (tp_printf): New function.
12582 (eval_agent_expr): Handle gdb_agent_op_printf.
12584 2011-02-21 Hui Zhu <teawater@gmail.com>
12586 * tracepoint.c (tp_printf): New function.
12587 (eval_agent_expr): Handle gdb_agent_op_printf.
12589 2011-02-18 Tom Tromey <tromey@redhat.com>
12591 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12592 (tracepoint.o): Likewise.
12593 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12594 (gdb_agent_op_names): Likewise.
12596 2011-02-18 Tom Tromey <tromey@redhat.com>
12598 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12599 gdb_agent_op_rot>: New constants.
12600 (gdb_agent_op_names): Add pick and roll.
12601 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12604 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12606 * aclocal.m4: Regenerated with aclocal-1.11.1.
12608 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12610 * server.c (handle_qxfer_traceframe_info): New.
12611 (qxfer_packets): Register "traceframe-info".
12612 (handle_query): Report support for qXfer:traceframe-info:read+.
12613 * tracepoint.c (match_blocktype): New.
12614 (traceframe_find_block_type): Rename to ...
12615 (traceframe_walk_blocks): ... this. Add callback filter argument,
12617 (traceframe_find_block_type): New, reimplemented on top of
12618 traceframe_walk_blocks.
12619 (build_traceframe_info_xml): New.
12620 (traceframe_read_info): New.
12621 * server.h (traceframe_read_info): Declare.
12623 2011-02-11 Yao Qi <yao@codesourcery.com>
12625 * configure.ac: Call AC_PROG_RANLIB.
12626 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12627 * configure: Regenerate.
12629 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12631 * server.c (gdb_read_memory): Change return semantics to allow
12633 (handle_search_memory_1): Adjust.
12634 (process_serial_event) <'m' packet>: Handle partial transfers.
12635 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12637 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12639 * regcache.c (init_register_cache): Initialize
12640 regcache->register_status.
12641 (free_register_cache): Release regcache->register_status.
12642 (regcache_cpy): Copy register_status.
12643 (registers_to_string): Print 'x's for unavailable registers.
12644 (supply_register): Mark the register's status valid or
12645 unavailable, depending on whether a buffer was passed in or not.
12646 (supply_register_zeroed): New.
12647 (supply_regblock): Mark the registers' status valid or
12648 unavailable, depending on whether a buffer was passed in or not.
12649 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12650 (struct regcache): New `register_status' field.
12651 (supply_register_zeroed): Declare.
12652 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12653 supply_register_zeroed, rather than passing a NULL buffer to
12655 * tracepoint.c (fetch_traceframe_registers): Update comment.
12657 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12659 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12662 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12664 * server.h (decode_xfer_write): Change prototype.
12665 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12666 and don't extract the annex here.
12667 * server.c (decode_xfer_read): Remove `annex' parameter,
12668 and don't extract the annex here.
12669 (decode_xfer): New.
12670 (struct qxfer): New.
12671 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12672 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12673 (handle_qxfer_statictrace): New functions, abstracted out from
12674 handle_query, and made to use the struct qxfer interface.
12675 (handle_threads_qxfer_proper): Rename to ...
12676 (handle_qxfer_threads_proper): ... this.
12677 (handle_threads_qxfer): Rename to ...
12678 (handle_qxfer_threads): ... this. Adjust.
12679 (qxfer_packets): New array.
12680 (handle_qxfer): New function.
12681 (handle_query): Use handle_qxfer.
12683 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12685 * gdbreplay.c: Shorten lines of >= 80 columns.
12686 * linux-low.c: Ditto.
12687 * linux-ppc-low.c: Ditto.
12688 * linux-s390-low.c: Ditto.
12689 * linux-sparc-low.c: Ditto.
12690 * linux-x86-low.c: Ditto.
12691 * linux-xtensa-low.c: Ditto.
12692 * mem-break.c: Ditto.
12693 * nto-low.c: Ditto.
12694 * regcache.h: Ditto.
12695 * remote-utils.c: Ditto.
12698 * thread-db.c: Ditto.
12699 * tracepoint.c: Ditto.
12701 * win32-low.h: Ditto.
12703 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12705 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12708 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12710 * server.c (gdbserver_version): Update copyright year in version
12712 * gdbreplay.c (gdbreplay_version): Ditto.
12714 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12716 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12717 * linux-bfin-low.c: New file.
12718 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12719 PT_DATA_ADDR for BFIN targets.
12720 * Makefile.in (SFILES): Add linux-bfin-low.c.
12721 (clean): Remove reg-bfin.c.
12722 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12723 * README: Mention supported Blackfin targets.
12725 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12727 * .gitignore: New file.
12729 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12731 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12733 2010-10-22 Jie Zhang <jie@codesourcery.com>
12735 * Makefile.in: Add FLAGS_TO_PASS variable.
12736 (install): Remove dependency of install-only and recursively
12737 invoke make for install-only.
12739 2010-10-04 Doug Evans <dje@google.com>
12741 * Makefile.in (uninstall): Use $(DESTDIR).
12743 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12747 * linux-x86-low.c (compat_siginfo_from_siginfo)
12748 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12749 si_code is < 0. Check for si_code == SI_TIMER before checking for
12752 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12754 * lynx-i386-low.c: New file.
12755 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12757 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12759 * lynx-low.c (ptrace_request_to_str): Remove handling for
12760 request values that have been removed in LynxOS 5.x.
12762 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12764 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12767 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12769 * configure.ac: Add --enable-inprocess-agent option.
12770 * configure: Rebuilt.
12772 2010-09-06 Yao Qi <yao@codesourcery.com>
12774 * linux-low.c (linux_kill): Remove unused variable.
12775 (linux_stabilize_threads): Likewise.
12776 * server.c (start_inferior): Likewise.
12777 (queue_stop_reply_callback): Likewise.
12778 * tracepoint.c (do_action_at_tracepoint): Likewise.
12780 2010-09-06 Yao Qi <yao@codesourcery.com>
12782 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12785 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12787 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12789 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12791 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12794 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12796 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12797 gdbserver/lynx-ppc-low.c: New files.
12798 * Makefile.in (lynx_low_h): New variable.
12799 (lynx-low.o, lynx-ppc-low.o): New rules.
12800 * configure.ac: On LynxOS, link with -lnetinet.
12801 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12802 * configure: regenerate.
12804 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12806 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12807 * configure.ac: Add check for vasprintf and vsnprintf.
12808 * configure, config.in: Regenerate.
12809 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12811 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12813 * gdbreplay.c: Move include of alloca.h up, next to include of
12815 * server.h: Add include of malloc.h.
12816 * mem-break.c: Remove include of malloc.h.
12817 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12819 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12821 * Makefile.in (memmem.o): Build with -Wno-error.
12823 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12825 * utils.c (xsnprintf): Make non-static.
12826 * server.h: Add xsnprintf declaration.
12827 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12828 replace calls to snprintf by calls to xsnprintf throughout.
12830 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12832 * configure.ac: Add configure check for alloca.
12833 * configure, config.in: Regenerate.
12834 * server.h: Include alloca.h if it exists.
12835 * gdbreplay.c: Include alloca.h if it exists.
12837 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12839 * linux-low.c (__SIGRTMIN): Define if not already defined.
12840 (linux_create_inferior): Check for __ANDROID__ rather than
12842 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12843 are already deferred.
12844 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12845 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12846 stopped and already has a pending signal to report.
12847 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12848 a pending signal to report or is moving out of a jump pad.
12849 (linux_init_signals): Check for __ANDROID__ rather than
12852 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12854 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12855 debug_threads check. Avoid a linear search when not doing debug
12858 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12860 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12861 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12862 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12863 (process_event): Change local fd's type to gdb_fildes_t.
12864 (create_file_handler): Adjust prototype.
12865 (delete_file_handler): Adjust prototype.
12866 (handle_file_event): Adjust prototype. Use pfildes.
12867 (create_file_event): Adjsut prototype.
12868 * remote-utils.c (remote_desc, listen_desc): Change type to
12870 * server.h: New gdb_fildes_t typedef.
12871 [USE_WIN32API]: Include winsock2.h.
12872 (delete_file_handler, add_file_handler): Adjust prototypes.
12873 (pfildes): Declare.
12874 * utils.c (pfildes): New.
12876 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12878 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12879 * configure: Regenerate.
12881 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12883 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12884 (linux_done_accessing_memory): ... this.
12885 (linux_target_ops): Adjust.
12886 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12887 * nto-low.c (nto_target_ops): Adjust comment.
12888 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12889 * spu-low.c (spu_target_ops): Adjust comment.
12890 * target.h (target_ops): Rename unprepare_to_access_memory field
12891 to done_accessing_memory.
12892 (unprepare_to_access_memory): Rename to ...
12893 (done_accessing_memory): ... this.
12895 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12897 * linux-low.c (linux_prepare_to_access_memory): New.
12898 (linux_unprepare_to_access_memory): New.
12899 (linux_target_ops): Install them.
12900 * server.c (read_memory): Rename to ...
12901 (gdb_read_memory): ... this. Use
12902 prepare_to_access_memory/prepare_to_access_memory.
12903 (write_memory): Rename to ...
12904 (gdb_write_memory): ... this. Use
12905 prepare_to_access_memory/prepare_to_access_memory.
12906 (handle_search_memory_1): Adjust.
12907 (process_serial_event): Adjust.
12908 * target.h (struct target_ops): New fields
12909 prepare_to_access_memory and unprepare_to_access_memory.
12910 (prepare_to_access_memory, unprepare_to_access_memory): New.
12911 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12912 prepare_to_access_memory/prepare_to_access_memory.
12913 * nto-low.c (nto_target_ops): Adjust.
12914 * spu-low.c (spu_target_ops): Adjust.
12915 * win32-low.c (win32_target_ops): Adjust.
12917 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12919 * Makefile.in (WARN_CFLAGS): Get it from configure.
12920 (WERROR_CFLAGS): New.
12921 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12922 * configure.ac: Introduce --enable-werror, which adds -Werror to
12923 the compiler command line. Enabled by default. Disable with
12924 --disable-werror. Add -Wdeclaration-after-statement
12925 Wpointer-arith and -Wformat-nonliteral to warning flags.
12926 * configure: Regenerate.
12928 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12930 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12932 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12934 * gdbreplay.c (remote_error): New.
12936 (expect): Use gdbchar. Check for error reading from GDB.
12937 Clarify sync error output.
12938 (play): Check for errors writing to GDB.
12939 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12940 * remote-utils.c (getpkt): Check for errors writing to the remote
12943 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12945 * linux-low.c (linux_wait_1): Move non-debugging code out of
12946 `debug_threads' control.
12948 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12950 * linux-low.c (linux_wait_1): Don't set last_status here.
12951 * server.c (push_event, queue_stop_reply_callback): Assert we're
12952 not pushing a TARGET_WAITKIND_IGNORE event.
12953 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12954 (myresume, handle_target_event): Set the thread's last_resume_kind
12955 and last_status from the target returned status.
12957 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12961 * linux-x86-low.c (update_debug_registers_callback): New.
12962 (i386_dr_low_set_addr): Use it.
12963 (i386_dr_low_get_addr): New.
12964 (i386_dr_low_set_control): Use update_debug_registers_callback.
12965 (i386_dr_low_get_control): New.
12966 (i386_dr_low_get_status): Adjust.
12967 * linux-low.c (linux_stop_lwp): New.
12968 * linux-low.h (linux_stop_lwp): Declare.
12970 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12971 argument instead of a i386_debug_reg_state.
12972 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12973 a i386_debug_reg_state.
12974 (i386_insert_aligned_watchpoint): Adjust.
12975 (i386_remove_aligned_watchpoint): Adjust.
12976 (i386_low_stopped_data_address): Read the debug registers from the
12977 inferior instead of from the mirrors.
12978 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12979 (i386_dr_low_get_addr): Declare.
12980 (i386_dr_low_get_control): Declare.
12981 (i386_dr_low_get_status): Change prototype.
12983 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12984 (i386_dr_low_get_addr): New.
12985 (i386_dr_low_get_control): New.
12986 (i386_dr_low_get_status): Adjust prototype. Return
12988 (i386_initial_stuff): Clear dr_status_mirror and
12990 (i386_get_thread_context): Adjust.
12991 (i386_set_thread_context): Adjust.
12992 (i386_thread_added): Adjust.
12994 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12996 * linux-low.h (linux_thread_area): Delete declaration.
12998 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13000 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13001 after its termination.
13003 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13005 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13006 (gdb_wants_all_stopped): Delete.
13007 (linux_wait_1): Don't call them.
13008 * server.c (handle_v_cont): Tag all threads as want-stopped.
13009 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13010 stopped as "client-wants-stopped".
13012 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13014 * Makefile.in (signals_h): New.
13015 (server_h): Depend on it.
13016 (server.o): Don't depend on $(signals_def).
13017 (signals.o): Depend on $(signals_def).
13019 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13021 * Makefile.in (signals_def): New.
13022 (server_h): Append include/gdb/signals.h and signals_def.
13023 (server.o): Append signals_def.
13025 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13027 * server.c (handle_target_event): Use target_signal_to_host for
13028 resume_info.sig initialization.
13029 * target.h (struct thread_resume) <sig>: New comment.
13031 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13033 * server.c (handle_query): strcpy() the returned string from paddress()
13034 instead of sprintf().
13035 * utils.c (paddress): Return phex_nz().
13037 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13039 * server.c (handle_v_cont): Call mourn_inferior if process
13041 (myresume): Likewise.
13043 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13045 Static tracepoints, and integration with UST.
13047 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13048 * mem-break.c (uninsert_all_breakpoints)
13049 (reinsert_all_breakpoints): New.
13050 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13051 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13052 (gdb_agent_ust_loaded, helper_thread_id)
13053 (gdb_agent_helper_thread_id): New macros.
13054 (struct ipa_sym_addresses): Add addr_ust_loaded,
13055 addr_helper_thread_id, addr_cmd_buf.
13056 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13057 (in_process_agent_loaded_ust): New.
13058 (write_e_ust_not_loaded): New.
13059 (maybe_write_ipa_ust_not_loaded): New.
13060 (struct collect_static_trace_data_action): New.
13061 (enum tracepoint_type) <static_tracepoint>: New.
13062 (struct tracepoint) <handle>: Mention static tracepoints.
13063 (struct static_tracepoint_ctx): New.
13064 (CMD_BUF_SIZE): New.
13065 (add_tracepoint_action): Handle static tracepoint actions.
13066 (unprobe_marker_at): New.
13067 (clear_installed_tracepoints): Handle static tracepoints.
13068 (cmd_qtdp): Handle static tracepoints.
13069 (probe_marker_at): New.
13070 (cmd_qtstart): Handle static tracepoints.
13071 (response_tracepoint): Handle static tracepoints.
13072 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13073 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13074 (get_context_regcache): Handle static tracepoints.
13075 (do_action_at_tracepoint): Handle static tracepoint actions.
13076 (traceframe_find_block_type): Handle static trace data blocks.
13077 (traceframe_read_sdata): New.
13078 (download_tracepoints): Download static tracepoint actions.
13079 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13080 (GDB_PROBE_NAME): New.
13082 (GET_UST_SYM): New.
13085 (ust_marker_to_static_tracepoint): New.
13087 (collect_ust_data_at_tracepoint): New.
13088 (gdb_ust_probe): New.
13089 (UNIX_PATH_MAX, SOCK_DIR): New.
13090 (gdb_ust_connect_sync_socket): New.
13091 (resume_thread, stop_thread): New.
13092 (run_inferior_command): New.
13093 (init_named_socket): New.
13094 (gdb_ust_socket_init): New.
13095 (cstr_to_hexstr): New.
13097 (first_marker, next_marker): New.
13098 (response_ust_marker): New.
13099 (cmd_qtfstm, cmd_qtsstm): New.
13100 (unprobe_marker_at, probe_marker_at): New.
13101 (cmd_qtstmat, gdb_ust_thread): New.
13102 (gdb_ust_init): New.
13103 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13104 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13105 (ST_REGENTRY): New.
13106 (x86_64_st_collect_regmap): New.
13107 (X86_64_NUM_ST_COLLECT_GREGS): New.
13108 (AMD64_RIP_REGNUM): New.
13109 (supply_static_tracepoint_registers): New.
13110 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13111 (ST_REGENTRY): New.
13112 (i386_st_collect_regmap): New.
13113 (i386_NUM_ST_COLLECT_GREGS): New.
13114 (supply_static_tracepoint_registers): New.
13115 * server.c (handle_query): Handle qXfer:statictrace:read.
13116 <qSupported>: Report support for StaticTracepoints, and
13117 qXfer:statictrace:read features.
13118 * server.h (traceframe_read_sdata)
13119 (supply_static_tracepoint_registers): Declare.
13120 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13121 (unpack_varlen_hex): Include in IPA build.
13122 * Makefile.in (ustlibs, ustinc): New.
13123 (IPA_OBJS): Add remote-utils-ipa.o.
13124 ($(IPA_LIB)): Link -ldl and -lpthread.
13126 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13127 * config.in, configure: Regenerate.
13129 2010-06-20 Ian Lance Taylor <iant@google.com>
13130 Pedro Alves <pedro@codesourcery.com>
13132 * linux-x86-low.c (always_true): Delete.
13133 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13134 trying to fool the compiler with always_true.
13136 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13138 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13139 conditions in gdbserver.
13141 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13143 * spu-low.c (spu_read_memory): Wrap around local store limit.
13144 (spu_write_memory): Likewise.
13146 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13148 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13149 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13151 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13153 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13154 uses with LONGEST uses.
13156 2010-06-14 Stan Shebs <stan@codesourcery.com>
13157 Pedro Alves <pedro@codesourcery.com>
13161 * linux-x86-low.c: Include limits.h.
13163 (always_true): New.
13166 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13167 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13168 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13169 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13170 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13171 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13172 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13173 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13174 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13175 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13176 (amd64_emit_void_call_2): New.
13177 (amd64_emit_ops): New.
13178 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13179 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13180 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13181 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13182 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13183 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13184 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13185 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13186 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13187 (i386_emit_stack_adjust, i386_emit_int_call_1)
13188 (i386_emit_void_call_2): New.
13189 (i386_emit_ops): New.
13190 (x86_emit_ops): New.
13191 (the_low_target): Install x86_emit_ops.
13192 * server.h (struct emit_ops): New.
13193 (get_raw_reg_func_addr): Declare.
13194 (current_insn_ptr, emit_error): Declare.
13195 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13196 (set_trace_state_variable_value): New defines.
13197 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13198 addr_get_trace_state_variable_value and
13199 addr_set_trace_state_variable_value.
13200 (symbol_list): New fields for get_raw_reg,
13201 get_trace_state_variable_value and set_trace_state_variable_value.
13202 (condfn): New typedef.
13203 (struct tracepoint): New field `compiled_cond'.
13204 (do_action_at_tracepoint): Clear compiled_cond.
13205 (get_trace_state_variable_value, set_trace_state_variable_value):
13207 (condition_true_at_tracepoint): If there's a compiled condition,
13209 (current_insn_ptr, emit_error): New globals.
13210 (struct bytecode_address): New.
13211 (get_raw_reg_func_addr): New.
13212 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13213 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13214 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13215 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13216 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13217 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13218 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13219 (compile_tracepoint_condition, compile_bytecodes): New.
13220 * target.h (emit_ops): Forward declare.
13221 (struct target_ops): New field emit_ops.
13222 (target_emit_ops): New.
13223 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13224 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13225 * linux-low.c (linux_emit_ops): New.
13226 (linux_target_ops): Install it.
13227 * linux-low.h (struct linux_target_ops): New field emit_ops.
13229 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13231 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13232 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13234 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13235 Stan Shebs <stan@codesourcery.com>
13237 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13238 (all): Depend on $(extra_libraries).
13239 (install-only): Install the IPA.
13240 (IPA_OBJS, IPA_LIB): New.
13241 (clean): Remove the IPA lib.
13242 (IPAGENT_CFLAGS): New.
13243 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13244 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13245 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13246 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13247 * configure.ac: Check for atomic builtins support in the compiler.
13248 (IPA_DEPFILES, extra_libraries): Define.
13249 * configure.srv (ipa_obj): Add description.
13250 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13251 (i[34567]86-*-linux*): Set ipa_obj.
13252 (x86_64-*-linux*): Set ipa_obj.
13253 * linux-low.c (stabilizing_threads): New.
13254 (supports_fast_tracepoints): New.
13255 (linux_detach): Stabilize threads before detaching.
13256 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13257 the lwp is either not stabilizing, or is moving out of a jump pad.
13258 (linux_fast_tracepoint_collecting): New.
13259 (maybe_move_out_of_jump_pad): New.
13260 (enqueue_one_deferred_signal): New.
13261 (dequeue_one_deferred_signal): New.
13262 (linux_wait_for_event_1): If moving out of a jump pad, defer
13263 pending signals to later.
13264 (linux_stabilize_threads): New.
13265 (linux_wait_1): Check if threads need moving out of jump pads, and
13267 (stuck_in_jump_pad_callback): New.
13268 (move_out_of_jump_pad_callback): New.
13269 (lwp_running): New.
13270 (linux_resume_one_lwp): Handle moving out of jump pads.
13271 (linux_set_resume_request): Dequeue deferred signals.
13272 (need_step_over_p): Also step over fast tracepoint jumps.
13273 (start_step_over): Also uninsert fast tracepoint jumps.
13274 (finish_step_over): Also reinsert fast tracepoint jumps.
13275 (linux_install_fast_tracepoint_jump): New.
13276 (linux_target_ops): Install linux_stabilize_threads and
13277 linux_install_fast_tracepoint_jump_pad.
13278 * linux-low.h (linux_target_ops) <get_thread_area,
13279 install_fast_tracepoint_jump_pad>: New fields.
13280 (struct lwp_info) <collecting_fast_tracepoint,
13281 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13282 (linux_get_thread_area): Declare.
13283 * linux-x86-low.c (jump_insn): New.
13284 (x86_get_thread_area): New.
13285 (append_insns): New.
13286 (push_opcode): New.
13287 (amd64_install_fast_tracepoint_jump_pad): New.
13288 (i386_install_fast_tracepoint_jump_pad): New.
13289 (x86_install_fast_tracepoint_jump_pad): New.
13290 (the_low_target): Install x86_get_thread_area and
13291 x86_install_fast_tracepoint_jump_pad.
13292 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13293 (struct fast_tracepoint_jump): New.
13294 (fast_tracepoint_jump_insn): New.
13295 (fast_tracepoint_jump_shadow): New.
13296 (find_fast_tracepoint_jump_at): New.
13297 (fast_tracepoint_jump_here): New.
13298 (delete_fast_tracepoint_jump): New.
13299 (set_fast_tracepoint_jump): New.
13300 (uninsert_fast_tracepoint_jumps_at): New.
13301 (reinsert_fast_tracepoint_jumps_at): New.
13302 (set_breakpoint_at): Use write_inferior_memory.
13303 (uninsert_raw_breakpoint): Use write_inferior_memory.
13304 (check_mem_read): Mask out fast tracepoint jumps.
13305 (check_mem_write): Mask out fast tracepoint jumps.
13306 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13307 (set_fast_tracepoint_jump): Declare.
13308 (delete_fast_tracepoint_jump)
13309 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13310 (reinsert_fast_tracepoint_jumps_at): Declare.
13311 * regcache.c: Don't compile many functions when building the
13312 in-process agent library.
13313 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13314 the register buffer in the heap.
13315 (free_register_cache): If the register buffer isn't owned by the
13316 regcache, don't free it.
13317 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13318 pre-existing register caches.
13319 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13321 (convert_ascii_to_int): : Constify `from' parameter type.
13322 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13323 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13324 the needed buffer in-place.
13325 (relocate_instruction): New.
13326 * server.c (handle_query) <qSymbols>: If the target supports
13327 tracepoints, give it a chance of looking up symbols. Report
13328 support for fast tracepoints.
13329 (handle_status): Stabilize threads.
13330 (process_serial_event): Adjust.
13331 * server.h (struct fast_tracepoint_jump): Forward declare.
13332 (struct process_info) <fast_tracepoint_jumps>: New field.
13333 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13334 (decode_X_packet, decode_M_packet): Adjust.
13335 (relocate_instruction): Declare.
13336 (in_process_agent_loaded): Declare.
13337 (tracepoint_look_up_symbols): Declare.
13338 (struct fast_tpoint_collect_status): Declare.
13339 (fast_tracepoint_collecting): Declare.
13340 (force_unlock_trace_buffer): Declare.
13341 (handle_tracepoint_bkpts): Declare.
13342 (initialize_low_tracepoint)
13343 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13344 * target.h (struct target_ops) <stabilize_threads,
13345 install_fast_tracepoint_jump_pad>: New fields.
13346 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13347 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13348 [HAVE_STDINT_H]: Include stdint.h.
13349 (trace_debug_1): Rename to ...
13350 (trace_vdebug): ... this.
13351 (trace_debug): Rename to ...
13352 (trace_debug_1): ... this. Add `level' parameter.
13353 (trace_debug): New.
13354 (ATTR_USED, ATTR_NOINLINE): New.
13355 (IP_AGENT_EXPORT): New.
13356 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13357 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13358 (about_to_request_buffer_space, trace_buffer_is_full)
13359 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13360 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13361 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13362 (traceframe_write_count, traceframes_created)
13363 (trace_state_variables)
13364 New renaming defines.
13365 (struct ipa_sym_addresses): New.
13366 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13367 (symbol_list): New.
13368 (ipa_sym_addrs): New.
13369 (all_tracepoint_symbols_looked_up): New.
13370 (in_process_agent_loaded): New.
13371 (write_e_ipa_not_loaded): New.
13372 (maybe_write_ipa_not_loaded): New.
13373 (tracepoint_look_up_symbols): New.
13374 (debug_threads) [IN_PROCESS_AGENT]: New.
13375 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13376 (UNKNOWN_SIDE_EFFECTS): New.
13377 (stop_tracing): New.
13378 (flush_trace_buffer): New.
13379 (stop_tracing_bkpt): New.
13380 (flush_trace_buffer_bkpt): New.
13381 (read_inferior_integer): New.
13382 (read_inferior_uinteger): New.
13383 (read_inferior_data_pointer): New.
13384 (write_inferior_data_pointer): New.
13385 (write_inferior_integer): New.
13386 (write_inferior_uinteger): New.
13387 (struct collect_static_trace_data_action): Delete.
13388 (enum tracepoint_type): New.
13389 (struct tracepoint) <type>: New field `type'.
13390 <actions_str, step_actions, step_actions_str>: Only include in
13392 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13393 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13394 (tracepoints): Use IP_AGENT_EXPORT.
13395 (last_tracepoint): Don't include in the IPA.
13396 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13397 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13398 (alloced_trace_state_variables): New.
13399 (trace_state_variables): Use IP_AGENT_EXPORT.
13400 (traceframe_t): Delete unused variable.
13401 (circular_trace_buffer): Don't include in the IPA.
13402 (trace_buffer_start): Delete.
13403 (struct trace_buffer_control): New.
13404 (trace_buffer_free): Delete.
13405 (struct ipa_trace_buffer_control): New.
13406 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13407 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13409 (trace_buffer_ctrl): New.
13410 (TRACE_BUFFER_CTRL_CURR): New.
13411 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13412 Reimplement as macros.
13413 (trace_buffer_wrap): Delete.
13414 (traceframe_write_count, traceframe_read_count)
13415 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13416 (struct tracepoint_hit_ctx) <type>: New field.
13417 (struct fast_tracepoint_ctx): New.
13418 (memory_barrier): New.
13420 (record_tracepoint_error): Update atomically in the IPA.
13421 (clear_inferior_trace_buffer): New.
13422 (about_to_request_buffer_space): New.
13423 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13424 updating the same buffer.
13425 (add_tracepoint): Default the tracepoint's type to trap
13426 tracepoint, and orig_size to -1.
13427 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13428 internal variables.
13429 (create_trace_state_variable): New parameter `gdb'. Handle it.
13430 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13431 (cmd_qtdp): Handle fast tracepoints.
13432 (cmd_qtdv): Adjust.
13433 (max_jump_pad_size): New.
13434 (gdb_jump_pad_head): New.
13435 (get_jump_space_head): New.
13436 (claim_jump_space): New.
13437 (sort_tracepoints): New.
13438 (MAX_JUMP_SIZE): New.
13439 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13441 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13442 support. Upload fast traceframes, and delete internal IPA
13444 (stop_tracing_handler): New.
13445 (flush_trace_buffer_handler): New.
13446 (cmd_qtstop): Upload fast tracepoints.
13447 (response_tracepoint): Handle fast tracepoints.
13448 (tracepoint_finished_step): Upload fast traceframes. Set the
13449 tracepoint hit context's tracepoint type.
13450 (handle_tracepoint_bkpts): New.
13451 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13452 type. Add comment about fast tracepoints.
13453 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13454 non-existing action_str field.
13455 (get_context_regcache): Handle fast tracepoints.
13456 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13458 (fast_tracepoint_from_jump_pad_address): New.
13459 (fast_tracepoint_from_ipa_tpoint_address): New.
13460 (collecting_t): New.
13461 (force_unlock_trace_buffer): New.
13462 (fast_tracepoint_collecting): New.
13464 (gdb_collect): New.
13465 (write_inferior_data_ptr): New.
13466 (target_tp_heap): New.
13467 (target_malloc): New.
13468 (download_agent_expr): New.
13470 (download_tracepoints): New.
13471 (download_trace_state_variables): New.
13472 (upload_fast_traceframes): New.
13473 (IPA_FIRST_TRACEFRAME): New.
13474 (IPA_NEXT_TRACEFRAME_1): New.
13475 (IPA_NEXT_TRACEFRAME): New.
13476 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13477 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13478 (gdb_jump_pad_buffer_end): New.
13479 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13480 (initialize_tracepoint): Adjust.
13481 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13482 buffer. Initialize the low module.
13483 * utils.c (PREFIX, TOOLNAME): New.
13484 (malloc_failure): Use PREFIX.
13485 (error): In the IPA, an error causes an exit.
13486 (fatal, warning): Use PREFIX.
13487 (internal_error): Use TOOLNAME.
13488 (NUMCELLS): Increase to 10.
13489 * configure, config.in: Regenerate.
13491 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13493 * server.c (handle_query) <qSupported>: Do two passes over the
13494 qSupported string to avoid nesting strtok.
13496 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13498 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13500 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13501 -Wl,--dynamic-list.
13502 * configure: Regenerate.
13503 * proc-service.list: New.
13505 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13507 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13510 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13512 * gdbreplay.c (remote_open): Check error return from socket() call by
13513 its equality to -1 not by it being negative.
13514 * remote-utils.c (remote_open): Likewise.
13516 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13518 * config.h: Regenerate.
13520 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13522 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13523 doesn't provide PTRACE_GET_THREAD_AREA.
13525 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13527 * linux-m68k-low.c: Include <asm/ptrace.h>
13528 (ps_get_thread_area): Implement.
13530 2010-05-03 Doug Evans <dje@google.com>
13532 * event-loop.c (struct callback_event): New struct.
13533 (callback_list): New global.
13534 (append_callback_event, delete_callback_event): New functions.
13535 (process_callback): New function.
13536 (start_event_loop): Call it.
13537 * remote-utils.c (NOT_SCHEDULED): Define.
13538 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13539 moved out of readchar.
13540 (readchar): Rewrite. Call reschedule before returning.
13541 (reset_readchar): New function.
13542 (remote_close): Call it.
13543 (process_remaining, reschedule): New functions.
13544 * server.h (callback_handler_func): New typedef.
13545 (append_callback_event, delete_callback_event): Declare.
13547 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13549 * proc-service.c (ps_pglobal_lookup): Use
13550 thread_db_look_up_one_symbol.
13551 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13552 parameter. Use it instead of all_symbols_looked_up.
13553 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13555 (all_symbols_looked_up): Don't declare.
13556 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13557 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13559 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13560 Set all_symbols_looked_up here.
13561 (thread_db_look_up_one_symbol): New.
13562 (thread_db_get_tls_address): Adjust.
13563 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13564 thread_db object on the heap, and tentatively set it in the
13566 (thread_db_init): Don't set all_symbols_looked_up here.
13567 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13569 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13571 * linux-low.c (linux_kill, linux_detach): Adjust.
13572 (status_pending_p_callback): Remove redundant statement. Check
13573 for !TARGET_WAITIKIND_IGNORE, instead of
13574 TARGET_WAITKIND_STOPPED.
13575 (handle_tracepoints): Make sure LWP is locked. Adjust.
13576 (linux_wait_for_event_1): Adjust.
13577 (linux_cancel_breakpoints): New.
13578 (unsuspend_one_lwp): New.
13579 (unsuspend_all_lwps): New.
13580 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13581 (send_sigstop_callback): Change return type to int, add new
13582 `except' parameter and handle it.
13583 (suspend_and_send_sigstop_callback): New.
13584 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13585 pass them down. If SUSPEND, also increment the lwp's suspend
13587 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13588 (need_step_over_p): Don't consider suspended LWPs.
13589 (start_step_over): Adjust.
13590 (proceed_one_lwp): Change return type to int, add new `except'
13591 parameter and handle it.
13592 (unsuspend_and_proceed_one_lwp): New.
13593 (proceed_all_lwps): Use find_inferior instead of
13595 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13596 also decrement the suspend count of LWPs. Pass `except' down,
13597 instead of hacking its suspend count.
13598 (linux_pause_all): Add `freeze' parameter. Adjust.
13599 (linux_unpause_all): New.
13600 (linux_target_ops): Install linux_unpause_all.
13601 * server.c (handle_status): Adjust.
13602 * target.h (struct target_ops): New fields `unpause_all' and
13603 `cancel_breakpoints'. Add new parameter to `pause_all'.
13604 (pause_all): Add new `freeze' parameter.
13605 (unpause_all): New.
13606 (cancel_breakpoints): New.
13607 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13608 cancel breakpoints.
13609 (cmd_qtstart): Pause threads.
13610 (stop_tracing): Pause threads, and cancel breakpoints.
13611 * win32-low.c (win32_target_ops): Adjust.
13613 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13615 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13616 the inferior right away from here...
13617 (linux_wait_1): ... to here, and adjust to check the thread's
13618 last_resume_kind instead of the lwp's step or stop_expected flags.
13620 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13622 * README: Use consistent `GDB' and `GDBserver' spellings.
13624 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13626 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13627 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13628 (linux_detach_one_lwp): Assume the lwp is stopped.
13629 (any_thread_of): Delete.
13630 (linux_detach): Stop all lwps here. Don't blindly delete all
13632 (delete_lwp_callback): New.
13633 (linux_mourn): Delete all lwps of the process that is gone.
13634 (linux_wait_1): Don't delete the last lwp of the process here.
13635 * mem-break.h (mark_breakpoints_out): Declare.
13636 * mem-break.c (mark_breakpoints_out): New.
13637 (free_all_breakpoints): Use it.
13638 * server.c (handle_target_event): If the process is gone, mark
13640 * thread-db.c (struct thread_db) <create_bp>: New field.
13641 (thread_db_enable_reporting): Fix prototype. Store a thread event
13642 breakpoint reference in the thread_db struct.
13643 (thread_db_load_search): Clear the thread_db object.
13644 (try_thread_db_load_1): Ditto.
13645 (switch_to_process): New.
13646 (disable_thread_event_reporting): Use it.
13647 (remove_thread_event_breakpoints): New.
13648 (thread_db_detach, thread_db_mourn): Use it.
13650 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13652 * linux-low.c (linux_enable_event_reporting): New.
13653 (linux_wait_for_event_1, handle_extended_wait): Use it.
13655 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13657 * linux-low.c (linux_kill_one_lwp, linux_kill)
13658 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13659 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13660 SIGSTOP even if the LWP is stopped.
13661 (send_sigstop_callback): New.
13662 (stop_all_lwps): Use send_sigstop_callback instead.
13663 (linux_resume_one_thread): Adjust.
13664 (proceed_one_lwp): Still proceed an LWP that the client has
13665 requested to stop, if we haven't reported it as stopped yet. Make
13666 sure that LWPs the client want stopped, have a pending SIGSTOP.
13668 2010-04-26 Doug Evans <dje@google.com>
13670 * server.c (handle_general_set): Make static.
13672 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13673 Print received char after testing for error/eof instead of before.
13674 (input_interrupt): Tweak comment.
13676 2010-04-23 Doug Evans <dje@google.com>
13678 * server.c (start_inferior): Print inferior argv if --debug.
13680 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13682 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13683 * nto-x86-low.c: Include server.h
13685 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13687 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13688 be consistent with other sources of this directory.
13689 (init_registers_amd64): Correct name of source file of this function
13692 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13694 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13695 64-bit executables.
13697 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13699 * win32-i386-low.c: Add 64-bit support.
13700 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13701 (init_registers_amd64): Declare.
13702 (mappings): Add 64-bit version of array.
13703 (init_windows_x86): New function.
13704 (the_low_target): Change init_arch field to init_windows_x86.
13706 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13708 * win32-low.c: Adapt to support also 64-bit architecture.
13709 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13710 (get_image_name): Use SIZE_T type for local variable `done'.
13711 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13712 (toolhelp_get_dll_name): Idem.
13713 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13714 Use uintptr_t typecast to avoid warning.
13715 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13716 (handle_exception): Use phex_nz to avoid warning.
13717 (win32_wait): Remove unused local variable `process'.
13719 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13721 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13724 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13726 * configure.ac: Use `ws2_32' library for srv_mingw.
13727 * configure: Regenerate.
13728 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13729 * remote-utils.c: Likewise.
13731 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13733 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13734 if __x86_64__ is defined.
13736 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13738 * configure: Regenerate.
13740 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13742 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13743 * target.h (target_ops): New get_tib_address field.
13744 * win32-low.h (win32_thread_info): Add thread_local_base field.
13745 * win32-low.c (child_add_thread): Add tlb argument.
13746 Set thread_local_base field to TLB.
13747 (get_child_debug_event): Adapt to child_add_thread change.
13748 (win32_get_tib_address): New function.
13749 (win32_target_ops): Set get_tib_address field to
13750 win32_get_tib_address.
13751 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13753 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13755 * linux-low.c (linux_mourn): Also remove the process.
13756 * server.c (handle_target_event): Don't remove the process here.
13757 * nto-low.c (nto_mourn): New.
13758 (nto_target_ops): Install it.
13759 * spu-low.c (spu_mourn): New.
13760 (spu_target_ops): Install it.
13761 * win32-low.c (win32_mourn): New.
13762 (win32_target_ops): Install it.
13764 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13766 * server.h (buffer_xml_printf): Remove redundant `;'.
13768 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13770 * regcache.c (set_register_cache): Invalidate regcaches before
13771 changing the register cache layout.
13772 (regcache_invalidate_one): Allow a NULL regcache.
13773 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13774 regcaches before changing the register cache layout or the target
13777 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13779 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13780 variable warning on Linux/x86-64.
13782 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13784 GDBserver disconnected tracing support.
13786 * linux-low.c (linux_remove_process): Delete.
13787 (add_lwp): Don't set last_resume_kind here.
13788 (linux_kill): Use `mourn'.
13789 (linux_detach): Use `thread_db_detach', and `mourn'.
13790 (linux_mourn): New.
13791 (linux_attach_lwp_1): Adjust comment.
13792 (linux_attach): last_resume_kind moved the thread_info; adjust.
13793 (status_pending_p_callback): Adjust.
13794 (linux_wait_for_event_1): Adjust.
13795 (count_events_callback, select_singlestep_lwp_callback)
13796 (select_event_lwp_callback, cancel_breakpoints_callback)
13797 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13798 (proceed_one_lwp): Adjust.
13799 (linux_async): Add debug output.
13800 (linux_thread_stopped): New.
13801 (linux_pause_all): New.
13802 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13804 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13805 (thread_db_free): Delete declaration.
13806 (thread_db_detach, thread_db_mourn): Declare.
13807 * thread-db.c (thread_db_init): Use thread_db_mourn.
13808 (thread_db_free): Delete, split in two.
13809 (disable_thread_event_reporting): New.
13810 (thread_db_detach): New.
13811 (thread_db_mourn): New.
13813 * server.h (struct thread_info) <last_resume_kind>: New field.
13814 <attached>: Add comment.
13815 <gdb_detached>: New field.
13816 (handler_func): Change return type to int.
13817 (handle_serial_event, handle_target_event): Ditto.
13818 (gdb_connected): Declare.
13820 (disconnected_tracing): Declare.
13821 (stop_tracing): Declare.
13823 * server.c (handle_query) <qSupported>: Report support for
13824 disconnected tracing.
13825 (queue_stop_reply_callback): Account for running threads.
13826 (gdb_wants_thread_stopped): New.
13827 (gdb_wants_all_threads_stopped): New.
13828 (gdb_reattached_process): New.
13829 (handle_status): Clear the `gdb_detached' flag of all processes.
13830 In all-stop, stop all threads.
13831 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13832 (process_serial_event): If the remote connection breaks, or if an
13833 exit was forced with "monitor exit", force an event loop exit.
13834 Handle disconnected tracing on detach.
13835 (handle_serial_event): Adjust.
13836 (handle_target_event): If GDB isn't connected, forward events back
13837 to the inferior, unless the last process exited, in which case,
13838 exit gdbserver. Adjust interface.
13840 * remote-utils.c (remote_open): Don't block in accept. Instead
13841 register an event loop source on the listen socket file
13842 descriptor. Refactor bits into ...
13843 (listen_desc): ... this new global.
13844 (gdb_connected): ... this new function.
13845 (enable_async_notification): ... this new function.
13846 (handle_accept_event): ... this new function.
13847 (remote_close): Clear remote_desc.
13849 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13851 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13853 (mourn_inferior): Define.
13854 (target_process_qsupported): Avoid the dangling else problem.
13855 (thread_stopped): Define.
13856 (pause_all): Define.
13857 (target_waitstatus_to_string): Declare.
13858 * target.c (target_waitstatus_to_string): New.
13860 * tracepoint.c (tracing): Make extern.
13861 (disconnected_tracing): New.
13862 (stop_tracing): Make extern. Handle tracing stops due to GDB
13864 (cmd_qtdisconnected): New.
13865 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13866 (handle_tracepoint_general_set): Handle QTDisconnected.
13868 * event-loop.c (event_handler_func): Change return type to int.
13869 (process_event): Bail out if the event handler wants the event
13871 (handle_file_event): Ditto.
13872 (start_event_loop): Bail out if the event handler wants the event
13875 * nto-low.c (nto_target_ops): Adjust.
13876 * spu-low.c (spu_wait): Don't remove the process here.
13877 (spu_target_ops): Adjust.
13878 * win32-low.c (win32_wait): Don't remove the process here.
13879 (win32_target_ops): Adjust.
13881 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13883 * regcache.c (realloc_register_cache): Invalidate inferior's
13884 regcache before recreating it.
13886 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13888 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13890 2010-04-09 Stan Shebs <stan@codesourcery.com>
13891 Pedro Alves <pedro@codesourcery.com>
13893 * server.h (LONGEST): New.
13894 (struct thread_info) <while_stepping>: New field.
13895 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13897 (initialize_tracepoint, handle_tracepoint_general_set)
13898 (handle_tracepoint_query, tracepoint_finished_step)
13899 (tracepoint_was_hit, release_while_stepping_state_list):
13900 (current_traceframe): Declare.
13901 * server.c (handle_general_set): Handle tracepoint packets.
13902 (read_memory): New.
13903 (write_memory): New.
13904 (handle_search_memory_1): Use read_memory.
13905 (handle_query): Report support for conditional tracepoints, trace
13906 state variables, and tracepoint sources. Handle tracepoint
13908 (main): Initialize the tracepoints module.
13909 (process_serial_event): Handle traceframe reads/writes.
13911 * linux-low.c (handle_tracepoints): New.
13912 (linux_wait_1): Call it.
13913 (linux_resume_one_lwp): Handle while-stepping.
13914 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13915 (linux_target_ops): Install them.
13916 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13918 * linux-x86-low.c (x86_supports_tracepoints): New.
13919 (the_low_target). Install it.
13921 * mem-break.h (delete_breakpoint): Declare.
13922 * mem-break.c (delete_breakpoint): Make external.
13924 * target.h (struct target_ops): Add `supports_tracepoints',
13925 `read_pc', and `write_pc' fields.
13926 (target_supports_tracepoints): Define.
13927 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13930 * regcache.h (struct regcache) <registers_owned>: New field.
13931 (init_register_cache, regcache_cpy): Declare.
13932 (regcache_read_pc, regcache_write_pc): Declare.
13933 (register_cache_size): Declare.
13934 (supply_regblock): Declare.
13935 * regcache.c (init_register_cache): New.
13936 (new_register_cache): Use it.
13937 (regcache_cpy): New.
13938 (register_cache_size): New.
13939 (supply_regblock): New.
13940 (regcache_read_pc, regcache_write_pc): New.
13942 * tracepoint.c: New.
13944 * Makefile.in (OBS): Add tracepoint.o.
13945 (tracepoint.o): New rule.
13947 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13949 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13951 (i386-mmx.c): Likewise.
13952 (i386-mmx-linux.o): Likewise.
13953 (i386-mmx-linux.c): Likewise.
13955 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13956 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13957 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13958 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13960 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13961 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13962 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13964 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13966 * Makefile.in (clean): Updated.
13968 (i386-avx.c): Likewise.
13969 (i386-avx-linux.o): Likewise.
13970 (i386-avx-linux.c): Likewise.
13971 (amd64-avx.o): Likewise.
13972 (amd64-avx.c): Likewise.
13973 (amd64-avx-linux.o): Likewise.
13974 (amd64-avx-linux.c): Likewise.
13976 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13977 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13978 (srv_amd64_regobj): Add amd64-avx.o.
13979 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13980 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13981 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13982 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13983 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13984 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13985 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13987 * i387-fp.c: Include "i386-xstate.h".
13989 (i387_cache_to_xsave): Likewise.
13990 (i387_xsave_to_cache): Likewise.
13991 (x86_xcr0): Likewise.
13993 * i387-fp.h (i387_cache_to_xsave): Likewise.
13994 (i387_xsave_to_cache): Likewise.
13995 (x86_xcr0): Likewise.
13997 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13998 * linux-crisv32-low.c (target_regsets): Likewise.
13999 * linux-m68k-low.c (target_regsets): Likewise.
14000 * linux-mips-low.c (target_regsets): Likewise.
14001 * linux-ppc-low.c (target_regsets): Likewise.
14002 * linux-s390-low.c (target_regsets): Likewise.
14003 * linux-sh-low.c (target_regsets): Likewise.
14004 * linux-sparc-low.c (target_regsets): Likewise.
14005 * linux-xtensa-low.c (target_regsets): Likewise.
14007 * linux-low.c: Include <sys/uio.h>.
14008 (regsets_fetch_inferior_registers): Support nt_type.
14009 (regsets_store_inferior_registers): Likewise.
14010 (linux_process_qsupported): New.
14011 (linux_target_ops): Add linux_process_qsupported.
14013 * linux-low.h (regset_info): Add nt_type.
14014 (linux_target_ops): Add process_qsupported.
14016 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14018 (init_registers_i386_avx_linux): New.
14019 (init_registers_amd64_avx_linux): Likewise.
14020 (xmltarget_i386_linux_no_xml): Likewise.
14021 (xmltarget_amd64_linux_no_xml): Likewise.
14022 (PTRACE_GETREGSET): Likewise.
14023 (PTRACE_SETREGSET): Likewise.
14024 (x86_fill_xstateregset): Likewise.
14025 (x86_store_xstateregset): Likewise.
14026 (use_xml): Likewise.
14027 (x86_linux_update_xmltarget): Likewise.
14028 (x86_linux_process_qsupported): Likewise.
14029 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14030 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14031 init_registers_i386_linux here. Call
14032 x86_linux_update_xmltarget.
14033 (the_low_target): Add x86_linux_process_qsupported.
14035 * server.c (handle_query): Call target_process_qsupported.
14037 * target.h (target_ops): Add process_qsupported.
14038 (target_process_qsupported): New.
14040 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14042 * inferiors.c (add_thread): Set last_status kind to
14043 TARGET_WAITKIND_IGNORE.
14044 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14045 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14046 (linux_wait_1): Move `thread' local definition to block that uses
14047 it. Don't NULL initialize `event_child'.
14048 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14049 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14050 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14052 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14054 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14055 an extended waitstatus, or by a watchpoint.
14056 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14057 thread was stepping or has been stopped by a watchpoint.
14059 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14061 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14062 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14063 of another, then delete the previous, and validate all
14065 (validate_inserted_breakpoint): New.
14066 (delete_disabled_breakpoints): New.
14067 (validate_breakpoints): New.
14068 (check_mem_read): Validate breakpoints before trusting their
14069 shadow. Delete disabled breakpoints.
14070 (check_mem_write): Validate breakpoints before trusting they
14071 should be inserted. Delete disabled breakpoints.
14072 * mem-break.h (validate_breakpoints):
14073 * server.c (handle_query): Validate breakpoints when we see a
14076 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14078 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14079 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14080 if we could tell there's a GDB breakpoint at stop_pc.
14081 (need_step_over_p): Don't do a step over if we find a GDB
14082 breakpoint at the resume PC.
14084 * mem-break.c (struct raw_breakpoint): New.
14085 (enum bkpt_type): New type `gdb_breakpoint'.
14086 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14087 fields. New field `raw'.
14088 (find_raw_breakpoint_at): New.
14089 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14090 breakpoint instead.
14091 (set_breakpoint_at): Adjust.
14092 (delete_raw_breakpoint): New.
14093 (release_breakpoint): New.
14094 (delete_breakpoint): Rename to...
14095 (delete_breakpoint_1): ... this. Add proc parameter. Use
14096 release_breakpoint. Return ENOENT.
14097 (delete_breakpoint): Reimplement.
14098 (find_breakpoint_at): Delete.
14099 (find_gdb_breakpoint_at): New.
14100 (delete_breakpoint_at): Delete.
14101 (set_gdb_breakpoint_at): New.
14102 (delete_gdb_breakpoint_at): New.
14103 (gdb_breakpoint_here): New.
14104 (set_reinsert_breakpoint): Use release_breakpoint.
14105 (uninsert_breakpoint): Rename to ...
14106 (uninsert_raw_breakpoint): ... this.
14107 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14108 (reinsert_raw_breakpoint): Change parameter type to
14110 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14112 (check_breakpoints): Adjust. Use release_breakpoint.
14113 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14114 (breakpoint_inserted_here): Ditto.
14115 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14116 Don't trust the breakpoint's shadow if it is not inserted.
14117 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14118 (delete_all_breakpoints): Adjust.
14119 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14120 use delete_breakpoint_1.
14122 * mem-break.h (breakpoints_supported): Delete declaration.
14123 (set_gdb_breakpoint_at): Declare.
14124 (gdb_breakpoint_here): Declare.
14125 (delete_breakpoint_at): Delete.
14126 (delete_gdb_breakpoint_at): Declare.
14128 * server.h (struct raw_breakpoint): Forward declare.
14129 (struct process_info): New field `raw_breakpoints'.
14131 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14134 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14136 * linux-low.c (status_pending_p_callback): Fix comment.
14137 (linux_wait_for_event_1): Move most of the internal breakpoint
14138 handling from here...
14139 (linux_wait_1): ... to here.
14140 (count_events_callback): New.
14141 (select_singlestep_lwp_callback): New.
14142 (select_event_lwp_callback): New.
14143 (cancel_breakpoints_callback): New.
14144 (select_event_lwp): New.
14145 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14146 priority to all LWPs that have had events that should be reported
14147 to the client. Cancel breakpoints when about to reporting the
14148 event to the client, not while stopping lwps. No longer cancel
14149 finished single-steps here.
14150 (cancel_finished_single_step): Delete.
14151 (cancel_finished_single_steps): Delete.
14153 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14155 * mem-break.c (enum bkpt_type): New.
14156 (struct breakpoint): New field `type'.
14157 (set_breakpoint_at): Change return type to struct breakpoint
14158 pointer. Set type to `other_breakpoint' by default.
14159 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14160 in the breakpoint list.
14161 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14162 (reinsert_breakpoint): Rename to ...
14163 (reinsert_raw_breakpoint): ... this.
14164 (reinsert_breakpoints_at): Adjust.
14165 * mem-break.h (struct breakpoint): Declare.
14166 (set_breakpoint_at): Change return type to struct breakpoint
14169 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14171 * server.c (handle_query): Assign, not compare.
14173 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14175 Teach linux gdbserver to step-over-breakpoints.
14177 * linux-low.c (can_hardware_single_step): New.
14178 (supports_breakpoints): New.
14179 (handle_extended_wait): If stopping threads, read the stop pc of
14180 the new cloned LWP.
14182 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14183 low target doesn't support retrieving the PC.
14184 (add_lwp): Set last_resume_kind to resume_continue.
14185 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14186 (linux_attach): Don't clear stop_expected. Set the lwp's
14187 last_resume_kind to resume_stop.
14188 (linux_detach_one_lwp): Don't check for removed breakpoints.
14189 (check_removed_breakpoint): Delete.
14190 (status_pending_p): Rename to ...
14191 (status_pending_p_callback): ... this. Don't check for removed
14192 breakpoints. Don't consider threads that are stopped from GDB's
14194 (linux_wait_for_lwp): Always read the stop_pc here.
14195 (cancel_breakpoint): New.
14196 (step_over_bkpt): New global.
14197 (linux_wait_for_event_1): Implement stepping over breakpoints.
14198 (gdb_wants_lwp_stopped): New.
14199 (gdb_wants_all_stopped): New.
14200 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14201 single-step traps here. Store the thread's last reported target
14203 (send_sigstop): Don't clear stop_expected. Always set it,
14205 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14206 (cancel_finished_single_step): New.
14207 (cancel_finished_single_steps): New.
14208 (wait_for_sigstop): Don't cancel finished single-step traps here.
14209 (linux_resume_one_lwp): Don't check for removed breakpoints.
14210 Don't set `step' on non-hardware step archs.
14211 (linux_set_resume_request): Ignore resume_stop requests if already
14212 stopping or stopped. Set the lwp's last_resume_kind.
14213 (resume_status_pending_p): Don't check for removed breakpoints.
14214 (need_step_over_p): New.
14215 (start_step_over): New.
14216 (finish_step_over): New.
14217 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14218 requests. Clear the thread's last reported target waitstatus.
14219 Don't use the `suspended' flag. Don't consider pending breakpoints.
14220 (linux_resume): Start a step-over if necessary.
14221 (proceed_one_lwp): New.
14222 (proceed_all_lwps): New.
14223 (unstop_all_lwps): New.
14224 * linux-low.h (struct lwp_info): Rewrite comment for the
14225 `suspended' flag. Add the `stop_pc' field. Delete the
14226 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14227 Add `'last_resume_kind' and `need_step_over' fields.
14228 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14229 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14230 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14231 (set_raw_breakpoint_at): New.
14232 (set_breakpoint_at): Rewrite to use it.
14233 (reinsert_breakpoint_handler): Delete.
14234 (set_reinsert_breakpoint): New.
14235 (reinsert_breakpoint_by_bp): Delete.
14236 (delete_reinsert_breakpoints): New.
14237 (uninsert_breakpoint): Rewrite.
14238 (uninsert_breakpoints_at): New.
14239 (reinsert_breakpoint): Rewrite.
14240 (reinsert_breakpoints_at): New.
14241 (check_breakpoints): Rewrite.
14242 (breakpoint_here): New.
14243 (breakpoint_inserted_here): New.
14244 (check_mem_read): Adjust.
14245 * mem-break.h (breakpoints_supported, breakpoint_here)
14246 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14247 (reinsert_breakpoint_by_bp): Delete declaration.
14248 (delete_reinsert_breakpoints): Declare.
14249 (reinsert_breakpoint): Delete declaration.
14250 (reinsert_breakpoints_at): Declare.
14251 (uninsert_breakpoint): Delete declaration.
14252 (uninsert_breakpoints_at): Declare.
14253 (check_breakpoints): Adjust prototype.
14254 * server.h: Adjust include order.
14255 (struct thread_info): Declare here. Add a `last_status' field.
14257 2010-03-23 Michael Snyder <msnyder@vmware.com>
14259 * server.c (crc32): New function.
14260 (handle_query): Add handling for 'qCRC:' request.
14262 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14264 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14265 lwp had been stopped by a watchpoint.
14267 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14269 * server.h (internal_error): Declare.
14270 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14271 * utils.c (internal_error): New function.
14273 2010-03-15 Andreas Schwab <schwab@redhat.com>
14275 * configure.srv: Fix typo setting srv_regobj.
14277 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14279 * linux-low.c (fetch_register): Avoid passing a non string literal
14281 (usr_store_inferior_registers): Ditto.
14283 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14285 * linux-low.c (linux_write_memory): Bail out early if peeking
14288 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14290 * linux-low.h (struct lwp_info): New fields
14291 `stopped_by_watchpoint' and `stopped_data_address'.
14292 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14293 here, and cache them in the lwp object.
14294 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14296 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14298 (linux_stopped_by_watchpoint): Rewrite.
14299 (linux_stopped_data_address): Rewrite.
14301 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14303 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14304 switching the current inferior, not before.
14306 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14308 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14309 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14310 i386-linux.c and amd64-linux.c.
14311 (reg-i386.o): Removed.
14312 (reg-i386.c): Likewise.
14313 (reg-i386-linux.o): Likewise.
14314 (reg-i386-linux.c): Likewise.
14315 (reg-x86-64.o): Likewise.
14316 (reg-x86-64.c): Likewise.
14317 (reg-x86-64-linux.o): Likewise.
14318 (reg-x86-64-linux.c): Likewise.
14320 (i386.c): Likewise.
14321 (i386-linux.o): Likewise.
14322 (i386-linux.c): Likewise.
14323 (amd64.o): Likewise.
14324 (amd64.c): Likewise.
14325 (amd64-linux.o): Likewise.
14326 (amd64-linux.c): Likewise.
14328 * configure.srv (srv_i386_regobj): New.
14329 (srv_i386_linux_regobj): Likewise.
14330 (srv_amd64_regobj): Likewise.
14331 (srv_amd64_linux_regobj): Likewise.
14332 (srv_i386_32bit_xmlfiles): Likewise.
14333 (srv_i386_64bit_xmlfiles): Likewise.
14334 (srv_i386_xmlfiles): Likewise.
14335 (srv_amd64_xmlfiles): Likewise.
14336 (srv_i386_linux_xmlfiles): Likewise.
14337 (srv_amd64_linux_xmlfiles): Likewise.
14338 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14339 srv_xmlfiles to $srv_i386_xmlfiles.
14340 (i[34567]86-*-mingw32ce*): Likewise.
14341 (i[34567]86-*-mingw*): Likewise.
14342 (i[34567]86-*-nto*): Likewise.
14343 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14344 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14345 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14346 (x86_64-*-linux*): Likewise.
14348 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14349 (init_registers_amd64_linux): New.
14350 (x86_arch_setup): Replace init_registers_x86_64_linux with
14351 init_registers_amd64_linux.
14353 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14355 * configure.ac: Check for libdl. If it is not available link against
14356 static libthread_db.
14357 * configure: Regenerate.
14359 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14363 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14364 handing a read watchpoint.
14365 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14367 2010-02-12 Doug Evans <dje@google.com>
14369 * linux-low.c (linux_supports_tracefork_flag): Document.
14370 (linux_look_up_symbols): Add comment.
14372 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14374 * regcache.c (supply_register): Clear regcache if buf is NULL.
14376 2010-02-02 Nicolas Roche <roche@sourceware.org>
14377 Joel Brobecker <brobecker@adacore.com>
14379 * inferiors.c (find_inferior): Add function documentation.
14380 (unloaded_dll): Handle the case where the unloaded dll has not
14381 been previously registered in the dll list.
14383 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14385 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14386 (thumb2_breakpoint): New.
14387 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14389 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14391 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14392 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14395 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14397 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14399 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14401 * linux-s390-low.c (s390_collect_ptrace_register)
14402 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14404 2010-01-21 Doug Evans <dje@google.com>
14406 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14407 (PTRACE_ARG4_TYPE): New macro.
14408 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14409 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14410 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14411 (usr_store_inferior_registers): Ditto.
14412 (linux_read_memory, linux_write_memory): Ditto.
14413 (linux_test_for_tracefork): Ditto.
14415 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14416 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14418 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14420 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14423 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14425 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14426 prototype to take a regcache. Adjust.
14428 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14430 * regcache.h (struct thread_info): Forward declare.
14431 (struct regcache): New.
14432 (new_register_cache): Adjust prototype.
14433 (get_thread_regcache): Declare.
14434 (free_register_cache): Adjust prototype.
14435 (registers_to_string, registers_from_string): Ditto.
14436 (supply_register, supply_register_by_name, collect_register)
14437 (collect_register_as_string, collect_register_by_name): Ditto.
14438 * regcache.c (struct inferior_regcache_data): Delete.
14439 (get_regcache): Rename to ...
14440 (get_thread_regcache): ... this. Adjust. Switch inferior before
14441 fetching registers.
14442 (regcache_invalidate_one): Adjust.
14443 (regcache_invalidate): Fix prototype.
14444 (new_register_cache): Return the new register cache.
14445 (free_register_cache): Change prototype.
14446 (realloc_register_cache): Adjust.
14447 (registers_to_string): Change prototype to take a regcache. Adjust.
14448 (registers_from_string): Ditto.
14449 (register_data): Ditto.
14450 (supply_register): Ditto.
14451 (supply_register_by_name): Ditto.
14452 (collect_register): Ditto.
14453 (collect_register_as_string): Ditto.
14454 (collect_register_by_name): Ditto.
14455 * server.c (process_serial_event): Adjust.
14456 * linux-low.h (regset_fill_func, regset_store_func): Change
14458 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14460 * linux-low.c (get_stop_pc): Adjust.
14461 (check_removed_breakpoint): Adjust.
14462 (linux_wait_for_event): Adjust.
14463 (linux_resume_one_lwp): Adjust.
14464 (fetch_register): Add regcache parameter. Adjust.
14465 (usr_store_inferior_registers): Ditto.
14466 (regsets_fetch_inferior_registers): Ditto.
14467 (regsets_store_inferior_registers): Ditto.
14468 (linux_fetch_registers, linux_store_registers): Ditto.
14469 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14471 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14473 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14474 prototype to take a regcache.
14475 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14476 * remote-utils.c (convert_ascii_to_int, outreg)
14477 (prepare_resume_reply): Change prototype to take a regcache.
14479 * target.h (struct target_ops) <fetch_registers, store_registers>:
14480 Change prototype to take a regcache.
14481 (fetch_inferior_registers, store_inferior_registers): Change
14482 prototype to take a regcache. Adjust.
14483 * proc-service.c (ps_lgetregs): Adjust.
14484 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14485 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14486 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14487 take a regcache. Adjust.
14488 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14489 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14490 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14491 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14492 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14493 (cris_cannot_fetch_register):
14494 (cris_breakpoint_at): Change prototype to take a regcache.
14496 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14497 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14498 to take a regcache. Adjust.
14499 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14501 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14502 take a regcache. Adjust.
14503 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14504 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14505 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14506 * linux-mips-low.c (mips_get_pc):
14507 (mips_set_pc): Change prototype to take a regcache. Adjust.
14508 (mips_reinsert_addr): Adjust.
14509 (mips_collect_register): Change prototype to take a regcache.
14511 (mips_supply_register):
14512 (mips_collect_register_32bit, mips_supply_register_32bit)
14513 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14514 (mips_store_fpregset): Ditto.
14515 * linux-ppc-low.c (ppc_supply_ptrace_register)
14516 (ppc_supply_ptrace_register): Ditto.
14517 (parse_spufs_run): Adjust.
14518 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14519 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14520 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14521 take a regcache. Adjust.
14522 * linux-s390-low.c (s390_collect_ptrace_register)
14523 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14524 (s390_set_pc): Change prototype to take a regcache. Adjust.
14525 (s390_arch_setup): Adjust.
14526 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14527 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14528 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14529 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14530 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14532 (sparc_breakpoint_at): Adjust.
14533 * linux-xtensa-low.c (xtensa_fill_gregset):
14534 (xtensa_store_gregset):
14535 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14536 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14537 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14538 prototype to take a regcache. Adjust.
14539 * win32-arm-low.c (arm_fetch_inferior_register)
14540 (arm_store_inferior_register): Change prototype to take a
14542 * win32-i386-low.c (i386_fetch_inferior_register)
14543 (i386_store_inferior_register): Change prototype to take a
14545 * win32-low.c (child_fetch_inferior_registers)
14546 (child_store_inferior_registers): Change prototype to take a
14548 (win32_wait): Adjust.
14549 (win32_fetch_inferior_registers): Change prototype to take a
14551 (win32_store_inferior_registers): Adjust.
14552 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14553 store_inferior_register>: Change prototype to take a regcache.
14555 2010-01-20 Doug Evans <dje@google.com>
14557 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14559 (linux_wait_for_event1, linux_init_signals): Ditto.
14560 (W_STOPCODE): Provide definition if missing.
14562 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14564 * linux-low.c (linux_core_of_thread): New.
14565 (compare_ints, show_process, list_threads): New.
14566 (linux_qxfer_osdata): Report threads and cores.
14567 (linux_target_op): Register linux_core_of_thread.
14568 * remote-utils.c (prepare_resume_reply): Report the core.
14569 (buffer_xml_printf): Support %d specifier.
14570 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14572 (handle_query): Handle qXfer:threads. Announce availability
14574 * target.h (struct target_ops): New field core_of_thread.
14576 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14578 * Makefile.in (clean): Remove new generated files.
14579 (reg-s390.o, reg-s390.c): Remove rules.
14580 (reg-s390x.o, reg-s390x.c): Likewise.
14581 (s390-linux32.o, s390-linux32.c): Add rules.
14582 (s390-linux64.o, s390-linux64.c): Likewise.
14583 (s390x-linux64.o, s390x-linux64.c): Likewise.
14584 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14585 * linux-s390-low.c: Include <elf.h>.
14586 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14587 (init_registers_s390): Remove prototype.
14588 (init_registers_s390x): Likewise.
14589 (init_registers_s390_linux32): Add prototype.
14590 (init_registers_s390_linux64): Likewise.
14591 (init_registers_s390x_linux64): Likewise.
14592 (s390_num_regs_3264): New define.
14593 (s390_regmap_3264): New global variable.
14594 (s390_cannot_fetch_register): Remove obsolete check.
14595 (s390_cannot_store_register): Likewise.
14596 (s390_collect_ptrace_register): Handle upper/lower register halves.
14597 (s390_supply_ptrace_register): Likewise.
14598 (s390_fill_gregset): Update to register number changes.
14599 (s390_get_hwcap): New routine.
14600 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14601 Install appropriate regmap and register set.
14603 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14605 * server.c (gdbserver_version): Update copyright year to 2010.
14606 * gdbreplay.c (gdbreplay_version): Likewise.
14608 2009-12-28 Doug Evans <dje@google.com>
14610 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14611 elf/external.h. Include <elf.h> instead but only if necessary.
14613 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14615 * linux-low.c (linux_remove_process): Remove `detaching'
14616 parameter. Don't release/detach from thread_db here.
14617 (linux_kill): Release/detach from thread_db here, ...
14618 (linux_detach): ... and here, before actually detaching.
14619 (linux_wait_1): ... and here, when a process exits.
14620 * thread-db.c (any_thread_of): New.
14621 (thread_db_free): Switch the current inferior to a thread of the
14624 2009-12-21 Doug Evans <dje@google.com>
14626 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14628 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14629 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14630 warning ifndef __NR_tkill. Move setting of errno there too.
14631 Delete unnecessary resetting of errno after syscall.
14632 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14634 * configure.ac: Check for dladdr.
14635 * config.in: Regenerate.
14636 * configure: Regenerate.
14637 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14638 (try_thread_db_load): Update.
14640 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14642 2009-12-18 Doug Evans <dje@google.com>
14644 * event-loop.c: Include unistd.h if it exists.
14646 * linux-low.c (my_waitpid): Move definition away from being in
14647 between linux_tracefork_child/linux_test_for_tracefork.
14649 * gdb_proc_service.h (psaddr_t): Fix type.
14650 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14651 signature to match glibc.
14653 2009-12-16 Doug Evans <dje@google.com>
14655 * linux-low.c (linux_read_memory): Fix argument to read.
14657 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14659 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14660 events, don't leave current_inferior pointing at null.
14662 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14664 * win32-low.c (LOG): Delete.
14665 (OUTMSG): Output to stderr.
14666 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14667 on compile time LOG macro.
14668 (win32_wait): Fix debug output.
14670 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14672 * win32-low.c (win32_add_one_solib): If the dll name is
14673 "ntdll.dll", prepend the system directory to the dll path.
14675 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14677 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14679 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14680 Vladimir Prus <vladimir@codesourcery.com>
14682 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14683 * configure.ac: Check for __mcoldfire__ and set
14684 gdb_cv_m68k_is_coldfire.
14685 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14686 reg-cf.o and reg-m68k.o.
14687 * configure: Regenerated.
14689 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14691 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14692 Pass it to thread_db_free.
14693 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14694 proper `detaching' argument to linux_remove_process.
14695 * linux-low.h (thread_db_free): Add `detaching' parameter.
14696 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14698 (thread_db_free): Add `detaching' parameter. Only
14699 call td_ta_clear_event if detaching from process.
14701 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14703 * thread-db.c (thread_db_free): Fix typo.
14705 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14708 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14710 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14712 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14713 with an i686 compiler.
14714 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14716 * configure: Rebuilt.
14718 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14722 * server.c (handle_search_memory_1): Correct read_addr initialization
14723 in loop for searching subsequent chunks.
14725 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14727 * configure.ac: New --with-libthread-db option.
14728 * thread-db.c: Allow direct dependence on libthread_db.
14729 (thread_db_free): Adjust.
14730 * config.in: Regenerate.
14731 * configure: Likewise.
14733 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14736 * thread-db.c (attach_thread): New function.
14737 (maybe_attach_thread): Return success/failure.
14738 (find_new_threads_callback): Adjust.
14739 (thread_db_find_new_threads): Loop until no new threads.
14741 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14743 * proc-service.c (ps_lgetregs): Formatting.
14745 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14747 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14748 * configure.ac: Adjust.
14749 * linux-low.h (struct process_info_private): Move members to struct
14751 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14752 * linux-low.c (linux_remove_process): Adjust.
14753 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14754 * server.c (handle_query): Move code ...
14755 (handle_monitor_command): ... here. New function.
14756 * target.h (struct target_ops): New member.
14757 * thread-db.c (struct thread_db): New.
14758 (libthread_db_search_path): New variable.
14759 (thread_db_create_event, thread_db_enable_reporting)
14760 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14761 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14762 (try_thread_db_load_1, dladdr_to_soname): New functions.
14763 (try_thread_db_load, thread_db_load_search): New functions.
14764 (thread_db_init): Search for libthread_db.
14765 (thread_db_free): New function.
14766 (thread_db_handle_monitor_command): Likewise.
14767 * config.in: Regenerate.
14768 * configure: Regenerate.
14770 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14772 * spu-low.c (spu_kill): Wait for inferior to terminate.
14773 Call clear_inferiors.
14774 (spu_detach): Call clear_inferiors.
14776 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14778 * aclocal.m4: Regenerate.
14779 * config.in: Likewise.
14780 * configure: Likewise.
14782 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14784 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14785 (parse_spufs_run): New function.
14786 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14787 (ppc_breakpoint_at): Handle SPU breakpoints.
14789 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14791 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14792 (SPUFS_MAGIC): Define.
14793 (spu_enumerate_spu_ids): New function.
14794 (linux_qxfer_spu): New function.
14795 (linux_target_ops): Install linux_qxfer_spu.
14797 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14799 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14800 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14801 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14802 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14803 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14804 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14805 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14806 (init_registers_powerpc_cell32l): Add prototype.
14807 (init_registers_powerpc_cell64l): Likewise.
14808 (ppc_arch_setup): Detect Cell/B.E. architecture.
14810 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14812 * Makefile.in (datarootdir): New variable.
14814 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14816 * linux-low.c (linux_write_memory): Update debugging output.
14817 * Makefile.in (clean): Add new descriptions.
14818 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14819 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14820 * configure.srv: Add new files for arm*-*-linux*.
14821 * linux-arm-low.c: Add new declarations.
14822 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14823 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14824 (HWCAP_VFPv3D16): New.
14825 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14826 instead of __IWMMXT__.
14827 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14828 (arm_arch_setup): New.
14829 (target_regsets): Remove #ifdef. Add VFP regset.
14830 (the_low_target): Use arm_arch_setup.
14832 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14834 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14835 the main thread again.
14837 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14839 Adding Neutrino gdbserver.
14840 * configure: Regenerated.
14841 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14842 * configure.srv (i[34567]86-*-nto*): New target.
14843 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14844 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14845 (nto_comctrl) [__QNX__]: New function.
14846 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14848 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14850 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14853 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14854 Pedro Alves <pedro@codesourcery.com>
14856 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14857 don't support CONTEXT_EXTENDED_REGISTERS.
14858 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14859 (the_low_target): Install them.
14860 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14861 failing with ERROR_PIPE_NOT_CONNECTED.
14863 2009-06-30 Doug Evans <dje@google.com>
14864 Pierre Muller <muller@ics.u-strasbg.fr>
14866 Add h/w watchpoint support to x86-linux, win32-i386.
14867 * Makefile.in (SFILES): Add i386-low.c
14868 (i386_low_h): Define.
14869 (i386-low.o): Add dependencies.
14870 (linux-x86-low.o): Add i386-low.h dependency.
14871 (win32-i386-low.o): Ditto.
14872 * i386-low.c: New file.
14873 * i386-low.h: New file.
14874 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14875 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14876 * linux-low.c (linux_add_process): Initialize arch_private.
14877 (linux_remove_process): Free arch_private.
14878 (add_lwp): Initialize arch_private.
14879 (delete_lwp): Free arch_private.
14880 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14882 * linux-low.h (process_info_private): New member arch_private.
14883 (lwp_info): New member arch_private.
14884 (linux_target_ops): New members new_process, new_thread,
14886 (ptid_of): New macro.
14887 * linux-x86-low.c: Include stddef.h, i386-low.h.
14888 (arch_process_info): New struct.
14889 (arch_lwp_info): New struct.
14890 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14891 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14892 (i386_dr_low_get_status): New function.
14893 (x86_insert_point, x86_remove_point): New functions.
14894 (x86_stopped_by_watchpoint): New function.
14895 (x86_stopped_data_address): New function.
14896 (x86_linux_new_process, x86_linux_new_thread): New functions.
14897 (x86_linux_prepare_to_resume): New function.
14898 (the_low_target): Add entries for insert_point, remove_point,
14899 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14901 * server.c (debug_hw_points): New global.
14902 (monitor_show_help): Document set debug-hw-points.
14903 (handle_query): Process "set debug-hw-points".
14904 * server.h (debug_hw_points): Declare.
14905 (paddress): Declare.
14906 * utils.c (NUMCELLS, CELLSIZE): New macros.
14907 (get_sell, xsnprintf, paddress): New functions.
14908 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14909 remove_point, stopped_by_watchpoint, stopped_data_address.
14910 * win32-i386-low.c: Include i386-low.h.
14911 (debug_reg_state): Replaces dr.
14912 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14913 (i386_dr_low_get_status): New function.
14914 (i386_insert_point, i386_remove_point): New functions.
14915 (i386_stopped_by_watchpoint): New function.
14916 (i386_stopped_data_address): New function.
14917 (i386_initial_stuff): Update.
14918 (get_thread_context,set_thread_context,i386_thread_added): Update.
14919 (the_low_target): Add entries for insert_point,
14920 remove_point, stopped_by_watchpoint, stopped_data_address.
14921 * win32-low.c (win32_insert_watchpoint): New function.
14922 (win32_remove_watchpoint): New function.
14923 (win32_stopped_by_watchpoint): New function.
14924 (win32_stopped_data_address): New function.
14925 (win32_target_ops): Add entries for insert_watchpoint,
14926 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14927 * win32-low.h (win32_target_ops): New members insert_point,
14928 remove_point, stopped_by_watchpoint, stopped_data_address.
14930 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14932 * server.c (process_serial_event): Re-return unsupported, not
14933 error, if the type isn't recognized. Re-allow supporting only
14934 insert or remove packets. Also call require_running for
14935 breakpoints. Add missing break statement to default case. Tidy.
14936 * target.h (struct target_ops): Rename insert_watchpoint to
14937 insert_point, and remove_watchpoint to remove_point.
14939 * linux-low.h (struct linux_target_ops): Likewise.
14940 * linux-low.c (linux_insert_watchpoint): Rename to ...
14941 (linux_insert_point): ... this. Adjust.
14942 (linux_remove_watchpoint): Rename to ...
14943 (linux_remove_point): ... this. Adjust.
14944 (linux_target_ops): Adjust.
14945 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14946 (cris_insert_point): ... this.
14947 (cris_remove_watchpoint): Rename to ...
14948 (cris_remove_point): ... this.
14949 (the_low_target): Adjust.
14951 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14953 * server.c (handle_v_kill): Pass signal_pid to
14954 kill_inferior if multi_process is zero.
14956 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14958 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14959 * target.h (target_ops): Comment for *_watchpoint to make it clear
14960 the functions can get types '0' and '1'.
14962 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14964 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14965 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14966 * regcache.c (get_regcache): Likewise.
14967 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14968 * win32-low.c (child_fetch_inferior_registers): Remove check for
14971 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14972 Pedro Alves <pedro@codesourcery.com>
14974 * target.h (struct target_ops) <supports_multi_process>: New
14976 (target_supports_multi_process): New.
14977 * server.c (handle_query): Even if GDB reports support, only
14978 enable multi-process if the target also supports it. Report
14979 multi-process support only if the target backend supports it.
14980 * linux-low.c (linux_supports_multi_process): New function.
14981 (linux_target_ops): Install it as target_supports_multi_process
14984 2009-05-24 Doug Evans <dje@google.com>
14986 Global renaming of find_thread_pid to find_thread_ptid.
14987 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14988 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14989 All callers updated.
14991 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14992 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14995 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14996 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14997 (linux_resume_one_lwp): Ditto.
14999 2009-05-23 Doug Evans <dje@google.com>
15001 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15002 from struct inferior_list_entry * to struct lwp_info *.
15003 All callers updated.
15005 2009-05-13 Doug Evans <dje@google.com>
15007 * linux-x86-low.c: Don't include assert.h.
15008 (x86_siginfo_fixup): Use fatal, not assert.
15009 (x86_arch_setup): Fix comment.
15011 2009-05-12 Doug Evans <dje@google.com>
15013 Biarch support for i386/amd64 gdbserver.
15014 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15015 Add linux-x86-low.c.
15016 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15017 (linux-x86-low.o): Add.
15018 * linux-x86-64-low.c: Delete.
15019 * linux-i386-low.c: Delete.
15020 * linux-x86-low.c: New file.
15021 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15023 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15025 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15026 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15027 (linux_child_pid_to_exec_file): New function.
15028 (elf_64_header_p, elf_64_file_p): New functions.
15029 (siginfo_fixup): New function.
15030 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15031 give target a chance to convert layout.
15032 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15033 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15035 2009-05-07 Doug Evans <dje@google.com>
15037 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15038 (regsets_store_inferior_registers): Ditto.
15040 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15044 * linux-low.c (must_set_ptrace_flags): Delete.
15045 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15047 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15048 `lwp->must_set_ptrace_flags' instead.
15049 (linux_wait_for_event_1): Set ptrace options here.
15050 (linux_wait_1): ... not here.
15052 2009-04-30 Doug Evans <dje@google.com>
15054 * inferiors.c (started_inferior_callback): New function.
15055 (attached_inferior_callback): New function.
15056 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15057 * server.c (print_started_pid, print_attached_pid): New functions.
15058 (detach_or_kill_for_exit): New function.
15059 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15060 * server.h (have_started_inferiors_p): Declare.
15061 (have_attached_inferiors_p): Declare.
15063 * inferiors.c (remove_process): Fix memory leak, free process.
15064 * linux-low.c (linux_remove_process): New function.
15065 (linux_kill): Call it instead of remove_process.
15066 (linux_detach, linux_wait_1): Ditto.
15068 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15070 * configure.srv: Add x86 Windows CE target.
15072 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15074 * inferiors.c (get_thread_process): Make global.
15075 * server.h (get_thread_process): Add prototype.
15076 * thread-db.c (find_one_thread): Use get_thread_process
15077 instead of current_process.
15078 (thread_db_get_tls_address): Do not crash if called when
15079 thread layer is not yet initialized.
15081 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15083 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15084 * spu-low.c (current_tid): Rename to ...
15085 (current_ptid): ... this.
15086 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15087 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15088 ptid_get_lwp (current_ptid) instead of current_tid.
15089 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15090 instead of current_tid. Use find_process_pid to verify pid
15091 argument is valid. Pass proper argument to remove_process.
15092 (spu_thread_alive): Compare current_ptid instead of current_tid.
15093 (spu_resume): Likewise.
15095 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15097 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15100 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15102 Implement the multiprocess extensions, and add linux multiprocess
15105 * server.h (ULONGEST): Declare.
15106 (struct ptid, ptid_t): New.
15107 (minus_one_ptid, null_ptid): Declare.
15108 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15109 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15110 (struct inferior_list_entry): Change `id' type from unsigned from
15112 (struct sym_cache, struct breakpoint, struct
15113 process_info_private): Forward declare.
15114 (struct process_info): Declare.
15115 (current_process): Declare.
15116 (all_processes): Declare.
15117 (initialize_inferiors): Declare.
15118 (add_thread): Adjust to use ptid_t.
15119 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15120 (add_process, remove_process, find_thread_pid): Declare.
15121 (find_inferior_id): Adjust to use ptid_t.
15122 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15123 (multi_process): Declare.
15124 (push_event): Adjust to use ptid_t.
15125 (read_ptid, write_ptid): Declare.
15126 (prepare_resume_reply): Adjust to use ptid_t.
15127 (clear_symbol_cache): Declare.
15128 * inferiors.c (all_processes): New.
15129 (null_ptid, minus_one_ptid): New.
15130 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15131 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15132 (add_thread): Change unsigned long to ptid. Remove gdb_id
15134 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15135 (gdb_id_to_thread): Rename to ...
15136 (find_thread_pid): ... this. Change unsigned long to ptid.
15137 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15138 (loaded_dll, pull_pid_from_list): Adjust.
15139 (add_process, remove_process, find_process_pid)
15140 (get_thread_process, current_process, initialize_inferiors): New.
15141 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15142 (struct target_waitstatus) <related_pid>: Ditto.
15143 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15144 return type to int.
15145 (struct target_ops) <join>: Add `pid' argument.
15146 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15147 (struct target_ops) <wait>: Add `ptid' field. Change return type
15149 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15150 (mywait): Add `ptid' argument. Change return type to ptid_t.
15151 (target_pid_to_str): Declare.
15152 * target.c (set_desired_inferior): Adjust to use ptids.
15153 (mywait): Add new `ptid' argument. Adjust.
15154 (target_pid_to_str): New.
15155 * mem-break.h (free_all_breakpoints): Declare.
15156 * mem-break.c (breakpoints): Delelete.
15157 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15158 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15159 to use per-process breakpoint list.
15160 (free_all_breakpoints): New.
15161 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15162 (symbol_cache, all_symbols_looked_up): Delete.
15164 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15166 (prepare_resume_reply): Change ptid argument's type from unsigned
15167 long to ptid_t. Adjust. Implement W;process and X;process.
15168 (free_sym_cache, clear_symbol_cache): New.
15169 (look_up_one_symbol): Adjust to per-process symbol cache. *
15170 * server.c (cont_thread, general_thread, step_thread): Change type
15172 (attached): Delete.
15173 (multi_process): New.
15174 (last_ptid): Change type to ptid_t.
15175 (struct vstop_notif) <ptid>: Change type to ptid_t.
15176 (queue_stop_reply, push_event): Change `ptid' argument's type to
15178 (discard_queued_stop_replies): Add `pid' argument.
15179 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15180 changes. Don't reference the `attached' global.
15181 (attach_inferior): Adjust to mywait interface changes.
15182 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15183 features. Handle and report "multiprocess+". Handle
15185 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15187 (handle_v_kill): New.
15188 (handle_v_stopped): Adjust to use target_pid_to_str.
15189 (handle_v_requests): Allow multiple attaches and runs when
15190 multiprocess extensions are in effect. Handle "vKill".
15191 (myresume): Adjust to use ptids.
15192 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15193 (handle_status): Adjust to discard_queued_stop_replies interface
15195 (first_thread_of, kill_inferior_callback)
15196 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15197 (main): Call initialize_inferiors. Adjust to use ptids, killing
15198 and detaching from all inferiors. Handle multiprocess packet
15200 * linux-low.h: Include gdb_proc_service.h.
15201 (struct process_info_private): New.
15202 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15203 <lwpid_of>: Use ptid_get_lwp.
15204 (get_lwp_thread): Adjust.
15205 (struct lwp_info): Add `dead' member.
15206 (find_lwp_pid): Declare.
15207 * linux-low.c (thread_db_active): Delete.
15208 (new_inferior): Adjust comment.
15209 (inferior_pid): Delete.
15210 (linux_add_process): New.
15211 (handle_extended_wait): Adjust.
15212 (add_lwp): Change unsigned long to ptid.
15213 (linux_create_inferior): Add process to processes table. Adjust
15214 to use ptids. Don't set new_inferior here.
15215 (linux_attach_lwp): Rename to ...
15216 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15217 it. Adjust to use ptids.
15218 (linux_attach_lwp): New.
15219 (linux_attach): Add process to processes table. Don't set
15221 (struct counter): New.
15222 (second_thread_of_pid_p, last_thread_of_process_p): New.
15223 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15224 multiple processes.
15225 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15226 processes. Remove process from process table.
15227 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15228 to multiple processes.
15229 (any_thread_of): New.
15230 (linux_detach): Add `pid' argument, and handle it. Remove process
15231 from processes table.
15232 (linux_join): Add `pid' argument. Handle it.
15233 (linux_thread_alive): Change unsighed long argument to ptid_t.
15234 Consider dead lwps as not being alive.
15235 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15236 threads we're not interested in.
15237 (same_lwp, find_lwp_pid): New.
15238 (linux_wait_for_lwp): Change `pid' argument's type from int to
15240 (linux_wait_for_event): Rename to ...
15241 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15242 from int to ptid_t. Adjust.
15243 (linux_wait_for_event): New.
15244 (linux_wait_1): Add `ptid' argument. Change return type to
15245 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15246 that exit from the process table.
15247 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15249 (mark_lwp_dead): New.
15250 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15251 stopping all threads, mark its main lwp as dead.
15252 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15254 (fetch_register, usr_store_inferior_registers)
15255 (regsets_fetch_inferior_registers)
15256 (regsets_store_inferior_registers, linux_read_memory)
15257 (linux_write_memory): Inline `inferior_pid'.
15258 (linux_look_up_symbols): Adjust to use per-process
15259 `thread_db_active'.
15260 (linux_request_interrupt): Adjust to use ptids.
15261 (linux_read_auxv): Inline `inferior_pid'.
15262 (initialize_low): Don't reference thread_db_active.
15263 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15264 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15265 (ps_getpid): Return the pid of the current inferior.
15266 * thread-db.c (proc_handle, thread_agent): Delete.
15267 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15269 (find_one_thread): Change argument type to ptid_t. Adjust to
15271 (maybe_attach_thread): Adjust to per-process data and ptids.
15272 (thread_db_find_new_threads): Ditto.
15273 (thread_db_init): Ditto.
15274 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15275 processes table. Adjust to use ptids.
15276 (spu_kill, spu_detach): Adjust interface. Remove process from
15278 (spu_join, spu_thread_alive): Adjust interface.
15279 (spu_wait): Adjust interface. Remove process from processes
15280 table. Adjust to use ptids.
15281 * win32-low.c (current_inferior_tid): Delete.
15282 (current_inferior_ptid): New.
15283 (debug_event_ptid): New.
15284 (thread_rec): Take a ptid. Adjust.
15285 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15286 (child_delete_thread): Ditto.
15287 (do_initial_child_stuff): Add `attached' argument. Add process to
15289 (child_fetch_inferior_registers, child_store_inferior_registers):
15291 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15292 (win32_attach): Pass 1 to do_initial_child_stuff.
15293 (win32_kill): Adjust interface. Remove process from processes
15295 (win32_detach): Ditto.
15296 (win32_join): Adjust interface.
15297 (win32_thread_alive): Take a ptid.
15298 (win32_resume): Adjust to use ptids.
15299 (get_child_debug_event): Ditto.
15300 (win32_wait): Adjust interface. Remove exiting process from
15303 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15305 Non-stop mode support.
15307 * server.h (non_stop): Declare.
15308 (gdb_client_data, handler_func): Declare.
15309 (delete_file_handler, add_file_handler, start_event_loop):
15311 (handle_serial_event, handle_target_event, push_event)
15312 (putpkt_notif): Declare.
15313 * target.h (enum resume_kind): New.
15314 (struct thread_resume): Replace `step' field by `kind' field.
15315 (TARGET_WNOHANG): Define.
15316 (struct target_ops) <wait>: Add `options' argument.
15317 <supports_non_stop, async, start_non_stop>: New fields.
15318 (target_supports_non_stop, target_async): New.
15319 (start_non_stop): Declare.
15320 (mywait): Add `options' argument.
15321 * target.c (mywait): Add `options' argument. Print child exit
15322 notifications here.
15323 (start_non_stop): New.
15324 * server.c (non_stop, own_buf, mem_buf): New globals.
15325 (struct vstop_notif): New.
15326 (notif_queue): New global.
15327 (queue_stop_reply, push_event, discard_queued_stop_replies)
15328 (send_next_stop_reply): New.
15329 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15331 (attach_inferior): In non-stop mode, don't wait for the target
15333 (handle_general_set): Handle QNonStop.
15334 (handle_query): When handling qC, return the current general
15335 thread, instead of the first thread of the list.
15336 (handle_query): If the backend supports non-stop mode, include
15337 QNonStop+ in the qSupported query response.
15338 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15340 (handle_v_attach, handle_v_run): Handle non-stop mode.
15341 (handle_v_stopped): New.
15342 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15343 (myresume): Adjust to use resume_kind. Handle non-stop.
15344 (queue_stop_reply_callback): New.
15345 (handle_status): Handle non-stop mode.
15346 (main): Clear non_stop flag on reconnection. Use the event-loop.
15347 Refactor serial protocol handling from here ...
15348 (process_serial_event): ... to this new function. When GDB
15349 selects any thread, select one here. In non-stop mode, wait until
15350 GDB acks all pending events before exiting.
15351 (handle_serial_event, handle_target_event): New.
15352 * remote-utils.c (remote_open): Install remote_desc in the event
15354 (remote_close): Remove remote_desc from the event loop.
15355 (putpkt_binary): Rename to...
15356 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15357 (putpkt_binary): New as wrapper around putpkt_binary_1.
15358 (putpkt_notif): New.
15359 (prepare_resume_reply): In non-stop mode, don't change the
15361 * event-loop.c: New.
15362 * Makefile.in (OBJ): Add event-loop.o.
15363 (event-loop.o): New rule.
15365 * linux-low.h (pid_of): Moved here.
15367 (get_lwp_thread): Use lwpid_of.
15368 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15369 * linux-low.c (pid_of): Delete.
15370 (inferior_pid): Use lwpid_of.
15371 (linux_event_pipe): New.
15372 (target_is_async_p): New.
15374 (handle_extended_wait): Use lwpid_of.
15375 (add_lwp): Don't set lwpid field.
15376 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15377 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15378 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15379 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15380 first. Adjust to linux_wait_for_event interface changes. Use
15382 (linux_detach): Don't delete the main lwp here.
15383 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15384 (status_pending_p): Don't consider explicitly suspended lwps.
15385 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15386 pointer. Add OPTIONS argument. Change return type to int. Use
15387 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15388 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15389 pointer. Add status pointer argument. Return a pid instead of a
15390 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15391 changes. In non-stop mode, don't switch to a random thread.
15392 (linux_wait): Rename to...
15393 (linux_wait_1): ... this. Add target_options argument, and handle
15394 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15395 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15396 clean exit and signal exit code. Don't stop all threads in
15397 non-stop mode. In all-stop mode, only stop all threads when
15398 reporting a stop to GDB. Handle explicit thread stop requests.
15399 (async_file_flush, async_file_mark): New.
15401 (send_sigstop): Use lwpid_of.
15402 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15403 interface changes. In non-stop mode, don't switch to a random
15405 (linux_resume_one_lwp): Use lwpid_of.
15406 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15407 (linux_resume_one_thread): ... this. Handle resume_stop. In
15408 non-stop mode, don't look for pending flag in all threads.
15409 (resume_status_pending_p): Don't consider explicitly suspended
15411 (my_waitpid): Reimplement. Emulate __WALL.
15412 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15414 (sigchld_handler, linux_supports_non_stop, linux_async)
15415 (linux_start_non_stop): New.
15416 (linux_target_ops): Register linux_supports_non_stop, linux_async
15417 and linux_start_non_stop.
15418 (initialize_low): Install SIGCHLD handler.
15419 * thread-db.c (thread_db_create_event, find_one_thread)
15420 (thread_db_get_tls_address): Use lwpid_of.
15421 * win32-low.c (win32_detach): Adjust to use resume_kind.
15422 (win32_wait): Add `options' argument.
15423 * spu-low.c (spu_resume): Adjust to use resume_kind.
15424 (spu_wait): Add `options' argument.
15426 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15428 Decouple target code from remote protocol.
15430 * target.h (enum target_waitkind): New.
15431 (struct target_waitstatus): New.
15432 (struct target_ops) <wait>: Return an unsigned long. Take a
15433 target_waitstatus pointer instead of a char pointer.
15434 (mywait): Likewise.
15435 * target.c (mywait): Change prototype to return an unsigned long.
15436 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15437 * server.h (thread_from_wait, old_thread_from_wait): Delete
15439 (prepare_resume_reply): Change prototype to take a
15441 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15442 (last_status, last_ptid): New.
15443 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15444 pid instead of a signal.
15445 (attach_inferior): Remove "status" and "signal" parameters.
15447 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15449 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15450 (handle_v_requests, myresume): Remove "status" and "signal"
15451 parameters. Adjust.
15452 (handle_status): New.
15453 (main): Delete local `status'. Adjust.
15454 * remote-utils.c: Include target.h.
15455 (prepare_resume_reply): Change prototype to take a
15456 target_waitstatus. Adjust.
15458 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15460 * spu-low.c (spu_wait): Adjust.
15461 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15463 (win32_wait): Adjust.
15465 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15467 * target.h (struct thread_resume): Delete leave_stopped member.
15468 (struct target_ops): Add a `n' argument to the `resume' callback.
15469 * server.c (start_inferior): Adjust.
15470 (handle_v_cont, myresume): Adjust.
15471 * linux-low.c (check_removed_breakpoint): Adjust to resume
15472 interface change, and to removed leave_stopped field.
15473 (resume_ptr): Delete.
15474 (struct thread_resume_array): New.
15475 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15476 resume interface change.
15477 (linux_continue_one_thread, linux_queue_one_thread)
15478 (resume_status_pending_p): Check if the resume field is NULL
15479 instead of checking the leave_stopped member.
15480 (linux_resume): Adjust to the target resume interface change.
15481 * spu-low.c (spu_resume): Adjust to the target resume interface
15483 * win32-low.c (win32_detach, win32_resume): Ditto.
15485 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15487 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15489 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15491 (linux_continue_one_thread): Only preserve the stepping flag if
15492 there's a pending breakpoint.
15494 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15496 * server.c (main): After the inferior having exited, call
15497 remote_close before exiting gdbserver.
15499 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15501 Fix size of FPSCR in Power 7 processors.
15502 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15503 (PPC_FEATURE_HAS_DFP): New #define.
15504 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15507 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15509 * server.c (handle_query) Whitespace and formatting.
15511 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15513 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15514 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15515 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15516 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15517 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15518 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15519 Makefile.in, configure.ac: Fix whitespace throughout.
15520 * configure: Regenerate.
15522 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15524 * inferiors.c (find_inferior): Make it safe for the callback
15525 function to delete the currently iterated inferior.
15527 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15529 * Makefile.in (linuw_low_h): Move higher.
15530 (thread-db.o): Depend on $(linux_low_h).
15532 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15534 Rename "process" to "lwp" throughout.
15536 * linux-low.c (all_processes): Rename to...
15537 (all_lwps): ... this.
15538 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15539 (add_process): Rename to ...
15540 (add_lwp): ... this. Adjust.
15541 (linux_create_inferior): Adjust.
15542 (linux_attach_lwp): Adjust.
15543 (linux_attach): Adjust.
15544 (linux_kill_one_process): Rename to ...
15545 (linux_kill_one_lwp): ... this. Adjust.
15546 (linux_kill): Adjust.
15547 (linux_detach_one_process): Rename to ...
15548 (linux_detach_one_lwp): ... this. Adjust.
15549 (linux_detach): Adjust.
15550 (check_removed_breakpoint): Adjust.
15551 (status_pending_p): Adjust.
15552 (linux_wait_for_process): Rename to ...
15553 (linux_wait_for_lwp): ... this. Adjust.
15554 (linux_wait_for_event): Adjust.
15555 (send_sigstop): Adjust.
15556 (wait_for_sigstop): Adjust.
15557 (stop_all_processes): Rename to ...
15558 (stop_all_lwps): ... this.
15559 (linux_resume_one_process): Rename to ...
15560 (linux_resume_one_lwp): ... this. Adjust.
15561 (linux_set_resume_request, linux_continue_one_thread)
15562 (linux_queue_one_thread, resume_status_pending_p)
15563 (usr_store_inferior_registers, regsets_store_inferior_registers)
15564 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15566 * linux-low.h (get_process): Rename to ...
15567 (get_lwp): ... this. Adjust.
15568 (get_thread_process): Rename to ...
15569 (get_thread_lwp): ... this. Adjust.
15570 (get_process_thread): Rename to ...
15571 (get_lwp_thread): ... this. Adjust.
15572 (struct process_info): Rename to ...
15573 (struct lwp_info): ... this.
15574 (all_processes): Rename to ...
15575 (all_lwps): ... this.
15576 * proc-service.c (ps_lgetregs): Adjust.
15577 * thread-db.c (thread_db_create_event, find_one_thread)
15578 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15580 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15582 * server.c (handle_query): Handle "qAttached".
15584 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15586 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15587 GPLv3, update license URL.
15589 2009-03-01 Doug Evans <dje@google.com>
15591 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15592 (server_h): Add gdb_signals.h.
15593 (signals.o): Update.
15594 * server.h (target_signal_from_host,target_signal_to_host_p)
15595 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15597 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15599 * remote-utils.c (getpkt): Also generate remote-debug
15600 information if noack_mode is set.
15602 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15604 * server.c (handle_query): Report qXfer:siginfo:read and
15605 qXfer:siginfo:write as supported and handle them.
15606 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15607 * linux-low.c (linux_xfer_siginfo): New.
15608 (linux_target_ops): Set it.
15610 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15612 * server.c (gdbserver_usage): Mention --remote-debug.
15613 (main): Accept '--remote-debug' switch.
15615 2009-01-18 Doug Evans <dje@google.com>
15617 * regcache.c (new_register_cache): No need to check result of xcalloc.
15618 * server.c (handle_search_memory): Back out calls to xmalloc,
15619 result is checked and error is returned to user upon failure.
15620 (handle_query): Ditto. Add more checks for result of malloc.
15621 (handle_v_cont): Check result of malloc, report error back to
15623 (handle_v_run): Ditto. Call freeargv.
15624 * server.h (freeargv): Declare.
15625 * utils.c (freeargv): New fn.
15627 2009-01-15 Doug Evans <dje@google.com>
15629 * gdbreplay.c (perror_with_name): Make arg const char *.
15630 * server.h (target_signal_to_name): Make return type const char *.
15631 * thread-db.c (thread_db_err_str): Make return type const char *.
15632 * utils.c (perror_with_name): Make arg const char *.
15634 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15636 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15637 when handling a EXIT_PROCESS_DEBUG_EVENT.
15639 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15641 * gdbreplay.c (gdbreplay_version): Update copyright year.
15642 * server.c (gdbserver_version): Likewise.
15644 2009-01-05 Doug Evans <dje@google.com>
15646 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15647 (handle_extended_wait): Improve comment.
15649 2008-12-13 Doug Evans <dje@google.com>
15651 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15652 * server.h (ATTR_MALLOC): New macro.
15653 (xmalloc,xcalloc,xstrdup): Declare.
15654 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15655 * inferiors.c: Ditto.
15656 * linux-low.c: Ditto.
15657 * mem-break.c: Ditto.
15658 * regcache.c: Ditto.
15659 * remote-utils.c: Ditto.
15662 * win32-low.c: Ditto.
15664 2008-12-12 Doug Evans <dje@google.com>
15666 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15667 in debugging printf.
15669 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15671 2008-12-09 Doug Evans <dje@google.com>
15673 * linux-low.h (struct process_info): Delete member tid, unused.
15674 * thread-db.c (find_one_thread): Update.
15675 (maybe_attach_thread): Update.
15677 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15679 * target.h (struct target_ops): Add qxfer_osdata member.
15680 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15682 (linux_qxfer_osdata): New functions.
15683 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15685 * server.c (handle_query): Handle "qXfer:osdata:read:".
15686 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15687 (buffer_xml_printf): New functions.
15688 * server.h (struct buffer): New.
15689 (buffer_grow_str, buffer_grow_str0): New macros.
15690 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15691 (buffer_xml_printf): Declare.
15693 2008-11-24 Doug Evans <dje@google.com>
15695 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15697 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15699 * server.c (handle_v_run): Always use the supplied argument list.
15701 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15703 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15704 (xtensa_regmap_table): Add entry for scompare1.
15706 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15708 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15709 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15710 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15711 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15712 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15713 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15714 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15715 XML target descriptions.
15716 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15717 when inferior is running on an ISA 2.05 or later processor. Add
15718 special case to return offset for full 64-bit slot of FPSCR when
15721 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15723 * Makefile.in (SFILES, clean): Added sparc64 files.
15724 (reg-sparc64.o, reg-sparc64.c): New.
15725 * configure.srv (sparc*-*-linux*): New configuration.
15726 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15727 syscall arguments for SPARC.
15728 (regsets_store_inferior_registers): Likewise.
15729 * linux-sparc-low.c: New file.
15731 2008-10-21 Doug Evans <dje@google.com>
15733 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15734 (READLINE_DIR,READLINE_DEP): Delete.
15735 (INTERNAL_CFLAGS): Update.
15736 (LINTFLAGS): Update.
15738 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15740 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15741 whole argv from the last run, not just argv[0].
15743 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15745 * regcache.c (new_register_cache): Return NULL if the register
15746 cache size isn't known yet.
15747 (free_register_cache): Avoid dereferencing a NULL regcache.
15749 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15751 * configure.srv: Merge MIPS and MIPS64.
15753 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15755 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15757 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15759 * Makefile.in: Add required vsx dependencies.
15761 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15762 Declare init_registers_powerpc_vsx32l.
15763 Declare init_registers_powerpc_vsx64l.
15764 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15765 (ppc_arch_setup): Check for VSX in hwcap.
15766 (ppc_fill_vsxregset): New function.
15767 (ppc_store_vsxregset): New function.
15768 Add new VSX entry in regset_info target_regsets.
15770 * configure.srv: Add new VSX dependencies.
15772 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15774 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15775 (remote_open): Set or clear transport_is_reliable.
15776 (putpkt_binary): Don't expect acks in noack mode.
15777 (getpkt): Don't send ack/nac in noack mode.
15778 * server.c (handle_general_set): Handle QStartNoAckMode.
15779 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15781 (main): Reset noack_mode on every connection.
15782 * server.h (noack_mode): Declare.
15784 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15786 * Makefile.in (GDBREPLAY_OBS): New variable.
15787 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15789 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15790 Daniel Jacobowitz <dan@codesourcery.com>
15792 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15793 (usr_store_inferior_registers): Likewise.
15794 (regsets_store_inferior_registers): Likewise.
15796 2008-07-31 Rolf Jansen <rj@surtec.com>
15797 Pedro Alves <pedro@codesourcery.com>
15799 * configure.ac: Check for memmem declaration.
15800 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15801 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15802 (disable_packet_qfThreadInfo): Unconditionally compile.
15803 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15804 * configure, config.in: Regenerate.
15806 2008-07-28 Doug Kwan <dougkwan@google.com>
15808 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15809 (linux_write_memory): Remove declaration of errno.
15811 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15813 * linux-low.c (handle_extended_wait): Do not use "status"
15814 variable uninitialized.
15816 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15818 * server.c (handle_v_attach): Inhibit reporting dll changes.
15820 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15822 * remote-utils.c (prepare_resume_reply): If requested, don't
15823 output "thread:TID" in the T stop reply.
15825 * server.c (disable_packet_vCont, disable_packet_Tthread)
15826 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15827 (handle_query): If requested, disable support for qC, qfThreadInfo
15829 (handle_v_requests): If requested, disable support for vCont.
15830 (gdbserver_show_disableable): New.
15831 (main): Handle --disable-packet and --disable-packet=LIST.
15833 * server.h (disable_packet_vCont, disable_packet_Tthread)
15834 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15836 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15838 * server.c (gdbserver_usage): Mention --version.
15840 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15842 * Makefile.in (gdbreplay.o): New rule.
15844 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15846 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15847 message, not gdbserver.
15849 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15850 Nathan Sidwell <nathan@codesourcery.com>
15851 Joseph Myers <joseph@codesourcery.com>
15853 * acinclude.m4: Include ../../config/acx.m4.
15854 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15855 * configure, config.in: Regenerate.
15856 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15857 * server.c (gdbserver_version): Print PKGVERSION.
15858 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15859 (main): Adjust gdbserver_usage calls.
15860 * gdbreplay.c (version, host_name): Add declarations.
15861 (gdbreplay_version, gdbreplay_usage): New.
15862 (main): Accept --version and --help options.
15864 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15866 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15867 (arm_breakpoint_at): Handle Thumb.
15868 (the_low_target): Add comment.
15870 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15872 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15874 2008-05-09 Doug Evans <dje@google.com>
15876 * server.h (decode_search_memory_packet): Declare.
15877 * remote-utils.c (decode_search_memory_packet): New fn.
15878 * server.c (handle_search_memory_1): New fn.
15879 (handle_search_memory): New fn.
15880 (handle_query): Process qSearch:memory packets.
15882 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15884 * regcache.c (registers_length): Remove.
15885 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15886 full register packet.
15887 * regcache.h (registers_length): Remove prototype.
15888 * server.h (PBUFSIZ): Define to 16384.
15890 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15892 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15893 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15894 powerpc-64l.o, and powerpc-altivec64l.o.
15895 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15896 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15897 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15898 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15899 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15902 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15903 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15904 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15905 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15906 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15907 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15908 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15909 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15910 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15911 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15914 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15915 (init_registers_powerpc_32l): ... this new prototype.
15916 (init_registers_powerpc_32): Remove, replace by ...
15917 (init_registers_powerpc_altivec32l): ... this new prototype.
15918 (init_registers_powerpc_e500): Remove, replace by ...
15919 (init_registers_powerpc_e500l): ... this new prototype.
15920 (init_registers_ppc64): Remove, replace by ...
15921 (init_registers_powerpc_64l): ... this new prototype.
15922 (init_registers_powerpc_64): Remove, replace by ...
15923 (init_registers_powerpc_altivec64l): ... this new prototype.
15924 (ppc_num_regs): Set to 73.
15925 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15926 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15927 (ppc_cannot_store_register): Handle orig_r3 and trap.
15928 (ppc_arch_setup): Update init_registers_... calls.
15929 (ppc_fill_gregset): Handle orig_r3 and trap.
15931 * inferiors.c (clear_inferiors): Reset current_inferior.
15933 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15935 * acinclude.m4: Add override.m4.
15936 * configure: Regenerate.
15938 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15940 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15941 initial call to init_register_ppc64.
15943 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15945 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15946 single powerpc*-*-linux* case.
15947 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15949 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15951 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15952 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15954 * linux-ppc-low.c: Include <elf.h>.
15955 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15956 (ppc_hwcap): New global variable.
15957 (ppc_regmap): Remove __SPE__ #ifdef sections.
15958 (ppc_regmap_e500): New global variable.
15959 (ppc_cannot_store_register): Update __SPE__ special case.
15960 (ppc_get_hwcap): New function.
15961 (ppc_arch_setup): Use it to determine whether inferior supports
15962 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15963 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15964 Do not access registers if target does not support AltiVec.
15965 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15966 Do not access registers if target does not support SPE.
15967 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15969 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15971 * linux-low.c (disabled_regsets, num_regsets): New.
15972 (use_regsets_p): Delete.
15973 (linux_wait_for_process): Clear disabled_regsets.
15974 (regsets_fetch_inferior_registers): Check and set it.
15975 (regsets_store_inferior_registers): Likewise.
15976 (linux_fetch_registers, linux_store_registers): Do not use
15978 (initialize_low): Allocate disabled_regsets.
15980 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15982 * Makefile.in (LIBOBJS): New.
15983 (OBS): Use LIBOBJS.
15984 (memmem.o): New rule.
15985 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15986 * configure: Regenerated.
15988 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15990 * server.c (handle_query): Never return "unsupported" for
15991 qXfer:features:read queries.
15993 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15995 * server.c (get_features_xml): Fix inverted condition.
15996 (handle_query): Always support qXfer:feature:read.
15998 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16000 * server.c (wrapper_argv): New.
16001 (start_inferior): Handle wrapper_argv. If set, expect an extra
16003 (gdbserver_usage): Document --wrapper.
16004 (main): Parse --wrapper.
16006 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16008 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16009 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16010 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16011 (ppc_set_pc): Likewise.
16012 (ppc_arch_setup): New function.
16013 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16014 of collect_register.
16015 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16017 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16019 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16020 instead of linux-ppc64-low.o.
16021 * linux-ppc64-low.c: Remove file.
16022 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16023 (linux-ppc64-low.o): Remove rule.
16025 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16026 (init_registers_powerpc_64): Likewise.
16027 (ppc_regmap): Conditionally define depending on __powerpc64__.
16028 (ppc_cannot_store_register): Do not special-case "fpscr" when
16029 compiled on __powerpc64__.
16030 (ppc_collect_ptrace_register): New function.
16031 (ppc_supply_ptrace_register): New function.
16032 (ppc_breakpoint): Change type to "unsigned int".
16033 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16034 (the_low_target): Conditionally provide initializers for the
16035 arch_setup member depending on __powerpc64__. Install
16036 collect_ptrace_register and supply_ptrace_register members.
16038 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16040 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16041 * server.c (gdbserver_xmltarget): Define.
16042 (get_features_xml): Use it to replace "target.xml" and arch_string.
16044 * configure.srv: Remove srv_xmltarget. Add XML files that were
16045 mentioned there to srv_xmlfiles instead. Remove conditional tests
16046 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16047 srv_xmlfiles and srv_regobj to include all possible choices.
16048 * configure.ac (srv_xmltarget): Remove.
16049 (srv_xmlfiles): Do not add "target.xml".
16050 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16051 checks for supplementary target information.
16052 * configure: Regenerate.
16053 * Makefile.in (XML_TARGET): Remove.
16054 (target.xml): Remove rule.
16055 (clean): Do not clean up target.xml.
16056 (.PRECIOUS): Do not mention target.xml.
16058 * target.h (struct target_ops): Remove arch_string member.
16059 * linux-low.c (linux_arch_string): Remove.
16060 (linux_target_ops): Remove arch_string initializer.
16061 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16062 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16063 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16064 * spu-low.c (spu_arch_string): Remove.
16065 (spu_target_ops): Remove arch_string initializer.
16066 * win32-low.c (win32_arch_string): Remove.
16067 (win32_target_ops): Remove arch_string initializer.
16068 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16069 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16070 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16072 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16074 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16075 by collect_ptrace_register and supply_ptrace_register hooks.
16076 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16077 instead of checking for the_low_target.left_pad_xfer.
16078 (usr_store_inferior_registers): Use collect_ptrace_register callback
16079 instead of checking for the_low_target.left_pad_xfer.
16081 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16082 (s390_supply_ptrace_register): Likewise.
16083 (s390_fill_gregset): Call s390_collect_ptrace_register.
16084 (the_low_target): Update.
16086 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16087 (ppc_supply_ptrace_register): Likewise.
16088 (the_low_target): Update.
16090 * linux-i386-low.c (the_low_target): Update.
16091 * linux-x86-64-low.c (the_low_target): Update.
16093 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16095 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16096 reg-s390.o and reg-s390x.o.
16098 * linux-low.c (new_inferior): New global variable.
16099 (linux_create_inferior, linux_attach): Set it.
16100 (linux_wait_for_process): Call the_low_target.arch_setup after the
16101 target has stopped for the first time.
16102 (initialize_low): Do not call the_low_target.arch_setup.
16104 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16105 (s390_set_pc): Likewise.
16106 (s390_arch_setup): New function.
16107 (the_low_target): Use s390_arch_setup as arch_setup routine.
16109 * regcache.c (realloc_register_cache): New function.
16110 (set_register_cache): Call it for each existing regcache.
16112 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16114 * server.h (init_registers): Remove prototype.
16116 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16117 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16118 instead of init_registers ().
16119 * linux-arm-low.c (init_registers_arm): Add prototype.
16120 (init_registers_arm_with_iwmmxt): Likewise.
16121 (the_low_target): Add initializer for arch_setup field.
16122 * linux-cris-low.c (init_registers_cris): Add prototype.
16123 (the_low_target): Add initializer for arch_setup field.
16124 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16125 (the_low_target): Add initializer for arch_setup field.
16126 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16127 (the_low_target): Add initializer for arch_setup field.
16128 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16129 (the_low_target): Add initializer for arch_setup field.
16130 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16131 (the_low_target): Add initializer for arch_setup field.
16132 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16133 (the_low_target): Add initializer for arch_setup field.
16134 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16135 (init_registers_mips64_linux): Likewise.
16136 (the_low_target): Add initializer for arch_setup field.
16137 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16138 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16139 (the_low_target): Add initializer for arch_setup field.
16140 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16141 (init_registers_powerpc_64): Likewise.
16142 (the_low_target): Add initializer for arch_setup field.
16143 * linux-s390-low.c (init_registers_s390): Add prototype.
16144 (init_registers_s390x): Likewise.
16145 (the_low_target): Add initializer for arch_setup field.
16146 * linux-sh-low.c (init_registers_sh): Add prototype.
16147 (the_low_target): Add initializer for arch_setup field.
16148 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16149 (the_low_target): Add initializer for arch_setup field.
16150 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16151 (the_low_target): Add initializer for arch_setup field.
16153 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16154 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16155 instead of init_registers ().
16156 * win32-arm-low.c (init_registers_arm): Add prototype.
16157 (the_low_target): Add initializer for arch_setup field.
16158 * win32-i386-low.c (init_registers_i386): Add prototype.
16159 (the_low_target): Add initializer for arch_setup field.
16161 * spu-low.c (init_registers_spu): Add prototype.
16162 (initialize_low): Call initialie_registers_spu () instead of
16163 initialize_registers ().
16165 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16167 * server.c (handle_v_requests): When handling the vRun and vAttach
16168 packets, if already debugging a process, don't kill it. Return an
16171 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16173 * server.c (handle_query): Correct length check.
16175 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16177 * win32-low.c (do_initial_child_stuff): Add process handle
16178 parameter. Set current_process_handle and current_process_id from the
16179 parameters. Clear globals.
16180 (win32_create_inferior): Don't set current_process_handle and
16181 current_process_id here. Instead pass them on the call to
16182 do_initial_child_stuff.
16183 (win32_attach): Likewise.
16184 (win32_clear_inferiors): New.
16185 (win32_kill): Don't close the current process handle or the
16186 current thread handle here. Instead call win32_clear_inferiors.
16187 (win32_detach): Don't open a new handle to the process. Call
16188 win32_clear_inferiors.
16189 (win32_join): Don't rely on current_process_handle; open a new
16190 handle using the process id.
16191 (win32_wait): Call win32_clear_inferiors when the inferior process
16194 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16196 * server.c (monitor_show_help): Add "exit".
16198 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16200 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16201 (clean): Add reg-xtensa.c.
16202 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16203 * configure.srv (xtensa*-*-linux*) New target.
16204 * linux-xtensa-low.c: New.
16205 * xtensa-xtregs.c: New.
16207 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16209 * hostio.c: Don't include errno.h.
16210 (errno_to_fileio_errno): Move to hostio-errno.
16211 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16212 error number outputting to the target->hostio_last_error callback.
16213 (hostio_packet_error): Use FILEIO_EINVAL directly.
16214 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16215 calls to hostio_error.
16216 * hostio-errno.c: New.
16217 * server.h (hostio_last_error_from_errno): Declare.
16218 * target.h (target_ops): Add hostio_last_error member.
16219 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16220 as hostio_last_error handler.
16221 * spu-low.c (spu_target_ops): Likewise.
16222 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16223 (wince_hostio_last_error): New functions.
16224 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16225 as hostio_last_error handler.
16226 (win32_target_ops) [!_WIN32_WCE]: Register
16227 hostio_last_error_from_errno as hostio_last_error handler.
16228 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16229 (hostio-errno.o): New rule.
16230 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16231 * configure.srv (srv_hostio_err_objs): New variable. Default to
16233 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16234 * configure: Regenerate.
16236 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16238 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16239 (linux_kill, linux_detach): Clean up the process list.
16240 * remote-utils.c (remote_open): Improve port number parsing.
16241 (putpkt_binary, input_interrupt): Only send interrupts if the target
16243 * server.c (extended_protocol): Make static.
16244 (attached): Define earlier.
16245 (exit_requested, response_needed, program_argv): New variables.
16246 (target_running): New.
16247 (start_inferior): Clear attached here.
16248 (attach_inferior): Set attached here.
16249 (require_running): Define.
16250 (handle_query): Use require_running and target_running. Implement
16252 (handle_v_attach, handle_v_run): New.
16253 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16254 (gdbserver_usage): Update.
16255 (main): Redo argument parsing. Handle --debug and --multi. Handle
16256 --attach along with other options or after the port. Save
16257 program_argv. Support no initial program. Resynchronize
16258 communication with GDB after an error. Handle "monitor exit".
16259 Use require_running and target_running. Always allow the extended
16260 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16261 restart in extended mode.
16262 * README: Refer to the GDB manual. Update --attach usage.
16264 2007-12-20 Andreas Schwab <schwab@suse.de>
16266 * linux-low.c (STACK_SIZE): Define.
16267 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16268 (linux_test_for_tracefork): Likewise.
16270 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16272 * linux-low.c (linux_wait_for_event): Update messages. Do not
16273 reinsert auto-delete breakpoints.
16274 * mem-break.c (struct breakpoint): Change return type of handler to
16276 (set_breakpoint_at): Update handler type.
16277 (reinsert_breakpoint_handler): Return 1 instead of calling
16279 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16281 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16282 * mem-break.h (set_breakpoint_at): Update handler type.
16283 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16284 * win32-low.c (auto_delete_breakpoint): New.
16285 (get_child_debug_event): Use it.
16287 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16289 * configure.ac: Check for pread and pwrite.
16290 * hostio.c (handle_pread): Fall back to lseek and read.
16291 (handle_pwrite): Fall back to lseek and write.
16292 * config.in, configure: Regenerated.
16294 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16296 * server.c (myresume): Add own_buf argument.
16297 (main): Update calls.
16299 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16301 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16302 * remote-utils.c (remote_open): Do not call disable_async_io.
16303 (block_async_io): Delete.
16304 (unblock_async_io): Make static.
16305 (initialize_async_io): New.
16306 * server.c (handle_v_cont): Handle async I/O here.
16307 (myresume): Likewise. Move other common resume tasks here...
16308 (main): ... from here. Call initialize_async_io. Disable async
16309 I/O before the main loop.
16310 * server.h (initialize_async_io): Declare.
16311 (block_async_io, unblock_async_io): Delete prototypes.
16312 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16314 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16316 * remote-utils.c (readchar): Allow binary data in received messages.
16318 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16320 * win32-low.c (attaching): New global.
16321 (win32_create_inferior): Clear the `attaching' global.
16322 (win32_attach): Set the `attaching' global.
16323 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16324 attaching. Only set a breakpoint at the entry point if not
16327 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16329 * server.c (main): Don't report dll events on the initial
16330 connection on attaches.
16332 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16334 * server.c (main): Relax numerical bases supported for the pid of
16335 the --attach command line argument.
16337 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16339 * win32-low.c (win32_attach): Call OpenProcess before
16340 DebugActiveProcess, not after. Add last error output to error
16343 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16345 * win32-low.c (win32_get_thread_context)
16346 (win32_set_thread_context): New functions.
16347 (thread_rec): Use win32_get_thread_context.
16348 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16349 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16352 2007-12-03 Leo Zayas
16353 Pedro Alves <pedro_alves@portugalmail.pt>
16355 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16357 (child_add_thread): Minor cleanup.
16358 (child_continue): Resume artificially suspended threads before
16359 calling ContinueDebugEvent.
16360 (suspend_one_thread): New.
16361 (fake_breakpoint_event): New.
16362 (get_child_debug_event): Change return type to int. Check here if
16363 gdb sent an interrupt request. If a soft interrupt was requested,
16364 fake a breakpoint event. Return 0 if there is no event to handle,
16366 (win32_wait): Don't check here if gdb sent an interrupt request.
16367 Ensure there is a valid event to handle.
16368 (win32_request_interrupt): Add soft interruption method as last
16371 2007-12-03 Leo Zayas
16372 Pedro Alves <pedro_alves@portugalmail.pt>
16374 * win32-low.h (win32_thread_info): Add descriptions to the
16375 structure members. Replace `suspend_count' counter by a
16377 * win32-low.c (thread_rec): Update condition of when to get the
16378 context from the inferior. Rely on ContextFlags being set if it
16379 has already been retrieved. Only suspend the inferior thread if
16380 we haven't already. Warn if that fails.
16381 (continue_one_thread): s/suspend_count/suspended/. Only call
16382 ResumeThread once. Warn if that fails.
16384 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16386 * win32-low.c (win32_wait): Don't read from the inferior when it
16387 has already exited.
16389 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16391 * Makefile.in (win32_low_h): New variable.
16392 (win32-low.o): Add dependency on $(win32_low_h).
16393 (win32-arm-low.o, win32-i386-low.o): New rules.
16395 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16397 * hostio.c: Correct copyright year.
16399 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16401 * Makefile.in (OBS): Add hostio.o.
16402 (hostio.o): New rule.
16403 * server.h (handle_vFile): Declare.
16404 * hostio.c: New file.
16405 * server.c (handle_v_requests): Take packet_len and new_packet_len
16406 for binary packets. Call handle_vFile.
16407 (main): Update call to handle_v_requests.
16409 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16411 * linux-low.c: Include <sched.h>.
16413 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16415 * linux-low.c (linux_tracefork_grandchild): New.
16416 (linux_tracefork_child): Use clone.
16417 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16419 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16421 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16423 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16425 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16427 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16429 * inferiors.c (change_inferior_id): Delete.
16430 (add_pid_to_list, pull_pid_from_list): New.
16431 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16432 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16433 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16434 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16435 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16436 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16437 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16438 (using_threads): Always set to 1.
16439 (handle_extended_wait): New.
16440 (add_process): Do not set TID.
16441 (linux_create_inferior): Set must_set_ptrace_flags.
16442 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16443 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16444 (linux_thread_alive): Rename TID argument to LWPID.
16445 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16446 (linux_wait_for_event): Do not use TID or check using_threads. Update
16447 call to dead_thread_notify. Call handle_extended_wait.
16448 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16449 (send_sigstop): Delete sigstop_sent.
16450 (wait_for_sigstop): Avoid TID.
16451 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16452 (linux_test_for_tracefork): New.
16453 (linux_lookup_signals): Use thread_db_active and
16454 linux_supports_tracefork_flag.
16455 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16456 * linux-low.h (get_process_thread): Avoid TID.
16457 (struct process_ifo): Move thread_known and tid to the end. Remove
16459 (linux_attach_lwp, thread_db_init): Update prototypes.
16460 * server.h (change_inferior_id): Delete prototype.
16461 (add_pid_to_list, pull_pid_from_list): New prototypes.
16462 * thread-db.c (thread_db_use_events): New.
16463 (find_first_thread): Rename to...
16464 (find_one_thread): ...this. Update callers and messages. Do not
16465 call fatal. Check thread_db_use_events. Do not call
16466 change_inferior_id or new_thread_notify.
16467 (maybe_attach_thread): Update. Do not call new_thread_notify.
16468 (thread_db_init): Set thread_db_use_events. Check use_events.
16469 * utils.c (fatal, warning): Correct message prefix.
16471 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16473 * Makefile.in (clean): Remove new files.
16474 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16475 (powerpc-64.o, powerpc-64.c): New rules.
16476 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16477 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16479 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16481 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16482 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16483 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16484 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16485 (target_regsets): Add AltiVec and SPE register sets.
16486 * configure.ac: Check for AltiVec and SPE.
16487 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16488 (ppc_fill_vrregset, ppc_store_vrregset): New.
16489 (target_regsets): Add AltiVec register set.
16490 * configure: Regenerated.
16492 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16494 * linux-low.c (O_LARGEFILE): Define.
16495 (linux_read_memory): Use /proc/PID/mem.
16496 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16497 * configure, config.in: Regenerated.
16499 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16501 * linux-low.c (linux_wait_for_event): Do not pass signals while
16504 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16506 * win32-low.c (create_process): New.
16507 (win32_create_inferior): Use create_process instead of
16508 CreateProcess. If create_process failed retry appending an ".exe"
16509 suffix. Store the GetLastError result immediatelly after
16510 create_process calls and use it on the call to error.
16512 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16514 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16516 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16518 * configure.ac: Switch license to GPLv3.
16520 2007-08-01 Michael Snyder <msnyder@access-company.com>
16522 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16524 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16526 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16528 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16529 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16530 CloseToolhelp32Snapshot.
16531 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16532 CloseToolhelp32Snapshot.
16534 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16536 * server.c (main): Check for inferior exit before main loop.
16538 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16540 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16541 instead of on tmp_desc.
16543 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16544 Daniel Jacobowitz <dan@codesourcery.com>
16546 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16547 (add_thread): Minor cleanups.
16548 (clear_inferiors): Move lower in the file. Clear the DLL
16550 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16551 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16552 (xml_escape_text): New.
16553 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16555 (handle_v_cont): Report errors.
16556 (gdbserver_version): Update.
16557 (main): Correct size of own_buf. Do not report initial DLL events.
16558 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16559 (unloaded_dll, xml_escape_text): New.
16560 * win32-low.c (enum target_waitkind): Update comments.
16561 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16562 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16563 (win32_EnumProcessModules, win32_GetModuleInformation)
16564 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16565 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16566 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16567 (win32_Module32First, win32_Module32Next, load_toolhelp)
16568 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16569 (get_child_debug_event): Handle DLL events.
16570 (win32_wait): Likewise.
16572 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16574 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16575 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16577 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16579 * win32-low.c (handle_output_debug_string): Ignore event if not
16582 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16584 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16586 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16588 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16590 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16592 * inferiors.c (change_inferior_id): Add comment.
16593 * linux-low.c (check_removed_breakpoint): Add an early
16594 prototype. Improve debug output.
16595 (linux_attach): Doc update.
16596 (linux_detach_one_process, linux_detach): Clean up before releasing
16598 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16599 * linux-low.h (struct process_info): Doc improvement.
16600 * mem-break.c (delete_all_breakpoints): New.
16601 * mem-break.h (delete_all_breakpoints): New prototype.
16602 * thread-db.c (find_first_thread): New.
16603 (thread_db_create_event): Call it instead of
16604 thread_db_find_new_threads. Clean up unused variables.
16605 (maybe_attach_thread): Remove first thread handling.
16606 (thread_db_find_new_threads): Use find_first_thread.
16607 (thread_db_get_tls_address): Likewise.
16609 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16611 * thread-db.c (thread_db_find_new_threads): Add prototype.
16612 (thread_db_create_event): Check for the main thread before adding
16614 (maybe_attach_thread): Only enable event reporting if TID == 0.
16615 (thread_db_get_tls_address): Check for new threads.
16617 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16619 * linux-low.c (linux_create_inferior): Try execv before execvp.
16620 * spu-low.c (spu_create_inferior): Likewise.
16622 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16624 * linux-low.c (linux_create_inferior): Change execv to execvp.
16625 * spu-low.c (spu_create_inferior): Likewies.
16627 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16629 * Makefile.in (clean): Clean new files instead of deleted ones.
16630 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16631 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16633 * configure.srv: Specify XML files and new regformats for MIPS and
16635 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16636 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16637 an entry for the restart register.
16638 (mips_cannot_fetch_register, mips_cannot_store_register)
16639 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16640 register names to match the XML descriptions.
16641 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16642 restart register instead of $0.
16644 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16645 Markus Deuling <deuling@de.ibm.com>
16647 * remote-utils.c (decode_xfer_write): New function.
16648 * server.h (decode_xfer_write): Add prototype.
16649 * server.c (handle_query): Add PACKET_LEN argument. Support
16650 qXfer:spu:read and qXfer:spu:write packets.
16651 (main): Pass packet_len to handle_query.
16652 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16653 * target.h (target_ops): Add qxfer_spu.
16655 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16657 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16658 accessing non-seekable spufs files.
16660 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16662 * server.c (handle_query): Add reply for qC packet.
16664 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16665 Leo Zayas <lerele@champenstudios@com>
16667 * server.h (check_remote_input_interrupt_request): New function.
16668 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16669 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16670 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16671 (check_remote_input_interrupt_request): New function.
16672 * server.h (check_remote_input_interrupt_request): Declare.
16673 * win32-low.c (winapi_DebugBreakProcess,
16674 winapi_GenerateConsoleCtrlEvent): New typedefs.
16675 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16677 (win32_wait): Check for remote interrupt request
16678 with check_remote_input_interrupt_request.
16679 (win32_request_interrupt): New function.
16680 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16682 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16684 * win32-low.c (debug_registers_changed,
16685 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16686 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16687 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16688 (thread_rec): Get context using the low target.
16689 (child_add_thread): Call thread_added on the low target,
16690 which does the same thing.
16692 (do_initial_child_stuff): Remove debug registers references.
16693 Set context using the low target. Resume threads after
16694 setting the contexts.
16695 (child_continue): Remove dead variable. Remove debug
16696 registers references.
16697 (child_fetch_inferior_registers): Go through the low target.
16698 (do_child_store_inferior_registers): Remove.
16699 (child_store_inferior_registers): Go through the low target.
16700 (win32_resume): Remove debug registers references.
16701 Set context using the low target.
16702 (handle_exception): Change return type to void. Don't record
16703 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16704 first chance exception.
16705 (get_child_debug_event): Change return type to void. Remove
16706 goto loop. Always return after waiting for debug event.
16707 (win32_wait): Convert to switch statement. Handle spurious
16710 * win32-i386-low.c (debug_registers_changed,
16711 debug_registers_used): New.
16712 (initial_stuff): Rename to ...
16713 (i386_initial_stuff): ... this. Clear debug registers
16715 (store_debug_registers): Delete.
16716 (i386_get_thread_context): New.
16717 (load_debug_registers): Delete.
16718 (i386_set_thread_context): New.
16719 (i386_thread_added): New.
16720 (single_step): Rename to ...
16721 (i386_single_step): ... this.
16722 (do_fetch_inferior_registers): Rename to ...
16723 (i386_fetch_inferior_register): ... this.
16724 (i386_store_inferior_register): New.
16725 (the_low_target): Adapt to new interface.
16727 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16728 (arm_get_thread_context): New.
16729 (arm_set_thread_context): New.
16731 (do_fetch_inferior_registers): Rename to ...
16732 (arm_fetch_inferior_register): ... this.
16733 (arm_store_inferior_register): New.
16734 (arm_wince_breakpoint): Reimplement as unsigned long.
16735 (arm_wince_breakpoint_len): Define.
16736 (the_low_target): Adapt to new interface.
16738 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16739 load_debug_registers. Add get_thread_context, set_thread_context,
16740 thread_added and store_inferior_register. Rename
16741 fetch_inferior_registers to fetch_inferior_register.
16742 (regptr): Remove declaration.
16744 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16746 * linux-low.c (linux_detach): Change return type to int. Return 0.
16747 * spu-low.c (spu_detach): Likewise.
16749 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16751 * target.h (target_ops): Change return type of detach to int.
16753 (join_inferior): New.
16754 * server.c (main): Don't skip detach support on mingw32.
16755 If the inferior doesn't support detaching return error.
16756 Call join_inferior instead of using waitpid.
16757 * linux-low.c (linux_join): New.
16758 (linux_target_op): Add linux_join.
16759 * spu-low.c (spu_join): New.
16760 (spu_target_ops): Add spu_join.
16761 * win32-low.c (win32_detach): Adapt to new interface.
16762 Reopen current_process_handle before detaching. Issue a child
16763 resume before detaching.
16765 (win32_target_op): Add win32_join.
16767 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16769 * win32-low.c (win32-attach): Fix return value.
16770 * target.h (target_ops): Describe ATTACH return values.
16772 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16774 * win32-low.c (GETPROCADDRESS): Define.
16775 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16776 (winapi_DebugSetProcessKillOnExit): Likewise.
16777 (win32_create_inferior): Force usage of ansi CreateProcessA.
16778 (win32_attach): Use GETPROCADDRESS.
16779 (win32_detach): Likewise.
16781 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16783 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16785 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16787 * win32-low.c: Commit leftover changes from 2007-03-29.
16789 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16791 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16792 fields short instead of int. Add explicit padding.
16793 (i387_cache_to_fsave): Remove unnecessary casts.
16794 (i387_fsave_to_cache): Doc fix.
16795 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16797 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16799 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16800 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16802 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16804 * configure.srv (arm*-*-mingw32ce*): Move near the other
16807 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16809 * configure.ac: Add errno checking.
16810 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16811 sys/file.h and malloc.h.
16812 (AC_CHECK_DECLS): Add perror.
16813 (srv_mingwce): Handle.
16814 * configure.srv (i[34567]86-*-cygwin*): Add
16815 win32-i386-low.o to srv_tgtobj.
16816 (i[34567]86-*-mingw*): Likewise.
16817 (arm*-*-mingw32ce*): Add case.
16818 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16819 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16820 [__MINGW32CE__] (strerror): New function.
16821 [__MINGW32CE__] (errno): Define to GetLastError.
16822 [__MINGW32CE__] (COUNTOF): New macro.
16823 (remote_open): Remove extra close call.
16824 * mem-break.c (delete_breakpoint_at): New function.
16825 * mem-break.h (delete_breakpoint_at): Declare.
16826 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16827 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16828 [USE_WIN32API] (read, write): Add char* casts.
16829 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16830 * server.h: Include wincecompat.h on Windows CE.
16831 [HAVE_ERRNO_H]: Check.
16832 (perror): Declare if not declared.
16833 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16834 (perror_with_name): Remove errno declaration.
16835 * wincecompat.h: New.
16836 * wincecompat.c: New.
16837 * win32-low.h: New.
16838 * win32-arm-low.c: New.
16839 * win32-i386-low.c: New.
16840 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16841 (OUTMSG2): Make it safe.
16843 (COUNTOF): New macro.
16844 (NUM_REGS): Get it from the low target.
16845 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16846 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16847 (thread_rec): Let low target handle debug registers.
16848 (child_add_thread): Likewise.
16849 (child_init_thread_list): Likewise.
16850 (continue_one_thread): Likewise.
16852 (do_child_fetch_inferior_registers): Move to ...
16853 * win32-i386-low.c: ... here, and rename to ...
16854 (do_fetch_inferior_registers): ... this.
16855 * win32-low.c (child_fetch_inferior_registers):
16856 Go through the low target.
16857 (do_child_store_inferior_registers): Use regptr.
16858 (strwinerror): New function.
16859 (win32_create_inferior): Handle Windows CE.
16860 Use strwinerror instead of strerror on Windows error
16861 codes. Add program to the error output.
16862 Don't close the main thread handle on Windows CE.
16863 (win32_attach): Use coredll.dll on Windows CE.
16864 (win32_kill): Close current process and current
16866 (win32_detach): Use coredll.dll on Windows CE.
16867 (win32_resume): Let low target handle debug registers, and
16869 (handle_exception): Add/Remove initial breakpoint. Avoid
16870 non-existant WSTOPSIG on Windows CE.
16871 (win32_read_inferior_memory): Cast to remove warning.
16872 (win32_arch_string): Go through the low target.
16873 (initialize_low): Call set_breakpoint_data with the low
16874 target's breakpoint.
16875 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16876 FOP_REGNUM, mappings): Move to ...
16877 * win32-i386-low.c: ... here.
16878 * win32-low.c (win32_thread_info): Move to ...
16879 * win32-low.h: ... here.
16880 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16881 win32-arm-low.c and wincecompat.c.
16882 (all:): Add $EXEEXT.
16883 (install-only:): Likewise.
16884 (gdbserver:): Likewise.
16885 (gdbreplay:): Likewise.
16886 * config.in: Regenerate.
16887 * configure: Regenerate.
16889 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16891 * win32-low.c: Rename typedef thread_info to
16892 win32_thread_info throughout.
16894 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16896 * win32-i386-low.c: Rename to ...
16897 * win32-low.c: ... this.
16898 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16899 * Makefile.in: Likewise.
16901 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16903 * remote-utils.c (monitor_output): Constify msg parameter.
16904 * server.h (monitor_output): Likewise.
16905 * win32-i386-low.c (handle_output_debug_string): New.
16906 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16907 handle_output_debug_string.
16908 (get_child_debug_event): Likewise.
16910 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16912 * server.c (main): Correct strtoul check.
16914 2007-03-27 Jon Ringle <jon@ringle.org>
16916 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16918 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16920 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16922 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16924 * terminal.h: Check HAVE_SGTTY_H.
16926 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16928 * remote-utils.c (remote_open): Print out the assigned port number.
16930 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16932 * remote-utils.c (monitor_output): New function.
16933 * server.c (debug_threads): Define here.
16934 (monitor_show_help): New function.
16935 (handle_query): Handle qRcmd.
16936 (main): Do not handle 'd' packet.
16937 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16938 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16941 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16943 * Makefile.in (EXEEXT): New.
16944 (clean): Use $(EXEEXT).
16946 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16948 * target.h (target_ops): Rename send_signal to request_interrupt,
16949 and remove enum target_signal parameter.
16950 * linux-low.c (linux_request_interrupt): Rename from
16951 linux_send_signal, and always send SIGINT.
16952 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16953 and always send SIGINT.
16954 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16956 (input_interrupt): Likewise.
16958 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16960 * server.c (get_features_xml): Check if target implemented
16962 * win32-i386-low.c (win32_arch_string): New.
16963 (win32_target_ops): Add win32_arch_string as arch_string member.
16965 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16967 * spu-low.c (spu_arch_string): New.
16968 (spu_target_ops): Add spu_arch_string.
16970 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16972 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16973 * configure.ac: Do not check for terminal.h.
16974 * configure, config.in: Regenerated.
16976 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16978 * Makefile.in (OBS): Add $(XML_BUILTIN).
16979 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16981 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16982 (arm-with-iwmmxt.c): New.
16983 * config.in, configure: Regenerate.
16984 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16985 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16986 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16987 (arm*-*-linux*): Add iWMMXt and regset support.
16988 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16989 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16990 (arm_store_wmmxregset, target_regsets): New.
16991 * server.c (get_features_xml): Take annex argument. Check builtin
16993 (handle_query): Handle multiple annexes.
16995 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16997 * remote-utils.c [USE_WIN32API] (read, write): Define.
16998 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17001 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17003 * linux-i386-low.c (the_low_target): Set arch_string.
17004 * linux-x86-64-low.c (the_low_target): Likewise.
17005 * linux-low.c (linux_arch_string): New.
17006 (linux_target_ops): Add it.
17007 * linux-low.h (struct linux_target_ops): Add arch_string.
17008 * server.c (write_qxfer_response): Use const void * for DATA.
17009 (get_features_xml): New.
17010 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17011 * target.h (struct target_ops): Add arch_string method.
17013 2007-01-03 Denis Pilat <denis.pilat@st.com>
17014 Daniel Jacobowitz <dan@codesourcery.com>
17016 * linux-low.c (linux_kill): Handle being called with no threads.
17017 * win32-i386-low.c (win32_kill): Likewise.
17018 (get_child_debug_event): Clear current_process_handle.
17020 2006-12-30 Denis PILAT <denis.pilat@st.com>
17021 Daniel Jacobowitz <dan@codesourcery.com>
17023 * remote-utils.c (remote_open): Check the type of specified
17024 serial port devices before opening them.
17025 * server.c (main): Kill the inferior if an error occurs during
17026 the first remote_open.
17028 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17030 * README: Update supported targets.
17032 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17034 * Makefile.in (clean): Remove reg-mips64.c.
17035 (reg-mips64.c, reg-mips64.o): New rules.
17036 * configure.srv: Handle mips64. Include regset support for mips.
17037 * linux-mips-low.c (union mips_register): New.
17038 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17039 (mips_breakpoint, mips_breakpoint_at): Use int.
17040 (mips_collect_register, mips_supply_register)
17041 (mips_collect_register_32bit, mips_supply_register_32bit)
17042 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17043 (mips_store_fpregset, target_regsets): New.
17044 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17046 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17048 * configure.srv: Add target "spu*-*-*".
17049 * Makefile.in (clean): Remove reg-spu.c.
17050 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17051 * spu-low.c: New file.
17053 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17055 * configure.ac: Correct td_thr_tls_get_addr test.
17056 * configure: Regenerated.
17058 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17060 * linux-low.c (linux_wait_for_event): Reformat. Use the
17061 pass_signals array.
17062 * remote-utils.c (decode_address_to_semicolon): New.
17063 * server.c (pass_signals, handle_general_set): New.
17064 (handle_query): Mention QPassSignals for qSupported.
17065 (main): Call handle_general_set.
17066 * server.h (pass_signals, decode_address_to_semicolon): New.
17068 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17070 * server.c (handle_query): Correct error handling for read_auxv.
17072 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17074 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17075 and srv_linux_thread_db to yes.
17076 * linux-s390-low.c (s390_fill_gregset): New function.
17077 (target_regsets): Define data structure.
17079 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17081 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17082 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17083 * config.in, configure: Regenerated.
17084 * inferiors.c (gdb_id_to_thread): New function.
17085 (gdb_id_to_thread_id): Use it.
17086 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17087 * linux-low.h (struct process_info): Add th member.
17088 (thread_db_get_tls_address): New prototype.
17089 * remote-utils.c (decode_address): Make non-static.
17090 * server.c (handle_query): Handle qGetTLSAddr.
17091 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17092 * target.h (struct target_ops): Add get_tls_address.
17093 * thread-db.c (maybe_attach_thread): Save the thread handle.
17094 (thread_db_get_tls_address): New.
17096 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17098 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17099 (linux_resume_one_process): Take a siginfo_t *. Update all
17100 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17101 (struct pending_signals): Add a siginfo_t.
17102 (linux_wait_for_process): Always set last_status.
17103 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17104 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17105 * linux-low.h (struct process_info): Add last_status.
17107 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17109 * remote-utils.c (try_rle): New function.
17110 (putpkt_binary): Use it.
17112 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17114 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17115 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17116 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17117 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17118 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17121 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17123 * server.c (terminal_fd): New variable.
17124 (old_foreground_pgrp): Likewise.
17125 (restore_old_foreground_pgrp): New function.
17126 (start_inferior): Record the terminal file descriptor in terminal_fd
17127 and its original foreground group in old_foreground_pgrp. Register
17128 restore_old_foreground_pgrp with atexit().
17130 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17132 * server.c (handle_query): Correct qPart to qXfer.
17134 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17136 * configure.ac: Check for more headers which are missing on
17137 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17138 * configure.srv: Add Cygwin and mingw32.
17139 * remote-utils.c: Don't include headers unconditionally which
17140 are missing on mingw32. Include <winsock.h> for mingw32.
17141 (remote_open): Adjust for mingw32 support. Flush
17142 standard error after writing to it.
17143 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17144 (unblock_async_io, enable_async_io, disable_async_io)
17145 (readchar, getpkt): Update for Winsock support.
17146 (prepare_resume_reply): Expect a protocol signal number.
17147 * server.c: Disable <sys/wait.h> on mingw32.
17148 (start_inferior): Adjust for mingw32 support. Flush
17149 standard error after writing to it.
17150 (attach_inferior): Likewise. Use protocol signal
17152 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17154 * win32-i386-low.c: New file.
17155 * Makefile.in (XM_CLIBS): Set.
17156 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17157 (win32-i386-low.o): New dependency rule.
17158 * linux-low.c (linux_wait): Use target signal numbers.
17159 * target.h (struct target_ops): Doc fix.
17160 * server.h (target_signal_to_name): New prototype.
17161 * gdbreplay.c: Don't include headers unconditionally which
17162 are missing on mingw32. Include <winsock.h> for mingw32.
17163 (remote_close, remote_open): Adjust for Winsock support.
17164 * configure, config.in: Regenerated.
17166 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17168 * server.c (decode_xfer_read, write_qxfer_response): New.
17169 (handle_query): Take a packet length argument. Handle
17170 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17171 the qSupported response.
17172 (main): Update call to handle_query.
17174 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17176 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17177 (putpkt_binary): Renamed from putpkt and adjusted for binary
17179 (putpkt): New wrapper for putpkt_binary.
17180 (readchar): Don't mask off the high bit.
17181 (decode_X_packet): New function.
17182 * server.c (main): Call putpkt_binary if a handler sets the packet
17183 length. Save the length of the incoming packet. Handle 'X'.
17184 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17186 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17188 * server.c (handle_query): Handle qSupported.
17190 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17192 * remote-utils.c (all_symbols_looked_up): New variable.
17193 (look_up_one_symbol): Check it.
17194 * server.h (look_up_one_symbol): New declaration.
17195 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17197 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17199 * Makefile.in (linux-arm-low.o): Update dependencies.
17200 * linux-arm-low.c: Include "gdb_proc_service.h".
17201 (PTRACE_GET_THREAD_AREA): Define.
17202 (ps_get_thread_area): New function.
17204 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17206 * configure.srv (m68k*-*-uclinux*): New target.
17207 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17208 (linux_resume_one_process): Remove extraneous cast.
17209 (linux_read_offsets): New.
17210 (linux_target_op): Add linux_read_offsets on mmuless systems.
17211 * server.c (handle_query): Add qOffsets logic.
17212 * target.h (struct target_ops): Add read_offsets.
17214 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17216 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17217 (PTRACE_GET_THREAD_AREA): Define.
17218 (ps_get_thread_area): New function.
17219 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17220 (linux-x86-64-low.o): Update.
17222 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17224 * configure.ac: Remove checks for prfpregset_t.
17225 * gdb_proc_service.h: New file.
17226 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17227 new "gdb_proc_service.h".
17228 * proc-service.c: Likewise.
17229 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17230 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17231 * Makefile.in (gdb_proc_service_h): Updated.
17232 * configure, config.in: Regenerated.
17234 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17236 * remote-utils.c (prepare_resume_reply): Move declaration
17237 of gdb_id_from_wait to the top of the block.
17239 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17241 * linux-low.c (regsets_store_inferior_registers): Read the regset
17242 from the target before filling it.
17244 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17246 * server.c (attach_inferior): Return SIGTRAP for a successful
17249 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17251 * Makefile.in (OBS): Add version.o.
17252 (STAGESTUFF): Delete.
17253 (version.o): Add dependencies.
17254 (version.c): Replace rule.
17255 (clean): Remove version.c.
17256 * server.c (gdbserver_version): New.
17257 (gdbserver_usage): Use printf.
17258 (main): Handle --version and --help.
17259 * server.h (version, host_name): Add declarations.
17261 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17273 * linux-x86-64-low.c:
17275 * linux-s390-low.c:
17276 * linux-ppc64-low.c:
17278 * linux-mips-low.c:
17279 * linux-m68k-low.c:
17280 * linux-m32r-low.c:
17283 * linux-ia64-low.c:
17284 * linux-i386-low.c:
17285 * linux-crisv32-low.c:
17297 * gdbserver.1: Add (C) after Copyright. Update the FSF
17300 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17302 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17303 (arm_breakpoint_at): Recognize both breakpoints.
17304 (the_low_target): Use the correct breakpoint instruction.
17306 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17308 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17309 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17310 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17311 (the_low_target): Update.
17313 2005-10-25 Andreas Schwab <schwab@suse.de>
17315 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17317 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17318 (ia64_num_regs): Reduce to 462.
17320 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17322 * acinclude.m4: Correct quoting.
17323 * aclocal.m4: Regenerated.
17325 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17326 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17327 (thread_db_init): Call thread_db_err_str.
17328 * configure.ac: Check for TD_VERSION.
17329 * config.in, configure: Regenerated.
17331 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17333 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17335 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17337 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17338 is not available. Define HAVE_PTRACE_GETREGS if it is.
17339 * config.in, configure: Regenerated.
17340 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17341 * linux-i386-low.c, linux-m68k-low.c: Update to use
17342 HAVE_PTRACE_GETREGS.
17343 * linux-low.c (regsets_fetch_inferior_registers)
17344 (regsets_store_inferior_registers): Only return 0 if we processed
17346 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17347 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17349 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17351 * inferiors.c (struct thread_info): Add gdb_id.
17352 (add_thread): Add gdb_id argument.
17353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17354 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17355 calls to add_thread.
17356 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17357 * server.c (handle_query): Use thread_to_gdb_id.
17358 (handle_v_cont, main): Use gdb_id_to_thread_id.
17359 * server.h (add_thread): Update prototype.
17360 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17363 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17365 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17366 left-padded registers.
17367 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17368 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17370 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17372 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17373 * configure: Regenerate.
17374 * config.in: Regenerate.
17375 * server.h (NEED_DECLARATION_STRERROR):
17376 Replace with !HAVE_DECL_STRERROR.
17378 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17380 * linux-low.c (linux_wait, linux_send_signal): Don't test
17381 an unsigned long variable for > 0 if it could be MAX_ULONG.
17382 * server.c (myresume): Likewise.
17383 * target.c (set_desired_inferior): Likewise.
17385 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17387 * configure.ac: Simplify and improve check for socklen_t.
17388 * configure, config.in: Regenerate.
17390 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17392 * acconfig.h: Remove.
17393 * configure.ac: Add a test for socklen_t. Use three-argument
17394 AC_DEFINE throughout.
17395 * config.in: Regenerated using autoheader 2.59.
17396 * configure: Regenerated.
17398 * gdbreplay.c (socklen_t): Provide a default.
17399 (remote_open): Use socklen_t.
17400 * remote-utils.c (socklen_t): Provide a default.
17401 (remote_open): Use socklen_t.
17402 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17405 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17407 * linux-low.c (linux_read_memory, linux_write_memory)
17408 (linux_read_auxv): Likewise.
17409 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17410 (check_mem_write): Likewise.
17411 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17413 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17414 (registers_from_string, register_data): Likewise.
17415 * server.c (handle_query, main): Likewise.
17416 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17417 (decode_M_packet): Likewise.
17418 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17419 * target.h (struct target_ops): Update read_memory, write_memory,
17421 (read_inferior_memory, write_inferior_memory): Update.
17422 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17423 to unsigned char *.
17424 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17425 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17426 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17427 linux-s390-low.c, linux-sh-low.c: Update for changes in
17428 read_inferior_memory and the_low_target->breakpoint.
17430 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17432 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17433 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17434 * configure.srv: Add powerpc64-*-linux*.
17435 * linux-ppc64-low.c: New file.
17437 2005-05-23 Orjan Friberg <orjanf@axis.com>
17439 * linux-cris-low.c: New file with support for CRIS.
17440 * linux-crisv32-low.c: Ditto for CRISv32.
17441 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17442 (clean): Add reg-cris.c and reg-crisv32.c.
17443 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17444 reg-crisv32.o, and reg-crisv32.c to make rules.
17445 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17446 recognized targets.
17448 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17450 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17451 of sizeof (PTRACE_XFER_TYPE).
17452 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17454 2005-05-12 Orjan Friberg <orjanf@axis.com>
17456 * target.h (struct target_ops): Add insert_watchpoint,
17457 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17458 pointers for hardware watchpoint support.
17459 * linux-low.h (struct linux_target_ops): Ditto.
17460 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17461 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17462 to linux_target_ops.
17463 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17465 * server.c (main): Recognize 'Z' and 'z' packets.
17467 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17469 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17470 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17471 (the_low_target): Add new members.
17473 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17475 * proc-service.c (ps_lgetregs): Search all_processes instead of
17478 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17480 * server.c (start_inferior): Change return type to int.
17481 (attach_inferior): Change sigptr to int *.
17482 (handle_v_cont, handle_v_requests): Change signal to int *.
17483 (main): Change signal to int.
17485 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17487 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17488 * configure.srv: Add m32r*-*-linux*.
17489 * linux-m32r-low.c: New file.
17491 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17493 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17495 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17497 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17498 Take unsigned long arguments for PIDs.
17499 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17500 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17501 (wait_for_sigstop, linux_resume_one_process)
17502 (regsets_fetch_inferior_registers, linux_send_signal)
17503 (linux_read_auxv): Likewise. Update the types of variables holding
17504 PIDs. Update format string specifiers.
17505 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17506 * remote-utils.c (prepare_resume_reply): Likewise.
17507 * server.c (cont_thread, general_thread, step_thread)
17508 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17510 (handle_query): Update format specifiers.
17511 (handle_v_cont, main): Use strtoul for thread IDs.
17512 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17513 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17514 (general_thread, step_thread, thread_from_wait)
17515 (old_thread_from_wait): Update.
17516 * target.h (struct thread_resume): Use unsigned long for THREAD.
17517 (struct target_ops): Use unsigned long for arguments to attach and
17520 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17522 * acinclude.m4: Include bfd/bfd.m4 directly.
17523 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17524 <agriffis@toolchain.org>.
17525 * aclocal.m4, configure: Regenerated.
17527 2005-01-07 Andrew Cagney <cagney@gnu.org>
17529 * configure.ac: Rename configure.in, require autoconf 2.59.
17530 * configure: Re-generate.
17532 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17534 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17535 LIBS when finished.
17536 * aclocal.m4: Regenerated.
17537 * configure: Regenerated.
17539 2004-11-21 Andreas Schwab <schwab@suse.de>
17541 * linux-m68k-low.c (m68k_num_gregs): Define.
17542 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17543 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17544 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17545 (m68k_breakpoint_at): New. Add to the_low_target.
17547 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17548 srv_linux_thread_db to yes.
17550 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17552 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17553 (ARCH_SET_FS): Likewise.
17554 (ARCH_GET_FS): Likewise.
17555 (ARCH_GET_GS): Likewise.
17557 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17559 * linux-i386-low.c (ps_get_thread_area): New.
17560 * linux-x86-64-low.c (ps_get_thread_area): New.
17561 * linux-low.c: Include <sys/syscall.h>.
17562 (linux_kill_one_process): Don't kill the first thread here.
17563 (linux_kill): Kill the first thread here.
17564 (kill_lwp): New function.
17565 (send_sigstop, linux_send_signal): Use it.
17566 * proc-service.c: Clean up #ifdefs.
17567 (fpregset_info): Delete.
17568 (ps_lgetregs): Update and enable implementation.
17569 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17571 * remote-utils.c (struct sym_cache, symbol_cache): New.
17572 (input_interrupt): Print a clearer message.
17573 (async_io_enabled): New variable.
17574 (enable_async_io, disable_async_io): Use it. Update comments.
17575 (look_up_one_symbol): Use the symbol cache.
17576 * thread-db.c (thread_db_look_up_symbols): New function.
17577 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17579 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17581 * configure.in: Test for -rdynamic.
17582 * configure: Regenerated.
17583 * Makefile (INTERNAL_LDFLAGS): New.
17584 (gdbserver, gdbreplay): Use it.
17586 2004-09-02 Andrew Cagney <cagney@gnu.org>
17588 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17590 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17592 * linux-low.c (linux_wait): Clear all_processes list also.
17594 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17596 * linux-low.c: Include <errno.h>. Remove extern declaration of
17599 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17601 * gdbreplay.c, server.h, utils.c: Update copyright years.
17603 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17605 * server.c (main): Print child status or termination signal from
17606 variable 'signal', not 'sig'.
17608 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17610 * linux-low.c (linux_read_memory): Change return type to
17611 int. Check for and return error from ptrace().
17612 * target.c (read_inferior_memory): Change return type to int. Pass
17613 back return status from the_target->read_memory().
17614 * target.h (struct target_ops): Adapt *read_memory() prototype.
17616 (read_inferior_memory): Adapt prototype.
17617 * server.c (main): Return an error packet if
17618 read_inferior_memory() returns an error.
17620 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17622 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17623 Unify with other clean targets.
17625 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17627 * server.c (handle_v_cont): Call set_desired_inferior.
17629 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17631 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17633 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17635 * linux-low.c (linux_wait): Unblock async I/O.
17636 (linux_resume): Block and enable async I/O.
17637 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17638 * server.h (block_async_io, unblock_async_io): Add prototypes.
17640 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17642 * remote-utils.c (remote_open): Print a status notice after
17643 opening a TCP port.
17644 * server.c (attach_inferior): Print a status notice after
17647 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17649 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17651 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17653 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17655 * server.c, target.h: Update copyright years.
17657 2004-02-25 Roland McGrath <roland@redhat.com>
17659 * target.h (struct target_ops): New member `read_auxv'.
17660 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17661 * linux-low.c (linux_read_auxv): New function.
17662 (linux_target_ops): Initialize `read_auxv' member to that.
17664 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17666 Committed by Jim Blandy <jimb@redhat.com>.
17668 * linux-s390-low.c (s390_num_regs): Update.
17669 (s390_regmap): Remove control registers. Use __s390x__ predefine
17670 instead of GPR_SIZE to distiguish s390 and s390x targets.
17672 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17674 * linux-low.c: Update copyright year.
17675 (check_removed_breakpoint): Clear pending_is_breakpoint.
17676 (linux_set_resume_request, linux_queue_one_thread)
17677 (resume_status_pending_p): New functions.
17678 (linux_continue_one_thread): Use process->resume.
17679 (linux_resume): Only resume threads if there are no pending events.
17680 * linux-low.h (struct process_info): Add resume request
17683 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17685 * regcache.c (new_register_cache): Clear the allocated register
17686 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17688 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17690 * linux-low.c (linux_resume): Take a struct thread_resume *
17692 (linux_wait): Update call.
17693 (resume_ptr): New static variable.
17694 (linux_continue_one_thread): Renamed from
17695 linux_continue_one_process. Use resume_ptr.
17696 (linux_resume): Use linux_continue_one_thread.
17697 * server.c (handle_v_cont, handle_v_requests): New functions.
17698 (myresume): New function.
17699 (main): Handle 'v' case.
17700 * target.h (struct thread_resume): New type.
17701 (struct target_ops): Change argument of "resume" to struct
17703 (myresume): Delete macro.
17705 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17707 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17708 (uninstall): Support DESTDIR.
17710 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17712 * configure.srv: Add xscale*linux copy of arm*linux entry.
17714 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17716 * linux-arm-low.c (arm_reinsert_addr): New function.
17717 (the_low_target): Add arm_reinsert_addr.
17719 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17721 * mem-break.c: Remove whitespace at end of file.
17723 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17725 * configure.in: Check whether we need to prototype strerror.
17726 * server.h: Optionally prototype strerror.
17727 * gdbreplay.c (perror_with_name): Use strerror.
17728 * linux-low.c (linux_attach_lwp): Use strerror.
17729 * utils.c (perror_with_name): Use strerror.
17730 * config.in, configure: Regenerated.
17732 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17734 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17735 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17737 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17739 * Makefile.in (SFILES): Update.
17740 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17741 low-sun3.c: Remove files.
17743 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17745 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17746 (linux_detach_one_process, linux_detach): New functions.
17747 (linux_target_ops): Add linux_detach.
17748 * server.c (main): Handle 'D' packet.
17749 * target.h (struct target_ops): Add "detach" member.
17750 (detach_inferior): Define.
17752 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17754 From Kelley Cook <kelleycook@wideopenwest.com>:
17755 * configure.srv: Accept i[34567]86 variants.
17757 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17759 * linux-low.c (linux_wait_for_event): Correct comment typos.
17760 (linux_resume_one_process): Call check_removed_breakpoint.
17761 (linux_send_signal): New function.
17762 (linux_target_ops): Add linux_send_signal.
17763 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17765 * target.h (struct target_ops): Add send_signal.
17767 2003-05-29 Jim Blandy <jimb@redhat.com>
17769 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17770 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17771 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17772 away part of the register's value.
17774 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17776 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17777 (linux_wait_for_event, linux_init_signals): Likewise.
17779 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17781 * configure.in: Check for stdlib.h.
17782 * configure: Regenerated.
17783 * config.in: Regenerated.
17785 2003-01-04 Andreas Schwab <schwab@suse.de>
17787 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17789 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17791 * Makefile.in: Remove obsolete code.
17793 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17795 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17796 defined(PT_FPR0_HI).
17798 2002-11-17 Stuart Hughes <seh@zee2.com>
17800 * linux-arm-low.c (arm_num_regs): Increase.
17801 (arm_regmap): Include status register.
17803 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17805 * linux-low.c (register_addr): Remove incorrect -1 check.
17807 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17809 * linux-low.c (linux_create_inferior): Call setpgid. Return
17811 (unstopped_p, linux_signal_pid): Remove.
17812 (linux_target_ops): Remove linux_signal_pid.
17813 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17814 global instead of target method.
17815 * target.h (struct target_ops): Remove signal_pid. Update comment
17816 for create_inferior.
17817 * server.c (signal_pid): New variable.
17818 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17819 gdbserver. Set the child to be the foreground process group.
17820 (attach_inferior): Set signal_pid.
17822 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17824 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17826 2002-08-20 Jim Blandy <jimb@redhat.com>
17828 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17831 2002-08-01 Andrew Cagney <cagney@redhat.com>
17833 * Makefile.in: Make chill references obsolete.
17835 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17837 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17838 * configure: Regenerate.
17839 * config.in: Regenerate.
17841 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17843 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17844 (perror_with_name, remote_close, remote_open, expect, play): Static.
17846 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17848 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17849 byte offsets instead of an array of indexes.
17850 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17852 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17854 * regcache.c: Add comment.
17856 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17858 * thread-db.c: New file.
17859 * proc-service.c: New file.
17860 * acinclude.m4: New file.
17861 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17862 proc-service.o, and thread-db.o.
17863 (linux-low.o): Add USE_THREAD_DB.
17864 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17865 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17866 * aclocal.m4: Regenerated.
17867 * config.in: Regenerated.
17868 * configure: Regenerated.
17869 * configure.in: Check for proc_service.h, sys/procfs.h,
17870 thread_db.h, and linux/elf.h headrs.
17871 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17872 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17873 Check for -lthread_db and thread support.
17874 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17875 PowerPC, and SuperH.
17876 * i387-fp.c: Constify arguments.
17877 * i387-fp.h: Likewise.
17878 * inferiors.c: (struct thread_info): Renamed from
17879 `struct inferior_info'. Remove PID member. Use generic inferior
17880 list header. All uses updated.
17881 (inferiors, signal_pid): Removed.
17882 (all_threads): New variable.
17883 (get_thread): Define.
17884 (add_inferior_to_list): New function.
17885 (for_each_inferior): New function.
17886 (change_inferior_id): New function.
17887 (add_inferior): Removed.
17888 (remove_inferior): New function.
17889 (add_thread): New function.
17890 (free_one_thread): New function.
17891 (remove_thread): New function.
17892 (clear_inferiors): Use for_each_inferior and free_one_thread.
17893 (find_inferior): New function.
17894 (find_inferior_id): New function.
17895 (inferior_target_data): Update argument type.
17896 (set_inferior_target_data): Likewise.
17897 (inferior_regcache_data): Likewise.
17898 (set_inferior_regcache_data): Likewise.
17899 * linux-low.c (linux_bp_reinsert): Remove.
17900 (all_processes, stopping_threads, using_thrads)
17901 (struct pending_signals, debug_threads, pid_of): New.
17902 (inferior_pid): Replace with macro.
17903 (struct inferior_linux_data): Remove.
17904 (get_stop_pc, add_process): New functions.
17905 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17906 Use add_process and add_thread.
17907 (linux_attach_lwp): New function, based on old linux_attach. Use
17908 add_process and add_thread. Set stop_expected for new threads.
17909 (linux_attach): New function.
17910 (linux_kill_one_process): New function.
17911 (linux_kill): Kill all LWPs.
17912 (linux_thread_alive): Use find_inferior_id.
17913 (check_removed_breakpoints, status_pending_p): New functions.
17914 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17915 Update. Use WNOHANG. Wait for cloned processes also. Update process
17916 struct for the found process.
17917 (linux_wait_for_event): New function.
17918 (linux_wait): Use it. Support LWPs.
17919 (send_sigstop, wait_for_sigstop, stop_all_processes)
17920 (linux_resume_one_process, linux_continue_one_process): New functions.
17921 (linux_resume): Support LWPs.
17922 (REGISTER_RAW_SIZE): Remove.
17923 (fetch_register): Use register_size instead. Call supply_register.
17924 (usr_store_inferior_registers): Likewise. Call collect_register.
17925 Fix recursive case.
17926 (regsets_fetch_inferior_registers): Improve error message.
17927 (regsets_store_inferior_registers): Add debugging.
17928 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17929 (unstopped_p, linux_signal_pid): New functions.
17930 (linux_target_ops): Add linux_signal_pid.
17931 (linux_init_signals): New function.
17932 (initialize_low): Call it. Initialize using_threads.
17933 * regcache.c (inferior_regcache_data): Add valid
17935 (get_regcache): Fetch registers lazily. Add fetch argument
17936 and update all callers.
17937 (regcache_invalidate_one, regcache_invalidate): New
17939 (new_register_cache): Renamed from create_register_cache.
17940 Return the new regcache.
17941 (free_register_cache): Change argument to a void *.
17942 (registers_to_string, registers_from_string): Call get_regcache
17943 with fetch flag set.
17944 (register_data): Make static. Pass fetch flag to get_regcache.
17945 (supply_register): Call get_regcache with fetch flag clear.
17946 (collect_register): Call get_regcache with fetch flag set.
17947 (collect_register_as_string): New function.
17948 * regcache.h: Update.
17949 * remote-utils.c (putpkt): Flush after debug output and use
17951 Handle input interrupts while waiting for an ACK.
17952 (input_interrupt): Use signal_pid method.
17953 (getpkt): Flush after debug output and use stderr.
17954 (outreg): Use collect_register_as_string.
17955 (new_thread_notify, dead_thread_notify): New functions.
17956 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17957 and general_thread.
17958 (look_up_one_symbol): Flush after debug output.
17959 * server.c (step_thread, server_waiting): New variables.
17960 (start_inferior): Don't use signal_pid. Update call to mywait.
17961 (attach_inferior): Update call to mywait.
17962 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17963 (main): Don't fetch/store registers explicitly. Use
17964 set_desired_inferior. Support proposed ``Hs'' packet. Update
17966 * server.h: Update.
17967 (struct inferior_list, struct_inferior_list_entry): New.
17968 * target.c (set_desired_inferior): New.
17969 (write_inferior_memory): Constify.
17970 (mywait): New function.
17971 * target.h: Update.
17972 (struct target_ops): New signal_pid method.
17973 (mywait): Removed macro, added prototype.
17975 * linux-low.h (regset_func): Removed.
17976 (regset_fill_func, regset_store_func): New.
17977 (enum regset_type): New.
17978 (struct regset_info): Add type field. Use new operation types.
17979 (struct linux_target_ops): stop_pc renamed to get_pc.
17980 Add decr_pc_after_break and breakpoint_at.
17981 (get_process, get_thread_proess, get_process_thread)
17982 (strut process_info, all_processes, linux_attach_lwp)
17983 (thread_db_init): New.
17985 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17986 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17987 (the_low_target): Add new members.
17988 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17989 (i386_store_fpxregset): Constify.
17990 (target_regsets): Add new kind identifier.
17991 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17992 (i386_set_pc): Add debugging.
17993 (i386_breakpoint_at): New function.
17994 (the_low_target): Add new members.
17995 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17996 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17997 (mips_breakpoint_at): New.
17998 (the_low_target): Add new members.
17999 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18000 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18001 (the_low_target): Add new members.
18002 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18003 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18004 (the_low_target): Add new members.
18005 * linux-x86-64-low.c (target_regsets): Add new kind
18008 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18010 From Martin Pool <mbp@samba.org>:
18011 * server.c (gdbserver_usage): New function.
18014 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18016 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18017 stop_at -> stop_pc.
18019 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18021 * Makefile.in: Remove obsolete code.
18023 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18025 * linux-low.c (regsets_fetch_inferior_registers),
18026 (regsets_store_inferior_registers): Removed cast to int from
18028 * regcache.h: Added declaration of struct inferior_info.
18030 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18032 * inferiors.c (struct inferior_info): Add regcache_data.
18033 (add_inferior): Call create_register_cache.
18034 (clear_inferiors): Call free_register_cache.
18035 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18036 * regcache.c (struct inferior_regcache_data): New.
18037 (registers): Remove.
18038 (get_regcache): New function.
18039 (create_register_cache, free_register_cache): New functions.
18040 (set_register_cache): Don't initialize the register cache here.
18041 (registers_to_string, registers_from_string, register_data): Call
18043 * regcache.h: Add prototypes.
18044 * server.h: Likewise.
18046 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18048 * mem-break.c: New file.
18049 * mem-break.h: New file.
18050 * Makefile.in: Add mem-break.o rule; update server.h
18052 * inferiors.c (struct inferior_info): Add target_data
18054 (clear_inferiors): Free target_data member if set.
18055 (inferior_target_data, set_inferior_target_data): New functions.
18056 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18057 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18058 * linux-low.c (linux_bp_reinsert): New variable.
18059 (struct inferior_linux_data): New.
18060 (linux_create_inferior): Use set_inferior_target_data.
18061 (linux_attach): Likewise. Call add_inferior.
18062 (linux_wait_for_one_inferior): New function.
18063 (linux_wait): Call it.
18064 (linux_write_memory): Add const.
18065 (initialize_low): Call set_breakpoint_data.
18066 * linux-low.h (struct linux_target_ops): Add breakpoint
18068 * server.c (attach_inferior): Remove extra add_inferior
18070 * server.h: Include mem-break.h. Update inferior.c
18072 * target.c (read_inferior_memory)
18073 (write_inferior_memory): New functions.
18074 * target.h (read_inferior_memory)
18075 (write_inferior_memory): Change macros to prototypes.
18076 (struct target_ops): Update comments. Add const to write_memory
18079 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18081 * linux-low.c (usr_store_inferior_registers): Support
18082 registers which are allowed to fail to store.
18083 * linux-low.h (linux_target_ops): Likewise.
18084 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18085 (ppc_cannot_store_register): FPSCR may not be storable.
18087 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18089 * server.h: Include <string.h> if HAVE_STRING_H.
18090 * ChangeLog: Correct paths in last ChangeLog entry.
18092 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18094 * linux-low.h: Remove obsolete prototypes.
18095 (struct linux_target_ops): New.
18096 (extern the_low_target): New.
18097 * linux-low.c (num_regs, regmap): Remove declarations.
18098 (register_addr): Use the_low_target explicitly.
18099 (fetch_register): Likewise.
18100 (usr_fetch_inferior_registers): Likewise.
18101 (usr_store_inferior_registers): Likewise.
18102 * linux-arm-low.c (num_regs): Remove.
18103 (arm_num_regs): Define.
18104 (arm_regmap): Renamed from regmap, made static.
18105 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18107 (arm_cannot_store_register): Renamed from cannot_store_register,
18109 (the_low_target): New.
18110 * linux-i386-low.c (num_regs): Remove.
18111 (i386_num_regs): Define.
18112 (i386_regmap): Renamed from regmap, made static.
18113 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18115 (i386_cannot_store_register): Renamed from cannot_store_register,
18117 (the_low_target): New.
18118 * linux-ia64-low.c (num_regs): Remove.
18119 (ia64_num_regs): Define.
18120 (ia64_regmap): Renamed from regmap, made static.
18121 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18123 (ia64_cannot_store_register): Renamed from cannot_store_register,
18125 (the_low_target): New.
18126 * linux-m68k-low.c (num_regs): Remove.
18127 (m68k_num_regs): Define.
18128 (m68k_regmap): Renamed from regmap, made static.
18129 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18131 (m68k_cannot_store_register): Renamed from cannot_store_register,
18133 (the_low_target): New.
18134 * linux-mips-low.c (num_regs): Remove.
18135 (mips_num_regs): Define.
18136 (mips_regmap): Renamed from regmap, made static.
18137 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18139 (mips_cannot_store_register): Renamed from cannot_store_register,
18141 (the_low_target): New.
18142 * linux-ppc-low.c (num_regs): Remove.
18143 (ppc_num_regs): Define.
18144 (ppc_regmap): Renamed from regmap, made static.
18145 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18147 (ppc_cannot_store_register): Renamed from cannot_store_register,
18149 (the_low_target): New.
18150 * linux-s390-low.c (num_regs): Remove.
18151 (s390_num_regs): Define.
18152 (s390_regmap): Renamed from regmap, made static.
18153 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18155 (s390_cannot_store_register): Renamed from cannot_store_register,
18157 (the_low_target): New.
18158 * linux-sh-low.c (num_regs): Remove.
18159 (sh_num_regs): Define.
18160 (sh_regmap): Renamed from regmap, made static.
18161 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18163 (sh_cannot_store_register): Renamed from cannot_store_register,
18165 (the_low_target): New.
18166 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18167 (the_low_target): New.
18169 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18171 * Makefile.in: Add stamp-h target.
18172 * configure.in: Create stamp-h.
18173 * configure: Regenerated.
18175 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18177 * inferiors.c: New file.
18178 * target.c: New file.
18179 * target.h: New file.
18180 * Makefile.in: Add target.o and inferiors.o. Update
18182 * linux-low.c (inferior_pid): New static variable,
18183 moved from server.c.
18184 (linux_create_inferior): Renamed from create_inferior.
18185 Call add_inferior. Return 0 on success instead of a PID.
18186 (linux_attach): Renamed from myattach.
18187 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18188 (linux_thread_alive): Renamed from mythread_alive.
18189 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18191 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18192 (regsets_store_inferior_registers): Correct error message.
18193 Add missing ``return 0''.
18194 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18195 (linux_store_registers): Renamed from store_inferior_registers.
18196 (linux_read_memory): Renamed from read_inferior_memory.
18197 (linux_write_memory): Renamed from write_inferior_memory.
18198 (linux_target_ops): New structure.
18199 (initialize_low): Call set_target_ops ().
18200 * remote-utils.c (unhexify): New function.
18201 (hexify): New function.
18202 (input_interrupt): Send signals to ``signal_pid''.
18203 * server.c (inferior_pid): Remove.
18204 (start_inferior): Update create_inferior call.
18205 (attach_inferior): Call add_inferior.
18206 (handle_query): New function.
18207 (main): Call handle_query for `q' packets.
18208 * server.h: Include "target.h". Remove obsolete prototypes.
18209 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18211 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18213 * Makefile.in: Add WARN_CFLAGS. Update configury
18215 * configure.in: Check for <string.h>
18216 * configure: Regenerate.
18217 * config.in: Regenerate.
18218 * gdbreplay.c: Include needed system headers.
18219 (remote_open): Remove strchr prototype.
18220 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18221 * regcache.c (supply_register): Change buf argument to const void *.
18222 (supply_register_by_name): Likewise.
18223 (collect_register): Change buf argument to void *.
18224 (collect_register_by_name): Likewise.
18225 * regcache.h: Add missing prototypes.
18226 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18227 * server.c (handle_query): New function.
18228 (attached): New static variable, moved out of main.
18229 (main): Quiet longjmp clobber warnings.
18230 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18231 * utils.c (error): Remove NORETURN.