1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's wait 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 * target.cc (target_wait): Update.
12 * linux-low.cc (linux_target_ops): Update.
13 (linux_wait): Turn into ...
14 (linux_process_target::wait): ... this.
15 * linux-low.h (class linux_process_target): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 (lynx_wait): Turn into ...
18 (lynx_process_target::wait): ... this.
19 * lynx-low.h (class lynx_process_target): Update.
20 * nto-low.cc (nto_target_ops): Update.
21 (nto_wait): Turn into ...
22 (nto_process_target::wait): ... this.
23 * nto-low.h (class nto_process_target): Update.
24 * win32-low.cc (win32_target_ops): Update.
25 (win32_wait): Turn into ...
26 (win32_process_target::wait): ... this.
27 (do_initial_child_stuff): Update.
28 * win32-low.h (class win32_process_target): Update.
30 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
32 Turn process_stratum_target's resume op into a method of
35 * target.h (struct process_stratum_target): Remove the target op.
36 (class process_target): Add the target op.
38 Update the derived classes and callers below.
40 * server.cc (resume): Update.
41 * target.cc (target_stop_and_wait): Update.
42 (target_continue_no_signal): Update.
43 (target_continue): Update.
44 * linux-low.cc (linux_target_ops): Update.
45 (linux_resume): Turn into ...
46 (linux_process_target::resume): ... this.
47 * linux-low.h (class linux_process_target): Update.
48 * lynx-low.cc (lynx_target_ops): Update.
49 (lynx_resume): Turn into ...
50 (lynx_process_target::resume): ... this.
51 * lynx-low.h (class lynx_process_target): Update.
52 * nto-low.cc (nto_target_ops): Update.
53 (nto_resume): Turn into ...
54 (nto_process_target::resume): ... this.
55 * nto-low.h (class nto_process_target): Update.
56 * win32-low.cc (win32_target_ops): Update.
57 (win32_resume): Turn into ...
58 (win32_process_target::resume): ... this.
59 (win32_process_target::detach): Update.
60 (do_initial_child_stuff): Update.
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 thread_alive 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 (mythread_alive): Update the macro.
72 Update the derived classes and callers below.
74 * linux-low.cc (linux_target_ops): Update.
75 (linux_thread_alive): Turn into ...
76 (linux_process_target::thread_alive): ... this.
77 (wait_for_sigstop): Update.
78 * linux-low.h (class linux_process_target): Update.
79 * lynx-low.cc (lynx_target_ops): Update.
80 (lynx_thread_alive): Turn into ...
81 (lynx_process_target::thread_alive): ... this.
82 * lynx-low.h (class lynx_process_target): Update.
83 * nto-low.cc (nto_target_ops): Update.
84 (nto_thread_alive): Turn into ...
85 (nto_process_target::thread_alive): ... this.
86 * nto-low.h (class nto_process_target): Update.
87 * win32-low.cc (win32_target_ops): Update.
88 (win32_thread_alive): Turn into ...
89 (win32_process_target::thread_alive): ... this.
90 * win32-low.h (class win32_process_target): Update.
92 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
94 Turn process_stratum_target's join op into a method of
97 * target.h (struct process_stratum_target): Remove the target op.
98 (class process_target): Add the target op.
99 (join_inferior): Update the macro.
101 Update the derived classes and callers below.
103 * linux-low.cc (linux_target_ops): Update.
104 (linux_join): Turn into ...
105 (linux_process_target::join): ... this.
106 * linux-low.h (class linux_process_target): Update.
107 * lynx-low.cc (lynx_target_ops): Update.
108 (lynx_join): Turn into ...
109 (lynx_process_target::join): ... this.
110 * lynx-low.h (class lynx_process_target): Update.
111 * nto-low.cc (nto_target_ops): Update.
112 (nto_process_target::join): Define.
113 * nto-low.h (class nto_process_target): Update.
114 * win32-low.cc (win32_target_ops): Update.
115 (win32_join): Turn into ...
116 (win32_process_target::join): ... this.
117 * win32-low.h (class win32_process_target): Update.
119 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
121 Turn process_stratum_target's mourn op into a method of
124 * target.h (struct process_stratum_target): Remove the target op.
125 (class process_target): Add the target op.
127 Update the derived classes and callers below.
129 * target.cc (target_mourn_inferior): Update.
130 * linux-low.cc (linux_target_ops): Update.
131 (linux_mourn): Turn into ...
132 (linux_process_target::mourn): ... this.
133 (handle_extended_wait): Update.
134 (linux_process_target::kill): Update.
135 (linux_process_target::detach): Update.
136 * linux-low.h (class linux_process_target): Update.
137 * lynx-low.cc (lynx_target_ops): Update.
138 (lynx_mourn): Turn into ...
139 (lynx_process_target::mourn): ... this.
140 * lynx-low.h (class lynx_process_target): Update.
141 * nto-low.cc (nto_target_ops): Update.
142 (nto_mourn): Turn into ...
143 (nto_process_target::mourn): ... this.
144 * nto-low.h (class nto_process_target): Update.
145 * win32-low.cc (win32_target_ops): Update.
146 (win32_mourn): Turn into ...
147 (win32_process_target::mourn): ... this.
148 * win32-low.h (class win32_process_target): Update.
150 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
152 Turn process_stratum_target's detach op into a method of
155 * target.h (struct process_stratum_target): Remove the target op.
156 (class process_target): Add the target op.
157 (detach_inferior): Update the macro.
159 Update the derived classes and callers below.
161 * linux-low.cc (linux_target_ops): Update.
162 (linux_detach): Turn into ...
163 (linux_process_target::detach): ... this.
164 * linux-low.h (class linux_process_target): Update.
165 * lynx-low.cc (lynx_target_ops): Update.
166 (lynx_detach): Turn into ...
167 (lynx_process_target::detach): ... this.
168 * lynx-low.h (class lynx_process_target): Update.
169 * nto-low.cc (nto_target_ops): Update.
170 (nto_detach): Turn into ...
171 (nto_process_target::detach): ... this.
172 * nto-low.h (class nto_process_target): Update.
173 * win32-low.cc (win32_target_ops): Update.
174 (win32_detach): Turn into ...
175 (win32_process_target::detach): ... this.
176 * win32-low.h (class win32_process_target): Update.
178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
180 Turn process_stratum_target's kill op into a method of
183 * target.h (struct process_stratum_target): Remove the target op.
184 (class process_target): Add the target op.
186 Update the derived classes and callers below.
188 * target.cc (kill_inferior): Update.
189 * linux-low.cc (linux_target_ops): Update.
190 (linux_kill): Turn into ...
191 (linux_process_target::kill): ... this.
192 * linux-low.h (class linux_process_target): Update.
193 * lynx-low.cc (lynx_target_ops): Update.
194 (lynx_kill): Turn into ...
195 (lynx_process_target::kill): ... this.
196 * lynx-low.h (class lynx_process_target): Update.
197 * nto-low.cc (nto_target_ops): Update.
198 (nto_kill): Turn into ...
199 (nto_process_target::kill): ... this.
200 * nto-low.h (class nto_process_target): Update.
201 * win32-low.cc (win32_target_ops): Update.
202 (win32_kill): Turn into ...
203 (win32_process_target::kill): ... this.
204 * win32-low.h (class win32_process_target): Update.
206 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
208 Turn process_stratum_target's attach op into a method of
211 * target.h (struct process_stratum_target): Remove the target op.
212 (class process_target): Add the target op.
213 (myattach): Update the macro.
215 Update the derived classes and callers below.
217 * linux-low.cc (linux_target_ops): Update.
218 (linux_attach): Turn into ...
219 (linux_process_target::attach): ... this.
220 * linux-low.h (class linux_process_target): Update.
221 * lynx-low.cc (lynx_target_ops): Update.
222 (lynx_attach): Turn into ...
223 (lynx_process_target::attach): ... this.
224 * lynx-low.h (class lynx_process_target): Update.
225 * nto-low.cc (nto_target_ops): Update.
226 (nto_attach): Turn into ...
227 (nto_process_target::attach): ... this.
228 * nto-low.h (class nto_process_target): Update.
229 * win32-low.cc (win32_target_ops): Update.
230 (win32_attach): Turn into ...
231 (win32_process_target::attach): ... this.
232 * win32-low.h (class win32_process_target): Update.
234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
236 Turn process_stratum_target's post_create_inferior op into a method
239 * target.h (struct process_stratum_target): Remove the target op.
240 (class process_target): Add the target op.
241 (target_post_create_inferior): Update the macro.
242 * target.cc (process_target::post_create_inferior): Define.
244 Update the derived classes and callers below.
246 * linux-low.cc (linux_target_ops): Update.
247 (linux_post_create_inferior): Turn into ...
248 (linux_process_target::post_create_inferior): ... this.
249 * linux-low.h (class linux_process_target): Update.
250 * lynx-low.cc (lynx_target_ops): Update.
251 * nto-low.cc (nto_target_ops): Update.
252 * win32-low.cc (win32_target_ops): Update.
254 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
256 Turn process_stratum_target's create_inferior op into a method of
259 * target.h (struct process_stratum_target): Remove the target op.
260 (class process_target): Add the target op.
261 (create_inferior): Rename the macro to ...
262 (target_create_inferior): ... this.
264 Update the derived classes and callers below.
266 * server.cc (handle_v_run): Update.
267 (captured_main): Update.
268 (process_serial_event): Update.
269 * linux-low.cc (linux_target_ops): Update.
270 (linux_create_inferior): Turn into ...
271 (linux_process_target::create_inferior): ... this.
272 * linux-low.h (class linux_process_target): Update.
273 * lynx-low.cc (lynx_target_ops): Update.
274 (lynx_create_inferior): Turn into ...
275 (lynx_process_target::create_inferior): ... this.
276 * lynx-low.h (class lynx_process_target): Update.
277 * nto-low.cc (nto_target_ops): Update.
278 (nto_create_inferior): Turn into ...
279 (nto_process_target::create_inferior): ... this.
280 * nto-low.h (class nto_process_target): Update.
281 * win32-low.cc (win32_target_ops): Update.
282 (win32_create_inferior): Turn into ...
283 (win32_process_target::create_inferior): ... this.
284 * win32-low.h (class win32_process_target): Update.
286 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
288 * target.h (class process_target): New class definition.
289 (struct process_stratum_target) <pt>: New field with type
291 * linux-low.h (class linux_process_target): Define as a derived
292 class of 'process_target'.
293 * linux-low.cc (linux_target_ops): Add a linux_process_target*
295 * lynx-low.h (class lynx_process_target): Define as a derived
296 class of 'process_target'.
297 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
299 * nto-low.h (class nto_process_target): Define as a derived
300 class of 'process_target'.
301 * nto-low.cc (nto_target_ops): Add an nto_process_target*
303 * win32-low.h (class win32_process_target): Define as a derived
304 class of 'process_target'.
305 * win32-low.cc (win32_target_ops): Add a win32_process_target*
308 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
310 * configure: Regenerate.
312 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
313 Andrew Burgess <andrew.burgess@embecosm.com>
315 * linux-riscv-low.cc: New file.
316 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
317 and nat/riscv-linux-tdesc.c.
318 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
319 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
322 2020-02-14 Tom Tromey <tom@tromey.com>
324 * acinclude.m4: Don't include acx_configure_dir.m4.
325 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
326 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
327 (all, install-only, uninstall, clean-info, clean)
328 (maintainer-clean): Don't recurse.
329 (subdir_do, all-lib): Remove.
330 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
332 (generated_files): Update.
333 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
334 * configure: Rebuild.
335 * configure.ac: Don't configure gnulib or libiberty.
338 2020-02-14 Eli Zaretskii <eliz@gnu.org>
340 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
341 preparing the command line for CreateProcess.
342 (win32_create_inferior): Reflect the program name in debugging
343 output that shows the process and its command line.
345 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
347 * Makefile.in: Rename source files from .c to .cc.
348 * %.c: Rename to %.cc.
349 * configure.ac: Rename server.c to server.cc.
350 * configure: Re-generate.
352 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
354 * Makefile.in: Rename gdbsupport source files from .c to .cc.
356 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
358 * win32-low.c (win32_create_inferior): Set signal_pid.
360 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
361 Pedro Alves <palves@redhat.com>
363 Skip building gdbserver in a cross-configuration.
364 * configure.srv: Set $gdbserver_host depending on whether $target
365 is $host. Use $gdbserver_host instead of $host.
367 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
369 * configure: Re-generate.
371 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
373 * configure: Re-generate.
375 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
377 * acinclude.m4: Update warning.m4 path.
379 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
381 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
382 (handle_exception): Set siginfo_er.
383 (win32_xfer_siginfo): New function.
385 2020-02-07 Tom Tromey <tom@tromey.com>
386 Pedro Alves <palves@redhat.com>
388 * README: Update build documentation.
389 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
391 * configure.ac: Update paths.
392 * configure: Rebuild.
393 * acinclude.m4: Update paths.
394 * Makefile.in: Update include paths.
395 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
396 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
397 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
398 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
399 (%-generated.c): Update paths.
400 * Move entire directory from ../gdb/gdbserver.
402 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
404 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
406 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
408 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
409 assignment instead of srv_linux_obj.
411 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
413 * server.c (handle_qxfer_libraries): Write segment-address with
416 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
418 * Makefile.in (install-strip): New target.
419 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
420 * aclocal.m4: Regenerate.
421 * configure: Regenerate.
422 * configure.ac: Add AM_PROG_INSTALL_STRIP.
424 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
426 * Makefile.in (SFILES): Adjust paths to point to real files.
427 (OBS): Move waitstatus.o to target/waitstatus.o.
428 (TAGS): Transform paths appropriately.
430 (nat/%.o): ... this pattern rule.
432 (target/%.o): ... this pattern rule.
433 * configure.srv: Adjust paths throughout to include nat/ prefix
434 with the revant files.
435 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
436 * configure: Regenerate.
438 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
440 * Makefile.in (TAGS): Remove config files from the recipe.
442 2020-01-14 Tom Tromey <tom@tromey.com>
444 * configure: Rebuild.
445 * configure.ac: Remove any checks that were added to common.m4.
446 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
449 2020-01-14 Tom Tromey <tom@tromey.com>
451 * server.h: Include config.h.
452 * gdbreplay.c: Include config.h.
453 * configure: Rebuild.
454 * configure.ac: Don't source common.host.
455 * acinclude.m4: Update path.
456 * Makefile.in (INCSUPPORT): New variable.
457 (INCLUDE_CFLAGS): Add INCSUPPORT.
458 (SFILES): Update paths.
459 (version-generated.c): Update path to create-version.sh.
460 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
462 2020-01-14 Tom Tromey <tom@tromey.com>
464 * configure.ac (LIBS): Use WIN32APILIBS.
465 (USE_WIN32API): Don't define.
466 * configure: Rebuild.
468 2020-01-14 Tom Tromey <tom@tromey.com>
470 * configure: Rebuild.
472 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
474 * Makefile.in (%-generated.c): Remove rule for files from
477 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
479 * configure: Re-generate.
481 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
483 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
485 * tracepoint.c (stop_tracing, flush_trace_buffer,
486 about_to_request_buffer_space, get_trace_state_variable_value,
487 set_trace_state_variable_value, gdb_collect): Add declaration.
489 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
491 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
492 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
493 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
494 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
495 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
498 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
500 * inferiors.c: Include gdbsupport/common-inferior.h.
502 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
504 * hostio-errno.c: Include hostio.h.
506 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
508 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
511 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
513 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
514 * linux-arm-tdesc.h: Include arch/arm.h.
516 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
518 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
520 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
522 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
523 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
525 2020-01-10 Pedro Alves <palves@redhat.com>
527 * fork-child.c (post_fork_inferior): Pass target down to
529 * inferiors.c (switch_to_thread): Add process_stratum_target
531 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
532 * nto-low.c (nto_target_ops): Now a process_stratum_target.
533 * linux-low.c (linux_target_ops): Now a process_stratum_target.
534 * remote-utils.c (prepare_resume_reply): Pass the target to
536 * target.c (the_target): Now a process_stratum_target.
537 (done_accessing_memory): Pass the target to switch_to_thread.
538 (set_target_ops): Ajust to use process_stratum_target.
539 * target.h (struct target_ops): Rename to ...
540 (struct process_stratum_target): ... this.
541 (the_target, set_target_ops): Adjust.
542 (prepare_to_access_memory): Adjust comment.
543 * win32-low.c (child_xfer_memory): Adjust to use
544 process_stratum_target.
545 (win32_target_ops): Now a process_stratum_target.
547 2020-01-06 Eli Zaretskii <eliz@gnu.org>
548 Pedro Alves <palves@redhat.com>
550 * win32-low.c (get_child_debug_event): Extract the fatal exception
551 from the exit status and convert to the equivalent Posix signal
553 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
554 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
556 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
558 * Makefile.in: Use INSTALL_PROGRAM_ENV.
560 2020-01-01 Joel Brobecker <brobecker@adacore.com>
562 * server.c (gdbserver_version): Change copyright year to 2020.
563 * gdbreplay.c (gdbreplay_version): Likewise.
565 2019-12-19 Christian Biesinger <cbiesinger@google.com>
567 * configure: Regenerate.
568 * configure.ac: Quote variable arguments of test.
570 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
572 * Makefile.in: Fix build with GNU Make 3.81
574 2019-12-16 Tom Tromey <tromey@adacore.com>
576 * server.c (get_exec_file): Constify result.
578 2019-12-10 Christian Biesinger <cbiesinger@google.com>
580 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
581 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
582 * config.in: Regenerate.
583 * configure: Regenerate.
584 * configure.ac: Don't check for strerror.
585 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
586 Call safe_strerror instead of strerror.
587 * server.h (strerror): Remove this now-unnecessary declaration.
588 * tracepoint.c (init_named_socket): Call safe_strerror instead of
590 (gdb_agent_helper_thread): Likewise.
591 * utils.c (perror_with_name): Likewise.
593 2019-11-26 Tom Tromey <tom@tromey.com>
595 * configure, config.in: Rebuild.
597 2019-11-26 Tom Tromey <tom@tromey.com>
599 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
600 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
602 * configure, config.in: Rebuild.
604 2019-11-26 Tom Tromey <tom@tromey.com>
606 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
607 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
608 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
609 * acinclude.m4: Include ax_pthread.m4.
610 * config.in, configure: Rebuild.
612 2019-11-26 Christian Biesinger <cbiesinger@google.com>
614 * debug.c (debug_set_output): Call safe_strerror instead of
616 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
617 (linux_kill_one_lwp): Likewise.
618 (linux_detach_one_lwp): Likewise.
619 (linux_wait_for_event_filtered): Likewise.
620 (store_register): Likewise.
621 * lynx-low.c (lynx_attach): Likewise.
622 * mem-break.c (insert_memory_breakpoint): Likewise.
623 (remove_memory_breakpoint): Likewise.
624 (delete_fast_tracepoint_jump): Likewise.
625 (set_fast_tracepoint_jump): Likewise.
626 (uninsert_fast_tracepoint_jumps_at): Likewise.
627 (reinsert_fast_tracepoint_jumps_at): Likewise.
628 * nto-low.c (nto_xfer_memory): Likewise.
629 (nto_resume): Likewise.
631 2019-11-20 Luis Machado <luis.machado@linaro.org>
633 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
634 instead of register count.
635 * tdesc.c (tdesc_contains_feature): New function.
636 * tdesc.h (tdesc_contains_feature): New prototype.
638 2019-11-15 Christian Biesinger <cbiesinger@google.com>
640 * Makefile.in: Add safe-strerror.c.
641 * configure: Regenerate.
642 * configure.ac: Don't source common.host.
644 2019-11-15 Christian Biesinger <cbiesinger@google.com>
646 * config.in: Regenerate.
647 * configure: Regenerate.
649 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
651 * ax.c (ax_printf): Handle size_t_arg.
653 2019-11-06 Christian Biesinger <cbiesinger@google.com>
655 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
656 * mi/mi-main.c (output_cores): Likewise.
657 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
658 (linux_xfer_osdata_modules): Likewise.
659 * remote.c (register_remote_support_xml): Likewise.
660 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
661 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
663 2019-11-01 Christian Biesinger <cbiesinger@google.com>
665 * configure: Regenerate.
666 * configure.ac: Remove check for strerror_r.
668 2019-10-31 Christian Biesinger <cbiesinger@google.com>
670 * config.in: Regenerate.
671 * configure: Regenerate.
672 * configure.ac: Also check for strerror_r.
674 2019-10-31 Christian Biesinger <cbiesinger@google.com>
676 * ax.h (debug_agent): Remove duplicate declaration.
678 2019-10-26 Tom de Vries <tdevries@suse.de>
680 * linux-aarch64-low.c: Fix typos in comments.
681 * linux-arm-low.c: Same.
683 * linux-ppc-low.c: Same.
684 * proc-service.c: Same.
687 * tracepoint.c: Same.
690 2019-10-25 Tom Tromey <tromey@adacore.com>
692 * utils.c (xstrdup): Remove.
694 2019-10-23 Tom Tromey <tom@tromey.com>
696 * configure, config.in: Rebuild.
698 2019-10-23 Tom Tromey <tom@tromey.com>
700 * configure: Rebuild.
701 * acinclude.m4: Use m4_include, not sinclude.
703 2019-10-17 Tom Tromey <tromey@adacore.com>
705 * configure: Rebuild.
706 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
707 in AC_CONFIG_FILES invocation.
708 * Makefile.in (stamp-h, Makefile): Use new-style config.status
711 2019-10-16 Christian Biesinger <cbiesinger@google.com>
713 * server.c: Include xml-builtin.h.
714 (get_xml_features): Don't declare xml_builtins here.
716 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
718 * Makefile.in: Remove references to vec-ipa.o.
720 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
722 * Makefile.in: Remove references to vec.c.
724 2019-10-02 Christian Biesinger <cbiesinger@google.com>
726 * server.c (server_waiting): Change to bool.
727 (extended_protocol): Likewise.
728 (response_needed): Likewise.
729 (exit_requested): Likewise.
730 (run_once): Likewise.
731 (report_no_resumed): Likewise.
732 (non_stop): Likewise.
733 (disable_packet_vCont): Likewise.
734 (disable_packet_Tthread): Likewise.
735 (disable_packet_qC): Likewise.
736 (disable_packet_qfThreadInfo): Likewise.
737 (handle_general_set): Update.
738 (handle_detach): Update.
739 (handle_monitor_command): Update.
740 (handle_query): Update.
741 (captured_main): Update.
742 (process_serial_event): Update.
743 * server.h (server_waiting): Change to bool.
744 (disable_packet_vCont): Likewise.
745 (disable_packet_Tthread): Likewise.
746 (disable_packet_qC): Likewise.
747 (disable_packet_qfThreadInfo): Likewise.
748 (run_once): Likewise.
749 (non_stop): Likewise.
750 * target.c (target_stop_and_wait): Update.
752 2019-10-02 Tom Tromey <tromey@adacore.com>
754 * Makefile.in (SFILES): Add common-inferior.c.
755 (OBS): Add common-inferior.o.
756 * server.c (startup_with_shell): Don't define.
758 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
760 * linux-low.c (linux_low_read_btrace): Update for change to
763 2019-09-20 Christian Biesinger <cbiesinger@google.com>
765 * debug.c (debug_threads): Remove comment in favor of the header.
766 * debug.h (using_threads): Add declaration.
767 (debug_threads): Add comment.
768 * linux-aarch64-low.c: Include debug.h and remove declaration of
770 * nto-low.c: Likewise.
771 * remote-utils.c: Likewise.
772 * thread-db.c: Likewise.
774 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
776 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
777 and powerpc-cell64l-ipa.o.
778 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
779 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
780 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
783 * spu-low.c: Remove file.
785 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
786 (parse_spufs_run): Remove.
787 (ppc_get_pc): Remove Cell/B.E. support.
788 (ppc_set_pc): Likewise.
789 (ppc_breakpoint_at): Likewise.
790 (ppc_arch_setup): Likewise.
791 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
792 tdesc_powerpc_cell32l.
793 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
794 or init_registers_powerpc_cell32l.
795 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
796 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
797 or init_registers_powerpc_cell32l.
798 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
799 (init_registers_powerpc_cell32l): Remove prototype.
800 (init_registers_powerpc_cell64l): Likewise.
802 * target.h (struct target_ops): Remove qxfer_spu member.
803 * server.c (handle_qxfer_spu): Remove.
804 (qxfer_packets): Remove entry for "spu".
805 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
806 * linux-low.c (SPUFS_MAGIC): Remove.
807 (spu_enumerate_spu_ids): Remove.
808 (linux_qxfer_spu): Remove.
809 (linux_target_ops): Remove qxfer_spu member.
810 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
811 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
812 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
814 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
816 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
817 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
818 * config.in: Regenerate.
819 * configure: Regenerate.
821 2019-08-15 Tom Tromey <tromey@adacore.com>
823 * target.c (target_write_memory): Use gdb::byte_vector.
825 2019-08-15 Tom Tromey <tromey@adacore.com>
827 * tracepoint.c (write_inferior_data_pointer)
828 (write_inferior_integer, write_inferior_int8)
829 (write_inferior_uinteger, m_tracepoint_action_download)
830 (r_tracepoint_action_download, x_tracepoint_action_download)
831 (l_tracepoint_action_download, clear_inferior_trace_buffer)
832 (download_agent_expr, download_tracepoint_1)
833 (download_trace_state_variables, upload_fast_traceframes): Update.
834 * server.c (gdb_write_memory): Update.
835 * remote-utils.c (relocate_instruction): Update.
836 * proc-service.c (ps_pdwrite): Update.
837 * mem-break.c (remove_memory_breakpoint)
838 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
839 (uninsert_fast_tracepoint_jumps_at)
840 (reinsert_fast_tracepoint_jumps_at): Update.
841 * linux-x86-low.c (append_insns)
842 (i386_install_fast_tracepoint_jump_pad)
843 (amd64_write_goto_address, i386_write_goto_address): Update.
844 * linux-s390-low.c (append_insns, s390_write_goto_address):
846 * linux-ppc-low.c (ppc_relocate_instruction)
847 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
848 (ppc_write_goto_address): Update.
849 * linux-aarch64-low.c (append_insns): Update.
850 * target.h (struct target_ops): Update.
851 (write_inferior_memory): Don't declare.
852 * target.c (target_write_memory): Rename from
853 write_inferior_memory. Remove old target_write_memory.
855 2019-08-15 Tom Tromey <tromey@adacore.com>
857 * target.c (write_inferior_memory): Use std::vector.
859 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
862 * configure.ac: Drop enable-libmcheck support.
863 * configure, config.in: Rebuild.
864 * acinclude.m4: Don't include it.
866 2019-07-19 Alan Hayward <alan.hayward@arm.com>
868 * configure.srv: Remove Arm xml files.
870 2019-07-19 Alan Hayward <alan.hayward@arm.com>
872 * configure.srv: Add new files. Remove xml generated files.
873 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
875 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
876 * linux-aarch32-tdesc.c: New file.
877 * linux-aarch32-tdesc.h: New file.
878 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
879 * linux-arm-low.c (init_registers_arm, tdesc_arm)
880 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
881 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
882 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
883 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
884 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
885 (arm_read_description): Call arm_linux_read_description.
886 (initialize_low_arch): Don't init registers.
887 * linux-arm-tdesc.c: New file.
888 * linux-arm-tdesc.h: New file.
890 2019-07-10 Alan Hayward <alan.hayward@arm.com>
892 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
893 Move counter inside for.
894 (arm_read_description): Check ptrace earlier.
895 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
897 2019-07-09 Tom Tromey <tom@tromey.com>
899 * configure: Rebuild.
900 * configure.ac: Change common to gdbsupport.
901 * acinclude.m4: Change common to gdbsupport.
902 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
903 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
904 common to gdbsupport.
905 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
906 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
907 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
908 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
909 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
910 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
911 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
912 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
913 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
914 common to gdbsupport.
916 2019-07-04 Alan Hayward <alan.hayward@arm.com>
918 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
920 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
922 2019-07-04 Alan Hayward <alan.hayward@arm.com>
924 * configure.srv: Remove legacy xml.
925 * linux-aarch64-low.c (initialize_low_arch): Remove
926 initialize_low_tdesc call.
927 * linux-aarch64-tdesc-selftest.c: Remove file.
928 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
929 * linux-x86-low.c (initialize_low_arch): Remove
930 initialize_low_tdesc call.
931 * linux-x86-tdesc-selftest.c: Remove file.
932 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
934 2019-06-20 Tom de Vries <tdevries@suse.de>
936 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
937 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
939 2019-06-19 Tom de Vries <tdevries@suse.de>
941 * debug.h (debug_write): Change return type to ssize_t.
942 * debug.c (debug_write): Same.
944 2019-06-14 Tom Tromey <tom@tromey.com>
946 * configure.ac: Use new path to gnulib.
947 * configure: Rebuild.
948 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
951 2019-06-11 Tom Tromey <tom@tromey.com>
953 * Makefile.in (SFILES): Add alloc.c.
955 (IPA_OBJS): Add alloc-ipa.o.
956 (alloc-ipa.o): New target.
957 (%.o: ../%.c): New pattern rule.
959 2019-06-10 Tom Tromey <tromey@adacore.com>
961 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
962 end warning with a newline.
963 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
965 * thread-db.c (attach_thread): Don't end warning with a newline.
966 (thread_db_notice_clone): Likewise.
967 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
969 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
970 end warning with a newline.
972 2019-06-04 Pedro Alves <palves@redhat.com>
974 * server.c (captured_main): Use make_unique_xstrdup.
976 2019-06-02 Tom Tromey <tom@tromey.com>
978 * gdbreplay.c (fromhex): Remove.
979 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
981 2019-05-29 Tom Tromey <tromey@adacore.com>
983 * configure: Rebuild.
985 2019-05-06 Kevin Buettner <kevinb@redhat.com>
987 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
988 sign extension code on 32-bit builds.
990 2019-05-03 Eli Zaretskii <eliz@gnu.org>
993 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
995 2019-04-19 Tom Tromey <tom@tromey.com>
997 * server.c (struct vstop_notif): Derive from notif_event.
999 (queue_stop_reply): Update.
1000 (remove_all_on_match_ptid): Change type. Rewrite.
1001 (discard_queued_stop_replies): Rewrite.
1002 (in_queued_stop_replies_ptid): Change type.
1003 (in_queued_stop_replies): Rewrite.
1004 (notif_stop): Update.
1005 (queue_stop_reply_callback): Update.
1006 (captured_main): Don't call initialize_notif.
1007 (push_stop_notification): Update.
1008 * notif.c (notif_write_event, handle_notif_ack)
1009 (notif_event_enque, notif_push): Update.
1010 (notif_event_xfree, initialize_notif): Remove.
1011 * notif.h (struct notif_event): Include <list>, not
1013 (struct notif_server) <queue>: Now a std::list.
1014 (notif_event_p): Remove typedef.
1015 (initialize_notif): Don't declare.
1016 (struct notif_event): Add virtual destructor.
1018 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1020 * ax.c (ax_vdebug): Call debug_printf.
1021 * debug.c (debug_write): New function.
1022 * debug.h (debug_write): New declaration.
1023 * linux-low.c (sigchld_handler): Call debug_write.
1025 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1027 * debug.c (debug_set_output): New function.
1028 (debug_vprintf): Send output to debug_file.
1029 (debug_flush): Likewise.
1030 * debug.h (debug_set_output): New declaration.
1031 * server.c (handle_monitor_command): Add debug-file option.
1032 (captured_main): Likewise.
1034 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1036 * debug.c (remote_debug): Add definition.
1037 * debug.h (remote_debug): Add declaration.
1038 * hostio.c (remote_debug): Remove declaration.
1039 * remote-utils.c (struct ui_file): Likewise.
1040 (remote_debug): Likewise.
1041 * remote-utils.h (remote_debug): Likewise,
1042 * server.c (remote_debug): Remove definition.
1044 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1046 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1047 when using a 64-bit gdbserver.
1049 2019-04-09 Tom Tromey <tromey@adacore.com>
1051 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1053 2019-04-08 Tom Tromey <tom@tromey.com>
1055 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1057 (linux_resume_one_lwp): Likewise.
1059 2019-04-08 Tom Tromey <tom@tromey.com>
1061 * gdbreplay.c: Update.
1062 * linux-low.c: Update.
1065 2019-04-08 Tom Tromey <tom@tromey.com>
1067 * server.c: Use C++ exception handling.
1068 * linux-low.c: Use C++ exception handling.
1069 * gdbreplay.c: Use C++ exception handling.
1071 2019-04-08 Tom Tromey <tom@tromey.com>
1073 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1074 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1075 (captured_main, main): Update.
1076 * gdbreplay.c (main): Update.
1078 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1080 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1081 value in argument pointer, return 1 if the entry is found and 0
1082 otherwise. Move comment.
1083 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1084 * linux-low.h (linux_get_auxv): Declare.
1085 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1087 2019-04-05 Tom Tromey <tromey@adacore.com>
1089 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1092 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1094 * linux-low.c (AT_HWCAP2): Add define if not already included.
1096 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1098 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1099 (aarch64_arch_setup): Call linux_get_hwcap.
1100 * linux-arm-low.c (arm_get_hwcap): Remove function.
1101 (arm_read_description): Call linux_get_hwcap.
1102 * linux-low.c (linux_get_auxv): New function.
1103 (linux_get_hwcap): Likewise.
1104 (linux_get_hwcap2): Likewise.
1105 * linux-low.h (linux_get_hwcap): New declaration.
1106 (linux_get_hwcap2): Likewise.
1107 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1108 (ppc_arch_setup): Call linux_get_hwcap.
1109 * linux-s390-low.c (s390_get_hwcap): Remove function.
1110 (s390_arch_setup): Call linux_get_hwcap.
1112 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1113 Jiong Wang <jiong.wang@arm.com>
1115 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1116 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1118 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1120 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1121 Jiong Wang <jiong.wang@arm.com>
1123 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1124 (aarch64_get_hwcap): New function.
1125 (aarch64_arch_setup): Read APIA hwcap.
1127 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1128 Jiong Wang <jiong.wang@arm.com>
1130 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1131 (initialize_low_tracepoint): Likewise.
1132 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1133 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1134 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1135 (aarch64_linux_read_description): Likewise.
1136 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1138 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1140 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1141 i386_create_target_description for 'segments' parameter.
1142 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1143 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1144 * win32-i386-low.c (i386_arch_setup): Likewise.
1146 2019-03-12 Tom Tromey <tromey@adacore.com>
1148 * linux-low.c (iterate_over_lwps): Update.
1150 2019-03-06 Tom Tromey <tom@tromey.com>
1152 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1153 (captured_main): Use SCOPE_EXIT.
1155 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1157 * configure.srv: Use '$enable_unittest' instead of '$development'
1158 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1161 2019-02-27 Tom Tromey <tromey@adacore.com>
1163 * gdbreplay.c (logchar): Handle \r\n.
1165 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1167 * linux-low.c (linux_attach): Add process before lwp.
1168 * server.c (attach_inferior): Check if already attached.
1170 2019-02-07 Tom Tromey <tom@tromey.com>
1172 * x86-tdesc.h: Rename include guard.
1173 * x86-low.h: Add include guard.
1174 * wincecompat.h: Rename include guard.
1175 * win32-low.h: Add include guard.
1176 * utils.h: Rename include guard.
1177 * tracepoint.h: Rename include guard.
1178 * tdesc.h: Rename include guard.
1179 * target.h: Rename include guard.
1180 * server.h: Rename include guard.
1181 * remote-utils.h: Rename include guard.
1182 * regcache.h: Rename include guard.
1183 * nto-low.h: Rename include guard.
1184 * notif.h: Add include guard.
1185 * mem-break.h: Rename include guard.
1186 * lynx-low.h: Add include guard.
1187 * linux-x86-tdesc.h: Add include guard.
1188 * linux-s390-tdesc.h: Add include guard.
1189 * linux-ppc-tdesc-init.h: Add include guard.
1190 * linux-low.h: Add include guard.
1191 * linux-aarch64-tdesc.h: Add include guard.
1192 * linux-aarch32-low.h: Add include guard.
1193 * inferiors.h: Rename include guard.
1194 * i387-fp.h: Rename include guard.
1195 * hostio.h: Rename include guard.
1196 * gdbthread.h: Rename include guard.
1197 * gdb_proc_service.h: Rename include guard.
1198 * event-loop.h: Rename include guard.
1199 * dll.h: Rename include guard.
1200 * debug.h: Rename include guard.
1201 * ax.h: Rename include guard.
1203 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1206 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1207 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1209 2019-01-25 Tom Tromey <tom@tromey.com>
1211 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1213 2019-01-25 Tom Tromey <tom@tromey.com>
1215 * win32-low.c: Fix common/ includes.
1216 * win32-i386-low.c: Fix common/ includes.
1217 * tracepoint.c: Fix common/ includes.
1218 * thread-db.c: Fix common/ includes.
1219 * target.h: Fix common/ includes.
1220 * symbol.c: Fix common/ includes.
1221 * spu-low.c: Fix common/ includes.
1222 * server.h: Fix common/ includes.
1223 * server.c: Fix common/ includes.
1224 * remote-utils.c: Fix common/ includes.
1225 * regcache.h: Fix common/ includes.
1226 * regcache.c: Fix common/ includes.
1227 * nto-x86-low.c: Fix common/ includes.
1228 * notif.h: Fix common/ includes.
1229 * mem-break.h: Fix common/ includes.
1230 * lynx-low.c: Fix common/ includes.
1231 * lynx-i386-low.c: Fix common/ includes.
1232 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1233 * linux-x86-low.c: Fix common/ includes.
1234 * linux-low.c: Fix common/ includes.
1235 * inferiors.h: Fix common/ includes.
1236 * i387-fp.c: Fix common/ includes.
1237 * hostio.c: Fix common/ includes.
1238 * hostio-errno.c: Fix common/ includes.
1239 * gdbthread.h: Fix common/ includes.
1240 * gdbreplay.c: Fix common/ includes.
1241 * fork-child.c: Fix common/ includes.
1242 * event-loop.c: Fix common/ includes.
1244 (enum gdb_agent_op): Fix common/ includes.
1246 2019-01-21 Tom Tromey <tom@tromey.com>
1248 * tracepoint.c: Fix includes.
1249 * remote-utils.c: Fix includes.
1250 * linux-x86-low.c: Fix includes.
1252 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1254 * gdbreplay.c (gdbreplay_version): Update copyright year in
1256 * server.c (gdbserver_version): Likewise.
1258 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1260 * linux-low.c (add_lwp): Switch ordering.
1262 2018-11-29 Tom Tromey <tom@tromey.com>
1264 * win32-low.c (win32_join): Take pid, not process.
1265 * target.h (struct target_ops) <join>: Change argument type.
1266 (join_inferior): Change argument name.
1267 * spu-low.c (spu_join): Take pid, not process.
1268 * server.c (handle_detach): Preserve pid before destroying
1270 * lynx-low.c (lynx_join): Take pid, not process.
1271 * linux-low.c (linux_join): Take pid, not process.
1273 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1275 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1276 (aarch64_cannot_fetch_register): Likewise.
1277 (struct linux_target_ops): Update references.
1279 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1281 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1283 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1285 * configure.srv (ipa_ppc_linux_regobj): Add
1286 powerpc-isa207-htm-vsx32l-ipa.o and
1287 powerpc-isa207-htm-vsx64l-ipa.o.
1288 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1289 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1290 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1291 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1292 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1293 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1294 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1295 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1296 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1297 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1298 (init_registers_powerpc_isa207_htm_vsx32l)
1299 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1300 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1301 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1302 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1303 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1304 (ppc_store_tm_ctarregset): New functions.
1305 (ppc_regsets): Add entries for HTM regsets.
1306 (ppc_arch_setup): Set htm in features struct when needed. Set
1307 sizes for the HTM regsets.
1308 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1309 (initialize_low_arch): Call
1310 init_registers_powerpc_isa207_htm_vsx32l and
1311 init_registers_powerpc_isa207_htm_vsx64l.
1312 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1313 PPC_TDESC_ISA207_HTM_VSX.
1314 (initialize_low_tracepoint): Call
1315 init_registers_powerpc_isa207_htm_vsx32l and
1316 init_registers_powerpc_isa207_htm_vsx64l.
1318 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1320 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1321 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1322 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1323 (ppc_store_pmuregset): New functions.
1324 (ppc_regsets): Add entries for ebb and pmu regsets.
1325 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1326 pmu regsets are available. Set sizes for these regsets.
1328 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1330 * configure.srv (ipa_ppc_linux_regobj): Add
1331 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1332 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1333 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1334 rs6000/powerpc-isa207-vsx32l.xml, and
1335 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1336 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1337 <PPC_TDESC_ISA207_VSX>: New enum value.
1338 (init_registers_powerpc_isa207_vsx32l): Declare.
1339 (init_registers_powerpc_isa207_vsx64l): Declare.
1340 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1341 (ppc_store_tarregset): New function.
1342 (ppc_regsets): Add entry for the TAR regset.
1343 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1344 size for the TAR regsets.
1345 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1346 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1347 and init_registers_powerpc_isa207_vsx64l.
1348 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1349 (initialize_low_tracepoint): Call
1350 init_registers_powerpc_isa207_vsx32l and
1351 init_registers_powerpc_isa207_vsx64l.
1353 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1354 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1356 * configure.srv (ipa_ppc_linux_regobj): Add
1357 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1358 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1359 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1360 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1361 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1362 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1363 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1364 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1365 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1366 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1367 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1368 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1369 (ppc_hwcap): Add comment.
1370 (ppc_hwcap2): New global.
1371 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1372 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1373 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1374 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1375 when needed. Set sizes for the the DSCR and PPR regsets.
1376 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1377 (initialize_low_arch): Call
1378 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1379 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1380 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1381 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1382 (initialize_low_tracepoint): Call
1383 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1384 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1386 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1388 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1390 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1391 Simon Marchi <simark@simark.ca>
1393 * acinclude.m4: Include "../selftest.m4".
1394 * configure: Regenerate.
1395 * configure.ac: Use "GDB_AC_SELFTEST".
1396 * configure.srv: Use "$enable_unittests" instead of
1397 "$development" when checking whether unit tests have been
1399 * server.c (captured_main): Update message informing that
1400 selftests have been disabled.
1402 2018-10-04 Tom Tromey <tom@tromey.com>
1404 * configure: Rebuild.
1406 2018-10-04 Tom Tromey <tom@tromey.com>
1408 * server.c (handle_status): Rename inner "thread".
1409 (process_serial_event): Declare "res" in 'm' case.
1410 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1411 (iterate_over_lwps): Rename inner "thread".
1412 (linux_qxfer_libraries_svr4): Rename inner "len".
1413 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1415 2018-10-01 Gary Benson <gbenson@redhat.com>
1417 * gdb_proc_service.h: Moved common code to
1418 common/gdb_proc_service.h.
1420 2018-10-01 Gary Benson <gbenson@redhat.com>
1422 * gdb_proc_service.h: Synchronize comments and whitespace with
1423 GDB's version of this file.
1425 2018-09-25 Tom Tromey <tom@tromey.com>
1427 * configure: Rebuild.
1428 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1430 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1432 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1433 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1434 ($(IPA_LIB)): Sort IPA_OBJS.
1436 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1438 * Makefile.in: Remove references to $(ADD_DEPS).
1440 2018-09-16 Tom Tromey <tom@tromey.com>
1442 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1444 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1447 2018-09-05 Tom Tromey <tom@tromey.com>
1449 * configure: Rebuild.
1451 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1454 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1456 2018-08-27 Tom Tromey <tom@tromey.com>
1459 * configure: Rebuild.
1461 2018-08-27 Tom Tromey <tom@tromey.com>
1463 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1464 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1465 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1466 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1467 (s390x_emit_stack_adjust): Add casts to unsigned char.
1469 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1473 * server.h (struct client_state) <disable_randomization>:
1476 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1478 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1480 (mips_supply_ptrace_register): Likewise.
1482 2018-07-22 Tom Tromey <tom@tromey.com>
1484 * configure: Rebuild.
1486 2018-07-22 Tom Tromey <tom@tromey.com>
1488 * win32-low.c (win32_create_inferior): Remove unused variables.
1489 * gdbreplay.c (remote_open): Remove unused variable.
1490 * remote-utils.c (remote_prepare): Remove unused variable.
1491 * x86-tdesc.h (X86_TDESC_H): Define.
1492 (amd64_expedite_regs): Define conditionally.
1493 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1494 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1495 * remote-utils.c (readchar): Remove unused variable.
1497 2018-07-13 Pedro Alves <palves@redhat.com>
1499 * linux-low.c (linux_kill): Change parameter to process_info
1500 pointer instead of pid. Adjust.
1501 * lynx-low.c (lynx_kill): Likewise.
1502 * nto-low.c (nto_kill): Likewise.
1503 * spu-low.c (spu_kill): Likewise.
1504 * win32-low.c (win32_kill): Likewise.
1505 * server.c (handle_v_kill, kill_inferior_callback)
1506 (detach_or_kill_for_exit): Adjust.
1507 * target.c (kill_inferior): Change parameter to process_info
1508 pointer instead of pid. Adjust.
1509 * target.h (struct target_ops) <kill>: Change parameter to
1510 process_info pointer instead of pid. Adjust all implementations
1512 (kill_inferior): Likewise.
1514 2018-07-13 Pedro Alves <palves@redhat.com>
1516 * linux-low.c (linux_detach, linux_join): Change parameter to
1517 process_info pointer instead of pid. Adjust.
1518 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1519 * nto-low.c (nto_detach): Likewise.
1520 * spu-low.c (spu_detach, spu_join): Likewise.
1521 * win32-low.c (win32_detach, win32_join): Likewise.
1522 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1523 * target.h (struct target_ops) <detach, join>: Change parameter to
1524 process_info pointer instead of pid. Adjust all implementations
1526 (detach_inferior, join_inferior): Rename 'pid' parameter to
1529 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1530 Jan Kratochvil <jan.kratochvil@redhat.com>
1531 Paul Fertser <fercerpav@gmail.com>
1532 Tsutomu Seki <sekiriki@gmail.com>
1534 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1535 (OBS): Add 'common/netstuff.o'.
1536 (GDBREPLAY_OBS): Likewise.
1537 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1538 (remote_open): Implement support for IPv6
1540 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1542 (handle_accept_event): Accept connections from IPv6 sources.
1543 (remote_prepare): Handle IPv6-style hostnames; implement
1544 support for IPv6 connections.
1545 (remote_open): Implement support for printing connections from
1548 2018-07-11 Pedro Alves <palves@redhat.com>
1551 * mem-break.c (any_persistent_commands): Add process_info
1552 parameter and use it instead of relying on the current process.
1553 Change return type to bool.
1554 * mem-break.h (any_persistent_commands): Add process_info
1555 parameter and change return type to bool.
1556 * server.c (handle_detach): Remove require_running_or_return call.
1557 Look up the process_info for the process we're about to detach.
1558 If not found, return back error to GDB. Adjust
1559 any_persistent_commands call to pass down a process pointer.
1561 2018-07-11 Pedro Alves <palves@redhat.com>
1563 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1564 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1565 instead of collect_register_by_name.
1566 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1567 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1569 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1570 Pedro Alves <palves@redhat.com>
1572 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1574 2018-07-03 Tom Tromey <tom@tromey.com>
1576 * linux-low.c: Update.
1577 * lynx-low.c: Update.
1578 * mem-break.c: Update.
1579 * nto-low.c: Update.
1580 * remote-utils.c: Update.
1582 * spu-low.c: Update.
1584 * win32-low.c: Update.
1586 2018-07-03 Tom Tromey <tom@tromey.com>
1590 2018-07-03 Tom Tromey <tom@tromey.com>
1592 * linux-low.c: Update.
1594 2018-07-03 Tom Tromey <tom@tromey.com>
1598 2018-07-03 Tom Tromey <tom@tromey.com>
1600 * linux-low.c: Update.
1601 * linux-mips-low.c: Update.
1602 * lynx-low.c: Update.
1603 * nto-low.c: Update.
1604 * remote-utils.c: Update.
1606 * spu-low.c: Update.
1608 * thread-db.c: Update.
1610 2018-07-03 Tom Tromey <tom@tromey.com>
1612 * linux-low.c: Update.
1613 * linux-mips-low.c: Update.
1614 * lynx-low.c: Update.
1615 * mem-break.c: Update.
1616 * nto-low.c: Update.
1617 * remote-utils.c: Update.
1619 * spu-low.c: Update.
1621 * tracepoint.c: Update.
1623 2018-07-03 Tom Tromey <tom@tromey.com>
1625 * linux-low.c: Update.
1626 * linux-ppc-low.c: Update.
1627 * linux-x86-low.c: Update.
1628 * proc-service.c: Update.
1630 * spu-low.c: Update.
1631 * thread-db.c: Update.
1632 * win32-low.c: Update.
1634 2018-07-03 Tom Tromey <tom@tromey.com>
1636 * linux-low.c: Update.
1637 * lynx-low.c: Update.
1638 * nto-low.c: Update.
1639 * remote-utils.c: Update.
1640 * spu-low.c: Update.
1641 * thread-db.c: Update.
1642 * win32-low.c: Update.
1644 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1646 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1647 parameter in call to 'amd64_create_target_description'.
1649 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1651 * x86-tdesc.h: Remove executable permission flag.
1653 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1655 * configure.ac: Remove AC_PREREQ, add missing quoting.
1656 * configure: Re-generate.
1657 * config.in: Re-generate.
1658 * aclocal.m4: Re-generate.
1660 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1662 * tracepoint.h (current_traceframe): Remove declaration.
1664 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1666 * linux-aarch64-low.c (is_sve_tdesc): New function.
1667 (aarch64_sve_regs_copy_to_regcache): Likewise.
1668 (aarch64_sve_regs_copy_from_regcache): Likewise.
1669 (aarch64_regs_info): Add SVE checks.
1670 (initialize_low_arch): Initialize SVE.
1672 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1674 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1676 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1678 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1679 (initialize_low_tracepoint): Likewise
1680 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1681 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1683 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1685 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1687 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1689 * server.h (PBUFSIZ): Increase size
1691 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1693 * regcache.c (regcache::raw_compare): New function.
1694 * regcache.h (regcache::raw_compare): New declaration.
1696 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1698 * regcache.c (new_register_cache): Use new.
1699 (free_register_cache): Use delete.
1700 (register_data): Use const.
1701 (supply_register): Move body inside regcache.
1702 (regcache::raw_supply): New override function.
1703 (collect_register): Move body inside regcache.
1704 (regcache::raw_collect): New override function.
1705 (regcache::get_register_status): New override function.
1706 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1708 2018-06-09 Tom Tromey <tom@tromey.com>
1710 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1712 (event_queue): Use std::queue.
1713 (gdb_event_xfree): Remove.
1714 (initialize_event_loop, process_event, wait_for_event): Update.
1716 2018-06-08 Stan Cox <scox@redhat.com>
1718 * win32-low.c (win32_create_inferior): last_ptid and last_status
1719 moved to client_state.
1721 2018-06-08 Pedro Alves <palves@redhat.com>
1723 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1724 common/common-exceptions.o, common/common-utils.o,
1725 common/errors.o, common/print-utils.o and utils.o.
1726 * gdbreplay.c: Include "common-defs.h" instead of the two
1727 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1728 string.h or alloca.h.
1729 (perror_with_name): Delete.
1730 (remote_open): Use xstrdup instead of strdup.
1731 (main): Rename to ...
1732 (captured_main): ... this.
1735 2018-06-08 Tom Tromey <tom@tromey.com>
1737 * linux-low.c (linux_low_read_btrace): Update.
1739 2018-06-04 Stan Cox <scox@redhat.com>
1741 * server.h (struct client_state): New.
1742 * server.c (cont_thread, general_thread, multi_process)
1743 (report_fork_events, report_vfork_events, report_exec_events)
1744 (report_thread_events, swbreak_feature, hwbreak_feature)
1745 (vCont_supported, disable_randomization, pass_signals)
1746 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1747 Moved to client_state.
1748 * remote-utils.c (remote_debug, noack_mode)
1749 (transport_is_reliable): Moved to client_state.
1750 * tracepoint.c (current_traceframe): Moved to client_state.
1753 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1754 linux-low.c, remote-utils.h, target.c: Use client_state.
1756 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1758 * configure.srv: Add new c/h file.
1760 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1762 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1765 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1767 * gdb.arch/mips-fpregset-core.exp: New test.
1768 * gdb.arch/mips-fpregset-core.c: New test source.
1770 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1773 * hostio.c (require_int): Do not report overflow for integers
1774 between 0xfffffff and 0x7fffffff.
1776 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1778 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1779 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1780 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1782 (the_low_target): Wire them.
1784 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1786 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1787 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1788 mode. Call collect_register_by_name with vscr using
1789 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1790 (ppc_store_vrregset): Add and set vscr_offset variable as in
1791 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1794 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1796 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1797 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1798 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1800 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1802 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1803 (ppc_store_vsxregset): Likewise.
1804 (ppc_fill_vrregset): Likewise.
1805 (ppc_store_vrregset): Likewise.
1806 (ppc_fill_evrregset): Likewise.
1807 (ppc_store_evrregset): Likewise.
1808 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1809 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1812 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1814 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1815 wordsize of the inferior. Call ppc_linux_target_wordsize.
1817 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1819 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1820 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1821 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1822 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1823 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1824 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1825 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1826 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1827 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1828 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1829 (tdesc_powerpc_e500l): Remove.
1830 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1831 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1832 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1833 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1835 (ppc_arch_setup): Remove target description matching code. Fill a
1836 ppc_linux_features struct and call ppc_linux_match_description
1839 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1841 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1842 width of the requested register exceeds the width of the
1844 (mips_cannot_store_register): Likewise.
1846 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1848 * linux-mips-low.c (mips_fetch_register): New function. Update
1850 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1851 (the_low_target): Wire `mips_fetch_register'.
1853 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1855 * lynx-i386-low.c (LYNXOS_178): New macro.
1856 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1857 the layout on LynxOS-178.
1858 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1859 handle floating point registers that are not supported by
1862 2018-05-10 Tom Tromey <tom@tromey.com>
1864 * configure: Rebuild.
1866 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1869 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1870 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1871 Use it to set the expedite_regs field in the given tdesc.
1872 * x86-tdesc.h: New file.
1873 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1874 Adjust following the addition of the new expedite_regs parameter
1875 to init_target_desc.
1876 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1877 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1878 (i386_linux_read_description, amd64_linux_read_description):
1879 Adjust following the addition of the new expedite_regs parameter
1880 to init_target_desc.
1881 * lynx-i386-low.c: #include "x86-tdesc.h".
1882 (lynx_i386_arch_setup): Adjust following the addition of the new
1883 expedite_regs parameter to init_target_desc.
1884 * nto-x86-low.c: #include "x86-tdesc.h".
1885 (nto_x86_arch_setup): Adjust following the addition of the new
1886 expedite_regs parameter to init_target_desc.
1887 * win32-i386-low.c: #include "x86-tdesc.h".
1888 (i386_arch_setup): Adjust following the addition of the new
1889 expedite_regs parameter to init_target_desc.
1891 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1894 * win32-low.c (win32_create_inferior): Add call to my_wait
1895 setting last_status global.
1897 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1900 * win32-low.c (create_process): Only call gdb_tilde_expand if
1901 inferior_cwd is not NULL.
1903 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1905 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1906 registers to the cache if their values have changed.
1907 (i387_xsave_to_cache): Provide default values for x87 control
1908 registers when these features are available, but disabled.
1909 * regcache.c (supply_register_by_name_zeroed): New function.
1910 * regcache.h (supply_register_by_name_zeroed): Declare new
1913 2018-05-07 Tom Tromey <tom@tromey.com>
1915 * configure: Rebuild.
1917 2018-05-04 Tom Tromey <tom@tromey.com>
1919 * configure: Rebuild.
1921 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1922 Pedro Alves <palves@redhat.com>
1924 * linux-aarch64-low.c (aarch64_stopped_data_address):
1927 2018-04-27 Tom Tromey <tom@tromey.com>
1929 * configure: Rebuild.
1931 2018-04-23 Tom Tromey <tom@tromey.com>
1933 * configure: Rebuild.
1935 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1937 * Makefile.in (depcomp): Add "..".
1938 (all_deps_files): New and use it.
1940 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1942 * configure.srv (aarch64*-*-linux*): Don't include xml.
1943 (i[34567]86-*-cygwin*): Likewise.
1944 (i[34567]86-*-linux*): Likewise.
1945 (i[34567]86-*-lynxos*): Likewise.
1946 (i[34567]86-*-mingw32ce*): Likewise.
1947 (i[34567]86-*-mingw*): Likewise.
1948 (i[34567]86-*-nto*): Likewise.
1949 (tic6x-*-uclinux): Likewise.
1950 (x86_64-*-linux*): Likewise.
1951 (x86_64-*-mingw*): Likewise.
1952 (x86_64-*-cygwin*): Likewise.
1954 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1956 * tdesc.c: Remove xml parameter.
1958 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1960 * server.c (get_features_xml): Remove cast.
1961 * tdesc.c (void target_desc::accept): Fill in function.
1962 (tdesc_get_features_xml): Remove old xml creation.
1963 (print_xml_feature::visit_pre): Add xml vistor.
1964 * tdesc.h (struct target_desc): Make xmltarget mutable.
1965 (tdesc_get_features_xml): Remove declaration.
1967 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1969 * tdesc.c (tdesc_architecture_name): Add new function.
1970 (tdesc_osabi_name): Likewise.
1971 (tdesc_get_features_xml): Use new functions.
1973 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1975 * tdesc.c (tdesc_create_flags): Remove.
1976 (tdesc_add_flag): Likewise.
1977 (tdesc_named_type): Likewise.
1978 (tdesc_create_union): Likewise.
1979 (tdesc_create_struct): Likewise.
1980 (tdesc_create_vector): Likewise.
1981 (tdesc_add_bitfield): Likewise.
1982 (tdesc_add_field): Likewise.
1983 (tdesc_set_struct_size): Likewise.
1985 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1987 * tdesc.c (~target_desc): Remove implictly deleted items.
1988 (init_target_desc): Iterate all features.
1989 (tdesc_get_features_xml): Use vector.
1990 (tdesc_create_feature): Create feature.
1991 * tdesc.h (tdesc_feature) Remove
1992 (target_desc): Add features.
1994 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1996 * Makefile.in: Add common/tdesc.c
1997 * tdesc.c (init_target_desc): init all reg_defs from register
1999 (tdesc_create_reg): Create tdesc_reg.
2000 * tdesc.h (tdesc_feature): Add register vector.
2002 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2004 * tdesc.h (struct target_desc) <features>: Change type to
2005 std::vector<std::string>.
2006 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2008 (tdesc_get_features_xml): Likewise.
2009 (tdesc_create_feature): Likewise.
2011 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2013 * regcache.c (find_register_by_number): Return a ref.
2014 (find_regno): Use references.
2015 (register_size): Likewise.
2016 (register_data): Likewise.
2017 * tdesc.c (target_desc::~target_desc): Remove free calls.
2018 (target_desc::operator==): Use std::vector compare.
2019 (init_target_desc): Use reference.
2020 (tdesc_create_reg): Use reg constructors.
2021 * tdesc.h (struct target_desc): Replace pointer with object.
2023 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2025 * regcache.c (find_register_by_number): Make static.
2026 (find_regno): Use find_register_by_number
2027 * regcache.h (struct reg): Remove declaration.
2029 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2031 * tdesc.c (target_desc::~target_desc): Move to here.
2032 (target_desc::operator==): Likewise.
2033 * tdesc.h (target_desc::~target_desc): Move from here.
2034 (target_desc::operator==): Likewise.
2036 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2038 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2040 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2042 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2044 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2045 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2046 and init_registers_s390_gs_linux64.
2048 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2050 * linux-s390-low.c (s390_fill_gs): Remove function.
2051 (s390_fill_gsbc): Remove function.
2052 (s390_regsets): Set fill functions for the guarded storage regsets
2055 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2057 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2058 the word size. Add comment.
2059 (s390_get_wordsize): New function.
2060 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2061 pswm with it. Instead, use s390_get_wordsize to determine the
2062 word size first and derive the correct tdesc from that directly.
2064 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2066 * Makefile.in: Include silent-rules.mk.
2067 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2068 (COMPILE): Add ECHO_CXX.
2069 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2070 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2071 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2072 (version-generated.c): Add ECHO_GEN.
2073 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2074 (IPAGENT_COMPILE): Add ECHO_CXX.
2075 (%-generated.c): Add ECHO_REGDAT.
2077 2018-03-14 Tom Tromey <tom@tromey.com>
2080 * ax.c (ax_printf): Special case for NULL.
2082 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2084 * linux-low.c (linux_qxfer_libraries_svr4): Use
2085 xml_escape_text_append.
2087 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2089 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2091 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2093 * server.c (handle_general_set): Remove unnecessary xstrdup.
2095 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2097 * server.c (parse_debug_format_options): Adjust to
2098 delim_string_to_char_ptr_vec changes.
2099 * thread-db.c (thread_db_load_search): Adjust to
2100 dirnames_to_char_ptr_vec changes.
2102 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2104 * target.h (target_enable_btrace, target_disable_btrace)
2105 (target_read_btrace, target_read_btrace_conf): Turn macro into
2106 inline function. Throw error if target method is not defined.
2107 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2108 check for btrace target method. Be prepared to handle exceptions
2109 from btrace target methods.
2111 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2113 * server.c (captured_main): Change order of error message printed
2114 when the current working directory cannot be found.
2116 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2118 * server.c: Include "filenames.h" and "pathstuff.h".
2119 (program_name): Delete variable.
2120 (program_path): New anonymous class.
2121 (get_exec_wrapper): Use "program_path" instead of
2123 (handle_v_run): Likewise.
2124 (captured_main): Likewise.
2125 (process_serial_event): Likewise.
2127 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2129 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2130 (OBJS): Add "pathstuff.o".
2131 * server.c (current_directory): New global variable.
2132 (captured_main): Initialize "current_directory".
2134 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2136 * tdesc.c: Use common/tdesc.h.
2137 * tdesc.h: Likewise.
2139 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2140 Simon Marchi <simon.marchi@ericsson.com>
2142 * Makefile.in: Switch order of make rules.
2144 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2146 * Makefile.in: Add common directory in build.
2147 * configure.ac: Add common reference.
2148 * configure: Regenerate.
2150 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2152 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2153 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2154 * spu-low.c (spu_target_ops): Likewise.
2155 * win32-low.c (win32_target_ops): Likewise.
2156 * server.c (supported_btrace_packets): Report packets unconditionally.
2157 * target.h (target_ops) <supports_btrace>: Remove.
2158 (target_supports_btrace): Remove.
2160 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2162 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2163 (handle_btrace_disable): Change return type to void. Use exceptions
2165 (handle_btrace_general_set): Catch exception and copy message to
2168 2018-02-08 Tom Tromey <tom@tromey.com>
2170 * linux-low.c (install_software_single_step_breakpoints): Use
2171 make_scoped_restore.
2172 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2173 (do_restore_current_thread_cleanup): Remove.
2174 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2177 2018-02-08 Tom Tromey <tom@tromey.com>
2179 * mem-break.c (set_raw_breakpoint_at): Use
2180 gdb::unique_xmalloc_ptr.
2182 2018-01-30 Pedro Alves <palves@redhat.com>
2185 * target.c (target_terminal::terminal_state): Rename to ...
2186 (target_terminal::m_terminal_state): ... this.
2188 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2190 * linux-low.c (handle_extended_wait): Surround call to
2191 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2193 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2195 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2196 linux_ptrace_attach_fail_reason_string now returning an
2198 (linux_attach): Likewise.
2199 * thread-db.c (attach_thread): Likewise.
2201 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2204 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2205 checking for fs_base/gs_base fields in struct user_regs_struct.
2206 * configure: Regenerate.
2208 2018-01-16 Yao Qi <yao.qi@linaro.org>
2211 * linux-low.c (fetch_register): Call supply_register instead of
2214 2018-01-08 Yao Qi <yao.qi@linaro.org>
2215 Simon Marchi <simon.marchi@ericsson.com>
2217 * Makefile.in (OBS): Remove selftest.o.
2218 * configure.ac: Set srv_selftest_objs if $development is true.
2219 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2220 * configure: Re-generated.
2221 * server.c (captured_main): Wrap variable selftest_filter with
2224 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2226 * server.c (parse_debug_format_options): Return std::string.
2227 (handle_monitor_command, captured_main): Adjust.
2229 2018-01-05 Pedro Alves <palves@redhat.com>
2232 * server.c (captured_main): Pass quiet=false to
2233 save_original_signals_state.
2235 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2237 * gdbreplay.c (gdbreplay_version): Update copyright year in
2239 * server.c (gdbserver_version): Likewise.
2241 2017-12-08 Tom Tromey <tom@tromey.com>
2243 * ax.c (ax_printf): Update.
2245 2017-12-07 Yao Qi <yao.qi@linaro.org>
2247 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2248 aarch64_linux_read_description.
2249 * linux-amd64-ipa.c (idx2mask): New array.
2250 (get_ipa_tdesc): Move idx2mask out.
2251 (initialize_low_tracepoint): Initialize target descriptions.
2252 * linux-i386-ipa.c (idx2mask): New array.
2253 (get_ipa_tdesc): Move idx2mask out.
2254 (initialize_low_tracepoint): Initialize target descriptions.
2256 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2258 * tdesc.c (struct tdesc_type): Change return type.
2259 (tdesc_add_flag): Change parameter type.
2260 (tdesc_add_bitfield): Likewise.
2261 (tdesc_add_field): Likewise.
2262 (tdesc_set_struct_size): Likewise.
2264 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2266 * regcache.c (registers_to_string): Remove unused variable.
2268 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2270 * inferiors.c (for_each_inferior_with_data): Remove.
2271 * inferiors.h (for_each_inferior_with_data): Remove.
2272 * server.c (handle_qxfer_threads_worker): Change parameter type.
2273 (handle_qxfer_threads_proper): Use for_each_thread.
2275 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2277 * inferiors.c (for_each_inferior): Remove.
2278 (clear_inferiors): Use for_each_thread.
2279 * inferiors.h (for_each_inferior): Remove.
2280 * linux-low.c (linux_wait_for_event_filtered): Use
2282 (linux_stabilize_threads): Likewise.
2283 * regcache.c (regcache_release): Likewise.
2284 * server.c (gdb_wants_all_threads_stopped): Likewise.
2285 (clear_pending_status_callback): Remove.
2286 (handle_status): Use for_each_thread.
2287 (captured_main): Likewise.
2288 * win32-low.c (child_init_thread_list): Likewise.
2289 (win32_clear_inferiors): Likewise.
2290 (fake_breakpoint_event): Likewise.
2292 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2294 * inferiors.h (find_inferior): Remove.
2295 * inferiors.c (find_inferior): Remove.
2297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2299 * linux-low.c (resume_status_pending_p): Update comment.
2300 (need_step_over_p): Update comment.
2302 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2304 * linux-low.c (proceed_one_lwp): Return void, change parameter
2306 (unsuspend_and_proceed_one_lwp): Likewise.
2307 (proceed_all_lwps): Use for_each_thread.
2308 (unstop_all_lwps): Likewise.
2310 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2312 * linux-low.c (linux_resume_one_thread): Return void, take
2314 (linux_resume): Use for_each_thread.
2316 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2318 * linux-low.c (send_sigstop_callback): Return void, change
2319 parameter type. Rename to...
2320 (send_sigstop): ... this.
2321 (suspend_and_send_sigstop_callback): Return void, change parameter
2323 (suspend_and_send_sigstop): ... this.
2324 (stop_all_lwps): Use for_each_thread.
2326 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2328 * linux-low.c (lwp_running): Return bool, remove unused
2330 (linux_stabilize_threads): Use find_thread.
2332 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2334 * linux-low.c (select_singlestep_lwp_callback): Remove.
2335 (count_events_callback): Remove.
2336 (select_event_lwp_callback): Remove.
2337 (select_event_lwp): Use find_thread/for_each_thread.
2339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2341 * linux-low.c (not_stopped_callback): Return bool, take filter
2343 (linux_wait_for_event_filtered): Use find_thread.
2344 (linux_wait_1): Likewise.
2346 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2348 * linux-low.c (same_lwp): Remove.
2349 (find_lwp_pid): Use find_thread.
2351 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2353 * linux-low.c (delete_lwp_callback): Remove.
2354 (linux_mourn): Use for_each_thread.
2356 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2358 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2359 args parameter, don't check for pid.
2360 (linux_detach): Use for_each_thread.
2362 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2364 * linux-low.c (struct counter): Remove.
2365 (second_thread_of_pid_p): Remove.
2366 (last_thread_of_process_p): Use find_thread.
2368 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2370 * inferiors.c (find_inferior_in_random): Remove.
2371 * inferiors.h (find_inferior_in_random): Remove.
2372 * linux-low.c (status_pending_p_callback): Return bool, accept
2373 parameter ptid directly.
2374 (linux_wait_for_event_filtered): Use find_thread_in_random.
2375 (linux_wait_1): Likewise.
2377 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2379 * inferiors.c (find_inferior_id): Remove.
2380 (find_thread_ptid): Move implemention from find_inferior_id to
2382 * inferiors.h (find_inferior_id): Remove.
2383 * server.c (handle_status): Use find_thread_ptid.
2384 (process_serial_event): Likewise.
2385 * thread-db.c (find_one_thread): Likewise.
2386 (thread_db_thread_handle): Likewise.
2387 * win32-low.c (thread_rec): Likewise.
2388 (child_delete_thread): Likewise.
2389 (win32_thread_alive): Likewise.
2390 (get_child_debug_event): Likewise.
2392 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2394 * linux-mips-low.c (update_watch_registers_callback): Return
2395 void, remove pid_p parameter, don't check for pid.
2396 (mips_insert_point, mips_remove_point): Use for_each_thread.
2398 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2400 * lynx.low (lynx_delete_thread_callback): Remove.
2401 (lynx_mourn): Use for_each_thread.
2403 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2405 * regcache.c (regcache_invalidate_one): Remove.
2406 (regcache_invalidate_pid): use for_each_thread.
2408 2017-11-26 Tom Tromey <tom@tromey.com>
2410 * linux-low.c (linux_create_inferior): Update.
2412 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2414 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2416 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2418 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2419 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2420 * linux-aarch64-tdesc-selftest.c: New file.
2421 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2423 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2425 * configure.srv: Add new file.
2426 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2427 * linux-aarch64-tdesc-selftest.c: New file.
2428 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2430 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2432 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2433 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2434 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2436 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2438 * configure.srv: Add new files.
2439 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2440 aarch64_linux_read_description.
2441 * linux-aarch64-low.c (aarch64_linux_read_description):
2442 Merge with aarch64_arch_setup.
2443 (aarch64_arch_setup): Call aarch64_linux_read_description.
2444 * linux-aarch64-tdesc.c: New file.
2445 * linux-aarch64-tdesc.h: New file.
2447 2017-11-24 Yao Qi <yao.qi@linaro.org>
2449 * configure.srv: Set $srv_regobj for tic6x-linux.
2450 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2451 (tic6x_read_description): Move some code to tic6x_arch_setup.
2452 (tic6x_tdesc_test): New function.
2453 (initialize_low_arch): Call selftests::register_test.
2455 2017-11-22 Yao Qi <yao.qi@linaro.org>
2457 * remote-utils.c (prepare_resume_reply): Use memcpy.
2459 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2461 * linux-low.c (kill_one_lwp_callback): Return void, take
2462 argument directly, don't filter on pid.
2463 (linux_kill): Use for_each_thread.
2465 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2467 * linux-low.c (need_step_over_p): Return bool, remove dummy
2469 (linux_resume, proceed_all_lwps): Use find_thread.
2471 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2473 * linux-low.c (resume_status_pending_p): Return bool, remove
2475 (linux_resume): Use find_thread.
2477 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2479 * linux-low.c (struct thread_resume_array): Remove.
2480 (linux_set_resume_request): Return void, take arguments
2482 (linux_resume): Use for_each_thread.
2484 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2486 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2487 return bool, remove data argument.
2488 (linux_stabilize_threads): Use find_thread.
2490 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2492 * linux-low.c (unsuspend_one_lwp): Remove.
2493 (unsuspend_all_lwps): Use for_each_thread, inline code from
2496 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2498 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2499 * linux-low.c (struct iterate_over_lwps_args): Remove.
2500 (iterate_over_lwps_filter): Remove.
2501 (iterate_over_lwps): Use find_thread.
2503 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2505 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2506 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2507 code from reset_lwp_ptrace_options_callback.
2509 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2511 * linux-arm-low.c (struct update_registers_data): Remove.
2512 (update_registers_callback): Return void, take arguments
2513 directly, don't check thread's pid.
2514 (arm_insert_point, arm_remove_point): Use for_each_thread.
2516 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2518 * win32-low.c (continue_one_thread): Return void, take argument
2520 (child_continue): Use for_each_thread.
2522 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2524 * win32-i386-low.c (update_debug_registers_callback): Rename
2526 (update_debug_registers): ... this, return void, remove pid_p arg.
2527 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2529 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2531 * inferiors.h (struct process_info): Add constructor, initialize
2533 <syscalls_to_catch>: Change type to std::vector<int>.
2534 * inferiors.c (add_process): Allocate process_info with new.
2535 (remove_process): Free process_info with delete.
2536 * linux-low.c (handle_extended_wait): Adjust.
2537 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2538 * server.c (handle_general_set): Adjust.
2540 2017-11-16 Pedro Alves <palves@redhat.com>
2542 * remote-utils.c (remote_close): Block SIGIO signals instead of
2543 uninstalling the SIGIO handler.
2545 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2547 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2549 2017-11-16 Yao Qi <yao.qi@linaro.org>
2551 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2552 (tic6x_store_gregset): Likewise.
2553 (tic6x_usrregs_info): Move it up.
2555 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2557 * Makefile.in: Update arch rules.
2558 * configure.srv: Explicitly mark arch/ files.
2560 2017-11-13 Andreas Schwab <schwab@suse.de>
2562 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2564 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2566 2017-11-06 Pedro Alves <palves@redhat.com>
2568 * config.in, configure: Regenerate.
2570 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2572 * target.c (struct thread_search): Remove.
2573 (thread_search_callback): Remove.
2574 (prepare_to_access_memory): Use for_each_thread instead of
2575 find_inferior. Inline code from thread_search_callback.
2577 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2579 * server.c (struct visit_actioned_threads_data): Remove.
2580 (visit_actioned_threads): Change prototype to take arguments
2582 (resume): Use find_thread instead of find_inferior.
2584 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2586 * server.c (queue_stop_reply_callback): Change prototype, return
2588 (find_status_pending_thread_callback): Remove.
2589 (handle_status): Replace find_inferior with find_thread and
2592 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2594 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2596 (aarch64_store_gregset): Likewise.
2597 (aarch64_fill_fpregset): Likewise.
2598 (aarch64_store_fpregset): Likewise.
2600 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2602 * gdbthread.h (find_thread, for_each_thread): New functions.
2603 * inferiors.c (thread_of_pid): Remove.
2604 (find_any_thread_of_pid): Use find_thread.
2605 * linux-low.c (num_lwps): Use for_each_thread.
2607 2017-10-17 Yao Qi <yao.qi@linaro.org>
2609 * Makefile.in: Remove one rule.
2610 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2612 2017-10-17 Yao Qi <yao.qi@linaro.org>
2614 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2615 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2617 2017-10-17 Yao Qi <yao.qi@linaro.org>
2619 * configure.srv: Rename arm.o with arch/arm.o.
2621 2017-10-17 Yao Qi <yao.qi@linaro.org>
2623 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2624 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2625 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2626 (arch-i386.o, arch-amd64.o): Remove rules.
2627 (arch/%.o): New rule.
2628 Update POSTCOMPILE and COMPILE.pre.
2629 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2630 * configure: Re-generated.
2631 * configure.srv: Replace arch-i386.o with arch/i386.o.
2632 Replace arch-amd64.o with arch/amd64.o.
2634 2017-10-16 Yao Qi <yao.qi@linaro.org>
2636 * configure: Regenerated.
2638 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2640 * inferiors.h: (struct inferior_list): Remove.
2641 (struct inferior_list_entry); Remove.
2642 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2643 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2644 get_first_inferior): Remove.
2645 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2646 find_inferior_id, find_inferior_in_random): Change signature.
2647 * inferiors.c (all_threads): Change type to
2648 std::list<thread_info *>.
2649 (get_thread): Remove macro.
2650 (find_inferior, find_inferior_id): Change signature, implement
2652 (find_inferior_in_random): Change signature, implement using
2653 find_thread_in_random.
2654 (for_each_inferior, for_each_inferior_with_data): Change
2655 signature, implement using for_each_thread.
2656 (add_inferior_to_list, remove_inferior): Remove.
2657 (add_thread, get_first_thread, thread_of_pid,
2658 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2659 (get_first_inferior, one_inferior_p, clear_inferior_list):
2661 (clear_inferiors, get_thread_process): Update.
2662 * gdbthread.h: Include <list>.
2663 (struct thread_info) <entry>: Remove field.
2665 (all_threads): Change type to std::list<thread_info *>.
2666 (get_first_inferior): Add doc.
2667 (find_thread, for_each_thread, find_thread_in_random): New
2669 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2670 * linux-arm-low.c (update_registers_callback): Update.
2671 * linux-low.c (second_thread_of_pid_p): Update.
2672 (kill_one_lwp_callback, linux_detach_lwp_callback,
2673 delete_lwp_callback, status_pending_p_callback, same_lwp,
2674 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2675 iterate_over_lwps, not_stopped_callback,
2676 resume_stopped_resumed_lwps, count_events_callback,
2677 select_singlestep_lwp_callback, select_event_lwp_callback,
2678 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2679 suspend_and_send_sigstop_callback, wait_for_sigstop,
2680 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2681 lwp_running, linux_set_resume_request, resume_status_pending_p,
2682 need_step_over_p, start_step_over, linux_resume_one_thread,
2683 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2684 reset_lwp_ptrace_options_callback): Update.
2685 * linux-mips-low.c (update_watch_registers_callback): Update.
2686 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2688 (free_register_cache_thread_one): Remove.
2689 (regcache_release): Update.
2690 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2691 handle_qxfer_threads_worker): Update.
2692 (handle_query): Update, use list iterator.
2693 (visit_actioned_threads, handle_pending_status,
2694 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2695 clear_pending_status_callback, set_pending_status_callback,
2696 find_status_pending_thread_callback, handle_status,
2697 process_serial_event): Update.
2698 * target.c (thread_search_callback): Update.
2699 * thread-db.c (thread_db_get_tls_address): Update.
2700 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2702 * win32-i386-low.c (update_debug_registers_callback): Update.
2703 * win32-low.c (delete_thread_info, child_delete_thread,
2704 continue_one_thread, suspend_one_thread,
2705 get_child_debug_event): Adjust.
2707 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2709 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2710 * inferiors.h: Include <list>.
2711 (struct process_info) <entry>: Remove field.
2713 (pid_of): Change macro to function.
2714 (ptid_of, lwpid_of): Remove macro.
2715 (all_processes): Change type to std::list<process_info *>.
2716 (ALL_PROCESSES): Remove macro.
2717 (for_each_process, find_process): New function.
2718 * inferiors.c (all_processes): Change type to
2719 std::list<process_info *>.
2720 (find_thread_process): Adjust.
2721 (add_process): Likewise.
2722 (remove_process): Likewise.
2723 (find_process_pid): Likewise.
2724 (get_first_process): Likewise.
2725 (started_inferior_callback): Remove.
2726 (have_started_inferiors_p): Adjust.
2727 (attached_inferior_callback): Remove.
2728 (have_attached_inferiors_p): Adjust.
2729 * linux-low.c (check_zombie_leaders): Likewise.
2730 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2731 (x86_linux_update_xmltarget): Adjust.
2732 * server.c (handle_query): Likewise.
2733 (gdb_reattached_process): Remove.
2734 (handle_status): Adjust.
2735 (kill_inferior_callback): Likewise.
2736 (detach_or_kill_inferior): Remove.
2737 (print_started_pid): Likewise.
2738 (print_attached_pid): Likewise.
2739 (detach_or_kill_for_exit): Update.
2740 (process_serial_event): Likewise.
2741 * linux-arm-low.c (arm_new_fork): Likewise.
2743 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2745 * dll.h: Include <list>.
2746 (struct dll_info): Add constructor.
2747 <entry>: Remove field.
2748 (all_dlls): Change type to std::list<dll_info>.
2749 * dll.c: Include <algorithm>.
2750 (get_dll): Remove macro.
2751 (all_dlls): Change type to std::list<dll_info *>.
2752 (free_one_dll): Remove.
2753 (match_dll): Likewise.
2754 (loaded_dll): Adjust.
2755 (unloaded_dll): Adjust to all_dlls type change, use
2756 std::find_if. Inline code from match_dll.
2757 (clear_dlls): Adjust to all_dlls type change.
2758 * server.c (emit_dll_description): Remove.
2759 (handle_qxfer_libraries): Adjust to all_dlls type change,
2760 integrate emit_dll_description's functionality.
2762 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2764 * linux-low.h (struct linux_target_ops) <delete_process>: New
2766 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2767 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2768 (struct linux_target_ops): Add delete_process callback.
2769 * linux-arm-low.c (arm_delete_process): New.
2770 (struct linux_target_ops): Add delete_process callback.
2771 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2772 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2773 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2774 * linux-mips-low.c (mips_linux_delete_process): New.
2775 (struct linux_target_ops): Add delete_process callback.
2776 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2777 * linux-s390-low.c (struct linux_target_ops): Likewise.
2778 * linux-sh-low.c (struct linux_target_ops): Likewise.
2779 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2780 * linux-tile-low.c (struct linux_target_ops): Likewise.
2781 * linux-x86-low.c (x86_linux_delete_process): New.
2782 (struct linux_target_ops): Add delete_process callback.
2783 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2785 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2787 * linux-aarch64-low.c (the_low_target): Add thread delete
2789 * linux-arm-low.c (arm_delete_thread): New function.
2790 (the_low_target): Add thread delete callback.
2791 * linux-bfin-low.c (the_low_target): Likewise.
2792 * linux-crisv32-low.c (the_low_target): Likewise.
2793 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2795 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2797 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2798 * linux-mips-low.c (mips_linux_delete_thread): New function.
2799 (the_low_target): Add thread delete callback.
2800 * linux-ppc-low.c (the_low_target): Likewise.
2801 * linux-s390-low.c (the_low_target): Likewise.
2802 * linux-sh-low.c (the_low_target): Likewise.
2803 * linux-tic6x-low.c (the_low_target): Likewise.
2804 * linux-tile-low.c (the_low_target): Likewise.
2805 * linux-x86-low.c (the_low_target): Likewise.
2806 * linux-xtensa-low.c (the_low_target): Likewise.
2808 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2810 * win32-low.c: Include "common-inferior.h".
2812 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2814 * inferiors.c (set_inferior_cwd): New function.
2815 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2816 (handle_query): Inform that QSetWorkingDir is supported.
2817 * win32-low.c (create_process): Pass the inferior's cwd to
2820 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2822 * inferiors.c (current_inferior_cwd): New global variable.
2823 (get_inferior_cwd): New function.
2824 * inferiors.h (struct process_info) <cwd>: New field.
2826 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2828 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2829 (OBS): Add gdb_tilde_expand.o.
2831 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2833 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2834 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2836 2017-09-29 Pedro Alves <palves@redhat.com>
2838 * ax.c (gdb_parse_agent_expr): Constify.
2839 * ax.h (gdb_parse_agent_expr): Constify.
2840 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2842 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2843 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2844 * remote-utils.h (read_ptid): Constify.
2845 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2846 (process_point_options, process_serial_event): Constify.
2847 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2848 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2849 (cmd_qtbuffer): Constify.
2851 2017-09-29 Pedro Alves <palves@redhat.com>
2853 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2856 2017-09-29 Pedro Alves <palves@redhat.com>
2858 * linux-low.c (handle_extended_wait): Pass parent thread instead
2859 of process to thread_db_notice_clone.
2860 * linux-low.h (thread_db_notice_clone): Replace parent process
2861 parameter with parent thread parameter.
2862 * thread-db.c (find_one_thread): Add comment.
2863 (thread_db_notice_clone): Replace parent process parameter with
2864 parent thread parameter. Temporarily switch to the parent thread.
2866 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2868 * gdbthread.h: Include "common-gdbthread.h".
2869 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2870 "if" when validating the ptid.
2871 * remote-utils.c: Include "gdbthread.h".
2872 (prepare_resume_reply): Use "switch_to_thread".
2873 * target.c (done_accessing_memory): Likewise.
2875 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2877 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2878 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2879 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2880 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2881 s390x-gs-linux64-ipa.o to ipa_obj.
2882 * linux-s390-low.c (HWCAP_S390_GS): New define.
2883 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2885 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2886 (s390_arch_setup): Check for guarded-storage support and choose
2888 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2889 init_registers_s390x_gs_linux64.
2890 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2892 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2893 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2895 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2897 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2899 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2901 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2902 (thread_db_thread_handle): Declare.
2903 * linux-low.c (linux_target_ops): Initialize thread_handle.
2904 * server.c (handle_qxfer_threads_worker): Add support for
2906 * target.h (struct target_ops): Add new function pointer,
2908 (target_thread_handle): Define.
2909 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2911 (thread_db_thread_handle): New function.
2913 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2915 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2916 * linux-low.h (thread_db_notice_clone): Declare.
2917 * thread-db.c (thread_db_notice_clone): New function.
2919 2017-09-21 Pedro Alves <palves@redhat.com>
2921 * server.c (gdb_read_memory, handle_status, process_serial_event)
2922 (handle_serial_event, handle_target_event): Adjust to
2923 set_desired_thread prototype change.
2924 * target.c (set_desired_thread): Remove 'use_general' parameter
2926 * target.h (set_desired_thread): Remove 'use_general' parameter.
2928 2017-09-20 Tom Tromey <tom@tromey.com>
2930 * target.c (target_terminal::terminal_state): Define.
2931 (target_terminal::init): Rename from target_terminal_init.
2932 (target_terminal::inferior): Rename from
2933 target_terminal_inferior.
2934 (target_terminal::ours): Rename from target_terminal_ours.
2935 (target_terminal::ours_for_output, target_terminal::info): New.
2937 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2939 * server.c (accumulate_file_name_length): Remove.
2940 (emit_dll_description): Adjust to std::string change.
2941 (handle_qxfer_libraries): Use std::string to hold document.
2943 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2945 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2946 return type of xml_escape_text.
2947 * server.c (emit_dll_description): Likewise.
2949 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2951 * server.c (captured_main): Accept argument for --selftest.
2952 Update run_tests call.
2953 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2954 when registering selftests.
2956 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2958 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2959 instead of "VEC" for "target_desc.reg_defs".
2960 (regcache_cpy): Likewise.
2961 (registers_to_string): Likewise.
2962 (registers_from_string): Likewise.
2963 (find_regno): Likewise.
2964 (supply_regblock): Likewise.
2965 (regcache_raw_read_unsigned): Likewise.
2966 * tdesc.c (init_target_desc): Likewise.
2967 (tdesc_create_reg): Likewise.
2968 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2969 (struct target_desc) <reg_defs>: Convert to "std::vector".
2970 (target_desc): Do not initialize "reg_defs".
2971 (~target_desc): Update code to use "std::vector" instead of "VEC"
2972 for "target_desc.reg_defs".
2973 (operator==): Likewise.
2975 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2977 * inferiors.h (thread_to_gdb_id): Remove.
2978 * inferiors.c (thread_to_gdb_id): Remove.
2979 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2980 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2981 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2983 * nto-low.c (nto_fetch_registers, nto_store_registers,
2984 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2986 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2988 * inferiors.h (gdb_id_to_thread_id): Remove.
2989 * inferiors.c (gdb_id_to_thread_id): Remove.
2990 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2991 removal. Move pid declaration closer to where it's used.
2993 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2995 * server.c (handle_detach): New function.
2996 (process_serial_event): Move code out, call handle_detach.
2998 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3000 * server.c (require_running): Rename to ...
3001 (require_running_or_return): ... this ...
3002 (require_running_or_break): ... and this.
3003 (handle_query, process_serial_event): Adjust.
3005 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3007 * linux-low.c (linux_set_resume_request): Remove unused
3010 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3012 * server.c (first_thread_of): Remove.
3013 (process_serial_event): Replace usage of first_thread_of with
3014 find_any_thread_of_pid.
3015 * tracepoint.c (same_process_p): Remove.
3016 (gdb_agent_about_to_close): Replace usage of same_process_p with
3017 find_any_thread_of_pid.
3018 * linux-x86-low.c (same_process_callback): Remove.
3019 (x86_arch_setup_process_callback): Replace usage of
3020 same_process_callback with find_any_thread_of_pid.
3021 * thread-db.c (any_thread_of): Remove.
3022 (switch_to_process): Replace usage of any_thread_of with
3023 find_any_thread_of_pid.
3024 * inferiors.c (thread_pid_matches_callback): Remove.
3025 (find_thread_process): Adjust to use find_any_thread_of_pid.
3027 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3029 * regcache.c (get_thread_regcache): Guard calls to "memset"
3032 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3034 * linux-low.c (handle_extended_wait): Use
3035 "allocate_target_description" instead of "XNEW".
3036 * linux-x86-low.c (initialize_low_arch): Likewise.
3038 2017-09-05 Yao Qi <yao.qi@linaro.org>
3040 * configure.srv (srv_i386_regobj): Remove.
3041 (srv_amd64_regobj): Remove.
3042 (srv_regobj): Set it to "" for x86 non-linux targets.
3043 * linux-x86-tdesc.c (i386_linux_read_description):
3044 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3045 (init_registers_i386): Remove the declaration.
3046 (tdesc_i386): Remove the declaration.
3047 (lynx_i386_arch_setup): Call i386_create_target_description.
3048 * nto-x86-low.c: Likewise.
3049 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3050 [!__x86_64__]: include arch/i386.h.
3051 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3053 2017-09-05 Yao Qi <yao.qi@linaro.org>
3055 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3056 i386/amd64-XXX-linux from it.
3058 2017-09-05 Yao Qi <yao.qi@linaro.org>
3060 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3062 (ipa_amd64_linux_regobj): Remove.
3063 (ipa_x32_linux_regobj): Remove.
3065 2017-09-05 Yao Qi <yao.qi@linaro.org>
3067 * Makefile.in (arch-amd64.o): New rule.
3068 * configure.srv: Append arch-amd64.o.
3069 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3070 (get_ipa_tdesc): Call amd64_linux_read_description.
3071 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3072 and init_registers_amd64_XXX.
3073 * linux-x86-low.c (x86_linux_read_description): Call
3074 amd64_linux_read_description.
3075 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3076 (initialize_low_arch): Don't call init_registers_x32_XXX and
3077 init_registers_amd64_XXX.
3078 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3079 and tdesc_amd64_XXX.
3080 [__x86_64__] (amd64_tdesc_test): New function.
3081 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3082 and init_registers_amd64_XXX.
3083 * linux-x86-tdesc.c: Include arch/amd64.h.
3084 (xcr0_to_tdesc_idx): New function.
3085 (i386_linux_read_description): New function.
3086 (amd64_get_ipa_tdesc_idx): New function.
3087 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3088 (amd64_get_ipa_tdesc): Declare.
3090 2017-09-05 Yao Qi <yao.qi@linaro.org>
3092 * configure.srv (srv_i386_linux_xmlfiles): Remove
3093 i386/i386-XXX-linux.xml from it.
3095 2017-09-05 Yao Qi <yao.qi@linaro.org>
3097 * configure.srv: Set srv_i386_linux_regobj empty if $development
3099 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3100 initialize_low_tdesc.
3101 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3102 with #if initialize_low_tdesc.
3103 * linux-x86-tdesc-selftest.c: New file.
3104 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3106 2017-09-05 Yao Qi <yao.qi@linaro.org>
3108 * Makefile.in (arch-i386.o): New rule.
3109 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3110 (x86_64-*-linux*): Likewise.
3111 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3112 include arch/i386.h.
3113 (i386_linux_read_description): Remove code and call
3114 i386_create_target_description.
3115 * tdesc.c (allocate_target_description): New function.
3116 * tdesc.h (set_tdesc_architecture): Remove declaration.
3117 (set_tdesc_osabi): Likewise.
3119 2017-09-05 Yao Qi <yao.qi@linaro.org>
3121 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3122 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3123 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3125 * server.c (get_features_xml): Call tdesc_get_features_xml.
3126 * tdesc.c (set_tdesc_architecture): New function.
3127 (set_tdesc_osabi): New function.
3128 (tdesc_get_features_xml): New function.
3129 (tdesc_create_feature): Add an argument.
3130 * tdesc.h (struct target_desc) <features>: New field.
3131 <arch, osabi>: New field.
3132 (~target_desc): xfree features, arch, and osabi.
3133 (target_desc::oerator==): Don't compare .xmltarget.
3134 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3135 (set_tdesc_osabi): Likewise.
3136 (tdesc_get_features_xml): Likewise.
3138 2017-09-05 Yao Qi <yao.qi@linaro.org>
3140 * linux-x86-tdesc.c: Include selftest.h.
3141 (i386_tdesc_test): New function.
3142 (initialize_low_tdesc): Call selftests::register_test.
3143 * tdesc.h: Include regdef.h.
3144 (target_desc): Override operator == and !=.
3146 2017-09-05 Yao Qi <yao.qi@linaro.org>
3148 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3149 (ipa_obj): Likewise.
3150 * linux-i386-ipa.c: Include common/x86-xstate.h
3151 (get_ipa_tdesc): Call i386_linux_read_description.
3152 (initialize_low_tracepoint): Don't call init_registers_XXX
3153 functions, call initialize_low_tdesc instead.
3154 * linux-x86-low.c (x86_linux_read_description): Call
3155 i386_linux_read_description.
3156 (initialize_low_arch): Don't call init_registers_i386_XXX
3157 functions, call initialize_low_tdesc.
3158 * linux-x86-tdesc.c: New file.
3159 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3160 (i386_get_ipa_tdesc_idx): Declare.
3161 (i386_get_ipa_tdesc): Declare.
3162 (initialize_low_tdesc): Declare.
3164 2017-09-05 Yao Qi <yao.qi@linaro.org>
3166 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3169 2017-09-05 Yao Qi <yao.qi@linaro.org>
3171 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3172 * regcache.c (get_thread_regcache): Use VEC_length.
3173 (init_register_cache): Likewise.
3174 (regcache_cpy): Likewise.
3175 (registers_to_string): Iterate reg_defs via VEC_iterate.
3176 (find_regno): Likewise.
3177 (find_register_by_number): Use VEC_index.
3178 (register_size): Call find_register_by_number.
3179 (register_data): Call find_register_by_number.
3180 (supply_regblock): Use VEC_length.
3181 (regcache_raw_read_unsigned): Likewise.
3182 * tdesc.c (init_target_desc): Iterate reg_defs via
3184 (default_description): Update initializer.
3185 (copy_target_description): Don't update field num_registers.
3186 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3187 <num_registers>: Remove.
3189 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3191 * Makefile.in (.SECONDARY): Define target.
3193 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3195 * linux-low.c (linux_wait_1): Adjust.
3196 * server.c (queue_stop_reply_callback): Adjust.
3198 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3200 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3201 QEnvironmentUnset and QEnvironmentReset packets.
3202 (handle_query): Inform remote that QEnvironmentHexEncoded,
3203 QEnvironmentUnset and QEnvironmentReset are supported.
3205 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3207 * inferiors.h (inferior_target_data): Rename to ...
3208 (thread_target_data): ... this.
3209 (inferior_regcache_data): Rename to ...
3210 (thread_regcache_data): ... this.
3211 (set_inferior_regcache_data): Rename to ...
3212 (set_thread_regcache_data): ... this.
3213 * inferiors.c (inferior_target_data): Rename to ...
3214 (thread_target_data): ... this.
3215 (inferior_regcache_data): Rename to ...
3216 (thread_regcache_data): ... this.
3217 (set_inferior_regcache_data): Rename to ...
3218 (set_thread_regcache_data): ... this.
3219 (free_one_thread): Update.
3220 * linux-low.h (get_thread_lwp): Update.
3221 * regcache.c (get_thread_regcache): Update.
3222 (regcache_invalidate_thread): Update.
3223 (free_register_cache_thread): Update.
3224 * win32-i386-low.c (update_debug_registers_callback): Update.
3225 (win32_get_current_dr): Update.
3226 * win32-low.c (thread_rec): Update.
3227 (delete_thread_info): Update.
3228 (continue_one_thread): Update.
3229 (suspend_one_thread): Update.
3231 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3233 * inferiors.c (set_inferior_target_data): Remove.
3234 * inferiors.h (set_inferior_target_data): Remove.
3236 2017-08-18 Yao Qi <yao.qi@linaro.org>
3238 * Makefile.in (OBS): Add selftest.o.
3239 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3240 * configure, config.in: Re-generated.
3241 * server.c: Include common/sefltest.h.
3242 (captured_main): Handle option --selftest.
3244 2017-08-09 Yao Qi <yao.qi@linaro.org>
3246 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3247 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3248 i386-avx-mpx.o and i386-mmx.o.
3249 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3250 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3251 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3252 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3253 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3254 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3255 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3256 i386/amd64-avx-mpx.xml.
3258 2017-08-09 Yao Qi <yao.qi@linaro.org>
3260 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3261 and x32-avx-avx512.o.
3262 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3263 i386/x32-avx-avx512.xml.
3265 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3267 * tracepoint.h (enum class fast_tpoint_collect_result): New
3269 (fast_tracepoint_collecting): Change return type to
3270 fast_tpoint_collect_result.
3271 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3272 * linux-low.h: Include tracepoint.h.
3273 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3274 fast_tpoint_collect_result.
3275 * linux-low.c (handle_tracepoints): Adjust.
3276 (linux_fast_tracepoint_collecting): Change return type to
3277 fast_tpoint_collect_result.
3278 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3279 linux_wait_1, stuck_in_jump_pad_callback,
3280 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3281 proceed_one_lwp): Adjust to type change.
3283 2017-07-10 Yao Qi <yao.qi@linaro.org>
3285 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3287 2017-06-29 Yao Qi <yao.qi@linaro.org>
3289 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3291 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3293 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3295 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3297 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3299 * linux-low.c (linux_create_inferior): Adjust code to access the
3300 environment information via 'gdb_environ' class.
3301 * lynx-low.c (lynx_create_inferior): Likewise.
3302 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3303 (get_environ): Return a pointer to 'our_environ'.
3304 (captured_main): Initialize 'our_environ'.
3305 * server.h (get_environ): Adjust prototype.
3306 * spu-low.c (spu_create_inferior): Adjust code to access the
3307 environment information via 'gdb_environ' class.
3309 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3311 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3312 usage of "register" keyword.
3314 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3316 * configure: Re-generate.
3318 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3320 * configure: Re-generate.
3322 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3324 * Makefile.in (COMPILE.pre): Add "-x c++".
3326 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3328 * fork-child.c: Conditionally include <signal.h>.
3330 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3332 * server.c (handle_general_set): Handle new packet
3333 "QStartupWithShell".
3334 (handle_query): Add "QStartupWithShell" to the list of supported
3336 (gdbserver_usage): Add help text explaining the
3337 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3339 (captured_main): Recognize and act upon the presence of the new
3342 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3343 Pedro Alves <palves@redhat.com>
3345 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3346 * configure: Regenerate.
3347 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3349 (i[34567]86-*-lynxos*): Likewise.
3350 (spu*-*-*): Likewise.
3351 * fork-child.c: New file.
3352 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3354 (linux_ptrace_fun): New function.
3355 (linux_create_inferior): Adjust function prototype to reflect
3356 change on "target.h". Adjust function code to use
3358 (linux_request_interrupt): Delete "signal_pid".
3359 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3360 (lynx_ptrace_fun): New function.
3361 (lynx_create_inferior): Adjust function prototype to reflect
3362 change on "target.h". Adjust function code to use
3364 * nto-low.c (nto_create_inferior): Adjust function prototype and
3365 code to reflect change on "target.h". Update comments.
3366 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3367 "common-terminal.h" and "environ.h".
3368 (terminal_fd): Moved to fork-child.c.
3369 (old_foreground_pgrp): Likewise.
3370 (restore_old_foreground_pgrp): Likewise.
3371 (last_status): Make it global.
3372 (last_ptid): Likewise.
3373 (our_environ): New variable.
3374 (startup_with_shell): Likewise.
3375 (program_name): Likewise.
3376 (program_argv): Rename to...
3377 (program_args): ...this.
3378 (wrapper_argv): New variable.
3379 (start_inferior): Delete function.
3380 (get_exec_wrapper): New function.
3381 (get_exec_file): Likewise.
3382 (get_environ): Likewise.
3383 (prefork_hook): Likewise.
3384 (post_fork_inferior): Likewise.
3385 (postfork_hook): Likewise.
3386 (postfork_child_hook): Likewise.
3387 (handle_v_run): Update code to deal with arguments coming from the
3388 remote host. Update calls from "start_inferior" to
3390 (captured_main): Likewise. Initialize environment variable. Call
3392 * server.h (post_fork_inferior): New prototype.
3393 (get_environ): Likewise.
3394 (last_status): Declare.
3395 (last_ptid): Likewise.
3396 (signal_pid): Likewise.
3397 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3398 (spu_ptrace_fun): New function.
3399 (spu_create_inferior): Adjust function prototype to reflect change
3400 on "target.h". Adjust function code to use "fork_inferior".
3401 * target.c (target_terminal_init): New function.
3402 (target_terminal_inferior): Likewise.
3403 (target_terminal_ours): Likewise.
3404 * target.h: Include <vector>.
3405 (struct target_ops) <create_inferior>: Update prototype.
3406 (create_inferior): Update macro.
3407 * utils.c (gdb_flush_out_err): New function.
3408 * win32-low.c (win32_create_inferior): Adjust function prototype
3409 and code to reflect change on "target.h".
3411 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3413 * inferiors.c (switch_to_thread): New function.
3415 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3417 * Makefile.in (SFILE): Add "common/job-control.c".
3418 (OBS): Add "job-control.o".
3420 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3422 * Makefile: Remove "@host_makefile_frag@".
3424 2017-05-05 Pedro Alves <palves@redhat.com>
3426 * configure: Regenerate.
3428 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3430 * configure: Regenerate.
3432 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3434 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3435 software_single_step change of return type to
3436 std::vector<CORE_ADDR>.
3437 * linux-low.c (install_software_single_step_breakpoints):
3439 * linux-low.h (install_software_single_step_breakpoints):
3442 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3444 * remote-utils.c: Include "gdb_termios.h" instead of
3446 * terminal.h: Delete file.
3448 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3450 * server.c: Include <vector>.
3451 <program_argv, wrapper_argv>: Convert to std::vector.
3452 (start_inferior): Rewrite function to use C++.
3453 (handle_v_run): Likewise. Update code that calculates the argv
3454 based on the vRun packet; use C++.
3455 (captured_main): Likewise.
3457 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3459 * server.c (handle_v_cont): Initialize thread_resume::thread
3462 2017-04-05 Pedro Alves <palves@redhat.com>
3464 * configure: Regenerate.
3466 2017-04-05 Pedro Alves <palves@redhat.com>
3468 * gdbreplay.c (sync_error): Constify.
3469 * linux-x86-low.c (push_opcode): Constify.
3471 2017-04-05 Pedro Alves <palves@redhat.com>
3473 * win32-low.c (get_child_debug_event)
3474 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3475 Report TARGET_WAITKIND_SPURIOUS instead.
3477 2017-04-05 Pedro Alves <palves@redhat.com>
3479 * remote-utils.c (remote_prepare, remote_open): Constify.
3480 * remote-utils.h (remote_prepare, remote_open): Constify.
3481 * server.c (captured_main): Constify 'port' handling.
3483 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3485 * Makefile.in (clean): Clear .deps.
3487 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3489 * .gitignore: Remove generated files, replace with wildcard.
3490 * (clean): Replace removal of generated files with wildcard.
3491 (version.c): Replace with...
3492 (version-generated.c): ...this.
3493 (xml-builtin.c): Replace with...
3494 (xml-builtin-generated.c): ...this.
3495 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3496 (%.c: *regformats*): Replace with...
3497 (%-generated.c: *regformats*): ...this.
3499 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3501 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3502 (xtensa_fill_gregset): Call collect_register_by_name for
3504 (xtensa_store_gregset): Call supply_register_by_name for
3507 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3509 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3510 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3511 (xtensa_store_gregset): Call supply_register for all registers in
3512 a0_regnum..a0_regnum + C0_NREGS range.
3514 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3516 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3517 (ax-ipa.o: ax.c): Remove.
3518 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3519 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3520 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3521 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3522 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3524 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3526 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3527 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3528 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3529 (errors-ipa.o: ../common/errors.c): Remove.
3530 (format-ipa.o: ../common/format.c): Remove.
3531 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3533 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3535 * Makefile.in (%-ipa.o: %.c): New rule.
3536 (tracepoint-ipa.o: tracepoint.c): Remove.
3537 (utils-ipa.o: utils.c): Remove.
3538 (remote-utils-ipa.o: remote-utils.c): Remove.
3539 (regcache-ipa.o: regcache.c): Remove.
3540 (i386-linux-ipa.o: i386-linux.c): Remove.
3541 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3542 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3543 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3544 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3545 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3546 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3547 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3548 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3549 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3550 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3551 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3552 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3553 (aarch64-ipa.o: aarch64.c): Remove.
3554 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3555 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3556 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3557 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3558 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3559 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3560 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3561 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3562 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3563 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3564 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3565 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3566 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3567 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3568 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3569 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3570 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3571 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3572 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3573 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3574 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3575 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3576 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3577 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3578 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3579 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3580 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3581 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3582 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3583 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3584 (tdesc-ipa.o: tdesc.c): Remove.
3585 (x32-linux-ipa.o: x32-linux.c): Remove.
3586 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3587 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3589 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3591 * Makefile.in (%.o: ../arch/%.c): New rule.
3592 (arm.o: ../arch/arm.c): Remove.
3593 (arm-linux.o: ../arch/arm-linux.c): Remove.
3594 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3595 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3597 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3599 * Makefile.in (%.o: ../nat/%.c): New rule.
3600 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3601 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3602 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3603 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3604 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3605 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3606 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3607 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3608 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3609 (linux-personality.o: ../nat/linux-personality.c): Remove.
3610 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3611 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3612 (x86-linux.o: ../nat/x86-linux.c): Remove.
3613 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3614 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3616 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3618 * Makefile.in (%.o: ../common/%.c): New rule.
3619 (signals.o: ../common/signals.c): Remove.
3620 (print-utils.o: ../common/print-utils.c): Remove.
3621 (rsp-low.o: ../common/rsp-low.c): Remove.
3622 (common-utils.o: ../common/common-utils.c): Remove.
3623 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3624 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3625 (vec.o: ../common/vec.c): Remove.
3626 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3627 (xml-utils.o: ../common/xml-utils.c): Remove.
3628 (ptid.o: ../common/ptid.c): Remove.
3629 (buffer.o: ../common/buffer.c): Remove.
3630 (format.o: ../common/format.c): Remove.
3631 (filestuff.o: ../common/filestuff.c): Remove.
3632 (agent.o: ../common/agent.c): Remove.
3633 (errors.o: ../common/errors.c): Remove.
3634 (environ.o: ../common/environ.c): Remove.
3635 (common-debug.o: ../common/common-debug.c): Remove.
3636 (cleanups.o: ../common/cleanups.c): Remove.
3637 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3638 (fileio.o: ../common/fileio.c): Remove.
3639 (common-regcache.o: ../common/common-regcache.c): Remove.
3640 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3641 (new-op.o: ../common/new-op.c): Remove.
3642 (btrace-common.o: ../common/btrace-common.c): Remove.
3644 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3646 * Makefile.in (%.o: ../target/%.c): New rule.
3647 (waitstatus.o: ../target/waitstatus.c): Remove.
3649 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3652 (%.c: ../regformats/%.dat,
3653 (%.c: ../regformats/arm/%.dat,
3654 (%.c: ../regformats/i386/%.dat,
3655 (%.c: ../regformats/rs6000/%.dat): New rules.
3656 (aarch64.c): Remove.
3657 (reg-arm.c): Remove.
3658 (arm-with-iwmmxt.c): Remove.
3659 (arm-with-vfpv2.c): Remove.
3660 (arm-with-vfpv3.c): Remove.
3661 (arm-with-neon.c): Remove.
3662 (reg-bfin.c): Remove.
3663 (reg-cris.c): Remove.
3664 (reg-crisv32.c): Remove.
3666 (i386-linux.c): Remove.
3667 (i386-avx.c): Remove.
3668 (i386-avx-linux.c): Remove.
3669 (i386-avx-avx512.c): Remove.
3670 (i386-avx-avx512-linux.c): Remove.
3671 (i386-mpx.c): Remove.
3672 (i386-mpx-linux.c): Remove.
3673 (i386-avx-mpx-avx512-pku.c): Remove.
3674 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3675 (i386-avx-mpx.c): Remove.
3676 (i386-avx-mpx-linux.c): Remove.
3677 (i386-mmx.c): Remove.
3678 (i386-mmx-linux.c): Remove.
3679 (reg-ia64.c): Remove.
3680 (reg-m32r.c): Remove.
3681 (reg-m68k.c): Remove.
3683 (mips-linux.c): Remove.
3684 (mips-dsp-linux.c): Remove.
3685 (mips64-linux.c): Remove.
3686 (mips64-dsp-linux.c): Remove.
3687 (nios2-linux.c): Remove.
3688 (powerpc-32.c): Remove.
3689 (powerpc-32l.c): Remove.
3690 (powerpc-altivec32l.c): Remove.
3691 (powerpc-cell32l.c): Remove.
3692 (powerpc-vsx32l.c): Remove.
3693 (powerpc-isa205-32l.c): Remove.
3694 (powerpc-isa205-altivec32l.c): Remove.
3695 (powerpc-isa205-vsx32l.c): Remove.
3696 (powerpc-e500l.c): Remove.
3697 (powerpc-64l.c): Remove.
3698 (powerpc-altivec64l.c): Remove.
3699 (powerpc-cell64l.c): Remove.
3700 (powerpc-vsx64l.c): Remove.
3701 (powerpc-isa205-64l.c): Remove.
3702 (powerpc-isa205-altivec64l.c): Remove.
3703 (powerpc-isa205-vsx64l.c): Remove.
3704 (s390-linux32.c): Remove.
3705 (s390-linux32v1.c): Remove.
3706 (s390-linux32v2.c): Remove.
3707 (s390-linux64.c): Remove.
3708 (s390-linux64v1.c): Remove.
3709 (s390-linux64v2.c): Remove.
3710 (s390-te-linux64.c): Remove.
3711 (s390-vx-linux64.c): Remove.
3712 (s390-tevx-linux64.c): Remove.
3713 (s390x-linux64.c): Remove.
3714 (s390x-linux64v1.c): Remove.
3715 (s390x-linux64v2.c): Remove.
3716 (s390x-te-linux64.c): Remove.
3717 (s390x-vx-linux64.c): Remove.
3718 (s390x-tevx-linux64.c): Remove.
3719 (tic6x-c64xp-linux.c): Remove.
3720 (tic6x-c64x-linux.c): Remove.
3721 (tic6x-c62x-linux.c): Remove.
3723 (reg-sparc64.c): Remove.
3724 (reg-spu.c): Remove.
3726 (amd64-linux.c): Remove.
3727 (amd64-avx.c): Remove.
3728 (amd64-avx-linux.c): Remove.
3729 (amd64-avx-avx512.c): Remove.
3730 (amd64-avx-avx512-linux.c): Remove.
3731 (amd64-mpx.c): Remove.
3732 (amd64-mpx-linux.c): Remove.
3733 (amd64-avx-mpx-avx512-pku.c): Remove.
3734 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3735 (amd64-avx-mpx.c): Remove.
3736 (amd64-avx-mpx-linux.c): Remove.
3738 (x32-linux.c): Remove.
3739 (x32-avx.c): Remove.
3740 (x32-avx-linux.c): Remove.
3741 (x32-avx-avx512.c): Remove.
3742 (x32-avx-avx512-linux.c): Remove.
3743 (reg-xtensa.c): Remove.
3744 (reg-tilegx.c): Remove.
3745 (reg-tilegx32.c): Remove.
3747 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3749 * Makefile.in (SFILES): Add "common/environ.c".
3750 (OBJS): Add "common/environ.h".
3752 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3754 * configure.ac: Check if the fs_base and gs_base members of
3755 `struct user_regs_struct' exist.
3756 * config.in: Regenerated.
3757 * configure: Likewise.
3759 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3761 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3763 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3764 (get_next_pcs_syscall_next_pc): Likewise.
3766 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3768 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3769 * nto-x86-low.c: Likewise.
3771 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3773 * Makefile.in: Include disable-implicit-rules.mk.
3775 2016-11-23 Pedro Alves <palves@redhat.com>
3777 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3778 (debug_vprintf): Use std::chrono::steady_clock instead of
3779 gettimeofday. Use '.' instead of ':'.
3780 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3781 (get_timestamp): Use std::chrono::steady_clock instead of
3784 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3786 * Makefile.in: Fix whitespace formatting.
3788 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3790 * Makefile.in (SFILES, OBS): Flatten list and order
3793 2016-11-23 Pedro Alves <palves@redhat.com>
3795 * event-loop.c (handle_file_event): Use warning.
3796 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3797 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3800 2016-11-23 Pedro Alves <palves@redhat.com>
3802 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3804 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3805 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3806 debug_printf and debug_flush for debug output.
3807 * server.c (handle_general_set): Likewise.
3808 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3811 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3813 * Makefile.in (.c.o): Replace rule with ...
3814 (%.o: %.c): ... this one.
3816 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3818 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3819 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3821 * configure.ac: Remove checks for the make program.
3822 * configure: Re-generate.
3824 2016-10-28 Pedro Alves <palves@redhat.com>
3826 * Makefile.in (CXX_DIALECT): Get from configure.
3827 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3828 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3829 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3830 * config.in: Regenerate.
3831 * configure: Regenerate.
3833 2016-10-27 Yao Qi <yao.qi@linaro.org>
3835 * linux-low.c (linux_supports_range_stepping): Return true if
3836 can_software_single_step return true.
3838 2016-10-27 Yao Qi <yao.qi@linaro.org>
3840 * inferiors.c (find_inferior_in_random): New function.
3841 * inferiors.h (find_inferior_in_random): Declare.
3842 * linux-low.c (linux_wait_for_event_filtered): Call
3843 find_inferior_in_random instead of find_inferior.
3845 2016-10-27 Yao Qi <yao.qi@linaro.org>
3847 * linux-low.c (linux_wait_1): If single-step breakpoints are
3848 inserted, remove them.
3850 2016-10-26 Pedro Alves <palves@redhat.com>
3852 * linux-low.c (handle_extended_wait): Link parent/child fork
3854 (linux_wait_1): Unlink them.
3855 (linux_set_resume_request): Ignore resume requests for
3856 already-resumed and unhandled fork child threads.
3857 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3858 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3860 (handle_v_requests) <vCont>: Don't call require_running.
3861 * server.h (in_queued_stop_replies): New declaration.
3863 2016-10-24 Yao Qi <yao.qi@linaro.org>
3866 * linux-aarch64-low.c (append_insns): Cast the return value to
3869 2016-10-10 Yao Qi <yao.qi@linaro.org>
3871 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3873 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3875 * target.c (target_supports_multi_process): New function, moved
3877 * target.h (target_supports_multi_process): ... here. Remove
3880 2016-10-05 Tom Tromey <tom@tromey.com>
3883 * tracepoint.c (handle_tracepoint_bkpts): Check
3884 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3886 2016-10-05 Yao Qi <yao.qi@linaro.org>
3888 * configure.srv: Update the path of arm-*.xml files.
3890 2016-10-05 Terry Guo <terry.guo@arm.com>
3891 Yao Qi <yao.qi@linaro.org>
3893 * Makefile.in: Adjust the path of rules.
3894 * configure.srv: Update the path of xml files.
3895 * regformats/arm-with-iwmmxt.dat: Regenerated.
3896 * regformats/arm-with-neon.dat: Likewise.
3897 * regformats/arm-with-vfpv2.dat: Likewise.
3898 * regformats/arm-with-vfpv3.dat Likewise.
3900 2016-09-30 Yao Qi <yao.qi@linaro.org>
3903 * target.c (target_stop_and_wait): Don't call
3904 target_continue_no_signal, use resume_stop instead.
3906 2016-09-26 Yao Qi <yao.qi@linaro.org>
3908 * linux-low.c (linux_wait_1): Call debug_exit.
3910 2016-09-23 Pedro Alves <palves@redhat.com>
3912 * Makefile.in (SFILES): Add common/new-op.c.
3913 (OBS): Add common/new-op.o.
3914 (new-op.o): New rule.
3916 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3918 * .gitinore: Ignore more files.
3920 2016-09-21 Yao Qi <yao.qi@linaro.org>
3922 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3925 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3927 * server.c (start_inferior): Call target_mourn_inferior instead of
3928 mourn_inferior; pass ptid_t argument to it.
3930 (handle_target_event): Likewise.
3931 * target.c (target_mourn_inferior): New function.
3932 * target.h (mourn_inferior): Delete macro.
3934 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3936 * linux-low.c (lwp_is_stepping): New function.
3938 2016-09-06 Carl Love <cel@us.ibm.com>
3940 * server.c (start_inferior): Fixed comment, requested comment change
3941 didn't get updated correctly. Removed reference to ptrace () call as
3942 it is only true on Linux systems.
3944 2016-09-06 Carl Love <cel@us.ibm.com>
3946 * server.c (start_inferior): Do not call
3947 function target_post_create_inferior () if the
3948 inferior process has already exited.
3950 2016-09-05 Pedro Alves <palves@redhat.com>
3952 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3953 (COMPILE.pre, CC_LD): Use CXX directly.
3954 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3955 * acinclude.m4: Don't include build-with-cxx.m4.
3956 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3957 * configure: Regenerate.
3959 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3962 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3963 call writing data to own_buf.
3965 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3967 * target.c (mywait): Call target_wait instead of
3969 (target_wait): New function.
3971 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3973 * server.c (start_inferior): New variable 'ptid'. Replace calls
3974 to the_target->resume by target_continue{,_no_signal}, depending
3976 * target.c (target_stop_and_wait): Call target_continue_no_signal
3977 instead of the_target->resume.
3978 (target_continue): New function.
3980 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3982 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3984 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3987 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3989 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3990 * linux-arm-low.c (ps_get_thread_area): Likewise.
3991 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3992 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3993 * linux-mips-low.c (ps_get_thread_area): Likewise.
3994 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3995 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3996 * linux-x86-low.c (ps_get_thread_area): Likewise.
3997 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3999 2016-08-19 Pedro Alves <palves@redhat.com>
4001 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4003 2016-08-19 Pedro Alves <palves@redhat.com>
4005 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4006 comment. Use memcpy instead of casting through unsigned long.
4008 2016-08-19 Pedro Alves <palves@redhat.com>
4010 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4011 allocating around 0x80000000.
4013 2016-08-19 Pedro Alves <palves@redhat.com>
4016 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4017 (x32-avx512-linux-ipa.o): New rules.
4018 * configure.ac (x86_64-*-linux*): New x32 check.
4019 * configure.srv (ipa_x32_linux_regobj): New.
4020 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4021 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4023 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4025 * configure: Regenerate.
4027 2016-08-09 Pedro Alves <palves@redhat.com>
4030 * Makefile.in (OBS): Add signals-state-save-restore.o.
4031 (signals-state-save-restore.o): New rule.
4032 * config.in: Regenerate.
4033 * configure: Regenerate.
4034 * linux-low.c: Include "signals-state-save-restore.h".
4035 (linux_create_inferior): Call
4036 restore_original_signals_state.
4037 * server.c: Include "dispositions-save-restore.h".
4038 (captured_main): Call save_original_signals_state.
4040 2016-08-05 Pedro Alves <palves@redhat.com>
4042 * configure: Regenerate.
4044 2016-08-04 Yao Qi <yao.qi@linaro.org>
4046 * linux-low.c (regsets_fetch_inferior_registers): Check
4047 errno is ESRCH or not.
4049 2016-08-02 Yao Qi <yao.qi@linaro.org>
4051 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4052 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4053 (thread_db_load_search): Update.
4054 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4055 td_ta_set_event and td_ta_event_getmsg.
4057 2016-07-26 Pedro Alves <palves@redhat.com>
4060 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4061 of unsigned long for 64-bit registers and use uint32_t instead of
4062 unsigned int for 32-bit registers.
4064 2016-07-26 Pedro Alves <palves@redhat.com>
4066 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4069 2016-07-21 Tom Tromey <tom@tromey.com>
4071 * configure: Rebuild.
4073 2016-07-21 Yao Qi <yao.qi@linaro.org>
4075 * mem-break.c (find_gdb_breakpoint): Cast bp to
4076 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4078 2016-07-21 Yao Qi <yao.qi@linaro.org>
4080 * server.c (handle_v_requests): Support s and S actions
4081 if target_supports_software_single_step return true.
4083 2016-07-21 Yao Qi <yao.qi@linaro.org>
4085 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4086 is resume_step, call maybe_hw_step.
4087 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4089 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4091 (proceed_one_lwp): If resume request is resume_step, install
4092 reinsert breakpoints and call maybe_hw_step.
4094 2016-07-21 Yao Qi <yao.qi@linaro.org>
4096 * linux-low.c (proceed_one_lwp): Declare.
4097 (linux_resume_one_thread): Remove local variable 'step'.
4098 Lift code enqueue signal. Call proceed_one_lwp instead of
4099 linux_resume_one_lwp.
4101 2016-07-21 Yao Qi <yao.qi@linaro.org>
4103 * linux-low.c (linux_resume_one_thread): Call
4104 enqueue_pending_signal.
4106 2016-07-21 Yao Qi <yao.qi@linaro.org>
4108 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4109 * inferiors.c (do_restore_current_thread_cleanup): New function.
4110 (make_cleanup_restore_current_thread): Likewise.
4111 * linux-low.c (install_software_single_step_breakpoints): Call
4112 make_cleanup_restore_current_thread. Switch current_thread to
4115 2016-07-21 Yao Qi <yao.qi@linaro.org>
4117 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4118 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4119 (clone_one_breakpoint): Likewise.
4120 (delete_reinsert_breakpoints): Change parameter to thread.
4122 (has_reinsert_breakpoints): Likewise.
4123 (uninsert_reinsert_breakpoints): Likewise.
4124 (reinsert_reinsert_breakpoints): Likewise.
4125 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4126 (delete_reinsert_breakpoints): Likewise.
4127 (reinsert_reinsert_breakpoints): Likewise.
4128 (uninsert_reinsert_breakpoints): Likewise.
4129 (has_reinsert_breakpoints): Likewise.
4131 2016-07-21 Yao Qi <yao.qi@linaro.org>
4133 * inferiors.c (get_thread_process): Make parameter const.
4134 * inferiors.h (get_thread_process): Update declaration.
4135 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4136 Add new parameters child_thread and parent_thread. Callers
4138 * mem-break.h (clone_all_breakpoints): Update declaration.
4140 2016-07-21 Yao Qi <yao.qi@linaro.org>
4142 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4143 <command_list, handler>: Remove.
4144 (struct gdb_breakpoint): New.
4145 (struct other_breakpoint): New.
4146 (struct reinsert_breakpoint): New.
4147 (is_gdb_breakpoint): New function.
4148 (any_persistent_commands): Update command_list if
4149 is_gdb_breakpoint returns true.
4150 (set_breakpoint): Create breakpoints according to their types.
4151 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4152 (set_gdb_breakpoint_1): Likewise.
4153 (set_gdb_breakpoint): Likewise.
4154 (clear_breakpoint_conditions): Change parameter type to
4155 'struct gdb_breakpoint *'.
4156 (clear_breakpoint_commands): Likewise.
4157 (clear_breakpoint_conditions_and_commands): Likewise.
4158 (add_condition_to_breakpoint): Likewise.
4159 (add_breakpoint_condition): Likewise.
4160 (add_commands_to_breakpoint): Likewise.
4161 (check_breakpoints): Check other_breakpoint.
4162 (clone_one_breakpoint): Clone breakpopint according to its type.
4163 * mem-break.h (struct gdb_breakpoint): Declare.
4164 (set_gdb_breakpoint): Update declaration.
4165 (clear_breakpoint_conditions_and_commands): Likewise.
4166 (add_breakpoint_condition): Likewise.
4167 (add_breakpoint_commands): Likewise.
4168 * server.c (process_point_options): Change parameter type to
4169 'struct gdb_breakpoint *'.
4171 2016-07-21 Yao Qi <yao.qi@linaro.org>
4173 * mem-break.c (set_breakpoint_at): Rename it to ...
4174 (set_breakpoint_type_at): ... it.
4175 (set_breakpoint_at): Call set_breakpoint_type_at.
4176 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4177 * mem-break.h (set_breakpoint_at): Update comments.
4179 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4181 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4183 (nios2_store_gregset): Likewise.
4185 2016-07-01 Pedro Alves <palves@redhat.com>
4186 Antoine Tremblay <antoine.tremblay@ericsson.com>
4188 * linux-low.c: Change interface to take the target lwp_info
4189 pointer directly and return void. Handle detaching from a zombie
4191 (linux_detach_lwp_callback): New function.
4192 (linux_detach): Detach from the leader thread after detaching from
4195 2016-06-28 Yao Qi <yao.qi@linaro.org>
4197 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4198 for variable new_offset.
4199 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4200 (aarch64_ftrace_insn_reloc_cb): Likewise.
4201 (aarch64_ftrace_insn_reloc_tb): Likewise.
4202 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4203 PRIx64 instead of PRIx32.
4205 2016-06-28 Yao Qi <yao.qi@linaro.org>
4207 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4208 (the_low_target): Install arm_get_syscall_trapinfo.
4210 2016-06-28 Yao Qi <yao.qi@linaro.org>
4212 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4214 (the_low_target): Install aarch64_get_syscall_trapinfo.
4216 2016-06-28 Yao Qi <yao.qi@linaro.org>
4218 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4220 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4221 Remove parameter sysno.
4222 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4225 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4227 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4228 (s390_emit_ne_goto): Likewise.
4229 (s390_emit_lt_goto): Likewise.
4230 (s390_emit_le_goto): Likewise.
4231 (s390_emit_gt_goto): Likewise.
4232 (s390_emit_ge_goto): Likewise.
4233 (s390x_emit_eq_goto): Likewise.
4234 (s390x_emit_ne_goto): Likewise.
4235 (s390x_emit_lt_goto): Likewise.
4236 (s390x_emit_le_goto): Likewise.
4237 (s390x_emit_gt_goto): Likewise.
4238 (s390x_emit_ge_goto): Likewise.
4239 (s390_emit_ops_impl): Mark variable static.
4240 (s390x_emit_ops): Likewise.
4242 2016-06-17 Yao Qi <yao.qi@linaro.org>
4244 * linux-low.c (handle_extended_wait): Call
4245 uninsert_reinsert_breakpoints for the parent process. Remove
4246 reinsert breakpoints from the child process. Reinsert them to
4247 the parent process when vfork is done.
4248 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4249 (reinsert_reinsert_breakpoints): New function.
4250 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4251 (reinsert_reinsert_breakpoints): Declare.
4253 2016-06-17 Yao Qi <yao.qi@linaro.org>
4255 * linux-low.c (handle_extended_wait): If the parent is doing
4256 step-over, remove the reinsert breakpoints from the forked child.
4258 2016-06-17 Yao Qi <yao.qi@linaro.org>
4260 * linux-low.c (unsuspend_all_lwps): Declare.
4261 (linux_low_filter_event): If thread exited, call finish_step_over.
4262 If step-over is finished, unsuspend other threads.
4264 2016-06-17 Yao Qi <yao.qi@linaro.org>
4266 * linux-low.c (linux_resume_one_lwp_throw): Assert
4267 has_reinsert_breakpoints returns false.
4268 * mem-break.c (delete_disabled_breakpoints): Assert
4269 bp type isn't reinsert_breakpoint.
4271 2016-06-17 Yao Qi <yao.qi@linaro.org>
4273 * linux-low.c (maybe_hw_step): New function.
4274 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4275 (finish_step_over): Switch current_thread to lwp temporarily,
4276 and assert has_reinsert_breakpoints returns true.
4277 (proceed_one_lwp): Call maybe_hw_step.
4278 * mem-break.c (has_reinsert_breakpoints): New function.
4279 * mem-break.h (has_reinsert_breakpoints): Declare.
4281 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4283 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4285 2016-05-17 Yao Qi <yao.qi@linaro.org>
4287 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4288 instead of find_inferior.
4290 2016-05-05 Yao Qi <yao.qi@linaro.org>
4292 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4293 Initialize res to zero.
4295 2016-05-05 Yao Qi <yao.qi@linaro.org>
4297 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4300 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4302 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4303 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4304 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4306 2016-04-28 Par Olsson <par.olsson@windriver.com>
4307 Simon Marchi <simon.marchi@ericsson.com>
4309 * tracepoint.c (write_inferior_int8): New function.
4310 (cmd_qtenable_disable): Write enable flag using
4311 write_inferior_int8.
4313 2016-04-25 Yao Qi <yao.qi@linaro.org>
4315 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4316 (need_step_over_p): Return zero if the LWP has pending signals
4317 can be delivered on software single step target.
4319 2016-04-25 Yao Qi <yao.qi@linaro.org>
4321 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4322 return instead of error.
4324 2016-04-22 Yao Qi <yao.qi@linaro.org>
4326 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4329 2016-04-22 Yao Qi <yao.qi@linaro.org>
4331 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4332 signal when stepping over breakpoint with software single
4335 2016-04-21 Pedro Alves <palves@redhat.com>
4337 * linux-s390-low.c (s390_collect_ptrace_register)
4338 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4340 (s390_check_regset): Use void * instead of gdb_byte *.
4342 2016-04-20 Pedro Alves <palves@redhat.com>
4344 * configure: Renegerate.
4346 2016-04-20 Yao Qi <yao.qi@linaro.org>
4348 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4349 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4351 (arm_store_gregset): Likewise.
4353 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4355 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4356 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4357 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4358 (amd64-avx-mpx-linux.c): New rules.
4359 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4360 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4361 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4362 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4363 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4364 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4365 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4366 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4367 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4368 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4369 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4370 * linux-x86-low.c (x86_linux_read_description): Add case for
4371 X86_XSTATE_AVX_MPX_MASK.
4372 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4373 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4374 init_registers_i386_avx_mpx_linux.
4375 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4376 (initialize_low_tracepoint): Call
4377 init_registers_i386_avx_mpx_linux.
4378 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4379 (initialize_low_tracepoint): Call
4380 init_registers_amd64_avx_mpx_linux.
4381 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4382 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4383 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4386 2016-04-18 Pedro Alves <palves@redhat.com>
4388 * configure: Regenerate.
4390 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4392 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4393 (aarch64_emit_sub): Likewise.
4395 2016-04-12 Pedro Alves <palves@redhat.com>
4397 * utils.c (prepare_to_throw_exception): Delete.
4399 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4401 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4403 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4405 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4407 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4409 * linux-aarch64-ipa.c: Add <elf.h> include.
4410 * linux-ppc-ipa.c: Add <elf.h> include.
4411 * linux-s390-ipa.c: Add <elf.h> include.
4413 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4415 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4416 (get_raw_reg_ptr): Likewise.
4417 (get_trace_state_variable_value_ptr): Likewise.
4418 (set_trace_state_variable_value_ptr): Likewise.
4419 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4422 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4423 Marcin Kościelnicki <koriakin@0x04.net>
4426 * linux-ppc-low.c (emit_insns): New function.
4427 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4428 (ppc_emit_prologue): New function.
4429 (ppc_emit_epilogue): New function.
4430 (ppc_emit_add): New function.
4431 (ppc_emit_sub): New function.
4432 (ppc_emit_mul): New function.
4433 (ppc_emit_lsh): New function.
4434 (ppc_emit_rsh_signed): New function.
4435 (ppc_emit_rsh_unsigned): New function.
4436 (ppc_emit_ext): New function.
4437 (ppc_emit_zero_ext): New function.
4438 (ppc_emit_log_not): New function.
4439 (ppc_emit_bit_and): New function.
4440 (ppc_emit_bit_or): New function.
4441 (ppc_emit_bit_xor): New function.
4442 (ppc_emit_bit_not): New function.
4443 (ppc_emit_equal): New function.
4444 (ppc_emit_less_signed): New function.
4445 (ppc_emit_less_unsigned): New function.
4446 (ppc_emit_ref): New function.
4447 (ppc_emit_const): New function.
4448 (ppc_emit_reg): New function.
4449 (ppc_emit_pop): New function.
4450 (ppc_emit_stack_flush): New function.
4451 (ppc_emit_swap): New function.
4452 (ppc_emit_stack_adjust): New function.
4453 (ppc_emit_call): New function.
4454 (ppc_emit_int_call_1): New function.
4455 (ppc_emit_void_call_2): New function.
4456 (ppc_emit_if_goto): New function.
4457 (ppc_emit_goto): New function.
4458 (ppc_emit_eq_goto): New function.
4459 (ppc_emit_ne_goto): New function.
4460 (ppc_emit_lt_goto): New function.
4461 (ppc_emit_le_goto): New function.
4462 (ppc_emit_gt_goto): New function.
4463 (ppc_emit_ge_goto): New function.
4464 (ppc_write_goto_address): New function.
4465 (ppc_emit_ops_impl): New static variable.
4466 (ppc64v1_emit_prologue): New function.
4467 (ppc64v2_emit_prologue): New function.
4468 (ppc64_emit_epilogue): New function.
4469 (ppc64_emit_add): New function.
4470 (ppc64_emit_sub): New function.
4471 (ppc64_emit_mul): New function.
4472 (ppc64_emit_lsh): New function.
4473 (ppc64_emit_rsh_signed): New function.
4474 (ppc64_emit_rsh_unsigned): New function.
4475 (ppc64_emit_ext): New function.
4476 (ppc64_emit_zero_ext): New function.
4477 (ppc64_emit_log_not): New function.
4478 (ppc64_emit_bit_and): New function.
4479 (ppc64_emit_bit_or): New function.
4480 (ppc64_emit_bit_xor): New function.
4481 (ppc64_emit_bit_not): New function.
4482 (ppc64_emit_equal): New function.
4483 (ppc64_emit_less_signed): New function.
4484 (ppc64_emit_less_unsigned): New function.
4485 (ppc64_emit_ref): New function.
4486 (ppc64_emit_const): New function.
4487 (ppc64v1_emit_reg): New function.
4488 (ppc64v2_emit_reg): New function.
4489 (ppc64_emit_pop): New function.
4490 (ppc64_emit_stack_flush): New function.
4491 (ppc64_emit_swap): New function.
4492 (ppc64v1_emit_call): New function.
4493 (ppc64v2_emit_call): New function.
4494 (ppc64v1_emit_int_call_1): New function.
4495 (ppc64v2_emit_int_call_1): New function.
4496 (ppc64v1_emit_void_call_2): New function.
4497 (ppc64v2_emit_void_call_2): New function.
4498 (ppc64_emit_if_goto): New function.
4499 (ppc64_emit_eq_goto): New function.
4500 (ppc64_emit_ne_goto): New function.
4501 (ppc64_emit_lt_goto): New function.
4502 (ppc64_emit_le_goto): New function.
4503 (ppc64_emit_gt_goto): New function.
4504 (ppc64_emit_ge_goto): New function.
4505 (ppc64v1_emit_ops_impl): New static variable.
4506 (ppc64v2_emit_ops_impl): New static variable.
4507 (ppc_emit_ops): New function.
4508 (linux_low_target): Wire in ppc_emit_ops.
4510 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4511 Marcin Kościelnicki <koriakin@0x04.net>
4514 * Makefile.in: Add powerpc-*-ipa.o
4515 * configure.srv: Add ipa_obj for powerpc*-linux.
4516 * linux-ppc-ipa.c: New file.
4517 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4519 (PPC_FIELD): New macro.
4520 (PPC_SEXT): New macro.
4521 (PPC_OP6): New macro.
4522 (PPC_BO): New macro.
4523 (PPC_LI): New macro.
4524 (PPC_BD): New macro.
4525 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4526 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4527 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4528 (ppc_get_thread_area): New function.
4529 (is_elfv2_inferior): New function.
4530 (gen_ds_form): New function.
4531 (GEN_STD): New macro.
4532 (GEN_STDU): New macro.
4533 (GEN_LD): New macro.
4534 (GEN_LDU): New macro.
4535 (gen_d_form): New function.
4536 (GEN_ADDI): New macro.
4537 (GEN_ADDIS): New macro.
4538 (GEN_LI): New macro.
4539 (GEN_LIS): New macro.
4540 (GEN_ORI): New macro.
4541 (GEN_ORIS): New macro.
4542 (GEN_LWZ): New macro.
4543 (GEN_STW): New macro.
4544 (GEN_STWU): New macro.
4545 (gen_xfx_form): New function.
4546 (GEN_MFSPR): New macro.
4547 (GEN_MTSPR): New macro.
4548 (GEN_MFCR): New macro.
4549 (GEN_MTCR): New macro.
4550 (GEN_SYNC): New macro.
4551 (GEN_LWSYNC): New macro.
4552 (gen_x_form): New function.
4553 (GEN_OR): New macro.
4554 (GEN_MR): New macro.
4555 (GEN_LWARX): New macro.
4556 (GEN_STWCX): New macro.
4557 (GEN_CMPW): New macro.
4558 (gen_md_form): New function.
4559 (GEN_RLDICL): New macro.
4560 (GEN_RLDICR): New macro.
4561 (gen_i_form): New function.
4563 (GEN_BL): New macro.
4564 (gen_b_form): New function.
4565 (GEN_BNE): New macro.
4566 (GEN_LOAD): New macro.
4567 (GEN_STORE): New macro.
4568 (gen_limm): New function.
4569 (gen_atomic_xchg): New function.
4570 (gen_call): New function.
4571 (ppc_relocate_instruction): New function.
4572 (ppc_install_fast_tracepoint_jump_pad): New function.
4573 (ppc_get_min_fast_tracepoint_insn_len): New function.
4574 (ppc_get_ipa_tdesc_idx): New function.
4575 (the_low_target): Wire in the new functions.
4576 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4578 * linux-ppc-tdesc.h: New file.
4580 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4582 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4583 (alloc_jump_pad_buffer): New function.
4584 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4585 (alloc_jump_pad_buffer): New function.
4586 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4587 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4588 (alloc_jump_pad_buffer): New function.
4589 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4590 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4591 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4592 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4594 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4596 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4597 * linux-amd64-ipa.c: Likewise.
4598 * linux-i386-ipa.c: Likewise.
4599 * linux-s390-ipa.c: Likewise.
4600 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4601 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4602 set_trace_state_variable_value_ptr.
4603 (struct ipa_sym_addresses): Likewise.
4604 (symbol_list): Likewise.
4605 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4606 accessing gdb_collect directly.
4607 (gdb_collect_ptr_type): New typedef.
4608 (get_raw_reg_ptr_type): New typedef.
4609 (get_trace_state_variable_value_ptr_type): New typedef.
4610 (set_trace_state_variable_value_ptr_type): New typedef.
4611 (gdb_collect_ptr): New global.
4612 (get_raw_reg_ptr): New global.
4613 (get_trace_state_variable_value_ptr): New global.
4614 (set_trace_state_variable_value_ptr): New global.
4615 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4616 accessing get_raw_reg directly.
4617 (get_get_tsv_func_addr): Likewise for
4618 get_trace_state_variable_value_ptr.
4619 (get_set_tsv_func_addr): Likewise for
4620 set_trace_state_variable_value_ptr.
4621 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4623 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4625 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4627 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4629 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4631 (relocate_instruction): Remove own_buf.
4632 * server.c (own_buf): Make global.
4633 (handle_v_requests): Make global.
4634 * server.h (own_buf): New declaration.
4635 (handle_v_requests): New prototype.
4637 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4640 * linux-s390-low.c (add_insns): New function.
4641 (s390_emit_prologue): New function.
4642 (s390_emit_epilogue): New function.
4643 (s390_emit_add): New function.
4644 (s390_emit_sub): New function.
4645 (s390_emit_mul): New function.
4646 (s390_emit_lsh): New function.
4647 (s390_emit_rsh_signed): New function.
4648 (s390_emit_rsh_unsigned): New function.
4649 (s390_emit_ext): New function.
4650 (s390_emit_log_not): New function.
4651 (s390_emit_bit_and): New function.
4652 (s390_emit_bit_or): New function.
4653 (s390_emit_bit_xor): New function.
4654 (s390_emit_bit_not): New function.
4655 (s390_emit_equal): New function.
4656 (s390_emit_less_signed): New function.
4657 (s390_emit_less_unsigned): New function.
4658 (s390_emit_ref): New function.
4659 (s390_emit_if_goto): New function.
4660 (s390_emit_goto): New function.
4661 (s390_write_goto_address): New function.
4662 (s390_emit_litpool): New function.
4663 (s390_emit_const): New function.
4664 (s390_emit_call): New function.
4665 (s390_emit_reg): New function.
4666 (s390_emit_pop): New function.
4667 (s390_emit_stack_flush): New function.
4668 (s390_emit_zero_ext): New function.
4669 (s390_emit_swap): New function.
4670 (s390_emit_stack_adjust): New function.
4671 (s390_emit_set_r2): New function.
4672 (s390_emit_int_call_1): New function.
4673 (s390_emit_void_call_2): New function.
4674 (s390_emit_eq_goto): New function.
4675 (s390_emit_ne_goto): New function.
4676 (s390_emit_lt_goto): New function.
4677 (s390_emit_le_goto): New function.
4678 (s390_emit_gt_goto): New function.
4679 (s390_emit_ge_goto): New function.
4680 (s390x_emit_prologue): New function.
4681 (s390x_emit_epilogue): New function.
4682 (s390x_emit_add): New function.
4683 (s390x_emit_sub): New function.
4684 (s390x_emit_mul): New function.
4685 (s390x_emit_lsh): New function.
4686 (s390x_emit_rsh_signed): New function.
4687 (s390x_emit_rsh_unsigned): New function.
4688 (s390x_emit_ext): New function.
4689 (s390x_emit_log_not): New function.
4690 (s390x_emit_bit_and): New function.
4691 (s390x_emit_bit_or): New function.
4692 (s390x_emit_bit_xor): New function.
4693 (s390x_emit_bit_not): New function.
4694 (s390x_emit_equal): New function.
4695 (s390x_emit_less_signed): New function.
4696 (s390x_emit_less_unsigned): New function.
4697 (s390x_emit_ref): New function.
4698 (s390x_emit_if_goto): New function.
4699 (s390x_emit_const): New function.
4700 (s390x_emit_call): New function.
4701 (s390x_emit_reg): New function.
4702 (s390x_emit_pop): New function.
4703 (s390x_emit_stack_flush): New function.
4704 (s390x_emit_zero_ext): New function.
4705 (s390x_emit_swap): New function.
4706 (s390x_emit_stack_adjust): New function.
4707 (s390x_emit_int_call_1): New function.
4708 (s390x_emit_void_call_2): New function.
4709 (s390x_emit_eq_goto): New function.
4710 (s390x_emit_ne_goto): New function.
4711 (s390x_emit_lt_goto): New function.
4712 (s390x_emit_le_goto): New function.
4713 (s390x_emit_gt_goto): New function.
4714 (s390x_emit_ge_goto): New function.
4715 (s390_emit_ops): New function.
4716 (struct linux_target_ops): Fill in emit_ops hook.
4718 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4721 * Makefile.in: Add s390 IPA files.
4722 * configure.srv: Build IPA for s390.
4723 * linux-s390-ipa.c: New file.
4724 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4725 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4726 (tdesc_s390_linux32): Likewise.
4727 (init_registers_s390_linux32v1): Likewise.
4728 (tdesc_s390_linux32v1): Likewise.
4729 (init_registers_s390_linux32v2): Likewise.
4730 (tdesc_s390_linux32v2): Likewise.
4731 (init_registers_s390_linux64): Likewise.
4732 (tdesc_s390_linux64): Likewise.
4733 (init_registers_s390_linux64v1): Likewise.
4734 (tdesc_s390_linux64v1): Likewise.
4735 (init_registers_s390_linux64v2): Likewise.
4736 (tdesc_s390_linux64v2): Likewise.
4737 (init_registers_s390_te_linux64): Likewise.
4738 (tdesc_s390_te_linux64): Likewise.
4739 (init_registers_s390_vx_linux64): Likewise.
4740 (tdesc_s390_vx_linux64): Likewise.
4741 (init_registers_s390_tevx_linux64): Likewise.
4742 (tdesc_s390_tevx_linux64): Likewise.
4743 (init_registers_s390x_linux64): Likewise.
4744 (tdesc_s390x_linux64): Likewise.
4745 (init_registers_s390x_linux64v1): Likewise.
4746 (tdesc_s390x_linux64v1): Likewise.
4747 (init_registers_s390x_linux64v2): Likewise.
4748 (tdesc_s390x_linux64v2): Likewise.
4749 (init_registers_s390x_te_linux64): Likewise.
4750 (tdesc_s390x_te_linux64): Likewise.
4751 (init_registers_s390x_vx_linux64): Likewise.
4752 (tdesc_s390x_vx_linux64): Likewise.
4753 (init_registers_s390x_tevx_linux64): Likewise.
4754 (tdesc_s390x_tevx_linux64): Likewise.
4755 (have_hwcap_s390_vx): New static variable.
4756 (s390_arch_setup): Fill have_hwcap_s390_vx.
4757 (s390_get_thread_area): New function.
4758 (s390_ft_entry_gpr_esa): New const.
4759 (s390_ft_entry_gpr_zarch): New const.
4760 (s390_ft_entry_misc): New const.
4761 (s390_ft_entry_fr): New const.
4762 (s390_ft_entry_vr): New const.
4763 (s390_ft_main_31): New const.
4764 (s390_ft_main_64): New const.
4765 (s390_ft_exit_fr): New const.
4766 (s390_ft_exit_vr): New const.
4767 (s390_ft_exit_misc): New const.
4768 (s390_ft_exit_gpr_esa): New const.
4769 (s390_ft_exit_gpr_zarch): New const.
4770 (append_insns): New function.
4771 (s390_relocate_instruction): New function.
4772 (s390_install_fast_tracepoint_jump_pad): New function.
4773 (s390_get_min_fast_tracepoint_insn_len): New function.
4774 (s390_get_ipa_tdesc_idx): New function.
4775 (struct linux_target_ops): Wire in the above functions.
4776 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4777 * linux-s390-tdesc.h: New file.
4779 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4781 * linux-s390-low.c (s390_supports_tracepoints): New function.
4782 (struct linux_target_ops): Fill supports_tracepoints hook.
4784 2016-03-18 Yao Qi <yao.qi@linaro.org>
4786 * linux-low.c (lwp_signal_can_be_delivered): New function.
4787 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4789 2016-03-18 Yao Qi <yao.qi@linaro.org>
4791 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4792 0 if signal is enqueued. Remove 'signal' from one debugging
4793 message. Move one debugging message to some lines below.
4794 Remove code setting 'signal' to 0.
4796 2016-03-18 Yao Qi <yao.qi@linaro.org>
4798 * linux-low.c (linux_low_filter_event): Remove redundant
4799 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4801 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4803 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4804 (struct linux_target_ops): Wire in the above.
4806 2016-03-03 Yao Qi <yao.qi@linaro.org>
4808 * linux-low.c: Update comments to start_step_over.
4810 2016-03-03 Yao Qi <yao.qi@linaro.org>
4813 * linux-low.c (handle_extended_wait): Set child suspended
4814 if event_lwp->bp_reinsert isn't zero.
4816 2016-03-02 Yao Qi <yao.qi@linaro.org>
4818 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4819 enqueue_pending_signal.
4821 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4823 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4826 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4828 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4829 (s390_regmap_3264) [!__s390x__]: New global.
4830 (s390_collect_ptrace_register): Skip map entries containing -1.
4831 (s390_supply_ptrace_register): Ditto.
4832 (s390_fill_gprs_high): New function.
4833 (s390_store_gprs_high): New function.
4834 (s390_regsets): Add NT_S390_HIGH_GPRS.
4835 (s390_get_hwcap): Enable on 31-bit.
4836 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4837 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4838 Detect NT_S390_HIGH_GPRS.
4839 (s390_usrregs_info_3264): Enable on 31-bit.
4840 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4841 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4843 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4846 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4847 * configure.srv: Ditto.
4848 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4849 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4850 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4851 (init_registers_amd64_linux): Remove prototype.
4852 (tdesc_amd64_linux): Remove declaration.
4853 (get_ipa_tdesc): New function.
4854 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4855 initialize remaining tdescs.
4856 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4857 (init_registers_i386_linux): Remove prototype.
4858 (tdesc_i386_linux): Remove declaration.
4859 (get_ipa_tdesc): New function.
4860 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4861 initialize remaining tdescs.
4862 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4863 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4864 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4865 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4866 (x86_get_ipa_tdesc_idx): New function.
4867 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4868 * linux-x86-tdesc.h: New file.
4869 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4870 (target_get_ipa_tdesc_idx): New macro.
4871 * tracepoint.c (ipa_tdesc_idx): New macro.
4872 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4873 (symbol_list): Add ipa_tdesc_idx.
4874 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4875 (ipa_tdesc): Remove.
4876 (ipa_tdesc_idx): New variable.
4877 (get_context_regcache): Use get_ipa_tdesc.
4878 (gdb_collect): Ditto.
4880 * tracepoint.h (get_ipa_tdesc): New prototype.
4881 (ipa_tdesc): Remove.
4883 2016-02-24 Pedro Alves <palves@redhat.com>
4885 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4886 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4887 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4888 Factor out common code between the USE_SIGTRAP_SIGINFO and
4889 !USE_SIGTRAP_SIGINFO blocks.
4890 (linux_low_filter_event): Call save_stop_reason instead of
4891 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4893 (linux_wait_1): Update comments.
4895 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4897 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4898 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4899 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4900 ppc_insert_point, ppc_remove_point.
4902 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4904 * linux-s390-low.c (s390_supports_z_point_type): New function.
4905 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4907 2016-02-16 Yao Qi <yao.qi@linaro.org>
4909 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4910 PC. Get pc from regcache_read_pc.
4912 2016-02-12 Yao Qi <yao.qi@linaro.org>
4914 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4915 or linux_get_pc_32bit.
4916 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4918 2016-02-12 Yao Qi <yao.qi@linaro.org>
4920 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4921 arm_linux_get_next_pcs_fixup.
4923 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4925 * tracepoint.c (x_tracepoint_action_download): Change
4926 write_inferior_data_ptr to write_inferior_data_pointer.
4927 (cmd_qtstart): Likewise.
4928 (write_inferior_data_ptr): Remove.
4929 (download_agent_expr): Change write_inferior_data_ptr to
4930 write_inferior_data_pointer.
4931 (download_tracepoint_1): Likewise.
4932 (download_tracepoint): Likewise.
4933 (download_trace_state_variables): Likewise.
4935 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4936 Marcin Kościelnicki <koriakin@0x04.net>
4938 * tracepoint.c (struct tracepoint_action_ops): Remove.
4939 (struct tracepoint_action): Remove ops.
4940 (m_tracepoint_action_download, r_tracepoint_action_download)
4941 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4942 size and offset accordingly.
4943 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4944 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4945 (tracepoint_action_send, tracepoint_action_download): New functions.
4946 Helpers for trace action handlers.
4947 (add_tracepoint_action): Remove setup actions ops.
4948 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4950 2016-02-10 Yao Qi <yao.qi@linaro.org>
4952 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4954 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4956 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4958 * configure: Regenerate.
4960 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4962 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4963 void * to gdb_byte *.
4964 * linux-low.c (siginfo_fixup): Likewise.
4965 (linux_xfer_siginfo): Likewise.
4966 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4968 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4970 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4972 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4974 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4976 * linux-x86-low.c [__x86_64__]: Include
4977 "nat/amd64-linux-siginfo.h".
4978 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4979 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4980 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4981 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4982 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4983 (cpt_si_fd, si_timerid, si_overrun): Move from
4984 nat/amd64-linux-siginfo.c.
4985 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4987 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4989 * server.c (skip_to_semicolon): Remove.
4990 (process_point_options): Use strchrnul instead of
4993 2016-01-26 Yao Qi <yao.qi@linaro.org>
4995 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4996 * linux-low.c (install_software_single_step_breakpoints): Don't
4997 call regcache_read_pc.
4998 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5001 2016-01-26 Yao Qi <yao.qi@linaro.org>
5003 * linux-low.c (install_software_single_step_breakpoints): Call
5004 regcache_read_pc instead of get_pc.
5006 2016-01-26 Yao Qi <yao.qi@linaro.org>
5008 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5009 (unblock_async_io): Rename to ...
5010 (block_unblock_async_io): ... it. New function.
5011 (enable_async_io): Don't install SIGIO handler. Unblock it
5013 (disable_async_io): Don't ignore SIGIO. Block it instead.
5014 (initialize_async_io): Install SIGIO handler. Don't call
5017 2016-01-26 Yao Qi <yao.qi@linaro.org>
5019 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5020 first character is '\003', call *the_target->request_interrupt.
5022 2016-01-25 Yao Qi <yao.qi@linaro.org>
5024 * remote-utils.c (new_thread_notify): Remove.
5025 (dead_thread_notify): Likewise.
5026 * remote-utils.h (new_thread_notify): Remove declaration.
5027 (dead_thread_notify): Likewise.
5029 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5031 * gdb.trace/pending.exp: Fix expected message on continue.
5033 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5035 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5036 it works properly on big-endian machines where sizeof (CORE_ADDR)
5039 2016-01-21 Pedro Alves <palves@redhat.com>
5041 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5042 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5043 * configure: Regenerate.
5045 2016-01-21 Yao Qi <yao.qi@linaro.org>
5047 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5048 is_thumb and set it according to CPSR saved on the stack.
5049 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5050 arm_sigreturn_next_pc.
5052 2016-01-18 Yao Qi <yao.qi@linaro.org>
5054 * linux-low.c (linux_set_pc_64bit): New function.
5055 (linux_get_pc_64bit): New function.
5056 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5058 * linux-sparc-low.c (debug_threads): Remove declaration.
5059 (sparc_get_pc): Remove.
5060 (the_low_target): Use linux_get_pc_64bit instead of
5062 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5063 (the_low_target): Use linux_get_pc_64bit and
5066 2016-01-18 Yao Qi <yao.qi@linaro.org>
5068 * linux-arm-low.c (debug_threads): Remove declaration.
5069 (arm_get_pc, arm_set_pc): Remove.
5070 (the_low_target): Use linux_get_pc_32bit and
5072 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5073 (the_low_target): Use linux_get_pc_32bit and
5075 * linux-cris-low.c (debug_threads): Remove declaration.
5076 (cris_get_pc, cris_set_pc,): Remove.
5077 (the_low_target): Use linux_get_pc_32bit and
5079 * linux-crisv32-low.c (debug_threads): Remove declaration.
5080 (cris_get_pc, cris_set_pc): Remove.
5081 (the_low_target): Use linux_get_pc_32bit and
5083 * linux-low.c: Include inttypes.h.
5084 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5085 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5086 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5087 (the_low_target): Use linux_get_pc_32bit and
5089 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5090 (the_low_target): Use linux_get_pc_32bit and
5092 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5093 (the_low_target): Use linux_get_pc_32bit and
5095 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5096 (the_low_target): Use linux_get_pc_32bit and
5098 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5099 (the_low_target): Use linux_get_pc_32bit and
5102 2016-01-18 Gary Benson <gbenson@redhat.com>
5104 * configure.ac (AC_FUNC_FORK): New check.
5105 * config.in: Regenerate.
5106 * configure: Likewise.
5108 2016-01-14 Yao Qi <yao.qi@linaro.org>
5110 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5111 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5112 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5113 arm_get_next_pcs_ctor.
5115 2016-01-12 Josh Stone <jistone@redhat.com>
5116 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5118 * inferiors.h: Include "gdb_vecs.h".
5119 (struct process_info): Add syscalls_to_catch.
5120 * inferiors.c (remove_process): Free syscalls_to_catch.
5121 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5122 syscall_return stops.
5123 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5124 * server.c (handle_general_set): Handle QCatchSyscalls.
5125 (handle_query): Report support for QCatchSyscalls.
5126 * target.h (struct target_ops): Add supports_catch_syscall.
5127 (target_supports_catch_syscall): New macro.
5128 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5129 (struct lwp_info): Add syscall_state.
5130 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5131 Maintain syscall_state and syscalls_to_catch across exec.
5132 (get_syscall_trapinfo): New function, proxy to the_low_target.
5133 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5134 (linux_low_filter_event): Toggle syscall_state entry/return for
5135 syscall traps, and set it ignored for all others.
5136 (gdb_catching_syscalls_p): New function.
5137 (gdb_catch_this_syscall_p): New function.
5138 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5139 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5140 (linux_supports_catch_syscall): New function.
5141 (linux_target_ops): Install it.
5142 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5143 (the_low_target): Install it.
5145 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5147 * acinclude.m4: Include new ../warning.m4 file.
5148 * configure: Regenerated.
5149 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5151 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5153 * ax.c (is_goto_target): Mark static.
5154 * linux-low.c (register_addr): Likewise.
5155 (linux_fetch_registers, linux_store_registers): Likewise.
5156 * mem-break.c (any_persistent_commands): Fix old prototype.
5157 (add_commands_to_breakpoint): Mark static.
5158 * regcache.c (find_register_by_name): Delete unused func.
5159 * remote-utils.c (hex_or_minus_one): Mark static.
5160 * server.c (monitor_show_help): Mark static.
5161 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5162 handle_v_requests): Likewise.
5164 2016-01-12 Pedro Alves <palves@redhat.com>
5166 Remove use of the registered trademark symbol throughout.
5168 2016-01-08 Yao Qi <yao.qi@linaro.org>
5170 * remote-utils.c (getpkt): If c is '\003', call target hook
5173 2016-01-06 Yao Qi <yao.qi@linaro.org>
5175 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5176 linux-aarch32-low.c.
5177 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5178 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5179 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5180 (thumb2_breakpoint): Declare.
5181 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5182 linux-aarch32-low.h.
5183 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5184 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5185 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5187 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5189 * gdbreplay.c (gdbreplay_version): Change copyright year in
5191 * server.c (gdbserver_version): Likewise.
5193 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5195 * server.c (crc32_table): Delete.
5196 (crc32): Use libiberty's xcrc32 function.
5198 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5200 * lynx-low.c (lynx_delete_thread_callback): New function.
5201 (lynx_mourn): Properly delete our process and all of its
5202 threads. Remove call to clear_inferiors.
5204 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5206 * target.c (thread_search_callback): Add check that
5207 the thread_stopped target callback is not NULL before
5210 2015-12-21 Yao Qi <yao.qi@linaro.org>
5212 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5215 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5217 * server.c (handle_query): Call target_supports_software_single_step.
5219 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5221 * linux-low.c (single_step): New function.
5222 (linux_resume_one_lwp_throw): Call single_step.
5223 (start_step_over): Likewise.
5225 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5227 * Makefile.in (SFILES): Append arch/arm-linux.c,
5228 arch/arm-get-next-pcs.c.
5229 (arm-linux.o): New rule.
5230 (arm-get-next-pcs.o): New rule.
5231 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5233 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5234 to linux-aarch32-low.c.
5235 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5236 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5237 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5238 (thumb2_breakpoint_len): Likewise.
5239 (arm_is_thumb_mode): Make non-static.
5240 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5241 from linux-aarch32-low.c.
5242 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5243 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5244 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5245 (thumb2_breakpoint_len): Likewise.
5246 (arm_is_thumb_mode): New declaration.
5247 * linux-arm-low.c: Include arch/arm-linux.h
5248 aarch/arm-get-next-pcs.h, sys/syscall.h.
5249 (get_next_pcs_ops): New struct.
5250 (get_next_pcs_addr_bits_remove): New function.
5251 (get_next_pcs_is_thumb): New function.
5252 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5253 (arm_sigreturn_next_pc): Likewise.
5254 (get_next_pcs_syscall_next_pc): Likewise.
5255 (arm_gdbserver_get_next_pcs): Likewise.
5256 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5258 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5259 * server.h: Include gdb_vecs.h.
5261 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5263 * Makefile.in (SFILES): Append common/common-regcache.c.
5264 (OBS): Append common-regcache.o.
5265 (common-regcache.o): New rule.
5266 * regcache.c (init_register_cache): Initialize cache to
5268 (regcache_raw_read_unsigned): New function.
5269 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5270 register_status enum.
5272 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5274 * linux-aarch64-low.c (the_low_targets): Rename
5275 breakpoint_reinsert_addr to get_next_pcs.
5276 * linux-arm-low.c (the_low_targets): Likewise.
5277 * linux-bfin-low.c (the_low_targets): Likewise.
5278 * linux-cris-low.c (the_low_targets): Likewise.
5279 * linux-crisv32-low.c (the_low_targets): Likewise.
5280 * linux-low.c (can_software_single_step): Likewise.
5281 (install_software_single_step_breakpoints): New function.
5282 (start_step_over): Use install_software_single_step_breakpoints.
5283 * linux-low.h: New CORE_ADDR vector.
5284 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5286 * linux-mips-low.c (the_low_targets): Likewise.
5287 * linux-nios2-low.c (the_low_targets): Likewise.
5288 * linux-sparc-low.c (the_low_targets): Likewise.
5290 2015-12-17 Pedro Alves <palves@redhat.com>
5292 * linux-low.c (linux_kill_one_lwp): Remove references to
5294 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5296 (linux_init_signals): Delete.
5297 (initialize_low): Adjust.
5298 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5300 2015-12-16 Pedro Alves <palves@redhat.com>
5302 * configure.ac (compiler warning flags): When testing a
5303 -Wno-foo option, check whether -Wfoo works instead.
5304 * configure: Regenerate.
5306 2015-12-11 Don Breazeal <donb@codesourcery.com>
5308 * server.c (process_serial_event): Don't exit from gdbserver
5309 in remote mode if there are still active inferiors.
5311 2015-12-11 Yao Qi <yao.qi@linaro.org>
5313 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5314 arm_breakpoint_at if the process is 32-bit.
5316 2015-12-11 Yao Qi <yao.qi@linaro.org>
5318 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5321 2015-12-07 Yao Qi <yao.qi@linaro.org>
5323 * configure.srv: Append arm.o to srv_tgtobj for
5324 aarch64*-*-linux* target.
5325 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5326 from linux-arm-low.c.
5327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5330 (thumb2_breakpoint_len): Likewise.
5331 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5332 (arm_breakpoint_kinds): Likewise.
5333 (arm_breakpoint_kind_from_pc): Likewise.
5334 (arm_sw_breakpoint_from_kind): Likewise.
5335 (arm_breakpoint_kind_from_current_state): Likewise.
5336 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5337 (arm_sw_breakpoint_from_kind): Declare.
5338 (arm_breakpoint_kind_from_current_state): Declare.
5339 (arm_breakpoint_at): Declare.
5340 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5341 arm_sw_breakpoint_from_kind if process is 32-bit.
5342 (aarch64_breakpoint_kind_from_pc): New function.
5343 (aarch64_breakpoint_kind_from_current_state): New function.
5344 (the_low_target): Initialize fields breakpoint_kind_from_pc
5345 and breakpoint_kind_from_current_state.
5346 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5347 linux-aarch32-low.c.
5348 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5349 (arm_breakpoint, arm_breakpoint_len): Likewise.
5350 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5351 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5352 (arm_is_thumb_mode): Likewise.
5353 (arm_breakpoint_at): Likewise.
5354 (arm_breakpoint_kind_from_pc): Likewise.
5355 (arm_sw_breakpoint_from_kind): Likewise.
5356 (arm_breakpoint_kind_from_current_state): Likewise.
5359 2015-08-04 Yao Qi <yao.qi@linaro.org>
5361 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5362 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5363 * server.c (extended_protocol): Remove "static".
5364 * server.h (extended_protocol): Declare it.
5366 2015-12-04 Josh Stone <jistone@redhat.com>
5368 * target.h (struct target_ops) <arch_setup>: Rename to ...
5369 (struct target_ops) <post_create_inferior>: ... this.
5370 (target_arch_setup): Rename to ...
5371 (target_post_create_inferior): ... this, calling post_create_inferior.
5372 * server.c (start_inferior): Update target_arch_setup calls to
5373 target_post_create_inferior.
5374 * linux-low.c (linux_low_ptrace_options): Forward declare.
5375 (linux_arch_setup): Update its comment for general use.
5376 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5377 (struct linux_target_ops): Use linux_post_create_inferior.
5378 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5379 to post_create_inferior.
5380 * nto-low.c (struct nto_target_ops): Likewise.
5381 * spu-low.c (struct spu_target_ops): Likewise.
5382 * win32-low.c (struct win32_target_ops): Likewise.
5384 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5386 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5388 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5390 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5391 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5392 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5393 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5394 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5395 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5396 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5397 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5398 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5399 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5400 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5403 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5405 * linux-low.c (linux_look_up_symbols): Don't call
5406 linux_supports_traceclone.
5407 * linux-low.h (thread_db_init): Remove use_events argument.
5408 * thread-db.c (thread_db_use_event): Remove global variable.
5409 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5410 (struct thread_db) <td_create_bp>: Remove field.
5411 (thread_db_create_event): Remove function.
5412 (thread_db_enable_reporting): Likewise.
5413 (find_one_thread): Don't check for thread_db_use_events.
5414 (attach_thread): Likewise.
5415 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5416 (try_thread_db_load_1): Don't check for thread_db_use_events.
5417 (thread_db_init): Remove use_events argument and thread events
5419 (remove_thread_event_breakpoints): Remove function.
5420 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5422 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5424 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5427 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5428 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5429 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5430 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5432 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5435 * linux-low.c (can_hardware_single_step): Use
5436 supports_hardware_single_step.
5437 (can_software_single_step): New function.
5438 (start_step_over): Call can_software_single_step.
5439 (linux_supports_hardware_single_step): New function.
5440 (struct target_ops) <supports_software_single_step>: Initialize.
5441 * linux-low.h (struct linux_target_ops)
5442 <supports_hardware_single_step>: Initialize.
5443 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5445 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5446 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5447 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5448 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5449 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5451 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5452 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5454 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5455 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5457 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5459 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5462 * target.h (struct target_ops): <supports_software_single_step>:
5464 (target_supports_software_single_step): New macro.
5466 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5468 * linux-low.c (linux_wait_1): Fix pc advance condition.
5469 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5470 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5472 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5474 * linux-arm-low.c (arm_is_thumb_mode): New function.
5475 (arm_breakpoint_at): Use arm_is_thumb_mode.
5476 (arm_breakpoint_kind_from_current_state): New function.
5477 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5479 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5480 (linux_breakpoint_kind_from_current_state): New function.
5481 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5482 * linux-low.h (struct linux_target_ops)
5483 <breakpoint_kind_from_current_state>: New field.
5484 * target.h (struct target_ops): Likewise.
5485 (target_breakpoint_kind_from_current_state): New macro.
5487 2015-11-30 Pedro Alves <palves@redhat.com>
5489 * linux-low.c (linux_resume): Wake up the event loop before
5492 2015-11-30 Pedro Alves <palves@redhat.com>
5494 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5496 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5498 * target.c (struct thread_search): New structure.
5499 (thread_search_callback): New function.
5500 (prev_general_thread): New global.
5501 (prepare_to_access_memory, done_accessing_memory): New functions.
5502 * target.h (prepare_to_access_memory, done_accessing_memory):
5503 Replace macros with function declarations.
5505 2015-11-30 Pedro Alves <palves@redhat.com>
5508 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5509 report TARGET_WAITKIND_NO_RESUMED.
5510 * remote-utils.c (prepare_resume_reply): Handle
5511 TARGET_WAITKIND_NO_RESUMED.
5512 * server.c (report_no_resumed): New global.
5513 (handle_query) <qSupported>: Handle "no-resumed+". Report
5514 "no-resumed+" support.
5515 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5516 return error if the client doesn't support no-resumed events.
5517 (push_stop_notification): New function.
5518 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5519 events if the client supports them.
5521 2015-11-30 Pedro Alves <palves@redhat.com>
5523 * linux-low.c (thread_still_has_status_pending_p): Don't check
5525 (lwp_resumed): New function.
5526 (status_pending_p_callback): Return early if the LWP is not
5527 supposed to be resumed.
5529 2015-11-30 Pedro Alves <palves@redhat.com>
5531 * linux-low.c (handle_extended_wait): Assert that the LWP's
5532 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5533 thread create events, leave the new child's status pending.
5534 (linux_low_filter_event): If GDB wants to hear about thread exit
5535 events, leave the LWP marked dead and don't delete it.
5536 (linux_wait_for_event_filtered): Don't check for thread exit.
5537 (filter_exit_event): New function.
5538 (linux_wait_1): Use it, when returning an exit event.
5539 (linux_resume_one_lwp_throw): Assert that the LWP's
5540 waitstatus is TARGET_WAITKIND_IGNORE.
5541 * remote-utils.c (prepare_resume_reply): Handle
5542 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5543 * server.c (report_thread_events): New global.
5544 (handle_general_set): Handle QThreadEvents.
5545 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5546 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5547 TARGET_WAITKIND_THREAD_EXITED.
5548 * server.h (report_thread_events): Declare.
5550 2015-11-30 Pedro Alves <palves@redhat.com>
5552 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5553 the thread's last_resume_kind was resume_stop.
5555 2015-11-30 Pedro Alves <palves@redhat.com>
5557 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5560 2015-11-30 Pedro Alves <palves@redhat.com>
5562 * server.c (handle_v_requests): Handle vCtrlC.
5564 2015-11-30 Pedro Alves <palves@redhat.com>
5566 * gdbthread.h (find_any_thread_of_pid): Declare.
5567 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5569 * server.c (handle_query): If current_thread is NULL, look for
5570 another thread of the selected process.
5572 2015-11-26 Daniel Colascione <dancol@dancol.org>
5573 Simon Marchi <simon.marchi@ericsson.com>
5575 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5576 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5578 * target.h (struct target_ops) <thread_name>: New field.
5579 (target_thread_name): New macro.
5581 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5583 * regcache.h (regcache_invalidate_pid): Add declaration.
5584 * regcache.c (regcache_invalidate_pid): New function, extracted
5585 from regcache_invalidate.
5586 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5587 Add trivial documentation comment.
5588 * lynx-low.c: Use regcache_invalidate_pid instead of
5589 regcache_invalidate.
5591 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5593 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5594 and Elf64_auxv_t if the target is Android.
5596 2015-11-22 Doug Evans <xdje42@gmail.com>
5598 * target.h: #include <sys/types.h>.
5600 2015-11-19 Pedro Alves <palves@redhat.com>
5602 * linux-low.c (linux_process_qsupported): Change prototype.
5604 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5606 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5607 and adjust to loop over all features.
5608 * server.c (handle_query) <qSupported>: Adjust to call
5609 target_process_qsupported once, passing it a vector of unprocessed
5611 * target.h (struct target_ops) <process_qsupported>: Change
5613 (target_process_qsupported): Adjust.
5615 2015-11-19 Pedro Alves <palves@redhat.com>
5617 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5619 * configure: Regenerate.
5621 2015-11-19 Pedro Alves <palves@redhat.com>
5623 * configure: Regenerate.
5625 2015-11-19 Yao Qi <yao.qi@linaro.org>
5627 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5630 2015-11-19 Yao Qi <yao.qi@linaro.org>
5632 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5633 (struct aarch64_operand): Move enum out.
5635 2015-11-19 Yao Qi <yao.qi@linaro.org>
5637 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5638 struct user_fpsimd_state *.
5639 (aarch64_store_fpregset): Likewise.
5641 2015-11-19 Yao Qi <yao.qi@linaro.org>
5643 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5644 struct user_pt_regs *.
5645 (aarch64_store_gregset): Likewise.
5647 2015-11-18 Pedro Alves <palves@redhat.com>
5649 * Makefile.in (all_object_files): Add $IPA_OBJS.
5651 2015-11-17 Pedro Alves <palves@redhat.com>
5653 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5654 GDB_SIGNAL_0 and gdb_signal_to_string.
5656 2015-11-17 Pedro Alves <palves@redhat.com>
5658 * win32-low.c (handle_output_debug_string): Remove parameter.
5659 (win32_kill): Remove our_status local and adjust call to
5660 handle_output_debug_string.
5661 (get_child_debug_event): Adjust call to
5662 handle_output_debug_string.
5664 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5666 * linux-mips-low.c (mips_fill_gregset): Add cast.
5667 (mips_store_gregset): Likewise.
5668 (mips_fill_fpregset): Likewise.
5669 (mips_store_fpregset): Likewise.
5671 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5673 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5676 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5678 * linux-mips-low.c (mips_linux_new_thread): Change type of
5679 watch_type to enum target_hw_bp_type.
5681 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5683 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5684 Change return type to arm_hwbp_type.
5686 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5688 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5689 (arm_store_gregset): Likewise.
5690 * linux-arm-low.c (arm_get_hwcap): Likewise.
5691 (arm_read_description): Likewise.
5693 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5695 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5697 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5699 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5700 (ppc_fill_vsxregset): Likewise.
5701 (ppc_store_vsxregset): Likewise.
5702 (ppc_fill_vrregset): Likewise.
5703 (ppc_store_vrregset): Likewise.
5704 (ppc_fill_evrregset): Likewise.
5705 (ppc_store_evrregset): Likewise.
5707 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5709 * linux-ppc-low.c (ppc_usrregs_info): Remove
5710 forward-declaration.
5711 (ppc_arch_setup): Move lower in file.
5713 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5715 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5716 (ps_pdwrite): Likewise.
5718 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5720 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5721 to after assert checks.
5723 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5725 * proc-service.c (ps_pdread): Add/adjust casts.
5726 (ps_pdwrite): Add/adjust casts.
5728 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5730 * server.c (handle_search_memory_1): Cast return value of
5733 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5735 * server.c (write_qxfer_response): Change type of data to
5738 2015-10-29 Pedro Alves <palves@redhat.com>
5740 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5742 2015-10-29 Pedro Alves <palves@redhat.com>
5744 * tracepoint.c (clear_installed_tracepoints): Add casts.
5746 2015-10-29 Pedro Alves <palves@redhat.com>
5748 * server.c (handle_v_cont, process_serial_event): Add enum
5749 gdb_signal casts to signal parsing code.
5751 2015-10-29 Pedro Alves <palves@redhat.com>
5753 * linux-low.h (NULL_REGSET): Define.
5754 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5755 * linux-arm-low.c (arm_regsets): Likewise.
5756 * linux-crisv32-low.c (cris_regsets): Likewise.
5757 * linux-m68k-low.c (m68k_regsets): Likewise.
5758 * linux-mips-low.c (mips_regsets): Likewise.
5759 * linux-nios2-low.c (nios2_regsets): Likewise.
5760 * linux-ppc-low.c (ppc_regsets): Likewise.
5761 * linux-s390-low.c (s390_regsets): Likewise.
5762 * linux-sh-low.c (sh_regsets): Likewise.
5763 * linux-sparc-low.c (sparc_regsets): Likewise.
5764 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5765 * linux-tile-low.c (tile_regsets): Likewise.
5766 * linux-x86-low.c (x86_regsets): Likewise.
5767 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5769 2015-10-29 Pedro Alves <palves@redhat.com>
5771 * linux-low.h (NULL_REGSET): Define.
5772 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5773 * linux-arm-low.c (arm_regsets): Likewise.
5774 * linux-crisv32-low.c (cris_regsets): Likewise.
5775 * linux-m68k-low.c (m68k_regsets): Likewise.
5776 * linux-mips-low.c (mips_regsets): Likewise.
5777 * linux-nios2-low.c (nios2_regsets): Likewise.
5778 * linux-ppc-low.c (ppc_regsets): Likewise.
5779 * linux-s390-low.c (s390_regsets): Likewise.
5780 * linux-sh-low.c (sh_regsets): Likewise.
5781 * linux-sparc-low.c (sparc_regsets): Likewise.
5782 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5783 * linux-tile-low.c (tile_regsets): Likewise.
5784 * linux-x86-low.c (x86_regsets): Likewise.
5785 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5787 2015-10-26 Doug Evans <dje@google.com>
5789 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5791 2015-10-26 Doug Evans <dje@google.com>
5793 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5795 2015-10-26 Doug Evans <dje@google.com>
5797 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5799 (attach_thread, find_new_threads_callback): Ditto.
5801 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5803 * mem-break.h (set_breakpoint_data): Remove.
5805 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5807 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5808 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5809 (initialize_low): Remove set_breakpoint_data call.
5810 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5811 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5812 (initialize_low): Remove set_breakpoint_data call.
5813 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5814 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5815 (initialize_low): Remove set_breakpoint_data call.
5817 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5819 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5820 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5821 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5822 * target.h (target_breakpoint_kind_from_pc): New macro.
5824 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5826 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5827 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5828 the default breakpoint kind.
5830 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5832 * linux-arm-low.c (arm_supports_z_point_type): Add software
5835 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5837 * linux-arm-low.c: Refactor breakpoint definitions.
5838 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5839 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5841 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5843 * Makefile.in: Add arm.c/o.
5844 * configure.srv: Likewise.
5845 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5846 (arm_breakpoint_kind_from_pc): New function.
5847 (arm_sw_breakpoint_from_kind): Return proper kind.
5848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5850 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5852 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5854 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5855 (struct raw_breakpoint) <size>: Remove.
5856 (struct raw_breakpoint) <kind>: Add.
5857 (bp_size): New function.
5858 (bp_opcode): Likewise.
5859 (find_raw_breakpoint_at): Adjust for kind.
5860 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5861 (remove_memory_breakpoint): Adjust for kind call bp_size.
5862 (set_raw_breakpoint_at): Adjust for kind.
5863 (set_breakpoint): Likewise.
5864 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5865 (delete_raw_breakpoint): Adjust for kind.
5866 (delete_breakpoint): Likewise.
5867 (find_gdb_breakpoint): Likewise.
5868 (set_gdb_breakpoint_1): Likewise.
5869 (set_gdb_breakpoint): Likewise.
5870 (delete_gdb_breakpoint_1): Likewise.
5871 (delete_gdb_breakpoint): Likewise.
5872 (uninsert_raw_breakpoint): Likewise.
5873 (reinsert_raw_breakpoint): Likewise.
5874 (set_breakpoint_data): Remove.
5875 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5876 (check_mem_read): Adjust for kind call bp_size.
5877 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5878 (clone_one_breakpoint): Adjust for kind.
5879 * mem-break.h (set_gdb_breakpoint): Likewise.
5880 (delete_gdb_breakpoint): Likewise.
5881 * server.c (process_serial_event): Likewise.
5883 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5885 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5886 (struct linux_target_ops) <breakpoint>: Remove.
5887 (struct linux_target_ops) <breakpoint_len>: Remove.
5888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5890 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5891 (arm_sw_breakpoint_from_kind): New function.
5892 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5893 (struct linux_target_ops) <breakpoint>: Remove.
5894 (struct linux_target_ops) <breakpoint_len>: Remove.
5895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5897 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5898 (struct linux_target_ops) <breakpoint>: Remove.
5899 (struct linux_target_ops) <breakpoint_len>: Remove.
5900 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5901 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5902 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5903 (struct linux_target_ops) <breakpoint>: Remove.
5904 (struct linux_target_ops) <breakpoint_len>: Remove.
5905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5906 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5907 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5908 and sw_breakpoint_from_kind to increment the pc.
5909 (linux_breakpoint_kind_from_pc): New function.
5910 (linux_sw_breakpoint_from_kind): New function.
5911 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5912 (initialize_low): Call breakpoint_kind_from_pc and
5913 sw_breakpoint_from_kind to replace breakpoint_data/len.
5914 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5916 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5917 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5918 (struct linux_target_ops) <breakpoint>: Remove.
5919 (struct linux_target_ops) <breakpoint_len>: Remove.
5920 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5921 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5922 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5923 (struct linux_target_ops) <breakpoint>: Remove.
5924 (struct linux_target_ops) <breakpoint_len>: Remove.
5925 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5926 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5927 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5928 (struct linux_target_ops) <breakpoint>: Remove.
5929 (struct linux_target_ops) <breakpoint_len>: Remove.
5930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5932 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5933 (struct linux_target_ops) <breakpoint>: Remove.
5934 (struct linux_target_ops) <breakpoint_len>: Remove.
5935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5937 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5938 (struct linux_target_ops) <breakpoint>: Remove.
5939 (struct linux_target_ops) <breakpoint_len>: Remove.
5940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5942 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5943 (struct linux_target_ops) <breakpoint>: Remove.
5944 (struct linux_target_ops) <breakpoint_len>: Remove.
5945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5947 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5948 (struct linux_target_ops) <breakpoint>: Remove.
5949 (struct linux_target_ops) <breakpoint_len>: Remove.
5950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5952 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5953 (struct linux_target_ops) <breakpoint>: Remove.
5954 (struct linux_target_ops) <breakpoint_len>: Remove.
5955 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5956 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5957 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5958 (struct linux_target_ops) <breakpoint>: Remove.
5959 (struct linux_target_ops) <breakpoint_len>: Remove.
5960 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5962 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5963 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5964 (struct linux_target_ops) <breakpoint>: Remove.
5965 (struct linux_target_ops) <breakpoint_len>: Remove.
5966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5968 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5969 (struct linux_target_ops) <breakpoint>: Remove.
5970 (struct linux_target_ops) <breakpoint_len>: Remove.
5971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5974 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5976 * linux-cris-low.c (cris_get_pc): Remove void arg.
5978 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5980 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5983 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5985 * inferiors.c (thread_pid_matches_callback): New function.
5986 (find_thread_process): New function.
5987 (remove_thread): Reset current_thread.
5988 (remove_process): Assert threads have been removed first.
5990 2015-10-15 Yao Qi <yao.qi@linaro.org>
5992 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5994 (aarch64_remove_point): Likewise.
5995 * regcache.c (regcache_register_size): New function.
5997 2015-10-12 Yao Qi <yao.qi@linaro.org>
5999 * linux-aarch64-low.c: Update all callers as emit_load_store
6000 is renamed to aarch64_emit_load_store.
6002 2015-10-12 Yao Qi <yao.qi@linaro.org>
6004 * linux-aarch64-low.c: Update all callers of function renaming
6005 from emit_insn to aarch64_emit_insn.
6007 2015-10-12 Yao Qi <yao.qi@linaro.org>
6009 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6010 arch/aarch64-insn.h.
6011 (struct aarch64_memory_operand): Likewise.
6013 (emit_insn): Move to arch/aarch64-insn.c.
6014 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6015 (emit_load_store): Move to arch/aarch64-insn.c.
6016 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6017 (can_encode_int32): Remove.
6019 2015-10-12 Yao Qi <yao.qi@linaro.org>
6021 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6022 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6023 (aarch64_relocate_instruction): Likewise.
6024 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6025 (struct aarch64_insn_visitor): Likewise.
6027 2015-10-12 Yao Qi <yao.qi@linaro.org>
6029 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6030 (struct aarch64_insn_visitor): New.
6031 (struct aarch64_insn_relocation_data): New.
6032 (aarch64_ftrace_insn_reloc_b): New function.
6033 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6034 (aarch64_ftrace_insn_reloc_cb): Likewise.
6035 (aarch64_ftrace_insn_reloc_tb): Likewise.
6036 (aarch64_ftrace_insn_reloc_adr): Likewise.
6037 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6038 (aarch64_ftrace_insn_reloc_others): Likewise.
6040 (aarch64_relocate_instruction): Use visitor.
6042 2015-10-12 Yao Qi <yao.qi@linaro.org>
6044 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6045 int. Add argument buf.
6046 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6047 aarch64_relocate_instruction.
6049 2015-10-12 Yao Qi <yao.qi@linaro.org>
6051 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6052 argument insn. Remove local variable insn. Don't call
6054 (aarch64_install_fast_tracepoint_jump_pad): Call
6057 2015-09-30 Yao Qi <yao.qi@linaro.org>
6059 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6060 (emit_load_store_pair): Likewise.
6062 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6064 * dll.c (match_dll): Add cast(s).
6065 (unloaded_dll): Likewise.
6066 * linux-low.c (second_thread_of_pid_p): Likewise.
6067 (delete_lwp_callback): Likewise.
6068 (count_events_callback): Likewise.
6069 (select_event_lwp_callback): Likewise.
6070 (linux_set_resume_request): Likewise.
6071 * server.c (accumulate_file_name_length): Likewise.
6072 (emit_dll_description): Likewise.
6073 (handle_qxfer_threads_worker): Likewise.
6074 (visit_actioned_threads): Likewise.
6075 * thread-db.c (any_thread_of): Likewise.
6076 * tracepoint.c (same_process_p): Likewise.
6077 (match_blocktype): Likewise.
6078 (build_traceframe_info_xml): Likewise.
6080 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6082 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6084 (gdb_unparse_agent_expr): Likewise.
6085 * hostio.c (require_data): Likewise.
6086 (handle_pread): Likewise.
6087 * linux-low.c (disable_regset): Likewise.
6088 (fetch_register): Likewise.
6089 (store_register): Likewise.
6090 (get_dynamic): Likewise.
6091 (linux_qxfer_libraries_svr4): Likewise.
6092 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6093 (set_fast_tracepoint_jump): Likewise.
6094 (uninsert_fast_tracepoint_jumps_at): Likewise.
6095 (reinsert_fast_tracepoint_jumps_at): Likewise.
6096 (validate_inserted_breakpoint): Likewise.
6097 (clone_agent_expr): Likewise.
6098 * regcache.c (init_register_cache): Likewise.
6099 * remote-utils.c (putpkt_binary_1): Likewise.
6100 (decode_M_packet): Likewise.
6101 (decode_X_packet): Likewise.
6102 (look_up_one_symbol): Likewise.
6103 (relocate_instruction): Likewise.
6104 (monitor_output): Likewise.
6105 * server.c (handle_search_memory): Likewise.
6106 (handle_qxfer_exec_file): Likewise.
6107 (handle_qxfer_libraries): Likewise.
6108 (handle_qxfer): Likewise.
6109 (handle_query): Likewise.
6110 (handle_v_cont): Likewise.
6111 (handle_v_run): Likewise.
6112 (captured_main): Likewise.
6113 * target.c (write_inferior_memory): Likewise.
6114 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6115 * tracepoint.c (init_trace_buffer): Likewise.
6116 (add_tracepoint_action): Likewise.
6117 (add_traceframe): Likewise.
6118 (add_traceframe_block): Likewise.
6119 (cmd_qtdpsrc): Likewise.
6120 (cmd_qtdv): Likewise.
6121 (cmd_qtstatus): Likewise.
6122 (response_source): Likewise.
6123 (response_tsv): Likewise.
6124 (cmd_qtnotes): Likewise.
6125 (gdb_collect): Likewise.
6126 (initialize_tracepoint): Likewise.
6128 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6130 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6131 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6132 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6134 (enum aarch64_condition_codes): New enum.
6135 (w0): New static global.
6138 (struct aarch64_memory_operand) <type>: New
6139 MEMORY_OPERAND_POSTINDEX type.
6140 (postindex_memory_operand): New helper function.
6141 (emit_ret): New function.
6142 (emit_load_store_pair): New function, factored out of emit_stp
6143 with support for MEMORY_OPERAND_POSTINDEX.
6144 (emit_stp): Rewrite using emit_load_store_pair.
6145 (emit_ldp): New function.
6146 (emit_load_store): Likewise.
6147 (emit_ldr): Mention post-index instruction in comment.
6148 (emit_ldrh): New function.
6149 (emit_ldrb): New function.
6150 (emit_ldrsw): Mention post-index instruction in comment.
6151 (emit_str): Likewise.
6152 (emit_subs): New function.
6153 (emit_cmp): Likewise.
6154 (emit_and): Likewise.
6155 (emit_orr): Likewise.
6156 (emit_orn): Likewise.
6157 (emit_eor): Likewise.
6158 (emit_mvn): Likewise.
6159 (emit_lslv): Likewise.
6160 (emit_lsrv): Likewise.
6161 (emit_asrv): Likewise.
6162 (emit_mul): Likewise.
6163 (emit_sbfm): Likewise.
6164 (emit_sbfx): Likewise.
6165 (emit_ubfm): Likewise.
6166 (emit_ubfx): Likewise.
6167 (emit_csinc): Likewise.
6168 (emit_cset): Likewise.
6169 (emit_nop): Likewise.
6170 (emit_ops_insns): New helper function.
6171 (emit_pop): Likewise.
6172 (emit_push): Likewise.
6173 (aarch64_emit_prologue): New function.
6174 (aarch64_emit_epilogue): Likewise.
6175 (aarch64_emit_add): Likewise.
6176 (aarch64_emit_sub): Likewise.
6177 (aarch64_emit_mul): Likewise.
6178 (aarch64_emit_lsh): Likewise.
6179 (aarch64_emit_rsh_signed): Likewise.
6180 (aarch64_emit_rsh_unsigned): Likewise.
6181 (aarch64_emit_ext): Likewise.
6182 (aarch64_emit_log_not): Likewise.
6183 (aarch64_emit_bit_and): Likewise.
6184 (aarch64_emit_bit_or): Likewise.
6185 (aarch64_emit_bit_xor): Likewise.
6186 (aarch64_emit_bit_not): Likewise.
6187 (aarch64_emit_equal): Likewise.
6188 (aarch64_emit_less_signed): Likewise.
6189 (aarch64_emit_less_unsigned): Likewise.
6190 (aarch64_emit_ref): Likewise.
6191 (aarch64_emit_if_goto): Likewise.
6192 (aarch64_emit_goto): Likewise.
6193 (aarch64_write_goto_address): Likewise.
6194 (aarch64_emit_const): Likewise.
6195 (aarch64_emit_call): Likewise.
6196 (aarch64_emit_reg): Likewise.
6197 (aarch64_emit_pop): Likewise.
6198 (aarch64_emit_stack_flush): Likewise.
6199 (aarch64_emit_zero_ext): Likewise.
6200 (aarch64_emit_swap): Likewise.
6201 (aarch64_emit_stack_adjust): Likewise.
6202 (aarch64_emit_int_call_1): Likewise.
6203 (aarch64_emit_void_call_2): Likewise.
6204 (aarch64_emit_eq_goto): Likewise.
6205 (aarch64_emit_ne_goto): Likewise.
6206 (aarch64_emit_lt_goto): Likewise.
6207 (aarch64_emit_le_goto): Likewise.
6208 (aarch64_emit_gt_goto): Likewise.
6209 (aarch64_emit_ge_got): Likewise.
6210 (aarch64_emit_ops_impl): New static global variable.
6211 (aarch64_emit_ops): New target function, return
6212 &aarch64_emit_ops_impl.
6213 (struct linux_target_ops): Install it.
6215 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6217 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6218 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6220 * linux-aarch64-ipa.c: New file.
6221 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6223 (aarch64_get_thread_area): New target method.
6224 (extract_signed_bitfield): New helper function.
6225 (aarch64_decode_ldr_literal): New function.
6226 (enum aarch64_opcodes): New enum.
6227 (struct aarch64_register): New struct.
6228 (struct aarch64_operand): New struct.
6229 (x0): New static global.
6238 (aarch64_register): New helper function.
6239 (register_operand): Likewise.
6240 (immediate_operand): Likewise.
6241 (struct aarch64_memory_operand): New struct.
6242 (offset_memory_operand): New helper function.
6243 (preindex_memory_operand): Likewise.
6244 (enum aarch64_system_control_registers): New enum.
6245 (ENCODE): New macro.
6246 (emit_insn): New helper function.
6247 (emit_b): New function.
6248 (emit_bcond): Likewise.
6249 (emit_cb): Likewise.
6250 (emit_tb): Likewise.
6251 (emit_blr): Likewise.
6252 (emit_stp): Likewise.
6253 (emit_ldp_q_offset): Likewise.
6254 (emit_stp_q_offset): Likewise.
6255 (emit_load_store): Likewise.
6256 (emit_ldr): Likewise.
6257 (emit_ldrsw): Likewise.
6258 (emit_str): Likewise.
6259 (emit_ldaxr): Likewise.
6260 (emit_stxr): Likewise.
6261 (emit_stlr): Likewise.
6262 (emit_data_processing_reg): Likewise.
6263 (emit_data_processing): Likewise.
6264 (emit_add): Likewise.
6265 (emit_sub): Likewise.
6266 (emit_mov): Likewise.
6267 (emit_movk): Likewise.
6268 (emit_mov_addr): Likewise.
6269 (emit_mrs): Likewise.
6270 (emit_msr): Likewise.
6271 (emit_sevl): Likewise.
6272 (emit_wfe): Likewise.
6273 (append_insns): Likewise.
6274 (can_encode_int32_in): New helper function.
6275 (aarch64_relocate_instruction): New function.
6276 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6277 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6278 (struct linux_target_ops): Install aarch64_get_thread_area,
6279 aarch64_install_fast_tracepoint_jump_pad and
6280 aarch64_get_min_fast_tracepoint_insn_len.
6282 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6284 * Makefile.in (aarch64-insn.o): New rule.
6285 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6287 2015-09-21 Yao Qi <yao.qi@linaro.org>
6289 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6291 2015-09-21 Yao Qi <yao.qi@linaro.org>
6293 * tracepoint.c (max_jump_pad_size): Remove.
6295 2015-09-18 Yao Qi <yao.qi@linaro.org>
6297 * linux-aarch64-low.c: Don't include sys/uio.h.
6298 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6300 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6302 * tracepoint.c (eval_result_type): Change prototype.
6303 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6305 2015-09-15 Pedro Alves <palves@redhat.com>
6307 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6308 Check whether to report exec events instead of checking whether
6309 multiprocess is enabled.
6311 2015-09-15 Pedro Alves <palves@redhat.com>
6314 * remote-utils.c (prepare_resume_reply): Merge
6315 TARGET_WAITKIND_VFORK_DONE switch case with the
6316 TARGET_WAITKIND_FORKED case.
6318 2015-09-15 Yao Qi <yao.qi@linaro.org>
6320 * server.c (handle_query): Check string comparison using
6321 "else if" instead of "if".
6323 2015-09-15 Yao Qi <yao.qi@linaro.org>
6325 * server.c (vCont_supported): New global variable.
6326 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6327 matches. Append ";vContSupported+" to own_buf.
6328 (handle_v_requests): Append ";s;S" to own_buf if target supports
6329 hardware single step or vCont_supported is false.
6330 (capture_main): Set vCont_supported to zero.
6332 2015-09-15 Yao Qi <yao.qi@linaro.org>
6334 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6336 (linux_supports_hardware_single_step): ... New function.
6337 (linux_target_ops): Update.
6338 * lynx-low.c (lynx_target_ops): Set field
6339 supports_hardware_single_step to target_can_do_hardware_single_step.
6340 * nto-low.c (nto_target_ops): Likewise.
6341 * spu-low.c (spu_target_ops): Likewise.
6342 * win32-low.c (win32_target_ops): Likewise.
6343 * target.c (target_can_do_hardware_single_step): New function.
6344 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6345 Remove. <supports_hardware_single_step>: New field.
6346 (target_supports_conditional_breakpoints): Remove.
6347 (target_supports_hardware_single_step): New macro.
6348 (target_can_do_hardware_single_step): Declare.
6349 * server.c (handle_query): Use target_supports_hardware_single_step
6350 instead of target_supports_conditional_breakpoints.
6352 2015-09-15 Yao Qi <yao.qi@linaro.org>
6354 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6356 (struct linux_target_ops the_low_target): Install
6357 aarch64_linux_siginfo_fixup.
6359 2015-09-11 Don Breazeal <donb@codesourcery.com>
6360 Luis Machado <lgustavo@codesourcery.com>
6362 * linux-low.c (linux_mourn): Static declaration.
6363 (linux_arch_setup): Move in front of
6364 handle_extended_wait.
6365 (linux_arch_setup_thread): New function.
6366 (handle_extended_wait): Handle exec events. Call
6367 linux_arch_setup_thread. Make event_lwp argument a
6368 pointer-to-a-pointer.
6369 (check_zombie_leaders): Do not check stopped threads.
6370 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6371 (linux_low_filter_event): Add lwp and thread for exec'ing
6372 non-leader thread if leader thread has been deleted.
6373 Refactor code into linux_arch_setup_thread and call it.
6374 Pass child lwp pointer by reference to handle_extended_wait.
6375 (linux_wait_for_event_filtered): Update comment.
6376 (linux_wait_1): Prevent clobbering exec event status.
6377 (linux_supports_exec_events): New function.
6378 (linux_target_ops) <supports_exec_events>: Initialize new member.
6379 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6381 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6382 * server.c (report_exec_events): New global variable.
6383 (handle_query): Handle qSupported query for exec-events feature.
6384 (captured_main): Initialize report_exec_events.
6385 * server.h (report_exec_events): Declare new global variable.
6386 * target.h (struct target_ops) <supports_exec_events>: New
6388 (target_supports_exec_events): New macro.
6389 * win32-low.c (win32_target_ops) <supports_exec_events>:
6390 Initialize new member.
6392 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6394 * linux-low.c (linux_low_enable_btrace): Remove.
6395 (linux_target_ops): Replace linux_low_enable_btrace with
6396 linux_enable_btrace.
6398 2015-09-03 Yao Qi <yao.qi@linaro.org>
6400 * linux-aarch64-low.c (aarch64_insert_point): Call
6401 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6404 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6406 * linux-low.c (check_stopped_by_breakpoint): Use
6407 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6409 2015-08-27 Pedro Alves <palves@redhat.com>
6411 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6413 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6415 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6416 the XNEW-family equivalent.
6417 (compile_bytecodes): Likewise.
6418 * dll.c (loaded_dll): Likewise.
6419 * event-loop.c (append_callback_event): Likewise.
6420 (create_file_handler): Likewise.
6421 (create_file_event): Likewise.
6422 * hostio.c (handle_open): Likewise.
6423 * inferiors.c (add_thread): Likewise.
6424 (add_process): Likewise.
6425 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6426 * linux-arm-low.c (arm_new_process): Likewise.
6427 (arm_new_thread): Likewise.
6428 * linux-low.c (add_to_pid_list): Likewise.
6429 (linux_add_process): Likewise.
6430 (handle_extended_wait): Likewise.
6431 (add_lwp): Likewise.
6432 (enqueue_one_deferred_signal): Likewise.
6433 (enqueue_pending_signal): Likewise.
6434 (linux_resume_one_lwp_throw): Likewise.
6435 (linux_resume_one_thread): Likewise.
6436 (linux_read_memory): Likewise.
6437 (linux_write_memory): Likewise.
6438 * linux-mips-low.c (mips_linux_new_process): Likewise.
6439 (mips_linux_new_thread): Likewise.
6440 (mips_add_watchpoint): Likewise.
6441 * linux-x86-low.c (initialize_low_arch): Likewise.
6442 * lynx-low.c (lynx_add_process): Likewise.
6443 * mem-break.c (set_raw_breakpoint_at): Likewise.
6444 (set_breakpoint): Likewise.
6445 (add_condition_to_breakpoint): Likewise.
6446 (add_commands_to_breakpoint): Likewise.
6447 (clone_agent_expr): Likewise.
6448 (clone_one_breakpoint): Likewise.
6449 * regcache.c (new_register_cache): Likewise.
6450 * remote-utils.c (look_up_one_symbol): Likewise.
6451 * server.c (queue_stop_reply): Likewise.
6452 (start_inferior): Likewise.
6453 (queue_stop_reply_callback): Likewise.
6454 (handle_target_event): Likewise.
6455 * spu-low.c (fetch_ppc_memory): Likewise.
6456 (store_ppc_memory): Likewise.
6457 * target.c (set_target_ops): Likewise.
6458 * thread-db.c (thread_db_load_search): Likewise.
6459 (try_thread_db_load_1): Likewise.
6460 * tracepoint.c (add_tracepoint): Likewise.
6461 (add_tracepoint_action): Likewise.
6462 (create_trace_state_variable): Likewise.
6463 (cmd_qtdpsrc): Likewise.
6464 (cmd_qtro): Likewise.
6465 (add_while_stepping_state): Likewise.
6466 * win32-low.c (child_add_thread): Likewise.
6467 (get_image_name): Likewise.
6469 2015-08-25 Yao Qi <yao.qi@linaro.org>
6471 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6473 2015-08-25 Yao Qi <yao.qi@linaro.org>
6475 * Makefile.in (aarch64-linux.o): New rule.
6476 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6478 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6479 (aarch64_init_debug_reg_state): Make it extern.
6480 (aarch64_linux_prepare_to_resume): Remove.
6482 2015-08-25 Yao Qi <yao.qi@linaro.org>
6484 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6485 lwp_arch_private_info and ptid_of_lwp.
6487 2015-08-25 Yao Qi <yao.qi@linaro.org>
6489 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6490 Find proc_info by find_process_pid. All callers updated.
6492 2015-08-25 Yao Qi <yao.qi@linaro.org>
6494 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6496 (debug_reg_change_callback): Remove.
6497 (aarch64_notify_debug_reg_change): Remove.
6499 2015-08-25 Yao Qi <yao.qi@linaro.org>
6501 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6502 Call current_lwp_ptid.
6504 2015-08-25 Yao Qi <yao.qi@linaro.org>
6506 * linux-aarch64-low.c (debug_reg_change_callback): Use
6509 2015-08-25 Yao Qi <yao.qi@linaro.org>
6511 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6513 2015-08-25 Yao Qi <yao.qi@linaro.org>
6515 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6517 2015-08-25 Yao Qi <yao.qi@linaro.org>
6519 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6522 2015-08-25 Yao Qi <yao.qi@linaro.org>
6524 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6526 (debug_reg_change_callback): Remove argument entry and add argument
6527 lwp. Remove local variable thread. Don't print thread id in the
6528 debugging output. Don't check whether pid of thread equals to pid.
6529 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6530 iterate_over_lwps instead find_inferior.
6532 2015-08-24 Pedro Alves <palves@redhat.com>
6534 * inferiors.c (get_first_process): New function.
6535 * inferiors.h (get_first_process): New declaration.
6536 * remote-utils.c (read_ptid): Default to the first process in the
6537 list, instead of to the current thread's process.
6539 2015-08-24 Pedro Alves <palves@redhat.com>
6541 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6542 * event-loop.c: Likewise.
6543 * remote-utils.c: Likewise.
6544 * tracepoint.c: Likewise.
6546 2015-08-24 Pedro Alves <palves@redhat.com>
6548 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6551 2015-08-21 Pedro Alves <palves@redhat.com>
6553 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6554 instead of literal 1.
6556 2015-08-21 Pedro Alves <palves@redhat.com>
6558 * tdesc.c (default_description): Explicitly zero-initialize.
6560 2015-08-21 Pedro Alves <palves@redhat.com>
6563 * inferiors.c (remove_thread): Discard any pending stop reply for
6565 * server.c (remove_all_on_match_pid): Rename to ...
6566 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6568 (discard_queued_stop_replies): Change parameter to a ptid. Now
6570 (handle_v_kill, kill_inferior_callback, captured_main)
6571 (process_serial_event): Adjust.
6572 * server.h (discard_queued_stop_replies): Declare.
6574 2015-08-21 Pedro Alves <palves@redhat.com>
6576 * linux-low.c (wait_for_sigstop): Always switch to no thread
6577 selected if the previously current thread dies.
6578 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6579 process instead of the current thread's.
6580 * remote-utils.c (input_interrupt): Don't check if there's no
6582 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6583 current thread to the general thread fails, error out.
6584 (handle_qxfer_auxv, handle_qxfer_libraries)
6585 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6586 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6587 (handle_query): Check if there's a thread selected instead of
6588 checking whether there's any thread in the thread list.
6589 (handle_qxfer_threads, handle_qxfer_btrace)
6590 (handle_qxfer_btrace_conf): Don't error out early if there's no
6591 thread in the thread list.
6592 (handle_v_cont, myresume): Don't set the current thread to the
6594 (process_serial_event) <Hg handling>: Also set thread_id if the
6595 previous general thread is still alive.
6596 (process_serial_event) <g/G handling>: If setting the current
6597 thread to the general thread fails, error out.
6598 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6599 thread's lwp instead of the current thread's.
6600 * target.c (set_desired_thread): If the desired thread was not
6601 found, leave the current thread pointing to NULL. Return an int
6602 (boolean) indicating success.
6603 * target.h (set_desired_thread): Change return type to int.
6605 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6607 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6608 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6610 (ps_get_thread_area): New function.
6612 2015-08-19 Gary Benson <gbenson@redhat.com>
6614 * hostio.c (handle_pread): Do not attempt to read more data
6615 than hostio_reply_with_data can fit in a packet.
6617 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6619 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6621 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6623 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6625 2015-08-06 Pedro Alves <palves@redhat.com>
6627 * tracepoint.c (expr_eval_result): Now an int.
6629 2015-08-06 Pedro Alves <palves@redhat.com>
6631 * gdbthread.h (struct regcache): Forward declare.
6632 (struct thread_info) <regcache_data>: Now a struct regcache
6634 * inferiors.c (inferior_regcache_data)
6635 (set_inferior_regcache_data): Now work with struct regcache
6637 * inferiors.h (struct regcache): Forward declare.
6638 (inferior_regcache_data, set_inferior_regcache_data): Now work
6639 with struct regcache pointers.
6640 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6641 (free_register_cache_thread): Remove struct regcache pointer
6644 2015-08-06 Pedro Alves <palves@redhat.com>
6646 * server.c (captured_main): On error, print the exception message
6647 to stderr, and if run_once is set, throw a quit.
6649 2015-08-06 Pedro Alves <palves@redhat.com>
6651 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6654 2015-08-06 Pedro Alves <palves@redhat.com>
6656 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6657 reading beyond the passed in buffer length.
6659 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6661 * tracepoint.c (symbol_list) <required>: Remove.
6663 2015-08-06 Pedro Alves <palves@redhat.com>
6665 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6666 count if stopping and suspending threads.
6667 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6668 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6669 (linux_detach): Complete an ongoing step-over.
6670 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6672 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6673 (linux_wait_1): If passing a signal to the inferior after
6674 finishing a step-over, unsuspend and re-resume all lwps. If we
6675 see a single-step event but the thread should be continuing, don't
6676 pass the trap to gdb.
6677 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6678 internal_error instead of gdb_assert.
6679 (enqueue_pending_signal): New function.
6680 (check_ptrace_stopped_lwp_gone): Add debug output.
6681 (start_step_over): Use internal_error instead of gdb_assert.
6682 (complete_ongoing_step_over): New function.
6683 (linux_resume_one_thread): Don't resume a suspended thread.
6684 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6687 2015-08-06 Pedro Alves <palves@redhat.com>
6689 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6690 (linux_thread_alive): Use lwp_is_marked_dead.
6691 (extended_event_reported): Delete.
6692 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6693 instead of extended_event_reported.
6694 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6696 (lwp_is_marked_dead): New function.
6697 (lwp_running): Use lwp_is_marked_dead.
6698 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6701 2015-08-06 Pedro Alves <palves@redhat.com>
6703 * linux-low.c (linux_wait_1): Move fork event output out of the
6704 !report_to_gdb check. Pass event_child->waitstatus to
6705 target_waitstatus_to_string instead of ourstatus.
6707 2015-08-04 Yao Qi <yao.qi@linaro.org>
6709 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6710 if current_thread is 32 bit.
6712 2015-08-04 Yao Qi <yao.qi@linaro.org>
6714 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6715 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6716 * server.c (extended_protocol): Remove "static".
6717 * server.h (extended_protocol): Declare it.
6719 2015-08-04 Yao Qi <yao.qi@linaro.org>
6721 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6722 both aarch64 and aarch32.
6723 (aarch64_set_pc): Likewise.
6725 2015-08-04 Yao Qi <yao.qi@linaro.org>
6727 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6728 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6729 arm-with-neon.xml to srv_xmlfiles.
6730 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6731 (is_64bit_tdesc): New function.
6732 (aarch64_linux_read_description): New function.
6733 (aarch64_arch_setup): Call aarch64_linux_read_description.
6734 (regs_info): Rename to regs_info_aarch64.
6735 (aarch64_regs_info): Return right regs_info.
6736 (initialize_low_arch): Call initialize_low_arch_aarch32.
6738 2015-08-04 Yao Qi <yao.qi@linaro.org>
6740 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6741 * linux-aarch32-low.c: New file.
6742 * linux-aarch32-low.h: New file.
6743 * linux-arm-low.c (arm_fill_gregset): Move it to
6744 linux-aarch32-low.c.
6745 (arm_store_gregset): Likewise.
6746 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6747 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6748 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6749 (regs_info): Rename to regs_info_arm.
6750 (arm_regs_info): Return regs_info_aarch32 if
6751 have_ptrace_getregset is 1 and target description is
6752 arm_with_neon or arm_with_vfpv3.
6753 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6754 Call initialize_low_arch_aarch32 instead.
6756 2015-08-04 Yao Qi <yao.qi@linaro.org>
6758 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6759 * linux-low.c: ... here.
6760 * linux-low.h (have_ptrace_getregset): Declare it.
6762 2015-08-04 Pedro Alves <palves@redhat.com>
6764 * thread-db.c (struct thread_db): Use new typedefs.
6765 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6767 (disable_thread_event_reporting): Cast result of dlsym to
6768 destination function pointer type.
6769 (thread_db_mourn): Use td_ta_delete_ftype.
6771 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6773 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6775 (CDX_BREAKPOINT): Define for R2.
6776 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6777 (the_low_target): Add comments.
6779 2015-07-30 Yao Qi <yao.qi@linaro.org>
6781 * linux-arm-low.c (arm_hwcap): Remove it.
6782 (arm_read_description): New local variable arm_hwcap. Don't
6783 set arm_hwcap to zero.
6785 2015-07-30 Yao Qi <yao.qi@linaro.org>
6787 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6788 Use regcache->tdesc instead.
6789 (arm_store_wmmxregset): Likewise.
6790 (arm_fill_vfpregset): Likewise.
6791 (arm_store_vfpregset): Likewise.
6793 2015-07-30 Yao Qi <yao.qi@linaro.org>
6795 * linux-arm-low.c: Include arch/arm.h.
6796 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6797 (arm_store_gregset): Likewise.
6799 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6801 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6802 ptrace's 4th parameter.
6804 2015-07-27 Yao Qi <yao.qi@linaro.org>
6806 * configure.srv (case aarch64*-*-linux*): Don't set
6809 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6811 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6813 * linux-arm-low.c: Likewise.
6814 * linux-cris-low.c: Likewise.
6815 * linux-crisv32-low.c: Likewise.
6816 * linux-low.c: Likewise.
6817 * linux-m68k-low.c: Likewise.
6818 * linux-mips-low.c: Likewise.
6819 * linux-nios2-low.c: Likewise.
6820 * linux-s390-low.c: Likewise.
6821 * linux-sparc-low.c: Likewise.
6822 * linux-tic6x-low.c: Likewise.
6823 * linux-tile-low.c: Likewise.
6824 * linux-x86-low.c: Likewise.
6826 2015-07-24 Pedro Alves <palves@redhat.com>
6828 * config.in: Regenerate.
6829 * configure: Regenerate.
6831 2015-07-24 Pedro Alves <palves@redhat.com>
6833 * acinclude.m4: Include ../ptrace.m4.
6834 * configure.ac: Call GDB_AC_PTRACE.
6835 * config.in, configure: Regenerate.
6837 2015-07-24 Yao Qi <yao.qi@linaro.org>
6839 * linux-low.c (linux_create_inferior): Remove setting to
6840 proc->priv->new_inferior.
6841 (linux_attach): Likewise.
6842 (linux_low_filter_event): Likewise.
6843 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6845 2015-07-24 Yao Qi <yao.qi@linaro.org>
6847 * linux-low.c (linux_arch_setup): New function.
6848 (linux_low_filter_event): If proc->tdesc is NULL and
6849 proc->attached is true, call the_low_target.arch_setup.
6850 Otherwise, keep status pending, and return.
6851 (linux_resume_one_lwp_throw): Don't call get_pc if
6852 thread->while_stepping isn't NULL. Don't call
6853 get_thread_regcache if proc->tdesc is NULL.
6854 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6855 (linux_target_ops): Install arch_setup.
6856 * server.c (start_inferior): Call the_target->arch_setup.
6857 * target.h (struct target_ops) <arch_setup>: New field.
6858 (target_arch_setup): New marco.
6859 * lynx-low.c (lynx_target_ops): Update.
6860 * nto-low.c (nto_target_ops): Update.
6861 * spu-low.c (spu_target_ops): Update.
6862 * win32-low.c (win32_target_ops): Update.
6864 2015-07-24 Yao Qi <yao.qi@linaro.org>
6866 * linux-low.c (linux_add_process): Don't set
6867 proc->priv->new_inferior.
6868 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6869 (linux_attach): Likewise.
6871 2015-07-24 Yao Qi <yao.qi@linaro.org>
6873 * server.c (start_inferior): Code refactor.
6875 2015-07-24 Yao Qi <yao.qi@linaro.org>
6877 * server.c (process_serial_event): Set general_thread.
6879 2015-07-21 Yao Qi <yao.qi@linaro.org>
6881 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6882 aarch64_linux_get_debug_reg_capacity.
6884 2015-07-17 Yao Qi <yao.qi@linaro.org>
6886 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6887 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6888 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6889 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6890 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6891 (AARCH64_HWP_ALIGNMENT): Likewise.
6892 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6893 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6894 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6895 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6896 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6897 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6898 (struct aarch64_debug_reg_state): Likewise.
6899 (struct arch_lwp_info): Likewise.
6900 (aarch64_align_watchpoint): Likewise.
6901 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6902 (aarch64_watchpoint_length): Likewise.
6903 (aarch64_point_encode_ctrl_reg): Likewise
6904 (aarch64_point_is_aligned): Likewise.
6905 (aarch64_align_watchpoint): Likewise.
6906 (aarch64_linux_set_debug_regs):
6907 (aarch64_dr_state_insert_one_point): Likewise.
6908 (aarch64_dr_state_remove_one_point): Likewise.
6909 (aarch64_handle_breakpoint): Likewise.
6910 (aarch64_handle_aligned_watchpoint): Likewise.
6911 (aarch64_handle_unaligned_watchpoint): Likewise.
6912 (aarch64_handle_watchpoint): Likewise.
6914 2015-07-17 Yao Qi <yao.qi@linaro.org>
6916 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6917 and don't aarch64_get_debug_reg_state. All callers update.
6918 (aarch64_handle_aligned_watchpoint): Likewise.
6919 (aarch64_handle_unaligned_watchpoint): Likewise.
6920 (aarch64_handle_watchpoint): Likewise.
6921 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6922 (aarch64_remove_point): Likewise.
6924 2015-07-17 Yao Qi <yao.qi@linaro.org>
6926 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6928 (aarch64_handle_unaligned_watchpoint): Likewise.
6930 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6932 Revert the previous 3 commits:
6933 Move gdb_regex* to common/
6934 Move linux_find_memory_regions_full & co.
6935 gdbserver build-id attribute generator
6937 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6938 Jan Kratochvil <jan.kratochvil@redhat.com>
6940 gdbserver build-id attribute generator.
6941 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6942 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6943 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6945 (get_dynamic): Use find_pdhr to traverse program headers.
6946 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6947 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6948 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6949 (get_hex_build_id): New.
6950 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6951 to reply XML document.
6953 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6954 Jan Kratochvil <jan.kratochvil@redhat.com>
6956 * target.c: Include target/target-utils.h and fcntl.h.
6957 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6958 (target_fileio_read_stralloc): New functions.
6960 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6962 * Makefile.in (OBS): Add gdb_regex.o.
6964 * config.in: Rebuilt.
6965 * configure: Rebuilt.
6967 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6968 Jan Kratochvil <jan.kratochvil@redhat.com>
6970 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6971 * Makefile.in (OBS): Add target-utils.o.
6972 (linux-maps.o, target-utils.o): New.
6973 * configure.srv (srv_linux_obj): Add linux-maps.o.
6975 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6977 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6979 (the_low_target): Install it.
6981 2015-07-14 Pedro Alves <palves@redhat.com>
6983 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6984 Instead, ignore ECHILD, and throw an error for other errnos.
6986 2015-07-10 Pedro Alves <palves@redhat.com>
6988 * event-loop.c (struct callback_event) <data>: Change type to
6989 gdb_client_data instance instead of gdb_client_data pointer.
6990 (append_callback_event): Adjust.
6992 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6994 * linux-aarch64-low.c: Add comments for each linux_target_ops
6995 method. Remove comments already covered in target_ops and
6996 linux_target_ops definitions.
6997 (the_low_target): Add comments for each unimplemented method.
6999 2015-07-09 Yao Qi <yao.qi@linaro.org>
7001 * linux-aarch64-low.c (aarch64_regmap): Remove.
7002 (aarch64_usrregs_info): Remove.
7003 (regs_info): Set field usrregs to NULL.
7005 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7007 * linux-low.c: Include "rsp-low.h"
7008 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7009 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7010 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7011 (handle_btrace_enable_pt): New.
7012 (handle_btrace_general_set): Support "pt".
7013 (handle_btrace_conf_general_set): Support "pt:size".
7015 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7017 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7020 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7022 * linux-aarch64-low.c: Remove comment about endianness.
7023 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7024 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7027 2015-06-24 Gary Benson <gbenson@redhat.com>
7029 * linux-i386-ipa.c (stdint.h): Do not include.
7030 * lynx-i386-low.c (stdint.h): Likewise.
7031 * lynx-ppc-low.c (stdint.h): Likewise.
7032 * mem-break.c (stdint.h): Likewise.
7033 * thread-db.c (stdint.h): Likewise.
7034 * tracepoint.c (stdint.h): Likewise.
7035 * win32-low.c (stdint.h): Likewise.
7037 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7039 * server.c (write_qxfer_response): Update call to
7040 remote_escape_output.
7042 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7043 Jan Kratochvil <jan.kratochvil@redhat.com>
7045 Merge multiple hex conversions.
7046 * gdbreplay.c (tohex): Rename to 'fromhex'.
7047 (logchar): Use fromhex.
7049 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7051 * server.c (handle_qxfer_libraries): Set `version' attribute for
7054 2015-06-10 Gary Benson <gbenson@redhat.com>
7056 * target.h (struct target_ops) <multifs_open>: New field.
7057 <multifs_unlink>: Likewise.
7058 <multifs_readlink>: Likewise.
7059 * linux-low.c (nat/linux-namespaces.h): New include.
7060 (linux_target_ops): Initialize the_target->multifs_open,
7061 the_target->multifs_unlink and the_target->multifs_readlink.
7062 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7063 * hostio.c (hostio_fs_pid): New static variable.
7064 (hostio_handle_new_gdb_connection): New function.
7065 (handle_setfs): Likewise.
7066 (handle_open): Use the_target->multifs_open as appropriate.
7067 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7068 (handle_readlink): Use the_target->multifs_readlink as
7070 (handle_vFile): Handle vFile:setfs packets.
7071 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7072 after target_handle_new_gdb_connection.
7074 2015-06-10 Gary Benson <gbenson@redhat.com>
7076 * configure.ac (AC_CHECK_FUNCS): Add setns.
7077 * config.in: Regenerate.
7078 * configure: Likewise.
7079 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7080 (linux-namespaces.o): New rule.
7081 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7083 2015-06-09 Gary Benson <gbenson@redhat.com>
7085 * hostio.c (handle_open): Process mode argument with
7086 fileio_to_host_mode.
7088 2015-06-01 Yao Qi <yao.qi@linaro.org>
7090 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7091 * linux-x86-low.c: Likewise.
7093 2015-05-28 Don Breazeal <donb@codesourcery.com>
7095 * linux-low.c (handle_extended_wait): Initialize
7096 thread_info.last_resume_kind for new fork children.
7098 2015-05-15 Pedro Alves <palves@redhat.com>
7100 * target.h (target_handle_new_gdb_connection): Rewrite using if
7101 wrapped in do/while.
7103 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7105 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7106 * configure, config.in: Regenerate.
7107 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7110 2015-05-12 Don Breazeal <donb@codesourcery.com>
7112 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7113 PTRACE_EVENT_VFORK_DONE.
7114 (linux_low_ptrace_options, extended_event_reported): Add vfork
7116 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7117 and "vforkdone" for RSP 'T' Stop Reply Packet.
7118 * server.h (report_vfork_events): Declare
7121 2015-05-12 Don Breazeal <donb@codesourcery.com>
7123 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7124 (the_low_target) <new_fork>: Initialize new member.
7125 * linux-arm-low.c (arm_new_fork): New function.
7126 (the_low_target) <new_fork>: Initialize new member.
7127 * linux-low.c (handle_extended_wait): Call new target function
7129 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7130 * linux-mips-low.c (mips_add_watchpoint): New function
7131 extracted from mips_insert_point.
7132 (the_low_target) <new_fork>: Initialize new member.
7133 (mips_linux_new_fork): New function.
7134 (mips_insert_point): Call mips_add_watchpoint.
7135 * linux-x86-low.c (x86_linux_new_fork): New function.
7136 (the_low_target) <new_fork>: Initialize new member.
7138 2015-05-12 Don Breazeal <donb@codesourcery.com>
7140 * linux-low.c (handle_extended_wait): Implement return value,
7141 rename argument 'event_child' to 'event_lwp', handle
7142 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7143 (linux_low_ptrace_options): New function.
7144 (linux_low_filter_event): Call linux_low_ptrace_options,
7145 use different argument fo linux_enable_event_reporting,
7146 use return value from handle_extended_wait.
7147 (extended_event_reported): New function.
7148 (linux_wait_1): Call extended_event_reported and set
7149 status to report fork events.
7150 (linux_write_memory): Add pid to debug message.
7151 (reset_lwp_ptrace_options_callback): New function.
7152 (linux_handle_new_gdb_connection): New function.
7153 (linux_target_ops): Initialize new structure member.
7154 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7155 * lynx-low.c: Initialize new structure member.
7156 * remote-utils.c (prepare_resume_reply): Implement stop reason
7157 "fork" for "T" stop message.
7158 * server.c (handle_query): Call handle_new_gdb_connection.
7159 * server.h (report_fork_events): Declare global flag.
7160 * target.h (struct target_ops) <handle_new_gdb_connection>:
7162 (target_handle_new_gdb_connection): New macro.
7163 * win32-low.c: Initialize new structure member.
7165 2015-05-12 Don Breazeal <donb@codesourcery.com>
7167 * mem-break.c (APPEND_TO_LIST): Define macro.
7168 (clone_agent_expr): New function.
7169 (clone_one_breakpoint): New function.
7170 (clone_all_breakpoints): New function.
7171 * mem-break.h: Declare new functions.
7173 2015-05-12 Don Breazeal <donb@codesourcery.com>
7175 * linux-low.c (linux_supports_fork_events): New function.
7176 (linux_supports_vfork_events): New function.
7177 (linux_target_ops): Initialize new structure members.
7178 (initialize_low): Call linux_check_ptrace_features.
7179 * lynx-low.c (lynx_target_ops): Initialize new structure
7181 * server.c (report_fork_events, report_vfork_events):
7183 (handle_query): Add new features to qSupported packet and
7185 (captured_main): Initialize new global variables.
7186 * target.h (struct target_ops) <supports_fork_events>:
7188 <supports_vfork_events>: New member.
7189 (target_supports_fork_events): New macro.
7190 (target_supports_vfork_events): New macro.
7191 * win32-low.c (win32_target_ops): Initialize new structure
7194 2015-05-12 Gary Benson <gbenson@redhat.com>
7196 * server.c (handle_qxfer_exec_file): Use current process
7199 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7201 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7202 Remove HAVE_PTRACE_GETREGS conditionals.
7203 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7204 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7206 2015-05-08 Yao Qi <yao.qi@linaro.org>
7208 * linux-low.c (linux_supports_conditional_breakpoints): New
7210 (linux_target_ops): Install new target method.
7211 * lynx-low.c (lynx_target_ops): Install NULL hook for
7212 supports_conditional_breakpoints.
7213 * nto-low.c (nto_target_ops): Likewise.
7214 * spu-low.c (spu_target_ops): Likewise.
7215 * win32-low.c (win32_target_ops): Likewise.
7216 * server.c (handle_query): Check
7217 target_supports_conditional_breakpoints.
7218 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7220 (target_supports_conditional_breakpoints): New macro.
7222 2015-05-06 Pedro Alves <palves@redhat.com>
7225 * server.c (start_inferior): If the process exits, mourn it.
7227 2015-04-21 Gary Benson <gbenson@redhat.com>
7229 * hostio.c (fileio_open_flags_to_host): Factored out to
7230 fileio_to_host_openflags in common/fileio.c. Single use
7233 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7235 * linux-xtensa-low.c (xtensa_fill_gregset)
7236 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7239 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7241 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7242 (regs_info): Replace usrregs pointer with NULL.
7244 2015-04-17 Gary Benson <gbenson@redhat.com>
7246 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7247 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7248 * server.c (handle_qxfer_exec_file): New function.
7249 (qxfer_packets): Add exec-file entry.
7250 (handle_query): Report qXfer:exec-file:read as supported packet.
7252 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7254 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7256 2015-04-09 Gary Benson <gbenson@redhat.com>
7258 * hostio-errno.c (errno_to_fileio_error): Remove function.
7259 Update caller to use remote_fileio_to_fio_error.
7261 2015-04-09 Yao Qi <yao.qi@linaro.org>
7263 * linux-low.c (linux_insert_point): Call
7264 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7265 (linux_remove_point): Call remove_memory_breakpoint if type is
7267 * linux-x86-low.c (x86_insert_point): Don't call
7268 insert_memory_breakpoint.
7269 (x86_remove_point): Don't call remove_memory_breakpoint.
7271 2015-04-01 Pedro Alves <palves@redhat.com>
7272 Cleber Rosa <crosa@redhat.com>
7274 * server.c (gdbserver_usage): Reorganize and extend the usage
7277 2015-03-24 Pedro Alves <palves@redhat.com>
7279 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7280 output. Also dump TRAP_TRACE.
7281 (linux_low_filter_event): In debug output, distinguish a
7282 resume_stop SIGSTOP from a delayed SIGSTOP.
7284 2015-03-24 Gary Benson <gbenson@redhat.com>
7286 * linux-x86-low.c (x86_linux_new_thread): Moved to
7288 (x86_linux_prepare_to_resume): Likewise.
7290 2015-03-24 Gary Benson <gbenson@redhat.com>
7292 * Makefile.in (x86-linux-dregs.o): New rule.
7293 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7294 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7295 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7296 (x86_linux_dr_get): Likewise.
7297 (x86_linux_dr_set): Likewise.
7298 (update_debug_registers_callback): Likewise.
7299 (x86_linux_dr_set_addr): Likewise.
7300 (x86_linux_dr_get_addr): Likewise.
7301 (x86_linux_dr_set_control): Likewise.
7302 (x86_linux_dr_get_control): Likewise.
7303 (x86_linux_dr_get_status): Likewise.
7304 (x86_linux_update_debug_registers): Likewise.
7306 2015-03-24 Gary Benson <gbenson@redhat.com>
7308 * linux-x86-low.c (x86_linux_update_debug_registers):
7309 New function, factored out from...
7310 (x86_linux_prepare_to_resume): ...this.
7312 2015-03-24 Gary Benson <gbenson@redhat.com>
7314 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7315 (x86_linux_dr_set): Likewise.
7316 (update_debug_registers_callback): Likewise.
7317 (x86_linux_dr_set_addr): Likewise.
7318 (x86_linux_dr_get_addr): Likewise.
7319 (x86_linux_dr_set_control): Likewise.
7320 (x86_linux_dr_get_control): Likewise.
7321 (x86_linux_dr_get_status): Likewise.
7322 (x86_linux_prepare_to_resume): Likewise.
7324 2015-03-24 Gary Benson <gbenson@redhat.com>
7326 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7327 Use perror_with_name. Pass string through gettext.
7328 (x86_linux_dr_set): Likewise.
7330 2015-03-24 Gary Benson <gbenson@redhat.com>
7332 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7333 (x86_linux_dr_set_addr): ...this.
7334 (x86_dr_low_get_addr): Rename to...
7335 (x86_linux_dr_get_addr): ...this.
7336 (x86_dr_low_set_control): Rename to...
7337 (x86_linux_dr_set_control): ...this.
7338 (x86_dr_low_get_control): Rename to...
7339 (x86_linux_dr_get_control): ...this.
7340 (x86_dr_low_get_status): Rename to...
7341 (x86_linux_dr_get_status): ...this.
7342 (x86_dr_low): Update with new function names.
7344 2015-03-24 Gary Benson <gbenson@redhat.com>
7346 * Makefile.in (x86-linux.o): New rule.
7347 * configure.srv: Add x86-linux.o to relevant targets.
7348 * linux-low.c (lwp_set_arch_private_info): New function.
7349 (lwp_arch_private_info): Likewise.
7350 * linux-x86-low.c: Include nat/x86-linux.h.
7351 (arch_lwp_info): Removed structure.
7352 (update_debug_registers_callback):
7353 Use lwp_set_debug_registers_changed.
7354 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7355 and lwp_set_debug_registers_changed.
7356 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7358 2015-03-24 Gary Benson <gbenson@redhat.com>
7360 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7361 * linux-arm-low.c (arm_new_thread): Likewise.
7362 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7363 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7364 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7365 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7367 2015-03-24 Gary Benson <gbenson@redhat.com>
7369 * linux-low.c (ptid_of_lwp): New function.
7370 (lwp_is_stopped): Likewise.
7371 (lwp_stop_reason): Likewise.
7372 * linux-x86-low.c (update_debug_registers_callback):
7374 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7377 2015-03-24 Gary Benson <gbenson@redhat.com>
7379 * linux-low.h (linux_stop_lwp): Remove declaration.
7381 2015-03-24 Gary Benson <gbenson@redhat.com>
7383 * linux-low.h: Include nat/linux-nat.h.
7384 * linux-low.c (iterate_over_lwps_args): New structure.
7385 (iterate_over_lwps_filter): New function.
7386 (iterate_over_lwps): Likewise.
7387 * linux-x86-low.c (update_debug_registers_callback):
7388 Update signature to what iterate_over_lwps expects.
7389 Remove PID check that iterate_over_lwps now performs.
7390 (x86_dr_low_set_addr): Use iterate_over_lwps.
7391 (x86_dr_low_set_control): Likewise.
7393 2015-03-24 Gary Benson <gbenson@redhat.com>
7395 * linux-x86-low.c (x86_debug_reg_state): New function.
7396 (x86_linux_prepare_to_resume): Use the above.
7398 2015-03-24 Gary Benson <gbenson@redhat.com>
7400 * linux-low.c (current_lwp_ptid): New function.
7401 * linux-x86-low.c: Include nat/linux-nat.h.
7402 (x86_dr_low_get_addr): Use current_lwp_ptid.
7403 (x86_dr_low_get_control): Likewise.
7404 (x86_dr_low_get_status): Likewise.
7406 2015-03-20 Pedro Alves <palves@redhat.com>
7408 * tracepoint.c (cmd_qtstatus): Make "str" const.
7410 2015-03-20 Pedro Alves <palves@redhat.com>
7412 * server.c (handle_general_set): Make "req_str" const.
7414 2015-03-19 Pedro Alves <palves@redhat.com>
7416 * linux-low.c (linux_resume_one_lwp): Rename to ...
7417 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7418 instead call perror_with_name.
7419 (check_ptrace_stopped_lwp_gone): New function.
7420 (linux_resume_one_lwp): Reimplement as wrapper around
7421 linux_resume_one_lwp_throw that swallows errors if the LWP is
7424 2015-03-19 Pedro Alves <palves@redhat.com>
7426 * linux-low.c (count_events_callback, select_event_lwp_callback):
7427 No longer check whether the thread has resume_stop as last resume
7430 2015-03-19 Pedro Alves <palves@redhat.com>
7432 * linux-low.c (count_events_callback, select_event_lwp_callback):
7433 Use the lwp's status_pending_p field, not the thread's.
7435 2015-03-19 Pedro Alves <palves@redhat.com>
7437 * linux-low.c (select_event_lwp_callback): Update comments to
7438 no longer mention SIGTRAP.
7440 2015-03-18 Gary Benson <gbenson@redhat.com>
7442 * server.c (handle_query): Do not report vFile:fstat as supported.
7444 2015-03-11 Gary Benson <gbenson@redhat.com>
7446 * hostio.c (sys/types.h): New include.
7447 (sys/stat.h): Likewise.
7448 (common-remote-fileio.h): Likewise.
7449 (handle_fstat): New function.
7450 (handle_vFile): Handle vFile:fstat packets.
7452 2015-03-11 Gary Benson <gbenson@redhat.com>
7454 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7455 struct stat.st_blocks and struct stat.st_blksize.
7456 * configure: Regenerate.
7457 * config.in: Likewise.
7458 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7459 (OBS): Add common-remote-fileio.o.
7460 (common-remote-fileio.o): New rule.
7462 2015-03-09 Pedro Alves <palves@redhat.com>
7464 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7465 'struct sockaddr' pointer in 'accept' call.
7467 2015-03-09 Pedro Alves <palves@redhat.com>
7470 2015-03-07 Pedro Alves <palves@redhat.com>
7471 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7472 or <winsock2.h> here. Instead include "gdb_socket.h".
7473 (remote_open): Use union gdb_sockaddr_u.
7474 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7475 or <winsock2.h> here. Instead include "gdb_socket.h".
7476 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7477 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7479 (init_named_socket, gdb_agent_helper_thread): Use union
7482 2015-03-07 Pedro Alves <palves@redhat.com>
7484 * configure.ac (build_warnings): Move
7485 -Wdeclaration-after-statement to the C-specific set.
7486 * configure: Regenerate.
7488 2015-03-07 Pedro Alves <palves@redhat.com>
7490 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7491 or <winsock2.h> here. Instead include "gdb_socket.h".
7492 (remote_open): Use union gdb_sockaddr_u.
7493 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7494 or <winsock2.h> here. Instead include "gdb_socket.h".
7495 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7496 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7498 (init_named_socket, gdb_agent_helper_thread): Use union
7501 2015-03-07 Pedro Alves <palves@redhat.com>
7503 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7506 2015-03-06 Yao Qi <yao.qi@linaro.org>
7508 * linux-aarch64-low.c (aarch64_insert_point): Use
7509 show_debug_regs as a boolean.
7510 (aarch64_remove_point): Likewise.
7512 2015-03-05 Pedro Alves <palves@redhat.com>
7514 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7515 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7516 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7517 * nto-low.c (nto_target_ops): Likewise.
7518 * spu-low.c (spu_target_ops): Likewise.
7519 * win32-low.c (win32_target_ops): Likewise.
7521 2015-03-04 Pedro Alves <palves@redhat.com>
7523 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7524 Decide whether a breakpoint triggered based on the SIGTRAP's
7526 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7527 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7528 (linux_low_filter_event): Check for breakpoints before checking
7530 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7532 (linux_stopped_by_sw_breakpoint)
7533 (linux_supports_stopped_by_sw_breakpoint)
7534 (linux_stopped_by_hw_breakpoint)
7535 (linux_supports_stopped_by_hw_breakpoint): New functions.
7536 (linux_target_ops): Install new target methods.
7538 2015-03-04 Pedro Alves <palves@redhat.com>
7540 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7541 * server.c (swbreak_feature, hwbreak_feature): New globals.
7542 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7543 (captured_main): Clear swbreak_feature and hwbreak_feature.
7544 * server.h (swbreak_feature, hwbreak_feature): Declare.
7545 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7546 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7547 supports_stopped_by_hw_breakpoint>: New fields.
7548 (target_supports_stopped_by_sw_breakpoint)
7549 (target_stopped_by_sw_breakpoint)
7550 (target_supports_stopped_by_hw_breakpoint)
7551 (target_stopped_by_hw_breakpoint): Declare.
7553 2015-03-04 Pedro Alves <palves@redhat.com>
7555 enum lwp_stop_reason -> enum target_stop_reason
7556 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7557 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7558 (linux_wait_1, stuck_in_jump_pad_callback)
7559 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7560 (linux_stopped_by_watchpoint):
7561 * linux-low.h (enum lwp_stop_reason): Delete.
7562 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7563 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7565 2015-03-04 Yao Qi <yao.qi@linaro.org>
7567 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7569 2015-03-03 Gary Benson <gbenson@redhat.com>
7571 * hostio.c (handle_vFile): Fix prefix lengths.
7573 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7575 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7578 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7580 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7581 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7582 (clean): Add "rm -f" for above C files.
7583 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7584 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7585 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7586 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7587 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7588 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7589 (init_registers_s390x_vx_linux64)
7590 (init_registers_s390x_tevx_linux64)
7591 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7592 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7594 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7595 (s390_store_vxrs_high): New functions.
7596 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7598 (s390_arch_setup): Add logic for selecting one of the new target
7599 descriptions. Activate the new vector regsets if applicable.
7600 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7601 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7602 and init_registers_s390x_tevx_linux64.
7604 2015-03-01 Pedro Alves <palves@redhat.com>
7606 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7609 2015-02-27 Pedro Alves <palves@redhat.com>
7611 * linux-x86-low.c (u_debugreg_offset): New function.
7612 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7614 2015-02-27 Pedro Alves <palves@redhat.com>
7616 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7617 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7618 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7619 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7620 (ps_lsetfpregs, ps_getpid)
7621 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7622 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7623 (ps_lsetxregs, ps_plog): Declare.
7625 2015-02-27 Pedro Alves <palves@redhat.com>
7627 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7628 IP_AGENT_EXPORT_FUNC.
7629 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7630 IP_AGENT_EXPORT_FUNC.
7631 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7632 (IP_AGENT_EXPORT): Delete.
7633 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7634 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7635 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7636 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7637 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7638 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7639 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7640 (traceframe_read_count, traceframe_write_count)
7641 (traceframes_created, trace_state_variables, get_raw_reg)
7642 (get_trace_state_variable_value, set_trace_state_variable_value)
7643 (ust_loaded, helper_thread_id, cmd_buf): Use
7644 IPA_SYM_EXPORTED_NAME.
7645 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7646 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7647 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7648 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7649 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7650 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7651 EXTERN_C_PUSH/EXTERN_C_POP.
7652 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7653 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7654 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7655 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7656 (traceframe_write_count, traceframe_read_count)
7657 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7658 (about_to_request_buffer_space, get_trace_state_variable_value)
7659 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7660 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7661 EXTERN_C_PUSH/EXTERN_C_POP.
7662 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7663 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7664 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7665 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7666 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7667 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7668 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7669 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7671 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7672 (IP_AGENT_EXPORT_VAR_DECL): Define.
7674 (gdb_agent_get_raw_reg): Declare.
7676 2015-02-27 Tom Tromey <tromey@redhat.com>
7677 Pedro Alves <palves@redhat.com>
7679 Rename symbols whose names are reserved C++ keywords throughout.
7681 2015-02-27 Pedro Alves <palves@redhat.com>
7683 * Makefile.in (COMPILER): New, get it from autoconf.
7684 (CXX): Get from autoconf instead.
7685 (COMPILE.pre): Use COMPILER.
7686 (CC-LD): Rename to ...
7687 (CC_LD): ... this. Use COMPILER.
7688 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7689 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7690 * acinclude.m4: Include build-with-cxx.m4.
7691 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7692 Disable -Werror by default if building in C++ mode.
7693 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7694 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7695 the C++ compiler. Save/restore CXXFLAGS too.
7696 * configure: Regenerate.
7698 2015-02-27 Pedro Alves <palves@redhat.com>
7700 * acinclude.m4: Include libiberty.m4.
7701 * configure.ac: Call libiberty_INIT.
7702 * config.in, configure: Regenerate.
7704 2015-02-26 Pedro Alves <palves@redhat.com>
7706 * linux-low.c (linux_wait_1): When incrementing the PC past a
7707 program breakpoint always use the_low_target.breakpoint_len as
7708 increment, rather than the maximum between that and
7709 the_low_target.decr_pc_after_break.
7711 2015-02-23 Pedro Alves <palves@redhat.com>
7713 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7714 thread was doing a step-over; always adjust the PC if
7715 we stepped over a permanent breakpoint.
7716 (linux_wait_1): If we stepped over breakpoint that was on top of a
7717 permanent breakpoint, manually advance the PC past it.
7719 2015-02-23 Pedro Alves <palves@redhat.com>
7721 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7723 (x86_fill_gregset, x86_store_gregset): Use it when handling
7726 2015-02-20 Pedro Alves <palves@redhat.com>
7728 * thread-db.c: Include "nat/linux-procfs.h".
7729 (thread_db_init): Skip listing new threads if the kernel supports
7730 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7732 2015-02-20 Pedro Alves <palves@redhat.com>
7734 * linux-low.c (status_pending_p_callback): Use ptid_match.
7736 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7738 PR breakpoints/16812
7739 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7740 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7741 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7743 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7745 PR breakpoints/15956
7746 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7748 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7750 * linux-low.c (linux_low_btrace_conf): Print size.
7751 * server.c (handle_btrace_conf_general_set): New.
7752 (hanle_general_set): Call handle_btrace_conf_general_set.
7753 (handle_query): Report Qbtrace-conf:bts:size as supported.
7755 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7757 * linux-low.c (linux_low_enable_btrace): Update parameters.
7758 (linux_low_btrace_conf): New.
7759 (linux_target_ops)<to_btrace_conf>: Initialize.
7760 * server.c (current_btrace_conf): New.
7761 (handle_btrace_enable): Rename to ...
7762 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7763 to target_enable_btrace. Update comment. Update users.
7764 (handle_qxfer_btrace_conf): New.
7765 (qxfer_packets): Add btrace-conf entry.
7766 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7767 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7768 (target_ops)<read_btrace_conf>: New.
7769 (target_enable_btrace): Update parameters.
7770 (target_read_btrace_conf): New.
7772 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7774 * server.c (handle_btrace_general_set): Remove call to
7775 target_supports_btrace.
7776 (supported_btrace_packets): New.
7777 (handle_query): Call supported_btrace_packets.
7778 * target.h: include btrace-common.h.
7779 (btrace_target_info): Removed.
7780 (supports_btrace, target_supports_btrace): Update parameters.
7782 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7784 * Makefile.in (SFILES): Add common/btrace-common.c.
7785 (OBS): Add common/btrace-common.o.
7786 (btrace-common.o): Add build rules.
7787 * linux-low: Include btrace-common.h.
7788 (linux_low_read_btrace): Use struct btrace_data. Call
7789 btrace_data_init and btrace_data_fini.
7791 2015-02-06 Pedro Alves <palves@redhat.com>
7793 * thread-db.c (find_new_threads_callback): Add debug output.
7795 2015-02-04 Pedro Alves <palves@redhat.com>
7797 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7798 (resume_stopped_resumed_lwps): New function.
7799 (linux_wait_for_event_filtered): Use it.
7801 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7803 * Makefile.in (SFILES): Add linux-personality.c.
7804 (linux-personality.o): New rule.
7805 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7806 list of objects to be built.
7807 * linux-low.c: Include nat/linux-personality.h.
7808 (linux_create_inferior): Remove code to disable address space
7809 randomization (moved to ../nat/linux-personality.c). Create
7810 cleanup to disable address space randomization.
7812 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7814 * Makefile.in (posix-strerror.o): New rule.
7815 (mingw-strerror.o): Likewise.
7816 * configure: Regenerated.
7817 * configure.ac: Source file ../common/common.host. Initialize new
7818 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7820 2015-01-14 Yao Qi <yao@codesourcery.com>
7822 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7823 (ppc-linux.o): New rule.
7824 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7825 * configure.ac: AC_CHECK_FUNCS(getauxval).
7826 * config.in: Re-generated.
7827 * configure: Re-generated.
7828 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7829 ppc64_64bit_inferior_p
7831 2015-01-14 Yao Qi <yao@codesourcery.com>
7833 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7834 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7835 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7836 (PT_ORIG_R3, PT_TRAP): Likewise.
7837 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7838 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7839 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7841 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7843 * i387-fp.c (i387_cache_to_xsave): In look over
7844 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7845 zmmh_low_space field by use of zmmh_high_space.
7847 2015-01-09 Pedro Alves <palves@redhat.com>
7849 * linux-low.c (step_over_bkpt): Move higher up in the file.
7850 (handle_extended_wait): Don't store the stop_pc here.
7851 (get_stop_pc): Adjust comments and rename to ...
7852 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7853 stopped for a software breakpoint or hardware breakpoint.
7854 (thread_still_has_status_pending_p): New function.
7855 (status_pending_p_callback): Use
7856 thread_still_has_status_pending_p. If the event is no longer
7857 interesting, resume the LWP.
7858 (handle_tracepoints): Add assert.
7859 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7860 (wstatus_maybe_breakpoint): New function.
7861 (cancel_breakpoint): Delete function.
7862 (check_stopped_by_watchpoint): New function, factored out from
7863 linux_low_filter_event.
7864 (lp_status_maybe_breakpoint): Delete function.
7865 (linux_low_filter_event): Remove filter_ptid argument.
7866 Leave thread group exits pending here. Store the LWP's stop PC.
7867 Always leave events pending.
7868 (linux_wait_for_event_filtered): Pull all events out of the
7869 kernel, and leave them all pending.
7870 (count_events_callback, select_event_lwp_callback): Consider all
7872 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7873 (select_event_lwp): Only give preference to the stepping LWP in
7874 all-stop mode. Adjust comments.
7875 (ignore_event): New function.
7876 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7877 references to cancel_breakpoints. Adjust to renames. Also give
7878 equal priority to all LWPs that have had events in non-stop mode.
7879 If reporting a software breakpoint event, unadjust the LWP's PC.
7880 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7881 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7883 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7884 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7885 (linux_stopped_by_watchpoint): Adjust.
7886 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7887 * linux-low.h (enum lwp_stop_reason): New.
7888 (struct lwp_info) <stop_pc>: Adjust comment.
7889 <stopped_by_watchpoint>: Delete field.
7890 <stop_reason>: New field.
7891 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7892 * mem-break.c (software_breakpoint_inserted_here)
7893 (hardware_breakpoint_inserted_here): New function.
7894 * mem-break.h (software_breakpoint_inserted_here)
7895 (hardware_breakpoint_inserted_here): Declare.
7896 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7897 (cancel_breakpoints): Delete.
7898 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7899 (upload_fast_traceframes): Remove references to
7902 2015-01-09 Pedro Alves <palves@redhat.com>
7904 * thread-db.c (find_new_threads_callback): Ignore thread if the
7905 kernel thread ID is -1.
7907 2015-01-09 Pedro Alves <palves@redhat.com>
7909 * linux-low.c (linux_attach_fail_reason_string): Move to
7910 nat/linux-ptrace.c, and rename.
7911 (linux_attach_lwp): Update comment.
7912 (attach_proc_task_lwp_callback): New function.
7913 (linux_attach): Adjust to rename and use
7914 linux_proc_attach_tgid_threads.
7915 (linux_attach_fail_reason_string): Delete declaration.
7917 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7919 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7920 * server.c (gdbserver_version): Likewise.
7922 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7924 * remote-utils.c: Include ctype.h.
7925 (input_interrupt): Explicitly handle the case when the char
7926 received is the NUL byte. Improve the printing of non-ASCII
7929 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7931 * linux-low.c (linux_low_filter_event): Update call to
7932 linux_enable_event_reporting following the addition of
7933 a new parameter to that function.
7935 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7938 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7939 (AARCH64_FPCR_REGNO): Likewise.
7940 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7941 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7942 (aarch64_store_fpregset): Likewise.
7944 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7946 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7947 Remove FIXME comment about assumption about N.
7949 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7951 * configure.ac: If large-file support is disabled in GDBserver,
7952 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7953 * configure: Regenerate.
7955 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7957 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7958 warning upon ENODATA from ptrace.
7959 * linux-s390-low.c (s390_store_tdb): New.
7960 (s390_regsets): Add regset for NT_S390_TDB.
7962 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7964 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7965 without a fill_function.
7966 * linux-s390-low.c (s390_fill_last_break): Remove.
7967 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7968 (s390_arch_setup): Use regset's size instead of fill_function for
7971 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7973 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7974 the regset's store function when ptrace returned an error.
7975 * regcache.c (get_thread_regcache): Invalidate register cache
7976 before fetching inferior's registers.
7978 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7980 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7981 while-loop as for-loop.
7982 (regsets_store_inferior_registers): Likewise.
7984 2014-11-28 Yao Qi <yao@codesourcery.com>
7986 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7987 * config.in, configure: Re-generate.
7988 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7991 2014-11-21 Yao Qi <yao@codesourcery.com>
7993 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7994 (AC_CHECK_HEADERS): Remove malloc.h.
7995 * configure: Re-generated.
7996 * config.in: Re-generated.
7997 * server.h: Don't include alloca.h and malloc.h.
7998 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7999 Don't include malloc.h.
8001 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8003 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8004 corresponding ERRNO check in same block.
8006 2014-11-12 Pedro Alves <palves@redhat.com>
8008 * server.c (cont_thread): Update comment.
8009 (start_inferior, attach_inferior): No longer clear cont_thread.
8010 (handle_v_cont): No longer set cont_thread.
8011 (captured_main): Clear cont_thread each time a GDB connects.
8013 2014-11-12 Pedro Alves <palves@redhat.com>
8015 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8016 thread, and don't resume all threads if the Hc thread has exited.
8018 2014-11-12 Pedro Alves <palves@redhat.com>
8020 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8021 the process group instead of to a specific LWP.
8023 2014-10-15 Pedro Alves <palves@redhat.com>
8026 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8028 (arm_set_thread_context): Delete.
8029 (the_low_target): Adjust.
8030 * win32-i386-low.c (debug_registers_changed)
8031 (debug_registers_used): Delete.
8032 (update_debug_registers_callback): New function.
8033 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8034 needing to update their debug registers.
8035 (win32_get_current_dr): New function.
8036 (x86_dr_low_get_addr, x86_dr_low_get_control)
8037 (x86_dr_low_get_status): Fetch the debug register from the thread
8039 (i386_initial_stuff): Adjust.
8040 (i386_get_thread_context): Remove current_event parameter. Don't
8041 clear debug_registers_changed nor copy DR values to
8043 (i386_set_thread_context): Delete.
8044 (i386_prepare_to_resume): New function.
8045 (i386_thread_added): Mark the thread as needing to update irs
8047 (the_low_target): Remove i386_set_thread_context and install
8048 i386_prepare_to_resume.
8049 * win32-low.c (win32_get_thread_context): Adjust.
8050 (win32_set_thread_context): Use SetThreadContext
8052 (win32_prepare_to_resume): New function.
8053 (win32_require_context): New function, factored out from ...
8054 (thread_rec): ... this.
8055 (continue_one_thread): Call win32_prepare_to_resume on each thread
8056 we're about to continue.
8057 (win32_resume): Call win32_prepare_to_resume on the event thread.
8058 * win32-low.h (struct win32_thread_info)
8059 <debug_registers_changed>: New field.
8060 (struct win32_target_ops): Change prototype of set_thread_context,
8061 delete set_thread_context and add prepare_to_resume.
8062 (win32_require_context): New declaration.
8064 2014-10-08 Gary Benson <gbenson@redhat.com>
8066 * server.h: Do not include common-exceptions.h.
8068 2014-10-08 Gary Benson <gbenson@redhat.com>
8070 * server.h: Do not include cleanups.h.
8072 2014-09-30 James Hogan <james.hogan@imgtec.com>
8074 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8077 2014-09-23 Yao Qi <yao@codesourcery.com>
8079 * linux-low.c (lp_status_maybe_breakpoint): New function.
8080 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8081 (count_events_callback): Likewise.
8082 (select_event_lwp_callback): Likewise.
8083 (cancel_breakpoints_callback): Likewise.
8085 2014-09-19 Don Breazeal <donb@codesourcery.com>
8087 * linux-low.c (handle_extended_wait): Call
8088 linux_ptrace_get_extended_event.
8089 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8090 linux_is_extended_waitstatus.
8092 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8094 * Makefile.in (CPPFLAGS): Define.
8095 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8096 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8098 2014-09-16 Gary Benson <gbenson@redhat.com>
8100 * inferiors.h (current_inferior): Renamed as...
8101 (current_thread): New variable. All uses updated.
8102 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8103 (maybe_move_out_of_jump_pad): Likewise.
8104 (cancel_breakpoint): Likewise.
8105 (linux_low_filter_event): Likewise.
8106 (wait_for_sigstop): Likewise.
8107 (linux_resume_one_lwp): Likewise.
8108 (need_step_over_p): Likewise.
8109 (start_step_over): Likewise.
8110 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8111 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8112 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8113 and save_inferior as saved_thread.
8114 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8116 (regcache_invalidate_thread): Likewise.
8117 * remote-utils.c (prepare_resume_reply): Likewise.
8118 * thread-db.c (thread_db_get_tls_address): Likewise.
8119 (disable_thread_event_reporting): Likewise.
8120 (remove_thread_event_breakpoints): Likewise.
8121 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8123 * target.h (set_desired_inferior): Renamed as...
8124 (set_desired_thread): New declaration. All uses updated.
8125 * server.c (myresume): Updated comment to reference thread instead
8127 (handle_serial_event): Likewise.
8128 (handle_target_event): Likewise.
8130 2014-09-12 Tom Tromey <tromey@redhat.com>
8131 Gary Benson <gbenson@redhat.com>
8133 * regcache.h: Include common-regcache.h.
8134 (regcache_read_pc): Don't declare.
8135 * regcache.c (get_thread_regcache_for_ptid): New function.
8137 2014-09-11 Tom Tromey <tromey@redhat.com>
8138 Gary Benson <gbenson@redhat.com>
8140 * symbol.c: New file.
8141 * Makefile.in (SFILES): Add symbol.c.
8142 (OBS): Add symbol.o.
8144 2014-09-11 Gary Benson <gbenson@redhat.com>
8146 * target.c (target_stop_ptid, target_continue_ptid): New
8149 2014-09-11 Tom Tromey <tromey@redhat.com>
8150 Gary Benson <gbenson@redhat.com>
8152 * target.h: Include target/target.h.
8153 * target.c (target_read_memory, target_read_uint32)
8154 (target_write_memory): New functions.
8156 2014-09-11 Gary Benson <gbenson@redhat.com>
8158 * server.h (debug_hw_points): Don't declare.
8159 * server.c (debug_hw_points): Don't define. Replace all uses
8160 with show_debug_regs.
8161 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8162 all uses with show_debug_regs.
8164 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8166 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8167 endianness into account.
8168 (ppc_supply_ptrace_register): Likewise.
8170 2014-09-03 James Hogan <james.hogan@imgtec.com>
8172 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8173 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8175 2014-09-03 Gary Benson <gbenson@redhat.com>
8177 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8178 ALL_DEBUG_ADDRESS_REGISTERS.
8180 2014-09-02 Gary Benson <gbenson@redhat.com>
8182 * i386-low.h: Renamed as...
8183 * x86-low.h: New file. All type, function and variable name
8184 prefixes changed from "i386_" to "x86_". All references updated.
8185 * i386-low.c: Renamed as...
8186 * x86-low.c: New file. All type, function and variable name
8187 prefixes changed from "i386_" to "x86_". All references updated.
8189 2014-09-02 Gary Benson <gbenson@redhat.com>
8191 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8192 (x86_linux_new_thread): Likewise.
8194 2014-08-29 Gary Benson <gbenson@redhat.com>
8196 * server.h (setjmp.h): Do not include.
8197 (toplevel): Do not declare.
8198 (common-exceptions.h): Include.
8199 (cleanups.h): Likewise.
8200 * server.c (toplevel): Do not define.
8201 (exit_code): New static global.
8202 (detach_or_kill_for_exit_cleanup): New function.
8203 (main): New function. Original main renamed to...
8204 (captured_main): New function.
8205 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8207 2014-08-29 Gary Benson <gbenson@redhat.com>
8209 * Makefile.in (SFILES): Add common/common-exceptions.c.
8210 (OBS): Add common-exceptions.o.
8211 (common-exceptions.o): New rule.
8212 * utils.c (prepare_to_throw_exception): New function.
8214 2014-08-29 Gary Benson <gbenson@redhat.com>
8216 * config.in: Regenerate.
8217 * configure: Likewise.
8219 2014-08-29 Gary Benson <gbenson@redhat.com>
8221 * Makefile.in (SFILES): Add common/cleanups.c.
8223 (cleanups.o): New rule.
8225 2014-08-29 Gary Benson <gbenson@redhat.com>
8227 * utils.c (internal_vwarning): New function.
8229 2014-08-28 Gary Benson <gbenson@redhat.com>
8231 * utils.h (fatal): Remove declaration.
8232 * utils.c (fatal): Remove function.
8234 2014-08-28 Gary Benson <gbenson@redhat.com>
8236 * tracepoint.c (gdb_agent_init): Replace fatal with
8238 (initialize_tracepoint): Likewise.
8240 2014-08-28 Gary Benson <gbenson@redhat.com>
8242 * remote-utils.c (remote_prepare): Replace fatal with error.
8244 2014-08-28 Gary Benson <gbenson@redhat.com>
8246 * linux-low.c (linux_async): Replace fatal with warning.
8248 (linux_start_non_stop): Return -1 if linux_async failed.
8250 2014-08-28 Gary Benson <gbenson@redhat.com>
8252 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8254 (i386_dr_low_get_addr): Remove vague comment.
8255 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8258 2014-08-28 Gary Benson <gbenson@redhat.com>
8260 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8261 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8263 (linux_resume_one_lwp): Likewise.
8264 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8266 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8267 with internal_error.
8268 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8269 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8270 (find_register_by_name): Replace fatal with internal_error.
8271 (find_regno): Likewise.
8272 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8273 * thread-db.c (thread_db_create_event): Likewise.
8274 (thread_db_load_search): Likewise.
8275 (try_thread_db_load_1): Likewise.
8276 * tracepoint.c (get_jump_space_head): Replace fatal with
8278 (claim_trampoline_space): Likewise.
8279 (have_fast_tracepoint_trampoline_buffer): Likewise.
8280 (cmd_qtstart): Likewise.
8281 (stop_tracing): Likewise.
8282 (fast_tracepoint_collecting): Likewise.
8283 (target_malloc): Likewise.
8284 (download_tracepoint): Likewise.
8285 (download_trace_state_variables): Replace check with gdb_assert.
8286 (upload_fast_traceframes): Replace fatal with internal_error.
8288 2014-08-19 Tom Tromey <tromey@redhat.com>
8289 Gary Benson <gbenson@redhat.com>
8291 * Makefile.in (SFILES): Add common/common-debug.c.
8292 (OBS): Add common-debug.o.
8293 (common-debug.o): New rule.
8294 * debug.h (debug_printf): Don't declare.
8295 * debug.c (debug_printf): Renamed and rewritten as...
8296 (debug_vprintf): New function.
8298 2014-08-19 Gary Benson <gbenson@redhat.com>
8300 * utils.h: Do not include print-utils.h.
8302 2014-08-19 Tom Tromey <tromey@redhat.com>
8303 Gary Benson <gbenson@redhat.com>
8305 * server.h: Add static assertion.
8306 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8308 2014-08-19 Tom Tromey <tromey@redhat.com>
8309 Gary Benson <gbenson@redhat.com>
8311 * Makefile.in (SFILES): Add common/errors.c.
8312 (OBS): Add errors.o.
8313 (IPA_OBS): Add errors-ipa.o.
8314 (errors.o): New rule.
8315 (errors-ipa.o): Likewise.
8316 * utils.h (perror_with_name, error, warning): Don't declare.
8317 * utils.c (warning): Renamed and rewritten as...
8318 (vwarning): New function.
8319 (error): Renamed and rewritten as...
8320 (verror): New function.
8321 (internal_error): Renamed and rewritten as...
8322 (internal_verror): New function.
8324 2014-08-07 Gary Benson <gbenson@redhat.com>
8326 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8327 * configure: Regenerate.
8328 * config.in: Likewise.
8329 * server.h: Do not include errno.h.
8330 * event-loop.c: Likewise.
8331 * hostio-errno.c: Likewise.
8332 * linux-low.c: Likewise.
8333 * remote-utils.c: Likewise.
8334 * spu-low.c: Likewise.
8335 * utils.c: Likewise.
8336 * gdbreplay.c: Unconditionally include errno.h.
8338 2014-08-07 Gary Benson <gbenson@redhat.com>
8340 * server.h: Do not include string.h.
8341 * event-loop.c: Likewise.
8342 * linux-low.c: Likewise.
8343 * regcache.c: Likewise.
8344 * remote-utils.c: Likewise.
8345 * spu-low.c: Likewise.
8346 * utils.c: Likewise.
8348 2014-08-07 Gary Benson <gbenson@redhat.com>
8350 * server.h: Do not include gdb_assert.h.
8352 2014-08-07 Gary Benson <gbenson@redhat.com>
8354 * server.h: Do not include common-utils.h.
8356 2014-08-07 Gary Benson <gbenson@redhat.com>
8358 * server.h: Do not include ptid.h.
8359 * notif.h: Likewise.
8361 2014-08-07 Gary Benson <gbenson@redhat.com>
8363 * server.h: Do not include gdb_locale.h.
8365 2014-08-07 Gary Benson <gbenson@redhat.com>
8367 * server.h: Do not include gdb/signals.h.
8368 * win32-low.c: Likewise.
8370 2014-08-07 Gary Benson <gbenson@redhat.com>
8372 * server.h: Do not include pathmax.h.
8374 2014-08-07 Gary Benson <gbenson@redhat.com>
8376 * server.h: Do not include libiberty.h.
8377 * linux-bfin-low.c: Likewise.
8379 2014-08-07 Gary Benson <gbenson@redhat.com>
8381 * server.h: Do not include ansidecl.h.
8383 2014-08-07 Gary Benson <gbenson@redhat.com>
8385 * linux-x86-low.c: Do not include stddef.h.
8386 * lynx-ppc-low.c: Likewise.
8387 * tracepoint.c: Likewise.
8389 2014-08-07 Gary Benson <gbenson@redhat.com>
8391 * server.h: Do not include stdarg.h.
8392 * nto-low.c: Likewise.
8394 2014-08-07 Gary Benson <gbenson@redhat.com>
8396 * server.h: Do not include stdlib.h.
8397 * inferiors.c: Likewise.
8398 * linux-low.c: Likewise.
8399 * regcache.c: Likewise.
8400 * spu-low.c: Likewise.
8401 * tracepoint.c: Likewise.
8402 * utils.c: Likewise.
8404 2014-08-07 Gary Benson <gbenson@redhat.com>
8406 * server.h: Do not include stdio.h.
8407 * linux-low.c: Likewise.
8408 * remote-utils.c: Likewise.
8409 * spu-low.c: Likewise.
8410 * utils.c: Likewise.
8411 * wincecompat.c: Likewise.
8413 2014-08-06 Gary Benson <gbenson@redhat.com>
8415 * regcache.c (init_register_cache): Move conditionals inside if.
8417 2014-08-06 Gary Benson <gbenson@redhat.com>
8419 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8421 2014-07-31 Gary Benson <gbenson@redhat.com>
8423 * ax.h: Do not include server.h.
8424 * gdbthread.h: Likewise.
8425 * lynx-low.h: Likewise.
8426 * notif.h: Likewise.
8428 2014-07-30 Gary Benson <gbenson@redhat.com>
8430 * server.h: Include common-defs.h.
8431 Do not include config.h or build-gnulib-gdbserver/config.h.
8433 2014-07-30 Gary Benson <gbenson@redhat.com>
8435 * hostio-errno.c: Move server.h to top of includes list.
8436 * inferiors.c: Likewise.
8437 * linux-x86-low.c: Likewise.
8438 * notif.c: Include server.h.
8440 2014-07-24 Tom Tromey <tromey@redhat.com>
8441 Gary Benson <gbenson@redhat.com>
8443 * server.h (CORE_ADDR): Now unsigned.
8445 2014-07-16 Pedro Alves <palves@redhat.com>
8447 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8449 2014-07-15 Pedro Alves <palves@redhat.com>
8451 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8454 2014-07-11 Pedro Alves <palves@redhat.com>
8456 * linux-low.c (kill_wait_lwp): New function, based on
8457 kill_one_lwp_callback, but use my_waitpid directly.
8458 (kill_one_lwp_callback, linux_kill): Use it.
8460 2014-06-23 Pedro Alves <palves@redhat.com>
8462 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8463 before setting DR0..DR3.
8465 2014-06-20 Gary Benson <gbenson@redhat.com>
8467 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8468 * configure: Regenerated.
8469 * config.in: Likewise.
8471 2014-06-20 Gary Benson <gbenson@redhat.com>
8473 * Makefile.in (SFILES): Update locations for files moved
8475 (object file files): Reordered.
8477 2014-06-20 Gary Benson <gbenson@redhat.com>
8479 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8480 (i386_dr_low_set_addr): Likewise.
8481 (i386_dr_low_get_addr): Likewise.
8482 (i386_dr_low_can_set_control): Likewise.
8483 (i386_dr_low_set_control): Likewise.
8484 (i386_dr_low_get_control): Likewise.
8485 (i386_dr_low_get_status): Likewise.
8486 (i386_get_debug_register_length): Likewise.
8487 * linux-x86-low.c (i386_dr_low_set_addr):
8488 Changed signature. Made static.
8489 (i386_dr_low_get_addr): Likewise.
8490 (i386_dr_low_set_control): Likewise.
8491 (i386_dr_low_get_control): Likewise.
8492 (i386_dr_low_get_status): Likewise.
8493 (i386_dr_low): New global variable.
8494 * win32-i386-low.c (i386_dr_low_set_addr):
8495 Changed signature. Made static.
8496 (i386_dr_low_get_addr): Likewise.
8497 (i386_dr_low_set_control): Likewise.
8498 (i386_dr_low_get_control): Likewise.
8499 (i386_dr_low_get_status): Likewise.
8500 (i386_dr_low): New global variable.
8502 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8504 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8505 * Makefile.in (AR, AR_FLAGS): Define.
8506 * configure: Regenerate.
8508 2014-06-19 Gary Benson <gbenson@redhat.com>
8510 * Makefile.in (i386-dregs.o): New rule.
8511 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8512 * i386-low.c (target.h): Remove include.
8513 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8514 (DR_CONTROL_SHIFT): Likewise.
8515 (DR_CONTROL_SIZE): Likewise.
8516 (DR_RW_EXECUTE): Likewise.
8517 (DR_RW_WRITE): Likewise.
8518 (DR_RW_READ): Likewise.
8519 (DR_RW_IORW): Likewise.
8520 (DR_LEN_1): Likewise.
8521 (DR_LEN_2): Likewise.
8522 (DR_LEN_4): Likewise.
8523 (DR_LEN_8): Likewise.
8524 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8525 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8526 (DR_ENABLE_SIZE): Likewise.
8527 (DR_LOCAL_SLOWDOWN): Likewise.
8528 (DR_GLOBAL_SLOWDOWN): Likewise.
8529 (DR_CONTROL_RESERVED): Likewise.
8530 (I386_DR_CONTROL_MASK): Likewise.
8531 (I386_DR_VACANT): Likewise.
8532 (I386_DR_LOCAL_ENABLE): Likewise.
8533 (I386_DR_GLOBAL_ENABLE): Likewise.
8534 (I386_DR_DISABLE): Likewise.
8535 (I386_DR_SET_RW_LEN): Likewise.
8536 (I386_DR_GET_RW_LEN): Likewise.
8537 (I386_DR_WATCH_HIT): Likewise.
8538 (i386_wp_op_t): Likewise.
8539 (i386_show_dr): Likewise.
8540 (i386_length_and_rw_bits): Likewise.
8541 (i386_insert_aligned_watchpoint): Likewise.
8542 (i386_remove_aligned_watchpoint): Likewise.
8543 (i386_handle_nonaligned_watchpoint): Likewise.
8544 i386_update_inferior_debug_regs(): Likewise.
8545 (i386_dr_insert_watchpoint): Likewise.
8546 (i386_dr_remove_watchpoint): Likewise.
8547 (i386_dr_region_ok_for_watchpoint): Likewise.
8548 (i386_dr_stopped_data_address): Likewise.
8549 (i386_dr_stopped_by_watchpoint): Likewise.
8551 2014-06-19 Gary Benson <gbenson@redhat.com>
8553 * i386-low.c (i386_dr_show): Renamed to
8554 i386_show_dr and made static. All uses updated.
8555 (i386_dr_length_and_rw_bits): Renamed to
8556 i386_length_and_rw_bits and made static.
8558 (i386_dr_insert_aligned_watchpoint): Renamed to
8559 i386_insert_aligned_watchpoint and made static.
8561 (i386_dr_remove_aligned_watchpoint): Renamed to
8562 i386_remove_aligned_watchpoint and made static.
8564 (i386_dr_update_inferior_debug_regs): Renamed to
8565 i386_update_inferior_debug_regs and made static.
8568 2014-06-18 Gary Benson <gbenson@redhat.com>
8570 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8571 (i386_dr_low_can_set_control): Likewise.
8572 (i386_get_debug_register_length): Likewise.
8573 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8574 (i386_dr_low_can_set_control): Likewise.
8575 (i386_get_debug_register_length): Likewise.
8577 2014-06-17 Gary Benson <gbenson@redhat.com>
8579 * i386-low.h (i386-dregs.h): New include.
8580 (DR_FIRSTADDR): Now in i386-dregs.h.
8581 (DR_LASTADDR): Likewise.
8582 (DR_NADDR): Likewise.
8583 (DR_STATUS): Likewise.
8584 (DR_CONTROL): Likewise.
8585 (i386_debug_reg_state): Likewise.
8586 (i386_dr_insert_watchpoint): Likewise.
8587 (i386_dr_remove_watchpoint): Likewise.
8588 (i386_dr_region_ok_for_watchpoint): Likewise.
8589 (i386_dr_stopped_data_address): Likewise.
8590 (i386_dr_stopped_by_watchpoint): Likewise.
8591 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8593 2014-06-18 Gary Benson <gbenson@redhat.com>
8595 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8596 i386_dr_insert_watchpoint.
8597 (i386_low_remove_watchpoint): Renamed to
8598 i386_dr_remove_watchpoint.
8599 (i386_low_region_ok_for_watchpoint): Renamed to
8600 i386_dr_region_ok_for_watchpoint.
8601 (i386_low_stopped_data_address): Renamed to
8602 i386_dr_stopped_data_address.
8603 (i386_low_stopped_by_watchpoint): Renamed to
8604 i386_dr_stopped_by_watchpoint.
8605 * i386-low.c (i386_show_dr): Renamed to
8606 i386_dr_show and made nonstatic. All uses updated.
8607 (i386_length_and_rw_bits): Renamed to
8608 i386_dr_length_and_rw_bits and made nonstatic.
8610 (i386_insert_aligned_watchpoint): Renamed to
8611 i386_dr_insert_aligned_watchpoint and made nonstatic.
8613 (i386_remove_aligned_watchpoint): Renamed to
8614 i386_dr_remove_aligned_watchpoint and made nonstatic.
8616 (i386_update_inferior_debug_regs): Renamed to
8617 i386_dr_update_inferior_debug_regs and made nonstatic.
8619 (i386_low_insert_watchpoint): Renamed to
8620 i386_dr_insert_watchpoint. All uses updated.
8621 (i386_low_remove_watchpoint): Renamed to
8622 i386_dr_remove_watchpoint. All uses updated.
8623 (i386_low_region_ok_for_watchpoint): Renamed to
8624 i386_dr_region_ok_for_watchpoint. All uses updated.
8625 (i386_low_stopped_data_address): Renamed to
8626 i386_dr_stopped_data_address. All uses updated.
8627 (i386_low_stopped_by_watchpoint): Renamed to
8628 i386_dr_stopped_by_watchpoint. All uses updated.
8630 2014-06-18 Gary Benson <gbenson@redhat.com>
8632 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8633 (i386_dr_low_can_set_control): Likewise.
8634 (i386_insert_aligned_watchpoint): New check.
8636 2014-06-18 Gary Benson <gbenson@redhat.com>
8638 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8641 2014-06-18 Gary Benson <gbenson@redhat.com>
8643 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8644 instead of fatal and error.
8645 (i386_handle_nonaligned_watchpoint): Likewise.
8647 2014-06-18 Gary Benson <gbenson@redhat.com>
8649 * i386-low.c (i386_get_debug_register_length): New macro.
8650 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8651 (i386_show_dr): Use debug_printf instead of fprintf. Use
8652 phex to format values.
8654 2014-06-18 Gary Benson <gbenson@redhat.com>
8656 * i386-low.h: Comment changes.
8657 * i386-low.c: Likewise.
8659 2014-06-18 Gary Benson <gbenson@redhat.com>
8661 * i386-low.c: Whitespace changes.
8663 2014-06-12 Tom Tromey <tromey@redhat.com>
8665 * utils.c (freeargv): Remove.
8667 2014-06-12 Tom Tromey <tromey@redhat.com>
8669 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8670 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8671 (parse_debug_format_options): Likewise.
8672 (gdbserver_usage): Likewise.
8673 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8674 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8675 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8677 ($(LIBGNU)): Depend on libiberty.
8678 (all-lib): Recurse into all subdirs.
8679 (install-only): Invoke "install" target in subdirs.
8680 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8682 * configure: Rebuild.
8683 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8684 for vasprintf, vsnprintf, or gettimeofday.
8685 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8688 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8690 * development.sh: Delete.
8691 * Makefile.in (config.status): Adjust dependency on development.sh.
8692 * configure.ac: Adjust development.sh source call.
8693 * configure: Regenerate.
8695 2014-06-02 Pedro Alves <palves@redhat.com>
8697 * ax.c (gdb_free_agent_expr): New function.
8698 * ax.h (gdb_free_agent_expr): New declaration.
8699 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8701 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8703 (clear_breakpoint_conditions_and_commands): New function.
8704 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8705 (clear_breakpoint_conditions_and_commands): New declaration.
8707 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8709 * linux-aarch64-low.c (asm/ptrace.h): Include.
8711 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8713 Fix TLS access for -static -pthread.
8714 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8715 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8716 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8718 2014-05-20 Pedro Alves <palves@redhat.com>
8720 * linux-aarch64-low.c (aarch64_insert_point)
8721 (aarch64_remove_point): No longer check whether the type is
8722 supported here. Adjust to new interface.
8723 (the_low_target): Install aarch64_supports_z_point_type as
8724 supports_z_point_type method.
8725 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8726 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8727 instead of a Z packet char. Adjust.
8728 (arm_supports_z_point_type): New function.
8729 (arm_insert_point, arm_remove_point): Adjust to new interface.
8730 (the_low_target): Install arm_supports_z_point_type.
8731 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8732 (cris_insert_point, cris_remove_point): Adjust to new interface.
8733 Don't check whether the type is supported here.
8734 (the_low_target): Install cris_supports_z_point_type.
8735 * linux-low.c (linux_supports_z_point_type): New function.
8736 (linux_insert_point, linux_remove_point): Adjust to new interface.
8737 * linux-low.h (struct linux_target_ops) <insert_point,
8738 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8739 raw_breakpoint pointer parameter.
8740 <supports_z_point_type>: New method.
8741 * linux-mips-low.c (mips_supports_z_point_type): New function.
8742 (mips_insert_point, mips_remove_point): Adjust to new interface.
8743 Use mips_supports_z_point_type.
8744 (the_low_target): Install mips_supports_z_point_type.
8745 * linux-ppc-low.c (the_low_target): Install NULL as
8746 supports_z_point_type method.
8747 * linux-s390-low.c (the_low_target): Install NULL as
8748 supports_z_point_type method.
8749 * linux-sparc-low.c (the_low_target): Install NULL as
8750 supports_z_point_type method.
8751 * linux-x86-low.c (x86_supports_z_point_type): New function.
8752 (x86_insert_point): Adjust to new insert_point interface. Use
8753 insert_memory_breakpoint. Adjust to new
8754 i386_low_insert_watchpoint interface.
8755 (x86_remove_point): Adjust to remove_point interface. Use
8756 remove_memory_breakpoint. Adjust to new
8757 i386_low_remove_watchpoint interface.
8758 (the_low_target): Install x86_supports_z_point_type.
8759 * lynx-low.c (lynx_target_ops): Install NULL as
8760 supports_z_point_type callback.
8761 * nto-low.c (nto_supports_z_point_type): New.
8762 (nto_insert_point, nto_remove_point): Adjust to new interface.
8763 (nto_target_ops): Install nto_supports_z_point_type.
8764 * mem-break.c: Adjust intro comment.
8765 (struct raw_breakpoint) <raw_type, size>: New fields.
8766 <inserted>: Update comment.
8767 <shlib_disabled>: Delete field.
8768 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8769 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8770 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8771 (raw_bkpt_type_to_target_hw_bp_type): New function.
8772 (find_enabled_raw_code_breakpoint_at): New function.
8773 (find_raw_breakpoint_at): New type and size parameters. Use them.
8774 (insert_memory_breakpoint): New function, based off
8775 set_raw_breakpoint_at.
8776 (remove_memory_breakpoint): New function.
8777 (set_raw_breakpoint_at): Reimplement.
8778 (set_breakpoint): New, based on set_breakpoint_at.
8779 (set_breakpoint_at): Reimplement.
8780 (delete_raw_breakpoint): Go through the_target->remove_point
8781 instead of assuming memory breakpoints.
8782 (find_gdb_breakpoint_at): Delete.
8783 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8784 (find_gdb_breakpoint): New function.
8785 (set_gdb_breakpoint_at): Delete.
8786 (z_type_supported): New function.
8787 (set_gdb_breakpoint_1): New function, loosely based off
8788 set_gdb_breakpoint_at.
8789 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8790 (delete_gdb_breakpoint_at): Delete.
8791 (delete_gdb_breakpoint_1): New function, loosely based off
8792 delete_gdb_breakpoint_at.
8793 (delete_gdb_breakpoint): New function.
8794 (clear_gdb_breakpoint_conditions): Rename to ...
8795 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8797 (add_condition_to_breakpoint): Make static.
8798 (add_breakpoint_condition): Take a struct breakpoint pointer
8799 instead of an address. Adjust.
8800 (gdb_condition_true_at_breakpoint): Rename to ...
8801 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8803 (gdb_condition_true_at_breakpoint): Reimplement.
8804 (add_breakpoint_commands): Take a struct breakpoint pointer
8805 instead of an address. Adjust.
8806 (gdb_no_commands_at_breakpoint): Rename to ...
8807 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8808 parameter. Return true if no breakpoint was found. Change debug
8810 (gdb_no_commands_at_breakpoint): Reimplement.
8811 (run_breakpoint_commands): Rename to ...
8812 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8813 and change return type to boolean.
8814 (run_breakpoint_commands): New function.
8815 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8816 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8817 breakpoint. Go through the_target->remove_point instead of
8818 assuming memory breakpoint.
8819 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8820 software and hardware breakpoints.
8821 (reinsert_raw_breakpoint): Go through the_target->insert_point
8822 instead of assuming memory breakpoint.
8823 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8824 software and hardware breakpoints.
8825 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8826 Check both software and hardware breakpoints.
8827 (validate_inserted_breakpoint): Assert the breakpoint is a
8828 software breakpoint. Set the inserted flag to -1 instead of
8829 setting shlib_disabled.
8830 (delete_disabled_breakpoints): Adjust.
8831 (validate_breakpoints): Only validate software breakpoints.
8832 Adjust to inserted flag change.
8833 (check_mem_read, check_mem_write): Skip breakpoint types other
8834 than software breakpoints. Adjust to inserted flag change.
8835 * mem-break.h (enum raw_bkpt_type): New enum.
8836 (raw_breakpoint, struct process_info): Forward declare.
8837 (Z_packet_to_target_hw_bp_type): Delete declaration.
8838 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8839 (set_gdb_breakpoint, delete_gdb_breakpoint)
8840 (clear_breakpoint_conditions): New declarations.
8841 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8842 (breakpoint_inserted_here): Update comment.
8843 (add_breakpoint_condition, add_breakpoint_commands): Replace
8844 address parameter with a breakpoint pointer parameter.
8845 (gdb_breakpoint_here): Update comment.
8846 (delete_gdb_breakpoint_at): Delete.
8847 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8848 * server.c (process_point_options): Take a struct breakpoint
8849 pointer instead of an address. Adjust.
8850 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8851 delete_gdb_breakpoint.
8852 * spu-low.c (spu_target_ops): Install NULL as
8853 supports_z_point_type method.
8854 * target.h: Include mem-break.h.
8855 (struct target_ops) <prepare_to_access_memory>: Update comment.
8856 <supports_z_point_type>: New field.
8857 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8858 instead of a char. Also take a raw breakpoint pointer.
8859 * win32-arm-low.c (the_low_target): Install NULL as
8860 supports_z_point_type.
8861 * win32-i386-low.c (i386_supports_z_point_type): New function.
8862 (i386_insert_point, i386_remove_point): Adjust to new interface.
8863 (the_low_target): Install i386_supports_z_point_type.
8864 * win32-low.c (win32_supports_z_point_type): New function.
8865 (win32_insert_point, win32_remove_point): Adjust to new interface.
8866 (win32_target_ops): Install win32_supports_z_point_type.
8867 * win32-low.h (struct win32_target_ops):
8868 <supports_z_point_type>: New method.
8869 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8870 instead of a char. Also take a raw breakpoint pointer.
8872 2014-05-20 Pedro Alves <palves@redhat.com>
8874 * mem-break.h: Include break-common.h.
8875 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8876 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8877 (Z_packet_to_target_hw_bp_type): New declaration.
8878 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8879 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8880 (Z_PACKET_ACCESS_WP): Delete macros.
8881 (Z_packet_to_hw_type): Delete function.
8882 * i386-low.h: Don't include break-common.h here.
8883 (Z_packet_to_hw_type): Delete declaration.
8884 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8885 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8886 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8887 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8888 * linux-aarch64-low.c: Don't include break-common.h here.
8889 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8890 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8891 (Z_packet_to_target_hw_bp_type): Delete function.
8892 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8894 (mips_insert_point, mips_remove_point): Use
8895 Z_packet_to_target_hw_bp_type.
8897 2014-05-20 Pedro Alves <palves@redhat.com>
8899 * linux-aarch64-low.c: Include break-common.h.
8900 (enum target_point_type): Delete.
8901 (Z_packet_to_point_type): Rename to ...
8902 (Z_packet_to_target_hw_bp_type): ... this, and return a
8903 target_hw_bp_type instead.
8904 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8905 instead of an enum target_point_type.
8906 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8908 (aarch64_dr_state_insert_one_point)
8909 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8910 (aarch64_handle_aligned_watchpoint)
8911 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8912 Take an enum target_hw_bp_type instead of an enum
8914 (aarch64_supports_z_point_type): New function.
8915 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8916 use Z_packet_to_target_hw_bp_type.
8918 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8920 * configure.ac: Only use -Werror by default when DEVELOPMENT
8922 * configure: Regenerate.
8924 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8926 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8927 * linux-x86-low.c (X86_64_USER_REGS): New.
8928 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8930 2014-04-28 Yao Qi <yao@codesourcery.com>
8932 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8935 2014-04-25 Pedro Alves <palves@redhat.com>
8938 * linux-low.c (linux_attach_fail_reason_string): New function.
8939 (linux_attach_lwp): Delete.
8940 (linux_attach_lwp_1): Rename to ...
8941 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8942 argument. Remove "initial" parameter. Return int instead of
8943 void. Don't error or warn here.
8944 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8945 failure to attach to the tgid. Call warning when failing to
8947 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8948 argument. Remove "initial" parameter. Return int instead of
8949 void. Don't error or warn here.
8950 (linux_attach_fail_reason_string): New declaration.
8951 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8952 interface change. Use linux_attach_fail_reason_string.
8954 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8955 Walfred Tedeschi <walfred.tedeschi@intel.com>
8957 * Makefile.in: Added rules to handle new files
8958 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8959 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8960 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8961 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8962 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8963 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8965 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8966 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8967 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8968 i386/x32-avx512.xml.
8969 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8970 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8971 i386/x32-avx512-linux.xml.
8972 * i387-fp.c (num_avx512_k_registers): New constant for number
8974 (num_avx512_zmmh_low_registers): New constant for number of
8975 lower ZMM registers (0-15).
8976 (num_avx512_zmmh_high_registers): New constant for number of
8977 higher ZMM registers (16-31).
8978 (num_avx512_ymmh_registers): New contant for number of higher
8979 YMM registers (ymm16-31 added by avx521 on x86_64).
8980 (num_avx512_xmm_registers): New constant for number of higher
8981 XMM registers (xmm16-31 added by AVX512 on x86_64).
8982 (struct i387_xsave): Add space for AVX512 registers.
8983 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8984 Add code to handle AVX512 registers.
8985 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8986 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8987 prototypei from generated file.
8988 (tdesc_amd64_avx512_linux): Likewise.
8989 (init_registers_x32_avx512_linux): Likewise.
8990 (tdesc_x32_avx512_linux): Likewise.
8991 (init_registers_i386_avx512_linux): Likewise.
8992 (tdesc_i386_avx512_linux): Likewise.
8993 (x86_64_regmap): Add AVX512 registers.
8994 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8996 (initialize_low_arch): Add code to initialize AVX512 registers.
8998 2014-04-23 Pedro Alves <palves@redhat.com>
9000 * mem-break.c (find_gdb_breakpoint_at): Make static.
9001 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9003 2014-04-23 Pedro Alves <palves@redhat.com>
9005 * i386-low.c: Don't include break-common.h here.
9006 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9007 prototype to take target_hw_bp_type as argument instead of a Z
9009 * i386-low.h: Include break-common.h here.
9010 (Z_packet_to_hw_type): Declare.
9011 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9013 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9014 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9015 (x86_remove_point): Convert the packet number to a
9016 target_hw_bp_type before calling i386_low_remove_watchpoint.
9017 * win32-i386-low.c (i386_insert_point): Convert the packet number
9018 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9019 (i386_remove_point): Convert the packet number to a
9020 target_hw_bp_type before calling i386_low_remove_watchpoint.
9022 2014-04-23 Pedro Alves <palves@redhat.com>
9024 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9026 2014-04-10 Pedro Alves <palves@redhat.com>
9028 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9029 Check if the condition or command is NULL before checking if the
9030 breakpoint is known. On success, return true.
9031 * mem-break.h (add_breakpoint_condition): Document return.
9032 (add_breakpoint_commands): Add describing comment.
9033 * server.c (skip_to_semicolon): New function.
9034 (process_point_options): Use it.
9036 2014-04-09 Pedro Alves <palves@redhat.com>
9038 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9041 2014-02-27 Pedro Alves <palves@redhat.com>
9044 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9046 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9048 (last_thread_of_process_p): Take a PID argument instead of a
9050 (linux_wait_for_lwp): Delete.
9051 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9053 (linux_low_filter_event): New function, party factored out from
9054 linux_wait_for_event.
9055 (linux_wait_for_event): Rename to ...
9056 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9057 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9058 sigsuspend. Check for zombie leaders.
9059 (linux_wait_for_event): Reimplement as wrapper around
9060 linux_wait_for_event_filtered.
9061 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9062 a normal or signal exit is seen, it's the whole process exiting.
9063 (wait_for_sigstop): No longer a for_each_inferior callback.
9064 Rewrite on top of linux_wait_for_event_filtered.
9065 (stop_all_lwps): Call wait_for_sigstop directly.
9066 * server.c (resume, handle_target_event): Handle
9067 TARGET_WAITKIND_NO_RESUMED.
9069 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9071 * win32-low.c (psapi_get_dll_name,
9072 * win32_CreateToolhelp32Snapshot): Delete.
9073 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9074 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9076 (handle_load_dll): Add function description.
9077 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9079 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9081 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9083 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9084 base address when calling win32_add_one_solib.
9085 (handle_load_dll): Delete local variable load_addr.
9086 Remove 0x1000 offset applied to DLL base address when calling
9087 win32_add_one_solib.
9088 (handle_unload_dll): Add comment.
9090 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9092 * win32-low.c (win32_add_all_dlls): Renames
9093 win32_ensure_ntdll_loaded. Rewrite function documentation.
9094 Adjust implementation to always load all DLLs.
9095 Add 0x1000 offset to DLL base address when calling
9096 win32_add_one_solib.
9097 (child_initialization_done): New static global.
9098 (do_initial_child_stuff): Set child_initialization_done to
9099 zero during child initialization, and 1 after. Replace call
9100 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9102 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9103 (handle_unload_dll): Add function documentation.
9104 (get_child_debug_event): Ignore load and unload DLL events
9105 during child initialization.
9107 2014-02-20 Doug Evans <dje@google.com>
9109 Remove global all_lwps.
9110 * inferiors.h (ptid_of): Move here from linux-low.h.
9111 (pid_of, lwpid_of): Ditto.
9112 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9113 parameter is a struct thread_info * now.
9114 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9115 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9116 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9118 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9119 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9120 * linux-arm-low.c (update_registers_callback): Update, "entry"
9121 parameter is a struct thread_info * now.
9122 Fetch lwpid from current_inferior directly.
9123 (arm_insert_point): Pass &all_threads to find_inferior instead of
9125 (arm_remove_point): Ditto.
9126 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9127 (arm_prepare_to_resume): Fetch pid from thread.
9128 (arm_read_description): Fetch lwpid from current_inferior directly.
9129 * linux-low.c (all_lwps): Delete.
9130 (delete_lwp): Delete call to remove_inferior.
9131 (handle_extended_wait): Fetch lwpid from thread.
9132 (add_lwp): Don't set lwp->entry.id. Remove call to
9133 add_inferior_to_list.
9134 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9135 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9136 (kill_one_lwp_callback): Ditto.
9137 (linux_kill): Don't dereference NULL pointer.
9138 Fetch ptid,lwpid from thread.
9139 (get_detach_signal): Fetch ptid from thread.
9140 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9141 Simplify call to regcache_invalidate_thread.
9142 (delete_lwp_callback): Update, "entry" parameter is a
9143 struct thread_info * now. Fetch pid from thread.
9144 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9145 (status_pending_p_callback): Update, "entry" parameter is a
9146 struct thread_info * now. Fetch ptid from thread.
9147 (find_lwp_pid): Update, "entry" parameter is a
9148 struct thread_info * now.
9149 (linux_wait_for_lwp): Fetch pid from thread.
9150 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9151 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9152 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9153 (dequeue_one_deferred_signal): Ditto.
9154 (cancel_breakpoint): Fetch ptid from current_inferior.
9155 (linux_wait_for_event): Pass &all_threads to find_inferior,
9156 not &all_lwps. Fetch ptid, lwpid from thread.
9157 (count_events_callback): Update, "entry" parameter is a
9158 struct thread_info * now.
9159 (select_singlestep_lwp_callback): Ditto.
9160 (select_event_lwp_callback): Ditto.
9161 (cancel_breakpoints_callback): Ditto.
9162 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9164 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9165 (unsuspend_one_lwp): Update, "entry" parameter is a
9166 struct thread_info * now.
9167 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9169 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9170 Fetch lwpid from thread, not lwp.
9171 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9172 Pass &all_threads to find_inferior, not &all_lwps.
9173 (send_sigstop): Fetch lwpid from thread, not lwp.
9174 (send_sigstop_callback): Update, "entry" parameter is a
9175 struct thread_info * now.
9176 (suspend_and_send_sigstop_callback): Ditto.
9177 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9178 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9179 struct thread_info * now.
9180 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9182 (lwp_running): Update, "entry" parameter is a
9183 struct thread_info * now.
9184 (stop_all_lwps): Fetch ptid from thread.
9185 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9186 (linux_resume_one_lwp): Fetch lwpid from thread.
9187 (linux_set_resume_request): Update, "entry" parameter is a
9188 struct thread_info * now. Fetch pid, lwpid from thread.
9189 (resume_status_pending_p): Update, "entry" parameter is a
9190 struct thread_info * now.
9191 (need_step_over_p): Ditto. Fetch lwpid from thread.
9192 (start_step_over): Fetch lwpid from thread.
9193 (linux_resume_one_thread): Update, "entry" parameter is a
9194 struct thread_info * now. Fetch lwpid from thread.
9195 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9196 (proceed_one_lwp): Update, "entry" parameter is a
9197 struct thread_info * now. Fetch lwpid from thread.
9198 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9199 struct thread_info * now.
9200 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9201 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9202 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9204 (regsets_store_inferior_registers): Ditto.
9205 (fetch_register, store_register): Ditto.
9206 (linux_read_memory, linux_write_memory): Ditto.
9207 (linux_request_interrupt): Ditto.
9208 (linux_read_auxv): Ditto.
9209 (linux_xfer_siginfo): Ditto.
9210 (linux_qxfer_spu): Ditto.
9211 (linux_qxfer_libraries_svr4): Ditto.
9212 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9213 moved to inferiors.h.
9215 (get_thread_lwp): Update.
9216 (struct lwp_info): Delete member "entry". Simplify comment for
9219 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9220 current_inferior directly.
9221 (update_watch_registers_callback): Update, "entry" parameter is a
9222 struct thread_info * now. Fetch pid from thread.
9223 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9224 (mips_insert_point): Fetch lwpid from current_inferior.
9225 Pass &all_threads to find_inferior, not &all_lwps.
9226 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9227 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9229 (mips_stopped_data_address): Ditto.
9230 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9232 * linux-tile-low.c (tile_arch_setup): Ditto.
9233 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9234 (update_debug_registers_callback): Update, "entry" parameter is a
9235 struct thread_info * now. Fetch pid from thread.
9236 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9237 Pass &all_threads to find_inferior, not &all_lwps.
9238 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9239 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9240 Pass &all_threads to find_inferior, not &all_lwps.
9241 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9242 (i386_dr_low_get_status): Ditto.
9243 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9244 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9245 (x86_linux_read_description): Ditto.
9246 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9248 2014-02-20 Doug Evans <dje@google.com>
9250 * inferiors.c (get_first_inferior): Fix buglet.
9252 2014-02-19 Doug Evans <dje@google.com>
9254 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9255 * inferiors.c (add_thread): Change result type to struct thread_info *.
9256 All callers updated.
9257 (add_lwp): Call add_thread here instead of in callers.
9258 All callers updated.
9259 * linux-low.h (get_lwp_thread): Rewrite.
9260 (struct lwp_info): New member "thread".
9262 2014-02-19 Doug Evans <dje@google.com>
9264 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9265 All callers updated.
9267 2014-02-19 Doug Evans <dje@google.com>
9269 * inferiors.c (add_thread): Fix whitespace.
9271 2014-02-19 Doug Evans <dje@google.com>
9273 * dll.c (clear_dlls): Replace accessing list implemention details
9275 * gdbthread.h (get_first_thread): Declare.
9276 * inferiors.c (for_each_inferior_with_data): New function.
9277 (get_first_thread): New function.
9278 (find_thread_ptid): Simplify.
9279 (get_first_inferior): New function.
9280 (clear_list): Delete.
9281 (one_inferior_p): New function.
9282 (clear_inferior_list): New function.
9283 (clear_inferiors): Update.
9284 * inferiors.h (for_each_inferior_with_data): Declare.
9285 (clear_inferior_list): Declare.
9286 (one_inferior_p): Declare.
9287 (get_first_inferior): Declare.
9288 * linux-low.c (linux_wait_for_event): Replace accessing list
9289 implemention details with API function.
9290 * server.c (target_running): Ditto.
9291 (accumulate_file_name_length): New function.
9292 (emit_dll_description): New function.
9293 (handle_qxfer_libraries): Replace accessing list implemention
9294 details with API function.
9295 (handle_qxfer_threads_worker): New function.
9296 (handle_qxfer_threads_proper): Replace accessing list implemention
9297 details with API function.
9298 (handle_query): Ditto.
9299 (visit_actioned_threads_callback_ftype): New typedef.
9300 (visit_actioned_threads_data): New struct.
9301 (visit_actioned_threads): Rewrite to be find_inferior callback.
9302 (resume): Call find_inferior.
9303 (handle_status): Replace accessing list implemention
9304 details with API function.
9305 (process_serial_event): Replace accessing list implemention details
9307 * target.c (set_desired_inferior): Replace accessing list implemention
9308 details with API function.
9309 * tracepoint.c (same_process_p): New function.
9310 (gdb_agent_about_to_close): Replace accessing list implemention
9311 details with API function.
9312 * win32-low.c (child_delete_thread): Replace accessing list
9313 implemention details with API function.
9314 (match_dll_by_basename): New function.
9315 (dll_is_loaded_by_basename): New function.
9316 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9317 details call to dll_is_loaded_by_basename.
9319 2014-02-19 Doug Evans <dje@google.com>
9321 * dll.h (struct dll_info): Add comment.
9322 * gdbthread.h (struct thread_info): Add comment.
9323 (current_ptid): Simplify.
9324 * inferiors.c (add_process): Update.
9325 (remove_process): Update.
9326 * inferiors.h (struct process_info): Rename member "head" to "entry".
9327 * linux-low.c (delete_lwp): Update.
9329 (last_thread_of_process_p): Update.
9330 (kill_one_lwp_callback, linux_kill): Update.
9331 (status_pending_p_callback): Update.
9332 (wait_for_sigstop): Update. Simplify read of ptid.
9333 (start_step_over): Update.
9334 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9335 (get_lwp_thread): Update.
9336 (struct lwp_info): Rename member "head" to "entry".
9337 * regcache.h (inferior_list_entry): Delete.
9338 * server.c (kill_inferior_callback): Update.
9339 (detach_or_kill_inferior_callback): Update.
9340 (print_started_pid): Update.
9341 (print_attached_pid): Update.
9342 (process_serial_event): Simplify read of ptid.
9343 * thread-db.c (thread_db_create_event): Update.
9344 (thread_db_get_tls_address): Update.
9345 * win32-low.c (current_inferior_ptid): Simplify.
9347 2014-02-19 Tom Tromey <tromey@redhat.com>
9349 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9351 (target_supports_btrace): Update.
9353 2014-02-14 Yao Qi <yao@codesourcery.com>
9355 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9356 (rsp-low-ipa.o): New target.
9358 2014-02-12 Tom Tromey <tromey@redhat.com>
9360 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9361 convert_ascii_to_int.
9362 * regcache.c (registers_to_string): Likewise.
9363 * remote-utils.c (decode_M_packet): Likewise.
9364 * server.c (process_serial_event): Likewise.
9366 2014-02-12 Tom Tromey <tromey@redhat.com>
9368 * server.c (handle_query, handle_v_run): Use hex2bin, not
9370 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9372 2014-02-12 Tom Tromey <tromey@redhat.com>
9374 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9375 convert_int_to_ascii.
9376 * regcache.c (registers_to_string, collect_register_as_string):
9378 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9380 * server.c (process_serial_event): Likewise.
9381 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9382 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9384 2014-02-12 Tom Tromey <tromey@redhat.com>
9386 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9387 bin2hex, not hexify.
9388 * tracepoint.c (cmd_qtstatus): Likewise.
9390 2014-02-12 Tom Tromey <tromey@redhat.com>
9392 * remote-utils.c (monitor_output): Pass explicit length to
9395 2014-02-12 Tom Tromey <tromey@redhat.com>
9397 * tracepoint.c: Include rsp-low.h.
9398 * server.c: Include rsp-low.h.
9399 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9400 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9402 * remote-utils.c: Include rsp-low.h.
9403 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9404 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9405 (convert_int_to_ascii, convert_ascii_to_int): Move to
9407 * regcache.c: Include rsp-low.h.
9408 * ax.c: Include rsp-low.h.
9409 * Makefile.in (SFILES): Add common/rsp-low.c.
9410 (OBS): Add rsp-low.o.
9411 (rsp-low.o): New target.
9413 2014-02-12 Tom Tromey <tromey@redhat.com>
9415 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9416 Include print-utils.h.
9417 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9418 (plongest, thirty_two, phex_nz): Remove.
9419 * Makefile.in (SFILES): Add common/print-utils.c.
9420 (OBS): Add print-utils.o.
9421 (print-utils-ipa.o): New target.
9422 (print-utils.o): New target.
9423 (IPA_OBJS): Add print-utils-ipa.o.
9425 2014-02-06 Tom Tromey <tromey@redhat.com>
9427 * Makefile.in (SFILES): Fix indentation.
9429 2014-02-05 Doug Evans <dje@google.com>
9431 * linux-low.c (linux_wait_for_event): Improve comment.
9432 (linux_wait_1): Keep current_inferior in sync with event_child.
9434 2014-01-22 Doug Evans <dje@google.com>
9436 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9438 2014-01-22 Doug Evans <dje@google.com>
9440 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9441 * configure: Regenerate.
9442 * config.in: Regenerate.
9443 * Makefile.in (SFILES): Add debug.c.
9445 * debug.c: New file.
9446 * debug.h: New file.
9447 * linux-aarch64-low.c (*): Update all debugging printfs to use
9448 debug_printf instead of fprintf.
9449 * linux-arm-low.c (*): Ditto.
9450 * linux-cris-low.c (*): Ditto.
9451 * linux-crisv32-low.c (*): Ditto.
9452 * linux-m32r-low.c (*): Ditto.
9453 * linux-sparc-low.c (*): Ditto.
9454 * linux-x86.c (*): Ditto.
9455 * linux-low.c (*): Ditto.
9456 (linux_wait_1): Add calls to debug_enter, debug_exit.
9457 (linux_wait): Remove redundant debugging printf.
9458 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9459 (linux_resume, unstop_all_lwps): Ditto.
9460 * mem-break.c (*): Update all debugging printfs to use
9461 debug_printf instead of fprintf.
9462 * remote-utils.c (*): Ditto.
9463 * thread-db.c (*): Ditto.
9464 * server.c #include <ctype.h>, "gdb_vecs.h".
9465 (debug_threads): Moved to debug.c.
9466 (*): Update all debugging printfs to use debug_printf instead of
9468 (start_inferior): Replace call to fflush with call to debug_flush.
9469 (monitor_show_help): Mention set debug-format.
9470 (parse_debug_format_options): New function.
9471 (handle_monitor_command): Handle "monitor set debug-format".
9472 (gdbserver_usage): Mention --debug-format.
9473 (main): Parse --debug-format.
9474 * server.h (debug_threads): Declaration moved to debug.h.
9476 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9477 trace_debug_1 that uses debug_printf.
9478 (tracepoint_look_up_symbols): Update all debugging printfs to use
9479 debug_printf instead of fprintf.
9481 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9483 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9486 2014-01-17 Pedro Alves <palves@redhat.com>
9489 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9490 defined after including gdb_proc_service.h.
9492 2014-01-16 Doug Evans <dje@google.com>
9494 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9495 (match_dll): Use it.
9497 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9499 * target.h (target_ops) <read_btrace>: Change parameters and
9500 return type to allow error reporting.
9501 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9502 trace reading errors on.
9503 * linux-low.c (linux_low_read_btrace): Pass trace reading
9505 (linux_low_disable_btrace): New.
9507 2014-01-15 Doug Evans <dje@google.com>
9509 * inferiors.c (thread_id_to_gdb_id): Delete.
9510 * inferiors.h (thread_id_to_gdb_id): Delete.
9512 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9514 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9515 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9518 2014-01-08 Pedro Alves <palves@redhat.com>
9520 * server.c (handle_status): Don't discard previous queued stop
9521 replies or thread's pending status here.
9522 (main) <disconnection>: Do it here instead.
9524 2014-01-08 Pedro Alves <palves@redhat.com>
9526 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9527 * server.c (visit_actioned_threads, handle_pending_status): New
9529 (handle_v_cont): Factor out parts to ...
9530 (resume): ... this new function. If in all-stop, and a thread
9531 being resumed has a pending status, report it without actually
9533 (myresume): Adjust to use the new 'resume' function.
9534 (clear_pending_status_callback, set_pending_status_callback)
9535 (find_status_pending_thread_callback): New functions.
9536 (handle_status): Handle the case of multiple threads having
9537 interesting statuses to report. Report threads' real last signal
9538 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9539 with an interesting thread to report the status for, instead of
9540 always reporting the status of the first thread.
9542 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9544 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9545 * gdbreplay.c (gdbreplay_version): Likewise.
9547 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9549 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9550 iov.iov_len with the real length in use.
9552 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9554 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9555 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9556 for all targets that use win32-low.c.
9557 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9558 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9560 2013-12-13 Pedro Alves <palves@redhat.com>
9562 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9563 if equal to TARGET_WAITKIND_LOADED.
9564 * win32-low.c (cached_status): New static global.
9565 (win32_wait): Add declaration.
9566 (do_initial_child_stuff): Flush all initial pending debug events
9567 up to the initial breakpoint.
9568 (win32_wait): If CACHED_STATUS was set, return that instead
9569 of doing a real wait. Remove the code resuming the execution
9570 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9571 during the initial phase. Also remove the code changing
9572 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9573 TARGET_WAITKIND_STOPPED.
9575 2013-12-11 Yao Qi <yao@codesourcery.com>
9577 * notif.c (handle_notif_ack): Return 0 if no notification
9580 2013-11-20 Doug Evans <dje@google.com>
9582 * linux-low.c (linux_set_resume_request): Fix comment.
9584 2013-11-20 Doug Evans <dje@google.com>
9586 * linux-low.c (resume_status_pending_p): Tweak comment.
9588 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9590 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9591 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9592 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9593 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9594 (srv_amd64_regobj): Add amd64-mpx.o.
9595 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9596 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9597 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9598 * i387-fp.c (num_pl_bnd_register) Added constant.
9599 (num_pl_bnd_cfg_registers) Added constant.
9600 (struct i387_xsave) Added reserved area and MPX fields.
9601 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9602 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9604 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9605 (init_registers_amd64_mpx_linux): Declare new function.
9606 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9607 (x86_64_regmap): Add MPX registers.
9608 (x86_linux_read_description): Add MPX case.
9609 (initialize_low_arch): Initialize MPX targets.
9611 2013-11-18 Tom Tromey <tromey@redhat.com>
9613 * configure: Rebuild.
9614 * configure.ac: Don't check for stdlib.h.
9615 * gdbreplay.c: Unconditionally include stdlib.h.
9617 2013-11-18 Tom Tromey <tromey@redhat.com>
9619 * config.in: Rebuild.
9620 * configure: Rebuild.
9621 * configure.ac: Don't use AC_HEADER_DIRENT.
9623 2013-11-18 Tom Tromey <tromey@redhat.com>
9625 * server.h: Don't check HAVE_STRING_H.
9626 * gdbreplay.c: Don't check HAVE_STRING_H.
9627 * configure: Rebuild.
9629 2013-11-18 Tom Tromey <tromey@redhat.com>
9631 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9634 2013-11-08 Tom Tromey <tromey@redhat.com>
9636 * configure, config.in: Rebuild.
9637 * configure.ac: Remove unused configury.
9639 2013-11-08 Tom Tromey <tromey@redhat.com>
9641 * acinclude.m4: Include common.m4, codeset.m4.
9642 * configure, config.in: Rebuild.
9643 * configure.ac: Use GDB_AC_COMMON.
9645 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9647 * linux-s390-low.c (HWCAP_S390_TE): New define.
9648 (s390_arch_setup): Consider the TE field in the HWCAP for
9649 determining 'have_regset_tdb'.
9651 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9654 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9657 2013-10-02 Pedro Alves <palves@redhat.com>
9659 * server.c (process_serial_event): Don't output "GDBserver
9660 exiting" if GDB is connected through stdio.
9661 * target.c (mywait): Likewise, be silent if GDB is connected
9664 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9666 * lynx-low.c (lynx_add_threads_after_attach): New function.
9667 (lynx_attach): Remove call to add_thread. Add call to
9668 lynx_add_threads_after_attach instead.
9670 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9672 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9673 * config.in, configure: Regenerated.
9675 2013-09-18 Yao Qi <yao@codesourcery.com>
9678 * server.c (start_inferior): Clear 'resume_info'.
9680 2013-09-16 Jiong Wang <jiwang@tilera.com>
9682 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9685 2013-09-16 Jiong Wang <jiwang@tilera.com>
9687 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9688 linux-tile-low.o to srv_tgtobj.
9690 2013-09-16 Will Newton <will.newton@linaro.org>
9692 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9695 2013-09-06 Pedro Alves <palves@redhat.com>
9697 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9698 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9699 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9700 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9701 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9702 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9704 2013-09-06 Pedro Alves <palves@redhat.com>
9706 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9707 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9709 2013-09-06 Pedro Alves <palves@redhat.com>
9711 * linux-amd64-ipa.c: Include tracepoint.h.
9712 * linux-i386-ipa.c: Include tracepoint.h.
9714 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9716 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9717 (ps_get_thread_area): New function.
9719 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9721 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9722 (initialize_low_arch): Call init_registers_crisv32 rather than
9723 init_register_crisv32.
9725 2013-09-05 Pedro Alves <palves@redhat.com>
9727 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9729 * hostio.h: ... this new file.
9730 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9731 win32-low.c: Include hostio.h.
9733 2013-09-05 Pedro Alves <palves@redhat.com>
9735 * server.h (gdb_client_data, handler_func, callback_handler_func)
9736 (delete_file_handler, add_file_handler, append_callback_event)
9737 (delete_callback_event, start_event_loop, initialize_event_loop):
9738 Move to event-loop.h and include it.
9739 * event-loop.h: New file.
9741 2013-09-05 Pedro Alves <palves@redhat.com>
9743 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9744 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9745 (loaded_dll, unloaded_dll): Move to ...
9746 * dll.h: ... this new file.
9747 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9749 2013-09-05 Pedro Alves <palves@redhat.com>
9751 * server.h (current_process, get_thread_process, all_processes)
9752 (add_inferior_to_list, for_each_inferior, current_inferior)
9753 (remove_inferior, add_process, remove_process, find_process_pid)
9754 (have_started_inferiors_p, have_attached_inferiors_p)
9755 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9756 (clear_inferiors, find_inferior, find_inferior_id)
9757 (inferior_target_data, set_inferior_target_data)
9758 (inferior_regcache_data, set_inferior_regcache_data): Move to
9759 inferiors.h, and include it.
9760 * inferiors.h: New file.
9762 2013-09-05 Pedro Alves <palves@redhat.com>
9764 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9768 2013-09-05 Pedro Alves <palves@redhat.com>
9770 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9772 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9773 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9774 (handle_tracepoint_general_set, handle_tracepoint_query)
9775 (tracepoint_finished_step, tracepoint_was_hit)
9776 (release_while_stepping_state_list, current_traceframe)
9777 (in_readonly_region, traceframe_read_mem)
9778 (fetch_traceframe_registers, traceframe_read_sdata)
9779 (traceframe_read_info, struct fast_tpoint_collect_status)
9780 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9781 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9782 (supply_fast_tracepoint_registers)
9783 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9784 (ipa_tdesc, claim_trampoline_space)
9785 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9786 (agent_mem_read, agent_get_trace_state_variable_value)
9787 (agent_set_trace_state_variable_value, agent_tsv_read)
9788 (agent_mem_read_string, get_raw_reg_func_addr)
9789 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9790 * tracepoint.h: ... this new file.
9792 2013-09-05 Pedro Alves <palves@redhat.com>
9794 * server.h (perror_with_name, error, fatal, warning, paddress)
9795 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9797 * utils.h: New file.
9799 2013-09-05 Pedro Alves <palves@redhat.com>
9801 * server.h (remote_debug, noack_mode, transport_is_reliable)
9802 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9803 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9804 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9805 (write_enn, initialize_async_io, enable_async_io)
9806 (disable_async_io, check_remote_input_interrupt_request)
9807 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9808 (dead_thread_notify, prepare_resume_reply)
9809 (decode_address_to_semicolon, decode_address, decode_m_packet)
9810 (decode_M_packet, decode_X_packet, decode_xfer_write)
9811 (decode_search_memory_packet, unhexify, hexify)
9812 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9813 (look_up_one_symbol, relocate_instruction)
9814 (monitor_output): Move to remote-utils.h, and include it.
9815 * remote-utils.h: New file.
9817 2013-09-05 Pedro Alves <palves@redhat.com>
9819 * server.h (_): Delete.
9821 2013-09-02 Pedro Alves <palves@redhat.com>
9823 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9824 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9826 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9828 2013-09-02 Pierre Muller <muller@sourceware.org>
9830 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9831 or WriteProcessMemory complete successfully and handle
9832 ERROR_PARTIAL_COPY error.
9834 2013-09-02 Pedro Alves <palves@redhat.com>
9836 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9837 error instead of EIO.
9839 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9842 * linux-low.c: Include filestuff.h.
9843 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9844 * lynx-low.c: Include filestuff.h.
9845 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9846 * server.c: Include filestuff.h.
9847 (main): Call notice_open_fds.
9848 * spu-low.c: Include filestuff.h.
9849 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9851 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9853 * Makefile.in: Explain why ../target and ../nat are not
9854 listed as include file search paths.
9855 (linux-waitpid.o): New object file rule.
9856 * configure.srv (srv_native_linux_obj): New variable.
9857 Replace all occurrences of linux native object files with
9858 $srv_native_linux_obj.
9859 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9860 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9861 (linux_enable_event_reporting): Remove declaration.
9862 (my_waitpid): Moved to common/linux-waitpid.c.
9863 (linux_wait_for_event): Pass ptid when calling
9864 linux_enable_event_reporting.
9865 (linux_supports_tracefork_flag): Remove.
9866 (linux_enable_event_reporting): Likewise.
9867 (linux_tracefork_grandchild): Remove.
9868 (STACK_SIZE): Moved to common/linux-ptrace.c.
9869 (linux_tracefork_child): Remove.
9870 (linux_test_for_tracefork): Remove.
9871 (linux_look_up_symbols): Call linux_supports_traceclone.
9872 (initialize_low): Remove call to linux_test_for_tracefork.
9873 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9874 common/linux-ptrace.h.
9875 (PTRACE_TYPE_ARG4): Likewise.
9876 Include linux-ptrace.h.
9878 2013-08-21 Pedro Alves <palves@redhat.com>
9880 * config.in: Renegerate.
9882 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9884 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9885 (SFILES): Remove $(srcdir)/common/target-common.c and
9886 add $(srcdir)/target/waitstatus.c.
9887 (OBS): Remove target-common.o and add waitstatus.o.
9888 (server_h): Remove $(srcdir)/../common/target-common.h and
9889 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9890 and $(srcdir)/../target/waitstatus.h.
9891 (target-common.o): Remove.
9892 (waitstatus.o): New target object file.
9893 * target.h: Do not include target-common.h and
9894 include target/resume.h, target/wait.h and
9895 target/waitstatus.h.
9897 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9899 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9900 to PTRACE_TYPE_ARG3.
9901 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9902 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9904 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9905 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9907 2013-07-27 Jie Zhang <jie@codesourcery.com>
9908 Daniel Jacobowitz <dan@codesourcery.com>
9909 Yao Qi <yao@codesourcery.com>
9911 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9912 (mips-linux-watch.o): New rule.
9913 (mips_linux_watch_h): New variable.
9914 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9916 * linux-mips-low.c: Include mips-linux-watch.h.
9917 (struct arch_process_info, struct arch_lwp_info): New.
9918 (update_watch_registers_callback): New function.
9919 (mips_linux_new_process, mips_linux_new_thread) New functions.
9920 (mips_linux_prepare_to_resume, mips_insert_point): New
9922 (mips_remove_point, mips_stopped_by_watchpoint): New
9924 (rsp_bp_type_to_target_hw_bp_type): New function.
9925 (mips_stopped_data_address): New function.
9926 (the_low_target): Add watchpoint support functions.
9928 2013-07-27 Yao Qi <yao@codesourcery.com>
9930 * i386-low.c: Include break-common.h.
9931 (enum target_hw_bp_type): Remove.
9933 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9935 * Makefile.in (SFILES): /common/target-common.c.
9936 (OBS): Add target-common.o.
9937 (server_h): Add $(srcdir)/../common/target-common.h.
9938 (target-common.o): New target.
9939 * server.c (queue_stop_reply_callback): Free
9940 status string after use.
9941 * target.c (target_waitstatus_to_string): Remove.
9942 * target.h: Include target-common.h.
9943 (resume_kind): Likewise.
9944 (target_waitkind): Likewise.
9945 (target_waitstatus): Likewise.
9946 (TARGET_WNOHANG): Likewise.
9948 2013-07-04 Yao Qi <yao@codesourcery.com>
9950 * Makefile.in (host_alias): Use @host_noncanonical@.
9951 (target_alias): Use @target_noncanonical@.
9952 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9953 ACX_NONCANONICAL_HOST.
9954 * configure: Regenerated.
9957 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9959 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9960 * configure: Rebuild.
9961 * Makefile.in (version_host, version_target): Get from configure.
9962 (version.c): Use $(version_host) and $(version_target).
9964 2013-07-03 Pedro Alves <palves@redhat.com>
9966 * Makefile.in (config.status): Depend on development.sh.
9967 * acinclude.m4: Include libmcheck.m4.
9968 * configure: Regenerate.
9970 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9972 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9973 attribute inside the parentheses.
9974 (winapi_DebugSetProcessKillOnExit): Ditto.
9975 (winapi_DebugBreakProcess): Ditto.
9976 (winapi_GenerateConsoleCtrlEvent): Ditto.
9978 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9980 * notif.h (notif_event): Add a dummy member to avoid compiler
9983 2013-07-01 Pedro Alves <palves@redhat.com>
9985 * hostio.c (HOSTIO_PATH_MAX): Define.
9986 (require_filename, handle_open, handle_unlink, handle_readlink):
9989 2013-07-01 Pedro Alves <palves@redhat.com>
9991 * server.h: Include "pathmax.h".
9992 * linux-low.c: Don't include sys/param.h.
9993 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9995 * win32-low.c: Don't include sys/param.h.
9996 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9998 2013-07-01 Pedro Alves <palves@redhat.com>
10000 * event-loop.c: Don't check HAVE_UNISTD_H before including
10002 * gdbreplay.c: Likewise.
10003 * remote-utils.c: Likewise.
10004 * server.c: Likewise.
10005 * configure.ac: Don't check for unistd.h.
10006 * configure: Regenerate.
10008 2013-06-28 Tom Tromey <tromey@redhat.com>
10010 * Makefile.in (version.c): Use version.in, not
10013 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10015 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10016 * configure: Rebuild.
10017 * Makefile.in (version_host, version_target): Get from configure.
10018 (version.c): Use $(version_host) and $(version_target).
10020 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10022 Fix trace-status to output user name without trailing colon.
10023 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10025 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10027 Fix trace-status to output proper start-time and stop-time.
10028 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10029 output start time and stop time in hex as gdb expects.
10031 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10033 * tracepoint.c (build_traceframe_info_xml): Output trace state
10034 variables present in the trace buffer.
10036 2013-06-24 Tom Tromey <tromey@redhat.com>
10038 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10040 (version.o): Remove.
10041 * gdbreplay.c: Include version.h.
10042 (version, host_name): Don't declare.
10043 * server.h: Include version.h.
10044 (version, host_name): Don't declare.
10046 2013-06-12 Pedro Alves <palves@redhat.com>
10048 * linux-x86-low.c (linux_is_elf64): Delete global.
10049 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10050 with local linux_pid_exe_is_elf_64_file use.
10052 2013-06-11 Pedro Alves <palves@redhat.com>
10054 * linux-low.c (regset_disabled, disable_regset): New functions.
10055 (regsets_fetch_inferior_registers)
10056 (regsets_store_inferior_registers): Use them.
10057 (initialize_regsets_info); Don't allocate the disabled_regsets
10059 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10062 2013-06-11 Pedro Alves <palves@redhat.com>
10064 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10067 2013-06-11 Pedro Alves <palves@redhat.com>
10069 * linux-x86-low.c (initialize_low_arch): Call
10070 init_registers_x32_avx_linux.
10072 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10074 Fix compatibility with Android Bionic.
10075 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10078 2013-06-07 Pedro Alves <palves@redhat.com>
10081 * Makefile.in (OBS): Add tdesc.o.
10082 (IPA_OBJS): Add tdesc-ipa.o.
10083 (tdesc-ipa.o): New rule.
10084 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10086 * linux-low.c (new_inferior): Delete.
10087 (disabled_regsets, num_regsets): Delete.
10088 (linux_add_process): Adjust to set the new per-process
10090 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10091 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10092 was a stop. When calling arch_setup, switch the current inferior
10093 to the thread that got an event.
10094 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10095 (regsets_fetch_inferior_registers)
10096 (regsets_store_inferior_registers): New regsets_info parameter.
10098 (linux_register_in_regsets): New regs_info parameter. Adjust to
10100 (register_addr, fetch_register, store_register): New usrregs_info
10101 parameter. Adjust to use it.
10102 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10103 parameter regs_info. Adjust to use it.
10104 (linux_fetch_registers): Get the current inferior's regs_info, and
10106 (linux_store_registers): Ditto.
10107 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10108 (initialize_low): Don't initialize the target_regsets here. Call
10109 initialize_low_arch.
10110 * linux-low.h (target_regsets): Delete declaration.
10111 (struct regsets_info): New.
10112 (struct usrregs_info): New.
10113 (struct regs_info): New.
10114 (struct process_info_private) <new_inferior>: New field.
10115 (struct linux_target_ops): Delete the num_regs, regmap, and
10116 regset_bitmap fields. New field regs_info.
10117 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10118 * i387-fp.c (num_xmm_registers): Delete.
10119 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10120 calls to new interface.
10121 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10122 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10123 Infer the number of xmm registers from the regcache's target
10125 * i387-fp.h (num_xmm_registers): Delete.
10126 * inferiors.c (add_thread): Don't install the thread's regcache
10128 * proc-service.c (gregset_info): Fetch the current inferior's
10129 regs_info. Adjust to use it.
10130 * regcache.c: Include tdesc.h.
10131 (register_bytes, reg_defs, num_registers)
10132 (gdbserver_expedite_regs): Delete.
10133 (get_thread_regcache): If the thread doesn't have a regcache yet,
10134 create one, instead of aborting gdbserver.
10135 (regcache_invalidate_one): Rename to ...
10136 (regcache_invalidate_thread): ... this.
10137 (regcache_invalidate_one): New.
10138 (regcache_invalidate): Only invalidate registers of the current
10140 (init_register_cache): Add target_desc parameter, and use it.
10141 (new_register_cache): Ditto. Assert the target description has a
10142 non zero registers_size.
10143 (regcache_cpy): Add assertions. Adjust.
10144 (realloc_register_cache, set_register_cache): Delete.
10145 (registers_to_string, registers_from_string): Adjust.
10146 (find_register_by_name, find_regno, find_register_by_number)
10147 (register_cache_size): Add target_desc parameter, and use it.
10148 (free_register_cache_thread, free_register_cache_thread_one)
10149 (regcache_release, register_cache_size): New.
10150 (register_size): Add target_desc parameter, and use it.
10151 (register_data, supply_register, supply_register_zeroed)
10152 (supply_regblock, supply_register_by_name, collect_register)
10153 (collect_register_as_string, collect_register_by_name): Adjust.
10154 * regcache.h (struct target_desc): Forward declare.
10155 (struct regcache) <tdesc>: New field.
10156 (init_register_cache, new_register_cache): Add target_desc
10158 (regcache_invalidate_thread): Declare.
10159 (regcache_invalidate_one): Delete declaration.
10160 (regcache_release): Declare.
10161 (find_register_by_number, register_cache_size, register_size)
10162 (find_regno): Add target_desc parameter.
10163 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10165 * remote-utils.c: Include tdesc.h.
10166 (outreg, prepare_resume_reply): Adjust.
10167 * server.c: Include tdesc.h.
10168 (gdbserver_xmltarget): Delete declaration.
10169 (get_features_xml, process_serial_event): Adjust.
10170 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10172 (struct process_info) <tdesc>: New field.
10173 (ipa_tdesc): Declare.
10174 * tdesc.c: New file.
10175 * tdesc.h: New file.
10176 * tracepoint.c: Include tdesc.h.
10177 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10178 (get_context_regcache): Adjust to pass ipa_tdesc down.
10179 (do_action_at_tracepoint): Adjust to get the register cache size
10180 from the context regcache's description.
10181 (traceframe_walk_blocks): Adjust to get the register cache size
10182 from the current trace frame's description.
10183 (traceframe_get_pc): Adjust to get current trace frame's
10184 description and pass it down.
10185 (gdb_collect): Adjust to get the register cache size from the
10187 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10188 (gdbserver_xmltarget): Delete.
10189 (initialize_low_tracepoint): Set the ipa's target description.
10190 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10191 (initialize_low_tracepoint): Set the ipa's target description.
10192 * linux-x86-low.c: Include tdesc.h.
10193 [__x86_64__] (is_64bit_tdesc): New.
10194 (ps_get_thread_area, x86_get_thread_area): Use it.
10195 (i386_cannot_store_register): Rename to ...
10196 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10197 (i386_cannot_fetch_register): Rename to ...
10198 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10199 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10201 (target_regsets): Rename to ...
10202 (x86_regsets): ... this.
10203 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10205 (x86_siginfo_fixup): Use is_64bit_tdesc.
10206 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10207 (tdesc_x32_avx_linux, tdesc_x32_linux)
10208 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10210 (x86_linux_update_xmltarget): Delete.
10211 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10212 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10213 (AMD64_LINUX_USER64_CS): New.
10214 (x86_linux_read_description): New, based on
10215 x86_linux_update_xmltarget.
10216 (same_process_callback): New.
10217 (x86_arch_setup_process_callback): New.
10218 (x86_linux_update_xmltarget): New.
10219 (x86_regsets_info): New.
10220 (amd64_linux_regs_info): New.
10221 (i386_linux_usrregs_info): New.
10222 (i386_linux_regs_info): New.
10223 (x86_linux_regs_info): New.
10224 (x86_arch_setup): Reimplement.
10225 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10226 (x86_emit_ops): Ditto.
10227 (the_low_target): Adjust. Install x86_linux_regs_info,
10228 x86_cannot_fetch_register, and x86_cannot_store_register.
10229 (initialize_low_arch): New.
10230 * linux-ia64-low.c (tdesc_ia64): Declare.
10231 (ia64_fetch_register): Adjust.
10232 (ia64_usrregs_info, regs_info): New globals.
10233 (ia64_regs_info): New function.
10234 (the_low_target): Adjust.
10235 (initialize_low_arch): New function.
10236 * linux-sparc-low.c (tdesc_sparc64): Declare.
10237 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10239 (sparc_arch_setup): New function.
10240 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10241 (the_low_target): Adjust.
10242 (initialize_low_arch): New function.
10243 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10244 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10245 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10246 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10247 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10248 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10249 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10250 (tdesc_powerpc_isa205_vsx64l): Declare.
10251 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10252 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10253 (ppc_set_pc, ppc_get_hwcap): Adjust.
10254 (ppc_usrregs_info): Forward declare.
10255 (!__powerpc64__) ppc_regmap_adjusted: New global.
10256 (ppc_arch_setup): Adjust to the current process'es target
10258 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10259 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10260 (ppc_store_evrregset): Adjust.
10261 (target_regsets): Rename to ...
10262 (ppc_regsets): ... this, and make static.
10263 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10264 (ppc_regs_info): New function.
10265 (the_low_target): Adjust.
10266 (initialize_low_arch): New function.
10267 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10268 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10269 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10270 (tdesc_s390x_linux64v2): Declare.
10271 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10272 (s390_fill_gregset, s390_store_last_break): Adjust.
10273 (target_regsets): Rename to ...
10274 (s390_regsets): ... this, and make static.
10275 (s390_get_pc, s390_set_pc): Adjust.
10276 (s390_get_hwcap): New target_desc parameter, and use it.
10277 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10278 (s390_arch_setup): Adjust to set the current process'es target
10279 description. Don't adjust the regmap.
10280 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10281 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10282 (regs_info_3264): New globals.
10283 (s390_regs_info): New function.
10284 (the_low_target): Adjust.
10285 (initialize_low_arch): New function.
10286 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10287 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10288 [__mips64] (init_registers_mips_linux)
10289 (init_registers_mips_dsp_linux): Delete defines.
10290 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10291 (have_dsp): New global.
10292 (mips_read_description): New, based on mips_arch_setup.
10293 (mips_arch_setup): Reimplement.
10294 (get_usrregs_info): New function.
10295 (mips_cannot_fetch_register, mips_cannot_store_register)
10296 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10297 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10298 (target_regsets): Rename to ...
10299 (mips_regsets): ... this, and make static.
10300 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10301 (dsp_regs_info, regs_info): New globals.
10302 (mips_regs_info): New function.
10303 (the_low_target): Adjust.
10304 (initialize_low_arch): New function.
10305 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10306 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10308 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10309 (arm_read_description): New, with bits factored from
10311 (arm_arch_setup): Reimplement.
10312 (target_regsets): Rename to ...
10313 (arm_regsets): ... this, and make static.
10314 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10315 (arm_regs_info): New function.
10316 (the_low_target): Adjust.
10317 (initialize_low_arch): New function.
10318 * linux-m68k-low.c (tdesc_m68k): Declare.
10319 (target_regsets): Rename to ...
10320 (m68k_regsets): ... this, and make static.
10321 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10322 (m68k_regs_info): New function.
10323 (m68k_arch_setup): New function.
10324 (the_low_target): Adjust.
10325 (initialize_low_arch): New function.
10326 * linux-sh-low.c (tdesc_sharch): Declare.
10327 (target_regsets): Rename to ...
10328 (sh_regsets): ... this, and make static.
10329 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10330 (sh_regs_info, sh_arch_setup): New functions.
10331 (the_low_target): Adjust.
10332 (initialize_low_arch): New function.
10333 * linux-bfin-low.c (tdesc_bfin): Declare.
10334 (bfin_arch_setup): New function.
10335 (bfin_usrregs_info, regs_info): New globals.
10336 (bfin_regs_info): New function.
10337 (the_low_target): Adjust.
10338 (initialize_low_arch): New function.
10339 * linux-cris-low.c (tdesc_cris): Declare.
10340 (cris_arch_setup): New function.
10341 (cris_usrregs_info, regs_info): New globals.
10342 (cris_regs_info): New function.
10343 (the_low_target): Adjust.
10344 (initialize_low_arch): New function.
10345 * linux-cris-low.c (tdesc_crisv32): Declare.
10346 (cris_arch_setup): New function.
10347 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10348 (cris_regs_info): New function.
10349 (the_low_target): Adjust.
10350 (initialize_low_arch): New function.
10351 * linux-m32r-low.c (tdesc_m32r): Declare.
10352 (m32r_arch_setup): New function.
10353 (m32r_usrregs_info, regs_info): New globals.
10354 (m32r_regs_info): Adjust.
10355 (initialize_low_arch): New function.
10356 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10357 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10358 (tic6x_usrregs_info): Forward declare.
10359 (tic6x_read_description): New function, based on ...
10360 (tic6x_arch_setup): ... this. Reimplement.
10361 (target_regsets): Rename to ...
10362 (tic6x_regsets): ... this, and make static.
10363 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10364 (tic6x_regs_info): New function.
10365 (the_low_target): Adjust.
10366 (initialize_low_arch): New function.
10367 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10368 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10369 (target_regsets): Rename to ...
10370 (xtensa_regsets): ... this, and make static.
10371 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10373 (xtensa_arch_setup, xtensa_regs_info): New functions.
10374 (the_low_target): Adjust.
10375 (initialize_low_arch): New function.
10376 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10377 (nios2_arch_setup): Set the current process'es tdesc.
10378 (target_regsets): Rename to ...
10379 (nios2_regsets): ... this.
10380 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10381 (nios2_regs_info): New function.
10382 (the_low_target): Adjust.
10383 (initialize_low_arch): New function.
10384 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10385 (aarch64_arch_setup): Set the current process'es tdesc.
10386 (target_regsets): Rename to ...
10387 (aarch64_regsets): ... this.
10388 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10389 (aarch64_regs_info): New function.
10390 (the_low_target): Adjust.
10391 (initialize_low_arch): New function.
10392 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10394 (target_regsets): Rename to ...
10395 (tile_regsets): ... this.
10396 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10397 (tile_regs_info): New function.
10398 (tile_arch_setup): Set the current process'es tdesc.
10399 (the_low_target): Adjust.
10400 (initialize_low_arch): New function.
10401 * spu-low.c (tdesc_spu): Declare.
10402 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10403 * win32-arm-low.c (tdesc_arm): Declare.
10404 (arm_arch_setup): New function.
10405 (the_low_target): Install arm_arch_setup instead of
10406 init_registers_arm.
10407 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10408 (init_windows_x86): Rename to ...
10409 (i386_arch_setup): ... this. Set `win32_tdesc'.
10410 (the_low_target): Adjust.
10411 * win32-low.c (win32_tdesc): New global.
10412 (child_add_thread): Don't create the thread cache here.
10413 (do_initial_child_stuff): Set the new process'es tdesc.
10414 * win32-low.h (struct target_desc): Forward declare.
10415 (win32_tdesc): Declare.
10416 * lynx-i386-low.c (tdesc_i386): Declare global.
10417 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10418 * lynx-low.c (lynx_tdesc): New global.
10419 (lynx_add_process): Set the new process'es tdesc.
10420 * lynx-low.h (struct target_desc): Forward declare.
10421 (lynx_tdesc): Declare global.
10422 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10423 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10424 * nto-low.c (nto_tdesc): New global.
10425 (do_attach): Set the new process'es tdesc.
10426 * nto-low.h (struct target_desc): Forward declare.
10427 (nto_tdesc): Declare.
10428 * nto-x86-low.c (tdesc_i386): Declare.
10429 (nto_x86_arch_setup): Set `nto_tdesc'.
10431 2013-06-04 Gary Benson <gbenson@redhat.com>
10433 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10434 to qSupported response when appropriate.
10435 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10436 with nonzero-length annex.
10437 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10438 arguments supplied in annex.
10440 2013-05-31 Doug Evans <dje@google.com>
10443 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10444 64 bits in 64-cross-32 environment.
10446 2013-05-28 Pedro Alves <palves@redhat.com>
10448 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10449 (aarch64-without-fpu.c): Delete rule.
10450 * configure.srv (aarch64*-*-linux*): Remove references to
10451 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10452 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10455 2013-05-24 Pedro Alves <palves@redhat.com>
10457 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10458 instead of strchr/decode_address. Error if the range isn't split
10459 with a ','. Don't assume there's be a ':' in the action.
10461 2013-05-23 Yao Qi <yao@codesourcery.com>
10462 Pedro Alves <palves@redhat.com>
10464 * linux-low.c (lwp_in_step_range): New function.
10465 (linux_wait_1): If the thread was range stepping and stopped
10466 outside the stepping range, report the stop to GDB. Otherwise,
10467 continue stepping. Add range stepping debug output.
10468 (linux_set_resume_request): Copy the step range from the resume
10469 request to the lwp.
10470 (linux_supports_range_stepping): New.
10471 (linux_target_ops) <supports_range_stepping>: Set to
10472 linux_supports_range_stepping.
10473 * linux-low.h (struct linux_target_ops)
10474 <supports_range_stepping>: New field.
10475 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10476 * linux-x86-low.c (x86_supports_range_stepping): New.
10477 (the_low_target) <supports_range_stepping>: Set to
10478 x86_supports_range_stepping.
10479 * server.c (handle_v_cont): Handle 'r' action.
10480 (handle_v_requests): Append ";r" if the target supports range
10482 * target.h (struct thread_resume) <step_range_start,
10483 step_range_end>: New fields.
10484 (struct target_ops) <supports_range_stepping>:
10486 (target_supports_range_stepping): New macro.
10488 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10490 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10491 confusion in comment.
10493 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10495 * lynx-low.c (struct process_info_private): New type.
10496 (lynx_add_process): New function.
10497 (lynx_create_inferior, lynx_attach): Replace calls to
10498 add_process by calls to lynx_add_process.
10499 (lynx_resume): If PTID is null, then try using
10500 current_process()->private->last_wait_event_ptid.
10502 (lynx_clear_inferiors): Delete. The contents of that function
10503 has been inlined in lynx_mourn;
10504 (lynx_wait_1): Save the ptid in the process's private data.
10505 (lynx_mourn): Free the process' private data. Replace call
10506 to lynx_clear_inferiors by call to clear_inferiors.
10508 2013-05-17 Yao Qi <yao@codesourcery.com>
10510 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10513 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10515 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10516 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10517 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10518 PT_TEXT_END_ADDR guards. Update comments.
10519 (linux_target_op) <read_offsets>: Conditionally define to
10520 linux_read_offsets if the target is UCLIBC and if it defines
10521 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10523 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10524 Andrew Jenner <andrew@codesourcery.com>
10526 * Makefile.in (SFILES): Add linux-nios2-low.c.
10527 (clean): Add action to delete nios2-linux.c.
10528 (nios2-linux.c): New rule.
10529 * configure.srv: Add nios2*-*-linux*.
10530 * linux-nios2-low.c: New.
10532 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10534 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10536 2013-04-25 Hui Zhu <hui@codesourcery.com>
10539 * ax.c (ax_printf): Add fflush.
10541 2013-04-22 Tom Tromey <tromey@redhat.com>
10543 * Makefile.in (SFILES): Add filestuff.c.
10544 (OBS): Add filestuff.o.
10545 (filestuff.o): New target.
10546 * config.in, configure: Rebuild.
10547 * configure.ac: Check for fdwalk, pipe2.
10549 2013-04-17 Pedro Alves <palves@redhat.com>
10551 * configure.ac (USE_THREAD_DB): Delete variable.
10552 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10553 Don't AC_SUBST USE_THREAD_DB.
10554 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10555 * config.in, configure: Regenerate.
10557 2013-04-16 Pedro Alves <palves@redhat.com>
10559 * linux-low.h (struct lwp_info) <thread_known>: Move under
10560 the USE_THREAD_DB #ifdef.
10562 2013-04-16 Pedro Alves <palves@redhat.com>
10564 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10565 (linux-low.o): Delete rule.
10566 * linux-low.h: Always include "gdb_thread_db.h" instead of
10567 conditionally including thread_db.h.
10568 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10571 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10573 * Makefile.in (install-only): Fix make install regression.
10575 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10577 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10578 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10580 * gdbserver.1: Remove.
10582 2013-03-22 Pedro Alves <palves@redhat.com>
10584 * linux-low.c (handle_extended_wait): Don't call
10585 linux_enable_event_reporting.
10587 2013-03-15 Tony Theodore <tonyt@logyst.com>
10590 * Makefile.in (SHELL): Use @SHELL@.
10592 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10594 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10597 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10599 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10600 Remove extraneous NULL element.
10602 2013-03-13 Yao Qi <yao@codesourcery.com>
10604 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10605 'V' block in trace frame.
10607 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10609 * target.h (struct target_ops): Add btrace ops.
10610 (target_supports_btrace): New macro.
10611 (target_enable_btrace): New macro.
10612 (target_disable_btrace): New macro.
10613 (target_read_btrace): New macro.
10614 * gdbthread.h (struct thread_info): Add btrace field.
10615 * server.c: Include btrace-common.h.
10616 (handle_btrace_general_set): New function.
10617 (handle_btrace_enable): New function.
10618 (handle_btrace_disable): New function.
10619 (handle_general_set): Call handle_btrace_general_set.
10620 (handle_qxfer_btrace): New function.
10621 (struct qxfer qxfer_packets[]): Add btrace entry.
10622 * inferiors.c (remove_thread): Disable btrace.
10623 * linux-low: Include linux-btrace.h.
10624 (linux_low_enable_btrace): New function.
10625 (linux_low_read_btrace): New function.
10626 (linux_target_ops): Add btrace ops.
10627 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10628 Add srv_linux_btrace=yes.
10629 (x86_64-*-linux*): Add linux-btrace.o.
10630 Add srv_linux_btrace=yes.
10631 * configure.ac: Define HAVE_LINUX_BTRACE.
10632 * config.in: Regenerated.
10633 * configure: Regenerated.
10635 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10637 * server.c (handle_qxfer): Preserve error message if -3 is
10639 (qxfer): Document the -3 return value.
10641 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10643 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10644 (linux_btrace_h): New variable.
10645 (linux-btrace.o): New rule.
10647 2013-03-08 Stan Shebs <stan@codesourcery.com>
10648 Hafiz Abid Qadeer <abidh@codesourcery.com>
10650 * tracepoint.c (trace_buffer_size): New global.
10651 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10652 (init_trace_buffer): Change to one-argument function. Allocate
10653 trace buffer memory.
10654 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10655 handle QTBuffer:size packet.
10656 (cmd_bigqtbuffer_size): New function.
10657 (initialize_tracepoint): Call init_trace_buffer with
10658 DEFAULT_TRACE_BUFFER_SIZE.
10659 * server.c (handle_query): Add QTBuffer:size in the
10662 2013-03-07 Yao Qi <yao@codesourcery.com>
10664 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10665 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10667 (cmd_qtsp): Adjust condition. Do post increment.
10668 Set cur_action and cur_step_action back to 0.
10670 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10673 * linux-low.c (linux_write_memory): Return early success if LEN is
10676 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10678 * configure.srv: Add x86_64-*-cygwin* as target.
10680 2013-02-28 Tom Tromey <tromey@redhat.com>
10682 * configure.ac: Invoke AC_SYS_LARGEFILE.
10683 * configure, config.in: Rebuild.
10685 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10687 * win32-low.c: Throughout, fix format strings and casts of
10688 printf-like functions to avoid type related warnings on all
10690 (get_child_debug_event): Print dwDebugEventCode as hex since
10691 that's how it's usually documented.
10693 2013-02-28 Yao Qi <yao@codesourcery.com>
10695 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10698 2013-02-27 Jiong Wang <jiwang@tilera.com>
10700 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10701 (reg-tilegx32.c): New rule.
10702 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10703 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10704 different register info initializer according to elf class.
10705 (init_registers_tilgx32): New function. The tilegx32 register info
10707 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10708 (tile_store_gregset): Likewise.
10710 2013-02-27 Yao Qi <yao@codesourcery.com>
10712 * server.c (process_point_options): Print debug message when
10713 debug_threads is true.
10715 2013-02-26 Yao Qi <yao@codesourcery.com>
10717 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10719 2013-02-19 Pedro Alves <palves@redhat.com>
10720 Kai Tietz <ktietz@redhat.com>
10724 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10725 instead of strtoul to extract address from packet.
10726 (process_serial_event) <'z'>: Likewise.
10728 2013-02-18 Yao Qi <yao@codesourcery.com>
10730 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10732 2013-02-14 Pedro Alves <palves@redhat.com>
10736 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10737 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10739 2013-02-14 Pedro Alves <palves@redhat.com>
10741 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10743 2013-02-14 Pedro Alves <palves@redhat.com>
10745 * tracepoint.c (save_string): Delete.
10746 (add_tracepoint_action): Use savestring instead of save_string.
10748 2013-02-12 Pedro Alves <palves@redhat.com>
10750 * linux-xtensa-low.c: Ditto.
10751 * xtensa-xtregs.c: Ditto.
10753 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10755 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10758 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10760 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10761 aarch64_num_wp_regs and aarch64_num_bp_regs to
10762 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10764 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10766 * linux-aarch64-low.c (ps_get_thread_area): Replace
10767 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10769 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10770 Marcus Shawcroft <marcus.shawcroft@arm.com>
10771 Nigel Stephens <nigel.stephens@arm.com>
10772 Yufeng Zhang <yufeng.zhang@arm.com>
10774 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10775 (aarch64.c, aarch64-without-fpu.c): New targets.
10776 * configure.srv (aarch64*-*-linux*): New.
10777 * linux-aarch64-low.c: New file.
10779 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10781 * linux-low.c (handle_extended_wait, linux_create_inferior)
10782 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10783 (dequeue_one_deferred_signal, linux_resume_one_thread)
10784 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10785 (linux_tracefork_grandchild, linux_test_for_tracefork)
10786 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10787 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10788 where the argument is 0.
10790 2013-01-25 Yao Qi <yao@codesourcery.com>
10792 * event-loop.c: Include "queue.h".
10793 (gdb_event_p): New typedef.
10794 (struct gdb_event) <next_event>: Remove.
10795 (event_queue): Change to QUEUE(gdb_event_p).
10796 (async_queue_event): Remove.
10797 (gdb_event_xfree): New.
10798 (initialize_event_loop): New.
10799 (process_event): Use API from QUEUE.
10800 (wait_for_event): Likewise.
10801 * server.c (main): Call initialize_event_loop.
10802 * server.h (initialize_event_loop): Declare.
10804 2013-01-18 Yao Qi <yao@codesourcery.com>
10806 * ax.h (struct eval_agent_expr_context): New.
10807 (gdb_eval_agent_expr): Update declaration.
10808 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10809 TFRAME. Add new argument CTX.
10810 * server.h (struct eval_agent_expr_context): Declare.
10811 (agent_mem_read, agent_tsv_read): Update declaration.
10812 (agent_mem_read_string): Likewise.
10813 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10814 (add_traceframe_block): Add new argument TPOINT.
10815 Increase TPOINT->traceframe_usage.
10816 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10817 eval_tracepoint_agent_expr.
10818 (condition_true_at_tracepoint): Likewise.
10819 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10820 (agent_mem_read_string, agent_tsv_read): Likewise.
10822 2013-01-16 Yao Qi <yao@codesourcery.com>
10824 * linux-low.c (linux_resume_one_lwp): Don't check
10825 'lwp->bp_reinsert != 0'.
10827 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10828 Pedro Alves <palves@redhat.com>
10830 * lynx-low.c (ptrace_request_to_str): Define a temporary
10831 macro and use it to simplify this function's implementation.
10833 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10835 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10838 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10840 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10842 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10844 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10846 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10848 * lynx-low.c (lynx_resume): Use the resume_info parameter
10849 to determine the ptid for the lynx_ptrace call, unless
10850 it is equal to minus_one_ptid, in which case we use the
10851 ptid of the current_inferior.
10852 (lynx_wait_1): After having received a thread create/exit
10853 event, resume the inferior's execution using the signaling
10854 thread's ptid, rather than the old ptid.
10856 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10858 * lynx-low.c (lynx_resume): Delete variable ret.
10860 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10862 * gdbreplay.c (gdbreplay_version): Update copyright year.
10863 * server.c (gdbserver_version): Likewise.
10865 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10867 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10870 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10872 * lynx-low.c (ptrace_request_to_str): Add handling for
10873 PTRACE_GETTRACESIG.
10875 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10877 * lynx-low.c (lynx_attach): Delete variable new_process.
10879 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10881 * lynx-low.c (lynx_create_inferior): Delete variable
10884 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10886 * lynx-low.c (ptrace_request_to_str): Do not handle
10887 PTRACE_GETTHREADLIST if this macro does not exist.
10889 2012-12-15 Yao Qi <yao@codesourcery.com>
10891 * Makefile.in (OBS): Add notif.o.
10892 * notif.c, notif.h: New.
10893 * server.c: Include "notif.h".
10894 (struct vstop_notif) <next>: Remove.
10896 (queue_stop_reply): Update.
10897 (push_event, send_next_stop_reply): Remove.
10898 (discard_queued_stop_replies): Update.
10899 (notif_stop): New variable.
10900 (handle_v_stopped): Remove.
10901 (handle_v_requests): Don't call handle_v_stopped. Call
10902 handle_ack_notif instead.
10903 (queue_stop_reply_callback): Call notif_event_enque instead
10904 of queue_stop_reply.
10905 (handle_status): Don't call send_next_stop_reply, call
10906 notif_write_event instead.
10907 (kill_inferior_callback): Likewise.
10908 (detach_or_kill_inferior_callback): Likewise.
10909 (main): Call initialize_notif.
10910 (process_serial_event): Call QUEUE_is_empty.
10911 (handle_target_event): Call notif_push instead of push event.
10912 * server.h (push_event): Remove declaration.
10914 2012-12-10 Tom Tromey <tromey@redhat.com>
10916 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10917 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10920 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10921 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10922 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10923 (amd64-linux-ipa.o, ax.o): Rewrite.
10924 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10925 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10926 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10927 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10928 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10929 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10930 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10931 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10932 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10933 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10934 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10935 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10936 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10937 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10938 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10939 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10940 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10941 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10942 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10943 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10944 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10945 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10946 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10947 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10948 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10949 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10950 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10951 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10952 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10953 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10954 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10955 (reg-tilegx.o): Remove.
10956 (all_object_files): New macro.
10957 Include .deps files.
10958 * aclocal.m4, configure: Rebuild.
10959 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10960 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10961 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10963 2012-12-05 Tom Tromey <tromey@redhat.com>
10966 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10968 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10970 * configure.ac: Check for linux/perf_event.h.
10971 * config.in: Regenerated.
10972 * configure: Regenerated.
10974 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10976 * hostio.c (handle_readlink): Decrease buffer size
10977 parameter passed to readlink by one byte.
10979 2012-11-26 Yao Qi <yao@codesourcery.com>
10981 * configure.ac (build_warnings): Append '-Wempty-body'.
10982 * configure: Regenerated.
10983 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10986 2012-11-15 Pierre Muller <muller@sourceware.org>
10988 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10989 * config.in: Regenerate.
10990 * configure: Regenerate.
10991 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10992 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10993 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10994 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10996 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10997 instead of <sys/wait.h> header.
10998 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11000 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11002 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11003 (various make rules): Remove -DGDBSERVER
11005 2012-11-09 Yao Qi <yao@codesourcery.com>
11007 * spu-low.c (current_ptid): Move it to ..
11008 * gdbthread.h: ... here. New.
11009 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11010 * server.c (myresume, process_serial_event): Likewise.
11011 * thread-db.c (thread_db_find_new_threads): Likewise.
11012 * tracepoint.c (run_inferior_command): Likewise.
11014 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11016 * server.c (handle_search_memory_1): Include access length in
11019 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11021 * linux-crisv32-low.c: Fix compile errors.
11023 2012-09-04 Yao Qi <yao@codesourcery.com>
11025 * tracepoint.c (cmd_qtsv): Adjust debug message.
11026 Don't check CUR_TPOINT.
11028 2012-08-28 Yao Qi <yao@codesourcery.com>
11030 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11031 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11032 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11033 Remove declarations of xmalloc, xreallloc, xstrdup and
11035 * Makefile.in (libiberty_h): New.
11036 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11037 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11039 2012-08-23 Yao Qi <yao@codesourcery.com>
11041 * server.h: Remove declaration of 'xsnprintf'.
11043 2012-08-22 Keith Seitz <keiths@redhat.com>
11045 * server.h: Include build-gnulib-gbserver/config.h.
11046 * gdbreplay.c: Likewise.
11048 2012-08-08 Doug Evans <dje@google.com>
11050 * Makefile.in (SFILES): Add gdb_vecs.c.
11051 (OBS): Add gdb_vecs.o.
11052 (gdb_vecs_h, host_defs_h): New variables.
11053 (thread-db.o): Add $(gdb_vecs_h) dependency.
11054 (gdb_vecs.o): New rule.
11055 * thread-db.c: #include "gdb_vecs.h".
11056 (thread_db_load_search): Use a vector to iterate over path elements.
11057 Handle text appearing after "$pdir".
11059 * configure.ac: Add check for strstr.
11060 * config.in: Regenerate.
11061 * configure: Regenerate.
11063 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11065 * hostio.c (handle_pread): If pread fails, fall back to attempting
11067 (handle_pwrite): Likewise for pwrite.
11069 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11071 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11072 between unsupported TYPE and unimplementable ADDR/LEN combination.
11073 (arm_insert_point): Act on new return value.
11075 2012-07-31 Pedro Alves <palves@redhat.com>
11077 * server.c (process_point_options): Only skip tokens if we find
11078 one that is unrecognized. Don't treat 'X' specially while
11079 skipping unrecognized tokens.
11081 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11083 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11084 to 4-byte-align HW breakpoint addresses for Thumb.
11086 2012-07-27 Yao Qi <yao@codesourcery.com>
11090 * server.h: Declare gdb_agent_about_to_close.
11091 * target.c (kill_inferior): Include "agent.h".
11092 New. Send command 'kill'.
11093 * target.h (kill_inferior): Removed macro.
11094 * tracepoint.c (gdb_agent_about_to_close): New.
11095 (gdb_agent_helper_thread): Handle command 'close'.
11096 Wait endlessly until the inferior stops.
11097 Install gdb_agent_remove_socket to atexit hook.
11098 (agent_socket_name): New static variable.
11099 (gdb_agent_socket_init): Replace local variable 'name' with
11100 'agent_socket_name'.
11101 (gdb_agent_remove_socket): New.
11103 2012-07-27 Yao Qi <yao@codesourcery.com>
11105 * server.c (process_point_options): Stop at 'X' when parsing.
11107 2012-07-19 Michael Eager <eager@eagercon.com>
11109 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11111 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11112 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11113 hardware breakpoint.
11115 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11117 * gdbserver/linux-low.c (initialize_low): Call
11118 linux_ptrace_init_warnings.
11120 2012-07-02 Doug Evans <dje@google.com>
11122 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11125 2012-07-02 Stan Shebs <stan@codesourcery.com>
11127 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11128 (ax.o): Add it to build rule.
11130 (OBS): Add format.o.
11131 (IPA_OBS): Add format.o.
11132 * server.c (handle_query): Claim support for breakpoint commands.
11133 (process_point_options): Add command case.
11134 (process_serial_event): Leave running if there are printfs in
11136 * mem-break.h (any_persistent_commands): Declare.
11137 (add_breakpoint_commands): Declare.
11138 (gdb_no_commands_at_breakpoint): Declare.
11139 (run_breakpoint_commands): Declare.
11140 * mem-break.c (struct point_command_list): New struct.
11141 (struct breakpoint): New field command_list.
11142 (any_persistent_commands): New function.
11143 (add_commands_to_breakpoint): New function.
11144 (add_breakpoint_commands): New function.
11145 (gdb_no_commands_at_breakpoint): New function.
11146 (run_breakpoint_commands): New function.
11147 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11149 * ax.c: Include format.h.
11150 (ax_printf): New function.
11151 (gdb_eval_agent_expr): Add printf opcode.
11153 2012-06-13 Yao Qi <yao@codesourcery.com>
11155 * server.c (start_inferior): Remove duplicated writes to fields
11156 'last_resume_kind' and 'last_status' of 'current_inferior'.
11158 2012-06-12 Yao Qi <yao@codesourcery.com>
11159 Pedro Alves <palves@redhat.com>
11161 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11163 * server.c (handle_v_cont): Extend comment.
11165 2012-06-11 Yao Qi <yao@codesourcery.com>
11167 * linux-low.c (linux_attach): Add 'static'.
11169 2012-06-06 Yao Qi <yao@codesourcery.com>
11171 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11173 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11175 Fix gcc -flto compilation warning.
11176 * server.c (main): Make variable multi_mode and attach volatile.
11178 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11180 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11181 if the platform doesn't know about it.
11183 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11185 * Makefile.in (SFILES): Add linux-tile-low.c.
11186 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11187 * configure.srv: Handle tilegx-*-linux*.
11188 * linux-tile-low.c: New file.
11190 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11192 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11194 2012-05-24 Pedro Alves <palves@redhat.com>
11198 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11200 2012-05-24 Pedro Alves <palves@redhat.com>
11204 Replace target_signal with gdb_signal throughout.
11206 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11208 * linux-low.c (linux_store_registers): Avoid the copying sequence
11209 when no data has been retrieved by ptrace.
11211 2012-05-22 Will Deacon <will.deacon@arm.com>
11213 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11214 Include asm/ptrace.h.
11215 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11218 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11220 * linux-low.c (linux_store_registers): Don't re-retrieve data
11221 with ptrace that has already been obtained from /proc. Always
11222 copy any data retrieved with ptrace to the buffer supplied.
11224 2012-05-11 Yao Qi <yao@codesourcery.com>
11225 Pedro Alves <palves@redhat.com>
11227 * linux-low.c (enum stopping_threads_kind): New.
11228 (stopping_threads): Change type to `enum stopping_threads_kind'.
11229 (handle_extended_wait): If stopping and suspending threads, leave
11230 the new_lwp suspended too.
11231 (linux_wait_for_event): Adjust.
11232 (stop_all_lwps): Set `stopping_threads' to
11233 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11234 whether we're suspending threads or just stopping them. Assert no
11237 2012-04-29 Yao Qi <yao@codesourcery.com>
11239 * server.h: Move some code to ...
11240 * gdbthread.h: ... here. New.
11241 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11242 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11243 (nto-low.o, win32-low.o): Likewise.
11244 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11245 * regcache.c, remote-utils.c, server.c: Likewise.
11246 * target.c, tracepoint.c, win32-low.c: Likewise.
11248 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11250 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11251 (PTRACE_ARG4_TYPE): Likewise.
11252 (PTRACE_XFER_TYPE): Likewise.
11253 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11254 ptrace to PTRACE_ARG3_TYPE.
11255 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11256 (PTRACE_ARG4_TYPE): Likewise.
11257 (PTRACE_XFER_TYPE): Likewise.
11258 (linux_detach_one_lwp): Cast fourth argument of
11259 ptrace to long then PTRACE_ARG4_TYPE.
11260 (regsets_fetch_inferior_registers): Cast third argument of
11261 ptrace to long then PTRACE_ARG3_TYPE.
11262 (regsets_store_inferior_registers): Likewise.
11264 2012-04-20 Pedro Alves <palves@redhat.com>
11266 * configure: Regenerate.
11268 2012-04-19 Pedro Alves <palves@redhat.com>
11270 * Makefile.in (GNULIB_BUILDDIR): New.
11271 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11272 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11273 (all, install-only, uninstall, clean-info, all-lib, clean): No
11274 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11275 (maintainer-clean realclean distclean): Use subdir_do.
11277 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11278 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11279 * acinclude.m4: Include acx_configure_dir.m4.
11280 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11281 calls. Call AC_PROG_RANLIB. Configure gnulib using
11284 (GNULIB_STDINT_H): Adjust.
11285 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11286 * gdbreplay.c: Include build-gnulib/config.h.
11287 * server.h: Likewise.
11288 * aclocal.m4: Regenerate.
11289 * config.in: Regenerate.
11290 * configure: Regenerate.
11292 2012-04-19 Pedro Alves <palves@redhat.com>
11294 * Makefile.in (LIBGNU, INCGNU): Adjust.
11295 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11296 (all, install-only, uninstall, clean-info, all-lib, clean)
11297 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11298 * configure.ac: Adjust AC_OUTPUT output.
11299 * aclocal.m4: Regenerate.
11300 * configure: Regenerate.
11302 2012-04-19 Pedro Alves <palves@redhat.com>
11304 * Makefile.in (generated_files): New.
11305 (server_h): Remove the explicit dependency on config.h, and depend
11306 on $generated_files.
11308 2012-04-19 Pedro Alves <palves@redhat.com>
11310 * Makefile.in (INCGNU): Add -Ignulib.
11312 2012-04-19 Pedro Alves <palves@redhat.com>
11314 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11315 (INCGNU): ... this, and spell out -I here.
11316 (GNULIB_LIB): Rename to ...
11317 (LIBGNU): ... this.
11318 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11320 2012-04-19 Pedro Alves <palves@redhat.com>
11322 * config.in: Regenerate.
11324 2012-04-19 Pedro Alves <palves@redhat.com>
11326 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11327 * server.h (memmem): Remove declaration.
11328 * config.in: Regenerate.
11329 * configure: Regenerate.
11331 2012-04-19 Yao Qi <yao@codesourcery.com>
11333 * Makefile.in (SFILES): Add common/vec.c.
11337 2012-04-19 Yao Qi <yao@codesourcery.com>
11339 * remote-utils.c (prepare_resume_reply): Replace with macro
11340 target_core_of_thread.
11341 * server.c (handle_qxfer_threads_proper): Likewise.
11342 * target.h (traget_core_of_thread): New macro.
11344 2012-04-18 Pedro Alves <palves@redhat.com>
11346 * aclocal.m4: Regenerate.
11347 * configure: Regenerate.
11349 2012-04-16 Yao Qi <yao@codesourcery.com>
11351 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11352 duplicated on address.
11354 2012-04-16 Yao Qi <yao@codesourcery.com>
11356 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11357 (struct tracepoint_action_ops) <send>: New field.
11358 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11359 (agent_expr_send, x_tracepoint_action_send): New.
11360 (l_tracepoint_action_send): New.
11361 (cmd_qtdp): Download and install tracepoint
11362 according to `use_agent'.
11363 (run_inferior_command): Add one more parameter `len'.
11365 (tracepoint_send_agent): New.
11366 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11368 2012-04-16 Yao Qi <yao@codesourcery.com>
11370 * tracepoint.c (download_tracepoints): Moved to ...
11371 (cmd_qtstart): ... here.
11373 2012-04-14 Yao Qi <yao@codesourcery.com>
11375 * tracepoint.c: Include inttypes.h.
11376 (struct collect_memory_action): Use sized types.
11377 (struct tracepoint): Likewise.
11378 (cmd_qtdp, stop_tracing): Update print specifiers.
11379 (cmd_qtp, response_tracepoint): Likewise.
11380 (collect_data_at_tracepoint): Likewise.
11381 (collect_data_at_step): Likewise.
11383 2012-04-14 Yao Qi <yao@codesourcery.com>
11385 Import gnulib module inttypes.
11386 * aclocal.m4, config.in, configure: Regenerated.
11388 2012-04-14 Yao Qi <yao@codesourcery.com>
11390 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11391 Makefile and config.status at last.
11393 2012-04-13 Yao Qi <yao@codesourcery.com>
11395 * tracepoint.c: Include stdint.h unconditionally.
11397 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11399 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11400 on BFD_HAVE_SYS_PROCFS_TYPE.
11401 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11402 * configure: Regenerate.
11403 * config.in: Likewise.
11405 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11407 * Makefile.in (clean): Also remove x32.c x32-linux.c
11408 x32-avx.c x32-avx-linux.c.
11409 (x32.o): New target.
11411 (x32-linux.o): Likewise.
11412 (x32-linux.c): Likewise.
11413 (x32-avx.o): Likewise.
11414 (x32-avx.c): Likewise.
11415 (x32-avx-linux.o): Likewise.
11416 (x32-avx-linux.c): Likewise.
11418 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11419 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11420 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11421 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11422 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11423 i386/x32-avx-linux.xml.
11425 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11426 (init_registers_x32_avx_linux): Likwise.
11427 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11428 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11430 2012-04-13 Pedro Alves <palves@redhat.com>
11432 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11433 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11434 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11435 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11438 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11440 * linux-x86-low.c (compat_x32_clock_t): New.
11441 (compat_x32_siginfo_t): Likewise.
11442 (compat_x32_siginfo_from_siginfo): Likewise.
11443 (siginfo_from_compat_x32_siginfo): Likewise.
11444 (linux_is_elf64): Likewise.
11445 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11446 and siginfo_from_compat_x32_siginfo for x32.
11447 (x86_arch_setup): Set linux_is_elf64.
11449 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11452 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11454 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11455 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11456 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11457 compatible with process.
11459 2012-04-12 Yao Qi <yao@codesourcery.com>
11461 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11462 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11463 (install-only, install-info, clean): Handle sub dir gnulib.
11464 (all-lib, am--refresh): New targets.
11465 (memmem.o): Remove target.
11466 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11467 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11468 (AC_REPLACE_FUNCS): Remove memmem.
11469 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11470 (AC_OUTPUT): Generate Makefile in gnulib/.
11471 * aclocal.m4, config.in, configure: Regenerated.
11473 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11475 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11477 2012-04-05 Pedro Alves <palves@redhat.com>
11479 -Werror=strict-aliasing
11481 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11484 2012-04-04 Pedro Alves <palves@redhat.com>
11486 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11487 (sparc_store_gregset_from_stack, sparc_store_gregset)
11488 (sparc_breakpoint_at): Fix formatting.
11490 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11492 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11494 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11495 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11496 * config.in: Regenerate.
11497 * configure: Likewise.
11499 2012-03-29 Pedro Alves <palves@redhat.com>
11501 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11502 Correct ptrace arguments.
11504 2012-03-28 Pedro Alves <palves@redhat.com>
11506 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11507 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11508 (IA64_FR1_REGNUM): New defines.
11509 (ia64_fetch_register): New.
11510 (the_low_target): Install it.
11511 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11513 * linux-low.c (linux_fetch_registers): Try the
11514 the_low_target.fetch_register hook first.
11516 * linux-arm-low.c (the_low_target): Adjust.
11517 * linux-bfin-low.c (the_low_target): Adjust.
11518 * linux-cris-low.c (the_low_target): Adjust.
11519 * linux-crisv32-low.c (the_low_target): Adjust.
11520 * linux-m32r-low.c (the_low_target): Adjust.
11521 * linux-m68k-low.c (the_low_target): Adjust.
11522 * linux-mips-low.c (the_low_target): Adjust.
11523 * linux-ppc-low.c (the_low_target): Adjust.
11524 * linux-s390-low.c (the_low_target): Adjust.
11525 * linux-sh-low.c (the_low_target): Adjust.
11526 * linux-sparc-low.c (the_low_target): Adjust.
11527 * linux-tic6x-low.c (the_low_target): Adjust.
11528 * linux-x86-low.c (the_low_target): Adjust.
11529 * linux-xtensa-low.c (the_low_target): Adjust.
11531 2012-03-26 Pedro Alves <palves@redhat.com>
11533 * server.c (handle_qxfer_libraries): Don't bail early if
11534 the_target->qxfer_libraries_svr4 is not NULL.
11536 2012-03-26 Pedro Alves <palves@redhat.com>
11538 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11540 2012-03-23 Pedro Alves <palves@redhat.com>
11542 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11543 "library-list-svr4" element's start tag when the the DSO list is
11546 2012-03-23 Pedro Alves <palves@redhat.com>
11548 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11549 a variable whose type size is the same as the inferior's pointer
11552 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11554 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11556 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11557 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11558 * linux-low.h: Include <signal.h>.
11559 (struct siginfo): Remove forward declaration.
11560 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11563 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11565 * .gitignore: Ignore more files.
11567 2012-03-19 Pedro Alves <palves@redhat.com>
11568 Jan Kratochvil <jan.kratochvil@redhat.com>
11570 * server.c (cont_thread, general_thread): Add describing comments.
11571 (start_inferior): Clear `cont_thread'.
11572 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11575 2012-03-15 Yao Qi <yao@codesourcery.com>
11577 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11579 (cmd_qtdp): ... here.
11581 2012-03-15 Yao Qi <yao@codesourcery.com>
11583 * tracepoint.c (struct tracepoint_action_ops): New.
11584 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11585 (m_tracepoint_action_download): New.
11586 (r_tracepoint_action_download): New.
11587 (x_tracepoint_action_download): New.
11588 (l_tracepoint_action_download): New.
11589 (add_tracepoint_action): Install `action->ops' according type.
11590 (download_tracepoint_1): Move code `download' function pointer
11591 of various tracepoint_action_ops.
11593 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11595 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11596 linux_ptrace_attach_warnings.
11598 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11600 * Makefile.in (linux-ptrace.o): New.
11601 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11602 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11603 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11604 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11605 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11607 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11609 2012-03-08 Yao Qi <yao@codesourcery.com>
11610 Pedro Alves <palves@redhat.com>
11612 Fix PR server/13392.
11613 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11614 offset of JMP insn.
11615 * tracepoint.c (remove_tracepoint): New.
11616 (cmd_qtdp): Call remove_tracepoint when failed to install.
11618 2012-03-07 Pedro Alves <palves@redhat.com>
11620 * linux-low.c (get_detach_signal): New.
11621 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11622 Pass on pending signals to PTRACE_DETACH. Check the result of the
11624 * server.c (program_signals, program_signals_p): New.
11625 (handle_general_set): Handle QProgramSignals.
11626 * server.h (program_signals, program_signals_p): Declare.
11628 2012-03-05 Pedro Alves <palves@redhat.com>
11629 Jan Kratochvil <jan.kratochvil@redhat.com>
11631 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11634 2012-03-03 Yao Qi <yao@codesourcery.com>
11636 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11637 agent_look_up_symbols.
11639 2012-03-03 Yao Qi <yao@codesourcery.com>
11641 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11642 (linux-x86-low.o): Likewise.
11643 * server.h: Remove in_process_agent_loaded.
11644 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11648 2012-03-03 Yao Qi <yao@codesourcery.com>
11650 * tracepoint.c (gdb_agent_capability): New global.
11651 (in_process_agent_loaded_ust): Renamed to
11652 `in_process_agent_supports_ust'.
11654 (in_process_agent_supports_ust): Call agent_capability_check.
11655 (clear_installed_tracepoints): Assert that agent supports
11658 2012-03-03 Yao Qi <yao@codesourcery.com>
11660 * linux-low.c (linux_supports_agent): New.
11661 (linux_target_ops): Initialize field `supports_agent' with
11662 linux_supports_agent.
11663 * target.h (struct target_ops) <supports_agent>: New.
11664 (target_supports_agent): New macro.
11665 * server.c (handle_general_set): Handle packet 'QAgent'.
11666 (handle_query): Send `QAgent+'.
11667 * Makefile.in (server.o): Depends on agent.h.
11669 2012-03-03 Yao Qi <yao@codesourcery.com>
11671 * Makefile.in (OBS): Add agent.o.
11672 Add new rule for agent.o.
11673 Track dependence of tracepoint.c on agent.h.
11674 * tracepoint.c (run_inferior_command_1):
11675 (run_inferior_command): Call agent_run_command.
11676 (gdb_ust_connect_sync_socket): Deleted. Move it to
11678 (resume_thread, stop_thread): Likewise.
11679 (gdb_ust_socket_init): Renamed to ...
11680 (gdb_agent_socket_init): ... New.
11681 (gdb_ust_thread): Renamed to ...
11682 (gdb_agent_helper_thread): ... New.
11683 (gdb_ust_init): Move some code to ...
11684 (gdb_agent_init): ... here. New.
11685 [HAVE_UST]: Call gdb_ust_init.
11686 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11687 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11688 * config.in, configure: Regenerated.
11690 2012-03-02 Pedro Alves <palves@redhat.com>
11692 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11693 * linux-low.c (struct simple_pid_list): New.
11694 (stopped_pids): New a struct simple_pid_list pointer.
11695 (add_to_pid_list, pull_pid_from_list): New.
11696 (handle_extended_wait): Don't assume the first signal new children
11697 report is SIGSTOP. Adjust call to pull_pid_from_list.
11698 (linux_wait_for_lwp): Adjust.
11700 2012-03-02 Yao Qi <yao@codesourcery.com>
11702 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11705 2012-03-02 Yao Qi <yao@codesourcery.com>
11707 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11708 `stop_pc' and `tpoint'. Update caller.
11710 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11712 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11713 * linux-low.c (use_linux_regsets): New macro.
11714 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11715 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11716 (linux_register_in_regsets): New function.
11717 (usr_fetch_inferior_registers): Skip registers covered by
11719 (usr_store_inferior_registers): Likewise.
11720 (usr_fetch_inferior_registers): New macro.
11721 (usr_store_inferior_registers): Likewise.
11722 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11723 (linux_store_registers): Likewise.
11724 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11726 (init_registers_mips64_dsp_linux): Likewise.
11727 (init_registers_mips_linux): New macro.
11728 (init_registers_mips_dsp_linux): Likewise.
11729 (mips_dsp_num_regs): Likewise.
11730 (DSP_BASE, DSP_CONTROL): New fallback macros.
11731 (mips_base_regs): New macro.
11732 (mips_regmap): Use it. Fix the size.
11733 (mips_dsp_regmap): New variable.
11734 (mips_dsp_regset_bitmap): Likewise.
11735 (mips_arch_setup): New function.
11736 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11738 (mips_cannot_store_register): Likewise.
11739 (the_low_target): Update .arch_setup, .num_regs and .regmap
11740 initializers. Add .regset_bitmap initializer.
11741 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11743 * linux-bfin-low.c (the_low_target): Likewise.
11744 * linux-cris-low.c (the_low_target): Likewise.
11745 * linux-crisv32-low.c (the_low_target): Likewise.
11746 * linux-ia64-low.c (the_low_target): Likewise.
11747 * linux-m32r-low.c (the_low_target): Likewise.
11748 * linux-m68k-low.c (the_low_target): Likewise.
11749 * linux-ppc-low.c (the_low_target): Likewise.
11750 * linux-s390-low.c (the_low_target): Likewise.
11751 * linux-sh-low.c (the_low_target): Likewise.
11752 * linux-sparc-low.c (the_low_target): Likewise.
11753 * linux-tic6x-low.c (the_low_target): Likewise.
11754 * linux-x86-low.c (the_low_target): Likewise.
11755 * linux-xtensa-low.c (the_low_target): Likewise.
11756 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11757 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11758 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11760 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11761 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11763 2012-02-29 Yao Qi <yao@codesourcery.com>
11764 Pedro Alves <palves@redhat.com>
11766 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11767 `step_over_finished' is true.
11769 2012-02-27 Pedro Alves <palves@redhat.com>
11771 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11772 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11774 2012-02-27 Pedro Alves <palves@redhat.com>
11777 * linux-low.c (pid_is_stopped): New.
11778 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11780 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11782 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11785 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11787 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11789 2012-02-24 Luis Machado <lgustavo@codesourcery>
11791 * server.c (handle_query): Advertise support for target-side
11792 breakpoint condition evaluation.
11793 (process_point_options): New function.
11794 (process_serial_event): When inserting a breakpoint, check for
11795 a target-side condition that should be evaluated.
11797 * mem-break.c: Include regcache.h and ax.h.
11798 (point_cond_list_t): New data structure.
11799 (breakpoint) <cond_list>: New field.
11800 (find_gdb_breakpoint_at): Make non-static.
11801 (delete_gdb_breakpoint_at): Clear any target-side
11803 (clear_gdb_breakpoint_conditions): New function.
11804 (add_condition_to_breakpoint): Likewise.
11805 (add_breakpoint_condition): Likewise.
11806 (gdb_condition_true_at_breakpoint): Likewise.
11807 (gdb_breakpoint_here): Return result directly instead
11808 of going through a local variable.
11810 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11811 (clear_gdb_breakpoint_conditions): Likewise.
11812 (add_breakpoint_condition): Likewise.
11813 (gdb_condition_true_at_breakpoint): Likewise.
11815 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11816 (need_step_over_p): Take target-side breakpoint condition into
11819 2012-02-24 Luis Machado <lgustavo@codesourcery>
11821 * server.h: Include tracepoint.h.
11822 (agent_mem_read, agent_get_trace_state_variable_value,
11823 agent_set_trace_state_variable_value,
11824 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11825 get_set_tsv_func_addr): New prototypes.
11827 * ax.h: New include file.
11828 * ax.c: New source file.
11830 * tracepoint.c: Include ax.h.
11831 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11832 agent_expr, eval_result_type): Move to ax.h.
11833 (parse_agent_expr): Rename to ...
11834 (gdb_parse_agent_expr): ... this, make it non-static and move
11836 (unparse_agent_expr) Rename to ...
11837 (gdb_unparse_agent_expr): ... this, make it non-static and move
11839 (eval_agent_expr): Rename to ...
11840 (eval_tracepoint_agent_expr): ... this.
11841 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11842 forward declarations.
11843 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11844 (agent_get_trace_state_variable_value): New function.
11845 (agent_set_trace_state_variable_value): New function.
11846 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11847 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11848 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11849 (condition_true_at_tracepoint): Likewise.
11850 (parse_agent_expr): Rename to ...
11851 (gdb_parse_agent_expr): ... this and move to ax.c.
11852 (unparse_agent_expr): Rename to ...
11853 (gdb_unparse_agent_expr): ... this and move to ax.c.
11854 (gdb_agent_op_name): Move to ax.c.
11855 (eval_agent_expr): Rename to ...
11856 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11858 (eval_tracepoint_agent_expr): New function.
11859 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11861 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11863 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11864 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11865 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11866 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11867 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11868 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11869 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11870 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11871 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11872 (compile_bytecodes): Remove forward declaration.
11873 (is_goto_target): Move to ax.c.
11874 (compile_bytecodes): Move to ax.c and call
11875 agent_get_trace_state_variable_value (...) and
11876 agent_set_trace_state_variable_value (...).
11878 * Makefile.in: Update ax.c and IPA dependencies.
11880 2012-02-24 Pedro Alves <palves@redhat.com>
11882 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11883 (cmd_bigqtbuffer_circular): ... this. Only handle
11884 'QTBuffer:circular:'.
11885 (handle_tracepoint_general_set): Adjust.
11887 2012-02-16 Yao Qi <yao@codesourcery.com>
11889 * inferiors.c: Move code to ...
11890 * dll.c: .... here. New.
11891 * server.h: Declare clear_dlls.
11892 * Makefile.in (SFILES): Add dll.c.
11896 2012-02-11 Yao Qi <yao@codesourcery.com>
11898 * server.c: (handle_monitor_command): Add a new parameter
11900 (handle_query): Update caller.
11902 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11904 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11905 * configure, config.in: Regenerate.
11906 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11909 2012-02-02 Pedro Alves <palves@redhat.com>
11911 Try SIGKILL first, then PTRACE_KILL.
11912 * linux-low.c (linux_kill_one_lwp): New.
11913 (linux_kill_one_lwp): Rename to ...
11914 (kill_one_lwp_callback): ... this. Use the new
11915 linux_kill_one_lwp.
11917 2012-02-02 Pedro Alves <palves@redhat.com>
11919 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11922 2012-01-27 Pedro Alves <palves@redhat.com>
11924 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11925 (elf_64_file_p): Make static.
11926 (linux_pid_exe_is_elf_64_file): New.
11927 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11928 Delete declarations.
11929 (linux_pid_exe_is_elf_64_file): Declare.
11930 * linux-x86-low.c (x86_arch_setup): Use
11931 linux_pid_exe_is_elf_64_file.
11933 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11935 * linux-low.c (linux_wait_for_event_1): Rename to ...
11936 (linux_wait_for_event): ... here and merge it with former
11937 linux_wait_for_event - new variable wait_ptid, use it.
11938 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11940 2012-01-23 Pedro Alves <palves@redhat.com>
11942 * server.c (main): Avoid yet another case of infinite loop while
11943 detaching/killing after a longjmp.
11945 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11948 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11950 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11952 * hostio.c (handle_readlink): New function.
11953 (handle_vFile): Call it to handle "vFile:readlink" packets.
11955 2012-01-20 Pedro Alves <palves@redhat.com>
11956 Ulrich Weigand <ulrich.weigand@linaro.org>
11958 * server.c (handle_v_requests): Only support vAttach and vRun to
11959 start multiple processes when in extended protocol mode.
11961 2012-01-17 Pedro Alves <palves@redhat.com>
11963 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11964 memalign plus mprotect to allocate the scratch buffer.
11966 2012-01-13 Pedro Alves <palves@redhat.com>
11968 * server.c (attach_inferior): Clear `cont_thread'.
11970 2012-01-13 Pedro Alves <palves@redhat.com>
11972 * server.c (main): Avoid infinite loop while detaching/killing
11975 2012-01-09 Doug Evans <dje@google.com>
11977 * server.c (start_inferior): Set last_ptid in --wrapper case.
11979 2012-01-06 Yao Qi <yao@codesourcery.com>
11981 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11983 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11985 2012-01-04 Yao Qi <yao@codesourcery.com>
11987 * tracepoint.c (cmd_qtdp): Print debug message
11988 for static tracepoint.
11990 2012-01-04 Yao Qi <yao@codesourcery.com>
11992 * tracepoint.c (trace_vdebug): Differentiate debug message
11993 between gdbserver and IPA.
11995 2012-01-03 Yao Qi <yao@codesourcery.com>
11997 * tracepoint.c (tracepoint_was_hit): Don't collect for
12000 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12002 * terminal.h: Reformat copyright header.
12004 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12006 * server.c (gdbserver_version): Update copyright year.
12007 * gdbreplay.c (gdbreplay_version): Likewise.
12009 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12011 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12014 2011-12-18 Hui Zhu <teawater@gmail.com>
12015 * linux-low.c (linux_create_inferior): Save return value to ret.
12017 2011-12-18 Hui Zhu <teawater@gmail.com>
12019 * linux-low.c (linux_create_inferior): Save return value to ret.
12021 2011-12-16 Doug Evans <dje@google.com>
12023 * linux-low.c (linux_create_inferior): If stdio connection,
12024 redirect stdin from /dev/null, stdout to stderr.
12025 * remote-utils.c (remote_is_stdio): New static global.
12026 (remote_connection_is_stdio): New function.
12027 (remote_prepare): Handle stdio connection.
12028 (remote_open): Ditto.
12029 (remote_close): Don't close stdin for stdio connections.
12030 (read_prim,write_prim): New functions. Replace all calls to
12031 read/write to these.
12032 * server.c (main): Watch for "-" argument. Move call to
12033 remote_prepare before start_inferior.
12034 * server.h (STDIO_CONNECTION_NAME): New macro.
12035 (remote_connection_is_stdio): Declare.
12037 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12038 in debugging output.
12040 2011-12-15 Yao Qi <yao@codesourcery.com>
12042 * tracepoint.c: Include sys/syscall.h.
12043 (gdb_ust_thread): Remove preprocessor conditional.
12045 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12047 * linux-low.c (linux_detach_one_lwp): Call
12048 the_low_target.prepare_to_resume before detaching.
12050 2011-12-14 Yao Qi <yao@codesourcery.com>
12052 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12055 2011-12-14 Yao Qi <yao@codesourcery.com>
12057 * i386-low.c (i386_low_stopped_data_address): Initialize local
12058 variable `control'.
12060 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12064 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12065 DR_CONTROL unless necessary. Extend comments.
12066 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12067 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12069 2011-12-13 Yao Qi <yao@codesourcery.com>
12071 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12073 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12075 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12077 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12078 Print new debug message for such case.
12080 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12082 Fix overlapping memcpy.
12083 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12084 the read_inferior_memory transfer.
12085 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12086 write_inferior_memory transfer.
12087 (set_fast_tracepoint_jump): New variable buf. Use it for the
12088 read_inferior_memory and write_inferior_memory transfers.
12089 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12090 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12091 Use it for the write_inferior_memory transfer.
12092 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12095 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12097 * linux-low.c (fetch_register, store_register): Make code
12098 consistent, fix formatting.
12100 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12102 * linux-low.c (usr_store_inferior_registers): Factor out code
12103 to handle individual registers into...
12104 (store_register): ... this new function.
12106 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12108 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12109 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12110 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12111 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12112 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12113 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12114 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12115 (srv_xmlfiles): Add new XML files.
12117 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12119 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12120 (init_registers_s390_linux32v1): Add prototype.
12121 (init_registers_s390_linux32v2): Likewise.
12122 (init_registers_s390_linux64v1): Likewise.
12123 (init_registers_s390_linux64v2): Likewise.
12124 (init_registers_s390x_linux64v1): Likewise.
12125 (init_registers_s390x_linux64v2): Likewise.
12126 (s390_num_regs): Increment to 52.
12127 (s390_regmap): Add orig_r2 register.
12128 (s390_num_regs_3264): Increment to 68.
12129 (s390_regmap_3264): Add orig_r2 register.
12130 (s390_collect_ptrace_register): Handle orig_r2 register.
12131 (s390_supply_ptrace_register): Likewise.
12132 (s390_fill_last_break): New function.
12133 (s390_store_last_break): Likewise.
12134 (s390_fill_system_call): New function.
12135 (s390_store_system_call): Likewise.
12136 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12138 (s390_check_regset): New function.
12139 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12140 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12141 Update target_regsets for available register sets.
12143 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12144 Jan Kratochvil <jan.kratochvil@redhat.com>
12146 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12147 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12149 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12150 * linux-low.h (struct process_info_private): New member r_debug.
12151 * server.c (handle_qxfer_libraries): Call
12152 the_target->qxfer_libraries_svr4.
12153 (handle_qxfer_libraries_svr4): New function.
12154 (qxfer_packets): New entry "libraries-svr4".
12155 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12156 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12157 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12158 PACKET_qXfer_libraries_svr4.
12160 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12162 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12163 PSW address/mask between 8-byte and 16-byte formats.
12164 (s390_supply_ptrace_register): Likewise.
12165 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12166 basic addressing mode bit.
12168 2011-11-24 Stan Shebs <stan@codesourcery.com>
12170 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12172 2011-11-17 Stan Shebs <stan@codesourcery.com>
12174 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12175 (tracing_start_time): New global.
12176 (tracing_stop_time): New global.
12177 (tracing_user_name): New global.
12178 (tracing_notes): New global.
12179 (tracing_stop_note): New global.
12180 (cmd_qtstart): Set traceframe_usage, start_time.
12181 (stop_tracing): Set stop_time.
12182 (cmd_qtstatus): Report additional status.
12183 (cmd_qtp): New function.
12184 (handle_tracepoint_query): Call it.
12185 (cmd_qtnotes): New function.
12186 (handle_tracepoint_general_set): Call it.
12187 (get_timestamp): Rename from tsv_get_timestamp.
12189 2011-11-14 Stan Shebs <stan@codesourcery.com>
12190 Kwok Cheung Yeung <kcy@codesourcery.com>
12192 * linux-x86-low.c (small_jump_insn): New.
12193 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12194 trampoline and error message, build a trampoline and issue a small
12195 jump instruction to it.
12196 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12197 trampoline and error message.
12198 (x86_get_min_fast_tracepoint_insn_len): New.
12199 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12200 * linux-low.h (struct linux_target_ops): Add arguments to
12201 install_fast_tracepoint_jump_pad operation, add new operation.
12202 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12204 (linux_get_min_fast_tracepoint_insn_len): New function.
12205 (linux_target_op): Add new operation.
12206 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12207 (gdb_trampoline_buffer_end): Ditto.
12208 (gdb_trampoline_buffer_error): Ditto.
12209 (struct ipa_sym_addresses): Add fields for new IPA variables.
12210 (symbol_list): Add entries for new IPA variables.
12211 (struct tracepoint): Add fields to hold the address range of the
12212 trampoline used by the tracepoint.
12213 (trampoline_buffer_head): New static variable.
12214 (trampoline_buffer_tail): Ditto.
12215 (claim_trampoline_space): New function.
12216 (have_fast_tracepoint_trampoline_buffer): New function.
12217 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12219 (install_fast_tracepoint): Ditto, also add error buffer argument.
12220 (cmd_qtminftpilen): New function.
12221 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12222 (fast_tracepoint_from_trampoline_address): New function.
12223 (fast_tracepoint_collecting): Handle trampoline as part of jump
12225 (set_trampoline_buffer_space): New function.
12226 (initialize_tracepoint): Initialize new IPA variables.
12227 * target.h (struct target_ops): Add arguments to
12228 install_fast_tracepoint_jump_pad operation, add new
12229 get_min_fast_tracepoint_insn_len operation.
12230 (target_get_min_fast_tracepoint_insn_len): New.
12231 (install_fast_tracepoint_jump_pad): Add arguments.
12232 * server.h (IPA_BUFSIZ): Define.
12233 * linux-i386-ipa.c: Include extra header files.
12234 (initialize_fast_tracepoint_trampoline_buffer): New function.
12235 (initialize_low_tracepoint): Call it.
12236 * server.h (set_trampoline_buffer_space): Declare.
12237 (claim_trampoline_space): Ditto.
12238 (have_fast_tracepoint_trampoline_buffer): Ditto.
12240 2011-11-14 Yao Qi <yao@codesourcery.com>
12242 * server.c (handle_query): Handle InstallInTrace for qSupported.
12243 * tracepoint.c (add_tracepoint): Sort list.
12244 (install_tracepoint, download_tracepoint): New.
12245 (cmd_qtdp): Call them to install and download tracepoints.
12246 (sort_tracepoints): Removed.
12247 (cmd_qtstart): Update.
12249 2011-11-14 Yao Qi <yao@codesourcery.com>
12251 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12252 * mem-break.h: Declare.
12253 * tracepoint.c (cmd_qtstart): Move some code to ...
12254 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12256 (download_tracepoints): Move some code to ...
12257 (download_tracepoint_1): ... here. New.
12259 2011-11-08 Yao Qi <yao@codesourcery.com>
12261 * remote-utils.c (relocate_instruction): A comment fix.
12263 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12265 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12266 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12267 dr_status_mirror and dr_control_mirror from debug_reg_state.
12268 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12269 (i386_initial_stuff): Remove use of deleted globals.
12270 (i386_get_thread_context, i386_set_thread_context,
12271 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12272 from debug_reg_state.
12274 2011-11-05 Yao Qi <yao@codesourcery.com>
12276 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12277 address as TPOINT's.
12279 2011-11-02 Stan Shebs <stan@codesourcery.com>
12281 * tracepoint.c (agent_mem_read_string): New function.
12282 (eval_agent_expr): Call it for tracenz.
12283 * server.c (handle_query): Report support for tracenz.
12285 2011-11-02 Yao Qi <yao@codesourcery.com>
12287 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12289 2011-11-02 Yao Qi <yao@codesourcery.com>
12291 * target.h: Fix a typo in comment.
12293 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12295 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12296 clobber the breakpoints' shadows with fast tracepoint jumps.
12297 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12298 * target.c (write_inferior_memory): Also pass MYADDR down to
12301 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12303 * configure.ac: Check support for personality routine.
12304 * configure: Regenerate.
12305 * config.in: Likewise.
12306 * linux-low.c: Include <sys/personality.h>.
12307 Define ADDR_NO_RANDOMIZE if necessary.
12308 (linux_create_inferior): Disable address space randomization when
12309 forking inferior, if requested.
12310 (linux_supports_disable_randomization): New function.
12311 (linux_target_ops): Install it.
12312 * server.h (disable_randomization): Declare.
12313 * server.c (disable_randomization): New global variable.
12314 (handle_general_set): Handle QDisableRandomization.
12315 (handle_query): Likewise for qSupported.
12316 (main): Support --disable-randomization and --no-disable-randomization
12317 command line arguments.
12318 * target.h (struct target_ops): Add supports_disable_randomization.
12319 (target_supports_disable_randomization): New macro.
12321 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12323 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12325 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12326 [!PT_GETDSBT] (target_loadmap): New definition.
12327 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12328 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12329 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12330 and PT_GETDSBT to LINUX_LOADMAP.
12331 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12332 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12334 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12336 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12337 (arm_linux_hwbp_cap): New static variable.
12338 (arm_linux_get_hwbp_cap): Replace by ...
12339 (arm_linux_init_hwbp_cap): ... this new function.
12340 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12341 (arm_linux_get_hw_watchpoint_count): Likewise.
12342 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12343 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12344 (arm_prepare_to_resume): Use perror_with_name instead of error.
12346 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12348 * linux-arm-low.c: Include <signal.h>.
12349 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12350 (struct arm_linux_hwbp_cap): New data type.
12351 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12352 (struct arm_linux_hw_breakpoint): New data type.
12353 (MAX_BPTS, MAX_WPTS): Define.
12354 (struct arch_process_info, struct arch_lwp_info): New data types.
12355 (arm_linux_get_hwbp_cap): New function.
12356 (arm_linux_get_hw_breakpoint_count): Likewise.
12357 (arm_linux_get_hw_watchpoint_count): Likewise.
12358 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12359 (arm_hwbp_control_initialize): Likewise.
12360 (arm_hwbp_control_is_enabled): Likewise.
12361 (arm_hwbp_control_is_initialized): Likewise.
12362 (arm_hwbp_control_disable): Likewise.
12363 (arm_linux_hw_breakpoint_equal): Likewise.
12364 (arm_linux_hw_point_initialize): Likewise.
12365 (struct update_registers_data): New data structure.
12366 (update_registers_callback: New function.
12367 (arm_insert_point): Likewise.
12368 (arm_remove_point): Likewise.
12369 (arm_stopped_by_watchpoint): Likewise.
12370 (arm_stopped_data_address): Likewise.
12371 (arm_new_process): Likewise.
12372 (arm_new_thread): Likewise.
12373 (arm_prepare_to_resume): Likewise.
12374 (the_low_target): Register arm_insert_point, arm_remove_point,
12375 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12376 arm_new_thread, and arm_prepare_to_resume.
12378 2011-09-15 Stan Shebs <stan@codesourcery.com>
12380 * server.h (struct emit_ops): Add compare-goto fields.
12381 * tracepoint.c (gdb_agent_op_sizes): New table.
12382 (emit_eq_goto): New function.
12383 (emit_ne_goto): New function.
12384 (emit_lt_goto): New function.
12385 (emit_le_goto): New function.
12386 (emit_gt_goto): New function.
12387 (emit_ge_goto): New function.
12388 (is_goto_target): New function.
12389 (compile_bytecodes): Recognize special cases of compare-goto
12390 combinations and call specialized emitters for them.
12391 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12392 (amd64_emit_ne_goto): New function.
12393 (amd64_emit_lt_goto): New function.
12394 (amd64_emit_le_goto): New function.
12395 (amd64_emit_gt_goto): New function.
12396 (amd64_emit_ge_goto): New function.
12397 (amd64_emit_ops): Add the new functions.
12398 (i386_emit_eq_goto): New function.
12399 (i386_emit_ne_goto): New function.
12400 (i386_emit_lt_goto): New function.
12401 (i386_emit_le_goto): New function.
12402 (i386_emit_gt_goto): New function.
12403 (i386_emit_ge_goto): New function.
12404 (i386_emit_ops): Add the new functions.
12406 2011-09-08 Stan Shebs <stan@codesourcery.com>
12408 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12409 (i386_emit_epilogue): Restore %ebx.
12411 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12413 * server.c (step_thread): Remove definition.
12414 (process_serial_event): Don't handle Hs.
12415 * server.h (step_thread): Remove declaration.
12416 * target.c (set_desired_inferior): Remove use of step_thread.
12418 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12420 * linux-low.c: Include linux-procfs.h.
12421 (linux_attach_lwp_1): Update comments.
12422 (linux_attach): Scan for existing threads when attaching to a
12423 process that is the tgid.
12424 * Makefile.in: Update dependencies.
12426 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12428 * configure.srv: Add linux-procfs.o dependencies.
12430 2011-08-14 Yao Qi <yao@codesourcery.com>
12432 * target.h (struct target_ops): Fix indent.
12433 * win32-low.c (win32_target_ops): Fix comment.
12435 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12436 Yao Qi <yao@codesourcery.com>
12438 * Makefile.in (clean): Remove tic6x-*.c files.
12439 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12440 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12441 (tic6x-c64xp-linux.c): Likewise.
12442 * configure.srv: Add support for tic6x-*-uclinux.
12443 * linux-tic6x-low.c: New.
12444 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12446 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12447 Yao Qi <yao@codesourcery.com>
12449 * target.h (struct target_ops): Add read_loadmap.
12450 * linux-low.c (struct target_loadseg): New type.
12451 (struct target_loadmap): New type.
12452 (linux_read_loadmap): New function.
12453 (linux_target_ops): Add linux_read_loadmap.
12454 * server.c (handle_query): Support qXfer:fdpic:read packet.
12455 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12458 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12460 * win32-low.c: Include <stdint.h>.
12462 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12464 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12465 to the inferior here.
12466 (i386_remove_aligned_watchpoint): Ditto.
12467 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12468 fit part of the watchpoint in the debug registers.
12469 (i386_update_inferior_debug_regs): New.
12470 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12471 registers, and only update the inferior on success.
12472 (i386_low_remove_watchpoint): Ditto.
12474 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12476 * linux-low.c (compare_ints, unique, list_threads, show_process,
12477 linux_core_of_thread): Delete.
12478 (linux_target_ops): Change linux_core_of_thread to
12479 linux_common_core_of_thread.
12480 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12481 * utils.c (malloc_failure): Change type of argument.
12482 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12483 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12484 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12485 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12486 (IPA_OBJS): Add common-utils-ipa.o.
12487 (ptid_h, linux_osdata_h): New macros.
12488 (server_h): Add common/common-utils.h, common/xml-utils.h,
12489 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12491 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12492 ptid.o, buffer.o): New rules.
12493 (linux-low.o): Add common/linux-osdata.h as a dependency.
12494 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12495 * configure.ac: Add AC_HEADER_DIRENT check.
12496 * config.in: Regenerate.
12497 * configure: Regenerate.
12498 * remote-utils.c (xml_escape_text): Delete.
12499 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12500 buffer_xml_printf): Move to common/buffer.c.
12501 * server.c (main): Remove call to initialize_inferiors.
12502 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12503 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12504 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12505 internal_error, gdb_assert, gdb_assert_fail): Delete.
12506 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12507 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12509 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12510 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12511 initialize_inferiors): Delete.
12513 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12515 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12518 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12520 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12522 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12524 2011-05-26 Yao Qi <yao@codesourcery.com>
12526 * Makefile.in (thread-db.o): Track dependence to
12527 common/gdb_thread_db.h.
12528 * thread-db.c: include gdb_thread_db.h from right place.
12530 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12532 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12533 __FILE__ and __LINE__ to internal_error.
12535 2011-05-13 Doug Evans <dje@google.com>
12537 * thread-db.c (try_thread_db_load_from_sdir): New function.
12538 (try_thread_db_load_from_dir): New function.
12539 (thread_db_load_search): Handle $sdir, ignore $pdir.
12540 Remove trying of system directories if search of
12541 libthread-db-search-path fails, that is now done via $sdir.
12543 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12545 * server.c (handle_query): Add EnableDisableTracepoints to the list
12546 of supported features.
12547 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12549 (cmd_qtenable_disable): New.
12550 (cmd_qtstart): Install tracepoints even if disabled.
12551 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12552 receiving a QTEnable or QTDisable packet.
12553 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12554 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12556 (gdb_probe): Skip data collection if static tracepoint is disabled.
12558 2011-05-10 Doug Evans <dje@google.com>
12560 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12562 2011-05-04 Doug Evans <dje@google.com>
12564 * linux-low.c (linux_join): Skip process lookup.
12565 * spu-low.c (spu_join): Ditto.
12566 * server.c (join_inferiors_callback): Delete.
12567 (process_serial_event): For 'D' packet (detach) call join_inferior
12570 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12572 * README: Don't mention xscale*-*-linux*.
12573 * configure.srv (xscale*-*-linux*): Don't handle target.
12575 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12577 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12579 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12580 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12581 (i386_emit_void_call_2): Likewise.
12583 2011-04-26 Yao Qi <yao@codesourcery.com>
12585 * linux-low.c: Move common macros to linux-ptrace.h.
12586 Include linux-ptrace.h.
12587 * Makefile.in (linux_ptrace_h): New.
12588 (linux-low.o): Depends on linux-ptrace.h.
12590 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12592 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12593 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12594 (remote_prepare): New function with most of the TCP code from ...
12595 (remote_open): ... here. Detect PORT here unconditionally. Move also
12596 setting transport_is_reliable.
12597 * server.c (run_once): New variable.
12598 (gdbserver_usage): Document it.
12599 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12600 the first run if RUN_ONCE.
12601 * server.h (run_once, remote_prepare): New declarations.
12603 2011-04-19 Tom Tromey <tromey@redhat.com>
12605 * win32-low.c (handle_load_dll): Remove duplicate "the".
12607 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12609 Remove support for old Cygwin 1.5 versions.
12610 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12611 function to avoid warning.
12612 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12615 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12617 * gdbserver/server.h (Macro _): Define it if not available.
12619 2011-03-14 Michael Snyder <msnyder@vmware.com>
12621 * hostio.c (handle_close): Remove unnecessary null test.
12623 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12625 * Makefile.in (maintainer-clean realclean distclean): Remove
12626 "make ... subdir_do" command.
12628 2011-03-10 Michael Snyder <msnyder@vmware.com>
12630 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12632 * server.c (handle_v_run): Free alloced buffer on early return.
12634 2011-03-09 Yao Qi <yao@codesourcery.com>
12637 2011-03-04 Yao Qi <yao@codesourcery.com>
12639 * Makefile.in: Remove GNU make feature --directory.
12641 2011-03-05 Yao Qi <yao@codesourcery.com>
12643 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12644 (subdir_do): New make target. Copied from gdb/Makefile.
12645 (maintainer-clean, realclean, distclean, clean): Call corresponding
12646 make targets in common/Makefile.
12648 2011-02-11 Yao Qi <yao@codesourcery.com>
12650 * configure.ac: Call AC_PROG_RANLIB.
12651 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12652 * configure: Regenerate.
12654 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12656 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12658 2011-03-06 Yao Qi <yao@codesourcery.com>
12660 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12662 2011-03-05 Yao Qi <yao@codesourcery.com>
12664 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12665 (subdir_do): New make target. Copied from gdb/Makefile.
12666 (maintainer-clean, realclean, distclean, clean): Call corresponding
12667 make targets in common/Makefile.
12669 2011-03-04 Yao Qi <yao@codesourcery.com>
12671 * Makefile.in: Remove GNU make feature --directory.
12673 2011-03-04 Michael Snyder <msnyder@vmware.com>
12675 * server.c (queue_stop_reply): Call xmalloc not malloc.
12677 2011-03-02 Michael Snyder <msnyder@vmware.com>
12679 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12681 2011-02-28 Michael Snyder <msnyder@vmware.com>
12683 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12684 (cmd_qtframe): Ditto.
12685 (cmd_qtbuffer): Ditto.
12686 (cmd_bigqtbuffer): Ditto.
12688 * utils.c (decimal2str): Initialize 'width' to nine, then
12689 don't mess with it.
12691 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12693 * hostio.c (require_data): Free *data, not data.
12695 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12697 * hostio.c (require_data): Use free, not xfree.
12699 2011-02-27 Michael Snyder <msnyder@vmware.com>
12701 * server.c (handle_query): Discard unused value.
12703 * hostio.c (require_data): Free malloc memory before returning
12706 2011-02-26 Michael Snyder <msnyder@vmware.com>
12708 * linux-low.c (list_threads): Call closedir for dirent.
12710 2011-02-27 Michael Snyder <msnyder@vmware.com>
12712 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12713 a case statement falls through.
12715 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12717 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12720 2011-02-26 Michael Snyder <msnyder@vmware.com>
12722 * utils.c (decimal2str): Eliminate dead code and dead param.
12723 (pulongest): Drop dead param from call to decimal2str.
12726 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12728 Revert the following patch (not approved yet):
12729 2011-02-21 Hui Zhu <teawater@gmail.com>
12730 * tracepoint.c (tp_printf): New function.
12731 (eval_agent_expr): Handle gdb_agent_op_printf.
12733 2011-02-21 Hui Zhu <teawater@gmail.com>
12735 * tracepoint.c (tp_printf): New function.
12736 (eval_agent_expr): Handle gdb_agent_op_printf.
12738 2011-02-18 Tom Tromey <tromey@redhat.com>
12740 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12741 (tracepoint.o): Likewise.
12742 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12743 (gdb_agent_op_names): Likewise.
12745 2011-02-18 Tom Tromey <tromey@redhat.com>
12747 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12748 gdb_agent_op_rot>: New constants.
12749 (gdb_agent_op_names): Add pick and roll.
12750 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12753 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12755 * aclocal.m4: Regenerated with aclocal-1.11.1.
12757 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12759 * server.c (handle_qxfer_traceframe_info): New.
12760 (qxfer_packets): Register "traceframe-info".
12761 (handle_query): Report support for qXfer:traceframe-info:read+.
12762 * tracepoint.c (match_blocktype): New.
12763 (traceframe_find_block_type): Rename to ...
12764 (traceframe_walk_blocks): ... this. Add callback filter argument,
12766 (traceframe_find_block_type): New, reimplemented on top of
12767 traceframe_walk_blocks.
12768 (build_traceframe_info_xml): New.
12769 (traceframe_read_info): New.
12770 * server.h (traceframe_read_info): Declare.
12772 2011-02-11 Yao Qi <yao@codesourcery.com>
12774 * configure.ac: Call AC_PROG_RANLIB.
12775 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12776 * configure: Regenerate.
12778 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12780 * server.c (gdb_read_memory): Change return semantics to allow
12782 (handle_search_memory_1): Adjust.
12783 (process_serial_event) <'m' packet>: Handle partial transfers.
12784 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12786 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12788 * regcache.c (init_register_cache): Initialize
12789 regcache->register_status.
12790 (free_register_cache): Release regcache->register_status.
12791 (regcache_cpy): Copy register_status.
12792 (registers_to_string): Print 'x's for unavailable registers.
12793 (supply_register): Mark the register's status valid or
12794 unavailable, depending on whether a buffer was passed in or not.
12795 (supply_register_zeroed): New.
12796 (supply_regblock): Mark the registers' status valid or
12797 unavailable, depending on whether a buffer was passed in or not.
12798 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12799 (struct regcache): New `register_status' field.
12800 (supply_register_zeroed): Declare.
12801 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12802 supply_register_zeroed, rather than passing a NULL buffer to
12804 * tracepoint.c (fetch_traceframe_registers): Update comment.
12806 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12808 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12811 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12813 * server.h (decode_xfer_write): Change prototype.
12814 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12815 and don't extract the annex here.
12816 * server.c (decode_xfer_read): Remove `annex' parameter,
12817 and don't extract the annex here.
12818 (decode_xfer): New.
12819 (struct qxfer): New.
12820 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12821 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12822 (handle_qxfer_statictrace): New functions, abstracted out from
12823 handle_query, and made to use the struct qxfer interface.
12824 (handle_threads_qxfer_proper): Rename to ...
12825 (handle_qxfer_threads_proper): ... this.
12826 (handle_threads_qxfer): Rename to ...
12827 (handle_qxfer_threads): ... this. Adjust.
12828 (qxfer_packets): New array.
12829 (handle_qxfer): New function.
12830 (handle_query): Use handle_qxfer.
12832 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12834 * gdbreplay.c: Shorten lines of >= 80 columns.
12835 * linux-low.c: Ditto.
12836 * linux-ppc-low.c: Ditto.
12837 * linux-s390-low.c: Ditto.
12838 * linux-sparc-low.c: Ditto.
12839 * linux-x86-low.c: Ditto.
12840 * linux-xtensa-low.c: Ditto.
12841 * mem-break.c: Ditto.
12842 * nto-low.c: Ditto.
12843 * regcache.h: Ditto.
12844 * remote-utils.c: Ditto.
12847 * thread-db.c: Ditto.
12848 * tracepoint.c: Ditto.
12850 * win32-low.h: Ditto.
12852 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12854 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12857 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12859 * server.c (gdbserver_version): Update copyright year in version
12861 * gdbreplay.c (gdbreplay_version): Ditto.
12863 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12865 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12866 * linux-bfin-low.c: New file.
12867 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12868 PT_DATA_ADDR for BFIN targets.
12869 * Makefile.in (SFILES): Add linux-bfin-low.c.
12870 (clean): Remove reg-bfin.c.
12871 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12872 * README: Mention supported Blackfin targets.
12874 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12876 * .gitignore: New file.
12878 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12880 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12882 2010-10-22 Jie Zhang <jie@codesourcery.com>
12884 * Makefile.in: Add FLAGS_TO_PASS variable.
12885 (install): Remove dependency of install-only and recursively
12886 invoke make for install-only.
12888 2010-10-04 Doug Evans <dje@google.com>
12890 * Makefile.in (uninstall): Use $(DESTDIR).
12892 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12896 * linux-x86-low.c (compat_siginfo_from_siginfo)
12897 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12898 si_code is < 0. Check for si_code == SI_TIMER before checking for
12901 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12903 * lynx-i386-low.c: New file.
12904 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12906 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12908 * lynx-low.c (ptrace_request_to_str): Remove handling for
12909 request values that have been removed in LynxOS 5.x.
12911 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12913 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12916 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12918 * configure.ac: Add --enable-inprocess-agent option.
12919 * configure: Rebuilt.
12921 2010-09-06 Yao Qi <yao@codesourcery.com>
12923 * linux-low.c (linux_kill): Remove unused variable.
12924 (linux_stabilize_threads): Likewise.
12925 * server.c (start_inferior): Likewise.
12926 (queue_stop_reply_callback): Likewise.
12927 * tracepoint.c (do_action_at_tracepoint): Likewise.
12929 2010-09-06 Yao Qi <yao@codesourcery.com>
12931 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12934 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12936 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12938 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12940 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12943 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12945 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12946 gdbserver/lynx-ppc-low.c: New files.
12947 * Makefile.in (lynx_low_h): New variable.
12948 (lynx-low.o, lynx-ppc-low.o): New rules.
12949 * configure.ac: On LynxOS, link with -lnetinet.
12950 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12951 * configure: regenerate.
12953 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12955 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12956 * configure.ac: Add check for vasprintf and vsnprintf.
12957 * configure, config.in: Regenerate.
12958 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12960 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12962 * gdbreplay.c: Move include of alloca.h up, next to include of
12964 * server.h: Add include of malloc.h.
12965 * mem-break.c: Remove include of malloc.h.
12966 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12968 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12970 * Makefile.in (memmem.o): Build with -Wno-error.
12972 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12974 * utils.c (xsnprintf): Make non-static.
12975 * server.h: Add xsnprintf declaration.
12976 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12977 replace calls to snprintf by calls to xsnprintf throughout.
12979 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12981 * configure.ac: Add configure check for alloca.
12982 * configure, config.in: Regenerate.
12983 * server.h: Include alloca.h if it exists.
12984 * gdbreplay.c: Include alloca.h if it exists.
12986 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12988 * linux-low.c (__SIGRTMIN): Define if not already defined.
12989 (linux_create_inferior): Check for __ANDROID__ rather than
12991 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12992 are already deferred.
12993 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12994 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12995 stopped and already has a pending signal to report.
12996 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12997 a pending signal to report or is moving out of a jump pad.
12998 (linux_init_signals): Check for __ANDROID__ rather than
13001 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13003 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13004 debug_threads check. Avoid a linear search when not doing debug
13007 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13009 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13010 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13011 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13012 (process_event): Change local fd's type to gdb_fildes_t.
13013 (create_file_handler): Adjust prototype.
13014 (delete_file_handler): Adjust prototype.
13015 (handle_file_event): Adjust prototype. Use pfildes.
13016 (create_file_event): Adjsut prototype.
13017 * remote-utils.c (remote_desc, listen_desc): Change type to
13019 * server.h: New gdb_fildes_t typedef.
13020 [USE_WIN32API]: Include winsock2.h.
13021 (delete_file_handler, add_file_handler): Adjust prototypes.
13022 (pfildes): Declare.
13023 * utils.c (pfildes): New.
13025 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13027 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13028 * configure: Regenerate.
13030 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13032 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13033 (linux_done_accessing_memory): ... this.
13034 (linux_target_ops): Adjust.
13035 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13036 * nto-low.c (nto_target_ops): Adjust comment.
13037 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13038 * spu-low.c (spu_target_ops): Adjust comment.
13039 * target.h (target_ops): Rename unprepare_to_access_memory field
13040 to done_accessing_memory.
13041 (unprepare_to_access_memory): Rename to ...
13042 (done_accessing_memory): ... this.
13044 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13046 * linux-low.c (linux_prepare_to_access_memory): New.
13047 (linux_unprepare_to_access_memory): New.
13048 (linux_target_ops): Install them.
13049 * server.c (read_memory): Rename to ...
13050 (gdb_read_memory): ... this. Use
13051 prepare_to_access_memory/prepare_to_access_memory.
13052 (write_memory): Rename to ...
13053 (gdb_write_memory): ... this. Use
13054 prepare_to_access_memory/prepare_to_access_memory.
13055 (handle_search_memory_1): Adjust.
13056 (process_serial_event): Adjust.
13057 * target.h (struct target_ops): New fields
13058 prepare_to_access_memory and unprepare_to_access_memory.
13059 (prepare_to_access_memory, unprepare_to_access_memory): New.
13060 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13061 prepare_to_access_memory/prepare_to_access_memory.
13062 * nto-low.c (nto_target_ops): Adjust.
13063 * spu-low.c (spu_target_ops): Adjust.
13064 * win32-low.c (win32_target_ops): Adjust.
13066 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13068 * Makefile.in (WARN_CFLAGS): Get it from configure.
13069 (WERROR_CFLAGS): New.
13070 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13071 * configure.ac: Introduce --enable-werror, which adds -Werror to
13072 the compiler command line. Enabled by default. Disable with
13073 --disable-werror. Add -Wdeclaration-after-statement
13074 Wpointer-arith and -Wformat-nonliteral to warning flags.
13075 * configure: Regenerate.
13077 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13079 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13081 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13083 * gdbreplay.c (remote_error): New.
13085 (expect): Use gdbchar. Check for error reading from GDB.
13086 Clarify sync error output.
13087 (play): Check for errors writing to GDB.
13088 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13089 * remote-utils.c (getpkt): Check for errors writing to the remote
13092 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13094 * linux-low.c (linux_wait_1): Move non-debugging code out of
13095 `debug_threads' control.
13097 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13099 * linux-low.c (linux_wait_1): Don't set last_status here.
13100 * server.c (push_event, queue_stop_reply_callback): Assert we're
13101 not pushing a TARGET_WAITKIND_IGNORE event.
13102 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13103 (myresume, handle_target_event): Set the thread's last_resume_kind
13104 and last_status from the target returned status.
13106 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13110 * linux-x86-low.c (update_debug_registers_callback): New.
13111 (i386_dr_low_set_addr): Use it.
13112 (i386_dr_low_get_addr): New.
13113 (i386_dr_low_set_control): Use update_debug_registers_callback.
13114 (i386_dr_low_get_control): New.
13115 (i386_dr_low_get_status): Adjust.
13116 * linux-low.c (linux_stop_lwp): New.
13117 * linux-low.h (linux_stop_lwp): Declare.
13119 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13120 argument instead of a i386_debug_reg_state.
13121 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13122 a i386_debug_reg_state.
13123 (i386_insert_aligned_watchpoint): Adjust.
13124 (i386_remove_aligned_watchpoint): Adjust.
13125 (i386_low_stopped_data_address): Read the debug registers from the
13126 inferior instead of from the mirrors.
13127 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13128 (i386_dr_low_get_addr): Declare.
13129 (i386_dr_low_get_control): Declare.
13130 (i386_dr_low_get_status): Change prototype.
13132 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13133 (i386_dr_low_get_addr): New.
13134 (i386_dr_low_get_control): New.
13135 (i386_dr_low_get_status): Adjust prototype. Return
13137 (i386_initial_stuff): Clear dr_status_mirror and
13139 (i386_get_thread_context): Adjust.
13140 (i386_set_thread_context): Adjust.
13141 (i386_thread_added): Adjust.
13143 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13145 * linux-low.h (linux_thread_area): Delete declaration.
13147 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13149 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13150 after its termination.
13152 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13154 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13155 (gdb_wants_all_stopped): Delete.
13156 (linux_wait_1): Don't call them.
13157 * server.c (handle_v_cont): Tag all threads as want-stopped.
13158 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13159 stopped as "client-wants-stopped".
13161 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13163 * Makefile.in (signals_h): New.
13164 (server_h): Depend on it.
13165 (server.o): Don't depend on $(signals_def).
13166 (signals.o): Depend on $(signals_def).
13168 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13170 * Makefile.in (signals_def): New.
13171 (server_h): Append include/gdb/signals.h and signals_def.
13172 (server.o): Append signals_def.
13174 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13176 * server.c (handle_target_event): Use target_signal_to_host for
13177 resume_info.sig initialization.
13178 * target.h (struct thread_resume) <sig>: New comment.
13180 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13182 * server.c (handle_query): strcpy() the returned string from paddress()
13183 instead of sprintf().
13184 * utils.c (paddress): Return phex_nz().
13186 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13188 * server.c (handle_v_cont): Call mourn_inferior if process
13190 (myresume): Likewise.
13192 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13194 Static tracepoints, and integration with UST.
13196 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13197 * mem-break.c (uninsert_all_breakpoints)
13198 (reinsert_all_breakpoints): New.
13199 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13200 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13201 (gdb_agent_ust_loaded, helper_thread_id)
13202 (gdb_agent_helper_thread_id): New macros.
13203 (struct ipa_sym_addresses): Add addr_ust_loaded,
13204 addr_helper_thread_id, addr_cmd_buf.
13205 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13206 (in_process_agent_loaded_ust): New.
13207 (write_e_ust_not_loaded): New.
13208 (maybe_write_ipa_ust_not_loaded): New.
13209 (struct collect_static_trace_data_action): New.
13210 (enum tracepoint_type) <static_tracepoint>: New.
13211 (struct tracepoint) <handle>: Mention static tracepoints.
13212 (struct static_tracepoint_ctx): New.
13213 (CMD_BUF_SIZE): New.
13214 (add_tracepoint_action): Handle static tracepoint actions.
13215 (unprobe_marker_at): New.
13216 (clear_installed_tracepoints): Handle static tracepoints.
13217 (cmd_qtdp): Handle static tracepoints.
13218 (probe_marker_at): New.
13219 (cmd_qtstart): Handle static tracepoints.
13220 (response_tracepoint): Handle static tracepoints.
13221 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13222 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13223 (get_context_regcache): Handle static tracepoints.
13224 (do_action_at_tracepoint): Handle static tracepoint actions.
13225 (traceframe_find_block_type): Handle static trace data blocks.
13226 (traceframe_read_sdata): New.
13227 (download_tracepoints): Download static tracepoint actions.
13228 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13229 (GDB_PROBE_NAME): New.
13231 (GET_UST_SYM): New.
13234 (ust_marker_to_static_tracepoint): New.
13236 (collect_ust_data_at_tracepoint): New.
13237 (gdb_ust_probe): New.
13238 (UNIX_PATH_MAX, SOCK_DIR): New.
13239 (gdb_ust_connect_sync_socket): New.
13240 (resume_thread, stop_thread): New.
13241 (run_inferior_command): New.
13242 (init_named_socket): New.
13243 (gdb_ust_socket_init): New.
13244 (cstr_to_hexstr): New.
13246 (first_marker, next_marker): New.
13247 (response_ust_marker): New.
13248 (cmd_qtfstm, cmd_qtsstm): New.
13249 (unprobe_marker_at, probe_marker_at): New.
13250 (cmd_qtstmat, gdb_ust_thread): New.
13251 (gdb_ust_init): New.
13252 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13253 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13254 (ST_REGENTRY): New.
13255 (x86_64_st_collect_regmap): New.
13256 (X86_64_NUM_ST_COLLECT_GREGS): New.
13257 (AMD64_RIP_REGNUM): New.
13258 (supply_static_tracepoint_registers): New.
13259 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13260 (ST_REGENTRY): New.
13261 (i386_st_collect_regmap): New.
13262 (i386_NUM_ST_COLLECT_GREGS): New.
13263 (supply_static_tracepoint_registers): New.
13264 * server.c (handle_query): Handle qXfer:statictrace:read.
13265 <qSupported>: Report support for StaticTracepoints, and
13266 qXfer:statictrace:read features.
13267 * server.h (traceframe_read_sdata)
13268 (supply_static_tracepoint_registers): Declare.
13269 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13270 (unpack_varlen_hex): Include in IPA build.
13271 * Makefile.in (ustlibs, ustinc): New.
13272 (IPA_OBJS): Add remote-utils-ipa.o.
13273 ($(IPA_LIB)): Link -ldl and -lpthread.
13275 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13276 * config.in, configure: Regenerate.
13278 2010-06-20 Ian Lance Taylor <iant@google.com>
13279 Pedro Alves <pedro@codesourcery.com>
13281 * linux-x86-low.c (always_true): Delete.
13282 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13283 trying to fool the compiler with always_true.
13285 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13287 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13288 conditions in gdbserver.
13290 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13292 * spu-low.c (spu_read_memory): Wrap around local store limit.
13293 (spu_write_memory): Likewise.
13295 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13297 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13298 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13300 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13302 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13303 uses with LONGEST uses.
13305 2010-06-14 Stan Shebs <stan@codesourcery.com>
13306 Pedro Alves <pedro@codesourcery.com>
13310 * linux-x86-low.c: Include limits.h.
13312 (always_true): New.
13315 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13316 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13317 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13318 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13319 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13320 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13321 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13322 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13323 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13324 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13325 (amd64_emit_void_call_2): New.
13326 (amd64_emit_ops): New.
13327 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13328 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13329 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13330 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13331 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13332 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13333 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13334 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13335 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13336 (i386_emit_stack_adjust, i386_emit_int_call_1)
13337 (i386_emit_void_call_2): New.
13338 (i386_emit_ops): New.
13339 (x86_emit_ops): New.
13340 (the_low_target): Install x86_emit_ops.
13341 * server.h (struct emit_ops): New.
13342 (get_raw_reg_func_addr): Declare.
13343 (current_insn_ptr, emit_error): Declare.
13344 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13345 (set_trace_state_variable_value): New defines.
13346 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13347 addr_get_trace_state_variable_value and
13348 addr_set_trace_state_variable_value.
13349 (symbol_list): New fields for get_raw_reg,
13350 get_trace_state_variable_value and set_trace_state_variable_value.
13351 (condfn): New typedef.
13352 (struct tracepoint): New field `compiled_cond'.
13353 (do_action_at_tracepoint): Clear compiled_cond.
13354 (get_trace_state_variable_value, set_trace_state_variable_value):
13356 (condition_true_at_tracepoint): If there's a compiled condition,
13358 (current_insn_ptr, emit_error): New globals.
13359 (struct bytecode_address): New.
13360 (get_raw_reg_func_addr): New.
13361 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13362 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13363 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13364 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13365 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13366 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13367 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13368 (compile_tracepoint_condition, compile_bytecodes): New.
13369 * target.h (emit_ops): Forward declare.
13370 (struct target_ops): New field emit_ops.
13371 (target_emit_ops): New.
13372 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13373 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13374 * linux-low.c (linux_emit_ops): New.
13375 (linux_target_ops): Install it.
13376 * linux-low.h (struct linux_target_ops): New field emit_ops.
13378 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13380 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13381 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13383 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13384 Stan Shebs <stan@codesourcery.com>
13386 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13387 (all): Depend on $(extra_libraries).
13388 (install-only): Install the IPA.
13389 (IPA_OBJS, IPA_LIB): New.
13390 (clean): Remove the IPA lib.
13391 (IPAGENT_CFLAGS): New.
13392 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13393 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13394 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13395 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13396 * configure.ac: Check for atomic builtins support in the compiler.
13397 (IPA_DEPFILES, extra_libraries): Define.
13398 * configure.srv (ipa_obj): Add description.
13399 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13400 (i[34567]86-*-linux*): Set ipa_obj.
13401 (x86_64-*-linux*): Set ipa_obj.
13402 * linux-low.c (stabilizing_threads): New.
13403 (supports_fast_tracepoints): New.
13404 (linux_detach): Stabilize threads before detaching.
13405 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13406 the lwp is either not stabilizing, or is moving out of a jump pad.
13407 (linux_fast_tracepoint_collecting): New.
13408 (maybe_move_out_of_jump_pad): New.
13409 (enqueue_one_deferred_signal): New.
13410 (dequeue_one_deferred_signal): New.
13411 (linux_wait_for_event_1): If moving out of a jump pad, defer
13412 pending signals to later.
13413 (linux_stabilize_threads): New.
13414 (linux_wait_1): Check if threads need moving out of jump pads, and
13416 (stuck_in_jump_pad_callback): New.
13417 (move_out_of_jump_pad_callback): New.
13418 (lwp_running): New.
13419 (linux_resume_one_lwp): Handle moving out of jump pads.
13420 (linux_set_resume_request): Dequeue deferred signals.
13421 (need_step_over_p): Also step over fast tracepoint jumps.
13422 (start_step_over): Also uninsert fast tracepoint jumps.
13423 (finish_step_over): Also reinsert fast tracepoint jumps.
13424 (linux_install_fast_tracepoint_jump): New.
13425 (linux_target_ops): Install linux_stabilize_threads and
13426 linux_install_fast_tracepoint_jump_pad.
13427 * linux-low.h (linux_target_ops) <get_thread_area,
13428 install_fast_tracepoint_jump_pad>: New fields.
13429 (struct lwp_info) <collecting_fast_tracepoint,
13430 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13431 (linux_get_thread_area): Declare.
13432 * linux-x86-low.c (jump_insn): New.
13433 (x86_get_thread_area): New.
13434 (append_insns): New.
13435 (push_opcode): New.
13436 (amd64_install_fast_tracepoint_jump_pad): New.
13437 (i386_install_fast_tracepoint_jump_pad): New.
13438 (x86_install_fast_tracepoint_jump_pad): New.
13439 (the_low_target): Install x86_get_thread_area and
13440 x86_install_fast_tracepoint_jump_pad.
13441 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13442 (struct fast_tracepoint_jump): New.
13443 (fast_tracepoint_jump_insn): New.
13444 (fast_tracepoint_jump_shadow): New.
13445 (find_fast_tracepoint_jump_at): New.
13446 (fast_tracepoint_jump_here): New.
13447 (delete_fast_tracepoint_jump): New.
13448 (set_fast_tracepoint_jump): New.
13449 (uninsert_fast_tracepoint_jumps_at): New.
13450 (reinsert_fast_tracepoint_jumps_at): New.
13451 (set_breakpoint_at): Use write_inferior_memory.
13452 (uninsert_raw_breakpoint): Use write_inferior_memory.
13453 (check_mem_read): Mask out fast tracepoint jumps.
13454 (check_mem_write): Mask out fast tracepoint jumps.
13455 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13456 (set_fast_tracepoint_jump): Declare.
13457 (delete_fast_tracepoint_jump)
13458 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13459 (reinsert_fast_tracepoint_jumps_at): Declare.
13460 * regcache.c: Don't compile many functions when building the
13461 in-process agent library.
13462 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13463 the register buffer in the heap.
13464 (free_register_cache): If the register buffer isn't owned by the
13465 regcache, don't free it.
13466 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13467 pre-existing register caches.
13468 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13470 (convert_ascii_to_int): : Constify `from' parameter type.
13471 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13472 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13473 the needed buffer in-place.
13474 (relocate_instruction): New.
13475 * server.c (handle_query) <qSymbols>: If the target supports
13476 tracepoints, give it a chance of looking up symbols. Report
13477 support for fast tracepoints.
13478 (handle_status): Stabilize threads.
13479 (process_serial_event): Adjust.
13480 * server.h (struct fast_tracepoint_jump): Forward declare.
13481 (struct process_info) <fast_tracepoint_jumps>: New field.
13482 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13483 (decode_X_packet, decode_M_packet): Adjust.
13484 (relocate_instruction): Declare.
13485 (in_process_agent_loaded): Declare.
13486 (tracepoint_look_up_symbols): Declare.
13487 (struct fast_tpoint_collect_status): Declare.
13488 (fast_tracepoint_collecting): Declare.
13489 (force_unlock_trace_buffer): Declare.
13490 (handle_tracepoint_bkpts): Declare.
13491 (initialize_low_tracepoint)
13492 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13493 * target.h (struct target_ops) <stabilize_threads,
13494 install_fast_tracepoint_jump_pad>: New fields.
13495 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13496 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13497 [HAVE_STDINT_H]: Include stdint.h.
13498 (trace_debug_1): Rename to ...
13499 (trace_vdebug): ... this.
13500 (trace_debug): Rename to ...
13501 (trace_debug_1): ... this. Add `level' parameter.
13502 (trace_debug): New.
13503 (ATTR_USED, ATTR_NOINLINE): New.
13504 (IP_AGENT_EXPORT): New.
13505 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13506 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13507 (about_to_request_buffer_space, trace_buffer_is_full)
13508 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13509 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13510 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13511 (traceframe_write_count, traceframes_created)
13512 (trace_state_variables)
13513 New renaming defines.
13514 (struct ipa_sym_addresses): New.
13515 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13516 (symbol_list): New.
13517 (ipa_sym_addrs): New.
13518 (all_tracepoint_symbols_looked_up): New.
13519 (in_process_agent_loaded): New.
13520 (write_e_ipa_not_loaded): New.
13521 (maybe_write_ipa_not_loaded): New.
13522 (tracepoint_look_up_symbols): New.
13523 (debug_threads) [IN_PROCESS_AGENT]: New.
13524 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13525 (UNKNOWN_SIDE_EFFECTS): New.
13526 (stop_tracing): New.
13527 (flush_trace_buffer): New.
13528 (stop_tracing_bkpt): New.
13529 (flush_trace_buffer_bkpt): New.
13530 (read_inferior_integer): New.
13531 (read_inferior_uinteger): New.
13532 (read_inferior_data_pointer): New.
13533 (write_inferior_data_pointer): New.
13534 (write_inferior_integer): New.
13535 (write_inferior_uinteger): New.
13536 (struct collect_static_trace_data_action): Delete.
13537 (enum tracepoint_type): New.
13538 (struct tracepoint) <type>: New field `type'.
13539 <actions_str, step_actions, step_actions_str>: Only include in
13541 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13542 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13543 (tracepoints): Use IP_AGENT_EXPORT.
13544 (last_tracepoint): Don't include in the IPA.
13545 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13546 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13547 (alloced_trace_state_variables): New.
13548 (trace_state_variables): Use IP_AGENT_EXPORT.
13549 (traceframe_t): Delete unused variable.
13550 (circular_trace_buffer): Don't include in the IPA.
13551 (trace_buffer_start): Delete.
13552 (struct trace_buffer_control): New.
13553 (trace_buffer_free): Delete.
13554 (struct ipa_trace_buffer_control): New.
13555 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13556 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13558 (trace_buffer_ctrl): New.
13559 (TRACE_BUFFER_CTRL_CURR): New.
13560 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13561 Reimplement as macros.
13562 (trace_buffer_wrap): Delete.
13563 (traceframe_write_count, traceframe_read_count)
13564 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13565 (struct tracepoint_hit_ctx) <type>: New field.
13566 (struct fast_tracepoint_ctx): New.
13567 (memory_barrier): New.
13569 (record_tracepoint_error): Update atomically in the IPA.
13570 (clear_inferior_trace_buffer): New.
13571 (about_to_request_buffer_space): New.
13572 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13573 updating the same buffer.
13574 (add_tracepoint): Default the tracepoint's type to trap
13575 tracepoint, and orig_size to -1.
13576 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13577 internal variables.
13578 (create_trace_state_variable): New parameter `gdb'. Handle it.
13579 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13580 (cmd_qtdp): Handle fast tracepoints.
13581 (cmd_qtdv): Adjust.
13582 (max_jump_pad_size): New.
13583 (gdb_jump_pad_head): New.
13584 (get_jump_space_head): New.
13585 (claim_jump_space): New.
13586 (sort_tracepoints): New.
13587 (MAX_JUMP_SIZE): New.
13588 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13590 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13591 support. Upload fast traceframes, and delete internal IPA
13593 (stop_tracing_handler): New.
13594 (flush_trace_buffer_handler): New.
13595 (cmd_qtstop): Upload fast tracepoints.
13596 (response_tracepoint): Handle fast tracepoints.
13597 (tracepoint_finished_step): Upload fast traceframes. Set the
13598 tracepoint hit context's tracepoint type.
13599 (handle_tracepoint_bkpts): New.
13600 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13601 type. Add comment about fast tracepoints.
13602 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13603 non-existing action_str field.
13604 (get_context_regcache): Handle fast tracepoints.
13605 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13607 (fast_tracepoint_from_jump_pad_address): New.
13608 (fast_tracepoint_from_ipa_tpoint_address): New.
13609 (collecting_t): New.
13610 (force_unlock_trace_buffer): New.
13611 (fast_tracepoint_collecting): New.
13613 (gdb_collect): New.
13614 (write_inferior_data_ptr): New.
13615 (target_tp_heap): New.
13616 (target_malloc): New.
13617 (download_agent_expr): New.
13619 (download_tracepoints): New.
13620 (download_trace_state_variables): New.
13621 (upload_fast_traceframes): New.
13622 (IPA_FIRST_TRACEFRAME): New.
13623 (IPA_NEXT_TRACEFRAME_1): New.
13624 (IPA_NEXT_TRACEFRAME): New.
13625 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13626 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13627 (gdb_jump_pad_buffer_end): New.
13628 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13629 (initialize_tracepoint): Adjust.
13630 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13631 buffer. Initialize the low module.
13632 * utils.c (PREFIX, TOOLNAME): New.
13633 (malloc_failure): Use PREFIX.
13634 (error): In the IPA, an error causes an exit.
13635 (fatal, warning): Use PREFIX.
13636 (internal_error): Use TOOLNAME.
13637 (NUMCELLS): Increase to 10.
13638 * configure, config.in: Regenerate.
13640 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13642 * server.c (handle_query) <qSupported>: Do two passes over the
13643 qSupported string to avoid nesting strtok.
13645 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13647 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13649 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13650 -Wl,--dynamic-list.
13651 * configure: Regenerate.
13652 * proc-service.list: New.
13654 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13656 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13659 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13661 * gdbreplay.c (remote_open): Check error return from socket() call by
13662 its equality to -1 not by it being negative.
13663 * remote-utils.c (remote_open): Likewise.
13665 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13667 * config.h: Regenerate.
13669 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13671 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13672 doesn't provide PTRACE_GET_THREAD_AREA.
13674 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13676 * linux-m68k-low.c: Include <asm/ptrace.h>
13677 (ps_get_thread_area): Implement.
13679 2010-05-03 Doug Evans <dje@google.com>
13681 * event-loop.c (struct callback_event): New struct.
13682 (callback_list): New global.
13683 (append_callback_event, delete_callback_event): New functions.
13684 (process_callback): New function.
13685 (start_event_loop): Call it.
13686 * remote-utils.c (NOT_SCHEDULED): Define.
13687 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13688 moved out of readchar.
13689 (readchar): Rewrite. Call reschedule before returning.
13690 (reset_readchar): New function.
13691 (remote_close): Call it.
13692 (process_remaining, reschedule): New functions.
13693 * server.h (callback_handler_func): New typedef.
13694 (append_callback_event, delete_callback_event): Declare.
13696 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13698 * proc-service.c (ps_pglobal_lookup): Use
13699 thread_db_look_up_one_symbol.
13700 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13701 parameter. Use it instead of all_symbols_looked_up.
13702 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13704 (all_symbols_looked_up): Don't declare.
13705 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13706 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13708 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13709 Set all_symbols_looked_up here.
13710 (thread_db_look_up_one_symbol): New.
13711 (thread_db_get_tls_address): Adjust.
13712 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13713 thread_db object on the heap, and tentatively set it in the
13715 (thread_db_init): Don't set all_symbols_looked_up here.
13716 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13718 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13720 * linux-low.c (linux_kill, linux_detach): Adjust.
13721 (status_pending_p_callback): Remove redundant statement. Check
13722 for !TARGET_WAITIKIND_IGNORE, instead of
13723 TARGET_WAITKIND_STOPPED.
13724 (handle_tracepoints): Make sure LWP is locked. Adjust.
13725 (linux_wait_for_event_1): Adjust.
13726 (linux_cancel_breakpoints): New.
13727 (unsuspend_one_lwp): New.
13728 (unsuspend_all_lwps): New.
13729 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13730 (send_sigstop_callback): Change return type to int, add new
13731 `except' parameter and handle it.
13732 (suspend_and_send_sigstop_callback): New.
13733 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13734 pass them down. If SUSPEND, also increment the lwp's suspend
13736 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13737 (need_step_over_p): Don't consider suspended LWPs.
13738 (start_step_over): Adjust.
13739 (proceed_one_lwp): Change return type to int, add new `except'
13740 parameter and handle it.
13741 (unsuspend_and_proceed_one_lwp): New.
13742 (proceed_all_lwps): Use find_inferior instead of
13744 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13745 also decrement the suspend count of LWPs. Pass `except' down,
13746 instead of hacking its suspend count.
13747 (linux_pause_all): Add `freeze' parameter. Adjust.
13748 (linux_unpause_all): New.
13749 (linux_target_ops): Install linux_unpause_all.
13750 * server.c (handle_status): Adjust.
13751 * target.h (struct target_ops): New fields `unpause_all' and
13752 `cancel_breakpoints'. Add new parameter to `pause_all'.
13753 (pause_all): Add new `freeze' parameter.
13754 (unpause_all): New.
13755 (cancel_breakpoints): New.
13756 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13757 cancel breakpoints.
13758 (cmd_qtstart): Pause threads.
13759 (stop_tracing): Pause threads, and cancel breakpoints.
13760 * win32-low.c (win32_target_ops): Adjust.
13762 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13764 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13765 the inferior right away from here...
13766 (linux_wait_1): ... to here, and adjust to check the thread's
13767 last_resume_kind instead of the lwp's step or stop_expected flags.
13769 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13771 * README: Use consistent `GDB' and `GDBserver' spellings.
13773 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13775 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13776 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13777 (linux_detach_one_lwp): Assume the lwp is stopped.
13778 (any_thread_of): Delete.
13779 (linux_detach): Stop all lwps here. Don't blindly delete all
13781 (delete_lwp_callback): New.
13782 (linux_mourn): Delete all lwps of the process that is gone.
13783 (linux_wait_1): Don't delete the last lwp of the process here.
13784 * mem-break.h (mark_breakpoints_out): Declare.
13785 * mem-break.c (mark_breakpoints_out): New.
13786 (free_all_breakpoints): Use it.
13787 * server.c (handle_target_event): If the process is gone, mark
13789 * thread-db.c (struct thread_db) <create_bp>: New field.
13790 (thread_db_enable_reporting): Fix prototype. Store a thread event
13791 breakpoint reference in the thread_db struct.
13792 (thread_db_load_search): Clear the thread_db object.
13793 (try_thread_db_load_1): Ditto.
13794 (switch_to_process): New.
13795 (disable_thread_event_reporting): Use it.
13796 (remove_thread_event_breakpoints): New.
13797 (thread_db_detach, thread_db_mourn): Use it.
13799 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13801 * linux-low.c (linux_enable_event_reporting): New.
13802 (linux_wait_for_event_1, handle_extended_wait): Use it.
13804 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13806 * linux-low.c (linux_kill_one_lwp, linux_kill)
13807 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13808 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13809 SIGSTOP even if the LWP is stopped.
13810 (send_sigstop_callback): New.
13811 (stop_all_lwps): Use send_sigstop_callback instead.
13812 (linux_resume_one_thread): Adjust.
13813 (proceed_one_lwp): Still proceed an LWP that the client has
13814 requested to stop, if we haven't reported it as stopped yet. Make
13815 sure that LWPs the client want stopped, have a pending SIGSTOP.
13817 2010-04-26 Doug Evans <dje@google.com>
13819 * server.c (handle_general_set): Make static.
13821 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13822 Print received char after testing for error/eof instead of before.
13823 (input_interrupt): Tweak comment.
13825 2010-04-23 Doug Evans <dje@google.com>
13827 * server.c (start_inferior): Print inferior argv if --debug.
13829 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13831 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13832 * nto-x86-low.c: Include server.h
13834 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13836 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13837 be consistent with other sources of this directory.
13838 (init_registers_amd64): Correct name of source file of this function
13841 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13843 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13844 64-bit executables.
13846 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13848 * win32-i386-low.c: Add 64-bit support.
13849 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13850 (init_registers_amd64): Declare.
13851 (mappings): Add 64-bit version of array.
13852 (init_windows_x86): New function.
13853 (the_low_target): Change init_arch field to init_windows_x86.
13855 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13857 * win32-low.c: Adapt to support also 64-bit architecture.
13858 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13859 (get_image_name): Use SIZE_T type for local variable `done'.
13860 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13861 (toolhelp_get_dll_name): Idem.
13862 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13863 Use uintptr_t typecast to avoid warning.
13864 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13865 (handle_exception): Use phex_nz to avoid warning.
13866 (win32_wait): Remove unused local variable `process'.
13868 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13870 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13873 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13875 * configure.ac: Use `ws2_32' library for srv_mingw.
13876 * configure: Regenerate.
13877 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13878 * remote-utils.c: Likewise.
13880 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13882 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13883 if __x86_64__ is defined.
13885 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13887 * configure: Regenerate.
13889 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13891 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13892 * target.h (target_ops): New get_tib_address field.
13893 * win32-low.h (win32_thread_info): Add thread_local_base field.
13894 * win32-low.c (child_add_thread): Add tlb argument.
13895 Set thread_local_base field to TLB.
13896 (get_child_debug_event): Adapt to child_add_thread change.
13897 (win32_get_tib_address): New function.
13898 (win32_target_ops): Set get_tib_address field to
13899 win32_get_tib_address.
13900 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13902 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13904 * linux-low.c (linux_mourn): Also remove the process.
13905 * server.c (handle_target_event): Don't remove the process here.
13906 * nto-low.c (nto_mourn): New.
13907 (nto_target_ops): Install it.
13908 * spu-low.c (spu_mourn): New.
13909 (spu_target_ops): Install it.
13910 * win32-low.c (win32_mourn): New.
13911 (win32_target_ops): Install it.
13913 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13915 * server.h (buffer_xml_printf): Remove redundant `;'.
13917 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13919 * regcache.c (set_register_cache): Invalidate regcaches before
13920 changing the register cache layout.
13921 (regcache_invalidate_one): Allow a NULL regcache.
13922 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13923 regcaches before changing the register cache layout or the target
13926 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13928 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13929 variable warning on Linux/x86-64.
13931 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13933 GDBserver disconnected tracing support.
13935 * linux-low.c (linux_remove_process): Delete.
13936 (add_lwp): Don't set last_resume_kind here.
13937 (linux_kill): Use `mourn'.
13938 (linux_detach): Use `thread_db_detach', and `mourn'.
13939 (linux_mourn): New.
13940 (linux_attach_lwp_1): Adjust comment.
13941 (linux_attach): last_resume_kind moved the thread_info; adjust.
13942 (status_pending_p_callback): Adjust.
13943 (linux_wait_for_event_1): Adjust.
13944 (count_events_callback, select_singlestep_lwp_callback)
13945 (select_event_lwp_callback, cancel_breakpoints_callback)
13946 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13947 (proceed_one_lwp): Adjust.
13948 (linux_async): Add debug output.
13949 (linux_thread_stopped): New.
13950 (linux_pause_all): New.
13951 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13953 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13954 (thread_db_free): Delete declaration.
13955 (thread_db_detach, thread_db_mourn): Declare.
13956 * thread-db.c (thread_db_init): Use thread_db_mourn.
13957 (thread_db_free): Delete, split in two.
13958 (disable_thread_event_reporting): New.
13959 (thread_db_detach): New.
13960 (thread_db_mourn): New.
13962 * server.h (struct thread_info) <last_resume_kind>: New field.
13963 <attached>: Add comment.
13964 <gdb_detached>: New field.
13965 (handler_func): Change return type to int.
13966 (handle_serial_event, handle_target_event): Ditto.
13967 (gdb_connected): Declare.
13969 (disconnected_tracing): Declare.
13970 (stop_tracing): Declare.
13972 * server.c (handle_query) <qSupported>: Report support for
13973 disconnected tracing.
13974 (queue_stop_reply_callback): Account for running threads.
13975 (gdb_wants_thread_stopped): New.
13976 (gdb_wants_all_threads_stopped): New.
13977 (gdb_reattached_process): New.
13978 (handle_status): Clear the `gdb_detached' flag of all processes.
13979 In all-stop, stop all threads.
13980 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13981 (process_serial_event): If the remote connection breaks, or if an
13982 exit was forced with "monitor exit", force an event loop exit.
13983 Handle disconnected tracing on detach.
13984 (handle_serial_event): Adjust.
13985 (handle_target_event): If GDB isn't connected, forward events back
13986 to the inferior, unless the last process exited, in which case,
13987 exit gdbserver. Adjust interface.
13989 * remote-utils.c (remote_open): Don't block in accept. Instead
13990 register an event loop source on the listen socket file
13991 descriptor. Refactor bits into ...
13992 (listen_desc): ... this new global.
13993 (gdb_connected): ... this new function.
13994 (enable_async_notification): ... this new function.
13995 (handle_accept_event): ... this new function.
13996 (remote_close): Clear remote_desc.
13998 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14000 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14002 (mourn_inferior): Define.
14003 (target_process_qsupported): Avoid the dangling else problem.
14004 (thread_stopped): Define.
14005 (pause_all): Define.
14006 (target_waitstatus_to_string): Declare.
14007 * target.c (target_waitstatus_to_string): New.
14009 * tracepoint.c (tracing): Make extern.
14010 (disconnected_tracing): New.
14011 (stop_tracing): Make extern. Handle tracing stops due to GDB
14013 (cmd_qtdisconnected): New.
14014 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14015 (handle_tracepoint_general_set): Handle QTDisconnected.
14017 * event-loop.c (event_handler_func): Change return type to int.
14018 (process_event): Bail out if the event handler wants the event
14020 (handle_file_event): Ditto.
14021 (start_event_loop): Bail out if the event handler wants the event
14024 * nto-low.c (nto_target_ops): Adjust.
14025 * spu-low.c (spu_wait): Don't remove the process here.
14026 (spu_target_ops): Adjust.
14027 * win32-low.c (win32_wait): Don't remove the process here.
14028 (win32_target_ops): Adjust.
14030 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14032 * regcache.c (realloc_register_cache): Invalidate inferior's
14033 regcache before recreating it.
14035 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14037 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14039 2010-04-09 Stan Shebs <stan@codesourcery.com>
14040 Pedro Alves <pedro@codesourcery.com>
14042 * server.h (LONGEST): New.
14043 (struct thread_info) <while_stepping>: New field.
14044 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14046 (initialize_tracepoint, handle_tracepoint_general_set)
14047 (handle_tracepoint_query, tracepoint_finished_step)
14048 (tracepoint_was_hit, release_while_stepping_state_list):
14049 (current_traceframe): Declare.
14050 * server.c (handle_general_set): Handle tracepoint packets.
14051 (read_memory): New.
14052 (write_memory): New.
14053 (handle_search_memory_1): Use read_memory.
14054 (handle_query): Report support for conditional tracepoints, trace
14055 state variables, and tracepoint sources. Handle tracepoint
14057 (main): Initialize the tracepoints module.
14058 (process_serial_event): Handle traceframe reads/writes.
14060 * linux-low.c (handle_tracepoints): New.
14061 (linux_wait_1): Call it.
14062 (linux_resume_one_lwp): Handle while-stepping.
14063 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14064 (linux_target_ops): Install them.
14065 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14067 * linux-x86-low.c (x86_supports_tracepoints): New.
14068 (the_low_target). Install it.
14070 * mem-break.h (delete_breakpoint): Declare.
14071 * mem-break.c (delete_breakpoint): Make external.
14073 * target.h (struct target_ops): Add `supports_tracepoints',
14074 `read_pc', and `write_pc' fields.
14075 (target_supports_tracepoints): Define.
14076 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14079 * regcache.h (struct regcache) <registers_owned>: New field.
14080 (init_register_cache, regcache_cpy): Declare.
14081 (regcache_read_pc, regcache_write_pc): Declare.
14082 (register_cache_size): Declare.
14083 (supply_regblock): Declare.
14084 * regcache.c (init_register_cache): New.
14085 (new_register_cache): Use it.
14086 (regcache_cpy): New.
14087 (register_cache_size): New.
14088 (supply_regblock): New.
14089 (regcache_read_pc, regcache_write_pc): New.
14091 * tracepoint.c: New.
14093 * Makefile.in (OBS): Add tracepoint.o.
14094 (tracepoint.o): New rule.
14096 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14098 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14100 (i386-mmx.c): Likewise.
14101 (i386-mmx-linux.o): Likewise.
14102 (i386-mmx-linux.c): Likewise.
14104 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14105 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14106 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14107 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14109 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14110 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14111 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14113 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14115 * Makefile.in (clean): Updated.
14117 (i386-avx.c): Likewise.
14118 (i386-avx-linux.o): Likewise.
14119 (i386-avx-linux.c): Likewise.
14120 (amd64-avx.o): Likewise.
14121 (amd64-avx.c): Likewise.
14122 (amd64-avx-linux.o): Likewise.
14123 (amd64-avx-linux.c): Likewise.
14125 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14126 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14127 (srv_amd64_regobj): Add amd64-avx.o.
14128 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14129 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14130 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14131 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14132 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14133 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14134 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14136 * i387-fp.c: Include "i386-xstate.h".
14138 (i387_cache_to_xsave): Likewise.
14139 (i387_xsave_to_cache): Likewise.
14140 (x86_xcr0): Likewise.
14142 * i387-fp.h (i387_cache_to_xsave): Likewise.
14143 (i387_xsave_to_cache): Likewise.
14144 (x86_xcr0): Likewise.
14146 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14147 * linux-crisv32-low.c (target_regsets): Likewise.
14148 * linux-m68k-low.c (target_regsets): Likewise.
14149 * linux-mips-low.c (target_regsets): Likewise.
14150 * linux-ppc-low.c (target_regsets): Likewise.
14151 * linux-s390-low.c (target_regsets): Likewise.
14152 * linux-sh-low.c (target_regsets): Likewise.
14153 * linux-sparc-low.c (target_regsets): Likewise.
14154 * linux-xtensa-low.c (target_regsets): Likewise.
14156 * linux-low.c: Include <sys/uio.h>.
14157 (regsets_fetch_inferior_registers): Support nt_type.
14158 (regsets_store_inferior_registers): Likewise.
14159 (linux_process_qsupported): New.
14160 (linux_target_ops): Add linux_process_qsupported.
14162 * linux-low.h (regset_info): Add nt_type.
14163 (linux_target_ops): Add process_qsupported.
14165 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14167 (init_registers_i386_avx_linux): New.
14168 (init_registers_amd64_avx_linux): Likewise.
14169 (xmltarget_i386_linux_no_xml): Likewise.
14170 (xmltarget_amd64_linux_no_xml): Likewise.
14171 (PTRACE_GETREGSET): Likewise.
14172 (PTRACE_SETREGSET): Likewise.
14173 (x86_fill_xstateregset): Likewise.
14174 (x86_store_xstateregset): Likewise.
14175 (use_xml): Likewise.
14176 (x86_linux_update_xmltarget): Likewise.
14177 (x86_linux_process_qsupported): Likewise.
14178 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14179 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14180 init_registers_i386_linux here. Call
14181 x86_linux_update_xmltarget.
14182 (the_low_target): Add x86_linux_process_qsupported.
14184 * server.c (handle_query): Call target_process_qsupported.
14186 * target.h (target_ops): Add process_qsupported.
14187 (target_process_qsupported): New.
14189 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14191 * inferiors.c (add_thread): Set last_status kind to
14192 TARGET_WAITKIND_IGNORE.
14193 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14194 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14195 (linux_wait_1): Move `thread' local definition to block that uses
14196 it. Don't NULL initialize `event_child'.
14197 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14198 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14199 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14201 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14203 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14204 an extended waitstatus, or by a watchpoint.
14205 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14206 thread was stepping or has been stopped by a watchpoint.
14208 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14210 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14211 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14212 of another, then delete the previous, and validate all
14214 (validate_inserted_breakpoint): New.
14215 (delete_disabled_breakpoints): New.
14216 (validate_breakpoints): New.
14217 (check_mem_read): Validate breakpoints before trusting their
14218 shadow. Delete disabled breakpoints.
14219 (check_mem_write): Validate breakpoints before trusting they
14220 should be inserted. Delete disabled breakpoints.
14221 * mem-break.h (validate_breakpoints):
14222 * server.c (handle_query): Validate breakpoints when we see a
14225 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14227 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14228 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14229 if we could tell there's a GDB breakpoint at stop_pc.
14230 (need_step_over_p): Don't do a step over if we find a GDB
14231 breakpoint at the resume PC.
14233 * mem-break.c (struct raw_breakpoint): New.
14234 (enum bkpt_type): New type `gdb_breakpoint'.
14235 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14236 fields. New field `raw'.
14237 (find_raw_breakpoint_at): New.
14238 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14239 breakpoint instead.
14240 (set_breakpoint_at): Adjust.
14241 (delete_raw_breakpoint): New.
14242 (release_breakpoint): New.
14243 (delete_breakpoint): Rename to...
14244 (delete_breakpoint_1): ... this. Add proc parameter. Use
14245 release_breakpoint. Return ENOENT.
14246 (delete_breakpoint): Reimplement.
14247 (find_breakpoint_at): Delete.
14248 (find_gdb_breakpoint_at): New.
14249 (delete_breakpoint_at): Delete.
14250 (set_gdb_breakpoint_at): New.
14251 (delete_gdb_breakpoint_at): New.
14252 (gdb_breakpoint_here): New.
14253 (set_reinsert_breakpoint): Use release_breakpoint.
14254 (uninsert_breakpoint): Rename to ...
14255 (uninsert_raw_breakpoint): ... this.
14256 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14257 (reinsert_raw_breakpoint): Change parameter type to
14259 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14261 (check_breakpoints): Adjust. Use release_breakpoint.
14262 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14263 (breakpoint_inserted_here): Ditto.
14264 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14265 Don't trust the breakpoint's shadow if it is not inserted.
14266 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14267 (delete_all_breakpoints): Adjust.
14268 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14269 use delete_breakpoint_1.
14271 * mem-break.h (breakpoints_supported): Delete declaration.
14272 (set_gdb_breakpoint_at): Declare.
14273 (gdb_breakpoint_here): Declare.
14274 (delete_breakpoint_at): Delete.
14275 (delete_gdb_breakpoint_at): Declare.
14277 * server.h (struct raw_breakpoint): Forward declare.
14278 (struct process_info): New field `raw_breakpoints'.
14280 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14283 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14285 * linux-low.c (status_pending_p_callback): Fix comment.
14286 (linux_wait_for_event_1): Move most of the internal breakpoint
14287 handling from here...
14288 (linux_wait_1): ... to here.
14289 (count_events_callback): New.
14290 (select_singlestep_lwp_callback): New.
14291 (select_event_lwp_callback): New.
14292 (cancel_breakpoints_callback): New.
14293 (select_event_lwp): New.
14294 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14295 priority to all LWPs that have had events that should be reported
14296 to the client. Cancel breakpoints when about to reporting the
14297 event to the client, not while stopping lwps. No longer cancel
14298 finished single-steps here.
14299 (cancel_finished_single_step): Delete.
14300 (cancel_finished_single_steps): Delete.
14302 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14304 * mem-break.c (enum bkpt_type): New.
14305 (struct breakpoint): New field `type'.
14306 (set_breakpoint_at): Change return type to struct breakpoint
14307 pointer. Set type to `other_breakpoint' by default.
14308 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14309 in the breakpoint list.
14310 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14311 (reinsert_breakpoint): Rename to ...
14312 (reinsert_raw_breakpoint): ... this.
14313 (reinsert_breakpoints_at): Adjust.
14314 * mem-break.h (struct breakpoint): Declare.
14315 (set_breakpoint_at): Change return type to struct breakpoint
14318 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14320 * server.c (handle_query): Assign, not compare.
14322 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14324 Teach linux gdbserver to step-over-breakpoints.
14326 * linux-low.c (can_hardware_single_step): New.
14327 (supports_breakpoints): New.
14328 (handle_extended_wait): If stopping threads, read the stop pc of
14329 the new cloned LWP.
14331 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14332 low target doesn't support retrieving the PC.
14333 (add_lwp): Set last_resume_kind to resume_continue.
14334 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14335 (linux_attach): Don't clear stop_expected. Set the lwp's
14336 last_resume_kind to resume_stop.
14337 (linux_detach_one_lwp): Don't check for removed breakpoints.
14338 (check_removed_breakpoint): Delete.
14339 (status_pending_p): Rename to ...
14340 (status_pending_p_callback): ... this. Don't check for removed
14341 breakpoints. Don't consider threads that are stopped from GDB's
14343 (linux_wait_for_lwp): Always read the stop_pc here.
14344 (cancel_breakpoint): New.
14345 (step_over_bkpt): New global.
14346 (linux_wait_for_event_1): Implement stepping over breakpoints.
14347 (gdb_wants_lwp_stopped): New.
14348 (gdb_wants_all_stopped): New.
14349 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14350 single-step traps here. Store the thread's last reported target
14352 (send_sigstop): Don't clear stop_expected. Always set it,
14354 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14355 (cancel_finished_single_step): New.
14356 (cancel_finished_single_steps): New.
14357 (wait_for_sigstop): Don't cancel finished single-step traps here.
14358 (linux_resume_one_lwp): Don't check for removed breakpoints.
14359 Don't set `step' on non-hardware step archs.
14360 (linux_set_resume_request): Ignore resume_stop requests if already
14361 stopping or stopped. Set the lwp's last_resume_kind.
14362 (resume_status_pending_p): Don't check for removed breakpoints.
14363 (need_step_over_p): New.
14364 (start_step_over): New.
14365 (finish_step_over): New.
14366 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14367 requests. Clear the thread's last reported target waitstatus.
14368 Don't use the `suspended' flag. Don't consider pending breakpoints.
14369 (linux_resume): Start a step-over if necessary.
14370 (proceed_one_lwp): New.
14371 (proceed_all_lwps): New.
14372 (unstop_all_lwps): New.
14373 * linux-low.h (struct lwp_info): Rewrite comment for the
14374 `suspended' flag. Add the `stop_pc' field. Delete the
14375 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14376 Add `'last_resume_kind' and `need_step_over' fields.
14377 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14378 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14379 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14380 (set_raw_breakpoint_at): New.
14381 (set_breakpoint_at): Rewrite to use it.
14382 (reinsert_breakpoint_handler): Delete.
14383 (set_reinsert_breakpoint): New.
14384 (reinsert_breakpoint_by_bp): Delete.
14385 (delete_reinsert_breakpoints): New.
14386 (uninsert_breakpoint): Rewrite.
14387 (uninsert_breakpoints_at): New.
14388 (reinsert_breakpoint): Rewrite.
14389 (reinsert_breakpoints_at): New.
14390 (check_breakpoints): Rewrite.
14391 (breakpoint_here): New.
14392 (breakpoint_inserted_here): New.
14393 (check_mem_read): Adjust.
14394 * mem-break.h (breakpoints_supported, breakpoint_here)
14395 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14396 (reinsert_breakpoint_by_bp): Delete declaration.
14397 (delete_reinsert_breakpoints): Declare.
14398 (reinsert_breakpoint): Delete declaration.
14399 (reinsert_breakpoints_at): Declare.
14400 (uninsert_breakpoint): Delete declaration.
14401 (uninsert_breakpoints_at): Declare.
14402 (check_breakpoints): Adjust prototype.
14403 * server.h: Adjust include order.
14404 (struct thread_info): Declare here. Add a `last_status' field.
14406 2010-03-23 Michael Snyder <msnyder@vmware.com>
14408 * server.c (crc32): New function.
14409 (handle_query): Add handling for 'qCRC:' request.
14411 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14413 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14414 lwp had been stopped by a watchpoint.
14416 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14418 * server.h (internal_error): Declare.
14419 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14420 * utils.c (internal_error): New function.
14422 2010-03-15 Andreas Schwab <schwab@redhat.com>
14424 * configure.srv: Fix typo setting srv_regobj.
14426 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14428 * linux-low.c (fetch_register): Avoid passing a non string literal
14430 (usr_store_inferior_registers): Ditto.
14432 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14434 * linux-low.c (linux_write_memory): Bail out early if peeking
14437 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14439 * linux-low.h (struct lwp_info): New fields
14440 `stopped_by_watchpoint' and `stopped_data_address'.
14441 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14442 here, and cache them in the lwp object.
14443 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14445 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14447 (linux_stopped_by_watchpoint): Rewrite.
14448 (linux_stopped_data_address): Rewrite.
14450 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14452 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14453 switching the current inferior, not before.
14455 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14457 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14458 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14459 i386-linux.c and amd64-linux.c.
14460 (reg-i386.o): Removed.
14461 (reg-i386.c): Likewise.
14462 (reg-i386-linux.o): Likewise.
14463 (reg-i386-linux.c): Likewise.
14464 (reg-x86-64.o): Likewise.
14465 (reg-x86-64.c): Likewise.
14466 (reg-x86-64-linux.o): Likewise.
14467 (reg-x86-64-linux.c): Likewise.
14469 (i386.c): Likewise.
14470 (i386-linux.o): Likewise.
14471 (i386-linux.c): Likewise.
14472 (amd64.o): Likewise.
14473 (amd64.c): Likewise.
14474 (amd64-linux.o): Likewise.
14475 (amd64-linux.c): Likewise.
14477 * configure.srv (srv_i386_regobj): New.
14478 (srv_i386_linux_regobj): Likewise.
14479 (srv_amd64_regobj): Likewise.
14480 (srv_amd64_linux_regobj): Likewise.
14481 (srv_i386_32bit_xmlfiles): Likewise.
14482 (srv_i386_64bit_xmlfiles): Likewise.
14483 (srv_i386_xmlfiles): Likewise.
14484 (srv_amd64_xmlfiles): Likewise.
14485 (srv_i386_linux_xmlfiles): Likewise.
14486 (srv_amd64_linux_xmlfiles): Likewise.
14487 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14488 srv_xmlfiles to $srv_i386_xmlfiles.
14489 (i[34567]86-*-mingw32ce*): Likewise.
14490 (i[34567]86-*-mingw*): Likewise.
14491 (i[34567]86-*-nto*): Likewise.
14492 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14493 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14494 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14495 (x86_64-*-linux*): Likewise.
14497 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14498 (init_registers_amd64_linux): New.
14499 (x86_arch_setup): Replace init_registers_x86_64_linux with
14500 init_registers_amd64_linux.
14502 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14504 * configure.ac: Check for libdl. If it is not available link against
14505 static libthread_db.
14506 * configure: Regenerate.
14508 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14512 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14513 handing a read watchpoint.
14514 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14516 2010-02-12 Doug Evans <dje@google.com>
14518 * linux-low.c (linux_supports_tracefork_flag): Document.
14519 (linux_look_up_symbols): Add comment.
14521 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14523 * regcache.c (supply_register): Clear regcache if buf is NULL.
14525 2010-02-02 Nicolas Roche <roche@sourceware.org>
14526 Joel Brobecker <brobecker@adacore.com>
14528 * inferiors.c (find_inferior): Add function documentation.
14529 (unloaded_dll): Handle the case where the unloaded dll has not
14530 been previously registered in the dll list.
14532 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14534 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14535 (thumb2_breakpoint): New.
14536 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14538 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14540 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14541 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14544 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14546 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14548 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14550 * linux-s390-low.c (s390_collect_ptrace_register)
14551 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14553 2010-01-21 Doug Evans <dje@google.com>
14555 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14556 (PTRACE_ARG4_TYPE): New macro.
14557 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14558 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14559 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14560 (usr_store_inferior_registers): Ditto.
14561 (linux_read_memory, linux_write_memory): Ditto.
14562 (linux_test_for_tracefork): Ditto.
14564 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14565 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14567 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14569 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14572 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14574 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14575 prototype to take a regcache. Adjust.
14577 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14579 * regcache.h (struct thread_info): Forward declare.
14580 (struct regcache): New.
14581 (new_register_cache): Adjust prototype.
14582 (get_thread_regcache): Declare.
14583 (free_register_cache): Adjust prototype.
14584 (registers_to_string, registers_from_string): Ditto.
14585 (supply_register, supply_register_by_name, collect_register)
14586 (collect_register_as_string, collect_register_by_name): Ditto.
14587 * regcache.c (struct inferior_regcache_data): Delete.
14588 (get_regcache): Rename to ...
14589 (get_thread_regcache): ... this. Adjust. Switch inferior before
14590 fetching registers.
14591 (regcache_invalidate_one): Adjust.
14592 (regcache_invalidate): Fix prototype.
14593 (new_register_cache): Return the new register cache.
14594 (free_register_cache): Change prototype.
14595 (realloc_register_cache): Adjust.
14596 (registers_to_string): Change prototype to take a regcache. Adjust.
14597 (registers_from_string): Ditto.
14598 (register_data): Ditto.
14599 (supply_register): Ditto.
14600 (supply_register_by_name): Ditto.
14601 (collect_register): Ditto.
14602 (collect_register_as_string): Ditto.
14603 (collect_register_by_name): Ditto.
14604 * server.c (process_serial_event): Adjust.
14605 * linux-low.h (regset_fill_func, regset_store_func): Change
14607 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14609 * linux-low.c (get_stop_pc): Adjust.
14610 (check_removed_breakpoint): Adjust.
14611 (linux_wait_for_event): Adjust.
14612 (linux_resume_one_lwp): Adjust.
14613 (fetch_register): Add regcache parameter. Adjust.
14614 (usr_store_inferior_registers): Ditto.
14615 (regsets_fetch_inferior_registers): Ditto.
14616 (regsets_store_inferior_registers): Ditto.
14617 (linux_fetch_registers, linux_store_registers): Ditto.
14618 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14620 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14622 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14623 prototype to take a regcache.
14624 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14625 * remote-utils.c (convert_ascii_to_int, outreg)
14626 (prepare_resume_reply): Change prototype to take a regcache.
14628 * target.h (struct target_ops) <fetch_registers, store_registers>:
14629 Change prototype to take a regcache.
14630 (fetch_inferior_registers, store_inferior_registers): Change
14631 prototype to take a regcache. Adjust.
14632 * proc-service.c (ps_lgetregs): Adjust.
14633 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14634 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14635 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14636 take a regcache. Adjust.
14637 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14638 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14639 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14640 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14641 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14642 (cris_cannot_fetch_register):
14643 (cris_breakpoint_at): Change prototype to take a regcache.
14645 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14646 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14647 to take a regcache. Adjust.
14648 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14650 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14651 take a regcache. Adjust.
14652 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14653 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14654 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14655 * linux-mips-low.c (mips_get_pc):
14656 (mips_set_pc): Change prototype to take a regcache. Adjust.
14657 (mips_reinsert_addr): Adjust.
14658 (mips_collect_register): Change prototype to take a regcache.
14660 (mips_supply_register):
14661 (mips_collect_register_32bit, mips_supply_register_32bit)
14662 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14663 (mips_store_fpregset): Ditto.
14664 * linux-ppc-low.c (ppc_supply_ptrace_register)
14665 (ppc_supply_ptrace_register): Ditto.
14666 (parse_spufs_run): Adjust.
14667 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14668 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14669 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14670 take a regcache. Adjust.
14671 * linux-s390-low.c (s390_collect_ptrace_register)
14672 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14673 (s390_set_pc): Change prototype to take a regcache. Adjust.
14674 (s390_arch_setup): Adjust.
14675 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14676 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14677 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14678 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14679 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14681 (sparc_breakpoint_at): Adjust.
14682 * linux-xtensa-low.c (xtensa_fill_gregset):
14683 (xtensa_store_gregset):
14684 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14685 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14686 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14687 prototype to take a regcache. Adjust.
14688 * win32-arm-low.c (arm_fetch_inferior_register)
14689 (arm_store_inferior_register): Change prototype to take a
14691 * win32-i386-low.c (i386_fetch_inferior_register)
14692 (i386_store_inferior_register): Change prototype to take a
14694 * win32-low.c (child_fetch_inferior_registers)
14695 (child_store_inferior_registers): Change prototype to take a
14697 (win32_wait): Adjust.
14698 (win32_fetch_inferior_registers): Change prototype to take a
14700 (win32_store_inferior_registers): Adjust.
14701 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14702 store_inferior_register>: Change prototype to take a regcache.
14704 2010-01-20 Doug Evans <dje@google.com>
14706 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14708 (linux_wait_for_event1, linux_init_signals): Ditto.
14709 (W_STOPCODE): Provide definition if missing.
14711 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14713 * linux-low.c (linux_core_of_thread): New.
14714 (compare_ints, show_process, list_threads): New.
14715 (linux_qxfer_osdata): Report threads and cores.
14716 (linux_target_op): Register linux_core_of_thread.
14717 * remote-utils.c (prepare_resume_reply): Report the core.
14718 (buffer_xml_printf): Support %d specifier.
14719 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14721 (handle_query): Handle qXfer:threads. Announce availability
14723 * target.h (struct target_ops): New field core_of_thread.
14725 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14727 * Makefile.in (clean): Remove new generated files.
14728 (reg-s390.o, reg-s390.c): Remove rules.
14729 (reg-s390x.o, reg-s390x.c): Likewise.
14730 (s390-linux32.o, s390-linux32.c): Add rules.
14731 (s390-linux64.o, s390-linux64.c): Likewise.
14732 (s390x-linux64.o, s390x-linux64.c): Likewise.
14733 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14734 * linux-s390-low.c: Include <elf.h>.
14735 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14736 (init_registers_s390): Remove prototype.
14737 (init_registers_s390x): Likewise.
14738 (init_registers_s390_linux32): Add prototype.
14739 (init_registers_s390_linux64): Likewise.
14740 (init_registers_s390x_linux64): Likewise.
14741 (s390_num_regs_3264): New define.
14742 (s390_regmap_3264): New global variable.
14743 (s390_cannot_fetch_register): Remove obsolete check.
14744 (s390_cannot_store_register): Likewise.
14745 (s390_collect_ptrace_register): Handle upper/lower register halves.
14746 (s390_supply_ptrace_register): Likewise.
14747 (s390_fill_gregset): Update to register number changes.
14748 (s390_get_hwcap): New routine.
14749 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14750 Install appropriate regmap and register set.
14752 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14754 * server.c (gdbserver_version): Update copyright year to 2010.
14755 * gdbreplay.c (gdbreplay_version): Likewise.
14757 2009-12-28 Doug Evans <dje@google.com>
14759 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14760 elf/external.h. Include <elf.h> instead but only if necessary.
14762 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14764 * linux-low.c (linux_remove_process): Remove `detaching'
14765 parameter. Don't release/detach from thread_db here.
14766 (linux_kill): Release/detach from thread_db here, ...
14767 (linux_detach): ... and here, before actually detaching.
14768 (linux_wait_1): ... and here, when a process exits.
14769 * thread-db.c (any_thread_of): New.
14770 (thread_db_free): Switch the current inferior to a thread of the
14773 2009-12-21 Doug Evans <dje@google.com>
14775 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14777 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14778 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14779 warning ifndef __NR_tkill. Move setting of errno there too.
14780 Delete unnecessary resetting of errno after syscall.
14781 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14783 * configure.ac: Check for dladdr.
14784 * config.in: Regenerate.
14785 * configure: Regenerate.
14786 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14787 (try_thread_db_load): Update.
14789 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14791 2009-12-18 Doug Evans <dje@google.com>
14793 * event-loop.c: Include unistd.h if it exists.
14795 * linux-low.c (my_waitpid): Move definition away from being in
14796 between linux_tracefork_child/linux_test_for_tracefork.
14798 * gdb_proc_service.h (psaddr_t): Fix type.
14799 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14800 signature to match glibc.
14802 2009-12-16 Doug Evans <dje@google.com>
14804 * linux-low.c (linux_read_memory): Fix argument to read.
14806 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14808 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14809 events, don't leave current_inferior pointing at null.
14811 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14813 * win32-low.c (LOG): Delete.
14814 (OUTMSG): Output to stderr.
14815 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14816 on compile time LOG macro.
14817 (win32_wait): Fix debug output.
14819 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14821 * win32-low.c (win32_add_one_solib): If the dll name is
14822 "ntdll.dll", prepend the system directory to the dll path.
14824 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14826 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14828 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14829 Vladimir Prus <vladimir@codesourcery.com>
14831 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14832 * configure.ac: Check for __mcoldfire__ and set
14833 gdb_cv_m68k_is_coldfire.
14834 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14835 reg-cf.o and reg-m68k.o.
14836 * configure: Regenerated.
14838 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14840 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14841 Pass it to thread_db_free.
14842 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14843 proper `detaching' argument to linux_remove_process.
14844 * linux-low.h (thread_db_free): Add `detaching' parameter.
14845 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14847 (thread_db_free): Add `detaching' parameter. Only
14848 call td_ta_clear_event if detaching from process.
14850 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14852 * thread-db.c (thread_db_free): Fix typo.
14854 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14857 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14859 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14861 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14862 with an i686 compiler.
14863 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14865 * configure: Rebuilt.
14867 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14871 * server.c (handle_search_memory_1): Correct read_addr initialization
14872 in loop for searching subsequent chunks.
14874 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14876 * configure.ac: New --with-libthread-db option.
14877 * thread-db.c: Allow direct dependence on libthread_db.
14878 (thread_db_free): Adjust.
14879 * config.in: Regenerate.
14880 * configure: Likewise.
14882 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14885 * thread-db.c (attach_thread): New function.
14886 (maybe_attach_thread): Return success/failure.
14887 (find_new_threads_callback): Adjust.
14888 (thread_db_find_new_threads): Loop until no new threads.
14890 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14892 * proc-service.c (ps_lgetregs): Formatting.
14894 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14896 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14897 * configure.ac: Adjust.
14898 * linux-low.h (struct process_info_private): Move members to struct
14900 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14901 * linux-low.c (linux_remove_process): Adjust.
14902 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14903 * server.c (handle_query): Move code ...
14904 (handle_monitor_command): ... here. New function.
14905 * target.h (struct target_ops): New member.
14906 * thread-db.c (struct thread_db): New.
14907 (libthread_db_search_path): New variable.
14908 (thread_db_create_event, thread_db_enable_reporting)
14909 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14910 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14911 (try_thread_db_load_1, dladdr_to_soname): New functions.
14912 (try_thread_db_load, thread_db_load_search): New functions.
14913 (thread_db_init): Search for libthread_db.
14914 (thread_db_free): New function.
14915 (thread_db_handle_monitor_command): Likewise.
14916 * config.in: Regenerate.
14917 * configure: Regenerate.
14919 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14921 * spu-low.c (spu_kill): Wait for inferior to terminate.
14922 Call clear_inferiors.
14923 (spu_detach): Call clear_inferiors.
14925 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14927 * aclocal.m4: Regenerate.
14928 * config.in: Likewise.
14929 * configure: Likewise.
14931 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14933 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14934 (parse_spufs_run): New function.
14935 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14936 (ppc_breakpoint_at): Handle SPU breakpoints.
14938 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14940 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14941 (SPUFS_MAGIC): Define.
14942 (spu_enumerate_spu_ids): New function.
14943 (linux_qxfer_spu): New function.
14944 (linux_target_ops): Install linux_qxfer_spu.
14946 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14948 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14949 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14950 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14951 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14952 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14953 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14954 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14955 (init_registers_powerpc_cell32l): Add prototype.
14956 (init_registers_powerpc_cell64l): Likewise.
14957 (ppc_arch_setup): Detect Cell/B.E. architecture.
14959 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14961 * Makefile.in (datarootdir): New variable.
14963 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14965 * linux-low.c (linux_write_memory): Update debugging output.
14966 * Makefile.in (clean): Add new descriptions.
14967 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14968 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14969 * configure.srv: Add new files for arm*-*-linux*.
14970 * linux-arm-low.c: Add new declarations.
14971 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14972 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14973 (HWCAP_VFPv3D16): New.
14974 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14975 instead of __IWMMXT__.
14976 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14977 (arm_arch_setup): New.
14978 (target_regsets): Remove #ifdef. Add VFP regset.
14979 (the_low_target): Use arm_arch_setup.
14981 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14983 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14984 the main thread again.
14986 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14988 Adding Neutrino gdbserver.
14989 * configure: Regenerated.
14990 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14991 * configure.srv (i[34567]86-*-nto*): New target.
14992 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14993 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14994 (nto_comctrl) [__QNX__]: New function.
14995 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14997 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14999 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15002 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15003 Pedro Alves <pedro@codesourcery.com>
15005 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15006 don't support CONTEXT_EXTENDED_REGISTERS.
15007 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15008 (the_low_target): Install them.
15009 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15010 failing with ERROR_PIPE_NOT_CONNECTED.
15012 2009-06-30 Doug Evans <dje@google.com>
15013 Pierre Muller <muller@ics.u-strasbg.fr>
15015 Add h/w watchpoint support to x86-linux, win32-i386.
15016 * Makefile.in (SFILES): Add i386-low.c
15017 (i386_low_h): Define.
15018 (i386-low.o): Add dependencies.
15019 (linux-x86-low.o): Add i386-low.h dependency.
15020 (win32-i386-low.o): Ditto.
15021 * i386-low.c: New file.
15022 * i386-low.h: New file.
15023 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15024 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15025 * linux-low.c (linux_add_process): Initialize arch_private.
15026 (linux_remove_process): Free arch_private.
15027 (add_lwp): Initialize arch_private.
15028 (delete_lwp): Free arch_private.
15029 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15031 * linux-low.h (process_info_private): New member arch_private.
15032 (lwp_info): New member arch_private.
15033 (linux_target_ops): New members new_process, new_thread,
15035 (ptid_of): New macro.
15036 * linux-x86-low.c: Include stddef.h, i386-low.h.
15037 (arch_process_info): New struct.
15038 (arch_lwp_info): New struct.
15039 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15040 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15041 (i386_dr_low_get_status): New function.
15042 (x86_insert_point, x86_remove_point): New functions.
15043 (x86_stopped_by_watchpoint): New function.
15044 (x86_stopped_data_address): New function.
15045 (x86_linux_new_process, x86_linux_new_thread): New functions.
15046 (x86_linux_prepare_to_resume): New function.
15047 (the_low_target): Add entries for insert_point, remove_point,
15048 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15050 * server.c (debug_hw_points): New global.
15051 (monitor_show_help): Document set debug-hw-points.
15052 (handle_query): Process "set debug-hw-points".
15053 * server.h (debug_hw_points): Declare.
15054 (paddress): Declare.
15055 * utils.c (NUMCELLS, CELLSIZE): New macros.
15056 (get_sell, xsnprintf, paddress): New functions.
15057 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15058 remove_point, stopped_by_watchpoint, stopped_data_address.
15059 * win32-i386-low.c: Include i386-low.h.
15060 (debug_reg_state): Replaces dr.
15061 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15062 (i386_dr_low_get_status): New function.
15063 (i386_insert_point, i386_remove_point): New functions.
15064 (i386_stopped_by_watchpoint): New function.
15065 (i386_stopped_data_address): New function.
15066 (i386_initial_stuff): Update.
15067 (get_thread_context,set_thread_context,i386_thread_added): Update.
15068 (the_low_target): Add entries for insert_point,
15069 remove_point, stopped_by_watchpoint, stopped_data_address.
15070 * win32-low.c (win32_insert_watchpoint): New function.
15071 (win32_remove_watchpoint): New function.
15072 (win32_stopped_by_watchpoint): New function.
15073 (win32_stopped_data_address): New function.
15074 (win32_target_ops): Add entries for insert_watchpoint,
15075 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15076 * win32-low.h (win32_target_ops): New members insert_point,
15077 remove_point, stopped_by_watchpoint, stopped_data_address.
15079 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15081 * server.c (process_serial_event): Re-return unsupported, not
15082 error, if the type isn't recognized. Re-allow supporting only
15083 insert or remove packets. Also call require_running for
15084 breakpoints. Add missing break statement to default case. Tidy.
15085 * target.h (struct target_ops): Rename insert_watchpoint to
15086 insert_point, and remove_watchpoint to remove_point.
15088 * linux-low.h (struct linux_target_ops): Likewise.
15089 * linux-low.c (linux_insert_watchpoint): Rename to ...
15090 (linux_insert_point): ... this. Adjust.
15091 (linux_remove_watchpoint): Rename to ...
15092 (linux_remove_point): ... this. Adjust.
15093 (linux_target_ops): Adjust.
15094 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15095 (cris_insert_point): ... this.
15096 (cris_remove_watchpoint): Rename to ...
15097 (cris_remove_point): ... this.
15098 (the_low_target): Adjust.
15100 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15102 * server.c (handle_v_kill): Pass signal_pid to
15103 kill_inferior if multi_process is zero.
15105 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15107 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15108 * target.h (target_ops): Comment for *_watchpoint to make it clear
15109 the functions can get types '0' and '1'.
15111 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15113 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15114 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15115 * regcache.c (get_regcache): Likewise.
15116 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15117 * win32-low.c (child_fetch_inferior_registers): Remove check for
15120 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15121 Pedro Alves <pedro@codesourcery.com>
15123 * target.h (struct target_ops) <supports_multi_process>: New
15125 (target_supports_multi_process): New.
15126 * server.c (handle_query): Even if GDB reports support, only
15127 enable multi-process if the target also supports it. Report
15128 multi-process support only if the target backend supports it.
15129 * linux-low.c (linux_supports_multi_process): New function.
15130 (linux_target_ops): Install it as target_supports_multi_process
15133 2009-05-24 Doug Evans <dje@google.com>
15135 Global renaming of find_thread_pid to find_thread_ptid.
15136 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15137 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15138 All callers updated.
15140 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15141 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15144 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15145 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15146 (linux_resume_one_lwp): Ditto.
15148 2009-05-23 Doug Evans <dje@google.com>
15150 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15151 from struct inferior_list_entry * to struct lwp_info *.
15152 All callers updated.
15154 2009-05-13 Doug Evans <dje@google.com>
15156 * linux-x86-low.c: Don't include assert.h.
15157 (x86_siginfo_fixup): Use fatal, not assert.
15158 (x86_arch_setup): Fix comment.
15160 2009-05-12 Doug Evans <dje@google.com>
15162 Biarch support for i386/amd64 gdbserver.
15163 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15164 Add linux-x86-low.c.
15165 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15166 (linux-x86-low.o): Add.
15167 * linux-x86-64-low.c: Delete.
15168 * linux-i386-low.c: Delete.
15169 * linux-x86-low.c: New file.
15170 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15172 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15174 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15175 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15176 (linux_child_pid_to_exec_file): New function.
15177 (elf_64_header_p, elf_64_file_p): New functions.
15178 (siginfo_fixup): New function.
15179 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15180 give target a chance to convert layout.
15181 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15182 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15184 2009-05-07 Doug Evans <dje@google.com>
15186 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15187 (regsets_store_inferior_registers): Ditto.
15189 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15193 * linux-low.c (must_set_ptrace_flags): Delete.
15194 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15196 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15197 `lwp->must_set_ptrace_flags' instead.
15198 (linux_wait_for_event_1): Set ptrace options here.
15199 (linux_wait_1): ... not here.
15201 2009-04-30 Doug Evans <dje@google.com>
15203 * inferiors.c (started_inferior_callback): New function.
15204 (attached_inferior_callback): New function.
15205 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15206 * server.c (print_started_pid, print_attached_pid): New functions.
15207 (detach_or_kill_for_exit): New function.
15208 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15209 * server.h (have_started_inferiors_p): Declare.
15210 (have_attached_inferiors_p): Declare.
15212 * inferiors.c (remove_process): Fix memory leak, free process.
15213 * linux-low.c (linux_remove_process): New function.
15214 (linux_kill): Call it instead of remove_process.
15215 (linux_detach, linux_wait_1): Ditto.
15217 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15219 * configure.srv: Add x86 Windows CE target.
15221 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15223 * inferiors.c (get_thread_process): Make global.
15224 * server.h (get_thread_process): Add prototype.
15225 * thread-db.c (find_one_thread): Use get_thread_process
15226 instead of current_process.
15227 (thread_db_get_tls_address): Do not crash if called when
15228 thread layer is not yet initialized.
15230 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15232 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15233 * spu-low.c (current_tid): Rename to ...
15234 (current_ptid): ... this.
15235 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15236 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15237 ptid_get_lwp (current_ptid) instead of current_tid.
15238 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15239 instead of current_tid. Use find_process_pid to verify pid
15240 argument is valid. Pass proper argument to remove_process.
15241 (spu_thread_alive): Compare current_ptid instead of current_tid.
15242 (spu_resume): Likewise.
15244 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15246 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15249 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15251 Implement the multiprocess extensions, and add linux multiprocess
15254 * server.h (ULONGEST): Declare.
15255 (struct ptid, ptid_t): New.
15256 (minus_one_ptid, null_ptid): Declare.
15257 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15258 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15259 (struct inferior_list_entry): Change `id' type from unsigned from
15261 (struct sym_cache, struct breakpoint, struct
15262 process_info_private): Forward declare.
15263 (struct process_info): Declare.
15264 (current_process): Declare.
15265 (all_processes): Declare.
15266 (initialize_inferiors): Declare.
15267 (add_thread): Adjust to use ptid_t.
15268 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15269 (add_process, remove_process, find_thread_pid): Declare.
15270 (find_inferior_id): Adjust to use ptid_t.
15271 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15272 (multi_process): Declare.
15273 (push_event): Adjust to use ptid_t.
15274 (read_ptid, write_ptid): Declare.
15275 (prepare_resume_reply): Adjust to use ptid_t.
15276 (clear_symbol_cache): Declare.
15277 * inferiors.c (all_processes): New.
15278 (null_ptid, minus_one_ptid): New.
15279 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15280 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15281 (add_thread): Change unsigned long to ptid. Remove gdb_id
15283 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15284 (gdb_id_to_thread): Rename to ...
15285 (find_thread_pid): ... this. Change unsigned long to ptid.
15286 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15287 (loaded_dll, pull_pid_from_list): Adjust.
15288 (add_process, remove_process, find_process_pid)
15289 (get_thread_process, current_process, initialize_inferiors): New.
15290 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15291 (struct target_waitstatus) <related_pid>: Ditto.
15292 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15293 return type to int.
15294 (struct target_ops) <join>: Add `pid' argument.
15295 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15296 (struct target_ops) <wait>: Add `ptid' field. Change return type
15298 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15299 (mywait): Add `ptid' argument. Change return type to ptid_t.
15300 (target_pid_to_str): Declare.
15301 * target.c (set_desired_inferior): Adjust to use ptids.
15302 (mywait): Add new `ptid' argument. Adjust.
15303 (target_pid_to_str): New.
15304 * mem-break.h (free_all_breakpoints): Declare.
15305 * mem-break.c (breakpoints): Delelete.
15306 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15307 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15308 to use per-process breakpoint list.
15309 (free_all_breakpoints): New.
15310 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15311 (symbol_cache, all_symbols_looked_up): Delete.
15313 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15315 (prepare_resume_reply): Change ptid argument's type from unsigned
15316 long to ptid_t. Adjust. Implement W;process and X;process.
15317 (free_sym_cache, clear_symbol_cache): New.
15318 (look_up_one_symbol): Adjust to per-process symbol cache. *
15319 * server.c (cont_thread, general_thread, step_thread): Change type
15321 (attached): Delete.
15322 (multi_process): New.
15323 (last_ptid): Change type to ptid_t.
15324 (struct vstop_notif) <ptid>: Change type to ptid_t.
15325 (queue_stop_reply, push_event): Change `ptid' argument's type to
15327 (discard_queued_stop_replies): Add `pid' argument.
15328 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15329 changes. Don't reference the `attached' global.
15330 (attach_inferior): Adjust to mywait interface changes.
15331 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15332 features. Handle and report "multiprocess+". Handle
15334 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15336 (handle_v_kill): New.
15337 (handle_v_stopped): Adjust to use target_pid_to_str.
15338 (handle_v_requests): Allow multiple attaches and runs when
15339 multiprocess extensions are in effect. Handle "vKill".
15340 (myresume): Adjust to use ptids.
15341 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15342 (handle_status): Adjust to discard_queued_stop_replies interface
15344 (first_thread_of, kill_inferior_callback)
15345 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15346 (main): Call initialize_inferiors. Adjust to use ptids, killing
15347 and detaching from all inferiors. Handle multiprocess packet
15349 * linux-low.h: Include gdb_proc_service.h.
15350 (struct process_info_private): New.
15351 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15352 <lwpid_of>: Use ptid_get_lwp.
15353 (get_lwp_thread): Adjust.
15354 (struct lwp_info): Add `dead' member.
15355 (find_lwp_pid): Declare.
15356 * linux-low.c (thread_db_active): Delete.
15357 (new_inferior): Adjust comment.
15358 (inferior_pid): Delete.
15359 (linux_add_process): New.
15360 (handle_extended_wait): Adjust.
15361 (add_lwp): Change unsigned long to ptid.
15362 (linux_create_inferior): Add process to processes table. Adjust
15363 to use ptids. Don't set new_inferior here.
15364 (linux_attach_lwp): Rename to ...
15365 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15366 it. Adjust to use ptids.
15367 (linux_attach_lwp): New.
15368 (linux_attach): Add process to processes table. Don't set
15370 (struct counter): New.
15371 (second_thread_of_pid_p, last_thread_of_process_p): New.
15372 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15373 multiple processes.
15374 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15375 processes. Remove process from process table.
15376 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15377 to multiple processes.
15378 (any_thread_of): New.
15379 (linux_detach): Add `pid' argument, and handle it. Remove process
15380 from processes table.
15381 (linux_join): Add `pid' argument. Handle it.
15382 (linux_thread_alive): Change unsighed long argument to ptid_t.
15383 Consider dead lwps as not being alive.
15384 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15385 threads we're not interested in.
15386 (same_lwp, find_lwp_pid): New.
15387 (linux_wait_for_lwp): Change `pid' argument's type from int to
15389 (linux_wait_for_event): Rename to ...
15390 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15391 from int to ptid_t. Adjust.
15392 (linux_wait_for_event): New.
15393 (linux_wait_1): Add `ptid' argument. Change return type to
15394 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15395 that exit from the process table.
15396 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15398 (mark_lwp_dead): New.
15399 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15400 stopping all threads, mark its main lwp as dead.
15401 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15403 (fetch_register, usr_store_inferior_registers)
15404 (regsets_fetch_inferior_registers)
15405 (regsets_store_inferior_registers, linux_read_memory)
15406 (linux_write_memory): Inline `inferior_pid'.
15407 (linux_look_up_symbols): Adjust to use per-process
15408 `thread_db_active'.
15409 (linux_request_interrupt): Adjust to use ptids.
15410 (linux_read_auxv): Inline `inferior_pid'.
15411 (initialize_low): Don't reference thread_db_active.
15412 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15413 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15414 (ps_getpid): Return the pid of the current inferior.
15415 * thread-db.c (proc_handle, thread_agent): Delete.
15416 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15418 (find_one_thread): Change argument type to ptid_t. Adjust to
15420 (maybe_attach_thread): Adjust to per-process data and ptids.
15421 (thread_db_find_new_threads): Ditto.
15422 (thread_db_init): Ditto.
15423 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15424 processes table. Adjust to use ptids.
15425 (spu_kill, spu_detach): Adjust interface. Remove process from
15427 (spu_join, spu_thread_alive): Adjust interface.
15428 (spu_wait): Adjust interface. Remove process from processes
15429 table. Adjust to use ptids.
15430 * win32-low.c (current_inferior_tid): Delete.
15431 (current_inferior_ptid): New.
15432 (debug_event_ptid): New.
15433 (thread_rec): Take a ptid. Adjust.
15434 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15435 (child_delete_thread): Ditto.
15436 (do_initial_child_stuff): Add `attached' argument. Add process to
15438 (child_fetch_inferior_registers, child_store_inferior_registers):
15440 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15441 (win32_attach): Pass 1 to do_initial_child_stuff.
15442 (win32_kill): Adjust interface. Remove process from processes
15444 (win32_detach): Ditto.
15445 (win32_join): Adjust interface.
15446 (win32_thread_alive): Take a ptid.
15447 (win32_resume): Adjust to use ptids.
15448 (get_child_debug_event): Ditto.
15449 (win32_wait): Adjust interface. Remove exiting process from
15452 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15454 Non-stop mode support.
15456 * server.h (non_stop): Declare.
15457 (gdb_client_data, handler_func): Declare.
15458 (delete_file_handler, add_file_handler, start_event_loop):
15460 (handle_serial_event, handle_target_event, push_event)
15461 (putpkt_notif): Declare.
15462 * target.h (enum resume_kind): New.
15463 (struct thread_resume): Replace `step' field by `kind' field.
15464 (TARGET_WNOHANG): Define.
15465 (struct target_ops) <wait>: Add `options' argument.
15466 <supports_non_stop, async, start_non_stop>: New fields.
15467 (target_supports_non_stop, target_async): New.
15468 (start_non_stop): Declare.
15469 (mywait): Add `options' argument.
15470 * target.c (mywait): Add `options' argument. Print child exit
15471 notifications here.
15472 (start_non_stop): New.
15473 * server.c (non_stop, own_buf, mem_buf): New globals.
15474 (struct vstop_notif): New.
15475 (notif_queue): New global.
15476 (queue_stop_reply, push_event, discard_queued_stop_replies)
15477 (send_next_stop_reply): New.
15478 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15480 (attach_inferior): In non-stop mode, don't wait for the target
15482 (handle_general_set): Handle QNonStop.
15483 (handle_query): When handling qC, return the current general
15484 thread, instead of the first thread of the list.
15485 (handle_query): If the backend supports non-stop mode, include
15486 QNonStop+ in the qSupported query response.
15487 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15489 (handle_v_attach, handle_v_run): Handle non-stop mode.
15490 (handle_v_stopped): New.
15491 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15492 (myresume): Adjust to use resume_kind. Handle non-stop.
15493 (queue_stop_reply_callback): New.
15494 (handle_status): Handle non-stop mode.
15495 (main): Clear non_stop flag on reconnection. Use the event-loop.
15496 Refactor serial protocol handling from here ...
15497 (process_serial_event): ... to this new function. When GDB
15498 selects any thread, select one here. In non-stop mode, wait until
15499 GDB acks all pending events before exiting.
15500 (handle_serial_event, handle_target_event): New.
15501 * remote-utils.c (remote_open): Install remote_desc in the event
15503 (remote_close): Remove remote_desc from the event loop.
15504 (putpkt_binary): Rename to...
15505 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15506 (putpkt_binary): New as wrapper around putpkt_binary_1.
15507 (putpkt_notif): New.
15508 (prepare_resume_reply): In non-stop mode, don't change the
15510 * event-loop.c: New.
15511 * Makefile.in (OBJ): Add event-loop.o.
15512 (event-loop.o): New rule.
15514 * linux-low.h (pid_of): Moved here.
15516 (get_lwp_thread): Use lwpid_of.
15517 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15518 * linux-low.c (pid_of): Delete.
15519 (inferior_pid): Use lwpid_of.
15520 (linux_event_pipe): New.
15521 (target_is_async_p): New.
15523 (handle_extended_wait): Use lwpid_of.
15524 (add_lwp): Don't set lwpid field.
15525 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15526 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15527 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15528 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15529 first. Adjust to linux_wait_for_event interface changes. Use
15531 (linux_detach): Don't delete the main lwp here.
15532 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15533 (status_pending_p): Don't consider explicitly suspended lwps.
15534 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15535 pointer. Add OPTIONS argument. Change return type to int. Use
15536 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15537 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15538 pointer. Add status pointer argument. Return a pid instead of a
15539 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15540 changes. In non-stop mode, don't switch to a random thread.
15541 (linux_wait): Rename to...
15542 (linux_wait_1): ... this. Add target_options argument, and handle
15543 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15544 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15545 clean exit and signal exit code. Don't stop all threads in
15546 non-stop mode. In all-stop mode, only stop all threads when
15547 reporting a stop to GDB. Handle explicit thread stop requests.
15548 (async_file_flush, async_file_mark): New.
15550 (send_sigstop): Use lwpid_of.
15551 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15552 interface changes. In non-stop mode, don't switch to a random
15554 (linux_resume_one_lwp): Use lwpid_of.
15555 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15556 (linux_resume_one_thread): ... this. Handle resume_stop. In
15557 non-stop mode, don't look for pending flag in all threads.
15558 (resume_status_pending_p): Don't consider explicitly suspended
15560 (my_waitpid): Reimplement. Emulate __WALL.
15561 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15563 (sigchld_handler, linux_supports_non_stop, linux_async)
15564 (linux_start_non_stop): New.
15565 (linux_target_ops): Register linux_supports_non_stop, linux_async
15566 and linux_start_non_stop.
15567 (initialize_low): Install SIGCHLD handler.
15568 * thread-db.c (thread_db_create_event, find_one_thread)
15569 (thread_db_get_tls_address): Use lwpid_of.
15570 * win32-low.c (win32_detach): Adjust to use resume_kind.
15571 (win32_wait): Add `options' argument.
15572 * spu-low.c (spu_resume): Adjust to use resume_kind.
15573 (spu_wait): Add `options' argument.
15575 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15577 Decouple target code from remote protocol.
15579 * target.h (enum target_waitkind): New.
15580 (struct target_waitstatus): New.
15581 (struct target_ops) <wait>: Return an unsigned long. Take a
15582 target_waitstatus pointer instead of a char pointer.
15583 (mywait): Likewise.
15584 * target.c (mywait): Change prototype to return an unsigned long.
15585 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15586 * server.h (thread_from_wait, old_thread_from_wait): Delete
15588 (prepare_resume_reply): Change prototype to take a
15590 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15591 (last_status, last_ptid): New.
15592 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15593 pid instead of a signal.
15594 (attach_inferior): Remove "status" and "signal" parameters.
15596 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15598 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15599 (handle_v_requests, myresume): Remove "status" and "signal"
15600 parameters. Adjust.
15601 (handle_status): New.
15602 (main): Delete local `status'. Adjust.
15603 * remote-utils.c: Include target.h.
15604 (prepare_resume_reply): Change prototype to take a
15605 target_waitstatus. Adjust.
15607 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15609 * spu-low.c (spu_wait): Adjust.
15610 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15612 (win32_wait): Adjust.
15614 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15616 * target.h (struct thread_resume): Delete leave_stopped member.
15617 (struct target_ops): Add a `n' argument to the `resume' callback.
15618 * server.c (start_inferior): Adjust.
15619 (handle_v_cont, myresume): Adjust.
15620 * linux-low.c (check_removed_breakpoint): Adjust to resume
15621 interface change, and to removed leave_stopped field.
15622 (resume_ptr): Delete.
15623 (struct thread_resume_array): New.
15624 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15625 resume interface change.
15626 (linux_continue_one_thread, linux_queue_one_thread)
15627 (resume_status_pending_p): Check if the resume field is NULL
15628 instead of checking the leave_stopped member.
15629 (linux_resume): Adjust to the target resume interface change.
15630 * spu-low.c (spu_resume): Adjust to the target resume interface
15632 * win32-low.c (win32_detach, win32_resume): Ditto.
15634 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15636 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15638 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15640 (linux_continue_one_thread): Only preserve the stepping flag if
15641 there's a pending breakpoint.
15643 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15645 * server.c (main): After the inferior having exited, call
15646 remote_close before exiting gdbserver.
15648 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15650 Fix size of FPSCR in Power 7 processors.
15651 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15652 (PPC_FEATURE_HAS_DFP): New #define.
15653 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15656 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15658 * server.c (handle_query) Whitespace and formatting.
15660 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15662 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15663 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15664 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15665 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15666 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15667 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15668 Makefile.in, configure.ac: Fix whitespace throughout.
15669 * configure: Regenerate.
15671 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15673 * inferiors.c (find_inferior): Make it safe for the callback
15674 function to delete the currently iterated inferior.
15676 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15678 * Makefile.in (linuw_low_h): Move higher.
15679 (thread-db.o): Depend on $(linux_low_h).
15681 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15683 Rename "process" to "lwp" throughout.
15685 * linux-low.c (all_processes): Rename to...
15686 (all_lwps): ... this.
15687 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15688 (add_process): Rename to ...
15689 (add_lwp): ... this. Adjust.
15690 (linux_create_inferior): Adjust.
15691 (linux_attach_lwp): Adjust.
15692 (linux_attach): Adjust.
15693 (linux_kill_one_process): Rename to ...
15694 (linux_kill_one_lwp): ... this. Adjust.
15695 (linux_kill): Adjust.
15696 (linux_detach_one_process): Rename to ...
15697 (linux_detach_one_lwp): ... this. Adjust.
15698 (linux_detach): Adjust.
15699 (check_removed_breakpoint): Adjust.
15700 (status_pending_p): Adjust.
15701 (linux_wait_for_process): Rename to ...
15702 (linux_wait_for_lwp): ... this. Adjust.
15703 (linux_wait_for_event): Adjust.
15704 (send_sigstop): Adjust.
15705 (wait_for_sigstop): Adjust.
15706 (stop_all_processes): Rename to ...
15707 (stop_all_lwps): ... this.
15708 (linux_resume_one_process): Rename to ...
15709 (linux_resume_one_lwp): ... this. Adjust.
15710 (linux_set_resume_request, linux_continue_one_thread)
15711 (linux_queue_one_thread, resume_status_pending_p)
15712 (usr_store_inferior_registers, regsets_store_inferior_registers)
15713 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15715 * linux-low.h (get_process): Rename to ...
15716 (get_lwp): ... this. Adjust.
15717 (get_thread_process): Rename to ...
15718 (get_thread_lwp): ... this. Adjust.
15719 (get_process_thread): Rename to ...
15720 (get_lwp_thread): ... this. Adjust.
15721 (struct process_info): Rename to ...
15722 (struct lwp_info): ... this.
15723 (all_processes): Rename to ...
15724 (all_lwps): ... this.
15725 * proc-service.c (ps_lgetregs): Adjust.
15726 * thread-db.c (thread_db_create_event, find_one_thread)
15727 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15729 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15731 * server.c (handle_query): Handle "qAttached".
15733 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15735 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15736 GPLv3, update license URL.
15738 2009-03-01 Doug Evans <dje@google.com>
15740 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15741 (server_h): Add gdb_signals.h.
15742 (signals.o): Update.
15743 * server.h (target_signal_from_host,target_signal_to_host_p)
15744 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15746 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15748 * remote-utils.c (getpkt): Also generate remote-debug
15749 information if noack_mode is set.
15751 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15753 * server.c (handle_query): Report qXfer:siginfo:read and
15754 qXfer:siginfo:write as supported and handle them.
15755 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15756 * linux-low.c (linux_xfer_siginfo): New.
15757 (linux_target_ops): Set it.
15759 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15761 * server.c (gdbserver_usage): Mention --remote-debug.
15762 (main): Accept '--remote-debug' switch.
15764 2009-01-18 Doug Evans <dje@google.com>
15766 * regcache.c (new_register_cache): No need to check result of xcalloc.
15767 * server.c (handle_search_memory): Back out calls to xmalloc,
15768 result is checked and error is returned to user upon failure.
15769 (handle_query): Ditto. Add more checks for result of malloc.
15770 (handle_v_cont): Check result of malloc, report error back to
15772 (handle_v_run): Ditto. Call freeargv.
15773 * server.h (freeargv): Declare.
15774 * utils.c (freeargv): New fn.
15776 2009-01-15 Doug Evans <dje@google.com>
15778 * gdbreplay.c (perror_with_name): Make arg const char *.
15779 * server.h (target_signal_to_name): Make return type const char *.
15780 * thread-db.c (thread_db_err_str): Make return type const char *.
15781 * utils.c (perror_with_name): Make arg const char *.
15783 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15785 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15786 when handling a EXIT_PROCESS_DEBUG_EVENT.
15788 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15790 * gdbreplay.c (gdbreplay_version): Update copyright year.
15791 * server.c (gdbserver_version): Likewise.
15793 2009-01-05 Doug Evans <dje@google.com>
15795 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15796 (handle_extended_wait): Improve comment.
15798 2008-12-13 Doug Evans <dje@google.com>
15800 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15801 * server.h (ATTR_MALLOC): New macro.
15802 (xmalloc,xcalloc,xstrdup): Declare.
15803 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15804 * inferiors.c: Ditto.
15805 * linux-low.c: Ditto.
15806 * mem-break.c: Ditto.
15807 * regcache.c: Ditto.
15808 * remote-utils.c: Ditto.
15811 * win32-low.c: Ditto.
15813 2008-12-12 Doug Evans <dje@google.com>
15815 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15816 in debugging printf.
15818 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15820 2008-12-09 Doug Evans <dje@google.com>
15822 * linux-low.h (struct process_info): Delete member tid, unused.
15823 * thread-db.c (find_one_thread): Update.
15824 (maybe_attach_thread): Update.
15826 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15828 * target.h (struct target_ops): Add qxfer_osdata member.
15829 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15831 (linux_qxfer_osdata): New functions.
15832 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15834 * server.c (handle_query): Handle "qXfer:osdata:read:".
15835 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15836 (buffer_xml_printf): New functions.
15837 * server.h (struct buffer): New.
15838 (buffer_grow_str, buffer_grow_str0): New macros.
15839 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15840 (buffer_xml_printf): Declare.
15842 2008-11-24 Doug Evans <dje@google.com>
15844 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15846 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15848 * server.c (handle_v_run): Always use the supplied argument list.
15850 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15852 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15853 (xtensa_regmap_table): Add entry for scompare1.
15855 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15857 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15858 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15859 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15860 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15861 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15862 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15863 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15864 XML target descriptions.
15865 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15866 when inferior is running on an ISA 2.05 or later processor. Add
15867 special case to return offset for full 64-bit slot of FPSCR when
15870 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15872 * Makefile.in (SFILES, clean): Added sparc64 files.
15873 (reg-sparc64.o, reg-sparc64.c): New.
15874 * configure.srv (sparc*-*-linux*): New configuration.
15875 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15876 syscall arguments for SPARC.
15877 (regsets_store_inferior_registers): Likewise.
15878 * linux-sparc-low.c: New file.
15880 2008-10-21 Doug Evans <dje@google.com>
15882 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15883 (READLINE_DIR,READLINE_DEP): Delete.
15884 (INTERNAL_CFLAGS): Update.
15885 (LINTFLAGS): Update.
15887 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15889 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15890 whole argv from the last run, not just argv[0].
15892 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15894 * regcache.c (new_register_cache): Return NULL if the register
15895 cache size isn't known yet.
15896 (free_register_cache): Avoid dereferencing a NULL regcache.
15898 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15900 * configure.srv: Merge MIPS and MIPS64.
15902 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15904 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15906 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15908 * Makefile.in: Add required vsx dependencies.
15910 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15911 Declare init_registers_powerpc_vsx32l.
15912 Declare init_registers_powerpc_vsx64l.
15913 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15914 (ppc_arch_setup): Check for VSX in hwcap.
15915 (ppc_fill_vsxregset): New function.
15916 (ppc_store_vsxregset): New function.
15917 Add new VSX entry in regset_info target_regsets.
15919 * configure.srv: Add new VSX dependencies.
15921 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15923 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15924 (remote_open): Set or clear transport_is_reliable.
15925 (putpkt_binary): Don't expect acks in noack mode.
15926 (getpkt): Don't send ack/nac in noack mode.
15927 * server.c (handle_general_set): Handle QStartNoAckMode.
15928 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15930 (main): Reset noack_mode on every connection.
15931 * server.h (noack_mode): Declare.
15933 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15935 * Makefile.in (GDBREPLAY_OBS): New variable.
15936 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15938 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15939 Daniel Jacobowitz <dan@codesourcery.com>
15941 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15942 (usr_store_inferior_registers): Likewise.
15943 (regsets_store_inferior_registers): Likewise.
15945 2008-07-31 Rolf Jansen <rj@surtec.com>
15946 Pedro Alves <pedro@codesourcery.com>
15948 * configure.ac: Check for memmem declaration.
15949 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15950 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15951 (disable_packet_qfThreadInfo): Unconditionally compile.
15952 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15953 * configure, config.in: Regenerate.
15955 2008-07-28 Doug Kwan <dougkwan@google.com>
15957 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15958 (linux_write_memory): Remove declaration of errno.
15960 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15962 * linux-low.c (handle_extended_wait): Do not use "status"
15963 variable uninitialized.
15965 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15967 * server.c (handle_v_attach): Inhibit reporting dll changes.
15969 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15971 * remote-utils.c (prepare_resume_reply): If requested, don't
15972 output "thread:TID" in the T stop reply.
15974 * server.c (disable_packet_vCont, disable_packet_Tthread)
15975 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15976 (handle_query): If requested, disable support for qC, qfThreadInfo
15978 (handle_v_requests): If requested, disable support for vCont.
15979 (gdbserver_show_disableable): New.
15980 (main): Handle --disable-packet and --disable-packet=LIST.
15982 * server.h (disable_packet_vCont, disable_packet_Tthread)
15983 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15985 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15987 * server.c (gdbserver_usage): Mention --version.
15989 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15991 * Makefile.in (gdbreplay.o): New rule.
15993 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15995 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15996 message, not gdbserver.
15998 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15999 Nathan Sidwell <nathan@codesourcery.com>
16000 Joseph Myers <joseph@codesourcery.com>
16002 * acinclude.m4: Include ../../config/acx.m4.
16003 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16004 * configure, config.in: Regenerate.
16005 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16006 * server.c (gdbserver_version): Print PKGVERSION.
16007 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16008 (main): Adjust gdbserver_usage calls.
16009 * gdbreplay.c (version, host_name): Add declarations.
16010 (gdbreplay_version, gdbreplay_usage): New.
16011 (main): Accept --version and --help options.
16013 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16015 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16016 (arm_breakpoint_at): Handle Thumb.
16017 (the_low_target): Add comment.
16019 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16021 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16023 2008-05-09 Doug Evans <dje@google.com>
16025 * server.h (decode_search_memory_packet): Declare.
16026 * remote-utils.c (decode_search_memory_packet): New fn.
16027 * server.c (handle_search_memory_1): New fn.
16028 (handle_search_memory): New fn.
16029 (handle_query): Process qSearch:memory packets.
16031 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16033 * regcache.c (registers_length): Remove.
16034 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16035 full register packet.
16036 * regcache.h (registers_length): Remove prototype.
16037 * server.h (PBUFSIZ): Define to 16384.
16039 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16041 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16042 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16043 powerpc-64l.o, and powerpc-altivec64l.o.
16044 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16045 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16046 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16047 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16048 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16051 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16052 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16053 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16054 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16055 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16056 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16057 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16058 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16059 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16060 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16063 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16064 (init_registers_powerpc_32l): ... this new prototype.
16065 (init_registers_powerpc_32): Remove, replace by ...
16066 (init_registers_powerpc_altivec32l): ... this new prototype.
16067 (init_registers_powerpc_e500): Remove, replace by ...
16068 (init_registers_powerpc_e500l): ... this new prototype.
16069 (init_registers_ppc64): Remove, replace by ...
16070 (init_registers_powerpc_64l): ... this new prototype.
16071 (init_registers_powerpc_64): Remove, replace by ...
16072 (init_registers_powerpc_altivec64l): ... this new prototype.
16073 (ppc_num_regs): Set to 73.
16074 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16075 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16076 (ppc_cannot_store_register): Handle orig_r3 and trap.
16077 (ppc_arch_setup): Update init_registers_... calls.
16078 (ppc_fill_gregset): Handle orig_r3 and trap.
16080 * inferiors.c (clear_inferiors): Reset current_inferior.
16082 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16084 * acinclude.m4: Add override.m4.
16085 * configure: Regenerate.
16087 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16089 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16090 initial call to init_register_ppc64.
16092 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16094 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16095 single powerpc*-*-linux* case.
16096 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16098 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16100 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16101 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16103 * linux-ppc-low.c: Include <elf.h>.
16104 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16105 (ppc_hwcap): New global variable.
16106 (ppc_regmap): Remove __SPE__ #ifdef sections.
16107 (ppc_regmap_e500): New global variable.
16108 (ppc_cannot_store_register): Update __SPE__ special case.
16109 (ppc_get_hwcap): New function.
16110 (ppc_arch_setup): Use it to determine whether inferior supports
16111 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16112 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16113 Do not access registers if target does not support AltiVec.
16114 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16115 Do not access registers if target does not support SPE.
16116 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16118 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16120 * linux-low.c (disabled_regsets, num_regsets): New.
16121 (use_regsets_p): Delete.
16122 (linux_wait_for_process): Clear disabled_regsets.
16123 (regsets_fetch_inferior_registers): Check and set it.
16124 (regsets_store_inferior_registers): Likewise.
16125 (linux_fetch_registers, linux_store_registers): Do not use
16127 (initialize_low): Allocate disabled_regsets.
16129 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16131 * Makefile.in (LIBOBJS): New.
16132 (OBS): Use LIBOBJS.
16133 (memmem.o): New rule.
16134 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16135 * configure: Regenerated.
16137 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16139 * server.c (handle_query): Never return "unsupported" for
16140 qXfer:features:read queries.
16142 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16144 * server.c (get_features_xml): Fix inverted condition.
16145 (handle_query): Always support qXfer:feature:read.
16147 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16149 * server.c (wrapper_argv): New.
16150 (start_inferior): Handle wrapper_argv. If set, expect an extra
16152 (gdbserver_usage): Document --wrapper.
16153 (main): Parse --wrapper.
16155 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16157 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16158 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16159 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16160 (ppc_set_pc): Likewise.
16161 (ppc_arch_setup): New function.
16162 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16163 of collect_register.
16164 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16166 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16168 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16169 instead of linux-ppc64-low.o.
16170 * linux-ppc64-low.c: Remove file.
16171 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16172 (linux-ppc64-low.o): Remove rule.
16174 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16175 (init_registers_powerpc_64): Likewise.
16176 (ppc_regmap): Conditionally define depending on __powerpc64__.
16177 (ppc_cannot_store_register): Do not special-case "fpscr" when
16178 compiled on __powerpc64__.
16179 (ppc_collect_ptrace_register): New function.
16180 (ppc_supply_ptrace_register): New function.
16181 (ppc_breakpoint): Change type to "unsigned int".
16182 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16183 (the_low_target): Conditionally provide initializers for the
16184 arch_setup member depending on __powerpc64__. Install
16185 collect_ptrace_register and supply_ptrace_register members.
16187 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16189 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16190 * server.c (gdbserver_xmltarget): Define.
16191 (get_features_xml): Use it to replace "target.xml" and arch_string.
16193 * configure.srv: Remove srv_xmltarget. Add XML files that were
16194 mentioned there to srv_xmlfiles instead. Remove conditional tests
16195 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16196 srv_xmlfiles and srv_regobj to include all possible choices.
16197 * configure.ac (srv_xmltarget): Remove.
16198 (srv_xmlfiles): Do not add "target.xml".
16199 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16200 checks for supplementary target information.
16201 * configure: Regenerate.
16202 * Makefile.in (XML_TARGET): Remove.
16203 (target.xml): Remove rule.
16204 (clean): Do not clean up target.xml.
16205 (.PRECIOUS): Do not mention target.xml.
16207 * target.h (struct target_ops): Remove arch_string member.
16208 * linux-low.c (linux_arch_string): Remove.
16209 (linux_target_ops): Remove arch_string initializer.
16210 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16211 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16212 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16213 * spu-low.c (spu_arch_string): Remove.
16214 (spu_target_ops): Remove arch_string initializer.
16215 * win32-low.c (win32_arch_string): Remove.
16216 (win32_target_ops): Remove arch_string initializer.
16217 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16218 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16219 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16221 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16223 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16224 by collect_ptrace_register and supply_ptrace_register hooks.
16225 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16226 instead of checking for the_low_target.left_pad_xfer.
16227 (usr_store_inferior_registers): Use collect_ptrace_register callback
16228 instead of checking for the_low_target.left_pad_xfer.
16230 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16231 (s390_supply_ptrace_register): Likewise.
16232 (s390_fill_gregset): Call s390_collect_ptrace_register.
16233 (the_low_target): Update.
16235 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16236 (ppc_supply_ptrace_register): Likewise.
16237 (the_low_target): Update.
16239 * linux-i386-low.c (the_low_target): Update.
16240 * linux-x86-64-low.c (the_low_target): Update.
16242 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16244 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16245 reg-s390.o and reg-s390x.o.
16247 * linux-low.c (new_inferior): New global variable.
16248 (linux_create_inferior, linux_attach): Set it.
16249 (linux_wait_for_process): Call the_low_target.arch_setup after the
16250 target has stopped for the first time.
16251 (initialize_low): Do not call the_low_target.arch_setup.
16253 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16254 (s390_set_pc): Likewise.
16255 (s390_arch_setup): New function.
16256 (the_low_target): Use s390_arch_setup as arch_setup routine.
16258 * regcache.c (realloc_register_cache): New function.
16259 (set_register_cache): Call it for each existing regcache.
16261 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16263 * server.h (init_registers): Remove prototype.
16265 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16266 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16267 instead of init_registers ().
16268 * linux-arm-low.c (init_registers_arm): Add prototype.
16269 (init_registers_arm_with_iwmmxt): Likewise.
16270 (the_low_target): Add initializer for arch_setup field.
16271 * linux-cris-low.c (init_registers_cris): Add prototype.
16272 (the_low_target): Add initializer for arch_setup field.
16273 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16274 (the_low_target): Add initializer for arch_setup field.
16275 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16276 (the_low_target): Add initializer for arch_setup field.
16277 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16278 (the_low_target): Add initializer for arch_setup field.
16279 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16280 (the_low_target): Add initializer for arch_setup field.
16281 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16282 (the_low_target): Add initializer for arch_setup field.
16283 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16284 (init_registers_mips64_linux): Likewise.
16285 (the_low_target): Add initializer for arch_setup field.
16286 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16287 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16288 (the_low_target): Add initializer for arch_setup field.
16289 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16290 (init_registers_powerpc_64): Likewise.
16291 (the_low_target): Add initializer for arch_setup field.
16292 * linux-s390-low.c (init_registers_s390): Add prototype.
16293 (init_registers_s390x): Likewise.
16294 (the_low_target): Add initializer for arch_setup field.
16295 * linux-sh-low.c (init_registers_sh): Add prototype.
16296 (the_low_target): Add initializer for arch_setup field.
16297 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16298 (the_low_target): Add initializer for arch_setup field.
16299 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16300 (the_low_target): Add initializer for arch_setup field.
16302 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16303 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16304 instead of init_registers ().
16305 * win32-arm-low.c (init_registers_arm): Add prototype.
16306 (the_low_target): Add initializer for arch_setup field.
16307 * win32-i386-low.c (init_registers_i386): Add prototype.
16308 (the_low_target): Add initializer for arch_setup field.
16310 * spu-low.c (init_registers_spu): Add prototype.
16311 (initialize_low): Call initialie_registers_spu () instead of
16312 initialize_registers ().
16314 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16316 * server.c (handle_v_requests): When handling the vRun and vAttach
16317 packets, if already debugging a process, don't kill it. Return an
16320 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16322 * server.c (handle_query): Correct length check.
16324 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16326 * win32-low.c (do_initial_child_stuff): Add process handle
16327 parameter. Set current_process_handle and current_process_id from the
16328 parameters. Clear globals.
16329 (win32_create_inferior): Don't set current_process_handle and
16330 current_process_id here. Instead pass them on the call to
16331 do_initial_child_stuff.
16332 (win32_attach): Likewise.
16333 (win32_clear_inferiors): New.
16334 (win32_kill): Don't close the current process handle or the
16335 current thread handle here. Instead call win32_clear_inferiors.
16336 (win32_detach): Don't open a new handle to the process. Call
16337 win32_clear_inferiors.
16338 (win32_join): Don't rely on current_process_handle; open a new
16339 handle using the process id.
16340 (win32_wait): Call win32_clear_inferiors when the inferior process
16343 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16345 * server.c (monitor_show_help): Add "exit".
16347 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16349 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16350 (clean): Add reg-xtensa.c.
16351 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16352 * configure.srv (xtensa*-*-linux*) New target.
16353 * linux-xtensa-low.c: New.
16354 * xtensa-xtregs.c: New.
16356 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16358 * hostio.c: Don't include errno.h.
16359 (errno_to_fileio_errno): Move to hostio-errno.
16360 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16361 error number outputting to the target->hostio_last_error callback.
16362 (hostio_packet_error): Use FILEIO_EINVAL directly.
16363 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16364 calls to hostio_error.
16365 * hostio-errno.c: New.
16366 * server.h (hostio_last_error_from_errno): Declare.
16367 * target.h (target_ops): Add hostio_last_error member.
16368 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16369 as hostio_last_error handler.
16370 * spu-low.c (spu_target_ops): Likewise.
16371 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16372 (wince_hostio_last_error): New functions.
16373 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16374 as hostio_last_error handler.
16375 (win32_target_ops) [!_WIN32_WCE]: Register
16376 hostio_last_error_from_errno as hostio_last_error handler.
16377 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16378 (hostio-errno.o): New rule.
16379 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16380 * configure.srv (srv_hostio_err_objs): New variable. Default to
16382 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16383 * configure: Regenerate.
16385 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16387 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16388 (linux_kill, linux_detach): Clean up the process list.
16389 * remote-utils.c (remote_open): Improve port number parsing.
16390 (putpkt_binary, input_interrupt): Only send interrupts if the target
16392 * server.c (extended_protocol): Make static.
16393 (attached): Define earlier.
16394 (exit_requested, response_needed, program_argv): New variables.
16395 (target_running): New.
16396 (start_inferior): Clear attached here.
16397 (attach_inferior): Set attached here.
16398 (require_running): Define.
16399 (handle_query): Use require_running and target_running. Implement
16401 (handle_v_attach, handle_v_run): New.
16402 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16403 (gdbserver_usage): Update.
16404 (main): Redo argument parsing. Handle --debug and --multi. Handle
16405 --attach along with other options or after the port. Save
16406 program_argv. Support no initial program. Resynchronize
16407 communication with GDB after an error. Handle "monitor exit".
16408 Use require_running and target_running. Always allow the extended
16409 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16410 restart in extended mode.
16411 * README: Refer to the GDB manual. Update --attach usage.
16413 2007-12-20 Andreas Schwab <schwab@suse.de>
16415 * linux-low.c (STACK_SIZE): Define.
16416 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16417 (linux_test_for_tracefork): Likewise.
16419 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16421 * linux-low.c (linux_wait_for_event): Update messages. Do not
16422 reinsert auto-delete breakpoints.
16423 * mem-break.c (struct breakpoint): Change return type of handler to
16425 (set_breakpoint_at): Update handler type.
16426 (reinsert_breakpoint_handler): Return 1 instead of calling
16428 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16430 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16431 * mem-break.h (set_breakpoint_at): Update handler type.
16432 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16433 * win32-low.c (auto_delete_breakpoint): New.
16434 (get_child_debug_event): Use it.
16436 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16438 * configure.ac: Check for pread and pwrite.
16439 * hostio.c (handle_pread): Fall back to lseek and read.
16440 (handle_pwrite): Fall back to lseek and write.
16441 * config.in, configure: Regenerated.
16443 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16445 * server.c (myresume): Add own_buf argument.
16446 (main): Update calls.
16448 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16450 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16451 * remote-utils.c (remote_open): Do not call disable_async_io.
16452 (block_async_io): Delete.
16453 (unblock_async_io): Make static.
16454 (initialize_async_io): New.
16455 * server.c (handle_v_cont): Handle async I/O here.
16456 (myresume): Likewise. Move other common resume tasks here...
16457 (main): ... from here. Call initialize_async_io. Disable async
16458 I/O before the main loop.
16459 * server.h (initialize_async_io): Declare.
16460 (block_async_io, unblock_async_io): Delete prototypes.
16461 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16463 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16465 * remote-utils.c (readchar): Allow binary data in received messages.
16467 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16469 * win32-low.c (attaching): New global.
16470 (win32_create_inferior): Clear the `attaching' global.
16471 (win32_attach): Set the `attaching' global.
16472 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16473 attaching. Only set a breakpoint at the entry point if not
16476 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16478 * server.c (main): Don't report dll events on the initial
16479 connection on attaches.
16481 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16483 * server.c (main): Relax numerical bases supported for the pid of
16484 the --attach command line argument.
16486 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16488 * win32-low.c (win32_attach): Call OpenProcess before
16489 DebugActiveProcess, not after. Add last error output to error
16492 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16494 * win32-low.c (win32_get_thread_context)
16495 (win32_set_thread_context): New functions.
16496 (thread_rec): Use win32_get_thread_context.
16497 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16498 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16501 2007-12-03 Leo Zayas
16502 Pedro Alves <pedro_alves@portugalmail.pt>
16504 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16506 (child_add_thread): Minor cleanup.
16507 (child_continue): Resume artificially suspended threads before
16508 calling ContinueDebugEvent.
16509 (suspend_one_thread): New.
16510 (fake_breakpoint_event): New.
16511 (get_child_debug_event): Change return type to int. Check here if
16512 gdb sent an interrupt request. If a soft interrupt was requested,
16513 fake a breakpoint event. Return 0 if there is no event to handle,
16515 (win32_wait): Don't check here if gdb sent an interrupt request.
16516 Ensure there is a valid event to handle.
16517 (win32_request_interrupt): Add soft interruption method as last
16520 2007-12-03 Leo Zayas
16521 Pedro Alves <pedro_alves@portugalmail.pt>
16523 * win32-low.h (win32_thread_info): Add descriptions to the
16524 structure members. Replace `suspend_count' counter by a
16526 * win32-low.c (thread_rec): Update condition of when to get the
16527 context from the inferior. Rely on ContextFlags being set if it
16528 has already been retrieved. Only suspend the inferior thread if
16529 we haven't already. Warn if that fails.
16530 (continue_one_thread): s/suspend_count/suspended/. Only call
16531 ResumeThread once. Warn if that fails.
16533 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16535 * win32-low.c (win32_wait): Don't read from the inferior when it
16536 has already exited.
16538 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16540 * Makefile.in (win32_low_h): New variable.
16541 (win32-low.o): Add dependency on $(win32_low_h).
16542 (win32-arm-low.o, win32-i386-low.o): New rules.
16544 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16546 * hostio.c: Correct copyright year.
16548 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16550 * Makefile.in (OBS): Add hostio.o.
16551 (hostio.o): New rule.
16552 * server.h (handle_vFile): Declare.
16553 * hostio.c: New file.
16554 * server.c (handle_v_requests): Take packet_len and new_packet_len
16555 for binary packets. Call handle_vFile.
16556 (main): Update call to handle_v_requests.
16558 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16560 * linux-low.c: Include <sched.h>.
16562 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16564 * linux-low.c (linux_tracefork_grandchild): New.
16565 (linux_tracefork_child): Use clone.
16566 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16568 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16570 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16572 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16574 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16576 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16578 * inferiors.c (change_inferior_id): Delete.
16579 (add_pid_to_list, pull_pid_from_list): New.
16580 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16581 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16582 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16583 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16584 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16585 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16586 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16587 (using_threads): Always set to 1.
16588 (handle_extended_wait): New.
16589 (add_process): Do not set TID.
16590 (linux_create_inferior): Set must_set_ptrace_flags.
16591 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16592 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16593 (linux_thread_alive): Rename TID argument to LWPID.
16594 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16595 (linux_wait_for_event): Do not use TID or check using_threads. Update
16596 call to dead_thread_notify. Call handle_extended_wait.
16597 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16598 (send_sigstop): Delete sigstop_sent.
16599 (wait_for_sigstop): Avoid TID.
16600 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16601 (linux_test_for_tracefork): New.
16602 (linux_lookup_signals): Use thread_db_active and
16603 linux_supports_tracefork_flag.
16604 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16605 * linux-low.h (get_process_thread): Avoid TID.
16606 (struct process_ifo): Move thread_known and tid to the end. Remove
16608 (linux_attach_lwp, thread_db_init): Update prototypes.
16609 * server.h (change_inferior_id): Delete prototype.
16610 (add_pid_to_list, pull_pid_from_list): New prototypes.
16611 * thread-db.c (thread_db_use_events): New.
16612 (find_first_thread): Rename to...
16613 (find_one_thread): ...this. Update callers and messages. Do not
16614 call fatal. Check thread_db_use_events. Do not call
16615 change_inferior_id or new_thread_notify.
16616 (maybe_attach_thread): Update. Do not call new_thread_notify.
16617 (thread_db_init): Set thread_db_use_events. Check use_events.
16618 * utils.c (fatal, warning): Correct message prefix.
16620 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16622 * Makefile.in (clean): Remove new files.
16623 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16624 (powerpc-64.o, powerpc-64.c): New rules.
16625 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16626 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16628 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16630 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16631 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16632 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16633 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16634 (target_regsets): Add AltiVec and SPE register sets.
16635 * configure.ac: Check for AltiVec and SPE.
16636 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16637 (ppc_fill_vrregset, ppc_store_vrregset): New.
16638 (target_regsets): Add AltiVec register set.
16639 * configure: Regenerated.
16641 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16643 * linux-low.c (O_LARGEFILE): Define.
16644 (linux_read_memory): Use /proc/PID/mem.
16645 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16646 * configure, config.in: Regenerated.
16648 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16650 * linux-low.c (linux_wait_for_event): Do not pass signals while
16653 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16655 * win32-low.c (create_process): New.
16656 (win32_create_inferior): Use create_process instead of
16657 CreateProcess. If create_process failed retry appending an ".exe"
16658 suffix. Store the GetLastError result immediatelly after
16659 create_process calls and use it on the call to error.
16661 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16663 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16665 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16667 * configure.ac: Switch license to GPLv3.
16669 2007-08-01 Michael Snyder <msnyder@access-company.com>
16671 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16673 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16675 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16677 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16678 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16679 CloseToolhelp32Snapshot.
16680 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16681 CloseToolhelp32Snapshot.
16683 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16685 * server.c (main): Check for inferior exit before main loop.
16687 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16689 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16690 instead of on tmp_desc.
16692 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16693 Daniel Jacobowitz <dan@codesourcery.com>
16695 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16696 (add_thread): Minor cleanups.
16697 (clear_inferiors): Move lower in the file. Clear the DLL
16699 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16700 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16701 (xml_escape_text): New.
16702 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16704 (handle_v_cont): Report errors.
16705 (gdbserver_version): Update.
16706 (main): Correct size of own_buf. Do not report initial DLL events.
16707 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16708 (unloaded_dll, xml_escape_text): New.
16709 * win32-low.c (enum target_waitkind): Update comments.
16710 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16711 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16712 (win32_EnumProcessModules, win32_GetModuleInformation)
16713 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16714 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16715 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16716 (win32_Module32First, win32_Module32Next, load_toolhelp)
16717 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16718 (get_child_debug_event): Handle DLL events.
16719 (win32_wait): Likewise.
16721 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16723 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16724 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16726 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16728 * win32-low.c (handle_output_debug_string): Ignore event if not
16731 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16733 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16735 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16737 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16739 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16741 * inferiors.c (change_inferior_id): Add comment.
16742 * linux-low.c (check_removed_breakpoint): Add an early
16743 prototype. Improve debug output.
16744 (linux_attach): Doc update.
16745 (linux_detach_one_process, linux_detach): Clean up before releasing
16747 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16748 * linux-low.h (struct process_info): Doc improvement.
16749 * mem-break.c (delete_all_breakpoints): New.
16750 * mem-break.h (delete_all_breakpoints): New prototype.
16751 * thread-db.c (find_first_thread): New.
16752 (thread_db_create_event): Call it instead of
16753 thread_db_find_new_threads. Clean up unused variables.
16754 (maybe_attach_thread): Remove first thread handling.
16755 (thread_db_find_new_threads): Use find_first_thread.
16756 (thread_db_get_tls_address): Likewise.
16758 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16760 * thread-db.c (thread_db_find_new_threads): Add prototype.
16761 (thread_db_create_event): Check for the main thread before adding
16763 (maybe_attach_thread): Only enable event reporting if TID == 0.
16764 (thread_db_get_tls_address): Check for new threads.
16766 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16768 * linux-low.c (linux_create_inferior): Try execv before execvp.
16769 * spu-low.c (spu_create_inferior): Likewise.
16771 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16773 * linux-low.c (linux_create_inferior): Change execv to execvp.
16774 * spu-low.c (spu_create_inferior): Likewies.
16776 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16778 * Makefile.in (clean): Clean new files instead of deleted ones.
16779 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16780 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16782 * configure.srv: Specify XML files and new regformats for MIPS and
16784 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16785 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16786 an entry for the restart register.
16787 (mips_cannot_fetch_register, mips_cannot_store_register)
16788 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16789 register names to match the XML descriptions.
16790 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16791 restart register instead of $0.
16793 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16794 Markus Deuling <deuling@de.ibm.com>
16796 * remote-utils.c (decode_xfer_write): New function.
16797 * server.h (decode_xfer_write): Add prototype.
16798 * server.c (handle_query): Add PACKET_LEN argument. Support
16799 qXfer:spu:read and qXfer:spu:write packets.
16800 (main): Pass packet_len to handle_query.
16801 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16802 * target.h (target_ops): Add qxfer_spu.
16804 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16806 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16807 accessing non-seekable spufs files.
16809 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16811 * server.c (handle_query): Add reply for qC packet.
16813 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16814 Leo Zayas <lerele@champenstudios@com>
16816 * server.h (check_remote_input_interrupt_request): New function.
16817 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16818 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16819 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16820 (check_remote_input_interrupt_request): New function.
16821 * server.h (check_remote_input_interrupt_request): Declare.
16822 * win32-low.c (winapi_DebugBreakProcess,
16823 winapi_GenerateConsoleCtrlEvent): New typedefs.
16824 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16826 (win32_wait): Check for remote interrupt request
16827 with check_remote_input_interrupt_request.
16828 (win32_request_interrupt): New function.
16829 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16831 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16833 * win32-low.c (debug_registers_changed,
16834 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16835 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16836 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16837 (thread_rec): Get context using the low target.
16838 (child_add_thread): Call thread_added on the low target,
16839 which does the same thing.
16841 (do_initial_child_stuff): Remove debug registers references.
16842 Set context using the low target. Resume threads after
16843 setting the contexts.
16844 (child_continue): Remove dead variable. Remove debug
16845 registers references.
16846 (child_fetch_inferior_registers): Go through the low target.
16847 (do_child_store_inferior_registers): Remove.
16848 (child_store_inferior_registers): Go through the low target.
16849 (win32_resume): Remove debug registers references.
16850 Set context using the low target.
16851 (handle_exception): Change return type to void. Don't record
16852 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16853 first chance exception.
16854 (get_child_debug_event): Change return type to void. Remove
16855 goto loop. Always return after waiting for debug event.
16856 (win32_wait): Convert to switch statement. Handle spurious
16859 * win32-i386-low.c (debug_registers_changed,
16860 debug_registers_used): New.
16861 (initial_stuff): Rename to ...
16862 (i386_initial_stuff): ... this. Clear debug registers
16864 (store_debug_registers): Delete.
16865 (i386_get_thread_context): New.
16866 (load_debug_registers): Delete.
16867 (i386_set_thread_context): New.
16868 (i386_thread_added): New.
16869 (single_step): Rename to ...
16870 (i386_single_step): ... this.
16871 (do_fetch_inferior_registers): Rename to ...
16872 (i386_fetch_inferior_register): ... this.
16873 (i386_store_inferior_register): New.
16874 (the_low_target): Adapt to new interface.
16876 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16877 (arm_get_thread_context): New.
16878 (arm_set_thread_context): New.
16880 (do_fetch_inferior_registers): Rename to ...
16881 (arm_fetch_inferior_register): ... this.
16882 (arm_store_inferior_register): New.
16883 (arm_wince_breakpoint): Reimplement as unsigned long.
16884 (arm_wince_breakpoint_len): Define.
16885 (the_low_target): Adapt to new interface.
16887 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16888 load_debug_registers. Add get_thread_context, set_thread_context,
16889 thread_added and store_inferior_register. Rename
16890 fetch_inferior_registers to fetch_inferior_register.
16891 (regptr): Remove declaration.
16893 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16895 * linux-low.c (linux_detach): Change return type to int. Return 0.
16896 * spu-low.c (spu_detach): Likewise.
16898 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16900 * target.h (target_ops): Change return type of detach to int.
16902 (join_inferior): New.
16903 * server.c (main): Don't skip detach support on mingw32.
16904 If the inferior doesn't support detaching return error.
16905 Call join_inferior instead of using waitpid.
16906 * linux-low.c (linux_join): New.
16907 (linux_target_op): Add linux_join.
16908 * spu-low.c (spu_join): New.
16909 (spu_target_ops): Add spu_join.
16910 * win32-low.c (win32_detach): Adapt to new interface.
16911 Reopen current_process_handle before detaching. Issue a child
16912 resume before detaching.
16914 (win32_target_op): Add win32_join.
16916 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16918 * win32-low.c (win32-attach): Fix return value.
16919 * target.h (target_ops): Describe ATTACH return values.
16921 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16923 * win32-low.c (GETPROCADDRESS): Define.
16924 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16925 (winapi_DebugSetProcessKillOnExit): Likewise.
16926 (win32_create_inferior): Force usage of ansi CreateProcessA.
16927 (win32_attach): Use GETPROCADDRESS.
16928 (win32_detach): Likewise.
16930 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16932 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16934 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16936 * win32-low.c: Commit leftover changes from 2007-03-29.
16938 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16940 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16941 fields short instead of int. Add explicit padding.
16942 (i387_cache_to_fsave): Remove unnecessary casts.
16943 (i387_fsave_to_cache): Doc fix.
16944 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16946 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16948 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16949 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16951 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16953 * configure.srv (arm*-*-mingw32ce*): Move near the other
16956 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16958 * configure.ac: Add errno checking.
16959 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16960 sys/file.h and malloc.h.
16961 (AC_CHECK_DECLS): Add perror.
16962 (srv_mingwce): Handle.
16963 * configure.srv (i[34567]86-*-cygwin*): Add
16964 win32-i386-low.o to srv_tgtobj.
16965 (i[34567]86-*-mingw*): Likewise.
16966 (arm*-*-mingw32ce*): Add case.
16967 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16968 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16969 [__MINGW32CE__] (strerror): New function.
16970 [__MINGW32CE__] (errno): Define to GetLastError.
16971 [__MINGW32CE__] (COUNTOF): New macro.
16972 (remote_open): Remove extra close call.
16973 * mem-break.c (delete_breakpoint_at): New function.
16974 * mem-break.h (delete_breakpoint_at): Declare.
16975 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16976 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16977 [USE_WIN32API] (read, write): Add char* casts.
16978 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16979 * server.h: Include wincecompat.h on Windows CE.
16980 [HAVE_ERRNO_H]: Check.
16981 (perror): Declare if not declared.
16982 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16983 (perror_with_name): Remove errno declaration.
16984 * wincecompat.h: New.
16985 * wincecompat.c: New.
16986 * win32-low.h: New.
16987 * win32-arm-low.c: New.
16988 * win32-i386-low.c: New.
16989 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16990 (OUTMSG2): Make it safe.
16992 (COUNTOF): New macro.
16993 (NUM_REGS): Get it from the low target.
16994 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16995 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16996 (thread_rec): Let low target handle debug registers.
16997 (child_add_thread): Likewise.
16998 (child_init_thread_list): Likewise.
16999 (continue_one_thread): Likewise.
17001 (do_child_fetch_inferior_registers): Move to ...
17002 * win32-i386-low.c: ... here, and rename to ...
17003 (do_fetch_inferior_registers): ... this.
17004 * win32-low.c (child_fetch_inferior_registers):
17005 Go through the low target.
17006 (do_child_store_inferior_registers): Use regptr.
17007 (strwinerror): New function.
17008 (win32_create_inferior): Handle Windows CE.
17009 Use strwinerror instead of strerror on Windows error
17010 codes. Add program to the error output.
17011 Don't close the main thread handle on Windows CE.
17012 (win32_attach): Use coredll.dll on Windows CE.
17013 (win32_kill): Close current process and current
17015 (win32_detach): Use coredll.dll on Windows CE.
17016 (win32_resume): Let low target handle debug registers, and
17018 (handle_exception): Add/Remove initial breakpoint. Avoid
17019 non-existant WSTOPSIG on Windows CE.
17020 (win32_read_inferior_memory): Cast to remove warning.
17021 (win32_arch_string): Go through the low target.
17022 (initialize_low): Call set_breakpoint_data with the low
17023 target's breakpoint.
17024 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17025 FOP_REGNUM, mappings): Move to ...
17026 * win32-i386-low.c: ... here.
17027 * win32-low.c (win32_thread_info): Move to ...
17028 * win32-low.h: ... here.
17029 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17030 win32-arm-low.c and wincecompat.c.
17031 (all:): Add $EXEEXT.
17032 (install-only:): Likewise.
17033 (gdbserver:): Likewise.
17034 (gdbreplay:): Likewise.
17035 * config.in: Regenerate.
17036 * configure: Regenerate.
17038 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17040 * win32-low.c: Rename typedef thread_info to
17041 win32_thread_info throughout.
17043 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17045 * win32-i386-low.c: Rename to ...
17046 * win32-low.c: ... this.
17047 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17048 * Makefile.in: Likewise.
17050 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17052 * remote-utils.c (monitor_output): Constify msg parameter.
17053 * server.h (monitor_output): Likewise.
17054 * win32-i386-low.c (handle_output_debug_string): New.
17055 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17056 handle_output_debug_string.
17057 (get_child_debug_event): Likewise.
17059 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17061 * server.c (main): Correct strtoul check.
17063 2007-03-27 Jon Ringle <jon@ringle.org>
17065 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17067 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17069 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17071 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17073 * terminal.h: Check HAVE_SGTTY_H.
17075 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17077 * remote-utils.c (remote_open): Print out the assigned port number.
17079 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17081 * remote-utils.c (monitor_output): New function.
17082 * server.c (debug_threads): Define here.
17083 (monitor_show_help): New function.
17084 (handle_query): Handle qRcmd.
17085 (main): Do not handle 'd' packet.
17086 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17087 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17090 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17092 * Makefile.in (EXEEXT): New.
17093 (clean): Use $(EXEEXT).
17095 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17097 * target.h (target_ops): Rename send_signal to request_interrupt,
17098 and remove enum target_signal parameter.
17099 * linux-low.c (linux_request_interrupt): Rename from
17100 linux_send_signal, and always send SIGINT.
17101 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17102 and always send SIGINT.
17103 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17105 (input_interrupt): Likewise.
17107 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17109 * server.c (get_features_xml): Check if target implemented
17111 * win32-i386-low.c (win32_arch_string): New.
17112 (win32_target_ops): Add win32_arch_string as arch_string member.
17114 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17116 * spu-low.c (spu_arch_string): New.
17117 (spu_target_ops): Add spu_arch_string.
17119 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17121 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17122 * configure.ac: Do not check for terminal.h.
17123 * configure, config.in: Regenerated.
17125 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17127 * Makefile.in (OBS): Add $(XML_BUILTIN).
17128 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17130 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17131 (arm-with-iwmmxt.c): New.
17132 * config.in, configure: Regenerate.
17133 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17134 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17135 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17136 (arm*-*-linux*): Add iWMMXt and regset support.
17137 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17138 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17139 (arm_store_wmmxregset, target_regsets): New.
17140 * server.c (get_features_xml): Take annex argument. Check builtin
17142 (handle_query): Handle multiple annexes.
17144 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17146 * remote-utils.c [USE_WIN32API] (read, write): Define.
17147 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17150 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17152 * linux-i386-low.c (the_low_target): Set arch_string.
17153 * linux-x86-64-low.c (the_low_target): Likewise.
17154 * linux-low.c (linux_arch_string): New.
17155 (linux_target_ops): Add it.
17156 * linux-low.h (struct linux_target_ops): Add arch_string.
17157 * server.c (write_qxfer_response): Use const void * for DATA.
17158 (get_features_xml): New.
17159 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17160 * target.h (struct target_ops): Add arch_string method.
17162 2007-01-03 Denis Pilat <denis.pilat@st.com>
17163 Daniel Jacobowitz <dan@codesourcery.com>
17165 * linux-low.c (linux_kill): Handle being called with no threads.
17166 * win32-i386-low.c (win32_kill): Likewise.
17167 (get_child_debug_event): Clear current_process_handle.
17169 2006-12-30 Denis PILAT <denis.pilat@st.com>
17170 Daniel Jacobowitz <dan@codesourcery.com>
17172 * remote-utils.c (remote_open): Check the type of specified
17173 serial port devices before opening them.
17174 * server.c (main): Kill the inferior if an error occurs during
17175 the first remote_open.
17177 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17179 * README: Update supported targets.
17181 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17183 * Makefile.in (clean): Remove reg-mips64.c.
17184 (reg-mips64.c, reg-mips64.o): New rules.
17185 * configure.srv: Handle mips64. Include regset support for mips.
17186 * linux-mips-low.c (union mips_register): New.
17187 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17188 (mips_breakpoint, mips_breakpoint_at): Use int.
17189 (mips_collect_register, mips_supply_register)
17190 (mips_collect_register_32bit, mips_supply_register_32bit)
17191 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17192 (mips_store_fpregset, target_regsets): New.
17193 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17195 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17197 * configure.srv: Add target "spu*-*-*".
17198 * Makefile.in (clean): Remove reg-spu.c.
17199 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17200 * spu-low.c: New file.
17202 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17204 * configure.ac: Correct td_thr_tls_get_addr test.
17205 * configure: Regenerated.
17207 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17209 * linux-low.c (linux_wait_for_event): Reformat. Use the
17210 pass_signals array.
17211 * remote-utils.c (decode_address_to_semicolon): New.
17212 * server.c (pass_signals, handle_general_set): New.
17213 (handle_query): Mention QPassSignals for qSupported.
17214 (main): Call handle_general_set.
17215 * server.h (pass_signals, decode_address_to_semicolon): New.
17217 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17219 * server.c (handle_query): Correct error handling for read_auxv.
17221 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17223 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17224 and srv_linux_thread_db to yes.
17225 * linux-s390-low.c (s390_fill_gregset): New function.
17226 (target_regsets): Define data structure.
17228 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17230 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17231 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17232 * config.in, configure: Regenerated.
17233 * inferiors.c (gdb_id_to_thread): New function.
17234 (gdb_id_to_thread_id): Use it.
17235 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17236 * linux-low.h (struct process_info): Add th member.
17237 (thread_db_get_tls_address): New prototype.
17238 * remote-utils.c (decode_address): Make non-static.
17239 * server.c (handle_query): Handle qGetTLSAddr.
17240 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17241 * target.h (struct target_ops): Add get_tls_address.
17242 * thread-db.c (maybe_attach_thread): Save the thread handle.
17243 (thread_db_get_tls_address): New.
17245 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17247 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17248 (linux_resume_one_process): Take a siginfo_t *. Update all
17249 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17250 (struct pending_signals): Add a siginfo_t.
17251 (linux_wait_for_process): Always set last_status.
17252 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17253 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17254 * linux-low.h (struct process_info): Add last_status.
17256 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17258 * remote-utils.c (try_rle): New function.
17259 (putpkt_binary): Use it.
17261 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17263 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17264 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17265 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17266 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17267 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17270 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17272 * server.c (terminal_fd): New variable.
17273 (old_foreground_pgrp): Likewise.
17274 (restore_old_foreground_pgrp): New function.
17275 (start_inferior): Record the terminal file descriptor in terminal_fd
17276 and its original foreground group in old_foreground_pgrp. Register
17277 restore_old_foreground_pgrp with atexit().
17279 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17281 * server.c (handle_query): Correct qPart to qXfer.
17283 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17285 * configure.ac: Check for more headers which are missing on
17286 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17287 * configure.srv: Add Cygwin and mingw32.
17288 * remote-utils.c: Don't include headers unconditionally which
17289 are missing on mingw32. Include <winsock.h> for mingw32.
17290 (remote_open): Adjust for mingw32 support. Flush
17291 standard error after writing to it.
17292 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17293 (unblock_async_io, enable_async_io, disable_async_io)
17294 (readchar, getpkt): Update for Winsock support.
17295 (prepare_resume_reply): Expect a protocol signal number.
17296 * server.c: Disable <sys/wait.h> on mingw32.
17297 (start_inferior): Adjust for mingw32 support. Flush
17298 standard error after writing to it.
17299 (attach_inferior): Likewise. Use protocol signal
17301 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17303 * win32-i386-low.c: New file.
17304 * Makefile.in (XM_CLIBS): Set.
17305 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17306 (win32-i386-low.o): New dependency rule.
17307 * linux-low.c (linux_wait): Use target signal numbers.
17308 * target.h (struct target_ops): Doc fix.
17309 * server.h (target_signal_to_name): New prototype.
17310 * gdbreplay.c: Don't include headers unconditionally which
17311 are missing on mingw32. Include <winsock.h> for mingw32.
17312 (remote_close, remote_open): Adjust for Winsock support.
17313 * configure, config.in: Regenerated.
17315 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17317 * server.c (decode_xfer_read, write_qxfer_response): New.
17318 (handle_query): Take a packet length argument. Handle
17319 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17320 the qSupported response.
17321 (main): Update call to handle_query.
17323 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17325 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17326 (putpkt_binary): Renamed from putpkt and adjusted for binary
17328 (putpkt): New wrapper for putpkt_binary.
17329 (readchar): Don't mask off the high bit.
17330 (decode_X_packet): New function.
17331 * server.c (main): Call putpkt_binary if a handler sets the packet
17332 length. Save the length of the incoming packet. Handle 'X'.
17333 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17335 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17337 * server.c (handle_query): Handle qSupported.
17339 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17341 * remote-utils.c (all_symbols_looked_up): New variable.
17342 (look_up_one_symbol): Check it.
17343 * server.h (look_up_one_symbol): New declaration.
17344 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17346 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17348 * Makefile.in (linux-arm-low.o): Update dependencies.
17349 * linux-arm-low.c: Include "gdb_proc_service.h".
17350 (PTRACE_GET_THREAD_AREA): Define.
17351 (ps_get_thread_area): New function.
17353 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17355 * configure.srv (m68k*-*-uclinux*): New target.
17356 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17357 (linux_resume_one_process): Remove extraneous cast.
17358 (linux_read_offsets): New.
17359 (linux_target_op): Add linux_read_offsets on mmuless systems.
17360 * server.c (handle_query): Add qOffsets logic.
17361 * target.h (struct target_ops): Add read_offsets.
17363 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17365 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17366 (PTRACE_GET_THREAD_AREA): Define.
17367 (ps_get_thread_area): New function.
17368 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17369 (linux-x86-64-low.o): Update.
17371 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17373 * configure.ac: Remove checks for prfpregset_t.
17374 * gdb_proc_service.h: New file.
17375 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17376 new "gdb_proc_service.h".
17377 * proc-service.c: Likewise.
17378 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17379 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17380 * Makefile.in (gdb_proc_service_h): Updated.
17381 * configure, config.in: Regenerated.
17383 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17385 * remote-utils.c (prepare_resume_reply): Move declaration
17386 of gdb_id_from_wait to the top of the block.
17388 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17390 * linux-low.c (regsets_store_inferior_registers): Read the regset
17391 from the target before filling it.
17393 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17395 * server.c (attach_inferior): Return SIGTRAP for a successful
17398 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17400 * Makefile.in (OBS): Add version.o.
17401 (STAGESTUFF): Delete.
17402 (version.o): Add dependencies.
17403 (version.c): Replace rule.
17404 (clean): Remove version.c.
17405 * server.c (gdbserver_version): New.
17406 (gdbserver_usage): Use printf.
17407 (main): Handle --version and --help.
17408 * server.h (version, host_name): Add declarations.
17410 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17422 * linux-x86-64-low.c:
17424 * linux-s390-low.c:
17425 * linux-ppc64-low.c:
17427 * linux-mips-low.c:
17428 * linux-m68k-low.c:
17429 * linux-m32r-low.c:
17432 * linux-ia64-low.c:
17433 * linux-i386-low.c:
17434 * linux-crisv32-low.c:
17446 * gdbserver.1: Add (C) after Copyright. Update the FSF
17449 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17451 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17452 (arm_breakpoint_at): Recognize both breakpoints.
17453 (the_low_target): Use the correct breakpoint instruction.
17455 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17457 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17458 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17459 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17460 (the_low_target): Update.
17462 2005-10-25 Andreas Schwab <schwab@suse.de>
17464 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17466 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17467 (ia64_num_regs): Reduce to 462.
17469 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17471 * acinclude.m4: Correct quoting.
17472 * aclocal.m4: Regenerated.
17474 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17475 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17476 (thread_db_init): Call thread_db_err_str.
17477 * configure.ac: Check for TD_VERSION.
17478 * config.in, configure: Regenerated.
17480 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17482 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17484 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17486 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17487 is not available. Define HAVE_PTRACE_GETREGS if it is.
17488 * config.in, configure: Regenerated.
17489 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17490 * linux-i386-low.c, linux-m68k-low.c: Update to use
17491 HAVE_PTRACE_GETREGS.
17492 * linux-low.c (regsets_fetch_inferior_registers)
17493 (regsets_store_inferior_registers): Only return 0 if we processed
17495 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17496 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17498 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17500 * inferiors.c (struct thread_info): Add gdb_id.
17501 (add_thread): Add gdb_id argument.
17502 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17503 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17504 calls to add_thread.
17505 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17506 * server.c (handle_query): Use thread_to_gdb_id.
17507 (handle_v_cont, main): Use gdb_id_to_thread_id.
17508 * server.h (add_thread): Update prototype.
17509 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17512 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17514 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17515 left-padded registers.
17516 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17517 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17519 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17521 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17522 * configure: Regenerate.
17523 * config.in: Regenerate.
17524 * server.h (NEED_DECLARATION_STRERROR):
17525 Replace with !HAVE_DECL_STRERROR.
17527 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17529 * linux-low.c (linux_wait, linux_send_signal): Don't test
17530 an unsigned long variable for > 0 if it could be MAX_ULONG.
17531 * server.c (myresume): Likewise.
17532 * target.c (set_desired_inferior): Likewise.
17534 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17536 * configure.ac: Simplify and improve check for socklen_t.
17537 * configure, config.in: Regenerate.
17539 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17541 * acconfig.h: Remove.
17542 * configure.ac: Add a test for socklen_t. Use three-argument
17543 AC_DEFINE throughout.
17544 * config.in: Regenerated using autoheader 2.59.
17545 * configure: Regenerated.
17547 * gdbreplay.c (socklen_t): Provide a default.
17548 (remote_open): Use socklen_t.
17549 * remote-utils.c (socklen_t): Provide a default.
17550 (remote_open): Use socklen_t.
17551 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17554 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17556 * linux-low.c (linux_read_memory, linux_write_memory)
17557 (linux_read_auxv): Likewise.
17558 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17559 (check_mem_write): Likewise.
17560 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17562 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17563 (registers_from_string, register_data): Likewise.
17564 * server.c (handle_query, main): Likewise.
17565 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17566 (decode_M_packet): Likewise.
17567 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17568 * target.h (struct target_ops): Update read_memory, write_memory,
17570 (read_inferior_memory, write_inferior_memory): Update.
17571 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17572 to unsigned char *.
17573 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17574 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17575 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17576 linux-s390-low.c, linux-sh-low.c: Update for changes in
17577 read_inferior_memory and the_low_target->breakpoint.
17579 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17581 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17582 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17583 * configure.srv: Add powerpc64-*-linux*.
17584 * linux-ppc64-low.c: New file.
17586 2005-05-23 Orjan Friberg <orjanf@axis.com>
17588 * linux-cris-low.c: New file with support for CRIS.
17589 * linux-crisv32-low.c: Ditto for CRISv32.
17590 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17591 (clean): Add reg-cris.c and reg-crisv32.c.
17592 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17593 reg-crisv32.o, and reg-crisv32.c to make rules.
17594 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17595 recognized targets.
17597 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17599 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17600 of sizeof (PTRACE_XFER_TYPE).
17601 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17603 2005-05-12 Orjan Friberg <orjanf@axis.com>
17605 * target.h (struct target_ops): Add insert_watchpoint,
17606 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17607 pointers for hardware watchpoint support.
17608 * linux-low.h (struct linux_target_ops): Ditto.
17609 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17610 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17611 to linux_target_ops.
17612 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17614 * server.c (main): Recognize 'Z' and 'z' packets.
17616 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17618 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17619 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17620 (the_low_target): Add new members.
17622 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17624 * proc-service.c (ps_lgetregs): Search all_processes instead of
17627 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17629 * server.c (start_inferior): Change return type to int.
17630 (attach_inferior): Change sigptr to int *.
17631 (handle_v_cont, handle_v_requests): Change signal to int *.
17632 (main): Change signal to int.
17634 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17636 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17637 * configure.srv: Add m32r*-*-linux*.
17638 * linux-m32r-low.c: New file.
17640 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17642 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17644 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17646 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17647 Take unsigned long arguments for PIDs.
17648 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17649 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17650 (wait_for_sigstop, linux_resume_one_process)
17651 (regsets_fetch_inferior_registers, linux_send_signal)
17652 (linux_read_auxv): Likewise. Update the types of variables holding
17653 PIDs. Update format string specifiers.
17654 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17655 * remote-utils.c (prepare_resume_reply): Likewise.
17656 * server.c (cont_thread, general_thread, step_thread)
17657 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17659 (handle_query): Update format specifiers.
17660 (handle_v_cont, main): Use strtoul for thread IDs.
17661 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17662 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17663 (general_thread, step_thread, thread_from_wait)
17664 (old_thread_from_wait): Update.
17665 * target.h (struct thread_resume): Use unsigned long for THREAD.
17666 (struct target_ops): Use unsigned long for arguments to attach and
17669 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17671 * acinclude.m4: Include bfd/bfd.m4 directly.
17672 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17673 <agriffis@toolchain.org>.
17674 * aclocal.m4, configure: Regenerated.
17676 2005-01-07 Andrew Cagney <cagney@gnu.org>
17678 * configure.ac: Rename configure.in, require autoconf 2.59.
17679 * configure: Re-generate.
17681 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17683 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17684 LIBS when finished.
17685 * aclocal.m4: Regenerated.
17686 * configure: Regenerated.
17688 2004-11-21 Andreas Schwab <schwab@suse.de>
17690 * linux-m68k-low.c (m68k_num_gregs): Define.
17691 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17692 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17693 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17694 (m68k_breakpoint_at): New. Add to the_low_target.
17696 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17697 srv_linux_thread_db to yes.
17699 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17701 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17702 (ARCH_SET_FS): Likewise.
17703 (ARCH_GET_FS): Likewise.
17704 (ARCH_GET_GS): Likewise.
17706 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17708 * linux-i386-low.c (ps_get_thread_area): New.
17709 * linux-x86-64-low.c (ps_get_thread_area): New.
17710 * linux-low.c: Include <sys/syscall.h>.
17711 (linux_kill_one_process): Don't kill the first thread here.
17712 (linux_kill): Kill the first thread here.
17713 (kill_lwp): New function.
17714 (send_sigstop, linux_send_signal): Use it.
17715 * proc-service.c: Clean up #ifdefs.
17716 (fpregset_info): Delete.
17717 (ps_lgetregs): Update and enable implementation.
17718 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17720 * remote-utils.c (struct sym_cache, symbol_cache): New.
17721 (input_interrupt): Print a clearer message.
17722 (async_io_enabled): New variable.
17723 (enable_async_io, disable_async_io): Use it. Update comments.
17724 (look_up_one_symbol): Use the symbol cache.
17725 * thread-db.c (thread_db_look_up_symbols): New function.
17726 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17728 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17730 * configure.in: Test for -rdynamic.
17731 * configure: Regenerated.
17732 * Makefile (INTERNAL_LDFLAGS): New.
17733 (gdbserver, gdbreplay): Use it.
17735 2004-09-02 Andrew Cagney <cagney@gnu.org>
17737 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17739 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17741 * linux-low.c (linux_wait): Clear all_processes list also.
17743 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17745 * linux-low.c: Include <errno.h>. Remove extern declaration of
17748 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17750 * gdbreplay.c, server.h, utils.c: Update copyright years.
17752 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17754 * server.c (main): Print child status or termination signal from
17755 variable 'signal', not 'sig'.
17757 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17759 * linux-low.c (linux_read_memory): Change return type to
17760 int. Check for and return error from ptrace().
17761 * target.c (read_inferior_memory): Change return type to int. Pass
17762 back return status from the_target->read_memory().
17763 * target.h (struct target_ops): Adapt *read_memory() prototype.
17765 (read_inferior_memory): Adapt prototype.
17766 * server.c (main): Return an error packet if
17767 read_inferior_memory() returns an error.
17769 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17771 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17772 Unify with other clean targets.
17774 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17776 * server.c (handle_v_cont): Call set_desired_inferior.
17778 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17780 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17782 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17784 * linux-low.c (linux_wait): Unblock async I/O.
17785 (linux_resume): Block and enable async I/O.
17786 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17787 * server.h (block_async_io, unblock_async_io): Add prototypes.
17789 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17791 * remote-utils.c (remote_open): Print a status notice after
17792 opening a TCP port.
17793 * server.c (attach_inferior): Print a status notice after
17796 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17798 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17800 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17802 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17804 * server.c, target.h: Update copyright years.
17806 2004-02-25 Roland McGrath <roland@redhat.com>
17808 * target.h (struct target_ops): New member `read_auxv'.
17809 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17810 * linux-low.c (linux_read_auxv): New function.
17811 (linux_target_ops): Initialize `read_auxv' member to that.
17813 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17815 Committed by Jim Blandy <jimb@redhat.com>.
17817 * linux-s390-low.c (s390_num_regs): Update.
17818 (s390_regmap): Remove control registers. Use __s390x__ predefine
17819 instead of GPR_SIZE to distiguish s390 and s390x targets.
17821 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17823 * linux-low.c: Update copyright year.
17824 (check_removed_breakpoint): Clear pending_is_breakpoint.
17825 (linux_set_resume_request, linux_queue_one_thread)
17826 (resume_status_pending_p): New functions.
17827 (linux_continue_one_thread): Use process->resume.
17828 (linux_resume): Only resume threads if there are no pending events.
17829 * linux-low.h (struct process_info): Add resume request
17832 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17834 * regcache.c (new_register_cache): Clear the allocated register
17835 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17837 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17839 * linux-low.c (linux_resume): Take a struct thread_resume *
17841 (linux_wait): Update call.
17842 (resume_ptr): New static variable.
17843 (linux_continue_one_thread): Renamed from
17844 linux_continue_one_process. Use resume_ptr.
17845 (linux_resume): Use linux_continue_one_thread.
17846 * server.c (handle_v_cont, handle_v_requests): New functions.
17847 (myresume): New function.
17848 (main): Handle 'v' case.
17849 * target.h (struct thread_resume): New type.
17850 (struct target_ops): Change argument of "resume" to struct
17852 (myresume): Delete macro.
17854 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17856 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17857 (uninstall): Support DESTDIR.
17859 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17861 * configure.srv: Add xscale*linux copy of arm*linux entry.
17863 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17865 * linux-arm-low.c (arm_reinsert_addr): New function.
17866 (the_low_target): Add arm_reinsert_addr.
17868 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17870 * mem-break.c: Remove whitespace at end of file.
17872 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17874 * configure.in: Check whether we need to prototype strerror.
17875 * server.h: Optionally prototype strerror.
17876 * gdbreplay.c (perror_with_name): Use strerror.
17877 * linux-low.c (linux_attach_lwp): Use strerror.
17878 * utils.c (perror_with_name): Use strerror.
17879 * config.in, configure: Regenerated.
17881 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17883 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17884 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17886 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17888 * Makefile.in (SFILES): Update.
17889 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17890 low-sun3.c: Remove files.
17892 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17894 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17895 (linux_detach_one_process, linux_detach): New functions.
17896 (linux_target_ops): Add linux_detach.
17897 * server.c (main): Handle 'D' packet.
17898 * target.h (struct target_ops): Add "detach" member.
17899 (detach_inferior): Define.
17901 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17903 From Kelley Cook <kelleycook@wideopenwest.com>:
17904 * configure.srv: Accept i[34567]86 variants.
17906 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17908 * linux-low.c (linux_wait_for_event): Correct comment typos.
17909 (linux_resume_one_process): Call check_removed_breakpoint.
17910 (linux_send_signal): New function.
17911 (linux_target_ops): Add linux_send_signal.
17912 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17914 * target.h (struct target_ops): Add send_signal.
17916 2003-05-29 Jim Blandy <jimb@redhat.com>
17918 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17919 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17920 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17921 away part of the register's value.
17923 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17925 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17926 (linux_wait_for_event, linux_init_signals): Likewise.
17928 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17930 * configure.in: Check for stdlib.h.
17931 * configure: Regenerated.
17932 * config.in: Regenerated.
17934 2003-01-04 Andreas Schwab <schwab@suse.de>
17936 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17938 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17940 * Makefile.in: Remove obsolete code.
17942 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17944 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17945 defined(PT_FPR0_HI).
17947 2002-11-17 Stuart Hughes <seh@zee2.com>
17949 * linux-arm-low.c (arm_num_regs): Increase.
17950 (arm_regmap): Include status register.
17952 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17954 * linux-low.c (register_addr): Remove incorrect -1 check.
17956 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17958 * linux-low.c (linux_create_inferior): Call setpgid. Return
17960 (unstopped_p, linux_signal_pid): Remove.
17961 (linux_target_ops): Remove linux_signal_pid.
17962 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17963 global instead of target method.
17964 * target.h (struct target_ops): Remove signal_pid. Update comment
17965 for create_inferior.
17966 * server.c (signal_pid): New variable.
17967 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17968 gdbserver. Set the child to be the foreground process group.
17969 (attach_inferior): Set signal_pid.
17971 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17973 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17975 2002-08-20 Jim Blandy <jimb@redhat.com>
17977 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17980 2002-08-01 Andrew Cagney <cagney@redhat.com>
17982 * Makefile.in: Make chill references obsolete.
17984 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17986 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17987 * configure: Regenerate.
17988 * config.in: Regenerate.
17990 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17992 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17993 (perror_with_name, remote_close, remote_open, expect, play): Static.
17995 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17997 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17998 byte offsets instead of an array of indexes.
17999 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18001 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18003 * regcache.c: Add comment.
18005 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18007 * thread-db.c: New file.
18008 * proc-service.c: New file.
18009 * acinclude.m4: New file.
18010 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18011 proc-service.o, and thread-db.o.
18012 (linux-low.o): Add USE_THREAD_DB.
18013 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18014 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18015 * aclocal.m4: Regenerated.
18016 * config.in: Regenerated.
18017 * configure: Regenerated.
18018 * configure.in: Check for proc_service.h, sys/procfs.h,
18019 thread_db.h, and linux/elf.h headrs.
18020 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18021 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18022 Check for -lthread_db and thread support.
18023 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18024 PowerPC, and SuperH.
18025 * i387-fp.c: Constify arguments.
18026 * i387-fp.h: Likewise.
18027 * inferiors.c: (struct thread_info): Renamed from
18028 `struct inferior_info'. Remove PID member. Use generic inferior
18029 list header. All uses updated.
18030 (inferiors, signal_pid): Removed.
18031 (all_threads): New variable.
18032 (get_thread): Define.
18033 (add_inferior_to_list): New function.
18034 (for_each_inferior): New function.
18035 (change_inferior_id): New function.
18036 (add_inferior): Removed.
18037 (remove_inferior): New function.
18038 (add_thread): New function.
18039 (free_one_thread): New function.
18040 (remove_thread): New function.
18041 (clear_inferiors): Use for_each_inferior and free_one_thread.
18042 (find_inferior): New function.
18043 (find_inferior_id): New function.
18044 (inferior_target_data): Update argument type.
18045 (set_inferior_target_data): Likewise.
18046 (inferior_regcache_data): Likewise.
18047 (set_inferior_regcache_data): Likewise.
18048 * linux-low.c (linux_bp_reinsert): Remove.
18049 (all_processes, stopping_threads, using_thrads)
18050 (struct pending_signals, debug_threads, pid_of): New.
18051 (inferior_pid): Replace with macro.
18052 (struct inferior_linux_data): Remove.
18053 (get_stop_pc, add_process): New functions.
18054 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18055 Use add_process and add_thread.
18056 (linux_attach_lwp): New function, based on old linux_attach. Use
18057 add_process and add_thread. Set stop_expected for new threads.
18058 (linux_attach): New function.
18059 (linux_kill_one_process): New function.
18060 (linux_kill): Kill all LWPs.
18061 (linux_thread_alive): Use find_inferior_id.
18062 (check_removed_breakpoints, status_pending_p): New functions.
18063 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18064 Update. Use WNOHANG. Wait for cloned processes also. Update process
18065 struct for the found process.
18066 (linux_wait_for_event): New function.
18067 (linux_wait): Use it. Support LWPs.
18068 (send_sigstop, wait_for_sigstop, stop_all_processes)
18069 (linux_resume_one_process, linux_continue_one_process): New functions.
18070 (linux_resume): Support LWPs.
18071 (REGISTER_RAW_SIZE): Remove.
18072 (fetch_register): Use register_size instead. Call supply_register.
18073 (usr_store_inferior_registers): Likewise. Call collect_register.
18074 Fix recursive case.
18075 (regsets_fetch_inferior_registers): Improve error message.
18076 (regsets_store_inferior_registers): Add debugging.
18077 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18078 (unstopped_p, linux_signal_pid): New functions.
18079 (linux_target_ops): Add linux_signal_pid.
18080 (linux_init_signals): New function.
18081 (initialize_low): Call it. Initialize using_threads.
18082 * regcache.c (inferior_regcache_data): Add valid
18084 (get_regcache): Fetch registers lazily. Add fetch argument
18085 and update all callers.
18086 (regcache_invalidate_one, regcache_invalidate): New
18088 (new_register_cache): Renamed from create_register_cache.
18089 Return the new regcache.
18090 (free_register_cache): Change argument to a void *.
18091 (registers_to_string, registers_from_string): Call get_regcache
18092 with fetch flag set.
18093 (register_data): Make static. Pass fetch flag to get_regcache.
18094 (supply_register): Call get_regcache with fetch flag clear.
18095 (collect_register): Call get_regcache with fetch flag set.
18096 (collect_register_as_string): New function.
18097 * regcache.h: Update.
18098 * remote-utils.c (putpkt): Flush after debug output and use
18100 Handle input interrupts while waiting for an ACK.
18101 (input_interrupt): Use signal_pid method.
18102 (getpkt): Flush after debug output and use stderr.
18103 (outreg): Use collect_register_as_string.
18104 (new_thread_notify, dead_thread_notify): New functions.
18105 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18106 and general_thread.
18107 (look_up_one_symbol): Flush after debug output.
18108 * server.c (step_thread, server_waiting): New variables.
18109 (start_inferior): Don't use signal_pid. Update call to mywait.
18110 (attach_inferior): Update call to mywait.
18111 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18112 (main): Don't fetch/store registers explicitly. Use
18113 set_desired_inferior. Support proposed ``Hs'' packet. Update
18115 * server.h: Update.
18116 (struct inferior_list, struct_inferior_list_entry): New.
18117 * target.c (set_desired_inferior): New.
18118 (write_inferior_memory): Constify.
18119 (mywait): New function.
18120 * target.h: Update.
18121 (struct target_ops): New signal_pid method.
18122 (mywait): Removed macro, added prototype.
18124 * linux-low.h (regset_func): Removed.
18125 (regset_fill_func, regset_store_func): New.
18126 (enum regset_type): New.
18127 (struct regset_info): Add type field. Use new operation types.
18128 (struct linux_target_ops): stop_pc renamed to get_pc.
18129 Add decr_pc_after_break and breakpoint_at.
18130 (get_process, get_thread_proess, get_process_thread)
18131 (strut process_info, all_processes, linux_attach_lwp)
18132 (thread_db_init): New.
18134 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18135 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18136 (the_low_target): Add new members.
18137 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18138 (i386_store_fpxregset): Constify.
18139 (target_regsets): Add new kind identifier.
18140 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18141 (i386_set_pc): Add debugging.
18142 (i386_breakpoint_at): New function.
18143 (the_low_target): Add new members.
18144 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18145 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18146 (mips_breakpoint_at): New.
18147 (the_low_target): Add new members.
18148 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18149 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18150 (the_low_target): Add new members.
18151 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18152 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18153 (the_low_target): Add new members.
18154 * linux-x86-64-low.c (target_regsets): Add new kind
18157 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18159 From Martin Pool <mbp@samba.org>:
18160 * server.c (gdbserver_usage): New function.
18163 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18165 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18166 stop_at -> stop_pc.
18168 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18170 * Makefile.in: Remove obsolete code.
18172 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18174 * linux-low.c (regsets_fetch_inferior_registers),
18175 (regsets_store_inferior_registers): Removed cast to int from
18177 * regcache.h: Added declaration of struct inferior_info.
18179 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18181 * inferiors.c (struct inferior_info): Add regcache_data.
18182 (add_inferior): Call create_register_cache.
18183 (clear_inferiors): Call free_register_cache.
18184 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18185 * regcache.c (struct inferior_regcache_data): New.
18186 (registers): Remove.
18187 (get_regcache): New function.
18188 (create_register_cache, free_register_cache): New functions.
18189 (set_register_cache): Don't initialize the register cache here.
18190 (registers_to_string, registers_from_string, register_data): Call
18192 * regcache.h: Add prototypes.
18193 * server.h: Likewise.
18195 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18197 * mem-break.c: New file.
18198 * mem-break.h: New file.
18199 * Makefile.in: Add mem-break.o rule; update server.h
18201 * inferiors.c (struct inferior_info): Add target_data
18203 (clear_inferiors): Free target_data member if set.
18204 (inferior_target_data, set_inferior_target_data): New functions.
18205 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18206 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18207 * linux-low.c (linux_bp_reinsert): New variable.
18208 (struct inferior_linux_data): New.
18209 (linux_create_inferior): Use set_inferior_target_data.
18210 (linux_attach): Likewise. Call add_inferior.
18211 (linux_wait_for_one_inferior): New function.
18212 (linux_wait): Call it.
18213 (linux_write_memory): Add const.
18214 (initialize_low): Call set_breakpoint_data.
18215 * linux-low.h (struct linux_target_ops): Add breakpoint
18217 * server.c (attach_inferior): Remove extra add_inferior
18219 * server.h: Include mem-break.h. Update inferior.c
18221 * target.c (read_inferior_memory)
18222 (write_inferior_memory): New functions.
18223 * target.h (read_inferior_memory)
18224 (write_inferior_memory): Change macros to prototypes.
18225 (struct target_ops): Update comments. Add const to write_memory
18228 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18230 * linux-low.c (usr_store_inferior_registers): Support
18231 registers which are allowed to fail to store.
18232 * linux-low.h (linux_target_ops): Likewise.
18233 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18234 (ppc_cannot_store_register): FPSCR may not be storable.
18236 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18238 * server.h: Include <string.h> if HAVE_STRING_H.
18239 * ChangeLog: Correct paths in last ChangeLog entry.
18241 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18243 * linux-low.h: Remove obsolete prototypes.
18244 (struct linux_target_ops): New.
18245 (extern the_low_target): New.
18246 * linux-low.c (num_regs, regmap): Remove declarations.
18247 (register_addr): Use the_low_target explicitly.
18248 (fetch_register): Likewise.
18249 (usr_fetch_inferior_registers): Likewise.
18250 (usr_store_inferior_registers): Likewise.
18251 * linux-arm-low.c (num_regs): Remove.
18252 (arm_num_regs): Define.
18253 (arm_regmap): Renamed from regmap, made static.
18254 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18256 (arm_cannot_store_register): Renamed from cannot_store_register,
18258 (the_low_target): New.
18259 * linux-i386-low.c (num_regs): Remove.
18260 (i386_num_regs): Define.
18261 (i386_regmap): Renamed from regmap, made static.
18262 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18264 (i386_cannot_store_register): Renamed from cannot_store_register,
18266 (the_low_target): New.
18267 * linux-ia64-low.c (num_regs): Remove.
18268 (ia64_num_regs): Define.
18269 (ia64_regmap): Renamed from regmap, made static.
18270 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18272 (ia64_cannot_store_register): Renamed from cannot_store_register,
18274 (the_low_target): New.
18275 * linux-m68k-low.c (num_regs): Remove.
18276 (m68k_num_regs): Define.
18277 (m68k_regmap): Renamed from regmap, made static.
18278 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18280 (m68k_cannot_store_register): Renamed from cannot_store_register,
18282 (the_low_target): New.
18283 * linux-mips-low.c (num_regs): Remove.
18284 (mips_num_regs): Define.
18285 (mips_regmap): Renamed from regmap, made static.
18286 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18288 (mips_cannot_store_register): Renamed from cannot_store_register,
18290 (the_low_target): New.
18291 * linux-ppc-low.c (num_regs): Remove.
18292 (ppc_num_regs): Define.
18293 (ppc_regmap): Renamed from regmap, made static.
18294 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18296 (ppc_cannot_store_register): Renamed from cannot_store_register,
18298 (the_low_target): New.
18299 * linux-s390-low.c (num_regs): Remove.
18300 (s390_num_regs): Define.
18301 (s390_regmap): Renamed from regmap, made static.
18302 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18304 (s390_cannot_store_register): Renamed from cannot_store_register,
18306 (the_low_target): New.
18307 * linux-sh-low.c (num_regs): Remove.
18308 (sh_num_regs): Define.
18309 (sh_regmap): Renamed from regmap, made static.
18310 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18312 (sh_cannot_store_register): Renamed from cannot_store_register,
18314 (the_low_target): New.
18315 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18316 (the_low_target): New.
18318 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18320 * Makefile.in: Add stamp-h target.
18321 * configure.in: Create stamp-h.
18322 * configure: Regenerated.
18324 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18326 * inferiors.c: New file.
18327 * target.c: New file.
18328 * target.h: New file.
18329 * Makefile.in: Add target.o and inferiors.o. Update
18331 * linux-low.c (inferior_pid): New static variable,
18332 moved from server.c.
18333 (linux_create_inferior): Renamed from create_inferior.
18334 Call add_inferior. Return 0 on success instead of a PID.
18335 (linux_attach): Renamed from myattach.
18336 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18337 (linux_thread_alive): Renamed from mythread_alive.
18338 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18340 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18341 (regsets_store_inferior_registers): Correct error message.
18342 Add missing ``return 0''.
18343 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18344 (linux_store_registers): Renamed from store_inferior_registers.
18345 (linux_read_memory): Renamed from read_inferior_memory.
18346 (linux_write_memory): Renamed from write_inferior_memory.
18347 (linux_target_ops): New structure.
18348 (initialize_low): Call set_target_ops ().
18349 * remote-utils.c (unhexify): New function.
18350 (hexify): New function.
18351 (input_interrupt): Send signals to ``signal_pid''.
18352 * server.c (inferior_pid): Remove.
18353 (start_inferior): Update create_inferior call.
18354 (attach_inferior): Call add_inferior.
18355 (handle_query): New function.
18356 (main): Call handle_query for `q' packets.
18357 * server.h: Include "target.h". Remove obsolete prototypes.
18358 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18360 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18362 * Makefile.in: Add WARN_CFLAGS. Update configury
18364 * configure.in: Check for <string.h>
18365 * configure: Regenerate.
18366 * config.in: Regenerate.
18367 * gdbreplay.c: Include needed system headers.
18368 (remote_open): Remove strchr prototype.
18369 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18370 * regcache.c (supply_register): Change buf argument to const void *.
18371 (supply_register_by_name): Likewise.
18372 (collect_register): Change buf argument to void *.
18373 (collect_register_by_name): Likewise.
18374 * regcache.h: Add missing prototypes.
18375 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18376 * server.c (handle_query): New function.
18377 (attached): New static variable, moved out of main.
18378 (main): Quiet longjmp clobber warnings.
18379 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18380 * utils.c (error): Remove NORETURN.