1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's resume op into a method of
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
9 Update the derived classes and callers below.
11 * server.cc (resume): Update.
12 * target.cc (target_stop_and_wait): Update.
13 (target_continue_no_signal): Update.
14 (target_continue): Update.
15 * linux-low.cc (linux_target_ops): Update.
16 (linux_resume): Turn into ...
17 (linux_process_target::resume): ... this.
18 * linux-low.h (class linux_process_target): Update.
19 * lynx-low.cc (lynx_target_ops): Update.
20 (lynx_resume): Turn into ...
21 (lynx_process_target::resume): ... this.
22 * lynx-low.h (class lynx_process_target): Update.
23 * nto-low.cc (nto_target_ops): Update.
24 (nto_resume): Turn into ...
25 (nto_process_target::resume): ... this.
26 * nto-low.h (class nto_process_target): Update.
27 * win32-low.cc (win32_target_ops): Update.
28 (win32_resume): Turn into ...
29 (win32_process_target::resume): ... this.
30 (win32_process_target::detach): Update.
31 (do_initial_child_stuff): Update.
32 * win32-low.h (class win32_process_target): Update.
34 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
36 Turn process_stratum_target's thread_alive op into a method of
39 * target.h (struct process_stratum_target): Remove the target op.
40 (class process_target): Add the target op.
41 (mythread_alive): Update the macro.
43 Update the derived classes and callers below.
45 * linux-low.cc (linux_target_ops): Update.
46 (linux_thread_alive): Turn into ...
47 (linux_process_target::thread_alive): ... this.
48 (wait_for_sigstop): Update.
49 * linux-low.h (class linux_process_target): Update.
50 * lynx-low.cc (lynx_target_ops): Update.
51 (lynx_thread_alive): Turn into ...
52 (lynx_process_target::thread_alive): ... this.
53 * lynx-low.h (class lynx_process_target): Update.
54 * nto-low.cc (nto_target_ops): Update.
55 (nto_thread_alive): Turn into ...
56 (nto_process_target::thread_alive): ... this.
57 * nto-low.h (class nto_process_target): Update.
58 * win32-low.cc (win32_target_ops): Update.
59 (win32_thread_alive): Turn into ...
60 (win32_process_target::thread_alive): ... this.
61 * win32-low.h (class win32_process_target): Update.
63 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
65 Turn process_stratum_target's join op into a method of
68 * target.h (struct process_stratum_target): Remove the target op.
69 (class process_target): Add the target op.
70 (join_inferior): Update the macro.
72 Update the derived classes and callers below.
74 * linux-low.cc (linux_target_ops): Update.
75 (linux_join): Turn into ...
76 (linux_process_target::join): ... this.
77 * linux-low.h (class linux_process_target): Update.
78 * lynx-low.cc (lynx_target_ops): Update.
79 (lynx_join): Turn into ...
80 (lynx_process_target::join): ... this.
81 * lynx-low.h (class lynx_process_target): Update.
82 * nto-low.cc (nto_target_ops): Update.
83 (nto_process_target::join): Define.
84 * nto-low.h (class nto_process_target): Update.
85 * win32-low.cc (win32_target_ops): Update.
86 (win32_join): Turn into ...
87 (win32_process_target::join): ... this.
88 * win32-low.h (class win32_process_target): Update.
90 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
92 Turn process_stratum_target's mourn op into a method of
95 * target.h (struct process_stratum_target): Remove the target op.
96 (class process_target): Add the target op.
98 Update the derived classes and callers below.
100 * target.cc (target_mourn_inferior): Update.
101 * linux-low.cc (linux_target_ops): Update.
102 (linux_mourn): Turn into ...
103 (linux_process_target::mourn): ... this.
104 (handle_extended_wait): Update.
105 (linux_process_target::kill): Update.
106 (linux_process_target::detach): Update.
107 * linux-low.h (class linux_process_target): Update.
108 * lynx-low.cc (lynx_target_ops): Update.
109 (lynx_mourn): Turn into ...
110 (lynx_process_target::mourn): ... this.
111 * lynx-low.h (class lynx_process_target): Update.
112 * nto-low.cc (nto_target_ops): Update.
113 (nto_mourn): Turn into ...
114 (nto_process_target::mourn): ... this.
115 * nto-low.h (class nto_process_target): Update.
116 * win32-low.cc (win32_target_ops): Update.
117 (win32_mourn): Turn into ...
118 (win32_process_target::mourn): ... this.
119 * win32-low.h (class win32_process_target): Update.
121 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
123 Turn process_stratum_target's detach op into a method of
126 * target.h (struct process_stratum_target): Remove the target op.
127 (class process_target): Add the target op.
128 (detach_inferior): Update the macro.
130 Update the derived classes and callers below.
132 * linux-low.cc (linux_target_ops): Update.
133 (linux_detach): Turn into ...
134 (linux_process_target::detach): ... this.
135 * linux-low.h (class linux_process_target): Update.
136 * lynx-low.cc (lynx_target_ops): Update.
137 (lynx_detach): Turn into ...
138 (lynx_process_target::detach): ... this.
139 * lynx-low.h (class lynx_process_target): Update.
140 * nto-low.cc (nto_target_ops): Update.
141 (nto_detach): Turn into ...
142 (nto_process_target::detach): ... this.
143 * nto-low.h (class nto_process_target): Update.
144 * win32-low.cc (win32_target_ops): Update.
145 (win32_detach): Turn into ...
146 (win32_process_target::detach): ... this.
147 * win32-low.h (class win32_process_target): Update.
149 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
151 Turn process_stratum_target's kill op into a method of
154 * target.h (struct process_stratum_target): Remove the target op.
155 (class process_target): Add the target op.
157 Update the derived classes and callers below.
159 * target.cc (kill_inferior): Update.
160 * linux-low.cc (linux_target_ops): Update.
161 (linux_kill): Turn into ...
162 (linux_process_target::kill): ... this.
163 * linux-low.h (class linux_process_target): Update.
164 * lynx-low.cc (lynx_target_ops): Update.
165 (lynx_kill): Turn into ...
166 (lynx_process_target::kill): ... this.
167 * lynx-low.h (class lynx_process_target): Update.
168 * nto-low.cc (nto_target_ops): Update.
169 (nto_kill): Turn into ...
170 (nto_process_target::kill): ... this.
171 * nto-low.h (class nto_process_target): Update.
172 * win32-low.cc (win32_target_ops): Update.
173 (win32_kill): Turn into ...
174 (win32_process_target::kill): ... this.
175 * win32-low.h (class win32_process_target): Update.
177 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
179 Turn process_stratum_target's attach op into a method of
182 * target.h (struct process_stratum_target): Remove the target op.
183 (class process_target): Add the target op.
184 (myattach): Update the macro.
186 Update the derived classes and callers below.
188 * linux-low.cc (linux_target_ops): Update.
189 (linux_attach): Turn into ...
190 (linux_process_target::attach): ... this.
191 * linux-low.h (class linux_process_target): Update.
192 * lynx-low.cc (lynx_target_ops): Update.
193 (lynx_attach): Turn into ...
194 (lynx_process_target::attach): ... this.
195 * lynx-low.h (class lynx_process_target): Update.
196 * nto-low.cc (nto_target_ops): Update.
197 (nto_attach): Turn into ...
198 (nto_process_target::attach): ... this.
199 * nto-low.h (class nto_process_target): Update.
200 * win32-low.cc (win32_target_ops): Update.
201 (win32_attach): Turn into ...
202 (win32_process_target::attach): ... this.
203 * win32-low.h (class win32_process_target): Update.
205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
207 Turn process_stratum_target's post_create_inferior op into a method
210 * target.h (struct process_stratum_target): Remove the target op.
211 (class process_target): Add the target op.
212 (target_post_create_inferior): Update the macro.
213 * target.cc (process_target::post_create_inferior): Define.
215 Update the derived classes and callers below.
217 * linux-low.cc (linux_target_ops): Update.
218 (linux_post_create_inferior): Turn into ...
219 (linux_process_target::post_create_inferior): ... this.
220 * linux-low.h (class linux_process_target): Update.
221 * lynx-low.cc (lynx_target_ops): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 * win32-low.cc (win32_target_ops): Update.
225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
227 Turn process_stratum_target's create_inferior op into a method of
230 * target.h (struct process_stratum_target): Remove the target op.
231 (class process_target): Add the target op.
232 (create_inferior): Rename the macro to ...
233 (target_create_inferior): ... this.
235 Update the derived classes and callers below.
237 * server.cc (handle_v_run): Update.
238 (captured_main): Update.
239 (process_serial_event): Update.
240 * linux-low.cc (linux_target_ops): Update.
241 (linux_create_inferior): Turn into ...
242 (linux_process_target::create_inferior): ... this.
243 * linux-low.h (class linux_process_target): Update.
244 * lynx-low.cc (lynx_target_ops): Update.
245 (lynx_create_inferior): Turn into ...
246 (lynx_process_target::create_inferior): ... this.
247 * lynx-low.h (class lynx_process_target): Update.
248 * nto-low.cc (nto_target_ops): Update.
249 (nto_create_inferior): Turn into ...
250 (nto_process_target::create_inferior): ... this.
251 * nto-low.h (class nto_process_target): Update.
252 * win32-low.cc (win32_target_ops): Update.
253 (win32_create_inferior): Turn into ...
254 (win32_process_target::create_inferior): ... this.
255 * win32-low.h (class win32_process_target): Update.
257 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
259 * target.h (class process_target): New class definition.
260 (struct process_stratum_target) <pt>: New field with type
262 * linux-low.h (class linux_process_target): Define as a derived
263 class of 'process_target'.
264 * linux-low.cc (linux_target_ops): Add a linux_process_target*
266 * lynx-low.h (class lynx_process_target): Define as a derived
267 class of 'process_target'.
268 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
270 * nto-low.h (class nto_process_target): Define as a derived
271 class of 'process_target'.
272 * nto-low.cc (nto_target_ops): Add an nto_process_target*
274 * win32-low.h (class win32_process_target): Define as a derived
275 class of 'process_target'.
276 * win32-low.cc (win32_target_ops): Add a win32_process_target*
279 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
281 * configure: Regenerate.
283 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
284 Andrew Burgess <andrew.burgess@embecosm.com>
286 * linux-riscv-low.cc: New file.
287 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
288 and nat/riscv-linux-tdesc.c.
289 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
290 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
293 2020-02-14 Tom Tromey <tom@tromey.com>
295 * acinclude.m4: Don't include acx_configure_dir.m4.
296 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
297 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
298 (all, install-only, uninstall, clean-info, clean)
299 (maintainer-clean): Don't recurse.
300 (subdir_do, all-lib): Remove.
301 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
303 (generated_files): Update.
304 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
305 * configure: Rebuild.
306 * configure.ac: Don't configure gnulib or libiberty.
309 2020-02-14 Eli Zaretskii <eliz@gnu.org>
311 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
312 preparing the command line for CreateProcess.
313 (win32_create_inferior): Reflect the program name in debugging
314 output that shows the process and its command line.
316 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
318 * Makefile.in: Rename source files from .c to .cc.
319 * %.c: Rename to %.cc.
320 * configure.ac: Rename server.c to server.cc.
321 * configure: Re-generate.
323 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
325 * Makefile.in: Rename gdbsupport source files from .c to .cc.
327 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
329 * win32-low.c (win32_create_inferior): Set signal_pid.
331 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
332 Pedro Alves <palves@redhat.com>
334 Skip building gdbserver in a cross-configuration.
335 * configure.srv: Set $gdbserver_host depending on whether $target
336 is $host. Use $gdbserver_host instead of $host.
338 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
340 * configure: Re-generate.
342 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
344 * configure: Re-generate.
346 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
348 * acinclude.m4: Update warning.m4 path.
350 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
352 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
353 (handle_exception): Set siginfo_er.
354 (win32_xfer_siginfo): New function.
356 2020-02-07 Tom Tromey <tom@tromey.com>
357 Pedro Alves <palves@redhat.com>
359 * README: Update build documentation.
360 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
362 * configure.ac: Update paths.
363 * configure: Rebuild.
364 * acinclude.m4: Update paths.
365 * Makefile.in: Update include paths.
366 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
367 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
368 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
369 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
370 (%-generated.c): Update paths.
371 * Move entire directory from ../gdb/gdbserver.
373 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
375 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
377 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
379 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
380 assignment instead of srv_linux_obj.
382 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
384 * server.c (handle_qxfer_libraries): Write segment-address with
387 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
389 * Makefile.in (install-strip): New target.
390 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
391 * aclocal.m4: Regenerate.
392 * configure: Regenerate.
393 * configure.ac: Add AM_PROG_INSTALL_STRIP.
395 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
397 * Makefile.in (SFILES): Adjust paths to point to real files.
398 (OBS): Move waitstatus.o to target/waitstatus.o.
399 (TAGS): Transform paths appropriately.
401 (nat/%.o): ... this pattern rule.
403 (target/%.o): ... this pattern rule.
404 * configure.srv: Adjust paths throughout to include nat/ prefix
405 with the revant files.
406 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
407 * configure: Regenerate.
409 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
411 * Makefile.in (TAGS): Remove config files from the recipe.
413 2020-01-14 Tom Tromey <tom@tromey.com>
415 * configure: Rebuild.
416 * configure.ac: Remove any checks that were added to common.m4.
417 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
420 2020-01-14 Tom Tromey <tom@tromey.com>
422 * server.h: Include config.h.
423 * gdbreplay.c: Include config.h.
424 * configure: Rebuild.
425 * configure.ac: Don't source common.host.
426 * acinclude.m4: Update path.
427 * Makefile.in (INCSUPPORT): New variable.
428 (INCLUDE_CFLAGS): Add INCSUPPORT.
429 (SFILES): Update paths.
430 (version-generated.c): Update path to create-version.sh.
431 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
433 2020-01-14 Tom Tromey <tom@tromey.com>
435 * configure.ac (LIBS): Use WIN32APILIBS.
436 (USE_WIN32API): Don't define.
437 * configure: Rebuild.
439 2020-01-14 Tom Tromey <tom@tromey.com>
441 * configure: Rebuild.
443 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
445 * Makefile.in (%-generated.c): Remove rule for files from
448 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
450 * configure: Re-generate.
452 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
454 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
456 * tracepoint.c (stop_tracing, flush_trace_buffer,
457 about_to_request_buffer_space, get_trace_state_variable_value,
458 set_trace_state_variable_value, gdb_collect): Add declaration.
460 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
462 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
463 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
464 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
465 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
466 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
469 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
471 * inferiors.c: Include gdbsupport/common-inferior.h.
473 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
475 * hostio-errno.c: Include hostio.h.
477 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
479 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
482 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
484 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
485 * linux-arm-tdesc.h: Include arch/arm.h.
487 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
489 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
491 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
493 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
494 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
496 2020-01-10 Pedro Alves <palves@redhat.com>
498 * fork-child.c (post_fork_inferior): Pass target down to
500 * inferiors.c (switch_to_thread): Add process_stratum_target
502 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
503 * nto-low.c (nto_target_ops): Now a process_stratum_target.
504 * linux-low.c (linux_target_ops): Now a process_stratum_target.
505 * remote-utils.c (prepare_resume_reply): Pass the target to
507 * target.c (the_target): Now a process_stratum_target.
508 (done_accessing_memory): Pass the target to switch_to_thread.
509 (set_target_ops): Ajust to use process_stratum_target.
510 * target.h (struct target_ops): Rename to ...
511 (struct process_stratum_target): ... this.
512 (the_target, set_target_ops): Adjust.
513 (prepare_to_access_memory): Adjust comment.
514 * win32-low.c (child_xfer_memory): Adjust to use
515 process_stratum_target.
516 (win32_target_ops): Now a process_stratum_target.
518 2020-01-06 Eli Zaretskii <eliz@gnu.org>
519 Pedro Alves <palves@redhat.com>
521 * win32-low.c (get_child_debug_event): Extract the fatal exception
522 from the exit status and convert to the equivalent Posix signal
524 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
525 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
527 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
529 * Makefile.in: Use INSTALL_PROGRAM_ENV.
531 2020-01-01 Joel Brobecker <brobecker@adacore.com>
533 * server.c (gdbserver_version): Change copyright year to 2020.
534 * gdbreplay.c (gdbreplay_version): Likewise.
536 2019-12-19 Christian Biesinger <cbiesinger@google.com>
538 * configure: Regenerate.
539 * configure.ac: Quote variable arguments of test.
541 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
543 * Makefile.in: Fix build with GNU Make 3.81
545 2019-12-16 Tom Tromey <tromey@adacore.com>
547 * server.c (get_exec_file): Constify result.
549 2019-12-10 Christian Biesinger <cbiesinger@google.com>
551 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
552 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
553 * config.in: Regenerate.
554 * configure: Regenerate.
555 * configure.ac: Don't check for strerror.
556 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
557 Call safe_strerror instead of strerror.
558 * server.h (strerror): Remove this now-unnecessary declaration.
559 * tracepoint.c (init_named_socket): Call safe_strerror instead of
561 (gdb_agent_helper_thread): Likewise.
562 * utils.c (perror_with_name): Likewise.
564 2019-11-26 Tom Tromey <tom@tromey.com>
566 * configure, config.in: Rebuild.
568 2019-11-26 Tom Tromey <tom@tromey.com>
570 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
571 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
573 * configure, config.in: Rebuild.
575 2019-11-26 Tom Tromey <tom@tromey.com>
577 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
578 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
579 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
580 * acinclude.m4: Include ax_pthread.m4.
581 * config.in, configure: Rebuild.
583 2019-11-26 Christian Biesinger <cbiesinger@google.com>
585 * debug.c (debug_set_output): Call safe_strerror instead of
587 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
588 (linux_kill_one_lwp): Likewise.
589 (linux_detach_one_lwp): Likewise.
590 (linux_wait_for_event_filtered): Likewise.
591 (store_register): Likewise.
592 * lynx-low.c (lynx_attach): Likewise.
593 * mem-break.c (insert_memory_breakpoint): Likewise.
594 (remove_memory_breakpoint): Likewise.
595 (delete_fast_tracepoint_jump): Likewise.
596 (set_fast_tracepoint_jump): Likewise.
597 (uninsert_fast_tracepoint_jumps_at): Likewise.
598 (reinsert_fast_tracepoint_jumps_at): Likewise.
599 * nto-low.c (nto_xfer_memory): Likewise.
600 (nto_resume): Likewise.
602 2019-11-20 Luis Machado <luis.machado@linaro.org>
604 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
605 instead of register count.
606 * tdesc.c (tdesc_contains_feature): New function.
607 * tdesc.h (tdesc_contains_feature): New prototype.
609 2019-11-15 Christian Biesinger <cbiesinger@google.com>
611 * Makefile.in: Add safe-strerror.c.
612 * configure: Regenerate.
613 * configure.ac: Don't source common.host.
615 2019-11-15 Christian Biesinger <cbiesinger@google.com>
617 * config.in: Regenerate.
618 * configure: Regenerate.
620 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
622 * ax.c (ax_printf): Handle size_t_arg.
624 2019-11-06 Christian Biesinger <cbiesinger@google.com>
626 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
627 * mi/mi-main.c (output_cores): Likewise.
628 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
629 (linux_xfer_osdata_modules): Likewise.
630 * remote.c (register_remote_support_xml): Likewise.
631 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
632 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
634 2019-11-01 Christian Biesinger <cbiesinger@google.com>
636 * configure: Regenerate.
637 * configure.ac: Remove check for strerror_r.
639 2019-10-31 Christian Biesinger <cbiesinger@google.com>
641 * config.in: Regenerate.
642 * configure: Regenerate.
643 * configure.ac: Also check for strerror_r.
645 2019-10-31 Christian Biesinger <cbiesinger@google.com>
647 * ax.h (debug_agent): Remove duplicate declaration.
649 2019-10-26 Tom de Vries <tdevries@suse.de>
651 * linux-aarch64-low.c: Fix typos in comments.
652 * linux-arm-low.c: Same.
654 * linux-ppc-low.c: Same.
655 * proc-service.c: Same.
658 * tracepoint.c: Same.
661 2019-10-25 Tom Tromey <tromey@adacore.com>
663 * utils.c (xstrdup): Remove.
665 2019-10-23 Tom Tromey <tom@tromey.com>
667 * configure, config.in: Rebuild.
669 2019-10-23 Tom Tromey <tom@tromey.com>
671 * configure: Rebuild.
672 * acinclude.m4: Use m4_include, not sinclude.
674 2019-10-17 Tom Tromey <tromey@adacore.com>
676 * configure: Rebuild.
677 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
678 in AC_CONFIG_FILES invocation.
679 * Makefile.in (stamp-h, Makefile): Use new-style config.status
682 2019-10-16 Christian Biesinger <cbiesinger@google.com>
684 * server.c: Include xml-builtin.h.
685 (get_xml_features): Don't declare xml_builtins here.
687 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
689 * Makefile.in: Remove references to vec-ipa.o.
691 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
693 * Makefile.in: Remove references to vec.c.
695 2019-10-02 Christian Biesinger <cbiesinger@google.com>
697 * server.c (server_waiting): Change to bool.
698 (extended_protocol): Likewise.
699 (response_needed): Likewise.
700 (exit_requested): Likewise.
701 (run_once): Likewise.
702 (report_no_resumed): Likewise.
703 (non_stop): Likewise.
704 (disable_packet_vCont): Likewise.
705 (disable_packet_Tthread): Likewise.
706 (disable_packet_qC): Likewise.
707 (disable_packet_qfThreadInfo): Likewise.
708 (handle_general_set): Update.
709 (handle_detach): Update.
710 (handle_monitor_command): Update.
711 (handle_query): Update.
712 (captured_main): Update.
713 (process_serial_event): Update.
714 * server.h (server_waiting): Change to bool.
715 (disable_packet_vCont): Likewise.
716 (disable_packet_Tthread): Likewise.
717 (disable_packet_qC): Likewise.
718 (disable_packet_qfThreadInfo): Likewise.
719 (run_once): Likewise.
720 (non_stop): Likewise.
721 * target.c (target_stop_and_wait): Update.
723 2019-10-02 Tom Tromey <tromey@adacore.com>
725 * Makefile.in (SFILES): Add common-inferior.c.
726 (OBS): Add common-inferior.o.
727 * server.c (startup_with_shell): Don't define.
729 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
731 * linux-low.c (linux_low_read_btrace): Update for change to
734 2019-09-20 Christian Biesinger <cbiesinger@google.com>
736 * debug.c (debug_threads): Remove comment in favor of the header.
737 * debug.h (using_threads): Add declaration.
738 (debug_threads): Add comment.
739 * linux-aarch64-low.c: Include debug.h and remove declaration of
741 * nto-low.c: Likewise.
742 * remote-utils.c: Likewise.
743 * thread-db.c: Likewise.
745 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
747 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
748 and powerpc-cell64l-ipa.o.
749 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
750 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
751 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
754 * spu-low.c: Remove file.
756 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
757 (parse_spufs_run): Remove.
758 (ppc_get_pc): Remove Cell/B.E. support.
759 (ppc_set_pc): Likewise.
760 (ppc_breakpoint_at): Likewise.
761 (ppc_arch_setup): Likewise.
762 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
763 tdesc_powerpc_cell32l.
764 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
765 or init_registers_powerpc_cell32l.
766 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
767 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
768 or init_registers_powerpc_cell32l.
769 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
770 (init_registers_powerpc_cell32l): Remove prototype.
771 (init_registers_powerpc_cell64l): Likewise.
773 * target.h (struct target_ops): Remove qxfer_spu member.
774 * server.c (handle_qxfer_spu): Remove.
775 (qxfer_packets): Remove entry for "spu".
776 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
777 * linux-low.c (SPUFS_MAGIC): Remove.
778 (spu_enumerate_spu_ids): Remove.
779 (linux_qxfer_spu): Remove.
780 (linux_target_ops): Remove qxfer_spu member.
781 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
782 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
783 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
785 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
787 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
788 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
789 * config.in: Regenerate.
790 * configure: Regenerate.
792 2019-08-15 Tom Tromey <tromey@adacore.com>
794 * target.c (target_write_memory): Use gdb::byte_vector.
796 2019-08-15 Tom Tromey <tromey@adacore.com>
798 * tracepoint.c (write_inferior_data_pointer)
799 (write_inferior_integer, write_inferior_int8)
800 (write_inferior_uinteger, m_tracepoint_action_download)
801 (r_tracepoint_action_download, x_tracepoint_action_download)
802 (l_tracepoint_action_download, clear_inferior_trace_buffer)
803 (download_agent_expr, download_tracepoint_1)
804 (download_trace_state_variables, upload_fast_traceframes): Update.
805 * server.c (gdb_write_memory): Update.
806 * remote-utils.c (relocate_instruction): Update.
807 * proc-service.c (ps_pdwrite): Update.
808 * mem-break.c (remove_memory_breakpoint)
809 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
810 (uninsert_fast_tracepoint_jumps_at)
811 (reinsert_fast_tracepoint_jumps_at): Update.
812 * linux-x86-low.c (append_insns)
813 (i386_install_fast_tracepoint_jump_pad)
814 (amd64_write_goto_address, i386_write_goto_address): Update.
815 * linux-s390-low.c (append_insns, s390_write_goto_address):
817 * linux-ppc-low.c (ppc_relocate_instruction)
818 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
819 (ppc_write_goto_address): Update.
820 * linux-aarch64-low.c (append_insns): Update.
821 * target.h (struct target_ops): Update.
822 (write_inferior_memory): Don't declare.
823 * target.c (target_write_memory): Rename from
824 write_inferior_memory. Remove old target_write_memory.
826 2019-08-15 Tom Tromey <tromey@adacore.com>
828 * target.c (write_inferior_memory): Use std::vector.
830 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
833 * configure.ac: Drop enable-libmcheck support.
834 * configure, config.in: Rebuild.
835 * acinclude.m4: Don't include it.
837 2019-07-19 Alan Hayward <alan.hayward@arm.com>
839 * configure.srv: Remove Arm xml files.
841 2019-07-19 Alan Hayward <alan.hayward@arm.com>
843 * configure.srv: Add new files. Remove xml generated files.
844 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
846 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
847 * linux-aarch32-tdesc.c: New file.
848 * linux-aarch32-tdesc.h: New file.
849 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
850 * linux-arm-low.c (init_registers_arm, tdesc_arm)
851 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
852 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
853 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
854 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
855 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
856 (arm_read_description): Call arm_linux_read_description.
857 (initialize_low_arch): Don't init registers.
858 * linux-arm-tdesc.c: New file.
859 * linux-arm-tdesc.h: New file.
861 2019-07-10 Alan Hayward <alan.hayward@arm.com>
863 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
864 Move counter inside for.
865 (arm_read_description): Check ptrace earlier.
866 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
868 2019-07-09 Tom Tromey <tom@tromey.com>
870 * configure: Rebuild.
871 * configure.ac: Change common to gdbsupport.
872 * acinclude.m4: Change common to gdbsupport.
873 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
874 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
875 common to gdbsupport.
876 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
877 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
878 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
879 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
880 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
881 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
882 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
883 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
884 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
885 common to gdbsupport.
887 2019-07-04 Alan Hayward <alan.hayward@arm.com>
889 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
891 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
893 2019-07-04 Alan Hayward <alan.hayward@arm.com>
895 * configure.srv: Remove legacy xml.
896 * linux-aarch64-low.c (initialize_low_arch): Remove
897 initialize_low_tdesc call.
898 * linux-aarch64-tdesc-selftest.c: Remove file.
899 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
900 * linux-x86-low.c (initialize_low_arch): Remove
901 initialize_low_tdesc call.
902 * linux-x86-tdesc-selftest.c: Remove file.
903 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
905 2019-06-20 Tom de Vries <tdevries@suse.de>
907 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
908 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
910 2019-06-19 Tom de Vries <tdevries@suse.de>
912 * debug.h (debug_write): Change return type to ssize_t.
913 * debug.c (debug_write): Same.
915 2019-06-14 Tom Tromey <tom@tromey.com>
917 * configure.ac: Use new path to gnulib.
918 * configure: Rebuild.
919 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
922 2019-06-11 Tom Tromey <tom@tromey.com>
924 * Makefile.in (SFILES): Add alloc.c.
926 (IPA_OBJS): Add alloc-ipa.o.
927 (alloc-ipa.o): New target.
928 (%.o: ../%.c): New pattern rule.
930 2019-06-10 Tom Tromey <tromey@adacore.com>
932 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
933 end warning with a newline.
934 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
936 * thread-db.c (attach_thread): Don't end warning with a newline.
937 (thread_db_notice_clone): Likewise.
938 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
940 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
941 end warning with a newline.
943 2019-06-04 Pedro Alves <palves@redhat.com>
945 * server.c (captured_main): Use make_unique_xstrdup.
947 2019-06-02 Tom Tromey <tom@tromey.com>
949 * gdbreplay.c (fromhex): Remove.
950 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
952 2019-05-29 Tom Tromey <tromey@adacore.com>
954 * configure: Rebuild.
956 2019-05-06 Kevin Buettner <kevinb@redhat.com>
958 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
959 sign extension code on 32-bit builds.
961 2019-05-03 Eli Zaretskii <eliz@gnu.org>
964 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
966 2019-04-19 Tom Tromey <tom@tromey.com>
968 * server.c (struct vstop_notif): Derive from notif_event.
970 (queue_stop_reply): Update.
971 (remove_all_on_match_ptid): Change type. Rewrite.
972 (discard_queued_stop_replies): Rewrite.
973 (in_queued_stop_replies_ptid): Change type.
974 (in_queued_stop_replies): Rewrite.
975 (notif_stop): Update.
976 (queue_stop_reply_callback): Update.
977 (captured_main): Don't call initialize_notif.
978 (push_stop_notification): Update.
979 * notif.c (notif_write_event, handle_notif_ack)
980 (notif_event_enque, notif_push): Update.
981 (notif_event_xfree, initialize_notif): Remove.
982 * notif.h (struct notif_event): Include <list>, not
984 (struct notif_server) <queue>: Now a std::list.
985 (notif_event_p): Remove typedef.
986 (initialize_notif): Don't declare.
987 (struct notif_event): Add virtual destructor.
989 2019-04-17 Alan Hayward <alan.hayward@arm.com>
991 * ax.c (ax_vdebug): Call debug_printf.
992 * debug.c (debug_write): New function.
993 * debug.h (debug_write): New declaration.
994 * linux-low.c (sigchld_handler): Call debug_write.
996 2019-04-17 Alan Hayward <alan.hayward@arm.com>
998 * debug.c (debug_set_output): New function.
999 (debug_vprintf): Send output to debug_file.
1000 (debug_flush): Likewise.
1001 * debug.h (debug_set_output): New declaration.
1002 * server.c (handle_monitor_command): Add debug-file option.
1003 (captured_main): Likewise.
1005 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1007 * debug.c (remote_debug): Add definition.
1008 * debug.h (remote_debug): Add declaration.
1009 * hostio.c (remote_debug): Remove declaration.
1010 * remote-utils.c (struct ui_file): Likewise.
1011 (remote_debug): Likewise.
1012 * remote-utils.h (remote_debug): Likewise,
1013 * server.c (remote_debug): Remove definition.
1015 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1017 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1018 when using a 64-bit gdbserver.
1020 2019-04-09 Tom Tromey <tromey@adacore.com>
1022 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1024 2019-04-08 Tom Tromey <tom@tromey.com>
1026 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1028 (linux_resume_one_lwp): Likewise.
1030 2019-04-08 Tom Tromey <tom@tromey.com>
1032 * gdbreplay.c: Update.
1033 * linux-low.c: Update.
1036 2019-04-08 Tom Tromey <tom@tromey.com>
1038 * server.c: Use C++ exception handling.
1039 * linux-low.c: Use C++ exception handling.
1040 * gdbreplay.c: Use C++ exception handling.
1042 2019-04-08 Tom Tromey <tom@tromey.com>
1044 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1045 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1046 (captured_main, main): Update.
1047 * gdbreplay.c (main): Update.
1049 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1051 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1052 value in argument pointer, return 1 if the entry is found and 0
1053 otherwise. Move comment.
1054 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1055 * linux-low.h (linux_get_auxv): Declare.
1056 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1058 2019-04-05 Tom Tromey <tromey@adacore.com>
1060 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1063 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1065 * linux-low.c (AT_HWCAP2): Add define if not already included.
1067 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1069 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1070 (aarch64_arch_setup): Call linux_get_hwcap.
1071 * linux-arm-low.c (arm_get_hwcap): Remove function.
1072 (arm_read_description): Call linux_get_hwcap.
1073 * linux-low.c (linux_get_auxv): New function.
1074 (linux_get_hwcap): Likewise.
1075 (linux_get_hwcap2): Likewise.
1076 * linux-low.h (linux_get_hwcap): New declaration.
1077 (linux_get_hwcap2): Likewise.
1078 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1079 (ppc_arch_setup): Call linux_get_hwcap.
1080 * linux-s390-low.c (s390_get_hwcap): Remove function.
1081 (s390_arch_setup): Call linux_get_hwcap.
1083 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1084 Jiong Wang <jiong.wang@arm.com>
1086 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1087 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1089 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1091 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1092 Jiong Wang <jiong.wang@arm.com>
1094 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1095 (aarch64_get_hwcap): New function.
1096 (aarch64_arch_setup): Read APIA hwcap.
1098 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1099 Jiong Wang <jiong.wang@arm.com>
1101 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1102 (initialize_low_tracepoint): Likewise.
1103 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1104 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1105 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1106 (aarch64_linux_read_description): Likewise.
1107 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1109 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1111 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1112 i386_create_target_description for 'segments' parameter.
1113 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1114 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1115 * win32-i386-low.c (i386_arch_setup): Likewise.
1117 2019-03-12 Tom Tromey <tromey@adacore.com>
1119 * linux-low.c (iterate_over_lwps): Update.
1121 2019-03-06 Tom Tromey <tom@tromey.com>
1123 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1124 (captured_main): Use SCOPE_EXIT.
1126 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1128 * configure.srv: Use '$enable_unittest' instead of '$development'
1129 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1132 2019-02-27 Tom Tromey <tromey@adacore.com>
1134 * gdbreplay.c (logchar): Handle \r\n.
1136 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1138 * linux-low.c (linux_attach): Add process before lwp.
1139 * server.c (attach_inferior): Check if already attached.
1141 2019-02-07 Tom Tromey <tom@tromey.com>
1143 * x86-tdesc.h: Rename include guard.
1144 * x86-low.h: Add include guard.
1145 * wincecompat.h: Rename include guard.
1146 * win32-low.h: Add include guard.
1147 * utils.h: Rename include guard.
1148 * tracepoint.h: Rename include guard.
1149 * tdesc.h: Rename include guard.
1150 * target.h: Rename include guard.
1151 * server.h: Rename include guard.
1152 * remote-utils.h: Rename include guard.
1153 * regcache.h: Rename include guard.
1154 * nto-low.h: Rename include guard.
1155 * notif.h: Add include guard.
1156 * mem-break.h: Rename include guard.
1157 * lynx-low.h: Add include guard.
1158 * linux-x86-tdesc.h: Add include guard.
1159 * linux-s390-tdesc.h: Add include guard.
1160 * linux-ppc-tdesc-init.h: Add include guard.
1161 * linux-low.h: Add include guard.
1162 * linux-aarch64-tdesc.h: Add include guard.
1163 * linux-aarch32-low.h: Add include guard.
1164 * inferiors.h: Rename include guard.
1165 * i387-fp.h: Rename include guard.
1166 * hostio.h: Rename include guard.
1167 * gdbthread.h: Rename include guard.
1168 * gdb_proc_service.h: Rename include guard.
1169 * event-loop.h: Rename include guard.
1170 * dll.h: Rename include guard.
1171 * debug.h: Rename include guard.
1172 * ax.h: Rename include guard.
1174 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1177 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1178 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1180 2019-01-25 Tom Tromey <tom@tromey.com>
1182 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1184 2019-01-25 Tom Tromey <tom@tromey.com>
1186 * win32-low.c: Fix common/ includes.
1187 * win32-i386-low.c: Fix common/ includes.
1188 * tracepoint.c: Fix common/ includes.
1189 * thread-db.c: Fix common/ includes.
1190 * target.h: Fix common/ includes.
1191 * symbol.c: Fix common/ includes.
1192 * spu-low.c: Fix common/ includes.
1193 * server.h: Fix common/ includes.
1194 * server.c: Fix common/ includes.
1195 * remote-utils.c: Fix common/ includes.
1196 * regcache.h: Fix common/ includes.
1197 * regcache.c: Fix common/ includes.
1198 * nto-x86-low.c: Fix common/ includes.
1199 * notif.h: Fix common/ includes.
1200 * mem-break.h: Fix common/ includes.
1201 * lynx-low.c: Fix common/ includes.
1202 * lynx-i386-low.c: Fix common/ includes.
1203 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1204 * linux-x86-low.c: Fix common/ includes.
1205 * linux-low.c: Fix common/ includes.
1206 * inferiors.h: Fix common/ includes.
1207 * i387-fp.c: Fix common/ includes.
1208 * hostio.c: Fix common/ includes.
1209 * hostio-errno.c: Fix common/ includes.
1210 * gdbthread.h: Fix common/ includes.
1211 * gdbreplay.c: Fix common/ includes.
1212 * fork-child.c: Fix common/ includes.
1213 * event-loop.c: Fix common/ includes.
1215 (enum gdb_agent_op): Fix common/ includes.
1217 2019-01-21 Tom Tromey <tom@tromey.com>
1219 * tracepoint.c: Fix includes.
1220 * remote-utils.c: Fix includes.
1221 * linux-x86-low.c: Fix includes.
1223 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1225 * gdbreplay.c (gdbreplay_version): Update copyright year in
1227 * server.c (gdbserver_version): Likewise.
1229 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1231 * linux-low.c (add_lwp): Switch ordering.
1233 2018-11-29 Tom Tromey <tom@tromey.com>
1235 * win32-low.c (win32_join): Take pid, not process.
1236 * target.h (struct target_ops) <join>: Change argument type.
1237 (join_inferior): Change argument name.
1238 * spu-low.c (spu_join): Take pid, not process.
1239 * server.c (handle_detach): Preserve pid before destroying
1241 * lynx-low.c (lynx_join): Take pid, not process.
1242 * linux-low.c (linux_join): Take pid, not process.
1244 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1246 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1247 (aarch64_cannot_fetch_register): Likewise.
1248 (struct linux_target_ops): Update references.
1250 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1252 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1254 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1256 * configure.srv (ipa_ppc_linux_regobj): Add
1257 powerpc-isa207-htm-vsx32l-ipa.o and
1258 powerpc-isa207-htm-vsx64l-ipa.o.
1259 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1260 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1261 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1262 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1263 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1264 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1265 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1266 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1267 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1268 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1269 (init_registers_powerpc_isa207_htm_vsx32l)
1270 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1271 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1272 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1273 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1274 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1275 (ppc_store_tm_ctarregset): New functions.
1276 (ppc_regsets): Add entries for HTM regsets.
1277 (ppc_arch_setup): Set htm in features struct when needed. Set
1278 sizes for the HTM regsets.
1279 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1280 (initialize_low_arch): Call
1281 init_registers_powerpc_isa207_htm_vsx32l and
1282 init_registers_powerpc_isa207_htm_vsx64l.
1283 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1284 PPC_TDESC_ISA207_HTM_VSX.
1285 (initialize_low_tracepoint): Call
1286 init_registers_powerpc_isa207_htm_vsx32l and
1287 init_registers_powerpc_isa207_htm_vsx64l.
1289 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1291 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1292 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1293 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1294 (ppc_store_pmuregset): New functions.
1295 (ppc_regsets): Add entries for ebb and pmu regsets.
1296 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1297 pmu regsets are available. Set sizes for these regsets.
1299 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1301 * configure.srv (ipa_ppc_linux_regobj): Add
1302 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1303 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1304 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1305 rs6000/powerpc-isa207-vsx32l.xml, and
1306 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1307 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1308 <PPC_TDESC_ISA207_VSX>: New enum value.
1309 (init_registers_powerpc_isa207_vsx32l): Declare.
1310 (init_registers_powerpc_isa207_vsx64l): Declare.
1311 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1312 (ppc_store_tarregset): New function.
1313 (ppc_regsets): Add entry for the TAR regset.
1314 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1315 size for the TAR regsets.
1316 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1317 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1318 and init_registers_powerpc_isa207_vsx64l.
1319 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1320 (initialize_low_tracepoint): Call
1321 init_registers_powerpc_isa207_vsx32l and
1322 init_registers_powerpc_isa207_vsx64l.
1324 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1325 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1327 * configure.srv (ipa_ppc_linux_regobj): Add
1328 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1329 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1330 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1331 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1332 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1333 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1334 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1335 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1336 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1337 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1338 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1339 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1340 (ppc_hwcap): Add comment.
1341 (ppc_hwcap2): New global.
1342 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1343 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1344 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1345 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1346 when needed. Set sizes for the the DSCR and PPR regsets.
1347 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1348 (initialize_low_arch): Call
1349 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1350 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1351 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1352 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1353 (initialize_low_tracepoint): Call
1354 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1355 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1357 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1359 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1361 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1362 Simon Marchi <simark@simark.ca>
1364 * acinclude.m4: Include "../selftest.m4".
1365 * configure: Regenerate.
1366 * configure.ac: Use "GDB_AC_SELFTEST".
1367 * configure.srv: Use "$enable_unittests" instead of
1368 "$development" when checking whether unit tests have been
1370 * server.c (captured_main): Update message informing that
1371 selftests have been disabled.
1373 2018-10-04 Tom Tromey <tom@tromey.com>
1375 * configure: Rebuild.
1377 2018-10-04 Tom Tromey <tom@tromey.com>
1379 * server.c (handle_status): Rename inner "thread".
1380 (process_serial_event): Declare "res" in 'm' case.
1381 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1382 (iterate_over_lwps): Rename inner "thread".
1383 (linux_qxfer_libraries_svr4): Rename inner "len".
1384 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1386 2018-10-01 Gary Benson <gbenson@redhat.com>
1388 * gdb_proc_service.h: Moved common code to
1389 common/gdb_proc_service.h.
1391 2018-10-01 Gary Benson <gbenson@redhat.com>
1393 * gdb_proc_service.h: Synchronize comments and whitespace with
1394 GDB's version of this file.
1396 2018-09-25 Tom Tromey <tom@tromey.com>
1398 * configure: Rebuild.
1399 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1401 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1403 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1404 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1405 ($(IPA_LIB)): Sort IPA_OBJS.
1407 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1409 * Makefile.in: Remove references to $(ADD_DEPS).
1411 2018-09-16 Tom Tromey <tom@tromey.com>
1413 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1415 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1418 2018-09-05 Tom Tromey <tom@tromey.com>
1420 * configure: Rebuild.
1422 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1425 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1427 2018-08-27 Tom Tromey <tom@tromey.com>
1430 * configure: Rebuild.
1432 2018-08-27 Tom Tromey <tom@tromey.com>
1434 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1435 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1436 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1437 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1438 (s390x_emit_stack_adjust): Add casts to unsigned char.
1440 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1444 * server.h (struct client_state) <disable_randomization>:
1447 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1449 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1451 (mips_supply_ptrace_register): Likewise.
1453 2018-07-22 Tom Tromey <tom@tromey.com>
1455 * configure: Rebuild.
1457 2018-07-22 Tom Tromey <tom@tromey.com>
1459 * win32-low.c (win32_create_inferior): Remove unused variables.
1460 * gdbreplay.c (remote_open): Remove unused variable.
1461 * remote-utils.c (remote_prepare): Remove unused variable.
1462 * x86-tdesc.h (X86_TDESC_H): Define.
1463 (amd64_expedite_regs): Define conditionally.
1464 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1465 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1466 * remote-utils.c (readchar): Remove unused variable.
1468 2018-07-13 Pedro Alves <palves@redhat.com>
1470 * linux-low.c (linux_kill): Change parameter to process_info
1471 pointer instead of pid. Adjust.
1472 * lynx-low.c (lynx_kill): Likewise.
1473 * nto-low.c (nto_kill): Likewise.
1474 * spu-low.c (spu_kill): Likewise.
1475 * win32-low.c (win32_kill): Likewise.
1476 * server.c (handle_v_kill, kill_inferior_callback)
1477 (detach_or_kill_for_exit): Adjust.
1478 * target.c (kill_inferior): Change parameter to process_info
1479 pointer instead of pid. Adjust.
1480 * target.h (struct target_ops) <kill>: Change parameter to
1481 process_info pointer instead of pid. Adjust all implementations
1483 (kill_inferior): Likewise.
1485 2018-07-13 Pedro Alves <palves@redhat.com>
1487 * linux-low.c (linux_detach, linux_join): Change parameter to
1488 process_info pointer instead of pid. Adjust.
1489 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1490 * nto-low.c (nto_detach): Likewise.
1491 * spu-low.c (spu_detach, spu_join): Likewise.
1492 * win32-low.c (win32_detach, win32_join): Likewise.
1493 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1494 * target.h (struct target_ops) <detach, join>: Change parameter to
1495 process_info pointer instead of pid. Adjust all implementations
1497 (detach_inferior, join_inferior): Rename 'pid' parameter to
1500 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1501 Jan Kratochvil <jan.kratochvil@redhat.com>
1502 Paul Fertser <fercerpav@gmail.com>
1503 Tsutomu Seki <sekiriki@gmail.com>
1505 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1506 (OBS): Add 'common/netstuff.o'.
1507 (GDBREPLAY_OBS): Likewise.
1508 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1509 (remote_open): Implement support for IPv6
1511 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1513 (handle_accept_event): Accept connections from IPv6 sources.
1514 (remote_prepare): Handle IPv6-style hostnames; implement
1515 support for IPv6 connections.
1516 (remote_open): Implement support for printing connections from
1519 2018-07-11 Pedro Alves <palves@redhat.com>
1522 * mem-break.c (any_persistent_commands): Add process_info
1523 parameter and use it instead of relying on the current process.
1524 Change return type to bool.
1525 * mem-break.h (any_persistent_commands): Add process_info
1526 parameter and change return type to bool.
1527 * server.c (handle_detach): Remove require_running_or_return call.
1528 Look up the process_info for the process we're about to detach.
1529 If not found, return back error to GDB. Adjust
1530 any_persistent_commands call to pass down a process pointer.
1532 2018-07-11 Pedro Alves <palves@redhat.com>
1534 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1535 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1536 instead of collect_register_by_name.
1537 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1538 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1540 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1541 Pedro Alves <palves@redhat.com>
1543 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1545 2018-07-03 Tom Tromey <tom@tromey.com>
1547 * linux-low.c: Update.
1548 * lynx-low.c: Update.
1549 * mem-break.c: Update.
1550 * nto-low.c: Update.
1551 * remote-utils.c: Update.
1553 * spu-low.c: Update.
1555 * win32-low.c: Update.
1557 2018-07-03 Tom Tromey <tom@tromey.com>
1561 2018-07-03 Tom Tromey <tom@tromey.com>
1563 * linux-low.c: Update.
1565 2018-07-03 Tom Tromey <tom@tromey.com>
1569 2018-07-03 Tom Tromey <tom@tromey.com>
1571 * linux-low.c: Update.
1572 * linux-mips-low.c: Update.
1573 * lynx-low.c: Update.
1574 * nto-low.c: Update.
1575 * remote-utils.c: Update.
1577 * spu-low.c: Update.
1579 * thread-db.c: Update.
1581 2018-07-03 Tom Tromey <tom@tromey.com>
1583 * linux-low.c: Update.
1584 * linux-mips-low.c: Update.
1585 * lynx-low.c: Update.
1586 * mem-break.c: Update.
1587 * nto-low.c: Update.
1588 * remote-utils.c: Update.
1590 * spu-low.c: Update.
1592 * tracepoint.c: Update.
1594 2018-07-03 Tom Tromey <tom@tromey.com>
1596 * linux-low.c: Update.
1597 * linux-ppc-low.c: Update.
1598 * linux-x86-low.c: Update.
1599 * proc-service.c: Update.
1601 * spu-low.c: Update.
1602 * thread-db.c: Update.
1603 * win32-low.c: Update.
1605 2018-07-03 Tom Tromey <tom@tromey.com>
1607 * linux-low.c: Update.
1608 * lynx-low.c: Update.
1609 * nto-low.c: Update.
1610 * remote-utils.c: Update.
1611 * spu-low.c: Update.
1612 * thread-db.c: Update.
1613 * win32-low.c: Update.
1615 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1617 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1618 parameter in call to 'amd64_create_target_description'.
1620 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1622 * x86-tdesc.h: Remove executable permission flag.
1624 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1626 * configure.ac: Remove AC_PREREQ, add missing quoting.
1627 * configure: Re-generate.
1628 * config.in: Re-generate.
1629 * aclocal.m4: Re-generate.
1631 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1633 * tracepoint.h (current_traceframe): Remove declaration.
1635 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1637 * linux-aarch64-low.c (is_sve_tdesc): New function.
1638 (aarch64_sve_regs_copy_to_regcache): Likewise.
1639 (aarch64_sve_regs_copy_from_regcache): Likewise.
1640 (aarch64_regs_info): Add SVE checks.
1641 (initialize_low_arch): Initialize SVE.
1643 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1645 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1647 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1649 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1650 (initialize_low_tracepoint): Likewise
1651 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1652 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1654 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1656 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1658 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1660 * server.h (PBUFSIZ): Increase size
1662 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1664 * regcache.c (regcache::raw_compare): New function.
1665 * regcache.h (regcache::raw_compare): New declaration.
1667 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1669 * regcache.c (new_register_cache): Use new.
1670 (free_register_cache): Use delete.
1671 (register_data): Use const.
1672 (supply_register): Move body inside regcache.
1673 (regcache::raw_supply): New override function.
1674 (collect_register): Move body inside regcache.
1675 (regcache::raw_collect): New override function.
1676 (regcache::get_register_status): New override function.
1677 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1679 2018-06-09 Tom Tromey <tom@tromey.com>
1681 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1683 (event_queue): Use std::queue.
1684 (gdb_event_xfree): Remove.
1685 (initialize_event_loop, process_event, wait_for_event): Update.
1687 2018-06-08 Stan Cox <scox@redhat.com>
1689 * win32-low.c (win32_create_inferior): last_ptid and last_status
1690 moved to client_state.
1692 2018-06-08 Pedro Alves <palves@redhat.com>
1694 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1695 common/common-exceptions.o, common/common-utils.o,
1696 common/errors.o, common/print-utils.o and utils.o.
1697 * gdbreplay.c: Include "common-defs.h" instead of the two
1698 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1699 string.h or alloca.h.
1700 (perror_with_name): Delete.
1701 (remote_open): Use xstrdup instead of strdup.
1702 (main): Rename to ...
1703 (captured_main): ... this.
1706 2018-06-08 Tom Tromey <tom@tromey.com>
1708 * linux-low.c (linux_low_read_btrace): Update.
1710 2018-06-04 Stan Cox <scox@redhat.com>
1712 * server.h (struct client_state): New.
1713 * server.c (cont_thread, general_thread, multi_process)
1714 (report_fork_events, report_vfork_events, report_exec_events)
1715 (report_thread_events, swbreak_feature, hwbreak_feature)
1716 (vCont_supported, disable_randomization, pass_signals)
1717 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1718 Moved to client_state.
1719 * remote-utils.c (remote_debug, noack_mode)
1720 (transport_is_reliable): Moved to client_state.
1721 * tracepoint.c (current_traceframe): Moved to client_state.
1724 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1725 linux-low.c, remote-utils.h, target.c: Use client_state.
1727 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1729 * configure.srv: Add new c/h file.
1731 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1733 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1736 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1738 * gdb.arch/mips-fpregset-core.exp: New test.
1739 * gdb.arch/mips-fpregset-core.c: New test source.
1741 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1744 * hostio.c (require_int): Do not report overflow for integers
1745 between 0xfffffff and 0x7fffffff.
1747 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1749 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1750 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1751 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1753 (the_low_target): Wire them.
1755 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1757 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1758 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1759 mode. Call collect_register_by_name with vscr using
1760 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1761 (ppc_store_vrregset): Add and set vscr_offset variable as in
1762 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1765 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1767 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1768 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1769 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1771 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1773 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1774 (ppc_store_vsxregset): Likewise.
1775 (ppc_fill_vrregset): Likewise.
1776 (ppc_store_vrregset): Likewise.
1777 (ppc_fill_evrregset): Likewise.
1778 (ppc_store_evrregset): Likewise.
1779 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1780 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1783 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1785 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1786 wordsize of the inferior. Call ppc_linux_target_wordsize.
1788 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1790 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1791 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1792 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1793 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1794 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1795 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1796 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1797 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1798 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1799 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1800 (tdesc_powerpc_e500l): Remove.
1801 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1802 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1803 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1804 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1806 (ppc_arch_setup): Remove target description matching code. Fill a
1807 ppc_linux_features struct and call ppc_linux_match_description
1810 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1812 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1813 width of the requested register exceeds the width of the
1815 (mips_cannot_store_register): Likewise.
1817 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1819 * linux-mips-low.c (mips_fetch_register): New function. Update
1821 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1822 (the_low_target): Wire `mips_fetch_register'.
1824 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1826 * lynx-i386-low.c (LYNXOS_178): New macro.
1827 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1828 the layout on LynxOS-178.
1829 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1830 handle floating point registers that are not supported by
1833 2018-05-10 Tom Tromey <tom@tromey.com>
1835 * configure: Rebuild.
1837 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1840 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1841 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1842 Use it to set the expedite_regs field in the given tdesc.
1843 * x86-tdesc.h: New file.
1844 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1845 Adjust following the addition of the new expedite_regs parameter
1846 to init_target_desc.
1847 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1848 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1849 (i386_linux_read_description, amd64_linux_read_description):
1850 Adjust following the addition of the new expedite_regs parameter
1851 to init_target_desc.
1852 * lynx-i386-low.c: #include "x86-tdesc.h".
1853 (lynx_i386_arch_setup): Adjust following the addition of the new
1854 expedite_regs parameter to init_target_desc.
1855 * nto-x86-low.c: #include "x86-tdesc.h".
1856 (nto_x86_arch_setup): Adjust following the addition of the new
1857 expedite_regs parameter to init_target_desc.
1858 * win32-i386-low.c: #include "x86-tdesc.h".
1859 (i386_arch_setup): Adjust following the addition of the new
1860 expedite_regs parameter to init_target_desc.
1862 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1865 * win32-low.c (win32_create_inferior): Add call to my_wait
1866 setting last_status global.
1868 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1871 * win32-low.c (create_process): Only call gdb_tilde_expand if
1872 inferior_cwd is not NULL.
1874 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1876 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1877 registers to the cache if their values have changed.
1878 (i387_xsave_to_cache): Provide default values for x87 control
1879 registers when these features are available, but disabled.
1880 * regcache.c (supply_register_by_name_zeroed): New function.
1881 * regcache.h (supply_register_by_name_zeroed): Declare new
1884 2018-05-07 Tom Tromey <tom@tromey.com>
1886 * configure: Rebuild.
1888 2018-05-04 Tom Tromey <tom@tromey.com>
1890 * configure: Rebuild.
1892 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1893 Pedro Alves <palves@redhat.com>
1895 * linux-aarch64-low.c (aarch64_stopped_data_address):
1898 2018-04-27 Tom Tromey <tom@tromey.com>
1900 * configure: Rebuild.
1902 2018-04-23 Tom Tromey <tom@tromey.com>
1904 * configure: Rebuild.
1906 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1908 * Makefile.in (depcomp): Add "..".
1909 (all_deps_files): New and use it.
1911 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1913 * configure.srv (aarch64*-*-linux*): Don't include xml.
1914 (i[34567]86-*-cygwin*): Likewise.
1915 (i[34567]86-*-linux*): Likewise.
1916 (i[34567]86-*-lynxos*): Likewise.
1917 (i[34567]86-*-mingw32ce*): Likewise.
1918 (i[34567]86-*-mingw*): Likewise.
1919 (i[34567]86-*-nto*): Likewise.
1920 (tic6x-*-uclinux): Likewise.
1921 (x86_64-*-linux*): Likewise.
1922 (x86_64-*-mingw*): Likewise.
1923 (x86_64-*-cygwin*): Likewise.
1925 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1927 * tdesc.c: Remove xml parameter.
1929 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1931 * server.c (get_features_xml): Remove cast.
1932 * tdesc.c (void target_desc::accept): Fill in function.
1933 (tdesc_get_features_xml): Remove old xml creation.
1934 (print_xml_feature::visit_pre): Add xml vistor.
1935 * tdesc.h (struct target_desc): Make xmltarget mutable.
1936 (tdesc_get_features_xml): Remove declaration.
1938 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1940 * tdesc.c (tdesc_architecture_name): Add new function.
1941 (tdesc_osabi_name): Likewise.
1942 (tdesc_get_features_xml): Use new functions.
1944 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1946 * tdesc.c (tdesc_create_flags): Remove.
1947 (tdesc_add_flag): Likewise.
1948 (tdesc_named_type): Likewise.
1949 (tdesc_create_union): Likewise.
1950 (tdesc_create_struct): Likewise.
1951 (tdesc_create_vector): Likewise.
1952 (tdesc_add_bitfield): Likewise.
1953 (tdesc_add_field): Likewise.
1954 (tdesc_set_struct_size): Likewise.
1956 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1958 * tdesc.c (~target_desc): Remove implictly deleted items.
1959 (init_target_desc): Iterate all features.
1960 (tdesc_get_features_xml): Use vector.
1961 (tdesc_create_feature): Create feature.
1962 * tdesc.h (tdesc_feature) Remove
1963 (target_desc): Add features.
1965 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1967 * Makefile.in: Add common/tdesc.c
1968 * tdesc.c (init_target_desc): init all reg_defs from register
1970 (tdesc_create_reg): Create tdesc_reg.
1971 * tdesc.h (tdesc_feature): Add register vector.
1973 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1975 * tdesc.h (struct target_desc) <features>: Change type to
1976 std::vector<std::string>.
1977 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1979 (tdesc_get_features_xml): Likewise.
1980 (tdesc_create_feature): Likewise.
1982 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1984 * regcache.c (find_register_by_number): Return a ref.
1985 (find_regno): Use references.
1986 (register_size): Likewise.
1987 (register_data): Likewise.
1988 * tdesc.c (target_desc::~target_desc): Remove free calls.
1989 (target_desc::operator==): Use std::vector compare.
1990 (init_target_desc): Use reference.
1991 (tdesc_create_reg): Use reg constructors.
1992 * tdesc.h (struct target_desc): Replace pointer with object.
1994 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1996 * regcache.c (find_register_by_number): Make static.
1997 (find_regno): Use find_register_by_number
1998 * regcache.h (struct reg): Remove declaration.
2000 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2002 * tdesc.c (target_desc::~target_desc): Move to here.
2003 (target_desc::operator==): Likewise.
2004 * tdesc.h (target_desc::~target_desc): Move from here.
2005 (target_desc::operator==): Likewise.
2007 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2009 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2011 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2013 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2015 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2016 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2017 and init_registers_s390_gs_linux64.
2019 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2021 * linux-s390-low.c (s390_fill_gs): Remove function.
2022 (s390_fill_gsbc): Remove function.
2023 (s390_regsets): Set fill functions for the guarded storage regsets
2026 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2028 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2029 the word size. Add comment.
2030 (s390_get_wordsize): New function.
2031 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2032 pswm with it. Instead, use s390_get_wordsize to determine the
2033 word size first and derive the correct tdesc from that directly.
2035 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2037 * Makefile.in: Include silent-rules.mk.
2038 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2039 (COMPILE): Add ECHO_CXX.
2040 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2041 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2042 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2043 (version-generated.c): Add ECHO_GEN.
2044 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2045 (IPAGENT_COMPILE): Add ECHO_CXX.
2046 (%-generated.c): Add ECHO_REGDAT.
2048 2018-03-14 Tom Tromey <tom@tromey.com>
2051 * ax.c (ax_printf): Special case for NULL.
2053 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2055 * linux-low.c (linux_qxfer_libraries_svr4): Use
2056 xml_escape_text_append.
2058 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2060 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2062 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2064 * server.c (handle_general_set): Remove unnecessary xstrdup.
2066 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2068 * server.c (parse_debug_format_options): Adjust to
2069 delim_string_to_char_ptr_vec changes.
2070 * thread-db.c (thread_db_load_search): Adjust to
2071 dirnames_to_char_ptr_vec changes.
2073 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2075 * target.h (target_enable_btrace, target_disable_btrace)
2076 (target_read_btrace, target_read_btrace_conf): Turn macro into
2077 inline function. Throw error if target method is not defined.
2078 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2079 check for btrace target method. Be prepared to handle exceptions
2080 from btrace target methods.
2082 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2084 * server.c (captured_main): Change order of error message printed
2085 when the current working directory cannot be found.
2087 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2089 * server.c: Include "filenames.h" and "pathstuff.h".
2090 (program_name): Delete variable.
2091 (program_path): New anonymous class.
2092 (get_exec_wrapper): Use "program_path" instead of
2094 (handle_v_run): Likewise.
2095 (captured_main): Likewise.
2096 (process_serial_event): Likewise.
2098 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2100 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2101 (OBJS): Add "pathstuff.o".
2102 * server.c (current_directory): New global variable.
2103 (captured_main): Initialize "current_directory".
2105 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2107 * tdesc.c: Use common/tdesc.h.
2108 * tdesc.h: Likewise.
2110 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2111 Simon Marchi <simon.marchi@ericsson.com>
2113 * Makefile.in: Switch order of make rules.
2115 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2117 * Makefile.in: Add common directory in build.
2118 * configure.ac: Add common reference.
2119 * configure: Regenerate.
2121 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2123 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2124 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2125 * spu-low.c (spu_target_ops): Likewise.
2126 * win32-low.c (win32_target_ops): Likewise.
2127 * server.c (supported_btrace_packets): Report packets unconditionally.
2128 * target.h (target_ops) <supports_btrace>: Remove.
2129 (target_supports_btrace): Remove.
2131 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2133 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2134 (handle_btrace_disable): Change return type to void. Use exceptions
2136 (handle_btrace_general_set): Catch exception and copy message to
2139 2018-02-08 Tom Tromey <tom@tromey.com>
2141 * linux-low.c (install_software_single_step_breakpoints): Use
2142 make_scoped_restore.
2143 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2144 (do_restore_current_thread_cleanup): Remove.
2145 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2148 2018-02-08 Tom Tromey <tom@tromey.com>
2150 * mem-break.c (set_raw_breakpoint_at): Use
2151 gdb::unique_xmalloc_ptr.
2153 2018-01-30 Pedro Alves <palves@redhat.com>
2156 * target.c (target_terminal::terminal_state): Rename to ...
2157 (target_terminal::m_terminal_state): ... this.
2159 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2161 * linux-low.c (handle_extended_wait): Surround call to
2162 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2164 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2166 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2167 linux_ptrace_attach_fail_reason_string now returning an
2169 (linux_attach): Likewise.
2170 * thread-db.c (attach_thread): Likewise.
2172 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2175 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2176 checking for fs_base/gs_base fields in struct user_regs_struct.
2177 * configure: Regenerate.
2179 2018-01-16 Yao Qi <yao.qi@linaro.org>
2182 * linux-low.c (fetch_register): Call supply_register instead of
2185 2018-01-08 Yao Qi <yao.qi@linaro.org>
2186 Simon Marchi <simon.marchi@ericsson.com>
2188 * Makefile.in (OBS): Remove selftest.o.
2189 * configure.ac: Set srv_selftest_objs if $development is true.
2190 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2191 * configure: Re-generated.
2192 * server.c (captured_main): Wrap variable selftest_filter with
2195 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2197 * server.c (parse_debug_format_options): Return std::string.
2198 (handle_monitor_command, captured_main): Adjust.
2200 2018-01-05 Pedro Alves <palves@redhat.com>
2203 * server.c (captured_main): Pass quiet=false to
2204 save_original_signals_state.
2206 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2208 * gdbreplay.c (gdbreplay_version): Update copyright year in
2210 * server.c (gdbserver_version): Likewise.
2212 2017-12-08 Tom Tromey <tom@tromey.com>
2214 * ax.c (ax_printf): Update.
2216 2017-12-07 Yao Qi <yao.qi@linaro.org>
2218 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2219 aarch64_linux_read_description.
2220 * linux-amd64-ipa.c (idx2mask): New array.
2221 (get_ipa_tdesc): Move idx2mask out.
2222 (initialize_low_tracepoint): Initialize target descriptions.
2223 * linux-i386-ipa.c (idx2mask): New array.
2224 (get_ipa_tdesc): Move idx2mask out.
2225 (initialize_low_tracepoint): Initialize target descriptions.
2227 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2229 * tdesc.c (struct tdesc_type): Change return type.
2230 (tdesc_add_flag): Change parameter type.
2231 (tdesc_add_bitfield): Likewise.
2232 (tdesc_add_field): Likewise.
2233 (tdesc_set_struct_size): Likewise.
2235 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2237 * regcache.c (registers_to_string): Remove unused variable.
2239 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2241 * inferiors.c (for_each_inferior_with_data): Remove.
2242 * inferiors.h (for_each_inferior_with_data): Remove.
2243 * server.c (handle_qxfer_threads_worker): Change parameter type.
2244 (handle_qxfer_threads_proper): Use for_each_thread.
2246 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2248 * inferiors.c (for_each_inferior): Remove.
2249 (clear_inferiors): Use for_each_thread.
2250 * inferiors.h (for_each_inferior): Remove.
2251 * linux-low.c (linux_wait_for_event_filtered): Use
2253 (linux_stabilize_threads): Likewise.
2254 * regcache.c (regcache_release): Likewise.
2255 * server.c (gdb_wants_all_threads_stopped): Likewise.
2256 (clear_pending_status_callback): Remove.
2257 (handle_status): Use for_each_thread.
2258 (captured_main): Likewise.
2259 * win32-low.c (child_init_thread_list): Likewise.
2260 (win32_clear_inferiors): Likewise.
2261 (fake_breakpoint_event): Likewise.
2263 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2265 * inferiors.h (find_inferior): Remove.
2266 * inferiors.c (find_inferior): Remove.
2268 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2270 * linux-low.c (resume_status_pending_p): Update comment.
2271 (need_step_over_p): Update comment.
2273 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2275 * linux-low.c (proceed_one_lwp): Return void, change parameter
2277 (unsuspend_and_proceed_one_lwp): Likewise.
2278 (proceed_all_lwps): Use for_each_thread.
2279 (unstop_all_lwps): Likewise.
2281 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2283 * linux-low.c (linux_resume_one_thread): Return void, take
2285 (linux_resume): Use for_each_thread.
2287 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2289 * linux-low.c (send_sigstop_callback): Return void, change
2290 parameter type. Rename to...
2291 (send_sigstop): ... this.
2292 (suspend_and_send_sigstop_callback): Return void, change parameter
2294 (suspend_and_send_sigstop): ... this.
2295 (stop_all_lwps): Use for_each_thread.
2297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2299 * linux-low.c (lwp_running): Return bool, remove unused
2301 (linux_stabilize_threads): Use find_thread.
2303 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2305 * linux-low.c (select_singlestep_lwp_callback): Remove.
2306 (count_events_callback): Remove.
2307 (select_event_lwp_callback): Remove.
2308 (select_event_lwp): Use find_thread/for_each_thread.
2310 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2312 * linux-low.c (not_stopped_callback): Return bool, take filter
2314 (linux_wait_for_event_filtered): Use find_thread.
2315 (linux_wait_1): Likewise.
2317 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2319 * linux-low.c (same_lwp): Remove.
2320 (find_lwp_pid): Use find_thread.
2322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2324 * linux-low.c (delete_lwp_callback): Remove.
2325 (linux_mourn): Use for_each_thread.
2327 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2329 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2330 args parameter, don't check for pid.
2331 (linux_detach): Use for_each_thread.
2333 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2335 * linux-low.c (struct counter): Remove.
2336 (second_thread_of_pid_p): Remove.
2337 (last_thread_of_process_p): Use find_thread.
2339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2341 * inferiors.c (find_inferior_in_random): Remove.
2342 * inferiors.h (find_inferior_in_random): Remove.
2343 * linux-low.c (status_pending_p_callback): Return bool, accept
2344 parameter ptid directly.
2345 (linux_wait_for_event_filtered): Use find_thread_in_random.
2346 (linux_wait_1): Likewise.
2348 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2350 * inferiors.c (find_inferior_id): Remove.
2351 (find_thread_ptid): Move implemention from find_inferior_id to
2353 * inferiors.h (find_inferior_id): Remove.
2354 * server.c (handle_status): Use find_thread_ptid.
2355 (process_serial_event): Likewise.
2356 * thread-db.c (find_one_thread): Likewise.
2357 (thread_db_thread_handle): Likewise.
2358 * win32-low.c (thread_rec): Likewise.
2359 (child_delete_thread): Likewise.
2360 (win32_thread_alive): Likewise.
2361 (get_child_debug_event): Likewise.
2363 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2365 * linux-mips-low.c (update_watch_registers_callback): Return
2366 void, remove pid_p parameter, don't check for pid.
2367 (mips_insert_point, mips_remove_point): Use for_each_thread.
2369 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2371 * lynx.low (lynx_delete_thread_callback): Remove.
2372 (lynx_mourn): Use for_each_thread.
2374 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2376 * regcache.c (regcache_invalidate_one): Remove.
2377 (regcache_invalidate_pid): use for_each_thread.
2379 2017-11-26 Tom Tromey <tom@tromey.com>
2381 * linux-low.c (linux_create_inferior): Update.
2383 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2385 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2387 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2389 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2390 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2391 * linux-aarch64-tdesc-selftest.c: New file.
2392 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2394 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2396 * configure.srv: Add new file.
2397 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2398 * linux-aarch64-tdesc-selftest.c: New file.
2399 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2401 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2403 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2404 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2405 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2407 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2409 * configure.srv: Add new files.
2410 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2411 aarch64_linux_read_description.
2412 * linux-aarch64-low.c (aarch64_linux_read_description):
2413 Merge with aarch64_arch_setup.
2414 (aarch64_arch_setup): Call aarch64_linux_read_description.
2415 * linux-aarch64-tdesc.c: New file.
2416 * linux-aarch64-tdesc.h: New file.
2418 2017-11-24 Yao Qi <yao.qi@linaro.org>
2420 * configure.srv: Set $srv_regobj for tic6x-linux.
2421 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2422 (tic6x_read_description): Move some code to tic6x_arch_setup.
2423 (tic6x_tdesc_test): New function.
2424 (initialize_low_arch): Call selftests::register_test.
2426 2017-11-22 Yao Qi <yao.qi@linaro.org>
2428 * remote-utils.c (prepare_resume_reply): Use memcpy.
2430 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2432 * linux-low.c (kill_one_lwp_callback): Return void, take
2433 argument directly, don't filter on pid.
2434 (linux_kill): Use for_each_thread.
2436 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2438 * linux-low.c (need_step_over_p): Return bool, remove dummy
2440 (linux_resume, proceed_all_lwps): Use find_thread.
2442 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2444 * linux-low.c (resume_status_pending_p): Return bool, remove
2446 (linux_resume): Use find_thread.
2448 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2450 * linux-low.c (struct thread_resume_array): Remove.
2451 (linux_set_resume_request): Return void, take arguments
2453 (linux_resume): Use for_each_thread.
2455 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2457 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2458 return bool, remove data argument.
2459 (linux_stabilize_threads): Use find_thread.
2461 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2463 * linux-low.c (unsuspend_one_lwp): Remove.
2464 (unsuspend_all_lwps): Use for_each_thread, inline code from
2467 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2469 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2470 * linux-low.c (struct iterate_over_lwps_args): Remove.
2471 (iterate_over_lwps_filter): Remove.
2472 (iterate_over_lwps): Use find_thread.
2474 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2476 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2477 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2478 code from reset_lwp_ptrace_options_callback.
2480 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2482 * linux-arm-low.c (struct update_registers_data): Remove.
2483 (update_registers_callback): Return void, take arguments
2484 directly, don't check thread's pid.
2485 (arm_insert_point, arm_remove_point): Use for_each_thread.
2487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2489 * win32-low.c (continue_one_thread): Return void, take argument
2491 (child_continue): Use for_each_thread.
2493 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2495 * win32-i386-low.c (update_debug_registers_callback): Rename
2497 (update_debug_registers): ... this, return void, remove pid_p arg.
2498 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2500 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2502 * inferiors.h (struct process_info): Add constructor, initialize
2504 <syscalls_to_catch>: Change type to std::vector<int>.
2505 * inferiors.c (add_process): Allocate process_info with new.
2506 (remove_process): Free process_info with delete.
2507 * linux-low.c (handle_extended_wait): Adjust.
2508 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2509 * server.c (handle_general_set): Adjust.
2511 2017-11-16 Pedro Alves <palves@redhat.com>
2513 * remote-utils.c (remote_close): Block SIGIO signals instead of
2514 uninstalling the SIGIO handler.
2516 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2518 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2520 2017-11-16 Yao Qi <yao.qi@linaro.org>
2522 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2523 (tic6x_store_gregset): Likewise.
2524 (tic6x_usrregs_info): Move it up.
2526 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2528 * Makefile.in: Update arch rules.
2529 * configure.srv: Explicitly mark arch/ files.
2531 2017-11-13 Andreas Schwab <schwab@suse.de>
2533 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2537 2017-11-06 Pedro Alves <palves@redhat.com>
2539 * config.in, configure: Regenerate.
2541 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2543 * target.c (struct thread_search): Remove.
2544 (thread_search_callback): Remove.
2545 (prepare_to_access_memory): Use for_each_thread instead of
2546 find_inferior. Inline code from thread_search_callback.
2548 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2550 * server.c (struct visit_actioned_threads_data): Remove.
2551 (visit_actioned_threads): Change prototype to take arguments
2553 (resume): Use find_thread instead of find_inferior.
2555 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2557 * server.c (queue_stop_reply_callback): Change prototype, return
2559 (find_status_pending_thread_callback): Remove.
2560 (handle_status): Replace find_inferior with find_thread and
2563 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2565 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2567 (aarch64_store_gregset): Likewise.
2568 (aarch64_fill_fpregset): Likewise.
2569 (aarch64_store_fpregset): Likewise.
2571 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2573 * gdbthread.h (find_thread, for_each_thread): New functions.
2574 * inferiors.c (thread_of_pid): Remove.
2575 (find_any_thread_of_pid): Use find_thread.
2576 * linux-low.c (num_lwps): Use for_each_thread.
2578 2017-10-17 Yao Qi <yao.qi@linaro.org>
2580 * Makefile.in: Remove one rule.
2581 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2583 2017-10-17 Yao Qi <yao.qi@linaro.org>
2585 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2586 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2588 2017-10-17 Yao Qi <yao.qi@linaro.org>
2590 * configure.srv: Rename arm.o with arch/arm.o.
2592 2017-10-17 Yao Qi <yao.qi@linaro.org>
2594 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2595 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2596 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2597 (arch-i386.o, arch-amd64.o): Remove rules.
2598 (arch/%.o): New rule.
2599 Update POSTCOMPILE and COMPILE.pre.
2600 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2601 * configure: Re-generated.
2602 * configure.srv: Replace arch-i386.o with arch/i386.o.
2603 Replace arch-amd64.o with arch/amd64.o.
2605 2017-10-16 Yao Qi <yao.qi@linaro.org>
2607 * configure: Regenerated.
2609 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2611 * inferiors.h: (struct inferior_list): Remove.
2612 (struct inferior_list_entry); Remove.
2613 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2614 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2615 get_first_inferior): Remove.
2616 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2617 find_inferior_id, find_inferior_in_random): Change signature.
2618 * inferiors.c (all_threads): Change type to
2619 std::list<thread_info *>.
2620 (get_thread): Remove macro.
2621 (find_inferior, find_inferior_id): Change signature, implement
2623 (find_inferior_in_random): Change signature, implement using
2624 find_thread_in_random.
2625 (for_each_inferior, for_each_inferior_with_data): Change
2626 signature, implement using for_each_thread.
2627 (add_inferior_to_list, remove_inferior): Remove.
2628 (add_thread, get_first_thread, thread_of_pid,
2629 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2630 (get_first_inferior, one_inferior_p, clear_inferior_list):
2632 (clear_inferiors, get_thread_process): Update.
2633 * gdbthread.h: Include <list>.
2634 (struct thread_info) <entry>: Remove field.
2636 (all_threads): Change type to std::list<thread_info *>.
2637 (get_first_inferior): Add doc.
2638 (find_thread, for_each_thread, find_thread_in_random): New
2640 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2641 * linux-arm-low.c (update_registers_callback): Update.
2642 * linux-low.c (second_thread_of_pid_p): Update.
2643 (kill_one_lwp_callback, linux_detach_lwp_callback,
2644 delete_lwp_callback, status_pending_p_callback, same_lwp,
2645 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2646 iterate_over_lwps, not_stopped_callback,
2647 resume_stopped_resumed_lwps, count_events_callback,
2648 select_singlestep_lwp_callback, select_event_lwp_callback,
2649 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2650 suspend_and_send_sigstop_callback, wait_for_sigstop,
2651 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2652 lwp_running, linux_set_resume_request, resume_status_pending_p,
2653 need_step_over_p, start_step_over, linux_resume_one_thread,
2654 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2655 reset_lwp_ptrace_options_callback): Update.
2656 * linux-mips-low.c (update_watch_registers_callback): Update.
2657 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2659 (free_register_cache_thread_one): Remove.
2660 (regcache_release): Update.
2661 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2662 handle_qxfer_threads_worker): Update.
2663 (handle_query): Update, use list iterator.
2664 (visit_actioned_threads, handle_pending_status,
2665 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2666 clear_pending_status_callback, set_pending_status_callback,
2667 find_status_pending_thread_callback, handle_status,
2668 process_serial_event): Update.
2669 * target.c (thread_search_callback): Update.
2670 * thread-db.c (thread_db_get_tls_address): Update.
2671 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2673 * win32-i386-low.c (update_debug_registers_callback): Update.
2674 * win32-low.c (delete_thread_info, child_delete_thread,
2675 continue_one_thread, suspend_one_thread,
2676 get_child_debug_event): Adjust.
2678 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2680 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2681 * inferiors.h: Include <list>.
2682 (struct process_info) <entry>: Remove field.
2684 (pid_of): Change macro to function.
2685 (ptid_of, lwpid_of): Remove macro.
2686 (all_processes): Change type to std::list<process_info *>.
2687 (ALL_PROCESSES): Remove macro.
2688 (for_each_process, find_process): New function.
2689 * inferiors.c (all_processes): Change type to
2690 std::list<process_info *>.
2691 (find_thread_process): Adjust.
2692 (add_process): Likewise.
2693 (remove_process): Likewise.
2694 (find_process_pid): Likewise.
2695 (get_first_process): Likewise.
2696 (started_inferior_callback): Remove.
2697 (have_started_inferiors_p): Adjust.
2698 (attached_inferior_callback): Remove.
2699 (have_attached_inferiors_p): Adjust.
2700 * linux-low.c (check_zombie_leaders): Likewise.
2701 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2702 (x86_linux_update_xmltarget): Adjust.
2703 * server.c (handle_query): Likewise.
2704 (gdb_reattached_process): Remove.
2705 (handle_status): Adjust.
2706 (kill_inferior_callback): Likewise.
2707 (detach_or_kill_inferior): Remove.
2708 (print_started_pid): Likewise.
2709 (print_attached_pid): Likewise.
2710 (detach_or_kill_for_exit): Update.
2711 (process_serial_event): Likewise.
2712 * linux-arm-low.c (arm_new_fork): Likewise.
2714 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2716 * dll.h: Include <list>.
2717 (struct dll_info): Add constructor.
2718 <entry>: Remove field.
2719 (all_dlls): Change type to std::list<dll_info>.
2720 * dll.c: Include <algorithm>.
2721 (get_dll): Remove macro.
2722 (all_dlls): Change type to std::list<dll_info *>.
2723 (free_one_dll): Remove.
2724 (match_dll): Likewise.
2725 (loaded_dll): Adjust.
2726 (unloaded_dll): Adjust to all_dlls type change, use
2727 std::find_if. Inline code from match_dll.
2728 (clear_dlls): Adjust to all_dlls type change.
2729 * server.c (emit_dll_description): Remove.
2730 (handle_qxfer_libraries): Adjust to all_dlls type change,
2731 integrate emit_dll_description's functionality.
2733 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2735 * linux-low.h (struct linux_target_ops) <delete_process>: New
2737 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2738 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2739 (struct linux_target_ops): Add delete_process callback.
2740 * linux-arm-low.c (arm_delete_process): New.
2741 (struct linux_target_ops): Add delete_process callback.
2742 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2743 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2744 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2745 * linux-mips-low.c (mips_linux_delete_process): New.
2746 (struct linux_target_ops): Add delete_process callback.
2747 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2748 * linux-s390-low.c (struct linux_target_ops): Likewise.
2749 * linux-sh-low.c (struct linux_target_ops): Likewise.
2750 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2751 * linux-tile-low.c (struct linux_target_ops): Likewise.
2752 * linux-x86-low.c (x86_linux_delete_process): New.
2753 (struct linux_target_ops): Add delete_process callback.
2754 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2756 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2758 * linux-aarch64-low.c (the_low_target): Add thread delete
2760 * linux-arm-low.c (arm_delete_thread): New function.
2761 (the_low_target): Add thread delete callback.
2762 * linux-bfin-low.c (the_low_target): Likewise.
2763 * linux-crisv32-low.c (the_low_target): Likewise.
2764 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2766 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2768 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2769 * linux-mips-low.c (mips_linux_delete_thread): New function.
2770 (the_low_target): Add thread delete callback.
2771 * linux-ppc-low.c (the_low_target): Likewise.
2772 * linux-s390-low.c (the_low_target): Likewise.
2773 * linux-sh-low.c (the_low_target): Likewise.
2774 * linux-tic6x-low.c (the_low_target): Likewise.
2775 * linux-tile-low.c (the_low_target): Likewise.
2776 * linux-x86-low.c (the_low_target): Likewise.
2777 * linux-xtensa-low.c (the_low_target): Likewise.
2779 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2781 * win32-low.c: Include "common-inferior.h".
2783 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2785 * inferiors.c (set_inferior_cwd): New function.
2786 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2787 (handle_query): Inform that QSetWorkingDir is supported.
2788 * win32-low.c (create_process): Pass the inferior's cwd to
2791 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2793 * inferiors.c (current_inferior_cwd): New global variable.
2794 (get_inferior_cwd): New function.
2795 * inferiors.h (struct process_info) <cwd>: New field.
2797 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2799 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2800 (OBS): Add gdb_tilde_expand.o.
2802 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2804 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2805 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2807 2017-09-29 Pedro Alves <palves@redhat.com>
2809 * ax.c (gdb_parse_agent_expr): Constify.
2810 * ax.h (gdb_parse_agent_expr): Constify.
2811 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2813 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2814 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2815 * remote-utils.h (read_ptid): Constify.
2816 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2817 (process_point_options, process_serial_event): Constify.
2818 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2819 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2820 (cmd_qtbuffer): Constify.
2822 2017-09-29 Pedro Alves <palves@redhat.com>
2824 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2827 2017-09-29 Pedro Alves <palves@redhat.com>
2829 * linux-low.c (handle_extended_wait): Pass parent thread instead
2830 of process to thread_db_notice_clone.
2831 * linux-low.h (thread_db_notice_clone): Replace parent process
2832 parameter with parent thread parameter.
2833 * thread-db.c (find_one_thread): Add comment.
2834 (thread_db_notice_clone): Replace parent process parameter with
2835 parent thread parameter. Temporarily switch to the parent thread.
2837 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2839 * gdbthread.h: Include "common-gdbthread.h".
2840 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2841 "if" when validating the ptid.
2842 * remote-utils.c: Include "gdbthread.h".
2843 (prepare_resume_reply): Use "switch_to_thread".
2844 * target.c (done_accessing_memory): Likewise.
2846 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2848 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2849 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2850 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2851 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2852 s390x-gs-linux64-ipa.o to ipa_obj.
2853 * linux-s390-low.c (HWCAP_S390_GS): New define.
2854 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2856 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2857 (s390_arch_setup): Check for guarded-storage support and choose
2859 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2860 init_registers_s390x_gs_linux64.
2861 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2863 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2864 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2866 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2868 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2870 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2872 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2873 (thread_db_thread_handle): Declare.
2874 * linux-low.c (linux_target_ops): Initialize thread_handle.
2875 * server.c (handle_qxfer_threads_worker): Add support for
2877 * target.h (struct target_ops): Add new function pointer,
2879 (target_thread_handle): Define.
2880 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2882 (thread_db_thread_handle): New function.
2884 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2886 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2887 * linux-low.h (thread_db_notice_clone): Declare.
2888 * thread-db.c (thread_db_notice_clone): New function.
2890 2017-09-21 Pedro Alves <palves@redhat.com>
2892 * server.c (gdb_read_memory, handle_status, process_serial_event)
2893 (handle_serial_event, handle_target_event): Adjust to
2894 set_desired_thread prototype change.
2895 * target.c (set_desired_thread): Remove 'use_general' parameter
2897 * target.h (set_desired_thread): Remove 'use_general' parameter.
2899 2017-09-20 Tom Tromey <tom@tromey.com>
2901 * target.c (target_terminal::terminal_state): Define.
2902 (target_terminal::init): Rename from target_terminal_init.
2903 (target_terminal::inferior): Rename from
2904 target_terminal_inferior.
2905 (target_terminal::ours): Rename from target_terminal_ours.
2906 (target_terminal::ours_for_output, target_terminal::info): New.
2908 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2910 * server.c (accumulate_file_name_length): Remove.
2911 (emit_dll_description): Adjust to std::string change.
2912 (handle_qxfer_libraries): Use std::string to hold document.
2914 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2916 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2917 return type of xml_escape_text.
2918 * server.c (emit_dll_description): Likewise.
2920 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2922 * server.c (captured_main): Accept argument for --selftest.
2923 Update run_tests call.
2924 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2925 when registering selftests.
2927 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2929 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2930 instead of "VEC" for "target_desc.reg_defs".
2931 (regcache_cpy): Likewise.
2932 (registers_to_string): Likewise.
2933 (registers_from_string): Likewise.
2934 (find_regno): Likewise.
2935 (supply_regblock): Likewise.
2936 (regcache_raw_read_unsigned): Likewise.
2937 * tdesc.c (init_target_desc): Likewise.
2938 (tdesc_create_reg): Likewise.
2939 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2940 (struct target_desc) <reg_defs>: Convert to "std::vector".
2941 (target_desc): Do not initialize "reg_defs".
2942 (~target_desc): Update code to use "std::vector" instead of "VEC"
2943 for "target_desc.reg_defs".
2944 (operator==): Likewise.
2946 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2948 * inferiors.h (thread_to_gdb_id): Remove.
2949 * inferiors.c (thread_to_gdb_id): Remove.
2950 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2951 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2952 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2954 * nto-low.c (nto_fetch_registers, nto_store_registers,
2955 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2957 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2959 * inferiors.h (gdb_id_to_thread_id): Remove.
2960 * inferiors.c (gdb_id_to_thread_id): Remove.
2961 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2962 removal. Move pid declaration closer to where it's used.
2964 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2966 * server.c (handle_detach): New function.
2967 (process_serial_event): Move code out, call handle_detach.
2969 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2971 * server.c (require_running): Rename to ...
2972 (require_running_or_return): ... this ...
2973 (require_running_or_break): ... and this.
2974 (handle_query, process_serial_event): Adjust.
2976 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2978 * linux-low.c (linux_set_resume_request): Remove unused
2981 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2983 * server.c (first_thread_of): Remove.
2984 (process_serial_event): Replace usage of first_thread_of with
2985 find_any_thread_of_pid.
2986 * tracepoint.c (same_process_p): Remove.
2987 (gdb_agent_about_to_close): Replace usage of same_process_p with
2988 find_any_thread_of_pid.
2989 * linux-x86-low.c (same_process_callback): Remove.
2990 (x86_arch_setup_process_callback): Replace usage of
2991 same_process_callback with find_any_thread_of_pid.
2992 * thread-db.c (any_thread_of): Remove.
2993 (switch_to_process): Replace usage of any_thread_of with
2994 find_any_thread_of_pid.
2995 * inferiors.c (thread_pid_matches_callback): Remove.
2996 (find_thread_process): Adjust to use find_any_thread_of_pid.
2998 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3000 * regcache.c (get_thread_regcache): Guard calls to "memset"
3003 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3005 * linux-low.c (handle_extended_wait): Use
3006 "allocate_target_description" instead of "XNEW".
3007 * linux-x86-low.c (initialize_low_arch): Likewise.
3009 2017-09-05 Yao Qi <yao.qi@linaro.org>
3011 * configure.srv (srv_i386_regobj): Remove.
3012 (srv_amd64_regobj): Remove.
3013 (srv_regobj): Set it to "" for x86 non-linux targets.
3014 * linux-x86-tdesc.c (i386_linux_read_description):
3015 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3016 (init_registers_i386): Remove the declaration.
3017 (tdesc_i386): Remove the declaration.
3018 (lynx_i386_arch_setup): Call i386_create_target_description.
3019 * nto-x86-low.c: Likewise.
3020 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3021 [!__x86_64__]: include arch/i386.h.
3022 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3024 2017-09-05 Yao Qi <yao.qi@linaro.org>
3026 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3027 i386/amd64-XXX-linux from it.
3029 2017-09-05 Yao Qi <yao.qi@linaro.org>
3031 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3033 (ipa_amd64_linux_regobj): Remove.
3034 (ipa_x32_linux_regobj): Remove.
3036 2017-09-05 Yao Qi <yao.qi@linaro.org>
3038 * Makefile.in (arch-amd64.o): New rule.
3039 * configure.srv: Append arch-amd64.o.
3040 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3041 (get_ipa_tdesc): Call amd64_linux_read_description.
3042 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3043 and init_registers_amd64_XXX.
3044 * linux-x86-low.c (x86_linux_read_description): Call
3045 amd64_linux_read_description.
3046 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3047 (initialize_low_arch): Don't call init_registers_x32_XXX and
3048 init_registers_amd64_XXX.
3049 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3050 and tdesc_amd64_XXX.
3051 [__x86_64__] (amd64_tdesc_test): New function.
3052 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3053 and init_registers_amd64_XXX.
3054 * linux-x86-tdesc.c: Include arch/amd64.h.
3055 (xcr0_to_tdesc_idx): New function.
3056 (i386_linux_read_description): New function.
3057 (amd64_get_ipa_tdesc_idx): New function.
3058 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3059 (amd64_get_ipa_tdesc): Declare.
3061 2017-09-05 Yao Qi <yao.qi@linaro.org>
3063 * configure.srv (srv_i386_linux_xmlfiles): Remove
3064 i386/i386-XXX-linux.xml from it.
3066 2017-09-05 Yao Qi <yao.qi@linaro.org>
3068 * configure.srv: Set srv_i386_linux_regobj empty if $development
3070 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3071 initialize_low_tdesc.
3072 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3073 with #if initialize_low_tdesc.
3074 * linux-x86-tdesc-selftest.c: New file.
3075 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3077 2017-09-05 Yao Qi <yao.qi@linaro.org>
3079 * Makefile.in (arch-i386.o): New rule.
3080 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3081 (x86_64-*-linux*): Likewise.
3082 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3083 include arch/i386.h.
3084 (i386_linux_read_description): Remove code and call
3085 i386_create_target_description.
3086 * tdesc.c (allocate_target_description): New function.
3087 * tdesc.h (set_tdesc_architecture): Remove declaration.
3088 (set_tdesc_osabi): Likewise.
3090 2017-09-05 Yao Qi <yao.qi@linaro.org>
3092 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3093 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3094 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3096 * server.c (get_features_xml): Call tdesc_get_features_xml.
3097 * tdesc.c (set_tdesc_architecture): New function.
3098 (set_tdesc_osabi): New function.
3099 (tdesc_get_features_xml): New function.
3100 (tdesc_create_feature): Add an argument.
3101 * tdesc.h (struct target_desc) <features>: New field.
3102 <arch, osabi>: New field.
3103 (~target_desc): xfree features, arch, and osabi.
3104 (target_desc::oerator==): Don't compare .xmltarget.
3105 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3106 (set_tdesc_osabi): Likewise.
3107 (tdesc_get_features_xml): Likewise.
3109 2017-09-05 Yao Qi <yao.qi@linaro.org>
3111 * linux-x86-tdesc.c: Include selftest.h.
3112 (i386_tdesc_test): New function.
3113 (initialize_low_tdesc): Call selftests::register_test.
3114 * tdesc.h: Include regdef.h.
3115 (target_desc): Override operator == and !=.
3117 2017-09-05 Yao Qi <yao.qi@linaro.org>
3119 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3120 (ipa_obj): Likewise.
3121 * linux-i386-ipa.c: Include common/x86-xstate.h
3122 (get_ipa_tdesc): Call i386_linux_read_description.
3123 (initialize_low_tracepoint): Don't call init_registers_XXX
3124 functions, call initialize_low_tdesc instead.
3125 * linux-x86-low.c (x86_linux_read_description): Call
3126 i386_linux_read_description.
3127 (initialize_low_arch): Don't call init_registers_i386_XXX
3128 functions, call initialize_low_tdesc.
3129 * linux-x86-tdesc.c: New file.
3130 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3131 (i386_get_ipa_tdesc_idx): Declare.
3132 (i386_get_ipa_tdesc): Declare.
3133 (initialize_low_tdesc): Declare.
3135 2017-09-05 Yao Qi <yao.qi@linaro.org>
3137 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3140 2017-09-05 Yao Qi <yao.qi@linaro.org>
3142 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3143 * regcache.c (get_thread_regcache): Use VEC_length.
3144 (init_register_cache): Likewise.
3145 (regcache_cpy): Likewise.
3146 (registers_to_string): Iterate reg_defs via VEC_iterate.
3147 (find_regno): Likewise.
3148 (find_register_by_number): Use VEC_index.
3149 (register_size): Call find_register_by_number.
3150 (register_data): Call find_register_by_number.
3151 (supply_regblock): Use VEC_length.
3152 (regcache_raw_read_unsigned): Likewise.
3153 * tdesc.c (init_target_desc): Iterate reg_defs via
3155 (default_description): Update initializer.
3156 (copy_target_description): Don't update field num_registers.
3157 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3158 <num_registers>: Remove.
3160 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3162 * Makefile.in (.SECONDARY): Define target.
3164 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3166 * linux-low.c (linux_wait_1): Adjust.
3167 * server.c (queue_stop_reply_callback): Adjust.
3169 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3171 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3172 QEnvironmentUnset and QEnvironmentReset packets.
3173 (handle_query): Inform remote that QEnvironmentHexEncoded,
3174 QEnvironmentUnset and QEnvironmentReset are supported.
3176 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3178 * inferiors.h (inferior_target_data): Rename to ...
3179 (thread_target_data): ... this.
3180 (inferior_regcache_data): Rename to ...
3181 (thread_regcache_data): ... this.
3182 (set_inferior_regcache_data): Rename to ...
3183 (set_thread_regcache_data): ... this.
3184 * inferiors.c (inferior_target_data): Rename to ...
3185 (thread_target_data): ... this.
3186 (inferior_regcache_data): Rename to ...
3187 (thread_regcache_data): ... this.
3188 (set_inferior_regcache_data): Rename to ...
3189 (set_thread_regcache_data): ... this.
3190 (free_one_thread): Update.
3191 * linux-low.h (get_thread_lwp): Update.
3192 * regcache.c (get_thread_regcache): Update.
3193 (regcache_invalidate_thread): Update.
3194 (free_register_cache_thread): Update.
3195 * win32-i386-low.c (update_debug_registers_callback): Update.
3196 (win32_get_current_dr): Update.
3197 * win32-low.c (thread_rec): Update.
3198 (delete_thread_info): Update.
3199 (continue_one_thread): Update.
3200 (suspend_one_thread): Update.
3202 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3204 * inferiors.c (set_inferior_target_data): Remove.
3205 * inferiors.h (set_inferior_target_data): Remove.
3207 2017-08-18 Yao Qi <yao.qi@linaro.org>
3209 * Makefile.in (OBS): Add selftest.o.
3210 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3211 * configure, config.in: Re-generated.
3212 * server.c: Include common/sefltest.h.
3213 (captured_main): Handle option --selftest.
3215 2017-08-09 Yao Qi <yao.qi@linaro.org>
3217 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3218 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3219 i386-avx-mpx.o and i386-mmx.o.
3220 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3221 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3222 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3223 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3224 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3225 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3226 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3227 i386/amd64-avx-mpx.xml.
3229 2017-08-09 Yao Qi <yao.qi@linaro.org>
3231 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3232 and x32-avx-avx512.o.
3233 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3234 i386/x32-avx-avx512.xml.
3236 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3238 * tracepoint.h (enum class fast_tpoint_collect_result): New
3240 (fast_tracepoint_collecting): Change return type to
3241 fast_tpoint_collect_result.
3242 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3243 * linux-low.h: Include tracepoint.h.
3244 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3245 fast_tpoint_collect_result.
3246 * linux-low.c (handle_tracepoints): Adjust.
3247 (linux_fast_tracepoint_collecting): Change return type to
3248 fast_tpoint_collect_result.
3249 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3250 linux_wait_1, stuck_in_jump_pad_callback,
3251 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3252 proceed_one_lwp): Adjust to type change.
3254 2017-07-10 Yao Qi <yao.qi@linaro.org>
3256 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3258 2017-06-29 Yao Qi <yao.qi@linaro.org>
3260 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3262 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3264 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3266 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3268 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3270 * linux-low.c (linux_create_inferior): Adjust code to access the
3271 environment information via 'gdb_environ' class.
3272 * lynx-low.c (lynx_create_inferior): Likewise.
3273 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3274 (get_environ): Return a pointer to 'our_environ'.
3275 (captured_main): Initialize 'our_environ'.
3276 * server.h (get_environ): Adjust prototype.
3277 * spu-low.c (spu_create_inferior): Adjust code to access the
3278 environment information via 'gdb_environ' class.
3280 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3282 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3283 usage of "register" keyword.
3285 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3287 * configure: Re-generate.
3289 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3291 * configure: Re-generate.
3293 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3295 * Makefile.in (COMPILE.pre): Add "-x c++".
3297 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3299 * fork-child.c: Conditionally include <signal.h>.
3301 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3303 * server.c (handle_general_set): Handle new packet
3304 "QStartupWithShell".
3305 (handle_query): Add "QStartupWithShell" to the list of supported
3307 (gdbserver_usage): Add help text explaining the
3308 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3310 (captured_main): Recognize and act upon the presence of the new
3313 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3314 Pedro Alves <palves@redhat.com>
3316 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3317 * configure: Regenerate.
3318 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3320 (i[34567]86-*-lynxos*): Likewise.
3321 (spu*-*-*): Likewise.
3322 * fork-child.c: New file.
3323 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3325 (linux_ptrace_fun): New function.
3326 (linux_create_inferior): Adjust function prototype to reflect
3327 change on "target.h". Adjust function code to use
3329 (linux_request_interrupt): Delete "signal_pid".
3330 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3331 (lynx_ptrace_fun): New function.
3332 (lynx_create_inferior): Adjust function prototype to reflect
3333 change on "target.h". Adjust function code to use
3335 * nto-low.c (nto_create_inferior): Adjust function prototype and
3336 code to reflect change on "target.h". Update comments.
3337 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3338 "common-terminal.h" and "environ.h".
3339 (terminal_fd): Moved to fork-child.c.
3340 (old_foreground_pgrp): Likewise.
3341 (restore_old_foreground_pgrp): Likewise.
3342 (last_status): Make it global.
3343 (last_ptid): Likewise.
3344 (our_environ): New variable.
3345 (startup_with_shell): Likewise.
3346 (program_name): Likewise.
3347 (program_argv): Rename to...
3348 (program_args): ...this.
3349 (wrapper_argv): New variable.
3350 (start_inferior): Delete function.
3351 (get_exec_wrapper): New function.
3352 (get_exec_file): Likewise.
3353 (get_environ): Likewise.
3354 (prefork_hook): Likewise.
3355 (post_fork_inferior): Likewise.
3356 (postfork_hook): Likewise.
3357 (postfork_child_hook): Likewise.
3358 (handle_v_run): Update code to deal with arguments coming from the
3359 remote host. Update calls from "start_inferior" to
3361 (captured_main): Likewise. Initialize environment variable. Call
3363 * server.h (post_fork_inferior): New prototype.
3364 (get_environ): Likewise.
3365 (last_status): Declare.
3366 (last_ptid): Likewise.
3367 (signal_pid): Likewise.
3368 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3369 (spu_ptrace_fun): New function.
3370 (spu_create_inferior): Adjust function prototype to reflect change
3371 on "target.h". Adjust function code to use "fork_inferior".
3372 * target.c (target_terminal_init): New function.
3373 (target_terminal_inferior): Likewise.
3374 (target_terminal_ours): Likewise.
3375 * target.h: Include <vector>.
3376 (struct target_ops) <create_inferior>: Update prototype.
3377 (create_inferior): Update macro.
3378 * utils.c (gdb_flush_out_err): New function.
3379 * win32-low.c (win32_create_inferior): Adjust function prototype
3380 and code to reflect change on "target.h".
3382 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3384 * inferiors.c (switch_to_thread): New function.
3386 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3388 * Makefile.in (SFILE): Add "common/job-control.c".
3389 (OBS): Add "job-control.o".
3391 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3393 * Makefile: Remove "@host_makefile_frag@".
3395 2017-05-05 Pedro Alves <palves@redhat.com>
3397 * configure: Regenerate.
3399 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3401 * configure: Regenerate.
3403 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3405 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3406 software_single_step change of return type to
3407 std::vector<CORE_ADDR>.
3408 * linux-low.c (install_software_single_step_breakpoints):
3410 * linux-low.h (install_software_single_step_breakpoints):
3413 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3415 * remote-utils.c: Include "gdb_termios.h" instead of
3417 * terminal.h: Delete file.
3419 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3421 * server.c: Include <vector>.
3422 <program_argv, wrapper_argv>: Convert to std::vector.
3423 (start_inferior): Rewrite function to use C++.
3424 (handle_v_run): Likewise. Update code that calculates the argv
3425 based on the vRun packet; use C++.
3426 (captured_main): Likewise.
3428 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3430 * server.c (handle_v_cont): Initialize thread_resume::thread
3433 2017-04-05 Pedro Alves <palves@redhat.com>
3435 * configure: Regenerate.
3437 2017-04-05 Pedro Alves <palves@redhat.com>
3439 * gdbreplay.c (sync_error): Constify.
3440 * linux-x86-low.c (push_opcode): Constify.
3442 2017-04-05 Pedro Alves <palves@redhat.com>
3444 * win32-low.c (get_child_debug_event)
3445 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3446 Report TARGET_WAITKIND_SPURIOUS instead.
3448 2017-04-05 Pedro Alves <palves@redhat.com>
3450 * remote-utils.c (remote_prepare, remote_open): Constify.
3451 * remote-utils.h (remote_prepare, remote_open): Constify.
3452 * server.c (captured_main): Constify 'port' handling.
3454 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3456 * Makefile.in (clean): Clear .deps.
3458 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3460 * .gitignore: Remove generated files, replace with wildcard.
3461 * (clean): Replace removal of generated files with wildcard.
3462 (version.c): Replace with...
3463 (version-generated.c): ...this.
3464 (xml-builtin.c): Replace with...
3465 (xml-builtin-generated.c): ...this.
3466 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3467 (%.c: *regformats*): Replace with...
3468 (%-generated.c: *regformats*): ...this.
3470 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3472 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3473 (xtensa_fill_gregset): Call collect_register_by_name for
3475 (xtensa_store_gregset): Call supply_register_by_name for
3478 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3480 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3481 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3482 (xtensa_store_gregset): Call supply_register for all registers in
3483 a0_regnum..a0_regnum + C0_NREGS range.
3485 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3487 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3488 (ax-ipa.o: ax.c): Remove.
3489 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3490 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3491 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3492 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3493 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3495 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3497 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3498 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3499 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3500 (errors-ipa.o: ../common/errors.c): Remove.
3501 (format-ipa.o: ../common/format.c): Remove.
3502 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3504 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3506 * Makefile.in (%-ipa.o: %.c): New rule.
3507 (tracepoint-ipa.o: tracepoint.c): Remove.
3508 (utils-ipa.o: utils.c): Remove.
3509 (remote-utils-ipa.o: remote-utils.c): Remove.
3510 (regcache-ipa.o: regcache.c): Remove.
3511 (i386-linux-ipa.o: i386-linux.c): Remove.
3512 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3513 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3514 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3515 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3516 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3517 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3518 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3519 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3520 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3521 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3522 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3523 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3524 (aarch64-ipa.o: aarch64.c): Remove.
3525 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3526 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3527 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3528 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3529 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3530 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3531 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3532 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3533 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3534 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3535 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3536 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3537 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3538 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3539 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3540 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3541 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3542 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3543 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3544 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3545 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3546 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3547 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3548 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3549 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3550 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3551 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3552 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3553 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3554 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3555 (tdesc-ipa.o: tdesc.c): Remove.
3556 (x32-linux-ipa.o: x32-linux.c): Remove.
3557 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3558 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3560 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3562 * Makefile.in (%.o: ../arch/%.c): New rule.
3563 (arm.o: ../arch/arm.c): Remove.
3564 (arm-linux.o: ../arch/arm-linux.c): Remove.
3565 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3566 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3568 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3570 * Makefile.in (%.o: ../nat/%.c): New rule.
3571 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3572 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3573 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3574 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3575 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3576 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3577 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3578 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3579 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3580 (linux-personality.o: ../nat/linux-personality.c): Remove.
3581 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3582 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3583 (x86-linux.o: ../nat/x86-linux.c): Remove.
3584 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3585 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3587 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3589 * Makefile.in (%.o: ../common/%.c): New rule.
3590 (signals.o: ../common/signals.c): Remove.
3591 (print-utils.o: ../common/print-utils.c): Remove.
3592 (rsp-low.o: ../common/rsp-low.c): Remove.
3593 (common-utils.o: ../common/common-utils.c): Remove.
3594 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3595 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3596 (vec.o: ../common/vec.c): Remove.
3597 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3598 (xml-utils.o: ../common/xml-utils.c): Remove.
3599 (ptid.o: ../common/ptid.c): Remove.
3600 (buffer.o: ../common/buffer.c): Remove.
3601 (format.o: ../common/format.c): Remove.
3602 (filestuff.o: ../common/filestuff.c): Remove.
3603 (agent.o: ../common/agent.c): Remove.
3604 (errors.o: ../common/errors.c): Remove.
3605 (environ.o: ../common/environ.c): Remove.
3606 (common-debug.o: ../common/common-debug.c): Remove.
3607 (cleanups.o: ../common/cleanups.c): Remove.
3608 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3609 (fileio.o: ../common/fileio.c): Remove.
3610 (common-regcache.o: ../common/common-regcache.c): Remove.
3611 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3612 (new-op.o: ../common/new-op.c): Remove.
3613 (btrace-common.o: ../common/btrace-common.c): Remove.
3615 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3617 * Makefile.in (%.o: ../target/%.c): New rule.
3618 (waitstatus.o: ../target/waitstatus.c): Remove.
3620 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3623 (%.c: ../regformats/%.dat,
3624 (%.c: ../regformats/arm/%.dat,
3625 (%.c: ../regformats/i386/%.dat,
3626 (%.c: ../regformats/rs6000/%.dat): New rules.
3627 (aarch64.c): Remove.
3628 (reg-arm.c): Remove.
3629 (arm-with-iwmmxt.c): Remove.
3630 (arm-with-vfpv2.c): Remove.
3631 (arm-with-vfpv3.c): Remove.
3632 (arm-with-neon.c): Remove.
3633 (reg-bfin.c): Remove.
3634 (reg-cris.c): Remove.
3635 (reg-crisv32.c): Remove.
3637 (i386-linux.c): Remove.
3638 (i386-avx.c): Remove.
3639 (i386-avx-linux.c): Remove.
3640 (i386-avx-avx512.c): Remove.
3641 (i386-avx-avx512-linux.c): Remove.
3642 (i386-mpx.c): Remove.
3643 (i386-mpx-linux.c): Remove.
3644 (i386-avx-mpx-avx512-pku.c): Remove.
3645 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3646 (i386-avx-mpx.c): Remove.
3647 (i386-avx-mpx-linux.c): Remove.
3648 (i386-mmx.c): Remove.
3649 (i386-mmx-linux.c): Remove.
3650 (reg-ia64.c): Remove.
3651 (reg-m32r.c): Remove.
3652 (reg-m68k.c): Remove.
3654 (mips-linux.c): Remove.
3655 (mips-dsp-linux.c): Remove.
3656 (mips64-linux.c): Remove.
3657 (mips64-dsp-linux.c): Remove.
3658 (nios2-linux.c): Remove.
3659 (powerpc-32.c): Remove.
3660 (powerpc-32l.c): Remove.
3661 (powerpc-altivec32l.c): Remove.
3662 (powerpc-cell32l.c): Remove.
3663 (powerpc-vsx32l.c): Remove.
3664 (powerpc-isa205-32l.c): Remove.
3665 (powerpc-isa205-altivec32l.c): Remove.
3666 (powerpc-isa205-vsx32l.c): Remove.
3667 (powerpc-e500l.c): Remove.
3668 (powerpc-64l.c): Remove.
3669 (powerpc-altivec64l.c): Remove.
3670 (powerpc-cell64l.c): Remove.
3671 (powerpc-vsx64l.c): Remove.
3672 (powerpc-isa205-64l.c): Remove.
3673 (powerpc-isa205-altivec64l.c): Remove.
3674 (powerpc-isa205-vsx64l.c): Remove.
3675 (s390-linux32.c): Remove.
3676 (s390-linux32v1.c): Remove.
3677 (s390-linux32v2.c): Remove.
3678 (s390-linux64.c): Remove.
3679 (s390-linux64v1.c): Remove.
3680 (s390-linux64v2.c): Remove.
3681 (s390-te-linux64.c): Remove.
3682 (s390-vx-linux64.c): Remove.
3683 (s390-tevx-linux64.c): Remove.
3684 (s390x-linux64.c): Remove.
3685 (s390x-linux64v1.c): Remove.
3686 (s390x-linux64v2.c): Remove.
3687 (s390x-te-linux64.c): Remove.
3688 (s390x-vx-linux64.c): Remove.
3689 (s390x-tevx-linux64.c): Remove.
3690 (tic6x-c64xp-linux.c): Remove.
3691 (tic6x-c64x-linux.c): Remove.
3692 (tic6x-c62x-linux.c): Remove.
3694 (reg-sparc64.c): Remove.
3695 (reg-spu.c): Remove.
3697 (amd64-linux.c): Remove.
3698 (amd64-avx.c): Remove.
3699 (amd64-avx-linux.c): Remove.
3700 (amd64-avx-avx512.c): Remove.
3701 (amd64-avx-avx512-linux.c): Remove.
3702 (amd64-mpx.c): Remove.
3703 (amd64-mpx-linux.c): Remove.
3704 (amd64-avx-mpx-avx512-pku.c): Remove.
3705 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3706 (amd64-avx-mpx.c): Remove.
3707 (amd64-avx-mpx-linux.c): Remove.
3709 (x32-linux.c): Remove.
3710 (x32-avx.c): Remove.
3711 (x32-avx-linux.c): Remove.
3712 (x32-avx-avx512.c): Remove.
3713 (x32-avx-avx512-linux.c): Remove.
3714 (reg-xtensa.c): Remove.
3715 (reg-tilegx.c): Remove.
3716 (reg-tilegx32.c): Remove.
3718 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3720 * Makefile.in (SFILES): Add "common/environ.c".
3721 (OBJS): Add "common/environ.h".
3723 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3725 * configure.ac: Check if the fs_base and gs_base members of
3726 `struct user_regs_struct' exist.
3727 * config.in: Regenerated.
3728 * configure: Likewise.
3730 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3732 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3734 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3735 (get_next_pcs_syscall_next_pc): Likewise.
3737 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3739 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3740 * nto-x86-low.c: Likewise.
3742 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3744 * Makefile.in: Include disable-implicit-rules.mk.
3746 2016-11-23 Pedro Alves <palves@redhat.com>
3748 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3749 (debug_vprintf): Use std::chrono::steady_clock instead of
3750 gettimeofday. Use '.' instead of ':'.
3751 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3752 (get_timestamp): Use std::chrono::steady_clock instead of
3755 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3757 * Makefile.in: Fix whitespace formatting.
3759 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3761 * Makefile.in (SFILES, OBS): Flatten list and order
3764 2016-11-23 Pedro Alves <palves@redhat.com>
3766 * event-loop.c (handle_file_event): Use warning.
3767 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3768 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3771 2016-11-23 Pedro Alves <palves@redhat.com>
3773 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3775 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3776 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3777 debug_printf and debug_flush for debug output.
3778 * server.c (handle_general_set): Likewise.
3779 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3782 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3784 * Makefile.in (.c.o): Replace rule with ...
3785 (%.o: %.c): ... this one.
3787 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3789 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3790 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3792 * configure.ac: Remove checks for the make program.
3793 * configure: Re-generate.
3795 2016-10-28 Pedro Alves <palves@redhat.com>
3797 * Makefile.in (CXX_DIALECT): Get from configure.
3798 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3799 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3800 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3801 * config.in: Regenerate.
3802 * configure: Regenerate.
3804 2016-10-27 Yao Qi <yao.qi@linaro.org>
3806 * linux-low.c (linux_supports_range_stepping): Return true if
3807 can_software_single_step return true.
3809 2016-10-27 Yao Qi <yao.qi@linaro.org>
3811 * inferiors.c (find_inferior_in_random): New function.
3812 * inferiors.h (find_inferior_in_random): Declare.
3813 * linux-low.c (linux_wait_for_event_filtered): Call
3814 find_inferior_in_random instead of find_inferior.
3816 2016-10-27 Yao Qi <yao.qi@linaro.org>
3818 * linux-low.c (linux_wait_1): If single-step breakpoints are
3819 inserted, remove them.
3821 2016-10-26 Pedro Alves <palves@redhat.com>
3823 * linux-low.c (handle_extended_wait): Link parent/child fork
3825 (linux_wait_1): Unlink them.
3826 (linux_set_resume_request): Ignore resume requests for
3827 already-resumed and unhandled fork child threads.
3828 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3829 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3831 (handle_v_requests) <vCont>: Don't call require_running.
3832 * server.h (in_queued_stop_replies): New declaration.
3834 2016-10-24 Yao Qi <yao.qi@linaro.org>
3837 * linux-aarch64-low.c (append_insns): Cast the return value to
3840 2016-10-10 Yao Qi <yao.qi@linaro.org>
3842 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3844 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3846 * target.c (target_supports_multi_process): New function, moved
3848 * target.h (target_supports_multi_process): ... here. Remove
3851 2016-10-05 Tom Tromey <tom@tromey.com>
3854 * tracepoint.c (handle_tracepoint_bkpts): Check
3855 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3857 2016-10-05 Yao Qi <yao.qi@linaro.org>
3859 * configure.srv: Update the path of arm-*.xml files.
3861 2016-10-05 Terry Guo <terry.guo@arm.com>
3862 Yao Qi <yao.qi@linaro.org>
3864 * Makefile.in: Adjust the path of rules.
3865 * configure.srv: Update the path of xml files.
3866 * regformats/arm-with-iwmmxt.dat: Regenerated.
3867 * regformats/arm-with-neon.dat: Likewise.
3868 * regformats/arm-with-vfpv2.dat: Likewise.
3869 * regformats/arm-with-vfpv3.dat Likewise.
3871 2016-09-30 Yao Qi <yao.qi@linaro.org>
3874 * target.c (target_stop_and_wait): Don't call
3875 target_continue_no_signal, use resume_stop instead.
3877 2016-09-26 Yao Qi <yao.qi@linaro.org>
3879 * linux-low.c (linux_wait_1): Call debug_exit.
3881 2016-09-23 Pedro Alves <palves@redhat.com>
3883 * Makefile.in (SFILES): Add common/new-op.c.
3884 (OBS): Add common/new-op.o.
3885 (new-op.o): New rule.
3887 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3889 * .gitinore: Ignore more files.
3891 2016-09-21 Yao Qi <yao.qi@linaro.org>
3893 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3896 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3898 * server.c (start_inferior): Call target_mourn_inferior instead of
3899 mourn_inferior; pass ptid_t argument to it.
3901 (handle_target_event): Likewise.
3902 * target.c (target_mourn_inferior): New function.
3903 * target.h (mourn_inferior): Delete macro.
3905 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3907 * linux-low.c (lwp_is_stepping): New function.
3909 2016-09-06 Carl Love <cel@us.ibm.com>
3911 * server.c (start_inferior): Fixed comment, requested comment change
3912 didn't get updated correctly. Removed reference to ptrace () call as
3913 it is only true on Linux systems.
3915 2016-09-06 Carl Love <cel@us.ibm.com>
3917 * server.c (start_inferior): Do not call
3918 function target_post_create_inferior () if the
3919 inferior process has already exited.
3921 2016-09-05 Pedro Alves <palves@redhat.com>
3923 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3924 (COMPILE.pre, CC_LD): Use CXX directly.
3925 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3926 * acinclude.m4: Don't include build-with-cxx.m4.
3927 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3928 * configure: Regenerate.
3930 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3933 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3934 call writing data to own_buf.
3936 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3938 * target.c (mywait): Call target_wait instead of
3940 (target_wait): New function.
3942 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3944 * server.c (start_inferior): New variable 'ptid'. Replace calls
3945 to the_target->resume by target_continue{,_no_signal}, depending
3947 * target.c (target_stop_and_wait): Call target_continue_no_signal
3948 instead of the_target->resume.
3949 (target_continue): New function.
3951 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3953 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3955 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3958 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3960 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3961 * linux-arm-low.c (ps_get_thread_area): Likewise.
3962 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3963 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3964 * linux-mips-low.c (ps_get_thread_area): Likewise.
3965 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3966 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3967 * linux-x86-low.c (ps_get_thread_area): Likewise.
3968 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3970 2016-08-19 Pedro Alves <palves@redhat.com>
3972 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3974 2016-08-19 Pedro Alves <palves@redhat.com>
3976 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3977 comment. Use memcpy instead of casting through unsigned long.
3979 2016-08-19 Pedro Alves <palves@redhat.com>
3981 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3982 allocating around 0x80000000.
3984 2016-08-19 Pedro Alves <palves@redhat.com>
3987 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3988 (x32-avx512-linux-ipa.o): New rules.
3989 * configure.ac (x86_64-*-linux*): New x32 check.
3990 * configure.srv (ipa_x32_linux_regobj): New.
3991 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3992 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3994 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3996 * configure: Regenerate.
3998 2016-08-09 Pedro Alves <palves@redhat.com>
4001 * Makefile.in (OBS): Add signals-state-save-restore.o.
4002 (signals-state-save-restore.o): New rule.
4003 * config.in: Regenerate.
4004 * configure: Regenerate.
4005 * linux-low.c: Include "signals-state-save-restore.h".
4006 (linux_create_inferior): Call
4007 restore_original_signals_state.
4008 * server.c: Include "dispositions-save-restore.h".
4009 (captured_main): Call save_original_signals_state.
4011 2016-08-05 Pedro Alves <palves@redhat.com>
4013 * configure: Regenerate.
4015 2016-08-04 Yao Qi <yao.qi@linaro.org>
4017 * linux-low.c (regsets_fetch_inferior_registers): Check
4018 errno is ESRCH or not.
4020 2016-08-02 Yao Qi <yao.qi@linaro.org>
4022 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4023 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4024 (thread_db_load_search): Update.
4025 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4026 td_ta_set_event and td_ta_event_getmsg.
4028 2016-07-26 Pedro Alves <palves@redhat.com>
4031 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4032 of unsigned long for 64-bit registers and use uint32_t instead of
4033 unsigned int for 32-bit registers.
4035 2016-07-26 Pedro Alves <palves@redhat.com>
4037 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4040 2016-07-21 Tom Tromey <tom@tromey.com>
4042 * configure: Rebuild.
4044 2016-07-21 Yao Qi <yao.qi@linaro.org>
4046 * mem-break.c (find_gdb_breakpoint): Cast bp to
4047 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4049 2016-07-21 Yao Qi <yao.qi@linaro.org>
4051 * server.c (handle_v_requests): Support s and S actions
4052 if target_supports_software_single_step return true.
4054 2016-07-21 Yao Qi <yao.qi@linaro.org>
4056 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4057 is resume_step, call maybe_hw_step.
4058 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4060 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4062 (proceed_one_lwp): If resume request is resume_step, install
4063 reinsert breakpoints and call maybe_hw_step.
4065 2016-07-21 Yao Qi <yao.qi@linaro.org>
4067 * linux-low.c (proceed_one_lwp): Declare.
4068 (linux_resume_one_thread): Remove local variable 'step'.
4069 Lift code enqueue signal. Call proceed_one_lwp instead of
4070 linux_resume_one_lwp.
4072 2016-07-21 Yao Qi <yao.qi@linaro.org>
4074 * linux-low.c (linux_resume_one_thread): Call
4075 enqueue_pending_signal.
4077 2016-07-21 Yao Qi <yao.qi@linaro.org>
4079 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4080 * inferiors.c (do_restore_current_thread_cleanup): New function.
4081 (make_cleanup_restore_current_thread): Likewise.
4082 * linux-low.c (install_software_single_step_breakpoints): Call
4083 make_cleanup_restore_current_thread. Switch current_thread to
4086 2016-07-21 Yao Qi <yao.qi@linaro.org>
4088 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4089 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4090 (clone_one_breakpoint): Likewise.
4091 (delete_reinsert_breakpoints): Change parameter to thread.
4093 (has_reinsert_breakpoints): Likewise.
4094 (uninsert_reinsert_breakpoints): Likewise.
4095 (reinsert_reinsert_breakpoints): Likewise.
4096 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4097 (delete_reinsert_breakpoints): Likewise.
4098 (reinsert_reinsert_breakpoints): Likewise.
4099 (uninsert_reinsert_breakpoints): Likewise.
4100 (has_reinsert_breakpoints): Likewise.
4102 2016-07-21 Yao Qi <yao.qi@linaro.org>
4104 * inferiors.c (get_thread_process): Make parameter const.
4105 * inferiors.h (get_thread_process): Update declaration.
4106 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4107 Add new parameters child_thread and parent_thread. Callers
4109 * mem-break.h (clone_all_breakpoints): Update declaration.
4111 2016-07-21 Yao Qi <yao.qi@linaro.org>
4113 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4114 <command_list, handler>: Remove.
4115 (struct gdb_breakpoint): New.
4116 (struct other_breakpoint): New.
4117 (struct reinsert_breakpoint): New.
4118 (is_gdb_breakpoint): New function.
4119 (any_persistent_commands): Update command_list if
4120 is_gdb_breakpoint returns true.
4121 (set_breakpoint): Create breakpoints according to their types.
4122 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4123 (set_gdb_breakpoint_1): Likewise.
4124 (set_gdb_breakpoint): Likewise.
4125 (clear_breakpoint_conditions): Change parameter type to
4126 'struct gdb_breakpoint *'.
4127 (clear_breakpoint_commands): Likewise.
4128 (clear_breakpoint_conditions_and_commands): Likewise.
4129 (add_condition_to_breakpoint): Likewise.
4130 (add_breakpoint_condition): Likewise.
4131 (add_commands_to_breakpoint): Likewise.
4132 (check_breakpoints): Check other_breakpoint.
4133 (clone_one_breakpoint): Clone breakpopint according to its type.
4134 * mem-break.h (struct gdb_breakpoint): Declare.
4135 (set_gdb_breakpoint): Update declaration.
4136 (clear_breakpoint_conditions_and_commands): Likewise.
4137 (add_breakpoint_condition): Likewise.
4138 (add_breakpoint_commands): Likewise.
4139 * server.c (process_point_options): Change parameter type to
4140 'struct gdb_breakpoint *'.
4142 2016-07-21 Yao Qi <yao.qi@linaro.org>
4144 * mem-break.c (set_breakpoint_at): Rename it to ...
4145 (set_breakpoint_type_at): ... it.
4146 (set_breakpoint_at): Call set_breakpoint_type_at.
4147 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4148 * mem-break.h (set_breakpoint_at): Update comments.
4150 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4152 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4154 (nios2_store_gregset): Likewise.
4156 2016-07-01 Pedro Alves <palves@redhat.com>
4157 Antoine Tremblay <antoine.tremblay@ericsson.com>
4159 * linux-low.c: Change interface to take the target lwp_info
4160 pointer directly and return void. Handle detaching from a zombie
4162 (linux_detach_lwp_callback): New function.
4163 (linux_detach): Detach from the leader thread after detaching from
4166 2016-06-28 Yao Qi <yao.qi@linaro.org>
4168 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4169 for variable new_offset.
4170 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4171 (aarch64_ftrace_insn_reloc_cb): Likewise.
4172 (aarch64_ftrace_insn_reloc_tb): Likewise.
4173 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4174 PRIx64 instead of PRIx32.
4176 2016-06-28 Yao Qi <yao.qi@linaro.org>
4178 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4179 (the_low_target): Install arm_get_syscall_trapinfo.
4181 2016-06-28 Yao Qi <yao.qi@linaro.org>
4183 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4185 (the_low_target): Install aarch64_get_syscall_trapinfo.
4187 2016-06-28 Yao Qi <yao.qi@linaro.org>
4189 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4191 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4192 Remove parameter sysno.
4193 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4196 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4198 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4199 (s390_emit_ne_goto): Likewise.
4200 (s390_emit_lt_goto): Likewise.
4201 (s390_emit_le_goto): Likewise.
4202 (s390_emit_gt_goto): Likewise.
4203 (s390_emit_ge_goto): Likewise.
4204 (s390x_emit_eq_goto): Likewise.
4205 (s390x_emit_ne_goto): Likewise.
4206 (s390x_emit_lt_goto): Likewise.
4207 (s390x_emit_le_goto): Likewise.
4208 (s390x_emit_gt_goto): Likewise.
4209 (s390x_emit_ge_goto): Likewise.
4210 (s390_emit_ops_impl): Mark variable static.
4211 (s390x_emit_ops): Likewise.
4213 2016-06-17 Yao Qi <yao.qi@linaro.org>
4215 * linux-low.c (handle_extended_wait): Call
4216 uninsert_reinsert_breakpoints for the parent process. Remove
4217 reinsert breakpoints from the child process. Reinsert them to
4218 the parent process when vfork is done.
4219 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4220 (reinsert_reinsert_breakpoints): New function.
4221 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4222 (reinsert_reinsert_breakpoints): Declare.
4224 2016-06-17 Yao Qi <yao.qi@linaro.org>
4226 * linux-low.c (handle_extended_wait): If the parent is doing
4227 step-over, remove the reinsert breakpoints from the forked child.
4229 2016-06-17 Yao Qi <yao.qi@linaro.org>
4231 * linux-low.c (unsuspend_all_lwps): Declare.
4232 (linux_low_filter_event): If thread exited, call finish_step_over.
4233 If step-over is finished, unsuspend other threads.
4235 2016-06-17 Yao Qi <yao.qi@linaro.org>
4237 * linux-low.c (linux_resume_one_lwp_throw): Assert
4238 has_reinsert_breakpoints returns false.
4239 * mem-break.c (delete_disabled_breakpoints): Assert
4240 bp type isn't reinsert_breakpoint.
4242 2016-06-17 Yao Qi <yao.qi@linaro.org>
4244 * linux-low.c (maybe_hw_step): New function.
4245 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4246 (finish_step_over): Switch current_thread to lwp temporarily,
4247 and assert has_reinsert_breakpoints returns true.
4248 (proceed_one_lwp): Call maybe_hw_step.
4249 * mem-break.c (has_reinsert_breakpoints): New function.
4250 * mem-break.h (has_reinsert_breakpoints): Declare.
4252 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4254 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4256 2016-05-17 Yao Qi <yao.qi@linaro.org>
4258 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4259 instead of find_inferior.
4261 2016-05-05 Yao Qi <yao.qi@linaro.org>
4263 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4264 Initialize res to zero.
4266 2016-05-05 Yao Qi <yao.qi@linaro.org>
4268 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4271 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4273 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4274 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4275 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4277 2016-04-28 Par Olsson <par.olsson@windriver.com>
4278 Simon Marchi <simon.marchi@ericsson.com>
4280 * tracepoint.c (write_inferior_int8): New function.
4281 (cmd_qtenable_disable): Write enable flag using
4282 write_inferior_int8.
4284 2016-04-25 Yao Qi <yao.qi@linaro.org>
4286 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4287 (need_step_over_p): Return zero if the LWP has pending signals
4288 can be delivered on software single step target.
4290 2016-04-25 Yao Qi <yao.qi@linaro.org>
4292 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4293 return instead of error.
4295 2016-04-22 Yao Qi <yao.qi@linaro.org>
4297 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4300 2016-04-22 Yao Qi <yao.qi@linaro.org>
4302 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4303 signal when stepping over breakpoint with software single
4306 2016-04-21 Pedro Alves <palves@redhat.com>
4308 * linux-s390-low.c (s390_collect_ptrace_register)
4309 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4311 (s390_check_regset): Use void * instead of gdb_byte *.
4313 2016-04-20 Pedro Alves <palves@redhat.com>
4315 * configure: Renegerate.
4317 2016-04-20 Yao Qi <yao.qi@linaro.org>
4319 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4320 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4322 (arm_store_gregset): Likewise.
4324 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4326 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4327 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4328 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4329 (amd64-avx-mpx-linux.c): New rules.
4330 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4331 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4332 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4333 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4334 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4335 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4336 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4337 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4338 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4339 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4340 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4341 * linux-x86-low.c (x86_linux_read_description): Add case for
4342 X86_XSTATE_AVX_MPX_MASK.
4343 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4344 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4345 init_registers_i386_avx_mpx_linux.
4346 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4347 (initialize_low_tracepoint): Call
4348 init_registers_i386_avx_mpx_linux.
4349 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4350 (initialize_low_tracepoint): Call
4351 init_registers_amd64_avx_mpx_linux.
4352 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4353 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4354 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4357 2016-04-18 Pedro Alves <palves@redhat.com>
4359 * configure: Regenerate.
4361 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4363 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4364 (aarch64_emit_sub): Likewise.
4366 2016-04-12 Pedro Alves <palves@redhat.com>
4368 * utils.c (prepare_to_throw_exception): Delete.
4370 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4372 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4374 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4376 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4378 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4380 * linux-aarch64-ipa.c: Add <elf.h> include.
4381 * linux-ppc-ipa.c: Add <elf.h> include.
4382 * linux-s390-ipa.c: Add <elf.h> include.
4384 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4386 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4387 (get_raw_reg_ptr): Likewise.
4388 (get_trace_state_variable_value_ptr): Likewise.
4389 (set_trace_state_variable_value_ptr): Likewise.
4390 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4393 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4394 Marcin Kościelnicki <koriakin@0x04.net>
4397 * linux-ppc-low.c (emit_insns): New function.
4398 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4399 (ppc_emit_prologue): New function.
4400 (ppc_emit_epilogue): New function.
4401 (ppc_emit_add): New function.
4402 (ppc_emit_sub): New function.
4403 (ppc_emit_mul): New function.
4404 (ppc_emit_lsh): New function.
4405 (ppc_emit_rsh_signed): New function.
4406 (ppc_emit_rsh_unsigned): New function.
4407 (ppc_emit_ext): New function.
4408 (ppc_emit_zero_ext): New function.
4409 (ppc_emit_log_not): New function.
4410 (ppc_emit_bit_and): New function.
4411 (ppc_emit_bit_or): New function.
4412 (ppc_emit_bit_xor): New function.
4413 (ppc_emit_bit_not): New function.
4414 (ppc_emit_equal): New function.
4415 (ppc_emit_less_signed): New function.
4416 (ppc_emit_less_unsigned): New function.
4417 (ppc_emit_ref): New function.
4418 (ppc_emit_const): New function.
4419 (ppc_emit_reg): New function.
4420 (ppc_emit_pop): New function.
4421 (ppc_emit_stack_flush): New function.
4422 (ppc_emit_swap): New function.
4423 (ppc_emit_stack_adjust): New function.
4424 (ppc_emit_call): New function.
4425 (ppc_emit_int_call_1): New function.
4426 (ppc_emit_void_call_2): New function.
4427 (ppc_emit_if_goto): New function.
4428 (ppc_emit_goto): New function.
4429 (ppc_emit_eq_goto): New function.
4430 (ppc_emit_ne_goto): New function.
4431 (ppc_emit_lt_goto): New function.
4432 (ppc_emit_le_goto): New function.
4433 (ppc_emit_gt_goto): New function.
4434 (ppc_emit_ge_goto): New function.
4435 (ppc_write_goto_address): New function.
4436 (ppc_emit_ops_impl): New static variable.
4437 (ppc64v1_emit_prologue): New function.
4438 (ppc64v2_emit_prologue): New function.
4439 (ppc64_emit_epilogue): New function.
4440 (ppc64_emit_add): New function.
4441 (ppc64_emit_sub): New function.
4442 (ppc64_emit_mul): New function.
4443 (ppc64_emit_lsh): New function.
4444 (ppc64_emit_rsh_signed): New function.
4445 (ppc64_emit_rsh_unsigned): New function.
4446 (ppc64_emit_ext): New function.
4447 (ppc64_emit_zero_ext): New function.
4448 (ppc64_emit_log_not): New function.
4449 (ppc64_emit_bit_and): New function.
4450 (ppc64_emit_bit_or): New function.
4451 (ppc64_emit_bit_xor): New function.
4452 (ppc64_emit_bit_not): New function.
4453 (ppc64_emit_equal): New function.
4454 (ppc64_emit_less_signed): New function.
4455 (ppc64_emit_less_unsigned): New function.
4456 (ppc64_emit_ref): New function.
4457 (ppc64_emit_const): New function.
4458 (ppc64v1_emit_reg): New function.
4459 (ppc64v2_emit_reg): New function.
4460 (ppc64_emit_pop): New function.
4461 (ppc64_emit_stack_flush): New function.
4462 (ppc64_emit_swap): New function.
4463 (ppc64v1_emit_call): New function.
4464 (ppc64v2_emit_call): New function.
4465 (ppc64v1_emit_int_call_1): New function.
4466 (ppc64v2_emit_int_call_1): New function.
4467 (ppc64v1_emit_void_call_2): New function.
4468 (ppc64v2_emit_void_call_2): New function.
4469 (ppc64_emit_if_goto): New function.
4470 (ppc64_emit_eq_goto): New function.
4471 (ppc64_emit_ne_goto): New function.
4472 (ppc64_emit_lt_goto): New function.
4473 (ppc64_emit_le_goto): New function.
4474 (ppc64_emit_gt_goto): New function.
4475 (ppc64_emit_ge_goto): New function.
4476 (ppc64v1_emit_ops_impl): New static variable.
4477 (ppc64v2_emit_ops_impl): New static variable.
4478 (ppc_emit_ops): New function.
4479 (linux_low_target): Wire in ppc_emit_ops.
4481 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4482 Marcin Kościelnicki <koriakin@0x04.net>
4485 * Makefile.in: Add powerpc-*-ipa.o
4486 * configure.srv: Add ipa_obj for powerpc*-linux.
4487 * linux-ppc-ipa.c: New file.
4488 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4490 (PPC_FIELD): New macro.
4491 (PPC_SEXT): New macro.
4492 (PPC_OP6): New macro.
4493 (PPC_BO): New macro.
4494 (PPC_LI): New macro.
4495 (PPC_BD): New macro.
4496 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4497 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4498 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4499 (ppc_get_thread_area): New function.
4500 (is_elfv2_inferior): New function.
4501 (gen_ds_form): New function.
4502 (GEN_STD): New macro.
4503 (GEN_STDU): New macro.
4504 (GEN_LD): New macro.
4505 (GEN_LDU): New macro.
4506 (gen_d_form): New function.
4507 (GEN_ADDI): New macro.
4508 (GEN_ADDIS): New macro.
4509 (GEN_LI): New macro.
4510 (GEN_LIS): New macro.
4511 (GEN_ORI): New macro.
4512 (GEN_ORIS): New macro.
4513 (GEN_LWZ): New macro.
4514 (GEN_STW): New macro.
4515 (GEN_STWU): New macro.
4516 (gen_xfx_form): New function.
4517 (GEN_MFSPR): New macro.
4518 (GEN_MTSPR): New macro.
4519 (GEN_MFCR): New macro.
4520 (GEN_MTCR): New macro.
4521 (GEN_SYNC): New macro.
4522 (GEN_LWSYNC): New macro.
4523 (gen_x_form): New function.
4524 (GEN_OR): New macro.
4525 (GEN_MR): New macro.
4526 (GEN_LWARX): New macro.
4527 (GEN_STWCX): New macro.
4528 (GEN_CMPW): New macro.
4529 (gen_md_form): New function.
4530 (GEN_RLDICL): New macro.
4531 (GEN_RLDICR): New macro.
4532 (gen_i_form): New function.
4534 (GEN_BL): New macro.
4535 (gen_b_form): New function.
4536 (GEN_BNE): New macro.
4537 (GEN_LOAD): New macro.
4538 (GEN_STORE): New macro.
4539 (gen_limm): New function.
4540 (gen_atomic_xchg): New function.
4541 (gen_call): New function.
4542 (ppc_relocate_instruction): New function.
4543 (ppc_install_fast_tracepoint_jump_pad): New function.
4544 (ppc_get_min_fast_tracepoint_insn_len): New function.
4545 (ppc_get_ipa_tdesc_idx): New function.
4546 (the_low_target): Wire in the new functions.
4547 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4549 * linux-ppc-tdesc.h: New file.
4551 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4553 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4554 (alloc_jump_pad_buffer): New function.
4555 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4556 (alloc_jump_pad_buffer): New function.
4557 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4558 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4559 (alloc_jump_pad_buffer): New function.
4560 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4561 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4562 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4563 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4565 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4567 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4568 * linux-amd64-ipa.c: Likewise.
4569 * linux-i386-ipa.c: Likewise.
4570 * linux-s390-ipa.c: Likewise.
4571 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4572 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4573 set_trace_state_variable_value_ptr.
4574 (struct ipa_sym_addresses): Likewise.
4575 (symbol_list): Likewise.
4576 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4577 accessing gdb_collect directly.
4578 (gdb_collect_ptr_type): New typedef.
4579 (get_raw_reg_ptr_type): New typedef.
4580 (get_trace_state_variable_value_ptr_type): New typedef.
4581 (set_trace_state_variable_value_ptr_type): New typedef.
4582 (gdb_collect_ptr): New global.
4583 (get_raw_reg_ptr): New global.
4584 (get_trace_state_variable_value_ptr): New global.
4585 (set_trace_state_variable_value_ptr): New global.
4586 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4587 accessing get_raw_reg directly.
4588 (get_get_tsv_func_addr): Likewise for
4589 get_trace_state_variable_value_ptr.
4590 (get_set_tsv_func_addr): Likewise for
4591 set_trace_state_variable_value_ptr.
4592 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4594 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4596 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4598 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4600 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4602 (relocate_instruction): Remove own_buf.
4603 * server.c (own_buf): Make global.
4604 (handle_v_requests): Make global.
4605 * server.h (own_buf): New declaration.
4606 (handle_v_requests): New prototype.
4608 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4611 * linux-s390-low.c (add_insns): New function.
4612 (s390_emit_prologue): New function.
4613 (s390_emit_epilogue): New function.
4614 (s390_emit_add): New function.
4615 (s390_emit_sub): New function.
4616 (s390_emit_mul): New function.
4617 (s390_emit_lsh): New function.
4618 (s390_emit_rsh_signed): New function.
4619 (s390_emit_rsh_unsigned): New function.
4620 (s390_emit_ext): New function.
4621 (s390_emit_log_not): New function.
4622 (s390_emit_bit_and): New function.
4623 (s390_emit_bit_or): New function.
4624 (s390_emit_bit_xor): New function.
4625 (s390_emit_bit_not): New function.
4626 (s390_emit_equal): New function.
4627 (s390_emit_less_signed): New function.
4628 (s390_emit_less_unsigned): New function.
4629 (s390_emit_ref): New function.
4630 (s390_emit_if_goto): New function.
4631 (s390_emit_goto): New function.
4632 (s390_write_goto_address): New function.
4633 (s390_emit_litpool): New function.
4634 (s390_emit_const): New function.
4635 (s390_emit_call): New function.
4636 (s390_emit_reg): New function.
4637 (s390_emit_pop): New function.
4638 (s390_emit_stack_flush): New function.
4639 (s390_emit_zero_ext): New function.
4640 (s390_emit_swap): New function.
4641 (s390_emit_stack_adjust): New function.
4642 (s390_emit_set_r2): New function.
4643 (s390_emit_int_call_1): New function.
4644 (s390_emit_void_call_2): New function.
4645 (s390_emit_eq_goto): New function.
4646 (s390_emit_ne_goto): New function.
4647 (s390_emit_lt_goto): New function.
4648 (s390_emit_le_goto): New function.
4649 (s390_emit_gt_goto): New function.
4650 (s390_emit_ge_goto): New function.
4651 (s390x_emit_prologue): New function.
4652 (s390x_emit_epilogue): New function.
4653 (s390x_emit_add): New function.
4654 (s390x_emit_sub): New function.
4655 (s390x_emit_mul): New function.
4656 (s390x_emit_lsh): New function.
4657 (s390x_emit_rsh_signed): New function.
4658 (s390x_emit_rsh_unsigned): New function.
4659 (s390x_emit_ext): New function.
4660 (s390x_emit_log_not): New function.
4661 (s390x_emit_bit_and): New function.
4662 (s390x_emit_bit_or): New function.
4663 (s390x_emit_bit_xor): New function.
4664 (s390x_emit_bit_not): New function.
4665 (s390x_emit_equal): New function.
4666 (s390x_emit_less_signed): New function.
4667 (s390x_emit_less_unsigned): New function.
4668 (s390x_emit_ref): New function.
4669 (s390x_emit_if_goto): New function.
4670 (s390x_emit_const): New function.
4671 (s390x_emit_call): New function.
4672 (s390x_emit_reg): New function.
4673 (s390x_emit_pop): New function.
4674 (s390x_emit_stack_flush): New function.
4675 (s390x_emit_zero_ext): New function.
4676 (s390x_emit_swap): New function.
4677 (s390x_emit_stack_adjust): New function.
4678 (s390x_emit_int_call_1): New function.
4679 (s390x_emit_void_call_2): New function.
4680 (s390x_emit_eq_goto): New function.
4681 (s390x_emit_ne_goto): New function.
4682 (s390x_emit_lt_goto): New function.
4683 (s390x_emit_le_goto): New function.
4684 (s390x_emit_gt_goto): New function.
4685 (s390x_emit_ge_goto): New function.
4686 (s390_emit_ops): New function.
4687 (struct linux_target_ops): Fill in emit_ops hook.
4689 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4692 * Makefile.in: Add s390 IPA files.
4693 * configure.srv: Build IPA for s390.
4694 * linux-s390-ipa.c: New file.
4695 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4696 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4697 (tdesc_s390_linux32): Likewise.
4698 (init_registers_s390_linux32v1): Likewise.
4699 (tdesc_s390_linux32v1): Likewise.
4700 (init_registers_s390_linux32v2): Likewise.
4701 (tdesc_s390_linux32v2): Likewise.
4702 (init_registers_s390_linux64): Likewise.
4703 (tdesc_s390_linux64): Likewise.
4704 (init_registers_s390_linux64v1): Likewise.
4705 (tdesc_s390_linux64v1): Likewise.
4706 (init_registers_s390_linux64v2): Likewise.
4707 (tdesc_s390_linux64v2): Likewise.
4708 (init_registers_s390_te_linux64): Likewise.
4709 (tdesc_s390_te_linux64): Likewise.
4710 (init_registers_s390_vx_linux64): Likewise.
4711 (tdesc_s390_vx_linux64): Likewise.
4712 (init_registers_s390_tevx_linux64): Likewise.
4713 (tdesc_s390_tevx_linux64): Likewise.
4714 (init_registers_s390x_linux64): Likewise.
4715 (tdesc_s390x_linux64): Likewise.
4716 (init_registers_s390x_linux64v1): Likewise.
4717 (tdesc_s390x_linux64v1): Likewise.
4718 (init_registers_s390x_linux64v2): Likewise.
4719 (tdesc_s390x_linux64v2): Likewise.
4720 (init_registers_s390x_te_linux64): Likewise.
4721 (tdesc_s390x_te_linux64): Likewise.
4722 (init_registers_s390x_vx_linux64): Likewise.
4723 (tdesc_s390x_vx_linux64): Likewise.
4724 (init_registers_s390x_tevx_linux64): Likewise.
4725 (tdesc_s390x_tevx_linux64): Likewise.
4726 (have_hwcap_s390_vx): New static variable.
4727 (s390_arch_setup): Fill have_hwcap_s390_vx.
4728 (s390_get_thread_area): New function.
4729 (s390_ft_entry_gpr_esa): New const.
4730 (s390_ft_entry_gpr_zarch): New const.
4731 (s390_ft_entry_misc): New const.
4732 (s390_ft_entry_fr): New const.
4733 (s390_ft_entry_vr): New const.
4734 (s390_ft_main_31): New const.
4735 (s390_ft_main_64): New const.
4736 (s390_ft_exit_fr): New const.
4737 (s390_ft_exit_vr): New const.
4738 (s390_ft_exit_misc): New const.
4739 (s390_ft_exit_gpr_esa): New const.
4740 (s390_ft_exit_gpr_zarch): New const.
4741 (append_insns): New function.
4742 (s390_relocate_instruction): New function.
4743 (s390_install_fast_tracepoint_jump_pad): New function.
4744 (s390_get_min_fast_tracepoint_insn_len): New function.
4745 (s390_get_ipa_tdesc_idx): New function.
4746 (struct linux_target_ops): Wire in the above functions.
4747 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4748 * linux-s390-tdesc.h: New file.
4750 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4752 * linux-s390-low.c (s390_supports_tracepoints): New function.
4753 (struct linux_target_ops): Fill supports_tracepoints hook.
4755 2016-03-18 Yao Qi <yao.qi@linaro.org>
4757 * linux-low.c (lwp_signal_can_be_delivered): New function.
4758 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4760 2016-03-18 Yao Qi <yao.qi@linaro.org>
4762 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4763 0 if signal is enqueued. Remove 'signal' from one debugging
4764 message. Move one debugging message to some lines below.
4765 Remove code setting 'signal' to 0.
4767 2016-03-18 Yao Qi <yao.qi@linaro.org>
4769 * linux-low.c (linux_low_filter_event): Remove redundant
4770 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4772 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4774 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4775 (struct linux_target_ops): Wire in the above.
4777 2016-03-03 Yao Qi <yao.qi@linaro.org>
4779 * linux-low.c: Update comments to start_step_over.
4781 2016-03-03 Yao Qi <yao.qi@linaro.org>
4784 * linux-low.c (handle_extended_wait): Set child suspended
4785 if event_lwp->bp_reinsert isn't zero.
4787 2016-03-02 Yao Qi <yao.qi@linaro.org>
4789 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4790 enqueue_pending_signal.
4792 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4794 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4797 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4799 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4800 (s390_regmap_3264) [!__s390x__]: New global.
4801 (s390_collect_ptrace_register): Skip map entries containing -1.
4802 (s390_supply_ptrace_register): Ditto.
4803 (s390_fill_gprs_high): New function.
4804 (s390_store_gprs_high): New function.
4805 (s390_regsets): Add NT_S390_HIGH_GPRS.
4806 (s390_get_hwcap): Enable on 31-bit.
4807 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4808 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4809 Detect NT_S390_HIGH_GPRS.
4810 (s390_usrregs_info_3264): Enable on 31-bit.
4811 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4812 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4814 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4817 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4818 * configure.srv: Ditto.
4819 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4820 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4821 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4822 (init_registers_amd64_linux): Remove prototype.
4823 (tdesc_amd64_linux): Remove declaration.
4824 (get_ipa_tdesc): New function.
4825 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4826 initialize remaining tdescs.
4827 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4828 (init_registers_i386_linux): Remove prototype.
4829 (tdesc_i386_linux): Remove declaration.
4830 (get_ipa_tdesc): New function.
4831 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4832 initialize remaining tdescs.
4833 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4834 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4835 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4836 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4837 (x86_get_ipa_tdesc_idx): New function.
4838 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4839 * linux-x86-tdesc.h: New file.
4840 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4841 (target_get_ipa_tdesc_idx): New macro.
4842 * tracepoint.c (ipa_tdesc_idx): New macro.
4843 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4844 (symbol_list): Add ipa_tdesc_idx.
4845 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4846 (ipa_tdesc): Remove.
4847 (ipa_tdesc_idx): New variable.
4848 (get_context_regcache): Use get_ipa_tdesc.
4849 (gdb_collect): Ditto.
4851 * tracepoint.h (get_ipa_tdesc): New prototype.
4852 (ipa_tdesc): Remove.
4854 2016-02-24 Pedro Alves <palves@redhat.com>
4856 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4857 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4858 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4859 Factor out common code between the USE_SIGTRAP_SIGINFO and
4860 !USE_SIGTRAP_SIGINFO blocks.
4861 (linux_low_filter_event): Call save_stop_reason instead of
4862 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4864 (linux_wait_1): Update comments.
4866 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4868 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4869 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4870 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4871 ppc_insert_point, ppc_remove_point.
4873 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4875 * linux-s390-low.c (s390_supports_z_point_type): New function.
4876 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4878 2016-02-16 Yao Qi <yao.qi@linaro.org>
4880 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4881 PC. Get pc from regcache_read_pc.
4883 2016-02-12 Yao Qi <yao.qi@linaro.org>
4885 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4886 or linux_get_pc_32bit.
4887 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4889 2016-02-12 Yao Qi <yao.qi@linaro.org>
4891 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4892 arm_linux_get_next_pcs_fixup.
4894 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4896 * tracepoint.c (x_tracepoint_action_download): Change
4897 write_inferior_data_ptr to write_inferior_data_pointer.
4898 (cmd_qtstart): Likewise.
4899 (write_inferior_data_ptr): Remove.
4900 (download_agent_expr): Change write_inferior_data_ptr to
4901 write_inferior_data_pointer.
4902 (download_tracepoint_1): Likewise.
4903 (download_tracepoint): Likewise.
4904 (download_trace_state_variables): Likewise.
4906 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4907 Marcin Kościelnicki <koriakin@0x04.net>
4909 * tracepoint.c (struct tracepoint_action_ops): Remove.
4910 (struct tracepoint_action): Remove ops.
4911 (m_tracepoint_action_download, r_tracepoint_action_download)
4912 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4913 size and offset accordingly.
4914 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4915 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4916 (tracepoint_action_send, tracepoint_action_download): New functions.
4917 Helpers for trace action handlers.
4918 (add_tracepoint_action): Remove setup actions ops.
4919 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4921 2016-02-10 Yao Qi <yao.qi@linaro.org>
4923 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4925 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4927 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4929 * configure: Regenerate.
4931 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4933 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4934 void * to gdb_byte *.
4935 * linux-low.c (siginfo_fixup): Likewise.
4936 (linux_xfer_siginfo): Likewise.
4937 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4939 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4941 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4943 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4945 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4947 * linux-x86-low.c [__x86_64__]: Include
4948 "nat/amd64-linux-siginfo.h".
4949 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4950 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4951 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4952 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4953 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4954 (cpt_si_fd, si_timerid, si_overrun): Move from
4955 nat/amd64-linux-siginfo.c.
4956 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4958 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4960 * server.c (skip_to_semicolon): Remove.
4961 (process_point_options): Use strchrnul instead of
4964 2016-01-26 Yao Qi <yao.qi@linaro.org>
4966 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4967 * linux-low.c (install_software_single_step_breakpoints): Don't
4968 call regcache_read_pc.
4969 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4972 2016-01-26 Yao Qi <yao.qi@linaro.org>
4974 * linux-low.c (install_software_single_step_breakpoints): Call
4975 regcache_read_pc instead of get_pc.
4977 2016-01-26 Yao Qi <yao.qi@linaro.org>
4979 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4980 (unblock_async_io): Rename to ...
4981 (block_unblock_async_io): ... it. New function.
4982 (enable_async_io): Don't install SIGIO handler. Unblock it
4984 (disable_async_io): Don't ignore SIGIO. Block it instead.
4985 (initialize_async_io): Install SIGIO handler. Don't call
4988 2016-01-26 Yao Qi <yao.qi@linaro.org>
4990 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4991 first character is '\003', call *the_target->request_interrupt.
4993 2016-01-25 Yao Qi <yao.qi@linaro.org>
4995 * remote-utils.c (new_thread_notify): Remove.
4996 (dead_thread_notify): Likewise.
4997 * remote-utils.h (new_thread_notify): Remove declaration.
4998 (dead_thread_notify): Likewise.
5000 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5002 * gdb.trace/pending.exp: Fix expected message on continue.
5004 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5006 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5007 it works properly on big-endian machines where sizeof (CORE_ADDR)
5010 2016-01-21 Pedro Alves <palves@redhat.com>
5012 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5013 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5014 * configure: Regenerate.
5016 2016-01-21 Yao Qi <yao.qi@linaro.org>
5018 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5019 is_thumb and set it according to CPSR saved on the stack.
5020 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5021 arm_sigreturn_next_pc.
5023 2016-01-18 Yao Qi <yao.qi@linaro.org>
5025 * linux-low.c (linux_set_pc_64bit): New function.
5026 (linux_get_pc_64bit): New function.
5027 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5029 * linux-sparc-low.c (debug_threads): Remove declaration.
5030 (sparc_get_pc): Remove.
5031 (the_low_target): Use linux_get_pc_64bit instead of
5033 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5034 (the_low_target): Use linux_get_pc_64bit and
5037 2016-01-18 Yao Qi <yao.qi@linaro.org>
5039 * linux-arm-low.c (debug_threads): Remove declaration.
5040 (arm_get_pc, arm_set_pc): Remove.
5041 (the_low_target): Use linux_get_pc_32bit and
5043 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5044 (the_low_target): Use linux_get_pc_32bit and
5046 * linux-cris-low.c (debug_threads): Remove declaration.
5047 (cris_get_pc, cris_set_pc,): Remove.
5048 (the_low_target): Use linux_get_pc_32bit and
5050 * linux-crisv32-low.c (debug_threads): Remove declaration.
5051 (cris_get_pc, cris_set_pc): Remove.
5052 (the_low_target): Use linux_get_pc_32bit and
5054 * linux-low.c: Include inttypes.h.
5055 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5056 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5057 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5058 (the_low_target): Use linux_get_pc_32bit and
5060 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5061 (the_low_target): Use linux_get_pc_32bit and
5063 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5064 (the_low_target): Use linux_get_pc_32bit and
5066 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5067 (the_low_target): Use linux_get_pc_32bit and
5069 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5070 (the_low_target): Use linux_get_pc_32bit and
5073 2016-01-18 Gary Benson <gbenson@redhat.com>
5075 * configure.ac (AC_FUNC_FORK): New check.
5076 * config.in: Regenerate.
5077 * configure: Likewise.
5079 2016-01-14 Yao Qi <yao.qi@linaro.org>
5081 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5082 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5083 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5084 arm_get_next_pcs_ctor.
5086 2016-01-12 Josh Stone <jistone@redhat.com>
5087 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5089 * inferiors.h: Include "gdb_vecs.h".
5090 (struct process_info): Add syscalls_to_catch.
5091 * inferiors.c (remove_process): Free syscalls_to_catch.
5092 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5093 syscall_return stops.
5094 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5095 * server.c (handle_general_set): Handle QCatchSyscalls.
5096 (handle_query): Report support for QCatchSyscalls.
5097 * target.h (struct target_ops): Add supports_catch_syscall.
5098 (target_supports_catch_syscall): New macro.
5099 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5100 (struct lwp_info): Add syscall_state.
5101 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5102 Maintain syscall_state and syscalls_to_catch across exec.
5103 (get_syscall_trapinfo): New function, proxy to the_low_target.
5104 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5105 (linux_low_filter_event): Toggle syscall_state entry/return for
5106 syscall traps, and set it ignored for all others.
5107 (gdb_catching_syscalls_p): New function.
5108 (gdb_catch_this_syscall_p): New function.
5109 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5110 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5111 (linux_supports_catch_syscall): New function.
5112 (linux_target_ops): Install it.
5113 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5114 (the_low_target): Install it.
5116 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5118 * acinclude.m4: Include new ../warning.m4 file.
5119 * configure: Regenerated.
5120 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5122 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5124 * ax.c (is_goto_target): Mark static.
5125 * linux-low.c (register_addr): Likewise.
5126 (linux_fetch_registers, linux_store_registers): Likewise.
5127 * mem-break.c (any_persistent_commands): Fix old prototype.
5128 (add_commands_to_breakpoint): Mark static.
5129 * regcache.c (find_register_by_name): Delete unused func.
5130 * remote-utils.c (hex_or_minus_one): Mark static.
5131 * server.c (monitor_show_help): Mark static.
5132 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5133 handle_v_requests): Likewise.
5135 2016-01-12 Pedro Alves <palves@redhat.com>
5137 Remove use of the registered trademark symbol throughout.
5139 2016-01-08 Yao Qi <yao.qi@linaro.org>
5141 * remote-utils.c (getpkt): If c is '\003', call target hook
5144 2016-01-06 Yao Qi <yao.qi@linaro.org>
5146 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5147 linux-aarch32-low.c.
5148 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5149 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5150 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5151 (thumb2_breakpoint): Declare.
5152 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5153 linux-aarch32-low.h.
5154 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5155 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5156 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5158 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5160 * gdbreplay.c (gdbreplay_version): Change copyright year in
5162 * server.c (gdbserver_version): Likewise.
5164 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5166 * server.c (crc32_table): Delete.
5167 (crc32): Use libiberty's xcrc32 function.
5169 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5171 * lynx-low.c (lynx_delete_thread_callback): New function.
5172 (lynx_mourn): Properly delete our process and all of its
5173 threads. Remove call to clear_inferiors.
5175 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5177 * target.c (thread_search_callback): Add check that
5178 the thread_stopped target callback is not NULL before
5181 2015-12-21 Yao Qi <yao.qi@linaro.org>
5183 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5186 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5188 * server.c (handle_query): Call target_supports_software_single_step.
5190 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5192 * linux-low.c (single_step): New function.
5193 (linux_resume_one_lwp_throw): Call single_step.
5194 (start_step_over): Likewise.
5196 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5198 * Makefile.in (SFILES): Append arch/arm-linux.c,
5199 arch/arm-get-next-pcs.c.
5200 (arm-linux.o): New rule.
5201 (arm-get-next-pcs.o): New rule.
5202 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5204 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5205 to linux-aarch32-low.c.
5206 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5207 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5208 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5209 (thumb2_breakpoint_len): Likewise.
5210 (arm_is_thumb_mode): Make non-static.
5211 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5212 from linux-aarch32-low.c.
5213 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5214 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5215 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5216 (thumb2_breakpoint_len): Likewise.
5217 (arm_is_thumb_mode): New declaration.
5218 * linux-arm-low.c: Include arch/arm-linux.h
5219 aarch/arm-get-next-pcs.h, sys/syscall.h.
5220 (get_next_pcs_ops): New struct.
5221 (get_next_pcs_addr_bits_remove): New function.
5222 (get_next_pcs_is_thumb): New function.
5223 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5224 (arm_sigreturn_next_pc): Likewise.
5225 (get_next_pcs_syscall_next_pc): Likewise.
5226 (arm_gdbserver_get_next_pcs): Likewise.
5227 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5229 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5230 * server.h: Include gdb_vecs.h.
5232 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5234 * Makefile.in (SFILES): Append common/common-regcache.c.
5235 (OBS): Append common-regcache.o.
5236 (common-regcache.o): New rule.
5237 * regcache.c (init_register_cache): Initialize cache to
5239 (regcache_raw_read_unsigned): New function.
5240 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5241 register_status enum.
5243 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5245 * linux-aarch64-low.c (the_low_targets): Rename
5246 breakpoint_reinsert_addr to get_next_pcs.
5247 * linux-arm-low.c (the_low_targets): Likewise.
5248 * linux-bfin-low.c (the_low_targets): Likewise.
5249 * linux-cris-low.c (the_low_targets): Likewise.
5250 * linux-crisv32-low.c (the_low_targets): Likewise.
5251 * linux-low.c (can_software_single_step): Likewise.
5252 (install_software_single_step_breakpoints): New function.
5253 (start_step_over): Use install_software_single_step_breakpoints.
5254 * linux-low.h: New CORE_ADDR vector.
5255 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5257 * linux-mips-low.c (the_low_targets): Likewise.
5258 * linux-nios2-low.c (the_low_targets): Likewise.
5259 * linux-sparc-low.c (the_low_targets): Likewise.
5261 2015-12-17 Pedro Alves <palves@redhat.com>
5263 * linux-low.c (linux_kill_one_lwp): Remove references to
5265 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5267 (linux_init_signals): Delete.
5268 (initialize_low): Adjust.
5269 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5271 2015-12-16 Pedro Alves <palves@redhat.com>
5273 * configure.ac (compiler warning flags): When testing a
5274 -Wno-foo option, check whether -Wfoo works instead.
5275 * configure: Regenerate.
5277 2015-12-11 Don Breazeal <donb@codesourcery.com>
5279 * server.c (process_serial_event): Don't exit from gdbserver
5280 in remote mode if there are still active inferiors.
5282 2015-12-11 Yao Qi <yao.qi@linaro.org>
5284 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5285 arm_breakpoint_at if the process is 32-bit.
5287 2015-12-11 Yao Qi <yao.qi@linaro.org>
5289 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5292 2015-12-07 Yao Qi <yao.qi@linaro.org>
5294 * configure.srv: Append arm.o to srv_tgtobj for
5295 aarch64*-*-linux* target.
5296 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5297 from linux-arm-low.c.
5298 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5299 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5300 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5301 (thumb2_breakpoint_len): Likewise.
5302 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5303 (arm_breakpoint_kinds): Likewise.
5304 (arm_breakpoint_kind_from_pc): Likewise.
5305 (arm_sw_breakpoint_from_kind): Likewise.
5306 (arm_breakpoint_kind_from_current_state): Likewise.
5307 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5308 (arm_sw_breakpoint_from_kind): Declare.
5309 (arm_breakpoint_kind_from_current_state): Declare.
5310 (arm_breakpoint_at): Declare.
5311 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5312 arm_sw_breakpoint_from_kind if process is 32-bit.
5313 (aarch64_breakpoint_kind_from_pc): New function.
5314 (aarch64_breakpoint_kind_from_current_state): New function.
5315 (the_low_target): Initialize fields breakpoint_kind_from_pc
5316 and breakpoint_kind_from_current_state.
5317 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5318 linux-aarch32-low.c.
5319 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5320 (arm_breakpoint, arm_breakpoint_len): Likewise.
5321 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5322 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5323 (arm_is_thumb_mode): Likewise.
5324 (arm_breakpoint_at): Likewise.
5325 (arm_breakpoint_kind_from_pc): Likewise.
5326 (arm_sw_breakpoint_from_kind): Likewise.
5327 (arm_breakpoint_kind_from_current_state): Likewise.
5330 2015-08-04 Yao Qi <yao.qi@linaro.org>
5332 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5333 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5334 * server.c (extended_protocol): Remove "static".
5335 * server.h (extended_protocol): Declare it.
5337 2015-12-04 Josh Stone <jistone@redhat.com>
5339 * target.h (struct target_ops) <arch_setup>: Rename to ...
5340 (struct target_ops) <post_create_inferior>: ... this.
5341 (target_arch_setup): Rename to ...
5342 (target_post_create_inferior): ... this, calling post_create_inferior.
5343 * server.c (start_inferior): Update target_arch_setup calls to
5344 target_post_create_inferior.
5345 * linux-low.c (linux_low_ptrace_options): Forward declare.
5346 (linux_arch_setup): Update its comment for general use.
5347 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5348 (struct linux_target_ops): Use linux_post_create_inferior.
5349 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5350 to post_create_inferior.
5351 * nto-low.c (struct nto_target_ops): Likewise.
5352 * spu-low.c (struct spu_target_ops): Likewise.
5353 * win32-low.c (struct win32_target_ops): Likewise.
5355 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5357 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5359 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5361 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5362 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5363 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5364 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5365 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5366 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5367 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5368 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5369 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5370 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5371 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5372 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5374 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5376 * linux-low.c (linux_look_up_symbols): Don't call
5377 linux_supports_traceclone.
5378 * linux-low.h (thread_db_init): Remove use_events argument.
5379 * thread-db.c (thread_db_use_event): Remove global variable.
5380 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5381 (struct thread_db) <td_create_bp>: Remove field.
5382 (thread_db_create_event): Remove function.
5383 (thread_db_enable_reporting): Likewise.
5384 (find_one_thread): Don't check for thread_db_use_events.
5385 (attach_thread): Likewise.
5386 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5387 (try_thread_db_load_1): Don't check for thread_db_use_events.
5388 (thread_db_init): Remove use_events argument and thread events
5390 (remove_thread_event_breakpoints): Remove function.
5391 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5393 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5395 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5398 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5399 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5400 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5401 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5403 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5405 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5406 * linux-low.c (can_hardware_single_step): Use
5407 supports_hardware_single_step.
5408 (can_software_single_step): New function.
5409 (start_step_over): Call can_software_single_step.
5410 (linux_supports_hardware_single_step): New function.
5411 (struct target_ops) <supports_software_single_step>: Initialize.
5412 * linux-low.h (struct linux_target_ops)
5413 <supports_hardware_single_step>: Initialize.
5414 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5415 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5416 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5417 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5418 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5419 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5420 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5421 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5422 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5423 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5425 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5426 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5428 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5429 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5430 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5432 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5433 * target.h (struct target_ops): <supports_software_single_step>:
5435 (target_supports_software_single_step): New macro.
5437 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5439 * linux-low.c (linux_wait_1): Fix pc advance condition.
5440 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5441 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5443 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5445 * linux-arm-low.c (arm_is_thumb_mode): New function.
5446 (arm_breakpoint_at): Use arm_is_thumb_mode.
5447 (arm_breakpoint_kind_from_current_state): New function.
5448 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5450 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5451 (linux_breakpoint_kind_from_current_state): New function.
5452 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5453 * linux-low.h (struct linux_target_ops)
5454 <breakpoint_kind_from_current_state>: New field.
5455 * target.h (struct target_ops): Likewise.
5456 (target_breakpoint_kind_from_current_state): New macro.
5458 2015-11-30 Pedro Alves <palves@redhat.com>
5460 * linux-low.c (linux_resume): Wake up the event loop before
5463 2015-11-30 Pedro Alves <palves@redhat.com>
5465 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5467 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5469 * target.c (struct thread_search): New structure.
5470 (thread_search_callback): New function.
5471 (prev_general_thread): New global.
5472 (prepare_to_access_memory, done_accessing_memory): New functions.
5473 * target.h (prepare_to_access_memory, done_accessing_memory):
5474 Replace macros with function declarations.
5476 2015-11-30 Pedro Alves <palves@redhat.com>
5479 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5480 report TARGET_WAITKIND_NO_RESUMED.
5481 * remote-utils.c (prepare_resume_reply): Handle
5482 TARGET_WAITKIND_NO_RESUMED.
5483 * server.c (report_no_resumed): New global.
5484 (handle_query) <qSupported>: Handle "no-resumed+". Report
5485 "no-resumed+" support.
5486 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5487 return error if the client doesn't support no-resumed events.
5488 (push_stop_notification): New function.
5489 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5490 events if the client supports them.
5492 2015-11-30 Pedro Alves <palves@redhat.com>
5494 * linux-low.c (thread_still_has_status_pending_p): Don't check
5496 (lwp_resumed): New function.
5497 (status_pending_p_callback): Return early if the LWP is not
5498 supposed to be resumed.
5500 2015-11-30 Pedro Alves <palves@redhat.com>
5502 * linux-low.c (handle_extended_wait): Assert that the LWP's
5503 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5504 thread create events, leave the new child's status pending.
5505 (linux_low_filter_event): If GDB wants to hear about thread exit
5506 events, leave the LWP marked dead and don't delete it.
5507 (linux_wait_for_event_filtered): Don't check for thread exit.
5508 (filter_exit_event): New function.
5509 (linux_wait_1): Use it, when returning an exit event.
5510 (linux_resume_one_lwp_throw): Assert that the LWP's
5511 waitstatus is TARGET_WAITKIND_IGNORE.
5512 * remote-utils.c (prepare_resume_reply): Handle
5513 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5514 * server.c (report_thread_events): New global.
5515 (handle_general_set): Handle QThreadEvents.
5516 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5517 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5518 TARGET_WAITKIND_THREAD_EXITED.
5519 * server.h (report_thread_events): Declare.
5521 2015-11-30 Pedro Alves <palves@redhat.com>
5523 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5524 the thread's last_resume_kind was resume_stop.
5526 2015-11-30 Pedro Alves <palves@redhat.com>
5528 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5531 2015-11-30 Pedro Alves <palves@redhat.com>
5533 * server.c (handle_v_requests): Handle vCtrlC.
5535 2015-11-30 Pedro Alves <palves@redhat.com>
5537 * gdbthread.h (find_any_thread_of_pid): Declare.
5538 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5540 * server.c (handle_query): If current_thread is NULL, look for
5541 another thread of the selected process.
5543 2015-11-26 Daniel Colascione <dancol@dancol.org>
5544 Simon Marchi <simon.marchi@ericsson.com>
5546 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5547 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5549 * target.h (struct target_ops) <thread_name>: New field.
5550 (target_thread_name): New macro.
5552 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5554 * regcache.h (regcache_invalidate_pid): Add declaration.
5555 * regcache.c (regcache_invalidate_pid): New function, extracted
5556 from regcache_invalidate.
5557 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5558 Add trivial documentation comment.
5559 * lynx-low.c: Use regcache_invalidate_pid instead of
5560 regcache_invalidate.
5562 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5564 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5565 and Elf64_auxv_t if the target is Android.
5567 2015-11-22 Doug Evans <xdje42@gmail.com>
5569 * target.h: #include <sys/types.h>.
5571 2015-11-19 Pedro Alves <palves@redhat.com>
5573 * linux-low.c (linux_process_qsupported): Change prototype.
5575 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5577 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5578 and adjust to loop over all features.
5579 * server.c (handle_query) <qSupported>: Adjust to call
5580 target_process_qsupported once, passing it a vector of unprocessed
5582 * target.h (struct target_ops) <process_qsupported>: Change
5584 (target_process_qsupported): Adjust.
5586 2015-11-19 Pedro Alves <palves@redhat.com>
5588 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5590 * configure: Regenerate.
5592 2015-11-19 Pedro Alves <palves@redhat.com>
5594 * configure: Regenerate.
5596 2015-11-19 Yao Qi <yao.qi@linaro.org>
5598 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5601 2015-11-19 Yao Qi <yao.qi@linaro.org>
5603 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5604 (struct aarch64_operand): Move enum out.
5606 2015-11-19 Yao Qi <yao.qi@linaro.org>
5608 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5609 struct user_fpsimd_state *.
5610 (aarch64_store_fpregset): Likewise.
5612 2015-11-19 Yao Qi <yao.qi@linaro.org>
5614 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5615 struct user_pt_regs *.
5616 (aarch64_store_gregset): Likewise.
5618 2015-11-18 Pedro Alves <palves@redhat.com>
5620 * Makefile.in (all_object_files): Add $IPA_OBJS.
5622 2015-11-17 Pedro Alves <palves@redhat.com>
5624 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5625 GDB_SIGNAL_0 and gdb_signal_to_string.
5627 2015-11-17 Pedro Alves <palves@redhat.com>
5629 * win32-low.c (handle_output_debug_string): Remove parameter.
5630 (win32_kill): Remove our_status local and adjust call to
5631 handle_output_debug_string.
5632 (get_child_debug_event): Adjust call to
5633 handle_output_debug_string.
5635 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5637 * linux-mips-low.c (mips_fill_gregset): Add cast.
5638 (mips_store_gregset): Likewise.
5639 (mips_fill_fpregset): Likewise.
5640 (mips_store_fpregset): Likewise.
5642 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5644 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5647 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5649 * linux-mips-low.c (mips_linux_new_thread): Change type of
5650 watch_type to enum target_hw_bp_type.
5652 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5654 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5655 Change return type to arm_hwbp_type.
5657 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5659 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5660 (arm_store_gregset): Likewise.
5661 * linux-arm-low.c (arm_get_hwcap): Likewise.
5662 (arm_read_description): Likewise.
5664 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5666 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5668 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5670 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5671 (ppc_fill_vsxregset): Likewise.
5672 (ppc_store_vsxregset): Likewise.
5673 (ppc_fill_vrregset): Likewise.
5674 (ppc_store_vrregset): Likewise.
5675 (ppc_fill_evrregset): Likewise.
5676 (ppc_store_evrregset): Likewise.
5678 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5680 * linux-ppc-low.c (ppc_usrregs_info): Remove
5681 forward-declaration.
5682 (ppc_arch_setup): Move lower in file.
5684 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5686 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5687 (ps_pdwrite): Likewise.
5689 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5691 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5692 to after assert checks.
5694 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5696 * proc-service.c (ps_pdread): Add/adjust casts.
5697 (ps_pdwrite): Add/adjust casts.
5699 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5701 * server.c (handle_search_memory_1): Cast return value of
5704 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5706 * server.c (write_qxfer_response): Change type of data to
5709 2015-10-29 Pedro Alves <palves@redhat.com>
5711 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5713 2015-10-29 Pedro Alves <palves@redhat.com>
5715 * tracepoint.c (clear_installed_tracepoints): Add casts.
5717 2015-10-29 Pedro Alves <palves@redhat.com>
5719 * server.c (handle_v_cont, process_serial_event): Add enum
5720 gdb_signal casts to signal parsing code.
5722 2015-10-29 Pedro Alves <palves@redhat.com>
5724 * linux-low.h (NULL_REGSET): Define.
5725 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5726 * linux-arm-low.c (arm_regsets): Likewise.
5727 * linux-crisv32-low.c (cris_regsets): Likewise.
5728 * linux-m68k-low.c (m68k_regsets): Likewise.
5729 * linux-mips-low.c (mips_regsets): Likewise.
5730 * linux-nios2-low.c (nios2_regsets): Likewise.
5731 * linux-ppc-low.c (ppc_regsets): Likewise.
5732 * linux-s390-low.c (s390_regsets): Likewise.
5733 * linux-sh-low.c (sh_regsets): Likewise.
5734 * linux-sparc-low.c (sparc_regsets): Likewise.
5735 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5736 * linux-tile-low.c (tile_regsets): Likewise.
5737 * linux-x86-low.c (x86_regsets): Likewise.
5738 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5740 2015-10-29 Pedro Alves <palves@redhat.com>
5742 * linux-low.h (NULL_REGSET): Define.
5743 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5744 * linux-arm-low.c (arm_regsets): Likewise.
5745 * linux-crisv32-low.c (cris_regsets): Likewise.
5746 * linux-m68k-low.c (m68k_regsets): Likewise.
5747 * linux-mips-low.c (mips_regsets): Likewise.
5748 * linux-nios2-low.c (nios2_regsets): Likewise.
5749 * linux-ppc-low.c (ppc_regsets): Likewise.
5750 * linux-s390-low.c (s390_regsets): Likewise.
5751 * linux-sh-low.c (sh_regsets): Likewise.
5752 * linux-sparc-low.c (sparc_regsets): Likewise.
5753 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5754 * linux-tile-low.c (tile_regsets): Likewise.
5755 * linux-x86-low.c (x86_regsets): Likewise.
5756 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5758 2015-10-26 Doug Evans <dje@google.com>
5760 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5762 2015-10-26 Doug Evans <dje@google.com>
5764 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5766 2015-10-26 Doug Evans <dje@google.com>
5768 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5770 (attach_thread, find_new_threads_callback): Ditto.
5772 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5774 * mem-break.h (set_breakpoint_data): Remove.
5776 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5778 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5779 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5780 (initialize_low): Remove set_breakpoint_data call.
5781 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5782 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5783 (initialize_low): Remove set_breakpoint_data call.
5784 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5785 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5786 (initialize_low): Remove set_breakpoint_data call.
5788 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5790 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5791 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5792 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5793 * target.h (target_breakpoint_kind_from_pc): New macro.
5795 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5797 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5798 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5799 the default breakpoint kind.
5801 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5803 * linux-arm-low.c (arm_supports_z_point_type): Add software
5806 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5808 * linux-arm-low.c: Refactor breakpoint definitions.
5809 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5810 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5812 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5814 * Makefile.in: Add arm.c/o.
5815 * configure.srv: Likewise.
5816 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5817 (arm_breakpoint_kind_from_pc): New function.
5818 (arm_sw_breakpoint_from_kind): Return proper kind.
5819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5821 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5823 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5825 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5826 (struct raw_breakpoint) <size>: Remove.
5827 (struct raw_breakpoint) <kind>: Add.
5828 (bp_size): New function.
5829 (bp_opcode): Likewise.
5830 (find_raw_breakpoint_at): Adjust for kind.
5831 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5832 (remove_memory_breakpoint): Adjust for kind call bp_size.
5833 (set_raw_breakpoint_at): Adjust for kind.
5834 (set_breakpoint): Likewise.
5835 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5836 (delete_raw_breakpoint): Adjust for kind.
5837 (delete_breakpoint): Likewise.
5838 (find_gdb_breakpoint): Likewise.
5839 (set_gdb_breakpoint_1): Likewise.
5840 (set_gdb_breakpoint): Likewise.
5841 (delete_gdb_breakpoint_1): Likewise.
5842 (delete_gdb_breakpoint): Likewise.
5843 (uninsert_raw_breakpoint): Likewise.
5844 (reinsert_raw_breakpoint): Likewise.
5845 (set_breakpoint_data): Remove.
5846 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5847 (check_mem_read): Adjust for kind call bp_size.
5848 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5849 (clone_one_breakpoint): Adjust for kind.
5850 * mem-break.h (set_gdb_breakpoint): Likewise.
5851 (delete_gdb_breakpoint): Likewise.
5852 * server.c (process_serial_event): Likewise.
5854 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5856 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5857 (struct linux_target_ops) <breakpoint>: Remove.
5858 (struct linux_target_ops) <breakpoint_len>: Remove.
5859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5860 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5861 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5862 (arm_sw_breakpoint_from_kind): New function.
5863 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5864 (struct linux_target_ops) <breakpoint>: Remove.
5865 (struct linux_target_ops) <breakpoint_len>: Remove.
5866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5868 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5869 (struct linux_target_ops) <breakpoint>: Remove.
5870 (struct linux_target_ops) <breakpoint_len>: Remove.
5871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5873 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5874 (struct linux_target_ops) <breakpoint>: Remove.
5875 (struct linux_target_ops) <breakpoint_len>: Remove.
5876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5877 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5878 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5879 and sw_breakpoint_from_kind to increment the pc.
5880 (linux_breakpoint_kind_from_pc): New function.
5881 (linux_sw_breakpoint_from_kind): New function.
5882 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5883 (initialize_low): Call breakpoint_kind_from_pc and
5884 sw_breakpoint_from_kind to replace breakpoint_data/len.
5885 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5888 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5889 (struct linux_target_ops) <breakpoint>: Remove.
5890 (struct linux_target_ops) <breakpoint_len>: Remove.
5891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5893 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5894 (struct linux_target_ops) <breakpoint>: Remove.
5895 (struct linux_target_ops) <breakpoint_len>: Remove.
5896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5898 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5899 (struct linux_target_ops) <breakpoint>: Remove.
5900 (struct linux_target_ops) <breakpoint_len>: Remove.
5901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5903 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5904 (struct linux_target_ops) <breakpoint>: Remove.
5905 (struct linux_target_ops) <breakpoint_len>: Remove.
5906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5908 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5909 (struct linux_target_ops) <breakpoint>: Remove.
5910 (struct linux_target_ops) <breakpoint_len>: Remove.
5911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5913 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5914 (struct linux_target_ops) <breakpoint>: Remove.
5915 (struct linux_target_ops) <breakpoint_len>: Remove.
5916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5918 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5919 (struct linux_target_ops) <breakpoint>: Remove.
5920 (struct linux_target_ops) <breakpoint_len>: Remove.
5921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5923 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5924 (struct linux_target_ops) <breakpoint>: Remove.
5925 (struct linux_target_ops) <breakpoint_len>: Remove.
5926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5928 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5929 (struct linux_target_ops) <breakpoint>: Remove.
5930 (struct linux_target_ops) <breakpoint_len>: Remove.
5931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5933 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5934 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5935 (struct linux_target_ops) <breakpoint>: Remove.
5936 (struct linux_target_ops) <breakpoint_len>: Remove.
5937 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5938 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5939 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5940 (struct linux_target_ops) <breakpoint>: Remove.
5941 (struct linux_target_ops) <breakpoint_len>: Remove.
5942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5945 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5947 * linux-cris-low.c (cris_get_pc): Remove void arg.
5949 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5951 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5954 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5956 * inferiors.c (thread_pid_matches_callback): New function.
5957 (find_thread_process): New function.
5958 (remove_thread): Reset current_thread.
5959 (remove_process): Assert threads have been removed first.
5961 2015-10-15 Yao Qi <yao.qi@linaro.org>
5963 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5965 (aarch64_remove_point): Likewise.
5966 * regcache.c (regcache_register_size): New function.
5968 2015-10-12 Yao Qi <yao.qi@linaro.org>
5970 * linux-aarch64-low.c: Update all callers as emit_load_store
5971 is renamed to aarch64_emit_load_store.
5973 2015-10-12 Yao Qi <yao.qi@linaro.org>
5975 * linux-aarch64-low.c: Update all callers of function renaming
5976 from emit_insn to aarch64_emit_insn.
5978 2015-10-12 Yao Qi <yao.qi@linaro.org>
5980 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5981 arch/aarch64-insn.h.
5982 (struct aarch64_memory_operand): Likewise.
5984 (emit_insn): Move to arch/aarch64-insn.c.
5985 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5986 (emit_load_store): Move to arch/aarch64-insn.c.
5987 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5988 (can_encode_int32): Remove.
5990 2015-10-12 Yao Qi <yao.qi@linaro.org>
5992 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5993 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5994 (aarch64_relocate_instruction): Likewise.
5995 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5996 (struct aarch64_insn_visitor): Likewise.
5998 2015-10-12 Yao Qi <yao.qi@linaro.org>
6000 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6001 (struct aarch64_insn_visitor): New.
6002 (struct aarch64_insn_relocation_data): New.
6003 (aarch64_ftrace_insn_reloc_b): New function.
6004 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6005 (aarch64_ftrace_insn_reloc_cb): Likewise.
6006 (aarch64_ftrace_insn_reloc_tb): Likewise.
6007 (aarch64_ftrace_insn_reloc_adr): Likewise.
6008 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6009 (aarch64_ftrace_insn_reloc_others): Likewise.
6011 (aarch64_relocate_instruction): Use visitor.
6013 2015-10-12 Yao Qi <yao.qi@linaro.org>
6015 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6016 int. Add argument buf.
6017 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6018 aarch64_relocate_instruction.
6020 2015-10-12 Yao Qi <yao.qi@linaro.org>
6022 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6023 argument insn. Remove local variable insn. Don't call
6025 (aarch64_install_fast_tracepoint_jump_pad): Call
6028 2015-09-30 Yao Qi <yao.qi@linaro.org>
6030 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6031 (emit_load_store_pair): Likewise.
6033 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6035 * dll.c (match_dll): Add cast(s).
6036 (unloaded_dll): Likewise.
6037 * linux-low.c (second_thread_of_pid_p): Likewise.
6038 (delete_lwp_callback): Likewise.
6039 (count_events_callback): Likewise.
6040 (select_event_lwp_callback): Likewise.
6041 (linux_set_resume_request): Likewise.
6042 * server.c (accumulate_file_name_length): Likewise.
6043 (emit_dll_description): Likewise.
6044 (handle_qxfer_threads_worker): Likewise.
6045 (visit_actioned_threads): Likewise.
6046 * thread-db.c (any_thread_of): Likewise.
6047 * tracepoint.c (same_process_p): Likewise.
6048 (match_blocktype): Likewise.
6049 (build_traceframe_info_xml): Likewise.
6051 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6053 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6055 (gdb_unparse_agent_expr): Likewise.
6056 * hostio.c (require_data): Likewise.
6057 (handle_pread): Likewise.
6058 * linux-low.c (disable_regset): Likewise.
6059 (fetch_register): Likewise.
6060 (store_register): Likewise.
6061 (get_dynamic): Likewise.
6062 (linux_qxfer_libraries_svr4): Likewise.
6063 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6064 (set_fast_tracepoint_jump): Likewise.
6065 (uninsert_fast_tracepoint_jumps_at): Likewise.
6066 (reinsert_fast_tracepoint_jumps_at): Likewise.
6067 (validate_inserted_breakpoint): Likewise.
6068 (clone_agent_expr): Likewise.
6069 * regcache.c (init_register_cache): Likewise.
6070 * remote-utils.c (putpkt_binary_1): Likewise.
6071 (decode_M_packet): Likewise.
6072 (decode_X_packet): Likewise.
6073 (look_up_one_symbol): Likewise.
6074 (relocate_instruction): Likewise.
6075 (monitor_output): Likewise.
6076 * server.c (handle_search_memory): Likewise.
6077 (handle_qxfer_exec_file): Likewise.
6078 (handle_qxfer_libraries): Likewise.
6079 (handle_qxfer): Likewise.
6080 (handle_query): Likewise.
6081 (handle_v_cont): Likewise.
6082 (handle_v_run): Likewise.
6083 (captured_main): Likewise.
6084 * target.c (write_inferior_memory): Likewise.
6085 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6086 * tracepoint.c (init_trace_buffer): Likewise.
6087 (add_tracepoint_action): Likewise.
6088 (add_traceframe): Likewise.
6089 (add_traceframe_block): Likewise.
6090 (cmd_qtdpsrc): Likewise.
6091 (cmd_qtdv): Likewise.
6092 (cmd_qtstatus): Likewise.
6093 (response_source): Likewise.
6094 (response_tsv): Likewise.
6095 (cmd_qtnotes): Likewise.
6096 (gdb_collect): Likewise.
6097 (initialize_tracepoint): Likewise.
6099 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6101 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6102 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6103 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6105 (enum aarch64_condition_codes): New enum.
6106 (w0): New static global.
6109 (struct aarch64_memory_operand) <type>: New
6110 MEMORY_OPERAND_POSTINDEX type.
6111 (postindex_memory_operand): New helper function.
6112 (emit_ret): New function.
6113 (emit_load_store_pair): New function, factored out of emit_stp
6114 with support for MEMORY_OPERAND_POSTINDEX.
6115 (emit_stp): Rewrite using emit_load_store_pair.
6116 (emit_ldp): New function.
6117 (emit_load_store): Likewise.
6118 (emit_ldr): Mention post-index instruction in comment.
6119 (emit_ldrh): New function.
6120 (emit_ldrb): New function.
6121 (emit_ldrsw): Mention post-index instruction in comment.
6122 (emit_str): Likewise.
6123 (emit_subs): New function.
6124 (emit_cmp): Likewise.
6125 (emit_and): Likewise.
6126 (emit_orr): Likewise.
6127 (emit_orn): Likewise.
6128 (emit_eor): Likewise.
6129 (emit_mvn): Likewise.
6130 (emit_lslv): Likewise.
6131 (emit_lsrv): Likewise.
6132 (emit_asrv): Likewise.
6133 (emit_mul): Likewise.
6134 (emit_sbfm): Likewise.
6135 (emit_sbfx): Likewise.
6136 (emit_ubfm): Likewise.
6137 (emit_ubfx): Likewise.
6138 (emit_csinc): Likewise.
6139 (emit_cset): Likewise.
6140 (emit_nop): Likewise.
6141 (emit_ops_insns): New helper function.
6142 (emit_pop): Likewise.
6143 (emit_push): Likewise.
6144 (aarch64_emit_prologue): New function.
6145 (aarch64_emit_epilogue): Likewise.
6146 (aarch64_emit_add): Likewise.
6147 (aarch64_emit_sub): Likewise.
6148 (aarch64_emit_mul): Likewise.
6149 (aarch64_emit_lsh): Likewise.
6150 (aarch64_emit_rsh_signed): Likewise.
6151 (aarch64_emit_rsh_unsigned): Likewise.
6152 (aarch64_emit_ext): Likewise.
6153 (aarch64_emit_log_not): Likewise.
6154 (aarch64_emit_bit_and): Likewise.
6155 (aarch64_emit_bit_or): Likewise.
6156 (aarch64_emit_bit_xor): Likewise.
6157 (aarch64_emit_bit_not): Likewise.
6158 (aarch64_emit_equal): Likewise.
6159 (aarch64_emit_less_signed): Likewise.
6160 (aarch64_emit_less_unsigned): Likewise.
6161 (aarch64_emit_ref): Likewise.
6162 (aarch64_emit_if_goto): Likewise.
6163 (aarch64_emit_goto): Likewise.
6164 (aarch64_write_goto_address): Likewise.
6165 (aarch64_emit_const): Likewise.
6166 (aarch64_emit_call): Likewise.
6167 (aarch64_emit_reg): Likewise.
6168 (aarch64_emit_pop): Likewise.
6169 (aarch64_emit_stack_flush): Likewise.
6170 (aarch64_emit_zero_ext): Likewise.
6171 (aarch64_emit_swap): Likewise.
6172 (aarch64_emit_stack_adjust): Likewise.
6173 (aarch64_emit_int_call_1): Likewise.
6174 (aarch64_emit_void_call_2): Likewise.
6175 (aarch64_emit_eq_goto): Likewise.
6176 (aarch64_emit_ne_goto): Likewise.
6177 (aarch64_emit_lt_goto): Likewise.
6178 (aarch64_emit_le_goto): Likewise.
6179 (aarch64_emit_gt_goto): Likewise.
6180 (aarch64_emit_ge_got): Likewise.
6181 (aarch64_emit_ops_impl): New static global variable.
6182 (aarch64_emit_ops): New target function, return
6183 &aarch64_emit_ops_impl.
6184 (struct linux_target_ops): Install it.
6186 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6188 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6189 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6191 * linux-aarch64-ipa.c: New file.
6192 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6194 (aarch64_get_thread_area): New target method.
6195 (extract_signed_bitfield): New helper function.
6196 (aarch64_decode_ldr_literal): New function.
6197 (enum aarch64_opcodes): New enum.
6198 (struct aarch64_register): New struct.
6199 (struct aarch64_operand): New struct.
6200 (x0): New static global.
6209 (aarch64_register): New helper function.
6210 (register_operand): Likewise.
6211 (immediate_operand): Likewise.
6212 (struct aarch64_memory_operand): New struct.
6213 (offset_memory_operand): New helper function.
6214 (preindex_memory_operand): Likewise.
6215 (enum aarch64_system_control_registers): New enum.
6216 (ENCODE): New macro.
6217 (emit_insn): New helper function.
6218 (emit_b): New function.
6219 (emit_bcond): Likewise.
6220 (emit_cb): Likewise.
6221 (emit_tb): Likewise.
6222 (emit_blr): Likewise.
6223 (emit_stp): Likewise.
6224 (emit_ldp_q_offset): Likewise.
6225 (emit_stp_q_offset): Likewise.
6226 (emit_load_store): Likewise.
6227 (emit_ldr): Likewise.
6228 (emit_ldrsw): Likewise.
6229 (emit_str): Likewise.
6230 (emit_ldaxr): Likewise.
6231 (emit_stxr): Likewise.
6232 (emit_stlr): Likewise.
6233 (emit_data_processing_reg): Likewise.
6234 (emit_data_processing): Likewise.
6235 (emit_add): Likewise.
6236 (emit_sub): Likewise.
6237 (emit_mov): Likewise.
6238 (emit_movk): Likewise.
6239 (emit_mov_addr): Likewise.
6240 (emit_mrs): Likewise.
6241 (emit_msr): Likewise.
6242 (emit_sevl): Likewise.
6243 (emit_wfe): Likewise.
6244 (append_insns): Likewise.
6245 (can_encode_int32_in): New helper function.
6246 (aarch64_relocate_instruction): New function.
6247 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6248 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6249 (struct linux_target_ops): Install aarch64_get_thread_area,
6250 aarch64_install_fast_tracepoint_jump_pad and
6251 aarch64_get_min_fast_tracepoint_insn_len.
6253 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6255 * Makefile.in (aarch64-insn.o): New rule.
6256 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6258 2015-09-21 Yao Qi <yao.qi@linaro.org>
6260 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6262 2015-09-21 Yao Qi <yao.qi@linaro.org>
6264 * tracepoint.c (max_jump_pad_size): Remove.
6266 2015-09-18 Yao Qi <yao.qi@linaro.org>
6268 * linux-aarch64-low.c: Don't include sys/uio.h.
6269 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6271 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6273 * tracepoint.c (eval_result_type): Change prototype.
6274 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6276 2015-09-15 Pedro Alves <palves@redhat.com>
6278 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6279 Check whether to report exec events instead of checking whether
6280 multiprocess is enabled.
6282 2015-09-15 Pedro Alves <palves@redhat.com>
6285 * remote-utils.c (prepare_resume_reply): Merge
6286 TARGET_WAITKIND_VFORK_DONE switch case with the
6287 TARGET_WAITKIND_FORKED case.
6289 2015-09-15 Yao Qi <yao.qi@linaro.org>
6291 * server.c (handle_query): Check string comparison using
6292 "else if" instead of "if".
6294 2015-09-15 Yao Qi <yao.qi@linaro.org>
6296 * server.c (vCont_supported): New global variable.
6297 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6298 matches. Append ";vContSupported+" to own_buf.
6299 (handle_v_requests): Append ";s;S" to own_buf if target supports
6300 hardware single step or vCont_supported is false.
6301 (capture_main): Set vCont_supported to zero.
6303 2015-09-15 Yao Qi <yao.qi@linaro.org>
6305 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6307 (linux_supports_hardware_single_step): ... New function.
6308 (linux_target_ops): Update.
6309 * lynx-low.c (lynx_target_ops): Set field
6310 supports_hardware_single_step to target_can_do_hardware_single_step.
6311 * nto-low.c (nto_target_ops): Likewise.
6312 * spu-low.c (spu_target_ops): Likewise.
6313 * win32-low.c (win32_target_ops): Likewise.
6314 * target.c (target_can_do_hardware_single_step): New function.
6315 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6316 Remove. <supports_hardware_single_step>: New field.
6317 (target_supports_conditional_breakpoints): Remove.
6318 (target_supports_hardware_single_step): New macro.
6319 (target_can_do_hardware_single_step): Declare.
6320 * server.c (handle_query): Use target_supports_hardware_single_step
6321 instead of target_supports_conditional_breakpoints.
6323 2015-09-15 Yao Qi <yao.qi@linaro.org>
6325 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6327 (struct linux_target_ops the_low_target): Install
6328 aarch64_linux_siginfo_fixup.
6330 2015-09-11 Don Breazeal <donb@codesourcery.com>
6331 Luis Machado <lgustavo@codesourcery.com>
6333 * linux-low.c (linux_mourn): Static declaration.
6334 (linux_arch_setup): Move in front of
6335 handle_extended_wait.
6336 (linux_arch_setup_thread): New function.
6337 (handle_extended_wait): Handle exec events. Call
6338 linux_arch_setup_thread. Make event_lwp argument a
6339 pointer-to-a-pointer.
6340 (check_zombie_leaders): Do not check stopped threads.
6341 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6342 (linux_low_filter_event): Add lwp and thread for exec'ing
6343 non-leader thread if leader thread has been deleted.
6344 Refactor code into linux_arch_setup_thread and call it.
6345 Pass child lwp pointer by reference to handle_extended_wait.
6346 (linux_wait_for_event_filtered): Update comment.
6347 (linux_wait_1): Prevent clobbering exec event status.
6348 (linux_supports_exec_events): New function.
6349 (linux_target_ops) <supports_exec_events>: Initialize new member.
6350 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6352 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6353 * server.c (report_exec_events): New global variable.
6354 (handle_query): Handle qSupported query for exec-events feature.
6355 (captured_main): Initialize report_exec_events.
6356 * server.h (report_exec_events): Declare new global variable.
6357 * target.h (struct target_ops) <supports_exec_events>: New
6359 (target_supports_exec_events): New macro.
6360 * win32-low.c (win32_target_ops) <supports_exec_events>:
6361 Initialize new member.
6363 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6365 * linux-low.c (linux_low_enable_btrace): Remove.
6366 (linux_target_ops): Replace linux_low_enable_btrace with
6367 linux_enable_btrace.
6369 2015-09-03 Yao Qi <yao.qi@linaro.org>
6371 * linux-aarch64-low.c (aarch64_insert_point): Call
6372 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6375 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6377 * linux-low.c (check_stopped_by_breakpoint): Use
6378 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6380 2015-08-27 Pedro Alves <palves@redhat.com>
6382 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6384 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6386 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6387 the XNEW-family equivalent.
6388 (compile_bytecodes): Likewise.
6389 * dll.c (loaded_dll): Likewise.
6390 * event-loop.c (append_callback_event): Likewise.
6391 (create_file_handler): Likewise.
6392 (create_file_event): Likewise.
6393 * hostio.c (handle_open): Likewise.
6394 * inferiors.c (add_thread): Likewise.
6395 (add_process): Likewise.
6396 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6397 * linux-arm-low.c (arm_new_process): Likewise.
6398 (arm_new_thread): Likewise.
6399 * linux-low.c (add_to_pid_list): Likewise.
6400 (linux_add_process): Likewise.
6401 (handle_extended_wait): Likewise.
6402 (add_lwp): Likewise.
6403 (enqueue_one_deferred_signal): Likewise.
6404 (enqueue_pending_signal): Likewise.
6405 (linux_resume_one_lwp_throw): Likewise.
6406 (linux_resume_one_thread): Likewise.
6407 (linux_read_memory): Likewise.
6408 (linux_write_memory): Likewise.
6409 * linux-mips-low.c (mips_linux_new_process): Likewise.
6410 (mips_linux_new_thread): Likewise.
6411 (mips_add_watchpoint): Likewise.
6412 * linux-x86-low.c (initialize_low_arch): Likewise.
6413 * lynx-low.c (lynx_add_process): Likewise.
6414 * mem-break.c (set_raw_breakpoint_at): Likewise.
6415 (set_breakpoint): Likewise.
6416 (add_condition_to_breakpoint): Likewise.
6417 (add_commands_to_breakpoint): Likewise.
6418 (clone_agent_expr): Likewise.
6419 (clone_one_breakpoint): Likewise.
6420 * regcache.c (new_register_cache): Likewise.
6421 * remote-utils.c (look_up_one_symbol): Likewise.
6422 * server.c (queue_stop_reply): Likewise.
6423 (start_inferior): Likewise.
6424 (queue_stop_reply_callback): Likewise.
6425 (handle_target_event): Likewise.
6426 * spu-low.c (fetch_ppc_memory): Likewise.
6427 (store_ppc_memory): Likewise.
6428 * target.c (set_target_ops): Likewise.
6429 * thread-db.c (thread_db_load_search): Likewise.
6430 (try_thread_db_load_1): Likewise.
6431 * tracepoint.c (add_tracepoint): Likewise.
6432 (add_tracepoint_action): Likewise.
6433 (create_trace_state_variable): Likewise.
6434 (cmd_qtdpsrc): Likewise.
6435 (cmd_qtro): Likewise.
6436 (add_while_stepping_state): Likewise.
6437 * win32-low.c (child_add_thread): Likewise.
6438 (get_image_name): Likewise.
6440 2015-08-25 Yao Qi <yao.qi@linaro.org>
6442 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6444 2015-08-25 Yao Qi <yao.qi@linaro.org>
6446 * Makefile.in (aarch64-linux.o): New rule.
6447 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6449 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6450 (aarch64_init_debug_reg_state): Make it extern.
6451 (aarch64_linux_prepare_to_resume): Remove.
6453 2015-08-25 Yao Qi <yao.qi@linaro.org>
6455 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6456 lwp_arch_private_info and ptid_of_lwp.
6458 2015-08-25 Yao Qi <yao.qi@linaro.org>
6460 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6461 Find proc_info by find_process_pid. All callers updated.
6463 2015-08-25 Yao Qi <yao.qi@linaro.org>
6465 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6467 (debug_reg_change_callback): Remove.
6468 (aarch64_notify_debug_reg_change): Remove.
6470 2015-08-25 Yao Qi <yao.qi@linaro.org>
6472 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6473 Call current_lwp_ptid.
6475 2015-08-25 Yao Qi <yao.qi@linaro.org>
6477 * linux-aarch64-low.c (debug_reg_change_callback): Use
6480 2015-08-25 Yao Qi <yao.qi@linaro.org>
6482 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6484 2015-08-25 Yao Qi <yao.qi@linaro.org>
6486 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6488 2015-08-25 Yao Qi <yao.qi@linaro.org>
6490 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6493 2015-08-25 Yao Qi <yao.qi@linaro.org>
6495 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6497 (debug_reg_change_callback): Remove argument entry and add argument
6498 lwp. Remove local variable thread. Don't print thread id in the
6499 debugging output. Don't check whether pid of thread equals to pid.
6500 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6501 iterate_over_lwps instead find_inferior.
6503 2015-08-24 Pedro Alves <palves@redhat.com>
6505 * inferiors.c (get_first_process): New function.
6506 * inferiors.h (get_first_process): New declaration.
6507 * remote-utils.c (read_ptid): Default to the first process in the
6508 list, instead of to the current thread's process.
6510 2015-08-24 Pedro Alves <palves@redhat.com>
6512 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6513 * event-loop.c: Likewise.
6514 * remote-utils.c: Likewise.
6515 * tracepoint.c: Likewise.
6517 2015-08-24 Pedro Alves <palves@redhat.com>
6519 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6522 2015-08-21 Pedro Alves <palves@redhat.com>
6524 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6525 instead of literal 1.
6527 2015-08-21 Pedro Alves <palves@redhat.com>
6529 * tdesc.c (default_description): Explicitly zero-initialize.
6531 2015-08-21 Pedro Alves <palves@redhat.com>
6534 * inferiors.c (remove_thread): Discard any pending stop reply for
6536 * server.c (remove_all_on_match_pid): Rename to ...
6537 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6539 (discard_queued_stop_replies): Change parameter to a ptid. Now
6541 (handle_v_kill, kill_inferior_callback, captured_main)
6542 (process_serial_event): Adjust.
6543 * server.h (discard_queued_stop_replies): Declare.
6545 2015-08-21 Pedro Alves <palves@redhat.com>
6547 * linux-low.c (wait_for_sigstop): Always switch to no thread
6548 selected if the previously current thread dies.
6549 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6550 process instead of the current thread's.
6551 * remote-utils.c (input_interrupt): Don't check if there's no
6553 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6554 current thread to the general thread fails, error out.
6555 (handle_qxfer_auxv, handle_qxfer_libraries)
6556 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6557 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6558 (handle_query): Check if there's a thread selected instead of
6559 checking whether there's any thread in the thread list.
6560 (handle_qxfer_threads, handle_qxfer_btrace)
6561 (handle_qxfer_btrace_conf): Don't error out early if there's no
6562 thread in the thread list.
6563 (handle_v_cont, myresume): Don't set the current thread to the
6565 (process_serial_event) <Hg handling>: Also set thread_id if the
6566 previous general thread is still alive.
6567 (process_serial_event) <g/G handling>: If setting the current
6568 thread to the general thread fails, error out.
6569 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6570 thread's lwp instead of the current thread's.
6571 * target.c (set_desired_thread): If the desired thread was not
6572 found, leave the current thread pointing to NULL. Return an int
6573 (boolean) indicating success.
6574 * target.h (set_desired_thread): Change return type to int.
6576 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6578 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6579 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6581 (ps_get_thread_area): New function.
6583 2015-08-19 Gary Benson <gbenson@redhat.com>
6585 * hostio.c (handle_pread): Do not attempt to read more data
6586 than hostio_reply_with_data can fit in a packet.
6588 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6590 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6592 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6594 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6596 2015-08-06 Pedro Alves <palves@redhat.com>
6598 * tracepoint.c (expr_eval_result): Now an int.
6600 2015-08-06 Pedro Alves <palves@redhat.com>
6602 * gdbthread.h (struct regcache): Forward declare.
6603 (struct thread_info) <regcache_data>: Now a struct regcache
6605 * inferiors.c (inferior_regcache_data)
6606 (set_inferior_regcache_data): Now work with struct regcache
6608 * inferiors.h (struct regcache): Forward declare.
6609 (inferior_regcache_data, set_inferior_regcache_data): Now work
6610 with struct regcache pointers.
6611 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6612 (free_register_cache_thread): Remove struct regcache pointer
6615 2015-08-06 Pedro Alves <palves@redhat.com>
6617 * server.c (captured_main): On error, print the exception message
6618 to stderr, and if run_once is set, throw a quit.
6620 2015-08-06 Pedro Alves <palves@redhat.com>
6622 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6625 2015-08-06 Pedro Alves <palves@redhat.com>
6627 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6628 reading beyond the passed in buffer length.
6630 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6632 * tracepoint.c (symbol_list) <required>: Remove.
6634 2015-08-06 Pedro Alves <palves@redhat.com>
6636 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6637 count if stopping and suspending threads.
6638 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6639 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6640 (linux_detach): Complete an ongoing step-over.
6641 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6643 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6644 (linux_wait_1): If passing a signal to the inferior after
6645 finishing a step-over, unsuspend and re-resume all lwps. If we
6646 see a single-step event but the thread should be continuing, don't
6647 pass the trap to gdb.
6648 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6649 internal_error instead of gdb_assert.
6650 (enqueue_pending_signal): New function.
6651 (check_ptrace_stopped_lwp_gone): Add debug output.
6652 (start_step_over): Use internal_error instead of gdb_assert.
6653 (complete_ongoing_step_over): New function.
6654 (linux_resume_one_thread): Don't resume a suspended thread.
6655 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6658 2015-08-06 Pedro Alves <palves@redhat.com>
6660 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6661 (linux_thread_alive): Use lwp_is_marked_dead.
6662 (extended_event_reported): Delete.
6663 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6664 instead of extended_event_reported.
6665 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6667 (lwp_is_marked_dead): New function.
6668 (lwp_running): Use lwp_is_marked_dead.
6669 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6672 2015-08-06 Pedro Alves <palves@redhat.com>
6674 * linux-low.c (linux_wait_1): Move fork event output out of the
6675 !report_to_gdb check. Pass event_child->waitstatus to
6676 target_waitstatus_to_string instead of ourstatus.
6678 2015-08-04 Yao Qi <yao.qi@linaro.org>
6680 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6681 if current_thread is 32 bit.
6683 2015-08-04 Yao Qi <yao.qi@linaro.org>
6685 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6686 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6687 * server.c (extended_protocol): Remove "static".
6688 * server.h (extended_protocol): Declare it.
6690 2015-08-04 Yao Qi <yao.qi@linaro.org>
6692 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6693 both aarch64 and aarch32.
6694 (aarch64_set_pc): Likewise.
6696 2015-08-04 Yao Qi <yao.qi@linaro.org>
6698 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6699 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6700 arm-with-neon.xml to srv_xmlfiles.
6701 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6702 (is_64bit_tdesc): New function.
6703 (aarch64_linux_read_description): New function.
6704 (aarch64_arch_setup): Call aarch64_linux_read_description.
6705 (regs_info): Rename to regs_info_aarch64.
6706 (aarch64_regs_info): Return right regs_info.
6707 (initialize_low_arch): Call initialize_low_arch_aarch32.
6709 2015-08-04 Yao Qi <yao.qi@linaro.org>
6711 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6712 * linux-aarch32-low.c: New file.
6713 * linux-aarch32-low.h: New file.
6714 * linux-arm-low.c (arm_fill_gregset): Move it to
6715 linux-aarch32-low.c.
6716 (arm_store_gregset): Likewise.
6717 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6718 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6719 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6720 (regs_info): Rename to regs_info_arm.
6721 (arm_regs_info): Return regs_info_aarch32 if
6722 have_ptrace_getregset is 1 and target description is
6723 arm_with_neon or arm_with_vfpv3.
6724 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6725 Call initialize_low_arch_aarch32 instead.
6727 2015-08-04 Yao Qi <yao.qi@linaro.org>
6729 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6730 * linux-low.c: ... here.
6731 * linux-low.h (have_ptrace_getregset): Declare it.
6733 2015-08-04 Pedro Alves <palves@redhat.com>
6735 * thread-db.c (struct thread_db): Use new typedefs.
6736 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6738 (disable_thread_event_reporting): Cast result of dlsym to
6739 destination function pointer type.
6740 (thread_db_mourn): Use td_ta_delete_ftype.
6742 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6744 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6746 (CDX_BREAKPOINT): Define for R2.
6747 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6748 (the_low_target): Add comments.
6750 2015-07-30 Yao Qi <yao.qi@linaro.org>
6752 * linux-arm-low.c (arm_hwcap): Remove it.
6753 (arm_read_description): New local variable arm_hwcap. Don't
6754 set arm_hwcap to zero.
6756 2015-07-30 Yao Qi <yao.qi@linaro.org>
6758 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6759 Use regcache->tdesc instead.
6760 (arm_store_wmmxregset): Likewise.
6761 (arm_fill_vfpregset): Likewise.
6762 (arm_store_vfpregset): Likewise.
6764 2015-07-30 Yao Qi <yao.qi@linaro.org>
6766 * linux-arm-low.c: Include arch/arm.h.
6767 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6768 (arm_store_gregset): Likewise.
6770 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6772 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6773 ptrace's 4th parameter.
6775 2015-07-27 Yao Qi <yao.qi@linaro.org>
6777 * configure.srv (case aarch64*-*-linux*): Don't set
6780 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6782 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6784 * linux-arm-low.c: Likewise.
6785 * linux-cris-low.c: Likewise.
6786 * linux-crisv32-low.c: Likewise.
6787 * linux-low.c: Likewise.
6788 * linux-m68k-low.c: Likewise.
6789 * linux-mips-low.c: Likewise.
6790 * linux-nios2-low.c: Likewise.
6791 * linux-s390-low.c: Likewise.
6792 * linux-sparc-low.c: Likewise.
6793 * linux-tic6x-low.c: Likewise.
6794 * linux-tile-low.c: Likewise.
6795 * linux-x86-low.c: Likewise.
6797 2015-07-24 Pedro Alves <palves@redhat.com>
6799 * config.in: Regenerate.
6800 * configure: Regenerate.
6802 2015-07-24 Pedro Alves <palves@redhat.com>
6804 * acinclude.m4: Include ../ptrace.m4.
6805 * configure.ac: Call GDB_AC_PTRACE.
6806 * config.in, configure: Regenerate.
6808 2015-07-24 Yao Qi <yao.qi@linaro.org>
6810 * linux-low.c (linux_create_inferior): Remove setting to
6811 proc->priv->new_inferior.
6812 (linux_attach): Likewise.
6813 (linux_low_filter_event): Likewise.
6814 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6816 2015-07-24 Yao Qi <yao.qi@linaro.org>
6818 * linux-low.c (linux_arch_setup): New function.
6819 (linux_low_filter_event): If proc->tdesc is NULL and
6820 proc->attached is true, call the_low_target.arch_setup.
6821 Otherwise, keep status pending, and return.
6822 (linux_resume_one_lwp_throw): Don't call get_pc if
6823 thread->while_stepping isn't NULL. Don't call
6824 get_thread_regcache if proc->tdesc is NULL.
6825 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6826 (linux_target_ops): Install arch_setup.
6827 * server.c (start_inferior): Call the_target->arch_setup.
6828 * target.h (struct target_ops) <arch_setup>: New field.
6829 (target_arch_setup): New marco.
6830 * lynx-low.c (lynx_target_ops): Update.
6831 * nto-low.c (nto_target_ops): Update.
6832 * spu-low.c (spu_target_ops): Update.
6833 * win32-low.c (win32_target_ops): Update.
6835 2015-07-24 Yao Qi <yao.qi@linaro.org>
6837 * linux-low.c (linux_add_process): Don't set
6838 proc->priv->new_inferior.
6839 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6840 (linux_attach): Likewise.
6842 2015-07-24 Yao Qi <yao.qi@linaro.org>
6844 * server.c (start_inferior): Code refactor.
6846 2015-07-24 Yao Qi <yao.qi@linaro.org>
6848 * server.c (process_serial_event): Set general_thread.
6850 2015-07-21 Yao Qi <yao.qi@linaro.org>
6852 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6853 aarch64_linux_get_debug_reg_capacity.
6855 2015-07-17 Yao Qi <yao.qi@linaro.org>
6857 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6858 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6859 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6860 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6861 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6862 (AARCH64_HWP_ALIGNMENT): Likewise.
6863 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6864 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6865 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6866 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6867 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6868 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6869 (struct aarch64_debug_reg_state): Likewise.
6870 (struct arch_lwp_info): Likewise.
6871 (aarch64_align_watchpoint): Likewise.
6872 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6873 (aarch64_watchpoint_length): Likewise.
6874 (aarch64_point_encode_ctrl_reg): Likewise
6875 (aarch64_point_is_aligned): Likewise.
6876 (aarch64_align_watchpoint): Likewise.
6877 (aarch64_linux_set_debug_regs):
6878 (aarch64_dr_state_insert_one_point): Likewise.
6879 (aarch64_dr_state_remove_one_point): Likewise.
6880 (aarch64_handle_breakpoint): Likewise.
6881 (aarch64_handle_aligned_watchpoint): Likewise.
6882 (aarch64_handle_unaligned_watchpoint): Likewise.
6883 (aarch64_handle_watchpoint): Likewise.
6885 2015-07-17 Yao Qi <yao.qi@linaro.org>
6887 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6888 and don't aarch64_get_debug_reg_state. All callers update.
6889 (aarch64_handle_aligned_watchpoint): Likewise.
6890 (aarch64_handle_unaligned_watchpoint): Likewise.
6891 (aarch64_handle_watchpoint): Likewise.
6892 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6893 (aarch64_remove_point): Likewise.
6895 2015-07-17 Yao Qi <yao.qi@linaro.org>
6897 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6899 (aarch64_handle_unaligned_watchpoint): Likewise.
6901 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6903 Revert the previous 3 commits:
6904 Move gdb_regex* to common/
6905 Move linux_find_memory_regions_full & co.
6906 gdbserver build-id attribute generator
6908 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6909 Jan Kratochvil <jan.kratochvil@redhat.com>
6911 gdbserver build-id attribute generator.
6912 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6913 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6914 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6916 (get_dynamic): Use find_pdhr to traverse program headers.
6917 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6918 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6919 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6920 (get_hex_build_id): New.
6921 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6922 to reply XML document.
6924 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6925 Jan Kratochvil <jan.kratochvil@redhat.com>
6927 * target.c: Include target/target-utils.h and fcntl.h.
6928 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6929 (target_fileio_read_stralloc): New functions.
6931 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6933 * Makefile.in (OBS): Add gdb_regex.o.
6935 * config.in: Rebuilt.
6936 * configure: Rebuilt.
6938 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6939 Jan Kratochvil <jan.kratochvil@redhat.com>
6941 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6942 * Makefile.in (OBS): Add target-utils.o.
6943 (linux-maps.o, target-utils.o): New.
6944 * configure.srv (srv_linux_obj): Add linux-maps.o.
6946 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6948 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6950 (the_low_target): Install it.
6952 2015-07-14 Pedro Alves <palves@redhat.com>
6954 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6955 Instead, ignore ECHILD, and throw an error for other errnos.
6957 2015-07-10 Pedro Alves <palves@redhat.com>
6959 * event-loop.c (struct callback_event) <data>: Change type to
6960 gdb_client_data instance instead of gdb_client_data pointer.
6961 (append_callback_event): Adjust.
6963 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6965 * linux-aarch64-low.c: Add comments for each linux_target_ops
6966 method. Remove comments already covered in target_ops and
6967 linux_target_ops definitions.
6968 (the_low_target): Add comments for each unimplemented method.
6970 2015-07-09 Yao Qi <yao.qi@linaro.org>
6972 * linux-aarch64-low.c (aarch64_regmap): Remove.
6973 (aarch64_usrregs_info): Remove.
6974 (regs_info): Set field usrregs to NULL.
6976 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6978 * linux-low.c: Include "rsp-low.h"
6979 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6980 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6981 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6982 (handle_btrace_enable_pt): New.
6983 (handle_btrace_general_set): Support "pt".
6984 (handle_btrace_conf_general_set): Support "pt:size".
6986 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6988 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6991 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6993 * linux-aarch64-low.c: Remove comment about endianness.
6994 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6995 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6998 2015-06-24 Gary Benson <gbenson@redhat.com>
7000 * linux-i386-ipa.c (stdint.h): Do not include.
7001 * lynx-i386-low.c (stdint.h): Likewise.
7002 * lynx-ppc-low.c (stdint.h): Likewise.
7003 * mem-break.c (stdint.h): Likewise.
7004 * thread-db.c (stdint.h): Likewise.
7005 * tracepoint.c (stdint.h): Likewise.
7006 * win32-low.c (stdint.h): Likewise.
7008 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7010 * server.c (write_qxfer_response): Update call to
7011 remote_escape_output.
7013 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7014 Jan Kratochvil <jan.kratochvil@redhat.com>
7016 Merge multiple hex conversions.
7017 * gdbreplay.c (tohex): Rename to 'fromhex'.
7018 (logchar): Use fromhex.
7020 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7022 * server.c (handle_qxfer_libraries): Set `version' attribute for
7025 2015-06-10 Gary Benson <gbenson@redhat.com>
7027 * target.h (struct target_ops) <multifs_open>: New field.
7028 <multifs_unlink>: Likewise.
7029 <multifs_readlink>: Likewise.
7030 * linux-low.c (nat/linux-namespaces.h): New include.
7031 (linux_target_ops): Initialize the_target->multifs_open,
7032 the_target->multifs_unlink and the_target->multifs_readlink.
7033 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7034 * hostio.c (hostio_fs_pid): New static variable.
7035 (hostio_handle_new_gdb_connection): New function.
7036 (handle_setfs): Likewise.
7037 (handle_open): Use the_target->multifs_open as appropriate.
7038 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7039 (handle_readlink): Use the_target->multifs_readlink as
7041 (handle_vFile): Handle vFile:setfs packets.
7042 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7043 after target_handle_new_gdb_connection.
7045 2015-06-10 Gary Benson <gbenson@redhat.com>
7047 * configure.ac (AC_CHECK_FUNCS): Add setns.
7048 * config.in: Regenerate.
7049 * configure: Likewise.
7050 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7051 (linux-namespaces.o): New rule.
7052 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7054 2015-06-09 Gary Benson <gbenson@redhat.com>
7056 * hostio.c (handle_open): Process mode argument with
7057 fileio_to_host_mode.
7059 2015-06-01 Yao Qi <yao.qi@linaro.org>
7061 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7062 * linux-x86-low.c: Likewise.
7064 2015-05-28 Don Breazeal <donb@codesourcery.com>
7066 * linux-low.c (handle_extended_wait): Initialize
7067 thread_info.last_resume_kind for new fork children.
7069 2015-05-15 Pedro Alves <palves@redhat.com>
7071 * target.h (target_handle_new_gdb_connection): Rewrite using if
7072 wrapped in do/while.
7074 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7076 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7077 * configure, config.in: Regenerate.
7078 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7081 2015-05-12 Don Breazeal <donb@codesourcery.com>
7083 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7084 PTRACE_EVENT_VFORK_DONE.
7085 (linux_low_ptrace_options, extended_event_reported): Add vfork
7087 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7088 and "vforkdone" for RSP 'T' Stop Reply Packet.
7089 * server.h (report_vfork_events): Declare
7092 2015-05-12 Don Breazeal <donb@codesourcery.com>
7094 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7095 (the_low_target) <new_fork>: Initialize new member.
7096 * linux-arm-low.c (arm_new_fork): New function.
7097 (the_low_target) <new_fork>: Initialize new member.
7098 * linux-low.c (handle_extended_wait): Call new target function
7100 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7101 * linux-mips-low.c (mips_add_watchpoint): New function
7102 extracted from mips_insert_point.
7103 (the_low_target) <new_fork>: Initialize new member.
7104 (mips_linux_new_fork): New function.
7105 (mips_insert_point): Call mips_add_watchpoint.
7106 * linux-x86-low.c (x86_linux_new_fork): New function.
7107 (the_low_target) <new_fork>: Initialize new member.
7109 2015-05-12 Don Breazeal <donb@codesourcery.com>
7111 * linux-low.c (handle_extended_wait): Implement return value,
7112 rename argument 'event_child' to 'event_lwp', handle
7113 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7114 (linux_low_ptrace_options): New function.
7115 (linux_low_filter_event): Call linux_low_ptrace_options,
7116 use different argument fo linux_enable_event_reporting,
7117 use return value from handle_extended_wait.
7118 (extended_event_reported): New function.
7119 (linux_wait_1): Call extended_event_reported and set
7120 status to report fork events.
7121 (linux_write_memory): Add pid to debug message.
7122 (reset_lwp_ptrace_options_callback): New function.
7123 (linux_handle_new_gdb_connection): New function.
7124 (linux_target_ops): Initialize new structure member.
7125 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7126 * lynx-low.c: Initialize new structure member.
7127 * remote-utils.c (prepare_resume_reply): Implement stop reason
7128 "fork" for "T" stop message.
7129 * server.c (handle_query): Call handle_new_gdb_connection.
7130 * server.h (report_fork_events): Declare global flag.
7131 * target.h (struct target_ops) <handle_new_gdb_connection>:
7133 (target_handle_new_gdb_connection): New macro.
7134 * win32-low.c: Initialize new structure member.
7136 2015-05-12 Don Breazeal <donb@codesourcery.com>
7138 * mem-break.c (APPEND_TO_LIST): Define macro.
7139 (clone_agent_expr): New function.
7140 (clone_one_breakpoint): New function.
7141 (clone_all_breakpoints): New function.
7142 * mem-break.h: Declare new functions.
7144 2015-05-12 Don Breazeal <donb@codesourcery.com>
7146 * linux-low.c (linux_supports_fork_events): New function.
7147 (linux_supports_vfork_events): New function.
7148 (linux_target_ops): Initialize new structure members.
7149 (initialize_low): Call linux_check_ptrace_features.
7150 * lynx-low.c (lynx_target_ops): Initialize new structure
7152 * server.c (report_fork_events, report_vfork_events):
7154 (handle_query): Add new features to qSupported packet and
7156 (captured_main): Initialize new global variables.
7157 * target.h (struct target_ops) <supports_fork_events>:
7159 <supports_vfork_events>: New member.
7160 (target_supports_fork_events): New macro.
7161 (target_supports_vfork_events): New macro.
7162 * win32-low.c (win32_target_ops): Initialize new structure
7165 2015-05-12 Gary Benson <gbenson@redhat.com>
7167 * server.c (handle_qxfer_exec_file): Use current process
7170 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7172 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7173 Remove HAVE_PTRACE_GETREGS conditionals.
7174 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7175 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7177 2015-05-08 Yao Qi <yao.qi@linaro.org>
7179 * linux-low.c (linux_supports_conditional_breakpoints): New
7181 (linux_target_ops): Install new target method.
7182 * lynx-low.c (lynx_target_ops): Install NULL hook for
7183 supports_conditional_breakpoints.
7184 * nto-low.c (nto_target_ops): Likewise.
7185 * spu-low.c (spu_target_ops): Likewise.
7186 * win32-low.c (win32_target_ops): Likewise.
7187 * server.c (handle_query): Check
7188 target_supports_conditional_breakpoints.
7189 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7191 (target_supports_conditional_breakpoints): New macro.
7193 2015-05-06 Pedro Alves <palves@redhat.com>
7196 * server.c (start_inferior): If the process exits, mourn it.
7198 2015-04-21 Gary Benson <gbenson@redhat.com>
7200 * hostio.c (fileio_open_flags_to_host): Factored out to
7201 fileio_to_host_openflags in common/fileio.c. Single use
7204 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7206 * linux-xtensa-low.c (xtensa_fill_gregset)
7207 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7210 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7212 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7213 (regs_info): Replace usrregs pointer with NULL.
7215 2015-04-17 Gary Benson <gbenson@redhat.com>
7217 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7218 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7219 * server.c (handle_qxfer_exec_file): New function.
7220 (qxfer_packets): Add exec-file entry.
7221 (handle_query): Report qXfer:exec-file:read as supported packet.
7223 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7225 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7227 2015-04-09 Gary Benson <gbenson@redhat.com>
7229 * hostio-errno.c (errno_to_fileio_error): Remove function.
7230 Update caller to use remote_fileio_to_fio_error.
7232 2015-04-09 Yao Qi <yao.qi@linaro.org>
7234 * linux-low.c (linux_insert_point): Call
7235 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7236 (linux_remove_point): Call remove_memory_breakpoint if type is
7238 * linux-x86-low.c (x86_insert_point): Don't call
7239 insert_memory_breakpoint.
7240 (x86_remove_point): Don't call remove_memory_breakpoint.
7242 2015-04-01 Pedro Alves <palves@redhat.com>
7243 Cleber Rosa <crosa@redhat.com>
7245 * server.c (gdbserver_usage): Reorganize and extend the usage
7248 2015-03-24 Pedro Alves <palves@redhat.com>
7250 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7251 output. Also dump TRAP_TRACE.
7252 (linux_low_filter_event): In debug output, distinguish a
7253 resume_stop SIGSTOP from a delayed SIGSTOP.
7255 2015-03-24 Gary Benson <gbenson@redhat.com>
7257 * linux-x86-low.c (x86_linux_new_thread): Moved to
7259 (x86_linux_prepare_to_resume): Likewise.
7261 2015-03-24 Gary Benson <gbenson@redhat.com>
7263 * Makefile.in (x86-linux-dregs.o): New rule.
7264 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7265 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7266 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7267 (x86_linux_dr_get): Likewise.
7268 (x86_linux_dr_set): Likewise.
7269 (update_debug_registers_callback): Likewise.
7270 (x86_linux_dr_set_addr): Likewise.
7271 (x86_linux_dr_get_addr): Likewise.
7272 (x86_linux_dr_set_control): Likewise.
7273 (x86_linux_dr_get_control): Likewise.
7274 (x86_linux_dr_get_status): Likewise.
7275 (x86_linux_update_debug_registers): Likewise.
7277 2015-03-24 Gary Benson <gbenson@redhat.com>
7279 * linux-x86-low.c (x86_linux_update_debug_registers):
7280 New function, factored out from...
7281 (x86_linux_prepare_to_resume): ...this.
7283 2015-03-24 Gary Benson <gbenson@redhat.com>
7285 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7286 (x86_linux_dr_set): Likewise.
7287 (update_debug_registers_callback): Likewise.
7288 (x86_linux_dr_set_addr): Likewise.
7289 (x86_linux_dr_get_addr): Likewise.
7290 (x86_linux_dr_set_control): Likewise.
7291 (x86_linux_dr_get_control): Likewise.
7292 (x86_linux_dr_get_status): Likewise.
7293 (x86_linux_prepare_to_resume): Likewise.
7295 2015-03-24 Gary Benson <gbenson@redhat.com>
7297 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7298 Use perror_with_name. Pass string through gettext.
7299 (x86_linux_dr_set): Likewise.
7301 2015-03-24 Gary Benson <gbenson@redhat.com>
7303 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7304 (x86_linux_dr_set_addr): ...this.
7305 (x86_dr_low_get_addr): Rename to...
7306 (x86_linux_dr_get_addr): ...this.
7307 (x86_dr_low_set_control): Rename to...
7308 (x86_linux_dr_set_control): ...this.
7309 (x86_dr_low_get_control): Rename to...
7310 (x86_linux_dr_get_control): ...this.
7311 (x86_dr_low_get_status): Rename to...
7312 (x86_linux_dr_get_status): ...this.
7313 (x86_dr_low): Update with new function names.
7315 2015-03-24 Gary Benson <gbenson@redhat.com>
7317 * Makefile.in (x86-linux.o): New rule.
7318 * configure.srv: Add x86-linux.o to relevant targets.
7319 * linux-low.c (lwp_set_arch_private_info): New function.
7320 (lwp_arch_private_info): Likewise.
7321 * linux-x86-low.c: Include nat/x86-linux.h.
7322 (arch_lwp_info): Removed structure.
7323 (update_debug_registers_callback):
7324 Use lwp_set_debug_registers_changed.
7325 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7326 and lwp_set_debug_registers_changed.
7327 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7329 2015-03-24 Gary Benson <gbenson@redhat.com>
7331 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7332 * linux-arm-low.c (arm_new_thread): Likewise.
7333 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7334 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7335 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7336 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7338 2015-03-24 Gary Benson <gbenson@redhat.com>
7340 * linux-low.c (ptid_of_lwp): New function.
7341 (lwp_is_stopped): Likewise.
7342 (lwp_stop_reason): Likewise.
7343 * linux-x86-low.c (update_debug_registers_callback):
7345 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7348 2015-03-24 Gary Benson <gbenson@redhat.com>
7350 * linux-low.h (linux_stop_lwp): Remove declaration.
7352 2015-03-24 Gary Benson <gbenson@redhat.com>
7354 * linux-low.h: Include nat/linux-nat.h.
7355 * linux-low.c (iterate_over_lwps_args): New structure.
7356 (iterate_over_lwps_filter): New function.
7357 (iterate_over_lwps): Likewise.
7358 * linux-x86-low.c (update_debug_registers_callback):
7359 Update signature to what iterate_over_lwps expects.
7360 Remove PID check that iterate_over_lwps now performs.
7361 (x86_dr_low_set_addr): Use iterate_over_lwps.
7362 (x86_dr_low_set_control): Likewise.
7364 2015-03-24 Gary Benson <gbenson@redhat.com>
7366 * linux-x86-low.c (x86_debug_reg_state): New function.
7367 (x86_linux_prepare_to_resume): Use the above.
7369 2015-03-24 Gary Benson <gbenson@redhat.com>
7371 * linux-low.c (current_lwp_ptid): New function.
7372 * linux-x86-low.c: Include nat/linux-nat.h.
7373 (x86_dr_low_get_addr): Use current_lwp_ptid.
7374 (x86_dr_low_get_control): Likewise.
7375 (x86_dr_low_get_status): Likewise.
7377 2015-03-20 Pedro Alves <palves@redhat.com>
7379 * tracepoint.c (cmd_qtstatus): Make "str" const.
7381 2015-03-20 Pedro Alves <palves@redhat.com>
7383 * server.c (handle_general_set): Make "req_str" const.
7385 2015-03-19 Pedro Alves <palves@redhat.com>
7387 * linux-low.c (linux_resume_one_lwp): Rename to ...
7388 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7389 instead call perror_with_name.
7390 (check_ptrace_stopped_lwp_gone): New function.
7391 (linux_resume_one_lwp): Reimplement as wrapper around
7392 linux_resume_one_lwp_throw that swallows errors if the LWP is
7395 2015-03-19 Pedro Alves <palves@redhat.com>
7397 * linux-low.c (count_events_callback, select_event_lwp_callback):
7398 No longer check whether the thread has resume_stop as last resume
7401 2015-03-19 Pedro Alves <palves@redhat.com>
7403 * linux-low.c (count_events_callback, select_event_lwp_callback):
7404 Use the lwp's status_pending_p field, not the thread's.
7406 2015-03-19 Pedro Alves <palves@redhat.com>
7408 * linux-low.c (select_event_lwp_callback): Update comments to
7409 no longer mention SIGTRAP.
7411 2015-03-18 Gary Benson <gbenson@redhat.com>
7413 * server.c (handle_query): Do not report vFile:fstat as supported.
7415 2015-03-11 Gary Benson <gbenson@redhat.com>
7417 * hostio.c (sys/types.h): New include.
7418 (sys/stat.h): Likewise.
7419 (common-remote-fileio.h): Likewise.
7420 (handle_fstat): New function.
7421 (handle_vFile): Handle vFile:fstat packets.
7423 2015-03-11 Gary Benson <gbenson@redhat.com>
7425 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7426 struct stat.st_blocks and struct stat.st_blksize.
7427 * configure: Regenerate.
7428 * config.in: Likewise.
7429 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7430 (OBS): Add common-remote-fileio.o.
7431 (common-remote-fileio.o): New rule.
7433 2015-03-09 Pedro Alves <palves@redhat.com>
7435 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7436 'struct sockaddr' pointer in 'accept' call.
7438 2015-03-09 Pedro Alves <palves@redhat.com>
7441 2015-03-07 Pedro Alves <palves@redhat.com>
7442 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7443 or <winsock2.h> here. Instead include "gdb_socket.h".
7444 (remote_open): Use union gdb_sockaddr_u.
7445 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7446 or <winsock2.h> here. Instead include "gdb_socket.h".
7447 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7448 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7450 (init_named_socket, gdb_agent_helper_thread): Use union
7453 2015-03-07 Pedro Alves <palves@redhat.com>
7455 * configure.ac (build_warnings): Move
7456 -Wdeclaration-after-statement to the C-specific set.
7457 * configure: Regenerate.
7459 2015-03-07 Pedro Alves <palves@redhat.com>
7461 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7462 or <winsock2.h> here. Instead include "gdb_socket.h".
7463 (remote_open): Use union gdb_sockaddr_u.
7464 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7465 or <winsock2.h> here. Instead include "gdb_socket.h".
7466 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7467 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7469 (init_named_socket, gdb_agent_helper_thread): Use union
7472 2015-03-07 Pedro Alves <palves@redhat.com>
7474 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7477 2015-03-06 Yao Qi <yao.qi@linaro.org>
7479 * linux-aarch64-low.c (aarch64_insert_point): Use
7480 show_debug_regs as a boolean.
7481 (aarch64_remove_point): Likewise.
7483 2015-03-05 Pedro Alves <palves@redhat.com>
7485 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7486 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7487 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7488 * nto-low.c (nto_target_ops): Likewise.
7489 * spu-low.c (spu_target_ops): Likewise.
7490 * win32-low.c (win32_target_ops): Likewise.
7492 2015-03-04 Pedro Alves <palves@redhat.com>
7494 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7495 Decide whether a breakpoint triggered based on the SIGTRAP's
7497 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7498 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7499 (linux_low_filter_event): Check for breakpoints before checking
7501 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7503 (linux_stopped_by_sw_breakpoint)
7504 (linux_supports_stopped_by_sw_breakpoint)
7505 (linux_stopped_by_hw_breakpoint)
7506 (linux_supports_stopped_by_hw_breakpoint): New functions.
7507 (linux_target_ops): Install new target methods.
7509 2015-03-04 Pedro Alves <palves@redhat.com>
7511 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7512 * server.c (swbreak_feature, hwbreak_feature): New globals.
7513 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7514 (captured_main): Clear swbreak_feature and hwbreak_feature.
7515 * server.h (swbreak_feature, hwbreak_feature): Declare.
7516 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7517 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7518 supports_stopped_by_hw_breakpoint>: New fields.
7519 (target_supports_stopped_by_sw_breakpoint)
7520 (target_stopped_by_sw_breakpoint)
7521 (target_supports_stopped_by_hw_breakpoint)
7522 (target_stopped_by_hw_breakpoint): Declare.
7524 2015-03-04 Pedro Alves <palves@redhat.com>
7526 enum lwp_stop_reason -> enum target_stop_reason
7527 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7528 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7529 (linux_wait_1, stuck_in_jump_pad_callback)
7530 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7531 (linux_stopped_by_watchpoint):
7532 * linux-low.h (enum lwp_stop_reason): Delete.
7533 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7534 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7536 2015-03-04 Yao Qi <yao.qi@linaro.org>
7538 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7540 2015-03-03 Gary Benson <gbenson@redhat.com>
7542 * hostio.c (handle_vFile): Fix prefix lengths.
7544 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7546 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7549 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7551 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7552 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7553 (clean): Add "rm -f" for above C files.
7554 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7555 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7556 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7557 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7558 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7559 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7560 (init_registers_s390x_vx_linux64)
7561 (init_registers_s390x_tevx_linux64)
7562 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7563 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7565 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7566 (s390_store_vxrs_high): New functions.
7567 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7569 (s390_arch_setup): Add logic for selecting one of the new target
7570 descriptions. Activate the new vector regsets if applicable.
7571 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7572 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7573 and init_registers_s390x_tevx_linux64.
7575 2015-03-01 Pedro Alves <palves@redhat.com>
7577 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7580 2015-02-27 Pedro Alves <palves@redhat.com>
7582 * linux-x86-low.c (u_debugreg_offset): New function.
7583 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7585 2015-02-27 Pedro Alves <palves@redhat.com>
7587 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7588 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7589 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7590 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7591 (ps_lsetfpregs, ps_getpid)
7592 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7593 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7594 (ps_lsetxregs, ps_plog): Declare.
7596 2015-02-27 Pedro Alves <palves@redhat.com>
7598 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7599 IP_AGENT_EXPORT_FUNC.
7600 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7601 IP_AGENT_EXPORT_FUNC.
7602 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7603 (IP_AGENT_EXPORT): Delete.
7604 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7605 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7606 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7607 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7608 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7609 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7610 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7611 (traceframe_read_count, traceframe_write_count)
7612 (traceframes_created, trace_state_variables, get_raw_reg)
7613 (get_trace_state_variable_value, set_trace_state_variable_value)
7614 (ust_loaded, helper_thread_id, cmd_buf): Use
7615 IPA_SYM_EXPORTED_NAME.
7616 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7617 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7618 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7619 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7620 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7621 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7622 EXTERN_C_PUSH/EXTERN_C_POP.
7623 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7624 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7625 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7626 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7627 (traceframe_write_count, traceframe_read_count)
7628 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7629 (about_to_request_buffer_space, get_trace_state_variable_value)
7630 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7631 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7632 EXTERN_C_PUSH/EXTERN_C_POP.
7633 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7634 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7635 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7636 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7637 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7638 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7639 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7640 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7642 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7643 (IP_AGENT_EXPORT_VAR_DECL): Define.
7645 (gdb_agent_get_raw_reg): Declare.
7647 2015-02-27 Tom Tromey <tromey@redhat.com>
7648 Pedro Alves <palves@redhat.com>
7650 Rename symbols whose names are reserved C++ keywords throughout.
7652 2015-02-27 Pedro Alves <palves@redhat.com>
7654 * Makefile.in (COMPILER): New, get it from autoconf.
7655 (CXX): Get from autoconf instead.
7656 (COMPILE.pre): Use COMPILER.
7657 (CC-LD): Rename to ...
7658 (CC_LD): ... this. Use COMPILER.
7659 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7660 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7661 * acinclude.m4: Include build-with-cxx.m4.
7662 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7663 Disable -Werror by default if building in C++ mode.
7664 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7665 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7666 the C++ compiler. Save/restore CXXFLAGS too.
7667 * configure: Regenerate.
7669 2015-02-27 Pedro Alves <palves@redhat.com>
7671 * acinclude.m4: Include libiberty.m4.
7672 * configure.ac: Call libiberty_INIT.
7673 * config.in, configure: Regenerate.
7675 2015-02-26 Pedro Alves <palves@redhat.com>
7677 * linux-low.c (linux_wait_1): When incrementing the PC past a
7678 program breakpoint always use the_low_target.breakpoint_len as
7679 increment, rather than the maximum between that and
7680 the_low_target.decr_pc_after_break.
7682 2015-02-23 Pedro Alves <palves@redhat.com>
7684 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7685 thread was doing a step-over; always adjust the PC if
7686 we stepped over a permanent breakpoint.
7687 (linux_wait_1): If we stepped over breakpoint that was on top of a
7688 permanent breakpoint, manually advance the PC past it.
7690 2015-02-23 Pedro Alves <palves@redhat.com>
7692 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7694 (x86_fill_gregset, x86_store_gregset): Use it when handling
7697 2015-02-20 Pedro Alves <palves@redhat.com>
7699 * thread-db.c: Include "nat/linux-procfs.h".
7700 (thread_db_init): Skip listing new threads if the kernel supports
7701 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7703 2015-02-20 Pedro Alves <palves@redhat.com>
7705 * linux-low.c (status_pending_p_callback): Use ptid_match.
7707 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7709 PR breakpoints/16812
7710 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7711 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7712 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7714 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7716 PR breakpoints/15956
7717 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7719 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7721 * linux-low.c (linux_low_btrace_conf): Print size.
7722 * server.c (handle_btrace_conf_general_set): New.
7723 (hanle_general_set): Call handle_btrace_conf_general_set.
7724 (handle_query): Report Qbtrace-conf:bts:size as supported.
7726 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7728 * linux-low.c (linux_low_enable_btrace): Update parameters.
7729 (linux_low_btrace_conf): New.
7730 (linux_target_ops)<to_btrace_conf>: Initialize.
7731 * server.c (current_btrace_conf): New.
7732 (handle_btrace_enable): Rename to ...
7733 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7734 to target_enable_btrace. Update comment. Update users.
7735 (handle_qxfer_btrace_conf): New.
7736 (qxfer_packets): Add btrace-conf entry.
7737 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7738 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7739 (target_ops)<read_btrace_conf>: New.
7740 (target_enable_btrace): Update parameters.
7741 (target_read_btrace_conf): New.
7743 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7745 * server.c (handle_btrace_general_set): Remove call to
7746 target_supports_btrace.
7747 (supported_btrace_packets): New.
7748 (handle_query): Call supported_btrace_packets.
7749 * target.h: include btrace-common.h.
7750 (btrace_target_info): Removed.
7751 (supports_btrace, target_supports_btrace): Update parameters.
7753 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7755 * Makefile.in (SFILES): Add common/btrace-common.c.
7756 (OBS): Add common/btrace-common.o.
7757 (btrace-common.o): Add build rules.
7758 * linux-low: Include btrace-common.h.
7759 (linux_low_read_btrace): Use struct btrace_data. Call
7760 btrace_data_init and btrace_data_fini.
7762 2015-02-06 Pedro Alves <palves@redhat.com>
7764 * thread-db.c (find_new_threads_callback): Add debug output.
7766 2015-02-04 Pedro Alves <palves@redhat.com>
7768 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7769 (resume_stopped_resumed_lwps): New function.
7770 (linux_wait_for_event_filtered): Use it.
7772 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7774 * Makefile.in (SFILES): Add linux-personality.c.
7775 (linux-personality.o): New rule.
7776 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7777 list of objects to be built.
7778 * linux-low.c: Include nat/linux-personality.h.
7779 (linux_create_inferior): Remove code to disable address space
7780 randomization (moved to ../nat/linux-personality.c). Create
7781 cleanup to disable address space randomization.
7783 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7785 * Makefile.in (posix-strerror.o): New rule.
7786 (mingw-strerror.o): Likewise.
7787 * configure: Regenerated.
7788 * configure.ac: Source file ../common/common.host. Initialize new
7789 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7791 2015-01-14 Yao Qi <yao@codesourcery.com>
7793 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7794 (ppc-linux.o): New rule.
7795 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7796 * configure.ac: AC_CHECK_FUNCS(getauxval).
7797 * config.in: Re-generated.
7798 * configure: Re-generated.
7799 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7800 ppc64_64bit_inferior_p
7802 2015-01-14 Yao Qi <yao@codesourcery.com>
7804 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7805 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7806 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7807 (PT_ORIG_R3, PT_TRAP): Likewise.
7808 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7809 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7810 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7812 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7814 * i387-fp.c (i387_cache_to_xsave): In look over
7815 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7816 zmmh_low_space field by use of zmmh_high_space.
7818 2015-01-09 Pedro Alves <palves@redhat.com>
7820 * linux-low.c (step_over_bkpt): Move higher up in the file.
7821 (handle_extended_wait): Don't store the stop_pc here.
7822 (get_stop_pc): Adjust comments and rename to ...
7823 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7824 stopped for a software breakpoint or hardware breakpoint.
7825 (thread_still_has_status_pending_p): New function.
7826 (status_pending_p_callback): Use
7827 thread_still_has_status_pending_p. If the event is no longer
7828 interesting, resume the LWP.
7829 (handle_tracepoints): Add assert.
7830 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7831 (wstatus_maybe_breakpoint): New function.
7832 (cancel_breakpoint): Delete function.
7833 (check_stopped_by_watchpoint): New function, factored out from
7834 linux_low_filter_event.
7835 (lp_status_maybe_breakpoint): Delete function.
7836 (linux_low_filter_event): Remove filter_ptid argument.
7837 Leave thread group exits pending here. Store the LWP's stop PC.
7838 Always leave events pending.
7839 (linux_wait_for_event_filtered): Pull all events out of the
7840 kernel, and leave them all pending.
7841 (count_events_callback, select_event_lwp_callback): Consider all
7843 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7844 (select_event_lwp): Only give preference to the stepping LWP in
7845 all-stop mode. Adjust comments.
7846 (ignore_event): New function.
7847 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7848 references to cancel_breakpoints. Adjust to renames. Also give
7849 equal priority to all LWPs that have had events in non-stop mode.
7850 If reporting a software breakpoint event, unadjust the LWP's PC.
7851 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7852 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7854 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7855 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7856 (linux_stopped_by_watchpoint): Adjust.
7857 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7858 * linux-low.h (enum lwp_stop_reason): New.
7859 (struct lwp_info) <stop_pc>: Adjust comment.
7860 <stopped_by_watchpoint>: Delete field.
7861 <stop_reason>: New field.
7862 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7863 * mem-break.c (software_breakpoint_inserted_here)
7864 (hardware_breakpoint_inserted_here): New function.
7865 * mem-break.h (software_breakpoint_inserted_here)
7866 (hardware_breakpoint_inserted_here): Declare.
7867 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7868 (cancel_breakpoints): Delete.
7869 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7870 (upload_fast_traceframes): Remove references to
7873 2015-01-09 Pedro Alves <palves@redhat.com>
7875 * thread-db.c (find_new_threads_callback): Ignore thread if the
7876 kernel thread ID is -1.
7878 2015-01-09 Pedro Alves <palves@redhat.com>
7880 * linux-low.c (linux_attach_fail_reason_string): Move to
7881 nat/linux-ptrace.c, and rename.
7882 (linux_attach_lwp): Update comment.
7883 (attach_proc_task_lwp_callback): New function.
7884 (linux_attach): Adjust to rename and use
7885 linux_proc_attach_tgid_threads.
7886 (linux_attach_fail_reason_string): Delete declaration.
7888 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7890 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7891 * server.c (gdbserver_version): Likewise.
7893 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7895 * remote-utils.c: Include ctype.h.
7896 (input_interrupt): Explicitly handle the case when the char
7897 received is the NUL byte. Improve the printing of non-ASCII
7900 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7902 * linux-low.c (linux_low_filter_event): Update call to
7903 linux_enable_event_reporting following the addition of
7904 a new parameter to that function.
7906 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7909 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7910 (AARCH64_FPCR_REGNO): Likewise.
7911 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7912 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7913 (aarch64_store_fpregset): Likewise.
7915 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7917 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7918 Remove FIXME comment about assumption about N.
7920 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7922 * configure.ac: If large-file support is disabled in GDBserver,
7923 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7924 * configure: Regenerate.
7926 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7928 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7929 warning upon ENODATA from ptrace.
7930 * linux-s390-low.c (s390_store_tdb): New.
7931 (s390_regsets): Add regset for NT_S390_TDB.
7933 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7935 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7936 without a fill_function.
7937 * linux-s390-low.c (s390_fill_last_break): Remove.
7938 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7939 (s390_arch_setup): Use regset's size instead of fill_function for
7942 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7944 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7945 the regset's store function when ptrace returned an error.
7946 * regcache.c (get_thread_regcache): Invalidate register cache
7947 before fetching inferior's registers.
7949 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7951 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7952 while-loop as for-loop.
7953 (regsets_store_inferior_registers): Likewise.
7955 2014-11-28 Yao Qi <yao@codesourcery.com>
7957 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7958 * config.in, configure: Re-generate.
7959 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7962 2014-11-21 Yao Qi <yao@codesourcery.com>
7964 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7965 (AC_CHECK_HEADERS): Remove malloc.h.
7966 * configure: Re-generated.
7967 * config.in: Re-generated.
7968 * server.h: Don't include alloca.h and malloc.h.
7969 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7970 Don't include malloc.h.
7972 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7974 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7975 corresponding ERRNO check in same block.
7977 2014-11-12 Pedro Alves <palves@redhat.com>
7979 * server.c (cont_thread): Update comment.
7980 (start_inferior, attach_inferior): No longer clear cont_thread.
7981 (handle_v_cont): No longer set cont_thread.
7982 (captured_main): Clear cont_thread each time a GDB connects.
7984 2014-11-12 Pedro Alves <palves@redhat.com>
7986 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7987 thread, and don't resume all threads if the Hc thread has exited.
7989 2014-11-12 Pedro Alves <palves@redhat.com>
7991 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7992 the process group instead of to a specific LWP.
7994 2014-10-15 Pedro Alves <palves@redhat.com>
7997 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7999 (arm_set_thread_context): Delete.
8000 (the_low_target): Adjust.
8001 * win32-i386-low.c (debug_registers_changed)
8002 (debug_registers_used): Delete.
8003 (update_debug_registers_callback): New function.
8004 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8005 needing to update their debug registers.
8006 (win32_get_current_dr): New function.
8007 (x86_dr_low_get_addr, x86_dr_low_get_control)
8008 (x86_dr_low_get_status): Fetch the debug register from the thread
8010 (i386_initial_stuff): Adjust.
8011 (i386_get_thread_context): Remove current_event parameter. Don't
8012 clear debug_registers_changed nor copy DR values to
8014 (i386_set_thread_context): Delete.
8015 (i386_prepare_to_resume): New function.
8016 (i386_thread_added): Mark the thread as needing to update irs
8018 (the_low_target): Remove i386_set_thread_context and install
8019 i386_prepare_to_resume.
8020 * win32-low.c (win32_get_thread_context): Adjust.
8021 (win32_set_thread_context): Use SetThreadContext
8023 (win32_prepare_to_resume): New function.
8024 (win32_require_context): New function, factored out from ...
8025 (thread_rec): ... this.
8026 (continue_one_thread): Call win32_prepare_to_resume on each thread
8027 we're about to continue.
8028 (win32_resume): Call win32_prepare_to_resume on the event thread.
8029 * win32-low.h (struct win32_thread_info)
8030 <debug_registers_changed>: New field.
8031 (struct win32_target_ops): Change prototype of set_thread_context,
8032 delete set_thread_context and add prepare_to_resume.
8033 (win32_require_context): New declaration.
8035 2014-10-08 Gary Benson <gbenson@redhat.com>
8037 * server.h: Do not include common-exceptions.h.
8039 2014-10-08 Gary Benson <gbenson@redhat.com>
8041 * server.h: Do not include cleanups.h.
8043 2014-09-30 James Hogan <james.hogan@imgtec.com>
8045 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8048 2014-09-23 Yao Qi <yao@codesourcery.com>
8050 * linux-low.c (lp_status_maybe_breakpoint): New function.
8051 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8052 (count_events_callback): Likewise.
8053 (select_event_lwp_callback): Likewise.
8054 (cancel_breakpoints_callback): Likewise.
8056 2014-09-19 Don Breazeal <donb@codesourcery.com>
8058 * linux-low.c (handle_extended_wait): Call
8059 linux_ptrace_get_extended_event.
8060 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8061 linux_is_extended_waitstatus.
8063 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8065 * Makefile.in (CPPFLAGS): Define.
8066 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8067 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8069 2014-09-16 Gary Benson <gbenson@redhat.com>
8071 * inferiors.h (current_inferior): Renamed as...
8072 (current_thread): New variable. All uses updated.
8073 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8074 (maybe_move_out_of_jump_pad): Likewise.
8075 (cancel_breakpoint): Likewise.
8076 (linux_low_filter_event): Likewise.
8077 (wait_for_sigstop): Likewise.
8078 (linux_resume_one_lwp): Likewise.
8079 (need_step_over_p): Likewise.
8080 (start_step_over): Likewise.
8081 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8082 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8083 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8084 and save_inferior as saved_thread.
8085 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8087 (regcache_invalidate_thread): Likewise.
8088 * remote-utils.c (prepare_resume_reply): Likewise.
8089 * thread-db.c (thread_db_get_tls_address): Likewise.
8090 (disable_thread_event_reporting): Likewise.
8091 (remove_thread_event_breakpoints): Likewise.
8092 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8094 * target.h (set_desired_inferior): Renamed as...
8095 (set_desired_thread): New declaration. All uses updated.
8096 * server.c (myresume): Updated comment to reference thread instead
8098 (handle_serial_event): Likewise.
8099 (handle_target_event): Likewise.
8101 2014-09-12 Tom Tromey <tromey@redhat.com>
8102 Gary Benson <gbenson@redhat.com>
8104 * regcache.h: Include common-regcache.h.
8105 (regcache_read_pc): Don't declare.
8106 * regcache.c (get_thread_regcache_for_ptid): New function.
8108 2014-09-11 Tom Tromey <tromey@redhat.com>
8109 Gary Benson <gbenson@redhat.com>
8111 * symbol.c: New file.
8112 * Makefile.in (SFILES): Add symbol.c.
8113 (OBS): Add symbol.o.
8115 2014-09-11 Gary Benson <gbenson@redhat.com>
8117 * target.c (target_stop_ptid, target_continue_ptid): New
8120 2014-09-11 Tom Tromey <tromey@redhat.com>
8121 Gary Benson <gbenson@redhat.com>
8123 * target.h: Include target/target.h.
8124 * target.c (target_read_memory, target_read_uint32)
8125 (target_write_memory): New functions.
8127 2014-09-11 Gary Benson <gbenson@redhat.com>
8129 * server.h (debug_hw_points): Don't declare.
8130 * server.c (debug_hw_points): Don't define. Replace all uses
8131 with show_debug_regs.
8132 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8133 all uses with show_debug_regs.
8135 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8137 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8138 endianness into account.
8139 (ppc_supply_ptrace_register): Likewise.
8141 2014-09-03 James Hogan <james.hogan@imgtec.com>
8143 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8144 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8146 2014-09-03 Gary Benson <gbenson@redhat.com>
8148 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8149 ALL_DEBUG_ADDRESS_REGISTERS.
8151 2014-09-02 Gary Benson <gbenson@redhat.com>
8153 * i386-low.h: Renamed as...
8154 * x86-low.h: New file. All type, function and variable name
8155 prefixes changed from "i386_" to "x86_". All references updated.
8156 * i386-low.c: Renamed as...
8157 * x86-low.c: New file. All type, function and variable name
8158 prefixes changed from "i386_" to "x86_". All references updated.
8160 2014-09-02 Gary Benson <gbenson@redhat.com>
8162 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8163 (x86_linux_new_thread): Likewise.
8165 2014-08-29 Gary Benson <gbenson@redhat.com>
8167 * server.h (setjmp.h): Do not include.
8168 (toplevel): Do not declare.
8169 (common-exceptions.h): Include.
8170 (cleanups.h): Likewise.
8171 * server.c (toplevel): Do not define.
8172 (exit_code): New static global.
8173 (detach_or_kill_for_exit_cleanup): New function.
8174 (main): New function. Original main renamed to...
8175 (captured_main): New function.
8176 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8178 2014-08-29 Gary Benson <gbenson@redhat.com>
8180 * Makefile.in (SFILES): Add common/common-exceptions.c.
8181 (OBS): Add common-exceptions.o.
8182 (common-exceptions.o): New rule.
8183 * utils.c (prepare_to_throw_exception): New function.
8185 2014-08-29 Gary Benson <gbenson@redhat.com>
8187 * config.in: Regenerate.
8188 * configure: Likewise.
8190 2014-08-29 Gary Benson <gbenson@redhat.com>
8192 * Makefile.in (SFILES): Add common/cleanups.c.
8194 (cleanups.o): New rule.
8196 2014-08-29 Gary Benson <gbenson@redhat.com>
8198 * utils.c (internal_vwarning): New function.
8200 2014-08-28 Gary Benson <gbenson@redhat.com>
8202 * utils.h (fatal): Remove declaration.
8203 * utils.c (fatal): Remove function.
8205 2014-08-28 Gary Benson <gbenson@redhat.com>
8207 * tracepoint.c (gdb_agent_init): Replace fatal with
8209 (initialize_tracepoint): Likewise.
8211 2014-08-28 Gary Benson <gbenson@redhat.com>
8213 * remote-utils.c (remote_prepare): Replace fatal with error.
8215 2014-08-28 Gary Benson <gbenson@redhat.com>
8217 * linux-low.c (linux_async): Replace fatal with warning.
8219 (linux_start_non_stop): Return -1 if linux_async failed.
8221 2014-08-28 Gary Benson <gbenson@redhat.com>
8223 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8225 (i386_dr_low_get_addr): Remove vague comment.
8226 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8229 2014-08-28 Gary Benson <gbenson@redhat.com>
8231 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8232 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8234 (linux_resume_one_lwp): Likewise.
8235 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8237 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8238 with internal_error.
8239 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8240 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8241 (find_register_by_name): Replace fatal with internal_error.
8242 (find_regno): Likewise.
8243 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8244 * thread-db.c (thread_db_create_event): Likewise.
8245 (thread_db_load_search): Likewise.
8246 (try_thread_db_load_1): Likewise.
8247 * tracepoint.c (get_jump_space_head): Replace fatal with
8249 (claim_trampoline_space): Likewise.
8250 (have_fast_tracepoint_trampoline_buffer): Likewise.
8251 (cmd_qtstart): Likewise.
8252 (stop_tracing): Likewise.
8253 (fast_tracepoint_collecting): Likewise.
8254 (target_malloc): Likewise.
8255 (download_tracepoint): Likewise.
8256 (download_trace_state_variables): Replace check with gdb_assert.
8257 (upload_fast_traceframes): Replace fatal with internal_error.
8259 2014-08-19 Tom Tromey <tromey@redhat.com>
8260 Gary Benson <gbenson@redhat.com>
8262 * Makefile.in (SFILES): Add common/common-debug.c.
8263 (OBS): Add common-debug.o.
8264 (common-debug.o): New rule.
8265 * debug.h (debug_printf): Don't declare.
8266 * debug.c (debug_printf): Renamed and rewritten as...
8267 (debug_vprintf): New function.
8269 2014-08-19 Gary Benson <gbenson@redhat.com>
8271 * utils.h: Do not include print-utils.h.
8273 2014-08-19 Tom Tromey <tromey@redhat.com>
8274 Gary Benson <gbenson@redhat.com>
8276 * server.h: Add static assertion.
8277 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8279 2014-08-19 Tom Tromey <tromey@redhat.com>
8280 Gary Benson <gbenson@redhat.com>
8282 * Makefile.in (SFILES): Add common/errors.c.
8283 (OBS): Add errors.o.
8284 (IPA_OBS): Add errors-ipa.o.
8285 (errors.o): New rule.
8286 (errors-ipa.o): Likewise.
8287 * utils.h (perror_with_name, error, warning): Don't declare.
8288 * utils.c (warning): Renamed and rewritten as...
8289 (vwarning): New function.
8290 (error): Renamed and rewritten as...
8291 (verror): New function.
8292 (internal_error): Renamed and rewritten as...
8293 (internal_verror): New function.
8295 2014-08-07 Gary Benson <gbenson@redhat.com>
8297 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8298 * configure: Regenerate.
8299 * config.in: Likewise.
8300 * server.h: Do not include errno.h.
8301 * event-loop.c: Likewise.
8302 * hostio-errno.c: Likewise.
8303 * linux-low.c: Likewise.
8304 * remote-utils.c: Likewise.
8305 * spu-low.c: Likewise.
8306 * utils.c: Likewise.
8307 * gdbreplay.c: Unconditionally include errno.h.
8309 2014-08-07 Gary Benson <gbenson@redhat.com>
8311 * server.h: Do not include string.h.
8312 * event-loop.c: Likewise.
8313 * linux-low.c: Likewise.
8314 * regcache.c: Likewise.
8315 * remote-utils.c: Likewise.
8316 * spu-low.c: Likewise.
8317 * utils.c: Likewise.
8319 2014-08-07 Gary Benson <gbenson@redhat.com>
8321 * server.h: Do not include gdb_assert.h.
8323 2014-08-07 Gary Benson <gbenson@redhat.com>
8325 * server.h: Do not include common-utils.h.
8327 2014-08-07 Gary Benson <gbenson@redhat.com>
8329 * server.h: Do not include ptid.h.
8330 * notif.h: Likewise.
8332 2014-08-07 Gary Benson <gbenson@redhat.com>
8334 * server.h: Do not include gdb_locale.h.
8336 2014-08-07 Gary Benson <gbenson@redhat.com>
8338 * server.h: Do not include gdb/signals.h.
8339 * win32-low.c: Likewise.
8341 2014-08-07 Gary Benson <gbenson@redhat.com>
8343 * server.h: Do not include pathmax.h.
8345 2014-08-07 Gary Benson <gbenson@redhat.com>
8347 * server.h: Do not include libiberty.h.
8348 * linux-bfin-low.c: Likewise.
8350 2014-08-07 Gary Benson <gbenson@redhat.com>
8352 * server.h: Do not include ansidecl.h.
8354 2014-08-07 Gary Benson <gbenson@redhat.com>
8356 * linux-x86-low.c: Do not include stddef.h.
8357 * lynx-ppc-low.c: Likewise.
8358 * tracepoint.c: Likewise.
8360 2014-08-07 Gary Benson <gbenson@redhat.com>
8362 * server.h: Do not include stdarg.h.
8363 * nto-low.c: Likewise.
8365 2014-08-07 Gary Benson <gbenson@redhat.com>
8367 * server.h: Do not include stdlib.h.
8368 * inferiors.c: Likewise.
8369 * linux-low.c: Likewise.
8370 * regcache.c: Likewise.
8371 * spu-low.c: Likewise.
8372 * tracepoint.c: Likewise.
8373 * utils.c: Likewise.
8375 2014-08-07 Gary Benson <gbenson@redhat.com>
8377 * server.h: Do not include stdio.h.
8378 * linux-low.c: Likewise.
8379 * remote-utils.c: Likewise.
8380 * spu-low.c: Likewise.
8381 * utils.c: Likewise.
8382 * wincecompat.c: Likewise.
8384 2014-08-06 Gary Benson <gbenson@redhat.com>
8386 * regcache.c (init_register_cache): Move conditionals inside if.
8388 2014-08-06 Gary Benson <gbenson@redhat.com>
8390 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8392 2014-07-31 Gary Benson <gbenson@redhat.com>
8394 * ax.h: Do not include server.h.
8395 * gdbthread.h: Likewise.
8396 * lynx-low.h: Likewise.
8397 * notif.h: Likewise.
8399 2014-07-30 Gary Benson <gbenson@redhat.com>
8401 * server.h: Include common-defs.h.
8402 Do not include config.h or build-gnulib-gdbserver/config.h.
8404 2014-07-30 Gary Benson <gbenson@redhat.com>
8406 * hostio-errno.c: Move server.h to top of includes list.
8407 * inferiors.c: Likewise.
8408 * linux-x86-low.c: Likewise.
8409 * notif.c: Include server.h.
8411 2014-07-24 Tom Tromey <tromey@redhat.com>
8412 Gary Benson <gbenson@redhat.com>
8414 * server.h (CORE_ADDR): Now unsigned.
8416 2014-07-16 Pedro Alves <palves@redhat.com>
8418 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8420 2014-07-15 Pedro Alves <palves@redhat.com>
8422 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8425 2014-07-11 Pedro Alves <palves@redhat.com>
8427 * linux-low.c (kill_wait_lwp): New function, based on
8428 kill_one_lwp_callback, but use my_waitpid directly.
8429 (kill_one_lwp_callback, linux_kill): Use it.
8431 2014-06-23 Pedro Alves <palves@redhat.com>
8433 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8434 before setting DR0..DR3.
8436 2014-06-20 Gary Benson <gbenson@redhat.com>
8438 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8439 * configure: Regenerated.
8440 * config.in: Likewise.
8442 2014-06-20 Gary Benson <gbenson@redhat.com>
8444 * Makefile.in (SFILES): Update locations for files moved
8446 (object file files): Reordered.
8448 2014-06-20 Gary Benson <gbenson@redhat.com>
8450 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8451 (i386_dr_low_set_addr): Likewise.
8452 (i386_dr_low_get_addr): Likewise.
8453 (i386_dr_low_can_set_control): Likewise.
8454 (i386_dr_low_set_control): Likewise.
8455 (i386_dr_low_get_control): Likewise.
8456 (i386_dr_low_get_status): Likewise.
8457 (i386_get_debug_register_length): Likewise.
8458 * linux-x86-low.c (i386_dr_low_set_addr):
8459 Changed signature. Made static.
8460 (i386_dr_low_get_addr): Likewise.
8461 (i386_dr_low_set_control): Likewise.
8462 (i386_dr_low_get_control): Likewise.
8463 (i386_dr_low_get_status): Likewise.
8464 (i386_dr_low): New global variable.
8465 * win32-i386-low.c (i386_dr_low_set_addr):
8466 Changed signature. Made static.
8467 (i386_dr_low_get_addr): Likewise.
8468 (i386_dr_low_set_control): Likewise.
8469 (i386_dr_low_get_control): Likewise.
8470 (i386_dr_low_get_status): Likewise.
8471 (i386_dr_low): New global variable.
8473 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8475 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8476 * Makefile.in (AR, AR_FLAGS): Define.
8477 * configure: Regenerate.
8479 2014-06-19 Gary Benson <gbenson@redhat.com>
8481 * Makefile.in (i386-dregs.o): New rule.
8482 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8483 * i386-low.c (target.h): Remove include.
8484 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8485 (DR_CONTROL_SHIFT): Likewise.
8486 (DR_CONTROL_SIZE): Likewise.
8487 (DR_RW_EXECUTE): Likewise.
8488 (DR_RW_WRITE): Likewise.
8489 (DR_RW_READ): Likewise.
8490 (DR_RW_IORW): Likewise.
8491 (DR_LEN_1): Likewise.
8492 (DR_LEN_2): Likewise.
8493 (DR_LEN_4): Likewise.
8494 (DR_LEN_8): Likewise.
8495 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8496 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8497 (DR_ENABLE_SIZE): Likewise.
8498 (DR_LOCAL_SLOWDOWN): Likewise.
8499 (DR_GLOBAL_SLOWDOWN): Likewise.
8500 (DR_CONTROL_RESERVED): Likewise.
8501 (I386_DR_CONTROL_MASK): Likewise.
8502 (I386_DR_VACANT): Likewise.
8503 (I386_DR_LOCAL_ENABLE): Likewise.
8504 (I386_DR_GLOBAL_ENABLE): Likewise.
8505 (I386_DR_DISABLE): Likewise.
8506 (I386_DR_SET_RW_LEN): Likewise.
8507 (I386_DR_GET_RW_LEN): Likewise.
8508 (I386_DR_WATCH_HIT): Likewise.
8509 (i386_wp_op_t): Likewise.
8510 (i386_show_dr): Likewise.
8511 (i386_length_and_rw_bits): Likewise.
8512 (i386_insert_aligned_watchpoint): Likewise.
8513 (i386_remove_aligned_watchpoint): Likewise.
8514 (i386_handle_nonaligned_watchpoint): Likewise.
8515 i386_update_inferior_debug_regs(): Likewise.
8516 (i386_dr_insert_watchpoint): Likewise.
8517 (i386_dr_remove_watchpoint): Likewise.
8518 (i386_dr_region_ok_for_watchpoint): Likewise.
8519 (i386_dr_stopped_data_address): Likewise.
8520 (i386_dr_stopped_by_watchpoint): Likewise.
8522 2014-06-19 Gary Benson <gbenson@redhat.com>
8524 * i386-low.c (i386_dr_show): Renamed to
8525 i386_show_dr and made static. All uses updated.
8526 (i386_dr_length_and_rw_bits): Renamed to
8527 i386_length_and_rw_bits and made static.
8529 (i386_dr_insert_aligned_watchpoint): Renamed to
8530 i386_insert_aligned_watchpoint and made static.
8532 (i386_dr_remove_aligned_watchpoint): Renamed to
8533 i386_remove_aligned_watchpoint and made static.
8535 (i386_dr_update_inferior_debug_regs): Renamed to
8536 i386_update_inferior_debug_regs and made static.
8539 2014-06-18 Gary Benson <gbenson@redhat.com>
8541 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8542 (i386_dr_low_can_set_control): Likewise.
8543 (i386_get_debug_register_length): Likewise.
8544 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8545 (i386_dr_low_can_set_control): Likewise.
8546 (i386_get_debug_register_length): Likewise.
8548 2014-06-17 Gary Benson <gbenson@redhat.com>
8550 * i386-low.h (i386-dregs.h): New include.
8551 (DR_FIRSTADDR): Now in i386-dregs.h.
8552 (DR_LASTADDR): Likewise.
8553 (DR_NADDR): Likewise.
8554 (DR_STATUS): Likewise.
8555 (DR_CONTROL): Likewise.
8556 (i386_debug_reg_state): Likewise.
8557 (i386_dr_insert_watchpoint): Likewise.
8558 (i386_dr_remove_watchpoint): Likewise.
8559 (i386_dr_region_ok_for_watchpoint): Likewise.
8560 (i386_dr_stopped_data_address): Likewise.
8561 (i386_dr_stopped_by_watchpoint): Likewise.
8562 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8564 2014-06-18 Gary Benson <gbenson@redhat.com>
8566 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8567 i386_dr_insert_watchpoint.
8568 (i386_low_remove_watchpoint): Renamed to
8569 i386_dr_remove_watchpoint.
8570 (i386_low_region_ok_for_watchpoint): Renamed to
8571 i386_dr_region_ok_for_watchpoint.
8572 (i386_low_stopped_data_address): Renamed to
8573 i386_dr_stopped_data_address.
8574 (i386_low_stopped_by_watchpoint): Renamed to
8575 i386_dr_stopped_by_watchpoint.
8576 * i386-low.c (i386_show_dr): Renamed to
8577 i386_dr_show and made nonstatic. All uses updated.
8578 (i386_length_and_rw_bits): Renamed to
8579 i386_dr_length_and_rw_bits and made nonstatic.
8581 (i386_insert_aligned_watchpoint): Renamed to
8582 i386_dr_insert_aligned_watchpoint and made nonstatic.
8584 (i386_remove_aligned_watchpoint): Renamed to
8585 i386_dr_remove_aligned_watchpoint and made nonstatic.
8587 (i386_update_inferior_debug_regs): Renamed to
8588 i386_dr_update_inferior_debug_regs and made nonstatic.
8590 (i386_low_insert_watchpoint): Renamed to
8591 i386_dr_insert_watchpoint. All uses updated.
8592 (i386_low_remove_watchpoint): Renamed to
8593 i386_dr_remove_watchpoint. All uses updated.
8594 (i386_low_region_ok_for_watchpoint): Renamed to
8595 i386_dr_region_ok_for_watchpoint. All uses updated.
8596 (i386_low_stopped_data_address): Renamed to
8597 i386_dr_stopped_data_address. All uses updated.
8598 (i386_low_stopped_by_watchpoint): Renamed to
8599 i386_dr_stopped_by_watchpoint. All uses updated.
8601 2014-06-18 Gary Benson <gbenson@redhat.com>
8603 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8604 (i386_dr_low_can_set_control): Likewise.
8605 (i386_insert_aligned_watchpoint): New check.
8607 2014-06-18 Gary Benson <gbenson@redhat.com>
8609 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8612 2014-06-18 Gary Benson <gbenson@redhat.com>
8614 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8615 instead of fatal and error.
8616 (i386_handle_nonaligned_watchpoint): Likewise.
8618 2014-06-18 Gary Benson <gbenson@redhat.com>
8620 * i386-low.c (i386_get_debug_register_length): New macro.
8621 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8622 (i386_show_dr): Use debug_printf instead of fprintf. Use
8623 phex to format values.
8625 2014-06-18 Gary Benson <gbenson@redhat.com>
8627 * i386-low.h: Comment changes.
8628 * i386-low.c: Likewise.
8630 2014-06-18 Gary Benson <gbenson@redhat.com>
8632 * i386-low.c: Whitespace changes.
8634 2014-06-12 Tom Tromey <tromey@redhat.com>
8636 * utils.c (freeargv): Remove.
8638 2014-06-12 Tom Tromey <tromey@redhat.com>
8640 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8641 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8642 (parse_debug_format_options): Likewise.
8643 (gdbserver_usage): Likewise.
8644 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8645 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8646 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8648 ($(LIBGNU)): Depend on libiberty.
8649 (all-lib): Recurse into all subdirs.
8650 (install-only): Invoke "install" target in subdirs.
8651 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8653 * configure: Rebuild.
8654 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8655 for vasprintf, vsnprintf, or gettimeofday.
8656 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8659 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8661 * development.sh: Delete.
8662 * Makefile.in (config.status): Adjust dependency on development.sh.
8663 * configure.ac: Adjust development.sh source call.
8664 * configure: Regenerate.
8666 2014-06-02 Pedro Alves <palves@redhat.com>
8668 * ax.c (gdb_free_agent_expr): New function.
8669 * ax.h (gdb_free_agent_expr): New declaration.
8670 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8672 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8674 (clear_breakpoint_conditions_and_commands): New function.
8675 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8676 (clear_breakpoint_conditions_and_commands): New declaration.
8678 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8680 * linux-aarch64-low.c (asm/ptrace.h): Include.
8682 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8684 Fix TLS access for -static -pthread.
8685 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8686 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8687 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8689 2014-05-20 Pedro Alves <palves@redhat.com>
8691 * linux-aarch64-low.c (aarch64_insert_point)
8692 (aarch64_remove_point): No longer check whether the type is
8693 supported here. Adjust to new interface.
8694 (the_low_target): Install aarch64_supports_z_point_type as
8695 supports_z_point_type method.
8696 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8697 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8698 instead of a Z packet char. Adjust.
8699 (arm_supports_z_point_type): New function.
8700 (arm_insert_point, arm_remove_point): Adjust to new interface.
8701 (the_low_target): Install arm_supports_z_point_type.
8702 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8703 (cris_insert_point, cris_remove_point): Adjust to new interface.
8704 Don't check whether the type is supported here.
8705 (the_low_target): Install cris_supports_z_point_type.
8706 * linux-low.c (linux_supports_z_point_type): New function.
8707 (linux_insert_point, linux_remove_point): Adjust to new interface.
8708 * linux-low.h (struct linux_target_ops) <insert_point,
8709 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8710 raw_breakpoint pointer parameter.
8711 <supports_z_point_type>: New method.
8712 * linux-mips-low.c (mips_supports_z_point_type): New function.
8713 (mips_insert_point, mips_remove_point): Adjust to new interface.
8714 Use mips_supports_z_point_type.
8715 (the_low_target): Install mips_supports_z_point_type.
8716 * linux-ppc-low.c (the_low_target): Install NULL as
8717 supports_z_point_type method.
8718 * linux-s390-low.c (the_low_target): Install NULL as
8719 supports_z_point_type method.
8720 * linux-sparc-low.c (the_low_target): Install NULL as
8721 supports_z_point_type method.
8722 * linux-x86-low.c (x86_supports_z_point_type): New function.
8723 (x86_insert_point): Adjust to new insert_point interface. Use
8724 insert_memory_breakpoint. Adjust to new
8725 i386_low_insert_watchpoint interface.
8726 (x86_remove_point): Adjust to remove_point interface. Use
8727 remove_memory_breakpoint. Adjust to new
8728 i386_low_remove_watchpoint interface.
8729 (the_low_target): Install x86_supports_z_point_type.
8730 * lynx-low.c (lynx_target_ops): Install NULL as
8731 supports_z_point_type callback.
8732 * nto-low.c (nto_supports_z_point_type): New.
8733 (nto_insert_point, nto_remove_point): Adjust to new interface.
8734 (nto_target_ops): Install nto_supports_z_point_type.
8735 * mem-break.c: Adjust intro comment.
8736 (struct raw_breakpoint) <raw_type, size>: New fields.
8737 <inserted>: Update comment.
8738 <shlib_disabled>: Delete field.
8739 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8740 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8741 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8742 (raw_bkpt_type_to_target_hw_bp_type): New function.
8743 (find_enabled_raw_code_breakpoint_at): New function.
8744 (find_raw_breakpoint_at): New type and size parameters. Use them.
8745 (insert_memory_breakpoint): New function, based off
8746 set_raw_breakpoint_at.
8747 (remove_memory_breakpoint): New function.
8748 (set_raw_breakpoint_at): Reimplement.
8749 (set_breakpoint): New, based on set_breakpoint_at.
8750 (set_breakpoint_at): Reimplement.
8751 (delete_raw_breakpoint): Go through the_target->remove_point
8752 instead of assuming memory breakpoints.
8753 (find_gdb_breakpoint_at): Delete.
8754 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8755 (find_gdb_breakpoint): New function.
8756 (set_gdb_breakpoint_at): Delete.
8757 (z_type_supported): New function.
8758 (set_gdb_breakpoint_1): New function, loosely based off
8759 set_gdb_breakpoint_at.
8760 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8761 (delete_gdb_breakpoint_at): Delete.
8762 (delete_gdb_breakpoint_1): New function, loosely based off
8763 delete_gdb_breakpoint_at.
8764 (delete_gdb_breakpoint): New function.
8765 (clear_gdb_breakpoint_conditions): Rename to ...
8766 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8768 (add_condition_to_breakpoint): Make static.
8769 (add_breakpoint_condition): Take a struct breakpoint pointer
8770 instead of an address. Adjust.
8771 (gdb_condition_true_at_breakpoint): Rename to ...
8772 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8774 (gdb_condition_true_at_breakpoint): Reimplement.
8775 (add_breakpoint_commands): Take a struct breakpoint pointer
8776 instead of an address. Adjust.
8777 (gdb_no_commands_at_breakpoint): Rename to ...
8778 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8779 parameter. Return true if no breakpoint was found. Change debug
8781 (gdb_no_commands_at_breakpoint): Reimplement.
8782 (run_breakpoint_commands): Rename to ...
8783 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8784 and change return type to boolean.
8785 (run_breakpoint_commands): New function.
8786 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8787 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8788 breakpoint. Go through the_target->remove_point instead of
8789 assuming memory breakpoint.
8790 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8791 software and hardware breakpoints.
8792 (reinsert_raw_breakpoint): Go through the_target->insert_point
8793 instead of assuming memory breakpoint.
8794 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8795 software and hardware breakpoints.
8796 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8797 Check both software and hardware breakpoints.
8798 (validate_inserted_breakpoint): Assert the breakpoint is a
8799 software breakpoint. Set the inserted flag to -1 instead of
8800 setting shlib_disabled.
8801 (delete_disabled_breakpoints): Adjust.
8802 (validate_breakpoints): Only validate software breakpoints.
8803 Adjust to inserted flag change.
8804 (check_mem_read, check_mem_write): Skip breakpoint types other
8805 than software breakpoints. Adjust to inserted flag change.
8806 * mem-break.h (enum raw_bkpt_type): New enum.
8807 (raw_breakpoint, struct process_info): Forward declare.
8808 (Z_packet_to_target_hw_bp_type): Delete declaration.
8809 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8810 (set_gdb_breakpoint, delete_gdb_breakpoint)
8811 (clear_breakpoint_conditions): New declarations.
8812 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8813 (breakpoint_inserted_here): Update comment.
8814 (add_breakpoint_condition, add_breakpoint_commands): Replace
8815 address parameter with a breakpoint pointer parameter.
8816 (gdb_breakpoint_here): Update comment.
8817 (delete_gdb_breakpoint_at): Delete.
8818 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8819 * server.c (process_point_options): Take a struct breakpoint
8820 pointer instead of an address. Adjust.
8821 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8822 delete_gdb_breakpoint.
8823 * spu-low.c (spu_target_ops): Install NULL as
8824 supports_z_point_type method.
8825 * target.h: Include mem-break.h.
8826 (struct target_ops) <prepare_to_access_memory>: Update comment.
8827 <supports_z_point_type>: New field.
8828 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8829 instead of a char. Also take a raw breakpoint pointer.
8830 * win32-arm-low.c (the_low_target): Install NULL as
8831 supports_z_point_type.
8832 * win32-i386-low.c (i386_supports_z_point_type): New function.
8833 (i386_insert_point, i386_remove_point): Adjust to new interface.
8834 (the_low_target): Install i386_supports_z_point_type.
8835 * win32-low.c (win32_supports_z_point_type): New function.
8836 (win32_insert_point, win32_remove_point): Adjust to new interface.
8837 (win32_target_ops): Install win32_supports_z_point_type.
8838 * win32-low.h (struct win32_target_ops):
8839 <supports_z_point_type>: New method.
8840 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8841 instead of a char. Also take a raw breakpoint pointer.
8843 2014-05-20 Pedro Alves <palves@redhat.com>
8845 * mem-break.h: Include break-common.h.
8846 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8847 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8848 (Z_packet_to_target_hw_bp_type): New declaration.
8849 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8850 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8851 (Z_PACKET_ACCESS_WP): Delete macros.
8852 (Z_packet_to_hw_type): Delete function.
8853 * i386-low.h: Don't include break-common.h here.
8854 (Z_packet_to_hw_type): Delete declaration.
8855 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8856 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8857 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8858 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8859 * linux-aarch64-low.c: Don't include break-common.h here.
8860 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8861 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8862 (Z_packet_to_target_hw_bp_type): Delete function.
8863 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8865 (mips_insert_point, mips_remove_point): Use
8866 Z_packet_to_target_hw_bp_type.
8868 2014-05-20 Pedro Alves <palves@redhat.com>
8870 * linux-aarch64-low.c: Include break-common.h.
8871 (enum target_point_type): Delete.
8872 (Z_packet_to_point_type): Rename to ...
8873 (Z_packet_to_target_hw_bp_type): ... this, and return a
8874 target_hw_bp_type instead.
8875 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8876 instead of an enum target_point_type.
8877 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8879 (aarch64_dr_state_insert_one_point)
8880 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8881 (aarch64_handle_aligned_watchpoint)
8882 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8883 Take an enum target_hw_bp_type instead of an enum
8885 (aarch64_supports_z_point_type): New function.
8886 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8887 use Z_packet_to_target_hw_bp_type.
8889 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8891 * configure.ac: Only use -Werror by default when DEVELOPMENT
8893 * configure: Regenerate.
8895 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8897 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8898 * linux-x86-low.c (X86_64_USER_REGS): New.
8899 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8901 2014-04-28 Yao Qi <yao@codesourcery.com>
8903 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8906 2014-04-25 Pedro Alves <palves@redhat.com>
8909 * linux-low.c (linux_attach_fail_reason_string): New function.
8910 (linux_attach_lwp): Delete.
8911 (linux_attach_lwp_1): Rename to ...
8912 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8913 argument. Remove "initial" parameter. Return int instead of
8914 void. Don't error or warn here.
8915 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8916 failure to attach to the tgid. Call warning when failing to
8918 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8919 argument. Remove "initial" parameter. Return int instead of
8920 void. Don't error or warn here.
8921 (linux_attach_fail_reason_string): New declaration.
8922 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8923 interface change. Use linux_attach_fail_reason_string.
8925 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8926 Walfred Tedeschi <walfred.tedeschi@intel.com>
8928 * Makefile.in: Added rules to handle new files
8929 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8930 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8931 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8932 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8933 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8934 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8936 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8937 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8938 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8939 i386/x32-avx512.xml.
8940 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8941 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8942 i386/x32-avx512-linux.xml.
8943 * i387-fp.c (num_avx512_k_registers): New constant for number
8945 (num_avx512_zmmh_low_registers): New constant for number of
8946 lower ZMM registers (0-15).
8947 (num_avx512_zmmh_high_registers): New constant for number of
8948 higher ZMM registers (16-31).
8949 (num_avx512_ymmh_registers): New contant for number of higher
8950 YMM registers (ymm16-31 added by avx521 on x86_64).
8951 (num_avx512_xmm_registers): New constant for number of higher
8952 XMM registers (xmm16-31 added by AVX512 on x86_64).
8953 (struct i387_xsave): Add space for AVX512 registers.
8954 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8955 Add code to handle AVX512 registers.
8956 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8957 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8958 prototypei from generated file.
8959 (tdesc_amd64_avx512_linux): Likewise.
8960 (init_registers_x32_avx512_linux): Likewise.
8961 (tdesc_x32_avx512_linux): Likewise.
8962 (init_registers_i386_avx512_linux): Likewise.
8963 (tdesc_i386_avx512_linux): Likewise.
8964 (x86_64_regmap): Add AVX512 registers.
8965 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8967 (initialize_low_arch): Add code to initialize AVX512 registers.
8969 2014-04-23 Pedro Alves <palves@redhat.com>
8971 * mem-break.c (find_gdb_breakpoint_at): Make static.
8972 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8974 2014-04-23 Pedro Alves <palves@redhat.com>
8976 * i386-low.c: Don't include break-common.h here.
8977 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8978 prototype to take target_hw_bp_type as argument instead of a Z
8980 * i386-low.h: Include break-common.h here.
8981 (Z_packet_to_hw_type): Declare.
8982 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8984 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8985 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8986 (x86_remove_point): Convert the packet number to a
8987 target_hw_bp_type before calling i386_low_remove_watchpoint.
8988 * win32-i386-low.c (i386_insert_point): Convert the packet number
8989 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8990 (i386_remove_point): Convert the packet number to a
8991 target_hw_bp_type before calling i386_low_remove_watchpoint.
8993 2014-04-23 Pedro Alves <palves@redhat.com>
8995 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8997 2014-04-10 Pedro Alves <palves@redhat.com>
8999 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9000 Check if the condition or command is NULL before checking if the
9001 breakpoint is known. On success, return true.
9002 * mem-break.h (add_breakpoint_condition): Document return.
9003 (add_breakpoint_commands): Add describing comment.
9004 * server.c (skip_to_semicolon): New function.
9005 (process_point_options): Use it.
9007 2014-04-09 Pedro Alves <palves@redhat.com>
9009 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9012 2014-02-27 Pedro Alves <palves@redhat.com>
9015 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9017 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9019 (last_thread_of_process_p): Take a PID argument instead of a
9021 (linux_wait_for_lwp): Delete.
9022 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9024 (linux_low_filter_event): New function, party factored out from
9025 linux_wait_for_event.
9026 (linux_wait_for_event): Rename to ...
9027 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9028 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9029 sigsuspend. Check for zombie leaders.
9030 (linux_wait_for_event): Reimplement as wrapper around
9031 linux_wait_for_event_filtered.
9032 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9033 a normal or signal exit is seen, it's the whole process exiting.
9034 (wait_for_sigstop): No longer a for_each_inferior callback.
9035 Rewrite on top of linux_wait_for_event_filtered.
9036 (stop_all_lwps): Call wait_for_sigstop directly.
9037 * server.c (resume, handle_target_event): Handle
9038 TARGET_WAITKIND_NO_RESUMED.
9040 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9042 * win32-low.c (psapi_get_dll_name,
9043 * win32_CreateToolhelp32Snapshot): Delete.
9044 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9045 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9047 (handle_load_dll): Add function description.
9048 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9050 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9052 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9054 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9055 base address when calling win32_add_one_solib.
9056 (handle_load_dll): Delete local variable load_addr.
9057 Remove 0x1000 offset applied to DLL base address when calling
9058 win32_add_one_solib.
9059 (handle_unload_dll): Add comment.
9061 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9063 * win32-low.c (win32_add_all_dlls): Renames
9064 win32_ensure_ntdll_loaded. Rewrite function documentation.
9065 Adjust implementation to always load all DLLs.
9066 Add 0x1000 offset to DLL base address when calling
9067 win32_add_one_solib.
9068 (child_initialization_done): New static global.
9069 (do_initial_child_stuff): Set child_initialization_done to
9070 zero during child initialization, and 1 after. Replace call
9071 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9073 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9074 (handle_unload_dll): Add function documentation.
9075 (get_child_debug_event): Ignore load and unload DLL events
9076 during child initialization.
9078 2014-02-20 Doug Evans <dje@google.com>
9080 Remove global all_lwps.
9081 * inferiors.h (ptid_of): Move here from linux-low.h.
9082 (pid_of, lwpid_of): Ditto.
9083 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9084 parameter is a struct thread_info * now.
9085 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9086 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9087 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9089 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9090 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9091 * linux-arm-low.c (update_registers_callback): Update, "entry"
9092 parameter is a struct thread_info * now.
9093 Fetch lwpid from current_inferior directly.
9094 (arm_insert_point): Pass &all_threads to find_inferior instead of
9096 (arm_remove_point): Ditto.
9097 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9098 (arm_prepare_to_resume): Fetch pid from thread.
9099 (arm_read_description): Fetch lwpid from current_inferior directly.
9100 * linux-low.c (all_lwps): Delete.
9101 (delete_lwp): Delete call to remove_inferior.
9102 (handle_extended_wait): Fetch lwpid from thread.
9103 (add_lwp): Don't set lwp->entry.id. Remove call to
9104 add_inferior_to_list.
9105 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9106 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9107 (kill_one_lwp_callback): Ditto.
9108 (linux_kill): Don't dereference NULL pointer.
9109 Fetch ptid,lwpid from thread.
9110 (get_detach_signal): Fetch ptid from thread.
9111 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9112 Simplify call to regcache_invalidate_thread.
9113 (delete_lwp_callback): Update, "entry" parameter is a
9114 struct thread_info * now. Fetch pid from thread.
9115 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9116 (status_pending_p_callback): Update, "entry" parameter is a
9117 struct thread_info * now. Fetch ptid from thread.
9118 (find_lwp_pid): Update, "entry" parameter is a
9119 struct thread_info * now.
9120 (linux_wait_for_lwp): Fetch pid from thread.
9121 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9122 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9123 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9124 (dequeue_one_deferred_signal): Ditto.
9125 (cancel_breakpoint): Fetch ptid from current_inferior.
9126 (linux_wait_for_event): Pass &all_threads to find_inferior,
9127 not &all_lwps. Fetch ptid, lwpid from thread.
9128 (count_events_callback): Update, "entry" parameter is a
9129 struct thread_info * now.
9130 (select_singlestep_lwp_callback): Ditto.
9131 (select_event_lwp_callback): Ditto.
9132 (cancel_breakpoints_callback): Ditto.
9133 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9135 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9136 (unsuspend_one_lwp): Update, "entry" parameter is a
9137 struct thread_info * now.
9138 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9140 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9141 Fetch lwpid from thread, not lwp.
9142 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9143 Pass &all_threads to find_inferior, not &all_lwps.
9144 (send_sigstop): Fetch lwpid from thread, not lwp.
9145 (send_sigstop_callback): Update, "entry" parameter is a
9146 struct thread_info * now.
9147 (suspend_and_send_sigstop_callback): Ditto.
9148 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9149 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9150 struct thread_info * now.
9151 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9153 (lwp_running): Update, "entry" parameter is a
9154 struct thread_info * now.
9155 (stop_all_lwps): Fetch ptid from thread.
9156 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9157 (linux_resume_one_lwp): Fetch lwpid from thread.
9158 (linux_set_resume_request): Update, "entry" parameter is a
9159 struct thread_info * now. Fetch pid, lwpid from thread.
9160 (resume_status_pending_p): Update, "entry" parameter is a
9161 struct thread_info * now.
9162 (need_step_over_p): Ditto. Fetch lwpid from thread.
9163 (start_step_over): Fetch lwpid from thread.
9164 (linux_resume_one_thread): Update, "entry" parameter is a
9165 struct thread_info * now. Fetch lwpid from thread.
9166 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9167 (proceed_one_lwp): Update, "entry" parameter is a
9168 struct thread_info * now. Fetch lwpid from thread.
9169 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9170 struct thread_info * now.
9171 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9172 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9173 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9175 (regsets_store_inferior_registers): Ditto.
9176 (fetch_register, store_register): Ditto.
9177 (linux_read_memory, linux_write_memory): Ditto.
9178 (linux_request_interrupt): Ditto.
9179 (linux_read_auxv): Ditto.
9180 (linux_xfer_siginfo): Ditto.
9181 (linux_qxfer_spu): Ditto.
9182 (linux_qxfer_libraries_svr4): Ditto.
9183 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9184 moved to inferiors.h.
9186 (get_thread_lwp): Update.
9187 (struct lwp_info): Delete member "entry". Simplify comment for
9190 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9191 current_inferior directly.
9192 (update_watch_registers_callback): Update, "entry" parameter is a
9193 struct thread_info * now. Fetch pid from thread.
9194 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9195 (mips_insert_point): Fetch lwpid from current_inferior.
9196 Pass &all_threads to find_inferior, not &all_lwps.
9197 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9198 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9200 (mips_stopped_data_address): Ditto.
9201 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9203 * linux-tile-low.c (tile_arch_setup): Ditto.
9204 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9205 (update_debug_registers_callback): Update, "entry" parameter is a
9206 struct thread_info * now. Fetch pid from thread.
9207 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9208 Pass &all_threads to find_inferior, not &all_lwps.
9209 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9210 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9211 Pass &all_threads to find_inferior, not &all_lwps.
9212 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9213 (i386_dr_low_get_status): Ditto.
9214 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9215 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9216 (x86_linux_read_description): Ditto.
9217 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9219 2014-02-20 Doug Evans <dje@google.com>
9221 * inferiors.c (get_first_inferior): Fix buglet.
9223 2014-02-19 Doug Evans <dje@google.com>
9225 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9226 * inferiors.c (add_thread): Change result type to struct thread_info *.
9227 All callers updated.
9228 (add_lwp): Call add_thread here instead of in callers.
9229 All callers updated.
9230 * linux-low.h (get_lwp_thread): Rewrite.
9231 (struct lwp_info): New member "thread".
9233 2014-02-19 Doug Evans <dje@google.com>
9235 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9236 All callers updated.
9238 2014-02-19 Doug Evans <dje@google.com>
9240 * inferiors.c (add_thread): Fix whitespace.
9242 2014-02-19 Doug Evans <dje@google.com>
9244 * dll.c (clear_dlls): Replace accessing list implemention details
9246 * gdbthread.h (get_first_thread): Declare.
9247 * inferiors.c (for_each_inferior_with_data): New function.
9248 (get_first_thread): New function.
9249 (find_thread_ptid): Simplify.
9250 (get_first_inferior): New function.
9251 (clear_list): Delete.
9252 (one_inferior_p): New function.
9253 (clear_inferior_list): New function.
9254 (clear_inferiors): Update.
9255 * inferiors.h (for_each_inferior_with_data): Declare.
9256 (clear_inferior_list): Declare.
9257 (one_inferior_p): Declare.
9258 (get_first_inferior): Declare.
9259 * linux-low.c (linux_wait_for_event): Replace accessing list
9260 implemention details with API function.
9261 * server.c (target_running): Ditto.
9262 (accumulate_file_name_length): New function.
9263 (emit_dll_description): New function.
9264 (handle_qxfer_libraries): Replace accessing list implemention
9265 details with API function.
9266 (handle_qxfer_threads_worker): New function.
9267 (handle_qxfer_threads_proper): Replace accessing list implemention
9268 details with API function.
9269 (handle_query): Ditto.
9270 (visit_actioned_threads_callback_ftype): New typedef.
9271 (visit_actioned_threads_data): New struct.
9272 (visit_actioned_threads): Rewrite to be find_inferior callback.
9273 (resume): Call find_inferior.
9274 (handle_status): Replace accessing list implemention
9275 details with API function.
9276 (process_serial_event): Replace accessing list implemention details
9278 * target.c (set_desired_inferior): Replace accessing list implemention
9279 details with API function.
9280 * tracepoint.c (same_process_p): New function.
9281 (gdb_agent_about_to_close): Replace accessing list implemention
9282 details with API function.
9283 * win32-low.c (child_delete_thread): Replace accessing list
9284 implemention details with API function.
9285 (match_dll_by_basename): New function.
9286 (dll_is_loaded_by_basename): New function.
9287 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9288 details call to dll_is_loaded_by_basename.
9290 2014-02-19 Doug Evans <dje@google.com>
9292 * dll.h (struct dll_info): Add comment.
9293 * gdbthread.h (struct thread_info): Add comment.
9294 (current_ptid): Simplify.
9295 * inferiors.c (add_process): Update.
9296 (remove_process): Update.
9297 * inferiors.h (struct process_info): Rename member "head" to "entry".
9298 * linux-low.c (delete_lwp): Update.
9300 (last_thread_of_process_p): Update.
9301 (kill_one_lwp_callback, linux_kill): Update.
9302 (status_pending_p_callback): Update.
9303 (wait_for_sigstop): Update. Simplify read of ptid.
9304 (start_step_over): Update.
9305 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9306 (get_lwp_thread): Update.
9307 (struct lwp_info): Rename member "head" to "entry".
9308 * regcache.h (inferior_list_entry): Delete.
9309 * server.c (kill_inferior_callback): Update.
9310 (detach_or_kill_inferior_callback): Update.
9311 (print_started_pid): Update.
9312 (print_attached_pid): Update.
9313 (process_serial_event): Simplify read of ptid.
9314 * thread-db.c (thread_db_create_event): Update.
9315 (thread_db_get_tls_address): Update.
9316 * win32-low.c (current_inferior_ptid): Simplify.
9318 2014-02-19 Tom Tromey <tromey@redhat.com>
9320 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9322 (target_supports_btrace): Update.
9324 2014-02-14 Yao Qi <yao@codesourcery.com>
9326 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9327 (rsp-low-ipa.o): New target.
9329 2014-02-12 Tom Tromey <tromey@redhat.com>
9331 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9332 convert_ascii_to_int.
9333 * regcache.c (registers_to_string): Likewise.
9334 * remote-utils.c (decode_M_packet): Likewise.
9335 * server.c (process_serial_event): Likewise.
9337 2014-02-12 Tom Tromey <tromey@redhat.com>
9339 * server.c (handle_query, handle_v_run): Use hex2bin, not
9341 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9343 2014-02-12 Tom Tromey <tromey@redhat.com>
9345 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9346 convert_int_to_ascii.
9347 * regcache.c (registers_to_string, collect_register_as_string):
9349 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9351 * server.c (process_serial_event): Likewise.
9352 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9353 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9355 2014-02-12 Tom Tromey <tromey@redhat.com>
9357 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9358 bin2hex, not hexify.
9359 * tracepoint.c (cmd_qtstatus): Likewise.
9361 2014-02-12 Tom Tromey <tromey@redhat.com>
9363 * remote-utils.c (monitor_output): Pass explicit length to
9366 2014-02-12 Tom Tromey <tromey@redhat.com>
9368 * tracepoint.c: Include rsp-low.h.
9369 * server.c: Include rsp-low.h.
9370 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9371 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9373 * remote-utils.c: Include rsp-low.h.
9374 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9375 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9376 (convert_int_to_ascii, convert_ascii_to_int): Move to
9378 * regcache.c: Include rsp-low.h.
9379 * ax.c: Include rsp-low.h.
9380 * Makefile.in (SFILES): Add common/rsp-low.c.
9381 (OBS): Add rsp-low.o.
9382 (rsp-low.o): New target.
9384 2014-02-12 Tom Tromey <tromey@redhat.com>
9386 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9387 Include print-utils.h.
9388 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9389 (plongest, thirty_two, phex_nz): Remove.
9390 * Makefile.in (SFILES): Add common/print-utils.c.
9391 (OBS): Add print-utils.o.
9392 (print-utils-ipa.o): New target.
9393 (print-utils.o): New target.
9394 (IPA_OBJS): Add print-utils-ipa.o.
9396 2014-02-06 Tom Tromey <tromey@redhat.com>
9398 * Makefile.in (SFILES): Fix indentation.
9400 2014-02-05 Doug Evans <dje@google.com>
9402 * linux-low.c (linux_wait_for_event): Improve comment.
9403 (linux_wait_1): Keep current_inferior in sync with event_child.
9405 2014-01-22 Doug Evans <dje@google.com>
9407 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9409 2014-01-22 Doug Evans <dje@google.com>
9411 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9412 * configure: Regenerate.
9413 * config.in: Regenerate.
9414 * Makefile.in (SFILES): Add debug.c.
9416 * debug.c: New file.
9417 * debug.h: New file.
9418 * linux-aarch64-low.c (*): Update all debugging printfs to use
9419 debug_printf instead of fprintf.
9420 * linux-arm-low.c (*): Ditto.
9421 * linux-cris-low.c (*): Ditto.
9422 * linux-crisv32-low.c (*): Ditto.
9423 * linux-m32r-low.c (*): Ditto.
9424 * linux-sparc-low.c (*): Ditto.
9425 * linux-x86.c (*): Ditto.
9426 * linux-low.c (*): Ditto.
9427 (linux_wait_1): Add calls to debug_enter, debug_exit.
9428 (linux_wait): Remove redundant debugging printf.
9429 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9430 (linux_resume, unstop_all_lwps): Ditto.
9431 * mem-break.c (*): Update all debugging printfs to use
9432 debug_printf instead of fprintf.
9433 * remote-utils.c (*): Ditto.
9434 * thread-db.c (*): Ditto.
9435 * server.c #include <ctype.h>, "gdb_vecs.h".
9436 (debug_threads): Moved to debug.c.
9437 (*): Update all debugging printfs to use debug_printf instead of
9439 (start_inferior): Replace call to fflush with call to debug_flush.
9440 (monitor_show_help): Mention set debug-format.
9441 (parse_debug_format_options): New function.
9442 (handle_monitor_command): Handle "monitor set debug-format".
9443 (gdbserver_usage): Mention --debug-format.
9444 (main): Parse --debug-format.
9445 * server.h (debug_threads): Declaration moved to debug.h.
9447 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9448 trace_debug_1 that uses debug_printf.
9449 (tracepoint_look_up_symbols): Update all debugging printfs to use
9450 debug_printf instead of fprintf.
9452 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9454 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9457 2014-01-17 Pedro Alves <palves@redhat.com>
9460 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9461 defined after including gdb_proc_service.h.
9463 2014-01-16 Doug Evans <dje@google.com>
9465 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9466 (match_dll): Use it.
9468 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9470 * target.h (target_ops) <read_btrace>: Change parameters and
9471 return type to allow error reporting.
9472 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9473 trace reading errors on.
9474 * linux-low.c (linux_low_read_btrace): Pass trace reading
9476 (linux_low_disable_btrace): New.
9478 2014-01-15 Doug Evans <dje@google.com>
9480 * inferiors.c (thread_id_to_gdb_id): Delete.
9481 * inferiors.h (thread_id_to_gdb_id): Delete.
9483 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9485 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9486 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9489 2014-01-08 Pedro Alves <palves@redhat.com>
9491 * server.c (handle_status): Don't discard previous queued stop
9492 replies or thread's pending status here.
9493 (main) <disconnection>: Do it here instead.
9495 2014-01-08 Pedro Alves <palves@redhat.com>
9497 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9498 * server.c (visit_actioned_threads, handle_pending_status): New
9500 (handle_v_cont): Factor out parts to ...
9501 (resume): ... this new function. If in all-stop, and a thread
9502 being resumed has a pending status, report it without actually
9504 (myresume): Adjust to use the new 'resume' function.
9505 (clear_pending_status_callback, set_pending_status_callback)
9506 (find_status_pending_thread_callback): New functions.
9507 (handle_status): Handle the case of multiple threads having
9508 interesting statuses to report. Report threads' real last signal
9509 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9510 with an interesting thread to report the status for, instead of
9511 always reporting the status of the first thread.
9513 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9515 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9516 * gdbreplay.c (gdbreplay_version): Likewise.
9518 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9520 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9521 iov.iov_len with the real length in use.
9523 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9525 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9526 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9527 for all targets that use win32-low.c.
9528 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9529 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9531 2013-12-13 Pedro Alves <palves@redhat.com>
9533 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9534 if equal to TARGET_WAITKIND_LOADED.
9535 * win32-low.c (cached_status): New static global.
9536 (win32_wait): Add declaration.
9537 (do_initial_child_stuff): Flush all initial pending debug events
9538 up to the initial breakpoint.
9539 (win32_wait): If CACHED_STATUS was set, return that instead
9540 of doing a real wait. Remove the code resuming the execution
9541 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9542 during the initial phase. Also remove the code changing
9543 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9544 TARGET_WAITKIND_STOPPED.
9546 2013-12-11 Yao Qi <yao@codesourcery.com>
9548 * notif.c (handle_notif_ack): Return 0 if no notification
9551 2013-11-20 Doug Evans <dje@google.com>
9553 * linux-low.c (linux_set_resume_request): Fix comment.
9555 2013-11-20 Doug Evans <dje@google.com>
9557 * linux-low.c (resume_status_pending_p): Tweak comment.
9559 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9561 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9562 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9563 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9564 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9565 (srv_amd64_regobj): Add amd64-mpx.o.
9566 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9567 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9568 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9569 * i387-fp.c (num_pl_bnd_register) Added constant.
9570 (num_pl_bnd_cfg_registers) Added constant.
9571 (struct i387_xsave) Added reserved area and MPX fields.
9572 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9573 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9575 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9576 (init_registers_amd64_mpx_linux): Declare new function.
9577 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9578 (x86_64_regmap): Add MPX registers.
9579 (x86_linux_read_description): Add MPX case.
9580 (initialize_low_arch): Initialize MPX targets.
9582 2013-11-18 Tom Tromey <tromey@redhat.com>
9584 * configure: Rebuild.
9585 * configure.ac: Don't check for stdlib.h.
9586 * gdbreplay.c: Unconditionally include stdlib.h.
9588 2013-11-18 Tom Tromey <tromey@redhat.com>
9590 * config.in: Rebuild.
9591 * configure: Rebuild.
9592 * configure.ac: Don't use AC_HEADER_DIRENT.
9594 2013-11-18 Tom Tromey <tromey@redhat.com>
9596 * server.h: Don't check HAVE_STRING_H.
9597 * gdbreplay.c: Don't check HAVE_STRING_H.
9598 * configure: Rebuild.
9600 2013-11-18 Tom Tromey <tromey@redhat.com>
9602 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9605 2013-11-08 Tom Tromey <tromey@redhat.com>
9607 * configure, config.in: Rebuild.
9608 * configure.ac: Remove unused configury.
9610 2013-11-08 Tom Tromey <tromey@redhat.com>
9612 * acinclude.m4: Include common.m4, codeset.m4.
9613 * configure, config.in: Rebuild.
9614 * configure.ac: Use GDB_AC_COMMON.
9616 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9618 * linux-s390-low.c (HWCAP_S390_TE): New define.
9619 (s390_arch_setup): Consider the TE field in the HWCAP for
9620 determining 'have_regset_tdb'.
9622 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9625 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9628 2013-10-02 Pedro Alves <palves@redhat.com>
9630 * server.c (process_serial_event): Don't output "GDBserver
9631 exiting" if GDB is connected through stdio.
9632 * target.c (mywait): Likewise, be silent if GDB is connected
9635 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9637 * lynx-low.c (lynx_add_threads_after_attach): New function.
9638 (lynx_attach): Remove call to add_thread. Add call to
9639 lynx_add_threads_after_attach instead.
9641 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9643 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9644 * config.in, configure: Regenerated.
9646 2013-09-18 Yao Qi <yao@codesourcery.com>
9649 * server.c (start_inferior): Clear 'resume_info'.
9651 2013-09-16 Jiong Wang <jiwang@tilera.com>
9653 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9656 2013-09-16 Jiong Wang <jiwang@tilera.com>
9658 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9659 linux-tile-low.o to srv_tgtobj.
9661 2013-09-16 Will Newton <will.newton@linaro.org>
9663 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9666 2013-09-06 Pedro Alves <palves@redhat.com>
9668 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9669 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9670 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9671 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9672 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9673 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9675 2013-09-06 Pedro Alves <palves@redhat.com>
9677 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9678 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9680 2013-09-06 Pedro Alves <palves@redhat.com>
9682 * linux-amd64-ipa.c: Include tracepoint.h.
9683 * linux-i386-ipa.c: Include tracepoint.h.
9685 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9687 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9688 (ps_get_thread_area): New function.
9690 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9692 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9693 (initialize_low_arch): Call init_registers_crisv32 rather than
9694 init_register_crisv32.
9696 2013-09-05 Pedro Alves <palves@redhat.com>
9698 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9700 * hostio.h: ... this new file.
9701 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9702 win32-low.c: Include hostio.h.
9704 2013-09-05 Pedro Alves <palves@redhat.com>
9706 * server.h (gdb_client_data, handler_func, callback_handler_func)
9707 (delete_file_handler, add_file_handler, append_callback_event)
9708 (delete_callback_event, start_event_loop, initialize_event_loop):
9709 Move to event-loop.h and include it.
9710 * event-loop.h: New file.
9712 2013-09-05 Pedro Alves <palves@redhat.com>
9714 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9715 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9716 (loaded_dll, unloaded_dll): Move to ...
9717 * dll.h: ... this new file.
9718 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9720 2013-09-05 Pedro Alves <palves@redhat.com>
9722 * server.h (current_process, get_thread_process, all_processes)
9723 (add_inferior_to_list, for_each_inferior, current_inferior)
9724 (remove_inferior, add_process, remove_process, find_process_pid)
9725 (have_started_inferiors_p, have_attached_inferiors_p)
9726 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9727 (clear_inferiors, find_inferior, find_inferior_id)
9728 (inferior_target_data, set_inferior_target_data)
9729 (inferior_regcache_data, set_inferior_regcache_data): Move to
9730 inferiors.h, and include it.
9731 * inferiors.h: New file.
9733 2013-09-05 Pedro Alves <palves@redhat.com>
9735 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9739 2013-09-05 Pedro Alves <palves@redhat.com>
9741 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9743 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9744 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9745 (handle_tracepoint_general_set, handle_tracepoint_query)
9746 (tracepoint_finished_step, tracepoint_was_hit)
9747 (release_while_stepping_state_list, current_traceframe)
9748 (in_readonly_region, traceframe_read_mem)
9749 (fetch_traceframe_registers, traceframe_read_sdata)
9750 (traceframe_read_info, struct fast_tpoint_collect_status)
9751 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9752 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9753 (supply_fast_tracepoint_registers)
9754 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9755 (ipa_tdesc, claim_trampoline_space)
9756 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9757 (agent_mem_read, agent_get_trace_state_variable_value)
9758 (agent_set_trace_state_variable_value, agent_tsv_read)
9759 (agent_mem_read_string, get_raw_reg_func_addr)
9760 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9761 * tracepoint.h: ... this new file.
9763 2013-09-05 Pedro Alves <palves@redhat.com>
9765 * server.h (perror_with_name, error, fatal, warning, paddress)
9766 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9768 * utils.h: New file.
9770 2013-09-05 Pedro Alves <palves@redhat.com>
9772 * server.h (remote_debug, noack_mode, transport_is_reliable)
9773 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9774 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9775 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9776 (write_enn, initialize_async_io, enable_async_io)
9777 (disable_async_io, check_remote_input_interrupt_request)
9778 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9779 (dead_thread_notify, prepare_resume_reply)
9780 (decode_address_to_semicolon, decode_address, decode_m_packet)
9781 (decode_M_packet, decode_X_packet, decode_xfer_write)
9782 (decode_search_memory_packet, unhexify, hexify)
9783 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9784 (look_up_one_symbol, relocate_instruction)
9785 (monitor_output): Move to remote-utils.h, and include it.
9786 * remote-utils.h: New file.
9788 2013-09-05 Pedro Alves <palves@redhat.com>
9790 * server.h (_): Delete.
9792 2013-09-02 Pedro Alves <palves@redhat.com>
9794 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9795 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9797 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9799 2013-09-02 Pierre Muller <muller@sourceware.org>
9801 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9802 or WriteProcessMemory complete successfully and handle
9803 ERROR_PARTIAL_COPY error.
9805 2013-09-02 Pedro Alves <palves@redhat.com>
9807 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9808 error instead of EIO.
9810 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9813 * linux-low.c: Include filestuff.h.
9814 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9815 * lynx-low.c: Include filestuff.h.
9816 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9817 * server.c: Include filestuff.h.
9818 (main): Call notice_open_fds.
9819 * spu-low.c: Include filestuff.h.
9820 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9822 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9824 * Makefile.in: Explain why ../target and ../nat are not
9825 listed as include file search paths.
9826 (linux-waitpid.o): New object file rule.
9827 * configure.srv (srv_native_linux_obj): New variable.
9828 Replace all occurrences of linux native object files with
9829 $srv_native_linux_obj.
9830 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9831 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9832 (linux_enable_event_reporting): Remove declaration.
9833 (my_waitpid): Moved to common/linux-waitpid.c.
9834 (linux_wait_for_event): Pass ptid when calling
9835 linux_enable_event_reporting.
9836 (linux_supports_tracefork_flag): Remove.
9837 (linux_enable_event_reporting): Likewise.
9838 (linux_tracefork_grandchild): Remove.
9839 (STACK_SIZE): Moved to common/linux-ptrace.c.
9840 (linux_tracefork_child): Remove.
9841 (linux_test_for_tracefork): Remove.
9842 (linux_look_up_symbols): Call linux_supports_traceclone.
9843 (initialize_low): Remove call to linux_test_for_tracefork.
9844 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9845 common/linux-ptrace.h.
9846 (PTRACE_TYPE_ARG4): Likewise.
9847 Include linux-ptrace.h.
9849 2013-08-21 Pedro Alves <palves@redhat.com>
9851 * config.in: Renegerate.
9853 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9855 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9856 (SFILES): Remove $(srcdir)/common/target-common.c and
9857 add $(srcdir)/target/waitstatus.c.
9858 (OBS): Remove target-common.o and add waitstatus.o.
9859 (server_h): Remove $(srcdir)/../common/target-common.h and
9860 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9861 and $(srcdir)/../target/waitstatus.h.
9862 (target-common.o): Remove.
9863 (waitstatus.o): New target object file.
9864 * target.h: Do not include target-common.h and
9865 include target/resume.h, target/wait.h and
9866 target/waitstatus.h.
9868 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9870 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9871 to PTRACE_TYPE_ARG3.
9872 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9873 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9875 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9876 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9878 2013-07-27 Jie Zhang <jie@codesourcery.com>
9879 Daniel Jacobowitz <dan@codesourcery.com>
9880 Yao Qi <yao@codesourcery.com>
9882 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9883 (mips-linux-watch.o): New rule.
9884 (mips_linux_watch_h): New variable.
9885 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9887 * linux-mips-low.c: Include mips-linux-watch.h.
9888 (struct arch_process_info, struct arch_lwp_info): New.
9889 (update_watch_registers_callback): New function.
9890 (mips_linux_new_process, mips_linux_new_thread) New functions.
9891 (mips_linux_prepare_to_resume, mips_insert_point): New
9893 (mips_remove_point, mips_stopped_by_watchpoint): New
9895 (rsp_bp_type_to_target_hw_bp_type): New function.
9896 (mips_stopped_data_address): New function.
9897 (the_low_target): Add watchpoint support functions.
9899 2013-07-27 Yao Qi <yao@codesourcery.com>
9901 * i386-low.c: Include break-common.h.
9902 (enum target_hw_bp_type): Remove.
9904 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9906 * Makefile.in (SFILES): /common/target-common.c.
9907 (OBS): Add target-common.o.
9908 (server_h): Add $(srcdir)/../common/target-common.h.
9909 (target-common.o): New target.
9910 * server.c (queue_stop_reply_callback): Free
9911 status string after use.
9912 * target.c (target_waitstatus_to_string): Remove.
9913 * target.h: Include target-common.h.
9914 (resume_kind): Likewise.
9915 (target_waitkind): Likewise.
9916 (target_waitstatus): Likewise.
9917 (TARGET_WNOHANG): Likewise.
9919 2013-07-04 Yao Qi <yao@codesourcery.com>
9921 * Makefile.in (host_alias): Use @host_noncanonical@.
9922 (target_alias): Use @target_noncanonical@.
9923 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9924 ACX_NONCANONICAL_HOST.
9925 * configure: Regenerated.
9928 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9930 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9931 * configure: Rebuild.
9932 * Makefile.in (version_host, version_target): Get from configure.
9933 (version.c): Use $(version_host) and $(version_target).
9935 2013-07-03 Pedro Alves <palves@redhat.com>
9937 * Makefile.in (config.status): Depend on development.sh.
9938 * acinclude.m4: Include libmcheck.m4.
9939 * configure: Regenerate.
9941 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9943 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9944 attribute inside the parentheses.
9945 (winapi_DebugSetProcessKillOnExit): Ditto.
9946 (winapi_DebugBreakProcess): Ditto.
9947 (winapi_GenerateConsoleCtrlEvent): Ditto.
9949 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9951 * notif.h (notif_event): Add a dummy member to avoid compiler
9954 2013-07-01 Pedro Alves <palves@redhat.com>
9956 * hostio.c (HOSTIO_PATH_MAX): Define.
9957 (require_filename, handle_open, handle_unlink, handle_readlink):
9960 2013-07-01 Pedro Alves <palves@redhat.com>
9962 * server.h: Include "pathmax.h".
9963 * linux-low.c: Don't include sys/param.h.
9964 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9966 * win32-low.c: Don't include sys/param.h.
9967 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9969 2013-07-01 Pedro Alves <palves@redhat.com>
9971 * event-loop.c: Don't check HAVE_UNISTD_H before including
9973 * gdbreplay.c: Likewise.
9974 * remote-utils.c: Likewise.
9975 * server.c: Likewise.
9976 * configure.ac: Don't check for unistd.h.
9977 * configure: Regenerate.
9979 2013-06-28 Tom Tromey <tromey@redhat.com>
9981 * Makefile.in (version.c): Use version.in, not
9984 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9986 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9987 * configure: Rebuild.
9988 * Makefile.in (version_host, version_target): Get from configure.
9989 (version.c): Use $(version_host) and $(version_target).
9991 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9993 Fix trace-status to output user name without trailing colon.
9994 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9996 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9998 Fix trace-status to output proper start-time and stop-time.
9999 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10000 output start time and stop time in hex as gdb expects.
10002 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10004 * tracepoint.c (build_traceframe_info_xml): Output trace state
10005 variables present in the trace buffer.
10007 2013-06-24 Tom Tromey <tromey@redhat.com>
10009 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10011 (version.o): Remove.
10012 * gdbreplay.c: Include version.h.
10013 (version, host_name): Don't declare.
10014 * server.h: Include version.h.
10015 (version, host_name): Don't declare.
10017 2013-06-12 Pedro Alves <palves@redhat.com>
10019 * linux-x86-low.c (linux_is_elf64): Delete global.
10020 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10021 with local linux_pid_exe_is_elf_64_file use.
10023 2013-06-11 Pedro Alves <palves@redhat.com>
10025 * linux-low.c (regset_disabled, disable_regset): New functions.
10026 (regsets_fetch_inferior_registers)
10027 (regsets_store_inferior_registers): Use them.
10028 (initialize_regsets_info); Don't allocate the disabled_regsets
10030 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10033 2013-06-11 Pedro Alves <palves@redhat.com>
10035 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10038 2013-06-11 Pedro Alves <palves@redhat.com>
10040 * linux-x86-low.c (initialize_low_arch): Call
10041 init_registers_x32_avx_linux.
10043 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10045 Fix compatibility with Android Bionic.
10046 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10049 2013-06-07 Pedro Alves <palves@redhat.com>
10052 * Makefile.in (OBS): Add tdesc.o.
10053 (IPA_OBJS): Add tdesc-ipa.o.
10054 (tdesc-ipa.o): New rule.
10055 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10057 * linux-low.c (new_inferior): Delete.
10058 (disabled_regsets, num_regsets): Delete.
10059 (linux_add_process): Adjust to set the new per-process
10061 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10062 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10063 was a stop. When calling arch_setup, switch the current inferior
10064 to the thread that got an event.
10065 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10066 (regsets_fetch_inferior_registers)
10067 (regsets_store_inferior_registers): New regsets_info parameter.
10069 (linux_register_in_regsets): New regs_info parameter. Adjust to
10071 (register_addr, fetch_register, store_register): New usrregs_info
10072 parameter. Adjust to use it.
10073 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10074 parameter regs_info. Adjust to use it.
10075 (linux_fetch_registers): Get the current inferior's regs_info, and
10077 (linux_store_registers): Ditto.
10078 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10079 (initialize_low): Don't initialize the target_regsets here. Call
10080 initialize_low_arch.
10081 * linux-low.h (target_regsets): Delete declaration.
10082 (struct regsets_info): New.
10083 (struct usrregs_info): New.
10084 (struct regs_info): New.
10085 (struct process_info_private) <new_inferior>: New field.
10086 (struct linux_target_ops): Delete the num_regs, regmap, and
10087 regset_bitmap fields. New field regs_info.
10088 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10089 * i387-fp.c (num_xmm_registers): Delete.
10090 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10091 calls to new interface.
10092 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10093 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10094 Infer the number of xmm registers from the regcache's target
10096 * i387-fp.h (num_xmm_registers): Delete.
10097 * inferiors.c (add_thread): Don't install the thread's regcache
10099 * proc-service.c (gregset_info): Fetch the current inferior's
10100 regs_info. Adjust to use it.
10101 * regcache.c: Include tdesc.h.
10102 (register_bytes, reg_defs, num_registers)
10103 (gdbserver_expedite_regs): Delete.
10104 (get_thread_regcache): If the thread doesn't have a regcache yet,
10105 create one, instead of aborting gdbserver.
10106 (regcache_invalidate_one): Rename to ...
10107 (regcache_invalidate_thread): ... this.
10108 (regcache_invalidate_one): New.
10109 (regcache_invalidate): Only invalidate registers of the current
10111 (init_register_cache): Add target_desc parameter, and use it.
10112 (new_register_cache): Ditto. Assert the target description has a
10113 non zero registers_size.
10114 (regcache_cpy): Add assertions. Adjust.
10115 (realloc_register_cache, set_register_cache): Delete.
10116 (registers_to_string, registers_from_string): Adjust.
10117 (find_register_by_name, find_regno, find_register_by_number)
10118 (register_cache_size): Add target_desc parameter, and use it.
10119 (free_register_cache_thread, free_register_cache_thread_one)
10120 (regcache_release, register_cache_size): New.
10121 (register_size): Add target_desc parameter, and use it.
10122 (register_data, supply_register, supply_register_zeroed)
10123 (supply_regblock, supply_register_by_name, collect_register)
10124 (collect_register_as_string, collect_register_by_name): Adjust.
10125 * regcache.h (struct target_desc): Forward declare.
10126 (struct regcache) <tdesc>: New field.
10127 (init_register_cache, new_register_cache): Add target_desc
10129 (regcache_invalidate_thread): Declare.
10130 (regcache_invalidate_one): Delete declaration.
10131 (regcache_release): Declare.
10132 (find_register_by_number, register_cache_size, register_size)
10133 (find_regno): Add target_desc parameter.
10134 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10136 * remote-utils.c: Include tdesc.h.
10137 (outreg, prepare_resume_reply): Adjust.
10138 * server.c: Include tdesc.h.
10139 (gdbserver_xmltarget): Delete declaration.
10140 (get_features_xml, process_serial_event): Adjust.
10141 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10143 (struct process_info) <tdesc>: New field.
10144 (ipa_tdesc): Declare.
10145 * tdesc.c: New file.
10146 * tdesc.h: New file.
10147 * tracepoint.c: Include tdesc.h.
10148 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10149 (get_context_regcache): Adjust to pass ipa_tdesc down.
10150 (do_action_at_tracepoint): Adjust to get the register cache size
10151 from the context regcache's description.
10152 (traceframe_walk_blocks): Adjust to get the register cache size
10153 from the current trace frame's description.
10154 (traceframe_get_pc): Adjust to get current trace frame's
10155 description and pass it down.
10156 (gdb_collect): Adjust to get the register cache size from the
10158 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10159 (gdbserver_xmltarget): Delete.
10160 (initialize_low_tracepoint): Set the ipa's target description.
10161 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10162 (initialize_low_tracepoint): Set the ipa's target description.
10163 * linux-x86-low.c: Include tdesc.h.
10164 [__x86_64__] (is_64bit_tdesc): New.
10165 (ps_get_thread_area, x86_get_thread_area): Use it.
10166 (i386_cannot_store_register): Rename to ...
10167 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10168 (i386_cannot_fetch_register): Rename to ...
10169 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10170 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10172 (target_regsets): Rename to ...
10173 (x86_regsets): ... this.
10174 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10176 (x86_siginfo_fixup): Use is_64bit_tdesc.
10177 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10178 (tdesc_x32_avx_linux, tdesc_x32_linux)
10179 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10181 (x86_linux_update_xmltarget): Delete.
10182 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10183 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10184 (AMD64_LINUX_USER64_CS): New.
10185 (x86_linux_read_description): New, based on
10186 x86_linux_update_xmltarget.
10187 (same_process_callback): New.
10188 (x86_arch_setup_process_callback): New.
10189 (x86_linux_update_xmltarget): New.
10190 (x86_regsets_info): New.
10191 (amd64_linux_regs_info): New.
10192 (i386_linux_usrregs_info): New.
10193 (i386_linux_regs_info): New.
10194 (x86_linux_regs_info): New.
10195 (x86_arch_setup): Reimplement.
10196 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10197 (x86_emit_ops): Ditto.
10198 (the_low_target): Adjust. Install x86_linux_regs_info,
10199 x86_cannot_fetch_register, and x86_cannot_store_register.
10200 (initialize_low_arch): New.
10201 * linux-ia64-low.c (tdesc_ia64): Declare.
10202 (ia64_fetch_register): Adjust.
10203 (ia64_usrregs_info, regs_info): New globals.
10204 (ia64_regs_info): New function.
10205 (the_low_target): Adjust.
10206 (initialize_low_arch): New function.
10207 * linux-sparc-low.c (tdesc_sparc64): Declare.
10208 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10210 (sparc_arch_setup): New function.
10211 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10212 (the_low_target): Adjust.
10213 (initialize_low_arch): New function.
10214 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10215 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10216 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10217 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10218 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10219 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10220 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10221 (tdesc_powerpc_isa205_vsx64l): Declare.
10222 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10223 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10224 (ppc_set_pc, ppc_get_hwcap): Adjust.
10225 (ppc_usrregs_info): Forward declare.
10226 (!__powerpc64__) ppc_regmap_adjusted: New global.
10227 (ppc_arch_setup): Adjust to the current process'es target
10229 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10230 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10231 (ppc_store_evrregset): Adjust.
10232 (target_regsets): Rename to ...
10233 (ppc_regsets): ... this, and make static.
10234 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10235 (ppc_regs_info): New function.
10236 (the_low_target): Adjust.
10237 (initialize_low_arch): New function.
10238 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10239 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10240 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10241 (tdesc_s390x_linux64v2): Declare.
10242 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10243 (s390_fill_gregset, s390_store_last_break): Adjust.
10244 (target_regsets): Rename to ...
10245 (s390_regsets): ... this, and make static.
10246 (s390_get_pc, s390_set_pc): Adjust.
10247 (s390_get_hwcap): New target_desc parameter, and use it.
10248 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10249 (s390_arch_setup): Adjust to set the current process'es target
10250 description. Don't adjust the regmap.
10251 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10252 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10253 (regs_info_3264): New globals.
10254 (s390_regs_info): New function.
10255 (the_low_target): Adjust.
10256 (initialize_low_arch): New function.
10257 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10258 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10259 [__mips64] (init_registers_mips_linux)
10260 (init_registers_mips_dsp_linux): Delete defines.
10261 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10262 (have_dsp): New global.
10263 (mips_read_description): New, based on mips_arch_setup.
10264 (mips_arch_setup): Reimplement.
10265 (get_usrregs_info): New function.
10266 (mips_cannot_fetch_register, mips_cannot_store_register)
10267 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10268 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10269 (target_regsets): Rename to ...
10270 (mips_regsets): ... this, and make static.
10271 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10272 (dsp_regs_info, regs_info): New globals.
10273 (mips_regs_info): New function.
10274 (the_low_target): Adjust.
10275 (initialize_low_arch): New function.
10276 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10277 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10279 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10280 (arm_read_description): New, with bits factored from
10282 (arm_arch_setup): Reimplement.
10283 (target_regsets): Rename to ...
10284 (arm_regsets): ... this, and make static.
10285 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10286 (arm_regs_info): New function.
10287 (the_low_target): Adjust.
10288 (initialize_low_arch): New function.
10289 * linux-m68k-low.c (tdesc_m68k): Declare.
10290 (target_regsets): Rename to ...
10291 (m68k_regsets): ... this, and make static.
10292 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10293 (m68k_regs_info): New function.
10294 (m68k_arch_setup): New function.
10295 (the_low_target): Adjust.
10296 (initialize_low_arch): New function.
10297 * linux-sh-low.c (tdesc_sharch): Declare.
10298 (target_regsets): Rename to ...
10299 (sh_regsets): ... this, and make static.
10300 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10301 (sh_regs_info, sh_arch_setup): New functions.
10302 (the_low_target): Adjust.
10303 (initialize_low_arch): New function.
10304 * linux-bfin-low.c (tdesc_bfin): Declare.
10305 (bfin_arch_setup): New function.
10306 (bfin_usrregs_info, regs_info): New globals.
10307 (bfin_regs_info): New function.
10308 (the_low_target): Adjust.
10309 (initialize_low_arch): New function.
10310 * linux-cris-low.c (tdesc_cris): Declare.
10311 (cris_arch_setup): New function.
10312 (cris_usrregs_info, regs_info): New globals.
10313 (cris_regs_info): New function.
10314 (the_low_target): Adjust.
10315 (initialize_low_arch): New function.
10316 * linux-cris-low.c (tdesc_crisv32): Declare.
10317 (cris_arch_setup): New function.
10318 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10319 (cris_regs_info): New function.
10320 (the_low_target): Adjust.
10321 (initialize_low_arch): New function.
10322 * linux-m32r-low.c (tdesc_m32r): Declare.
10323 (m32r_arch_setup): New function.
10324 (m32r_usrregs_info, regs_info): New globals.
10325 (m32r_regs_info): Adjust.
10326 (initialize_low_arch): New function.
10327 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10328 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10329 (tic6x_usrregs_info): Forward declare.
10330 (tic6x_read_description): New function, based on ...
10331 (tic6x_arch_setup): ... this. Reimplement.
10332 (target_regsets): Rename to ...
10333 (tic6x_regsets): ... this, and make static.
10334 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10335 (tic6x_regs_info): New function.
10336 (the_low_target): Adjust.
10337 (initialize_low_arch): New function.
10338 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10339 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10340 (target_regsets): Rename to ...
10341 (xtensa_regsets): ... this, and make static.
10342 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10344 (xtensa_arch_setup, xtensa_regs_info): New functions.
10345 (the_low_target): Adjust.
10346 (initialize_low_arch): New function.
10347 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10348 (nios2_arch_setup): Set the current process'es tdesc.
10349 (target_regsets): Rename to ...
10350 (nios2_regsets): ... this.
10351 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10352 (nios2_regs_info): New function.
10353 (the_low_target): Adjust.
10354 (initialize_low_arch): New function.
10355 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10356 (aarch64_arch_setup): Set the current process'es tdesc.
10357 (target_regsets): Rename to ...
10358 (aarch64_regsets): ... this.
10359 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10360 (aarch64_regs_info): New function.
10361 (the_low_target): Adjust.
10362 (initialize_low_arch): New function.
10363 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10365 (target_regsets): Rename to ...
10366 (tile_regsets): ... this.
10367 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10368 (tile_regs_info): New function.
10369 (tile_arch_setup): Set the current process'es tdesc.
10370 (the_low_target): Adjust.
10371 (initialize_low_arch): New function.
10372 * spu-low.c (tdesc_spu): Declare.
10373 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10374 * win32-arm-low.c (tdesc_arm): Declare.
10375 (arm_arch_setup): New function.
10376 (the_low_target): Install arm_arch_setup instead of
10377 init_registers_arm.
10378 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10379 (init_windows_x86): Rename to ...
10380 (i386_arch_setup): ... this. Set `win32_tdesc'.
10381 (the_low_target): Adjust.
10382 * win32-low.c (win32_tdesc): New global.
10383 (child_add_thread): Don't create the thread cache here.
10384 (do_initial_child_stuff): Set the new process'es tdesc.
10385 * win32-low.h (struct target_desc): Forward declare.
10386 (win32_tdesc): Declare.
10387 * lynx-i386-low.c (tdesc_i386): Declare global.
10388 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10389 * lynx-low.c (lynx_tdesc): New global.
10390 (lynx_add_process): Set the new process'es tdesc.
10391 * lynx-low.h (struct target_desc): Forward declare.
10392 (lynx_tdesc): Declare global.
10393 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10394 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10395 * nto-low.c (nto_tdesc): New global.
10396 (do_attach): Set the new process'es tdesc.
10397 * nto-low.h (struct target_desc): Forward declare.
10398 (nto_tdesc): Declare.
10399 * nto-x86-low.c (tdesc_i386): Declare.
10400 (nto_x86_arch_setup): Set `nto_tdesc'.
10402 2013-06-04 Gary Benson <gbenson@redhat.com>
10404 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10405 to qSupported response when appropriate.
10406 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10407 with nonzero-length annex.
10408 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10409 arguments supplied in annex.
10411 2013-05-31 Doug Evans <dje@google.com>
10414 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10415 64 bits in 64-cross-32 environment.
10417 2013-05-28 Pedro Alves <palves@redhat.com>
10419 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10420 (aarch64-without-fpu.c): Delete rule.
10421 * configure.srv (aarch64*-*-linux*): Remove references to
10422 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10423 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10426 2013-05-24 Pedro Alves <palves@redhat.com>
10428 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10429 instead of strchr/decode_address. Error if the range isn't split
10430 with a ','. Don't assume there's be a ':' in the action.
10432 2013-05-23 Yao Qi <yao@codesourcery.com>
10433 Pedro Alves <palves@redhat.com>
10435 * linux-low.c (lwp_in_step_range): New function.
10436 (linux_wait_1): If the thread was range stepping and stopped
10437 outside the stepping range, report the stop to GDB. Otherwise,
10438 continue stepping. Add range stepping debug output.
10439 (linux_set_resume_request): Copy the step range from the resume
10440 request to the lwp.
10441 (linux_supports_range_stepping): New.
10442 (linux_target_ops) <supports_range_stepping>: Set to
10443 linux_supports_range_stepping.
10444 * linux-low.h (struct linux_target_ops)
10445 <supports_range_stepping>: New field.
10446 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10447 * linux-x86-low.c (x86_supports_range_stepping): New.
10448 (the_low_target) <supports_range_stepping>: Set to
10449 x86_supports_range_stepping.
10450 * server.c (handle_v_cont): Handle 'r' action.
10451 (handle_v_requests): Append ";r" if the target supports range
10453 * target.h (struct thread_resume) <step_range_start,
10454 step_range_end>: New fields.
10455 (struct target_ops) <supports_range_stepping>:
10457 (target_supports_range_stepping): New macro.
10459 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10461 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10462 confusion in comment.
10464 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10466 * lynx-low.c (struct process_info_private): New type.
10467 (lynx_add_process): New function.
10468 (lynx_create_inferior, lynx_attach): Replace calls to
10469 add_process by calls to lynx_add_process.
10470 (lynx_resume): If PTID is null, then try using
10471 current_process()->private->last_wait_event_ptid.
10473 (lynx_clear_inferiors): Delete. The contents of that function
10474 has been inlined in lynx_mourn;
10475 (lynx_wait_1): Save the ptid in the process's private data.
10476 (lynx_mourn): Free the process' private data. Replace call
10477 to lynx_clear_inferiors by call to clear_inferiors.
10479 2013-05-17 Yao Qi <yao@codesourcery.com>
10481 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10484 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10486 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10487 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10488 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10489 PT_TEXT_END_ADDR guards. Update comments.
10490 (linux_target_op) <read_offsets>: Conditionally define to
10491 linux_read_offsets if the target is UCLIBC and if it defines
10492 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10494 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10495 Andrew Jenner <andrew@codesourcery.com>
10497 * Makefile.in (SFILES): Add linux-nios2-low.c.
10498 (clean): Add action to delete nios2-linux.c.
10499 (nios2-linux.c): New rule.
10500 * configure.srv: Add nios2*-*-linux*.
10501 * linux-nios2-low.c: New.
10503 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10505 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10507 2013-04-25 Hui Zhu <hui@codesourcery.com>
10510 * ax.c (ax_printf): Add fflush.
10512 2013-04-22 Tom Tromey <tromey@redhat.com>
10514 * Makefile.in (SFILES): Add filestuff.c.
10515 (OBS): Add filestuff.o.
10516 (filestuff.o): New target.
10517 * config.in, configure: Rebuild.
10518 * configure.ac: Check for fdwalk, pipe2.
10520 2013-04-17 Pedro Alves <palves@redhat.com>
10522 * configure.ac (USE_THREAD_DB): Delete variable.
10523 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10524 Don't AC_SUBST USE_THREAD_DB.
10525 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10526 * config.in, configure: Regenerate.
10528 2013-04-16 Pedro Alves <palves@redhat.com>
10530 * linux-low.h (struct lwp_info) <thread_known>: Move under
10531 the USE_THREAD_DB #ifdef.
10533 2013-04-16 Pedro Alves <palves@redhat.com>
10535 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10536 (linux-low.o): Delete rule.
10537 * linux-low.h: Always include "gdb_thread_db.h" instead of
10538 conditionally including thread_db.h.
10539 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10542 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10544 * Makefile.in (install-only): Fix make install regression.
10546 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10548 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10549 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10551 * gdbserver.1: Remove.
10553 2013-03-22 Pedro Alves <palves@redhat.com>
10555 * linux-low.c (handle_extended_wait): Don't call
10556 linux_enable_event_reporting.
10558 2013-03-15 Tony Theodore <tonyt@logyst.com>
10561 * Makefile.in (SHELL): Use @SHELL@.
10563 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10565 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10568 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10570 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10571 Remove extraneous NULL element.
10573 2013-03-13 Yao Qi <yao@codesourcery.com>
10575 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10576 'V' block in trace frame.
10578 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10580 * target.h (struct target_ops): Add btrace ops.
10581 (target_supports_btrace): New macro.
10582 (target_enable_btrace): New macro.
10583 (target_disable_btrace): New macro.
10584 (target_read_btrace): New macro.
10585 * gdbthread.h (struct thread_info): Add btrace field.
10586 * server.c: Include btrace-common.h.
10587 (handle_btrace_general_set): New function.
10588 (handle_btrace_enable): New function.
10589 (handle_btrace_disable): New function.
10590 (handle_general_set): Call handle_btrace_general_set.
10591 (handle_qxfer_btrace): New function.
10592 (struct qxfer qxfer_packets[]): Add btrace entry.
10593 * inferiors.c (remove_thread): Disable btrace.
10594 * linux-low: Include linux-btrace.h.
10595 (linux_low_enable_btrace): New function.
10596 (linux_low_read_btrace): New function.
10597 (linux_target_ops): Add btrace ops.
10598 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10599 Add srv_linux_btrace=yes.
10600 (x86_64-*-linux*): Add linux-btrace.o.
10601 Add srv_linux_btrace=yes.
10602 * configure.ac: Define HAVE_LINUX_BTRACE.
10603 * config.in: Regenerated.
10604 * configure: Regenerated.
10606 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10608 * server.c (handle_qxfer): Preserve error message if -3 is
10610 (qxfer): Document the -3 return value.
10612 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10614 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10615 (linux_btrace_h): New variable.
10616 (linux-btrace.o): New rule.
10618 2013-03-08 Stan Shebs <stan@codesourcery.com>
10619 Hafiz Abid Qadeer <abidh@codesourcery.com>
10621 * tracepoint.c (trace_buffer_size): New global.
10622 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10623 (init_trace_buffer): Change to one-argument function. Allocate
10624 trace buffer memory.
10625 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10626 handle QTBuffer:size packet.
10627 (cmd_bigqtbuffer_size): New function.
10628 (initialize_tracepoint): Call init_trace_buffer with
10629 DEFAULT_TRACE_BUFFER_SIZE.
10630 * server.c (handle_query): Add QTBuffer:size in the
10633 2013-03-07 Yao Qi <yao@codesourcery.com>
10635 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10636 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10638 (cmd_qtsp): Adjust condition. Do post increment.
10639 Set cur_action and cur_step_action back to 0.
10641 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10644 * linux-low.c (linux_write_memory): Return early success if LEN is
10647 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10649 * configure.srv: Add x86_64-*-cygwin* as target.
10651 2013-02-28 Tom Tromey <tromey@redhat.com>
10653 * configure.ac: Invoke AC_SYS_LARGEFILE.
10654 * configure, config.in: Rebuild.
10656 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10658 * win32-low.c: Throughout, fix format strings and casts of
10659 printf-like functions to avoid type related warnings on all
10661 (get_child_debug_event): Print dwDebugEventCode as hex since
10662 that's how it's usually documented.
10664 2013-02-28 Yao Qi <yao@codesourcery.com>
10666 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10669 2013-02-27 Jiong Wang <jiwang@tilera.com>
10671 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10672 (reg-tilegx32.c): New rule.
10673 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10674 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10675 different register info initializer according to elf class.
10676 (init_registers_tilgx32): New function. The tilegx32 register info
10678 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10679 (tile_store_gregset): Likewise.
10681 2013-02-27 Yao Qi <yao@codesourcery.com>
10683 * server.c (process_point_options): Print debug message when
10684 debug_threads is true.
10686 2013-02-26 Yao Qi <yao@codesourcery.com>
10688 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10690 2013-02-19 Pedro Alves <palves@redhat.com>
10691 Kai Tietz <ktietz@redhat.com>
10695 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10696 instead of strtoul to extract address from packet.
10697 (process_serial_event) <'z'>: Likewise.
10699 2013-02-18 Yao Qi <yao@codesourcery.com>
10701 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10703 2013-02-14 Pedro Alves <palves@redhat.com>
10707 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10708 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10710 2013-02-14 Pedro Alves <palves@redhat.com>
10712 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10714 2013-02-14 Pedro Alves <palves@redhat.com>
10716 * tracepoint.c (save_string): Delete.
10717 (add_tracepoint_action): Use savestring instead of save_string.
10719 2013-02-12 Pedro Alves <palves@redhat.com>
10721 * linux-xtensa-low.c: Ditto.
10722 * xtensa-xtregs.c: Ditto.
10724 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10726 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10729 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10731 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10732 aarch64_num_wp_regs and aarch64_num_bp_regs to
10733 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10735 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10737 * linux-aarch64-low.c (ps_get_thread_area): Replace
10738 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10740 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10741 Marcus Shawcroft <marcus.shawcroft@arm.com>
10742 Nigel Stephens <nigel.stephens@arm.com>
10743 Yufeng Zhang <yufeng.zhang@arm.com>
10745 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10746 (aarch64.c, aarch64-without-fpu.c): New targets.
10747 * configure.srv (aarch64*-*-linux*): New.
10748 * linux-aarch64-low.c: New file.
10750 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10752 * linux-low.c (handle_extended_wait, linux_create_inferior)
10753 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10754 (dequeue_one_deferred_signal, linux_resume_one_thread)
10755 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10756 (linux_tracefork_grandchild, linux_test_for_tracefork)
10757 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10758 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10759 where the argument is 0.
10761 2013-01-25 Yao Qi <yao@codesourcery.com>
10763 * event-loop.c: Include "queue.h".
10764 (gdb_event_p): New typedef.
10765 (struct gdb_event) <next_event>: Remove.
10766 (event_queue): Change to QUEUE(gdb_event_p).
10767 (async_queue_event): Remove.
10768 (gdb_event_xfree): New.
10769 (initialize_event_loop): New.
10770 (process_event): Use API from QUEUE.
10771 (wait_for_event): Likewise.
10772 * server.c (main): Call initialize_event_loop.
10773 * server.h (initialize_event_loop): Declare.
10775 2013-01-18 Yao Qi <yao@codesourcery.com>
10777 * ax.h (struct eval_agent_expr_context): New.
10778 (gdb_eval_agent_expr): Update declaration.
10779 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10780 TFRAME. Add new argument CTX.
10781 * server.h (struct eval_agent_expr_context): Declare.
10782 (agent_mem_read, agent_tsv_read): Update declaration.
10783 (agent_mem_read_string): Likewise.
10784 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10785 (add_traceframe_block): Add new argument TPOINT.
10786 Increase TPOINT->traceframe_usage.
10787 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10788 eval_tracepoint_agent_expr.
10789 (condition_true_at_tracepoint): Likewise.
10790 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10791 (agent_mem_read_string, agent_tsv_read): Likewise.
10793 2013-01-16 Yao Qi <yao@codesourcery.com>
10795 * linux-low.c (linux_resume_one_lwp): Don't check
10796 'lwp->bp_reinsert != 0'.
10798 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10799 Pedro Alves <palves@redhat.com>
10801 * lynx-low.c (ptrace_request_to_str): Define a temporary
10802 macro and use it to simplify this function's implementation.
10804 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10806 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10809 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10811 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10813 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10815 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10817 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10819 * lynx-low.c (lynx_resume): Use the resume_info parameter
10820 to determine the ptid for the lynx_ptrace call, unless
10821 it is equal to minus_one_ptid, in which case we use the
10822 ptid of the current_inferior.
10823 (lynx_wait_1): After having received a thread create/exit
10824 event, resume the inferior's execution using the signaling
10825 thread's ptid, rather than the old ptid.
10827 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10829 * lynx-low.c (lynx_resume): Delete variable ret.
10831 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10833 * gdbreplay.c (gdbreplay_version): Update copyright year.
10834 * server.c (gdbserver_version): Likewise.
10836 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10838 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10841 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10843 * lynx-low.c (ptrace_request_to_str): Add handling for
10844 PTRACE_GETTRACESIG.
10846 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10848 * lynx-low.c (lynx_attach): Delete variable new_process.
10850 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10852 * lynx-low.c (lynx_create_inferior): Delete variable
10855 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10857 * lynx-low.c (ptrace_request_to_str): Do not handle
10858 PTRACE_GETTHREADLIST if this macro does not exist.
10860 2012-12-15 Yao Qi <yao@codesourcery.com>
10862 * Makefile.in (OBS): Add notif.o.
10863 * notif.c, notif.h: New.
10864 * server.c: Include "notif.h".
10865 (struct vstop_notif) <next>: Remove.
10867 (queue_stop_reply): Update.
10868 (push_event, send_next_stop_reply): Remove.
10869 (discard_queued_stop_replies): Update.
10870 (notif_stop): New variable.
10871 (handle_v_stopped): Remove.
10872 (handle_v_requests): Don't call handle_v_stopped. Call
10873 handle_ack_notif instead.
10874 (queue_stop_reply_callback): Call notif_event_enque instead
10875 of queue_stop_reply.
10876 (handle_status): Don't call send_next_stop_reply, call
10877 notif_write_event instead.
10878 (kill_inferior_callback): Likewise.
10879 (detach_or_kill_inferior_callback): Likewise.
10880 (main): Call initialize_notif.
10881 (process_serial_event): Call QUEUE_is_empty.
10882 (handle_target_event): Call notif_push instead of push event.
10883 * server.h (push_event): Remove declaration.
10885 2012-12-10 Tom Tromey <tromey@redhat.com>
10887 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10888 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10891 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10892 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10893 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10894 (amd64-linux-ipa.o, ax.o): Rewrite.
10895 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10896 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10897 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10898 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10899 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10900 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10901 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10902 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10903 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10904 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10905 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10906 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10907 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10908 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10909 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10910 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10911 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10912 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10913 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10914 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10915 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10916 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10917 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10918 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10919 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10920 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10921 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10922 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10923 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10924 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10925 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10926 (reg-tilegx.o): Remove.
10927 (all_object_files): New macro.
10928 Include .deps files.
10929 * aclocal.m4, configure: Rebuild.
10930 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10931 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10932 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10934 2012-12-05 Tom Tromey <tromey@redhat.com>
10937 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10939 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10941 * configure.ac: Check for linux/perf_event.h.
10942 * config.in: Regenerated.
10943 * configure: Regenerated.
10945 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10947 * hostio.c (handle_readlink): Decrease buffer size
10948 parameter passed to readlink by one byte.
10950 2012-11-26 Yao Qi <yao@codesourcery.com>
10952 * configure.ac (build_warnings): Append '-Wempty-body'.
10953 * configure: Regenerated.
10954 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10957 2012-11-15 Pierre Muller <muller@sourceware.org>
10959 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10960 * config.in: Regenerate.
10961 * configure: Regenerate.
10962 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10963 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10964 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10965 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10967 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10968 instead of <sys/wait.h> header.
10969 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10971 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10973 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10974 (various make rules): Remove -DGDBSERVER
10976 2012-11-09 Yao Qi <yao@codesourcery.com>
10978 * spu-low.c (current_ptid): Move it to ..
10979 * gdbthread.h: ... here. New.
10980 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10981 * server.c (myresume, process_serial_event): Likewise.
10982 * thread-db.c (thread_db_find_new_threads): Likewise.
10983 * tracepoint.c (run_inferior_command): Likewise.
10985 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10987 * server.c (handle_search_memory_1): Include access length in
10990 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10992 * linux-crisv32-low.c: Fix compile errors.
10994 2012-09-04 Yao Qi <yao@codesourcery.com>
10996 * tracepoint.c (cmd_qtsv): Adjust debug message.
10997 Don't check CUR_TPOINT.
10999 2012-08-28 Yao Qi <yao@codesourcery.com>
11001 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11002 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11003 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11004 Remove declarations of xmalloc, xreallloc, xstrdup and
11006 * Makefile.in (libiberty_h): New.
11007 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11008 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11010 2012-08-23 Yao Qi <yao@codesourcery.com>
11012 * server.h: Remove declaration of 'xsnprintf'.
11014 2012-08-22 Keith Seitz <keiths@redhat.com>
11016 * server.h: Include build-gnulib-gbserver/config.h.
11017 * gdbreplay.c: Likewise.
11019 2012-08-08 Doug Evans <dje@google.com>
11021 * Makefile.in (SFILES): Add gdb_vecs.c.
11022 (OBS): Add gdb_vecs.o.
11023 (gdb_vecs_h, host_defs_h): New variables.
11024 (thread-db.o): Add $(gdb_vecs_h) dependency.
11025 (gdb_vecs.o): New rule.
11026 * thread-db.c: #include "gdb_vecs.h".
11027 (thread_db_load_search): Use a vector to iterate over path elements.
11028 Handle text appearing after "$pdir".
11030 * configure.ac: Add check for strstr.
11031 * config.in: Regenerate.
11032 * configure: Regenerate.
11034 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11036 * hostio.c (handle_pread): If pread fails, fall back to attempting
11038 (handle_pwrite): Likewise for pwrite.
11040 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11042 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11043 between unsupported TYPE and unimplementable ADDR/LEN combination.
11044 (arm_insert_point): Act on new return value.
11046 2012-07-31 Pedro Alves <palves@redhat.com>
11048 * server.c (process_point_options): Only skip tokens if we find
11049 one that is unrecognized. Don't treat 'X' specially while
11050 skipping unrecognized tokens.
11052 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11054 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11055 to 4-byte-align HW breakpoint addresses for Thumb.
11057 2012-07-27 Yao Qi <yao@codesourcery.com>
11061 * server.h: Declare gdb_agent_about_to_close.
11062 * target.c (kill_inferior): Include "agent.h".
11063 New. Send command 'kill'.
11064 * target.h (kill_inferior): Removed macro.
11065 * tracepoint.c (gdb_agent_about_to_close): New.
11066 (gdb_agent_helper_thread): Handle command 'close'.
11067 Wait endlessly until the inferior stops.
11068 Install gdb_agent_remove_socket to atexit hook.
11069 (agent_socket_name): New static variable.
11070 (gdb_agent_socket_init): Replace local variable 'name' with
11071 'agent_socket_name'.
11072 (gdb_agent_remove_socket): New.
11074 2012-07-27 Yao Qi <yao@codesourcery.com>
11076 * server.c (process_point_options): Stop at 'X' when parsing.
11078 2012-07-19 Michael Eager <eager@eagercon.com>
11080 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11082 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11083 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11084 hardware breakpoint.
11086 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11088 * gdbserver/linux-low.c (initialize_low): Call
11089 linux_ptrace_init_warnings.
11091 2012-07-02 Doug Evans <dje@google.com>
11093 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11096 2012-07-02 Stan Shebs <stan@codesourcery.com>
11098 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11099 (ax.o): Add it to build rule.
11101 (OBS): Add format.o.
11102 (IPA_OBS): Add format.o.
11103 * server.c (handle_query): Claim support for breakpoint commands.
11104 (process_point_options): Add command case.
11105 (process_serial_event): Leave running if there are printfs in
11107 * mem-break.h (any_persistent_commands): Declare.
11108 (add_breakpoint_commands): Declare.
11109 (gdb_no_commands_at_breakpoint): Declare.
11110 (run_breakpoint_commands): Declare.
11111 * mem-break.c (struct point_command_list): New struct.
11112 (struct breakpoint): New field command_list.
11113 (any_persistent_commands): New function.
11114 (add_commands_to_breakpoint): New function.
11115 (add_breakpoint_commands): New function.
11116 (gdb_no_commands_at_breakpoint): New function.
11117 (run_breakpoint_commands): New function.
11118 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11120 * ax.c: Include format.h.
11121 (ax_printf): New function.
11122 (gdb_eval_agent_expr): Add printf opcode.
11124 2012-06-13 Yao Qi <yao@codesourcery.com>
11126 * server.c (start_inferior): Remove duplicated writes to fields
11127 'last_resume_kind' and 'last_status' of 'current_inferior'.
11129 2012-06-12 Yao Qi <yao@codesourcery.com>
11130 Pedro Alves <palves@redhat.com>
11132 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11134 * server.c (handle_v_cont): Extend comment.
11136 2012-06-11 Yao Qi <yao@codesourcery.com>
11138 * linux-low.c (linux_attach): Add 'static'.
11140 2012-06-06 Yao Qi <yao@codesourcery.com>
11142 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11144 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11146 Fix gcc -flto compilation warning.
11147 * server.c (main): Make variable multi_mode and attach volatile.
11149 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11151 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11152 if the platform doesn't know about it.
11154 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11156 * Makefile.in (SFILES): Add linux-tile-low.c.
11157 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11158 * configure.srv: Handle tilegx-*-linux*.
11159 * linux-tile-low.c: New file.
11161 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11163 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11165 2012-05-24 Pedro Alves <palves@redhat.com>
11169 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11171 2012-05-24 Pedro Alves <palves@redhat.com>
11175 Replace target_signal with gdb_signal throughout.
11177 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11179 * linux-low.c (linux_store_registers): Avoid the copying sequence
11180 when no data has been retrieved by ptrace.
11182 2012-05-22 Will Deacon <will.deacon@arm.com>
11184 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11185 Include asm/ptrace.h.
11186 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11189 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11191 * linux-low.c (linux_store_registers): Don't re-retrieve data
11192 with ptrace that has already been obtained from /proc. Always
11193 copy any data retrieved with ptrace to the buffer supplied.
11195 2012-05-11 Yao Qi <yao@codesourcery.com>
11196 Pedro Alves <palves@redhat.com>
11198 * linux-low.c (enum stopping_threads_kind): New.
11199 (stopping_threads): Change type to `enum stopping_threads_kind'.
11200 (handle_extended_wait): If stopping and suspending threads, leave
11201 the new_lwp suspended too.
11202 (linux_wait_for_event): Adjust.
11203 (stop_all_lwps): Set `stopping_threads' to
11204 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11205 whether we're suspending threads or just stopping them. Assert no
11208 2012-04-29 Yao Qi <yao@codesourcery.com>
11210 * server.h: Move some code to ...
11211 * gdbthread.h: ... here. New.
11212 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11213 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11214 (nto-low.o, win32-low.o): Likewise.
11215 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11216 * regcache.c, remote-utils.c, server.c: Likewise.
11217 * target.c, tracepoint.c, win32-low.c: Likewise.
11219 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11221 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11222 (PTRACE_ARG4_TYPE): Likewise.
11223 (PTRACE_XFER_TYPE): Likewise.
11224 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11225 ptrace to PTRACE_ARG3_TYPE.
11226 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11227 (PTRACE_ARG4_TYPE): Likewise.
11228 (PTRACE_XFER_TYPE): Likewise.
11229 (linux_detach_one_lwp): Cast fourth argument of
11230 ptrace to long then PTRACE_ARG4_TYPE.
11231 (regsets_fetch_inferior_registers): Cast third argument of
11232 ptrace to long then PTRACE_ARG3_TYPE.
11233 (regsets_store_inferior_registers): Likewise.
11235 2012-04-20 Pedro Alves <palves@redhat.com>
11237 * configure: Regenerate.
11239 2012-04-19 Pedro Alves <palves@redhat.com>
11241 * Makefile.in (GNULIB_BUILDDIR): New.
11242 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11243 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11244 (all, install-only, uninstall, clean-info, all-lib, clean): No
11245 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11246 (maintainer-clean realclean distclean): Use subdir_do.
11248 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11249 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11250 * acinclude.m4: Include acx_configure_dir.m4.
11251 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11252 calls. Call AC_PROG_RANLIB. Configure gnulib using
11255 (GNULIB_STDINT_H): Adjust.
11256 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11257 * gdbreplay.c: Include build-gnulib/config.h.
11258 * server.h: Likewise.
11259 * aclocal.m4: Regenerate.
11260 * config.in: Regenerate.
11261 * configure: Regenerate.
11263 2012-04-19 Pedro Alves <palves@redhat.com>
11265 * Makefile.in (LIBGNU, INCGNU): Adjust.
11266 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11267 (all, install-only, uninstall, clean-info, all-lib, clean)
11268 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11269 * configure.ac: Adjust AC_OUTPUT output.
11270 * aclocal.m4: Regenerate.
11271 * configure: Regenerate.
11273 2012-04-19 Pedro Alves <palves@redhat.com>
11275 * Makefile.in (generated_files): New.
11276 (server_h): Remove the explicit dependency on config.h, and depend
11277 on $generated_files.
11279 2012-04-19 Pedro Alves <palves@redhat.com>
11281 * Makefile.in (INCGNU): Add -Ignulib.
11283 2012-04-19 Pedro Alves <palves@redhat.com>
11285 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11286 (INCGNU): ... this, and spell out -I here.
11287 (GNULIB_LIB): Rename to ...
11288 (LIBGNU): ... this.
11289 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11291 2012-04-19 Pedro Alves <palves@redhat.com>
11293 * config.in: Regenerate.
11295 2012-04-19 Pedro Alves <palves@redhat.com>
11297 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11298 * server.h (memmem): Remove declaration.
11299 * config.in: Regenerate.
11300 * configure: Regenerate.
11302 2012-04-19 Yao Qi <yao@codesourcery.com>
11304 * Makefile.in (SFILES): Add common/vec.c.
11308 2012-04-19 Yao Qi <yao@codesourcery.com>
11310 * remote-utils.c (prepare_resume_reply): Replace with macro
11311 target_core_of_thread.
11312 * server.c (handle_qxfer_threads_proper): Likewise.
11313 * target.h (traget_core_of_thread): New macro.
11315 2012-04-18 Pedro Alves <palves@redhat.com>
11317 * aclocal.m4: Regenerate.
11318 * configure: Regenerate.
11320 2012-04-16 Yao Qi <yao@codesourcery.com>
11322 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11323 duplicated on address.
11325 2012-04-16 Yao Qi <yao@codesourcery.com>
11327 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11328 (struct tracepoint_action_ops) <send>: New field.
11329 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11330 (agent_expr_send, x_tracepoint_action_send): New.
11331 (l_tracepoint_action_send): New.
11332 (cmd_qtdp): Download and install tracepoint
11333 according to `use_agent'.
11334 (run_inferior_command): Add one more parameter `len'.
11336 (tracepoint_send_agent): New.
11337 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11339 2012-04-16 Yao Qi <yao@codesourcery.com>
11341 * tracepoint.c (download_tracepoints): Moved to ...
11342 (cmd_qtstart): ... here.
11344 2012-04-14 Yao Qi <yao@codesourcery.com>
11346 * tracepoint.c: Include inttypes.h.
11347 (struct collect_memory_action): Use sized types.
11348 (struct tracepoint): Likewise.
11349 (cmd_qtdp, stop_tracing): Update print specifiers.
11350 (cmd_qtp, response_tracepoint): Likewise.
11351 (collect_data_at_tracepoint): Likewise.
11352 (collect_data_at_step): Likewise.
11354 2012-04-14 Yao Qi <yao@codesourcery.com>
11356 Import gnulib module inttypes.
11357 * aclocal.m4, config.in, configure: Regenerated.
11359 2012-04-14 Yao Qi <yao@codesourcery.com>
11361 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11362 Makefile and config.status at last.
11364 2012-04-13 Yao Qi <yao@codesourcery.com>
11366 * tracepoint.c: Include stdint.h unconditionally.
11368 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11370 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11371 on BFD_HAVE_SYS_PROCFS_TYPE.
11372 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11373 * configure: Regenerate.
11374 * config.in: Likewise.
11376 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11378 * Makefile.in (clean): Also remove x32.c x32-linux.c
11379 x32-avx.c x32-avx-linux.c.
11380 (x32.o): New target.
11382 (x32-linux.o): Likewise.
11383 (x32-linux.c): Likewise.
11384 (x32-avx.o): Likewise.
11385 (x32-avx.c): Likewise.
11386 (x32-avx-linux.o): Likewise.
11387 (x32-avx-linux.c): Likewise.
11389 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11390 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11391 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11392 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11393 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11394 i386/x32-avx-linux.xml.
11396 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11397 (init_registers_x32_avx_linux): Likwise.
11398 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11399 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11401 2012-04-13 Pedro Alves <palves@redhat.com>
11403 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11404 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11405 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11406 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11409 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11411 * linux-x86-low.c (compat_x32_clock_t): New.
11412 (compat_x32_siginfo_t): Likewise.
11413 (compat_x32_siginfo_from_siginfo): Likewise.
11414 (siginfo_from_compat_x32_siginfo): Likewise.
11415 (linux_is_elf64): Likewise.
11416 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11417 and siginfo_from_compat_x32_siginfo for x32.
11418 (x86_arch_setup): Set linux_is_elf64.
11420 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11423 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11425 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11426 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11427 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11428 compatible with process.
11430 2012-04-12 Yao Qi <yao@codesourcery.com>
11432 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11433 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11434 (install-only, install-info, clean): Handle sub dir gnulib.
11435 (all-lib, am--refresh): New targets.
11436 (memmem.o): Remove target.
11437 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11438 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11439 (AC_REPLACE_FUNCS): Remove memmem.
11440 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11441 (AC_OUTPUT): Generate Makefile in gnulib/.
11442 * aclocal.m4, config.in, configure: Regenerated.
11444 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11446 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11448 2012-04-05 Pedro Alves <palves@redhat.com>
11450 -Werror=strict-aliasing
11452 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11455 2012-04-04 Pedro Alves <palves@redhat.com>
11457 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11458 (sparc_store_gregset_from_stack, sparc_store_gregset)
11459 (sparc_breakpoint_at): Fix formatting.
11461 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11463 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11465 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11466 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11467 * config.in: Regenerate.
11468 * configure: Likewise.
11470 2012-03-29 Pedro Alves <palves@redhat.com>
11472 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11473 Correct ptrace arguments.
11475 2012-03-28 Pedro Alves <palves@redhat.com>
11477 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11478 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11479 (IA64_FR1_REGNUM): New defines.
11480 (ia64_fetch_register): New.
11481 (the_low_target): Install it.
11482 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11484 * linux-low.c (linux_fetch_registers): Try the
11485 the_low_target.fetch_register hook first.
11487 * linux-arm-low.c (the_low_target): Adjust.
11488 * linux-bfin-low.c (the_low_target): Adjust.
11489 * linux-cris-low.c (the_low_target): Adjust.
11490 * linux-crisv32-low.c (the_low_target): Adjust.
11491 * linux-m32r-low.c (the_low_target): Adjust.
11492 * linux-m68k-low.c (the_low_target): Adjust.
11493 * linux-mips-low.c (the_low_target): Adjust.
11494 * linux-ppc-low.c (the_low_target): Adjust.
11495 * linux-s390-low.c (the_low_target): Adjust.
11496 * linux-sh-low.c (the_low_target): Adjust.
11497 * linux-sparc-low.c (the_low_target): Adjust.
11498 * linux-tic6x-low.c (the_low_target): Adjust.
11499 * linux-x86-low.c (the_low_target): Adjust.
11500 * linux-xtensa-low.c (the_low_target): Adjust.
11502 2012-03-26 Pedro Alves <palves@redhat.com>
11504 * server.c (handle_qxfer_libraries): Don't bail early if
11505 the_target->qxfer_libraries_svr4 is not NULL.
11507 2012-03-26 Pedro Alves <palves@redhat.com>
11509 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11511 2012-03-23 Pedro Alves <palves@redhat.com>
11513 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11514 "library-list-svr4" element's start tag when the the DSO list is
11517 2012-03-23 Pedro Alves <palves@redhat.com>
11519 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11520 a variable whose type size is the same as the inferior's pointer
11523 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11525 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11527 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11528 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11529 * linux-low.h: Include <signal.h>.
11530 (struct siginfo): Remove forward declaration.
11531 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11534 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11536 * .gitignore: Ignore more files.
11538 2012-03-19 Pedro Alves <palves@redhat.com>
11539 Jan Kratochvil <jan.kratochvil@redhat.com>
11541 * server.c (cont_thread, general_thread): Add describing comments.
11542 (start_inferior): Clear `cont_thread'.
11543 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11546 2012-03-15 Yao Qi <yao@codesourcery.com>
11548 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11550 (cmd_qtdp): ... here.
11552 2012-03-15 Yao Qi <yao@codesourcery.com>
11554 * tracepoint.c (struct tracepoint_action_ops): New.
11555 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11556 (m_tracepoint_action_download): New.
11557 (r_tracepoint_action_download): New.
11558 (x_tracepoint_action_download): New.
11559 (l_tracepoint_action_download): New.
11560 (add_tracepoint_action): Install `action->ops' according type.
11561 (download_tracepoint_1): Move code `download' function pointer
11562 of various tracepoint_action_ops.
11564 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11566 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11567 linux_ptrace_attach_warnings.
11569 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11571 * Makefile.in (linux-ptrace.o): New.
11572 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11573 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11574 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11575 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11576 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11578 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11580 2012-03-08 Yao Qi <yao@codesourcery.com>
11581 Pedro Alves <palves@redhat.com>
11583 Fix PR server/13392.
11584 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11585 offset of JMP insn.
11586 * tracepoint.c (remove_tracepoint): New.
11587 (cmd_qtdp): Call remove_tracepoint when failed to install.
11589 2012-03-07 Pedro Alves <palves@redhat.com>
11591 * linux-low.c (get_detach_signal): New.
11592 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11593 Pass on pending signals to PTRACE_DETACH. Check the result of the
11595 * server.c (program_signals, program_signals_p): New.
11596 (handle_general_set): Handle QProgramSignals.
11597 * server.h (program_signals, program_signals_p): Declare.
11599 2012-03-05 Pedro Alves <palves@redhat.com>
11600 Jan Kratochvil <jan.kratochvil@redhat.com>
11602 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11605 2012-03-03 Yao Qi <yao@codesourcery.com>
11607 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11608 agent_look_up_symbols.
11610 2012-03-03 Yao Qi <yao@codesourcery.com>
11612 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11613 (linux-x86-low.o): Likewise.
11614 * server.h: Remove in_process_agent_loaded.
11615 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11619 2012-03-03 Yao Qi <yao@codesourcery.com>
11621 * tracepoint.c (gdb_agent_capability): New global.
11622 (in_process_agent_loaded_ust): Renamed to
11623 `in_process_agent_supports_ust'.
11625 (in_process_agent_supports_ust): Call agent_capability_check.
11626 (clear_installed_tracepoints): Assert that agent supports
11629 2012-03-03 Yao Qi <yao@codesourcery.com>
11631 * linux-low.c (linux_supports_agent): New.
11632 (linux_target_ops): Initialize field `supports_agent' with
11633 linux_supports_agent.
11634 * target.h (struct target_ops) <supports_agent>: New.
11635 (target_supports_agent): New macro.
11636 * server.c (handle_general_set): Handle packet 'QAgent'.
11637 (handle_query): Send `QAgent+'.
11638 * Makefile.in (server.o): Depends on agent.h.
11640 2012-03-03 Yao Qi <yao@codesourcery.com>
11642 * Makefile.in (OBS): Add agent.o.
11643 Add new rule for agent.o.
11644 Track dependence of tracepoint.c on agent.h.
11645 * tracepoint.c (run_inferior_command_1):
11646 (run_inferior_command): Call agent_run_command.
11647 (gdb_ust_connect_sync_socket): Deleted. Move it to
11649 (resume_thread, stop_thread): Likewise.
11650 (gdb_ust_socket_init): Renamed to ...
11651 (gdb_agent_socket_init): ... New.
11652 (gdb_ust_thread): Renamed to ...
11653 (gdb_agent_helper_thread): ... New.
11654 (gdb_ust_init): Move some code to ...
11655 (gdb_agent_init): ... here. New.
11656 [HAVE_UST]: Call gdb_ust_init.
11657 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11658 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11659 * config.in, configure: Regenerated.
11661 2012-03-02 Pedro Alves <palves@redhat.com>
11663 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11664 * linux-low.c (struct simple_pid_list): New.
11665 (stopped_pids): New a struct simple_pid_list pointer.
11666 (add_to_pid_list, pull_pid_from_list): New.
11667 (handle_extended_wait): Don't assume the first signal new children
11668 report is SIGSTOP. Adjust call to pull_pid_from_list.
11669 (linux_wait_for_lwp): Adjust.
11671 2012-03-02 Yao Qi <yao@codesourcery.com>
11673 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11676 2012-03-02 Yao Qi <yao@codesourcery.com>
11678 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11679 `stop_pc' and `tpoint'. Update caller.
11681 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11683 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11684 * linux-low.c (use_linux_regsets): New macro.
11685 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11686 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11687 (linux_register_in_regsets): New function.
11688 (usr_fetch_inferior_registers): Skip registers covered by
11690 (usr_store_inferior_registers): Likewise.
11691 (usr_fetch_inferior_registers): New macro.
11692 (usr_store_inferior_registers): Likewise.
11693 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11694 (linux_store_registers): Likewise.
11695 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11697 (init_registers_mips64_dsp_linux): Likewise.
11698 (init_registers_mips_linux): New macro.
11699 (init_registers_mips_dsp_linux): Likewise.
11700 (mips_dsp_num_regs): Likewise.
11701 (DSP_BASE, DSP_CONTROL): New fallback macros.
11702 (mips_base_regs): New macro.
11703 (mips_regmap): Use it. Fix the size.
11704 (mips_dsp_regmap): New variable.
11705 (mips_dsp_regset_bitmap): Likewise.
11706 (mips_arch_setup): New function.
11707 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11709 (mips_cannot_store_register): Likewise.
11710 (the_low_target): Update .arch_setup, .num_regs and .regmap
11711 initializers. Add .regset_bitmap initializer.
11712 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11714 * linux-bfin-low.c (the_low_target): Likewise.
11715 * linux-cris-low.c (the_low_target): Likewise.
11716 * linux-crisv32-low.c (the_low_target): Likewise.
11717 * linux-ia64-low.c (the_low_target): Likewise.
11718 * linux-m32r-low.c (the_low_target): Likewise.
11719 * linux-m68k-low.c (the_low_target): Likewise.
11720 * linux-ppc-low.c (the_low_target): Likewise.
11721 * linux-s390-low.c (the_low_target): Likewise.
11722 * linux-sh-low.c (the_low_target): Likewise.
11723 * linux-sparc-low.c (the_low_target): Likewise.
11724 * linux-tic6x-low.c (the_low_target): Likewise.
11725 * linux-x86-low.c (the_low_target): Likewise.
11726 * linux-xtensa-low.c (the_low_target): Likewise.
11727 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11728 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11729 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11731 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11732 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11734 2012-02-29 Yao Qi <yao@codesourcery.com>
11735 Pedro Alves <palves@redhat.com>
11737 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11738 `step_over_finished' is true.
11740 2012-02-27 Pedro Alves <palves@redhat.com>
11742 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11743 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11745 2012-02-27 Pedro Alves <palves@redhat.com>
11748 * linux-low.c (pid_is_stopped): New.
11749 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11751 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11753 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11756 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11758 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11760 2012-02-24 Luis Machado <lgustavo@codesourcery>
11762 * server.c (handle_query): Advertise support for target-side
11763 breakpoint condition evaluation.
11764 (process_point_options): New function.
11765 (process_serial_event): When inserting a breakpoint, check for
11766 a target-side condition that should be evaluated.
11768 * mem-break.c: Include regcache.h and ax.h.
11769 (point_cond_list_t): New data structure.
11770 (breakpoint) <cond_list>: New field.
11771 (find_gdb_breakpoint_at): Make non-static.
11772 (delete_gdb_breakpoint_at): Clear any target-side
11774 (clear_gdb_breakpoint_conditions): New function.
11775 (add_condition_to_breakpoint): Likewise.
11776 (add_breakpoint_condition): Likewise.
11777 (gdb_condition_true_at_breakpoint): Likewise.
11778 (gdb_breakpoint_here): Return result directly instead
11779 of going through a local variable.
11781 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11782 (clear_gdb_breakpoint_conditions): Likewise.
11783 (add_breakpoint_condition): Likewise.
11784 (gdb_condition_true_at_breakpoint): Likewise.
11786 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11787 (need_step_over_p): Take target-side breakpoint condition into
11790 2012-02-24 Luis Machado <lgustavo@codesourcery>
11792 * server.h: Include tracepoint.h.
11793 (agent_mem_read, agent_get_trace_state_variable_value,
11794 agent_set_trace_state_variable_value,
11795 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11796 get_set_tsv_func_addr): New prototypes.
11798 * ax.h: New include file.
11799 * ax.c: New source file.
11801 * tracepoint.c: Include ax.h.
11802 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11803 agent_expr, eval_result_type): Move to ax.h.
11804 (parse_agent_expr): Rename to ...
11805 (gdb_parse_agent_expr): ... this, make it non-static and move
11807 (unparse_agent_expr) Rename to ...
11808 (gdb_unparse_agent_expr): ... this, make it non-static and move
11810 (eval_agent_expr): Rename to ...
11811 (eval_tracepoint_agent_expr): ... this.
11812 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11813 forward declarations.
11814 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11815 (agent_get_trace_state_variable_value): New function.
11816 (agent_set_trace_state_variable_value): New function.
11817 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11818 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11819 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11820 (condition_true_at_tracepoint): Likewise.
11821 (parse_agent_expr): Rename to ...
11822 (gdb_parse_agent_expr): ... this and move to ax.c.
11823 (unparse_agent_expr): Rename to ...
11824 (gdb_unparse_agent_expr): ... this and move to ax.c.
11825 (gdb_agent_op_name): Move to ax.c.
11826 (eval_agent_expr): Rename to ...
11827 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11829 (eval_tracepoint_agent_expr): New function.
11830 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11832 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11834 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11835 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11836 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11837 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11838 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11839 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11840 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11841 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11842 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11843 (compile_bytecodes): Remove forward declaration.
11844 (is_goto_target): Move to ax.c.
11845 (compile_bytecodes): Move to ax.c and call
11846 agent_get_trace_state_variable_value (...) and
11847 agent_set_trace_state_variable_value (...).
11849 * Makefile.in: Update ax.c and IPA dependencies.
11851 2012-02-24 Pedro Alves <palves@redhat.com>
11853 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11854 (cmd_bigqtbuffer_circular): ... this. Only handle
11855 'QTBuffer:circular:'.
11856 (handle_tracepoint_general_set): Adjust.
11858 2012-02-16 Yao Qi <yao@codesourcery.com>
11860 * inferiors.c: Move code to ...
11861 * dll.c: .... here. New.
11862 * server.h: Declare clear_dlls.
11863 * Makefile.in (SFILES): Add dll.c.
11867 2012-02-11 Yao Qi <yao@codesourcery.com>
11869 * server.c: (handle_monitor_command): Add a new parameter
11871 (handle_query): Update caller.
11873 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11875 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11876 * configure, config.in: Regenerate.
11877 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11880 2012-02-02 Pedro Alves <palves@redhat.com>
11882 Try SIGKILL first, then PTRACE_KILL.
11883 * linux-low.c (linux_kill_one_lwp): New.
11884 (linux_kill_one_lwp): Rename to ...
11885 (kill_one_lwp_callback): ... this. Use the new
11886 linux_kill_one_lwp.
11888 2012-02-02 Pedro Alves <palves@redhat.com>
11890 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11893 2012-01-27 Pedro Alves <palves@redhat.com>
11895 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11896 (elf_64_file_p): Make static.
11897 (linux_pid_exe_is_elf_64_file): New.
11898 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11899 Delete declarations.
11900 (linux_pid_exe_is_elf_64_file): Declare.
11901 * linux-x86-low.c (x86_arch_setup): Use
11902 linux_pid_exe_is_elf_64_file.
11904 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11906 * linux-low.c (linux_wait_for_event_1): Rename to ...
11907 (linux_wait_for_event): ... here and merge it with former
11908 linux_wait_for_event - new variable wait_ptid, use it.
11909 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11911 2012-01-23 Pedro Alves <palves@redhat.com>
11913 * server.c (main): Avoid yet another case of infinite loop while
11914 detaching/killing after a longjmp.
11916 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11919 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11921 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11923 * hostio.c (handle_readlink): New function.
11924 (handle_vFile): Call it to handle "vFile:readlink" packets.
11926 2012-01-20 Pedro Alves <palves@redhat.com>
11927 Ulrich Weigand <ulrich.weigand@linaro.org>
11929 * server.c (handle_v_requests): Only support vAttach and vRun to
11930 start multiple processes when in extended protocol mode.
11932 2012-01-17 Pedro Alves <palves@redhat.com>
11934 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11935 memalign plus mprotect to allocate the scratch buffer.
11937 2012-01-13 Pedro Alves <palves@redhat.com>
11939 * server.c (attach_inferior): Clear `cont_thread'.
11941 2012-01-13 Pedro Alves <palves@redhat.com>
11943 * server.c (main): Avoid infinite loop while detaching/killing
11946 2012-01-09 Doug Evans <dje@google.com>
11948 * server.c (start_inferior): Set last_ptid in --wrapper case.
11950 2012-01-06 Yao Qi <yao@codesourcery.com>
11952 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11954 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11956 2012-01-04 Yao Qi <yao@codesourcery.com>
11958 * tracepoint.c (cmd_qtdp): Print debug message
11959 for static tracepoint.
11961 2012-01-04 Yao Qi <yao@codesourcery.com>
11963 * tracepoint.c (trace_vdebug): Differentiate debug message
11964 between gdbserver and IPA.
11966 2012-01-03 Yao Qi <yao@codesourcery.com>
11968 * tracepoint.c (tracepoint_was_hit): Don't collect for
11971 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11973 * terminal.h: Reformat copyright header.
11975 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11977 * server.c (gdbserver_version): Update copyright year.
11978 * gdbreplay.c (gdbreplay_version): Likewise.
11980 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11982 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11985 2011-12-18 Hui Zhu <teawater@gmail.com>
11986 * linux-low.c (linux_create_inferior): Save return value to ret.
11988 2011-12-18 Hui Zhu <teawater@gmail.com>
11990 * linux-low.c (linux_create_inferior): Save return value to ret.
11992 2011-12-16 Doug Evans <dje@google.com>
11994 * linux-low.c (linux_create_inferior): If stdio connection,
11995 redirect stdin from /dev/null, stdout to stderr.
11996 * remote-utils.c (remote_is_stdio): New static global.
11997 (remote_connection_is_stdio): New function.
11998 (remote_prepare): Handle stdio connection.
11999 (remote_open): Ditto.
12000 (remote_close): Don't close stdin for stdio connections.
12001 (read_prim,write_prim): New functions. Replace all calls to
12002 read/write to these.
12003 * server.c (main): Watch for "-" argument. Move call to
12004 remote_prepare before start_inferior.
12005 * server.h (STDIO_CONNECTION_NAME): New macro.
12006 (remote_connection_is_stdio): Declare.
12008 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12009 in debugging output.
12011 2011-12-15 Yao Qi <yao@codesourcery.com>
12013 * tracepoint.c: Include sys/syscall.h.
12014 (gdb_ust_thread): Remove preprocessor conditional.
12016 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12018 * linux-low.c (linux_detach_one_lwp): Call
12019 the_low_target.prepare_to_resume before detaching.
12021 2011-12-14 Yao Qi <yao@codesourcery.com>
12023 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12026 2011-12-14 Yao Qi <yao@codesourcery.com>
12028 * i386-low.c (i386_low_stopped_data_address): Initialize local
12029 variable `control'.
12031 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12035 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12036 DR_CONTROL unless necessary. Extend comments.
12037 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12038 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12040 2011-12-13 Yao Qi <yao@codesourcery.com>
12042 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12044 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12046 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12048 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12049 Print new debug message for such case.
12051 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12053 Fix overlapping memcpy.
12054 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12055 the read_inferior_memory transfer.
12056 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12057 write_inferior_memory transfer.
12058 (set_fast_tracepoint_jump): New variable buf. Use it for the
12059 read_inferior_memory and write_inferior_memory transfers.
12060 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12061 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12062 Use it for the write_inferior_memory transfer.
12063 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12066 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12068 * linux-low.c (fetch_register, store_register): Make code
12069 consistent, fix formatting.
12071 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12073 * linux-low.c (usr_store_inferior_registers): Factor out code
12074 to handle individual registers into...
12075 (store_register): ... this new function.
12077 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12079 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12080 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12081 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12082 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12083 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12084 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12085 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12086 (srv_xmlfiles): Add new XML files.
12088 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12090 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12091 (init_registers_s390_linux32v1): Add prototype.
12092 (init_registers_s390_linux32v2): Likewise.
12093 (init_registers_s390_linux64v1): Likewise.
12094 (init_registers_s390_linux64v2): Likewise.
12095 (init_registers_s390x_linux64v1): Likewise.
12096 (init_registers_s390x_linux64v2): Likewise.
12097 (s390_num_regs): Increment to 52.
12098 (s390_regmap): Add orig_r2 register.
12099 (s390_num_regs_3264): Increment to 68.
12100 (s390_regmap_3264): Add orig_r2 register.
12101 (s390_collect_ptrace_register): Handle orig_r2 register.
12102 (s390_supply_ptrace_register): Likewise.
12103 (s390_fill_last_break): New function.
12104 (s390_store_last_break): Likewise.
12105 (s390_fill_system_call): New function.
12106 (s390_store_system_call): Likewise.
12107 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12109 (s390_check_regset): New function.
12110 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12111 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12112 Update target_regsets for available register sets.
12114 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12115 Jan Kratochvil <jan.kratochvil@redhat.com>
12117 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12118 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12120 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12121 * linux-low.h (struct process_info_private): New member r_debug.
12122 * server.c (handle_qxfer_libraries): Call
12123 the_target->qxfer_libraries_svr4.
12124 (handle_qxfer_libraries_svr4): New function.
12125 (qxfer_packets): New entry "libraries-svr4".
12126 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12127 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12128 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12129 PACKET_qXfer_libraries_svr4.
12131 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12133 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12134 PSW address/mask between 8-byte and 16-byte formats.
12135 (s390_supply_ptrace_register): Likewise.
12136 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12137 basic addressing mode bit.
12139 2011-11-24 Stan Shebs <stan@codesourcery.com>
12141 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12143 2011-11-17 Stan Shebs <stan@codesourcery.com>
12145 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12146 (tracing_start_time): New global.
12147 (tracing_stop_time): New global.
12148 (tracing_user_name): New global.
12149 (tracing_notes): New global.
12150 (tracing_stop_note): New global.
12151 (cmd_qtstart): Set traceframe_usage, start_time.
12152 (stop_tracing): Set stop_time.
12153 (cmd_qtstatus): Report additional status.
12154 (cmd_qtp): New function.
12155 (handle_tracepoint_query): Call it.
12156 (cmd_qtnotes): New function.
12157 (handle_tracepoint_general_set): Call it.
12158 (get_timestamp): Rename from tsv_get_timestamp.
12160 2011-11-14 Stan Shebs <stan@codesourcery.com>
12161 Kwok Cheung Yeung <kcy@codesourcery.com>
12163 * linux-x86-low.c (small_jump_insn): New.
12164 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12165 trampoline and error message, build a trampoline and issue a small
12166 jump instruction to it.
12167 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12168 trampoline and error message.
12169 (x86_get_min_fast_tracepoint_insn_len): New.
12170 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12171 * linux-low.h (struct linux_target_ops): Add arguments to
12172 install_fast_tracepoint_jump_pad operation, add new operation.
12173 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12175 (linux_get_min_fast_tracepoint_insn_len): New function.
12176 (linux_target_op): Add new operation.
12177 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12178 (gdb_trampoline_buffer_end): Ditto.
12179 (gdb_trampoline_buffer_error): Ditto.
12180 (struct ipa_sym_addresses): Add fields for new IPA variables.
12181 (symbol_list): Add entries for new IPA variables.
12182 (struct tracepoint): Add fields to hold the address range of the
12183 trampoline used by the tracepoint.
12184 (trampoline_buffer_head): New static variable.
12185 (trampoline_buffer_tail): Ditto.
12186 (claim_trampoline_space): New function.
12187 (have_fast_tracepoint_trampoline_buffer): New function.
12188 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12190 (install_fast_tracepoint): Ditto, also add error buffer argument.
12191 (cmd_qtminftpilen): New function.
12192 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12193 (fast_tracepoint_from_trampoline_address): New function.
12194 (fast_tracepoint_collecting): Handle trampoline as part of jump
12196 (set_trampoline_buffer_space): New function.
12197 (initialize_tracepoint): Initialize new IPA variables.
12198 * target.h (struct target_ops): Add arguments to
12199 install_fast_tracepoint_jump_pad operation, add new
12200 get_min_fast_tracepoint_insn_len operation.
12201 (target_get_min_fast_tracepoint_insn_len): New.
12202 (install_fast_tracepoint_jump_pad): Add arguments.
12203 * server.h (IPA_BUFSIZ): Define.
12204 * linux-i386-ipa.c: Include extra header files.
12205 (initialize_fast_tracepoint_trampoline_buffer): New function.
12206 (initialize_low_tracepoint): Call it.
12207 * server.h (set_trampoline_buffer_space): Declare.
12208 (claim_trampoline_space): Ditto.
12209 (have_fast_tracepoint_trampoline_buffer): Ditto.
12211 2011-11-14 Yao Qi <yao@codesourcery.com>
12213 * server.c (handle_query): Handle InstallInTrace for qSupported.
12214 * tracepoint.c (add_tracepoint): Sort list.
12215 (install_tracepoint, download_tracepoint): New.
12216 (cmd_qtdp): Call them to install and download tracepoints.
12217 (sort_tracepoints): Removed.
12218 (cmd_qtstart): Update.
12220 2011-11-14 Yao Qi <yao@codesourcery.com>
12222 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12223 * mem-break.h: Declare.
12224 * tracepoint.c (cmd_qtstart): Move some code to ...
12225 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12227 (download_tracepoints): Move some code to ...
12228 (download_tracepoint_1): ... here. New.
12230 2011-11-08 Yao Qi <yao@codesourcery.com>
12232 * remote-utils.c (relocate_instruction): A comment fix.
12234 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12236 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12237 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12238 dr_status_mirror and dr_control_mirror from debug_reg_state.
12239 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12240 (i386_initial_stuff): Remove use of deleted globals.
12241 (i386_get_thread_context, i386_set_thread_context,
12242 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12243 from debug_reg_state.
12245 2011-11-05 Yao Qi <yao@codesourcery.com>
12247 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12248 address as TPOINT's.
12250 2011-11-02 Stan Shebs <stan@codesourcery.com>
12252 * tracepoint.c (agent_mem_read_string): New function.
12253 (eval_agent_expr): Call it for tracenz.
12254 * server.c (handle_query): Report support for tracenz.
12256 2011-11-02 Yao Qi <yao@codesourcery.com>
12258 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12260 2011-11-02 Yao Qi <yao@codesourcery.com>
12262 * target.h: Fix a typo in comment.
12264 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12266 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12267 clobber the breakpoints' shadows with fast tracepoint jumps.
12268 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12269 * target.c (write_inferior_memory): Also pass MYADDR down to
12272 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12274 * configure.ac: Check support for personality routine.
12275 * configure: Regenerate.
12276 * config.in: Likewise.
12277 * linux-low.c: Include <sys/personality.h>.
12278 Define ADDR_NO_RANDOMIZE if necessary.
12279 (linux_create_inferior): Disable address space randomization when
12280 forking inferior, if requested.
12281 (linux_supports_disable_randomization): New function.
12282 (linux_target_ops): Install it.
12283 * server.h (disable_randomization): Declare.
12284 * server.c (disable_randomization): New global variable.
12285 (handle_general_set): Handle QDisableRandomization.
12286 (handle_query): Likewise for qSupported.
12287 (main): Support --disable-randomization and --no-disable-randomization
12288 command line arguments.
12289 * target.h (struct target_ops): Add supports_disable_randomization.
12290 (target_supports_disable_randomization): New macro.
12292 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12294 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12296 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12297 [!PT_GETDSBT] (target_loadmap): New definition.
12298 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12299 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12300 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12301 and PT_GETDSBT to LINUX_LOADMAP.
12302 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12303 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12305 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12307 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12308 (arm_linux_hwbp_cap): New static variable.
12309 (arm_linux_get_hwbp_cap): Replace by ...
12310 (arm_linux_init_hwbp_cap): ... this new function.
12311 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12312 (arm_linux_get_hw_watchpoint_count): Likewise.
12313 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12314 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12315 (arm_prepare_to_resume): Use perror_with_name instead of error.
12317 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12319 * linux-arm-low.c: Include <signal.h>.
12320 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12321 (struct arm_linux_hwbp_cap): New data type.
12322 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12323 (struct arm_linux_hw_breakpoint): New data type.
12324 (MAX_BPTS, MAX_WPTS): Define.
12325 (struct arch_process_info, struct arch_lwp_info): New data types.
12326 (arm_linux_get_hwbp_cap): New function.
12327 (arm_linux_get_hw_breakpoint_count): Likewise.
12328 (arm_linux_get_hw_watchpoint_count): Likewise.
12329 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12330 (arm_hwbp_control_initialize): Likewise.
12331 (arm_hwbp_control_is_enabled): Likewise.
12332 (arm_hwbp_control_is_initialized): Likewise.
12333 (arm_hwbp_control_disable): Likewise.
12334 (arm_linux_hw_breakpoint_equal): Likewise.
12335 (arm_linux_hw_point_initialize): Likewise.
12336 (struct update_registers_data): New data structure.
12337 (update_registers_callback: New function.
12338 (arm_insert_point): Likewise.
12339 (arm_remove_point): Likewise.
12340 (arm_stopped_by_watchpoint): Likewise.
12341 (arm_stopped_data_address): Likewise.
12342 (arm_new_process): Likewise.
12343 (arm_new_thread): Likewise.
12344 (arm_prepare_to_resume): Likewise.
12345 (the_low_target): Register arm_insert_point, arm_remove_point,
12346 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12347 arm_new_thread, and arm_prepare_to_resume.
12349 2011-09-15 Stan Shebs <stan@codesourcery.com>
12351 * server.h (struct emit_ops): Add compare-goto fields.
12352 * tracepoint.c (gdb_agent_op_sizes): New table.
12353 (emit_eq_goto): New function.
12354 (emit_ne_goto): New function.
12355 (emit_lt_goto): New function.
12356 (emit_le_goto): New function.
12357 (emit_gt_goto): New function.
12358 (emit_ge_goto): New function.
12359 (is_goto_target): New function.
12360 (compile_bytecodes): Recognize special cases of compare-goto
12361 combinations and call specialized emitters for them.
12362 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12363 (amd64_emit_ne_goto): New function.
12364 (amd64_emit_lt_goto): New function.
12365 (amd64_emit_le_goto): New function.
12366 (amd64_emit_gt_goto): New function.
12367 (amd64_emit_ge_goto): New function.
12368 (amd64_emit_ops): Add the new functions.
12369 (i386_emit_eq_goto): New function.
12370 (i386_emit_ne_goto): New function.
12371 (i386_emit_lt_goto): New function.
12372 (i386_emit_le_goto): New function.
12373 (i386_emit_gt_goto): New function.
12374 (i386_emit_ge_goto): New function.
12375 (i386_emit_ops): Add the new functions.
12377 2011-09-08 Stan Shebs <stan@codesourcery.com>
12379 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12380 (i386_emit_epilogue): Restore %ebx.
12382 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12384 * server.c (step_thread): Remove definition.
12385 (process_serial_event): Don't handle Hs.
12386 * server.h (step_thread): Remove declaration.
12387 * target.c (set_desired_inferior): Remove use of step_thread.
12389 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12391 * linux-low.c: Include linux-procfs.h.
12392 (linux_attach_lwp_1): Update comments.
12393 (linux_attach): Scan for existing threads when attaching to a
12394 process that is the tgid.
12395 * Makefile.in: Update dependencies.
12397 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12399 * configure.srv: Add linux-procfs.o dependencies.
12401 2011-08-14 Yao Qi <yao@codesourcery.com>
12403 * target.h (struct target_ops): Fix indent.
12404 * win32-low.c (win32_target_ops): Fix comment.
12406 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12407 Yao Qi <yao@codesourcery.com>
12409 * Makefile.in (clean): Remove tic6x-*.c files.
12410 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12411 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12412 (tic6x-c64xp-linux.c): Likewise.
12413 * configure.srv: Add support for tic6x-*-uclinux.
12414 * linux-tic6x-low.c: New.
12415 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12417 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12418 Yao Qi <yao@codesourcery.com>
12420 * target.h (struct target_ops): Add read_loadmap.
12421 * linux-low.c (struct target_loadseg): New type.
12422 (struct target_loadmap): New type.
12423 (linux_read_loadmap): New function.
12424 (linux_target_ops): Add linux_read_loadmap.
12425 * server.c (handle_query): Support qXfer:fdpic:read packet.
12426 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12429 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12431 * win32-low.c: Include <stdint.h>.
12433 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12435 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12436 to the inferior here.
12437 (i386_remove_aligned_watchpoint): Ditto.
12438 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12439 fit part of the watchpoint in the debug registers.
12440 (i386_update_inferior_debug_regs): New.
12441 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12442 registers, and only update the inferior on success.
12443 (i386_low_remove_watchpoint): Ditto.
12445 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12447 * linux-low.c (compare_ints, unique, list_threads, show_process,
12448 linux_core_of_thread): Delete.
12449 (linux_target_ops): Change linux_core_of_thread to
12450 linux_common_core_of_thread.
12451 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12452 * utils.c (malloc_failure): Change type of argument.
12453 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12454 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12455 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12456 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12457 (IPA_OBJS): Add common-utils-ipa.o.
12458 (ptid_h, linux_osdata_h): New macros.
12459 (server_h): Add common/common-utils.h, common/xml-utils.h,
12460 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12462 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12463 ptid.o, buffer.o): New rules.
12464 (linux-low.o): Add common/linux-osdata.h as a dependency.
12465 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12466 * configure.ac: Add AC_HEADER_DIRENT check.
12467 * config.in: Regenerate.
12468 * configure: Regenerate.
12469 * remote-utils.c (xml_escape_text): Delete.
12470 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12471 buffer_xml_printf): Move to common/buffer.c.
12472 * server.c (main): Remove call to initialize_inferiors.
12473 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12474 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12475 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12476 internal_error, gdb_assert, gdb_assert_fail): Delete.
12477 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12478 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12480 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12481 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12482 initialize_inferiors): Delete.
12484 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12486 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12489 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12491 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12493 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12495 2011-05-26 Yao Qi <yao@codesourcery.com>
12497 * Makefile.in (thread-db.o): Track dependence to
12498 common/gdb_thread_db.h.
12499 * thread-db.c: include gdb_thread_db.h from right place.
12501 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12503 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12504 __FILE__ and __LINE__ to internal_error.
12506 2011-05-13 Doug Evans <dje@google.com>
12508 * thread-db.c (try_thread_db_load_from_sdir): New function.
12509 (try_thread_db_load_from_dir): New function.
12510 (thread_db_load_search): Handle $sdir, ignore $pdir.
12511 Remove trying of system directories if search of
12512 libthread-db-search-path fails, that is now done via $sdir.
12514 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12516 * server.c (handle_query): Add EnableDisableTracepoints to the list
12517 of supported features.
12518 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12520 (cmd_qtenable_disable): New.
12521 (cmd_qtstart): Install tracepoints even if disabled.
12522 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12523 receiving a QTEnable or QTDisable packet.
12524 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12525 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12527 (gdb_probe): Skip data collection if static tracepoint is disabled.
12529 2011-05-10 Doug Evans <dje@google.com>
12531 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12533 2011-05-04 Doug Evans <dje@google.com>
12535 * linux-low.c (linux_join): Skip process lookup.
12536 * spu-low.c (spu_join): Ditto.
12537 * server.c (join_inferiors_callback): Delete.
12538 (process_serial_event): For 'D' packet (detach) call join_inferior
12541 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12543 * README: Don't mention xscale*-*-linux*.
12544 * configure.srv (xscale*-*-linux*): Don't handle target.
12546 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12548 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12550 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12551 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12552 (i386_emit_void_call_2): Likewise.
12554 2011-04-26 Yao Qi <yao@codesourcery.com>
12556 * linux-low.c: Move common macros to linux-ptrace.h.
12557 Include linux-ptrace.h.
12558 * Makefile.in (linux_ptrace_h): New.
12559 (linux-low.o): Depends on linux-ptrace.h.
12561 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12563 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12564 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12565 (remote_prepare): New function with most of the TCP code from ...
12566 (remote_open): ... here. Detect PORT here unconditionally. Move also
12567 setting transport_is_reliable.
12568 * server.c (run_once): New variable.
12569 (gdbserver_usage): Document it.
12570 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12571 the first run if RUN_ONCE.
12572 * server.h (run_once, remote_prepare): New declarations.
12574 2011-04-19 Tom Tromey <tromey@redhat.com>
12576 * win32-low.c (handle_load_dll): Remove duplicate "the".
12578 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12580 Remove support for old Cygwin 1.5 versions.
12581 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12582 function to avoid warning.
12583 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12586 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12588 * gdbserver/server.h (Macro _): Define it if not available.
12590 2011-03-14 Michael Snyder <msnyder@vmware.com>
12592 * hostio.c (handle_close): Remove unnecessary null test.
12594 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12596 * Makefile.in (maintainer-clean realclean distclean): Remove
12597 "make ... subdir_do" command.
12599 2011-03-10 Michael Snyder <msnyder@vmware.com>
12601 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12603 * server.c (handle_v_run): Free alloced buffer on early return.
12605 2011-03-09 Yao Qi <yao@codesourcery.com>
12608 2011-03-04 Yao Qi <yao@codesourcery.com>
12610 * Makefile.in: Remove GNU make feature --directory.
12612 2011-03-05 Yao Qi <yao@codesourcery.com>
12614 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12615 (subdir_do): New make target. Copied from gdb/Makefile.
12616 (maintainer-clean, realclean, distclean, clean): Call corresponding
12617 make targets in common/Makefile.
12619 2011-02-11 Yao Qi <yao@codesourcery.com>
12621 * configure.ac: Call AC_PROG_RANLIB.
12622 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12623 * configure: Regenerate.
12625 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12627 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12629 2011-03-06 Yao Qi <yao@codesourcery.com>
12631 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12633 2011-03-05 Yao Qi <yao@codesourcery.com>
12635 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12636 (subdir_do): New make target. Copied from gdb/Makefile.
12637 (maintainer-clean, realclean, distclean, clean): Call corresponding
12638 make targets in common/Makefile.
12640 2011-03-04 Yao Qi <yao@codesourcery.com>
12642 * Makefile.in: Remove GNU make feature --directory.
12644 2011-03-04 Michael Snyder <msnyder@vmware.com>
12646 * server.c (queue_stop_reply): Call xmalloc not malloc.
12648 2011-03-02 Michael Snyder <msnyder@vmware.com>
12650 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12652 2011-02-28 Michael Snyder <msnyder@vmware.com>
12654 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12655 (cmd_qtframe): Ditto.
12656 (cmd_qtbuffer): Ditto.
12657 (cmd_bigqtbuffer): Ditto.
12659 * utils.c (decimal2str): Initialize 'width' to nine, then
12660 don't mess with it.
12662 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12664 * hostio.c (require_data): Free *data, not data.
12666 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12668 * hostio.c (require_data): Use free, not xfree.
12670 2011-02-27 Michael Snyder <msnyder@vmware.com>
12672 * server.c (handle_query): Discard unused value.
12674 * hostio.c (require_data): Free malloc memory before returning
12677 2011-02-26 Michael Snyder <msnyder@vmware.com>
12679 * linux-low.c (list_threads): Call closedir for dirent.
12681 2011-02-27 Michael Snyder <msnyder@vmware.com>
12683 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12684 a case statement falls through.
12686 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12688 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12691 2011-02-26 Michael Snyder <msnyder@vmware.com>
12693 * utils.c (decimal2str): Eliminate dead code and dead param.
12694 (pulongest): Drop dead param from call to decimal2str.
12697 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12699 Revert the following patch (not approved yet):
12700 2011-02-21 Hui Zhu <teawater@gmail.com>
12701 * tracepoint.c (tp_printf): New function.
12702 (eval_agent_expr): Handle gdb_agent_op_printf.
12704 2011-02-21 Hui Zhu <teawater@gmail.com>
12706 * tracepoint.c (tp_printf): New function.
12707 (eval_agent_expr): Handle gdb_agent_op_printf.
12709 2011-02-18 Tom Tromey <tromey@redhat.com>
12711 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12712 (tracepoint.o): Likewise.
12713 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12714 (gdb_agent_op_names): Likewise.
12716 2011-02-18 Tom Tromey <tromey@redhat.com>
12718 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12719 gdb_agent_op_rot>: New constants.
12720 (gdb_agent_op_names): Add pick and roll.
12721 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12724 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12726 * aclocal.m4: Regenerated with aclocal-1.11.1.
12728 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12730 * server.c (handle_qxfer_traceframe_info): New.
12731 (qxfer_packets): Register "traceframe-info".
12732 (handle_query): Report support for qXfer:traceframe-info:read+.
12733 * tracepoint.c (match_blocktype): New.
12734 (traceframe_find_block_type): Rename to ...
12735 (traceframe_walk_blocks): ... this. Add callback filter argument,
12737 (traceframe_find_block_type): New, reimplemented on top of
12738 traceframe_walk_blocks.
12739 (build_traceframe_info_xml): New.
12740 (traceframe_read_info): New.
12741 * server.h (traceframe_read_info): Declare.
12743 2011-02-11 Yao Qi <yao@codesourcery.com>
12745 * configure.ac: Call AC_PROG_RANLIB.
12746 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12747 * configure: Regenerate.
12749 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12751 * server.c (gdb_read_memory): Change return semantics to allow
12753 (handle_search_memory_1): Adjust.
12754 (process_serial_event) <'m' packet>: Handle partial transfers.
12755 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12757 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12759 * regcache.c (init_register_cache): Initialize
12760 regcache->register_status.
12761 (free_register_cache): Release regcache->register_status.
12762 (regcache_cpy): Copy register_status.
12763 (registers_to_string): Print 'x's for unavailable registers.
12764 (supply_register): Mark the register's status valid or
12765 unavailable, depending on whether a buffer was passed in or not.
12766 (supply_register_zeroed): New.
12767 (supply_regblock): Mark the registers' status valid or
12768 unavailable, depending on whether a buffer was passed in or not.
12769 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12770 (struct regcache): New `register_status' field.
12771 (supply_register_zeroed): Declare.
12772 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12773 supply_register_zeroed, rather than passing a NULL buffer to
12775 * tracepoint.c (fetch_traceframe_registers): Update comment.
12777 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12779 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12782 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12784 * server.h (decode_xfer_write): Change prototype.
12785 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12786 and don't extract the annex here.
12787 * server.c (decode_xfer_read): Remove `annex' parameter,
12788 and don't extract the annex here.
12789 (decode_xfer): New.
12790 (struct qxfer): New.
12791 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12792 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12793 (handle_qxfer_statictrace): New functions, abstracted out from
12794 handle_query, and made to use the struct qxfer interface.
12795 (handle_threads_qxfer_proper): Rename to ...
12796 (handle_qxfer_threads_proper): ... this.
12797 (handle_threads_qxfer): Rename to ...
12798 (handle_qxfer_threads): ... this. Adjust.
12799 (qxfer_packets): New array.
12800 (handle_qxfer): New function.
12801 (handle_query): Use handle_qxfer.
12803 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12805 * gdbreplay.c: Shorten lines of >= 80 columns.
12806 * linux-low.c: Ditto.
12807 * linux-ppc-low.c: Ditto.
12808 * linux-s390-low.c: Ditto.
12809 * linux-sparc-low.c: Ditto.
12810 * linux-x86-low.c: Ditto.
12811 * linux-xtensa-low.c: Ditto.
12812 * mem-break.c: Ditto.
12813 * nto-low.c: Ditto.
12814 * regcache.h: Ditto.
12815 * remote-utils.c: Ditto.
12818 * thread-db.c: Ditto.
12819 * tracepoint.c: Ditto.
12821 * win32-low.h: Ditto.
12823 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12825 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12828 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12830 * server.c (gdbserver_version): Update copyright year in version
12832 * gdbreplay.c (gdbreplay_version): Ditto.
12834 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12836 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12837 * linux-bfin-low.c: New file.
12838 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12839 PT_DATA_ADDR for BFIN targets.
12840 * Makefile.in (SFILES): Add linux-bfin-low.c.
12841 (clean): Remove reg-bfin.c.
12842 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12843 * README: Mention supported Blackfin targets.
12845 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12847 * .gitignore: New file.
12849 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12851 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12853 2010-10-22 Jie Zhang <jie@codesourcery.com>
12855 * Makefile.in: Add FLAGS_TO_PASS variable.
12856 (install): Remove dependency of install-only and recursively
12857 invoke make for install-only.
12859 2010-10-04 Doug Evans <dje@google.com>
12861 * Makefile.in (uninstall): Use $(DESTDIR).
12863 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12867 * linux-x86-low.c (compat_siginfo_from_siginfo)
12868 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12869 si_code is < 0. Check for si_code == SI_TIMER before checking for
12872 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12874 * lynx-i386-low.c: New file.
12875 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12877 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12879 * lynx-low.c (ptrace_request_to_str): Remove handling for
12880 request values that have been removed in LynxOS 5.x.
12882 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12884 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12887 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12889 * configure.ac: Add --enable-inprocess-agent option.
12890 * configure: Rebuilt.
12892 2010-09-06 Yao Qi <yao@codesourcery.com>
12894 * linux-low.c (linux_kill): Remove unused variable.
12895 (linux_stabilize_threads): Likewise.
12896 * server.c (start_inferior): Likewise.
12897 (queue_stop_reply_callback): Likewise.
12898 * tracepoint.c (do_action_at_tracepoint): Likewise.
12900 2010-09-06 Yao Qi <yao@codesourcery.com>
12902 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12905 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12907 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12909 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12911 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12914 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12916 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12917 gdbserver/lynx-ppc-low.c: New files.
12918 * Makefile.in (lynx_low_h): New variable.
12919 (lynx-low.o, lynx-ppc-low.o): New rules.
12920 * configure.ac: On LynxOS, link with -lnetinet.
12921 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12922 * configure: regenerate.
12924 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12926 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12927 * configure.ac: Add check for vasprintf and vsnprintf.
12928 * configure, config.in: Regenerate.
12929 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12931 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12933 * gdbreplay.c: Move include of alloca.h up, next to include of
12935 * server.h: Add include of malloc.h.
12936 * mem-break.c: Remove include of malloc.h.
12937 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12939 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12941 * Makefile.in (memmem.o): Build with -Wno-error.
12943 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12945 * utils.c (xsnprintf): Make non-static.
12946 * server.h: Add xsnprintf declaration.
12947 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12948 replace calls to snprintf by calls to xsnprintf throughout.
12950 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12952 * configure.ac: Add configure check for alloca.
12953 * configure, config.in: Regenerate.
12954 * server.h: Include alloca.h if it exists.
12955 * gdbreplay.c: Include alloca.h if it exists.
12957 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12959 * linux-low.c (__SIGRTMIN): Define if not already defined.
12960 (linux_create_inferior): Check for __ANDROID__ rather than
12962 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12963 are already deferred.
12964 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12965 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12966 stopped and already has a pending signal to report.
12967 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12968 a pending signal to report or is moving out of a jump pad.
12969 (linux_init_signals): Check for __ANDROID__ rather than
12972 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12974 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12975 debug_threads check. Avoid a linear search when not doing debug
12978 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12980 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12981 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12982 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12983 (process_event): Change local fd's type to gdb_fildes_t.
12984 (create_file_handler): Adjust prototype.
12985 (delete_file_handler): Adjust prototype.
12986 (handle_file_event): Adjust prototype. Use pfildes.
12987 (create_file_event): Adjsut prototype.
12988 * remote-utils.c (remote_desc, listen_desc): Change type to
12990 * server.h: New gdb_fildes_t typedef.
12991 [USE_WIN32API]: Include winsock2.h.
12992 (delete_file_handler, add_file_handler): Adjust prototypes.
12993 (pfildes): Declare.
12994 * utils.c (pfildes): New.
12996 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12998 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12999 * configure: Regenerate.
13001 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13003 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13004 (linux_done_accessing_memory): ... this.
13005 (linux_target_ops): Adjust.
13006 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13007 * nto-low.c (nto_target_ops): Adjust comment.
13008 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13009 * spu-low.c (spu_target_ops): Adjust comment.
13010 * target.h (target_ops): Rename unprepare_to_access_memory field
13011 to done_accessing_memory.
13012 (unprepare_to_access_memory): Rename to ...
13013 (done_accessing_memory): ... this.
13015 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13017 * linux-low.c (linux_prepare_to_access_memory): New.
13018 (linux_unprepare_to_access_memory): New.
13019 (linux_target_ops): Install them.
13020 * server.c (read_memory): Rename to ...
13021 (gdb_read_memory): ... this. Use
13022 prepare_to_access_memory/prepare_to_access_memory.
13023 (write_memory): Rename to ...
13024 (gdb_write_memory): ... this. Use
13025 prepare_to_access_memory/prepare_to_access_memory.
13026 (handle_search_memory_1): Adjust.
13027 (process_serial_event): Adjust.
13028 * target.h (struct target_ops): New fields
13029 prepare_to_access_memory and unprepare_to_access_memory.
13030 (prepare_to_access_memory, unprepare_to_access_memory): New.
13031 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13032 prepare_to_access_memory/prepare_to_access_memory.
13033 * nto-low.c (nto_target_ops): Adjust.
13034 * spu-low.c (spu_target_ops): Adjust.
13035 * win32-low.c (win32_target_ops): Adjust.
13037 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13039 * Makefile.in (WARN_CFLAGS): Get it from configure.
13040 (WERROR_CFLAGS): New.
13041 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13042 * configure.ac: Introduce --enable-werror, which adds -Werror to
13043 the compiler command line. Enabled by default. Disable with
13044 --disable-werror. Add -Wdeclaration-after-statement
13045 Wpointer-arith and -Wformat-nonliteral to warning flags.
13046 * configure: Regenerate.
13048 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13050 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13052 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13054 * gdbreplay.c (remote_error): New.
13056 (expect): Use gdbchar. Check for error reading from GDB.
13057 Clarify sync error output.
13058 (play): Check for errors writing to GDB.
13059 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13060 * remote-utils.c (getpkt): Check for errors writing to the remote
13063 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13065 * linux-low.c (linux_wait_1): Move non-debugging code out of
13066 `debug_threads' control.
13068 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13070 * linux-low.c (linux_wait_1): Don't set last_status here.
13071 * server.c (push_event, queue_stop_reply_callback): Assert we're
13072 not pushing a TARGET_WAITKIND_IGNORE event.
13073 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13074 (myresume, handle_target_event): Set the thread's last_resume_kind
13075 and last_status from the target returned status.
13077 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13081 * linux-x86-low.c (update_debug_registers_callback): New.
13082 (i386_dr_low_set_addr): Use it.
13083 (i386_dr_low_get_addr): New.
13084 (i386_dr_low_set_control): Use update_debug_registers_callback.
13085 (i386_dr_low_get_control): New.
13086 (i386_dr_low_get_status): Adjust.
13087 * linux-low.c (linux_stop_lwp): New.
13088 * linux-low.h (linux_stop_lwp): Declare.
13090 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13091 argument instead of a i386_debug_reg_state.
13092 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13093 a i386_debug_reg_state.
13094 (i386_insert_aligned_watchpoint): Adjust.
13095 (i386_remove_aligned_watchpoint): Adjust.
13096 (i386_low_stopped_data_address): Read the debug registers from the
13097 inferior instead of from the mirrors.
13098 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13099 (i386_dr_low_get_addr): Declare.
13100 (i386_dr_low_get_control): Declare.
13101 (i386_dr_low_get_status): Change prototype.
13103 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13104 (i386_dr_low_get_addr): New.
13105 (i386_dr_low_get_control): New.
13106 (i386_dr_low_get_status): Adjust prototype. Return
13108 (i386_initial_stuff): Clear dr_status_mirror and
13110 (i386_get_thread_context): Adjust.
13111 (i386_set_thread_context): Adjust.
13112 (i386_thread_added): Adjust.
13114 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13116 * linux-low.h (linux_thread_area): Delete declaration.
13118 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13120 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13121 after its termination.
13123 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13125 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13126 (gdb_wants_all_stopped): Delete.
13127 (linux_wait_1): Don't call them.
13128 * server.c (handle_v_cont): Tag all threads as want-stopped.
13129 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13130 stopped as "client-wants-stopped".
13132 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13134 * Makefile.in (signals_h): New.
13135 (server_h): Depend on it.
13136 (server.o): Don't depend on $(signals_def).
13137 (signals.o): Depend on $(signals_def).
13139 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13141 * Makefile.in (signals_def): New.
13142 (server_h): Append include/gdb/signals.h and signals_def.
13143 (server.o): Append signals_def.
13145 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13147 * server.c (handle_target_event): Use target_signal_to_host for
13148 resume_info.sig initialization.
13149 * target.h (struct thread_resume) <sig>: New comment.
13151 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13153 * server.c (handle_query): strcpy() the returned string from paddress()
13154 instead of sprintf().
13155 * utils.c (paddress): Return phex_nz().
13157 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13159 * server.c (handle_v_cont): Call mourn_inferior if process
13161 (myresume): Likewise.
13163 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13165 Static tracepoints, and integration with UST.
13167 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13168 * mem-break.c (uninsert_all_breakpoints)
13169 (reinsert_all_breakpoints): New.
13170 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13171 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13172 (gdb_agent_ust_loaded, helper_thread_id)
13173 (gdb_agent_helper_thread_id): New macros.
13174 (struct ipa_sym_addresses): Add addr_ust_loaded,
13175 addr_helper_thread_id, addr_cmd_buf.
13176 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13177 (in_process_agent_loaded_ust): New.
13178 (write_e_ust_not_loaded): New.
13179 (maybe_write_ipa_ust_not_loaded): New.
13180 (struct collect_static_trace_data_action): New.
13181 (enum tracepoint_type) <static_tracepoint>: New.
13182 (struct tracepoint) <handle>: Mention static tracepoints.
13183 (struct static_tracepoint_ctx): New.
13184 (CMD_BUF_SIZE): New.
13185 (add_tracepoint_action): Handle static tracepoint actions.
13186 (unprobe_marker_at): New.
13187 (clear_installed_tracepoints): Handle static tracepoints.
13188 (cmd_qtdp): Handle static tracepoints.
13189 (probe_marker_at): New.
13190 (cmd_qtstart): Handle static tracepoints.
13191 (response_tracepoint): Handle static tracepoints.
13192 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13193 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13194 (get_context_regcache): Handle static tracepoints.
13195 (do_action_at_tracepoint): Handle static tracepoint actions.
13196 (traceframe_find_block_type): Handle static trace data blocks.
13197 (traceframe_read_sdata): New.
13198 (download_tracepoints): Download static tracepoint actions.
13199 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13200 (GDB_PROBE_NAME): New.
13202 (GET_UST_SYM): New.
13205 (ust_marker_to_static_tracepoint): New.
13207 (collect_ust_data_at_tracepoint): New.
13208 (gdb_ust_probe): New.
13209 (UNIX_PATH_MAX, SOCK_DIR): New.
13210 (gdb_ust_connect_sync_socket): New.
13211 (resume_thread, stop_thread): New.
13212 (run_inferior_command): New.
13213 (init_named_socket): New.
13214 (gdb_ust_socket_init): New.
13215 (cstr_to_hexstr): New.
13217 (first_marker, next_marker): New.
13218 (response_ust_marker): New.
13219 (cmd_qtfstm, cmd_qtsstm): New.
13220 (unprobe_marker_at, probe_marker_at): New.
13221 (cmd_qtstmat, gdb_ust_thread): New.
13222 (gdb_ust_init): New.
13223 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13224 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13225 (ST_REGENTRY): New.
13226 (x86_64_st_collect_regmap): New.
13227 (X86_64_NUM_ST_COLLECT_GREGS): New.
13228 (AMD64_RIP_REGNUM): New.
13229 (supply_static_tracepoint_registers): New.
13230 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13231 (ST_REGENTRY): New.
13232 (i386_st_collect_regmap): New.
13233 (i386_NUM_ST_COLLECT_GREGS): New.
13234 (supply_static_tracepoint_registers): New.
13235 * server.c (handle_query): Handle qXfer:statictrace:read.
13236 <qSupported>: Report support for StaticTracepoints, and
13237 qXfer:statictrace:read features.
13238 * server.h (traceframe_read_sdata)
13239 (supply_static_tracepoint_registers): Declare.
13240 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13241 (unpack_varlen_hex): Include in IPA build.
13242 * Makefile.in (ustlibs, ustinc): New.
13243 (IPA_OBJS): Add remote-utils-ipa.o.
13244 ($(IPA_LIB)): Link -ldl and -lpthread.
13246 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13247 * config.in, configure: Regenerate.
13249 2010-06-20 Ian Lance Taylor <iant@google.com>
13250 Pedro Alves <pedro@codesourcery.com>
13252 * linux-x86-low.c (always_true): Delete.
13253 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13254 trying to fool the compiler with always_true.
13256 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13258 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13259 conditions in gdbserver.
13261 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13263 * spu-low.c (spu_read_memory): Wrap around local store limit.
13264 (spu_write_memory): Likewise.
13266 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13268 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13269 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13271 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13273 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13274 uses with LONGEST uses.
13276 2010-06-14 Stan Shebs <stan@codesourcery.com>
13277 Pedro Alves <pedro@codesourcery.com>
13281 * linux-x86-low.c: Include limits.h.
13283 (always_true): New.
13286 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13287 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13288 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13289 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13290 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13291 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13292 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13293 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13294 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13295 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13296 (amd64_emit_void_call_2): New.
13297 (amd64_emit_ops): New.
13298 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13299 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13300 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13301 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13302 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13303 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13304 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13305 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13306 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13307 (i386_emit_stack_adjust, i386_emit_int_call_1)
13308 (i386_emit_void_call_2): New.
13309 (i386_emit_ops): New.
13310 (x86_emit_ops): New.
13311 (the_low_target): Install x86_emit_ops.
13312 * server.h (struct emit_ops): New.
13313 (get_raw_reg_func_addr): Declare.
13314 (current_insn_ptr, emit_error): Declare.
13315 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13316 (set_trace_state_variable_value): New defines.
13317 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13318 addr_get_trace_state_variable_value and
13319 addr_set_trace_state_variable_value.
13320 (symbol_list): New fields for get_raw_reg,
13321 get_trace_state_variable_value and set_trace_state_variable_value.
13322 (condfn): New typedef.
13323 (struct tracepoint): New field `compiled_cond'.
13324 (do_action_at_tracepoint): Clear compiled_cond.
13325 (get_trace_state_variable_value, set_trace_state_variable_value):
13327 (condition_true_at_tracepoint): If there's a compiled condition,
13329 (current_insn_ptr, emit_error): New globals.
13330 (struct bytecode_address): New.
13331 (get_raw_reg_func_addr): New.
13332 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13333 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13334 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13335 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13336 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13337 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13338 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13339 (compile_tracepoint_condition, compile_bytecodes): New.
13340 * target.h (emit_ops): Forward declare.
13341 (struct target_ops): New field emit_ops.
13342 (target_emit_ops): New.
13343 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13344 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13345 * linux-low.c (linux_emit_ops): New.
13346 (linux_target_ops): Install it.
13347 * linux-low.h (struct linux_target_ops): New field emit_ops.
13349 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13351 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13352 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13354 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13355 Stan Shebs <stan@codesourcery.com>
13357 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13358 (all): Depend on $(extra_libraries).
13359 (install-only): Install the IPA.
13360 (IPA_OBJS, IPA_LIB): New.
13361 (clean): Remove the IPA lib.
13362 (IPAGENT_CFLAGS): New.
13363 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13364 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13365 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13366 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13367 * configure.ac: Check for atomic builtins support in the compiler.
13368 (IPA_DEPFILES, extra_libraries): Define.
13369 * configure.srv (ipa_obj): Add description.
13370 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13371 (i[34567]86-*-linux*): Set ipa_obj.
13372 (x86_64-*-linux*): Set ipa_obj.
13373 * linux-low.c (stabilizing_threads): New.
13374 (supports_fast_tracepoints): New.
13375 (linux_detach): Stabilize threads before detaching.
13376 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13377 the lwp is either not stabilizing, or is moving out of a jump pad.
13378 (linux_fast_tracepoint_collecting): New.
13379 (maybe_move_out_of_jump_pad): New.
13380 (enqueue_one_deferred_signal): New.
13381 (dequeue_one_deferred_signal): New.
13382 (linux_wait_for_event_1): If moving out of a jump pad, defer
13383 pending signals to later.
13384 (linux_stabilize_threads): New.
13385 (linux_wait_1): Check if threads need moving out of jump pads, and
13387 (stuck_in_jump_pad_callback): New.
13388 (move_out_of_jump_pad_callback): New.
13389 (lwp_running): New.
13390 (linux_resume_one_lwp): Handle moving out of jump pads.
13391 (linux_set_resume_request): Dequeue deferred signals.
13392 (need_step_over_p): Also step over fast tracepoint jumps.
13393 (start_step_over): Also uninsert fast tracepoint jumps.
13394 (finish_step_over): Also reinsert fast tracepoint jumps.
13395 (linux_install_fast_tracepoint_jump): New.
13396 (linux_target_ops): Install linux_stabilize_threads and
13397 linux_install_fast_tracepoint_jump_pad.
13398 * linux-low.h (linux_target_ops) <get_thread_area,
13399 install_fast_tracepoint_jump_pad>: New fields.
13400 (struct lwp_info) <collecting_fast_tracepoint,
13401 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13402 (linux_get_thread_area): Declare.
13403 * linux-x86-low.c (jump_insn): New.
13404 (x86_get_thread_area): New.
13405 (append_insns): New.
13406 (push_opcode): New.
13407 (amd64_install_fast_tracepoint_jump_pad): New.
13408 (i386_install_fast_tracepoint_jump_pad): New.
13409 (x86_install_fast_tracepoint_jump_pad): New.
13410 (the_low_target): Install x86_get_thread_area and
13411 x86_install_fast_tracepoint_jump_pad.
13412 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13413 (struct fast_tracepoint_jump): New.
13414 (fast_tracepoint_jump_insn): New.
13415 (fast_tracepoint_jump_shadow): New.
13416 (find_fast_tracepoint_jump_at): New.
13417 (fast_tracepoint_jump_here): New.
13418 (delete_fast_tracepoint_jump): New.
13419 (set_fast_tracepoint_jump): New.
13420 (uninsert_fast_tracepoint_jumps_at): New.
13421 (reinsert_fast_tracepoint_jumps_at): New.
13422 (set_breakpoint_at): Use write_inferior_memory.
13423 (uninsert_raw_breakpoint): Use write_inferior_memory.
13424 (check_mem_read): Mask out fast tracepoint jumps.
13425 (check_mem_write): Mask out fast tracepoint jumps.
13426 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13427 (set_fast_tracepoint_jump): Declare.
13428 (delete_fast_tracepoint_jump)
13429 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13430 (reinsert_fast_tracepoint_jumps_at): Declare.
13431 * regcache.c: Don't compile many functions when building the
13432 in-process agent library.
13433 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13434 the register buffer in the heap.
13435 (free_register_cache): If the register buffer isn't owned by the
13436 regcache, don't free it.
13437 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13438 pre-existing register caches.
13439 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13441 (convert_ascii_to_int): : Constify `from' parameter type.
13442 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13443 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13444 the needed buffer in-place.
13445 (relocate_instruction): New.
13446 * server.c (handle_query) <qSymbols>: If the target supports
13447 tracepoints, give it a chance of looking up symbols. Report
13448 support for fast tracepoints.
13449 (handle_status): Stabilize threads.
13450 (process_serial_event): Adjust.
13451 * server.h (struct fast_tracepoint_jump): Forward declare.
13452 (struct process_info) <fast_tracepoint_jumps>: New field.
13453 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13454 (decode_X_packet, decode_M_packet): Adjust.
13455 (relocate_instruction): Declare.
13456 (in_process_agent_loaded): Declare.
13457 (tracepoint_look_up_symbols): Declare.
13458 (struct fast_tpoint_collect_status): Declare.
13459 (fast_tracepoint_collecting): Declare.
13460 (force_unlock_trace_buffer): Declare.
13461 (handle_tracepoint_bkpts): Declare.
13462 (initialize_low_tracepoint)
13463 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13464 * target.h (struct target_ops) <stabilize_threads,
13465 install_fast_tracepoint_jump_pad>: New fields.
13466 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13467 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13468 [HAVE_STDINT_H]: Include stdint.h.
13469 (trace_debug_1): Rename to ...
13470 (trace_vdebug): ... this.
13471 (trace_debug): Rename to ...
13472 (trace_debug_1): ... this. Add `level' parameter.
13473 (trace_debug): New.
13474 (ATTR_USED, ATTR_NOINLINE): New.
13475 (IP_AGENT_EXPORT): New.
13476 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13477 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13478 (about_to_request_buffer_space, trace_buffer_is_full)
13479 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13480 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13481 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13482 (traceframe_write_count, traceframes_created)
13483 (trace_state_variables)
13484 New renaming defines.
13485 (struct ipa_sym_addresses): New.
13486 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13487 (symbol_list): New.
13488 (ipa_sym_addrs): New.
13489 (all_tracepoint_symbols_looked_up): New.
13490 (in_process_agent_loaded): New.
13491 (write_e_ipa_not_loaded): New.
13492 (maybe_write_ipa_not_loaded): New.
13493 (tracepoint_look_up_symbols): New.
13494 (debug_threads) [IN_PROCESS_AGENT]: New.
13495 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13496 (UNKNOWN_SIDE_EFFECTS): New.
13497 (stop_tracing): New.
13498 (flush_trace_buffer): New.
13499 (stop_tracing_bkpt): New.
13500 (flush_trace_buffer_bkpt): New.
13501 (read_inferior_integer): New.
13502 (read_inferior_uinteger): New.
13503 (read_inferior_data_pointer): New.
13504 (write_inferior_data_pointer): New.
13505 (write_inferior_integer): New.
13506 (write_inferior_uinteger): New.
13507 (struct collect_static_trace_data_action): Delete.
13508 (enum tracepoint_type): New.
13509 (struct tracepoint) <type>: New field `type'.
13510 <actions_str, step_actions, step_actions_str>: Only include in
13512 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13513 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13514 (tracepoints): Use IP_AGENT_EXPORT.
13515 (last_tracepoint): Don't include in the IPA.
13516 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13517 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13518 (alloced_trace_state_variables): New.
13519 (trace_state_variables): Use IP_AGENT_EXPORT.
13520 (traceframe_t): Delete unused variable.
13521 (circular_trace_buffer): Don't include in the IPA.
13522 (trace_buffer_start): Delete.
13523 (struct trace_buffer_control): New.
13524 (trace_buffer_free): Delete.
13525 (struct ipa_trace_buffer_control): New.
13526 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13527 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13529 (trace_buffer_ctrl): New.
13530 (TRACE_BUFFER_CTRL_CURR): New.
13531 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13532 Reimplement as macros.
13533 (trace_buffer_wrap): Delete.
13534 (traceframe_write_count, traceframe_read_count)
13535 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13536 (struct tracepoint_hit_ctx) <type>: New field.
13537 (struct fast_tracepoint_ctx): New.
13538 (memory_barrier): New.
13540 (record_tracepoint_error): Update atomically in the IPA.
13541 (clear_inferior_trace_buffer): New.
13542 (about_to_request_buffer_space): New.
13543 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13544 updating the same buffer.
13545 (add_tracepoint): Default the tracepoint's type to trap
13546 tracepoint, and orig_size to -1.
13547 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13548 internal variables.
13549 (create_trace_state_variable): New parameter `gdb'. Handle it.
13550 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13551 (cmd_qtdp): Handle fast tracepoints.
13552 (cmd_qtdv): Adjust.
13553 (max_jump_pad_size): New.
13554 (gdb_jump_pad_head): New.
13555 (get_jump_space_head): New.
13556 (claim_jump_space): New.
13557 (sort_tracepoints): New.
13558 (MAX_JUMP_SIZE): New.
13559 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13561 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13562 support. Upload fast traceframes, and delete internal IPA
13564 (stop_tracing_handler): New.
13565 (flush_trace_buffer_handler): New.
13566 (cmd_qtstop): Upload fast tracepoints.
13567 (response_tracepoint): Handle fast tracepoints.
13568 (tracepoint_finished_step): Upload fast traceframes. Set the
13569 tracepoint hit context's tracepoint type.
13570 (handle_tracepoint_bkpts): New.
13571 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13572 type. Add comment about fast tracepoints.
13573 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13574 non-existing action_str field.
13575 (get_context_regcache): Handle fast tracepoints.
13576 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13578 (fast_tracepoint_from_jump_pad_address): New.
13579 (fast_tracepoint_from_ipa_tpoint_address): New.
13580 (collecting_t): New.
13581 (force_unlock_trace_buffer): New.
13582 (fast_tracepoint_collecting): New.
13584 (gdb_collect): New.
13585 (write_inferior_data_ptr): New.
13586 (target_tp_heap): New.
13587 (target_malloc): New.
13588 (download_agent_expr): New.
13590 (download_tracepoints): New.
13591 (download_trace_state_variables): New.
13592 (upload_fast_traceframes): New.
13593 (IPA_FIRST_TRACEFRAME): New.
13594 (IPA_NEXT_TRACEFRAME_1): New.
13595 (IPA_NEXT_TRACEFRAME): New.
13596 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13597 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13598 (gdb_jump_pad_buffer_end): New.
13599 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13600 (initialize_tracepoint): Adjust.
13601 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13602 buffer. Initialize the low module.
13603 * utils.c (PREFIX, TOOLNAME): New.
13604 (malloc_failure): Use PREFIX.
13605 (error): In the IPA, an error causes an exit.
13606 (fatal, warning): Use PREFIX.
13607 (internal_error): Use TOOLNAME.
13608 (NUMCELLS): Increase to 10.
13609 * configure, config.in: Regenerate.
13611 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13613 * server.c (handle_query) <qSupported>: Do two passes over the
13614 qSupported string to avoid nesting strtok.
13616 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13618 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13620 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13621 -Wl,--dynamic-list.
13622 * configure: Regenerate.
13623 * proc-service.list: New.
13625 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13627 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13630 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13632 * gdbreplay.c (remote_open): Check error return from socket() call by
13633 its equality to -1 not by it being negative.
13634 * remote-utils.c (remote_open): Likewise.
13636 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13638 * config.h: Regenerate.
13640 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13642 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13643 doesn't provide PTRACE_GET_THREAD_AREA.
13645 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13647 * linux-m68k-low.c: Include <asm/ptrace.h>
13648 (ps_get_thread_area): Implement.
13650 2010-05-03 Doug Evans <dje@google.com>
13652 * event-loop.c (struct callback_event): New struct.
13653 (callback_list): New global.
13654 (append_callback_event, delete_callback_event): New functions.
13655 (process_callback): New function.
13656 (start_event_loop): Call it.
13657 * remote-utils.c (NOT_SCHEDULED): Define.
13658 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13659 moved out of readchar.
13660 (readchar): Rewrite. Call reschedule before returning.
13661 (reset_readchar): New function.
13662 (remote_close): Call it.
13663 (process_remaining, reschedule): New functions.
13664 * server.h (callback_handler_func): New typedef.
13665 (append_callback_event, delete_callback_event): Declare.
13667 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13669 * proc-service.c (ps_pglobal_lookup): Use
13670 thread_db_look_up_one_symbol.
13671 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13672 parameter. Use it instead of all_symbols_looked_up.
13673 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13675 (all_symbols_looked_up): Don't declare.
13676 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13677 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13679 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13680 Set all_symbols_looked_up here.
13681 (thread_db_look_up_one_symbol): New.
13682 (thread_db_get_tls_address): Adjust.
13683 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13684 thread_db object on the heap, and tentatively set it in the
13686 (thread_db_init): Don't set all_symbols_looked_up here.
13687 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13689 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13691 * linux-low.c (linux_kill, linux_detach): Adjust.
13692 (status_pending_p_callback): Remove redundant statement. Check
13693 for !TARGET_WAITIKIND_IGNORE, instead of
13694 TARGET_WAITKIND_STOPPED.
13695 (handle_tracepoints): Make sure LWP is locked. Adjust.
13696 (linux_wait_for_event_1): Adjust.
13697 (linux_cancel_breakpoints): New.
13698 (unsuspend_one_lwp): New.
13699 (unsuspend_all_lwps): New.
13700 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13701 (send_sigstop_callback): Change return type to int, add new
13702 `except' parameter and handle it.
13703 (suspend_and_send_sigstop_callback): New.
13704 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13705 pass them down. If SUSPEND, also increment the lwp's suspend
13707 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13708 (need_step_over_p): Don't consider suspended LWPs.
13709 (start_step_over): Adjust.
13710 (proceed_one_lwp): Change return type to int, add new `except'
13711 parameter and handle it.
13712 (unsuspend_and_proceed_one_lwp): New.
13713 (proceed_all_lwps): Use find_inferior instead of
13715 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13716 also decrement the suspend count of LWPs. Pass `except' down,
13717 instead of hacking its suspend count.
13718 (linux_pause_all): Add `freeze' parameter. Adjust.
13719 (linux_unpause_all): New.
13720 (linux_target_ops): Install linux_unpause_all.
13721 * server.c (handle_status): Adjust.
13722 * target.h (struct target_ops): New fields `unpause_all' and
13723 `cancel_breakpoints'. Add new parameter to `pause_all'.
13724 (pause_all): Add new `freeze' parameter.
13725 (unpause_all): New.
13726 (cancel_breakpoints): New.
13727 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13728 cancel breakpoints.
13729 (cmd_qtstart): Pause threads.
13730 (stop_tracing): Pause threads, and cancel breakpoints.
13731 * win32-low.c (win32_target_ops): Adjust.
13733 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13735 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13736 the inferior right away from here...
13737 (linux_wait_1): ... to here, and adjust to check the thread's
13738 last_resume_kind instead of the lwp's step or stop_expected flags.
13740 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13742 * README: Use consistent `GDB' and `GDBserver' spellings.
13744 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13746 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13747 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13748 (linux_detach_one_lwp): Assume the lwp is stopped.
13749 (any_thread_of): Delete.
13750 (linux_detach): Stop all lwps here. Don't blindly delete all
13752 (delete_lwp_callback): New.
13753 (linux_mourn): Delete all lwps of the process that is gone.
13754 (linux_wait_1): Don't delete the last lwp of the process here.
13755 * mem-break.h (mark_breakpoints_out): Declare.
13756 * mem-break.c (mark_breakpoints_out): New.
13757 (free_all_breakpoints): Use it.
13758 * server.c (handle_target_event): If the process is gone, mark
13760 * thread-db.c (struct thread_db) <create_bp>: New field.
13761 (thread_db_enable_reporting): Fix prototype. Store a thread event
13762 breakpoint reference in the thread_db struct.
13763 (thread_db_load_search): Clear the thread_db object.
13764 (try_thread_db_load_1): Ditto.
13765 (switch_to_process): New.
13766 (disable_thread_event_reporting): Use it.
13767 (remove_thread_event_breakpoints): New.
13768 (thread_db_detach, thread_db_mourn): Use it.
13770 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13772 * linux-low.c (linux_enable_event_reporting): New.
13773 (linux_wait_for_event_1, handle_extended_wait): Use it.
13775 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13777 * linux-low.c (linux_kill_one_lwp, linux_kill)
13778 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13779 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13780 SIGSTOP even if the LWP is stopped.
13781 (send_sigstop_callback): New.
13782 (stop_all_lwps): Use send_sigstop_callback instead.
13783 (linux_resume_one_thread): Adjust.
13784 (proceed_one_lwp): Still proceed an LWP that the client has
13785 requested to stop, if we haven't reported it as stopped yet. Make
13786 sure that LWPs the client want stopped, have a pending SIGSTOP.
13788 2010-04-26 Doug Evans <dje@google.com>
13790 * server.c (handle_general_set): Make static.
13792 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13793 Print received char after testing for error/eof instead of before.
13794 (input_interrupt): Tweak comment.
13796 2010-04-23 Doug Evans <dje@google.com>
13798 * server.c (start_inferior): Print inferior argv if --debug.
13800 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13802 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13803 * nto-x86-low.c: Include server.h
13805 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13807 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13808 be consistent with other sources of this directory.
13809 (init_registers_amd64): Correct name of source file of this function
13812 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13814 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13815 64-bit executables.
13817 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13819 * win32-i386-low.c: Add 64-bit support.
13820 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13821 (init_registers_amd64): Declare.
13822 (mappings): Add 64-bit version of array.
13823 (init_windows_x86): New function.
13824 (the_low_target): Change init_arch field to init_windows_x86.
13826 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13828 * win32-low.c: Adapt to support also 64-bit architecture.
13829 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13830 (get_image_name): Use SIZE_T type for local variable `done'.
13831 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13832 (toolhelp_get_dll_name): Idem.
13833 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13834 Use uintptr_t typecast to avoid warning.
13835 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13836 (handle_exception): Use phex_nz to avoid warning.
13837 (win32_wait): Remove unused local variable `process'.
13839 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13841 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13844 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13846 * configure.ac: Use `ws2_32' library for srv_mingw.
13847 * configure: Regenerate.
13848 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13849 * remote-utils.c: Likewise.
13851 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13853 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13854 if __x86_64__ is defined.
13856 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13858 * configure: Regenerate.
13860 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13862 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13863 * target.h (target_ops): New get_tib_address field.
13864 * win32-low.h (win32_thread_info): Add thread_local_base field.
13865 * win32-low.c (child_add_thread): Add tlb argument.
13866 Set thread_local_base field to TLB.
13867 (get_child_debug_event): Adapt to child_add_thread change.
13868 (win32_get_tib_address): New function.
13869 (win32_target_ops): Set get_tib_address field to
13870 win32_get_tib_address.
13871 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13873 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13875 * linux-low.c (linux_mourn): Also remove the process.
13876 * server.c (handle_target_event): Don't remove the process here.
13877 * nto-low.c (nto_mourn): New.
13878 (nto_target_ops): Install it.
13879 * spu-low.c (spu_mourn): New.
13880 (spu_target_ops): Install it.
13881 * win32-low.c (win32_mourn): New.
13882 (win32_target_ops): Install it.
13884 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13886 * server.h (buffer_xml_printf): Remove redundant `;'.
13888 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13890 * regcache.c (set_register_cache): Invalidate regcaches before
13891 changing the register cache layout.
13892 (regcache_invalidate_one): Allow a NULL regcache.
13893 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13894 regcaches before changing the register cache layout or the target
13897 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13899 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13900 variable warning on Linux/x86-64.
13902 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13904 GDBserver disconnected tracing support.
13906 * linux-low.c (linux_remove_process): Delete.
13907 (add_lwp): Don't set last_resume_kind here.
13908 (linux_kill): Use `mourn'.
13909 (linux_detach): Use `thread_db_detach', and `mourn'.
13910 (linux_mourn): New.
13911 (linux_attach_lwp_1): Adjust comment.
13912 (linux_attach): last_resume_kind moved the thread_info; adjust.
13913 (status_pending_p_callback): Adjust.
13914 (linux_wait_for_event_1): Adjust.
13915 (count_events_callback, select_singlestep_lwp_callback)
13916 (select_event_lwp_callback, cancel_breakpoints_callback)
13917 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13918 (proceed_one_lwp): Adjust.
13919 (linux_async): Add debug output.
13920 (linux_thread_stopped): New.
13921 (linux_pause_all): New.
13922 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13924 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13925 (thread_db_free): Delete declaration.
13926 (thread_db_detach, thread_db_mourn): Declare.
13927 * thread-db.c (thread_db_init): Use thread_db_mourn.
13928 (thread_db_free): Delete, split in two.
13929 (disable_thread_event_reporting): New.
13930 (thread_db_detach): New.
13931 (thread_db_mourn): New.
13933 * server.h (struct thread_info) <last_resume_kind>: New field.
13934 <attached>: Add comment.
13935 <gdb_detached>: New field.
13936 (handler_func): Change return type to int.
13937 (handle_serial_event, handle_target_event): Ditto.
13938 (gdb_connected): Declare.
13940 (disconnected_tracing): Declare.
13941 (stop_tracing): Declare.
13943 * server.c (handle_query) <qSupported>: Report support for
13944 disconnected tracing.
13945 (queue_stop_reply_callback): Account for running threads.
13946 (gdb_wants_thread_stopped): New.
13947 (gdb_wants_all_threads_stopped): New.
13948 (gdb_reattached_process): New.
13949 (handle_status): Clear the `gdb_detached' flag of all processes.
13950 In all-stop, stop all threads.
13951 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13952 (process_serial_event): If the remote connection breaks, or if an
13953 exit was forced with "monitor exit", force an event loop exit.
13954 Handle disconnected tracing on detach.
13955 (handle_serial_event): Adjust.
13956 (handle_target_event): If GDB isn't connected, forward events back
13957 to the inferior, unless the last process exited, in which case,
13958 exit gdbserver. Adjust interface.
13960 * remote-utils.c (remote_open): Don't block in accept. Instead
13961 register an event loop source on the listen socket file
13962 descriptor. Refactor bits into ...
13963 (listen_desc): ... this new global.
13964 (gdb_connected): ... this new function.
13965 (enable_async_notification): ... this new function.
13966 (handle_accept_event): ... this new function.
13967 (remote_close): Clear remote_desc.
13969 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13971 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13973 (mourn_inferior): Define.
13974 (target_process_qsupported): Avoid the dangling else problem.
13975 (thread_stopped): Define.
13976 (pause_all): Define.
13977 (target_waitstatus_to_string): Declare.
13978 * target.c (target_waitstatus_to_string): New.
13980 * tracepoint.c (tracing): Make extern.
13981 (disconnected_tracing): New.
13982 (stop_tracing): Make extern. Handle tracing stops due to GDB
13984 (cmd_qtdisconnected): New.
13985 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13986 (handle_tracepoint_general_set): Handle QTDisconnected.
13988 * event-loop.c (event_handler_func): Change return type to int.
13989 (process_event): Bail out if the event handler wants the event
13991 (handle_file_event): Ditto.
13992 (start_event_loop): Bail out if the event handler wants the event
13995 * nto-low.c (nto_target_ops): Adjust.
13996 * spu-low.c (spu_wait): Don't remove the process here.
13997 (spu_target_ops): Adjust.
13998 * win32-low.c (win32_wait): Don't remove the process here.
13999 (win32_target_ops): Adjust.
14001 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14003 * regcache.c (realloc_register_cache): Invalidate inferior's
14004 regcache before recreating it.
14006 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14008 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14010 2010-04-09 Stan Shebs <stan@codesourcery.com>
14011 Pedro Alves <pedro@codesourcery.com>
14013 * server.h (LONGEST): New.
14014 (struct thread_info) <while_stepping>: New field.
14015 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14017 (initialize_tracepoint, handle_tracepoint_general_set)
14018 (handle_tracepoint_query, tracepoint_finished_step)
14019 (tracepoint_was_hit, release_while_stepping_state_list):
14020 (current_traceframe): Declare.
14021 * server.c (handle_general_set): Handle tracepoint packets.
14022 (read_memory): New.
14023 (write_memory): New.
14024 (handle_search_memory_1): Use read_memory.
14025 (handle_query): Report support for conditional tracepoints, trace
14026 state variables, and tracepoint sources. Handle tracepoint
14028 (main): Initialize the tracepoints module.
14029 (process_serial_event): Handle traceframe reads/writes.
14031 * linux-low.c (handle_tracepoints): New.
14032 (linux_wait_1): Call it.
14033 (linux_resume_one_lwp): Handle while-stepping.
14034 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14035 (linux_target_ops): Install them.
14036 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14038 * linux-x86-low.c (x86_supports_tracepoints): New.
14039 (the_low_target). Install it.
14041 * mem-break.h (delete_breakpoint): Declare.
14042 * mem-break.c (delete_breakpoint): Make external.
14044 * target.h (struct target_ops): Add `supports_tracepoints',
14045 `read_pc', and `write_pc' fields.
14046 (target_supports_tracepoints): Define.
14047 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14050 * regcache.h (struct regcache) <registers_owned>: New field.
14051 (init_register_cache, regcache_cpy): Declare.
14052 (regcache_read_pc, regcache_write_pc): Declare.
14053 (register_cache_size): Declare.
14054 (supply_regblock): Declare.
14055 * regcache.c (init_register_cache): New.
14056 (new_register_cache): Use it.
14057 (regcache_cpy): New.
14058 (register_cache_size): New.
14059 (supply_regblock): New.
14060 (regcache_read_pc, regcache_write_pc): New.
14062 * tracepoint.c: New.
14064 * Makefile.in (OBS): Add tracepoint.o.
14065 (tracepoint.o): New rule.
14067 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14069 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14071 (i386-mmx.c): Likewise.
14072 (i386-mmx-linux.o): Likewise.
14073 (i386-mmx-linux.c): Likewise.
14075 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14076 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14077 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14078 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14080 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14081 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14082 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14084 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14086 * Makefile.in (clean): Updated.
14088 (i386-avx.c): Likewise.
14089 (i386-avx-linux.o): Likewise.
14090 (i386-avx-linux.c): Likewise.
14091 (amd64-avx.o): Likewise.
14092 (amd64-avx.c): Likewise.
14093 (amd64-avx-linux.o): Likewise.
14094 (amd64-avx-linux.c): Likewise.
14096 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14097 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14098 (srv_amd64_regobj): Add amd64-avx.o.
14099 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14100 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14101 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14102 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14103 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14104 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14105 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14107 * i387-fp.c: Include "i386-xstate.h".
14109 (i387_cache_to_xsave): Likewise.
14110 (i387_xsave_to_cache): Likewise.
14111 (x86_xcr0): Likewise.
14113 * i387-fp.h (i387_cache_to_xsave): Likewise.
14114 (i387_xsave_to_cache): Likewise.
14115 (x86_xcr0): Likewise.
14117 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14118 * linux-crisv32-low.c (target_regsets): Likewise.
14119 * linux-m68k-low.c (target_regsets): Likewise.
14120 * linux-mips-low.c (target_regsets): Likewise.
14121 * linux-ppc-low.c (target_regsets): Likewise.
14122 * linux-s390-low.c (target_regsets): Likewise.
14123 * linux-sh-low.c (target_regsets): Likewise.
14124 * linux-sparc-low.c (target_regsets): Likewise.
14125 * linux-xtensa-low.c (target_regsets): Likewise.
14127 * linux-low.c: Include <sys/uio.h>.
14128 (regsets_fetch_inferior_registers): Support nt_type.
14129 (regsets_store_inferior_registers): Likewise.
14130 (linux_process_qsupported): New.
14131 (linux_target_ops): Add linux_process_qsupported.
14133 * linux-low.h (regset_info): Add nt_type.
14134 (linux_target_ops): Add process_qsupported.
14136 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14138 (init_registers_i386_avx_linux): New.
14139 (init_registers_amd64_avx_linux): Likewise.
14140 (xmltarget_i386_linux_no_xml): Likewise.
14141 (xmltarget_amd64_linux_no_xml): Likewise.
14142 (PTRACE_GETREGSET): Likewise.
14143 (PTRACE_SETREGSET): Likewise.
14144 (x86_fill_xstateregset): Likewise.
14145 (x86_store_xstateregset): Likewise.
14146 (use_xml): Likewise.
14147 (x86_linux_update_xmltarget): Likewise.
14148 (x86_linux_process_qsupported): Likewise.
14149 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14150 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14151 init_registers_i386_linux here. Call
14152 x86_linux_update_xmltarget.
14153 (the_low_target): Add x86_linux_process_qsupported.
14155 * server.c (handle_query): Call target_process_qsupported.
14157 * target.h (target_ops): Add process_qsupported.
14158 (target_process_qsupported): New.
14160 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14162 * inferiors.c (add_thread): Set last_status kind to
14163 TARGET_WAITKIND_IGNORE.
14164 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14165 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14166 (linux_wait_1): Move `thread' local definition to block that uses
14167 it. Don't NULL initialize `event_child'.
14168 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14169 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14170 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14172 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14174 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14175 an extended waitstatus, or by a watchpoint.
14176 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14177 thread was stepping or has been stopped by a watchpoint.
14179 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14181 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14182 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14183 of another, then delete the previous, and validate all
14185 (validate_inserted_breakpoint): New.
14186 (delete_disabled_breakpoints): New.
14187 (validate_breakpoints): New.
14188 (check_mem_read): Validate breakpoints before trusting their
14189 shadow. Delete disabled breakpoints.
14190 (check_mem_write): Validate breakpoints before trusting they
14191 should be inserted. Delete disabled breakpoints.
14192 * mem-break.h (validate_breakpoints):
14193 * server.c (handle_query): Validate breakpoints when we see a
14196 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14198 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14199 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14200 if we could tell there's a GDB breakpoint at stop_pc.
14201 (need_step_over_p): Don't do a step over if we find a GDB
14202 breakpoint at the resume PC.
14204 * mem-break.c (struct raw_breakpoint): New.
14205 (enum bkpt_type): New type `gdb_breakpoint'.
14206 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14207 fields. New field `raw'.
14208 (find_raw_breakpoint_at): New.
14209 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14210 breakpoint instead.
14211 (set_breakpoint_at): Adjust.
14212 (delete_raw_breakpoint): New.
14213 (release_breakpoint): New.
14214 (delete_breakpoint): Rename to...
14215 (delete_breakpoint_1): ... this. Add proc parameter. Use
14216 release_breakpoint. Return ENOENT.
14217 (delete_breakpoint): Reimplement.
14218 (find_breakpoint_at): Delete.
14219 (find_gdb_breakpoint_at): New.
14220 (delete_breakpoint_at): Delete.
14221 (set_gdb_breakpoint_at): New.
14222 (delete_gdb_breakpoint_at): New.
14223 (gdb_breakpoint_here): New.
14224 (set_reinsert_breakpoint): Use release_breakpoint.
14225 (uninsert_breakpoint): Rename to ...
14226 (uninsert_raw_breakpoint): ... this.
14227 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14228 (reinsert_raw_breakpoint): Change parameter type to
14230 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14232 (check_breakpoints): Adjust. Use release_breakpoint.
14233 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14234 (breakpoint_inserted_here): Ditto.
14235 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14236 Don't trust the breakpoint's shadow if it is not inserted.
14237 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14238 (delete_all_breakpoints): Adjust.
14239 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14240 use delete_breakpoint_1.
14242 * mem-break.h (breakpoints_supported): Delete declaration.
14243 (set_gdb_breakpoint_at): Declare.
14244 (gdb_breakpoint_here): Declare.
14245 (delete_breakpoint_at): Delete.
14246 (delete_gdb_breakpoint_at): Declare.
14248 * server.h (struct raw_breakpoint): Forward declare.
14249 (struct process_info): New field `raw_breakpoints'.
14251 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14254 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14256 * linux-low.c (status_pending_p_callback): Fix comment.
14257 (linux_wait_for_event_1): Move most of the internal breakpoint
14258 handling from here...
14259 (linux_wait_1): ... to here.
14260 (count_events_callback): New.
14261 (select_singlestep_lwp_callback): New.
14262 (select_event_lwp_callback): New.
14263 (cancel_breakpoints_callback): New.
14264 (select_event_lwp): New.
14265 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14266 priority to all LWPs that have had events that should be reported
14267 to the client. Cancel breakpoints when about to reporting the
14268 event to the client, not while stopping lwps. No longer cancel
14269 finished single-steps here.
14270 (cancel_finished_single_step): Delete.
14271 (cancel_finished_single_steps): Delete.
14273 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14275 * mem-break.c (enum bkpt_type): New.
14276 (struct breakpoint): New field `type'.
14277 (set_breakpoint_at): Change return type to struct breakpoint
14278 pointer. Set type to `other_breakpoint' by default.
14279 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14280 in the breakpoint list.
14281 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14282 (reinsert_breakpoint): Rename to ...
14283 (reinsert_raw_breakpoint): ... this.
14284 (reinsert_breakpoints_at): Adjust.
14285 * mem-break.h (struct breakpoint): Declare.
14286 (set_breakpoint_at): Change return type to struct breakpoint
14289 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14291 * server.c (handle_query): Assign, not compare.
14293 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14295 Teach linux gdbserver to step-over-breakpoints.
14297 * linux-low.c (can_hardware_single_step): New.
14298 (supports_breakpoints): New.
14299 (handle_extended_wait): If stopping threads, read the stop pc of
14300 the new cloned LWP.
14302 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14303 low target doesn't support retrieving the PC.
14304 (add_lwp): Set last_resume_kind to resume_continue.
14305 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14306 (linux_attach): Don't clear stop_expected. Set the lwp's
14307 last_resume_kind to resume_stop.
14308 (linux_detach_one_lwp): Don't check for removed breakpoints.
14309 (check_removed_breakpoint): Delete.
14310 (status_pending_p): Rename to ...
14311 (status_pending_p_callback): ... this. Don't check for removed
14312 breakpoints. Don't consider threads that are stopped from GDB's
14314 (linux_wait_for_lwp): Always read the stop_pc here.
14315 (cancel_breakpoint): New.
14316 (step_over_bkpt): New global.
14317 (linux_wait_for_event_1): Implement stepping over breakpoints.
14318 (gdb_wants_lwp_stopped): New.
14319 (gdb_wants_all_stopped): New.
14320 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14321 single-step traps here. Store the thread's last reported target
14323 (send_sigstop): Don't clear stop_expected. Always set it,
14325 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14326 (cancel_finished_single_step): New.
14327 (cancel_finished_single_steps): New.
14328 (wait_for_sigstop): Don't cancel finished single-step traps here.
14329 (linux_resume_one_lwp): Don't check for removed breakpoints.
14330 Don't set `step' on non-hardware step archs.
14331 (linux_set_resume_request): Ignore resume_stop requests if already
14332 stopping or stopped. Set the lwp's last_resume_kind.
14333 (resume_status_pending_p): Don't check for removed breakpoints.
14334 (need_step_over_p): New.
14335 (start_step_over): New.
14336 (finish_step_over): New.
14337 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14338 requests. Clear the thread's last reported target waitstatus.
14339 Don't use the `suspended' flag. Don't consider pending breakpoints.
14340 (linux_resume): Start a step-over if necessary.
14341 (proceed_one_lwp): New.
14342 (proceed_all_lwps): New.
14343 (unstop_all_lwps): New.
14344 * linux-low.h (struct lwp_info): Rewrite comment for the
14345 `suspended' flag. Add the `stop_pc' field. Delete the
14346 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14347 Add `'last_resume_kind' and `need_step_over' fields.
14348 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14349 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14350 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14351 (set_raw_breakpoint_at): New.
14352 (set_breakpoint_at): Rewrite to use it.
14353 (reinsert_breakpoint_handler): Delete.
14354 (set_reinsert_breakpoint): New.
14355 (reinsert_breakpoint_by_bp): Delete.
14356 (delete_reinsert_breakpoints): New.
14357 (uninsert_breakpoint): Rewrite.
14358 (uninsert_breakpoints_at): New.
14359 (reinsert_breakpoint): Rewrite.
14360 (reinsert_breakpoints_at): New.
14361 (check_breakpoints): Rewrite.
14362 (breakpoint_here): New.
14363 (breakpoint_inserted_here): New.
14364 (check_mem_read): Adjust.
14365 * mem-break.h (breakpoints_supported, breakpoint_here)
14366 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14367 (reinsert_breakpoint_by_bp): Delete declaration.
14368 (delete_reinsert_breakpoints): Declare.
14369 (reinsert_breakpoint): Delete declaration.
14370 (reinsert_breakpoints_at): Declare.
14371 (uninsert_breakpoint): Delete declaration.
14372 (uninsert_breakpoints_at): Declare.
14373 (check_breakpoints): Adjust prototype.
14374 * server.h: Adjust include order.
14375 (struct thread_info): Declare here. Add a `last_status' field.
14377 2010-03-23 Michael Snyder <msnyder@vmware.com>
14379 * server.c (crc32): New function.
14380 (handle_query): Add handling for 'qCRC:' request.
14382 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14384 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14385 lwp had been stopped by a watchpoint.
14387 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14389 * server.h (internal_error): Declare.
14390 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14391 * utils.c (internal_error): New function.
14393 2010-03-15 Andreas Schwab <schwab@redhat.com>
14395 * configure.srv: Fix typo setting srv_regobj.
14397 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14399 * linux-low.c (fetch_register): Avoid passing a non string literal
14401 (usr_store_inferior_registers): Ditto.
14403 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14405 * linux-low.c (linux_write_memory): Bail out early if peeking
14408 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14410 * linux-low.h (struct lwp_info): New fields
14411 `stopped_by_watchpoint' and `stopped_data_address'.
14412 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14413 here, and cache them in the lwp object.
14414 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14416 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14418 (linux_stopped_by_watchpoint): Rewrite.
14419 (linux_stopped_data_address): Rewrite.
14421 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14423 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14424 switching the current inferior, not before.
14426 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14428 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14429 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14430 i386-linux.c and amd64-linux.c.
14431 (reg-i386.o): Removed.
14432 (reg-i386.c): Likewise.
14433 (reg-i386-linux.o): Likewise.
14434 (reg-i386-linux.c): Likewise.
14435 (reg-x86-64.o): Likewise.
14436 (reg-x86-64.c): Likewise.
14437 (reg-x86-64-linux.o): Likewise.
14438 (reg-x86-64-linux.c): Likewise.
14440 (i386.c): Likewise.
14441 (i386-linux.o): Likewise.
14442 (i386-linux.c): Likewise.
14443 (amd64.o): Likewise.
14444 (amd64.c): Likewise.
14445 (amd64-linux.o): Likewise.
14446 (amd64-linux.c): Likewise.
14448 * configure.srv (srv_i386_regobj): New.
14449 (srv_i386_linux_regobj): Likewise.
14450 (srv_amd64_regobj): Likewise.
14451 (srv_amd64_linux_regobj): Likewise.
14452 (srv_i386_32bit_xmlfiles): Likewise.
14453 (srv_i386_64bit_xmlfiles): Likewise.
14454 (srv_i386_xmlfiles): Likewise.
14455 (srv_amd64_xmlfiles): Likewise.
14456 (srv_i386_linux_xmlfiles): Likewise.
14457 (srv_amd64_linux_xmlfiles): Likewise.
14458 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14459 srv_xmlfiles to $srv_i386_xmlfiles.
14460 (i[34567]86-*-mingw32ce*): Likewise.
14461 (i[34567]86-*-mingw*): Likewise.
14462 (i[34567]86-*-nto*): Likewise.
14463 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14464 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14465 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14466 (x86_64-*-linux*): Likewise.
14468 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14469 (init_registers_amd64_linux): New.
14470 (x86_arch_setup): Replace init_registers_x86_64_linux with
14471 init_registers_amd64_linux.
14473 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14475 * configure.ac: Check for libdl. If it is not available link against
14476 static libthread_db.
14477 * configure: Regenerate.
14479 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14483 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14484 handing a read watchpoint.
14485 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14487 2010-02-12 Doug Evans <dje@google.com>
14489 * linux-low.c (linux_supports_tracefork_flag): Document.
14490 (linux_look_up_symbols): Add comment.
14492 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14494 * regcache.c (supply_register): Clear regcache if buf is NULL.
14496 2010-02-02 Nicolas Roche <roche@sourceware.org>
14497 Joel Brobecker <brobecker@adacore.com>
14499 * inferiors.c (find_inferior): Add function documentation.
14500 (unloaded_dll): Handle the case where the unloaded dll has not
14501 been previously registered in the dll list.
14503 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14505 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14506 (thumb2_breakpoint): New.
14507 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14509 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14511 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14512 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14515 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14517 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14519 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14521 * linux-s390-low.c (s390_collect_ptrace_register)
14522 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14524 2010-01-21 Doug Evans <dje@google.com>
14526 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14527 (PTRACE_ARG4_TYPE): New macro.
14528 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14529 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14530 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14531 (usr_store_inferior_registers): Ditto.
14532 (linux_read_memory, linux_write_memory): Ditto.
14533 (linux_test_for_tracefork): Ditto.
14535 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14536 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14538 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14540 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14543 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14545 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14546 prototype to take a regcache. Adjust.
14548 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14550 * regcache.h (struct thread_info): Forward declare.
14551 (struct regcache): New.
14552 (new_register_cache): Adjust prototype.
14553 (get_thread_regcache): Declare.
14554 (free_register_cache): Adjust prototype.
14555 (registers_to_string, registers_from_string): Ditto.
14556 (supply_register, supply_register_by_name, collect_register)
14557 (collect_register_as_string, collect_register_by_name): Ditto.
14558 * regcache.c (struct inferior_regcache_data): Delete.
14559 (get_regcache): Rename to ...
14560 (get_thread_regcache): ... this. Adjust. Switch inferior before
14561 fetching registers.
14562 (regcache_invalidate_one): Adjust.
14563 (regcache_invalidate): Fix prototype.
14564 (new_register_cache): Return the new register cache.
14565 (free_register_cache): Change prototype.
14566 (realloc_register_cache): Adjust.
14567 (registers_to_string): Change prototype to take a regcache. Adjust.
14568 (registers_from_string): Ditto.
14569 (register_data): Ditto.
14570 (supply_register): Ditto.
14571 (supply_register_by_name): Ditto.
14572 (collect_register): Ditto.
14573 (collect_register_as_string): Ditto.
14574 (collect_register_by_name): Ditto.
14575 * server.c (process_serial_event): Adjust.
14576 * linux-low.h (regset_fill_func, regset_store_func): Change
14578 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14580 * linux-low.c (get_stop_pc): Adjust.
14581 (check_removed_breakpoint): Adjust.
14582 (linux_wait_for_event): Adjust.
14583 (linux_resume_one_lwp): Adjust.
14584 (fetch_register): Add regcache parameter. Adjust.
14585 (usr_store_inferior_registers): Ditto.
14586 (regsets_fetch_inferior_registers): Ditto.
14587 (regsets_store_inferior_registers): Ditto.
14588 (linux_fetch_registers, linux_store_registers): Ditto.
14589 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14591 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14593 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14594 prototype to take a regcache.
14595 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14596 * remote-utils.c (convert_ascii_to_int, outreg)
14597 (prepare_resume_reply): Change prototype to take a regcache.
14599 * target.h (struct target_ops) <fetch_registers, store_registers>:
14600 Change prototype to take a regcache.
14601 (fetch_inferior_registers, store_inferior_registers): Change
14602 prototype to take a regcache. Adjust.
14603 * proc-service.c (ps_lgetregs): Adjust.
14604 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14605 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14606 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14607 take a regcache. Adjust.
14608 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14609 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14610 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14611 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14612 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14613 (cris_cannot_fetch_register):
14614 (cris_breakpoint_at): Change prototype to take a regcache.
14616 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14617 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14618 to take a regcache. Adjust.
14619 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14621 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14622 take a regcache. Adjust.
14623 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14624 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14625 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14626 * linux-mips-low.c (mips_get_pc):
14627 (mips_set_pc): Change prototype to take a regcache. Adjust.
14628 (mips_reinsert_addr): Adjust.
14629 (mips_collect_register): Change prototype to take a regcache.
14631 (mips_supply_register):
14632 (mips_collect_register_32bit, mips_supply_register_32bit)
14633 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14634 (mips_store_fpregset): Ditto.
14635 * linux-ppc-low.c (ppc_supply_ptrace_register)
14636 (ppc_supply_ptrace_register): Ditto.
14637 (parse_spufs_run): Adjust.
14638 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14639 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14640 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14641 take a regcache. Adjust.
14642 * linux-s390-low.c (s390_collect_ptrace_register)
14643 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14644 (s390_set_pc): Change prototype to take a regcache. Adjust.
14645 (s390_arch_setup): Adjust.
14646 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14647 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14648 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14649 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14650 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14652 (sparc_breakpoint_at): Adjust.
14653 * linux-xtensa-low.c (xtensa_fill_gregset):
14654 (xtensa_store_gregset):
14655 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14656 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14657 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14658 prototype to take a regcache. Adjust.
14659 * win32-arm-low.c (arm_fetch_inferior_register)
14660 (arm_store_inferior_register): Change prototype to take a
14662 * win32-i386-low.c (i386_fetch_inferior_register)
14663 (i386_store_inferior_register): Change prototype to take a
14665 * win32-low.c (child_fetch_inferior_registers)
14666 (child_store_inferior_registers): Change prototype to take a
14668 (win32_wait): Adjust.
14669 (win32_fetch_inferior_registers): Change prototype to take a
14671 (win32_store_inferior_registers): Adjust.
14672 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14673 store_inferior_register>: Change prototype to take a regcache.
14675 2010-01-20 Doug Evans <dje@google.com>
14677 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14679 (linux_wait_for_event1, linux_init_signals): Ditto.
14680 (W_STOPCODE): Provide definition if missing.
14682 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14684 * linux-low.c (linux_core_of_thread): New.
14685 (compare_ints, show_process, list_threads): New.
14686 (linux_qxfer_osdata): Report threads and cores.
14687 (linux_target_op): Register linux_core_of_thread.
14688 * remote-utils.c (prepare_resume_reply): Report the core.
14689 (buffer_xml_printf): Support %d specifier.
14690 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14692 (handle_query): Handle qXfer:threads. Announce availability
14694 * target.h (struct target_ops): New field core_of_thread.
14696 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14698 * Makefile.in (clean): Remove new generated files.
14699 (reg-s390.o, reg-s390.c): Remove rules.
14700 (reg-s390x.o, reg-s390x.c): Likewise.
14701 (s390-linux32.o, s390-linux32.c): Add rules.
14702 (s390-linux64.o, s390-linux64.c): Likewise.
14703 (s390x-linux64.o, s390x-linux64.c): Likewise.
14704 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14705 * linux-s390-low.c: Include <elf.h>.
14706 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14707 (init_registers_s390): Remove prototype.
14708 (init_registers_s390x): Likewise.
14709 (init_registers_s390_linux32): Add prototype.
14710 (init_registers_s390_linux64): Likewise.
14711 (init_registers_s390x_linux64): Likewise.
14712 (s390_num_regs_3264): New define.
14713 (s390_regmap_3264): New global variable.
14714 (s390_cannot_fetch_register): Remove obsolete check.
14715 (s390_cannot_store_register): Likewise.
14716 (s390_collect_ptrace_register): Handle upper/lower register halves.
14717 (s390_supply_ptrace_register): Likewise.
14718 (s390_fill_gregset): Update to register number changes.
14719 (s390_get_hwcap): New routine.
14720 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14721 Install appropriate regmap and register set.
14723 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14725 * server.c (gdbserver_version): Update copyright year to 2010.
14726 * gdbreplay.c (gdbreplay_version): Likewise.
14728 2009-12-28 Doug Evans <dje@google.com>
14730 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14731 elf/external.h. Include <elf.h> instead but only if necessary.
14733 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14735 * linux-low.c (linux_remove_process): Remove `detaching'
14736 parameter. Don't release/detach from thread_db here.
14737 (linux_kill): Release/detach from thread_db here, ...
14738 (linux_detach): ... and here, before actually detaching.
14739 (linux_wait_1): ... and here, when a process exits.
14740 * thread-db.c (any_thread_of): New.
14741 (thread_db_free): Switch the current inferior to a thread of the
14744 2009-12-21 Doug Evans <dje@google.com>
14746 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14748 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14749 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14750 warning ifndef __NR_tkill. Move setting of errno there too.
14751 Delete unnecessary resetting of errno after syscall.
14752 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14754 * configure.ac: Check for dladdr.
14755 * config.in: Regenerate.
14756 * configure: Regenerate.
14757 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14758 (try_thread_db_load): Update.
14760 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14762 2009-12-18 Doug Evans <dje@google.com>
14764 * event-loop.c: Include unistd.h if it exists.
14766 * linux-low.c (my_waitpid): Move definition away from being in
14767 between linux_tracefork_child/linux_test_for_tracefork.
14769 * gdb_proc_service.h (psaddr_t): Fix type.
14770 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14771 signature to match glibc.
14773 2009-12-16 Doug Evans <dje@google.com>
14775 * linux-low.c (linux_read_memory): Fix argument to read.
14777 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14779 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14780 events, don't leave current_inferior pointing at null.
14782 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14784 * win32-low.c (LOG): Delete.
14785 (OUTMSG): Output to stderr.
14786 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14787 on compile time LOG macro.
14788 (win32_wait): Fix debug output.
14790 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14792 * win32-low.c (win32_add_one_solib): If the dll name is
14793 "ntdll.dll", prepend the system directory to the dll path.
14795 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14797 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14799 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14800 Vladimir Prus <vladimir@codesourcery.com>
14802 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14803 * configure.ac: Check for __mcoldfire__ and set
14804 gdb_cv_m68k_is_coldfire.
14805 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14806 reg-cf.o and reg-m68k.o.
14807 * configure: Regenerated.
14809 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14811 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14812 Pass it to thread_db_free.
14813 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14814 proper `detaching' argument to linux_remove_process.
14815 * linux-low.h (thread_db_free): Add `detaching' parameter.
14816 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14818 (thread_db_free): Add `detaching' parameter. Only
14819 call td_ta_clear_event if detaching from process.
14821 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14823 * thread-db.c (thread_db_free): Fix typo.
14825 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14828 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14830 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14832 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14833 with an i686 compiler.
14834 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14836 * configure: Rebuilt.
14838 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14842 * server.c (handle_search_memory_1): Correct read_addr initialization
14843 in loop for searching subsequent chunks.
14845 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14847 * configure.ac: New --with-libthread-db option.
14848 * thread-db.c: Allow direct dependence on libthread_db.
14849 (thread_db_free): Adjust.
14850 * config.in: Regenerate.
14851 * configure: Likewise.
14853 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14856 * thread-db.c (attach_thread): New function.
14857 (maybe_attach_thread): Return success/failure.
14858 (find_new_threads_callback): Adjust.
14859 (thread_db_find_new_threads): Loop until no new threads.
14861 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14863 * proc-service.c (ps_lgetregs): Formatting.
14865 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14867 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14868 * configure.ac: Adjust.
14869 * linux-low.h (struct process_info_private): Move members to struct
14871 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14872 * linux-low.c (linux_remove_process): Adjust.
14873 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14874 * server.c (handle_query): Move code ...
14875 (handle_monitor_command): ... here. New function.
14876 * target.h (struct target_ops): New member.
14877 * thread-db.c (struct thread_db): New.
14878 (libthread_db_search_path): New variable.
14879 (thread_db_create_event, thread_db_enable_reporting)
14880 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14881 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14882 (try_thread_db_load_1, dladdr_to_soname): New functions.
14883 (try_thread_db_load, thread_db_load_search): New functions.
14884 (thread_db_init): Search for libthread_db.
14885 (thread_db_free): New function.
14886 (thread_db_handle_monitor_command): Likewise.
14887 * config.in: Regenerate.
14888 * configure: Regenerate.
14890 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14892 * spu-low.c (spu_kill): Wait for inferior to terminate.
14893 Call clear_inferiors.
14894 (spu_detach): Call clear_inferiors.
14896 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14898 * aclocal.m4: Regenerate.
14899 * config.in: Likewise.
14900 * configure: Likewise.
14902 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14904 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14905 (parse_spufs_run): New function.
14906 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14907 (ppc_breakpoint_at): Handle SPU breakpoints.
14909 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14911 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14912 (SPUFS_MAGIC): Define.
14913 (spu_enumerate_spu_ids): New function.
14914 (linux_qxfer_spu): New function.
14915 (linux_target_ops): Install linux_qxfer_spu.
14917 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14919 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14920 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14921 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14922 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14923 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14924 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14925 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14926 (init_registers_powerpc_cell32l): Add prototype.
14927 (init_registers_powerpc_cell64l): Likewise.
14928 (ppc_arch_setup): Detect Cell/B.E. architecture.
14930 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14932 * Makefile.in (datarootdir): New variable.
14934 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14936 * linux-low.c (linux_write_memory): Update debugging output.
14937 * Makefile.in (clean): Add new descriptions.
14938 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14939 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14940 * configure.srv: Add new files for arm*-*-linux*.
14941 * linux-arm-low.c: Add new declarations.
14942 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14943 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14944 (HWCAP_VFPv3D16): New.
14945 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14946 instead of __IWMMXT__.
14947 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14948 (arm_arch_setup): New.
14949 (target_regsets): Remove #ifdef. Add VFP regset.
14950 (the_low_target): Use arm_arch_setup.
14952 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14954 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14955 the main thread again.
14957 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14959 Adding Neutrino gdbserver.
14960 * configure: Regenerated.
14961 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14962 * configure.srv (i[34567]86-*-nto*): New target.
14963 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14964 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14965 (nto_comctrl) [__QNX__]: New function.
14966 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14968 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14970 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14973 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14974 Pedro Alves <pedro@codesourcery.com>
14976 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14977 don't support CONTEXT_EXTENDED_REGISTERS.
14978 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14979 (the_low_target): Install them.
14980 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14981 failing with ERROR_PIPE_NOT_CONNECTED.
14983 2009-06-30 Doug Evans <dje@google.com>
14984 Pierre Muller <muller@ics.u-strasbg.fr>
14986 Add h/w watchpoint support to x86-linux, win32-i386.
14987 * Makefile.in (SFILES): Add i386-low.c
14988 (i386_low_h): Define.
14989 (i386-low.o): Add dependencies.
14990 (linux-x86-low.o): Add i386-low.h dependency.
14991 (win32-i386-low.o): Ditto.
14992 * i386-low.c: New file.
14993 * i386-low.h: New file.
14994 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14995 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14996 * linux-low.c (linux_add_process): Initialize arch_private.
14997 (linux_remove_process): Free arch_private.
14998 (add_lwp): Initialize arch_private.
14999 (delete_lwp): Free arch_private.
15000 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15002 * linux-low.h (process_info_private): New member arch_private.
15003 (lwp_info): New member arch_private.
15004 (linux_target_ops): New members new_process, new_thread,
15006 (ptid_of): New macro.
15007 * linux-x86-low.c: Include stddef.h, i386-low.h.
15008 (arch_process_info): New struct.
15009 (arch_lwp_info): New struct.
15010 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15011 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15012 (i386_dr_low_get_status): New function.
15013 (x86_insert_point, x86_remove_point): New functions.
15014 (x86_stopped_by_watchpoint): New function.
15015 (x86_stopped_data_address): New function.
15016 (x86_linux_new_process, x86_linux_new_thread): New functions.
15017 (x86_linux_prepare_to_resume): New function.
15018 (the_low_target): Add entries for insert_point, remove_point,
15019 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15021 * server.c (debug_hw_points): New global.
15022 (monitor_show_help): Document set debug-hw-points.
15023 (handle_query): Process "set debug-hw-points".
15024 * server.h (debug_hw_points): Declare.
15025 (paddress): Declare.
15026 * utils.c (NUMCELLS, CELLSIZE): New macros.
15027 (get_sell, xsnprintf, paddress): New functions.
15028 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15029 remove_point, stopped_by_watchpoint, stopped_data_address.
15030 * win32-i386-low.c: Include i386-low.h.
15031 (debug_reg_state): Replaces dr.
15032 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15033 (i386_dr_low_get_status): New function.
15034 (i386_insert_point, i386_remove_point): New functions.
15035 (i386_stopped_by_watchpoint): New function.
15036 (i386_stopped_data_address): New function.
15037 (i386_initial_stuff): Update.
15038 (get_thread_context,set_thread_context,i386_thread_added): Update.
15039 (the_low_target): Add entries for insert_point,
15040 remove_point, stopped_by_watchpoint, stopped_data_address.
15041 * win32-low.c (win32_insert_watchpoint): New function.
15042 (win32_remove_watchpoint): New function.
15043 (win32_stopped_by_watchpoint): New function.
15044 (win32_stopped_data_address): New function.
15045 (win32_target_ops): Add entries for insert_watchpoint,
15046 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15047 * win32-low.h (win32_target_ops): New members insert_point,
15048 remove_point, stopped_by_watchpoint, stopped_data_address.
15050 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15052 * server.c (process_serial_event): Re-return unsupported, not
15053 error, if the type isn't recognized. Re-allow supporting only
15054 insert or remove packets. Also call require_running for
15055 breakpoints. Add missing break statement to default case. Tidy.
15056 * target.h (struct target_ops): Rename insert_watchpoint to
15057 insert_point, and remove_watchpoint to remove_point.
15059 * linux-low.h (struct linux_target_ops): Likewise.
15060 * linux-low.c (linux_insert_watchpoint): Rename to ...
15061 (linux_insert_point): ... this. Adjust.
15062 (linux_remove_watchpoint): Rename to ...
15063 (linux_remove_point): ... this. Adjust.
15064 (linux_target_ops): Adjust.
15065 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15066 (cris_insert_point): ... this.
15067 (cris_remove_watchpoint): Rename to ...
15068 (cris_remove_point): ... this.
15069 (the_low_target): Adjust.
15071 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15073 * server.c (handle_v_kill): Pass signal_pid to
15074 kill_inferior if multi_process is zero.
15076 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15078 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15079 * target.h (target_ops): Comment for *_watchpoint to make it clear
15080 the functions can get types '0' and '1'.
15082 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15084 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15085 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15086 * regcache.c (get_regcache): Likewise.
15087 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15088 * win32-low.c (child_fetch_inferior_registers): Remove check for
15091 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15092 Pedro Alves <pedro@codesourcery.com>
15094 * target.h (struct target_ops) <supports_multi_process>: New
15096 (target_supports_multi_process): New.
15097 * server.c (handle_query): Even if GDB reports support, only
15098 enable multi-process if the target also supports it. Report
15099 multi-process support only if the target backend supports it.
15100 * linux-low.c (linux_supports_multi_process): New function.
15101 (linux_target_ops): Install it as target_supports_multi_process
15104 2009-05-24 Doug Evans <dje@google.com>
15106 Global renaming of find_thread_pid to find_thread_ptid.
15107 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15108 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15109 All callers updated.
15111 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15112 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15115 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15116 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15117 (linux_resume_one_lwp): Ditto.
15119 2009-05-23 Doug Evans <dje@google.com>
15121 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15122 from struct inferior_list_entry * to struct lwp_info *.
15123 All callers updated.
15125 2009-05-13 Doug Evans <dje@google.com>
15127 * linux-x86-low.c: Don't include assert.h.
15128 (x86_siginfo_fixup): Use fatal, not assert.
15129 (x86_arch_setup): Fix comment.
15131 2009-05-12 Doug Evans <dje@google.com>
15133 Biarch support for i386/amd64 gdbserver.
15134 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15135 Add linux-x86-low.c.
15136 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15137 (linux-x86-low.o): Add.
15138 * linux-x86-64-low.c: Delete.
15139 * linux-i386-low.c: Delete.
15140 * linux-x86-low.c: New file.
15141 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15143 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15145 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15146 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15147 (linux_child_pid_to_exec_file): New function.
15148 (elf_64_header_p, elf_64_file_p): New functions.
15149 (siginfo_fixup): New function.
15150 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15151 give target a chance to convert layout.
15152 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15153 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15155 2009-05-07 Doug Evans <dje@google.com>
15157 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15158 (regsets_store_inferior_registers): Ditto.
15160 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15164 * linux-low.c (must_set_ptrace_flags): Delete.
15165 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15167 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15168 `lwp->must_set_ptrace_flags' instead.
15169 (linux_wait_for_event_1): Set ptrace options here.
15170 (linux_wait_1): ... not here.
15172 2009-04-30 Doug Evans <dje@google.com>
15174 * inferiors.c (started_inferior_callback): New function.
15175 (attached_inferior_callback): New function.
15176 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15177 * server.c (print_started_pid, print_attached_pid): New functions.
15178 (detach_or_kill_for_exit): New function.
15179 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15180 * server.h (have_started_inferiors_p): Declare.
15181 (have_attached_inferiors_p): Declare.
15183 * inferiors.c (remove_process): Fix memory leak, free process.
15184 * linux-low.c (linux_remove_process): New function.
15185 (linux_kill): Call it instead of remove_process.
15186 (linux_detach, linux_wait_1): Ditto.
15188 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15190 * configure.srv: Add x86 Windows CE target.
15192 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15194 * inferiors.c (get_thread_process): Make global.
15195 * server.h (get_thread_process): Add prototype.
15196 * thread-db.c (find_one_thread): Use get_thread_process
15197 instead of current_process.
15198 (thread_db_get_tls_address): Do not crash if called when
15199 thread layer is not yet initialized.
15201 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15203 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15204 * spu-low.c (current_tid): Rename to ...
15205 (current_ptid): ... this.
15206 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15207 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15208 ptid_get_lwp (current_ptid) instead of current_tid.
15209 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15210 instead of current_tid. Use find_process_pid to verify pid
15211 argument is valid. Pass proper argument to remove_process.
15212 (spu_thread_alive): Compare current_ptid instead of current_tid.
15213 (spu_resume): Likewise.
15215 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15217 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15222 Implement the multiprocess extensions, and add linux multiprocess
15225 * server.h (ULONGEST): Declare.
15226 (struct ptid, ptid_t): New.
15227 (minus_one_ptid, null_ptid): Declare.
15228 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15229 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15230 (struct inferior_list_entry): Change `id' type from unsigned from
15232 (struct sym_cache, struct breakpoint, struct
15233 process_info_private): Forward declare.
15234 (struct process_info): Declare.
15235 (current_process): Declare.
15236 (all_processes): Declare.
15237 (initialize_inferiors): Declare.
15238 (add_thread): Adjust to use ptid_t.
15239 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15240 (add_process, remove_process, find_thread_pid): Declare.
15241 (find_inferior_id): Adjust to use ptid_t.
15242 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15243 (multi_process): Declare.
15244 (push_event): Adjust to use ptid_t.
15245 (read_ptid, write_ptid): Declare.
15246 (prepare_resume_reply): Adjust to use ptid_t.
15247 (clear_symbol_cache): Declare.
15248 * inferiors.c (all_processes): New.
15249 (null_ptid, minus_one_ptid): New.
15250 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15251 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15252 (add_thread): Change unsigned long to ptid. Remove gdb_id
15254 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15255 (gdb_id_to_thread): Rename to ...
15256 (find_thread_pid): ... this. Change unsigned long to ptid.
15257 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15258 (loaded_dll, pull_pid_from_list): Adjust.
15259 (add_process, remove_process, find_process_pid)
15260 (get_thread_process, current_process, initialize_inferiors): New.
15261 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15262 (struct target_waitstatus) <related_pid>: Ditto.
15263 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15264 return type to int.
15265 (struct target_ops) <join>: Add `pid' argument.
15266 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15267 (struct target_ops) <wait>: Add `ptid' field. Change return type
15269 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15270 (mywait): Add `ptid' argument. Change return type to ptid_t.
15271 (target_pid_to_str): Declare.
15272 * target.c (set_desired_inferior): Adjust to use ptids.
15273 (mywait): Add new `ptid' argument. Adjust.
15274 (target_pid_to_str): New.
15275 * mem-break.h (free_all_breakpoints): Declare.
15276 * mem-break.c (breakpoints): Delelete.
15277 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15278 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15279 to use per-process breakpoint list.
15280 (free_all_breakpoints): New.
15281 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15282 (symbol_cache, all_symbols_looked_up): Delete.
15284 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15286 (prepare_resume_reply): Change ptid argument's type from unsigned
15287 long to ptid_t. Adjust. Implement W;process and X;process.
15288 (free_sym_cache, clear_symbol_cache): New.
15289 (look_up_one_symbol): Adjust to per-process symbol cache. *
15290 * server.c (cont_thread, general_thread, step_thread): Change type
15292 (attached): Delete.
15293 (multi_process): New.
15294 (last_ptid): Change type to ptid_t.
15295 (struct vstop_notif) <ptid>: Change type to ptid_t.
15296 (queue_stop_reply, push_event): Change `ptid' argument's type to
15298 (discard_queued_stop_replies): Add `pid' argument.
15299 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15300 changes. Don't reference the `attached' global.
15301 (attach_inferior): Adjust to mywait interface changes.
15302 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15303 features. Handle and report "multiprocess+". Handle
15305 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15307 (handle_v_kill): New.
15308 (handle_v_stopped): Adjust to use target_pid_to_str.
15309 (handle_v_requests): Allow multiple attaches and runs when
15310 multiprocess extensions are in effect. Handle "vKill".
15311 (myresume): Adjust to use ptids.
15312 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15313 (handle_status): Adjust to discard_queued_stop_replies interface
15315 (first_thread_of, kill_inferior_callback)
15316 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15317 (main): Call initialize_inferiors. Adjust to use ptids, killing
15318 and detaching from all inferiors. Handle multiprocess packet
15320 * linux-low.h: Include gdb_proc_service.h.
15321 (struct process_info_private): New.
15322 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15323 <lwpid_of>: Use ptid_get_lwp.
15324 (get_lwp_thread): Adjust.
15325 (struct lwp_info): Add `dead' member.
15326 (find_lwp_pid): Declare.
15327 * linux-low.c (thread_db_active): Delete.
15328 (new_inferior): Adjust comment.
15329 (inferior_pid): Delete.
15330 (linux_add_process): New.
15331 (handle_extended_wait): Adjust.
15332 (add_lwp): Change unsigned long to ptid.
15333 (linux_create_inferior): Add process to processes table. Adjust
15334 to use ptids. Don't set new_inferior here.
15335 (linux_attach_lwp): Rename to ...
15336 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15337 it. Adjust to use ptids.
15338 (linux_attach_lwp): New.
15339 (linux_attach): Add process to processes table. Don't set
15341 (struct counter): New.
15342 (second_thread_of_pid_p, last_thread_of_process_p): New.
15343 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15344 multiple processes.
15345 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15346 processes. Remove process from process table.
15347 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15348 to multiple processes.
15349 (any_thread_of): New.
15350 (linux_detach): Add `pid' argument, and handle it. Remove process
15351 from processes table.
15352 (linux_join): Add `pid' argument. Handle it.
15353 (linux_thread_alive): Change unsighed long argument to ptid_t.
15354 Consider dead lwps as not being alive.
15355 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15356 threads we're not interested in.
15357 (same_lwp, find_lwp_pid): New.
15358 (linux_wait_for_lwp): Change `pid' argument's type from int to
15360 (linux_wait_for_event): Rename to ...
15361 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15362 from int to ptid_t. Adjust.
15363 (linux_wait_for_event): New.
15364 (linux_wait_1): Add `ptid' argument. Change return type to
15365 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15366 that exit from the process table.
15367 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15369 (mark_lwp_dead): New.
15370 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15371 stopping all threads, mark its main lwp as dead.
15372 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15374 (fetch_register, usr_store_inferior_registers)
15375 (regsets_fetch_inferior_registers)
15376 (regsets_store_inferior_registers, linux_read_memory)
15377 (linux_write_memory): Inline `inferior_pid'.
15378 (linux_look_up_symbols): Adjust to use per-process
15379 `thread_db_active'.
15380 (linux_request_interrupt): Adjust to use ptids.
15381 (linux_read_auxv): Inline `inferior_pid'.
15382 (initialize_low): Don't reference thread_db_active.
15383 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15384 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15385 (ps_getpid): Return the pid of the current inferior.
15386 * thread-db.c (proc_handle, thread_agent): Delete.
15387 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15389 (find_one_thread): Change argument type to ptid_t. Adjust to
15391 (maybe_attach_thread): Adjust to per-process data and ptids.
15392 (thread_db_find_new_threads): Ditto.
15393 (thread_db_init): Ditto.
15394 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15395 processes table. Adjust to use ptids.
15396 (spu_kill, spu_detach): Adjust interface. Remove process from
15398 (spu_join, spu_thread_alive): Adjust interface.
15399 (spu_wait): Adjust interface. Remove process from processes
15400 table. Adjust to use ptids.
15401 * win32-low.c (current_inferior_tid): Delete.
15402 (current_inferior_ptid): New.
15403 (debug_event_ptid): New.
15404 (thread_rec): Take a ptid. Adjust.
15405 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15406 (child_delete_thread): Ditto.
15407 (do_initial_child_stuff): Add `attached' argument. Add process to
15409 (child_fetch_inferior_registers, child_store_inferior_registers):
15411 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15412 (win32_attach): Pass 1 to do_initial_child_stuff.
15413 (win32_kill): Adjust interface. Remove process from processes
15415 (win32_detach): Ditto.
15416 (win32_join): Adjust interface.
15417 (win32_thread_alive): Take a ptid.
15418 (win32_resume): Adjust to use ptids.
15419 (get_child_debug_event): Ditto.
15420 (win32_wait): Adjust interface. Remove exiting process from
15423 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15425 Non-stop mode support.
15427 * server.h (non_stop): Declare.
15428 (gdb_client_data, handler_func): Declare.
15429 (delete_file_handler, add_file_handler, start_event_loop):
15431 (handle_serial_event, handle_target_event, push_event)
15432 (putpkt_notif): Declare.
15433 * target.h (enum resume_kind): New.
15434 (struct thread_resume): Replace `step' field by `kind' field.
15435 (TARGET_WNOHANG): Define.
15436 (struct target_ops) <wait>: Add `options' argument.
15437 <supports_non_stop, async, start_non_stop>: New fields.
15438 (target_supports_non_stop, target_async): New.
15439 (start_non_stop): Declare.
15440 (mywait): Add `options' argument.
15441 * target.c (mywait): Add `options' argument. Print child exit
15442 notifications here.
15443 (start_non_stop): New.
15444 * server.c (non_stop, own_buf, mem_buf): New globals.
15445 (struct vstop_notif): New.
15446 (notif_queue): New global.
15447 (queue_stop_reply, push_event, discard_queued_stop_replies)
15448 (send_next_stop_reply): New.
15449 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15451 (attach_inferior): In non-stop mode, don't wait for the target
15453 (handle_general_set): Handle QNonStop.
15454 (handle_query): When handling qC, return the current general
15455 thread, instead of the first thread of the list.
15456 (handle_query): If the backend supports non-stop mode, include
15457 QNonStop+ in the qSupported query response.
15458 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15460 (handle_v_attach, handle_v_run): Handle non-stop mode.
15461 (handle_v_stopped): New.
15462 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15463 (myresume): Adjust to use resume_kind. Handle non-stop.
15464 (queue_stop_reply_callback): New.
15465 (handle_status): Handle non-stop mode.
15466 (main): Clear non_stop flag on reconnection. Use the event-loop.
15467 Refactor serial protocol handling from here ...
15468 (process_serial_event): ... to this new function. When GDB
15469 selects any thread, select one here. In non-stop mode, wait until
15470 GDB acks all pending events before exiting.
15471 (handle_serial_event, handle_target_event): New.
15472 * remote-utils.c (remote_open): Install remote_desc in the event
15474 (remote_close): Remove remote_desc from the event loop.
15475 (putpkt_binary): Rename to...
15476 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15477 (putpkt_binary): New as wrapper around putpkt_binary_1.
15478 (putpkt_notif): New.
15479 (prepare_resume_reply): In non-stop mode, don't change the
15481 * event-loop.c: New.
15482 * Makefile.in (OBJ): Add event-loop.o.
15483 (event-loop.o): New rule.
15485 * linux-low.h (pid_of): Moved here.
15487 (get_lwp_thread): Use lwpid_of.
15488 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15489 * linux-low.c (pid_of): Delete.
15490 (inferior_pid): Use lwpid_of.
15491 (linux_event_pipe): New.
15492 (target_is_async_p): New.
15494 (handle_extended_wait): Use lwpid_of.
15495 (add_lwp): Don't set lwpid field.
15496 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15497 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15498 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15499 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15500 first. Adjust to linux_wait_for_event interface changes. Use
15502 (linux_detach): Don't delete the main lwp here.
15503 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15504 (status_pending_p): Don't consider explicitly suspended lwps.
15505 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15506 pointer. Add OPTIONS argument. Change return type to int. Use
15507 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15508 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15509 pointer. Add status pointer argument. Return a pid instead of a
15510 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15511 changes. In non-stop mode, don't switch to a random thread.
15512 (linux_wait): Rename to...
15513 (linux_wait_1): ... this. Add target_options argument, and handle
15514 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15515 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15516 clean exit and signal exit code. Don't stop all threads in
15517 non-stop mode. In all-stop mode, only stop all threads when
15518 reporting a stop to GDB. Handle explicit thread stop requests.
15519 (async_file_flush, async_file_mark): New.
15521 (send_sigstop): Use lwpid_of.
15522 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15523 interface changes. In non-stop mode, don't switch to a random
15525 (linux_resume_one_lwp): Use lwpid_of.
15526 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15527 (linux_resume_one_thread): ... this. Handle resume_stop. In
15528 non-stop mode, don't look for pending flag in all threads.
15529 (resume_status_pending_p): Don't consider explicitly suspended
15531 (my_waitpid): Reimplement. Emulate __WALL.
15532 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15534 (sigchld_handler, linux_supports_non_stop, linux_async)
15535 (linux_start_non_stop): New.
15536 (linux_target_ops): Register linux_supports_non_stop, linux_async
15537 and linux_start_non_stop.
15538 (initialize_low): Install SIGCHLD handler.
15539 * thread-db.c (thread_db_create_event, find_one_thread)
15540 (thread_db_get_tls_address): Use lwpid_of.
15541 * win32-low.c (win32_detach): Adjust to use resume_kind.
15542 (win32_wait): Add `options' argument.
15543 * spu-low.c (spu_resume): Adjust to use resume_kind.
15544 (spu_wait): Add `options' argument.
15546 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15548 Decouple target code from remote protocol.
15550 * target.h (enum target_waitkind): New.
15551 (struct target_waitstatus): New.
15552 (struct target_ops) <wait>: Return an unsigned long. Take a
15553 target_waitstatus pointer instead of a char pointer.
15554 (mywait): Likewise.
15555 * target.c (mywait): Change prototype to return an unsigned long.
15556 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15557 * server.h (thread_from_wait, old_thread_from_wait): Delete
15559 (prepare_resume_reply): Change prototype to take a
15561 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15562 (last_status, last_ptid): New.
15563 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15564 pid instead of a signal.
15565 (attach_inferior): Remove "status" and "signal" parameters.
15567 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15569 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15570 (handle_v_requests, myresume): Remove "status" and "signal"
15571 parameters. Adjust.
15572 (handle_status): New.
15573 (main): Delete local `status'. Adjust.
15574 * remote-utils.c: Include target.h.
15575 (prepare_resume_reply): Change prototype to take a
15576 target_waitstatus. Adjust.
15578 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15580 * spu-low.c (spu_wait): Adjust.
15581 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15583 (win32_wait): Adjust.
15585 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15587 * target.h (struct thread_resume): Delete leave_stopped member.
15588 (struct target_ops): Add a `n' argument to the `resume' callback.
15589 * server.c (start_inferior): Adjust.
15590 (handle_v_cont, myresume): Adjust.
15591 * linux-low.c (check_removed_breakpoint): Adjust to resume
15592 interface change, and to removed leave_stopped field.
15593 (resume_ptr): Delete.
15594 (struct thread_resume_array): New.
15595 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15596 resume interface change.
15597 (linux_continue_one_thread, linux_queue_one_thread)
15598 (resume_status_pending_p): Check if the resume field is NULL
15599 instead of checking the leave_stopped member.
15600 (linux_resume): Adjust to the target resume interface change.
15601 * spu-low.c (spu_resume): Adjust to the target resume interface
15603 * win32-low.c (win32_detach, win32_resume): Ditto.
15605 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15607 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15609 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15611 (linux_continue_one_thread): Only preserve the stepping flag if
15612 there's a pending breakpoint.
15614 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15616 * server.c (main): After the inferior having exited, call
15617 remote_close before exiting gdbserver.
15619 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15621 Fix size of FPSCR in Power 7 processors.
15622 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15623 (PPC_FEATURE_HAS_DFP): New #define.
15624 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15627 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15629 * server.c (handle_query) Whitespace and formatting.
15631 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15633 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15634 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15635 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15636 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15637 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15638 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15639 Makefile.in, configure.ac: Fix whitespace throughout.
15640 * configure: Regenerate.
15642 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15644 * inferiors.c (find_inferior): Make it safe for the callback
15645 function to delete the currently iterated inferior.
15647 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15649 * Makefile.in (linuw_low_h): Move higher.
15650 (thread-db.o): Depend on $(linux_low_h).
15652 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15654 Rename "process" to "lwp" throughout.
15656 * linux-low.c (all_processes): Rename to...
15657 (all_lwps): ... this.
15658 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15659 (add_process): Rename to ...
15660 (add_lwp): ... this. Adjust.
15661 (linux_create_inferior): Adjust.
15662 (linux_attach_lwp): Adjust.
15663 (linux_attach): Adjust.
15664 (linux_kill_one_process): Rename to ...
15665 (linux_kill_one_lwp): ... this. Adjust.
15666 (linux_kill): Adjust.
15667 (linux_detach_one_process): Rename to ...
15668 (linux_detach_one_lwp): ... this. Adjust.
15669 (linux_detach): Adjust.
15670 (check_removed_breakpoint): Adjust.
15671 (status_pending_p): Adjust.
15672 (linux_wait_for_process): Rename to ...
15673 (linux_wait_for_lwp): ... this. Adjust.
15674 (linux_wait_for_event): Adjust.
15675 (send_sigstop): Adjust.
15676 (wait_for_sigstop): Adjust.
15677 (stop_all_processes): Rename to ...
15678 (stop_all_lwps): ... this.
15679 (linux_resume_one_process): Rename to ...
15680 (linux_resume_one_lwp): ... this. Adjust.
15681 (linux_set_resume_request, linux_continue_one_thread)
15682 (linux_queue_one_thread, resume_status_pending_p)
15683 (usr_store_inferior_registers, regsets_store_inferior_registers)
15684 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15686 * linux-low.h (get_process): Rename to ...
15687 (get_lwp): ... this. Adjust.
15688 (get_thread_process): Rename to ...
15689 (get_thread_lwp): ... this. Adjust.
15690 (get_process_thread): Rename to ...
15691 (get_lwp_thread): ... this. Adjust.
15692 (struct process_info): Rename to ...
15693 (struct lwp_info): ... this.
15694 (all_processes): Rename to ...
15695 (all_lwps): ... this.
15696 * proc-service.c (ps_lgetregs): Adjust.
15697 * thread-db.c (thread_db_create_event, find_one_thread)
15698 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15700 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15702 * server.c (handle_query): Handle "qAttached".
15704 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15706 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15707 GPLv3, update license URL.
15709 2009-03-01 Doug Evans <dje@google.com>
15711 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15712 (server_h): Add gdb_signals.h.
15713 (signals.o): Update.
15714 * server.h (target_signal_from_host,target_signal_to_host_p)
15715 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15717 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15719 * remote-utils.c (getpkt): Also generate remote-debug
15720 information if noack_mode is set.
15722 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15724 * server.c (handle_query): Report qXfer:siginfo:read and
15725 qXfer:siginfo:write as supported and handle them.
15726 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15727 * linux-low.c (linux_xfer_siginfo): New.
15728 (linux_target_ops): Set it.
15730 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15732 * server.c (gdbserver_usage): Mention --remote-debug.
15733 (main): Accept '--remote-debug' switch.
15735 2009-01-18 Doug Evans <dje@google.com>
15737 * regcache.c (new_register_cache): No need to check result of xcalloc.
15738 * server.c (handle_search_memory): Back out calls to xmalloc,
15739 result is checked and error is returned to user upon failure.
15740 (handle_query): Ditto. Add more checks for result of malloc.
15741 (handle_v_cont): Check result of malloc, report error back to
15743 (handle_v_run): Ditto. Call freeargv.
15744 * server.h (freeargv): Declare.
15745 * utils.c (freeargv): New fn.
15747 2009-01-15 Doug Evans <dje@google.com>
15749 * gdbreplay.c (perror_with_name): Make arg const char *.
15750 * server.h (target_signal_to_name): Make return type const char *.
15751 * thread-db.c (thread_db_err_str): Make return type const char *.
15752 * utils.c (perror_with_name): Make arg const char *.
15754 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15756 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15757 when handling a EXIT_PROCESS_DEBUG_EVENT.
15759 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15761 * gdbreplay.c (gdbreplay_version): Update copyright year.
15762 * server.c (gdbserver_version): Likewise.
15764 2009-01-05 Doug Evans <dje@google.com>
15766 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15767 (handle_extended_wait): Improve comment.
15769 2008-12-13 Doug Evans <dje@google.com>
15771 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15772 * server.h (ATTR_MALLOC): New macro.
15773 (xmalloc,xcalloc,xstrdup): Declare.
15774 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15775 * inferiors.c: Ditto.
15776 * linux-low.c: Ditto.
15777 * mem-break.c: Ditto.
15778 * regcache.c: Ditto.
15779 * remote-utils.c: Ditto.
15782 * win32-low.c: Ditto.
15784 2008-12-12 Doug Evans <dje@google.com>
15786 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15787 in debugging printf.
15789 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15791 2008-12-09 Doug Evans <dje@google.com>
15793 * linux-low.h (struct process_info): Delete member tid, unused.
15794 * thread-db.c (find_one_thread): Update.
15795 (maybe_attach_thread): Update.
15797 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15799 * target.h (struct target_ops): Add qxfer_osdata member.
15800 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15802 (linux_qxfer_osdata): New functions.
15803 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15805 * server.c (handle_query): Handle "qXfer:osdata:read:".
15806 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15807 (buffer_xml_printf): New functions.
15808 * server.h (struct buffer): New.
15809 (buffer_grow_str, buffer_grow_str0): New macros.
15810 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15811 (buffer_xml_printf): Declare.
15813 2008-11-24 Doug Evans <dje@google.com>
15815 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15817 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15819 * server.c (handle_v_run): Always use the supplied argument list.
15821 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15823 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15824 (xtensa_regmap_table): Add entry for scompare1.
15826 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15828 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15829 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15830 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15831 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15832 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15833 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15834 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15835 XML target descriptions.
15836 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15837 when inferior is running on an ISA 2.05 or later processor. Add
15838 special case to return offset for full 64-bit slot of FPSCR when
15841 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15843 * Makefile.in (SFILES, clean): Added sparc64 files.
15844 (reg-sparc64.o, reg-sparc64.c): New.
15845 * configure.srv (sparc*-*-linux*): New configuration.
15846 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15847 syscall arguments for SPARC.
15848 (regsets_store_inferior_registers): Likewise.
15849 * linux-sparc-low.c: New file.
15851 2008-10-21 Doug Evans <dje@google.com>
15853 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15854 (READLINE_DIR,READLINE_DEP): Delete.
15855 (INTERNAL_CFLAGS): Update.
15856 (LINTFLAGS): Update.
15858 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15860 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15861 whole argv from the last run, not just argv[0].
15863 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15865 * regcache.c (new_register_cache): Return NULL if the register
15866 cache size isn't known yet.
15867 (free_register_cache): Avoid dereferencing a NULL regcache.
15869 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15871 * configure.srv: Merge MIPS and MIPS64.
15873 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15875 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15877 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15879 * Makefile.in: Add required vsx dependencies.
15881 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15882 Declare init_registers_powerpc_vsx32l.
15883 Declare init_registers_powerpc_vsx64l.
15884 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15885 (ppc_arch_setup): Check for VSX in hwcap.
15886 (ppc_fill_vsxregset): New function.
15887 (ppc_store_vsxregset): New function.
15888 Add new VSX entry in regset_info target_regsets.
15890 * configure.srv: Add new VSX dependencies.
15892 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15894 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15895 (remote_open): Set or clear transport_is_reliable.
15896 (putpkt_binary): Don't expect acks in noack mode.
15897 (getpkt): Don't send ack/nac in noack mode.
15898 * server.c (handle_general_set): Handle QStartNoAckMode.
15899 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15901 (main): Reset noack_mode on every connection.
15902 * server.h (noack_mode): Declare.
15904 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15906 * Makefile.in (GDBREPLAY_OBS): New variable.
15907 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15909 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15910 Daniel Jacobowitz <dan@codesourcery.com>
15912 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15913 (usr_store_inferior_registers): Likewise.
15914 (regsets_store_inferior_registers): Likewise.
15916 2008-07-31 Rolf Jansen <rj@surtec.com>
15917 Pedro Alves <pedro@codesourcery.com>
15919 * configure.ac: Check for memmem declaration.
15920 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15921 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15922 (disable_packet_qfThreadInfo): Unconditionally compile.
15923 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15924 * configure, config.in: Regenerate.
15926 2008-07-28 Doug Kwan <dougkwan@google.com>
15928 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15929 (linux_write_memory): Remove declaration of errno.
15931 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15933 * linux-low.c (handle_extended_wait): Do not use "status"
15934 variable uninitialized.
15936 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15938 * server.c (handle_v_attach): Inhibit reporting dll changes.
15940 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15942 * remote-utils.c (prepare_resume_reply): If requested, don't
15943 output "thread:TID" in the T stop reply.
15945 * server.c (disable_packet_vCont, disable_packet_Tthread)
15946 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15947 (handle_query): If requested, disable support for qC, qfThreadInfo
15949 (handle_v_requests): If requested, disable support for vCont.
15950 (gdbserver_show_disableable): New.
15951 (main): Handle --disable-packet and --disable-packet=LIST.
15953 * server.h (disable_packet_vCont, disable_packet_Tthread)
15954 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15956 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15958 * server.c (gdbserver_usage): Mention --version.
15960 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15962 * Makefile.in (gdbreplay.o): New rule.
15964 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15966 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15967 message, not gdbserver.
15969 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15970 Nathan Sidwell <nathan@codesourcery.com>
15971 Joseph Myers <joseph@codesourcery.com>
15973 * acinclude.m4: Include ../../config/acx.m4.
15974 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15975 * configure, config.in: Regenerate.
15976 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15977 * server.c (gdbserver_version): Print PKGVERSION.
15978 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15979 (main): Adjust gdbserver_usage calls.
15980 * gdbreplay.c (version, host_name): Add declarations.
15981 (gdbreplay_version, gdbreplay_usage): New.
15982 (main): Accept --version and --help options.
15984 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15986 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15987 (arm_breakpoint_at): Handle Thumb.
15988 (the_low_target): Add comment.
15990 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15992 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15994 2008-05-09 Doug Evans <dje@google.com>
15996 * server.h (decode_search_memory_packet): Declare.
15997 * remote-utils.c (decode_search_memory_packet): New fn.
15998 * server.c (handle_search_memory_1): New fn.
15999 (handle_search_memory): New fn.
16000 (handle_query): Process qSearch:memory packets.
16002 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16004 * regcache.c (registers_length): Remove.
16005 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16006 full register packet.
16007 * regcache.h (registers_length): Remove prototype.
16008 * server.h (PBUFSIZ): Define to 16384.
16010 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16012 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16013 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16014 powerpc-64l.o, and powerpc-altivec64l.o.
16015 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16016 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16017 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16018 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16019 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16022 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16023 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16024 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16025 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16026 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16027 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16028 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16029 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16030 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16031 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16034 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16035 (init_registers_powerpc_32l): ... this new prototype.
16036 (init_registers_powerpc_32): Remove, replace by ...
16037 (init_registers_powerpc_altivec32l): ... this new prototype.
16038 (init_registers_powerpc_e500): Remove, replace by ...
16039 (init_registers_powerpc_e500l): ... this new prototype.
16040 (init_registers_ppc64): Remove, replace by ...
16041 (init_registers_powerpc_64l): ... this new prototype.
16042 (init_registers_powerpc_64): Remove, replace by ...
16043 (init_registers_powerpc_altivec64l): ... this new prototype.
16044 (ppc_num_regs): Set to 73.
16045 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16046 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16047 (ppc_cannot_store_register): Handle orig_r3 and trap.
16048 (ppc_arch_setup): Update init_registers_... calls.
16049 (ppc_fill_gregset): Handle orig_r3 and trap.
16051 * inferiors.c (clear_inferiors): Reset current_inferior.
16053 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16055 * acinclude.m4: Add override.m4.
16056 * configure: Regenerate.
16058 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16060 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16061 initial call to init_register_ppc64.
16063 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16065 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16066 single powerpc*-*-linux* case.
16067 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16069 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16071 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16072 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16074 * linux-ppc-low.c: Include <elf.h>.
16075 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16076 (ppc_hwcap): New global variable.
16077 (ppc_regmap): Remove __SPE__ #ifdef sections.
16078 (ppc_regmap_e500): New global variable.
16079 (ppc_cannot_store_register): Update __SPE__ special case.
16080 (ppc_get_hwcap): New function.
16081 (ppc_arch_setup): Use it to determine whether inferior supports
16082 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16083 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16084 Do not access registers if target does not support AltiVec.
16085 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16086 Do not access registers if target does not support SPE.
16087 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16089 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16091 * linux-low.c (disabled_regsets, num_regsets): New.
16092 (use_regsets_p): Delete.
16093 (linux_wait_for_process): Clear disabled_regsets.
16094 (regsets_fetch_inferior_registers): Check and set it.
16095 (regsets_store_inferior_registers): Likewise.
16096 (linux_fetch_registers, linux_store_registers): Do not use
16098 (initialize_low): Allocate disabled_regsets.
16100 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16102 * Makefile.in (LIBOBJS): New.
16103 (OBS): Use LIBOBJS.
16104 (memmem.o): New rule.
16105 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16106 * configure: Regenerated.
16108 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16110 * server.c (handle_query): Never return "unsupported" for
16111 qXfer:features:read queries.
16113 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16115 * server.c (get_features_xml): Fix inverted condition.
16116 (handle_query): Always support qXfer:feature:read.
16118 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16120 * server.c (wrapper_argv): New.
16121 (start_inferior): Handle wrapper_argv. If set, expect an extra
16123 (gdbserver_usage): Document --wrapper.
16124 (main): Parse --wrapper.
16126 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16128 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16129 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16130 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16131 (ppc_set_pc): Likewise.
16132 (ppc_arch_setup): New function.
16133 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16134 of collect_register.
16135 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16137 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16139 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16140 instead of linux-ppc64-low.o.
16141 * linux-ppc64-low.c: Remove file.
16142 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16143 (linux-ppc64-low.o): Remove rule.
16145 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16146 (init_registers_powerpc_64): Likewise.
16147 (ppc_regmap): Conditionally define depending on __powerpc64__.
16148 (ppc_cannot_store_register): Do not special-case "fpscr" when
16149 compiled on __powerpc64__.
16150 (ppc_collect_ptrace_register): New function.
16151 (ppc_supply_ptrace_register): New function.
16152 (ppc_breakpoint): Change type to "unsigned int".
16153 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16154 (the_low_target): Conditionally provide initializers for the
16155 arch_setup member depending on __powerpc64__. Install
16156 collect_ptrace_register and supply_ptrace_register members.
16158 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16160 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16161 * server.c (gdbserver_xmltarget): Define.
16162 (get_features_xml): Use it to replace "target.xml" and arch_string.
16164 * configure.srv: Remove srv_xmltarget. Add XML files that were
16165 mentioned there to srv_xmlfiles instead. Remove conditional tests
16166 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16167 srv_xmlfiles and srv_regobj to include all possible choices.
16168 * configure.ac (srv_xmltarget): Remove.
16169 (srv_xmlfiles): Do not add "target.xml".
16170 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16171 checks for supplementary target information.
16172 * configure: Regenerate.
16173 * Makefile.in (XML_TARGET): Remove.
16174 (target.xml): Remove rule.
16175 (clean): Do not clean up target.xml.
16176 (.PRECIOUS): Do not mention target.xml.
16178 * target.h (struct target_ops): Remove arch_string member.
16179 * linux-low.c (linux_arch_string): Remove.
16180 (linux_target_ops): Remove arch_string initializer.
16181 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16182 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16183 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16184 * spu-low.c (spu_arch_string): Remove.
16185 (spu_target_ops): Remove arch_string initializer.
16186 * win32-low.c (win32_arch_string): Remove.
16187 (win32_target_ops): Remove arch_string initializer.
16188 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16189 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16190 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16192 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16194 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16195 by collect_ptrace_register and supply_ptrace_register hooks.
16196 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16197 instead of checking for the_low_target.left_pad_xfer.
16198 (usr_store_inferior_registers): Use collect_ptrace_register callback
16199 instead of checking for the_low_target.left_pad_xfer.
16201 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16202 (s390_supply_ptrace_register): Likewise.
16203 (s390_fill_gregset): Call s390_collect_ptrace_register.
16204 (the_low_target): Update.
16206 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16207 (ppc_supply_ptrace_register): Likewise.
16208 (the_low_target): Update.
16210 * linux-i386-low.c (the_low_target): Update.
16211 * linux-x86-64-low.c (the_low_target): Update.
16213 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16215 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16216 reg-s390.o and reg-s390x.o.
16218 * linux-low.c (new_inferior): New global variable.
16219 (linux_create_inferior, linux_attach): Set it.
16220 (linux_wait_for_process): Call the_low_target.arch_setup after the
16221 target has stopped for the first time.
16222 (initialize_low): Do not call the_low_target.arch_setup.
16224 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16225 (s390_set_pc): Likewise.
16226 (s390_arch_setup): New function.
16227 (the_low_target): Use s390_arch_setup as arch_setup routine.
16229 * regcache.c (realloc_register_cache): New function.
16230 (set_register_cache): Call it for each existing regcache.
16232 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16234 * server.h (init_registers): Remove prototype.
16236 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16237 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16238 instead of init_registers ().
16239 * linux-arm-low.c (init_registers_arm): Add prototype.
16240 (init_registers_arm_with_iwmmxt): Likewise.
16241 (the_low_target): Add initializer for arch_setup field.
16242 * linux-cris-low.c (init_registers_cris): Add prototype.
16243 (the_low_target): Add initializer for arch_setup field.
16244 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16245 (the_low_target): Add initializer for arch_setup field.
16246 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16247 (the_low_target): Add initializer for arch_setup field.
16248 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16249 (the_low_target): Add initializer for arch_setup field.
16250 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16251 (the_low_target): Add initializer for arch_setup field.
16252 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16253 (the_low_target): Add initializer for arch_setup field.
16254 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16255 (init_registers_mips64_linux): Likewise.
16256 (the_low_target): Add initializer for arch_setup field.
16257 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16258 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16259 (the_low_target): Add initializer for arch_setup field.
16260 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16261 (init_registers_powerpc_64): Likewise.
16262 (the_low_target): Add initializer for arch_setup field.
16263 * linux-s390-low.c (init_registers_s390): Add prototype.
16264 (init_registers_s390x): Likewise.
16265 (the_low_target): Add initializer for arch_setup field.
16266 * linux-sh-low.c (init_registers_sh): Add prototype.
16267 (the_low_target): Add initializer for arch_setup field.
16268 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16269 (the_low_target): Add initializer for arch_setup field.
16270 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16271 (the_low_target): Add initializer for arch_setup field.
16273 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16274 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16275 instead of init_registers ().
16276 * win32-arm-low.c (init_registers_arm): Add prototype.
16277 (the_low_target): Add initializer for arch_setup field.
16278 * win32-i386-low.c (init_registers_i386): Add prototype.
16279 (the_low_target): Add initializer for arch_setup field.
16281 * spu-low.c (init_registers_spu): Add prototype.
16282 (initialize_low): Call initialie_registers_spu () instead of
16283 initialize_registers ().
16285 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16287 * server.c (handle_v_requests): When handling the vRun and vAttach
16288 packets, if already debugging a process, don't kill it. Return an
16291 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16293 * server.c (handle_query): Correct length check.
16295 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16297 * win32-low.c (do_initial_child_stuff): Add process handle
16298 parameter. Set current_process_handle and current_process_id from the
16299 parameters. Clear globals.
16300 (win32_create_inferior): Don't set current_process_handle and
16301 current_process_id here. Instead pass them on the call to
16302 do_initial_child_stuff.
16303 (win32_attach): Likewise.
16304 (win32_clear_inferiors): New.
16305 (win32_kill): Don't close the current process handle or the
16306 current thread handle here. Instead call win32_clear_inferiors.
16307 (win32_detach): Don't open a new handle to the process. Call
16308 win32_clear_inferiors.
16309 (win32_join): Don't rely on current_process_handle; open a new
16310 handle using the process id.
16311 (win32_wait): Call win32_clear_inferiors when the inferior process
16314 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16316 * server.c (monitor_show_help): Add "exit".
16318 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16320 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16321 (clean): Add reg-xtensa.c.
16322 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16323 * configure.srv (xtensa*-*-linux*) New target.
16324 * linux-xtensa-low.c: New.
16325 * xtensa-xtregs.c: New.
16327 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16329 * hostio.c: Don't include errno.h.
16330 (errno_to_fileio_errno): Move to hostio-errno.
16331 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16332 error number outputting to the target->hostio_last_error callback.
16333 (hostio_packet_error): Use FILEIO_EINVAL directly.
16334 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16335 calls to hostio_error.
16336 * hostio-errno.c: New.
16337 * server.h (hostio_last_error_from_errno): Declare.
16338 * target.h (target_ops): Add hostio_last_error member.
16339 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16340 as hostio_last_error handler.
16341 * spu-low.c (spu_target_ops): Likewise.
16342 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16343 (wince_hostio_last_error): New functions.
16344 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16345 as hostio_last_error handler.
16346 (win32_target_ops) [!_WIN32_WCE]: Register
16347 hostio_last_error_from_errno as hostio_last_error handler.
16348 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16349 (hostio-errno.o): New rule.
16350 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16351 * configure.srv (srv_hostio_err_objs): New variable. Default to
16353 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16354 * configure: Regenerate.
16356 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16358 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16359 (linux_kill, linux_detach): Clean up the process list.
16360 * remote-utils.c (remote_open): Improve port number parsing.
16361 (putpkt_binary, input_interrupt): Only send interrupts if the target
16363 * server.c (extended_protocol): Make static.
16364 (attached): Define earlier.
16365 (exit_requested, response_needed, program_argv): New variables.
16366 (target_running): New.
16367 (start_inferior): Clear attached here.
16368 (attach_inferior): Set attached here.
16369 (require_running): Define.
16370 (handle_query): Use require_running and target_running. Implement
16372 (handle_v_attach, handle_v_run): New.
16373 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16374 (gdbserver_usage): Update.
16375 (main): Redo argument parsing. Handle --debug and --multi. Handle
16376 --attach along with other options or after the port. Save
16377 program_argv. Support no initial program. Resynchronize
16378 communication with GDB after an error. Handle "monitor exit".
16379 Use require_running and target_running. Always allow the extended
16380 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16381 restart in extended mode.
16382 * README: Refer to the GDB manual. Update --attach usage.
16384 2007-12-20 Andreas Schwab <schwab@suse.de>
16386 * linux-low.c (STACK_SIZE): Define.
16387 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16388 (linux_test_for_tracefork): Likewise.
16390 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16392 * linux-low.c (linux_wait_for_event): Update messages. Do not
16393 reinsert auto-delete breakpoints.
16394 * mem-break.c (struct breakpoint): Change return type of handler to
16396 (set_breakpoint_at): Update handler type.
16397 (reinsert_breakpoint_handler): Return 1 instead of calling
16399 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16401 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16402 * mem-break.h (set_breakpoint_at): Update handler type.
16403 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16404 * win32-low.c (auto_delete_breakpoint): New.
16405 (get_child_debug_event): Use it.
16407 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16409 * configure.ac: Check for pread and pwrite.
16410 * hostio.c (handle_pread): Fall back to lseek and read.
16411 (handle_pwrite): Fall back to lseek and write.
16412 * config.in, configure: Regenerated.
16414 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16416 * server.c (myresume): Add own_buf argument.
16417 (main): Update calls.
16419 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16421 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16422 * remote-utils.c (remote_open): Do not call disable_async_io.
16423 (block_async_io): Delete.
16424 (unblock_async_io): Make static.
16425 (initialize_async_io): New.
16426 * server.c (handle_v_cont): Handle async I/O here.
16427 (myresume): Likewise. Move other common resume tasks here...
16428 (main): ... from here. Call initialize_async_io. Disable async
16429 I/O before the main loop.
16430 * server.h (initialize_async_io): Declare.
16431 (block_async_io, unblock_async_io): Delete prototypes.
16432 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16434 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16436 * remote-utils.c (readchar): Allow binary data in received messages.
16438 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16440 * win32-low.c (attaching): New global.
16441 (win32_create_inferior): Clear the `attaching' global.
16442 (win32_attach): Set the `attaching' global.
16443 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16444 attaching. Only set a breakpoint at the entry point if not
16447 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16449 * server.c (main): Don't report dll events on the initial
16450 connection on attaches.
16452 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16454 * server.c (main): Relax numerical bases supported for the pid of
16455 the --attach command line argument.
16457 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16459 * win32-low.c (win32_attach): Call OpenProcess before
16460 DebugActiveProcess, not after. Add last error output to error
16463 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16465 * win32-low.c (win32_get_thread_context)
16466 (win32_set_thread_context): New functions.
16467 (thread_rec): Use win32_get_thread_context.
16468 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16469 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16472 2007-12-03 Leo Zayas
16473 Pedro Alves <pedro_alves@portugalmail.pt>
16475 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16477 (child_add_thread): Minor cleanup.
16478 (child_continue): Resume artificially suspended threads before
16479 calling ContinueDebugEvent.
16480 (suspend_one_thread): New.
16481 (fake_breakpoint_event): New.
16482 (get_child_debug_event): Change return type to int. Check here if
16483 gdb sent an interrupt request. If a soft interrupt was requested,
16484 fake a breakpoint event. Return 0 if there is no event to handle,
16486 (win32_wait): Don't check here if gdb sent an interrupt request.
16487 Ensure there is a valid event to handle.
16488 (win32_request_interrupt): Add soft interruption method as last
16491 2007-12-03 Leo Zayas
16492 Pedro Alves <pedro_alves@portugalmail.pt>
16494 * win32-low.h (win32_thread_info): Add descriptions to the
16495 structure members. Replace `suspend_count' counter by a
16497 * win32-low.c (thread_rec): Update condition of when to get the
16498 context from the inferior. Rely on ContextFlags being set if it
16499 has already been retrieved. Only suspend the inferior thread if
16500 we haven't already. Warn if that fails.
16501 (continue_one_thread): s/suspend_count/suspended/. Only call
16502 ResumeThread once. Warn if that fails.
16504 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16506 * win32-low.c (win32_wait): Don't read from the inferior when it
16507 has already exited.
16509 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16511 * Makefile.in (win32_low_h): New variable.
16512 (win32-low.o): Add dependency on $(win32_low_h).
16513 (win32-arm-low.o, win32-i386-low.o): New rules.
16515 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16517 * hostio.c: Correct copyright year.
16519 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16521 * Makefile.in (OBS): Add hostio.o.
16522 (hostio.o): New rule.
16523 * server.h (handle_vFile): Declare.
16524 * hostio.c: New file.
16525 * server.c (handle_v_requests): Take packet_len and new_packet_len
16526 for binary packets. Call handle_vFile.
16527 (main): Update call to handle_v_requests.
16529 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16531 * linux-low.c: Include <sched.h>.
16533 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16535 * linux-low.c (linux_tracefork_grandchild): New.
16536 (linux_tracefork_child): Use clone.
16537 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16539 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16541 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16543 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16545 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16547 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16549 * inferiors.c (change_inferior_id): Delete.
16550 (add_pid_to_list, pull_pid_from_list): New.
16551 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16552 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16553 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16554 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16555 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16556 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16557 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16558 (using_threads): Always set to 1.
16559 (handle_extended_wait): New.
16560 (add_process): Do not set TID.
16561 (linux_create_inferior): Set must_set_ptrace_flags.
16562 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16563 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16564 (linux_thread_alive): Rename TID argument to LWPID.
16565 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16566 (linux_wait_for_event): Do not use TID or check using_threads. Update
16567 call to dead_thread_notify. Call handle_extended_wait.
16568 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16569 (send_sigstop): Delete sigstop_sent.
16570 (wait_for_sigstop): Avoid TID.
16571 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16572 (linux_test_for_tracefork): New.
16573 (linux_lookup_signals): Use thread_db_active and
16574 linux_supports_tracefork_flag.
16575 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16576 * linux-low.h (get_process_thread): Avoid TID.
16577 (struct process_ifo): Move thread_known and tid to the end. Remove
16579 (linux_attach_lwp, thread_db_init): Update prototypes.
16580 * server.h (change_inferior_id): Delete prototype.
16581 (add_pid_to_list, pull_pid_from_list): New prototypes.
16582 * thread-db.c (thread_db_use_events): New.
16583 (find_first_thread): Rename to...
16584 (find_one_thread): ...this. Update callers and messages. Do not
16585 call fatal. Check thread_db_use_events. Do not call
16586 change_inferior_id or new_thread_notify.
16587 (maybe_attach_thread): Update. Do not call new_thread_notify.
16588 (thread_db_init): Set thread_db_use_events. Check use_events.
16589 * utils.c (fatal, warning): Correct message prefix.
16591 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16593 * Makefile.in (clean): Remove new files.
16594 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16595 (powerpc-64.o, powerpc-64.c): New rules.
16596 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16597 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16599 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16601 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16602 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16603 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16604 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16605 (target_regsets): Add AltiVec and SPE register sets.
16606 * configure.ac: Check for AltiVec and SPE.
16607 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16608 (ppc_fill_vrregset, ppc_store_vrregset): New.
16609 (target_regsets): Add AltiVec register set.
16610 * configure: Regenerated.
16612 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16614 * linux-low.c (O_LARGEFILE): Define.
16615 (linux_read_memory): Use /proc/PID/mem.
16616 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16617 * configure, config.in: Regenerated.
16619 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16621 * linux-low.c (linux_wait_for_event): Do not pass signals while
16624 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16626 * win32-low.c (create_process): New.
16627 (win32_create_inferior): Use create_process instead of
16628 CreateProcess. If create_process failed retry appending an ".exe"
16629 suffix. Store the GetLastError result immediatelly after
16630 create_process calls and use it on the call to error.
16632 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16634 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16636 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16638 * configure.ac: Switch license to GPLv3.
16640 2007-08-01 Michael Snyder <msnyder@access-company.com>
16642 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16644 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16646 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16648 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16649 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16650 CloseToolhelp32Snapshot.
16651 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16652 CloseToolhelp32Snapshot.
16654 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16656 * server.c (main): Check for inferior exit before main loop.
16658 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16660 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16661 instead of on tmp_desc.
16663 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16664 Daniel Jacobowitz <dan@codesourcery.com>
16666 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16667 (add_thread): Minor cleanups.
16668 (clear_inferiors): Move lower in the file. Clear the DLL
16670 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16671 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16672 (xml_escape_text): New.
16673 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16675 (handle_v_cont): Report errors.
16676 (gdbserver_version): Update.
16677 (main): Correct size of own_buf. Do not report initial DLL events.
16678 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16679 (unloaded_dll, xml_escape_text): New.
16680 * win32-low.c (enum target_waitkind): Update comments.
16681 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16682 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16683 (win32_EnumProcessModules, win32_GetModuleInformation)
16684 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16685 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16686 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16687 (win32_Module32First, win32_Module32Next, load_toolhelp)
16688 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16689 (get_child_debug_event): Handle DLL events.
16690 (win32_wait): Likewise.
16692 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16694 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16695 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16697 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16699 * win32-low.c (handle_output_debug_string): Ignore event if not
16702 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16704 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16706 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16708 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16710 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16712 * inferiors.c (change_inferior_id): Add comment.
16713 * linux-low.c (check_removed_breakpoint): Add an early
16714 prototype. Improve debug output.
16715 (linux_attach): Doc update.
16716 (linux_detach_one_process, linux_detach): Clean up before releasing
16718 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16719 * linux-low.h (struct process_info): Doc improvement.
16720 * mem-break.c (delete_all_breakpoints): New.
16721 * mem-break.h (delete_all_breakpoints): New prototype.
16722 * thread-db.c (find_first_thread): New.
16723 (thread_db_create_event): Call it instead of
16724 thread_db_find_new_threads. Clean up unused variables.
16725 (maybe_attach_thread): Remove first thread handling.
16726 (thread_db_find_new_threads): Use find_first_thread.
16727 (thread_db_get_tls_address): Likewise.
16729 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16731 * thread-db.c (thread_db_find_new_threads): Add prototype.
16732 (thread_db_create_event): Check for the main thread before adding
16734 (maybe_attach_thread): Only enable event reporting if TID == 0.
16735 (thread_db_get_tls_address): Check for new threads.
16737 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16739 * linux-low.c (linux_create_inferior): Try execv before execvp.
16740 * spu-low.c (spu_create_inferior): Likewise.
16742 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16744 * linux-low.c (linux_create_inferior): Change execv to execvp.
16745 * spu-low.c (spu_create_inferior): Likewies.
16747 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16749 * Makefile.in (clean): Clean new files instead of deleted ones.
16750 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16751 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16753 * configure.srv: Specify XML files and new regformats for MIPS and
16755 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16756 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16757 an entry for the restart register.
16758 (mips_cannot_fetch_register, mips_cannot_store_register)
16759 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16760 register names to match the XML descriptions.
16761 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16762 restart register instead of $0.
16764 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16765 Markus Deuling <deuling@de.ibm.com>
16767 * remote-utils.c (decode_xfer_write): New function.
16768 * server.h (decode_xfer_write): Add prototype.
16769 * server.c (handle_query): Add PACKET_LEN argument. Support
16770 qXfer:spu:read and qXfer:spu:write packets.
16771 (main): Pass packet_len to handle_query.
16772 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16773 * target.h (target_ops): Add qxfer_spu.
16775 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16777 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16778 accessing non-seekable spufs files.
16780 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16782 * server.c (handle_query): Add reply for qC packet.
16784 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16785 Leo Zayas <lerele@champenstudios@com>
16787 * server.h (check_remote_input_interrupt_request): New function.
16788 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16789 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16790 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16791 (check_remote_input_interrupt_request): New function.
16792 * server.h (check_remote_input_interrupt_request): Declare.
16793 * win32-low.c (winapi_DebugBreakProcess,
16794 winapi_GenerateConsoleCtrlEvent): New typedefs.
16795 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16797 (win32_wait): Check for remote interrupt request
16798 with check_remote_input_interrupt_request.
16799 (win32_request_interrupt): New function.
16800 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16802 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16804 * win32-low.c (debug_registers_changed,
16805 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16806 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16807 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16808 (thread_rec): Get context using the low target.
16809 (child_add_thread): Call thread_added on the low target,
16810 which does the same thing.
16812 (do_initial_child_stuff): Remove debug registers references.
16813 Set context using the low target. Resume threads after
16814 setting the contexts.
16815 (child_continue): Remove dead variable. Remove debug
16816 registers references.
16817 (child_fetch_inferior_registers): Go through the low target.
16818 (do_child_store_inferior_registers): Remove.
16819 (child_store_inferior_registers): Go through the low target.
16820 (win32_resume): Remove debug registers references.
16821 Set context using the low target.
16822 (handle_exception): Change return type to void. Don't record
16823 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16824 first chance exception.
16825 (get_child_debug_event): Change return type to void. Remove
16826 goto loop. Always return after waiting for debug event.
16827 (win32_wait): Convert to switch statement. Handle spurious
16830 * win32-i386-low.c (debug_registers_changed,
16831 debug_registers_used): New.
16832 (initial_stuff): Rename to ...
16833 (i386_initial_stuff): ... this. Clear debug registers
16835 (store_debug_registers): Delete.
16836 (i386_get_thread_context): New.
16837 (load_debug_registers): Delete.
16838 (i386_set_thread_context): New.
16839 (i386_thread_added): New.
16840 (single_step): Rename to ...
16841 (i386_single_step): ... this.
16842 (do_fetch_inferior_registers): Rename to ...
16843 (i386_fetch_inferior_register): ... this.
16844 (i386_store_inferior_register): New.
16845 (the_low_target): Adapt to new interface.
16847 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16848 (arm_get_thread_context): New.
16849 (arm_set_thread_context): New.
16851 (do_fetch_inferior_registers): Rename to ...
16852 (arm_fetch_inferior_register): ... this.
16853 (arm_store_inferior_register): New.
16854 (arm_wince_breakpoint): Reimplement as unsigned long.
16855 (arm_wince_breakpoint_len): Define.
16856 (the_low_target): Adapt to new interface.
16858 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16859 load_debug_registers. Add get_thread_context, set_thread_context,
16860 thread_added and store_inferior_register. Rename
16861 fetch_inferior_registers to fetch_inferior_register.
16862 (regptr): Remove declaration.
16864 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16866 * linux-low.c (linux_detach): Change return type to int. Return 0.
16867 * spu-low.c (spu_detach): Likewise.
16869 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16871 * target.h (target_ops): Change return type of detach to int.
16873 (join_inferior): New.
16874 * server.c (main): Don't skip detach support on mingw32.
16875 If the inferior doesn't support detaching return error.
16876 Call join_inferior instead of using waitpid.
16877 * linux-low.c (linux_join): New.
16878 (linux_target_op): Add linux_join.
16879 * spu-low.c (spu_join): New.
16880 (spu_target_ops): Add spu_join.
16881 * win32-low.c (win32_detach): Adapt to new interface.
16882 Reopen current_process_handle before detaching. Issue a child
16883 resume before detaching.
16885 (win32_target_op): Add win32_join.
16887 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16889 * win32-low.c (win32-attach): Fix return value.
16890 * target.h (target_ops): Describe ATTACH return values.
16892 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16894 * win32-low.c (GETPROCADDRESS): Define.
16895 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16896 (winapi_DebugSetProcessKillOnExit): Likewise.
16897 (win32_create_inferior): Force usage of ansi CreateProcessA.
16898 (win32_attach): Use GETPROCADDRESS.
16899 (win32_detach): Likewise.
16901 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16903 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16905 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16907 * win32-low.c: Commit leftover changes from 2007-03-29.
16909 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16911 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16912 fields short instead of int. Add explicit padding.
16913 (i387_cache_to_fsave): Remove unnecessary casts.
16914 (i387_fsave_to_cache): Doc fix.
16915 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16917 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16919 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16920 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16922 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16924 * configure.srv (arm*-*-mingw32ce*): Move near the other
16927 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16929 * configure.ac: Add errno checking.
16930 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16931 sys/file.h and malloc.h.
16932 (AC_CHECK_DECLS): Add perror.
16933 (srv_mingwce): Handle.
16934 * configure.srv (i[34567]86-*-cygwin*): Add
16935 win32-i386-low.o to srv_tgtobj.
16936 (i[34567]86-*-mingw*): Likewise.
16937 (arm*-*-mingw32ce*): Add case.
16938 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16939 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16940 [__MINGW32CE__] (strerror): New function.
16941 [__MINGW32CE__] (errno): Define to GetLastError.
16942 [__MINGW32CE__] (COUNTOF): New macro.
16943 (remote_open): Remove extra close call.
16944 * mem-break.c (delete_breakpoint_at): New function.
16945 * mem-break.h (delete_breakpoint_at): Declare.
16946 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16947 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16948 [USE_WIN32API] (read, write): Add char* casts.
16949 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16950 * server.h: Include wincecompat.h on Windows CE.
16951 [HAVE_ERRNO_H]: Check.
16952 (perror): Declare if not declared.
16953 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16954 (perror_with_name): Remove errno declaration.
16955 * wincecompat.h: New.
16956 * wincecompat.c: New.
16957 * win32-low.h: New.
16958 * win32-arm-low.c: New.
16959 * win32-i386-low.c: New.
16960 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16961 (OUTMSG2): Make it safe.
16963 (COUNTOF): New macro.
16964 (NUM_REGS): Get it from the low target.
16965 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16966 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16967 (thread_rec): Let low target handle debug registers.
16968 (child_add_thread): Likewise.
16969 (child_init_thread_list): Likewise.
16970 (continue_one_thread): Likewise.
16972 (do_child_fetch_inferior_registers): Move to ...
16973 * win32-i386-low.c: ... here, and rename to ...
16974 (do_fetch_inferior_registers): ... this.
16975 * win32-low.c (child_fetch_inferior_registers):
16976 Go through the low target.
16977 (do_child_store_inferior_registers): Use regptr.
16978 (strwinerror): New function.
16979 (win32_create_inferior): Handle Windows CE.
16980 Use strwinerror instead of strerror on Windows error
16981 codes. Add program to the error output.
16982 Don't close the main thread handle on Windows CE.
16983 (win32_attach): Use coredll.dll on Windows CE.
16984 (win32_kill): Close current process and current
16986 (win32_detach): Use coredll.dll on Windows CE.
16987 (win32_resume): Let low target handle debug registers, and
16989 (handle_exception): Add/Remove initial breakpoint. Avoid
16990 non-existant WSTOPSIG on Windows CE.
16991 (win32_read_inferior_memory): Cast to remove warning.
16992 (win32_arch_string): Go through the low target.
16993 (initialize_low): Call set_breakpoint_data with the low
16994 target's breakpoint.
16995 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16996 FOP_REGNUM, mappings): Move to ...
16997 * win32-i386-low.c: ... here.
16998 * win32-low.c (win32_thread_info): Move to ...
16999 * win32-low.h: ... here.
17000 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17001 win32-arm-low.c and wincecompat.c.
17002 (all:): Add $EXEEXT.
17003 (install-only:): Likewise.
17004 (gdbserver:): Likewise.
17005 (gdbreplay:): Likewise.
17006 * config.in: Regenerate.
17007 * configure: Regenerate.
17009 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17011 * win32-low.c: Rename typedef thread_info to
17012 win32_thread_info throughout.
17014 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17016 * win32-i386-low.c: Rename to ...
17017 * win32-low.c: ... this.
17018 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17019 * Makefile.in: Likewise.
17021 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17023 * remote-utils.c (monitor_output): Constify msg parameter.
17024 * server.h (monitor_output): Likewise.
17025 * win32-i386-low.c (handle_output_debug_string): New.
17026 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17027 handle_output_debug_string.
17028 (get_child_debug_event): Likewise.
17030 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17032 * server.c (main): Correct strtoul check.
17034 2007-03-27 Jon Ringle <jon@ringle.org>
17036 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17038 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17040 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17042 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17044 * terminal.h: Check HAVE_SGTTY_H.
17046 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17048 * remote-utils.c (remote_open): Print out the assigned port number.
17050 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17052 * remote-utils.c (monitor_output): New function.
17053 * server.c (debug_threads): Define here.
17054 (monitor_show_help): New function.
17055 (handle_query): Handle qRcmd.
17056 (main): Do not handle 'd' packet.
17057 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17058 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17061 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17063 * Makefile.in (EXEEXT): New.
17064 (clean): Use $(EXEEXT).
17066 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17068 * target.h (target_ops): Rename send_signal to request_interrupt,
17069 and remove enum target_signal parameter.
17070 * linux-low.c (linux_request_interrupt): Rename from
17071 linux_send_signal, and always send SIGINT.
17072 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17073 and always send SIGINT.
17074 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17076 (input_interrupt): Likewise.
17078 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17080 * server.c (get_features_xml): Check if target implemented
17082 * win32-i386-low.c (win32_arch_string): New.
17083 (win32_target_ops): Add win32_arch_string as arch_string member.
17085 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17087 * spu-low.c (spu_arch_string): New.
17088 (spu_target_ops): Add spu_arch_string.
17090 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17092 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17093 * configure.ac: Do not check for terminal.h.
17094 * configure, config.in: Regenerated.
17096 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17098 * Makefile.in (OBS): Add $(XML_BUILTIN).
17099 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17101 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17102 (arm-with-iwmmxt.c): New.
17103 * config.in, configure: Regenerate.
17104 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17105 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17106 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17107 (arm*-*-linux*): Add iWMMXt and regset support.
17108 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17109 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17110 (arm_store_wmmxregset, target_regsets): New.
17111 * server.c (get_features_xml): Take annex argument. Check builtin
17113 (handle_query): Handle multiple annexes.
17115 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17117 * remote-utils.c [USE_WIN32API] (read, write): Define.
17118 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17121 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17123 * linux-i386-low.c (the_low_target): Set arch_string.
17124 * linux-x86-64-low.c (the_low_target): Likewise.
17125 * linux-low.c (linux_arch_string): New.
17126 (linux_target_ops): Add it.
17127 * linux-low.h (struct linux_target_ops): Add arch_string.
17128 * server.c (write_qxfer_response): Use const void * for DATA.
17129 (get_features_xml): New.
17130 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17131 * target.h (struct target_ops): Add arch_string method.
17133 2007-01-03 Denis Pilat <denis.pilat@st.com>
17134 Daniel Jacobowitz <dan@codesourcery.com>
17136 * linux-low.c (linux_kill): Handle being called with no threads.
17137 * win32-i386-low.c (win32_kill): Likewise.
17138 (get_child_debug_event): Clear current_process_handle.
17140 2006-12-30 Denis PILAT <denis.pilat@st.com>
17141 Daniel Jacobowitz <dan@codesourcery.com>
17143 * remote-utils.c (remote_open): Check the type of specified
17144 serial port devices before opening them.
17145 * server.c (main): Kill the inferior if an error occurs during
17146 the first remote_open.
17148 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17150 * README: Update supported targets.
17152 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17154 * Makefile.in (clean): Remove reg-mips64.c.
17155 (reg-mips64.c, reg-mips64.o): New rules.
17156 * configure.srv: Handle mips64. Include regset support for mips.
17157 * linux-mips-low.c (union mips_register): New.
17158 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17159 (mips_breakpoint, mips_breakpoint_at): Use int.
17160 (mips_collect_register, mips_supply_register)
17161 (mips_collect_register_32bit, mips_supply_register_32bit)
17162 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17163 (mips_store_fpregset, target_regsets): New.
17164 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17166 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17168 * configure.srv: Add target "spu*-*-*".
17169 * Makefile.in (clean): Remove reg-spu.c.
17170 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17171 * spu-low.c: New file.
17173 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17175 * configure.ac: Correct td_thr_tls_get_addr test.
17176 * configure: Regenerated.
17178 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17180 * linux-low.c (linux_wait_for_event): Reformat. Use the
17181 pass_signals array.
17182 * remote-utils.c (decode_address_to_semicolon): New.
17183 * server.c (pass_signals, handle_general_set): New.
17184 (handle_query): Mention QPassSignals for qSupported.
17185 (main): Call handle_general_set.
17186 * server.h (pass_signals, decode_address_to_semicolon): New.
17188 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17190 * server.c (handle_query): Correct error handling for read_auxv.
17192 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17194 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17195 and srv_linux_thread_db to yes.
17196 * linux-s390-low.c (s390_fill_gregset): New function.
17197 (target_regsets): Define data structure.
17199 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17201 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17202 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17203 * config.in, configure: Regenerated.
17204 * inferiors.c (gdb_id_to_thread): New function.
17205 (gdb_id_to_thread_id): Use it.
17206 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17207 * linux-low.h (struct process_info): Add th member.
17208 (thread_db_get_tls_address): New prototype.
17209 * remote-utils.c (decode_address): Make non-static.
17210 * server.c (handle_query): Handle qGetTLSAddr.
17211 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17212 * target.h (struct target_ops): Add get_tls_address.
17213 * thread-db.c (maybe_attach_thread): Save the thread handle.
17214 (thread_db_get_tls_address): New.
17216 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17218 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17219 (linux_resume_one_process): Take a siginfo_t *. Update all
17220 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17221 (struct pending_signals): Add a siginfo_t.
17222 (linux_wait_for_process): Always set last_status.
17223 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17224 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17225 * linux-low.h (struct process_info): Add last_status.
17227 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17229 * remote-utils.c (try_rle): New function.
17230 (putpkt_binary): Use it.
17232 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17234 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17235 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17236 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17237 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17238 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17241 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17243 * server.c (terminal_fd): New variable.
17244 (old_foreground_pgrp): Likewise.
17245 (restore_old_foreground_pgrp): New function.
17246 (start_inferior): Record the terminal file descriptor in terminal_fd
17247 and its original foreground group in old_foreground_pgrp. Register
17248 restore_old_foreground_pgrp with atexit().
17250 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17252 * server.c (handle_query): Correct qPart to qXfer.
17254 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17256 * configure.ac: Check for more headers which are missing on
17257 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17258 * configure.srv: Add Cygwin and mingw32.
17259 * remote-utils.c: Don't include headers unconditionally which
17260 are missing on mingw32. Include <winsock.h> for mingw32.
17261 (remote_open): Adjust for mingw32 support. Flush
17262 standard error after writing to it.
17263 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17264 (unblock_async_io, enable_async_io, disable_async_io)
17265 (readchar, getpkt): Update for Winsock support.
17266 (prepare_resume_reply): Expect a protocol signal number.
17267 * server.c: Disable <sys/wait.h> on mingw32.
17268 (start_inferior): Adjust for mingw32 support. Flush
17269 standard error after writing to it.
17270 (attach_inferior): Likewise. Use protocol signal
17272 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17274 * win32-i386-low.c: New file.
17275 * Makefile.in (XM_CLIBS): Set.
17276 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17277 (win32-i386-low.o): New dependency rule.
17278 * linux-low.c (linux_wait): Use target signal numbers.
17279 * target.h (struct target_ops): Doc fix.
17280 * server.h (target_signal_to_name): New prototype.
17281 * gdbreplay.c: Don't include headers unconditionally which
17282 are missing on mingw32. Include <winsock.h> for mingw32.
17283 (remote_close, remote_open): Adjust for Winsock support.
17284 * configure, config.in: Regenerated.
17286 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17288 * server.c (decode_xfer_read, write_qxfer_response): New.
17289 (handle_query): Take a packet length argument. Handle
17290 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17291 the qSupported response.
17292 (main): Update call to handle_query.
17294 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17296 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17297 (putpkt_binary): Renamed from putpkt and adjusted for binary
17299 (putpkt): New wrapper for putpkt_binary.
17300 (readchar): Don't mask off the high bit.
17301 (decode_X_packet): New function.
17302 * server.c (main): Call putpkt_binary if a handler sets the packet
17303 length. Save the length of the incoming packet. Handle 'X'.
17304 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17306 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17308 * server.c (handle_query): Handle qSupported.
17310 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17312 * remote-utils.c (all_symbols_looked_up): New variable.
17313 (look_up_one_symbol): Check it.
17314 * server.h (look_up_one_symbol): New declaration.
17315 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17317 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17319 * Makefile.in (linux-arm-low.o): Update dependencies.
17320 * linux-arm-low.c: Include "gdb_proc_service.h".
17321 (PTRACE_GET_THREAD_AREA): Define.
17322 (ps_get_thread_area): New function.
17324 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17326 * configure.srv (m68k*-*-uclinux*): New target.
17327 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17328 (linux_resume_one_process): Remove extraneous cast.
17329 (linux_read_offsets): New.
17330 (linux_target_op): Add linux_read_offsets on mmuless systems.
17331 * server.c (handle_query): Add qOffsets logic.
17332 * target.h (struct target_ops): Add read_offsets.
17334 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17336 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17337 (PTRACE_GET_THREAD_AREA): Define.
17338 (ps_get_thread_area): New function.
17339 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17340 (linux-x86-64-low.o): Update.
17342 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17344 * configure.ac: Remove checks for prfpregset_t.
17345 * gdb_proc_service.h: New file.
17346 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17347 new "gdb_proc_service.h".
17348 * proc-service.c: Likewise.
17349 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17350 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17351 * Makefile.in (gdb_proc_service_h): Updated.
17352 * configure, config.in: Regenerated.
17354 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17356 * remote-utils.c (prepare_resume_reply): Move declaration
17357 of gdb_id_from_wait to the top of the block.
17359 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17361 * linux-low.c (regsets_store_inferior_registers): Read the regset
17362 from the target before filling it.
17364 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17366 * server.c (attach_inferior): Return SIGTRAP for a successful
17369 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17371 * Makefile.in (OBS): Add version.o.
17372 (STAGESTUFF): Delete.
17373 (version.o): Add dependencies.
17374 (version.c): Replace rule.
17375 (clean): Remove version.c.
17376 * server.c (gdbserver_version): New.
17377 (gdbserver_usage): Use printf.
17378 (main): Handle --version and --help.
17379 * server.h (version, host_name): Add declarations.
17381 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17393 * linux-x86-64-low.c:
17395 * linux-s390-low.c:
17396 * linux-ppc64-low.c:
17398 * linux-mips-low.c:
17399 * linux-m68k-low.c:
17400 * linux-m32r-low.c:
17403 * linux-ia64-low.c:
17404 * linux-i386-low.c:
17405 * linux-crisv32-low.c:
17417 * gdbserver.1: Add (C) after Copyright. Update the FSF
17420 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17422 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17423 (arm_breakpoint_at): Recognize both breakpoints.
17424 (the_low_target): Use the correct breakpoint instruction.
17426 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17428 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17429 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17430 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17431 (the_low_target): Update.
17433 2005-10-25 Andreas Schwab <schwab@suse.de>
17435 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17437 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17438 (ia64_num_regs): Reduce to 462.
17440 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17442 * acinclude.m4: Correct quoting.
17443 * aclocal.m4: Regenerated.
17445 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17446 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17447 (thread_db_init): Call thread_db_err_str.
17448 * configure.ac: Check for TD_VERSION.
17449 * config.in, configure: Regenerated.
17451 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17453 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17455 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17457 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17458 is not available. Define HAVE_PTRACE_GETREGS if it is.
17459 * config.in, configure: Regenerated.
17460 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17461 * linux-i386-low.c, linux-m68k-low.c: Update to use
17462 HAVE_PTRACE_GETREGS.
17463 * linux-low.c (regsets_fetch_inferior_registers)
17464 (regsets_store_inferior_registers): Only return 0 if we processed
17466 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17467 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17469 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17471 * inferiors.c (struct thread_info): Add gdb_id.
17472 (add_thread): Add gdb_id argument.
17473 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17474 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17475 calls to add_thread.
17476 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17477 * server.c (handle_query): Use thread_to_gdb_id.
17478 (handle_v_cont, main): Use gdb_id_to_thread_id.
17479 * server.h (add_thread): Update prototype.
17480 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17483 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17485 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17486 left-padded registers.
17487 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17488 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17490 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17492 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17493 * configure: Regenerate.
17494 * config.in: Regenerate.
17495 * server.h (NEED_DECLARATION_STRERROR):
17496 Replace with !HAVE_DECL_STRERROR.
17498 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17500 * linux-low.c (linux_wait, linux_send_signal): Don't test
17501 an unsigned long variable for > 0 if it could be MAX_ULONG.
17502 * server.c (myresume): Likewise.
17503 * target.c (set_desired_inferior): Likewise.
17505 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17507 * configure.ac: Simplify and improve check for socklen_t.
17508 * configure, config.in: Regenerate.
17510 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17512 * acconfig.h: Remove.
17513 * configure.ac: Add a test for socklen_t. Use three-argument
17514 AC_DEFINE throughout.
17515 * config.in: Regenerated using autoheader 2.59.
17516 * configure: Regenerated.
17518 * gdbreplay.c (socklen_t): Provide a default.
17519 (remote_open): Use socklen_t.
17520 * remote-utils.c (socklen_t): Provide a default.
17521 (remote_open): Use socklen_t.
17522 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17525 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17527 * linux-low.c (linux_read_memory, linux_write_memory)
17528 (linux_read_auxv): Likewise.
17529 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17530 (check_mem_write): Likewise.
17531 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17533 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17534 (registers_from_string, register_data): Likewise.
17535 * server.c (handle_query, main): Likewise.
17536 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17537 (decode_M_packet): Likewise.
17538 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17539 * target.h (struct target_ops): Update read_memory, write_memory,
17541 (read_inferior_memory, write_inferior_memory): Update.
17542 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17543 to unsigned char *.
17544 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17545 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17546 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17547 linux-s390-low.c, linux-sh-low.c: Update for changes in
17548 read_inferior_memory and the_low_target->breakpoint.
17550 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17552 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17553 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17554 * configure.srv: Add powerpc64-*-linux*.
17555 * linux-ppc64-low.c: New file.
17557 2005-05-23 Orjan Friberg <orjanf@axis.com>
17559 * linux-cris-low.c: New file with support for CRIS.
17560 * linux-crisv32-low.c: Ditto for CRISv32.
17561 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17562 (clean): Add reg-cris.c and reg-crisv32.c.
17563 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17564 reg-crisv32.o, and reg-crisv32.c to make rules.
17565 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17566 recognized targets.
17568 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17570 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17571 of sizeof (PTRACE_XFER_TYPE).
17572 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17574 2005-05-12 Orjan Friberg <orjanf@axis.com>
17576 * target.h (struct target_ops): Add insert_watchpoint,
17577 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17578 pointers for hardware watchpoint support.
17579 * linux-low.h (struct linux_target_ops): Ditto.
17580 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17581 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17582 to linux_target_ops.
17583 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17585 * server.c (main): Recognize 'Z' and 'z' packets.
17587 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17589 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17590 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17591 (the_low_target): Add new members.
17593 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17595 * proc-service.c (ps_lgetregs): Search all_processes instead of
17598 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17600 * server.c (start_inferior): Change return type to int.
17601 (attach_inferior): Change sigptr to int *.
17602 (handle_v_cont, handle_v_requests): Change signal to int *.
17603 (main): Change signal to int.
17605 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17607 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17608 * configure.srv: Add m32r*-*-linux*.
17609 * linux-m32r-low.c: New file.
17611 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17613 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17615 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17617 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17618 Take unsigned long arguments for PIDs.
17619 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17620 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17621 (wait_for_sigstop, linux_resume_one_process)
17622 (regsets_fetch_inferior_registers, linux_send_signal)
17623 (linux_read_auxv): Likewise. Update the types of variables holding
17624 PIDs. Update format string specifiers.
17625 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17626 * remote-utils.c (prepare_resume_reply): Likewise.
17627 * server.c (cont_thread, general_thread, step_thread)
17628 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17630 (handle_query): Update format specifiers.
17631 (handle_v_cont, main): Use strtoul for thread IDs.
17632 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17633 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17634 (general_thread, step_thread, thread_from_wait)
17635 (old_thread_from_wait): Update.
17636 * target.h (struct thread_resume): Use unsigned long for THREAD.
17637 (struct target_ops): Use unsigned long for arguments to attach and
17640 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17642 * acinclude.m4: Include bfd/bfd.m4 directly.
17643 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17644 <agriffis@toolchain.org>.
17645 * aclocal.m4, configure: Regenerated.
17647 2005-01-07 Andrew Cagney <cagney@gnu.org>
17649 * configure.ac: Rename configure.in, require autoconf 2.59.
17650 * configure: Re-generate.
17652 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17654 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17655 LIBS when finished.
17656 * aclocal.m4: Regenerated.
17657 * configure: Regenerated.
17659 2004-11-21 Andreas Schwab <schwab@suse.de>
17661 * linux-m68k-low.c (m68k_num_gregs): Define.
17662 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17663 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17664 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17665 (m68k_breakpoint_at): New. Add to the_low_target.
17667 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17668 srv_linux_thread_db to yes.
17670 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17672 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17673 (ARCH_SET_FS): Likewise.
17674 (ARCH_GET_FS): Likewise.
17675 (ARCH_GET_GS): Likewise.
17677 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17679 * linux-i386-low.c (ps_get_thread_area): New.
17680 * linux-x86-64-low.c (ps_get_thread_area): New.
17681 * linux-low.c: Include <sys/syscall.h>.
17682 (linux_kill_one_process): Don't kill the first thread here.
17683 (linux_kill): Kill the first thread here.
17684 (kill_lwp): New function.
17685 (send_sigstop, linux_send_signal): Use it.
17686 * proc-service.c: Clean up #ifdefs.
17687 (fpregset_info): Delete.
17688 (ps_lgetregs): Update and enable implementation.
17689 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17691 * remote-utils.c (struct sym_cache, symbol_cache): New.
17692 (input_interrupt): Print a clearer message.
17693 (async_io_enabled): New variable.
17694 (enable_async_io, disable_async_io): Use it. Update comments.
17695 (look_up_one_symbol): Use the symbol cache.
17696 * thread-db.c (thread_db_look_up_symbols): New function.
17697 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17699 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17701 * configure.in: Test for -rdynamic.
17702 * configure: Regenerated.
17703 * Makefile (INTERNAL_LDFLAGS): New.
17704 (gdbserver, gdbreplay): Use it.
17706 2004-09-02 Andrew Cagney <cagney@gnu.org>
17708 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17710 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17712 * linux-low.c (linux_wait): Clear all_processes list also.
17714 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17716 * linux-low.c: Include <errno.h>. Remove extern declaration of
17719 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17721 * gdbreplay.c, server.h, utils.c: Update copyright years.
17723 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17725 * server.c (main): Print child status or termination signal from
17726 variable 'signal', not 'sig'.
17728 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17730 * linux-low.c (linux_read_memory): Change return type to
17731 int. Check for and return error from ptrace().
17732 * target.c (read_inferior_memory): Change return type to int. Pass
17733 back return status from the_target->read_memory().
17734 * target.h (struct target_ops): Adapt *read_memory() prototype.
17736 (read_inferior_memory): Adapt prototype.
17737 * server.c (main): Return an error packet if
17738 read_inferior_memory() returns an error.
17740 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17742 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17743 Unify with other clean targets.
17745 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17747 * server.c (handle_v_cont): Call set_desired_inferior.
17749 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17751 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17753 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17755 * linux-low.c (linux_wait): Unblock async I/O.
17756 (linux_resume): Block and enable async I/O.
17757 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17758 * server.h (block_async_io, unblock_async_io): Add prototypes.
17760 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17762 * remote-utils.c (remote_open): Print a status notice after
17763 opening a TCP port.
17764 * server.c (attach_inferior): Print a status notice after
17767 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17769 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17771 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17773 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17775 * server.c, target.h: Update copyright years.
17777 2004-02-25 Roland McGrath <roland@redhat.com>
17779 * target.h (struct target_ops): New member `read_auxv'.
17780 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17781 * linux-low.c (linux_read_auxv): New function.
17782 (linux_target_ops): Initialize `read_auxv' member to that.
17784 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17786 Committed by Jim Blandy <jimb@redhat.com>.
17788 * linux-s390-low.c (s390_num_regs): Update.
17789 (s390_regmap): Remove control registers. Use __s390x__ predefine
17790 instead of GPR_SIZE to distiguish s390 and s390x targets.
17792 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17794 * linux-low.c: Update copyright year.
17795 (check_removed_breakpoint): Clear pending_is_breakpoint.
17796 (linux_set_resume_request, linux_queue_one_thread)
17797 (resume_status_pending_p): New functions.
17798 (linux_continue_one_thread): Use process->resume.
17799 (linux_resume): Only resume threads if there are no pending events.
17800 * linux-low.h (struct process_info): Add resume request
17803 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17805 * regcache.c (new_register_cache): Clear the allocated register
17806 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17808 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17810 * linux-low.c (linux_resume): Take a struct thread_resume *
17812 (linux_wait): Update call.
17813 (resume_ptr): New static variable.
17814 (linux_continue_one_thread): Renamed from
17815 linux_continue_one_process. Use resume_ptr.
17816 (linux_resume): Use linux_continue_one_thread.
17817 * server.c (handle_v_cont, handle_v_requests): New functions.
17818 (myresume): New function.
17819 (main): Handle 'v' case.
17820 * target.h (struct thread_resume): New type.
17821 (struct target_ops): Change argument of "resume" to struct
17823 (myresume): Delete macro.
17825 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17827 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17828 (uninstall): Support DESTDIR.
17830 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17832 * configure.srv: Add xscale*linux copy of arm*linux entry.
17834 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17836 * linux-arm-low.c (arm_reinsert_addr): New function.
17837 (the_low_target): Add arm_reinsert_addr.
17839 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17841 * mem-break.c: Remove whitespace at end of file.
17843 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17845 * configure.in: Check whether we need to prototype strerror.
17846 * server.h: Optionally prototype strerror.
17847 * gdbreplay.c (perror_with_name): Use strerror.
17848 * linux-low.c (linux_attach_lwp): Use strerror.
17849 * utils.c (perror_with_name): Use strerror.
17850 * config.in, configure: Regenerated.
17852 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17854 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17855 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17857 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17859 * Makefile.in (SFILES): Update.
17860 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17861 low-sun3.c: Remove files.
17863 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17865 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17866 (linux_detach_one_process, linux_detach): New functions.
17867 (linux_target_ops): Add linux_detach.
17868 * server.c (main): Handle 'D' packet.
17869 * target.h (struct target_ops): Add "detach" member.
17870 (detach_inferior): Define.
17872 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17874 From Kelley Cook <kelleycook@wideopenwest.com>:
17875 * configure.srv: Accept i[34567]86 variants.
17877 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17879 * linux-low.c (linux_wait_for_event): Correct comment typos.
17880 (linux_resume_one_process): Call check_removed_breakpoint.
17881 (linux_send_signal): New function.
17882 (linux_target_ops): Add linux_send_signal.
17883 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17885 * target.h (struct target_ops): Add send_signal.
17887 2003-05-29 Jim Blandy <jimb@redhat.com>
17889 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17890 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17891 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17892 away part of the register's value.
17894 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17896 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17897 (linux_wait_for_event, linux_init_signals): Likewise.
17899 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17901 * configure.in: Check for stdlib.h.
17902 * configure: Regenerated.
17903 * config.in: Regenerated.
17905 2003-01-04 Andreas Schwab <schwab@suse.de>
17907 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17909 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17911 * Makefile.in: Remove obsolete code.
17913 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17915 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17916 defined(PT_FPR0_HI).
17918 2002-11-17 Stuart Hughes <seh@zee2.com>
17920 * linux-arm-low.c (arm_num_regs): Increase.
17921 (arm_regmap): Include status register.
17923 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17925 * linux-low.c (register_addr): Remove incorrect -1 check.
17927 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17929 * linux-low.c (linux_create_inferior): Call setpgid. Return
17931 (unstopped_p, linux_signal_pid): Remove.
17932 (linux_target_ops): Remove linux_signal_pid.
17933 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17934 global instead of target method.
17935 * target.h (struct target_ops): Remove signal_pid. Update comment
17936 for create_inferior.
17937 * server.c (signal_pid): New variable.
17938 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17939 gdbserver. Set the child to be the foreground process group.
17940 (attach_inferior): Set signal_pid.
17942 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17944 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17946 2002-08-20 Jim Blandy <jimb@redhat.com>
17948 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17951 2002-08-01 Andrew Cagney <cagney@redhat.com>
17953 * Makefile.in: Make chill references obsolete.
17955 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17957 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17958 * configure: Regenerate.
17959 * config.in: Regenerate.
17961 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17963 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17964 (perror_with_name, remote_close, remote_open, expect, play): Static.
17966 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17968 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17969 byte offsets instead of an array of indexes.
17970 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17972 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17974 * regcache.c: Add comment.
17976 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17978 * thread-db.c: New file.
17979 * proc-service.c: New file.
17980 * acinclude.m4: New file.
17981 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17982 proc-service.o, and thread-db.o.
17983 (linux-low.o): Add USE_THREAD_DB.
17984 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17985 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17986 * aclocal.m4: Regenerated.
17987 * config.in: Regenerated.
17988 * configure: Regenerated.
17989 * configure.in: Check for proc_service.h, sys/procfs.h,
17990 thread_db.h, and linux/elf.h headrs.
17991 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17992 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17993 Check for -lthread_db and thread support.
17994 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17995 PowerPC, and SuperH.
17996 * i387-fp.c: Constify arguments.
17997 * i387-fp.h: Likewise.
17998 * inferiors.c: (struct thread_info): Renamed from
17999 `struct inferior_info'. Remove PID member. Use generic inferior
18000 list header. All uses updated.
18001 (inferiors, signal_pid): Removed.
18002 (all_threads): New variable.
18003 (get_thread): Define.
18004 (add_inferior_to_list): New function.
18005 (for_each_inferior): New function.
18006 (change_inferior_id): New function.
18007 (add_inferior): Removed.
18008 (remove_inferior): New function.
18009 (add_thread): New function.
18010 (free_one_thread): New function.
18011 (remove_thread): New function.
18012 (clear_inferiors): Use for_each_inferior and free_one_thread.
18013 (find_inferior): New function.
18014 (find_inferior_id): New function.
18015 (inferior_target_data): Update argument type.
18016 (set_inferior_target_data): Likewise.
18017 (inferior_regcache_data): Likewise.
18018 (set_inferior_regcache_data): Likewise.
18019 * linux-low.c (linux_bp_reinsert): Remove.
18020 (all_processes, stopping_threads, using_thrads)
18021 (struct pending_signals, debug_threads, pid_of): New.
18022 (inferior_pid): Replace with macro.
18023 (struct inferior_linux_data): Remove.
18024 (get_stop_pc, add_process): New functions.
18025 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18026 Use add_process and add_thread.
18027 (linux_attach_lwp): New function, based on old linux_attach. Use
18028 add_process and add_thread. Set stop_expected for new threads.
18029 (linux_attach): New function.
18030 (linux_kill_one_process): New function.
18031 (linux_kill): Kill all LWPs.
18032 (linux_thread_alive): Use find_inferior_id.
18033 (check_removed_breakpoints, status_pending_p): New functions.
18034 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18035 Update. Use WNOHANG. Wait for cloned processes also. Update process
18036 struct for the found process.
18037 (linux_wait_for_event): New function.
18038 (linux_wait): Use it. Support LWPs.
18039 (send_sigstop, wait_for_sigstop, stop_all_processes)
18040 (linux_resume_one_process, linux_continue_one_process): New functions.
18041 (linux_resume): Support LWPs.
18042 (REGISTER_RAW_SIZE): Remove.
18043 (fetch_register): Use register_size instead. Call supply_register.
18044 (usr_store_inferior_registers): Likewise. Call collect_register.
18045 Fix recursive case.
18046 (regsets_fetch_inferior_registers): Improve error message.
18047 (regsets_store_inferior_registers): Add debugging.
18048 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18049 (unstopped_p, linux_signal_pid): New functions.
18050 (linux_target_ops): Add linux_signal_pid.
18051 (linux_init_signals): New function.
18052 (initialize_low): Call it. Initialize using_threads.
18053 * regcache.c (inferior_regcache_data): Add valid
18055 (get_regcache): Fetch registers lazily. Add fetch argument
18056 and update all callers.
18057 (regcache_invalidate_one, regcache_invalidate): New
18059 (new_register_cache): Renamed from create_register_cache.
18060 Return the new regcache.
18061 (free_register_cache): Change argument to a void *.
18062 (registers_to_string, registers_from_string): Call get_regcache
18063 with fetch flag set.
18064 (register_data): Make static. Pass fetch flag to get_regcache.
18065 (supply_register): Call get_regcache with fetch flag clear.
18066 (collect_register): Call get_regcache with fetch flag set.
18067 (collect_register_as_string): New function.
18068 * regcache.h: Update.
18069 * remote-utils.c (putpkt): Flush after debug output and use
18071 Handle input interrupts while waiting for an ACK.
18072 (input_interrupt): Use signal_pid method.
18073 (getpkt): Flush after debug output and use stderr.
18074 (outreg): Use collect_register_as_string.
18075 (new_thread_notify, dead_thread_notify): New functions.
18076 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18077 and general_thread.
18078 (look_up_one_symbol): Flush after debug output.
18079 * server.c (step_thread, server_waiting): New variables.
18080 (start_inferior): Don't use signal_pid. Update call to mywait.
18081 (attach_inferior): Update call to mywait.
18082 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18083 (main): Don't fetch/store registers explicitly. Use
18084 set_desired_inferior. Support proposed ``Hs'' packet. Update
18086 * server.h: Update.
18087 (struct inferior_list, struct_inferior_list_entry): New.
18088 * target.c (set_desired_inferior): New.
18089 (write_inferior_memory): Constify.
18090 (mywait): New function.
18091 * target.h: Update.
18092 (struct target_ops): New signal_pid method.
18093 (mywait): Removed macro, added prototype.
18095 * linux-low.h (regset_func): Removed.
18096 (regset_fill_func, regset_store_func): New.
18097 (enum regset_type): New.
18098 (struct regset_info): Add type field. Use new operation types.
18099 (struct linux_target_ops): stop_pc renamed to get_pc.
18100 Add decr_pc_after_break and breakpoint_at.
18101 (get_process, get_thread_proess, get_process_thread)
18102 (strut process_info, all_processes, linux_attach_lwp)
18103 (thread_db_init): New.
18105 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18106 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18107 (the_low_target): Add new members.
18108 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18109 (i386_store_fpxregset): Constify.
18110 (target_regsets): Add new kind identifier.
18111 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18112 (i386_set_pc): Add debugging.
18113 (i386_breakpoint_at): New function.
18114 (the_low_target): Add new members.
18115 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18116 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18117 (mips_breakpoint_at): New.
18118 (the_low_target): Add new members.
18119 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18120 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18121 (the_low_target): Add new members.
18122 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18123 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18124 (the_low_target): Add new members.
18125 * linux-x86-64-low.c (target_regsets): Add new kind
18128 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18130 From Martin Pool <mbp@samba.org>:
18131 * server.c (gdbserver_usage): New function.
18134 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18136 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18137 stop_at -> stop_pc.
18139 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18141 * Makefile.in: Remove obsolete code.
18143 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18145 * linux-low.c (regsets_fetch_inferior_registers),
18146 (regsets_store_inferior_registers): Removed cast to int from
18148 * regcache.h: Added declaration of struct inferior_info.
18150 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18152 * inferiors.c (struct inferior_info): Add regcache_data.
18153 (add_inferior): Call create_register_cache.
18154 (clear_inferiors): Call free_register_cache.
18155 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18156 * regcache.c (struct inferior_regcache_data): New.
18157 (registers): Remove.
18158 (get_regcache): New function.
18159 (create_register_cache, free_register_cache): New functions.
18160 (set_register_cache): Don't initialize the register cache here.
18161 (registers_to_string, registers_from_string, register_data): Call
18163 * regcache.h: Add prototypes.
18164 * server.h: Likewise.
18166 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18168 * mem-break.c: New file.
18169 * mem-break.h: New file.
18170 * Makefile.in: Add mem-break.o rule; update server.h
18172 * inferiors.c (struct inferior_info): Add target_data
18174 (clear_inferiors): Free target_data member if set.
18175 (inferior_target_data, set_inferior_target_data): New functions.
18176 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18177 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18178 * linux-low.c (linux_bp_reinsert): New variable.
18179 (struct inferior_linux_data): New.
18180 (linux_create_inferior): Use set_inferior_target_data.
18181 (linux_attach): Likewise. Call add_inferior.
18182 (linux_wait_for_one_inferior): New function.
18183 (linux_wait): Call it.
18184 (linux_write_memory): Add const.
18185 (initialize_low): Call set_breakpoint_data.
18186 * linux-low.h (struct linux_target_ops): Add breakpoint
18188 * server.c (attach_inferior): Remove extra add_inferior
18190 * server.h: Include mem-break.h. Update inferior.c
18192 * target.c (read_inferior_memory)
18193 (write_inferior_memory): New functions.
18194 * target.h (read_inferior_memory)
18195 (write_inferior_memory): Change macros to prototypes.
18196 (struct target_ops): Update comments. Add const to write_memory
18199 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18201 * linux-low.c (usr_store_inferior_registers): Support
18202 registers which are allowed to fail to store.
18203 * linux-low.h (linux_target_ops): Likewise.
18204 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18205 (ppc_cannot_store_register): FPSCR may not be storable.
18207 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18209 * server.h: Include <string.h> if HAVE_STRING_H.
18210 * ChangeLog: Correct paths in last ChangeLog entry.
18212 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18214 * linux-low.h: Remove obsolete prototypes.
18215 (struct linux_target_ops): New.
18216 (extern the_low_target): New.
18217 * linux-low.c (num_regs, regmap): Remove declarations.
18218 (register_addr): Use the_low_target explicitly.
18219 (fetch_register): Likewise.
18220 (usr_fetch_inferior_registers): Likewise.
18221 (usr_store_inferior_registers): Likewise.
18222 * linux-arm-low.c (num_regs): Remove.
18223 (arm_num_regs): Define.
18224 (arm_regmap): Renamed from regmap, made static.
18225 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18227 (arm_cannot_store_register): Renamed from cannot_store_register,
18229 (the_low_target): New.
18230 * linux-i386-low.c (num_regs): Remove.
18231 (i386_num_regs): Define.
18232 (i386_regmap): Renamed from regmap, made static.
18233 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18235 (i386_cannot_store_register): Renamed from cannot_store_register,
18237 (the_low_target): New.
18238 * linux-ia64-low.c (num_regs): Remove.
18239 (ia64_num_regs): Define.
18240 (ia64_regmap): Renamed from regmap, made static.
18241 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18243 (ia64_cannot_store_register): Renamed from cannot_store_register,
18245 (the_low_target): New.
18246 * linux-m68k-low.c (num_regs): Remove.
18247 (m68k_num_regs): Define.
18248 (m68k_regmap): Renamed from regmap, made static.
18249 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18251 (m68k_cannot_store_register): Renamed from cannot_store_register,
18253 (the_low_target): New.
18254 * linux-mips-low.c (num_regs): Remove.
18255 (mips_num_regs): Define.
18256 (mips_regmap): Renamed from regmap, made static.
18257 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18259 (mips_cannot_store_register): Renamed from cannot_store_register,
18261 (the_low_target): New.
18262 * linux-ppc-low.c (num_regs): Remove.
18263 (ppc_num_regs): Define.
18264 (ppc_regmap): Renamed from regmap, made static.
18265 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18267 (ppc_cannot_store_register): Renamed from cannot_store_register,
18269 (the_low_target): New.
18270 * linux-s390-low.c (num_regs): Remove.
18271 (s390_num_regs): Define.
18272 (s390_regmap): Renamed from regmap, made static.
18273 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18275 (s390_cannot_store_register): Renamed from cannot_store_register,
18277 (the_low_target): New.
18278 * linux-sh-low.c (num_regs): Remove.
18279 (sh_num_regs): Define.
18280 (sh_regmap): Renamed from regmap, made static.
18281 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18283 (sh_cannot_store_register): Renamed from cannot_store_register,
18285 (the_low_target): New.
18286 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18287 (the_low_target): New.
18289 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18291 * Makefile.in: Add stamp-h target.
18292 * configure.in: Create stamp-h.
18293 * configure: Regenerated.
18295 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18297 * inferiors.c: New file.
18298 * target.c: New file.
18299 * target.h: New file.
18300 * Makefile.in: Add target.o and inferiors.o. Update
18302 * linux-low.c (inferior_pid): New static variable,
18303 moved from server.c.
18304 (linux_create_inferior): Renamed from create_inferior.
18305 Call add_inferior. Return 0 on success instead of a PID.
18306 (linux_attach): Renamed from myattach.
18307 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18308 (linux_thread_alive): Renamed from mythread_alive.
18309 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18311 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18312 (regsets_store_inferior_registers): Correct error message.
18313 Add missing ``return 0''.
18314 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18315 (linux_store_registers): Renamed from store_inferior_registers.
18316 (linux_read_memory): Renamed from read_inferior_memory.
18317 (linux_write_memory): Renamed from write_inferior_memory.
18318 (linux_target_ops): New structure.
18319 (initialize_low): Call set_target_ops ().
18320 * remote-utils.c (unhexify): New function.
18321 (hexify): New function.
18322 (input_interrupt): Send signals to ``signal_pid''.
18323 * server.c (inferior_pid): Remove.
18324 (start_inferior): Update create_inferior call.
18325 (attach_inferior): Call add_inferior.
18326 (handle_query): New function.
18327 (main): Call handle_query for `q' packets.
18328 * server.h: Include "target.h". Remove obsolete prototypes.
18329 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18331 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18333 * Makefile.in: Add WARN_CFLAGS. Update configury
18335 * configure.in: Check for <string.h>
18336 * configure: Regenerate.
18337 * config.in: Regenerate.
18338 * gdbreplay.c: Include needed system headers.
18339 (remote_open): Remove strchr prototype.
18340 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18341 * regcache.c (supply_register): Change buf argument to const void *.
18342 (supply_register_by_name): Likewise.
18343 (collect_register): Change buf argument to void *.
18344 (collect_register_by_name): Likewise.
18345 * regcache.h: Add missing prototypes.
18346 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18347 * server.c (handle_query): New function.
18348 (attached): New static variable, moved out of main.
18349 (main): Quiet longjmp clobber warnings.
18350 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18351 * utils.c (error): Remove NORETURN.